feat: add continuous sprint-status tracking with task-level progress

Implements requirements #1 and #2: stronger enforcement + progress tracking

REQUIREMENT #1: Stronger Enforcement
- dev-story Step 8 now MANDATES sprint-status.yaml update after EVERY task
- Previously: Updated only at story start (step 4) and end (step 9)
- Now: Updated after EACH task completion with CRITICAL + HALT enforcement
- Validation: Re-reads file to verify update persisted, HALTs on failure

REQUIREMENT #2: Progress Tracking
- Extended sprint-status.yaml format with inline progress comments
- Format: "story-key: in-progress  # X/Y tasks (Z%)"
- Real-time visibility into story progress without opening story files
- Automatically updated by dev-story and batch-super-dev reconciliation

Progress Comment Format:
- in-progress: "# 3/10 tasks (30%)"
- review: "# 10/10 tasks (100%) - awaiting review"
- done: "#  COMPLETED: Brief summary"

Benefits:
- Sprint-status.yaml becomes a real-time progress dashboard
- No need to open individual story files to check progress
- Immediate visibility when stories stall (same % for days)
- Enables better sprint planning and resource allocation

Files Modified:
- dev-story/instructions.xml (BMM + BMGD): Added mandatory task-level updates
- sprint-status/instructions.md (BMM + BMGD): Added progress parsing/display
- batch-super-dev/step-4.5-reconcile-story-status.md: Added progress to reconciliation
- docs/HOW-TO-VALIDATE-SPRINT-STATUS.md: Documented new format and enforcement

Breaking Change: None (backward compatible with old format)
- Old entries without progress comments still work
- New entries automatically add progress
- Gradual migration as stories are worked
This commit is contained in:
Jonah Schulte 2026-01-07 17:28:52 -05:00
parent f860077202
commit 4eb889642d
6 changed files with 196 additions and 14 deletions

View File

@ -1,10 +1,40 @@
# How to Validate Sprint Status - Complete Guide
**Created:** 2026-01-02
**Updated:** 2026-01-07 (v1.3.0 - Continuous Progress Tracking)
**Purpose:** Ensure sprint-status.yaml and story files reflect REALITY, not fiction
---
## 🆕 Progress Tracking (v1.3.0)
**NEW:** sprint-status.yaml is now updated **after EVERY task completion**, not just at story start/end.
### Progress Format
```yaml
development_status:
1-2-login: in-progress # 3/10 tasks (30%)
1-3-auth: in-progress # 7/8 tasks (88%)
1-4-api: review # 10/10 tasks (100%) - awaiting review
1-5-ui: done # ✅ COMPLETED: Dashboard + widgets + tests
```
### Update Frequency
| Event | Status Update | Progress Update |
|-------|---------------|-----------------|
| Story starts | `ready-for-dev``in-progress` | `# 0/10 tasks (0%)` |
| Task 1 completes | (no change) | `# 1/10 tasks (10%)` ✅ |
| Task 2 completes | (no change) | `# 2/10 tasks (20%)` ✅ |
| ... | ... | ... |
| Task 10 completes | `in-progress``review` | `# 10/10 tasks (100%) - awaiting review` |
| Review passes | `review``done` | `# ✅ COMPLETED: Summary` |
**Enforcement:** dev-story Step 8 now includes CRITICAL enforcement that HALTs if sprint-status.yaml update fails.
---
## Three Levels of Validation
### Level 1: Status Field Validation (FAST - Free)

View File

@ -485,6 +485,39 @@
<action>HALT if unable to fix validation failures</action>
</check>
<!-- MANDATORY: Update sprint-status.yaml with task-level progress (NEW v1.3.0) -->
<check if="{{sprint_status}} file exists AND task was just marked complete">
<critical>MUST update sprint-status.yaml after EVERY task completion - not just at story start/end</critical>
<action>Load the FULL file: {{sprint_status}}</action>
<action>Find development_status key matching {{story_key}}</action>
<action>Count total tasks and checked tasks from story file:
- total_tasks = count of all [ ] and [x] in Tasks/Subtasks section (top-level only)
- checked_tasks = count of [x] only
- progress_pct = (checked_tasks / total_tasks) × 100
</action>
<action>Update sprint-status.yaml entry with inline progress comment:
Format: {{story_key}}: in-progress # {{checked_tasks}}/{{total_tasks}} tasks ({{progress_pct}}%)
</action>
<action>Save file, preserving ALL comments and structure</action>
<action>Re-read {sprint_status} file to verify update persisted</action>
<check if="verification fails">
<output>❌ CRITICAL: sprint-status.yaml progress update failed!
Task was completed but sprint status not updated.
This violates the continuous tracking requirement.
</output>
<action>HALT - Cannot proceed without valid progress tracking</action>
</check>
<output>✅ Sprint progress updated: {{story_key}} → {{checked_tasks}}/{{total_tasks}} ({{progress_pct}}%)</output>
</check>
<check if="review_continuation == true and {{resolved_review_items}} is not empty">
<action>Count total resolved review items in this session</action>
<action>Add Change Log entry: "Addressed code review findings - {{resolved_count}} items resolved (Date: {{date}})"</action>

