@event4u/agent-config 9.14.0 → 9.15.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 (276) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +110 -112
  3. package/README.md +8 -0
  4. package/dist/agent-src/commands/agents/audit.md +7 -7
  5. package/dist/agent-src/commands/agents/optimize.md +1 -1
  6. package/dist/agent-src/commands/analyze/reference-repo.md +1 -1
  7. package/dist/agent-src/commands/chat-history.md +1 -0
  8. package/dist/agent-src/commands/context.md +1 -0
  9. package/dist/agent-src/commands/council.md +1 -1
  10. package/dist/agent-src/commands/ghostwriter.md +1 -1
  11. package/dist/agent-src/commands/memory.md +2 -1
  12. package/dist/agent-src/commands/module.md +1 -0
  13. package/dist/agent-src/commands/optimize/agents-dir.md +1 -1
  14. package/dist/agent-src/commands/optimize/deep.md +5 -2
  15. package/dist/agent-src/commands/optimize/skills.md +5 -5
  16. package/dist/agent-src/commands/override.md +1 -0
  17. package/dist/agent-src/commands/prediction-pool.md +4 -4
  18. package/dist/agent-src/commands/research/deep.md +1 -1
  19. package/dist/agent-src/commands/roadmap.md +2 -1
  20. package/dist/agent-src/commands/rule-compliance-audit.md +1 -1
  21. package/dist/agent-src/commands/tdd.md +1 -0
  22. package/dist/agent-src/commands/tests.md +1 -0
  23. package/dist/agent-src/commands/upstream-contribute.md +5 -5
  24. package/dist/agent-src/commands/video/from-script.md +1 -1
  25. package/dist/agent-src/commands/video/from-song.md +1 -1
  26. package/dist/agent-src/commands/video/scene.md +1 -1
  27. package/dist/agent-src/commands/video/stitch.md +1 -1
  28. package/dist/agent-src/commands/video/storyboard.md +1 -1
  29. package/dist/agent-src/commands/worktree/create.md +2 -1
  30. package/dist/agent-src/contexts/augment-infrastructure.md +1 -1
  31. package/dist/agent-src/contexts/contracts/artifact-engagement-flow.md +5 -5
  32. package/dist/agent-src/contexts/contracts/command-suggestion-flow.md +3 -3
  33. package/dist/agent-src/contexts/contracts/emergency-triage-block.md +2 -2
  34. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +4 -3
  35. package/dist/agent-src/contexts/execution/subagent-routing.md +19 -0
  36. package/dist/agent-src/contexts/override-system.md +1 -1
  37. package/dist/agent-src/ghostwriter/fictional-fixture-v1.md +1 -1
  38. package/dist/agent-src/rules/augment-edit-discipline.md +1 -1
  39. package/dist/agent-src/rules/autonomous-execution.md +2 -1
  40. package/dist/agent-src/rules/brand-consistency.md +1 -0
  41. package/dist/agent-src/rules/brand-source-of-truth.md +1 -0
  42. package/dist/agent-src/rules/code-comment-discipline.md +2 -0
  43. package/dist/agent-src/rules/communication-through-line.md +1 -0
  44. package/dist/agent-src/rules/content-quoting-floor.md +1 -0
  45. package/dist/agent-src/rules/cross-source-consistency.md +0 -1
  46. package/dist/agent-src/rules/downstream-changes.md +1 -0
  47. package/dist/agent-src/rules/external-code-graph-interop.md +1 -0
  48. package/dist/agent-src/rules/external-reference-deep-dive.md +1 -0
  49. package/dist/agent-src/rules/fast-path-marker-visibility.md +1 -0
  50. package/dist/agent-src/rules/finance-safety-floor.md +0 -1
  51. package/dist/agent-src/rules/icon-consistency.md +1 -0
  52. package/dist/agent-src/rules/image-likeness-and-rights.md +1 -0
  53. package/dist/agent-src/rules/improve-before-implement.md +1 -1
  54. package/dist/agent-src/rules/invite-challenge.md +1 -0
  55. package/dist/agent-src/rules/lethal-trifecta-guard.md +1 -0
  56. package/dist/agent-src/rules/low-impact-corpus-privacy-floor.md +1 -0
  57. package/dist/agent-src/rules/markdown-safe-codeblocks.md +1 -0
  58. package/dist/agent-src/rules/media-governance-routing.md +4 -3
  59. package/dist/agent-src/rules/media-sync-ground-truth.md +1 -0
  60. package/dist/agent-src/rules/no-attribution-footers.md +1 -0
  61. package/dist/agent-src/rules/no-decorative-emojis-in-git-surfaces.md +1 -0
  62. package/dist/agent-src/rules/no-pr-progress-comments.md +1 -0
  63. package/dist/agent-src/rules/onboarding-gate.md +1 -0
  64. package/dist/agent-src/rules/output-discipline.md +1 -0
  65. package/dist/agent-src/rules/prefer-enums-over-literals.md +1 -0
  66. package/dist/agent-src/rules/preservation-guard.md +1 -0
  67. package/dist/agent-src/rules/question-not-instruction.md +1 -0
  68. package/dist/agent-src/rules/roadmap-ci-steps-policy.md +1 -0
  69. package/dist/agent-src/rules/role-mode-adherence.md +1 -0
  70. package/dist/agent-src/rules/runtime-safety.md +1 -0
  71. package/dist/agent-src/rules/security-sensitive-stop.md +1 -0
  72. package/dist/agent-src/rules/session-canary.md +9 -2
  73. package/dist/agent-src/rules/source-confidentiality.md +1 -0
  74. package/dist/agent-src/rules/source-of-truth.md +1 -0
  75. package/dist/agent-src/rules/spreadsheet-source-quality.md +1 -0
  76. package/dist/agent-src/rules/think-before-action.md +1 -0
  77. package/dist/agent-src/rules/token-budget-discipline.md +1 -0
  78. package/dist/agent-src/rules/token-efficiency.md +1 -0
  79. package/dist/agent-src/rules/token-optimizer-maintenance.md +5 -5
  80. package/dist/agent-src/rules/tool-safety.md +1 -0
  81. package/dist/agent-src/rules/untrusted-input-defense.md +2 -0
  82. package/dist/agent-src/rules/user-interaction.md +1 -0
  83. package/dist/agent-src/rules/user-interrupt-priority.md +1 -0
  84. package/dist/agent-src/skills/adr-create/SKILL.md +1 -1
  85. package/dist/agent-src/skills/check-refs/SKILL.md +1 -1
  86. package/dist/agent-src/skills/competitive-positioning/SKILL.md +1 -1
  87. package/dist/agent-src/skills/condense-memory/SKILL.md +1 -1
  88. package/dist/agent-src/skills/context-authoring/SKILL.md +1 -1
  89. package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +1 -1
  90. package/dist/agent-src/skills/description-assist/SKILL.md +1 -1
  91. package/dist/agent-src/skills/github-ci/SKILL.md +1 -0
  92. package/dist/agent-src/skills/guideline-writing/SKILL.md +1 -1
  93. package/dist/agent-src/skills/lint-skills/SKILL.md +1 -1
  94. package/dist/agent-src/skills/readme-reviewer/SKILL.md +1 -1
  95. package/dist/agent-src/skills/roadmap-management/SKILL.md +8 -1
  96. package/dist/agent-src/skills/roadmap-writing/SKILL.md +1 -1
  97. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +1 -1
  98. package/dist/agent-src/skills/skill-writing/SKILL.md +4 -4
  99. package/dist/agent-src/skills/token-optimizer/SKILL.md +4 -4
  100. package/dist/agent-src/skills/upstream-contribute/SKILL.md +6 -6
  101. package/dist/agent-src/skills/using-git-worktrees/SKILL.md +25 -0
  102. package/dist/agent-src/templates/AGENTS.md +1 -1
  103. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  104. package/dist/agent-src/templates/command.md +1 -1
  105. package/dist/agent-src/templates/copilot-instructions.md +3 -3
  106. package/dist/agent-src/templates/rule.md +2 -2
  107. package/dist/agent-src/templates/scripts/work_engine/orchestration.ts +1 -1
  108. package/dist/agent-src/templates/skill-archive-note.md +5 -5
  109. package/dist/agent-src/templates/skill.md +1 -1
  110. package/dist/cli/agent-config.js +66 -19
  111. package/dist/cli/agent-config.js.map +1 -1
  112. package/dist/cli/main.js +9 -4
  113. package/dist/cli/main.js.map +1 -1
  114. package/dist/cli/python/workspace_drive.js +2 -0
  115. package/dist/cli/python/workspace_drive.js.map +1 -1
  116. package/dist/cli/python/workspace_drive_health.js +2 -0
  117. package/dist/cli/python/workspace_drive_health.js.map +1 -1
  118. package/dist/cli/python/workspace_hosts.js +2 -0
  119. package/dist/cli/python/workspace_hosts.js.map +1 -1
  120. package/dist/cli/python/workspace_sessions.js +2 -0
  121. package/dist/cli/python/workspace_sessions.js.map +1 -1
  122. package/dist/cli/registry.js +1 -0
  123. package/dist/cli/registry.js.map +1 -1
  124. package/dist/cli-delegate/{chunk-A3HJ6NTI.js → chunk-63WSP6YZ.js} +2 -1
  125. package/dist/cli-delegate/{chunk-EJYIGZ3T.js → chunk-BKO2AZ7Z.js} +1 -1
  126. package/dist/cli-delegate/{chunk-GCVFLBP2.js → chunk-H574KOUH.js} +338 -494
  127. package/dist/cli-delegate/chunk-NXFWFAYV.js +339 -0
  128. package/dist/cli-delegate/{chunk-TEGJU2JX.js → chunk-ZXXJLL5K.js} +2 -2
  129. package/dist/cli-delegate/cmd_conformance.js +29 -23
  130. package/dist/cli-delegate/cmd_doctor.js +3 -3
  131. package/dist/cli-delegate/cmd_export.js +4 -4
  132. package/dist/cli-delegate/cmd_preflight.js +2 -2
  133. package/dist/cli-delegate/cmd_prune.js +4 -4
  134. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  135. package/dist/cli-delegate/cmd_sync.js +4 -4
  136. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  137. package/dist/cli-delegate/cmd_validate.js +4 -4
  138. package/dist/discovery/deprecation-report.md +1 -1
  139. package/dist/discovery/discovery-manifest.json +127 -95
  140. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  141. package/dist/discovery/discovery-manifest.summary.md +1 -1
  142. package/dist/discovery/orphan-report.md +1 -1
  143. package/dist/discovery/packs.json +2 -2
  144. package/dist/discovery/trust-report.md +1 -1
  145. package/dist/discovery/workspaces.json +2 -2
  146. package/dist/hooks/dispatch.js +729 -430
  147. package/dist/install/install.mjs +52 -11
  148. package/dist/install/rule_scope.js +18 -2
  149. package/dist/install/rule_scope.js.map +1 -1
  150. package/dist/mcp/registry-manifest.json +2 -2
  151. package/dist/mcp/server.json +2 -2
  152. package/dist/mcp/server.mjs +518 -411
  153. package/dist/router.json +1 -1
  154. package/dist/scripts/_lib/claude_settings_hooks.js +30 -5
  155. package/dist/scripts/_lib/claude_settings_hooks.js.map +1 -1
  156. package/dist/scripts/_lib/scoped_projection.js +223 -0
  157. package/dist/scripts/_lib/scoped_projection.js.map +1 -0
  158. package/dist/scripts/_lib/surface_tiers.js +125 -0
  159. package/dist/scripts/_lib/surface_tiers.js.map +1 -0
  160. package/dist/scripts/_lib/token_count.js +166 -0
  161. package/dist/scripts/_lib/token_count.js.map +1 -0
  162. package/dist/scripts/_lib/trigger_eval_floors.js +8 -0
  163. package/dist/scripts/_lib/trigger_eval_floors.js.map +1 -1
  164. package/dist/scripts/condense.js +139 -9
  165. package/dist/scripts/condense.js.map +1 -1
  166. package/dist/scripts/project_thin_rules.js +450 -0
  167. package/dist/scripts/project_thin_rules.js.map +1 -0
  168. package/dist/server/routes/workspace.js +2 -0
  169. package/dist/server/routes/workspace.js.map +1 -1
  170. package/dist/server/schemas/settings.js +9 -3
  171. package/dist/server/schemas/settings.js.map +1 -1
  172. package/dist/ui/assets/index-DJY_vQVn.js +40 -0
  173. package/dist/ui/assets/index-DJY_vQVn.js.map +1 -0
  174. package/dist/ui/index.html +1 -1
  175. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +1 -1
  176. package/package.json +11 -11
  177. package/src/agent-src/templates/AGENTS.md +1 -1
  178. package/src/agent-src/templates/scripts/work_engine/orchestration.ts +1 -1
  179. package/src/config/agent-settings.template.yml +59 -11
  180. package/src/config/ci-local-parity.yml +8 -0
  181. package/src/config/discovery/unassigned-artefacts.yml +23 -25
  182. package/src/config/evaluator-budgets.json +35 -5
  183. package/src/config/gate-coverage.yml +147 -0
  184. package/src/config/gate-violation-baselines.json +25 -0
  185. package/src/install/rule_scope.ts +27 -2
  186. package/src/scripts/_cli/cmd_conformance.ts +13 -24
  187. package/src/scripts/_dispatch.bash +10 -0
  188. package/src/scripts/_lib/claude_settings_hooks.ts +30 -4
  189. package/src/scripts/_lib/gate_baseline.ts +213 -0
  190. package/src/scripts/_lib/scoped_projection.ts +50 -0
  191. package/src/scripts/_lib/tier_budget_routing.ts +234 -0
  192. package/src/scripts/_lib/tool_adapter_registry.ts +8 -1
  193. package/src/scripts/_lib/trigger_eval_floors.ts +9 -0
  194. package/src/scripts/_lib/trigger_routers.ts +17 -5
  195. package/src/scripts/adr/regenerate_index.ts +4 -3
  196. package/src/scripts/ai-video/lib/parse-blueprint.sh +1 -1
  197. package/src/scripts/ai_council/compile_corpus.ts +1 -1
  198. package/src/scripts/audit_cloud_compatibility.ts +37 -2
  199. package/src/scripts/audit_initial_context.ts +53 -19
  200. package/src/scripts/audit_likelihood.ts +31 -2
  201. package/src/scripts/audit_user_type_axis.ts +58 -11
  202. package/src/scripts/bench_hook_latency.ts +172 -41
  203. package/src/scripts/build_mcp_catalog.ts +12 -1
  204. package/src/scripts/check_always_budget.ts +122 -11
  205. package/src/scripts/check_augment_description_cap.ts +24 -3
  206. package/src/scripts/check_ci_strict_superset.ts +150 -0
  207. package/src/scripts/check_cluster_patterns.ts +100 -0
  208. package/src/scripts/check_consumer_scope_flip.ts +26 -4
  209. package/src/scripts/check_evaluator_budgets.ts +198 -19
  210. package/src/scripts/check_gate_coverage.ts +337 -1
  211. package/src/scripts/check_generator_output_coverage.ts +2 -1
  212. package/src/scripts/check_iron_law_prominence.ts +1 -1
  213. package/src/scripts/check_kernel_rule_bundle.ts +1 -1
  214. package/src/scripts/check_no_new_legacy_path.ts +167 -3
  215. package/src/scripts/check_pack_size.ts +18 -4
  216. package/src/scripts/check_portability.ts +37 -7
  217. package/src/scripts/check_references.ts +19 -3
  218. package/src/scripts/check_release_pr_shape.ts +13 -0
  219. package/src/scripts/check_token_regression.ts +9 -2
  220. package/src/scripts/condense.ts +155 -12
  221. package/src/scripts/cost/budget.mjs +63 -2
  222. package/src/scripts/evaluator_umbrella.sh +34 -1
  223. package/src/scripts/generate_capability_matrix.ts +8 -0
  224. package/src/scripts/generate_router_coverage_from_matrix.ts +155 -0
  225. package/src/scripts/hook_manifest.yaml +17 -3
  226. package/src/scripts/hooks/block_config_weakening.ts +337 -0
  227. package/src/scripts/hooks/concern_registry.ts +2 -0
  228. package/src/scripts/hooks/probe_throttle.ts +75 -0
  229. package/src/scripts/install-hooks.sh +24 -2
  230. package/src/scripts/install.ts +2 -2
  231. package/src/scripts/lint_agents_md.ts +9 -3
  232. package/src/scripts/lint_archived_skills.ts +1 -1
  233. package/src/scripts/lint_artefact_frontmatter.ts +185 -37
  234. package/src/scripts/lint_command_routing.ts +21 -52
  235. package/src/scripts/lint_command_verbs.ts +47 -28
  236. package/src/scripts/lint_context_spine_usage.ts +38 -12
  237. package/src/scripts/lint_framework_leakage.ts +25 -6
  238. package/src/scripts/lint_handoffs.ts +49 -2
  239. package/src/scripts/lint_media_policy_linkage.ts +62 -30
  240. package/src/scripts/lint_namespace.ts +92 -7
  241. package/src/scripts/lint_new_skill_gate.ts +39 -31
  242. package/src/scripts/lint_originality_shingles.ts +7 -1
  243. package/src/scripts/lint_override_kernel_guard.ts +21 -3
  244. package/src/scripts/lint_pack_boundaries.ts +461 -91
  245. package/src/scripts/lint_pack_dependencies.ts +24 -57
  246. package/src/scripts/lint_persona_governance.ts +1 -1
  247. package/src/scripts/lint_role_experiences.ts +34 -5
  248. package/src/scripts/lint_trigger_precision.ts +142 -0
  249. package/src/scripts/mcp_server/consumer_tool_catalog.json +12 -201
  250. package/src/scripts/mcp_server/tools.ts +1 -1
  251. package/src/scripts/prepack-check.mjs +40 -1
  252. package/src/scripts/prepack_router_targets.d.mts +7 -0
  253. package/src/scripts/prepack_router_targets.mjs +93 -0
  254. package/src/scripts/print_required_checks.ts +72 -18
  255. package/src/scripts/profile_staleness_hook.ts +12 -0
  256. package/src/scripts/record_evaluator_measurements.mjs +105 -0
  257. package/src/scripts/recruit_preflight.sh +1 -1
  258. package/src/scripts/release.ts +105 -1
  259. package/src/scripts/router_target_paths.d.mts +4 -0
  260. package/src/scripts/router_target_paths.mjs +69 -0
  261. package/src/scripts/router_telemetry.ts +52 -1
  262. package/src/scripts/routing_doctor.ts +485 -0
  263. package/src/scripts/rule_trigger_eval.ts +403 -0
  264. package/src/scripts/schemas/rule.schema.json +5 -1
  265. package/src/scripts/session_canary_hook.ts +96 -5
  266. package/src/scripts/skill_linter.ts +9 -28
  267. package/src/scripts/smoke/skills.sh +1 -1
  268. package/src/scripts/sweep_dead_scan_roots.ts +356 -10
  269. package/src/scripts/trigger_coverage.ts +13 -2
  270. package/src/scripts/update_counts.ts +1 -1
  271. package/src/scripts/validate_telegraph_carveouts.ts +1 -1
  272. package/src/scripts/wrapper_freshness_hook.ts +14 -0
  273. package/src/server/schemas/settings.ts +19 -5
  274. package/dist/cli-delegate/chunk-TJIAM5FW.js +0 -133
  275. package/dist/ui/assets/index-BpSQt5vm.js +0 -40
  276. package/dist/ui/assets/index-BpSQt5vm.js.map +0 -1
