plugins/agentic-engineering-principles/skills/progressive-disclosure-tooling/SKILL.md
Structure a CLI or tool surface as a progressive-disclosure graph where every subcommand's --help is a self-contained mini-skill, and derive every guidance surface from one typed registry so documentation drift becomes structurally impossible. Use when writing --help text, designing tool help systems, organizing command documentation for agents, or fighting drift between help text, parsers, and skill docs.
npx skillsauth add amhuppert/my-ai-resources progressive-disclosure-toolingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Agents should discover a tool surface pull-based, node by node, instead of front-loading one large document. Make every subcommand a node in a disclosure graph whose --help is a self-contained mini-skill, and make every guidance surface — help text, flag allowlists, parser sets, usage, skill-doc references — a derivation from one typed registry. Hand-synced copies of the same facts will drift, and drift in agent-facing docs is worse than absence: it trains distrust.
Every subcommand is a node. A node's --help is a mini-skill containing:
Agents navigate the graph node by node via --help, pulling only what the current step needs.
tool group verb --help lands on the leaf, not the group.An example that restates the usage line is noise. Examples exist to teach failure-prone shapes: range syntaxes, payload file shapes, ordering constraints ("always validate first — exit 2 lists issues one per line"). In one real review of agent tool usage, a range-syntax mistake was the #1 observed friction — that is what the example slot is for.
Hints, error messages, and help text share one vocabulary. A hint that names a command must match that command's help node exactly; an error that suggests a flag must use the flag's registered name. Success/error hints form the chain edges of the same graph (validate → create → start; connection errors → doctor), so the agent experiences one coherent map, not three dialects.
All command metadata lives in typed entries (path, summary, description, usage, flags with kinds, examples, domain context, related edges, skill refs), authored in colocated per-command files and aggregated centrally. The aggregator throws at module init on duplicate paths or a leaf whose parent group node is missing — a malformed registry fails every test run, not at runtime in an agent session.
Every surface derives from the registry:
| Derived surface | Instead of | |---|---| | Per-command help text | A hand-written help record | | Per-command flag allowlists | Hand-written arrays at each validation call site | | The parser's boolean-flag set | A hand-maintained constant | | Top-level usage | A hand-written usage string | | Group dispatch (valid verbs, "requires a subcommand" errors) | Hand-listed verbs per group module | | The generated command reference in the agent-facing skill doc | Manually synced doc sections |
Hand-syncing any of these is a defect. In one real audit, a command accepted three flags its help never documented — the classic drift class. Because the allowlist is the registry after derivation, "the command accepts a flag help doesn't show" becomes structurally impossible. Don't build a sync test that compares two hand-written copies; derivation deletes the copy.
Group dispatch should derive a group's valid verbs from the registry's children and throw when its handler map disagrees with the registry — a verb wired into dispatch without an entry, or an entry with no handler, fails loudly.
For structured callers, --help --json returns the registry entry itself (summary, usage, flags, examples, related edges, skill refs) rather than a rendered text blob — machine callers should never parse prose, and there is no need to pay for the text twice in the JSON path.
When adding or changing a command, subcommand, or flag:
Make a contract test the definition of "help is correct", not a review duty:
Failure of any assertion is the "help is wrong" signal. Agent-facing documentation rot becomes a red suite instead of a slow trust leak.
Help is the recovery path — the thing an agent reaches for when something else went wrong. It must:
Compile durable content into the binary. Help must describe this build's parser — its flags must come from the same build as the flag parser, or help can lie about what the binary accepts. Fully server-rendered help breaks offline recovery and can skew against the binary; fully static help gives up context-awareness. Split it.
The server may append a few blocks of current runtime state to help output (running dev servers, current task and iteration counts, existing artifacts). Constrain this hard:
--help.Unpredictable help is worse for agents than static help. Every provider adds a dependency to a surface that must stay boring:
cli-tools-for-agents — design a project CLI as the agent tool surface: exit codes, file payloads, jobs, doctoragent-feedback-tiers — hint/reminder/instruction output tiers and the reminder admission rulemechanical-guardrails — enforce conventions structurally with ratchets, tripwires, contract tests, and derived artifactsearned-guidance-docs — write agent guidance only when earned by real failures; root contract plus read-on-demand docsdevelopment
Debug a running web app via the web-debugger SDK: app logs, application state, runtime snapshots, React state, query cache.
development
Thoroughly understand a software development objective before implementation: research, identify ambiguities, ask clarifying questions. Use before starting implementation of a non-trivial or ambiguously specified feature, or when requirements leave open design decisions.
development
Locate the on-disk Claude Code transcript file (.jsonl under ~/.claude/projects/) for the current or a specified conversation.
development
Reflect on codebase navigation effectiveness at end of conversation. Surfaces dead ends, inefficiencies, missing context. Does not write files — pair with /kiro:steering-custom to persist.