add-cli-command
Skill1 starsChanged 10 days agoMITView on GitHub
Add or change a doctrina CLI command or subcommand without leaving any surface (help, hub, docs, tests) behind. Use when: The task adds, renames, or removes a CLI command/subcommand, or changes the flags or summary of an existing one.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- miruky/harness-sampletheir own version, first seen Nov 15, 2026
- james5101/jobtracktheir own version, first seen Oct 11, 2026
- lbedner/aegis-stacktheir own version, first seen Oct 8, 2026
- dotnet/sdktheir own version, first seen Oct 8, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- dotnet/sdk★ 3.2ksame name
- lbedner/aegis-stack★ 146same name
- james5101/jobtrack★ 2same name
- miruky/harness-sample★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/00-doctrina.mdcCursor rule
- cut-a-releaseSkill
- keep-docs-en-pt-paritySkill
- ledger-abandoned-entries-are-ledger-onlySkill
- patch-doctrina-files-as-crlfSkill
- read-the-grammar-through-the-document-modelSkill
- split-an-oversized-specSkill
- stage-a-change-backlogSkill
- triage-holds-work-on-the-machinerySkill
- write-acceptance-evidenceSkill
- add-cli-commandSkill
- cut-a-releaseSkill
- keep-docs-en-pt-paritySkill
- ledger-abandoned-entries-are-ledger-onlySkill
- patch-doctrina-files-as-crlfSkill
- read-the-grammar-through-the-document-modelSkill
- split-an-oversized-specSkill
- stage-a-change-backlogSkill
- triage-holds-work-on-the-machinerySkill
- write-acceptance-evidenceSkill
- doctrina-contextSkill
- doctrina-nextSkill
- doctrina-statusSkill
- doctrina-whySkill
- doctrina-workSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Add the command line to the ## Commands block of the root AGENTS.md — the hub agents read first.
- Very specific: line 37
Document it in docs/en/cli-reference.md AND docs/pt/cli-reference.md in the same change (see the keep-docs-en-pt-parity skill): a ## …
- Very specific: line 41
Add/extend tests: behaviour in packages/doctrina-cli/test/integration.test.js.
- Very specific: line 46
Update the operation count in docs/en/README.md / docs/pt/README.md ("27 commands, NN operations") and the surface list in …
- Very specific: line 50
Write the CHANGELOG entry.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- doctrina:skill-export — generated from .doctrina/skills/add-cli-command.md by `doctrina index rebuild`; edit that file, not this one. -->Skill — add-cli-command
When to use this skill
- Adding a new
doctrina <command>or a subcommand to an existing one. - Renaming/removing a command, or changing its flags or summary line.
Procedure
The surface is named in exactly one place; everything else is generated or gate-checked from it. Touch the steps in this order:
- Implement the handler in
packages/doctrina-cli/src/commands/<command>.js(subcommands go in the existing file's dispatch switch). Update itshelpexport: a Usage line that enumerates subcommands names every one inSUBCOMMANDS, and every flag in the module'sflagsdeclaration is described in the help —test/o-help-lista-todo-subcomando.test.jsfails otherwise. A flag a command reads more than once (--op a --op b) is read withflagAll;flagStringkeeps only the last value. - Register the operation in
OPERATIONSinpackages/doctrina-cli/src/lib/commands.js(workflow order, not alphabetical). Top-level--helpis generated from this list. A new top-level command also goes inCOMMAND_NAMESand in the imports +COMMANDSmap ofpackages/doctrina-cli/src/index.js. - Add the command line to the
## Commandsblock of the rootAGENTS.md— the hub agents read first. It is capped at 150 lines: fold read-only siblings into a comment (`spec list` lists them) rather than exceeding the cap. - Document it in
docs/en/cli-reference.mdANDdocs/pt/cli-reference.mdin the same change (see thekeep-docs-en-pt-parityskill): a## doctrina <op>heading in backticks, a one-paragraph description, a fenced example, a flags table. - Add/extend tests: behaviour in
packages/doctrina-cli/test/integration.test.js; the drift tests inpackages/doctrina-cli/test/commands.test.js(catalog ↔ dispatch ↔ help ↔ docs) fail loudly if steps 2–4 were skipped — run them first when in doubt. - Update the operation count in
docs/en/README.md/docs/pt/README.md("27 commands, NN operations") and the surface list in.doctrina/specs/cli/spec.md(gate semantics belong in.doctrina/specs/gates/spec.md). Thendoctrina spec set cli --bump minor. - Write the CHANGELOG entry. A new or renamed command IS a documented
surface change, so
closerefuses without one — and it asks a different question from the docs: the reference says how the command works, the changelog says that it appeared. Add it under the unreleased heading. - Gates:
node --testinsidepackages/doctrina-cli/, thendoctrina validate(AGENTS.md drift gate) at the repo root.
Anti-patterns
- Shipping a working subcommand that
--helpnever mentions. It happened:spec setandchange abandonwere implemented, spec'd, and invisible in help/AGENTS.md/docs for multiple releases — nobody discovers them. It happened again with theDocumented surface:declaration, which shipped into the code and the CLI reference and into neither the proposal template nor the refusal that needed it. - Documenting a command in a diagram (
docs/en/flow.md) but giving it no cli-reference section: readers see it exists but cannot learn it. - Adding a subcommand to the dispatcher and the help BODY but not to
the Usage line, or declaring a flag the help never names
(
delivery tick,work --deliveryin 0.20.0): the first line a reader sees describes a smaller command than the one that runs. - A command that rewrites a file the person owns (a tick, a header
stamp) writing LF into a CRLF file. Read the ending with
eolOfand write back withwithEol(lib/fs-ops.js), and test it from a CRLF fixture: a Linux run never sees the bug. - Updating the EN docs and leaving PT for "later".
Related material
packages/doctrina-cli/src/lib/commands.js— the canonical surface..doctrina/specs/cli/spec.md— the surface contract.- ADR 0010 (adoption ergonomics); the v0.10.0 CHANGELOG entry (hub-freshness gate).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

