This commit is contained in:
Kostiantyn Hlomozda 2026-03-12 16:36:13 +00:00 committed by GitHub
commit 30897c0546
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 219 additions and 25 deletions

View File

@ -41,6 +41,10 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- `project_context` = `**/project-context.md` (load if exists)
### Capabilities
- `capabilities` = Load from `{project-root}/_bmad/_config/ides/*.yaml``capabilities` block
---
## EXECUTION
@ -265,26 +269,70 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
<output> No sprint status file exists - story progress will be tracked in story file only</output>
<action>Set {{current_sprint_status}} = "no-sprint-tracking"</action>
</check>
<!-- Register tasks for structured progress tracking (capability-conditional) -->
<check if="{capabilities.task_tracking} is available">
<action>For each unchecked [ ] task and subtask in the story's Tasks/Subtasks section:
- Register with the IDE's task tracking tool using the task description and pending status
- Store the mapping between story checkbox items and tracked task IDs
</action>
<action>If review_continuation == true, also register unchecked review follow-up items</action>
<critical>Throughout steps 5-8, update task status to in_progress when starting and completed when marking [x]</critical>
</check>
</step>
<step n="5" goal="Implement task following red-green-refactor cycle">
<critical>FOLLOW THE STORY FILE TASKS/SUBTASKS SEQUENCE EXACTLY AS WRITTEN - NO DEVIATION</critical>
<critical>If {capabilities.sub_agents} is available, the main session is the ORCHESTRATOR - delegate actual implementation to agents, do not implement directly. Otherwise, implement directly in the main session.</critical>
<action>Review the current task/subtask from the story file - this is your authoritative implementation guide</action>
<action>Plan implementation following red-green-refactor cycle</action>
<!-- RED PHASE -->
<action>Write FAILING tests first for the task/subtask functionality</action>
<action>Confirm tests fail before implementation - this validates test correctness</action>
<!-- DELEGATED IMPLEMENTATION (when sub_agents available) -->
<check if="{capabilities.sub_agents} is available">
<!-- Agent Selection -->
<action>Identify target file types and task domain for the current task/subtask</action>
<action>Check for a specialized agent in the IDE's agents directory (e.g., .claude/agents/ for Claude Code) whose description matches the target file types and task domain</action>
<action>If no specialized agent matches, use a general-purpose agent as fallback</action>
<!-- GREEN PHASE -->
<action>Implement MINIMAL code to make tests pass</action>
<action>Run tests to confirm they now pass</action>
<action>Handle error conditions and edge cases as specified in task/subtask</action>
<!-- Tracking Update -->
<check if="{capabilities.task_tracking} is available">
<action>Set the current task to in_progress in the IDE's task tracking tool</action>
</check>
<!-- REFACTOR PHASE -->
<action>Improve code structure while keeping tests green</action>
<action>Ensure code follows architecture patterns and coding standards from Dev Notes</action>
<!-- Delegation -->
<action>Launch the selected agent with a detailed prompt containing:
- Task description and acceptance criteria from the story file
- Target file paths and expected changes
- Red-green-refactor instructions: write failing tests first, implement minimal code to pass, then refactor
- Architecture patterns and coding standards from Dev Notes
- Project conventions from {project_context}
</action>
<!-- Validation -->
<action>When the agent completes, verify:
- Implementation matches the task/subtask specification exactly
- Tests exist and pass for the implemented functionality
- Code follows architecture patterns and coding standards from Dev Notes
</action>
</check>
<!-- DIRECT IMPLEMENTATION (when sub_agents NOT available) -->
<check if="{capabilities.sub_agents} is NOT available">
<action>Plan implementation following red-green-refactor cycle</action>
<!-- RED PHASE -->
<action>Write FAILING tests first for the task/subtask functionality</action>
<action>Confirm tests fail before implementation - this validates test correctness</action>
<!-- GREEN PHASE -->
<action>Implement MINIMAL code to make tests pass</action>
<action>Run tests to confirm they now pass</action>
<action>Handle error conditions and edge cases as specified in task/subtask</action>
<!-- REFACTOR PHASE -->
<action>Improve code structure while keeping tests green</action>
<action>Ensure code follows architecture patterns and coding standards from Dev Notes</action>
</check>
<action>Document technical approach and decisions in Dev Agent Record → Implementation Plan</action>

View File

