@event4u/agent-config 9.26.0 → 9.28.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 (252) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +12 -11
  3. package/CHANGELOG.md +134 -207
  4. package/README.md +1 -1
  5. package/dist/agent-src/commands/analyze/conformance.md +43 -0
  6. package/dist/agent-src/commands/roadmap/next.md +65 -3
  7. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +10 -3
  8. package/dist/agent-src/rules/active-remediation.md +2 -0
  9. package/dist/agent-src/rules/analysis-skill-routing.md +2 -0
  10. package/dist/agent-src/rules/architecture.md +2 -0
  11. package/dist/agent-src/rules/artifact-drafting-protocol.md +2 -0
  12. package/dist/agent-src/rules/artifact-engagement-recording.md +6 -1
  13. package/dist/agent-src/rules/augment-edit-discipline.md +2 -0
  14. package/dist/agent-src/rules/autonomous-execution.md +3 -1
  15. package/dist/agent-src/rules/brand-consistency.md +2 -0
  16. package/dist/agent-src/rules/brand-source-of-truth.md +35 -6
  17. package/dist/agent-src/rules/broken-access-control.md +2 -0
  18. package/dist/agent-src/rules/cli-output-handling.md +2 -0
  19. package/dist/agent-src/rules/code-comment-discipline.md +2 -0
  20. package/dist/agent-src/rules/code-provenance.md +2 -0
  21. package/dist/agent-src/rules/command-suggestion-policy.md +2 -0
  22. package/dist/agent-src/rules/commit-conventions.md +2 -0
  23. package/dist/agent-src/rules/communication-through-line.md +2 -0
  24. package/dist/agent-src/rules/content-quoting-floor.md +2 -0
  25. package/dist/agent-src/rules/context-hygiene.md +13 -1
  26. package/dist/agent-src/rules/copilot-routing.md +2 -0
  27. package/dist/agent-src/rules/council-availability.md +93 -0
  28. package/dist/agent-src/rules/cross-source-consistency.md +5 -0
  29. package/dist/agent-src/rules/decision-revisit-gate.md +2 -0
  30. package/dist/agent-src/rules/delegation-policy.md +31 -5
  31. package/dist/agent-src/rules/design-fidelity.md +5 -0
  32. package/dist/agent-src/rules/design-review-after-ui-write.md +4 -0
  33. package/dist/agent-src/rules/devcontainer-routing.md +2 -0
  34. package/dist/agent-src/rules/doc-screenshot-hygiene.md +2 -0
  35. package/dist/agent-src/rules/docker-commands.md +2 -0
  36. package/dist/agent-src/rules/domain-adoption-policy.md +2 -0
  37. package/dist/agent-src/rules/domain-safety-disclaimer.md +2 -0
  38. package/dist/agent-src/rules/domain-safety-pii.md +2 -0
  39. package/dist/agent-src/rules/domain-safety-retention.md +2 -0
  40. package/dist/agent-src/rules/downstream-changes.md +2 -0
  41. package/dist/agent-src/rules/engineering-safety-floor.md +2 -0
  42. package/dist/agent-src/rules/evaluator-independence.md +14 -3
  43. package/dist/agent-src/rules/external-code-graph-interop.md +4 -1
  44. package/dist/agent-src/rules/external-reference-deep-dive.md +2 -0
  45. package/dist/agent-src/rules/fast-path-marker-visibility.md +2 -0
  46. package/dist/agent-src/rules/finance-safety-floor.md +3 -1
  47. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +2 -0
  48. package/dist/agent-src/rules/git-history-discipline.md +3 -1
  49. package/dist/agent-src/rules/guidelines.md +2 -0
  50. package/dist/agent-src/rules/history-discipline.md +5 -1
  51. package/dist/agent-src/rules/icon-consistency.md +2 -0
  52. package/dist/agent-src/rules/image-likeness-and-rights.md +2 -0
  53. package/dist/agent-src/rules/improve-before-implement.md +2 -0
  54. package/dist/agent-src/rules/invite-challenge.md +2 -0
  55. package/dist/agent-src/rules/laravel-routing.md +2 -0
  56. package/dist/agent-src/rules/laravel-translations.md +2 -0
  57. package/dist/agent-src/rules/legal-safety-floor.md +3 -1
  58. package/dist/agent-src/rules/lethal-trifecta-guard.md +2 -0
  59. package/dist/agent-src/rules/linked-projects-onboarding-gate.md +2 -0
  60. package/dist/agent-src/rules/low-impact-corpus-privacy-floor.md +2 -0
  61. package/dist/agent-src/rules/markdown-safe-codeblocks.md +2 -0
  62. package/dist/agent-src/rules/media-governance-routing.md +2 -0
  63. package/dist/agent-src/rules/media-sync-ground-truth.md +2 -0
  64. package/dist/agent-src/rules/minimal-safe-diff.md +2 -0
  65. package/dist/agent-src/rules/missing-tool-handling.md +2 -0
  66. package/dist/agent-src/rules/model-recommendation.md +2 -0
  67. package/dist/agent-src/rules/no-attribution-footers.md +2 -0
  68. package/dist/agent-src/rules/no-decorative-emojis-in-git-surfaces.md +2 -0
  69. package/dist/agent-src/rules/no-pr-progress-comments.md +5 -1
  70. package/dist/agent-src/rules/no-roadmap-references.md +2 -0
  71. package/dist/agent-src/rules/notes-first-reasoning.md +2 -0
  72. package/dist/agent-src/rules/onboarding-gate.md +5 -1
  73. package/dist/agent-src/rules/output-discipline.md +2 -0
  74. package/dist/agent-src/rules/package-ci-checks.md +2 -0
  75. package/dist/agent-src/rules/persona-governance.md +2 -0
  76. package/dist/agent-src/rules/php-coding.md +2 -0
  77. package/dist/agent-src/rules/prefer-enums-over-literals.md +2 -0
  78. package/dist/agent-src/rules/preservation-guard.md +2 -0
  79. package/dist/agent-src/rules/provider-lifecycle-discipline.md +2 -0
  80. package/dist/agent-src/rules/question-not-instruction.md +2 -0
  81. package/dist/agent-src/rules/reviewer-awareness.md +2 -0
  82. package/dist/agent-src/rules/roadmap-ci-steps-policy.md +6 -1
  83. package/dist/agent-src/rules/roadmap-progress-sync.md +2 -0
  84. package/dist/agent-src/rules/role-mode-adherence.md +3 -1
  85. package/dist/agent-src/rules/rule-type-governance.md +2 -0
  86. package/dist/agent-src/rules/runtime-safety.md +2 -0
  87. package/dist/agent-src/rules/scale-discipline.md +5 -1
  88. package/dist/agent-src/rules/secret-vcs-guard.md +2 -0
  89. package/dist/agent-src/rules/security-sensitive-stop.md +2 -0
  90. package/dist/agent-src/rules/self-repair-loop.md +103 -0
  91. package/dist/agent-src/rules/senior-engineering-discipline.md +2 -0
  92. package/dist/agent-src/rules/session-canary.md +62 -19
  93. package/dist/agent-src/rules/settings-ask-protocol.md +4 -0
  94. package/dist/agent-src/rules/size-enforcement.md +2 -0
  95. package/dist/agent-src/rules/skill-improvement-trigger.md +2 -0
  96. package/dist/agent-src/rules/skill-quality.md +2 -0
  97. package/dist/agent-src/rules/slash-command-routing-policy.md +2 -0
  98. package/dist/agent-src/rules/source-confidentiality.md +2 -0
  99. package/dist/agent-src/rules/source-discovery-gate.md +2 -0
  100. package/dist/agent-src/rules/source-of-truth.md +2 -0
  101. package/dist/agent-src/rules/spreadsheet-source-quality.md +2 -0
  102. package/dist/agent-src/rules/strategy-safety-floor.md +3 -1
  103. package/dist/agent-src/rules/symfony-routing.md +2 -0
  104. package/dist/agent-src/rules/think-before-action.md +2 -0
  105. package/dist/agent-src/rules/token-budget-discipline.md +5 -1
  106. package/dist/agent-src/rules/token-efficiency.md +2 -0
  107. package/dist/agent-src/rules/token-optimizer-maintenance.md +2 -0
  108. package/dist/agent-src/rules/tool-safety.md +7 -1
  109. package/dist/agent-src/rules/ui-audit-gate.md +4 -0
  110. package/dist/agent-src/rules/untrusted-input-defense.md +2 -0
  111. package/dist/agent-src/rules/upstream-proposal.md +2 -0
  112. package/dist/agent-src/rules/user-interaction.md +2 -0
  113. package/dist/agent-src/rules/user-interrupt-priority.md +2 -0
  114. package/dist/agent-src/skills/adversarial-review/SKILL.md +1 -1
  115. package/dist/agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
  116. package/dist/agent-src/skills/performance-analysis/SKILL.md +1 -1
  117. package/dist/agent-src/skills/persona-improvement/SKILL.md +1 -1
  118. package/dist/agent-src/skills/project-analyzer/SKILL.md +1 -1
  119. package/dist/agent-src/skills/security-audit/SKILL.md +1 -1
  120. package/dist/agent-src/skills/sequential-thinking/SKILL.md +1 -1
  121. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +1 -1
  122. package/dist/agent-src/skills/universal-project-analysis/SKILL.md +1 -1
  123. package/dist/agent-src/templates/AGENTS.md +6 -10
  124. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  125. package/dist/cli/registry.js +9 -0
  126. package/dist/cli/registry.js.map +1 -1
  127. package/dist/cli-delegate/chunk-22GCIJ2O.js +270 -0
  128. package/dist/cli-delegate/{chunk-BSLUHV2F.js → chunk-2BE5I2MN.js} +156 -141
  129. package/dist/cli-delegate/{chunk-AIIUU73N.js → chunk-7OMQCH4V.js} +1 -1
  130. package/dist/cli-delegate/{chunk-HJ6DAJHR.js → chunk-GB2FSUEE.js} +57 -7
  131. package/dist/cli-delegate/{chunk-WR6GTRHJ.js → chunk-JXARCGVN.js} +3 -3
  132. package/dist/cli-delegate/{chunk-SJQMJI7M.js → chunk-PQSAQKHW.js} +467 -305
  133. package/dist/cli-delegate/chunk-REKCMYOU.js +2991 -0
  134. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  135. package/dist/cli-delegate/cmd_brand_status.js +134 -0
  136. package/dist/cli-delegate/cmd_conformance.js +7 -7
  137. package/dist/cli-delegate/cmd_converge.js +3 -3
  138. package/dist/cli-delegate/cmd_doctor.js +4 -4
  139. package/dist/cli-delegate/cmd_explain.js +80 -330
  140. package/dist/cli-delegate/cmd_export.js +5 -5
  141. package/dist/cli-delegate/cmd_fleet.js +3 -3
  142. package/dist/cli-delegate/cmd_handoff.js +2 -2
  143. package/dist/cli-delegate/cmd_mcp_available.js +433 -0
  144. package/dist/cli-delegate/cmd_migrate.js +3 -3
  145. package/dist/cli-delegate/cmd_packs_active.js +153 -0
  146. package/dist/cli-delegate/cmd_preflight.js +1 -1
  147. package/dist/cli-delegate/cmd_prune.js +5 -5
  148. package/dist/cli-delegate/cmd_route_audit.js +8 -8
  149. package/dist/cli-delegate/cmd_route_explain.js +4 -4
  150. package/dist/cli-delegate/cmd_settings_get.js +272 -0
  151. package/dist/cli-delegate/cmd_settings_migrate.js +5 -5
  152. package/dist/cli-delegate/cmd_settings_set.js +7 -2967
  153. package/dist/cli-delegate/cmd_sync.js +5 -5
  154. package/dist/cli-delegate/cmd_uninstall.js +5 -5
  155. package/dist/cli-delegate/cmd_update.js +4 -4
  156. package/dist/cli-delegate/cmd_upgrade.js +4 -4
  157. package/dist/cli-delegate/cmd_validate.js +5 -5
  158. package/dist/cli-delegate/cmd_versions.js +4 -4
  159. package/dist/discovery/deprecation-report.md +1 -1
  160. package/dist/discovery/discovery-manifest.json +184 -124
  161. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  162. package/dist/discovery/discovery-manifest.summary.md +3 -3
  163. package/dist/discovery/orphan-report.md +1 -1
  164. package/dist/discovery/packs.json +7 -5
  165. package/dist/discovery/trust-report.md +11 -11
  166. package/dist/discovery/workspaces.json +6 -4
  167. package/dist/hooks/dispatch.js +9080 -5701
  168. package/dist/install/install.mjs +698 -508
  169. package/dist/mcp/registry-manifest.json +3 -3
  170. package/dist/mcp/server.json +2 -2
  171. package/dist/mcp/server.mjs +698 -437
  172. package/dist/router.json +1 -1
  173. package/dist/scripts/_lib/agent_settings.js +80 -15
  174. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  175. package/dist/scripts/condense.js +33 -2
  176. package/dist/scripts/condense.js.map +1 -1
  177. package/dist/server/io/yamlIO.js +85 -0
  178. package/dist/server/io/yamlIO.js.map +1 -1
  179. package/dist/server/routes/settings.js +1 -12
  180. package/dist/server/routes/settings.js.map +1 -1
  181. package/dist/server/routes/wizard.js +52 -2
  182. package/dist/server/routes/wizard.js.map +1 -1
  183. package/dist/shared/settingsCarveOut.js +118 -0
  184. package/dist/shared/settingsCarveOut.js.map +1 -0
  185. package/dist/shared/settingsSurface.js +7 -1
  186. package/dist/shared/settingsSurface.js.map +1 -1
  187. package/dist/ui/assets/index-DmR0mbk4.js.map +1 -1
  188. package/docs/contracts/settings-classes.md +29 -8
  189. package/docs/guidelines/agent-infra/memory-access.md +14 -3
  190. package/package.json +1 -1
  191. package/src/agent-src/templates/AGENTS.md +6 -10
  192. package/src/config/budgets.yml +29 -0
  193. package/src/config/evaluator-budgets.json +4 -4
  194. package/src/config/gate-coverage.yml +26 -0
  195. package/src/scripts/_cli/cmd_brand_status.ts +174 -0
  196. package/src/scripts/_cli/cmd_doctor.ts +6 -21
  197. package/src/scripts/_cli/cmd_mcp_available.ts +266 -0
  198. package/src/scripts/_cli/cmd_packs_active.ts +225 -0
  199. package/src/scripts/_cli/cmd_settings_get.ts +324 -0
  200. package/src/scripts/_dispatch.bash +75 -0
  201. package/src/scripts/_lib/agent_settings.ts +82 -16
  202. package/src/scripts/_lib/carrier_divergence.ts +135 -0
  203. package/src/scripts/_lib/git_common_dir.ts +128 -0
  204. package/src/scripts/_lib/host_capability.ts +84 -1
  205. package/src/scripts/_lib/obligation_frequency.ts +391 -0
  206. package/src/scripts/_lib/prompt_shape.ts +88 -0
  207. package/src/scripts/_lib/review_skipped_record.ts +102 -0
  208. package/src/scripts/_lib/rule_layer_overlap.ts +254 -0
  209. package/src/scripts/_lib/self_repair.ts +342 -0
  210. package/src/scripts/_lib/self_repair_store.ts +100 -0
  211. package/src/scripts/_lib/session_register.ts +361 -0
  212. package/src/scripts/_lib/transcript_entry.ts +80 -0
  213. package/src/scripts/check_branch_freshness.ts +255 -0
  214. package/src/scripts/check_council_config_location.ts +125 -1
  215. package/src/scripts/check_enforcement_coverage.ts +192 -7
  216. package/src/scripts/check_rule_projection_integrity.ts +364 -0
  217. package/src/scripts/check_standing_rule_delivery.ts +314 -0
  218. package/src/scripts/condense.ts +36 -2
  219. package/src/scripts/config/profiles.ts +13 -3
  220. package/src/scripts/conformance_scan.ts +307 -24
  221. package/src/scripts/council_availability_hook.ts +188 -0
  222. package/src/scripts/council_cli.ts +126 -7
  223. package/src/scripts/generate_settings_reference.ts +232 -0
  224. package/src/scripts/hook_manifest.yaml +155 -33
  225. package/src/scripts/hooks/block_no_verify.ts +95 -3
  226. package/src/scripts/hooks/block_unauthorized_git.ts +217 -2
  227. package/src/scripts/hooks/concern_registry.ts +12 -0
  228. package/src/scripts/hooks/delegation_nudge_hook.ts +450 -0
  229. package/src/scripts/hooks/end_review_nudge_hook.ts +726 -0
  230. package/src/scripts/hooks/orchestration_record_hook.ts +342 -0
  231. package/src/scripts/install.ts +151 -0
  232. package/src/scripts/language_mirror_hook.ts +49 -6
  233. package/src/scripts/measure_scope_dedup.ts +19 -13
  234. package/src/scripts/onboarding_gate_hook.ts +40 -1
  235. package/src/scripts/orchestration_backfill.ts +354 -0
  236. package/src/scripts/orchestration_record.ts +4 -1
  237. package/src/scripts/preamble_byte_census.ts +9 -20
  238. package/src/scripts/release.ts +142 -36
  239. package/src/scripts/report_carrier_divergence.ts +364 -0
  240. package/src/scripts/report_skill_activation.ts +257 -0
  241. package/src/scripts/report_skill_obligation_violations.ts +579 -0
  242. package/src/scripts/routing_doctor.ts +77 -6
  243. package/src/scripts/schemas/rule.schema.json +5 -0
  244. package/src/scripts/self_repair_cli.ts +240 -0
  245. package/src/scripts/self_repair_hook.ts +241 -0
  246. package/src/scripts/session_canary_hook.ts +35 -3
  247. package/src/scripts/session_register_hook.ts +288 -0
  248. package/src/scripts/sessions_cli.ts +140 -0
  249. package/src/scripts/validate_frontmatter.ts +68 -0
  250. package/src/server/io/yamlIO.ts +87 -0
  251. package/src/shared/settingsCarveOut.ts +143 -0
  252. package/src/shared/settingsSurface.ts +7 -1