View File

@ -38,7 +38,7 @@ Run `/bmad:bmgd:workflows:sprint-planning` to generate it, then rerun sprint-sta
<action>Parse fields: generated, project, project_key, tracking_system, story_location</action>
<action>Parse development_status map. Classify keys:</action>
- Epics: keys starting with "epic-" (and not ending with "-retrospective")
- Retrospectives: keys ending with "-retrospective"
- Retrospectives: keys ending with "-retrospective")
- Stories: everything else (e.g., 1-2-login-form)
<action>Map legacy story status "drafted" → "ready-for-dev"</action>
<action>Count story statuses: backlog, ready-for-dev, in-progress, review, done</action>
@ -46,12 +46,25 @@ Run `/bmad:bmgd:workflows:sprint-planning` to generate it, then rerun sprint-sta
<action>Count epic statuses: backlog, in-progress, done</action>
<action>Count retrospective statuses: optional, done</action>
<action>Parse inline progress comments (NEW v1.3.0):
- Extract task progress from comments: "# X/Y tasks (Z%)"
- Extract completion notes from comments: "# ✅ COMPLETED: ..."
- Store progress data for display
</action>
<action>Validate all statuses against known values:</action>
- Valid story statuses: backlog, ready-for-dev, in-progress, review, done, drafted (legacy)
- Valid epic statuses: backlog, in-progress, done, contexted (legacy)
- Valid retrospective statuses: optional, done
<note>Progress comments (NEW v1.3.0): Inline comments now track task completion percentage for in-progress stories</note>
<example>
1-2-login: in-progress # 7/10 tasks (70%)
1-3-auth: review # 8/8 tasks (100%) - awaiting review
1-4-api: done # ✅ COMPLETED: REST endpoints + validation + tests
</example>
<check if="any status is unrecognized">
<output>
⚠️ **Unknown status detected:**
@ -141,11 +154,31 @@ If the command targets a story, set `story_key={{next_story_id}}` when prompted.
<check if="choice == 2">
<output>
### Stories by Status
- In Progress: {{stories_in_progress}}
- Review: {{stories_in_review}}
- Ready for Dev: {{stories_ready_for_dev}}
- Backlog: {{stories_backlog}}
- Done: {{stories_done}}
**In Progress ({{count_in_progress}}):**
{{#each stories_in_progress}}
- {{story_key}}: {{status}} {{#if progress}}# {{progress.checked}}/{{progress.total}} ({{progress.pct}}%){{/if}}
{{/each}}
**Review ({{count_review}}):**
{{#each stories_in_review}}
- {{story_key}}: {{status}} {{#if progress}}# {{progress.checked}}/{{progress.total}} ({{progress.pct}}%){{/if}}
{{/each}}
**Ready for Dev ({{count_ready}}):**
{{#each stories_ready_for_dev}}
- {{story_key}}: {{status}}
{{/each}}
**Backlog ({{count_backlog}}):**
{{#each stories_backlog}}
- {{story_key}}: {{status}}
{{/each}}
**Done ({{count_done}}):**
{{#each stories_done}}
- {{story_key}}: {{status}} {{#if completion_note}}# {{completion_note}}{{/if}}
{{/each}}
</output>
</check>

View File

@ -274,12 +274,32 @@ Verify story file accuracy by reconciling:
</check>
</substep>
<substep n="8e" title="Update sprint-status.yaml">
<substep n="8e" title="Update sprint-status.yaml with status and progress">
<check if="sprint-status.yaml needs updating">
<action>Use Edit tool to update status entry</action>
<action>Update comment if needed to reflect completion</action>
<action>Count tasks from story file:
- total_tasks = all top-level tasks
- checked_tasks = tasks marked [x]
- progress_pct = (checked_tasks / total_tasks) × 100
</action>
<action>Update comment with progress tracking (NEW v1.3.0):
If status == "in-progress":
Format: {{story_key}}: in-progress # {{checked_tasks}}/{{total_tasks}} tasks ({{progress_pct}}%)
If status == "review":
Format: {{story_key}}: review # {{checked_tasks}}/{{total_tasks}} tasks ({{progress_pct}}%) - awaiting review
If status == "done":
Format: {{story_key}}: done # ✅ COMPLETED: {{brief_summary}}
</action>
<example>
Before: 20-8-...: ready-for-dev # Story description
During: 20-8-...: in-progress # 3/10 tasks (30%)
During: 20-8-...: in-progress # 7/10 tasks (70%)
Review: 20-8-...: review # 10/10 tasks (100%) - awaiting review
After: 20-8-...: done # ✅ COMPLETED: Component + tests + docs
</example>
</check>

View File

@ -499,6 +499,39 @@
<action>HALT if unable to fix validation failures</action>
</check>
<!-- MANDATORY: Update sprint-status.yaml with task-level progress (NEW v1.3.0) -->
<check if="{{sprint_status}} file exists AND task was just marked complete">
<critical>MUST update sprint-status.yaml after EVERY task completion - not just at story start/end</critical>
<action>Load the FULL file: {{sprint_status}}</action>
<action>Find development_status key matching {{story_key}}</action>
<action>Count total tasks and checked tasks from story file:
- total_tasks = count of all [ ] and [x] in Tasks/Subtasks section (top-level only)
- checked_tasks = count of [x] only
- progress_pct = (checked_tasks / total_tasks) × 100
</action>
<action>Update sprint-status.yaml entry with inline progress comment:
Format: {{story_key}}: in-progress # {{checked_tasks}}/{{total_tasks}} tasks ({{progress_pct}}%)
</action>
<action>Save file, preserving ALL comments and structure</action>
<action>Re-read {sprint_status} file to verify update persisted</action>
<check if="verification fails">
<output>❌ CRITICAL: sprint-status.yaml progress update failed!
Task was completed but sprint status not updated.
This violates the continuous tracking requirement.
</output>
<action>HALT - Cannot proceed without valid progress tracking</action>
</check>
<output>✅ Sprint progress updated: {{story_key}} → {{checked_tasks}}/{{total_tasks}} ({{progress_pct}}%)</output>
</check>
<check if="review_continuation == true and {{resolved_review_items}} is not empty">
<action>Count total resolved review items in this session</action>
<action>Add Change Log entry: "Addressed code review findings - {{resolved_count}} items resolved (Date: {{date}})"</action>

View File

@ -38,7 +38,7 @@ Run `/bmad:bmm:workflows:sprint-planning` to generate it, then rerun sprint-stat
<action>Parse fields: generated, project, project_key, tracking_system, story_location</action>
<action>Parse development_status map. Classify keys:</action>
- Epics: keys starting with "epic-" (and not ending with "-retrospective")
- Retrospectives: keys ending with "-retrospective"
- Retrospectives: keys ending with "-retrospective")
- Stories: everything else (e.g., 1-2-login-form)
<action>Map legacy story status "drafted" → "ready-for-dev"</action>
<action>Count story statuses: backlog, ready-for-dev, in-progress, review, done</action>
@ -46,12 +46,25 @@ Run `/bmad:bmm:workflows:sprint-planning` to generate it, then rerun sprint-stat
<action>Count epic statuses: backlog, in-progress, done</action>
<action>Count retrospective statuses: optional, done</action>
<action>Parse inline progress comments (NEW v1.3.0):
- Extract task progress from comments: "# X/Y tasks (Z%)"
- Extract completion notes from comments: "# ✅ COMPLETED: ..."
- Store progress data for display
</action>
<action>Validate all statuses against known values:</action>
- Valid story statuses: backlog, ready-for-dev, in-progress, review, done, drafted (legacy)
- Valid epic statuses: backlog, in-progress, done, contexted (legacy)
- Valid retrospective statuses: optional, done
<note>Progress comments (NEW v1.3.0): Inline comments now track task completion percentage for in-progress stories</note>
<example>
1-2-login: in-progress # 7/10 tasks (70%)
1-3-auth: review # 8/8 tasks (100%) - awaiting review
1-4-api: done # ✅ COMPLETED: REST endpoints + validation + tests
</example>
<check if="any status is unrecognized">
<output>
⚠️ **Unknown status detected:**
@ -141,11 +154,31 @@ If the command targets a story, set `story_key={{next_story_id}}` when prompted.
<check if="choice == 2">
<output>
### Stories by Status
- In Progress: {{stories_in_progress}}
- Review: {{stories_in_review}}
- Ready for Dev: {{stories_ready_for_dev}}
- Backlog: {{stories_backlog}}
- Done: {{stories_done}}
**In Progress ({{count_in_progress}}):**
{{#each stories_in_progress}}
- {{story_key}}: {{status}} {{#if progress}}# {{progress.checked}}/{{progress.total}} ({{progress.pct}}%){{/if}}
{{/each}}
**Review ({{count_review}}):**
{{#each stories_in_review}}
- {{story_key}}: {{status}} {{#if progress}}# {{progress.checked}}/{{progress.total}} ({{progress.pct}}%){{/if}}
{{/each}}
**Ready for Dev ({{count_ready}}):**
{{#each stories_ready_for_dev}}
- {{story_key}}: {{status}}
{{/each}}
**Backlog ({{count_backlog}}):**
{{#each stories_backlog}}
- {{story_key}}: {{status}}
{{/each}}
**Done ({{count_done}}):**
{{#each stories_done}}
- {{story_key}}: {{status}} {{#if completion_note}}# {{completion_note}}{{/if}}
{{/each}}
</output>
</check>