# Plan Reads

> Compile validated Modbus points into deterministic, bounded read blocks for function codes 01 through 04. Use when a validated map is ready and the user needs a read plan before building Node-RED, Modpoll (BETA), ModScan (BETA), or a tool pack.

- Skill: `studioxvii/plan-reads` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add studioxvii/plan-reads`
- Raw SKILL.md: https://api.skillmd.com/api/skills/studioxvii/plan-reads/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: Apache-2.0
- Author: studioxvii (https://skillmd.com/u/studioxvii)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/studioxvii/plan-reads

---


# Plan Reads

Group physical reads without losing point traceability.

Follow `../../references/interaction-contract.md`.

## Process

1. Require a canonical map with no blocking identity, address, access, width, or
   final-decoding holds; do not require a separate blanket human approval.
2. Run `python3 <skill-dir>/scripts/run.py --input <map.json> --output <read-plan.json> --max-gap <unused-address-count>`.
3. Verify block quantity, gaps, interval, target limits, and point slices.
4. Verify automatically that every point appears in exactly one physical block.
5. Verify `planning_options` and its hash record the gap policy.
6. For final output, verify the plan's canonical-map hash matches the exact map.

Inspect these fields together in the emitted plan. For routine generation, use
the wrapper's validation and existing trace records; do not repeatedly browse
runtime code or reconstruct validators unless a concrete discrepancy requires it.

## Output files

- `read-plan.json` - Use this machine-readable list of bounded Modbus requests when building a target tool. It also records which points each request returns and why blocks were split.

Completion requires every active point to be planned once with explicit route, unit, area, offset, and width.

Use `--max-gap 0` without asking. Ask once only when a nonzero sparse-read policy is
needed. Replan automatically after every map change.

## Stop

- Stop while blocking identity, address, access, width, or final-decoding holds remain.
- Use `--max-gap 0` unless a nonzero sparse-read policy is explicitly required.
- Permit function codes 01 through 04 only.

## Handoff

- One target: suggest `build-node-red`, `build-modpoll`, or `build-modscan` based on the named tool.
- Several targets: suggest `build-tool-pack`.

