Compare commits

...

5 Commits

Author SHA1 Message Date
Oneby Wang bf1b04581d
Merge 6c29b3300b into 397b2a5c87 2026-06-08 22:43:49 -05:00
Brian 6c29b3300b
Merge branch 'main' into fix-dev-story-code-review 2026-06-08 22:43:48 -05:00
Aristo Rinjuang 397b2a5c87
feat: add CodeWhale as supported installer platform (#2459)
CodeWhale uses .codewhale/skills/ (project) and
~/.codewhale/skills/ (global) for skill directories,
matching the existing config-driven installer pattern.

- platform-codes.yaml: codewhale entry after codex
- test: Test 12b validates install target and setup
2026-06-08 22:29:35 -05:00
Oneby Wang 072d0a7458
fix(skills): renumber retrospective workflow steps (#2448)
Co-authored-by: Brian <bmadcode@gmail.com>
2026-06-06 20:37:51 -05:00
Oneby Wang 13fa255750 Fix dev-story and code-review bug 2026-06-02 20:09:22 +08:00
7 changed files with 88 additions and 51 deletions

View File

@ -42,7 +42,7 @@ Otherwise add: `Findings are listed above. No story file was provided, so nothin
### 4. Resolve decision-needed findings
If `decision_needed` findings exist, present each one with its detail and the options available. The user must decide — the correct fix is ambiguous without their input. Walk through each finding (or batch related ones) and get the user's call. Once resolved, each becomes a `patch`, `defer`, or is dismissed.
If `decision-needed` findings exist, present each one with its detail and the options available. The user must decide — the correct fix is ambiguous without their input. Walk through each finding (or batch related ones) and get the user's call. Once resolved, each becomes a `patch`, `defer`, or is dismissed.
If the user chooses to defer, ask: Quick one-line reason for deferring this item? (helps future reviews): — then append that reason to both the story file bullet and the `{deferred_work_file}` entry.
@ -87,7 +87,7 @@ Skip this section if `{spec_file}` is not set.
#### Determine new status based on review outcome
- If all `decision-needed` and `patch` findings were resolved (fixed or dismissed) AND no unresolved HIGH/MEDIUM issues remain: set `{new_status}` = `done`. Update the story file Status section to `done`.
- If `patch` findings were left as action items, or unresolved issues remain: set `{new_status}` = `in-progress`. Update the story file Status section to `in-progress`.
- If `patch` findings were left as action items, or unresolved issues remain: set `{new_status}` = `ready-for-dev`. Update the story file Status section to `ready-for-dev`.
Save the story file.
@ -119,7 +119,7 @@ If `{sprint_status}` file does not exist, note that story status was updated in
Present the user with follow-up options:
> **What would you like to do next?**
> 1. **Start the next story** — run `dev-story` to pick up the next `ready-for-dev` story
> 1. **Continue development** — run `dev-story` to pick up the reviewed story or the next `ready-for-dev` story
> 2. **Re-run code review** — address findings and review again
> 3. **Done** — end the workflow

View File

@ -10,7 +10,7 @@ description: 'Execute story implementation following a context filled story spec
**Your Role:** Developer implementing the story.
- Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}
- Generate all documents in {document_output_language}
- Only modify the story file in these areas: YAML frontmatter `baseline_commit`, Tasks/Subtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status
- Only modify the story file in these areas: YAML frontmatter `baseline_commit`, Tasks/Subtasks checkboxes, Review Findings checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status
- Execute ALL steps in exact order; do NOT skip steps
- Absolutely DO NOT stop because of "milestones", "significant progress", or "session boundaries". Continue in a single execution until the story is COMPLETE (all ACs satisfied and all tasks/subtasks checked) UNLESS a HALT condition is triggered or the USER gives other instruction.
- Do NOT schedule a "next session" or request review pauses unless a HALT condition applies. Only Step 9 decides completion.
@ -76,7 +76,7 @@ Activation is complete. If `activation_steps_prepend` or `activation_steps_appen
<workflow>
<critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
<critical>Generate all documents in {document_output_language}</critical>
<critical>Only modify the story file in these areas: YAML frontmatter `baseline_commit`, Tasks/Subtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List,
<critical>Only modify the story file in these areas: YAML frontmatter `baseline_commit`, Tasks/Subtasks checkboxes, Review Findings checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List,
Change Log, and Status</critical>
<critical>Execute ALL steps in exact order; do NOT skip steps</critical>
<critical>Absolutely DO NOT stop because of "milestones", "significant progress", or "session boundaries". Continue in a single execution
@ -223,31 +223,33 @@ Activation is complete. If `activation_steps_prepend` or `activation_steps_appen
<step n="3" goal="Detect review continuation and extract review context">
<critical>Determine if this is a fresh start or continuation after code review</critical>
<action>Check if "Senior Developer Review (AI)" section exists in the story file</action>
<action>Check if "Review Follow-ups (AI)" subsection exists under Tasks/Subtasks</action>
<action>Check if a "Review Findings" subsection exists under Tasks/Subtasks</action>
<action>Count unchecked [ ] items marked "[Review][Decision]" in "Review Findings"</action>
<action>Count unchecked [ ] items marked "[Review][Patch]" in "Review Findings"</action>
<check if="Senior Developer Review section exists">
<check if="unchecked [Review][Decision] items exist">
<output>⚠️ **Review Decision Required**
This story still has unresolved `[Review][Decision]` findings. These require user/code-review workflow decisions before development can continue.
Return to `code-review` or resolve the decision items into patch, defer, or dismiss outcomes before running `dev-story` again.
</output>
<action>HALT - unresolved review decisions must be resolved before development</action>
</check>
<check if="unchecked [Review][Patch] items exist">
<action>Set review_continuation = true</action>
<action>Extract from "Senior Developer Review (AI)" section:
- Review outcome (Approve/Changes Requested/Blocked)
- Review date
- Total action items with checkboxes (count checked vs unchecked)
- Severity breakdown (High/Med/Low counts)
</action>
<action>Count unchecked [ ] review follow-up tasks in "Review Follow-ups (AI)" subsection</action>
<action>Store list of unchecked review items as {{pending_review_items}}</action>
<action>Store list of unchecked [Review][Patch] items as {{pending_review_items}}</action>
<output>⏯️ **Resuming Story After Code Review** ({{review_date}})
<output>⏯️ **Resuming Story After Code Review**
**Review Outcome:** {{review_outcome}}
**Action Items:** {{unchecked_review_count}} remaining to address
**Priorities:** {{high_count}} High, {{med_count}} Medium, {{low_count}} Low
**Review Findings:** {{unchecked_review_count}} remaining to address
**Strategy:** Will prioritize review follow-up tasks (marked [AI-Review]) before continuing with regular tasks.
**Strategy:** Will prioritize Review Findings tasks marked `[Review][Patch]` before continuing with regular tasks.
</output>
</check>
<check if="Senior Developer Review section does NOT exist">
<check if="no unchecked [Review][Patch] items exist">
<action>Set review_continuation = false</action>
<action>Set {{pending_review_items}} = empty</action>
@ -366,24 +368,17 @@ Activation is complete. If `activation_steps_prepend` or `activation_steps_appen
<action>Validate that ALL acceptance criteria related to this task are satisfied</action>
<action>Run full test suite to ensure NO regressions introduced</action>
<!-- REVIEW FOLLOW-UP HANDLING -->
<check if="task is review follow-up (has [AI-Review] prefix)">
<action>Extract review item details (severity, description, related AC/file)</action>
<!-- REVIEW FINDINGS HANDLING -->
<check if="task is a review finding (has [Review][Patch] marker)">
<action>Extract review item details (description and related file/line if present)</action>
<action>Add to resolution tracking list: {{resolved_review_items}}</action>
<!-- Mark task in Review Follow-ups section -->
<action>Mark task checkbox [x] in "Tasks/Subtasks → Review Follow-ups (AI)" section</action>
<!-- CRITICAL: Also mark corresponding action item in review section -->
<action>Find matching action item in "Senior Developer Review (AI) → Action Items" section by matching description</action>
<action>Mark that action item checkbox [x] as resolved</action>
<action>Add to Dev Agent Record → Completion Notes: "✅ Resolved review finding [{{severity}}]: {{description}}"</action>
<action>Prepare review finding completion note: "✅ Resolved review finding: {{description}}"</action>
</check>
<!-- ONLY MARK COMPLETE IF ALL VALIDATION PASS -->
<check if="ALL validation gates pass AND tests ACTUALLY exist and pass">
<action>ONLY THEN mark the task (and subtasks) checkbox with [x]</action>
<action>If this is a review finding task, this marks the item in "Tasks/Subtasks → Review Findings" and records the prepared review finding completion note</action>
<action>Update File List section with ALL new, modified, or deleted files (paths relative to repo root)</action>
<action>Add completion notes to Dev Agent Record summarizing what was ACTUALLY implemented and tested</action>
</check>

View File

@ -12,7 +12,7 @@ optional-inputs:
- 'CI logs'
- 'Linting reports'
validation-rules:
- 'Only permitted story sections modified: Tasks/Subtasks checkboxes, Dev Agent Record, File List, Change Log, Status'
- 'Only permitted story sections modified: Tasks/Subtasks checkboxes, Review Findings checkboxes, Dev Agent Record, File List, Change Log, Status'
- 'All implementation requirements from story Dev Notes must be satisfied'
- 'Definition of Done checklist must pass completely'
- 'Enhanced story context must contain sufficient technical guidance'
@ -52,7 +52,7 @@ validation-rules:
- [ ] **File List Complete:** File List includes EVERY new, modified, or deleted file (paths relative to repo root)
- [ ] **Dev Agent Record Updated:** Contains relevant Implementation Notes and/or Debug Log for this work
- [ ] **Change Log Updated:** Change Log includes clear summary of what changed and why
- [ ] **Review Follow-ups:** All review follow-up tasks (marked [AI-Review]) completed and corresponding review items marked resolved (if applicable)
- [ ] **Review Findings:** All review findings tasks (marked [Review][Patch]) completed and corresponding review items marked resolved (if applicable)
- [ ] **Story Structure Compliance:** Only permitted sections of story file were modified
## 🔚 Final Status Verification

View File

@ -225,12 +225,12 @@ Amelia (Developer): "Perfect. Epic {{epic_number}} is complete and ready for ret
</step>
<step n="0.5" goal="Discover and load project documents">
<step n="2" goal="Discover and load project documents">
<action>Load input files according to the Input Files table above. For SELECTIVE_LOAD inputs, load only the epic matching {{epic_number}}. For FULL_LOAD inputs, load the complete document. For INDEX_GUIDED inputs, check the index first and load relevant sections. After discovery, these content variables are available: {epics_content} (selective load for this epic), {architecture_content}, {prd_content}, {document_project_content}</action>
<note>After discovery, these content variables are available: {epics_content} (selective load for this epic), {architecture_content}, {prd_content}, {document_project_content}</note>
</step>
<step n="2" goal="Deep Story Analysis - Extract Lessons from Implementation">
<step n="3" goal="Deep Story Analysis - Extract Lessons from Implementation">
<output>
Amelia (Developer): "Before we start the team discussion, let me review all the story records to surface key themes. This'll help us have a richer conversation."
@ -324,7 +324,7 @@ Amelia (Developer): "We'll get to all of it. But first, let me load the previous
</step>
<step n="3" goal="Load and Integrate Previous Epic Retrospective">
<step n="4" goal="Load and Integrate Previous Epic Retrospective">
<action>Calculate previous epic number: {{prev_epic_num}} = {{epic_number}} - 1</action>
@ -420,7 +420,7 @@ Charlie (Senior Dev): "First epic, first retro. Let's make it count."
</step>
<step n="4" goal="Preview Next Epic with Change Detection">
<step n="5" goal="Preview Next Epic with Change Detection">
<action>Calculate next epic number: {{next_epic_num}} = {{epic_number}} + 1</action>
@ -509,7 +509,7 @@ Amelia (Developer): "No problem. We'll still do a thorough retro on Epic {{epic_
</step>
<step n="5" goal="Initialize Retrospective with Rich Context">
<step n="6" goal="Initialize Retrospective with Rich Context">
<action>Load agent roster from {agent_roster}</action>
<action>Identify which agents participated in Epic {{epic_number}} based on story records</action>
@ -599,7 +599,7 @@ Amelia (Developer): "Exactly. {user_name}, any questions before we dive in?"
</step>
<step n="6" goal="Epic Review Discussion - What Went Well, What Didn't">
<step n="7" goal="Epic Review Discussion - What Went Well, What Didn't">
<output>
Amelia (Developer): "Let's start with the good stuff. What went well in Epic {{epic_number}}?"
@ -673,7 +673,7 @@ Alice (Product Owner): "I appreciate that. I could've been more proactive about
Amelia (Developer): "This is good. We're identifying systemic improvements, not assigning blame."
</output>
<action>Continue the discussion, weaving in patterns discovered from the deep story analysis (Step 2)</action>
<action>Continue the discussion, weaving in patterns discovered from the deep story analysis (Step 3)</action>
<output>
Amelia (Developer): "Speaking of patterns, I noticed something when reviewing all the story records..."
@ -744,13 +744,13 @@ Amelia (Developer): "Does that capture it? Anyone have something important we mi
</step>
<step n="7" goal="Next Epic Preparation Discussion - Interactive and Collaborative">
<step n="8" goal="Next Epic Preparation Discussion - Interactive and Collaborative">
<check if="{{next_epic_exists}} == false">
<output>
Amelia (Developer): "Normally we'd discuss preparing for the next epic, but since Epic {{next_epic_num}} isn't defined yet, let's skip to action items."
</output>
<action>Skip to Step 8</action>
<action>Skip to Step 9</action>
</check>
<output>
@ -868,7 +868,7 @@ Amelia (Developer): "{user_name}, does this preparation plan work for you?"
</step>
<step n="8" goal="Synthesize Action Items with Significant Change Detection">
<step n="9" goal="Synthesize Action Items with Significant Change Detection">
<output>
Amelia (Developer): "Let's capture concrete action items from everything we've discussed."
@ -1109,7 +1109,7 @@ Amelia (Developer): "Everyone clear on what they own?"
</step>
<step n="9" goal="Critical Readiness Exploration - Interactive Deep Dive">
<step n="10" goal="Critical Readiness Exploration - Interactive Deep Dive">
<output>
Amelia (Developer): "Before we close, I want to do a final readiness check."
@ -1292,7 +1292,7 @@ Charlie (Senior Dev): "Better to catch this now than three stories into the next
</step>
<step n="10" goal="Retrospective Closure with Celebration and Commitment">
<step n="11" goal="Retrospective Closure with Celebration and Commitment">
<output>
Amelia (Developer): "We've covered a lot of ground today. Let me bring this retrospective to a close."
@ -1368,7 +1368,7 @@ Amelia (Developer): "See you all when prep work is done. Meeting adjourned!"
</step>
<step n="11" goal="Save Retrospective and Update Sprint Status">
<step n="12" goal="Save Retrospective and Update Sprint Status">
<action>Ensure retrospectives folder exists: {implementation_artifacts}</action>
<action>Create folder if it doesn't exist</action>
@ -1425,7 +1425,7 @@ Retrospective document was saved successfully, but {sprint_status_file} may need
</step>
<step n="12" goal="Final Summary and Handoff">
<step n="13" goal="Final Summary and Handoff">
<output>
**✅ Retrospective Complete, {user_name}!**

View File

@ -34,7 +34,7 @@ persistent_facts = [
"file:{project-root}/**/project-context.md",
]
# Scalar: executed when the workflow reaches Step 12 (Final Summary and Handoff),
# Scalar: executed when the workflow reaches Step 13 (Final Summary and Handoff),
# after the retrospective document is saved and sprint-status is updated. Override wins.
# Leave empty for no custom post-completion behavior.

View File

@ -446,6 +446,41 @@ async function runTests() {
// Test 12: Removed — ancestor conflict check no longer applies (no IDE inherits skills from parent dirs)
// ============================================================
// Test 12b: CodeWhale Native Skills Install
// ============================================================
console.log(`${colors.yellow}Test Suite 12b: CodeWhale Native Skills${colors.reset}\n`);
try {
clearCache();
const platformCodes12b = await loadPlatformCodes();
const codewhaleInstaller = platformCodes12b.platforms.codewhale?.installer;
assert(codewhaleInstaller?.target_dir === '.codewhale/skills', 'CodeWhale target_dir uses native skills path');
const tempProjectDir12b = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-codewhale-test-'));
const installedBmadDir12b = await createTestBmadFixture();
const ideManager12b = new IdeManager();
await ideManager12b.ensureInitialized();
const result12b = await ideManager12b.setup('codewhale', tempProjectDir12b, installedBmadDir12b, {
silent: true,
selectedModules: ['bmm'],
});
assert(result12b.success === true, 'CodeWhale setup succeeds against temp project');
const skillFile12b = path.join(tempProjectDir12b, '.codewhale', 'skills', 'bmad-master', 'SKILL.md');
assert(await fs.pathExists(skillFile12b), 'CodeWhale install writes SKILL.md directory output');
await fs.remove(tempProjectDir12b);
await fs.remove(path.dirname(installedBmadDir12b));
} catch (error) {
assert(false, 'CodeWhale native skills migration test succeeds', error.message);
}
console.log('');
// ============================================================
// Test 13: Cursor Native Skills Install
// ============================================================

View File

@ -70,6 +70,13 @@ platforms:
target_dir: .agents/skills
global_target_dir: ~/.codex/skills
codewhale:
name: "CodeWhale"
preferred: false
installer:
target_dir: .codewhale/skills
global_target_dir: ~/.codewhale/skills
codebuddy:
name: "CodeBuddy"
preferred: false