cli-forge-design
cli-forge Design
Use this stage when the workflow needs one authoritative description contract for a generated Rust CLI Skill before later stages proceed.
Purpose
Define the skill's high-level identity: what it is, who it serves, and how it is positioned. Produce a single approved description contract that all downstream surfaces must reuse instead of inventing competing wording.
This stage answers the question "What is this skill?" The detailed CLI contract (commands, flags, formats) belongs to the Plan stage downstream.
Canonical References
Entry Gate
| # | Check | Source |
|---|---|---|
| 1 | handoff.yml exists with classification: design |
Router |
| 2 | Skill scope is at least partially known | User request or handoff |
Required Inputs
- Classified workflow intent from the Router
- Current or proposed skill scope
- Any existing description surfaces that must stay aligned
- Whether this is a new skill or a refresh of an existing contract
Workflow
- Confirm whether the work creates a new skill or changes the user-facing contract of an existing one.
- Read
./planning-brief.mdto load the shared constraints. - Define or refresh the approved purpose summary (one line).
- Define or refresh the positioning statement (one paragraph).
- Record which downstream surfaces must stay synchronized:
Cargo.tomlpackage.descriptionSKILL.mdpurpose sectionREADME.mdheader and description- Help text summary line across non-leaf auto-help,
--help, and structuredhelp - Release notes summary (when publish is in scope)
- npm package description (when publish is in scope)
- Record the downstream help contract for later stages:
- leaf defaults stay structured failures instead of auto-help
- non-leaf defaults auto-render man-like human-readable help
--helprenders man-like human-readable helphelpreturns structured output- human-readable help preserves
NAME -> SYNOPSIS -> DESCRIPTION -> OPTIONS -> FORMATS -> EXAMPLES -> EXIT CODES
- Record the publish contract for later release work: Publish owns both the repo-native GitHub Release and npm publication.
- Generate
.cli-forge/design-contract.ymlusing the format defined in./contracts/design-contract.yml.tpl. - Request user approval of the design contract before moving forward. Call the runtime's dialog-based chooser
(e.g.,
AskUserQuestion) with the optionsapprove and continue,request changes, orstop for nowwhen it is available. If no dialog-based chooser is available, use a numbered text menu with the same three options and addOther: <custom response>as the fallback escape hatch. Accept exact replies1,2, or3, orOther: .... If a numeric reply includes additional text, ask for clarification before proceeding. Do not require the user to type the full option label.
Outputs
.cli-forge/design-contract.yml— approved description contract
Exit Gate
| # | Check |
|---|---|
| 1 | Single-line purpose summary is approved |
| 2 | Positioning statement is approved |
| 3 | Sync surfaces list is complete |
| 4 | Help contract is recorded |
| 5 | Publish contract is recorded |
| 6 | design-contract.yml is generated and approved |
Guardrails
- CRITICAL DIRECTIVE TO THE ASSISTANT: You MUST STOP execution and ask for the user's explicit approval after generating
design-contract.yml. Do NOT proceed to the Plan or Scaffold stage autonomously. Call the runtime's dialog-based chooser (e.g.,AskUserQuestion) for approval when it is available, or use the standardized numbered text fallback with1. approve and continue,2. request changes,3. stop for now, andOther: <custom response>. - This stage is the authoritative source for user-facing purpose and positioning. Downstream stages consume the approved contract; they do not redefine it.
- Do not define CLI commands, flags, or output formats here. That work belongs to the Plan stage.
- When publish support is later adopted, all release-facing wording must reuse the approved summary.
- npm package descriptions must reuse the same approved contract whenever the Publish stage adopts npm publication.
Next Step
Continue with ../cli-forge-plan/SKILL.md to
define the detailed CLI contract.
More from bytelandtechnology/cli-forge
cli-forge
Router for the cli-forge skill family: classify the request, detect missing contract baselines, check filesystem state, and route to the earliest incomplete or takeover stage.
33cli-forge-extend
Extend stage for the cli-forge skill family: add stream or repl features to an existing scaffolded skill project or to a takeover-adopted project that already matches the scaffold-compatible layout.
33cli-forge-scaffold
Scaffold stage for the cli-forge skill family: create a new Rust CLI Skill project from the authoritative templates and prepare it for validation.
33cli-forge-publish
Publish stage for the cli-forge skill family: manage the GitHub Release and multi-package npm publication automation for a generated skill.
33cli-forge-validate
Validate stage for the cli-forge skill family: run the 47-check compliance ruleset against a scaffolded, takeover-adopted, or extended skill project and compare any daemon surface against the declared CLI plan.
33cli-forge-takeover
Recovery stage for the cli-forge skill family: adopt an existing Rust CLI Skill project that lacks cli-forge contracts by reconstructing design/plan artifacts from the current implementation, enforcing gates, and stopping for user decisions on ambiguity.
10