@ -29,31 +29,73 @@ From context:
---
## LOAD CAPABILITIES
Load platform capabilities from `{project-root}/_bmad/_config/ides/*.yaml`. Read the `capabilities` block to determine available features. Store as `{capabilities}` for use in subsequent sections.
Relevant flags:
- `{capabilities.sub_agents}` - Can the IDE launch sub-agents for delegated work?
- `{capabilities.task_tracking}` - Does the IDE have built-in task management tools?
- `{capabilities.structured_ask}` - Does the IDE have a dedicated tool for prompting users?
---
## REGISTER TASKS
If `{capabilities.task_tracking}` available: Register all identified tasks for structured progress tracking. For Mode A, use tasks from the tech-spec. For Mode B, use tasks from the mental plan. For each task, call TaskCreate with a description and `pending` status. Throughout execution, call TaskUpdate to set `in_progress` when starting and `completed` when done.
Otherwise: Track progress by marking checkboxes in the document as tasks are completed.
---
## EXECUTION LOOP
If `{capabilities.sub_agents}` available, the main session acts as **orchestrator** -- delegate actual implementation to agents, do not implement directly. If not available, implement directly in the main session.
For each task:
### 1. Load Context
### 1. Select Agent (when sub_agents available)
- Identify target file types and task nature
- Check for a specialized agent whose description matches (scan the IDE's agents directory, e.g., `.claude/agents/` for Claude Code)
- If a specialized agent matches, use it
- If no match, use a general-purpose agent
### 2. Update Tracking
- If `{capabilities.task_tracking}` available: Call TaskUpdate to set `in_progress`
- Otherwise: Note task start
### 3. Delegate / Implement
**If sub_agents available:** Launch agent with a detailed prompt containing:
- Exact task description and acceptance criteria
- Target file paths
- Relevant patterns from project-context
- Project conventions (CLAUDE.md, etc.)
- Instruction to write tests and confirm they pass
**If sub_agents not available:** Implement directly:
- Read files relevant to this task
- Review patterns from project-context or observed code
- Understand dependencies
- Follow existing patterns and conventions
- Write code, handle errors appropriately
- Add comments where non-obvious
- Write tests if appropriate for the change
### 2. Implement
- Write code following existing patterns
- Handle errors appropriately
- Follow conventions observed in codebase
- Add appropriate comments where non-obvious
### 3. Test
### 4. Test
- Write tests if appropriate for the change
- Run existing tests to catch regressions
- Verify the specific AC for this task
### 4. Mark Complete
### 5. Validate and Mark Complete
- If sub_agents available: Verify agent's result matches the task spec and tests pass
- Confirm all tests pass (new and existing)
- If `{capabilities.task_tracking}` available: Call TaskUpdate to set `completed`
- Check off task: `- [x] Task N`
- Continue to next task immediately
@ -101,6 +143,8 @@ When ALL tasks are complete (or halted on blocker), read fully and follow: `{pro
- Tests written where appropriate
- Tests passing
- No unnecessary halts
- If sub_agents available: All tasks delegated to appropriate agents (specialized when matching, general-purpose otherwise)
- If task_tracking available: All tasks registered, updated through lifecycle, and marked completed
## FAILURE MODES
@ -109,3 +153,6 @@ When ALL tasks are complete (or halted on blocker), read fully and follow: `{pro
- Not running tests after changes
- Giving up after first failure
- Not following project-context rules (if exists)
- Implementing directly when sub_agents are available (orchestrator should delegate)
- Delegating without verifying agent results match task spec
- Not registering or updating task status when task_tracking is available

View File

@ -34,8 +34,9 @@ class IdeConfigManager {
* @param {string} bmadDir - BMAD installation directory
* @param {string} ideName - IDE name
* @param {Object} configuration - IDE-specific configuration object
* @param {Object} [capabilities] - Platform capability flags (sub_agents, task_tracking, structured_ask)
*/
async saveIdeConfig(bmadDir, ideName, configuration) {
async saveIdeConfig(bmadDir, ideName, configuration, capabilities) {
const configDir = this.getIdeConfigDir(bmadDir);
await fs.ensureDir(configDir);
@ -59,6 +60,7 @@ class IdeConfigManager {
ide: ideName,
configured_date: configuredDate,
last_updated: now,
...(capabilities && Object.keys(capabilities).length > 0 ? { capabilities } : {}),
configuration: configuration || {},
};

View File

@ -1227,7 +1227,9 @@ class Installer {
});
if (ideConfigurations[ide] && !ideConfigurations[ide]._alreadyConfigured) {
await this.ideConfigManager.saveIdeConfig(bmadDir, ide, ideConfigurations[ide]);
const handler = this.ideManager.handlers.get(ide);
const capabilities = handler?.platformConfig?.capabilities;
await this.ideConfigManager.saveIdeConfig(bmadDir, ide, ideConfigurations[ide], capabilities);
}
if (setupResult.success) {

View File

@ -19,6 +19,10 @@ platforms:
preferred: false
category: ide
description: "Google's AI development environment"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .agent/workflows
@ -31,6 +35,10 @@ platforms:
preferred: false
category: cli
description: "AI development tool"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .augment/commands
@ -43,6 +51,10 @@ platforms:
preferred: true
category: cli
description: "Anthropic's official CLI for Claude"
capabilities:
sub_agents: true
task_tracking: true
structured_ask: true
installer:
legacy_targets:
- .claude/commands
@ -56,6 +68,10 @@ platforms:
preferred: false
category: ide
description: "AI coding assistant"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .clinerules/workflows
@ -68,6 +84,10 @@ platforms:
preferred: false
category: cli
description: "OpenAI Codex integration"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .codex/prompts
@ -83,6 +103,10 @@ platforms:
preferred: false
category: ide
description: "Tencent Cloud Code Assistant - AI-powered coding companion"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .codebuddy/commands
@ -95,6 +119,10 @@ platforms:
preferred: false
category: ide
description: "AI development assistant"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .crush/commands
@ -107,6 +135,10 @@ platforms:
preferred: true
category: ide
description: "AI-first code editor"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .cursor/commands
@ -119,6 +151,10 @@ platforms:
preferred: false
category: cli
description: "Google's CLI for Gemini"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .gemini/commands
@ -131,6 +167,10 @@ platforms:
preferred: false
category: ide
description: "GitHub's AI pair programmer"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .github/agents
@ -144,6 +184,10 @@ platforms:
preferred: false
category: ide
description: "AI workflow automation"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .iflow/commands
@ -157,6 +201,10 @@ platforms:
category: ide
description: "AI coding platform"
suspended: "Kilo Code does not yet support the Agent Skills standard. Support is paused until they implement it. See https://github.com/kilocode/kilo-code/issues for updates."
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .kilocode/workflows
@ -169,6 +217,10 @@ platforms:
preferred: false
category: ide
description: "Amazon's AI-powered IDE"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .kiro/steering
@ -181,6 +233,10 @@ platforms:
preferred: false
category: ide
description: "OpenCode terminal coding assistant"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .opencode/agents
@ -197,6 +253,10 @@ platforms:
preferred: false
category: cli
description: "Provider-agnostic terminal-native AI coding agent"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
target_dir: .pi/skills
template_type: default
@ -207,6 +267,10 @@ platforms:
preferred: false
category: ide
description: "Qwen AI coding assistant"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .qwen/commands
@ -219,6 +283,10 @@ platforms:
preferred: false
category: ide
description: "Enhanced Cline fork"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .roo/commands
@ -231,6 +299,10 @@ platforms:
preferred: false
category: ide
description: "Atlassian's Rovo development environment"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .rovodev/workflows
@ -243,6 +315,10 @@ platforms:
preferred: false
category: ide
description: "AI coding tool"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .trae/rules
@ -255,6 +331,10 @@ platforms:
preferred: false
category: ide
description: "AI-powered IDE with cascade flows"
capabilities:
sub_agents: false
task_tracking: false
structured_ask: false
installer:
legacy_targets:
- .windsurf/workflows
@ -262,6 +342,21 @@ platforms:
template_type: windsurf
skill_format: true
# ============================================================================
# Capabilities Schema
# ============================================================================
#
# capabilities:
# sub_agents: boolean # IDE supports launching sub-agents for delegated implementation
# task_tracking: boolean # IDE has built-in task management tools (create/update/list)
# structured_ask: boolean # IDE has a dedicated tool for prompting the user (vs inline text)
#
# Capabilities are written to _config/ides/{platform}.yaml at install time.
# Workflows use these flags to adapt behavior — e.g., delegating to sub-agents
# when available, or implementing directly when not.
#
# Default all to false for new platforms. Set true only when verified.
# ============================================================================
# Installer Config Schema
# ============================================================================