@qball-inc/the-bulwark 1.0.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/.claude-plugin/plugin.json +43 -0
- package/agents/bulwark-fix-validator.md +633 -0
- package/agents/bulwark-implementer.md +391 -0
- package/agents/bulwark-issue-analyzer.md +308 -0
- package/agents/bulwark-standards-reviewer.md +221 -0
- package/agents/plan-creation-architect.md +323 -0
- package/agents/plan-creation-eng-lead.md +352 -0
- package/agents/plan-creation-po.md +300 -0
- package/agents/plan-creation-qa-critic.md +334 -0
- package/agents/product-ideation-competitive-analyzer.md +298 -0
- package/agents/product-ideation-idea-validator.md +268 -0
- package/agents/product-ideation-market-researcher.md +292 -0
- package/agents/product-ideation-pattern-documenter.md +308 -0
- package/agents/product-ideation-segment-analyzer.md +303 -0
- package/agents/product-ideation-strategist.md +259 -0
- package/agents/statusline-setup.md +97 -0
- package/hooks/hooks.json +59 -0
- package/package.json +45 -0
- package/scripts/hooks/cleanup-stale.sh +13 -0
- package/scripts/hooks/enforce-quality.sh +166 -0
- package/scripts/hooks/implementer-quality.sh +256 -0
- package/scripts/hooks/inject-protocol.sh +52 -0
- package/scripts/hooks/suggest-pipeline.sh +175 -0
- package/scripts/hooks/track-pipeline-start.sh +37 -0
- package/scripts/hooks/track-pipeline-stop.sh +52 -0
- package/scripts/init-rules.sh +35 -0
- package/scripts/init.sh +151 -0
- package/skills/anthropic-validator/SKILL.md +607 -0
- package/skills/anthropic-validator/references/agents-checklist.md +131 -0
- package/skills/anthropic-validator/references/commands-checklist.md +102 -0
- package/skills/anthropic-validator/references/hooks-checklist.md +151 -0
- package/skills/anthropic-validator/references/mcp-checklist.md +136 -0
- package/skills/anthropic-validator/references/plugins-checklist.md +148 -0
- package/skills/anthropic-validator/references/skills-checklist.md +85 -0
- package/skills/assertion-patterns/SKILL.md +296 -0
- package/skills/bug-magnet-data/SKILL.md +284 -0
- package/skills/bug-magnet-data/context/cli-args.md +91 -0
- package/skills/bug-magnet-data/context/db-query.md +104 -0
- package/skills/bug-magnet-data/context/file-contents.md +103 -0
- package/skills/bug-magnet-data/context/http-body.md +91 -0
- package/skills/bug-magnet-data/context/process-spawn.md +123 -0
- package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -0
- package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -0
- package/skills/bug-magnet-data/data/collections/objects.yaml +123 -0
- package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -0
- package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -0
- package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -0
- package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -0
- package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -0
- package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -0
- package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -0
- package/skills/bug-magnet-data/data/formats/email.yaml +154 -0
- package/skills/bug-magnet-data/data/formats/json.yaml +187 -0
- package/skills/bug-magnet-data/data/formats/url.yaml +165 -0
- package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -0
- package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -0
- package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -0
- package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -0
- package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -0
- package/skills/bug-magnet-data/data/numbers/special.yaml +69 -0
- package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -0
- package/skills/bug-magnet-data/data/strings/injection.yaml +208 -0
- package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -0
- package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -0
- package/skills/bug-magnet-data/references/external-lists.md +115 -0
- package/skills/bulwark-brainstorm/SKILL.md +563 -0
- package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +60 -0
- package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -0
- package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -0
- package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -0
- package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -0
- package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -0
- package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -0
- package/skills/bulwark-research/SKILL.md +298 -0
- package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -0
- package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -0
- package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -0
- package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -0
- package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -0
- package/skills/bulwark-scaffold/SKILL.md +330 -0
- package/skills/bulwark-statusline/SKILL.md +161 -0
- package/skills/bulwark-statusline/scripts/statusline.sh +144 -0
- package/skills/bulwark-verify/SKILL.md +519 -0
- package/skills/code-review/SKILL.md +428 -0
- package/skills/code-review/examples/anti-patterns/linting.ts +181 -0
- package/skills/code-review/examples/anti-patterns/security.ts +91 -0
- package/skills/code-review/examples/anti-patterns/standards.ts +195 -0
- package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -0
- package/skills/code-review/examples/recommended/linting.ts +195 -0
- package/skills/code-review/examples/recommended/security.ts +154 -0
- package/skills/code-review/examples/recommended/standards.ts +231 -0
- package/skills/code-review/examples/recommended/type-safety.ts +181 -0
- package/skills/code-review/frameworks/angular.md +218 -0
- package/skills/code-review/frameworks/django.md +235 -0
- package/skills/code-review/frameworks/express.md +207 -0
- package/skills/code-review/frameworks/flask.md +298 -0
- package/skills/code-review/frameworks/generic.md +146 -0
- package/skills/code-review/frameworks/react.md +152 -0
- package/skills/code-review/frameworks/vue.md +244 -0
- package/skills/code-review/references/linting-patterns.md +221 -0
- package/skills/code-review/references/security-patterns.md +125 -0
- package/skills/code-review/references/standards-patterns.md +246 -0
- package/skills/code-review/references/type-safety-patterns.md +130 -0
- package/skills/component-patterns/SKILL.md +131 -0
- package/skills/component-patterns/references/pattern-cli-command.md +118 -0
- package/skills/component-patterns/references/pattern-database.md +166 -0
- package/skills/component-patterns/references/pattern-external-api.md +139 -0
- package/skills/component-patterns/references/pattern-file-parser.md +168 -0
- package/skills/component-patterns/references/pattern-http-server.md +162 -0
- package/skills/component-patterns/references/pattern-process-spawner.md +133 -0
- package/skills/continuous-feedback/SKILL.md +327 -0
- package/skills/continuous-feedback/references/collect-instructions.md +81 -0
- package/skills/continuous-feedback/references/specialize-code-review.md +82 -0
- package/skills/continuous-feedback/references/specialize-general.md +98 -0
- package/skills/continuous-feedback/references/specialize-test-audit.md +81 -0
- package/skills/create-skill/SKILL.md +359 -0
- package/skills/create-skill/references/agent-conventions.md +194 -0
- package/skills/create-skill/references/agent-template.md +195 -0
- package/skills/create-skill/references/content-guidance.md +291 -0
- package/skills/create-skill/references/decision-framework.md +124 -0
- package/skills/create-skill/references/template-pipeline.md +217 -0
- package/skills/create-skill/references/template-reference-heavy.md +111 -0
- package/skills/create-skill/references/template-research.md +210 -0
- package/skills/create-skill/references/template-script-driven.md +172 -0
- package/skills/create-skill/references/template-simple.md +80 -0
- package/skills/create-subagent/SKILL.md +353 -0
- package/skills/create-subagent/references/agent-conventions.md +268 -0
- package/skills/create-subagent/references/content-guidance.md +232 -0
- package/skills/create-subagent/references/decision-framework.md +134 -0
- package/skills/create-subagent/references/template-single-agent.md +192 -0
- package/skills/fix-bug/SKILL.md +241 -0
- package/skills/governance-protocol/SKILL.md +116 -0
- package/skills/init/SKILL.md +341 -0
- package/skills/issue-debugging/SKILL.md +385 -0
- package/skills/issue-debugging/references/anti-patterns.md +245 -0
- package/skills/issue-debugging/references/debug-report-schema.md +227 -0
- package/skills/mock-detection/SKILL.md +511 -0
- package/skills/mock-detection/references/false-positive-prevention.md +402 -0
- package/skills/mock-detection/references/stub-patterns.md +236 -0
- package/skills/pipeline-templates/SKILL.md +215 -0
- package/skills/pipeline-templates/references/code-change-workflow.md +277 -0
- package/skills/pipeline-templates/references/code-review.md +336 -0
- package/skills/pipeline-templates/references/fix-validation.md +421 -0
- package/skills/pipeline-templates/references/new-feature.md +335 -0
- package/skills/pipeline-templates/references/research-brainstorm.md +161 -0
- package/skills/pipeline-templates/references/research-planning.md +257 -0
- package/skills/pipeline-templates/references/test-audit.md +389 -0
- package/skills/pipeline-templates/references/test-execution-fix.md +238 -0
- package/skills/plan-creation/SKILL.md +497 -0
- package/skills/product-ideation/SKILL.md +372 -0
- package/skills/product-ideation/references/analysis-frameworks.md +161 -0
- package/skills/session-handoff/SKILL.md +139 -0
- package/skills/session-handoff/references/examples.md +223 -0
- package/skills/setup-lsp/SKILL.md +312 -0
- package/skills/setup-lsp/references/server-registry.md +85 -0
- package/skills/setup-lsp/references/troubleshooting.md +135 -0
- package/skills/subagent-output-templating/SKILL.md +415 -0
- package/skills/subagent-output-templating/references/examples.md +440 -0
- package/skills/subagent-prompting/SKILL.md +364 -0
- package/skills/subagent-prompting/references/examples.md +342 -0
- package/skills/test-audit/SKILL.md +531 -0
- package/skills/test-audit/references/known-limitations.md +41 -0
- package/skills/test-audit/references/priority-classification.md +30 -0
- package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -0
- package/skills/test-audit/references/prompts/synthesis.md +57 -0
- package/skills/test-audit/references/rewrite-instructions.md +46 -0
- package/skills/test-audit/references/schemas/audit-output.yaml +100 -0
- package/skills/test-audit/references/schemas/diagnostic-output.yaml +49 -0
- package/skills/test-audit/scripts/data-flow-analyzer.ts +509 -0
- package/skills/test-audit/scripts/integration-mock-detector.ts +462 -0
- package/skills/test-audit/scripts/package.json +20 -0
- package/skills/test-audit/scripts/skip-detector.ts +211 -0
- package/skills/test-audit/scripts/verification-counter.ts +295 -0
- package/skills/test-classification/SKILL.md +310 -0
- package/skills/test-fixture-creation/SKILL.md +295 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
# Code Review Pipeline
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Review code for quality, security, and correctness before merge or deployment.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- PR reviews
|
|
10
|
+
- Code audits
|
|
11
|
+
- Pre-deployment verification
|
|
12
|
+
- Security assessments
|
|
13
|
+
|
|
14
|
+
## Two-Phase Workflow
|
|
15
|
+
|
|
16
|
+
**CRITICAL**: The code-review skill enforces a two-phase workflow:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Phase 1: Static Analysis (Deterministic)
|
|
20
|
+
├── Run: just typecheck → capture output
|
|
21
|
+
├── Run: just lint → capture output
|
|
22
|
+
└── If failures: STOP, return to user (fail fast)
|
|
23
|
+
|
|
24
|
+
Phase 2: LLM Review (Judgment-Based)
|
|
25
|
+
└── Each pipeline stage applies its section
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Each stage assumes Phase 1 passed before running Phase 2 for its section.
|
|
29
|
+
|
|
30
|
+
## Architecture: Role-Based Agents
|
|
31
|
+
|
|
32
|
+
This pipeline uses **role-based general-purpose agents**. Each agent:
|
|
33
|
+
1. Loads the `code-review` skill via frontmatter (`skills: code-review`)
|
|
34
|
+
2. References a specific section using `--section=<name>`
|
|
35
|
+
3. Outputs findings using templates from `skills/code-review/templates/`
|
|
36
|
+
|
|
37
|
+
**Severity Tiers**: critical (must fix) | important (should fix) | suggestion (optional)
|
|
38
|
+
|
|
39
|
+
**Confidence Levels**: verified (data flow traced) | suspected (pattern match, needs validation)
|
|
40
|
+
|
|
41
|
+
**Parallel execution**: Stages 1-4 run concurrently (multiple Task calls in a single message) to prevent cross-section bias contamination. Stage 5 waits for all findings before synthesizing.
|
|
42
|
+
|
|
43
|
+
## Pipeline Definition
|
|
44
|
+
|
|
45
|
+
```fsharp
|
|
46
|
+
// Code Review Pipeline - Parallel Execution
|
|
47
|
+
// Trigger: Code changes requiring review
|
|
48
|
+
// Output: Review report with findings and severity
|
|
49
|
+
// Stages 1-4 run concurrently, findings merged in Stage 5
|
|
50
|
+
|
|
51
|
+
[SecurityReviewer (section: Security), // Sonnet - role-based
|
|
52
|
+
TypeSafetyReviewer (section: Type Safety), // Sonnet - role-based
|
|
53
|
+
LintReviewer (section: Linting), // Sonnet - role-based
|
|
54
|
+
StandardsReviewer (section: Coding Standards)] // Sonnet - role-based
|
|
55
|
+
|> ReviewSynthesizer (consolidate all findings) // Sonnet - synthesis
|
|
56
|
+
|> (if critical_issues > 0
|
|
57
|
+
then FixWriter (apply fixes) // Opus - write code
|
|
58
|
+
else Done)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Stage Details
|
|
62
|
+
|
|
63
|
+
### Role-Based Agent Pattern
|
|
64
|
+
|
|
65
|
+
Each review stage uses a general-purpose agent with:
|
|
66
|
+
- **Frontmatter**: `skills: code-review`
|
|
67
|
+
- **Prompt**: Specifies which section to reference
|
|
68
|
+
- **Output**: Standardized YAML findings format
|
|
69
|
+
|
|
70
|
+
### Stage 1: SecurityReviewer
|
|
71
|
+
|
|
72
|
+
**Type**: General-purpose agent with role
|
|
73
|
+
|
|
74
|
+
**Model**: Sonnet (nuanced judgment required)
|
|
75
|
+
|
|
76
|
+
**Skill Section**: Security
|
|
77
|
+
|
|
78
|
+
**GOAL**: Identify security vulnerabilities using the Security section of code-review skill.
|
|
79
|
+
|
|
80
|
+
**CONSTRAINTS**:
|
|
81
|
+
- Do NOT modify any files
|
|
82
|
+
- Focus on OWASP Top 10 patterns
|
|
83
|
+
- Flag severity: critical, high, medium, low
|
|
84
|
+
|
|
85
|
+
**CONTEXT**:
|
|
86
|
+
- Files changed in PR/commit
|
|
87
|
+
- Project security requirements (if any)
|
|
88
|
+
|
|
89
|
+
**OUTPUT**: Security findings using `skills/code-review/templates/output-pipeline.yaml`
|
|
90
|
+
```yaml
|
|
91
|
+
security_review:
|
|
92
|
+
section: security
|
|
93
|
+
findings:
|
|
94
|
+
- severity: critical
|
|
95
|
+
confidence: verified
|
|
96
|
+
file: path/to/file.ts
|
|
97
|
+
line: 42
|
|
98
|
+
pattern: sql_injection
|
|
99
|
+
owasp: "A03:2021-Injection"
|
|
100
|
+
evidence: "User input from req.query.id flows to db.query()"
|
|
101
|
+
description: User input not sanitized
|
|
102
|
+
fix: Use parameterized queries
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Stage 2: TypeSafetyReviewer
|
|
106
|
+
|
|
107
|
+
**Type**: General-purpose agent with role
|
|
108
|
+
|
|
109
|
+
**Model**: Sonnet (nuanced judgment required)
|
|
110
|
+
|
|
111
|
+
**Skill Section**: Type Safety
|
|
112
|
+
|
|
113
|
+
**GOAL**: Identify type safety issues using the Type Safety section of code-review skill.
|
|
114
|
+
|
|
115
|
+
**CONSTRAINTS**:
|
|
116
|
+
- Do NOT modify any files
|
|
117
|
+
- Focus on `any` usage, null handling, unsafe assertions
|
|
118
|
+
- Consider TypeScript strict mode violations
|
|
119
|
+
|
|
120
|
+
**CONTEXT**:
|
|
121
|
+
- Files changed in PR/commit
|
|
122
|
+
- Project TypeScript configuration
|
|
123
|
+
|
|
124
|
+
**OUTPUT**: Type safety findings using `skills/code-review/templates/output-pipeline.yaml`
|
|
125
|
+
```yaml
|
|
126
|
+
type_safety_review:
|
|
127
|
+
section: type_safety
|
|
128
|
+
findings:
|
|
129
|
+
- severity: important
|
|
130
|
+
confidence: verified
|
|
131
|
+
file: path/to/file.ts
|
|
132
|
+
line: 15
|
|
133
|
+
pattern: any_explicit
|
|
134
|
+
evidence: "Explicit 'any' type annotation at line 15"
|
|
135
|
+
description: Using 'any' bypasses type checking
|
|
136
|
+
fix: Define proper interface
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Stage 3: LintReviewer
|
|
140
|
+
|
|
141
|
+
**Type**: General-purpose agent with role
|
|
142
|
+
|
|
143
|
+
**Model**: Sonnet (nuanced judgment required)
|
|
144
|
+
|
|
145
|
+
**Skill Section**: Linting
|
|
146
|
+
|
|
147
|
+
**GOAL**: Identify code style and formatting issues using the Linting section of code-review skill.
|
|
148
|
+
|
|
149
|
+
**CONSTRAINTS**:
|
|
150
|
+
- Do NOT modify any files
|
|
151
|
+
- Check complexity metrics
|
|
152
|
+
- Identify formatting violations
|
|
153
|
+
|
|
154
|
+
**CONTEXT**:
|
|
155
|
+
- Files changed in PR/commit
|
|
156
|
+
- Project linting configuration (if any)
|
|
157
|
+
|
|
158
|
+
**OUTPUT**: Linting findings using `skills/code-review/templates/output-pipeline.yaml`
|
|
159
|
+
```yaml
|
|
160
|
+
lint_review:
|
|
161
|
+
section: linting
|
|
162
|
+
findings:
|
|
163
|
+
- severity: suggestion
|
|
164
|
+
confidence: verified
|
|
165
|
+
file: path/to/file.ts
|
|
166
|
+
line: 100
|
|
167
|
+
pattern: deep_nesting
|
|
168
|
+
metrics:
|
|
169
|
+
nesting_depth: 5
|
|
170
|
+
function_length: 85
|
|
171
|
+
evidence: "Function has cyclomatic complexity of 15"
|
|
172
|
+
description: Function has high complexity
|
|
173
|
+
fix: Split into smaller functions
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Stage 4: StandardsReviewer
|
|
177
|
+
|
|
178
|
+
**Type**: General-purpose agent with role
|
|
179
|
+
|
|
180
|
+
**Model**: Sonnet (nuanced judgment required)
|
|
181
|
+
|
|
182
|
+
**Skill Section**: Coding Standards
|
|
183
|
+
|
|
184
|
+
**GOAL**: Check coding standards using the Coding Standards section of code-review skill.
|
|
185
|
+
|
|
186
|
+
**CONSTRAINTS**:
|
|
187
|
+
- Do NOT modify any files
|
|
188
|
+
- Check naming conventions
|
|
189
|
+
- Verify documentation requirements
|
|
190
|
+
- Check pattern compliance
|
|
191
|
+
|
|
192
|
+
**CONTEXT**:
|
|
193
|
+
- Files changed in PR/commit
|
|
194
|
+
- Project coding standards (if any)
|
|
195
|
+
|
|
196
|
+
**OUTPUT**: Standards findings using `skills/code-review/templates/output-pipeline.yaml`
|
|
197
|
+
```yaml
|
|
198
|
+
standards_review:
|
|
199
|
+
section: standards
|
|
200
|
+
findings:
|
|
201
|
+
- severity: suggestion
|
|
202
|
+
confidence: suspected
|
|
203
|
+
file: path/to/file.ts
|
|
204
|
+
line: 5
|
|
205
|
+
pattern: cs1_single_responsibility
|
|
206
|
+
principle: "CS1"
|
|
207
|
+
evidence: "Function handles validation, persistence, and notification"
|
|
208
|
+
description: Function has multiple responsibilities
|
|
209
|
+
fix: Split into validateOrder, saveOrder, notifyOrder
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Stage 5: ReviewSynthesizer
|
|
213
|
+
|
|
214
|
+
**Type**: General-purpose agent
|
|
215
|
+
|
|
216
|
+
**Model**: Sonnet (synthesis task)
|
|
217
|
+
|
|
218
|
+
**GOAL**: Consolidate all findings into actionable review report.
|
|
219
|
+
|
|
220
|
+
**CONSTRAINTS**:
|
|
221
|
+
- Do NOT modify any files
|
|
222
|
+
- Prioritize findings by severity and impact
|
|
223
|
+
- Provide clear fix guidance
|
|
224
|
+
- Determine overall approval status
|
|
225
|
+
|
|
226
|
+
**CONTEXT**:
|
|
227
|
+
- Findings from all previous stages (Security, Type Safety, Linting, Standards)
|
|
228
|
+
|
|
229
|
+
**OUTPUT**: Consolidated review report (uses `skills/code-review/templates/output-direct.yaml` format)
|
|
230
|
+
```yaml
|
|
231
|
+
code_review:
|
|
232
|
+
mode: comprehensive
|
|
233
|
+
static_analysis:
|
|
234
|
+
typecheck: passed
|
|
235
|
+
lint: passed
|
|
236
|
+
findings:
|
|
237
|
+
critical:
|
|
238
|
+
- {file: auth.ts, line: 42, section: security, pattern: sql_injection}
|
|
239
|
+
important:
|
|
240
|
+
- {file: user.ts, line: 15, section: type_safety, pattern: any_explicit}
|
|
241
|
+
- {file: config.ts, line: 30, section: type_safety, pattern: null_gap}
|
|
242
|
+
suggestions:
|
|
243
|
+
- {file: processor.ts, line: 100, section: linting, pattern: deep_nesting}
|
|
244
|
+
- {file: service.ts, line: 5, section: standards, pattern: cs1_single_responsibility}
|
|
245
|
+
summary:
|
|
246
|
+
critical_count: 1
|
|
247
|
+
important_count: 2
|
|
248
|
+
suggestion_count: 2
|
|
249
|
+
recommendation: "Fix critical SQL injection before merge"
|
|
250
|
+
gate:
|
|
251
|
+
passed: false
|
|
252
|
+
blocking_findings: 1
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Stage 6: FixWriter (Conditional)
|
|
256
|
+
|
|
257
|
+
**Type**: Orchestrator action (Opus)
|
|
258
|
+
|
|
259
|
+
**Model**: Opus (code writing required)
|
|
260
|
+
|
|
261
|
+
**Conditional**: Only run if critical or high severity findings exist.
|
|
262
|
+
|
|
263
|
+
**GOAL**: Apply fixes for identified issues.
|
|
264
|
+
|
|
265
|
+
**CONSTRAINTS**:
|
|
266
|
+
- Only fix issues from the review
|
|
267
|
+
- Maintain existing code style
|
|
268
|
+
- Do NOT refactor unrelated code
|
|
269
|
+
|
|
270
|
+
**OUTPUT**: Applied fixes with verification plan
|
|
271
|
+
|
|
272
|
+
## Example Invocation
|
|
273
|
+
|
|
274
|
+
```markdown
|
|
275
|
+
## Pipeline: Code Review
|
|
276
|
+
|
|
277
|
+
### Stages 1-4: Parallel Review Agents (single message, multiple Task calls)
|
|
278
|
+
All four agents launched concurrently in ONE message:
|
|
279
|
+
|
|
280
|
+
Task 1: subagent_type=general-purpose, model=sonnet
|
|
281
|
+
Skills: code-review
|
|
282
|
+
Prompt:
|
|
283
|
+
GOAL: Review code for security issues using the Security section of code-review skill
|
|
284
|
+
CONSTRAINTS: Do not modify files, focus on OWASP Top 10
|
|
285
|
+
CONTEXT: [files to review]
|
|
286
|
+
OUTPUT: YAML findings with section: security
|
|
287
|
+
|
|
288
|
+
Task 2: subagent_type=general-purpose, model=sonnet
|
|
289
|
+
Skills: code-review
|
|
290
|
+
Prompt:
|
|
291
|
+
GOAL: Review code for type safety using the Type Safety section of code-review skill
|
|
292
|
+
CONSTRAINTS: Do not modify files, focus on any, null, unsafe assertions
|
|
293
|
+
CONTEXT: [files to review]
|
|
294
|
+
OUTPUT: YAML findings with section: type_safety
|
|
295
|
+
|
|
296
|
+
Task 3: subagent_type=general-purpose, model=sonnet
|
|
297
|
+
Skills: code-review
|
|
298
|
+
Prompt:
|
|
299
|
+
GOAL: Review code for linting issues using the Linting section of code-review skill
|
|
300
|
+
CONSTRAINTS: Do not modify files, check complexity and formatting
|
|
301
|
+
CONTEXT: [files to review]
|
|
302
|
+
OUTPUT: YAML findings with section: linting
|
|
303
|
+
|
|
304
|
+
Task 4: subagent_type=general-purpose, model=sonnet
|
|
305
|
+
Skills: code-review
|
|
306
|
+
Prompt:
|
|
307
|
+
GOAL: Review code for standards using the Coding Standards section of code-review skill
|
|
308
|
+
CONSTRAINTS: Do not modify files, check naming and patterns
|
|
309
|
+
CONTEXT: [files to review]
|
|
310
|
+
OUTPUT: YAML findings with section: coding_standards
|
|
311
|
+
|
|
312
|
+
### Stage 5: ReviewSynthesizer (after all 4 complete)
|
|
313
|
+
Task: subagent_type=general-purpose, model=sonnet
|
|
314
|
+
Prompt:
|
|
315
|
+
GOAL: Consolidate all findings into actionable review
|
|
316
|
+
CONTEXT: [all findings from stages 1-4]
|
|
317
|
+
OUTPUT: Consolidated review report with approval status
|
|
318
|
+
|
|
319
|
+
### Stage 6: FixWriter (Conditional)
|
|
320
|
+
Condition: critical or high severity findings exist
|
|
321
|
+
Actor: Orchestrator (Opus)
|
|
322
|
+
Action: Apply fixes for priority issues
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
## Success Criteria
|
|
326
|
+
|
|
327
|
+
- All four review sections executed (Security, Type Safety, Linting, Coding Standards)
|
|
328
|
+
- Each section produces standardized YAML findings
|
|
329
|
+
- Findings consolidated with severity prioritization
|
|
330
|
+
- Review report generated with clear approval status
|
|
331
|
+
- Fixes applied for critical/high issues (if requested)
|
|
332
|
+
|
|
333
|
+
## Related Pipelines
|
|
334
|
+
|
|
335
|
+
- **Fix Validation**: For fixing issues found in review
|
|
336
|
+
- **Test Audit**: For reviewing test quality specifically
|