@event4u/agent-config 8.13.0 → 9.1.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 (316) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +183 -0
  3. package/MIGRATION.md +14 -0
  4. package/README.md +2 -2
  5. package/dist/agent-src/commands/agent-handoff.md +35 -0
  6. package/dist/agent-src/commands/agents/init.md +1 -0
  7. package/dist/agent-src/commands/agents/optimize.md +1 -0
  8. package/dist/agent-src/commands/agents/user/accept.md +3 -2
  9. package/dist/agent-src/commands/agents/user/init.md +5 -4
  10. package/dist/agent-src/commands/agents/user/update.md +3 -2
  11. package/dist/agent-src/commands/agents/user.md +1 -0
  12. package/dist/agent-src/commands/agents.md +1 -0
  13. package/dist/agent-src/commands/analytics/show.md +1 -0
  14. package/dist/agent-src/commands/analytics.md +1 -0
  15. package/dist/agent-src/commands/analyze/decision.md +1 -0
  16. package/dist/agent-src/commands/analyze/incident.md +1 -0
  17. package/dist/agent-src/commands/analyze/near-miss.md +1 -0
  18. package/dist/agent-src/commands/analyze/postmortem.md +1 -0
  19. package/dist/agent-src/commands/analyze/premortem.md +1 -0
  20. package/dist/agent-src/commands/analyze/reference-repo.md +1 -0
  21. package/dist/agent-src/commands/analyze.md +3 -2
  22. package/dist/agent-src/commands/brand/identity.md +6 -5
  23. package/dist/agent-src/commands/brand/review.md +6 -5
  24. package/dist/agent-src/commands/brand/strategy.md +6 -4
  25. package/dist/agent-src/commands/brand/tokens.md +7 -6
  26. package/dist/agent-src/commands/brand/voice.md +5 -4
  27. package/dist/agent-src/commands/brand.md +9 -7
  28. package/dist/agent-src/commands/bug/fix.md +1 -0
  29. package/dist/agent-src/commands/bug/investigate.md +1 -0
  30. package/dist/agent-src/commands/bug.md +2 -1
  31. package/dist/agent-src/commands/challenge-me/vision.md +1 -0
  32. package/dist/agent-src/commands/challenge-me/with-docs.md +1 -0
  33. package/dist/agent-src/commands/challenge-me.md +28 -6
  34. package/dist/agent-src/commands/chat-history.md +1 -0
  35. package/dist/agent-src/commands/check-current-md.md +1 -0
  36. package/dist/agent-src/commands/commit.md +1 -0
  37. package/dist/agent-src/commands/context/create.md +3 -2
  38. package/dist/agent-src/commands/context.md +1 -0
  39. package/dist/agent-src/commands/cost/profile.md +1 -0
  40. package/dist/agent-src/commands/cost.md +2 -1
  41. package/dist/agent-src/commands/council/analysis.md +1 -0
  42. package/dist/agent-src/commands/council/debate.md +1 -0
  43. package/dist/agent-src/commands/council/default.md +21 -20
  44. package/dist/agent-src/commands/council/design.md +1 -0
  45. package/dist/agent-src/commands/council/optimize.md +1 -0
  46. package/dist/agent-src/commands/council/pr.md +1 -0
  47. package/dist/agent-src/commands/council.md +1 -0
  48. package/dist/agent-src/commands/estimate-ticket.md +1 -0
  49. package/dist/agent-src/commands/explain-run.md +88 -0
  50. package/dist/agent-src/commands/feature/dev.md +1 -0
  51. package/dist/agent-src/commands/feature/explore.md +1 -0
  52. package/dist/agent-src/commands/feature/plan.md +1 -0
  53. package/dist/agent-src/commands/feature/refactor.md +1 -0
  54. package/dist/agent-src/commands/feature/roadmap.md +1 -0
  55. package/dist/agent-src/commands/feature.md +2 -1
  56. package/dist/agent-src/commands/fix/pr-comments.md +19 -0
  57. package/dist/agent-src/commands/fix.md +2 -1
  58. package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
  59. package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
  60. package/dist/agent-src/commands/ghostwriter/show.md +1 -0
  61. package/dist/agent-src/commands/ghostwriter/write.md +1 -0
  62. package/dist/agent-src/commands/ghostwriter.md +1 -0
  63. package/dist/agent-src/commands/grill-me.md +17 -12
  64. package/dist/agent-src/commands/humanize.md +1 -0
  65. package/dist/agent-src/commands/image/analyse.md +2 -1
  66. package/dist/agent-src/commands/image/create.md +1 -0
  67. package/dist/agent-src/commands/image/verify.md +1 -0
  68. package/dist/agent-src/commands/image.md +16 -12
  69. package/dist/agent-src/commands/implement-ticket.md +1 -0
  70. package/dist/agent-src/commands/judge/on-diff.md +1 -0
  71. package/dist/agent-src/commands/judge/solo.md +1 -0
  72. package/dist/agent-src/commands/judge/steps.md +1 -0
  73. package/dist/agent-src/commands/judge.md +1 -0
  74. package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
  75. package/dist/agent-src/commands/knowledge/forget.md +1 -0
  76. package/dist/agent-src/commands/knowledge/ingest.md +1 -0
  77. package/dist/agent-src/commands/knowledge/list.md +10 -0
  78. package/dist/agent-src/commands/knowledge.md +1 -0
  79. package/dist/agent-src/commands/memory/learn-low-impact.md +1 -0
  80. package/dist/agent-src/commands/memory/mine-session.md +1 -0
  81. package/dist/agent-src/commands/memory/promote.md +3 -2
  82. package/dist/agent-src/commands/memory.md +1 -0
  83. package/dist/agent-src/commands/mission/upgrade.md +45 -24
  84. package/dist/agent-src/commands/mode.md +1 -0
  85. package/dist/agent-src/commands/module/create.md +1 -0
  86. package/dist/agent-src/commands/module/explore.md +1 -0
  87. package/dist/agent-src/commands/module.md +1 -0
  88. package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
  89. package/dist/agent-src/commands/optimize/project.md +1 -0
  90. package/dist/agent-src/commands/optimize/prompt.md +1 -0
  91. package/dist/agent-src/commands/optimize.md +2 -1
  92. package/dist/agent-src/commands/orchestrate.md +1 -0
  93. package/dist/agent-src/commands/override.md +1 -0
  94. package/dist/agent-src/commands/package.md +2 -1
  95. package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
  96. package/dist/agent-src/commands/post-as/me.md +1 -0
  97. package/dist/agent-src/commands/post-as.md +1 -0
  98. package/dist/agent-src/commands/pr/create/description-only.md +139 -8
  99. package/dist/agent-src/commands/pr/create.md +35 -22
  100. package/dist/agent-src/commands/prediction-pool.md +7 -6
  101. package/dist/agent-src/commands/prepare-for-review.md +1 -0
  102. package/dist/agent-src/commands/profile/activate.md +1 -0
  103. package/dist/agent-src/commands/profile/deactivate.md +1 -0
  104. package/dist/agent-src/commands/profile.md +1 -0
  105. package/dist/agent-src/commands/project.md +2 -1
  106. package/dist/agent-src/commands/refine-ticket.md +7 -0
  107. package/dist/agent-src/commands/research/deep.md +1 -0
  108. package/dist/agent-src/commands/research.md +1 -0
  109. package/dist/agent-src/commands/review/routing.md +1 -0
  110. package/dist/agent-src/commands/review.md +2 -1
  111. package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
  112. package/dist/agent-src/commands/roadmap/materialize.md +1 -0
  113. package/dist/agent-src/commands/roadmap/process-full.md +1 -0
  114. package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
  115. package/dist/agent-src/commands/roadmap/process-step.md +1 -0
  116. package/dist/agent-src/commands/roadmap.md +1 -0
  117. package/dist/agent-src/commands/security-audit-config.md +2 -1
  118. package/dist/agent-src/commands/skill/preview.md +1 -0
  119. package/dist/agent-src/commands/skill.md +1 -0
  120. package/dist/agent-src/commands/skills/discover.md +1 -0
  121. package/dist/agent-src/commands/skills.md +1 -0
  122. package/dist/agent-src/commands/sync/agent-settings.md +1 -0
  123. package/dist/agent-src/commands/sync.md +2 -1
  124. package/dist/agent-src/commands/team/adversarial.md +3 -2
  125. package/dist/agent-src/commands/team/delegate.md +3 -2
  126. package/dist/agent-src/commands/team/review.md +3 -2
  127. package/dist/agent-src/commands/team/status.md +49 -18
  128. package/dist/agent-src/commands/team-knowledge.md +8 -6
  129. package/dist/agent-src/commands/team.md +21 -16
  130. package/dist/agent-src/commands/tests/e2e-heal.md +1 -0
  131. package/dist/agent-src/commands/tests/e2e-plan.md +1 -0
  132. package/dist/agent-src/commands/tests/execute.md +1 -0
  133. package/dist/agent-src/commands/tests.md +2 -1
  134. package/dist/agent-src/commands/update-form-request-messages.md +1 -0
  135. package/dist/agent-src/commands/upstream-contribute.md +1 -0
  136. package/dist/agent-src/commands/video/from-script.md +3 -2
  137. package/dist/agent-src/commands/video/from-song.md +22 -21
  138. package/dist/agent-src/commands/video/scene.md +1 -0
  139. package/dist/agent-src/commands/video/stitch.md +2 -1
  140. package/dist/agent-src/commands/video/storyboard.md +1 -0
  141. package/dist/agent-src/commands/video.md +1 -0
  142. package/dist/agent-src/commands/work.md +1 -0
  143. package/dist/agent-src/commands/worktree/cleanup.md +8 -7
  144. package/dist/agent-src/commands/worktree/create.md +1 -0
  145. package/dist/agent-src/commands/worktree/verify.md +1 -0
  146. package/dist/agent-src/commands/worktree.md +1 -0
  147. package/dist/agent-src/rules/active-remediation.md +12 -36
  148. package/dist/agent-src/rules/artifact-drafting-protocol.md +7 -64
  149. package/dist/agent-src/rules/context-hygiene.md +19 -113
  150. package/dist/agent-src/rules/design-fidelity.md +4 -60
  151. package/dist/agent-src/rules/domain-adoption-policy.md +10 -106
  152. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +12 -60
  153. package/dist/agent-src/rules/improve-before-implement.md +4 -0
  154. package/dist/agent-src/rules/minimal-safe-diff.md +6 -86
  155. package/dist/agent-src/rules/size-enforcement.md +10 -0
  156. package/dist/agent-src/rules/tool-safety.md +17 -3
  157. package/dist/agent-src/skills/agent-security-review/SKILL.md +12 -1
  158. package/dist/agent-src/skills/ai-council/SKILL.md +11 -0
  159. package/dist/agent-src/skills/bug-analyzer/SKILL.md +24 -2
  160. package/dist/agent-src/skills/code-review/SKILL.md +105 -93
  161. package/dist/agent-src/skills/code-review/checklists/backend.md +50 -0
  162. package/dist/agent-src/skills/code-review/checklists/database.md +19 -0
  163. package/dist/agent-src/skills/code-review/checklists/dependency.md +18 -0
  164. package/dist/agent-src/skills/code-review/checklists/docs.md +14 -0
  165. package/dist/agent-src/skills/code-review/checklists/frontend.md +19 -0
  166. package/dist/agent-src/skills/code-review/checklists/infra.md +17 -0
  167. package/dist/agent-src/skills/code-review/checklists/producing-the-review.md +62 -0
  168. package/dist/agent-src/skills/code-review/checklists/test-only.md +13 -0
  169. package/dist/agent-src/skills/code-review/evals/evals.json +53 -15
  170. package/dist/agent-src/skills/condense-memory/SKILL.md +3 -2
  171. package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +15 -0
  172. package/dist/agent-src/skills/docker/SKILL.md +10 -0
  173. package/dist/agent-src/skills/docx-authoring/SKILL.md +102 -0
  174. package/dist/agent-src/skills/github-ci/evals/evals.json +25 -0
  175. package/dist/agent-src/skills/humanizer/SKILL.md +79 -3
  176. package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +112 -0
  177. package/dist/agent-src/skills/humanizer/references/fixtures.md +70 -0
  178. package/dist/agent-src/skills/judge-bug-hunter/SKILL.md +7 -1
  179. package/dist/agent-src/skills/laravel/SKILL.md +10 -0
  180. package/dist/agent-src/skills/launch-readiness/SKILL.md +35 -0
  181. package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +146 -0
  182. package/dist/agent-src/skills/llm-provider-knowledge/evals/triggers.json +20 -0
  183. package/dist/agent-src/skills/merge-conflicts/SKILL.md +30 -0
  184. package/dist/agent-src/skills/pdf-tools/SKILL.md +101 -0
  185. package/dist/agent-src/skills/quality-tools/evals/evals.json +15 -0
  186. package/dist/agent-src/skills/security-audit/SKILL.md +29 -0
  187. package/dist/agent-src/skills/security-maturity-assessment/SKILL.md +90 -0
  188. package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +52 -0
  189. package/dist/agent-src/skills/skill-writing/SKILL.md +79 -0
  190. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +11 -3
  191. package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +11 -0
  192. package/dist/agent-src/skills/subagent-orchestration/schemas/team-review-status.json +103 -0
  193. package/dist/agent-src/skills/terraform/SKILL.md +10 -0
  194. package/dist/agent-src/skills/test-driven-development/SKILL.md +31 -0
  195. package/dist/agent-src/skills/threat-modeling/SKILL.md +15 -0
  196. package/dist/agent-src/skills/token-optimizer/SKILL.md +10 -4
  197. package/dist/agent-src/templates/agent-settings.md +28 -0
  198. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  199. package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
  200. package/dist/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
  201. package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
  202. package/dist/agent-src/templates/scripts/telemetry_record.ts +5 -0
  203. package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
  204. package/dist/discovery/deprecation-report.md +1 -1
  205. package/dist/discovery/discovery-manifest.json +314 -194
  206. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  207. package/dist/discovery/discovery-manifest.summary.md +5 -5
  208. package/dist/discovery/orphan-report.md +1 -1
  209. package/dist/discovery/packs.json +23 -18
  210. package/dist/discovery/trust-report.md +8 -8
  211. package/dist/discovery/workspaces.json +18 -13
  212. package/dist/install/install.mjs +48 -33
  213. package/dist/mcp/registry-manifest.json +3 -3
  214. package/dist/router.json +1 -1
  215. package/dist/scripts/_lib/agent_settings.js +4 -1
  216. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  217. package/dist/scripts/condense.js +5 -0
  218. package/dist/scripts/condense.js.map +1 -1
  219. package/dist/server/schemas/settings.js +10 -1
  220. package/dist/server/schemas/settings.js.map +1 -1
  221. package/docs/CLAIMS.md +9 -2
  222. package/docs/MIGRATION.md +20 -0
  223. package/docs/SKILL_CENSUS.md +8 -0
  224. package/docs/architecture.md +3 -3
  225. package/docs/benchmark.md +67 -2
  226. package/docs/catalog.md +2 -2
  227. package/docs/command-flows.md +1 -1
  228. package/docs/contracts/agents-layout.md +1 -1
  229. package/docs/contracts/ai-council-config.md +9 -2
  230. package/docs/contracts/ai-team-config.md +37 -4
  231. package/docs/contracts/consumer-bridge.md +55 -63
  232. package/docs/contracts/install-layout.md +1 -1
  233. package/docs/contracts/migrate-command.md +1 -1
  234. package/docs/contracts/prelaunch-diagnostics.md +151 -0
  235. package/docs/contracts/release-pr-gating.md +1 -0
  236. package/docs/customization.md +22 -1
  237. package/docs/decisions/ADR-020-global-only-consumer-scope.md +34 -0
  238. package/docs/decisions/ADR-049-configuration-trust-boundary.md +9 -1
  239. package/docs/featured-skills.md +2 -2
  240. package/docs/getting-started-by-role.md +1 -1
  241. package/docs/getting-started.md +17 -6
  242. package/docs/governance-advantage.md +1 -1
  243. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +45 -0
  244. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +28 -0
  245. package/docs/guidelines/agent-infra/api-cost-levers.md +126 -0
  246. package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +76 -0
  247. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +90 -0
  248. package/docs/guidelines/agent-infra/domain-adoption-gates.md +112 -0
  249. package/docs/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
  250. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +99 -0
  251. package/docs/guidelines/agent-infra/skill-quality-checklist.md +13 -0
  252. package/docs/guidelines/design-fidelity-mechanics.md +76 -0
  253. package/docs/installation.md +2 -1
  254. package/docs/maintainers/dev-mode.md +3 -2
  255. package/docs/parity/command-frontmatter.md +60 -0
  256. package/docs/proof.md +7 -6
  257. package/package.json +1 -1
  258. package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
  259. package/src/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
  260. package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
  261. package/src/agent-src/templates/scripts/telemetry_record.ts +5 -0
  262. package/src/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
  263. package/src/config/agent-settings.template.yml +73 -10
  264. package/src/config/gitignore-block.txt +16 -6
  265. package/src/config/prelaunch-areas.yml +36 -0
  266. package/src/scripts/_cli/cmd_conformance.ts +2 -2
  267. package/src/scripts/_cli/cmd_doctor.ts +280 -39
  268. package/src/scripts/_cli/cmd_refresh.ts +35 -118
  269. package/src/scripts/_lib/agent_settings.ts +4 -1
  270. package/src/scripts/_lib/claude_plugin.ts +77 -2
  271. package/src/scripts/_lib/orchestration_record.ts +5 -0
  272. package/src/scripts/_lib/tool_adapter_registry.ts +120 -0
  273. package/src/scripts/ai_council/clients.ts +68 -6
  274. package/src/scripts/ai_council/pricing.ts +62 -0
  275. package/src/scripts/ai_team/config.ts +73 -1
  276. package/src/scripts/ai_team/review_gate.ts +636 -0
  277. package/src/scripts/ai_team/team_dispatch.ts +612 -0
  278. package/src/scripts/bench_ab_task_runner.ts +11 -1
  279. package/src/scripts/bench_parity_count.ts +279 -0
  280. package/src/scripts/build_linear_digest.ts +3 -1
  281. package/src/scripts/check_bridge_derivation.ts +172 -0
  282. package/src/scripts/check_consumer_scope_flip.ts +179 -0
  283. package/src/scripts/check_council_config_location.ts +115 -15
  284. package/src/scripts/check_host_loadability.ts +81 -0
  285. package/src/scripts/condense.ts +5 -0
  286. package/src/scripts/council_cli.ts +19 -3
  287. package/src/scripts/hook_manifest.yaml +12 -1
  288. package/src/scripts/install.ts +44 -45
  289. package/src/scripts/lint_agents_layout.ts +10 -4
  290. package/src/scripts/lint_breaking_changes_index.ts +303 -0
  291. package/src/scripts/lint_handoffs.ts +42 -0
  292. package/src/scripts/lint_skill_descriptions.ts +228 -0
  293. package/src/scripts/lint_skill_descriptions_allowlist.json +1 -0
  294. package/src/scripts/lint_skill_scripts_readonly.ts +145 -0
  295. package/src/scripts/lint_skill_scripts_readonly_allowlist.json +8 -0
  296. package/src/scripts/lint_supported_tools_matrix.ts +35 -0
  297. package/src/scripts/mcp_server/tools.ts +1 -3
  298. package/src/scripts/optimize_skill_description.ts +144 -0
  299. package/src/scripts/orchestration_record.ts +2 -1
  300. package/src/scripts/prelaunch_diagnostics.ts +248 -0
  301. package/src/scripts/run_skill_evals.ts +70 -4
  302. package/src/scripts/schemas/agent-settings.schema.json +17 -0
  303. package/src/scripts/schemas/command.schema.json +7 -0
  304. package/src/scripts/schemas/evals.schema.json +105 -14
  305. package/src/scripts/schemas/prelaunch-report.schema.json +107 -0
  306. package/src/scripts/schemas/skill.schema.json +18 -1
  307. package/src/scripts/schemas/subagent.schema.json +6 -0
  308. package/src/scripts/self_review_gate.test.ts +11 -0
  309. package/src/scripts/self_review_gate.ts +7 -1
  310. package/src/scripts/skill_eval_coverage.ts +4 -1
  311. package/src/scripts/skill_linter.ts +43 -3
  312. package/src/scripts/smoke_host_loadability.sh +73 -0
  313. package/src/scripts/team_review_gate_hook.ts +115 -0
  314. package/src/scripts/trigger_eval_grandfather.json +1 -2
  315. package/src/scripts/utilization_report.ts +225 -0
  316. package/src/server/schemas/settings.ts +24 -1
