Nils CLI Deliver New CLI Crate
Contract
Prereqs:
- Run inside the
nils-cligit work tree. agent-docs,bash,git, andpython3available onPATH.- The following policy docs exist:
docs/runbooks/new-cli-crate-development-standard.mddocs/specs/cli-service-json-contract-guideline-v1.md
Inputs:
- User request to create, port, or redesign a CLI crate.
- Optional:
- source CLI/script reference (for parity work),
- target crate/package/bin naming,
- whether the crate is publishable or internal-only.
Outputs:
- A standards-aligned plan and/or implementation for the target CLI crate.
- Required policy checks captured in the response:
- human-readable output contract,
- service-consumable JSON contract,
- publish-readiness requirements.
- Validation evidence (commands run and pass/fail status).
Exit codes:
0: success1: failure2: usage error
Failure modes:
- Required policy documents are missing.
agent-docs resolve --context project-dev --strictfails.- JSON contract or parity requirements are underspecified and cannot be inferred.
- Required repository checks fail.
Scripts (only entrypoints)
<PROJECT_ROOT>/.agents/skills/nils-cli-deliver-new-cli-crate/scripts/create-cli-crate.sh
Workflow
- Run preflight policy resolution:
agent-docs resolve --context startup --strict --format checklistagent-docs resolve --context project-dev --strict --format checklist
- Read and apply canonical standards:
docs/runbooks/new-cli-crate-development-standard.mddocs/specs/cli-service-json-contract-guideline-v1.md
- If planning is needed first, produce a rigorous plan under
docs/plans/*-plan.mdbefore code changes. - During implementation, enforce these gates:
- human-readable output remains clear and stable,
- JSON mode is explicit, versioned, and machine-consumable,
- JSON error envelope is structured (
code,message, optionaldetails), - no sensitive data appears in JSON output.
- Apply crate-level publishability rules:
- publishable crates follow workspace metadata conventions and release order checks,
- internal-only crates explicitly set/document
publish = false.
- Validate before delivery:
./.agents/skills/nils-cli-verify-required-checks/scripts/nils-cli-verify-required-checks.sh- if publishable:
scripts/publish-crates.sh --dry-run --crate <crate-package-name>
- In the final response, include:
- what was changed,
- policy gates satisfied,
- any unresolved risks.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.