refactor(code-review): simplify adversarial review task invocation
This commit is contained in:
parent
f5d949b922
commit
b628eec9fd
|
|
@ -75,44 +75,15 @@ If no baseline available, review current state of files in `{file_list}`:
|
||||||
|
|
||||||
### 2. Invoke Adversarial Review
|
### 2. Invoke Adversarial Review
|
||||||
|
|
||||||
<critical>Use information asymmetry: separate context from review</critical>
|
With `{diff_output}` constructed, invoke the review task. If possible, use information asymmetry: run this step, and only it, in a separate subagent or process with read access to the project, but no context except the `{diff_output}`.
|
||||||
|
|
||||||
**Execution Hierarchy (try in order):**
|
|
||||||
|
|
||||||
**Option A: Subagent (Preferred)**
|
|
||||||
|
|
||||||
If Task tool available with subagent capability:
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<invoke-task subagent="true">
|
<invoke-task>Review {diff_output} using {project-root}/_bmad/core/tasks/review-adversarial-general.xml</invoke-task>
|
||||||
Review {diff_output} using {project-root}/_bmad/core/tasks/review-adversarial-general.xml
|
|
||||||
</invoke-task>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The subagent:
|
**Platform fallback:** If task invocation not available, load the task file and execute its instructions inline, passing `{diff_output}` as the content.
|
||||||
|
|
||||||
- Has FULL read access to the repository
|
The task should: review `{diff_output}` and return a list of findings.
|
||||||
- Receives ONLY `{diff_output}` as context
|
|
||||||
- Does NOT know story requirements, ACs, or intent
|
|
||||||
- Reviews code purely on technical merit
|
|
||||||
|
|
||||||
**Option B: CLI Fallback**
|
|
||||||
|
|
||||||
If subagent not available but CLI available:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Pipe diff to adversarial review task
|
|
||||||
cat {diff_file} | claude --task {adversarial_review_task}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Option C: Inline Execution**
|
|
||||||
|
|
||||||
If neither available, load `review-adversarial-general.xml` and execute inline:
|
|
||||||
|
|
||||||
1. Load task file
|
|
||||||
2. Adopt adversarial persona
|
|
||||||
3. Review `{diff_output}` with zero story context
|
|
||||||
4. Generate findings
|
|
||||||
|
|
||||||
### 3. Process Adversarial Findings
|
### 3. Process Adversarial Findings
|
||||||
|
|
||||||
|
|
@ -186,7 +157,7 @@ Proceeding to findings consolidation...
|
||||||
|
|
||||||
- Diff constructed from correct source (uncommitted or commits)
|
- Diff constructed from correct source (uncommitted or commits)
|
||||||
- Story file excluded from diff
|
- Story file excluded from diff
|
||||||
- Subagent invoked with proper isolation (or fallback used)
|
- Task invoked with diff as input
|
||||||
- Adversarial review executed
|
- Adversarial review executed
|
||||||
- Findings captured with severity and validity
|
- Findings captured with severity and validity
|
||||||
- `{asymmetric_findings}` populated
|
- `{asymmetric_findings}` populated
|
||||||
|
|
@ -198,7 +169,7 @@ Proceeding to findings consolidation...
|
||||||
- Including story file in diff (breaks asymmetry)
|
- Including story file in diff (breaks asymmetry)
|
||||||
- Skipping adversarial review entirely
|
- Skipping adversarial review entirely
|
||||||
- Accepting zero findings without halt
|
- Accepting zero findings without halt
|
||||||
- Not using subagent when available
|
- Invoking task without providing diff input
|
||||||
- Missing severity/validity classification
|
- Missing severity/validity classification
|
||||||
- Not storing findings for consolidation
|
- Not storing findings for consolidation
|
||||||
- No explicit NEXT directive at step completion
|
- No explicit NEXT directive at step completion
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue