@qball-inc/the-bulwark 1.1.0 → 1.2.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 +1 -1
- package/.gitattributes +48 -0
- package/CHANGELOG.md +121 -0
- package/LICENSE +21 -21
- package/README.md +426 -408
- package/agents/bulwark-fix-validator.md +643 -633
- package/agents/bulwark-implementer.md +407 -391
- package/agents/bulwark-issue-analyzer.md +310 -308
- package/agents/bulwark-standards-reviewer.md +305 -221
- package/agents/plan-creation-architect.md +325 -323
- package/agents/plan-creation-eng-lead.md +354 -352
- package/agents/plan-creation-po.md +302 -300
- package/agents/plan-creation-qa-critic.md +336 -334
- package/agents/product-ideation-competitive-analyzer.md +2 -0
- package/agents/product-ideation-idea-validator.md +2 -0
- package/agents/product-ideation-market-researcher.md +2 -0
- package/agents/product-ideation-pattern-documenter.md +2 -0
- package/agents/product-ideation-segment-analyzer.md +2 -0
- package/agents/product-ideation-strategist.md +2 -0
- package/agents/statusline-setup.md +99 -97
- package/hooks/hooks.json +19 -1
- package/package.json +6 -5
- package/scripts/apply-section.sh +243 -0
- package/scripts/hooks/check-template-drift.sh +191 -0
- package/scripts/hooks/cleanup-review-registry.sh +106 -0
- package/scripts/hooks/cleanup-stale.sh +19 -2
- package/scripts/hooks/enforce-quality.sh +2 -2
- package/scripts/hooks/lib/coverage_check.py +513 -0
- package/scripts/hooks/suggest-pipeline-stop.sh +172 -56
- package/scripts/init.sh +56 -0
- package/scripts/install-bun.sh +327 -0
- package/scripts/update.sh +342 -0
- package/skills/anthropic-validator/SKILL.md +497 -607
- package/skills/anthropic-validator/references/agents-checklist.md +144 -131
- package/skills/anthropic-validator/references/agents-validation.md +90 -0
- package/skills/anthropic-validator/references/commands-checklist.md +102 -102
- package/skills/anthropic-validator/references/commands-validation.md +42 -0
- package/skills/anthropic-validator/references/hooks-checklist.md +160 -151
- package/skills/anthropic-validator/references/hooks-validation.md +82 -0
- package/skills/anthropic-validator/references/mcp-checklist.md +136 -136
- package/skills/anthropic-validator/references/mcp-validation.md +39 -0
- package/skills/anthropic-validator/references/plugins-checklist.md +154 -148
- package/skills/anthropic-validator/references/plugins-validation.md +68 -0
- package/skills/anthropic-validator/references/skills-checklist.md +105 -85
- package/skills/anthropic-validator/references/skills-validation.md +79 -0
- package/skills/assertion-patterns/SKILL.md +298 -296
- package/skills/bug-magnet-data/SKILL.md +286 -284
- package/skills/bug-magnet-data/context/cli-args.md +91 -91
- package/skills/bug-magnet-data/context/db-query.md +104 -104
- package/skills/bug-magnet-data/context/file-contents.md +103 -103
- package/skills/bug-magnet-data/context/http-body.md +91 -91
- package/skills/bug-magnet-data/context/process-spawn.md +123 -123
- package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -143
- package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -114
- package/skills/bug-magnet-data/data/collections/objects.yaml +123 -123
- package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -118
- package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -115
- package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -137
- package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -132
- package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -118
- package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -79
- package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -105
- package/skills/bug-magnet-data/data/formats/email.yaml +154 -154
- package/skills/bug-magnet-data/data/formats/json.yaml +187 -187
- package/skills/bug-magnet-data/data/formats/url.yaml +165 -165
- package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -182
- package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -174
- package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -148
- package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -161
- package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -89
- package/skills/bug-magnet-data/data/numbers/special.yaml +69 -69
- package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -109
- package/skills/bug-magnet-data/data/strings/injection.yaml +208 -208
- package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -190
- package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -139
- package/skills/bug-magnet-data/references/external-lists.md +115 -115
- package/skills/bulwark-brainstorm/SKILL.md +566 -563
- package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +95 -60
- package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -78
- package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -66
- package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -79
- package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -62
- package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -59
- package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -66
- package/skills/bulwark-research/SKILL.md +300 -298
- package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -63
- package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -62
- package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -65
- package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -62
- package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -66
- package/skills/bulwark-scaffold/SKILL.md +483 -396
- package/skills/bulwark-statusline/SKILL.md +166 -161
- package/skills/bulwark-statusline/scripts/statusline.sh +1 -1
- package/skills/bulwark-verify/SKILL.md +532 -519
- package/skills/code-review/SKILL.md +488 -428
- package/skills/code-review/examples/anti-patterns/linting.ts +181 -181
- package/skills/code-review/examples/anti-patterns/security.ts +91 -91
- package/skills/code-review/examples/anti-patterns/standards.ts +195 -195
- package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -108
- package/skills/code-review/examples/recommended/linting.ts +195 -195
- package/skills/code-review/examples/recommended/security.ts +154 -154
- package/skills/code-review/examples/recommended/standards.ts +231 -231
- package/skills/code-review/examples/recommended/type-safety.ts +181 -181
- package/skills/code-review/frameworks/angular.md +218 -218
- package/skills/code-review/frameworks/django.md +235 -235
- package/skills/code-review/frameworks/express.md +207 -207
- package/skills/code-review/frameworks/fastapi.md +326 -0
- package/skills/code-review/frameworks/flask.md +298 -298
- package/skills/code-review/frameworks/generic.md +146 -146
- package/skills/code-review/frameworks/react.md +152 -152
- package/skills/code-review/frameworks/vue.md +244 -244
- package/skills/code-review/references/linting-patterns.md +221 -221
- package/skills/code-review/references/security-patterns.md +125 -125
- package/skills/code-review/references/standards-patterns.md +246 -246
- package/skills/code-review/references/type-safety-patterns.md +130 -130
- package/skills/component-patterns/SKILL.md +133 -131
- package/skills/component-patterns/references/pattern-cli-command.md +118 -118
- package/skills/component-patterns/references/pattern-database.md +166 -166
- package/skills/component-patterns/references/pattern-external-api.md +139 -139
- package/skills/component-patterns/references/pattern-file-parser.md +168 -168
- package/skills/component-patterns/references/pattern-http-server.md +162 -162
- package/skills/component-patterns/references/pattern-process-spawner.md +133 -133
- package/skills/continuous-feedback/SKILL.md +329 -327
- package/skills/continuous-feedback/references/collect-instructions.md +81 -81
- package/skills/continuous-feedback/references/specialize-code-review.md +82 -82
- package/skills/continuous-feedback/references/specialize-general.md +98 -98
- package/skills/continuous-feedback/references/specialize-test-audit.md +81 -81
- package/skills/create-skill/SKILL.md +550 -359
- package/skills/create-skill/agents/skill-eval-comparator.md +158 -0
- package/skills/create-skill/agents/skill-eval-grader.md +168 -0
- package/skills/create-skill/references/agent-conventions.md +194 -194
- package/skills/create-skill/references/agent-template.md +195 -195
- package/skills/create-skill/references/content-guidance.md +541 -291
- package/skills/create-skill/references/decision-framework.md +232 -124
- package/skills/create-skill/references/eval-scaffolding.md +468 -0
- package/skills/create-skill/references/eval-shape.md +383 -0
- package/skills/create-skill/references/scripts-conventions.md +142 -0
- package/skills/create-skill/references/template-generator.md +183 -0
- package/skills/create-skill/references/template-inversion.md +269 -0
- package/skills/create-skill/references/template-pipeline.md +248 -217
- package/skills/create-skill/references/template-research.md +234 -210
- package/skills/create-skill/references/template-reviewer.md +231 -0
- package/skills/create-skill/references/template-script-driven.md +185 -172
- package/skills/create-skill/references/template-tool-wrapper.md +199 -0
- package/skills/create-skill/scripts/check-description.ts +238 -0
- package/skills/create-skill/scripts/check-skill-size.ts +201 -0
- package/skills/create-skill/scripts/grade.ts +855 -0
- package/skills/create-skill/scripts/run-loop.ts +297 -0
- package/skills/create-subagent/SKILL.md +355 -353
- package/skills/create-subagent/references/agent-conventions.md +268 -268
- package/skills/create-subagent/references/content-guidance.md +232 -232
- package/skills/create-subagent/references/decision-framework.md +134 -134
- package/skills/create-subagent/references/template-single-agent.md +194 -192
- package/skills/fix-bug/SKILL.md +243 -241
- package/skills/governance-protocol/SKILL.md +118 -116
- package/skills/init/SKILL.md +519 -437
- package/skills/init/references/update-askuser-prompts.md +198 -0
- package/skills/init/references/update-mode.md +305 -0
- package/skills/init/references/update-section-anchor-diff.md +163 -0
- package/skills/issue-debugging/SKILL.md +387 -385
- package/skills/issue-debugging/references/anti-patterns.md +245 -245
- package/skills/issue-debugging/references/debug-report-schema.md +227 -227
- package/skills/mock-detection/SKILL.md +528 -511
- package/skills/mock-detection/references/false-positive-prevention.md +402 -402
- package/skills/mock-detection/references/stub-patterns.md +236 -236
- package/skills/pipeline-templates/SKILL.md +262 -215
- package/skills/pipeline-templates/references/code-change-workflow.md +277 -277
- package/skills/pipeline-templates/references/code-review.md +348 -336
- package/skills/pipeline-templates/references/fix-validation.md +421 -421
- package/skills/pipeline-templates/references/new-feature.md +335 -335
- package/skills/pipeline-templates/references/research-brainstorm.md +161 -161
- package/skills/pipeline-templates/references/research-planning.md +257 -257
- package/skills/pipeline-templates/references/test-audit.md +389 -389
- package/skills/pipeline-templates/references/test-execution-fix.md +238 -238
- package/skills/plan-creation/SKILL.md +531 -497
- package/skills/plan-to-tasks/SKILL.md +151 -0
- package/skills/plan-to-tasks/references/askuserquestion-prompts.md +75 -0
- package/skills/plan-to-tasks/references/transform.md +253 -0
- package/skills/product-ideation/SKILL.md +2 -0
- package/skills/session-handoff/SKILL.md +167 -165
- package/skills/session-handoff/references/examples.md +223 -223
- package/skills/setup-lsp/SKILL.md +314 -312
- package/skills/setup-lsp/references/server-registry.md +85 -85
- package/skills/setup-lsp/references/troubleshooting.md +135 -135
- package/skills/spec-drift-check/SKILL.md +287 -0
- package/skills/spec-drift-check/evals/evals.json +33 -0
- package/skills/spec-drift-check/evals/triggers.json +19 -0
- package/skills/spec-drift-check/examples/clean-spec.md +52 -0
- package/skills/spec-drift-check/examples/expected-output-clean.yaml +96 -0
- package/skills/spec-drift-check/examples/expected-output-high-drift.yaml +78 -0
- package/skills/spec-drift-check/examples/expected-output-low-drift.yaml +67 -0
- package/skills/spec-drift-check/examples/high-drift-spec.md +49 -0
- package/skills/spec-drift-check/examples/low-drift-spec.md +39 -0
- package/skills/spec-drift-check/references/anti-patterns.md +65 -0
- package/skills/spec-drift-check/references/output-template.md +142 -0
- package/skills/spec-drift-check/references/step-1-claim-extraction.md +147 -0
- package/skills/spec-drift-check/references/step-2-verification-methods.md +203 -0
- package/skills/spec-drift-check/references/step-3-categorization.md +105 -0
- package/skills/spec-drift-check/references/step-4-plan-adjustment.md +122 -0
- package/skills/spec-drift-check/references/step-5-log-template.md +220 -0
- package/skills/spec-drift-check/references/step-6-decision-matrix.md +136 -0
- package/skills/subagent-output-templating/SKILL.md +417 -415
- package/skills/subagent-output-templating/references/examples.md +440 -440
- package/skills/subagent-prompting/SKILL.md +366 -364
- package/skills/subagent-prompting/references/examples.md +342 -342
- package/skills/test-audit/SKILL.md +545 -531
- package/skills/test-audit/references/known-limitations.md +41 -41
- package/skills/test-audit/references/priority-classification.md +30 -30
- package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -83
- package/skills/test-audit/references/prompts/synthesis.md +58 -57
- package/skills/test-audit/references/rewrite-instructions.md +46 -46
- package/skills/test-audit/references/schemas/audit-output.yaml +131 -100
- package/skills/test-audit/references/schemas/diagnostic-output.yaml +56 -49
- package/skills/test-audit/references/two-gate-logic.md +43 -0
- package/skills/test-audit/scripts/data-flow-analyzer.ts +508 -508
- package/skills/test-audit/scripts/integration-mock-detector.ts +462 -462
- package/skills/test-audit/scripts/skip-detector.ts +211 -211
- package/skills/test-audit/scripts/verification-counter.ts +295 -295
- package/skills/test-classification/SKILL.md +326 -310
- package/skills/test-fixture-creation/SKILL.md +297 -295
- package/skills/create-skill/references/template-reference-heavy.md +0 -111
- package/skills/create-skill/references/template-simple.md +0 -80
|
@@ -1,415 +1,417 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: subagent-output-templating
|
|
3
|
-
description: Template for structured sub-agent output including YAML log format, task completion reports (WHY/WHAT/TRADE-OFFS/RISKS), and summary constraints. Use when defining how sub-agents should report results.
|
|
4
|
-
user-invocable: false
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- "{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
- `
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- "
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
|
177
|
-
|
|
178
|
-
| `
|
|
179
|
-
| `
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
- "
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
|
213
|
-
|
|
214
|
-
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
[
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
- 1
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
-
|
|
256
|
-
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
|
310
|
-
|
|
311
|
-
| `
|
|
312
|
-
| `
|
|
313
|
-
| `
|
|
314
|
-
| `
|
|
315
|
-
| `
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
[ ]
|
|
377
|
-
[ ]
|
|
378
|
-
[ ]
|
|
379
|
-
[ ]
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
**
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
1
|
+
---
|
|
2
|
+
name: subagent-output-templating
|
|
3
|
+
description: Template for structured sub-agent output including YAML log format, task completion reports (WHY/WHAT/TRADE-OFFS/RISKS), and summary constraints. Use when defining how sub-agents should report results.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
author: "Ashay Kubal @ Qball Inc."
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Sub-Agent Output Templating
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
This skill provides standardized templates for sub-agent OUTPUT formatting. It complements `subagent-prompting` (P0.1) which defines INPUT structure:
|
|
14
|
+
|
|
15
|
+
| Skill | Purpose |
|
|
16
|
+
|-------|---------|
|
|
17
|
+
| `subagent-prompting` | How to prompt sub-agents (GOAL/CONSTRAINTS/CONTEXT/OUTPUT) |
|
|
18
|
+
| `subagent-output-templating` | How sub-agents report results (logs, summaries, diagnostics) |
|
|
19
|
+
|
|
20
|
+
Use this skill when:
|
|
21
|
+
- Defining output requirements for sub-agent invocations
|
|
22
|
+
- Parsing sub-agent results in pipeline stages
|
|
23
|
+
- Ensuring consistent log formats across all agents
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Log File Format
|
|
28
|
+
|
|
29
|
+
### File Location
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
logs/{agent-name}-{YYYYMMDD-HHMMSS}.yaml
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Example: `logs/bulwark-code-auditor-20260111-143022.yaml`
|
|
36
|
+
|
|
37
|
+
### YAML Schema
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
# Required: Metadata block
|
|
41
|
+
metadata:
|
|
42
|
+
agent: {agent-name} # e.g., bulwark-code-auditor
|
|
43
|
+
timestamp: {ISO-8601} # e.g., 2026-01-11T14:30:22Z
|
|
44
|
+
model: {model-used} # sonnet, haiku, or opus
|
|
45
|
+
task_id: {unique-identifier} # For tracking across pipeline stages
|
|
46
|
+
duration_ms: {execution-time} # Execution duration in milliseconds
|
|
47
|
+
|
|
48
|
+
# Required: Goal from the prompt (for traceability)
|
|
49
|
+
goal: "{GOAL from 4-part prompt}"
|
|
50
|
+
|
|
51
|
+
# Required: Completion report
|
|
52
|
+
completion:
|
|
53
|
+
why:
|
|
54
|
+
problem: "{What was broken/missing}"
|
|
55
|
+
root_cause: "{Why it happened}"
|
|
56
|
+
solution: "{What was implemented}"
|
|
57
|
+
|
|
58
|
+
what:
|
|
59
|
+
- file: {path}
|
|
60
|
+
lines: "{range}"
|
|
61
|
+
change: "{description}"
|
|
62
|
+
|
|
63
|
+
trade_offs:
|
|
64
|
+
gained:
|
|
65
|
+
- "{benefit 1}"
|
|
66
|
+
cost:
|
|
67
|
+
- "{drawback 1}"
|
|
68
|
+
|
|
69
|
+
risks:
|
|
70
|
+
- risk: "{description}"
|
|
71
|
+
mitigation: "{how addressed}"
|
|
72
|
+
severity: {low|medium|high|critical}
|
|
73
|
+
|
|
74
|
+
next_steps:
|
|
75
|
+
- "{action item 1}"
|
|
76
|
+
|
|
77
|
+
# Required for code-writing agents (omit for read-only agents):
|
|
78
|
+
# Pipeline suggestions from implementer-quality.sh output
|
|
79
|
+
pipeline_suggestions:
|
|
80
|
+
- pipeline: "{recommended pipeline name}"
|
|
81
|
+
target_files:
|
|
82
|
+
- "{file path}"
|
|
83
|
+
reason: "{why this pipeline is recommended}"
|
|
84
|
+
|
|
85
|
+
# Required: Summary for main thread (100-300 tokens)
|
|
86
|
+
summary: |
|
|
87
|
+
{Concise summary for main thread consumption}
|
|
88
|
+
|
|
89
|
+
# Required: Diagnostic output
|
|
90
|
+
diagnostics:
|
|
91
|
+
model_requested: {model}
|
|
92
|
+
model_actual: {model}
|
|
93
|
+
context_type: {main|forked}
|
|
94
|
+
parent_vars_accessible: {true|false}
|
|
95
|
+
hooks_fired:
|
|
96
|
+
- {hook-name}
|
|
97
|
+
execution_time_ms: {duration}
|
|
98
|
+
completion_status: {success|error|timeout}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Task Completion Report (WHY/WHAT/TRADE-OFFS/RISKS)
|
|
104
|
+
|
|
105
|
+
Every sub-agent MUST conclude with this structured report. This enables explicit decision documentation rather than implicit code changes.
|
|
106
|
+
|
|
107
|
+
### WHY Section
|
|
108
|
+
|
|
109
|
+
Document the problem and solution rationale.
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
why:
|
|
113
|
+
problem: "Authentication bypass vulnerability in refresh token path"
|
|
114
|
+
root_cause: "Token validation skips expiry check on refresh"
|
|
115
|
+
solution: "Added isExpired() check to refresh token handler"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Guidelines**:
|
|
119
|
+
- `problem`: What was broken, missing, or needs improvement
|
|
120
|
+
- `root_cause`: The underlying reason (not just symptoms)
|
|
121
|
+
- `solution`: What was done to address it
|
|
122
|
+
|
|
123
|
+
### WHAT Section
|
|
124
|
+
|
|
125
|
+
List all changes made with file locations.
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
what:
|
|
129
|
+
- file: src/auth/token.ts
|
|
130
|
+
lines: "45-52"
|
|
131
|
+
change: "Added isExpired() check before token refresh"
|
|
132
|
+
- file: src/auth/token.test.ts
|
|
133
|
+
lines: "120-145"
|
|
134
|
+
change: "Added test for expired refresh token rejection"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Guidelines**:
|
|
138
|
+
- One entry per file modified
|
|
139
|
+
- Include line ranges for precise location
|
|
140
|
+
- Describe the change, not the code
|
|
141
|
+
|
|
142
|
+
### TRADE-OFFS Section
|
|
143
|
+
|
|
144
|
+
Acknowledge explicit compromises made.
|
|
145
|
+
|
|
146
|
+
```yaml
|
|
147
|
+
trade_offs:
|
|
148
|
+
gained:
|
|
149
|
+
- "Security: Expired tokens now properly rejected"
|
|
150
|
+
- "Compliance: Meets OWASP session management requirements"
|
|
151
|
+
cost:
|
|
152
|
+
- "Performance: Additional DB lookup on refresh (negligible)"
|
|
153
|
+
- "Complexity: New error handling path for expired tokens"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Guidelines**:
|
|
157
|
+
- Be honest about costs
|
|
158
|
+
- Quantify impact where possible
|
|
159
|
+
- Include both technical and business trade-offs
|
|
160
|
+
|
|
161
|
+
### RISKS Section
|
|
162
|
+
|
|
163
|
+
Document forward-looking concerns.
|
|
164
|
+
|
|
165
|
+
```yaml
|
|
166
|
+
risks:
|
|
167
|
+
- risk: "Existing sessions with expired refresh tokens will fail"
|
|
168
|
+
mitigation: "Grace period of 24h for migration"
|
|
169
|
+
severity: medium
|
|
170
|
+
- risk: "Grace period could be exploited"
|
|
171
|
+
mitigation: "Monitor for unusual refresh patterns"
|
|
172
|
+
severity: low
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Severity Levels**:
|
|
176
|
+
| Level | Definition |
|
|
177
|
+
|-------|------------|
|
|
178
|
+
| `low` | Unlikely or minor impact |
|
|
179
|
+
| `medium` | Possible impact, manageable |
|
|
180
|
+
| `high` | Likely impact, needs attention |
|
|
181
|
+
| `critical` | Must be addressed before deployment |
|
|
182
|
+
|
|
183
|
+
### NEXT STEPS Section
|
|
184
|
+
|
|
185
|
+
List follow-up actions for pipeline or human.
|
|
186
|
+
|
|
187
|
+
```yaml
|
|
188
|
+
next_steps:
|
|
189
|
+
- "Monitor refresh failure rate for 24h"
|
|
190
|
+
- "Remove grace period after migration window"
|
|
191
|
+
- "Update documentation for new error codes"
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Guidelines**:
|
|
195
|
+
- Actionable items only
|
|
196
|
+
- Include owner if known (e.g., "DevOps: Update monitoring dashboard")
|
|
197
|
+
- Order by priority
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Summary Format for Main Thread
|
|
202
|
+
|
|
203
|
+
### Purpose
|
|
204
|
+
|
|
205
|
+
The summary is returned to the main thread for pipeline decision-making. It should enable the orchestrator to:
|
|
206
|
+
1. Understand key findings without reading full log
|
|
207
|
+
2. Decide next pipeline stage
|
|
208
|
+
3. Report status to user
|
|
209
|
+
|
|
210
|
+
### Token Budget
|
|
211
|
+
|
|
212
|
+
| Complexity | Target Tokens | Use Case |
|
|
213
|
+
|------------|---------------|----------|
|
|
214
|
+
| Simple | 100-150 | Single finding, clear action |
|
|
215
|
+
| Moderate | 150-250 | Multiple findings, some nuance |
|
|
216
|
+
| Complex | 250-300 | Many findings, trade-off decisions |
|
|
217
|
+
|
|
218
|
+
### Summary Template
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
Found [N] [severity] issue(s): [brief description].
|
|
222
|
+
[Action taken / recommendation].
|
|
223
|
+
[Key risk or follow-up if any].
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Examples
|
|
227
|
+
|
|
228
|
+
**Simple (120 tokens)**:
|
|
229
|
+
```
|
|
230
|
+
Found 1 critical vulnerability: refresh tokens not validated for expiry.
|
|
231
|
+
Fixed by adding isExpired() check in token.ts:45-52. Added regression test.
|
|
232
|
+
Risk: existing sessions may fail during 24h migration window.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Moderate (200 tokens)**:
|
|
236
|
+
```
|
|
237
|
+
Found 3 issues in authentication module:
|
|
238
|
+
- 1 critical: token expiry bypass (fixed)
|
|
239
|
+
- 1 medium: weak password hashing (fixed, migration needed)
|
|
240
|
+
- 1 low: verbose error messages (fixed)
|
|
241
|
+
|
|
242
|
+
All issues addressed with tests added. Migration script created for password re-hashing.
|
|
243
|
+
Next: run migration in staging, monitor for 48h before production.
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### What to Include
|
|
247
|
+
|
|
248
|
+
- Finding count and severity
|
|
249
|
+
- Actions taken
|
|
250
|
+
- Key risks or blockers
|
|
251
|
+
- Recommended next steps
|
|
252
|
+
|
|
253
|
+
### What to Exclude
|
|
254
|
+
|
|
255
|
+
- Full reasoning or analysis
|
|
256
|
+
- Code snippets
|
|
257
|
+
- Verbose explanations
|
|
258
|
+
- Duplicate information from log
|
|
259
|
+
|
|
260
|
+
### Pipeline Suggestions in Summary (Code-Writing Agents)
|
|
261
|
+
|
|
262
|
+
Code-writing agents (e.g., bulwark-implementer) that invoke `implementer-quality.sh` and receive pipeline suggestions MUST include them in the summary with MANDATORY language. This ensures the orchestrator sees and acts on them per SA6.
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
MANDATORY FOLLOW-UP (SA6): Run the following pipeline(s):
|
|
266
|
+
- {pipeline} on {target_files} ({reason})
|
|
267
|
+
Orchestrator MUST evaluate each suggestion and either execute or document deferral per SA6.
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Read-only agents (reviewers, auditors) omit this section.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Diagnostic Output
|
|
275
|
+
|
|
276
|
+
### Purpose
|
|
277
|
+
|
|
278
|
+
Enable automated behavioral testing without mocking. Diagnostics verify:
|
|
279
|
+
- Correct model was used
|
|
280
|
+
- Context isolation worked (for `context: fork` agents)
|
|
281
|
+
- Hooks fired as expected
|
|
282
|
+
- Execution completed successfully
|
|
283
|
+
|
|
284
|
+
### Location
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
logs/diagnostics/{agent-name}-{YYYYMMDD-HHMMSS}.yaml
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Format
|
|
291
|
+
|
|
292
|
+
```yaml
|
|
293
|
+
skill: subagent-output-templating
|
|
294
|
+
timestamp: 2026-01-11T14:30:22Z
|
|
295
|
+
diagnostics:
|
|
296
|
+
model_requested: sonnet
|
|
297
|
+
model_actual: sonnet
|
|
298
|
+
context_type: forked # main or forked
|
|
299
|
+
parent_vars_accessible: false # Should be false for forked
|
|
300
|
+
hooks_fired:
|
|
301
|
+
- Stop
|
|
302
|
+
execution_time_ms: 4520
|
|
303
|
+
completion_status: success # success, error, timeout
|
|
304
|
+
notes: "Task completed successfully"
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Diagnostic Fields
|
|
308
|
+
|
|
309
|
+
| Field | Purpose | Values |
|
|
310
|
+
|-------|---------|--------|
|
|
311
|
+
| `model_requested` | Model specified in prompt | haiku, sonnet, opus |
|
|
312
|
+
| `model_actual` | Model that actually ran | haiku, sonnet, opus |
|
|
313
|
+
| `context_type` | Execution context | main, forked |
|
|
314
|
+
| `parent_vars_accessible` | Context isolation test | true, false |
|
|
315
|
+
| `hooks_fired` | Lifecycle hooks that executed | Array of hook names |
|
|
316
|
+
| `execution_time_ms` | Duration | Integer |
|
|
317
|
+
| `completion_status` | Final status | success, error, timeout |
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Quick Reference
|
|
322
|
+
|
|
323
|
+
### Minimal Log Template
|
|
324
|
+
|
|
325
|
+
```yaml
|
|
326
|
+
metadata:
|
|
327
|
+
agent: {name}
|
|
328
|
+
timestamp: {ISO-8601}
|
|
329
|
+
model: sonnet
|
|
330
|
+
task_id: "{id}"
|
|
331
|
+
duration_ms: 0
|
|
332
|
+
|
|
333
|
+
goal: "{goal}"
|
|
334
|
+
|
|
335
|
+
completion:
|
|
336
|
+
why:
|
|
337
|
+
problem: "{problem}"
|
|
338
|
+
root_cause: "{cause}"
|
|
339
|
+
solution: "{solution}"
|
|
340
|
+
what:
|
|
341
|
+
- file: {path}
|
|
342
|
+
lines: "{range}"
|
|
343
|
+
change: "{description}"
|
|
344
|
+
trade_offs:
|
|
345
|
+
gained: ["{benefit}"]
|
|
346
|
+
cost: ["{cost}"]
|
|
347
|
+
risks:
|
|
348
|
+
- risk: "{risk}"
|
|
349
|
+
mitigation: "{mitigation}"
|
|
350
|
+
severity: medium
|
|
351
|
+
next_steps:
|
|
352
|
+
- "{action}"
|
|
353
|
+
|
|
354
|
+
# Include for code-writing agents only (omit for read-only agents):
|
|
355
|
+
pipeline_suggestions:
|
|
356
|
+
- pipeline: "{pipeline name}"
|
|
357
|
+
target_files: ["{path}"]
|
|
358
|
+
reason: "{reason}"
|
|
359
|
+
|
|
360
|
+
summary: |
|
|
361
|
+
{100-300 token summary}
|
|
362
|
+
|
|
363
|
+
diagnostics:
|
|
364
|
+
model_requested: sonnet
|
|
365
|
+
model_actual: sonnet
|
|
366
|
+
context_type: forked
|
|
367
|
+
parent_vars_accessible: false
|
|
368
|
+
hooks_fired: []
|
|
369
|
+
execution_time_ms: 0
|
|
370
|
+
completion_status: success
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Summary Checklist
|
|
374
|
+
|
|
375
|
+
```
|
|
376
|
+
[ ] Count and severity of findings stated
|
|
377
|
+
[ ] Actions taken described
|
|
378
|
+
[ ] Key risks mentioned
|
|
379
|
+
[ ] Next steps listed
|
|
380
|
+
[ ] Under 300 tokens
|
|
381
|
+
[ ] Pipeline suggestions with MANDATORY language (code-writing agents only)
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Output Location Checklist
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
[ ] Main log: logs/{agent}-{YYYYMMDD-HHMMSS}.yaml
|
|
388
|
+
[ ] Diagnostics: logs/diagnostics/{agent}-{YYYYMMDD-HHMMSS}.yaml
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## Timestamp Formats
|
|
394
|
+
|
|
395
|
+
| Context | Placeholder | Format | Example |
|
|
396
|
+
|---------|-------------|--------|---------|
|
|
397
|
+
| **File paths** | `{YYYYMMDD-HHMMSS}` | Compact, filesystem-safe | `20260119-143022` |
|
|
398
|
+
| **YAML fields** | `{ISO-8601}` | Standard ISO format | `2026-01-19T14:30:22Z` |
|
|
399
|
+
|
|
400
|
+
**Why two formats?**
|
|
401
|
+
- File names: No colons (filesystem-safe on Windows), compact, lexically sortable
|
|
402
|
+
- YAML fields: Standard ISO-8601 for parsing and interoperability
|
|
403
|
+
|
|
404
|
+
**Important**: Always use `{YYYYMMDD-HHMMSS}` in file paths, never `{timestamp}` or `{ts}`.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Related Skills
|
|
409
|
+
|
|
410
|
+
- **subagent-prompting** (P0.1): Defines INPUT structure (GOAL/CONSTRAINTS/CONTEXT/OUTPUT)
|
|
411
|
+
- **pipeline-templates** (P0.3): Pre-defined workflows that consume this output format
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## References
|
|
416
|
+
|
|
417
|
+
For extended examples and edge cases, see `references/examples.md`.
|