diff --git a/src/modules/bmm/agents/dev.agent.yaml b/src/modules/bmm/agents/dev.agent.yaml index bbd95fe7..c48d5732 100644 --- a/src/modules/bmm/agents/dev.agent.yaml +++ b/src/modules/bmm/agents/dev.agent.yaml @@ -29,6 +29,10 @@ agent: workflow: "{project-root}/bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml" description: Execute Dev Story workflow (implements tasks, tests, validates, updates story) + - trigger: development-status + exec: "{project-root}/bmad/bmm/tasks/development-status.xml" + description: View current development progress and project status + - trigger: review workflow: "{project-root}/bmad/bmm/workflows/4-implementation/review-story/workflow.yaml" description: Perform Senior Developer Review on a story flagged Ready for Review (loads context/tech-spec, checks ACs/tests/architecture/security, appends review notes) diff --git a/src/modules/bmm/agents/pm.agent.yaml b/src/modules/bmm/agents/pm.agent.yaml index abca00ce..a9750a8d 100644 --- a/src/modules/bmm/agents/pm.agent.yaml +++ b/src/modules/bmm/agents/pm.agent.yaml @@ -27,6 +27,10 @@ agent: workflow: "{project-root}/bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml" description: Course Correction Analysis + - trigger: development-status + exec: "{project-root}/bmad/bmm/tasks/development-status.xml" + description: View current development progress and project status + - trigger: plan-project workflow: "{project-root}/bmad/bmm/workflows/2-plan/workflow.yaml" description: Analyze Project Scope and Create PRD or Smaller Tech Spec diff --git a/src/modules/bmm/agents/sm.agent.yaml b/src/modules/bmm/agents/sm.agent.yaml index e6ed9008..97cf8ac8 100644 --- a/src/modules/bmm/agents/sm.agent.yaml +++ b/src/modules/bmm/agents/sm.agent.yaml @@ -29,6 +29,10 @@ agent: workflow: "{project-root}/bmad/bmm/workflows/4-implementation/create-story/workflow.yaml" description: Create a Draft Story with Context + - trigger: development-status + exec: "{project-root}/bmad/bmm/tasks/development-status.xml" + description: View current development progress and project status + - trigger: story-context workflow: "{project-root}/bmad/bmm/workflows/4-implementation/story-context/workflow.yaml" description: Assemble dynamic Story Context (XML) from latest docs and code diff --git a/src/modules/bmm/tasks/README.md b/src/modules/bmm/tasks/README.md new file mode 100644 index 00000000..c0c41241 --- /dev/null +++ b/src/modules/bmm/tasks/README.md @@ -0,0 +1,169 @@ +# BMM Tasks + +Reusable task definitions that agents can execute. Tasks are atomic units of work defined in XML format that follow a structured execution flow. + +## Available Tasks + +### Development & Sprint Management + +#### `development-status.xml` + +**Purpose:** View comprehensive real-time development progress across planning and implementation phases. + +**Usage:** +```bash +/sm +*development-status + +# Or from other agents +/dev +*development-status + +/pm +*development-status +``` + +**What it shows:** +- Planning phase status (PRD, Architecture, Epics existence) +- Story breakdown by status (Draft/In Progress/Done/etc) +- Task completion metrics +- Current focus areas (stories in progress) +- Blockers and items ready for review +- Context-aware recommendations for next steps + +**When to use:** +- Daily standup preparation +- Sprint planning +- Progress reporting to stakeholders +- After completing work to verify status +- Returning to project after time away + +**Available in agents:** SM (Scrum Master), DEV (Developer), PM (Product Manager) + +--- + +#### `daily-standup.xml` + +**Purpose:** Run structured daily standup meetings with context from current stories. + +**What it does:** +- Discovers current story status +- Gathers team context +- Facilitates structured standup discussion +- Creates actionable summary + +**When to use:** +- Start of each working day +- Sprint checkpoint meetings + +--- + +#### `retrospective.xml` + +**Purpose:** Facilitate team retrospective after completing an epic. + +**What it does:** +- Reviews completed epic metrics +- Gathers team feedback (What went well, What to improve) +- Identifies lessons learned +- Prepares for next epic +- Creates action items + +**When to use:** +- After completing all stories in an epic +- Before starting next epic +- Sprint/milestone completion + +--- + +## Task Execution Model + +Tasks follow a structured XML format with these key sections: + +```xml + + + + + + + + Specific action to perform + Expected output format + + + + + + + + + + + + +``` + +## How Tasks Differ from Workflows + +| Aspect | Tasks | Workflows | +|--------|-------|-----------| +| **Format** | XML | YAML + Markdown | +| **Scope** | Single focused operation | Multi-step process | +| **Structure** | Linear flow of steps | Complex branching logic | +| **Duration** | Quick (seconds to minutes) | Extended (minutes to hours) | +| **State** | Stateless, read-only | May modify project files | +| **Use Case** | Status checks, reports | Creating artifacts, implementation | + +**Examples:** +- **Task:** View development status (read-only, quick) +- **Workflow:** Create story (generates files, multi-step) + +## Integration with Agents + +Tasks are integrated into agent menus using the `exec` attribute: + +```yaml +menu: + - trigger: development-status + exec: "{project-root}/bmad/bmm/tasks/development-status.xml" + description: View current development progress +``` + +## Creating New Tasks + +When creating a new task: + +1. **Use XML format** following the structure above +2. **Define clear steps** in the `` section +3. **Include validation** requirements +4. **Add critical context** for LLM execution +5. **Make it read-only** when possible (safer to run) +6. **Test thoroughly** with different project states +7. **Update agent menus** to expose the task +8. **Document in this README** + +## Configuration Variables + +Tasks can reference project configuration: + +- `{project-root}` - Project root directory +- `{output_folder}` - Planning documents and stories location (includes stories/ subdirectory) + +These are resolved at runtime from `bmad/bmm/config.yaml`. + +## Best Practices + +1. **Keep tasks atomic** - Each task should do one thing well +2. **Design for reusability** - Tasks should work across different projects +3. **Handle missing files gracefully** - Don't error, report status +4. **Provide clear output** - Use formatting for readability +5. **Include recommendations** - Help users know what to do next +6. **Make them safe** - Prefer read-only operations +7. **Test edge cases** - New projects, missing docs, malformed files + +## Related Documentation + +- [BMM Workflows](../workflows/README.md) - Multi-step process definitions +- [BMM Agents](../agents/README.md) - Agent configurations +- [Agent Command Patterns](../../bmb/workflows/create-agent/agent-command-patterns.md) - How to integrate tasks into agents diff --git a/src/modules/bmm/tasks/development-status.xml b/src/modules/bmm/tasks/development-status.xml new file mode 100644 index 00000000..eca7a383 --- /dev/null +++ b/src/modules/bmm/tasks/development-status.xml @@ -0,0 +1,231 @@ + + + MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER + DO NOT skip steps or change the sequence + This is a READ-ONLY task - do not modify any files + Each andlt;actionandgt; within andlt;stepandgt; is a REQUIRED action to complete that step + Handle missing files gracefully - report as "not found" not error + + + + + Check for {project-root}{output_folder}/project-brief.md + Check for {project-root}{output_folder}/PRD.md + Check for {project-root}{output_folder}/solution-architecture.md + Check for {project-root}{output_folder}/epics.md + Check for {project-root}{output_folder}/project-workflow-analysis.md + For each existing file, note last modified date + If project-workflow-analysis.md exists, extract: project level (0-4), type, context (greenfield/brownfield) + If epics.md exists, count total epics + + + + List all files in {project-root}{output_folder}/stories/ matching pattern story-*.md + For each story file, extract: + - Story number (e.g., story-1.2.md = epic 1, story 2) + - Story title (first H1 heading after front matter) + - Status field (look for "Status: value" line) + - Total tasks (count all checkboxes: - [ ] and - [x] and - [X]) + - Completed tasks (count only checked: - [x] or - [X]) + - Last modified date from filesystem + + Group stories by status: Draft, Approved, In Progress, Ready for Review, Done, Blocked + Count stories in each status category + + + + Calculate total stories count + Calculate percentage for each status category + Calculate total tasks across all stories + Calculate completed tasks across all stories + Calculate task completion percentage + If epics.md exists, group stories by epic and calculate per-epic progress + + + + List all stories with "Status: In Progress" + For each in-progress story, calculate task completion percentage + Calculate time since last modified (e.g., "2 days ago", "today") + List all stories with "Status: Blocked" + Scan blocked stories for blocker descriptions + List all stories with "Status: Ready for Review" + List all stories with "Status: Draft" or "Status: Approved" as ready to start + + + + Analyze current state and generate context-aware next steps + If no PRD exists: recommend running plan-project workflow + If PRD exists but no epics: recommend creating epic breakdown + If epics exist but no stories: recommend running create-story workflow + If stories in progress: recommend continuing implementation + If stories ready for review: recommend running review-story workflow + If blocked stories: recommend resolving blockers or running correct-course + If all stories in epic done: recommend running retrospective workflow + + + + +# 📊 BMAD v6 Development Status + +**Generated:** {{current_date}} {{current_time}} + +--- + +## Planning Phase Status + +- {{✅/⏳}} **Project Brief**: {{exists with date / not found}} +- {{✅/⏳}} **PRD**: {{exists with date / not found}} +- {{✅/⏳}} **Architecture**: {{exists with date / not found}} +- {{✅/⏳}} **Epics**: {{X epics found / not created yet}} +- {{✅/⏳}} **Workflow Analysis**: {{exists with date / not found}} + +{{If project-workflow-analysis.md exists:}} +**Project Metadata:** +- Level: {{0-4}} +- Type: {{game/web/mobile/backend/etc}} +- Context: {{greenfield/brownfield}} + +--- + +## Development Phase Progress + +{{If no stories found:}} +⚠️ No story files found in {{output_folder}}/stories/ + +This is normal for new projects. Stories are created during Phase 4 (Implementation). + +{{If stories found:}} +### Story Breakdown + +📊 **Total Stories:** {{count}} + +{{For each status with count > 0:}} +- {{emoji}} **{{Status}}**: {{count}} ({{percentage}}%) + +### Task Completion + +📝 **Total Tasks:** {{count}} +- ✅ **Completed:** {{count}} ({{percentage}}%) +- ⏳ **Remaining:** {{count}} ({{percentage}}%) + +{{If epics.md exists and stories grouped by epic:}} +### Epic Progress + +{{For each epic with stories:}} +**Epic {{number}}: {{title}}** +- Stories: {{total}} ({{done}} done, {{in_progress}} in progress, {{other_statuses}}) +- Completion: {{percentage}}% + +--- + +## Current Focus + +{{If any stories with "Status: In Progress":}} +### 🎯 Active Stories + +{{For each in-progress story:}} +**{{story_id}}: {{title}}** +- Progress: {{completed_tasks}}/{{total_tasks}} tasks ({{percentage}}%) +- Last Updated: {{date}} ({{relative_time}}) + +{{If no stories in progress:}} +### 🎯 Active Stories + +No stories currently in progress. + +{{If any stories with "Status: Blocked":}} +--- + +## ⚠️ Blockers + +{{For each blocked story:}} +**{{story_id}}: {{title}}** +- Status: Blocked +- Last Updated: {{date}} ({{relative_time}}) + +{{If any stories with "Status: Ready for Review":}} +--- + +## 👀 Ready for Review + +{{For each story ready for review:}} +- **{{story_id}}: {{title}}** ({{completed_tasks}}/{{total_tasks}} tasks) + +{{If any draft or approved stories:}} +--- + +## 📌 Ready to Start + +{{List up to 5 draft or approved stories}} + +--- + +## 💡 Recommended Next Steps + +{{Display generated recommendations based on current state}} + + + + + +What would you like to do? + +1. 📖 View details of a specific story +2. 🚀 Continue working on current story +3. ✨ Create next story (*create-story) +4. 👀 Review story (*review-story) +5. 🔄 Refresh status +6. ❌ Exit + + + + + + All file paths must be resolved from config variables + Missing files are reported as "not found" not errors + Percentages are rounded to whole numbers + Story status parsing is case-insensitive + Task checkboxes support: - [ ], - [x], - [X] + Date calculations must be accurate + + + + This task is completely READ-ONLY - never modify files + Safe to run at any time without side effects + Can be run by any agent to check progress + Output is formatted markdown suitable for copying to reports + If story directory doesn't exist, this is normal for new projects + Handle malformed story files gracefully - skip and continue + + + + Location of planning documents and stories (PRD, epics, stories/) + + + + Daily standup: Check progress at start of day + Sprint planning: Review completed work and plan next sprint + Stakeholder reporting: Generate progress summaries + Context recovery: Resume work after breaks + Before reviews: Check what's ready for review + Epic completion: Verify all stories done before retrospective + + + + Run when ready to start next story + Run to continue implementation + Run when story is ready for review + Run when blockers identified + Run when epic complete + Run when no planning docs exist + + + + Execute steps in exact order + Be thorough in file discovery and parsing + Format output clearly with appropriate emojis + Provide context-aware recommendations + Handle missing or malformed files gracefully + This is a status check tool - fast and non-invasive + +