|
| 1 | +# Task: Project Status — Full Panorama |
| 2 | + |
| 3 | +> **Command:** `*status` |
| 4 | +> **Agent:** @aiox-master, @po, @sm |
| 5 | +> **Purpose:** Display accurate, real-time panorama of all epics and stories |
| 6 | +> **Created:** 2026-03-05 |
| 7 | +
|
| 8 | +--- |
| 9 | + |
| 10 | +## Purpose |
| 11 | + |
| 12 | +Display a comprehensive, **100% accurate** panorama of all epics and stories in the project. The status of each story is read directly from its **source of truth** — the `## Status` field in each story file — never inferred from epic metadata, git history, or cached data. |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +## Usage |
| 17 | + |
| 18 | +```bash |
| 19 | +# Full panorama (all epics, all stories) |
| 20 | +*status |
| 21 | + |
| 22 | +# Single epic |
| 23 | +*status epic-7 |
| 24 | + |
| 25 | +# Summary only (no story details) |
| 26 | +*status --summary |
| 27 | +``` |
| 28 | + |
| 29 | +### Arguments |
| 30 | + |
| 31 | +| Argument | Required | Description | |
| 32 | +| --------- | -------- | -------------------------------------- | |
| 33 | +| epic-id | No | Show only specific epic (e.g. epic-7) | |
| 34 | +| --summary | No | Show only epic-level counts | |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## CRITICAL RULES |
| 39 | + |
| 40 | +### Rule 1: Source of Truth |
| 41 | + |
| 42 | +The **ONLY** source of truth for story status is the `## Status` field in each story file (`docs/stories/{N}.{M}.*.md`). **NEVER** use: |
| 43 | + |
| 44 | +- ❌ Epic file metadata (`status: "In Progress (1/2 done)"`) |
| 45 | +- ❌ Git log or gitStatus snapshot from system prompt |
| 46 | +- ❌ Cached data from previous reads in the conversation |
| 47 | +- ❌ Subagent summaries that don't read every story file |
| 48 | +- ❌ Assumptions based on which stories have files vs not |
| 49 | + |
| 50 | +### Rule 2: Read Every File |
| 51 | + |
| 52 | +Every execution of `*status` MUST read the `## Status` field from **every** story file that exists. No shortcuts, no sampling, no relying on epic summaries. |
| 53 | + |
| 54 | +### Rule 3: Divergence Detection |
| 55 | + |
| 56 | +If an epic file's progress count (e.g., "1/2 done") does not match the actual status of its stories, **flag the divergence** visually with ⚠️ and suggest updating the epic file. |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Workflow |
| 61 | + |
| 62 | +```yaml |
| 63 | +steps: |
| 64 | + - name: Discover Epics |
| 65 | + action: | |
| 66 | + Glob: docs/stories/epic-*.md |
| 67 | + Read each epic file to extract: |
| 68 | + - epic_id, title, status (from metadata block) |
| 69 | + - Story references (from ## Stories section) |
| 70 | +
|
| 71 | + - name: Discover Stories |
| 72 | + action: | |
| 73 | + Glob: docs/stories/[0-9]*.md |
| 74 | + This finds ALL story files (e.g., 7.1.*.md, 8.3.*.md, 9.1.*.md) |
| 75 | +
|
| 76 | + - name: Read Story Status (MANDATORY) |
| 77 | + action: | |
| 78 | + For EACH story file found in Step 2: |
| 79 | + Read the file and extract: |
| 80 | + - Story title: first line starting with "# " |
| 81 | + - Status: the line immediately after "## Status" heading, |
| 82 | + trimmed of "**" markers and whitespace. |
| 83 | + Do NOT rely on fixed line numbers — the Status section |
| 84 | + position may vary across story templates. |
| 85 | + Map story to its epic (first number = epic_id) |
| 86 | + critical: true |
| 87 | + note: | |
| 88 | + This step CANNOT be skipped or delegated to a subagent |
| 89 | + that might use cached data. Each file MUST be read fresh. |
| 90 | +
|
| 91 | + - name: Cross-Reference & Detect Divergence |
| 92 | + action: | |
| 93 | + Normalize status values before counting: |
| 94 | + - "Ready" | "Ready for Dev" | "Ready to Start" → Ready |
| 95 | + - "InProgress" | "In Progress" → InProgress |
| 96 | + - "InReview" | "In Review" | "Ready for Review" → InReview |
| 97 | + - "Done" | "Complete" | "Completed" → Done |
| 98 | + - "Draft" → Draft |
| 99 | + - Anything else → Unknown (flag with ⚠️) |
| 100 | + For each epic: |
| 101 | + - Count stories by normalized status (Done, Ready, Draft, InProgress, etc.) |
| 102 | + - Compare with epic file's stated progress |
| 103 | + - If mismatch: mark with ⚠️ DIVERGENCE flag |
| 104 | + For stories referenced in epics but without story files: |
| 105 | + - Mark as "📄 No story file" |
| 106 | +
|
| 107 | + - name: Format Output |
| 108 | + action: | |
| 109 | + Display formatted panorama with: |
| 110 | + - Epic-level summary table (all epics) |
| 111 | + - Story-level detail per epic (status from source of truth) |
| 112 | + - Divergence warnings (if any) |
| 113 | + - Quality metrics (test count, lint, typecheck — from last known) |
| 114 | + - Next steps recommendation |
| 115 | +``` |
| 116 | +
|
| 117 | +--- |
| 118 | +
|
| 119 | +## Output Format |
| 120 | +
|
| 121 | +### Full Panorama |
| 122 | +
|
| 123 | +```text |
| 124 | +📊 Status Completo — {Project Name} |
| 125 | + |
| 126 | +Panorama Geral: {done}/{total} stories done ({percentage}%) |
| 127 | + |
| 128 | +═══════════════════════════════════════════════════════ |
| 129 | + |
| 130 | +Epic 1 — Foundation & Shell 3/3 ✅ |
| 131 | + ✅ 1.1 Project Scaffold & Database Setup Done |
| 132 | + ✅ 1.2 Filesystem Scanner Core Done |
| 133 | + ✅ 1.3 App Shell & Layout Done |
| 134 | + |
| 135 | +Epic 7 — Critical Fixes & Data Config 2/2 ✅ |
| 136 | + ✅ 7.1 Fix Critical Bugs Done |
| 137 | + ✅ 7.2 Squad Origin Corrections Done |
| 138 | + ⚠️ DIVERGÊNCIA: Epic diz "1/2 done" mas stories indicam 2/2 Done |
| 139 | + |
| 140 | +Epic 9 — Functional Enhancements 0/2 |
| 141 | + 📄 9.1 (no story file found) |
| 142 | + 📄 9.2 (no story file found) |
| 143 | + |
| 144 | +═══════════════════════════════════════════════════════ |
| 145 | + |
| 146 | +Qualidade: {test_count} testes | Lint: {status} | TypeCheck: {status} |
| 147 | + |
| 148 | +Próximo: {next story recommendation} |
| 149 | +``` |
| 150 | +
|
| 151 | +### Status Icons |
| 152 | +
|
| 153 | +| Icon | Status | Description | |
| 154 | +| ---- | ----------- | ------------------------------ | |
| 155 | +| ✅ | Done | Story completed and QA passed | |
| 156 | +| 🔄 | InProgress | Story being implemented | |
| 157 | +| ⏳ | Ready | Story validated, ready for dev | |
| 158 | +| 📝 | Draft | Story created, not validated | |
| 159 | +| 🔍 | InReview | Story in QA review | |
| 160 | +| 📄 | — | No story file exists | |
| 161 | +| ⚠️ | DIVERGENCE | Epic metadata doesn't match | |
| 162 | +
|
| 163 | +--- |
| 164 | +
|
| 165 | +## Divergence Resolution |
| 166 | +
|
| 167 | +When divergence is detected, suggest the fix: |
| 168 | +
|
| 169 | +```text |
| 170 | +⚠️ DIVERGÊNCIA detectada em Epic 7: |
| 171 | + Epic file diz: "In Progress (1/2 stories done)" |
| 172 | + Stories reais: 2/2 Done |
| 173 | + |
| 174 | + Sugestão: Atualizar epic-7-critical-fixes-data-config.md |
| 175 | + status: "Done (2/2 stories done)" |
| 176 | +``` |
| 177 | +
|
| 178 | +--- |
| 179 | +
|
| 180 | +## Pre-Conditions |
| 181 | +
|
| 182 | +```yaml |
| 183 | +pre-conditions: |
| 184 | + - [ ] Directory docs/stories/ exists |
| 185 | + tipo: pre-condition |
| 186 | + blocker: true |
| 187 | + error_message: "No docs/stories/ directory found" |
| 188 | +``` |
| 189 | +
|
| 190 | +--- |
| 191 | +
|
| 192 | +## Post-Conditions |
| 193 | +
|
| 194 | +```yaml |
| 195 | +post-conditions: |
| 196 | + - [ ] Every story file in docs/stories/ was read for status |
| 197 | + tipo: post-condition |
| 198 | + blocker: true |
| 199 | + validação: | |
| 200 | + Count of story files read == count of story files found by Glob |
| 201 | + error_message: "Not all story files were read — status may be inaccurate" |
| 202 | +``` |
| 203 | +
|
| 204 | +--- |
| 205 | +
|
| 206 | +## Anti-Patterns (NEVER DO) |
| 207 | +
|
| 208 | +1. **NEVER** rely on epic files for story status — epics are summaries that can be stale |
| 209 | +2. **NEVER** use gitStatus snapshot — it's frozen at conversation start |
| 210 | +3. **NEVER** delegate to a subagent without explicit instruction to "read the ## Status section of EVERY story file" |
| 211 | +4. **NEVER** assume a story doesn't exist without running Glob first |
| 212 | +5. **NEVER** report status without having read the actual `## Status` field from the file |
| 213 | +6. **NEVER** use git log to infer story completion |
| 214 | + |
| 215 | +--- |
| 216 | + |
| 217 | +## Error Handling |
| 218 | + |
| 219 | +**Strategy:** graceful-fallback |
| 220 | + |
| 221 | +**Common Errors:** |
| 222 | + |
| 223 | +1. **Error:** Story file has no Status field |
| 224 | + - **Resolution:** Report as "⚠️ Status field missing" |
| 225 | + - **Recovery:** Flag for manual review |
| 226 | + |
| 227 | +2. **Error:** Epic references story that has no file |
| 228 | + - **Resolution:** Report as "📄 No story file" |
| 229 | + - **Recovery:** Note in output, continue with other stories |
| 230 | + |
| 231 | +3. **Error:** Story file exists but is not referenced in any epic |
| 232 | + - **Resolution:** Report as orphan story |
| 233 | + - **Recovery:** List in "Orphan Stories" section |
| 234 | + |
| 235 | +--- |
| 236 | + |
| 237 | +## Performance |
| 238 | + |
| 239 | +```yaml |
| 240 | +duration_expected: 10-30 seconds |
| 241 | +cost_estimated: $0.001-0.005 |
| 242 | +token_usage: ~1,000-5,000 tokens |
| 243 | +optimization: | |
| 244 | + Read each story file and search for the ## Status section heading. |
| 245 | + Use parallel Read calls for multiple story files. |
| 246 | + Cache nothing — always read fresh. |
| 247 | +``` |
| 248 | + |
| 249 | +--- |
| 250 | + |
| 251 | +## Metadata |
| 252 | + |
| 253 | +```yaml |
| 254 | +version: 1.0.0 |
| 255 | +tags: |
| 256 | + - project-management |
| 257 | + - status |
| 258 | + - panorama |
| 259 | +updated_at: 2026-03-05 |
| 260 | +agents: [aiox-master, po, sm] |
| 261 | +``` |
| 262 | + |
| 263 | +--- |
| 264 | + |
| 265 | +## Related Commands |
| 266 | + |
| 267 | +- `*orchestrate-status {story-id}` — Status de uma story específica em orquestração |
| 268 | +- `*build-status {story-id}` — Status de build autônomo |
| 269 | +- `*stories-index` — Regenerar índice de stories |
| 270 | + |
| 271 | +--- |
| 272 | + |
| 273 | +## User Preferences |
| 274 | + |
| 275 | +- **Full panorama by default:** Always show ALL epics and ALL stories, not just current epic |
| 276 | +- **Include progress counts, story statuses, and next steps** |
| 277 | + |
| 278 | +--- |
| 279 | + |
| 280 | +_Task criada para resolver o problema de status reporting impreciso — garantindo que `*status` sempre leia a fonte da verdade (story files) ao invés de dados derivados (epic metadata, git log)._ |
0 commit comments