@@ -10,6 +10,8 @@ triggers:
10
10
  self_contained: true
11
11
  workspaces: [agent-config-maintainer, engineering]
12
12
  packs: [meta]
13
+ # obligation: line 32
14
+ obligation_frequency: "per-edit"
13
15
  ---
14
16
 
15
17
  # Runtime Safety
@@ -26,12 +26,16 @@ trust:
26
26
  collision_ok:
27
27
  "migration": "R-A6 migration-safety owns reversibility/index/retention rules"
28
28
  "schema": "schema change routes the persistence pack floor (R-A6/R-A2)"
29
+ # obligation: line 41
30
+ obligation_frequency: "per-edit"
29
31
  ---
30
32
 
31
33
  # Scale Discipline
32
34
 
33
35
  Pack floor for the `scale-discipline` pack (default-off; auto-activates
34
- when the pack is installed). AI agents produce functionally correct but
36
+ when the pack is installed — `agent-config packs:active` says whether it is,
37
+ and names the degraded case where zero packs load and this floor cannot
38
+ activate at all). AI agents produce functionally correct but
35
39
  scale-hostile persistence code — this rule binds the failure classes to
36
40
  deterministic pattern lints where possible and to review advice where not.
37
41
 
@@ -27,6 +27,8 @@ enforced_by:
27
27
  - "validator:src/scripts/check_secret_leak.ts"