@@ -0,0 +1,70 @@
1
+ # Humanizer worked fixtures
2
+
3
+ > On-demand fixtures for the [`humanizer`](../SKILL.md) skill — the
4
+ > behavioral cases the U2 (style/stance separation) and U5 (six-signal
5
+ > voice-match) verify clauses reference
6
+ > (road-to-ecosystem-harvest-prose-authenticity, Source I).
7
+
8
+ ## Fixture 1 — stance survives the style pass (U2)
9
+
10
+ A humanize pass lowers the AI signal; it must **not** soften a refusal or a
11
+ disagreement into agreement. Input takes a firm negative position with two
12
+ Tier-High tells (sycophancy + chat artifact + significance inflation):
13
+
14
+ **Before (AI-toned refusal):**
15
+
16
+ > Great question! Unfortunately, I'm not able to merge this to `main` right
17
+ > now — doing so would mark a pivotal moment that bypasses the review gate.
18
+ > Let me know if you'd like me to walk through the alternatives!
19
+
20
+ **After (humanized — tells gone, refusal intact):**
21
+
22
+ > I can't merge this to `main` — it would skip the review gate. The
23
+ > alternatives are to open a PR for review or to get an explicit override
24
+ > from a maintainer.
25
+
26
+ The rewrite removed the flattery, the chat artifact, and the significance
27
+ inflation, and **kept the "no"**. A rewrite that turned this into "I could
28
+ probably merge this if you'd like!" would have corrupted the stance — a
29
+ defect, not a humanize. Same rule for hedged-because-genuinely-uncertain
30
+ claims: uncertainty the author actually holds stays.
31
+
32
+ ## Fixture 2 — two voice samples, measurably different targets (U5)
33
+
34
+ The six-signal extraction produces distinct targets for distinct samples —
35
+ matching moves the draft toward the sample's values, never toward a generic
36
+ "human" vibe.
37
+
38
+ **Sample A — terse operator:**
39
+
40
+ > Deploy failed. Rolled back. Root cause: the migration locked the orders
41
+ > table for 40s. Fix lands tomorrow.
42
+
43
+ | Signal | Sample A target |
44
+ |---|---|
45
+ | Sentence-length rhythm | very short, uniform (4–8 words) |
46
+ | Vocabulary register | plain / operational |
47
+ | Punctuation habits | periods only; no dashes, no parentheticals |
48
+ | Hedging density | zero |
49
+ | Structural cadence | clipped declaratives, no lists |
50
+ | Idiom | incident-log shorthand ("root cause:", "lands") |
51
+
52
+ **Sample B — discursive essayist:**
53
+
54
+ > What struck me, reading the migration post-mortem again, was how ordinary
55
+ > the failure looked in advance — a lock we'd all seen a hundred times, on a
56
+ > table nobody thought of as hot until, suddenly, it was.
57
+
58
+ | Signal | Sample B target |
59
+ |---|---|
60
+ | Sentence-length rhythm | long, winding; one sentence per idea |
61
+ | Vocabulary register | reflective / literary |
62
+ | Punctuation habits | em dashes + nested clauses (fingerprint allows dashes) |
63
+ | Hedging density | moderate ("looked", "thought of as") |
64
+ | Structural cadence | single flowing paragraph |
65
+ | Idiom | narrative asides ("What struck me…") |
66
+
67
+ The two targets diverge on every axis — a draft matched to A is not a draft
68
+ matched to B. Sample B is also a case where the dash-density default is
69
+ **suppressed**: the fingerprint genuinely writes in dashes, so the fingerprint
70
+ wins (SKILL § voice precedence).
@@ -70,7 +70,13 @@ not reviewable — flag it and stop.
70
70
  - Does it introduce a new implicit assumption (ordering, timezone,
71
71
  encoding, locale)?
72
72
 
73
- ### 4. Verdict
73
+ ### 4. False-positive gate — restate before you flag
74
+
75
+ Before an issue enters the verdict, restate as one falsifiable sentence naming the concrete input or state that triggers it + wrong behavior that follows. Issue whose trigger you cannot name from the diff is not a finding — drop it (or return `revise` asking for missing context, never a speculative flag).
76
+
77
+ For 🔴 findings, run devil's-advocate pass before finalizing: actively try to refute (guard upstream in same diff? caller already validates? branch unreachable for claimed input?). Models systematically overrate severity — a 🔴 that survives refutation is credible; one never challenged is noise. Reject rationalizations "it looks wrong" (pattern-recognition is not analysis) and "flag it just in case" (over-reporting erodes the verdict's trust).
78
+
79
+ ### 5. Verdict
74
80
 
75
81
  | Verdict | When to return it |
76
82
  |---|---|
@@ -188,6 +188,16 @@ When generating Laravel code:
188
188
  - Do NOT use facades in service classes — use dependency injection.
189
189
  - Do NOT skip middleware for route groups that need authentication.
190
190
 
191
+ ## Known pitfalls
192
+
193
+ | Symptom | Root cause | Fix |
194
+ |---|---|---|
195
+ | A list endpoint fires hundreds of queries / is slow under load | N+1: a relation is accessed inside a loop without eager loading | Eager-load with `with('relation')`; enable `Model::preventLazyLoading()` in non-prod to catch it early |
196
+ | Config changes / new env vars have no effect in production | `config:cache` cached the old config, and `env()` returns `null` once config is cached | Read env only in `config/*`, use `config()` elsewhere; re-run `config:cache` on deploy |
197
+ | A form field silently isn't saved | The attribute isn't in `$fillable` and mass-assignment drops it | Add it to `$fillable` (or set it explicitly); never blanket-`$guarded = []` on user input |
198
+ | Queued jobs never run / run with stale code | No worker is running, or workers weren't restarted after a deploy so they hold the old code in memory | Run/supervise `queue:work`; `queue:restart` on every deploy |
199
+ | Timestamps or times are off by hours | Comparing/formatting a Carbon instance without honoring `config('app.timezone')` vs the DB's UTC storage | Store UTC; convert for display; set the app timezone explicitly, don't assume server local time |
200
+
191
201
  ## Gotcha
