@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,238 @@
|
|
|
1
|
+
# Test Execution & Fix Pipeline
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Run tests, analyze failures, and fix issues iteratively.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- After code changes
|
|
10
|
+
- CI failure remediation
|
|
11
|
+
- Test suite maintenance
|
|
12
|
+
- Pre-merge verification
|
|
13
|
+
|
|
14
|
+
## Pipeline Definition
|
|
15
|
+
|
|
16
|
+
```fsharp
|
|
17
|
+
// Test Execution & Fix Pipeline
|
|
18
|
+
// Trigger: Code changes, CI failures
|
|
19
|
+
// Output: Passing tests with fixes applied
|
|
20
|
+
|
|
21
|
+
TestRunner (execute test suite) // Haiku - execution
|
|
22
|
+
|> (if failures > 0
|
|
23
|
+
then FailureAnalyzer (analyze failures) // Sonnet - analysis
|
|
24
|
+
else Done)
|
|
25
|
+
|> FixWriter (apply fixes) // Opus - write code
|
|
26
|
+
|> TestRunner (re-execute) // Haiku - verify
|
|
27
|
+
|> (if failures > 0 && iterations < max
|
|
28
|
+
then FailureAnalyzer // Loop back
|
|
29
|
+
else Done)
|
|
30
|
+
|> LOOP(max=3) // Max 3 fix attempts
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Stage Details
|
|
34
|
+
|
|
35
|
+
### Stage 1: TestRunner
|
|
36
|
+
|
|
37
|
+
**Model**: Haiku (execution task)
|
|
38
|
+
|
|
39
|
+
**GOAL**: Run tests and capture results.
|
|
40
|
+
|
|
41
|
+
**CONSTRAINTS**:
|
|
42
|
+
- Do NOT modify any files
|
|
43
|
+
- Capture full output
|
|
44
|
+
- Parse failure details
|
|
45
|
+
|
|
46
|
+
**CONTEXT**:
|
|
47
|
+
- Test command (e.g., `just test`)
|
|
48
|
+
- Test scope (all, specific files, etc.)
|
|
49
|
+
|
|
50
|
+
**OUTPUT**: Test results
|
|
51
|
+
```yaml
|
|
52
|
+
results:
|
|
53
|
+
command: "just test"
|
|
54
|
+
duration: "45s"
|
|
55
|
+
summary:
|
|
56
|
+
total: 142
|
|
57
|
+
passed: 138
|
|
58
|
+
failed: 4
|
|
59
|
+
skipped: 0
|
|
60
|
+
failures:
|
|
61
|
+
- test: "should start proxy on specified port"
|
|
62
|
+
file: tests/proxy.test.ts
|
|
63
|
+
line: 23
|
|
64
|
+
error: "EADDRINUSE: address already in use"
|
|
65
|
+
stack: |
|
|
66
|
+
Error: listen EADDRINUSE: address already in use :::8096
|
|
67
|
+
at Server.setupListenHandle [as _listen2]
|
|
68
|
+
- test: "should parse config file"
|
|
69
|
+
file: tests/config.test.ts
|
|
70
|
+
line: 45
|
|
71
|
+
error: "Expected 'production' but got 'development'"
|
|
72
|
+
stack: |
|
|
73
|
+
AssertionError: expected 'development' to equal 'production'
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Stage 2: FailureAnalyzer
|
|
77
|
+
|
|
78
|
+
**Model**: Sonnet (analysis task)
|
|
79
|
+
|
|
80
|
+
**Conditional**: Only run if failures > 0
|
|
81
|
+
|
|
82
|
+
**GOAL**: Analyze failures to understand root cause.
|
|
83
|
+
|
|
84
|
+
**CONSTRAINTS**:
|
|
85
|
+
- Do NOT modify any files
|
|
86
|
+
- Categorize failure types
|
|
87
|
+
- Identify common patterns
|
|
88
|
+
- Prioritize by fix complexity
|
|
89
|
+
|
|
90
|
+
**CONTEXT**:
|
|
91
|
+
- Test results from Stage 1
|
|
92
|
+
- Test file contents
|
|
93
|
+
- Related source files
|
|
94
|
+
|
|
95
|
+
**OUTPUT**: Failure analysis
|
|
96
|
+
```yaml
|
|
97
|
+
analysis:
|
|
98
|
+
failure_count: 4
|
|
99
|
+
categories:
|
|
100
|
+
environment:
|
|
101
|
+
count: 1
|
|
102
|
+
tests: ["should start proxy on specified port"]
|
|
103
|
+
cause: "Port 8096 in use by another process"
|
|
104
|
+
fix_approach: "Use dynamic port assignment"
|
|
105
|
+
assertion:
|
|
106
|
+
count: 2
|
|
107
|
+
tests: ["should parse config file", "should return correct env"]
|
|
108
|
+
cause: "Test environment not properly set"
|
|
109
|
+
fix_approach: "Set NODE_ENV before test"
|
|
110
|
+
flaky:
|
|
111
|
+
count: 1
|
|
112
|
+
tests: ["should timeout on slow response"]
|
|
113
|
+
cause: "Race condition in timeout handling"
|
|
114
|
+
fix_approach: "Increase timeout or fix race"
|
|
115
|
+
priority_order:
|
|
116
|
+
- category: environment
|
|
117
|
+
reason: "Blocking other tests"
|
|
118
|
+
- category: assertion
|
|
119
|
+
reason: "Quick fix"
|
|
120
|
+
- category: flaky
|
|
121
|
+
reason: "May need investigation"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Stage 3: FixWriter
|
|
125
|
+
|
|
126
|
+
**Model**: Opus (code writing required)
|
|
127
|
+
|
|
128
|
+
**GOAL**: Apply fixes for test failures.
|
|
129
|
+
|
|
130
|
+
**CONSTRAINTS**:
|
|
131
|
+
- Fix test issues, not production bugs
|
|
132
|
+
- One category at a time
|
|
133
|
+
- Verify fix doesn't break other tests
|
|
134
|
+
|
|
135
|
+
**CONTEXT**:
|
|
136
|
+
- Failure analysis from Stage 2
|
|
137
|
+
- Test files
|
|
138
|
+
- Related source files
|
|
139
|
+
|
|
140
|
+
**OUTPUT**: Applied fixes
|
|
141
|
+
```yaml
|
|
142
|
+
fixes:
|
|
143
|
+
applied:
|
|
144
|
+
- file: tests/proxy.test.ts
|
|
145
|
+
change: "Use getAvailablePort() instead of hardcoded 8096"
|
|
146
|
+
tests_affected: ["should start proxy on specified port"]
|
|
147
|
+
- file: tests/config.test.ts
|
|
148
|
+
change: "Added beforeEach to set NODE_ENV"
|
|
149
|
+
tests_affected: ["should parse config file", "should return correct env"]
|
|
150
|
+
deferred:
|
|
151
|
+
- file: tests/timeout.test.ts
|
|
152
|
+
reason: "Flaky test needs deeper investigation"
|
|
153
|
+
recommendation: "Skip for now, create issue"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Stage 4: TestRunner (Re-execution)
|
|
157
|
+
|
|
158
|
+
**Model**: Haiku (execution task)
|
|
159
|
+
|
|
160
|
+
**GOAL**: Verify fixes resolved failures.
|
|
161
|
+
|
|
162
|
+
Same as Stage 1, but with expectation of fewer failures.
|
|
163
|
+
|
|
164
|
+
### Loop Condition
|
|
165
|
+
|
|
166
|
+
If failures remain and iterations < 3:
|
|
167
|
+
- Loop back to FailureAnalyzer
|
|
168
|
+
- Focus on remaining failures
|
|
169
|
+
- Avoid re-fixing already fixed issues
|
|
170
|
+
|
|
171
|
+
**Max iterations**: 3 (prevent infinite loop on unfixable issues)
|
|
172
|
+
|
|
173
|
+
## Example Invocation
|
|
174
|
+
|
|
175
|
+
```markdown
|
|
176
|
+
## Pipeline: Test Execution & Fix
|
|
177
|
+
|
|
178
|
+
### Stage 1: TestRunner
|
|
179
|
+
Task: subagent_type=Bash, model=haiku
|
|
180
|
+
Prompt: Run 'just test' and capture output
|
|
181
|
+
|
|
182
|
+
### Stage 2: FailureAnalyzer
|
|
183
|
+
Condition: failures > 0
|
|
184
|
+
Task: subagent_type=general-purpose, model=sonnet
|
|
185
|
+
Prompt: [4-part prompt, analyzes failures]
|
|
186
|
+
|
|
187
|
+
### Stage 3: FixWriter
|
|
188
|
+
Task: subagent_type=general-purpose, model=opus
|
|
189
|
+
Prompt: [4-part prompt, applies fixes]
|
|
190
|
+
|
|
191
|
+
### Stage 4: TestRunner (Iteration 1)
|
|
192
|
+
Task: subagent_type=Bash, model=haiku
|
|
193
|
+
Prompt: Re-run 'just test' to verify fixes
|
|
194
|
+
|
|
195
|
+
### Loop Check
|
|
196
|
+
If failures > 0 and iterations < 3:
|
|
197
|
+
Go to Stage 2 with remaining failures
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Success Criteria
|
|
201
|
+
|
|
202
|
+
- All tests pass
|
|
203
|
+
- OR: Remaining failures documented with justification
|
|
204
|
+
- Fixes don't introduce new failures
|
|
205
|
+
- Max 3 fix iterations
|
|
206
|
+
|
|
207
|
+
## Failure Categories
|
|
208
|
+
|
|
209
|
+
| Category | Description | Typical Fix |
|
|
210
|
+
|----------|-------------|-------------|
|
|
211
|
+
| Environment | Port conflicts, missing deps | Dynamic allocation, setup scripts |
|
|
212
|
+
| Assertion | Wrong expected value | Update test or fix bug |
|
|
213
|
+
| Timeout | Test too slow or hangs | Increase timeout, optimize |
|
|
214
|
+
| Flaky | Intermittent failures | Fix race condition, add retry |
|
|
215
|
+
| Setup | beforeEach/afterEach issues | Fix setup/teardown |
|
|
216
|
+
| Mock | Mock not matching real | Update mock or use real |
|
|
217
|
+
|
|
218
|
+
## Iteration Tracking
|
|
219
|
+
|
|
220
|
+
```yaml
|
|
221
|
+
iterations:
|
|
222
|
+
- round: 1
|
|
223
|
+
failures_before: 4
|
|
224
|
+
failures_after: 1
|
|
225
|
+
fixed: ["proxy port", "config env"]
|
|
226
|
+
- round: 2
|
|
227
|
+
failures_before: 1
|
|
228
|
+
failures_after: 0
|
|
229
|
+
fixed: ["timeout handling"]
|
|
230
|
+
- round: 3
|
|
231
|
+
not_needed: true
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Related Pipelines
|
|
235
|
+
|
|
236
|
+
- **Fix Validation**: For fixing source code bugs
|
|
237
|
+
- **Test Audit**: For auditing test quality
|
|
238
|
+
- **Code Review**: For reviewing fixes
|