siesa-agents 2.1.44 → 2.1.46

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.
Files changed (23) hide show
  1. package/bmad/_config/workflow-manifest.csv +1 -0
  2. package/bmad/bmm/workflows/3-solutioning/create-architecture/data/company-standards/frontend-standards.md +1062 -263
  3. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-01-load-story.md +101 -0
  4. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-02-build-plan.md +89 -0
  5. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-03-review.md +91 -0
  6. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-04-fix.md +92 -0
  7. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-05-sync-sprint.md +70 -0
  8. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-06-jira-sync.md +123 -0
  9. package/bmad/bmm/workflows/4-implementation/code-review/workflow.md +57 -0
  10. package/bmad/bmm/workflows/sync-epics-stories/completion-summary-sync-epics-stories.md +43 -0
  11. package/bmad/bmm/workflows/sync-epics-stories/steps/step-01-init.md +150 -0
  12. package/bmad/bmm/workflows/sync-epics-stories/steps/step-01b-continue.md +79 -0
  13. package/bmad/bmm/workflows/sync-epics-stories/steps/step-02-setup.md +117 -0
  14. package/bmad/bmm/workflows/sync-epics-stories/steps/step-03-scope.md +70 -0
  15. package/bmad/bmm/workflows/sync-epics-stories/steps/step-04-epics.md +124 -0
  16. package/bmad/bmm/workflows/sync-epics-stories/steps/step-05-stories.md +189 -0
  17. package/bmad/bmm/workflows/sync-epics-stories/workflow-plan-sync-epics-stories.md +252 -0
  18. package/bmad/bmm/workflows/sync-epics-stories/workflow.md +54 -0
  19. package/claude/commands/bmad/bmm/workflows/sync-epics-stories.md +5 -0
  20. package/gemini/commands/bmad-workflow-bmm-sync-epics-stories.toml +4 -0
  21. package/package.json +1 -1
  22. /package/bmad/bmm/workflows/4-implementation/code-review/{instructions.xml → instructions.xml.bak} +0 -0
  23. /package/bmad/bmm/workflows/4-implementation/code-review/{workflow.yaml → workflow.yaml.bak} +0 -0
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: 'step-01-load-story'
3
+ description: 'Load story file and discover actual implementation changes via git'
4
+
5
+ # Path Definitions
6
+ workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/code-review'
7
+
8
+ # File References
9
+ thisStepFile: '{workflow_path}/steps/step-01-load-story.md'
10
+ nextStepFile: '{workflow_path}/steps/step-02-build-plan.md'
11
+ workflowFile: '{workflow_path}/workflow.md'
12
+ outputFile: '{output_folder}/review-{story_key}.md'
13
+
14
+ # Data References
15
+ checklist: '{workflow_path}/checklist.md'
16
+ ---
17
+
18
+ # Step 1: Load Story and Discover Changes
19
+
20
+ ## STEP GOAL:
21
+ To load the target story file, identify the implementation scope, and discover the actual changes in the codebase using git.
22
+
23
+ ## MANDATORY EXECUTION RULES:
24
+ - 🛑 NEVER generate content without user input
25
+ - 📖 Read the complete step file before taking any action
26
+ - 📋 YOU ARE AN ADVERSARIAL CODE REVIEWER - Skeptical and thorough
27
+
28
+ ## EXECUTION PROTOCOLS:
29
+ - 🎯 Load story and parse requirements
30
+ - 🔍 Detect git changes
31
+ - 💾 meaningful frontmatter updates
32
+
33
+ ## Sequence of Instructions
34
+
35
+ ### 1. Identify Target Story
36
+
37
+ If `{{story_path}}` is not already defined in variables:
38
+ Ask the user: "Which story file should we review? (Provide path or key)"
39
+
40
+ ### 2. Load Story Content
41
+
42
+ 1. Load and read the COMPLETE story file from `{{story_path}}`
43
+ 2. Extract the `story_key` (e.g., from filename "1-2-user-auth.md" -> "1-2-user-auth")
44
+ 3. Parse the following sections:
45
+ - **Story Description**
46
+ - **Acceptance Criteria**
47
+ - **Tasks/Subtasks**
48
+ - **Dev Agent Record** (specifically the File List)
49
+ - **Change Log**
50
+
51
+ ### 3. Discover Git Changes
52
+
53
+ 1. Check if a git repository exists in the current directory (`git rev-parse --is-inside-work-tree`)
54
+ 2. If yes:
55
+ - Run `git status --porcelain` to find uncommitted changes
56
+ - Run `git diff --name-only` to see modified files
57
+ - Run `git diff --cached --name-only` to see staged files
58
+ - Compile a list of **Actual Changed Files**
59
+ 3. If no:
60
+ - Note that review will rely solely on Story's File List (Warning)
61
+
62
+ ### 4. Cross-Reference Claims vs Reality
63
+
64
+ Compare the Story's **Dev Agent Record -> File List** with the **Actual Changed Files**:
65
+ - Identify **Files in Git but NOT in Story** (Undocumented changes)
66
+ - Identify **Files in Story but NOT in Git** (False claims)
67
+ - Identify **Missing Documentation**
68
+
69
+ ### 5. Load Project Context
70
+
71
+ Load `{project_context}` (usually `**/project-context.md`) to understand coding standards.
72
+
73
+ ### 6. Initialize Output Review Document
74
+
75
+ Create `{outputFile}` with initial analysis:
76
+
77
+ ```markdown
78
+ # Code Review: {{story_key}}
79
+
80
+ - **Date**: {{date}}
81
+ - **Reviewer**: {{user_name}} (AI Agent)
82
+ - **Status**: In Progress
83
+
84
+ ## Initial Discovery
85
+ - **Undocumented Changes**: [List]
86
+ - **Missing Files**: [List]
87
+ ```
88
+
89
+ ### 7. Present MENU OPTIONS
90
+
91
+ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
92
+
93
+ #### Menu Handling Logic:
94
+ - IF A: Execute {advancedElicitationTask}
95
+ - IF P: Execute {partyModeWorkflow}
96
+ - IF C: Save analysis to {outputFile}, update frontmatter `stepsCompleted: [1]`, `story_path: ...`, `story_key: ...`, then only then load, read entire file, then execute {nextStepFile}
97
+ - IF Others: Handle queries then redisplay menu
98
+
99
+ #### EXECUTION RULES:
100
+ - ALWAYS halt and wait for user input
101
+ - ONLY proceed to next step when user selects 'C'
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: 'step-02-build-plan'
3
+ description: 'Build a rigorous review attack plan based on requirements'
4
+
5
+ # Path Definitions
6
+ workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/code-review'
7
+
8
+ # File References
9
+ thisStepFile: '{workflow_path}/steps/step-02-build-plan.md'
10
+ nextStepFile: '{workflow_path}/steps/step-03-review.md'
11
+ workflowFile: '{workflow_path}/workflow.md'
12
+ outputFile: '{output_folder}/review-{story_key}.md'
13
+ ---
14
+
15
+ # Step 2: Build Review Attack Plan
16
+
17
+ ## STEP GOAL:
18
+ To create a structured "attack plan" for the review, identifying exactly what needs to be verified based on the story's Acceptance Criteria and Tasks.
19
+
20
+ ## MANDATORY EXECUTION RULES:
21
+ - 📋 YOU ARE AN ADVERSARIAL REVIEWER
22
+ - 🎯 Don't trust; verify.
23
+ - 📖 Read entire file before executing
24
+
25
+ ## Sequence of Instructions
26
+
27
+ ### 1. Extract Requirements
28
+
29
+ From the loaded story file:
30
+ 1. Extract **ALL Acceptance Criteria (ACs)**
31
+ 2. Extract **ALL Tasks and Subtasks** that are marked as completed `[x]`
32
+ 3. Extract the **claimed implementation files**
33
+
34
+ ### 2. Identify Context Documents
35
+
36
+ Based on the `input_file_patterns` strategy:
37
+ 1. Detect referenced Epic files (Selective Load)
38
+ 2. Detect Architecture documents (Full Load)
39
+ 3. Detect UX Design documents (if applicable)
40
+
41
+ *Note: Do not read them yet, just identify which ones are relevant for the review.*
42
+
43
+ ### 3. Construct Review Matrix
44
+
45
+ Create a plan to verify each item:
46
+
47
+ 1. **AC Validation Plan**:
48
+ - For each AC, define what defines "success".
49
+ - Identify which files likely contain the logic.
50
+
51
+ 2. **Task Audit Plan**:
52
+ - For each completed Task, define verifying evidence.
53
+ - Flag any tasks that seem subjective.
54
+
55
+ 3. **Code Quality Criteria**:
56
+ - Security (Injection, Auth, Input Validation)
57
+ - Performance (Loops, Queries, Caching)
58
+ - Maintainability (Naming, Structure, Comments)
59
+ - Tests (Real assertions vs placeholders, Coverage)
60
+
61
+ ### 4. Document Plan
62
+
63
+ Append to `{outputFile}`:
64
+
65
+ ```markdown
66
+ ## Review Plan
67
+
68
+ ### Items to Verify
69
+ - [ ] AC1: ...
70
+ - [ ] AC2: ...
71
+ - [ ] Task: ...
72
+
73
+ ### Focus Areas
74
+ - Security checks on: [List files]
75
+ - Performance checks on: [List files]
76
+ ```
77
+
78
+ ### 5. Present MENU OPTIONS
79
+
80
+ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
81
+
82
+ #### Menu Handling Logic:
83
+ - IF C: Save plan to {outputFile}, update frontmatter `stepsCompleted: [1, 2]`, then load/execute {nextStepFile}
84
+ - IF A/P: Execute respective flows
85
+ - IF Others: Handle queries then loop
86
+
87
+ #### EXECUTION RULES:
88
+ - ALWAYS halt and wait for user input
89
+ - ONLY proceed to next step when user selects 'C'
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: 'step-03-review'
3
+ description: 'Execute the adversarial code review and find specific issues'
4
+
5
+ # Path Definitions
6
+ workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/code-review'
7
+
8
+ # File References
9
+ thisStepFile: '{workflow_path}/steps/step-03-review.md'
10
+ nextStepFile: '{workflow_path}/steps/step-04-fix.md'
11
+ workflowFile: '{workflow_path}/workflow.md'
12
+ outputFile: '{output_folder}/review-{story_key}.md'
13
+ ---
14
+
15
+ # Step 3: Execute Adversarial Review
16
+
17
+ ## STEP GOAL:
18
+ To execute the review plan, rigorously verifying every claim against the actual code, and finding at least 3-10 specific, actionable issues.
19
+
20
+ ## MANDATORY EXECUTION RULES:
21
+ - 📋 VALIDATE EVERY CLAIM - Check git reality vs story claims
22
+ - 🛑 NOT LOOKING HARD ENOUGH? Find more problems!
23
+ - 🔍 Find minimum 3 specific issues
24
+
25
+ ## Sequence of Instructions
26
+
27
+ ### 1. Git vs Story Logic Check
28
+
29
+ 1. Analyze discrepancies found in Step 1.
30
+ 2. **Files in Git but not in Story**: Mark as MEDIUM finding (Incomplete documentation).
31
+ 3. **Files in Story but not in Git**: Mark as HIGH finding (False claims).
32
+ 4. **Uncommitted changes**: Mark as MEDIUM finding (Transparency).
33
+
34
+ ### 2. Comprehensive File Analysis
35
+
36
+ Create a **Comprehensive File List** (Story List + Git Items).
37
+ For EACH file in the list:
38
+ 1. **Read the file content**.
39
+ 2. **Code Quality Scan**:
40
+ - **Security**: SQLi, XSS, insecure deps, missing auth.
41
+ - **Performance**: N+1 queries, loops, memory usage.
42
+ - **Error Handling**: Empty catches, generic errors.
43
+ - **Maintainability**: Magic numbers, bad naming, monolithic functions.
44
+ - **Test Quality**: "Expect true to be true" patterns (Red Flag).
45
+
46
+ ### 3. AC & Task Verification
47
+
48
+ 1. **AC Validation**:
49
+ - Read specific lines implementing the AC.
50
+ - If missing/partial -> HIGH SEVERITY.
51
+ 2. **Task Completion Audit**:
52
+ - For items marked `[x]`, verify the code exists.
53
+ - If marked done but code missing -> CRITICAL FINDING.
54
+
55
+ ### 4. Re-Scan Loop
56
+
57
+ **CRITICAL CHECK**: Do you have < 3 issues total?
58
+ - If yes: **LOOK HARDER**.
59
+ - Re-examine for edge cases, null handling, documentation gaps.
60
+ - You MUST find at least 3 issues.
61
+
62
+ ### 5. Document Findings
63
+
64
+ Append findings to `{outputFile}`:
65
+
66
+ ```markdown
67
+ ## Review Findings
68
+
69
+ ### Critical Issues (Must Fix)
70
+ - [CRITICAL] Task X marked done but feature Y missing in `file.ts`.
71
+ - [HIGH] AC Z not implemented.
72
+
73
+ ### Medium Issues (Should Fix)
74
+ - [MED] Security risk in `auth.ts` line 42.
75
+
76
+ ### Low Issues (Nice to Fix)
77
+ - [LOW] Variable naming in `utils.ts`.
78
+ ```
79
+
80
+ ### 6. Present MENU OPTIONS
81
+
82
+ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
83
+
84
+ #### Menu Handling Logic:
85
+ - IF C: Save findings to {outputFile}, update frontmatter `stepsCompleted: [1, 2, 3]`, then load/execute {nextStepFile}
86
+ - IF A/P: Execute respective flows
87
+ - IF Others: Loop
88
+
89
+ #### EXECUTION RULES:
90
+ - ALWAYS halt and wait for user input
91
+ - ONLY proceed to next step when user selects 'C'
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: 'step-04-fix'
3
+ description: 'Present findings and facilitate fixes or task creation'
4
+
5
+ # Path Definitions
6
+ workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/code-review'
7
+
8
+ # File References
9
+ thisStepFile: '{workflow_path}/steps/step-04-fix.md'
10
+ nextStepFile: '{workflow_path}/steps/step-05-sync-sprint.md'
11
+ workflowFile: '{workflow_path}/workflow.md'
12
+ outputFile: '{output_folder}/review-{story_key}.md'
13
+ ---
14
+
15
+ # Step 4: Present and Fix Findings
16
+
17
+ ## STEP GOAL:
18
+ To present the review findings to the user and either fix them automatically or convert them into action items for the story.
19
+
20
+ ## MANDATORY EXECUTION RULES:
21
+ - 🛑 NEVER apply fixes without user choice
22
+ - 💾 Update Story file if Action Items created
23
+
24
+ ## Sequence of Instructions
25
+
26
+ ### 1. Summarize Status
27
+
28
+ Analyze the findings from the output file.
29
+ Count: High, Medium, Low issues.
30
+
31
+ Display to User:
32
+ "**Review Complete!**
33
+ Issues Found: {{High}} High, {{Medium}} Medium, {{Low}} Low."
34
+
35
+ ### 2. Present FIX MENU OPTIONS
36
+
37
+ Display:
38
+ "**What should I do with these issues?**
39
+ [1] **Fix automatically** (I will update code and tests for High/Med issues)
40
+ [2] **Create Action Items** (Add checklist to Story for later)
41
+ [3] **Show Details** (Deep dive into specific issues)"
42
+
43
+ **Wait for User Selection.**
44
+
45
+ ### 3. Handle Selection
46
+
47
+ 1. **If [1] Fix Automatically**:
48
+ - For all HIGH/MEDIUM issues:
49
+ - Generate fix code.
50
+ - Apply to files.
51
+ - Add/Update tests.
52
+ - Update Story Dev Record / File List.
53
+ - Record `fixed_count`.
54
+ - Proceed to Final Menu.
55
+
56
+ 2. **If [2] Create Action Items**:
57
+ - Create section "Review Follow-ups (AI)" in the Story file.
58
+ - Add checkbox items: `- [ ] [AI-Review][Severity] Description`
59
+ - Record `action_count`.
60
+ - Proceed to Final Menu.
61
+
62
+ 3. **If [3] Show Details**:
63
+ - Display full details of issues.
64
+ - Redisplay FIX MENU.
65
+
66
+ ### 4. Determine New Status
67
+
68
+ Based on the outcome:
69
+ - If **All Critical/High/Med Fixed** AND **ACs Done**: New Status = `done`
70
+ - Else: New Status = `in-progress`
71
+
72
+ Append to `{outputFile}`:
73
+ ```markdown
74
+ ## Fix Outcome
75
+ - **Action Taken**: [Fixed/Tasks Created]
76
+ - **Fixed Count**: X
77
+ - **Task Count**: Y
78
+ - **Recommended Status**: {{NewStatus}}
79
+ ```
80
+
81
+ ### 5. Present CONTINUATION MENU
82
+
83
+ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
84
+
85
+ #### Menu Handling Logic:
86
+ - IF C: Save outcome to {outputFile}, update frontmatter `stepsCompleted: [1, 2, 3, 4]`, then load/execute {nextStepFile}
87
+ - IF A/P: Execute respective flows
88
+ - IF Others: Loop
89
+
90
+ #### EXECUTION RULES:
91
+ - ALWAYS halt and wait for user input
92
+ - ONLY proceed to next step when user selects 'C'
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: 'step-05-sync-sprint'
3
+ description: 'Update story status content and synchronize sprint tracking file'
4
+
5
+ # Path Definitions
6
+ workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/code-review'
7
+
8
+ # File References
9
+ thisStepFile: '{workflow_path}/steps/step-05-sync-sprint.md'
10
+ nextStepFile: '{workflow_path}/steps/step-06-jira-sync.md'
11
+ workflowFile: '{workflow_path}/workflow.md'
12
+ outputFile: '{output_folder}/review-{story_key}.md'
13
+
14
+ # Data References
15
+ sprint_status_file: '{implementation_artifacts}/sprint-status.yaml'
16
+ ---
17
+
18
+ # Step 5: Update Status and Sync Sprint
19
+
20
+ ## STEP GOAL:
21
+ To officially update the story file's status field and synchronize the project's sprint-status.yaml file to reflect the review outcome.
22
+
23
+ ## MANDATORY EXECUTION RULES:
24
+ - 💾 Persist all status changes
25
+ - 🔄 Ensure consistency between Story and Sprint Status
26
+
27
+ ## Sequence of Instructions
28
+
29
+ ### 1. Update Story File
30
+
31
+ Using the `New Status` determined in Step 4 (`done` or `in-progress`):
32
+ 1. **Load** the Story File.
33
+ 2. **Find** the `Status:` field in the metadata/header.
34
+ 3. **Update** it to the new status.
35
+ 4. **Save** the Story File.
36
+
37
+ ### 2. Update Sprint Status YAML
38
+
39
+ Check if `{sprint_status_file}` exists.
40
+ - **If NO**:
41
+ - Log "No sprint-status.yaml found. Skipping sync."
42
+
43
+ - **If YES**:
44
+ 1. **Load** `{sprint_status_file}`.
45
+ 2. **Find** the key `development_status` matching `{{story_key}}`.
46
+ 3. **Update** the value to the new status (`done` or `in-progress`).
47
+ 4. **Save** the file, preserving comments and structure.
48
+ 5. **Log**: "✅ Sprint status synced: {{story_key}} -> {{status}}".
49
+
50
+ ### 3. Log Result
51
+
52
+ Append to `{outputFile}`:
53
+ ```markdown
54
+ ## Status Sync
55
+ - **Story File Status**: Updated to {{status}}
56
+ - **Sprint Status YAML**: [Synced/Skipped]
57
+ ```
58
+
59
+ ### 4. Present MENU OPTIONS
60
+
61
+ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Jira Sync"
62
+
63
+ #### Menu Handling Logic:
64
+ - IF C: Save result to {outputFile}, update frontmatter `stepsCompleted: [1, 2, 3, 4, 5]`, then load/execute {nextStepFile}
65
+ - IF A/P: Execute respective flows
66
+ - IF Others: Loop
67
+
68
+ #### EXECUTION RULES:
69
+ - ALWAYS halt and wait for user input
70
+ - ONLY proceed to next step when user selects 'C'
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: 'step-06-jira-sync'
3
+ description: 'Synchronize completion status with Jira and update documentation'
4
+
5
+ # Path Definitions
6
+ workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/code-review'
7
+
8
+ # File References
9
+ thisStepFile: '{workflow_path}/steps/step-06-jira-sync.md'
10
+ workflowFile: '{workflow_path}/workflow.md'
11
+ outputFile: '{output_folder}/review-{story_key}.md'
12
+
13
+ # User Defined References
14
+ storyFile: '{{story_path}}'
15
+ ---
16
+
17
+ # Step 6: Sync with Jira
18
+
19
+ ## STEP GOAL:
20
+ To synchronize the "Done" status with Jira by transitioning the Story and its Subtasks, and updating the story document to reflect this synchronization.
21
+
22
+ ## MANDATORY EXECUTION RULES:
23
+ - 🛑 ONLY execute if status is 'done'
24
+ - 🧱 Use Pattern B (Cascading Updates) for Jira: Always discover transitions before executing
25
+ - 📄 Update tables in Markdown without breaking format or losing data
26
+
27
+ ## Sequence of Instructions
28
+
29
+ ### 1. Conditional Execution Checker
30
+
31
+ <check if="{{new_status}} == 'done'">
32
+
33
+ ### 2. Validation of Requirements
34
+
35
+ 1. **Validate Auth**: Check if you can access Jira resources.
36
+ <action>Call `mcp__atlassian__getAccessibleAtlassianResources` or `mcp__atlassian__atlassianUserInfo`.</action>
37
+
38
+ <check if="Auth failed or no resources returned">
39
+ <action>STOP IMMEDIATELY.</action>
40
+ <output>❌ **MCP Authentication Failed.** I cannot connect to Jira. Please ensure you are authenticated with the Atlassian MCP server.</output>
41
+ <output>Run the following command to authenticate (copy and paste into your terminal/chat):</output>
42
+ <display>
43
+ ```bash
44
+ /mcp auth mcp-atlassian
45
+ ```
46
+ </display>
47
+ <output>
48
+ ℹ Note: Authentication requires completing an OAuth flow in your web browser.
49
+ Follow the on-screen instructions provided by the CLI after running the command.
50
+ </output>
51
+ <output>After validating in the browser, please choose an option:</output>
52
+ <menu>
53
+ <item cmd="R" action="restart_step2">Retry Authentication (Re-run check)</item>
54
+ <item cmd="E" action="exit">Exit Workflow</item>
55
+ </menu>
56
+ <logic>
57
+ <if selection="R">Restart this Step 2 from the beginning.</if>
58
+ <if selection="E">Terminate the workflow with a message: "Workflow aborted due to authentication failure."</if>
59
+ </logic>
60
+ </check>
61
+
62
+ 2. **Load Configuration**:
63
+ <action>Ensure `{cloud_id}` is available from `project_config.yaml`. If not, load it.</action>
64
+
65
+ 3. **Validate Story Integrity**:
66
+ <action>Read `{story_path}`.</action>
67
+ <check if="content does NOT contain '## Jira Information' OR content does NOT contain '## Synced Tasks'">
68
+ <output>
69
+ ⚠️ **CRITICAL ERROR: Missing Jira Sections**
70
+ La historia no está vinculada a Jira. Por favor ejecuta el workflow 'sync-epics-stories' primero.
71
+ </output>
72
+ <action>STOP execution of this step.</action>
73
+ </check>
74
+
75
+ ### 3. Jira Transition Execution (Pattern B)
76
+
77
+ 1. **Extract Key**: Identify the Jira Key (e.g., PIJB-62) from the story content. Let's call it `{{jira_key}}`.
78
+
79
+ 2. **Transition Parent Story**:
80
+ - **Discovery**: Call `mcp__atlassian__getTransitionsForJiraIssue(issueIdOrKey="{{jira_key}}", cloudId="{{cloud_id}}")`.
81
+ - **Select**: Find the transition ID where `to.statusCategory.key` == "done" (or name "Listo"/"Finalizada"/"Done").
82
+ - **Execute**: Call `mcp__atlassian__transitionJiraIssue(issueIdOrKey="{{jira_key}}", transition={id: "FOUND_ID"}, cloudId="{{cloud_id}}")`.
83
+ - <output>✅ Historia {{jira_key}} movida a Done en Jira.</output>
84
+
85
+ 3. **Transition Subtasks (Cascade)**:
86
+ - **Fetch Hierarchy**: Call `mcp__atlassian__getJiraIssue(issueIdOrKey="{{jira_key}}", cloudId="{{cloud_id}}")`.
87
+ - **Iterate**: For each subtask in `fields.subtasks`:
88
+ - **Discovery**: Call `getTransitionsForJiraIssue` for the subtask key (transitions vary by ID).
89
+ - **Select**: Find the "Done" transition ID.
90
+ - **Execute**: Call `transitionJiraIssue` for the subtask.
91
+ - <output>✅ Subtareas movidas a Done.</output>
92
+
93
+ ### 4. Update Markdown Tables
94
+
95
+ Modify `{{story_path}}` to reflect the new state:
96
+
97
+ <action>
98
+ 1. Read `{{story_path}}`.
99
+ 2. Locate `## Jira Information`: Add `| Jira State |` to header, `|---|` to divider, `| **Done** |` to data row.
100
+ 3. Locate `## Synced Tasks`: Add `| Jira State |` to header, `|---|` to divider (if needed), and `| **Done** |` to each task row.
101
+ 4. Save the file.
102
+ </action>
103
+
104
+ ### 5. Final Log
105
+
106
+ <action>Append to `{outputFile}`:</action>
107
+ <template-output>
108
+ ## Jira Sync
109
+ - **Story Transition**: Success
110
+ - **Subtasks Transitioned**: All moved to Done
111
+ - **Document Tables**: Updated with 'Done' state
112
+ </template-output>
113
+
114
+ </check>
115
+
116
+ <check if="{{new_status}} != 'done'">
117
+ <output>Status is '{{new_status}}'. Skipping Jira sync because code review outcome is not 'done'.</output>
118
+ </check>
119
+
120
+ ### 6. Finish Workflow
121
+ <action>Update frontmatter of `{outputFile}`: `stepsCompleted: [1, 2, 3, 4, 5, 6]`</action>
122
+ <output>🎉 Code Review Workflow Completed.</output>
123
+ <action>EXIT</action>
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: code-review
3
+ description: "Adversarial Senior Developer Code Review. Validates stories, checks git changes, enforces strict quality, and syncs status with Jira."
4
+ web_bundle: true
5
+ ---
6
+
7
+ # Code Review
8
+
9
+ **Goal:** Perform an adversarial code review to validate implementation against story requirements, finding at least 3-10 specific issues, and synchronize status with project tracking.
10
+
11
+ **Your Role:** In addition to your name, communication_style, and persona, you are an **Adversarial Senior Developer**. You verify claims against reality. You doubt everything until proven. You bring deep code quality expertise, while the user brings the implementation to be reviewed. Work together to perfect the code.
12
+
13
+ ## WORKFLOW ARCHITECTURE
14
+
15
+ ### Core Principles
16
+
17
+ - **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere too 1 file as directed at a time
18
+ - **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - never load future step files until told to do so
19
+ - **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
20
+ - **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
21
+ - **Append-Only Building**: Build documents by appending content as directed to the output file
22
+
23
+ ### Step Processing Rules
24
+
25
+ 1. **READ COMPLETELY**: Always read the entire step file before taking any action
26
+ 2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
27
+ 3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
28
+ 4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
29
+ 5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
30
+ 6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
31
+
32
+ ### Critical Rules (NO EXCEPTIONS)
33
+
34
+ - 🛑 **NEVER** load multiple step files simultaneously
35
+ - 📖 **ALWAYS** read entire step file before execution
36
+ - 🚫 **NEVER** skip steps or optimize the sequence
37
+ - 💾 **ALWAYS** update frontmatter of output files when writing the final output for a specific step
38
+ - 🎯 **ALWAYS** follow the exact instructions in the step file
39
+ - ⏸️ **ALWAYS** halt at menus and wait for user input
40
+ - 📋 **NEVER** create mental todo lists from future steps
41
+
42
+ ---
43
+
44
+ ## INITIALIZATION SEQUENCE
45
+
46
+ ### 1. Module Configuration Loading
47
+
48
+ Load and read full config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
49
+
50
+ - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
51
+ - `user_skill_level`, `planning_artifacts`, `implementation_artifacts`
52
+
53
+ ### 2. First Step EXECUTION
54
+
55
+ Load, read the full file and then execute `{workflow_root}/steps/step-01-load-story.md` to begin the workflow.
56
+
57
+ *(Note: `workflow_root` is `{project-root}/_bmad/bmm/workflows/4-implementation/code-review`)*
@@ -0,0 +1,43 @@
1
+ ---
2
+ workflowName: sync-epics-stories
3
+ creationDate: 2026-01-13
4
+ module: bmm
5
+ status: COMPLETE
6
+ stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]
7
+ ---
8
+
9
+ # Workflow Creation Summary
10
+
11
+ ## Workflow Information
12
+
13
+ - **Name:** sync-epics-stories
14
+ - **Module:** bmm (Created via bmb-creations)
15
+ - **Created:** 2026-01-13
16
+ - **Location:** _bmad-output/bmb-creations/workflows/sync-epics-stories
17
+
18
+ ## Generated Files
19
+
20
+ - `workflow.md`
21
+ - `steps/step-01-init.md`
22
+ - `steps/step-01b-continue.md`
23
+ - `steps/step-02-setup.md`
24
+ - `steps/step-03-scope.md`
25
+ - `steps/step-04-epics.md`
26
+ - `steps/step-05-stories.md`
27
+
28
+ ## Quick Start Guide
29
+
30
+ **To run this workflow:**
31
+
32
+ 1. Ensure you have `mcp-atlassian` configured and authenticated.
33
+ 2. Ensure you have your artifacts ready at:
34
+ - `_bmad-output/planning-artifacts/epics.md`
35
+ - `_bmad-output/planning-artifacts/stories.md`
36
+ 3. Command an agent to run the workflow:
37
+ > "Execute the workflow at `_bmad-output/bmb-creations/workflows/sync-epics-stories/workflow.md`"
38
+
39
+ ## Next Steps
40
+
41
+ 1. **Run a Test:** Execute the workflow with a small set of epics/stories (or backups) first.
42
+ 2. **Verify Jira:** Check that issues are created correctly and linked.
43
+ 3. **Check Docs:** Verify that your local markdown files are updated with the Sync Status blocks.