---
target: {{target_path}}
branch: null
work_type:
feat: {}
dependencies: []
---
# Scratch Pad — Feature — Replace With Feature Name
## Flow Overview
- [ ] Phase 0: Confirm scope + constraints
- [ ] Phase 1: Design approach + acceptance criteria
- [ ] Phase 2: Implement incrementally
- [ ] Phase 3: Tests (add missing tests first)
- [ ] Phase 4: Docs / comments / polish
- [ ] Phase 5: Verify end-to-end behavior
## Phase 0 — Scope & Constraints
### Action: Write problem statement + success criteria
#### Example
**Problem**: The CLI currently cannot list known templates.
**Success criteria**:
- `specman templates list` prints available template scenarios.
- Command exits with code 0.
**Non-goals**:
- No changes to template resolution order.
### Action: Identify impacted artifacts and boundaries
#### Example
- Target: `impl://specman-library`
- Related spec: `../../spec/specman-core/spec.md#concept-template-orchestration`
- Boundaries: do not change CLI flags; add a new subcommand only.
## Phase 1 — Design
### Action: Draft a minimal design
#### Example
- Add `TemplatesCommand::List` in `src/crates/specman-cli/src/commands/templates.rs`.
- Reuse existing `TemplateCatalog` query surface.
- Errors propagate as a single `SpecmanError` message.
### Action: Define acceptance tests
#### Example
- Add an integration test that runs the command against a temp workspace and asserts output contains `spec`, `impl`, `scratch-*`.
## Phase 2 — Implementation
### Action: Implement the smallest working slice
#### Example
- First commit: add command wiring + stub output.
- Second commit: connect to real catalog and print results.
### Action: Extend behavior carefully
#### Example
- Add `--json` only if a consumer needs it; otherwise keep plain text.
## Phase 3 — Tests
### Action: Check for existing tests and add missing coverage
#### Example
- Existing: `src/crates/specman-cli/tests/` has integration tests for other commands.
- Add: `templates_list_smoke`.
## Phase 4 — Docs / Comments / Polish
### Action: Update docs and inline comments
#### Example
- Update `src/crates/specman-cli/README.md` with the new subcommand.
## Phase 5 — Verification
### Action: Run minimal verification
#### Example
- Ran: `cargo test -p specman-cli`
- Result: pass
## Notes
## Decisions
## Next Steps