Skip to content

fix(cli): show templates --schema flag in per-command help - #29

Merged
replygirl merged 2 commits into
mainfrom
fix/templates-help-schema
Jul 16, 2026
Merged

fix(cli): show templates --schema flag in per-command help#29
replygirl merged 2 commits into
mainfrom
fix/templates-help-schema

Conversation

@replygirl

Copy link
Copy Markdown
Contributor

Summary

  • `cospec templates --help` never showed its real `--schema ` flag (default `spec-driven`) — the `templates` entry in the `COMMANDS` table in `apps/cli/src/cli.ts` had no `options` field, so PR fix(cli): re-sync adopted gate on re-init and complete per-command help #25 ("complete per-command help") missed it.
  • Added the missing `options` metadata for `templates`, matching the style of sibling passthrough entries (`schema`, `show`).
  • Audited every other `COMMANDS` entry against its command module's actually-parsed flags; no other gaps found.
  • `apps/docs/reference/commands.md` already documents `--schema ` (default `spec-driven`) correctly — no docs change needed.

Test plan

  • Added regression test in `apps/cli/test/unit/cli.test.ts`: "templates --help lists its --schema flag" — asserts `cospec templates --help` stdout contains `--schema` and `spec-driven`.
  • Observed `cospec templates --help` output directly: now prints `Command options:\n --schema Schema whose templates to list (default: spec-driven)`.
  • `mise run check` passes (544 unit + 92 integration + 29 contract + 14 release tests, lint, format, typecheck, schema validate, agents:check, generate:check).
  • cospec change `templates-help-schema-flag` (type `fix`) authored, validated `--strict`, gate applied, and archived as the final commit on this branch.

🤖 Generated with Claude Code

replygirl and others added 2 commits July 16, 2026 16:03
The COMMANDS table entry for `templates` had no `options` field, so
`cospec templates --help` never showed its real --schema <name> flag
(PR #25 missed this one). Add the missing options metadata and a
regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 16, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@replygirl
replygirl merged commit f8e4f86 into main Jul 16, 2026
11 checks passed
@replygirl
replygirl deleted the fix/templates-help-schema branch July 16, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants