@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.
Files changed (175) hide show
  1. package/.claude-plugin/plugin.json +43 -0
  2. package/agents/bulwark-fix-validator.md +633 -0
  3. package/agents/bulwark-implementer.md +391 -0
  4. package/agents/bulwark-issue-analyzer.md +308 -0
  5. package/agents/bulwark-standards-reviewer.md +221 -0
  6. package/agents/plan-creation-architect.md +323 -0
  7. package/agents/plan-creation-eng-lead.md +352 -0
  8. package/agents/plan-creation-po.md +300 -0
  9. package/agents/plan-creation-qa-critic.md +334 -0
  10. package/agents/product-ideation-competitive-analyzer.md +298 -0
  11. package/agents/product-ideation-idea-validator.md +268 -0
  12. package/agents/product-ideation-market-researcher.md +292 -0
  13. package/agents/product-ideation-pattern-documenter.md +308 -0
  14. package/agents/product-ideation-segment-analyzer.md +303 -0
  15. package/agents/product-ideation-strategist.md +259 -0
  16. package/agents/statusline-setup.md +97 -0
  17. package/hooks/hooks.json +59 -0
  18. package/package.json +45 -0
  19. package/scripts/hooks/cleanup-stale.sh +13 -0
  20. package/scripts/hooks/enforce-quality.sh +166 -0
  21. package/scripts/hooks/implementer-quality.sh +256 -0
  22. package/scripts/hooks/inject-protocol.sh +52 -0
  23. package/scripts/hooks/suggest-pipeline.sh +175 -0
  24. package/scripts/hooks/track-pipeline-start.sh +37 -0
  25. package/scripts/hooks/track-pipeline-stop.sh +52 -0
  26. package/scripts/init-rules.sh +35 -0
  27. package/scripts/init.sh +151 -0
  28. package/skills/anthropic-validator/SKILL.md +607 -0
  29. package/skills/anthropic-validator/references/agents-checklist.md +131 -0
  30. package/skills/anthropic-validator/references/commands-checklist.md +102 -0
  31. package/skills/anthropic-validator/references/hooks-checklist.md +151 -0
  32. package/skills/anthropic-validator/references/mcp-checklist.md +136 -0
  33. package/skills/anthropic-validator/references/plugins-checklist.md +148 -0
  34. package/skills/anthropic-validator/references/skills-checklist.md +85 -0
  35. package/skills/assertion-patterns/SKILL.md +296 -0
  36. package/skills/bug-magnet-data/SKILL.md +284 -0
  37. package/skills/bug-magnet-data/context/cli-args.md +91 -0
  38. package/skills/bug-magnet-data/context/db-query.md +104 -0
  39. package/skills/bug-magnet-data/context/file-contents.md +103 -0
  40. package/skills/bug-magnet-data/context/http-body.md +91 -0
  41. package/skills/bug-magnet-data/context/process-spawn.md +123 -0
  42. package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -0
  43. package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -0
  44. package/skills/bug-magnet-data/data/collections/objects.yaml +123 -0
  45. package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -0
  46. package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -0
  47. package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -0
  48. package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -0
  49. package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -0
  50. package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -0
  51. package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -0
  52. package/skills/bug-magnet-data/data/formats/email.yaml +154 -0
  53. package/skills/bug-magnet-data/data/formats/json.yaml +187 -0
  54. package/skills/bug-magnet-data/data/formats/url.yaml +165 -0
  55. package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -0
  56. package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -0
  57. package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -0
  58. package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -0
  59. package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -0
  60. package/skills/bug-magnet-data/data/numbers/special.yaml +69 -0
  61. package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -0
  62. package/skills/bug-magnet-data/data/strings/injection.yaml +208 -0
  63. package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -0
  64. package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -0
  65. package/skills/bug-magnet-data/references/external-lists.md +115 -0
  66. package/skills/bulwark-brainstorm/SKILL.md +563 -0
  67. package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +60 -0
  68. package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -0
  69. package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -0
  70. package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -0
  71. package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -0
  72. package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -0
  73. package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -0
  74. package/skills/bulwark-research/SKILL.md +298 -0
  75. package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -0
  76. package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -0
  77. package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -0
  78. package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -0
  79. package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -0
  80. package/skills/bulwark-scaffold/SKILL.md +330 -0
  81. package/skills/bulwark-statusline/SKILL.md +161 -0
  82. package/skills/bulwark-statusline/scripts/statusline.sh +144 -0
  83. package/skills/bulwark-verify/SKILL.md +519 -0
  84. package/skills/code-review/SKILL.md +428 -0
  85. package/skills/code-review/examples/anti-patterns/linting.ts +181 -0
  86. package/skills/code-review/examples/anti-patterns/security.ts +91 -0
  87. package/skills/code-review/examples/anti-patterns/standards.ts +195 -0
  88. package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -0
  89. package/skills/code-review/examples/recommended/linting.ts +195 -0
  90. package/skills/code-review/examples/recommended/security.ts +154 -0
  91. package/skills/code-review/examples/recommended/standards.ts +231 -0
  92. package/skills/code-review/examples/recommended/type-safety.ts +181 -0
  93. package/skills/code-review/frameworks/angular.md +218 -0
  94. package/skills/code-review/frameworks/django.md +235 -0
  95. package/skills/code-review/frameworks/express.md +207 -0
  96. package/skills/code-review/frameworks/flask.md +298 -0
  97. package/skills/code-review/frameworks/generic.md +146 -0
  98. package/skills/code-review/frameworks/react.md +152 -0
  99. package/skills/code-review/frameworks/vue.md +244 -0
  100. package/skills/code-review/references/linting-patterns.md +221 -0
  101. package/skills/code-review/references/security-patterns.md +125 -0
  102. package/skills/code-review/references/standards-patterns.md +246 -0
  103. package/skills/code-review/references/type-safety-patterns.md +130 -0
  104. package/skills/component-patterns/SKILL.md +131 -0
  105. package/skills/component-patterns/references/pattern-cli-command.md +118 -0
  106. package/skills/component-patterns/references/pattern-database.md +166 -0
  107. package/skills/component-patterns/references/pattern-external-api.md +139 -0
  108. package/skills/component-patterns/references/pattern-file-parser.md +168 -0
  109. package/skills/component-patterns/references/pattern-http-server.md +162 -0
  110. package/skills/component-patterns/references/pattern-process-spawner.md +133 -0
  111. package/skills/continuous-feedback/SKILL.md +327 -0
  112. package/skills/continuous-feedback/references/collect-instructions.md +81 -0
  113. package/skills/continuous-feedback/references/specialize-code-review.md +82 -0
  114. package/skills/continuous-feedback/references/specialize-general.md +98 -0
  115. package/skills/continuous-feedback/references/specialize-test-audit.md +81 -0
  116. package/skills/create-skill/SKILL.md +359 -0
  117. package/skills/create-skill/references/agent-conventions.md +194 -0
  118. package/skills/create-skill/references/agent-template.md +195 -0
  119. package/skills/create-skill/references/content-guidance.md +291 -0
  120. package/skills/create-skill/references/decision-framework.md +124 -0
  121. package/skills/create-skill/references/template-pipeline.md +217 -0
  122. package/skills/create-skill/references/template-reference-heavy.md +111 -0
  123. package/skills/create-skill/references/template-research.md +210 -0
  124. package/skills/create-skill/references/template-script-driven.md +172 -0
  125. package/skills/create-skill/references/template-simple.md +80 -0
  126. package/skills/create-subagent/SKILL.md +353 -0
  127. package/skills/create-subagent/references/agent-conventions.md +268 -0
  128. package/skills/create-subagent/references/content-guidance.md +232 -0
  129. package/skills/create-subagent/references/decision-framework.md +134 -0
  130. package/skills/create-subagent/references/template-single-agent.md +192 -0
  131. package/skills/fix-bug/SKILL.md +241 -0
  132. package/skills/governance-protocol/SKILL.md +116 -0
  133. package/skills/init/SKILL.md +341 -0
  134. package/skills/issue-debugging/SKILL.md +385 -0
  135. package/skills/issue-debugging/references/anti-patterns.md +245 -0
  136. package/skills/issue-debugging/references/debug-report-schema.md +227 -0
  137. package/skills/mock-detection/SKILL.md +511 -0
  138. package/skills/mock-detection/references/false-positive-prevention.md +402 -0
  139. package/skills/mock-detection/references/stub-patterns.md +236 -0
  140. package/skills/pipeline-templates/SKILL.md +215 -0
  141. package/skills/pipeline-templates/references/code-change-workflow.md +277 -0
  142. package/skills/pipeline-templates/references/code-review.md +336 -0
  143. package/skills/pipeline-templates/references/fix-validation.md +421 -0
  144. package/skills/pipeline-templates/references/new-feature.md +335 -0
  145. package/skills/pipeline-templates/references/research-brainstorm.md +161 -0
  146. package/skills/pipeline-templates/references/research-planning.md +257 -0
  147. package/skills/pipeline-templates/references/test-audit.md +389 -0
  148. package/skills/pipeline-templates/references/test-execution-fix.md +238 -0
  149. package/skills/plan-creation/SKILL.md +497 -0
  150. package/skills/product-ideation/SKILL.md +372 -0
  151. package/skills/product-ideation/references/analysis-frameworks.md +161 -0
  152. package/skills/session-handoff/SKILL.md +139 -0
  153. package/skills/session-handoff/references/examples.md +223 -0
  154. package/skills/setup-lsp/SKILL.md +312 -0
  155. package/skills/setup-lsp/references/server-registry.md +85 -0
  156. package/skills/setup-lsp/references/troubleshooting.md +135 -0
  157. package/skills/subagent-output-templating/SKILL.md +415 -0
  158. package/skills/subagent-output-templating/references/examples.md +440 -0
  159. package/skills/subagent-prompting/SKILL.md +364 -0
  160. package/skills/subagent-prompting/references/examples.md +342 -0
  161. package/skills/test-audit/SKILL.md +531 -0
  162. package/skills/test-audit/references/known-limitations.md +41 -0
  163. package/skills/test-audit/references/priority-classification.md +30 -0
  164. package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -0
  165. package/skills/test-audit/references/prompts/synthesis.md +57 -0
  166. package/skills/test-audit/references/rewrite-instructions.md +46 -0
  167. package/skills/test-audit/references/schemas/audit-output.yaml +100 -0
  168. package/skills/test-audit/references/schemas/diagnostic-output.yaml +49 -0
  169. package/skills/test-audit/scripts/data-flow-analyzer.ts +509 -0
  170. package/skills/test-audit/scripts/integration-mock-detector.ts +462 -0
  171. package/skills/test-audit/scripts/package.json +20 -0
  172. package/skills/test-audit/scripts/skip-detector.ts +211 -0
  173. package/skills/test-audit/scripts/verification-counter.ts +295 -0
  174. package/skills/test-classification/SKILL.md +310 -0
  175. package/skills/test-fixture-creation/SKILL.md +295 -0
