heimdall-agent 1.0.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.
Files changed (250) hide show
  1. package/README.md +57 -26
  2. package/README.pt-BR.md +443 -0
  3. package/agents/cloud-engineer.md +77 -0
  4. package/agents/code-sentinel.md +71 -34
  5. package/agents/database-architect.md +31 -25
  6. package/agents/frontend-designer.md +30 -28
  7. package/agents/mobile-designer.md +25 -24
  8. package/agents/modernizer.md +68 -0
  9. package/agents/orchestrator.md +107 -93
  10. package/agents/reviewer.md +102 -71
  11. package/agents/security-auditor.md +27 -27
  12. package/agents/tester.md +97 -90
  13. package/commands/grill-me.md +20 -4
  14. package/commands/orchestrate.md +16 -0
  15. package/commands/orchestrator.md +16 -0
  16. package/commands/plan.md +17 -1
  17. package/config/agents.json +31 -3
  18. package/config/mcp.json +72 -0
  19. package/config/models.json +26 -16
  20. package/config/profiles.json +2 -4
  21. package/config/skills.json +762 -573
  22. package/docs/SKILLS.md +393 -275
  23. package/docs/designs/old/2026-10-31 plan-lifecycle-backlog-and-clean-code-skill.md +87 -0
  24. package/docs/designs/old/2026-11-02 skill-upstream-audit-and-update.md +105 -0
  25. package/docs/designs/old/2026-11-05 communication-doctrine-bluf-ste.md +94 -0
  26. package/docs/designs/old/2026-11-06-cloud-engineer-and-resilience-synthesis.md +67 -0
  27. package/docs/designs/old/2026-11-06-herdr-native-agent-orchestration.md +45 -0
  28. package/docs/runs/skill-audit/2026-11-12-compare-report.json +1028 -0
  29. package/docs/runs/skill-audit/2026-11-12-upstream-audit.json +275 -0
  30. package/docs/runs/skill-audit/add_progressive_disclosure.cjs +30 -0
  31. package/docs/runs/skill-audit/check_heimdall_skills.ps1 +9 -0
  32. package/docs/runs/skill-audit/compare_classics.ps1 +26 -0
  33. package/docs/runs/skill-audit/compare_taste.ps1 +12 -0
  34. package/docs/runs/skill-audit/customization-report.json +380 -0
  35. package/docs/runs/skill-audit/diff_pending_skills.cjs +94 -0
  36. package/docs/runs/skill-audit/fetch_and_apply_skill.cjs +58 -0
  37. package/docs/runs/skill-audit/fetch_and_apply_taste_v2.cjs +65 -0
  38. package/docs/runs/skill-audit/inspect_pending_skills.cjs +71 -0
  39. package/docs/runs/skill-audit/inventory.json +308 -0
  40. package/docs/runs/skill-audit/list_local_taste.ps1 +1 -0
  41. package/docs/runs/skill-audit/phase5-update-plan.json +595 -0
  42. package/docs/runs/skill-audit/phase5-update-plan.md +138 -0
  43. package/docs/runs/skill-audit/probe.ps1 +16 -0
  44. package/docs/runs/skill-audit/probe_classics_branches.ps1 +3 -0
  45. package/docs/runs/skill-audit/probe_commits.ps1 +15 -0
  46. package/docs/runs/skill-audit/probe_repos.ps1 +17 -0
  47. package/docs/runs/skill-audit/probe_sentry_sec.ps1 +3 -0
  48. package/docs/runs/skill-audit/probe_sentry_sweep.ps1 +5 -0
  49. package/docs/runs/skill-audit/probe_snyk.ps1 +3 -0
  50. package/docs/runs/skill-audit/probe_snyk_recipes.ps1 +5 -0
  51. package/docs/runs/skill-audit/probe_taste_branches.ps1 +8 -0
  52. package/docs/runs/skill-audit/probe_taste_v19.ps1 +3 -0
  53. package/docs/runs/skill-audit/probe_user_repos.ps1 +19 -0
  54. package/docs/runs/skill-audit/prune_taste_skills.cjs +22 -0
  55. package/docs/runs/skill-audit/run_phase1_2.cjs +142 -0
  56. package/docs/runs/skill-audit/run_phase6_verification.cjs +107 -0
  57. package/docs/runs/skill-audit/show_16_details.ps1 +25 -0
  58. package/docs/runs/skill-audit/show_20_skills.ps1 +28 -0
  59. package/docs/runs/skill-audit/show_classics_diff.cjs +37 -0
  60. package/docs/runs/skill-audit/sync_agent_markdowns.cjs +30 -0
  61. package/docs/runs/skill-audit/taste-skill-upstream.md +542 -0
  62. package/docs/runs/skill-audit/update-manifest.md +88 -0
  63. package/docs/runs/skill-audit/update_config_skills.cjs +52 -0
  64. package/docs/runs/skill-audit/update_registry_phase7.cjs +83 -0
  65. package/docs/runs/skill-audit/upstream-status.json +563 -0
  66. package/docs/runs/skill-audit/verification-results.json +252 -0
  67. package/doctrine/AGENTS.md +42 -77
  68. package/hooks/git/pre-commit +11 -0
  69. package/hooks/heimdall-hook.cjs +81 -2
  70. package/hooks/herdr-agent-state.ps1 +55 -0
  71. package/hooks/hooks.json +0 -11
  72. package/lib/catalog-sync.cjs +167 -0
  73. package/lib/hermes-context.cjs +57 -0
  74. package/lib/model-context.cjs +123 -0
  75. package/lib/path-discovery.cjs +94 -0
  76. package/package.json +7 -3
  77. package/playbooks/01-interactive-grilling-gate.md +23 -6
  78. package/playbooks/02-fast-code-deep-verification.md +3 -2
  79. package/playbooks/03-adversarial-code-review.md +15 -7
  80. package/playbooks/05-canonical-plan-template.md +35 -19
  81. package/playbooks/06-model-registry-matrix.md +24 -13
  82. package/playbooks/07-legacy-code-modernization.md +74 -0
  83. package/playbooks/08-backlog-and-change-request-flow.md +122 -0
  84. package/setup.mjs +592 -172
  85. package/skills/antislop/SKILL.md +76 -56
  86. package/skills/antislop/VERSION +1 -0
  87. package/skills/antislop-copywriting/SKILL.md +407 -372
  88. package/skills/antislop-human/LICENSE-web-quality-skills +21 -0
  89. package/skills/antislop-human/SKILL.md +204 -147
  90. package/skills/antislop-human/contrast-check.py +168 -165
  91. package/skills/antislop-human/contrast-mcp.py +6 -3
  92. package/skills/antislop-human/references/A11Y-PATTERNS.md +249 -0
  93. package/skills/antislop-human/references/WCAG.md +127 -0
  94. package/skills/antislop-ui/LICENSE-web-quality-skills +21 -0
  95. package/skills/antislop-ui/SKILL.md +344 -304
  96. package/skills/antislop-ui/references/CORE-WEB-VITALS.md +181 -0
  97. package/skills/antislop-ui/references/WEB-BASELINE.md +28 -0
  98. package/skills/brainstorming/SKILL.md +296 -265
  99. package/skills/brainstorming/builder-check-prompt.md +23 -0
  100. package/skills/brainstorming/scripts/frame-template.html +213 -213
  101. package/skills/brainstorming/scripts/server.cjs +723 -723
  102. package/skills/brandkit/SKILL.md +798 -798
  103. package/skills/brutalist-skill/SKILL.md +93 -92
  104. package/skills/caveman/README.md +68 -0
  105. package/skills/caveman/SKILL.md +73 -38
  106. package/skills/claude-collaborator/SKILL.md +24 -44
  107. package/skills/clean-code/SKILL.md +152 -0
  108. package/skills/cloudflare-security-audit/AI-AND-LLM.md +83 -83
  109. package/skills/cloudflare-security-audit/ATTACK-CLASSES.md +130 -130
  110. package/skills/cloudflare-security-audit/CLIENT-SIDE.md +83 -83
  111. package/skills/cloudflare-security-audit/CLOUD-AND-DEPLOYMENT.md +86 -86
  112. package/skills/cloudflare-security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -84
  113. package/skills/cloudflare-security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -89
  114. package/skills/cloudflare-security-audit/HUNTING.md +251 -251
  115. package/skills/cloudflare-security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -101
  116. package/skills/cloudflare-security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -81
  117. package/skills/cloudflare-security-audit/RECONNAISSANCE.md +156 -156
  118. package/skills/cloudflare-security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -78
  119. package/skills/cloudflare-security-audit/SKILL.md +192 -192
  120. package/skills/cloudflare-security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -73
  121. package/skills/cloudflare-security-audit/VALIDATION-AND-REPORTING.md +186 -186
  122. package/skills/cloudflare-security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -105
  123. package/skills/cloudflare-security-audit/report-schema.json +461 -461
  124. package/skills/cloudflare-security-audit/validate-coverage-ledger.cjs +872 -872
  125. package/skills/cloudflare-security-audit/validate-coverage-ledger.test.cjs +740 -740
  126. package/skills/cloudflare-security-audit/validate-findings.cjs +773 -773
  127. package/skills/cloudflare-security-audit/validate-findings.test.cjs +652 -652
  128. package/skills/codebase-design/DEEPENING.md +37 -0
  129. package/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  130. package/skills/codebase-design/SKILL.md +114 -0
  131. package/skills/codex-collaborator/SKILL.md +24 -45
  132. package/skills/communication-doctrine/SKILL.md +89 -0
  133. package/skills/diagnosing-superpowers/SKILL.md +1 -1
  134. package/skills/diagnosing-superpowers/references/github-issues.md +3 -3
  135. package/skills/diagnosing-superpowers/templates/issue.md +23 -4
  136. package/skills/domain-modeling/ADR-FORMAT.md +47 -0
  137. package/skills/domain-modeling/GLOSSARY-FORMAT.md +60 -0
  138. package/skills/domain-modeling/SKILL.md +74 -0
  139. package/skills/executing-plans/SKILL.md +6 -56
  140. package/skills/executing-plans/scripts/task-done +52 -52
  141. package/skills/executing-plans/scripts/task-start +28 -28
  142. package/skills/gemini-collaborator/SKILL.md +24 -56
  143. package/skills/grill-me/SKILL.md +65 -0
  144. package/skills/handoff/SKILL.md +64 -0
  145. package/skills/herdr/SKILL.md +243 -0
  146. package/skills/image-to-code-skill/SKILL.md +1228 -1228
  147. package/skills/imagegen-frontend-mobile/SKILL.md +1465 -1465
  148. package/skills/imagegen-frontend-web/SKILL.md +987 -987
  149. package/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  150. package/skills/improve-codebase-architecture/SKILL.md +71 -0
  151. package/skills/karpathy-guidelines/SKILL.md +67 -67
  152. package/skills/mcp-engineering/SKILL.md +74 -0
  153. package/skills/minimalist-skill/SKILL.md +87 -85
  154. package/skills/output-skill/SKILL.md +49 -49
  155. package/skills/owasp-security/reference/config-and-supply-chain.md +346 -344
  156. package/skills/owasp-security/reference/languages.md +378 -372
  157. package/skills/owasp-security/reference/owasp-report.md +1144 -1140
  158. package/skills/owasp-security/reference/review-checklist.md +134 -132
  159. package/skills/ponytail/SKILL.md +36 -52
  160. package/skills/postgres-best-practices/SKILL.md +30 -52
  161. package/skills/postgres-best-practices/references/backup-restore.md +372 -0
  162. package/skills/postgres-best-practices/references/bulk-loading.md +315 -0
  163. package/skills/postgres-best-practices/references/connection-pooling.md +310 -0
  164. package/skills/postgres-best-practices/references/hot-standby.md +221 -0
  165. package/skills/postgres-best-practices/references/indexing.md +318 -0
  166. package/skills/postgres-best-practices/references/logical-replication.md +610 -0
  167. package/skills/postgres-best-practices/references/major-version-upgrades.md +334 -0
  168. package/skills/postgres-best-practices/references/performance-diagnostics.md +553 -0
  169. package/skills/postgres-best-practices/references/query-optimization.md +294 -0
  170. package/skills/postgres-best-practices/references/query-patterns.md +566 -0
  171. package/skills/postgres-best-practices/references/schema-design.md +362 -0
  172. package/skills/postgres-best-practices/references/security-roles.md +489 -0
  173. package/skills/postgres-best-practices/references/transaction-isolation.md +344 -0
  174. package/skills/progressive-disclosure/SKILL.md +68 -0
  175. package/skills/pstack-discipline/SKILL.md +40 -0
  176. package/skills/receiving-code-review/SKILL.md +2 -23
  177. package/skills/requesting-code-review/SKILL.md +7 -36
  178. package/skills/soft-skill/SKILL.md +99 -98
  179. package/skills/stitch-skill/DESIGN.md +121 -121
  180. package/skills/stitch-skill/SKILL.md +185 -184
  181. package/skills/strix-security/SKILL.md +54 -53
  182. package/skills/subagent-driven-development/SKILL.md +35 -264
  183. package/skills/subagent-driven-development/references/batching.md +11 -0
  184. package/skills/subagent-driven-development/references/cannot-verify.md +10 -0
  185. package/skills/subagent-driven-development/references/final-review.md +47 -0
  186. package/skills/subagent-driven-development/references/fix-loop.md +77 -0
  187. package/skills/subagent-driven-development/references/handling-reports.md +15 -0
  188. package/skills/subagent-driven-development/references/preflight.md +26 -0
  189. package/skills/subagent-driven-development/references/resuming.md +12 -0
  190. package/skills/subagent-driven-development/scripts/review-package +53 -53
  191. package/skills/subagent-driven-development/scripts/sdd-workspace +87 -82
  192. package/skills/subagent-driven-development/scripts/task-brief +43 -43
  193. package/skills/systematic-debugging/SKILL.md +283 -306
  194. package/skills/taste-skill/SKILL.md +542 -1206
  195. package/skills/taste-skill/references/app-screens.md +1199 -0
  196. package/skills/taste-skill/references/colour.md +141 -0
  197. package/skills/taste-skill/references/copy.md +177 -0
  198. package/skills/taste-skill/references/critique.md +182 -0
  199. package/skills/taste-skill/references/imagery.md +791 -0
  200. package/skills/taste-skill/references/layout.md +292 -0
  201. package/skills/taste-skill/references/motion.md +980 -0
  202. package/skills/taste-skill/references/research.md +356 -0
  203. package/skills/taste-skill/references/scenes.md +174 -0
  204. package/skills/taste-skill/references/tells.md +115 -0
  205. package/skills/taste-skill/references/type.md +170 -0
  206. package/skills/test-driven-development/SKILL.md +330 -337
  207. package/skills/thermo/SKILL.md +67 -0
  208. package/skills/threat-modeling/SKILL.md +55 -0
  209. package/skills/to-spec/SKILL.md +75 -0
  210. package/skills/to-tickets/SKILL.md +105 -0
  211. package/skills/trailofbits-audit-context/SKILL.md +72 -72
  212. package/skills/trailofbits-insecure-defaults/commands/audit.md +35 -0
  213. package/skills/trailofbits-insecure-defaults/references/debug-features.json +13 -13
  214. package/skills/trailofbits-insecure-defaults/references/debug-features.md +75 -75
  215. package/skills/trailofbits-insecure-defaults/references/default-credentials.json +12 -12
  216. package/skills/trailofbits-insecure-defaults/references/default-credentials.md +76 -76
  217. package/skills/trailofbits-insecure-defaults/references/fail-open-security.json +11 -11
  218. package/skills/trailofbits-insecure-defaults/references/fail-open-security.md +70 -70
  219. package/skills/trailofbits-insecure-defaults/references/fallback-secrets.json +11 -11
  220. package/skills/trailofbits-insecure-defaults/references/fallback-secrets.md +70 -70
  221. package/skills/trailofbits-insecure-defaults/references/permissive-access.json +13 -13
  222. package/skills/trailofbits-insecure-defaults/references/permissive-access.md +62 -62
  223. package/skills/trailofbits-insecure-defaults/references/weak-crypto.json +13 -13
  224. package/skills/trailofbits-insecure-defaults/references/weak-crypto.md +71 -71
  225. package/skills/trailofbits-triage-brocards/SKILL.md +208 -208
  226. package/skills/verification-before-completion/SKILL.md +0 -14
  227. package/skills/wayfinder/SKILL.md +128 -0
  228. package/skills/writing-plans/SKILL.md +11 -15
  229. package/skills/writing-skills/SKILL.md +21 -303
  230. package/skills/writing-skills/references/CLAUDE_MD_TESTING.md +189 -0
  231. package/skills/writing-skills/references/anthropic-best-practices.md +1150 -0
  232. package/skills/writing-skills/references/bulletproofing.md +80 -0
  233. package/skills/writing-skills/references/discovery.md +201 -0
  234. package/skills/writing-skills/references/flowcharts.md +37 -0
  235. package/skills/writing-skills/references/graphviz-conventions.dot +172 -0
  236. package/skills/writing-skills/references/persuasion-principles.md +187 -0
  237. package/skills/writing-skills/references/testing-skills-with-subagents.md +384 -0
  238. package/tools/{claude-bridge.ps1 → archive/claude-bridge.ps1} +10 -7
  239. package/tools/{codex-bridge.ps1 → archive/codex-bridge.ps1} +1 -1
  240. package/tools/{gemini-bridge.ps1 → archive/gemini-bridge.ps1} +12 -19
  241. package/skills/gpt-tasteskill/SKILL.md +0 -74
  242. package/skills/taste-skill-v1/SKILL.md +0 -226
  243. /package/tools/{claude-bridge.cmd → archive/claude-bridge.cmd} +0 -0
  244. /package/tools/{claude-bridge.sh → archive/claude-bridge.sh} +0 -0
  245. /package/tools/{codex-bridge.cmd → archive/codex-bridge.cmd} +0 -0
  246. /package/tools/{codex-bridge.sh → archive/codex-bridge.sh} +0 -0
  247. /package/tools/{codexcli-bridge.cmd → archive/codexcli-bridge.cmd} +0 -0
  248. /package/tools/{codexcli-bridge.ps1 → archive/codexcli-bridge.ps1} +0 -0
  249. /package/tools/{gemini-bridge.cmd → archive/gemini-bridge.cmd} +0 -0
  250. /package/tools/{gemini-bridge.sh → archive/gemini-bridge.sh} +0 -0
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: thermo
3
+ description: >
4
+ Run an unusually strict architectural and maintainability review focusing on "Code Judo"
5
+ structural simplification, spaghetti conditional elimination, and modularity health.
6
+ Use when the user asks for a thermo review, thermonuclear audit, or deep maintainability critique.
7
+ ---
8
+
9
+ # Thermo Architectural & Maintainability Review
10
+
11
+ Use this skill for an uncompromising, senior-staff level audit focused on structural simplification, abstraction quality, and long-term codebase health.
12
+
13
+ Above all, this skill pushes the reviewer to be **ambitious** about code structure. Do not merely identify local cleanup opportunities. Actively search for **"Code Judo"** moves: restructurings that preserve behavior while making the implementation dramatically simpler, smaller, more direct, and more elegant.
14
+
15
+ ---
16
+
17
+ ## Core Audit Directives
18
+
19
+ ### 1. "Code Judo" Structural Simplification
20
+ * Do not settle for "this could be a bit cleaner."
21
+ * Look for opportunities to reframe the design so that whole branches, redundant helpers, temporary modes, condition chains, or intermediate layers disappear entirely.
22
+ * Prefer solutions that make the resulting code feel inevitable in hindsight.
23
+
24
+ ### 2. Hunt Down Spaghetti Growth
25
+ * Flag branching logic that scatters special cases across files.
26
+ * Detect ad-hoc state mutations and flag variables that multiply execution paths.
27
+ * Identify thin wrappers and indirection layers that add cognitive load without providing real safety, encapsulation, or clarity.
28
+
29
+ ### 3. Modularity & File Health (Flexible Guideline)
30
+ * Flag files where uncontrolled growth has led to mixed responsibilities or "god-object" scope.
31
+ * Prompt for structural decomposition when a file becomes difficult to reason about as a single unit (typically 500–1,000+ lines depending on the stack).
32
+ * **Explicit Exemptions**:
33
+ * Database migrations
34
+ * Test suites and integration fixtures
35
+ * Generated files (`openapi.ts`, schema outputs, protobuf)
36
+ * Standalone build/bootstrap utility scripts
37
+
38
+ ### 4. Type-Boundary & Contract Integrity
39
+ * Scrutinize type-boundary erosion: loose casts (`as unknown as T`), non-null assertions (`!`), or weakened interfaces introduced just to appease the compiler without accurately modeling the domain.
40
+ * Ensure domain invariants are enforced at system boundaries, not patched with defensive guards throughout internal functions.
41
+
42
+ ### 5. Passing Tests Do Not Excuse Architectural Decay
43
+ * Functional correctness is a baseline requirement, not an excuse for structural debt.
44
+ * If a PR or diff adds technical debt, bloated glue code, or brittle couplings, reject it even if the test suite passes 100%.
45
+
46
+ ---
47
+
48
+ ## Preferred Remedies
49
+
50
+ When identifying code-quality flaws, recommend root structural fixes:
51
+ * **Delete** an entire layer of indirection rather than polishing it.
52
+ * **Reframe the state model** so that conditional branching vanishes instead of being centralized.
53
+ * **Change ownership boundaries** so the feature becomes a natural extension of an existing abstraction.
54
+ * **Replace condition ladders** with a typed state machine, strategy map, or explicit dispatcher.
55
+ * **Turn special-case branches** into a simpler default flow with fewer exceptions.
56
+ * **Extract pure, decoupled modules** when a single file handles distinct domain concepts.
57
+
58
+ ---
59
+
60
+ ## Tone & Output Standard
61
+
62
+ * **Voice**: Direct, demanding, and objective. Zero sycophancy or performative praise.
63
+ * **Actionable Critiques**: Always accompany critiques with concrete, minimal architectural remedies.
64
+ * **Example Prompts & Verdicts**:
65
+ * *"This adds another special-case branch into an already busy flow. Can we reframe the state model to eliminate the branch?"*
66
+ * *"This wrapper file only re-exports two functions with minor type conversions. Delete the wrapper and import the primitives directly."*
67
+ * *"This module mixes database access with UI formatting across 800+ lines. Decompose this into domain logic and presentation before adding new routes."*
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: threat-modeling
3
+ description: Systematic STRIDE threat modeling, trust boundary identification, attack surface mapping, and mitigation verification for architecture, API, and cloud infrastructure changes.
4
+ ---
5
+
6
+ # Threat Modeling Skill (`threat-modeling`)
7
+
8
+ Use this skill when designing new system architectures, exposing new public endpoints, modifying authentication/authorization boundaries, or conducting pre-production security assessments.
9
+
10
+ ---
11
+
12
+ ## 1. Trust Boundaries & Surface Mapping
13
+
14
+ Before evaluating threats, map every trust boundary transition:
15
+ 1. **External Client to Edge**: Browser/mobile app to CDN/reverse proxy (TLS termination, DDoS filtering, CORS policies).
16
+ 2. **Edge to Application Gateway**: Reverse proxy to application service (header sanitization, `X-Forwarded-*` trust, rate limiting).
17
+ 3. **Application to Internal Services**: Microservices, queue brokers, caching nodes (mutual TLS, network segmentation).
18
+ 4. **Application to Data Tier**: Service to relational/vector databases (parameterized queries, least-privilege connection pooling).
19
+ 5. **Application to Third-Party APIs**: Outbound webhooks and partner APIs (egress filtering, credential isolation, SSRF prevention).
20
+
21
+ ---
22
+
23
+ ## 2. The STRIDE Threat Matrix
24
+
25
+ Evaluate every trust boundary against the six STRIDE threat categories:
26
+
27
+ | Threat Category | Core Question | Primary Attack Vector | Mandatory Defense & Verification |
28
+ | :--- | :--- | :--- | :--- |
29
+ | **Spoofing** | Can an attacker pretend to be someone else? | Forged tokens, unverified headers, weak session cookies | Cryptographically signed tokens (RS256/Ed25519), `__Host-` prefixed cookies with `Secure; HttpOnly; SameSite=Lax`. |
30
+ | **Tampering** | Can an attacker modify data in transit or at rest? | Parameter tampering, payload manipulation, replay attacks | Strict JSON schema validation, input sanitization, HMAC signatures for webhooks, immutable audit logs. |
31
+ | **Repudiation** | Can a user deny performing an action? | Missing audit logs, unauthenticated mutations | Append-only structured audit logs capturing actor ID, timestamp, IP, and immutable mutation diffs. |
32
+ | **Information Disclosure** | Can unauthorized parties access private data? | Detailed stack traces in responses, unredacted logs, PII leakage, IDOR | Generic error responses in production, zero secrets in client bundles, strict tenant isolation (`tenant_id` WHERE clauses). |
33
+ | **Denial of Service** | Can an attacker exhaust system resources? | Unbounded payload sizes, missing query pagination, regex DoS (ReDoS) | Hard request body size limits, mandatory pagination (`limit`/`offset` or cursor), algorithmic timeouts on regex matching. |
34
+ | **Elevation of Privilege** | Can an unprivileged user execute admin actions? | Insecure Direct Object References (IDOR), broken RBAC/ABAC | Centralized authorization guards on every endpoint, least-privilege database user permissions. |
35
+
36
+ ---
37
+
38
+ ## 3. Threat Mitigation Ledger Template
39
+
40
+ For Tier 2 and Tier 3 architectural tasks, record verified mitigations in the task plan or security report:
41
+
42
+ ```markdown
43
+ ### STRIDE Threat Ledger
44
+ | ID | Boundary | STRIDE Category | Threat Description | Verified Mitigation | Status |
45
+ | :--- | :--- | :--- | :--- | :--- | :--- |
46
+ | T-01 | Client -> Edge | Spoofing | Client forges X-User-Id header | Edge strips all upstream identity headers before auth | Mitigated |
47
+ | T-02 | Edge -> API | Denial of Service | Unbounded JSON upload exhausts RAM | Body parser capped at 1MB with early 413 termination | Mitigated |
48
+ | T-03 | API -> DB | Elevation of Privilege | Tenant B IDOR on Tenant A invoices | RLS policy and repository WHERE tenant_id = auth.tenant | Mitigated |
49
+ ```
50
+
51
+ ---
52
+
53
+ ## 4. Unmistakable Guardrails
54
+ - **No Unmitigated Blockers**: No architectural feature crossing a trust boundary may be approved with open high-severity STRIDE threats.
55
+ - **Fail Closed**: In any authorization failure, token validation error, or exception branch, system state must default to access denied.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: to-spec
3
+ description: "Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ This skill takes the current conversation context and codebase understanding and produces a spec. Do NOT interview the user; just synthesize what you already know.
8
+
9
+ The issue tracker and triage label vocabulary should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
10
+
11
+ ## Process
12
+
13
+ 1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the spec, and respect any ADRs in the area you're touching.
14
+
15
+ 2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better - the ideal number is one.
16
+
17
+ Check with the user that these seams match their expectations.
18
+
19
+ 3. Write the spec using the template below, then publish it to the project issue tracker. Apply the `ready-for-agent` triage label - no need for additional triage.
20
+
21
+ <spec-template>
22
+
23
+ ## Problem Statement
24
+
25
+ The problem that the user is facing, from the user's perspective.
26
+
27
+ ## Solution
28
+
29
+ The solution to the problem, from the user's perspective.
30
+
31
+ ## User Stories
32
+
33
+ A LONG, numbered list of user stories. Each user story should be in the format of:
34
+
35
+ 1. As an <actor>, I want a <feature>, so that <benefit>
36
+
37
+ <user-story-example>
38
+ 1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
39
+ </user-story-example>
40
+
41
+ This list of user stories should be extremely extensive and cover all aspects of the feature.
42
+
43
+ ## Implementation Decisions
44
+
45
+ A list of implementation decisions that were made. This can include:
46
+
47
+ - The modules that will be built/modified
48
+ - The interfaces of those modules that will be modified
49
+ - Technical clarifications from the developer
50
+ - Architectural decisions
51
+ - Schema changes
52
+ - API contracts
53
+ - Specific interactions
54
+
55
+ Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
56
+
57
+ Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
58
+
59
+ ## Testing Decisions
60
+
61
+ A list of testing decisions that were made. Include:
62
+
63
+ - A description of what makes a good test (only test external behavior, not implementation details)
64
+ - Which modules will be tested
65
+ - Prior art for the tests (i.e. similar types of tests in the codebase)
66
+
67
+ ## Out of Scope
68
+
69
+ A description of the things that are out of scope for this spec.
70
+
71
+ ## Further Notes
72
+
73
+ Any further notes about the feature.
74
+
75
+ </spec-template>
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: to-tickets
3
+ description: Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker (edges as text in one file per ticket locally, or native blocking links on a real tracker).
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # To Tickets
8
+
9
+ Break a plan, spec, or conversation into a set of **tickets**: tracer-bullet vertical slices, each declaring the tickets that **block** it.
10
+
11
+ The issue tracker and triage label vocabulary should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
12
+
13
+ ## Process
14
+
15
+ ### 1. Gather context
16
+
17
+ Work from whatever is already in the conversation context. If the user passes a reference (a spec path, an issue number or URL) as an argument, fetch it and read its full body and comments.
18
+
19
+ ### 2. Explore the codebase (optional)
20
+
21
+ If you have not already explored the codebase, do so to understand the current state of the code. Ticket titles and descriptions should use the project's domain glossary vocabulary, and respect ADRs in the area you're touching.
22
+
23
+ Look for opportunities to prefactor the code to make the implementation easier. "Make the change easy, then make the easy change."
24
+
25
+ ### 3. Draft vertical slices
26
+
27
+ Break the work into **tracer bullet** tickets.
28
+
29
+ <vertical-slice-rules>
30
+
31
+ - Each slice cuts a narrow but COMPLETE path through every layer (schema, API, UI, tests): vertical, NOT a horizontal slice of one layer
32
+ - A completed slice is demoable or verifiable on its own
33
+ - Each slice is sized to fit in a single fresh context window
34
+ - Any prefactoring should be done first
35
+
36
+ </vertical-slice-rules>
37
+
38
+ Give each ticket its **blocking edges**: the other tickets that must complete before it can start. A ticket with no blockers can start immediately.
39
+
40
+ **Wide refactors are the exception to vertical slicing.** A **wide refactor** is one mechanical change (rename a column, retype a shared symbol) whose **blast radius** fans across the whole codebase, so a single edit breaks thousands of call sites at once and no vertical slice can land green. Don't force it into a tracer bullet; sequence it as **expand–contract**. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in a ticket blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify ticket; green is promised only there.
41
+
42
+ ### 4. Quiz the user
43
+
44
+ Present the proposed breakdown as a numbered list. For each ticket, show:
45
+
46
+ - **Title**: short descriptive name
47
+ - **Blocked by**: which other tickets (if any) must complete first
48
+ - **What it delivers**: the end-to-end behaviour this ticket makes work
49
+
50
+ Ask the user:
51
+
52
+ - Does the granularity feel right? (too coarse / too fine)
53
+ - Are the blocking edges correct: does each ticket only depend on tickets that genuinely gate it?
54
+ - Should any tickets be merged or split further?
55
+
56
+ Iterate until the user approves the breakdown.
57
+
58
+ ### 5. Publish the tickets to the configured tracker
59
+
60
+ Publish the approved tickets. **How** depends on the tracker `/setup-matt-pocock-skills` configured; the tickets are the same either way, only the shape of the blocking edges changes:
61
+
62
+ - **Local files** → write one file per ticket under `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01` in dependency order (blockers first). Each file's "Blocked by" lists the numbers/titles it depends on. Use the per-ticket file template below: one ticket per file, never a single combined file.
63
+ - **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. If the source was an existing issue, make each ticket its sub-issue (tracker doc's operation). Apply the `ready-for-agent` triage label unless instructed otherwise; the tickets are agent-grabbable by construction.
64
+
65
+ Work the **frontier**: any ticket whose blockers are all done. For a purely linear chain that means top to bottom.
66
+
67
+ Do NOT close or modify any parent issue.
68
+
69
+ <local-ticket-template>
70
+
71
+ # <NN>: <Ticket title>
72
+
73
+ **What to build:** the end-to-end behaviour this ticket makes work, from the user's perspective, not a layer-by-layer implementation list.
74
+
75
+ **Blocked by:** the numbers/titles of the tickets that gate this one, or "None (can start immediately)".
76
+
77
+ **Status:** ready-for-agent
78
+
79
+ - [ ] Acceptance criterion 1
80
+ - [ ] Acceptance criterion 2
81
+
82
+ </local-ticket-template>
83
+
84
+ <issue-template>
85
+
86
+ ## Parent
87
+
88
+ A reference to the parent issue on the tracker (if the source was an existing issue, otherwise omit this section).
89
+
90
+ ## What to build
91
+
92
+ The end-to-end behaviour this ticket makes work, from the user's perspective, not layer-by-layer implementation.
93
+
94
+ ## Acceptance criteria
95
+
96
+ - [ ] Criterion 1
97
+ - [ ] Criterion 2
98
+
99
+ ## Blocked by
100
+
101
+ - A reference to each blocking ticket, or "None (can start immediately)". Omit this section when blockers were set as native edges.
102
+
103
+ </issue-template>
104
+
105
+ In either form, avoid specific file paths or code snippets: they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
@@ -1,72 +1,72 @@
1
- ---
2
- name: audit-context-building
3
- description: Understand a codebase before looking for bugs in it - what each function assumes, what it guarantees, and what it depends on elsewhere. Use when starting an audit, threat model, or architecture review on unfamiliar code, and before any vulnerability-hunting pass.
4
- allowed-tools: Workflow Task Read Grep Glob
5
- ---
6
-
7
- # Audit Context Building
8
-
9
- Build understanding, not verdicts. This runs before anyone hunts for bugs, and feeds that work.
10
-
11
- ## When to Use
12
-
13
- At the start of an audit, a threat model, or an architecture review, when the code is unfamiliar. Also when
14
- an earlier pass produced findings nobody could judge, because no one had mapped out how the system fits
15
- together.
16
-
17
- ## When NOT to Use
18
-
19
- Do not name vulnerabilities, suggest fixes, write proofs-of-concept, or rate severity. Those belong to the
20
- hunting phase, which runs next and with the whole picture in hand. When the code counts on something and
21
- nothing checks it, record that plainly and move on — whether it matters is decided later.
22
-
23
- Not worth the tokens on code you already understand.
24
-
25
- ## Do not analyze in this context
26
-
27
- The analysis is long, and this context needs to survive to use it. Dispatch it:
28
-
29
- - **A codebase, or more than one function** — run `/audit-context-building:audit-context <path>`. It orients,
30
- analyzes each function in its own subagent, and writes `audit-context/DOSSIER.md` plus one file per
31
- function under `audit-context/functions/`. Only compact records return here.
32
- - **A single function** — dispatch the `audit-context-building:function-analyzer` agent at it. It writes its
33
- prose to disk and returns a record.
34
-
35
- Then work from what comes back: the index, the unenforced assumptions, the open questions. Read a function's
36
- file when you need its detail.
37
-
38
- The workflow is what enforces this, not this text: a subagent bound to a return schema cannot return prose.
39
- Treat this section as routing, and route.
40
-
41
- ## What comes back, and how to read it
42
-
43
- Each record lists what must always be true (with the line that shows it), what the function takes on faith
44
- (with whatever establishes it), which functions it calls and what it needs from each, and anything still
45
- unclear. The dossier adds the rules that span several functions, who can reach what, and where the
46
- complicated parts cluster.
47
-
48
- Two things matter more than the rest:
49
-
50
- - **Assumptions marked `nothing found`.** The code counts on something being true and nothing anywhere makes
51
- it true. This is the most useful thing to hand the hunting phase.
52
- - **The open questions.** An honest list of what is still unclear beats a confident answer that turns out to
53
- be wrong. Carry them forward instead of closing them out.
54
-
55
- Where two records disagree, both are quoted rather than quietly reconciled. That is a fact about the code,
56
- not a flaw in the analysis.
57
-
58
- ## The format
59
-
60
- [ANALYSIS_FORMAT.md](resources/ANALYSIS_FORMAT.md) defines it, and
61
- [FUNCTION_MICRO_ANALYSIS_EXAMPLE.md](resources/FUNCTION_MICRO_ANALYSIS_EXAMPLE.md) works through examples in
62
- C and Solidity. Read them when extending this plugin or deciding whether a record can be trusted.
63
-
64
- The format is the same whatever the target. What changes is what fills each slot, and what counts as a call
65
- you cannot see inside. [DOMAIN_NOTES.md](resources/DOMAIN_NOTES.md) maps that across smart contracts, C and
66
- C++, decompiled firmware, and web services — read it when the target is not plain source code.
67
-
68
- **The rule that matters most: follow the calls.** Whether a function is correct usually depends on something
69
- another function does, and you cannot see that from the caller alone. A limit looks enforced because the
70
- value came back from a function whose name suggests it was checked. So read the function being called, follow
71
- every path through it rather than only the one that succeeds, and say what makes each assumption true. When
72
- nothing does, use those words: `nothing found`. Every claim cites a line, or becomes an open question.
1
+ ---
2
+ name: audit-context-building
3
+ description: Understand a codebase before looking for bugs in it - what each function assumes, what it guarantees, and what it depends on elsewhere. Use when starting an audit, threat model, or architecture review on unfamiliar code, and before any vulnerability-hunting pass.
4
+ allowed-tools: Workflow Task Read Grep Glob
5
+ ---
6
+
7
+ # Audit Context Building
8
+
9
+ Build understanding, not verdicts. This runs before anyone hunts for bugs, and feeds that work.
10
+
11
+ ## When to Use
12
+
13
+ At the start of an audit, a threat model, or an architecture review, when the code is unfamiliar. Also when
14
+ an earlier pass produced findings nobody could judge, because no one had mapped out how the system fits
15
+ together.
16
+
17
+ ## When NOT to Use
18
+
19
+ Do not name vulnerabilities, suggest fixes, write proofs-of-concept, or rate severity. Those belong to the
20
+ hunting phase, which runs next and with the whole picture in hand. When the code counts on something and
21
+ nothing checks it, record that plainly and move on — whether it matters is decided later.
22
+
23
+ Not worth the tokens on code you already understand.
24
+
25
+ ## Do not analyze in this context
26
+
27
+ The analysis is long, and this context needs to survive to use it. Dispatch it:
28
+
29
+ - **A codebase, or more than one function** — run `/audit-context-building:audit-context <path>`. It orients,
30
+ analyzes each function in its own subagent, and writes `audit-context/DOSSIER.md` plus one file per
31
+ function under `audit-context/functions/`. Only compact records return here.
32
+ - **A single function** — dispatch the `audit-context-building:function-analyzer` agent at it. It writes its
33
+ prose to disk and returns a record.
34
+
35
+ Then work from what comes back: the index, the unenforced assumptions, the open questions. Read a function's
36
+ file when you need its detail.
37
+
38
+ The workflow is what enforces this, not this text: a subagent bound to a return schema cannot return prose.
39
+ Treat this section as routing, and route.
40
+
41
+ ## What comes back, and how to read it
42
+
43
+ Each record lists what must always be true (with the line that shows it), what the function takes on faith
44
+ (with whatever establishes it), which functions it calls and what it needs from each, and anything still
45
+ unclear. The dossier adds the rules that span several functions, who can reach what, and where the
46
+ complicated parts cluster.
47
+
48
+ Two things matter more than the rest:
49
+
50
+ - **Assumptions marked `nothing found`.** The code counts on something being true and nothing anywhere makes
51
+ it true. This is the most useful thing to hand the hunting phase.
52
+ - **The open questions.** An honest list of what is still unclear beats a confident answer that turns out to
53
+ be wrong. Carry them forward instead of closing them out.
54
+
55
+ Where two records disagree, both are quoted rather than quietly reconciled. That is a fact about the code,
56
+ not a flaw in the analysis.
57
+
58
+ ## The format
59
+
60
+ [ANALYSIS_FORMAT.md](resources/ANALYSIS_FORMAT.md) defines it, and
61
+ [FUNCTION_MICRO_ANALYSIS_EXAMPLE.md](resources/FUNCTION_MICRO_ANALYSIS_EXAMPLE.md) works through examples in
62
+ C and Solidity. Read them when extending this plugin or deciding whether a record can be trusted.
63
+
64
+ The format is the same whatever the target. What changes is what fills each slot, and what counts as a call
65
+ you cannot see inside. [DOMAIN_NOTES.md](resources/DOMAIN_NOTES.md) maps that across smart contracts, C and
66
+ C++, decompiled firmware, and web services — read it when the target is not plain source code.
67
+
68
+ **The rule that matters most: follow the calls.** Whether a function is correct usually depends on something
69
+ another function does, and you cannot see that from the caller alone. A limit looks enforced because the
70
+ value came back from a function whose name suggests it was checked. So read the function being called, follow
71
+ every path through it rather than only the one that succeeds, and say what makes each assumption true. When
72
+ nothing does, use those words: `nothing found`. Every claim cites a line, or becomes an open question.
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: "Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open switches, weak crypto, permissive access, debug leakage. Parallel sweeps collect candidates, then a refuting verifier traces each one to the security decision it reaches before it is reported."
3
+ argument-hint: "[path]"
4
+ allowed-tools: Bash Workflow
5
+ ---
6
+
7
+ # Insecure defaults audit
8
+
9
+ **1. Check the corpus is there.**
10
+
11
+ ```
12
+ ls -1 ${CLAUDE_PLUGIN_ROOT}/references
13
+ ```
14
+
15
+ Must list `*.md` files. If it errors or lists none, **stop and say so**. Don't search
16
+ elsewhere, don't guess, don't run the audit anyway.
17
+
18
+ **2. Run it.** `Workflow` tool:
19
+
20
+ ```
21
+ name: "insecure-defaults:audit-pipeline"
22
+ args: { scope: "$1" or ".", pluginRoot: "${CLAUDE_PLUGIN_ROOT}" }
23
+ ```
24
+
25
+ Pass the `${CLAUDE_PLUGIN_ROOT}` value as printed above; it's already the real path.
26
+
27
+ **3. Print the result**, by `status`:
28
+
29
+ - `findings`, `no-findings-confirmed`: print `report`.
30
+ - `no-candidates`: the sweeps ran and matched nothing, which is a real result. There is
31
+ no `report`; print `note`, including its point that this is not proof of absence.
32
+ - `report-failed`: the audit completed but the write-up died. Print `note`, then present
33
+ `findings`, `refuted` and `coverage` yourself.
34
+ - anything else: the audit **didn't complete**, so it isn't a clean result. Print `note`
35
+ and say the run failed.
@@ -1,13 +1,13 @@
1
- {
2
- "id": "debug-features",
3
- "title": "Debug and introspection defaults",
4
- "seeds": [
5
- "(DEBUG|debug|DEVELOPMENT|TRACE)[A-Za-z_]*[[:space:]]*[:=][[:space:]]*(True|true|1)",
6
- "(getenv|environ\\.get|process\\.env).{0,40}(DEBUG|VERBOSE).{0,40}(or|\\|\\|)[[:space:]]*(True|true|['\"]1['\"])",
7
- "(getenv|environ\\.get|getOrDefault)\\([^)]*,[[:space:]]*['\"]?(true|1|on|yes|enabled)['\"]?[[:space:]]*\\)",
8
- "(introspection|playground|graphiql|swagger|actuator|pprof|expvar)[[:space:]]*[:=][[:space:]]*(True|true|1)",
9
- "(traceback\\.format_exc|format_exc|printStackTrace|getStackTrace|exc_info)",
10
- "['\"][^'\"]*['\"][[:space:]]*\\+[[:space:]]*[A-Za-z_][A-Za-z0-9_]*\\.getMessage\\(\\)",
11
- "(show_exceptions|PROPAGATE_EXCEPTIONS|display_errors|full_stack)"
12
- ]
13
- }
1
+ {
2
+ "id": "debug-features",
3
+ "title": "Debug and introspection defaults",
4
+ "seeds": [
5
+ "(DEBUG|debug|DEVELOPMENT|TRACE)[A-Za-z_]*[[:space:]]*[:=][[:space:]]*(True|true|1)",
6
+ "(getenv|environ\\.get|process\\.env).{0,40}(DEBUG|VERBOSE).{0,40}(or|\\|\\|)[[:space:]]*(True|true|['\"]1['\"])",
7
+ "(getenv|environ\\.get|getOrDefault)\\([^)]*,[[:space:]]*['\"]?(true|1|on|yes|enabled)['\"]?[[:space:]]*\\)",
8
+ "(introspection|playground|graphiql|swagger|actuator|pprof|expvar)[[:space:]]*[:=][[:space:]]*(True|true|1)",
9
+ "(traceback\\.format_exc|format_exc|printStackTrace|getStackTrace|exc_info)",
10
+ "['\"][^'\"]*['\"][[:space:]]*\\+[[:space:]]*[A-Za-z_][A-Za-z0-9_]*\\.getMessage\\(\\)",
11
+ "(show_exceptions|PROPAGATE_EXCEPTIONS|display_errors|full_stack)"
12
+ ]
13
+ }