192
202
 
193
203
  - `env()` only works in config files — use `config()` everywhere else.
@@ -68,6 +68,41 @@ Walk the diff with the following gates:
68
68
  Cells without evidence block the launch — surface, do not
69
69
  hand-wave.
70
70
 
71
+ ### 2b. Epistemics block — the diagnostic report (contract-backed)
72
+
73
+ For a consumer-facing diagnostic (not just the merge decision), emit a
74
+ report per [`docs/contracts/prelaunch-diagnostics.md`](../../../docs/contracts/prelaunch-diagnostics.md)
75
+ (schema: `prelaunch-report.schema.json`). Rules:
76
+
77
+ - **Coverage backbone** — diagnose exactly the fixed area vocabulary
78
+ (`prelaunch-areas.yml`): auth · migrations · secrets · observability ·
79
+ rollback · agent-governance. No ad-hoc areas.
80
+ - **Every area gets one state:** `pass` (cited evidence REQUIRED) ·
81
+ `finding` (IDs listed) · `unknown` (honest default — **absence of
82
+ findings is Unknown, never an automatic Pass**) · `not-applicable`
83
+ (reason required).
84
+ - **Findings carry immutable IDs** (`AC-<AREA>-NNN`) — retitle freely,
85
+ never re-assign; the ID is the diff key across runs.
86
+ - **Verdict:** any open P0 → NOT ready, regardless of every other area;
87
+ any open P1 or a launch-gate area not at pass/N-A → NOT ready. Ready is
88
+ the residual state, never the default.
89
+ - **Questions section** — list the questions that would change the
90
+ diagnosis; the next run converts them into evidence or findings.
91
+ - Validate + verdict via
92
+ `./scripts-run src/scripts/prelaunch_diagnostics validate <report.json>`;
93
+ regression-gate against the committed baseline via
94
+ `… diff <baseline> <current> --ci` (contract § 4–6).
95
+
96
+ ### 2c. Fix loop (approval-gated, read-only diagnostic)
97
+
98
+ Rank open findings by severity, then launch-gate membership; propose the
99
+ **safest first approval batch** (reversible, small blast radius — explicitly
100
+ not the full backlog). Status vocabulary per finding: `open · fixed ·
101
+ accepted-risk · deferred-with-reason · suppressed-with-evidence ·
102
+ not-applicable` — everything except open/fixed carries a reason. Rescore
103
+ whenever evidence changes. The diagnostic itself never mutates the project;
104
+ fixes flow through the normal approval-gated engines.
105
+
71
106
  ### 3. Plan the rollout
72
107
 
73
108
  - **Mechanism** — flag, canary cohort, blue-green, immediate.
@@ -0,0 +1,146 @@
1
+ ---
2
+ model_tier: inherit
3
+ name: llm-provider-knowledge
4
+ description: "Before stating any specific fact about an LLM provider's product — models, pricing, limits, context windows, SDK/API — for OpenAI, Gemini, Claude & others, verify against official docs, not memory."
5
+ source: package
6
+ domain: process
7
+ personas: []
8
+ workspaces:
9
+ - agent-config-maintainer
10
+ - engineering
11
+ - product
12
+ - founder
13
+ - small-business
14
+ - gtm
15
+ - ops
16
+ packs:
17
+ - meta
18
+ trust:
19
+ level: experimental
20
+ install:
21
+ removable: true
22
+ execution:
23
+ type: manual
24
+ ---
25
+
26
+ # llm-provider-knowledge
27
+
28
+ Verify LLM-provider product facts against **official documentation**, never
29
+ memory. This skill is the multi-provider sibling of Claude Code's bundled
30
+ `product-self-knowledge` — extended to OpenAI, Google Gemini, Anthropic,
31
+ Mistral, xAI, DeepSeek, Cohere, and Meta Llama, and portable to every host this
32
+ package projects to (not just Claude Code).
33
+
34
+ **This skill is a signpost, not a library.** It routes you to the authoritative
35
+ source and forces a source-cited answer. It does **not** cache model IDs,
36
+ context windows, prices, or rate limits — those churn constantly, and a cached
37
+ copy is exactly the stale "from memory" answer this skill exists to prevent.
38
+
39
+ ## When to use
40
+
41
+ - Your reply would state a specific fact about a provider's product: a model ID
42
+ or its context window, token pricing, a rate/quota limit, an SDK/API detail
43
+ (endpoint, parameter, auth, batch, streaming, function-calling shape), or a
44
+ consumer-app plan limit (ChatGPT/Gemini/Claude app tiers).
45
+ - Coding against a provider SDK where a wrong model name, parameter, or limit
46
+ would break at runtime.
47
+ - Content or comparisons that assert provider capabilities or pricing.
48
+ - Any time you would otherwise answer such a fact from training data — it may be
49
+ outdated or wrong.
50
+
51
+ ## When NOT to fire
52
+
53
+ - Ordinary SDK code that asserts **no** product fact (wiring a call whose model
54
+ and params the user already gave).
55
+ - The user already supplied the verified fact — use it; don't re-litigate.
56
+ - Writing provider-specific prompt grammar → `prompt-engineering-patterns`.
57
+ - Choosing which model to use for the host → `model-recommendation` (never
58
+ recommend another vendor's model over the host's; this skill only reports
59
+ facts, it does not steer model choice).
60
+ - Image-provider selection → `image-provider-routing`.
61
+
62
+ ## Core principles
63
+
64
+ 1. **Accuracy over guessing** — if unsure, route to the docs; never assert.
65
+ 2. **Distinguish products** — a provider's API, its developer platform, and its
66
+ consumer app are separate surfaces with separate facts and separate docs.
67
+ 3. **Source everything** — every product fact in the reply carries an official
68
+ URL. No URL → not verified → don't state it as fact.
69
+ 4. **Route, don't cache** — hand off to the live docs; do not transcribe
70
+ volatile specs into the reply as if durable.
71
+
72
+ ## Provider routing table
73
+
74
+ Route to the **stable root** and read live from there — do not deep-link to
75
+ pages that churn. Prefer a provider's machine-readable index where one exists.
76
+
77
+ | Provider | Docs root | API reference | Product / support |
78
+ |---|---|---|---|
79
+ | **OpenAI** (GPT) | `platform.openai.com/docs` | `platform.openai.com/docs/api-reference` | `help.openai.com` |
80
+ | **Google Gemini** | `ai.google.dev/gemini-api/docs` | `ai.google.dev/api` | `support.google.com` (Gemini app) |
81
+ | **Anthropic** (Claude) | `docs.claude.com/en/docs` (index: `/en/docs_site_map.md`) | `docs.claude.com/en/api/overview` | `support.claude.com` |
82
+ | **Mistral** | `docs.mistral.ai` | `docs.mistral.ai/api` | `help.mistral.ai` |
83
+ | **xAI** (Grok) | `docs.x.ai` | `docs.x.ai/developers` | `x.ai` |
84
+ | **DeepSeek** | `api-docs.deepseek.com` | `api-docs.deepseek.com/api` | `platform.deepseek.com` |
85
+ | **Cohere** | `docs.cohere.com` (index: `docs.cohere.com/llms.txt`) | `docs.cohere.com/reference` | `dashboard.cohere.com` |
86
+ | **Meta Llama** | `llama.com` (dev docs: `ai.developer.meta.com/docs`) | `ai.developer.meta.com/docs` | `llama.com` |
87
+
88
+ **Claude Code specifics** (install, Node.js requirement, MCP, config):
89
+ `docs.anthropic.com/en/docs/claude-code/claude_code_docs_map.md`.
90
+
91
+ **Hosted access** (not a distinct vendor): Azure OpenAI, AWS Bedrock, and
92
+ Google Vertex AI resell the underlying vendor's models. Route to BOTH the
93
+ underlying vendor's row above AND the cloud's own docs (`learn.microsoft.com`,
94
+ `docs.aws.amazon.com/bedrock`, `cloud.google.com/vertex-ai`) — model IDs,
95
+ quotas, and regions differ from the vendor's direct API.
96
+
97
+ ## Procedure
98
+
99
+ 1. **Identify the provider and the surface** — API / developer platform /
100
+ consumer app. A ChatGPT-Plus limit is not an OpenAI-API rate limit.
101
+ 2. **Pick the row + column** from the table; go to the stable root.
102
+ 3. **Read the live docs** for the exact fact (navigate from the root; follow
103
+ the provider's own index / `llms.txt` where present).
104
+ 4. **State the fact with its source URL.** If the docs can't be reached or are
105
+ ambiguous, say so and point the user at the root rather than guessing.
106
+ 5. **Never transcribe a volatile spec as durable** — frame it as "per <URL> as
107
+ of now"; the source is authoritative, the reply is a pointer.
108
+
109
+ ## Output format
110
+
111
+ Every reply that states a provider product fact MUST include:
112
+
113
+ 1. **The fact, scoped to the product surface** — name the provider AND which
114
+ surface (API / platform / consumer app) it applies to.
115
+ 2. **The official source URL** — the specific docs page the fact came from (or
116
+ the stable root when you're directing the user to read it themselves).
117
+ 3. **A freshness caveat when the fact is volatile** (pricing, limits, model
118
+ availability): "verify at <URL> — these change without notice."
119
+
120
+ ## Do NOT
121
+
122
+ - **Do NOT** state a model ID, context window, price, or rate limit from
123
+ memory — route to the docs and cite the URL, or say you're unsure.
124
+ - **Do NOT** transcribe a volatile spec (pricing, limits, model availability)
125
+ into the reply as if durable — frame it as "per <URL> as of now".
126
+ - **Do NOT** conflate a provider's API with its consumer app — they carry
127
+ different limits and different docs.
128
+ - **Do NOT** steer the user to another vendor's model over the host's — that is
129
+ `model-recommendation`; this skill reports facts neutrally.
130
+ - **Do NOT** cache a provider's docs into this skill. When a root URL moves,
131
+ fix the one table row; a mismatch a user reports is a signal to correct the
132
+ row, never to start transcribing pages here.
133
+
134
+ ## Gotcha
135
+
136
+ - **Provider docs URLs churn** (Meta's Llama dev-docs host redirected during
137
+ this skill's authoring). That is *why* the skill links to stable roots and
138
+ reads live — a deep-linked page memorised here would rot. If a root itself
139
+ moves, fix the one table row; never start caching pages to compensate.
140
+ - **Do not conflate surfaces.** "Gemini" the app and the Gemini API have
141
+ different limits and different docs; the same for ChatGPT vs the OpenAI API
142
+ and Claude.ai vs the Claude API.
143
+ - **Redundant with the harness on Claude Code.** Claude Code's own
144
+ `product-self-knowledge` also fires for Anthropic facts — both route to the
145
+ same Anthropic docs, so the overlap is harmless. On every other host this is
146
+ the only such skill.
@@ -0,0 +1,20 @@
1
+ {
2
+ "skill": "llm-provider-knowledge",
3
+ "last_eval": "2026-07-14",
4
+ "description": "7 should-trigger + 6 should-not-trigger. Should-trigger covers specific product-fact claims (context window, pricing, rate limit, API detail, model spec, consumer-app plan limit) across OpenAI, Google, Anthropic, Mistral, DeepSeek, Cohere. Should-not-trigger covers near-misses: SDK wiring with a user-supplied model, prompt authoring (prompt-engineering-patterns), model choice for the host (model-recommendation), image-provider selection (image-provider-routing), a user-supplied fact, and a plain SDK refactor.",
5
+ "queries": [
6
+ {"q": "what's the context window of GPT-5?", "trigger": true},
7
+ {"q": "how much does Gemini 2.5 Pro cost per million input tokens?", "trigger": true},
8
+ {"q": "what are the rate limits on the Anthropic API for tier 1?", "trigger": true},
9
+ {"q": "does the Mistral API support function calling, and what parameter enables it?", "trigger": true},
10
+ {"q": "what's the max output length for DeepSeek's chat model?", "trigger": true},
11
+ {"q": "how many messages does ChatGPT Plus allow in the app per window?", "trigger": true},
12
+ {"q": "what embedding dimension does Cohere's embed model return?", "trigger": true},
13
+ {"q": "wire up an openai chat completions call using the model id I already gave you", "trigger": false, "note": "SDK wiring; user supplied the model — no unverified product fact asserted"},
14
+ {"q": "write a good prompt to make Gemini summarize this document", "trigger": false, "note": "prompt authoring → prompt-engineering-patterns"},
15
+ {"q": "which model should I use for this task on my current host?", "trigger": false, "note": "model choice → model-recommendation (never steer to another vendor)"},
16
+ {"q": "route this logo-with-text image to the right generation provider", "trigger": false, "note": "image-provider selection → image-provider-routing"},
17
+ {"q": "I already know Claude Sonnet has a 200k context window — just use that number", "trigger": false, "note": "user supplied the verified fact; use it, do not re-litigate"},
18
+ {"q": "refactor this function that calls the Anthropic SDK to add retries", "trigger": false, "note": "plain code refactor; asserts no product fact"}
19
+ ]
20
+ }
@@ -43,6 +43,27 @@ For each conflicted file:
43
43
  3. **Understand "theirs"** — what does the incoming branch intend?
44
44
  4. **Check if both changes are needed** — often both sides added different things.
45
45
 
46
+ ### 2b. Merge Resolution Plan — mandatory before touching a conflict
47
+
48
+ After reading both sides, write the plan; under `autonomous-execution` the
49
+ approval gate applies (a standing mandate states the plan and proceeds; an
50
+ interactive session surfaces it and waits):
51
+
52
+ ```
53
+ ## Merge Resolution Plan
54
+ - Conflicts: {N files / M hunks}
55
+ - Execution order: {dependency leaves first — a file nothing else imports
56
+ resolves before the files that import it}
57
+ | file | strategy | rationale |
58
+ |---|---|---|
59
+ - Decisions needed from the user: {semantic/deleted-modified items, or none}
60
+ - Validation: {targeted checks to run after resolution}
61
+ ```
62
+
63
+ **Backup before resolution:** every deleted-modified file is copied to a
64
+ temp path (`$TMPDIR/merge-backup-<ts>/<file>`) and the path noted in the
65
+ plan BEFORE any resolution touches it.
66
+
46
67
  ### 3. Resolution strategies
47
68
 
48
69
  | Situation | Strategy |
@@ -54,6 +75,8 @@ For each conflicted file:
54
75
  | Migration conflicts (same timestamp) | **Rename** — adjust timestamp to avoid collision |
55
76
  | Auto-generated files (OpenAPI spec, baselines) | **Regenerate** — resolve source, then regenerate the output |
56
77
  | Formatting-only conflicts | **Accept either** — then run quality tools to normalize |
78
+ | Import-block conflicts (both sides added imports) | **Keep both** — union the imports, drop duplicates, let the linter order them |
79
+ | Binary files (images, archives, compiled assets) | **Pick one side whole** — never splice; regenerate from source if generated, else ask which side wins |
57
80
 
58
81
  ### 4. File-type specific rules (stack-aware)
59
82
 
@@ -104,6 +127,13 @@ For each conflicted file:
104
127
  - Import statement ordering
105
128
  - Formatting-only differences
106
129
 
130
+ ### 5b. Resolution log — one line per conflict
131
+
132
+ Every resolved conflict gets a one-line explanation ("kept both — additive
133
+ imports"; "took theirs — lockfile regenerated") collected into the final
134
+ summary: the auditable log the reviewer reads instead of re-deriving each
135
+ hunk decision.
136
+
107
137
  ### 6. Verify after resolution
108
138
 
109
139
  After resolving ALL conflicts:
@@ -0,0 +1,101 @@
1
+ ---
2
+ model_tier: medium
3
+ name: pdf-tools
4
+ description: "Use when creating, merging, splitting, filling, or extracting from a PDF — library-per-task, output validated. Triggers on 'merge these PDFs', 'fill this PDF form', 'split the PDF', 'create a PDF'."
5
+ status: active
6
+ tier: senior
7
+ domain: process
8
+ compatibility: "Requires consumer-installed PDF libraries: pypdf (merge/split/rotate/encrypt/extract), reportlab (create), a form library for AcroForm fill; an OCR engine (e.g. tesseract) only for the OCR task. No LibreOffice dependency. Ships zero runtime in this package."
9
+ workspaces:
10
+ - agent-config-maintainer
11
+ packs:
12
+ - meta
13
+ ---
14
+
15
+ # pdf-tools
16
+
17
+ Wing-1 engineering skill for **PDF write/transform** — `markitdown` reads a PDF
18
+ to Markdown; this creates, merges, fills, and extracts. Ships zero runtime: the
19
+ agent drives libraries the consumer has. Pattern re-implementation only.
20
+
21
+ ## When to use
22
+
23
+ - "Merge / split / rotate / encrypt these PDFs."
24
+ - "Fill this PDF form (AcroForm) with these values."
25
+ - "Create a PDF from this content."
26
+ - "Extract the text / tables from this PDF" (structured extraction beyond `markitdown`'s Markdown).
27
+ - "OCR this scanned PDF."
28
+
29
+ Do NOT use for: PDF → Markdown ingestion (`markitdown`); Word (`docx-authoring`).
30
+
31
+ ## Procedure
32
+
33
+ ### 1. Library per task — do not force one tool
34
+
35
+ | Task | Library path |
36
+ |---|---|
37
+ | merge / split / rotate / encrypt | pypdf — page-level operations, no rendering |
38
+ | create from content | reportlab (canvas / platypus) |
39
+ | form-fill (AcroForm) | a form-aware library; map field name → value, then flatten if the form must not be re-editable |
40
+ | text / table extraction | a text-layer extractor; tables need a layout-aware pass, not naive text |
41
+ | OCR (scanned/image PDF) | an OCR engine over rasterized pages — ONLY when there is no text layer |
42
+
43
+ ### 2. Decide flatten-or-keep on form fills
44
+
45
+ A filled AcroForm stays editable unless flattened. Flatten when the PDF is a
46
+ final artifact (an invoice, a signed form); keep fields when the recipient must
47
+ edit further. State which you chose — a silently-editable "final" form is a
48
+ correctness bug.
49
+
50
+ ### 3. Validate — assert output validity, do not trust the write
51
+
52
+ 1. Re-open the output with pypdf; assert `len(reader.pages)` matches the expected count (merge = sum; split = 1 per part).
53
+ 2. For a form-fill: read back one field value (pre-flatten) or extract the rendered text (post-flatten) and assert the value is present.
54
+ 3. For create: assert the file opens and page 1 carries expected text.
55
+
56
+ ## Output format
57
+
58
+ 1. The output PDF path(s).
59
+ 2. Validation: page count matches expected ✅, read-back value/text present ✅.
60
+ 3. For fills: flatten decision stated (flattened / kept-editable + why).
61
+
62
+ ## Gotcha
63
+
64
+ **OCR is a last resort, not the default extraction path.** Running OCR over a
65
+ PDF that already has a text layer produces worse output (OCR errors) than the
66
+ existing text and burns time. Check for a text layer first; OCR only when it is
67
+ genuinely absent.
68
+
69
+ - **Editable "final" form:** a filled AcroForm left un-flattened ships as a "signed invoice" the recipient can silently alter → flatten when the artifact is final.
70
+
71
+ ## Do NOT
72
+
73
+ - Do NOT bundle a Python toolkit in this package — drive the consumer's libraries (zero-runtime posture).
74
+ - Do NOT OCR a PDF that has a text layer.
75
+ - Do NOT leave a "final" filled form editable without saying so.
76
+ - Do NOT claim success on "file written"; claim it only after the re-open + page-count assertion.
77
+
78
+ ## Related Skills
79
+
80
+ **WHEN to use this**
81
+
82
+ - The task creates, merges, splits, rotates, encrypts, or form-fills a PDF.
83
+ - Structured text/table extraction beyond `markitdown`'s Markdown, or OCR of a scanned PDF.
84
+
85
+ **WHEN NOT to use this**
86
+
87
+ - PDF → Markdown ingestion → [`markitdown`](../markitdown/SKILL.md).
88
+ - Word documents → [`docx-authoring`](../docx-authoring/SKILL.md); spreadsheets → [`spreadsheet-authoring`](../spreadsheet-authoring/SKILL.md).
89
+
90
+ ## When the agent should load this
91
+
92
+ - "Merge / split / rotate these PDFs."
93
+ - "Fill this PDF form."
94
+ - "Create a PDF from this content."
95
+ - "Extract the tables from this PDF / OCR this scan."
96
+
97
+ ## Output
98
+
99
+ 1. **Output PDF(s)** — the path(s). Cite as `pdf-output`.
100
+ 2. **Validation receipt** — page count matches expected ✅, read-back value/text present ✅. Cite as `pdf-validation`.
101
+ 3. **Fill decision** — present on form-fills: flattened / kept-editable + why. Cite as `pdf-fill-decision`.
@@ -0,0 +1,15 @@
1
+ {
2
+ "skill": "quality-tools",
3
+ "_calibration": "Seed for eval-schema v2 (ecosystem-harvest skill-quality-gates Phase 2). tool-choice + trajectory assertions are trace-gated: pass:null (manual-pending) in CI until a recorded tool-trace.json exists.",
4
+ "scenarios": [
5
+ {
6
+ "id": "runs-project-pinned-tools",
7
+ "prompt": "Fix the failing lint on the changed files.",
8
+ "environment": "a project whose pinned quality CLI is defined in its task runner",
9
+ "assertions": [
10
+ { "kind": "tool-choice", "must_use": ["bash"], "must_not_use": [] },
11
+ { "kind": "trajectory_budget", "n": 8 }
12
+ ]
13
+ }
14
+ ]
15
+ }
@@ -40,6 +40,30 @@ Do NOT use when:
40
40
 
41
41
  ## Procedure: Security audit
42
42
 
43
+ ### 0. False-positive gate — restate the claim before reporting
44
+
45
+ Before any finding enters report, restate as one falsifiable sentence naming all three:
46
+
47
+ 1. **Privilege level** — access attacker already has (anonymous, authenticated user, tenant admin, CI runner).
48
+ 2. **Execution context** — where vulnerable code runs (request handler, queue worker, sandboxed template, build step).
49
+ 3. **Attacker precondition** — concrete state or input attacker must control to trigger it.
50
+
51
+ Any of the three not concretely nameable → **not a finding yet** — trace further or drop with one-line reason.
52
+
53
+ **Rationalizations to Reject:**
54
+
55
+ | Rationalization | Reality |
56
+ |---|---|
57
+ | "It looks dangerous" | Pattern-recognition is not analysis — trace the full data flow from entry to sink first |
58
+ | "This is clearly critical" | Complete a devil's-advocate pass — models systematically overrate severity |
59
+ | "Report it just in case" | Over-reporting erodes trust; an unverifiable finding is noise, not diligence |
60
+ | "Same pattern as a known CVE" | Same pattern ≠ same preconditions — verify the preconditions hold in THIS codebase |
61
+
62
+ **Standard vs. Deep verification routing:**
63
+
64
+ - **Standard** — traced data flow + all three claim elements named → report with normal field list.
65
+ - **Deep** — severity High/Critical, OR precondition chain crosses trust boundary you did not trace → devil's-advocate pass first: actively try to refute finding (existing middleware? framework default? type system? config?). Report only what survives; killed findings listed one-line under *Rejected candidates* so triage is auditable.
66
+
43
67
  ### 1. Map attack surface
44
68
 
45
69
  Identify all entry points where untrusted data enters:
@@ -78,6 +102,9 @@ User Input → Controller → Validation → Service → DB/File/External
78
102
  | **Secret exposure** | Hardcoded credentials, secrets in logs, `.env` in public dir |
79
103
  | **Rate limiting** | Missing throttle on auth endpoints, password reset, API |
80
104
  | **Header injection** | User input in response headers, email headers |
105
+ | **Insecure defaults / fail-open** | Guards that allow on error (`catch { return true }` in an authz check), default-allow matchers, debug mode defaulting on, permissive CORS/`verify=false` fallbacks, feature flags whose missing value grants access |
106
+
107
+ Worked example (fail-open): `if (!$gate->check($user)) { … }` wrapped in `try/catch` that logs and **continues** fails open — exception in gate grants access. Finding shape: Category *Insecure defaults*, Evidence the catch block `file:line`, Fix *fail closed — rethrow or deny on gate error*.
81
108
 
82
109
  ### 4. Framework-specific checks
83
110
 
@@ -108,6 +135,8 @@ For each vulnerability:
108
135
  - **Fix:** concrete mitigation
109
136
  - **Confidence:** Low / Medium / High
110
137
 
138
+ After findings, add **Rejected candidates** section: one line per look-dangerous-but-benign pattern the Step-0 gate killed, with traced reason ("raw SQL string is a static migration constant — no user input reaches it"). Audit that rejects nothing has usually skipped the gate.
139
+
111
140
  ## Integration with other skills
112
141
 
113
142
  - **analysis-autonomous-mode** — routes here when security concerns are detected
@@ -0,0 +1,90 @@
1
+ ---
2
+ model_tier: high
3
+ name: security-maturity-assessment
4
+ description: "Use when the user wants a security-maturity scorecard / posture assessment of a module — category ratings with evidence, not a vulnerability hunt. Also on 'wie sicher ist dieses Modul aufgestellt?'"
5
+ domain: quality
6
+ workspaces:
7
+ - engineering
8
+ packs:
9
+ - engineering-base
10
+ ---
11
+
12
+ # security-maturity-assessment
13
+
14
+ Rate how mature a module's security **posture** is — category by category, every rating backed by `file:line` evidence — instead of hunting individual vulnerabilities. Output is a scorecard a maintainer can re-run and diff, not a finding list.
15
+
16
+ ## When to use
17
+
18
+ - "How mature / well-set-up is this module's security?" — posture, not holes
19
+ - Baseline before a hardening effort, or re-assessment after one
20
+ - A stakeholder needs a defensible rating per category with cited evidence
21
+
22
+ Do NOT use when:
23
+
24
+ - Hunting concrete vulnerabilities — route to [`security-audit`](../security-audit/SKILL.md)
25
+ - One route/action's authorization chain — route to [`authz-review`](../authz-review/SKILL.md)
26
+ - Pre-implementation threat model for a new feature — route to [`threat-modeling`](../threat-modeling/SKILL.md)
27
+ - Writing new secure code — route to [`security`](../security/SKILL.md)
28
+ - AI-agent config/behaviour review — route to [`agent-security-review`](../agent-security-review/SKILL.md)
29
+
30
+ ## The nine categories
31
+
32
+ | # | Category | Critical? | What to inspect |
33
+ |---|---|---|---|
34
+ | 1 | Input validation | **Yes** | Request-boundary validation primitives on every entry point; no inline ad-hoc checks |
35
+ | 2 | Authorization | **Yes** | Per-object ownership/tenant checks, policy coverage, field-level access |
36
+ | 3 | Secrets handling | **Yes** | No hardcoded creds; env/vault usage; secrets absent from logs and VCS |
37
+ | 4 | Error handling | No | No swallowed exceptions; no stack traces / internals leaked to clients |
38
+ | 5 | Logging & audit | No | Security events (auth, permission denials, admin actions) logged; no PII in logs |
39
+ | 6 | Dependency hygiene | No | Lockfiles present; known-CVE scan wired; update cadence visible |
40
+ | 7 | Data boundaries | No | Serializers/resources whitelist fields; exports/queues don't leak internals |
41
+ | 8 | Tenant isolation | **Yes** (multi-tenant only; else N/A) | Tenant scoping on queries, jobs, caches; cross-tenant negative tests |
42
+ | 9 | Security test coverage | No | Negative tests exist (401/403/404 paths, abuse cases), not only happy-path |
43
+
44
+ ## Rating rubric
45
+
46
+ | Rating | Meaning |
47
+ |---|---|
48
+ | **Missing** | No control exists for the category |
49
+ | **Weak** | Ad-hoc, inconsistent — some paths covered, most not |
50
+ | **Moderate** | Control present and usual, with named gaps |
51
+ | **Satisfactory** | Consistent across the surface; minor gaps only |
52
+ | **Strong** | Consistent AND enforced (CI gate, test, linter) or negatively tested |
53
+
54
+ ## Procedure
55
+
56
+ 1. **Scope** — name the module/paths under assessment; list entry points (routes, jobs, commands, webhooks). Scorecard without stated scope is not reproducible.
57
+ 2. **Assess each category** — inspect the code the category names. Every rating cites evidence:
58
+ - Positive evidence: `file:line` of the control (`app/Http/Requests/…:12`).
59
+ - Absence evidence: the searches run that came back empty (name the grep patterns) — "not found" beats "probably missing".
60
+ - Multi-tenant N/A: single-tenant systems rate category 8 `N/A`; drops out of the roll-up.
61
+ 3. **Roll up deterministically** — overall rating is computed, not vibed:
62
+ - `overall = min( median(all rated categories), one step above the lowest critical-category rating )`
63
+ - Consequences: any critical category **Missing** caps overall at **Weak**; any critical **Weak** caps overall at **Moderate**. Non-critical categories move the median but never lift the cap.
64
+ 4. **Recommend** — max 3 next steps, ordered by which would raise the overall rating (fix the lowest critical category first).
65
+
66
+ ## Output format
67
+
68
+ 1. **Scope block** — module/paths + entry-point list, so the scorecard is re-runnable.
69
+ 2. **Scorecard table** — one row per category: `Category | Rating | Evidence (file:line or named empty searches) | Gap`. Every row MUST carry evidence; a rating without a citation is invalid.
70
+ 3. **Overall rating** — with the roll-up shown (`median=…, lowest critical=…, cap=… → overall=…`), never a bare verdict.
71
+ 4. **Top-3 next steps** — ordered by roll-up impact.
72
+
73
+ ## Gotcha
74
+
75
+ - The model tends to rate from vibes ("looks well-structured") — a rating row without `file:line` or named empty searches is invalid; redo it.
76
+ - Don't let a Strong non-critical category mask a Weak critical one — the cap rule exists precisely because a polished logging setup does not offset missing authorization.
77
+ - A vulnerability found mid-assessment is **out of scope** for the scorecard — note it and route to [`security-audit`](../security-audit/SKILL.md) (with its false-positive gate) instead of inlining findings here.
78
+
79
+ ## Do NOT
80
+
81
+ - Do NOT emit a rating without evidence — every row cites `file:line` or the empty searches that prove absence.
82
+ - Do NOT average away critical categories — the deterministic cap always wins.
83
+ - Do NOT turn the scorecard into a finding list — posture assessment and vulnerability hunting are different deliverables.
84
+ - Do NOT assess unscoped ("the whole app") when the user named a module.
85
+
86
+ ## See also
87
+
88
+ - [`security-audit`](../security-audit/SKILL.md) — vulnerability hunting with the false-positive gate.
89
+ - [`defense-in-depth`](../defense-in-depth/SKILL.md) — layering controls the scorecard checks for.
90
+ - [`ai-code-blindspots`](../ai-code-blindspots/SKILL.md) — the per-surface invisible-controls checklist.