bmad-auto-copilot 1.0.6 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/templates/bmad-loop.sh
CHANGED
|
@@ -178,13 +178,19 @@ get_next_action() {
|
|
|
178
178
|
echo "[DEBUG] Review: $review_count | Ready: $ready_count | Backlog: $backlog_count | In-Progress: $in_progress_count | Done: $done_count / $total_count" >&2
|
|
179
179
|
fi
|
|
180
180
|
|
|
181
|
-
# Priority order: review > ready-for-dev > backlog
|
|
181
|
+
# Priority order: review > in-progress > ready-for-dev > backlog
|
|
182
182
|
if [[ $review_count -gt 0 ]]; then
|
|
183
183
|
log "[NEXT] Found story in REVIEW state → code-review (Dev agent)" "green" >&2
|
|
184
184
|
echo "code-review"
|
|
185
185
|
return
|
|
186
186
|
fi
|
|
187
187
|
|
|
188
|
+
if [[ $in_progress_count -gt 0 ]]; then
|
|
189
|
+
log "[NEXT] Found story in IN-PROGRESS state → dev-story resume (Dev agent)" "green" >&2
|
|
190
|
+
echo "dev-story"
|
|
191
|
+
return
|
|
192
|
+
fi
|
|
193
|
+
|
|
188
194
|
if [[ $ready_count -gt 0 ]]; then
|
|
189
195
|
log "[NEXT] Found story in READY-FOR-DEV state → dev-story (Dev agent)" "green" >&2
|
|
190
196
|
echo "dev-story"
|
|
@@ -203,11 +209,6 @@ get_next_action() {
|
|
|
203
209
|
return
|
|
204
210
|
fi
|
|
205
211
|
|
|
206
|
-
# Check for in-progress (waiting state)
|
|
207
|
-
if [[ $in_progress_count -gt 0 ]]; then
|
|
208
|
-
log "[WAIT] Found $in_progress_count story(ies) in-progress" "yellow" >&2
|
|
209
|
-
fi
|
|
210
|
-
|
|
211
212
|
echo "wait"
|
|
212
213
|
}
|
|
213
214
|
|
|
@@ -1,32 +1,44 @@
|
|
|
1
1
|
You are an automated BMAD workflow executor. Your task is to execute the code-review workflow.
|
|
2
2
|
|
|
3
|
-
IMPORTANT: This is a non-interactive automated execution. Do NOT show menus, greetings, or ask questions. Execute the workflow immediately.
|
|
3
|
+
IMPORTANT: This is a non-interactive automated execution. Do NOT show menus, greetings, or ask questions. Execute the workflow immediately. Do NOT pause between steps or ask "Continue to next step?" — execute ALL steps continuously.
|
|
4
4
|
|
|
5
5
|
Timestamp: {TIMESTAMP}
|
|
6
6
|
|
|
7
|
-
## Step 1: Load Workflow
|
|
7
|
+
## Step 1: Load Configuration and Workflow
|
|
8
|
+
Read the BMAD config from: `_bmad/bmm/config.yaml` — resolve all variables ({project-root}, {output_folder}, etc.)
|
|
8
9
|
Read the workflow definition from: `_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml`
|
|
9
10
|
Read the workflow instructions from: `_bmad/bmm/workflows/4-implementation/code-review/instructions.xml`
|
|
10
11
|
Read the workflow checklist from: `_bmad/bmm/workflows/4-implementation/code-review/checklist.md`
|
|
11
12
|
|
|
12
13
|
## Step 2: Find Next Story
|
|
13
|
-
Read `_bmad-output/implementation-artifacts/sprint-status.yaml` and find the FIRST story in `review` state (scan top to bottom).
|
|
14
|
+
Read `_bmad-output/implementation-artifacts/sprint-status.yaml` and find the FIRST story in `review` state (scan top to bottom, exclude retrospectives).
|
|
14
15
|
|
|
15
16
|
## Step 3: Load Story File
|
|
16
17
|
Read the corresponding story file from `_bmad-output/implementation-artifacts/stories/`.
|
|
18
|
+
Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Agent Record (File List, Change Log).
|
|
17
19
|
|
|
18
|
-
## Step 4: Adversarial Code Review
|
|
20
|
+
## Step 4: Adversarial Code Review with Auto-Fix
|
|
19
21
|
Perform a thorough ADVERSARIAL code review following the workflow instructions:
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
+
- Use `git status --porcelain`, `git diff`, `git diff --cached` to discover actual changes
|
|
23
|
+
- Cross-reference story File List with git reality — note discrepancies
|
|
24
|
+
- Verify EVERY task marked [x] is actually implemented
|
|
25
|
+
- Verify EVERY Acceptance Criterion is actually satisfied
|
|
26
|
+
- Find 3-10 specific problems: code quality, test coverage, architecture compliance, security, performance
|
|
27
|
+
- **AUTOMATICALLY FIX all HIGH and MEDIUM issues** (this is option [1] from instructions.xml Step 4 — always choose this)
|
|
22
28
|
- Run all tests to verify fixes pass
|
|
29
|
+
- Update the story File List and Dev Agent Record with any fixes applied
|
|
23
30
|
- NEVER accept "looks good" without finding real issues
|
|
24
31
|
|
|
25
32
|
## Step 5: Update Sprint Status
|
|
26
|
-
|
|
33
|
+
Based on review outcome:
|
|
34
|
+
- If ALL HIGH and MEDIUM issues are fixed AND all ACs implemented: update status from `review` to `done`
|
|
35
|
+
- If issues remain unfixable: update status from `review` to `in-progress` (will re-enter dev cycle)
|
|
36
|
+
- Preserve ALL comments and structure in `_bmad-output/implementation-artifacts/sprint-status.yaml`
|
|
27
37
|
|
|
28
38
|
## Rules
|
|
29
39
|
- Use best judgment for ALL decisions — never ask the user
|
|
30
|
-
-
|
|
40
|
+
- Execute ALL steps without pausing — this is YOLO mode (no confirmation between steps)
|
|
41
|
+
- When instructions.xml has `<ask>` tags, always choose "Fix them automatically" (option 1)
|
|
42
|
+
- Document issues you cannot auto-fix in the story file
|
|
31
43
|
- All tests must pass after any fixes
|
|
32
44
|
- Follow the workflow checklist to verify completeness
|
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
You are an automated BMAD workflow executor. Your task is to execute the create-story workflow.
|
|
2
2
|
|
|
3
|
-
IMPORTANT: This is a non-interactive automated execution. Do NOT show menus, greetings, or ask questions. Execute the workflow immediately.
|
|
3
|
+
IMPORTANT: This is a non-interactive automated execution. Do NOT show menus, greetings, or ask questions. Execute the workflow immediately. Do NOT pause between steps or ask "Continue to next step?" — execute ALL steps continuously.
|
|
4
4
|
|
|
5
5
|
Timestamp: {TIMESTAMP}
|
|
6
6
|
|
|
7
|
-
## Step 1: Load Workflow
|
|
7
|
+
## Step 1: Load Configuration and Workflow
|
|
8
|
+
Read the BMAD config from: `_bmad/bmm/config.yaml` — resolve all variables ({project-root}, {output_folder}, etc.)
|
|
8
9
|
Read the workflow definition from: `_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml`
|
|
9
10
|
Read the workflow instructions from: `_bmad/bmm/workflows/4-implementation/create-story/instructions.xml`
|
|
10
11
|
Read the workflow template from: `_bmad/bmm/workflows/4-implementation/create-story/template.md`
|
|
11
12
|
Read the workflow checklist from: `_bmad/bmm/workflows/4-implementation/create-story/checklist.md`
|
|
12
13
|
|
|
13
14
|
## Step 2: Find Next Story
|
|
14
|
-
Read `_bmad-output/implementation-artifacts/sprint-status.yaml` and find the FIRST story in `backlog` state (scan top to bottom).
|
|
15
|
+
Read `_bmad-output/implementation-artifacts/sprint-status.yaml` and find the FIRST story in `backlog` state (scan top to bottom, exclude retrospectives).
|
|
15
16
|
|
|
16
|
-
## Step 3: Load
|
|
17
|
-
|
|
17
|
+
## Step 3: Load and Analyze Context (Exhaustive)
|
|
18
|
+
Follow the instructions.xml discover_inputs protocol:
|
|
19
|
+
- Read the corresponding epic file from `_bmad-output/planning-artifacts/`
|
|
20
|
+
- Read PRD, architecture docs, and any referenced project context artifacts
|
|
21
|
+
- Analyze previous story files for context continuity (patterns, conventions, decisions)
|
|
22
|
+
- Understand story requirements, acceptance criteria, and BDD scenarios
|
|
18
23
|
|
|
19
24
|
## Step 4: Create Story File
|
|
20
|
-
Follow the workflow instructions and template to create the story file in `_bmad-output/implementation-artifacts/stories/`. The story file must include all acceptance criteria, tasks, subtasks, and implementation
|
|
25
|
+
Follow the workflow instructions and template to create the story file in `_bmad-output/implementation-artifacts/stories/`. The story file must include all acceptance criteria, tasks, subtasks, dev notes, and implementation guidance.
|
|
21
26
|
|
|
22
27
|
## Step 5: Update Sprint Status
|
|
23
|
-
Update `_bmad-output/implementation-artifacts/sprint-status.yaml` — change the story status from `backlog` to `ready-for-dev`.
|
|
28
|
+
Update `_bmad-output/implementation-artifacts/sprint-status.yaml` — change the story status from `backlog` to `ready-for-dev`. Preserve ALL comments and existing structure in the YAML file.
|
|
24
29
|
|
|
25
30
|
## Rules
|
|
26
31
|
- Use best judgment for ALL decisions — never ask the user
|
|
27
32
|
- Do NOT implement the story code — only create the story file
|
|
28
33
|
- Follow the workflow template precisely
|
|
34
|
+
- Execute ALL steps without pausing — this is YOLO mode (no confirmation between steps)
|
|
35
|
+
- When instructions.xml has `<ask>` tags, use best judgment instead of asking
|
|
29
36
|
- If blocking issues arise, document them in the story file and continue
|
|
@@ -1,33 +1,51 @@
|
|
|
1
1
|
You are an automated BMAD workflow executor. Your task is to execute the dev-story workflow.
|
|
2
2
|
|
|
3
|
-
IMPORTANT: This is a non-interactive automated execution. Do NOT show menus, greetings, or ask questions. Execute the workflow immediately.
|
|
3
|
+
IMPORTANT: This is a non-interactive automated execution. Do NOT show menus, greetings, or ask questions. Execute the workflow immediately. Do NOT pause between steps or ask "Continue to next step?" — execute ALL steps continuously until the story is COMPLETE.
|
|
4
4
|
|
|
5
5
|
Timestamp: {TIMESTAMP}
|
|
6
6
|
|
|
7
|
-
## Step 1: Load Workflow
|
|
7
|
+
## Step 1: Load Configuration and Workflow
|
|
8
|
+
Read the BMAD config from: `_bmad/bmm/config.yaml` — resolve all variables ({project-root}, {output_folder}, etc.)
|
|
8
9
|
Read the workflow definition from: `_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml`
|
|
9
10
|
Read the workflow instructions from: `_bmad/bmm/workflows/4-implementation/dev-story/instructions.xml`
|
|
10
11
|
Read the workflow template (if exists) from: `_bmad/bmm/workflows/4-implementation/dev-story/`
|
|
11
12
|
Read the workflow checklist from: `_bmad/bmm/workflows/4-implementation/dev-story/checklist.md`
|
|
12
13
|
|
|
13
14
|
## Step 2: Find Next Story
|
|
14
|
-
Read `_bmad-output/implementation-artifacts/sprint-status.yaml` and find the FIRST story in `ready-for-dev` state (scan top to bottom).
|
|
15
|
+
Read `_bmad-output/implementation-artifacts/sprint-status.yaml` and find the FIRST story in `ready-for-dev` or `in-progress` state (scan top to bottom, exclude retrospectives).
|
|
16
|
+
- If `in-progress` found: this is a resumed session — continue where the previous session left off.
|
|
17
|
+
- If `ready-for-dev` found: this is a fresh implementation.
|
|
15
18
|
|
|
16
19
|
## Step 3: Load Story File
|
|
17
20
|
Read the corresponding story file from `_bmad-output/implementation-artifacts/stories/`.
|
|
21
|
+
- Check for "Senior Developer Review (AI)" section — if present, this is a review continuation. Extract pending review items and address them first.
|
|
18
22
|
|
|
19
|
-
## Step 4:
|
|
23
|
+
## Step 4: Update Sprint Status to In-Progress
|
|
24
|
+
Update `_bmad-output/implementation-artifacts/sprint-status.yaml` — change the story status from `ready-for-dev` to `in-progress` (if not already in-progress). Preserve ALL comments and structure.
|
|
25
|
+
|
|
26
|
+
## Step 5: Implement
|
|
20
27
|
Follow the workflow instructions to implement ALL tasks and subtasks defined in the story:
|
|
21
|
-
-
|
|
28
|
+
- Follow the red-green-refactor TDD cycle as specified in instructions.xml
|
|
29
|
+
- Write failing tests first, then minimal code to pass, then refactor
|
|
22
30
|
- Write comprehensive unit tests — tests must pass 100%
|
|
23
31
|
- Follow ALL acceptance criteria precisely
|
|
24
|
-
- Update the story file to track task completion
|
|
32
|
+
- Update the story file to track task completion (mark [x] only when verified)
|
|
33
|
+
- Update the File List section with all new/modified/deleted files
|
|
34
|
+
- Execute continuously — do NOT stop at milestones or for progress updates
|
|
25
35
|
|
|
26
|
-
## Step
|
|
27
|
-
|
|
36
|
+
## Step 6: Update Sprint Status to Review
|
|
37
|
+
After ALL tasks are complete and ALL tests pass:
|
|
38
|
+
- Run the full test suite to ensure no regressions
|
|
39
|
+
- Validate definition-of-done checklist
|
|
40
|
+
- Update `_bmad-output/implementation-artifacts/sprint-status.yaml` — change the story status from `in-progress` to `review`
|
|
41
|
+
- Preserve ALL comments and structure in the YAML file
|
|
28
42
|
|
|
29
43
|
## Rules
|
|
30
44
|
- Use best judgment for ALL decisions — never ask the user
|
|
45
|
+
- Execute ALL steps without pausing — this is YOLO mode (no confirmation between steps)
|
|
46
|
+
- When instructions.xml has `<ask>` tags, use best judgment instead of asking
|
|
31
47
|
- Follow the workflow checklist to verify completeness
|
|
32
48
|
- Ensure all existing tests continue to pass
|
|
49
|
+
- NEVER mark a task [x] unless it is truly complete with passing tests
|
|
50
|
+
- Do NOT stop because of milestones or significant progress — continue until ALL tasks are done
|
|
33
51
|
- If blocking issues arise, document them and continue with what you can
|