@@ -14,6 +14,7 @@ validator_ignore:
14
14
  - type: "substring"
15
15
  pattern: "external_sources_denylist"
16
16
  reason: "Rule names the linter/denylist asset that necessarily holds the tokens."
17
+ self_contained: true
17
18
  workspaces: [agent-config-maintainer]
18
19
  packs: [meta]
19
20
  enforced_by:
@@ -9,6 +9,7 @@ triggers:
9
9
  - path_prefix: ".augment/"
10
10
  - path_prefix: ".claude/"
11
11
  - path_prefix: ".cursor/"
12
+ self_contained: true
12
13
  workspaces: [agent-config-maintainer]
13
14
  packs: [meta]
14
15
  enforced_by:
@@ -9,6 +9,7 @@ triggers:
9
9
  - keyword: "revenue figures"
10
10
  - keyword: "market data"
11
11
  - phrase: "pull the numbers"
12
+ self_contained: true
12
13
  workspaces:
13
14
  - finance
14
15
  packs:
@@ -14,6 +14,7 @@ triggers:
14
14
  - keyword: "refactor"
15
15
  - keyword: "fix"
16
16
  - keyword: "optimize"
17
+ self_contained: true
17
18
  workspaces: [engineering]
18
19
  packs: [engineering-base]
19
20
  ---