28
28
  collision_ok:
29
29
  "commit": "committing is the credential-leak moment this guard exists for"
30
+ # obligation: line 43
31
+ obligation_frequency: "per-edit"
30
32
  ---
31
33
 
32
34
  # Secret-in-VCS Guard
@@ -26,6 +26,8 @@ enforced_by:
26
26
  - "none"
27
27
  collision_ok:
28
28
  "tenant": "tenancy is a threat-model-before-edit surface"
29
+ # obligation: line 36
30
+ obligation_frequency: "per-edit"
29
31
  ---
30
32
 
31
33
  # Security-Sensitive Stop Rule
@@ -0,0 +1,103 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ description: "An observed defect in the agent's own behaviour becomes a queued record and a fix against agent-config — never a silent shrug"
5
+ triggers:
6
+ - keyword: "self-repair"
7
+ - keyword: "self-repair-queue"
8
+ - phrase: "nicht richtig gearbeitet"
9
+ - phrase: "du hast das falsch"
10
+ - phrase: "you ignored the rule"
11
+ - phrase: "that was wrong"
12
+ self_contained: true
13
+ workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
14
+ packs: [meta]
15
+ enforced_by:
16
+ - "hook:self-repair"
17
+ # obligation: line 28
18
+ obligation_frequency: "per-turn"
19
+ ---
20
+
21
+ # Self-Repair Loop
22
+
23
+ A defect in how the agent behaved is a defect in **agent-config**, not in the
24
+ user's project. The user should not have to file it, and the next user should
25
+ not meet it again. Two intake paths fill one queue: the user says so
26
+ (`user_prompt_submit`), or a deterministic detector fires at turn end (`stop`).
27
+
28
+ ## The Iron Law
29
+
30
+ ```
31
+ AN OBSERVED DEFECT IN THE AGENT'S OWN BEHAVIOUR IS QUEUED AND FIXED — NEVER SHRUGGED OFF.
32
+ THE DEFECT BELONGS TO AGENT-CONFIG. NEVER "FIX" IT BY EDITING THE USER'S PROJECT.
33
+ CORRECT THE TURN OPENLY IN FRONT OF THE USER. NEVER RE-RUN IT SILENTLY TO HIDE THE MISS.
34
+ THE OUTWARD STEP — PUSH, PR, ISSUE — NEEDS THE USER'S WORD THIS TURN. NO EXCEPTION.
35
+ ```
36
+
37
+ ## When the queue line appears
38
+
39
+ `<self-repair-queue>` is injected at prompt time while records are open. It is
40
+ work, not a notification:
41
+
42
+ 1. **Read it** — `agent-config self-repair:status`, then the newest record
43
+ under `agents/runtime/self-repair/`.
44
+ 2. **Name the surface that failed** — the rule, skill, gate, or missing carrier
45
+ that allowed the behaviour. A defect with no named surface is an apology,
46
+ not a fix.
47
+ 3. **Author the fix against agent-config** — in a checkout if one exists, so
48
+ the release can be a pull request; otherwise the report alone becomes an
49
+ issue.
50
+ 4. **Offer the release** — `agent-config self-repair:release <fingerprint>`;
51
+ `--dry-run` shows route and body without touching the network. Running it is
52
+ the user's call, per
53
+ [`non-destructive-by-default`](non-destructive-by-default.md).
54
+
55
+ ## Correct openly, never silently
56
+
57
+ Reported by the user → redo the task properly in the same turn, visibly, saying
58
+ what changed. Found by a detector → say so at the next opportunity and correct
59
+ it. Forbidden is the hidden version: re-running the turn so the miss never
60
+ surfaces. That mechanism (`attempt → critic → re-attempt`) was benchmarked and
61
+ falsified under ADR-106 — capability Δ = 0, council verdict TERMINAL — and the
62
+ same verdict names the replacement lever: refine the rules on the failure tail,
63
+ which is what a queued record feeds. Hiding the miss also destroys the only
64
+ signal the loop runs on.
65
+
66
+ ## What the detectors do NOT do
67
+
68
+ They do not check that every rule was followed. Most obligations here are
69
+ model-carried and unobservable from a transcript; guessing at them would
70
+ manufacture defects and flood the queue. A new detector must fire on a real
71
+ recorded failure **and** stay silent on its near-miss.
72
+
73
+ ## Privacy — fail-closed by construction
74
+
75
+ A record carries a class, a sanitized evidence span and a counter, and has **no
76
+ field** that can hold a prompt, a file body, or a project path. It passes the
77
+ audited privacy floor before leaving the machine; a refusal downgrades it to
78
+ local-only rather than scrubbing it into publishable shape — the same principle
79
+ as [`domain-safety-pii`](domain-safety-pii.md) § Surface 2.
80
+
81
+ ## When NOT to fire
82
+
83
+ The user is criticising the **code**, not the agent's conduct; the fingerprint
84
+ is already an open record (the hook increments it); or a one-off caused by
85
+ information the agent could not have had — note it, do not queue it.
86
+
87
+ ## Enforcement
88
+
89
+ The hook is `fail_closed: false` and always exits 0: it records, it never
90
+ gates — blocking a turn-end on a heuristic is the failure mode the
91
+ enforcement-projection null warns about. Detection is hook-carried, analysis and
92
+ fix model-carried; only the privacy gate and route choice are deterministic.
93
+ Nothing claims a defect *will* be caught — only that a caught one is not dropped.
94
+ Whether the hook is bound at all on this host is `agent-config hooks:status`; on
95
+ a host with no matching slot the detection half does not run and only the
96
+ model-carried half remains.
97
+
98
+ ## See also
99
+
100
+ - [`non-destructive-by-default`](non-destructive-by-default.md) — the Hard Floor the release step obeys.
101
+ - [`skill-improvement-pipeline`](../skills/skill-improvement-pipeline/SKILL.md) — the sibling loop for capability gaps.
102
+ - [`upstream-contribute`](../skills/upstream-contribute/SKILL.md) — the manual path this automates.
103
+ - [`council-availability`](council-availability.md) — the defect class that motivated the first detector.
@@ -25,6 +25,8 @@ collision_ok:
25
25
  "implement": "implementation = the invisible-controls checklist"
