---
description: Show specification status and progress
allowed-tools: Bash, Read, Glob, Write, Edit, MultiEdit, Update
argument-hint: <feature-name>
---

# Specification Status

<background_information>
- **Role**: Deliver a clear, accurate progress snapshot for a specification across all phases, surfacing blockers and identifying the precise next action.
- **Success Criteria**:
  - Current phase and overall completion are reported accurately
  - Task progress is derived from actual checkbox counts in `tasks.md`
  - The user leaves with a clear understanding of what to do next
</background_information>

<instructions>
## Core Task
Generate a progress report for feature **$1** covering all specification phases.

## Execution Steps

### Step 1: Load Spec Data
- Read `{{SDD_DIR}}/specs/$1/spec.json` for phase, approval flags, language, and timestamps
- Read each document that exists: `requirements.md`, `design.md`, `tasks.md`
- Use Glob to confirm which spec files are present in `{{SDD_DIR}}/specs/$1/`

### Step 2: Analyze Phase Status

Evaluate each phase independently:

- **Requirements**: Count distinct requirement areas and total acceptance criteria; check approval status in `spec.json`
- **Design**: Verify presence of key sections (architecture, components, diagrams); check approval status
- **Tasks**: Count checked (`- [x]`) versus unchecked (`- [ ]`) items; compute completion percentage
- **Approvals**: Surface the approval state for requirements, design, and tasks from `spec.json`

### Step 3: Compose the Report

Produce the report in the language specified in `spec.json`:
1. Current phase and progress summary
2. Per-phase completion status with percentages
3. Task breakdown (if tasks exist): X completed of Y total
4. Concrete next action — include the exact command to run
5. Blockers or missing elements preventing advancement

## Critical Constraints
- Use the language recorded in `spec.json`
- Derive completion percentages from document content, not assumptions
- The next action must name a specific, runnable command
</instructions>

## Tool Guidance
- **Read `spec.json` first**: It is the authoritative source for phase and approval state
- **Parse `tasks.md` carefully**: Count `[x]` and `[ ]` patterns to calculate accurate task progress
- Use **Glob** to determine which files exist before attempting to read them

## Output Description

Report in the language specified in `spec.json`:

**Structure**:
1. **Feature Overview**: Feature name, current phase, last updated timestamp
2. **Phase Status**: Requirements / Design / Tasks — each with completion percentage and approval indicator (✅ / ⏳ / ❌)
3. **Task Progress**: If `tasks.md` exists — X / Y tasks completed
4. **Next Action**: The exact command the user should run next
5. **Issues**: Any missing files, unapproved phases, or other blockers

**Format**: Scannable Markdown with status symbols (✅ / ⏳ / ❌) for quick visual parsing

## Safety & Fallback

### Error Scenarios

**Spec Not Found**:
- **Message**: "No specification found for `$1`. Verify the feature name against available specs in `{{SDD_DIR}}/specs/`"
- **Action**: List all directories present under `{{SDD_DIR}}/specs/`

**Partially Initialized Spec**:
- **Warning**: Identify each missing file explicitly
- **Suggested Action**: Point to the phase command that produces the missing artifact

### Listing All Specs

When called without arguments or with a wildcard:
- Scan `{{SDD_DIR}}/specs/` and display a summary row for every spec found
- Show: feature name, current phase, and last updated timestamp

think