@@ -5,6 +5,7 @@ description: "rich-class skills are exempt from telegraph + thin-projector trims
5
5
  triggers:
6
6
  - keyword: "token_budget_class"
7
7
  - keyword: "rich skill"
8
+ self_contained: true
8
9
  workspaces: [agent-config-maintainer]
9
10
  packs: [meta]
10
11
  ---
@@ -8,6 +8,7 @@ load_context:
8
8
  triggers:
9
9
  - keyword: "minimize tool calls"
10
10
  - phrase: "fetching logs"
11
+ self_contained: true
11
12
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
12
13
  packs: [meta]
13
14
  ---
@@ -34,10 +34,10 @@ THE CI LINK VALIDATOR IS A BACKSTOP, NOT A SUBSTITUTE FOR CARE.
34
34
 
35
35
  About to edit any of:
36
36
 
37
- - `.agent-src.uncondensed/rules/cli-output-handling.md`
38
- - `.agent-src.uncondensed/rules/token-efficiency.md`
39
- - `.agent-src.uncondensed/rules/direct-answers.md`
40
- - `.agent-src.uncondensed/skills/rtk-output-filtering/SKILL.md`
37
+ - `src/rules/cli-output-handling.md`
38
+ - `src/rules/token-efficiency.md`
39
+ - `src/rules/direct-answers.md`
40
+ - `src/skills/rtk-output-filtering/SKILL.md`
41
41
  - `src/domains/meta/agent-handoff/command.md`
42
42
  - Any other asset cited by
43
43
  [`token-optimizer`](../skills/token-optimizer/SKILL.md) (catalog
@@ -52,7 +52,7 @@ If the edit touches:
52
52
  - **The asset's path / location** (rename, move, deletion)
53
53
 
54
54
  then in the same commit, update the matching row in
55
- `.agent-src.uncondensed/skills/token-optimizer/SKILL.md` —
55
+ `src/skills/token-optimizer/SKILL.md` —
56
56
  the catalog table AND the relevant tree leaf.
57
57
 
58
58
  ## Out of scope
@@ -5,6 +5,7 @@ description: "Skill uses external tools — enforce allowlist, deny-by-default,
5
5
  triggers:
6
6
  - keyword: "allowed_tools"
7
7
  - keyword: "tool registry"
8
+ self_contained: true
8
9
  workspaces: [agent-config-maintainer, engineering]
9
10
  packs: [meta]
10
11
  enforced_by:
@@ -13,6 +13,8 @@ triggers:
13
13
  - phrase: "treat as instructions"
14
14
  - phrase: "from the web"
15
15
  - phrase: "scraped"
16
+ routes_to:
17
+ - "guideline:agent-infra/untrusted-input-spotlighting"
16
18
  workspaces: [engineering]
17
19
  packs: [engineering-base]
18
20
  enforced_by:
@@ -10,6 +10,7 @@ triggers:
10
10
  - keyword: "recommendation"
11
11
  - phrase: "what do you recommend"
12
12
  - phrase: "was empfiehlst du"
13
+ self_contained: true
13
14
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
14
15
  packs: [meta]
15
16
  ---
@@ -15,6 +15,7 @@ triggers:
15
15
  - command: "implement-ticket"
16
16
  load_context:
17
17
  - ../contexts/execution/interrupt-examples.md
18
+ self_contained: true
18
19
  workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
19
20
  packs: [meta]
20
21
  ---
@@ -170,7 +170,7 @@ the area's contract from the README in
170
170
 
171
171
  ### 6. Validate
172
172
 
173
- - Flat: `./scripts-run src/scripts/adr/regenerate_index --check` exits 0.
173
+ - Flat: `./scripts-run src/scripts/adr/regenerate_index --dir docs/decisions/ --check` exits 0.
174
174
  - Per-area: `./scripts-run src/scripts/audit_adr_coverage --check` exits 0.
175
175
  - The project's CI / quality pipeline passes — locally only when
176
176
  `quality.local_auto_run: true`; under the default (`false` / missing)
@@ -27,7 +27,7 @@ gaps:
27
27
  Use this skill when:
28
28
 
29
29
  - A skill, rule, command, guideline, or context has been renamed or deleted
30
- - Linking a newly added artifact from elsewhere in `.agent-src.uncondensed/`
30
+ - Linking a newly added artifact from elsewhere in `src/`
31
31
  - Preparing a PR that touches cross-references between agent artifacts
32
32
  - CI's `check-refs` job failed and the broken reference needs to be located
33
33
 
@@ -114,7 +114,7 @@ to [`upstream-contribute`](../upstream-contribute/SKILL.md).
114
114
  **WHEN NOT to use this**
115
115
 
116
116
  - The peer repo needs a generic walk-through first — route to
117
- [`analyze-reference-repo`](../analyze-reference-repo/SKILL.md);
117
+ [`analyze-reference-repo`](../../commands/analyze/reference-repo.md);
118
118
  this skill consumes its output, never duplicates it.
119
119
  - The decision is to contribute back upstream — route to
120
120
  [`upstream-contribute`](../upstream-contribute/SKILL.md).
@@ -102,7 +102,7 @@ CLI exit codes:
102
102
  - **Denylist false positive** — a sensitive-looking filename outside the denylist surface (project-specific naming) will still pass `assert_safe()`. The denylist is necessary but not sufficient; the maintainer is responsible for never feeding secrets to the condenseor.
103
103
  - **Frontmatter ordering with existing keys** — if the target already has frontmatter, the condenseor preserves existing keys, drops any prior `original_sha256:` / `condensed_at:` entries, and appends the new pair. Other agents reading the file should treat the SHA + timestamp pair as the canonical condensation marker, not the file size.
104
104
  - **Negative savings on pointer-heavy files** — a `templates/AGENTS.md` that already follows Thin-Root (≥ 40 % pointers, ≥ 60-char *why*-clauses) has little prose left to drop; condensation may net near-zero or even add bytes via frontmatter. Run [`agents-md-thin-root`](../agents-md-thin-root/SKILL.md) first to maximise pointer share, then measure whether this skill still pays.
105
- - **Generated-tree drift** — condensing `.agent-src.uncondensed/templates/AGENTS.md` does NOT propagate to `.augment/`, `.claude/`, etc. until the package's sync + generate-tools scripts run (`scripts/condense.sh --sync` + `scripts/condense.ts --generate-tools`). Always regenerate after condensing a templated file.
105
+ - **Generated-tree drift** — condensing `src/agent-src/templates/AGENTS.md` does NOT propagate to `.augment/`, `.claude/`, etc. until the package's sync + generate-tools scripts run (`scripts/condense.sh --sync` + `scripts/condense.ts --generate-tools`). Always regenerate after condensing a templated file.
106
106
 
107
107
  ## Measurement — when to condense
108
108
 
@@ -43,7 +43,7 @@ Do NOT use when:
43
43
  | `deployment-order.md` | Migration strategy, feature flags, rollback plan | `migration-safety`, `judge-bug-hunter`, release reviewers |
44
44
  | `observability.md` | Error tracking, log channels, metrics, known alerts | deploy reviewers, `bug-analyzer`, incident mode |
45
45
 
46
- The templates ship in `.agent-src.uncondensed/templates/contexts/` and are
46
+ The templates ship in `src/agent-src/templates/contexts/` and are
47
47
  copied into `agents/settings/contexts/` by the installer.
48
48
 
49
49
  ## Procedure: context-authoring
@@ -185,7 +185,7 @@ it as "redundant" and never trim its bullets. The patterns it covers:
185
185
  (`../docs/guidelines/foo.md`, `../contexts/bar.md`) — paths resolve
186
186
  from the file's delivered location, not from the symlink in
187
187
  `.claude/rules/` etc. (per `road-to-path-fixes.md` Strategy A).
188
- - `path_prefix:` triggers containing `.agent-src.uncondensed/` —
188
+ - `path_prefix:` triggers containing `src/` —
189
189
  literal match patterns, not file refs (per Modified Option 1,
190
190
  P2.2).
191
191
  - Symlinked rule files under `.claude/rules/`, `.cursor/rules/`,
@@ -63,7 +63,7 @@ Report which checks pass / fail in one compact line — **not** a long essay.
63
63
 
64
64
  If the target is a skill, check for a trigger-eval report:
65
65
 
66
- * `.agent-src.uncondensed/skills/{name}/evals/triggers.json` — the expected-trigger corpus
66
+ * `src/skills/{name}/evals/triggers.json` — the expected-trigger corpus
67
67
  * `evals/last-run.json` — the most recent runner output (see
68
68
  [`scripts/skill_trigger_eval.ts`](../../../scripts/skill_trigger_eval.ts))
69
69
 
@@ -63,6 +63,7 @@ Read `.github/workflows/` to discover the actual job matrix. Common patterns:
63
63
  - Use **concurrency groups** to prevent duplicate runs: `group: ${{ github.workflow }}-${{ github.ref }}`
64
64
  - Use **`fail-fast: false`** in matrix strategies for independent job execution.
65
65
  - Extract shared logic into **reusable workflows** (`module-deploy.yaml` pattern).
66
+ - A job with **`container:`** MUST run `git config --global --add safe.directory "$GITHUB_WORKSPACE"` immediately after `actions/checkout` — the checkout is owned by a different UID than the container user, so without it every git-backed step dies with `fatal: detected dubious ownership`.
66
67
 
67
68
  ### Composer auth
68
69
 
@@ -48,7 +48,7 @@ Creating or materially rewriting a guideline **must** go through Understand
48
48
  * **Understand** — which skills or rules will cite this guideline? If the
49
49
  answer is "none", the guideline has no home — stop.
50
50
  * **Research** — **inspect** `docs/guidelines/` for overlap and grep
51
- `.agent-src.uncondensed/` for pages that already cover the topic.
51
+ `src/` for pages that already cover the topic.
52
52
  **Analyze** 1–2 peer guidelines in the same topic folder for tone.
53
53
  * **Draft** — propose location (topic folder + filename) and outline. Only
54
54
  fill bodies once the outline is confirmed.
@@ -24,7 +24,7 @@ packs:
24
24
 
25
25
  Use this skill when:
26
26
 
27
- - Validating the shape of every skill and rule in `.agent-src.uncondensed/`
27
+ - Validating the shape of every skill and rule in `src/`
28
28
  - Verifying execution metadata (`execution.type`, `handler`, `command`) is well-formed
29
29
  - Checking locally before opening a PR that CI's skill-lint job will pass
30
30
  - Investigating a reported linter failure on a specific skill or rule
@@ -206,7 +206,7 @@ Compare the README's claims to the live repository:
206
206
  | # | Severity | Section | Issue | Fix |
207
207
  |---|---|---|---|---|
208
208
  | 1 | ❌ Critical | Install | Command `X` does not exist | Replace with `Y` |
209
- | 2 | ❌ Critical | Profile grid | Link `.agent-src.uncondensed/profiles/` 404s | Repoint to `packages/core/.agent-src.uncondensed/profiles/` |
209
+ | 2 | ❌ Critical | Profile grid | Link `src/agent-src/profiles/` 404s | Repoint to `packages/core/src/agent-src/profiles/` |
210
210
  | 3 | ⚠️ Major | Badges | "Skills: 218" — live count is 207 | Update badge or note drift |
211
211
  | 4 | ⚠️ Major | Usage | Example uses deprecated API | Update to current API |
212
212
  | 5 | ℹ️ Minor | Structure | Requirements buried below usage | Move above install |
@@ -147,6 +147,11 @@ Every roadmap follows this structure:
147
147
  - Never remove completed steps — they serve as history.
148
148
  - **Status is binary: `ready` (default, implicit) or `draft`.** New roadmaps are created **ready** unless the user explicitly says otherwise — `ready` is implicit and need not be written. A roadmap that is still being authored, awaiting upstream decisions, or capturing options without a worked plan declares `status: draft` in YAML frontmatter at the top of the file. Drafts are hidden from `agents/roadmaps-progress.md` until the flag is removed or flipped to `ready`. There are no other status values; legacy banners (`**Status: directional**`, `Status: capture-only`, `mode: feedback`) are removed.
149
149
 
150
+ ### Awaiting evidence — a blocker entry, never a new glyph
151
+
152
+ - Waiting on **evidence that has not arrived** (soak still running, benchmark unfunded, adopter absent) is neither `[~]` nor `[-]`. Signal it with a structured `## Blockers` entry — five-field shape in [`templates/roadmaps.md` rule 20](../../agent-src/templates/roadmaps.md) — whose `Resolved when:` names the decidable signal ending the wait. The item stays `- [ ]` and points at it: `<!-- blocked-by: <id> -->`.
153
+ - **No new glyph.** `[ ]` + `blocked-by:` = open, awaiting named evidence (stays active) · `[~]` = deferred by decision (bars archival, Iron Law 3) · `[-]` = cancelled with a reason (does not bar it). A fifth state buys nothing the entry above does not already carry.
154
+
150
155
  ### Phases
151
156
 
152
157
  - Group related steps into phases (e.g. "Preparation", "Migration", "Cleanup").
@@ -488,7 +493,9 @@ owner, blocked scope, and full instructions. Authoring shape:
488
493
  [`templates/roadmaps.md` rule 20](../../agent-src/templates/roadmaps.md);
489
494
  authoring guidance: [`roadmap-writing § 5b`](../roadmap-writing/SKILL.md).
490
495
  Clearing a blocker flips its `Status: resolved` and regenerates the
491
- dashboard in the same reply, same cadence as a checkbox flip.
496
+ dashboard in the same reply, same cadence as a checkbox flip. The
497
+ blocker entry is also the canonical **awaiting-evidence** signal —
498
+ see [§ Awaiting evidence](#awaiting-evidence--a-blocker-entry-never-a-new-glyph).
492
499
 
493
500
  ## Rubric pass (optional, surfacing-only)
494
501
 
@@ -57,7 +57,7 @@ or supersession before opening a new one.
57
57
  ### 1. Read the canonical template first
58
58
 
59
59
  The structure, frontmatter, lifecycle, and complexity-tier rules live
60
- in [`.agent-src.uncondensed/templates/roadmaps.md`](../../templates/roadmaps.md).
60
+ in [`src/agent-src/templates/roadmaps.md`](../../templates/roadmaps.md).
61
61
  Read it before authoring. Do not restate its rules in the roadmap
62
62
  body — link the template if a phase needs to override one.
63
63
 
@@ -154,7 +154,7 @@ Ask the user:
154
154
  1. Read `project.upstream_repo` and `project.improvement_pr_branch_prefix` from `.agent-settings.yml`
155
155
  2. If `project.upstream_repo` is empty → ask user for the target repo
156
156
  3. Create branch: `{prefix}{learning-slug}` from `main`
157
- 4. Commit changes to `.agent-src.uncondensed/` AND `.augment/`
157
+ 4. Commit changes to `src/` AND `.augment/`
158
158
  5. Push branch
159
159
  6. Create PR with title: `improve(agent): {short description}`
160
160
  7. Use the agent-improvement PR template if it exists
@@ -68,8 +68,8 @@ Ask: **"Does the model need this to do its job correctly?"**
68
68
 
69
69
  ### Skills and commands share the `.claude/skills/` namespace
70
70
 
71
- Skills in `.agent-src.uncondensed/skills/{name}/SKILL.md` AND commands in
72
- `.agent-src.uncondensed/commands/{name}.md` both project into
71
+ Skills in `src/skills/{name}/SKILL.md` AND commands in
72
+ `src/domains/{domain}/{name}/command.md` both project into
73
73
  `.claude/skills/` (see `scripts/condense.ts` →
74
74
  `generate_claude_skills` + `generate_claude_commands`). Claude treats
75
75
  the whole directory as native skills.
@@ -111,7 +111,7 @@ Do NOT create a skill or rule for:
111
111
  ### 0. Inspect, then run the Drafting Protocol
112
112
 
113
113
  Before writing, **inspect** the landscape: grep
114
- `.agent-src.uncondensed/skills/` and `rules/` for duplicates or
114
+ `src/skills/` and `src/rules/` for duplicates or
115
115
  near-matches, and **analyze** 1–2 gold-standard peers (e.g. `pest-testing`,
116
116
  `php-coder`) to anchor shape and tone. If requirements are unclear or
117
117
  incomplete, stop and ask — do not assume.
@@ -308,7 +308,7 @@ asks for it.
308
308
  **Workspace layout** (all under `.gitignore`):
309
309
 
310
310
  ```
311
- .agent-src.uncondensed/skills/{name}/evals/
311
+ src/skills/{name}/evals/
312
312
  triggers.json # tracked — routing eval (§ 1c)
313
313
  evals.json # tracked — behavior eval definitions
314
314
  runs/ # gitignored — per-iteration outputs
@@ -79,11 +79,11 @@ INTENT
79
79
 
80
80
  | Asset | Path | Trigger keywords | What it does |
81
81
  |---|---|---|---|
82
- | `cli-output-handling` | `.agent-src.uncondensed/rules/cli-output-handling.md` | `verbose`, `tail`, `grep`, `CLI` | Wrap-tail-grep contract for any verbose command |
83
- | `rtk-output-filtering` | `.agent-src.uncondensed/skills/rtk-output-filtering/SKILL.md` | `rtk`, `verbose`, `filter`, `wrap` | Project-local rtk filters; wrapper command |
84
- | `token-efficiency` | `.agent-src.uncondensed/rules/token-efficiency.md` | `redirect`, `verbose`, `concise`, `tool` | Batch + parallelize tool calls; brevity floor |
82
+ | `cli-output-handling` | `src/rules/cli-output-handling.md` | `verbose`, `tail`, `grep`, `CLI` | Wrap-tail-grep contract for any verbose command |
83
+ | `rtk-output-filtering` | `src/skills/rtk-output-filtering/SKILL.md` | `rtk`, `verbose`, `filter`, `wrap` | Project-local rtk filters; wrapper command |
84
+ | `token-efficiency` | `src/rules/token-efficiency.md` | `redirect`, `verbose`, `concise`, `tool` | Batch + parallelize tool calls; brevity floor |
85
85
  | `agent-handoff` | `src/domains/meta/agent-handoff/command.md` | `handoff`, `fresh`, `chat`, `context` | Context envelope for fresh-chat continuation |
86
- | `direct-answers` | `.agent-src.uncondensed/rules/direct-answers.md` | `brevity`, `flattery`, `severity`, `tiered` | Iron-Law brevity floor (kernel) |
86
+ | `direct-answers` | `src/rules/direct-answers.md` | `brevity`, `flattery`, `severity`, `tiered` | Iron-Law brevity floor (kernel) |
87
87
  | `markitdown` | upstream: github.com/microsoft/markitdown | `PDF`, `DOCX`, `HTML`, `convert` | Document → markdown converter (authoritative-link only) |
88
88
  | `/cost:report` | TBD — an internal roadmap (local-only) § P1.2` | `cost`, `model spend`, `budget` | Per-session cost telemetry (planned) |
89
89
  | `api-cost-levers` | `docs/guidelines/agent-infra/api-cost-levers.md` | `cache`, `caching`, `batch`, `tiering`, `effort` | Anthropic billing levers: prompt caching, Batch API, model tiering, effort/output right-sizing |
@@ -79,12 +79,12 @@ Before ANY upstream work (branch, files, PR), ask the user:
79
79
 
80
80
  ### 1. Determine contribution type
81
81
 
82
- | Type | Uncondensed path | Condensed path |
82
+ | Type | Source path | Condensed path |
83
83
  |---|---|---|
84
- | **New skill** | `.agent-src.uncondensed/skills/{name}/SKILL.md` | `.augment/skills/{name}/SKILL.md` |
85
- | **New rule** | `.agent-src.uncondensed/rules/{name}.md` | `.augment/rules/{name}.md` |
86
- | **New command** | `.agent-src.uncondensed/commands/{name}.md` | `.augment/commands/{name}.md` |
87
- | **New guideline** | `.agent-src.uncondensed/guidelines/{category}/{name}.md` | `.augment/guidelines/{category}/{name}.md` |
84
+ | **New skill** | `src/skills/{name}/SKILL.md` | `.augment/skills/{name}/SKILL.md` |
85
+ | **New rule** | `src/rules/{name}.md` | `.augment/rules/{name}.md` |
86
+ | **New command** | `src/domains/{domain}/{name}/command.md` | `.augment/commands/{name}.md` |
87
+ | **New guideline** | `docs/guidelines/{category}/{name}.md` | `.augment/guidelines/{category}/{name}.md` |
88
88
  | **Update to existing** | Same path as original | Same path as original |
89
89
 
90
90
  ### 2. Apply locally as override (immediate benefit)
@@ -151,7 +151,7 @@ git checkout -b feat/skills/{name} # or fix/rules/{name}, etc.
151
151
 
152
152
  Create both files:
153
153
 
154
- - **Uncondensed version** → `.agent-src.uncondensed/{type}/{name}` (full, verbose, human-readable)
154
+ - **Source version** → `src/{type}/{name}` (full, verbose, human-readable)
155
155
  - **Condensed version** → `.augment/{type}/{name}` (token-efficient, preserving all code blocks,
156
156
  headings, frontmatter, validation, gotchas)
157
157
 
@@ -125,6 +125,27 @@ cd .worktrees/<branch-name>
125
125
  Branch names must match the project convention — see
126
126
  `commit-conventions` rule.
127
127
 
128
+ ### 4b. Seed the worktree — allow / deny list
129
+
130
+ `git worktree add` checks out **tracked files only**. Everything
131
+ gitignored — dependencies, generated projections, build output, local
132
+ config — is absent. Seeding the wrong subset is the recurring
133
+ worktree-trap family: a gate then fails (or falsely passes) for a
134
+ reason the change did not cause.
135
+
136
+ | Artefact | Action | Why |
137
+ |---|---|---|
138
+ | The dependency tree the § 5 install would produce (`vendor/`, `node_modules/`, `.venv/`, `target/`, …) | **symlink** from the primary checkout, or run the § 5 install | Absent ⇒ every gate that shells to a local binary dies on its first import. A **partial** tree (only the binary shim directory) is worse than none — it produces a scatter of spurious failures. Symlink or install fully; never half. |
139
+ | Generated agent projections (`.augment/`, other tool trees) | **copy** from the primary checkout, or regenerate before running gates | Several gates read the projection tree. Absent ⇒ the gate reports "produced by regeneration but absent before" — red for a reason the contributor did not cause. |
140
+ | Build output (`dist/`, compiled artefacts) | **regenerate**, never copy a stale tree | A stale copy makes a byte-identity check report generator drift that does not exist. |
141
+ | Local settings (`.agent-settings.yml`, `.agent-settings.local.yml`) | **NEVER copy** | Gitignored, machine-local, and deliberately absent in CI. **Absent IS the CI shape** — copying it makes local gate results diverge from the gate that actually decides. A worktree that carries it is testing a configuration no pipeline runs. |
142
+ | Secrets, `.env`, credential files | **NEVER copy** | Same reasoning, plus leak surface. |
143
+
144
+ The list is encoded here, in the flow, on purpose: a separate committed
145
+ manifest is warranted only when a **flow-external** tool needs to read
146
+ it. Tools that seed their own throwaway worktrees already handle their
147
+ own dependency link inline and need no manifest.
148
+
128
149
  ### 5. Install dependencies + verify baseline
129
150
 
130
151
  Auto-detect from manifest files:
@@ -167,6 +188,10 @@ starting a new worktree on the same branch.
167
188
  from manifest files.
168
189
  * **Skipping baseline** — failing tests pre-existed; later blamed on
169
190
  your own changes.
191
+ * **Copying local settings in** — the worktree then passes gates the
192
+ pipeline fails (§ 4b deny list). Absent is correct.
193
+ * **Partial dependency tree** — a `.bin`-only symlink yields a scatter
194
+ of spurious failures; bisect in a clean scratch worktree instead.
170
195
 
171
196
  ## Output format
172
197
 
@@ -30,5 +30,5 @@
30
30
  2. **What language?** — Project-specific; agents mirror the user's language at runtime.
31
31
  3. **Where do I edit agent-config?** — Do not edit `.augment/` or `dist/agent-src/` here; they are installed artifacts. Project edits live in `agents/` and project source.
32
32
  4. **Lint / test / sync entry point?** — Project-specific (see project README); agent-config reinstalls via `composer update event4u/agent-config` or `npm update @event4u/agent-config`.
33
- 5. **Where do the always-active rules live?** — `dist/agent-src/rules/` (kernel = 9 Iron-Law rules; tier-1 / tier-2 routed via `dist/agent-src/router.json`).
33
+ 5. **Where do the always-active rules live?** — `dist/agent-src/rules/` (kernel = 9 Iron-Law rules; tier-1 / tier-2 routed via `dist/router.json`).
34
34
  6. **Per-module agent docs?** — If `modules.enabled: true`, each module under `modules.root_paths` may carry its own `{agent_folder}/` (default `agents/`). See `module-management` skill.
@@ -39,7 +39,7 @@ schema_version: 1
39
39
  # CI guard: a release bump of `package.json` must update this value
40
40
  # in lockstep — see scripts/check_template_pin_drift.ts (road-to-
41
41
  # portable-runtime-and-update-check P3.3).
42
- agent_config_version: "9.14.0"
42
+ agent_config_version: "9.15.0"
43
43
 
44
44
  # --- Project identity ---
45
45
  project:
@@ -49,7 +49,7 @@ suggestion:
49
49
 
50
50
  {One-line summary of what this command does.}
51
51
 
52
- **Source of truth:** `.agent-src.uncondensed/` — never read or edit `dist/agent-src/` or `.augment/` directly.
52
+ **Source of truth:** `src/` — never read or edit `dist/agent-src/` or `.augment/` directly.
53
53
 
54
54
  ## Steps
55
55
 
@@ -102,7 +102,7 @@ This repository contains {{project_description_oneline}}.
102
102
  ## ✅ Known False Positives — Do NOT Flag
103
103
 
104
104
  The repo ships agent-config rules and skills under `.augment/`,
105
- `dist/agent-src/`, and (during authoring) `.agent-src.uncondensed/`.
105
+ `dist/agent-src/`, and (during authoring) `src/`.
106
106
  Cross-references inside those trees resolve via the **delivered**
107
107
  `.augment/` layout — not via raw git checkout. Copilot's static
108
108
  checker walks the git tree, so it sees broken paths where there are
@@ -116,7 +116,7 @@ resolve at agent runtime. The patterns below are correct by design:
116
116
  delivered location (e.g. `.augment/rules/<rule>.md`) — these paths
117
117
  are valid via the `.augment/` tree, even when the file is symlinked
118
118
  into `.claude/rules/`, `.cursor/rules/`, or `.clinerules/`.
119
- - **`path_prefix:` triggers containing `.agent-src.uncondensed/`**
119
+ - **`path_prefix:` triggers containing `src/`**
120
120
  in YAML frontmatter. This is a literal match pattern for the
121
121
  host's router, **not** a file reference — source-of-truth meta-rules
122
122
  (`source-of-truth`, `augment-edit-discipline`, `skill-quality`,
@@ -129,7 +129,7 @@ resolve at agent runtime. The patterns below are correct by design:
129
129
  - **Body-link forms `../docs/guidelines/...`** (single-up). This is
130
130
  the post-rewrite shape produced by `scripts/condense.ts`. The
131
131
  condensed `dist/agent-src/rules/` tree is one level deeper than the
132
- source `.agent-src.uncondensed/rules/`, so the rewriter collapses
132
+ source `src/rules/`, so the rewriter collapses
133
133
  `../../docs/...` to `../docs/...`. Both forms are expected — one in
134
134
  source, one in condensed output.
135
135
 
@@ -39,14 +39,14 @@ both reject the legacy prefix.
39
39
  `path_prefix:` is a **literal match pattern** the host evaluates against
40
40
  the file the agent is editing — it is **not** a file reference and is
41
41
  **not rewritten**. Rules that fire when the agent edits source-of-truth
42
- files legitimately keep the `.agent-src.uncondensed/` prefix (see
42
+ files legitimately keep the `src/` prefix (see
43
43
  `skill-quality`, `rule-type-governance`,
44
44
  `augment-edit-discipline`). Rules that fire on consumer-project paths use
45
45
  `agents/`, `lang/`, `.augment/`, etc.
46
46
 
47
47
  | Use case | Example `path_prefix:` |
48
48
  |---|---|
49
- | Fires when editing source-of-truth artifacts | `.agent-src.uncondensed/skills/` |
49
+ | Fires when editing source-of-truth artifacts | `src/skills/` |
50
50
  | Fires when editing consumer project files | `agents/`, `lang/`, `app/`, `src/` |
51
51
  | Fires when editing the projected layer | `.augment/` |
52
52
 
@@ -104,7 +104,7 @@ interface DispatchHookModule {
104
104
  * reachable both when this module runs from the consumer projection
105
105
  * (`dist/agent-src/templates/scripts/work_engine/`) and from the
106
106
  * source-of-truth tree
107
- * (`packages/<pack>/.agent-src.uncondensed/templates/scripts/work_engine/`).
107
+ * (`src/agent-src/templates/scripts/work_engine/`).
108
108
  * Loaded by dynamic `import()` to avoid namespace collisions with test
109
109
  * modules named `hooks` (the TS analogue of the Python importlib-by-path
110
110
  * approach).
@@ -3,7 +3,7 @@
3
3
  > Template for `agents/evidence/archived-skills/<slug>.md`. Created during
4
4
  > `step-2-skill-inventory-rationalization.md`
5
5
  > Phase 4 execution. Every skill removed from
6
- > `.agent-src.uncondensed/skills/` MUST have a matching archive note
6
+ > `src/skills/` MUST have a matching archive note
7
7
  > here — enforced by `scripts/lint_archived_skills.py`.
8
8
 
9
9
  ## Instructions
@@ -78,7 +78,7 @@ references the removed slug without pointing at this note.}
78
78
  relationship documented in the successor's frontmatter).
79
79
  - `deprecated` — capability retired; no successor needed.
80
80
  - **`replacement`** — successor slug (must exist under
81
- `.agent-src.uncondensed/skills/`) or literal `none`. The linter
81
+ `src/skills/`) or literal `none`. The linter
82
82
  validates the successor's existence.
83
83
  - **`last_known_callers`** — references found by
84
84
  `scripts/check_references.py` at archival time. Empty list is valid
@@ -92,10 +92,10 @@ references the removed slug without pointing at this note.}
92
92
  has a frontmatter block with the six required fields.
93
93
  2. `reason` is one of the four allowed values.
94
94
  3. When `reason ∈ {merged, superseded}`, the `replacement` slug exists
95
- under `.agent-src.uncondensed/skills/`.
95
+ under `src/skills/`.
96
96
  4. Every slug under `agents/evidence/archived-skills/` is *absent* from
97
- `.agent-src.uncondensed/skills/` (no zombies).
98
- 5. No SKILL.md present under `.agent-src.uncondensed/skills/`
97
+ `src/skills/` (no zombies).
98
+ 5. No SKILL.md present under `src/skills/`
99
99
  references an archived slug as a router target.
100
100
 
101
101
  Run via `task lint-archived-skills`. Included in `task ci`.
@@ -170,7 +170,7 @@ Do NOT use when:
170
170
 
171
171
  <!-- SENIOR-TIER STUB BLOCKS (delete entire section if not `tier: senior`):
172
172
  Senior-tier skills (frontmatter `tier: senior`) require four extra
173
- blocks per `.agent-src.uncondensed/rules/skill-quality.md` §
173
+ blocks per `src/rules/skill-quality.md` §
174
174
  Senior-Tier Required Structure. Mid-tier and untiered skills MUST
175
175
  remove this section entirely. The four blocks are enforced by
176
176
  `scripts/skill_linter.ts` for `tier: senior` skills only.
@@ -12,30 +12,77 @@
12
12
  * dynamically imports `./main.js`. A missing install surfaces as an
13
13
  * actionable "run npm ci" message instead of a stack trace.
14
14
  */
15
+ import { existsSync, realpathSync } from 'node:fs';
15
16
  import { createRequire } from 'node:module';
16
- import { fileURLToPath } from 'node:url';
17
+ import { fileURLToPath, pathToFileURL } from 'node:url';
17
18
  import { dirname, join } from 'node:path';
18
19
  const require = createRequire(import.meta.url);
20
+ // Hook hot path (road-to-hook-latency-repair Phase 2): `dispatch:hook` runs
21
+ // on EVERY tool call, so it must not pay the commander preflight or
22
+ // `./main.js`'s eager import graph (~370 ms of the measured ~450–500 ms
23
+ // CLI boot on a 1-vCPU container — bench_hook_latency --via-cli pins it).
24
+ // The dispatcher bundle is self-contained (no node_modules needed), so this
25
+ // runs BEFORE the dependency preflight: hooks keep working even on a broken
26
+ // install. `--config-root` is the one flag the full CLI handles before
27
+ // dispatch (exports EVENT4U_CONFIG_HOME) — hooks never pass it; when
28
+ // present, fall through to the full CLI so its semantics stay owned there.
29
+ // Bundle missing (stale dev tree) → fall through to ./main.js, whose own
30
+ // dispatch:hook route delegates to the historical bash path.
31
+ const _argv = process.argv.slice(2);
32
+ let _dispatchHotPathTaken = false;
33
+ if (_argv[0] === 'dispatch:hook' && !_argv.includes('--config-root')) {
34
+ // realpath, not the raw URL: a symlinked bin (npm global, ./agent-config
35
+ // shim) keeps the symlink path in import.meta.url; the bundle lives next
36
+ // to the REAL file (same reason src/cli/paths.ts realpaths).
37
+ let bundle = null;
38
+ try {
39
+ const here = realpathSync(fileURLToPath(import.meta.url));
40
+ bundle = join(dirname(here), '..', '..', 'dist', 'hooks', 'dispatch.js');
41
+ }
42
+ catch {
43
+ bundle = null;
44
+ }
45
+ if (bundle !== null && existsSync(bundle)) {
46
+ _dispatchHotPathTaken = true;
47
+ void import(pathToFileURL(bundle).href)
48
+ .then((mod) => {
49
+ const code = mod.main(_argv.slice(1));
50
+ // Flush queued async stdout before the hard exit (same
51
+ // discipline as main.ts) — a piped stdout is async on macOS
52
+ // and process.exit() truncates past the 8 KiB pipe buffer.
53
+ process.exitCode = code;
54
+ process.stdout.write('', () => process.exit(code));
55
+ })
56
+ .catch((err) => {
57
+ process.stderr.write(`${err instanceof Error ? (err.stack ?? err.message) : String(err)}\n`);
58
+ process.exit(1);
59
+ });
60
+ }
61
+ }
19
62
  // `commander` is the first runtime dependency `./main.ts` imports; if it does
20
63
  // not resolve, the install is incomplete (no `node_modules`, partial install,
21
64
  // or a corrupted tree). Probe it cheaply before loading the real CLI.
22
- try {
23
- require.resolve('commander');
24
- }
25
- catch {
26
- // Entry is `<packageRoot>/dist/cli/agent-config.js` → up two dirs.
27
- const packageRoot = join(dirname(fileURLToPath(import.meta.url)), '..', '..');
28
- process.stderr.write("❌ agent-config: runtime dependencies are not installed " +
29
- "(could not resolve 'commander').\n" +
30
- ` Fix: ( cd "${packageRoot}" && npm ci )\n` +
31
- " Then re-run your command.\n");
32
- process.exit(1);
65
+ // The `if` keeps the preflight + main import out of the dispatch hot path
66
+ // without restructuring the launcher flow.
67
+ if (!_dispatchHotPathTaken) {
68
+ try {
69
+ require.resolve('commander');
70
+ }
71
+ catch {
72
+ // Entry is `<packageRoot>/dist/cli/agent-config.js` → up two dirs.
73
+ const packageRoot = join(dirname(fileURLToPath(import.meta.url)), '..', '..');
74
+ process.stderr.write("❌ agent-config: runtime dependencies are not installed " +
75
+ "(could not resolve 'commander').\n" +
76
+ ` Fix: ( cd "${packageRoot}" && npm ci )\n` +
77
+ " Then re-run your command.\n");
78
+ process.exit(1);
79
+ }
80
+ // Deps present — hand off to the real CLI. Keep this a dynamic import so the
81
+ // `commander` graph is only resolved after the preflight passes. `main.ts`
82
+ // owns its own argv parsing, exit-code handling, and error catch.
83
+ void import('./main.js').catch((err) => {
84
+ process.stderr.write(`${err instanceof Error ? (err.stack ?? err.message) : String(err)}\n`);
85
+ process.exit(1);
86
+ });
33
87
  }
34
- // Deps present — hand off to the real CLI. Keep this a dynamic import so the
35
- // `commander` graph is only resolved after the preflight passes. `main.ts`
36
- // owns its own argv parsing, exit-code handling, and error catch.
37
- void import('./main.js').catch((err) => {
38
- process.stderr.write(`${err instanceof Error ? (err.stack ?? err.message) : String(err)}\n`);
39
- process.exit(1);
40
- });
41
88
  //# sourceMappingURL=agent-config.js.map