--- name: modscape-spec-status description: Show the current status of a spec work folder — phase, file checklist, task progress, and next recommended command. Optionally show a detailed view for handoff or onboarding. --- # Spec Status Show the current status of a spec work folder. ## Usage ``` /modscape:spec:status /modscape:spec:status detail ``` ## Instructions 0. **Detect language** — If `.modscape/modscape-spec.custom.md` exists, read it and look for a `## Communication` section. If it contains a language directive (e.g., "Always respond in Japanese"), use that language for all output in this session. Otherwise default to English. 1. **Resolve ``** — if the user did not provide a spec name argument: ```bash modscape spec list ``` - No specs: stop and tell the user to run `modscape spec new ` first. - Exactly one spec: use it automatically and note "Using spec: ``". - Multiple specs: show the list and ask the user to choose one. **When reading model information, always use modscape CLI commands — do not use `grep` or direct file reads unless the information is genuinely unavailable from CLI:** ```bash modscape table list modscape summary --json ``` 2. Check that `.modscape/changes//` exists. - If not: tell the user: > `changes//` not found. Run `/modscape:spec:requirements` to start a new spec. 3. Check which files exist in `.modscape/changes//`: - `spec.md` - `spec-config.yaml` - `spec-model.yaml` - `design.md` - `tasks.md` 4. Determine the current phase based on what exists and task progress: - No `spec.md` → `not started` - `spec.md` only → `requirements` - `spec-model.yaml` + `design.md` + `tasks.md` exist → check tasks - Any `- [ ]` remaining → `implement` - All complete → `ready to archive` 5. If `tasks.md` exists, count tasks: - Total tasks: count all `- [ ]` and `- [x]` lines - Completed: count `- [x]` lines - Remaining: count `- [ ]` lines - Break down by Phase section 6. If `design.md` exists, check `## Findings > ### Requires Model Change`: - If it has entries: flag as ⚠️ model changes pending 7. Determine the **next action** using the following priority rules (use the first that applies): - `design.md` has entries under `## Findings > ### Requires Model Change` → `/modscape:spec:implement ` (inline fix protocol) - `_questions.yaml` has entries with `status: open` or `status: assumed` for `change: ` → `/modscape:spec:answer ` (include count) - No `spec.md` → `/modscape:spec:requirements` - No `design.md` → `/modscape:spec:design ` - No `tasks.md` → `/modscape:spec:tasks ` - Incomplete tasks remain → `/modscape:spec:implement ` - All tasks complete → `/modscape:spec:check ` (then `/modscape:spec:archive `) 9. **Always output the following status block:** Phase descriptions (include after the phase name): - `requirements` → "Capturing business requirements and scope" - `design` → "Analyzing impact and designing the data model" - `implement` → "Implementing tasks in the codebase" - `ready to archive` → "All tasks complete; ready to finalize and archive" Next step one-liners (include after the command): - `/modscape:spec:requirements` → "Define requirements and business context" - `/modscape:spec:design ` → "Analyze impact and generate design + tasks" - `/modscape:spec:tasks ` → "Generate the implementation task list" - `/modscape:spec:implement ` → "Work through remaining implementation tasks" - `/modscape:spec:answer ` → "Review and resolve open questions" - `/modscape:spec:check ` → "Run pre-archive validation checks" - `/modscape:spec:archive ` → "Merge YAML, sync specs, and close out this change" --- 📋 Spec: `` **Phase:** **Files:** <✓ or ✗> spec.md <✓ or ✗> spec-config.yaml <✓ or ✗> spec-model.yaml <✓ or ✗> design.md <✓ or ✗> tasks.md **Tasks:** / complete <✓ or ○> Phase 1: Staging (/) <✓ or ○> Phase 2: Core (/) <✓ or ○> Phase 3: Mart (/) <✓ or ○> Phase 4: Tests (/) ⚠️ Unresolved model changes in `design.md → ## Findings → Requires Model Change` 👉 **Next step:** ``` ``` unanswered questions — run `/modscape:spec:answer ` before implementation"> 💡 For full context and remaining tasks: `/modscape:spec:status detail` --- ## Next command by phase | Priority | Condition | Next command | |---|---|---| | 1 | Findings (Requires Model Change) | `/modscape:spec:implement ` (inline fix protocol) | | 2 | Unresolved questions in `_questions.yaml` | `/modscape:spec:answer ` | | 3 | No spec.md | `/modscape:spec:requirements` | | 4 | No design.md | `/modscape:spec:design ` | | 5 | No tasks.md | `/modscape:spec:tasks ` | | 6 | Incomplete tasks | `/modscape:spec:implement ` | | 7 | All tasks complete | `/modscape:spec:check ` → `/modscape:spec:archive ` | > **Anytime:** `/modscape:spec:investigate ` — Ask AI to read repo files and investigate a discrepancy or logic question. Findings are recorded in `design.md`. --- ## `detail` subcommand When invoked as `/modscape:spec:status detail`, run the standard status check first (steps 1–7 above), then append the following detail section. ### Detail instructions Read the following files if they exist: **From `spec.md`:** - Extract the **Why** section (background / motivation) — summarize in 2–3 sentences - Extract the **What Changes** section — list as bullets **From `design.md`:** - Extract the **Decisions** section — list each decision title and chosen approach in one line - Extract the **Non-Goals** section — list as bullets **From `tasks.md`:** - List all remaining incomplete tasks, grouped by Phase section ### Detail output block Append the following after the standard status block: --- 📖 Detail: `` ## Overview <2–3 sentences from spec.md's Why section. If spec.md does not exist, write "No spec.md yet."> ## What Changes ## Key Decisions ## Non-Goals ## Remaining Tasks ## Handoff Notes **Next step:** ``` ``` ### Requires Model Change`, add:> ⚠️ Unresolved model changes in `design.md → Findings → Requires Model Change`. Run `/modscape:spec:design ` before implementing. --- ## COMMAND: /modscape:spec:status