diff --git a/src/modules/bmm/workflows/4-implementation/code-review/steps/step-01-load-story.md b/src/modules/bmm/workflows/4-implementation/code-review/steps/step-01-load-story.md index 861a5ece..0c8fd8c9 100644 --- a/src/modules/bmm/workflows/4-implementation/code-review/steps/step-01-load-story.md +++ b/src/modules/bmm/workflows/4-implementation/code-review/steps/step-01-load-story.md @@ -82,10 +82,9 @@ Set `{git_discrepancies}` with categories: - **files_in_story_not_git**: Files in story File List but no git changes - **uncommitted_undocumented**: Uncommitted changes not tracked in story -### 6. Load Context +### 6. Load Project Context -- Load `{project_context}` if exists (`**/project-context.md`) -- Invoke `discover_inputs` protocol to load architecture, UX, epic docs as needed +- Load `{project_context}` if exists (`**/project-context.md`) for coding standards --- @@ -105,7 +104,7 @@ Set `{git_discrepancies}` with categories: - `{story_file_list}` compiled from Dev Agent Record - `{git_changed_files}` discovered via git commands - `{git_discrepancies}` calculated -- Context documents loaded +- `{project_context}` loaded if exists - Explicit NEXT directive provided ## FAILURE MODES diff --git a/src/modules/bmm/workflows/4-implementation/code-review/steps/step-02-build-attack-plan.md b/src/modules/bmm/workflows/4-implementation/code-review/steps/step-02-build-attack-plan.md index bae20e39..6307e963 100644 --- a/src/modules/bmm/workflows/4-implementation/code-review/steps/step-02-build-attack-plan.md +++ b/src/modules/bmm/workflows/4-implementation/code-review/steps/step-02-build-attack-plan.md @@ -3,7 +3,7 @@ name: 'step-02-build-attack-plan' description: 'Extract ACs and tasks, create comprehensive review plan for both phases' thisStepFile: '{installed_path}/steps/step-02-build-attack-plan.md' -nextStepFile: '{installed_path}/steps/step-03-context-aware-review.md' +nextStepFile: '{installed_path}/steps/step-03-adversarial-review.md' --- # Step 2: Build Review Attack Plan @@ -124,7 +124,7 @@ Proceeding with dual-phase review... **CRITICAL:** When this step completes, explicitly state: -"**NEXT:** Loading `step-03-context-aware-review.md`" +"**NEXT:** Loading `step-03-adversarial-review.md`" --- diff --git a/src/modules/bmm/workflows/4-implementation/code-review/steps/step-04-adversarial-review.md b/src/modules/bmm/workflows/4-implementation/code-review/steps/step-03-adversarial-review.md similarity index 93% rename from src/modules/bmm/workflows/4-implementation/code-review/steps/step-04-adversarial-review.md rename to src/modules/bmm/workflows/4-implementation/code-review/steps/step-03-adversarial-review.md index 96a82d8a..cb1e8b6c 100644 --- a/src/modules/bmm/workflows/4-implementation/code-review/steps/step-04-adversarial-review.md +++ b/src/modules/bmm/workflows/4-implementation/code-review/steps/step-03-adversarial-review.md @@ -1,12 +1,12 @@ --- -name: 'step-04-adversarial-review' +name: 'step-03-adversarial-review' description: 'Context-independent adversarial diff review via subagent - no story knowledge' -thisStepFile: '{installed_path}/steps/step-04-adversarial-review.md' -nextStepFile: '{installed_path}/steps/step-05-consolidate-findings.md' +thisStepFile: '{installed_path}/steps/step-03-adversarial-review.md' +nextStepFile: '{installed_path}/steps/step-04-context-aware-review.md' --- -# Step 4: Adversarial Review (Information Asymmetric) +# Step 3: Adversarial Review (Information Asymmetric) **Goal:** Perform context-independent adversarial review of code changes. Reviewer sees ONLY the diff - no story, no ACs, no context about WHY changes were made. @@ -132,7 +132,7 @@ Proceeding to findings consolidation... **CRITICAL:** When this step completes, explicitly state: -"**NEXT:** Loading `step-05-consolidate-findings.md`" +"**NEXT:** Loading `step-04-context-aware-review.md`" --- diff --git a/src/modules/bmm/workflows/4-implementation/code-review/steps/step-03-context-aware-review.md b/src/modules/bmm/workflows/4-implementation/code-review/steps/step-04-context-aware-review.md similarity index 89% rename from src/modules/bmm/workflows/4-implementation/code-review/steps/step-03-context-aware-review.md rename to src/modules/bmm/workflows/4-implementation/code-review/steps/step-04-context-aware-review.md index 4e5ff747..343fba08 100644 --- a/src/modules/bmm/workflows/4-implementation/code-review/steps/step-03-context-aware-review.md +++ b/src/modules/bmm/workflows/4-implementation/code-review/steps/step-04-context-aware-review.md @@ -1,12 +1,12 @@ --- -name: 'step-03-context-aware-review' +name: 'step-04-context-aware-review' description: 'Story-aware validation: verify ACs, audit task completion, check git discrepancies' -thisStepFile: '{installed_path}/steps/step-03-context-aware-review.md' -nextStepFile: '{installed_path}/steps/step-04-adversarial-review.md' +thisStepFile: '{installed_path}/steps/step-04-context-aware-review.md' +nextStepFile: '{installed_path}/steps/step-05-consolidate-findings.md' --- -# Step 3: Context-Aware Review +# Step 4: Context-Aware Review **Goal:** Perform story-aware validation - verify AC implementation, audit task completion, review code quality with full story context. @@ -36,6 +36,12 @@ Initialize `{context_aware_findings}` as empty list. ## EXECUTION SEQUENCE +### 0. Load Planning Context (JIT) + +Invoke `discover_inputs` protocol to load architecture, UX, and epic documents. + +These provide the design context needed to validate AC implementation against system requirements. + ### 1. Git vs Story Discrepancies Review `{git_discrepancies}` and create findings: @@ -149,7 +155,7 @@ Store `{context_aware_findings}` for consolidation in step 5. **CRITICAL:** When this step completes, explicitly state: -"**NEXT:** Loading `step-04-adversarial-review.md`" +"**NEXT:** Loading `step-05-consolidate-findings.md`" --- diff --git a/src/modules/bmm/workflows/4-implementation/code-review/workflow.md b/src/modules/bmm/workflows/4-implementation/code-review/workflow.md index 1d46e3fb..8fa0cfa5 100644 --- a/src/modules/bmm/workflows/4-implementation/code-review/workflow.md +++ b/src/modules/bmm/workflows/4-implementation/code-review/workflow.md @@ -2,6 +2,24 @@ name: code-review description: 'Code review for dev-story output. Audits acceptance criteria against implementation, performs adversarial diff review, can auto-fix with approval. A different LLM than the implementer is recommended.' web_bundle: false + +input_file_patterns: + architecture: + description: 'System architecture for review context' + whole: '{planning_artifacts}/*architecture*.md' + sharded: '{planning_artifacts}/*architecture*/*.md' + load_strategy: 'FULL_LOAD' + ux_design: + description: 'UX design specification (if UI review)' + whole: '{planning_artifacts}/*ux*.md' + sharded: '{planning_artifacts}/*ux*/*.md' + load_strategy: 'FULL_LOAD' + epics: + description: 'Epic containing story being reviewed' + whole: '{planning_artifacts}/*epic*.md' + sharded_index: '{planning_artifacts}/*epic*/index.md' + sharded_single: '{planning_artifacts}/*epic*/epic-{{epic_num}}.md' + load_strategy: 'SELECTIVE_LOAD' --- # Code Review Workflow