@@ -0,0 +1,519 @@
1
+ ---
2
+ name: bulwark-verify
3
+ description: Generate runnable verification scripts for components. Orchestrates assertion-patterns and component-patterns to produce executable scripts.
4
+ user-invocable: true
5
+ skills:
6
+ - assertion-patterns
7
+ - component-patterns
8
+ - bug-magnet-data
9
+ ---
10
+
11
+ # Bulwark Verify
12
+
13
+ ## Purpose
14
+
15
+ Generate runnable verification scripts that test real component behavior without mocks.
16
+ This skill orchestrates assertion-patterns (P2.1) and component-patterns (P2.2) to produce
17
+ executable scripts for any component type.
18
+
19
+ ## When to Use
20
+
21
+ **Load this skill when:**
22
+ - User requests `/bulwark-verify [path]`
23
+ - test-audit Step 7 needs verification scripts
24
+ - Generating standalone verification for a component
25
+
26
+ **DO NOT use for:**
27
+ - Running existing tests (use `just test`)
28
+ - Writing unit tests (implement directly)
29
+ - Test auditing (use `test-audit` skill)
30
+
31
+ ---
32
+
33
+ ## Usage
34
+
35
+ ```
36
+ /bulwark-verify [path] [--execute]
37
+ ```
38
+
39
+ **Examples:**
40
+ - `/bulwark-verify src/cli.ts` - Generate verification script for CLI
41
+ - `/bulwark-verify src/server.ts --execute` - Generate and run
42
+ - `/bulwark-verify` - Infer from recent context
43
+
44
+ ---
45
+
46
+ ## MANDATORY EXECUTION STEPS
47
+
48
+ > **WARNING**: These steps are BINDING instructions, not suggestions. You MUST execute
49
+ > each step in order. Do NOT substitute your judgment for these instructions.
50
+ > Do NOT skip sub-agent spawning. Do NOT modify the execution flow.
51
+
52
+ When this skill is loaded, execute these steps **exactly as written**:
53
+
54
+ ### Step 1: Resolve Target
55
+
56
+ ```
57
+ IF $ARGUMENTS provided:
58
+ target = first non-flag argument
59
+ execute_flag = "--execute" in $ARGUMENTS
60
+ ELSE:
61
+ Look for component files in recent conversation context
62
+ IF found: target = that path
63
+ ELSE: Ask user: "Which component should I generate a verification script for?"
64
+ ```
65
+
66
+ ### Step 2: Detect Project Language
67
+
68
+ Check for project manifest files in order (search from target file's directory up to project root):
69
+
70
+ | Check | Language | Test Runner |
71
+ |-------|----------|-------------|
72
+ | `package.json` exists | Node | jest/vitest/node |
73
+ | `pyproject.toml` OR `setup.py` exists | Python | pytest/python |
74
+ | `Cargo.toml` exists | Rust | cargo test |
75
+ | None of the above | Generic | bash |
76
+
77
+ ### Step 3: Analyze Component
78
+
79
+ 1. **Read the target file**
80
+
81
+ 2. **Identify component type** using indicators from `component-patterns` skill:
82
+ - Has `spawn`/`exec`/`execSync` imports → Process Spawner
83
+ - Has `listen()`/`createServer`/`express()`/`fastify()` → HTTP Server
84
+ - Has `fs.readFile`/`parse` functions → File Parser
85
+ - Has `process.argv`/`yargs`/`commander`/`argparse` → CLI Command
86
+ - Has database imports (`pg`, `mysql`, `mongoose`, `prisma`) → Database
87
+ - Has `fetch`/`axios`/`got`/`requests` calls → External API
88
+
89
+ 3. **Load dependent skills:**
90
+ - Load `assertion-patterns` skill content
91
+ - Load `component-patterns` skill content
92
+
93
+ 4. **Load bug-magnet-data for the component type** [REQUIRED]:
94
+ - Read the context file matching the component type:
95
+ | Component Type | Context File |
96
+ |----------------|--------------|
97
+ | CLI Command | `bug-magnet-data/context/cli-args.md` |
98
+ | HTTP Server | `bug-magnet-data/context/http-body.md` |
99
+ | File Parser | `bug-magnet-data/context/file-contents.md` |
100
+ | Database | `bug-magnet-data/context/db-query.md` |
101
+ | Process Spawner | `bug-magnet-data/context/process-spawn.md` |
102
+ | External API | `bug-magnet-data/context/http-body.md` |
103
+ - Read the "Applicable Categories" section from the context file
104
+ - Load T0 + T1 data files listed in the context file:
105
+ - T0 (Always): `data/strings/boundaries.yaml`, `data/numbers/boundaries.yaml`
106
+ - T1 (Common): Based on context file recommendations
107
+
108
+ 5. **Select applicable patterns:**
109
+ - From `assertion-patterns`: Identify T1-T4 transformation patterns relevant to the component
110
+ - From `component-patterns`: Select the matching component type template
111
+ - From `bug-magnet-data`: Extract concrete edge case values to include in generated script
112
+
113
+ ### Step 4: Generate Script [SPAWN-REQUIRED]
114
+
115
+ **You MUST spawn a Sonnet sub-agent for script generation.** Do NOT generate the script yourself.
116
+
117
+ ```
118
+ Task(
119
+ description="Generate verification script for {component_name}",
120
+ subagent_type="general-purpose",
121
+ model="sonnet",
122
+ prompt=<constructed_4part_prompt_from_template_below>
123
+ )
124
+ ```
125
+
126
+ The sub-agent writes the script to `tmp/verification/{component_name}-verify.{ext}`.
127
+
128
+ ### Step 5: Validate Generated Script [REQUIRED]
129
+
130
+ After the sub-agent returns, validate the generated script syntax:
131
+
132
+ | Language | Validation Command | Success |
133
+ |----------|-------------------|---------|
134
+ | Node | `node --check {script_path}` | Exit 0 |
135
+ | Python | `python -m py_compile {script_path}` | Exit 0 |
136
+ | Bash | `bash -n {script_path}` | Exit 0 |
137
+
138
+ If validation fails:
139
+ 1. Read the error message
140
+ 2. Fix the syntax issue in the generated script
141
+ 3. Re-validate until successful
142
+ 4. Only then proceed to Step 6
143
+
144
+ ### Step 6: Report Results
145
+
146
+ Present summary to user:
147
+
148
+ ```markdown
149
+ ## Verification Script Generated
150
+
151
+ **Component:** {component_path}
152
+ **Type:** {component_type}
153
+ **Language:** {language}
154
+
155
+ **Script location:** tmp/verification/{name}-verify.{ext}
156
+
157
+ **To run manually:**
158
+ ```
159
+ {runner_command}
160
+ ```
161
+ ```
162
+
163
+ If `--execute` flag was provided:
164
+ 1. Run the generated script using Bash
165
+ 2. Capture output
166
+ 3. Report PASS/FAIL counts
167
+ 4. Show any failures with details
168
+
169
+ ---
170
+
171
+ ## Generation Prompt Template
172
+
173
+ Use this 4-part prompt when spawning the Sonnet sub-agent:
174
+
175
+ ```markdown
176
+ ## GOAL
177
+
178
+ Generate an executable verification script for `{component_path}` that tests real
179
+ component behavior without mocks. The script must verify observable output and
180
+ report clear PASS/FAIL for each test.
181
+
182
+ ## CONSTRAINTS
183
+
184
+ - Language: {detected_language}
185
+ - Test runner: {runner} (e.g., jest, pytest, bash)
186
+ - Component type: {detected_type}
187
+ - MUST be directly executable: `{runner_command}`
188
+ - MUST use assertion patterns from assertion-patterns skill (real output, not mock calls)
189
+ - MUST follow component pattern from component-patterns skill ({component_type} verification)
190
+ - MUST include edge cases from bug-magnet-data (boundaries, special values, injection patterns)
191
+ - Include setup and teardown if component requires it
192
+ - Report clear PASS/FAIL for each verification
193
+ - Handle cleanup on both success and failure (use trap for bash, afterAll for jest, fixtures for pytest)
194
+ - Exit with code 0 on all pass, code 1 on any failure
195
+ - EXCLUDE destructive patterns marked `safe_for_automation: false` (add as commented-out manual tests)
196
+
197
+ ## CONTEXT
198
+
199
+ ### Component Code
200
+ ```{language}
201
+ {component_content}
202
+ ```
203
+
204
+ ### Component Type
205
+ {detected_type}
206
+
207
+ ### Applicable Assertion Patterns (from assertion-patterns)
208
+ {relevant_assertion_patterns}
209
+
210
+ ### Applicable Component Pattern (from component-patterns)
211
+ {component_pattern_template}
212
+
213
+ ### Edge Cases (from bug-magnet-data) [REQUIRED]
214
+ Include these edge cases in verification tests:
215
+
216
+ **T0 (Always include):**
217
+ {t0_edge_cases_from_bug_magnet_data}
218
+
219
+ **T1 (Include if component handles input):**
220
+ {t1_edge_cases_from_bug_magnet_data}
221
+
222
+ **Destructive patterns (manual-only - add as comments):**
223
+ {destructive_patterns_if_any}
224
+
225
+ ## OUTPUT
226
+
227
+ Write script to: `tmp/verification/{component_name}-verify.{ext}`
228
+
229
+ Extension mapping:
230
+ - Node → `.test.js`
231
+ - Python → `_test.py`
232
+ - Rust → `.rs` (or `.sh` if cargo test not suitable)
233
+ - Generic → `.sh`
234
+
235
+ ### Script Structure
236
+ 1. Setup (create temp files, start services, initialize test DB)
237
+ 2. Execute component under test
238
+ 3. Verify observable output (not mock calls)
239
+ 4. Report PASS/FAIL clearly for each test
240
+ 5. Cleanup (kill processes, remove temp files)
241
+ 6. Exit with appropriate code (0 = all pass, 1 = any fail)
242
+
243
+ ### Report your actions to the log file
244
+ Write to: `logs/bulwark-verify-{YYYYMMDD-HHMMSS}.yaml`
245
+ ```
246
+
247
+ ---
248
+
249
+ ## Output Formats
250
+
251
+ ### Generated Script Location
252
+ ```
253
+ tmp/verification/{component-name}-verify.{ext}
254
+ ```
255
+
256
+ ### README Files (Per-Component)
257
+
258
+ If generating a README for the verification script, name it per-component to avoid overwrites:
259
+ ```
260
+ tmp/verification/{component-name}-README.md
261
+ ```
262
+
263
+ **NOT:** `tmp/verification/README.md` (would be overwritten by subsequent runs)
264
+
265
+ ### Cleanup Behavior
266
+
267
+ Generated scripts **persist in `tmp/verification/`** for inspection and debugging:
268
+ - Scripts are NOT automatically deleted after execution
269
+ - `tmp/` is in `.gitignore` - scripts won't be committed
270
+ - Manual cleanup: `rm -rf tmp/verification/*`
271
+
272
+ This allows:
273
+ - Post-run inspection of generated scripts
274
+ - Iterative refinement of verification approach
275
+ - Debugging when tests fail
276
+
277
+ ### Log Schema
278
+ ```yaml
279
+ metadata:
280
+ skill: bulwark-verify
281
+ timestamp: {ISO-8601}
282
+ model: sonnet
283
+
284
+ generation:
285
+ target: {component_path}
286
+ language: node|python|rust|generic
287
+ component_type: cli|http|file-parser|process|database|api
288
+ script_path: tmp/verification/{name}-verify.{ext}
289
+ patterns_used:
290
+ assertion: [T1_transformation, T2_transformation]
291
+ component: "{component_type} verification"
292
+
293
+ execution: # Only if --execute
294
+ ran: true
295
+ runner: {runner_command}
296
+ exit_code: 0|1
297
+ duration_ms: 1234
298
+ results:
299
+ pass: 3
300
+ fail: 0
301
+ output: |
302
+ === Verification: {component} ===
303
+ Test 1: Basic functionality... PASS
304
+ Test 2: Error handling... PASS
305
+ Test 3: Edge cases... PASS
306
+ === All tests passed ===
307
+
308
+ summary: |
309
+ Generated verification script for {component} ({type}).
310
+ Script: tmp/verification/{name}-verify.{ext}
311
+ Run with: {runner_command}
312
+ [Execution: 3 passed, 0 failed]
313
+ ```
314
+
315
+ ### Diagnostic Schema
316
+ ```yaml
317
+ skill: bulwark-verify
318
+ timestamp: {ISO-8601}
319
+ diagnostics:
320
+ model_requested: sonnet
321
+ model_actual: sonnet
322
+ context_type: main
323
+ language_detected: node|python|rust|generic
324
+ component_type: cli|http|file-parser|process|database|api
325
+ patterns_loaded:
326
+ - assertion-patterns
327
+ - component-patterns
328
+ script_generated: true
329
+ script_path: tmp/verification/{name}-verify.{ext}
330
+ execution_requested: true|false
331
+ execution_result: pass|fail|skipped
332
+ completion_status: success|error
333
+ ```
334
+
335
+ Write diagnostic output to: `logs/diagnostics/bulwark-verify-{YYYYMMDD-HHMMSS}.yaml`
336
+
337
+ ---
338
+
339
+ ## Integration with test-audit
340
+
341
+ When test-audit Step 7 invokes this skill:
342
+
343
+ 1. test-audit provides the test file path and violation info
344
+ 2. This skill generates a verification script as intermediate artifact
345
+ 3. The script validates the rewrite approach before modifying the test
346
+ 4. If verification passes, test-audit proceeds with the rewrite
347
+
348
+ **Flow:**
349
+ ```
350
+ test-audit Step 7
351
+ → Load assertion-patterns
352
+ → Load component-patterns
353
+ → Generate verification script (tmp/verification/)
354
+ → Run verification script
355
+ → If pass: Apply rewrite to test file
356
+ → If fail: Report issue, do not rewrite
357
+ ```
358
+
359
+ ---
360
+
361
+ ## Runner Commands by Language
362
+
363
+ | Language | Default Runner | Command |
364
+ |----------|---------------|---------|
365
+ | Node | node (built-in test) | `node --test tmp/verification/{name}-verify.test.js` |
366
+ | Node (Jest) | jest | `npx jest tmp/verification/{name}-verify.test.js` |
367
+ | Python | pytest | `pytest tmp/verification/{name}_test.py -v` |
368
+ | Rust | cargo | `cargo test --test {name}` |
369
+ | Generic | bash | `bash tmp/verification/{name}-verify.sh` |
370
+
371
+ When generating scripts, prefer the simplest runner:
372
+ - For Node: Use built-in `node --test` if no external deps needed
373
+ - For Python: Use `pytest` for better output
374
+ - For Generic: Always use bash
375
+
376
+ ---
377
+
378
+ ## Error Handling
379
+
380
+ ### Target file not found
381
+ ```
382
+ Error: Target file not found: {path}
383
+ Please provide a valid path to the component you want to verify.
384
+ ```
385
+
386
+ ### Language detection failed
387
+ ```
388
+ Warning: Could not detect project language. Using generic (bash) templates.
389
+ To specify: /bulwark-verify {path} --lang=node
390
+ ```
391
+
392
+ ### Component type detection failed
393
+ ```
394
+ Warning: Could not determine component type from code analysis.
395
+ Please specify: /bulwark-verify {path} --type=cli
396
+
397
+ Available types: cli, http, file-parser, process, database, api
398
+ ```
399
+
400
+ ### Script generation failed
401
+ ```
402
+ Error: Failed to generate verification script.
403
+ Reason: {error_message}
404
+
405
+ Check logs/bulwark-verify-*.yaml for details.
406
+ ```
407
+
408
+ ---
409
+
410
+ ## Examples
411
+
412
+ ### Example 1: CLI Component
413
+ ```
414
+ User: /bulwark-verify src/cli.ts
415
+
416
+ Output:
417
+ ## Verification Script Generated
418
+
419
+ **Component:** src/cli.ts
420
+ **Type:** CLI Command
421
+ **Language:** Node
422
+
423
+ **Script location:** tmp/verification/cli-verify.test.js
424
+
425
+ **To run manually:**
426
+ ```
427
+ node --test tmp/verification/cli-verify.test.js
428
+ ```
429
+ ```
430
+
431
+ ### Example 2: HTTP Server with Execution
432
+ ```
433
+ User: /bulwark-verify src/server.ts --execute
434
+
435
+ Output:
436
+ ## Verification Script Generated
437
+
438
+ **Component:** src/server.ts
439
+ **Type:** HTTP Server
440
+ **Language:** Node
441
+
442
+ **Script location:** tmp/verification/server-verify.test.js
443
+
444
+ **Execution Results:**
445
+ ```
446
+ === HTTP Server Verification: server ===
447
+ Test 1: Health endpoint... PASS (HTTP 200)
448
+ Test 2: API response... PASS (valid JSON)
449
+ Test 3: 404 handling... PASS (HTTP 404)
450
+ === All tests passed ===
451
+ ```
452
+
453
+ **Summary:** 3 passed, 0 failed
454
+ ```
455
+
456
+ ### Example 3: Python Parser
457
+ ```
458
+ User: /bulwark-verify src/parser.py
459
+
460
+ Output:
461
+ ## Verification Script Generated
462
+
463
+ **Component:** src/parser.py
464
+ **Type:** File Parser
465
+ **Language:** Python
466
+
467
+ **Script location:** tmp/verification/parser_test.py
468
+
469
+ **To run manually:**
470
+ ```
471
+ pytest tmp/verification/parser_test.py -v
472
+ ```
473
+ ```
474
+
475
+ ---
476
+
477
+ ## Completion Checklist
478
+
479
+ Before completing bulwark-verify execution, verify ALL items:
480
+
481
+ ### Component Analysis (Step 3)
482
+ - [ ] Target file read successfully
483
+ - [ ] Component type identified (CLI, HTTP Server, File Parser, Database, Process Spawner, External API)
484
+ - [ ] Project language detected (Node, Python, Rust, Generic)
485
+ - [ ] `assertion-patterns` skill content loaded
486
+ - [ ] `component-patterns` skill content loaded
487
+ - [ ] `bug-magnet-data` context file loaded for component type
488
+ - [ ] T0 + T1 edge cases loaded from bug-magnet-data
489
+
490
+ ### Script Generation (Step 4)
491
+ - [ ] Sonnet sub-agent spawned (NOT generated by orchestrator)
492
+ - [ ] Prompt includes component code, assertion patterns, component patterns
493
+ - [ ] Prompt includes edge cases from bug-magnet-data (T0 + T1 values)
494
+ - [ ] Script written to `tmp/verification/{component_name}-verify.{ext}`
495
+
496
+ ### Validation (Step 5)
497
+ - [ ] Syntax validation command executed (node --check, python -m py_compile, bash -n)
498
+ - [ ] Validation passed (or errors fixed and re-validated)
499
+
500
+ ### Edge Case Coverage
501
+ - [ ] T0 boundary values included (empty string, zero, null)
502
+ - [ ] T1 edge cases included if applicable (injection, unicode)
503
+ - [ ] Destructive patterns excluded or marked as manual-only comments
504
+
505
+ ### Output
506
+ - [ ] Summary presented to user with script location and run command
507
+ - [ ] Log written to `logs/bulwark-verify-*.yaml`
508
+ - [ ] Diagnostics written to `logs/diagnostics/bulwark-verify-*.yaml`
509
+ - [ ] If `--execute`: Script executed, PASS/FAIL results reported
510
+
511
+ **Do NOT return to user until all applicable checklist items are verified.**
512
+
513
+ ---
514
+
515
+ ## Related Skills
516
+
517
+ - `assertion-patterns` (P2.1) - T1-T4 transformation patterns
518
+ - `component-patterns` (P2.2) - Component-type verification templates
519
+ - `bug-magnet-data` (P4.2) - Curated edge case test data