26
26
  "endpoint": "endpoint row of the surface-to-controls table"
27
27
  "component": "component work = generalize + reuse duty"
28
+ # obligation: line 69
29
+ obligation_frequency: "per-edit"
28
30
  ---
29
31
 
30
32
  # Senior Engineering Discipline
@@ -12,6 +12,11 @@ workspaces: [agent-config-maintainer, construction, engineering, finance, founde
12
12
  packs: [meta]
13
13
  enforced_by:
14
14
  - "hook:session-canary"
15
+ # obligation: line 31
16
+ obligation_frequency: "per-task"
17
+ # frequency-override: the per-turn phrases in the body describe the CARRIER
18
+ # (a per-turn beat is the closest reachable cover for a per-task obligation),
19
+ # not the obligation itself, which is still the first reply of each new task.
15
20
  collision_ok:
16
21
  "canary_name": "this rule owns what the NAME does once set and which of the three layers already supplies it; settings-ask-protocol owns how it is asked for and where the answer goes"
17
22
  ---
@@ -69,25 +74,63 @@ name it and suggest a fresh session or `/agent-handoff`, per
69
74
  - The greeting never substitutes for substance — it prefixes the answer, it is
70
75
  not the answer.
71
76
 
72
- ## Enforcement — per session, NOT per task
73
-
74
- > **Enforced by:** [`scripts/session_canary_hook.ts`](../../scripts/session_canary_hook.ts)
75
- > (`session_start`, all hook-capable hosts) — injects the `<session-canary>`
76
- > contract block into every new session, so a fresh conversation cannot start
77
- > without it. **Copilot fallback:** no hook surface — this rule is the only
78
- > carrier; re-read it when the trigger fires.
79
-
80
- **The gap, stated because it was measured.** The injection fires on
81
- `session_start`; the obligation is per *task*. Nothing re-injects at a task
82
- boundary, so from the second task on the contract is model-carried.
83
-
84
- Conformance audit, 30 sessions, 2026-08-06: opening canary dropped on ~13 of 15
85
- task starts, often present only in the closing summary, twice carrying a name
86
- the settings chain did not resolve; the honesty clause fired zero times. No
87
- per-task gate ships — the audit found no harm beyond the lost signal, and a
88
- mechanism for a signal whose absence nobody acted on has no failure mode to
89
- match. The consequence stands: this canary cannot currently be relied on as the
90
- degradation detector its own rationale describes.
77
+ ## Enforcement — per turn, which is the closest reachable cover for per task
78
+
79
+ > **Enforced by:** [`scripts/session_canary_hook.ts`](../../scripts/session_canary_hook.ts),
80
+ > bound in **two** slots. `session_start` injects the full `<session-canary>`
81
+ > contract once, so a fresh conversation cannot start without it.
82
+ > `user_prompt_submit` injects a one-line beat every turn, which is what
83
+ > actually reaches a task boundary. Both bindings are manifest facts; whether
84
+ > they are live on this install is `agent-config hooks:status`.
85
+
86
+ **Why two slots, and why not one.** The obligation is per *task*. No host has a
87
+ per-task slot — Cline maps `TaskStart`/`TaskResume` onto `session_start`, and
88
+ Claude Code has no task event at all — so "move the carrier to the right slot"
89
+ was never available. Per-turn is a strict superset of per-task and is reachable,
90
+ which is the whole argument: over-firing a greeting is a visible, cheap failure;
91
+ under-firing is the silent one. The full contract stays at session scope because
92
+ re-injecting ~800 characters every turn would buy the same coverage at roughly
93
+ 40× the tokens over a long session.
94
+
95
+ **What that fixed, stated because it was measured.** Conformance audit, 30
96
+ sessions, 2026-08-06, under session-scope-only injection: opening canary dropped
97
+ on ~13 of 15 task starts, often present only in the closing summary, twice
98
+ carrying a name the settings chain did not resolve; the honesty clause fired
99
+ zero times. The frequency join in `check_enforcement_coverage.ts` now reports the
100
+ carrier as covering the obligation — which is a claim about firing, not about
101
+ compliance.
102
+
103
+ **What the second audit found: the carrier fires and compliance did not
104
+ follow.** Conformance round 5, 2026-08-07, reading the five highest-turn
105
+ sessions with the carrier bound per turn: opening canary dropped on **24 of 29**
106
+ task starts, the honesty clause fired **0** times, and the wrong name was
107
+ emitted **twice** — "Mathias", which resolves from no layer of the chain
108
+ (`identity.name` is `Matze`, `git config user.name` is `matze4u`), i.e. inferred
109
+ from the ambient environment rather than read from settings. 24/29 against the
110
+ earlier 13/15 is not a fall, and the two windows are not identical, so they are
111
+ stated side by side rather than as a trend — but nothing here supports the claim
112
+ that the miss rate moved. A reminder in context is therefore not a mechanism for
113
+ this obligation: at higher frequency it is the same request, more often.
114
+
115
+ **What the next mechanism has to be.** Not another injection. It has to be able
116
+ to **refuse** — a check at delivery (`stop` is block-capable on this host, so a
117
+ refused turn-end continues in the same turn) that rejects a task-start reply
118
+ carrying no greeting. Proposed, not shipped; until it is, this obligation is
119
+ model-carried in practice, whatever the frequency join reports.
120
+
121
+ **The wrong-name half needs nothing, and that is worth stating.** The beat
122
+ already carries the resolved value — `build_canary_reminder` emits
123
+ `Canary active for "<name>"`, and the hook no-ops when no layer resolves a name —
124
+ and both wrong-name occurrences predate it: 2026-08-04, where the per-turn beat
125
+ landed 2026-08-06. The inference path they measure is already closed, so a third
126
+ audit should not re-open it.
127
+
128
+ **Two declared gaps, neither papered over.** On **Augment** there is no
129
+ `user_prompt_submit` slot; its `stop` fires *after* the reply, so injecting
130
+ there could not shape the reply the reminder is for, and counting it would be
131
+ exactly the over-credit the frequency audit exists to remove. Augment therefore
132
+ reports as an open gap rather than as covered. **Copilot** has no hook surface at
133
+ all — this rule is the only carrier there; re-read it when the trigger fires.
91
134
 
92
135
  ## See also
93
136
 
@@ -25,6 +25,10 @@ enforced_by:
25
25
  - "none"
26
26
  collision_ok:
27
27
  "canary_name": "the nickname ask is this protocol's canonical B-class instance — session-canary owns what the NAME then does and which layers already supply it, this rule owns how it is asked for and where the answer goes"
28
+ # obligation: line 39
29
+ obligation_frequency: "per-task"
30
+ # frequency-override: the per-turn phrase at line 175 is a See-also cross-reference to
31
+ # ask-when-uncertain's rule, not this rule's own obligation, which is per command execution.
28
32
  ---
29
33
 
30
34
  # Settings-Ask Protocol
@@ -5,6 +5,8 @@ description: "Creating or editing rules, skills, commands, guidelines, AGENTS.md
5
5
  alwaysApply: false
6
6
  workspaces: [agent-config-maintainer]
7
7
  packs: [meta]
8
+ # obligation: line 21
9
+ obligation_frequency: "per-edit"
8
10
  ---
9
11
 
10
12
  # size-enforcement
@@ -10,6 +10,8 @@ routes_to:
10
10
  - "skill:skill-improvement-pipeline"
11
11
  workspaces: [agent-config-maintainer, engineering]
12
12
  packs: [meta]
13
+ # obligation: line 17
14
+ obligation_frequency: "per-task"
13
15
  ---
14
16
 
15
17
  # Skill Improvement Trigger
@@ -12,6 +12,8 @@ enforced_by:
12
12
  - "validator:src/scripts/skill_linter.ts"
13
13
  collision_ok:
14
14
  "src/skills/": "every skill edit passes the executable-quality floor"
15
+ # obligation: line 14
16
+ obligation_frequency: "per-edit"
15
17
  ---
16
18
 
17
19
  # Skill Quality
@@ -11,6 +11,8 @@ routes_to:
11
11
  - "skill:command-routing"
12
12
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
13
13
  packs: [meta]
14
+ # obligation: line 18
15
+ obligation_frequency: "per-turn"
14
16
  ---
15
17
 
16
18
  # Slash Command Routing Policy
@@ -23,6 +23,8 @@ collision_ok:
23
23
  "src/skills/": "skill prose must not name derivation sources"
24
24
  "src/rules/": "rule prose must not name derivation sources"
25
25
  "agents/roadmaps/": "harvest/comparison roadmaps stay anonymized"
26
+ # obligation: line 46
27
+ obligation_frequency: "per-edit"
26
28
  ---
27
29
 
28
30
  # Source Confidentiality
@@ -20,6 +20,8 @@ packs: [engineering-base]
20
20
  collision_ok:
21
21
  "endpoint": "an unconfirmed endpoint shape needs evidence before code"
22
22
  "schema": "a DB schema is the canonical structure to verify from a real source"
23
+ # obligation: line 44
24
+ obligation_frequency: "per-edit"
23
25
  ---
24
26
 
25
27
  # Source Discovery — evidence before structure
@@ -16,6 +16,8 @@ enforced_by:
16
16
  - "validator:src/scripts/check_condensation.ts"
17
17
  collision_ok:
18
18
  ".augment/": "the projection is read-only — edits belong in src/"
19
+ # obligation: line 44
20
+ obligation_frequency: "per-edit"
19
21
  ---
20
22
 
21
23
  # Source of Truth
@@ -14,6 +14,8 @@ workspaces:
14
14
  - finance
15
15
  packs:
16
16
  - finance-basic
17
+ # obligation: line 49
18
+ obligation_frequency: "per-edit"
17
19
  ---
18
20
 
19
21
  # Spreadsheet Source Quality
@@ -35,13 +35,15 @@ trust:
35
35
  human_review_required: true
36
36
  collision_ok:
37
37
  "category": "'category' is positioning vocabulary (category design) in the strategy pack"
38
+ # obligation: line 55
39
+ obligation_frequency: "per-task"
38
40
  ---
39
41
  <!-- agent-config:human-review-banner -->
40
42
  > HUMAN REVIEW REQUIRED · trust: advisory · owner: unknown
41
43
 
42
44
  # Strategy Safety Floor
43
45
 
44
- Domain safety floor for founder-strategy artefacts (vision, positioning, competitive moats, market entry, OKR trees, build-vs-buy). Auto-activates when `pack-founder-strategy` is installed.
46
+ Domain safety floor for founder-strategy artefacts (vision, positioning, competitive moats, market entry, OKR trees, build-vs-buy). Auto-activates when `pack-founder-strategy` is installed — `agent-config packs:active` says whether it is, and names the degraded case where zero packs load and this floor cannot activate at all.
45
47
 
46
48
  ## Iron Law — strategy is a frame, not a verdict
47
49
 
@@ -16,6 +16,8 @@ trust:
16
16
  install:
17
17
  default: false
18
18
  removable: true
19
+ # obligation: line 23
20
+ obligation_frequency: "none"
19
21
  ---
20
22
 
21
23
  # Symfony Routing
@@ -22,6 +22,8 @@ collision_ok:
22
22
  "implement": "analyze-first floor on any implementation"
23
23
  "debug": "targeted inspection over brute force while debugging"
24
24
  "fix": "no blind trial-and-error on fixes — max 2 retries"
25
+ # obligation: line 50
26
+ obligation_frequency: "per-edit"
25
27
  ---
26
28
 
27
29
  # think-before-action
@@ -8,6 +8,8 @@ triggers:
8
8
  self_contained: true
9
9
  workspaces: [agent-config-maintainer]
10
10
  packs: [meta]
11
+ # obligation: line 43
12
+ obligation_frequency: "per-edit"
11
13
  ---
12
14
 
13
15
  # Token Budget Discipline
@@ -30,7 +32,9 @@ TO THE FULL FRUGALITY CANON (telegraph-speak, thin-projector).
30
32
  | `standard` | — | Balanced condensation | Not trimmed if priority ≥ 60 | 500–2000 tokens |
31
33
  | `rich` | Must be declared + justified | **Exempt** | **Never trimmed** | 2000–3500 tokens |
32
34
 
33
- Read `tokens.rich_skills` from `.agent-settings.yml` (default `on`) to determine
35
+ Read `tokens.rich_skills` from `.agent-settings.yml` (default `on`) — the project
36
+ layer of a cascade that starts user-global, so `agent-config settings:get
37
+ tokens.rich_skills` is the read that answers it, file included — to determine
34
38
  whether rich skills may load in full. If `off`, treat them as `standard`. If
35
39
  `ask`, the question's shape is
36
40
  [`settings-ask-protocol`](settings-ask-protocol.md)'s, not this rule's; what only
@@ -11,6 +11,8 @@ triggers:
11
11
  self_contained: true
12
12
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
13
13
  packs: [meta]
14
+ # obligation: line 21
15
+ obligation_frequency: "per-edit"
14
16
  ---
15
17
 
16
18
  # Token Efficiency
@@ -19,6 +19,8 @@ workspaces: [agent-config-maintainer]
19
19
  packs: [meta]
20
20
  enforced_by:
21
21
  - "validator:src/scripts/check_token_optimizer_freshness.ts"
22
+ # obligation: line 29
23
+ obligation_frequency: "per-commit"
22
24
  ---
23
25
 
24
26
  # Token Optimizer Maintenance
@@ -10,6 +10,8 @@ workspaces: [agent-config-maintainer, engineering]
10
10
  packs: [meta]
11
11
  enforced_by:
12
12
  - "validator:src/scripts/lint_agent_security.ts"
13
+ # obligation: line 19
14
+ obligation_frequency: "per-edit"
13
15
  ---
14
16
 
15
17
  # Tool Safety
@@ -23,7 +25,11 @@ Tools are permissions, not abilities. Every tool access must be declared and rev
23
25
  ## Constraints
24
26
 
25
27
  - **Deny by default** — no tool access unless explicitly listed in `allowed_tools`
26
- - **Allowlist only** — tool names must match the tool registry
28
+ - **Allowlist only** — tool names must match the tool registry. That registry is
29
+ a small static constant and is **not** the same thing as the MCP servers a
30
+ session can reach; `agent-config mcp:available` prints both, kept apart, and
31
+ says plainly that it performs no handshake. Conflating the two is how a skill
32
+ ends up declaring a tool nothing provides.
27
33
  - **Read-first** — prefer read-only actions; write requires explicit approval
28
34
  - **No hidden credentials** — tools must not embed API keys or tokens in skill files
29
35
  - **No arbitrary execution** — tool adapters have fixed interfaces, not free-form calls
@@ -14,11 +14,15 @@ routes_to:
14
14
  - "skill:typography-system"
15
15
  workspaces: [agent-config-maintainer, engineering]
16
16
  packs: [frontend-design]
17
+ enforced_by:
18
+ - "none"
17
19
  collision_ok:
18
20
  "component": "no new component without audit findings — its core subject"
19
21
  "design token": "same surface, opposite side: this inventories tokens before the write, design-review-after-ui-write reviews what the write emitted"
20
22
  "resources/views/": "both halves of one UI loop fire on the same path — audit before, review after; neither substitutes for the other"
21
23
  "resources/js/": "both halves of one UI loop fire on the same path — audit before, review after; neither substitutes for the other"
24
+ # obligation: line 39
25
+ obligation_frequency: "per-edit"
22
26
  ---
23
27
 
24
28
  # UI Audit Gate
@@ -19,6 +19,8 @@ workspaces: [engineering]
19
19
  packs: [engineering-base]
20
20
  enforced_by:
21
21
  - "none"
22
+ # obligation: line 38
23
+ obligation_frequency: "per-event"
22
24
  ---
23
25
 
24
26
  <!-- security-lint: allow instruction-smuggling "defense rule: quotes role-takeover phrases (ignore previous instructions, you are now, <IMPORTANT>) to teach refusal" -->
@@ -10,6 +10,8 @@ routes_to:
10
10
  - "skill:upstream-contribute"
11
11
  workspaces: [agent-config-maintainer, engineering]
12
12
  packs: [meta]
13
+ # obligation: line 17
14
+ obligation_frequency: "per-task"
13
15
  ---
14
16
 
15
17
  # Upstream Proposal
@@ -13,6 +13,8 @@ triggers:
13
13
  self_contained: true
14
14
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
15
15
  packs: [meta]
16
+ # obligation: line 40
17
+ obligation_frequency: "per-turn"
16
18
  ---
17
19
 
18
20
  # User Interaction
@@ -18,6 +18,8 @@ load_context:
18
18
  self_contained: true
19
19
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
20
20
  packs: [meta]
21
+ # obligation: line 38
22
+ obligation_frequency: "per-turn"
21
23
  ---
22
24
 
23
25
  # User-Interrupt Priority
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: high
3
3
  name: adversarial-review
4
- description: "ONLY on a request for adversarial review, devil's advocate, stress-test, or honest critique ('poke holes', 'be brutal', 'was hältst du davon') — NOT routine code/design review."
4
+ description: "Adversarial critique — devil's advocate, stress-test, honest teardown ('poke holes', 'be brutal', 'was hältst du davon'); explicit request only. Routine code or design review → code-review."
5
5
  personas:
6
6
  - critical-challenger
7
7
  domain: quality
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: high
3
3
  name: analysis-autonomous-mode
4
- description: "ONLY when user explicitly requests autonomous analysis, deep investigation, multi-step research, or 'dig into this end-to-end without asking me each step' — NOT for normal feature work."
4
+ description: "Autonomous multi-step investigation — deep research carried end-to-end without per-step approval; explicit request only, never for normal feature work."
5
5
  domain: discovery
6
6
  workspaces:
7
7
  - agent-config-maintainer
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: high
3
3
  name: performance-analysis
4
- description: "ONLY when user explicitly requests: performance audit, bottleneck analysis, or N+1 query detection. NOT for regular feature work."
4
+ description: "Performance audit — bottleneck profiling, N+1 query detection, hot-path analysis; explicit request only, not part of regular feature work."
5
5
  personas:
6
6
  - performance-engineer
7
7
  domain: discovery
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: inherit
3
3
  name: persona-improvement
4
- description: "ONLY when the user explicitly asks to refine a persona from recent corrections — persona analog of skill-improvement-pipeline; tightens a persona's Unique Questions, governance-gated."
4
+ description: "Refine a persona from recent corrections — tightens its Unique Questions, governance-gated; explicit request only. Skill analog → skill-improvement-pipeline."
5
5
  domain: process
6
6
  execution:
7
7
  type: assisted
@@ -2,7 +2,7 @@
2
2
  model_tier: high
3
3
  context: large
4
4
  name: project-analyzer
5
- description: "ONLY when user asks for single-pass tech-stack detection or `agents/evidence/analysis/` write-up. Deep multi-pass audit → `universal-project-analysis`. Raw primitives → `project-analysis-core`."
5
+ description: "Single-pass tech-stack detection with an agents/evidence/analysis/ write-up; explicit request only. Deep multi-pass audit → universal-project-analysis. Raw primitives → project-analysis-core."
6
6
  domain: discovery
7
7
  workspaces:
8
8
  - engineering
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: high
3
3
  name: security-audit
4
- description: "ONLY when user explicitly requests: security audit, vulnerability scan, or penetration test review. NOT for regular feature work."
4
+ description: "Security audit — vulnerability scan, pentest review, attack-surface sweep; explicit request only, not regular feature work. Pre-implementation threat pass → threat-modeling."
5
5
  domain: quality
6
6
  parallelizable: files
7
7
  workspaces:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: high
3
3
  name: sequential-thinking
4
- description: "ONLY when user explicitly requests: step-by-step reasoning, structured problem decomposition, or iterative analysis. NOT for regular coding tasks."
4
+ description: "Structured step-by-step problem decomposition and iterative analysis; explicit request only, never for regular coding tasks, and at most once per task."
5
5
  domain: process
6
6
  workspaces:
7
7
  - agent-config-maintainer
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: inherit
3
3
  name: skill-improvement-pipeline
4
- description: "ONLY when user explicitly requests: run the skill improvement pipeline after a learning was detected. Orchestrates capture, classify, create, validate, and apply."
4
+ description: "Run the skill-improvement pipeline after a learning was detected — capture, classify, create, validate, apply; explicit request only."
5
5
  domain: process
6
6
  execution:
7
7
  type: assisted
@@ -2,7 +2,7 @@
2
2
  model_tier: high
3
3
  context: large
4
4
  name: universal-project-analysis
5
- description: "ONLY when user asks for deep multi-pass codebase audit — orchestrator routing to `project-analysis-core` + framework-specific `project-analysis-*`. Single-pass scan → `project-analyzer`."
5
+ description: "Deep multi-pass codebase audit — orchestrates project-analysis-core plus the framework-specific project-analysis-*; explicit request only. Single-pass scan → project-analyzer."
6
6
  domain: discovery
7
7
  workspaces:
8
8
  - engineering