@event4u/agent-config 8.10.0 → 8.12.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 (226) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +1 -0
  3. package/CHANGELOG.md +67 -149
  4. package/README.md +6 -6
  5. package/dist/agent-src/commands/challenge-me/vision.md +121 -32
  6. package/dist/agent-src/commands/challenge-me/with-docs.md +21 -8
  7. package/dist/agent-src/commands/commit/in-chunks.md +1 -1
  8. package/dist/agent-src/commands/commit.md +2 -1
  9. package/dist/agent-src/commands/cost/report.md +2 -1
  10. package/dist/agent-src/commands/feature/dev.md +4 -4
  11. package/dist/agent-src/commands/humanize.md +101 -0
  12. package/dist/agent-src/commands/jira-ticket.md +2 -2
  13. package/dist/agent-src/commands/memory/load.md +15 -0
  14. package/dist/agent-src/commands/optimize/project.md +12 -0
  15. package/dist/agent-src/commands/roadmap/create.md +12 -11
  16. package/dist/agent-src/commands/tests/create.md +1 -1
  17. package/dist/agent-src/commands/worktree/cleanup.md +22 -17
  18. package/dist/agent-src/commands/worktree/create.md +3 -1
  19. package/dist/agent-src/commands/worktree/status.md +12 -0
  20. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +66 -0
  21. package/dist/agent-src/contexts/execution/orchestration-benchmark-gate.md +1 -0
  22. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +47 -3
  23. package/dist/agent-src/contexts/execution/roadmap-ci-steps-mechanics.md +117 -0
  24. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +111 -85
  25. package/dist/agent-src/contexts/execution/roadmap-writing-source-derived.md +65 -0
  26. package/dist/agent-src/contexts/execution/subagent-modes-detail.md +84 -0
  27. package/dist/agent-src/rules/architecture.md +6 -51
  28. package/dist/agent-src/rules/autonomous-execution.md +7 -37
  29. package/dist/agent-src/rules/broken-access-control.md +7 -45
  30. package/dist/agent-src/rules/code-comment-discipline.md +64 -0
  31. package/dist/agent-src/rules/context-hygiene.md +14 -0
  32. package/dist/agent-src/rules/decision-revisit-gate.md +9 -77
  33. package/dist/agent-src/rules/delegation-policy.md +10 -8
  34. package/dist/agent-src/rules/design-fidelity.md +4 -0
  35. package/dist/agent-src/rules/git-history-discipline.md +4 -79
  36. package/dist/agent-src/rules/improve-before-implement.md +7 -66
  37. package/dist/agent-src/rules/legal-safety-floor.md +11 -55
  38. package/dist/agent-src/rules/no-roadmap-references.md +13 -77
  39. package/dist/agent-src/rules/persona-governance.md +5 -47
  40. package/dist/agent-src/rules/provider-lifecycle-discipline.md +6 -32
  41. package/dist/agent-src/rules/roadmap-ci-steps-policy.md +21 -104
  42. package/dist/agent-src/rules/roadmap-progress-sync.md +5 -56
  43. package/dist/agent-src/rules/think-before-action.md +10 -0
  44. package/dist/agent-src/rules/untrusted-input-defense.md +3 -75
  45. package/dist/agent-src/rules/verify-before-complete.md +12 -0
  46. package/dist/agent-src/skills/agent-docs-writing/SKILL.md +96 -12
  47. package/dist/agent-src/skills/ai-council/SKILL.md +19 -9
  48. package/dist/agent-src/skills/api-design/SKILL.md +7 -5
  49. package/dist/agent-src/skills/api-testing/SKILL.md +1 -1
  50. package/dist/agent-src/skills/authz-review/SKILL.md +59 -2
  51. package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
  52. package/dist/agent-src/skills/bug-analyzer/SKILL.md +19 -16
  53. package/dist/agent-src/skills/code-refactoring/SKILL.md +9 -9
  54. package/dist/agent-src/skills/content-funnel-design/SKILL.md +2 -0
  55. package/dist/agent-src/skills/data-flow-mapper/SKILL.md +1 -1
  56. package/dist/agent-src/skills/decision-review/SKILL.md +86 -0
  57. package/dist/agent-src/skills/defense-in-depth/SKILL.md +2 -2
  58. package/dist/agent-src/skills/dependency-upgrade/SKILL.md +7 -7
  59. package/dist/agent-src/skills/design-intelligence/SKILL.md +8 -8
  60. package/dist/agent-src/skills/design-review/SKILL.md +23 -2
  61. package/dist/agent-src/skills/doc-coauthoring/SKILL.md +2 -0
  62. package/dist/agent-src/skills/editorial-calendar/SKILL.md +2 -0
  63. package/dist/agent-src/skills/fe-design/SKILL.md +7 -9
  64. package/dist/agent-src/skills/git-workflow/SKILL.md +86 -0
  65. package/dist/agent-src/skills/humanizer/SKILL.md +147 -0
  66. package/dist/agent-src/skills/humanizer/data/patterns.md +190 -0
  67. package/dist/agent-src/skills/humanizer/evals/triggers.json +17 -0
  68. package/dist/agent-src/skills/laravel/SKILL.md +14 -1
  69. package/dist/agent-src/skills/launch-readiness/SKILL.md +20 -19
  70. package/dist/agent-src/skills/legal-practice-profile/SKILL.md +126 -0
  71. package/dist/agent-src/skills/logging-monitoring/SKILL.md +1 -1
  72. package/dist/agent-src/skills/mcp/SKILL.md +1 -1
  73. package/dist/agent-src/skills/memory-consolidation/SKILL.md +14 -1
  74. package/dist/agent-src/skills/migration-architect/SKILL.md +2 -1
  75. package/dist/agent-src/skills/module-detect-on-the-fly/SKILL.md +58 -1
  76. package/dist/agent-src/skills/performance/SKILL.md +1 -1
  77. package/dist/agent-src/skills/php-debugging/SKILL.md +17 -0
  78. package/dist/agent-src/skills/readme-writing/SKILL.md +2 -0
  79. package/dist/agent-src/skills/readme-writing-package/SKILL.md +2 -0
  80. package/dist/agent-src/skills/release-comms/SKILL.md +2 -0
  81. package/dist/agent-src/skills/roadmap-writing/SKILL.md +22 -51
  82. package/dist/agent-src/skills/security-audit/SKILL.md +6 -9
  83. package/dist/agent-src/skills/sentry-integration/SKILL.md +2 -2
  84. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +8 -0
  85. package/dist/agent-src/skills/source-discovery/SKILL.md +26 -24
  86. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +55 -46
  87. package/dist/agent-src/skills/subagent-orchestration/evals/evals.json +42 -0
  88. package/dist/agent-src/skills/systematic-debugging/SKILL.md +10 -0
  89. package/dist/agent-src/skills/using-git-worktrees/SKILL.md +10 -0
  90. package/dist/agent-src/skills/worktree-lifecycle/SKILL.md +27 -20
  91. package/dist/agent-src/skills/worktree-lifecycle/evals/evals.json +38 -0
  92. package/dist/agent-src/templates/agent-settings.md +3 -2
  93. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +15 -1
  94. package/dist/agent-src/templates/contexts/knowledge-card.md +12 -0
  95. package/dist/agent-src/templates/roadmaps.md +14 -0
  96. package/dist/cli/commands/recordTriggerEval.js +4 -14
  97. package/dist/cli/commands/recordTriggerEval.js.map +1 -1
  98. package/dist/discovery/deprecation-report.md +1 -1
  99. package/dist/discovery/discovery-manifest.json +157 -88
  100. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  101. package/dist/discovery/discovery-manifest.summary.md +6 -6
  102. package/dist/discovery/orphan-report.md +1 -1
  103. package/dist/discovery/packs.json +13 -10
  104. package/dist/discovery/trust-report.md +3 -3
  105. package/dist/discovery/workspaces.json +14 -9
  106. package/dist/install/install.mjs +12 -7
  107. package/dist/mcp/registry-manifest.json +4 -4
  108. package/dist/router.json +1 -1
  109. package/dist/scripts/_lib/claude_settings_hooks.js +8 -0
  110. package/dist/scripts/_lib/claude_settings_hooks.js.map +1 -1
  111. package/dist/scripts/_lib/trigger_eval_floors.js +24 -0
  112. package/dist/scripts/_lib/trigger_eval_floors.js.map +1 -0
  113. package/dist/scripts/condense.js +12 -2
  114. package/dist/scripts/condense.js.map +1 -1
  115. package/dist/server/schemas/settings.js +5 -2
  116. package/dist/server/schemas/settings.js.map +1 -1
  117. package/docs/CLAIMS.md +54 -5
  118. package/docs/architecture.md +4 -4
  119. package/docs/archive/CHANGELOG-pre-8.12.0.md +304 -0
  120. package/docs/benchmark.md +90 -0
  121. package/docs/catalog.md +8 -5
  122. package/docs/command-flows.md +2 -1
  123. package/docs/contracts/ai-council-config.md +97 -0
  124. package/docs/contracts/command-clusters.md +1 -0
  125. package/docs/contracts/evidence-based-pruning.md +1 -0
  126. package/docs/contracts/hook-architecture-v1.md +25 -0
  127. package/docs/contracts/kernel-membership.md +35 -0
  128. package/docs/contracts/measurement-baseline.md +1 -0
  129. package/docs/contracts/persona-schema.md +49 -0
  130. package/docs/contracts/provider-lifecycle.md +29 -4
  131. package/docs/contracts/release-sizing.md +22 -0
  132. package/docs/contracts/write-engine.md +38 -1
  133. package/docs/customization.md +12 -0
  134. package/docs/decisions/ADR-002-kernel-bucket-overrides.md +11 -0
  135. package/docs/decisions/ADR-003-flat-cluster-subs-and-colon-syntax.md +11 -0
  136. package/docs/decisions/ADR-006-skill-tools-python-pilot.md +1 -1
  137. package/docs/decisions/ADR-028-root-layout.md +1 -1
  138. package/docs/decisions/ADR-038-canonical-settings-path.md +10 -0
  139. package/docs/decisions/ADR-092-defer-command-tier-alias-removal.md +29 -5
  140. package/docs/decisions/ADR-093-ai-council-config-user-global.md +1 -1
  141. package/docs/decisions/ADR-100-global-knowledge-card-sharing.md +7 -0
  142. package/docs/decisions/ADR-103-global-knowledge-default-off-until-measured.md +2 -2
  143. package/docs/decisions/ADR-105-automatic-subagent-orchestration.md +1 -1
  144. package/docs/decisions/ADR-114-commit-policy-iron-law-override.md +11 -0
  145. package/docs/decisions/ADR-116-memory-tripwire-activation-path.md +11 -1
  146. package/docs/decisions/ADR-117-subagents-auto-default-on.md +2 -1
  147. package/docs/decisions/ADR-118-loop-engineering-boundaries.md +162 -0
  148. package/docs/decisions/ADR-119-global-knowledge-default-on.md +104 -0
  149. package/docs/decisions/ADR-120-council-chairman-mode.md +70 -0
  150. package/docs/decisions/ADR-121-knowledge-sensitivity-classes.md +90 -0
  151. package/docs/decisions/ADR-200-python-to-typescript-migration.md +11 -1
  152. package/docs/decisions/ADR-rule-kernel-and-router.md +11 -0
  153. package/docs/decisions/INDEX.md +13 -9
  154. package/docs/design/council-vs-solo-baseline.md +92 -0
  155. package/docs/design/cross-model-parity-eval.md +82 -0
  156. package/docs/design/length-neutral-judge-rerun.md +92 -0
  157. package/docs/design/utilization-window-criteria.md +51 -0
  158. package/docs/featured-skills.md +2 -2
  159. package/docs/getting-started-by-role.md +1 -1
  160. package/docs/getting-started.md +2 -2
  161. package/docs/governance-advantage.md +1 -1
  162. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +68 -0
  163. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +80 -5
  164. package/docs/guidelines/agent-infra/rule-body-migration-inventory.md +241 -0
  165. package/docs/guidelines/agent-infra/untrusted-input-spotlighting.md +80 -3
  166. package/docs/guidelines/code-clarity.md +191 -1
  167. package/docs/guidelines/design-antipatterns.md +20 -0
  168. package/docs/guidelines/php/php-coding-patterns.md +12 -2
  169. package/docs/maintainers/branch-protection.md +87 -0
  170. package/docs/maintainers/system-map.md +85 -0
  171. package/docs/proof.md +32 -15
  172. package/docs/wedge/production-validator/production-validator.md +27 -0
  173. package/package.json +1 -1
  174. package/src/config/agent-settings.template.yml +38 -9
  175. package/src/scripts/_cli/cmd_doctor.ts +129 -1
  176. package/src/scripts/_lib/auto_dispatch.corpus.test.ts +87 -0
  177. package/src/scripts/_lib/claude_settings_hooks.ts +8 -0
  178. package/src/scripts/_lib/knowledge_global.ts +50 -2
  179. package/src/scripts/_lib/knowledge_global_promote.ts +150 -0
  180. package/src/scripts/_lib/knowledge_global_redaction.ts +42 -4
  181. package/src/scripts/_lib/lexical_index.ts +15 -2
  182. package/src/scripts/_lib/orchestration_record.ts +14 -0
  183. package/src/scripts/_lib/trigger_eval_floors.ts +31 -0
  184. package/src/scripts/ai_council/chairman.ts +90 -0
  185. package/src/scripts/ai_council/clients.ts +18 -3
  186. package/src/scripts/ai_council/config.ts +157 -0
  187. package/src/scripts/ai_council/debate_gates.ts +89 -0
  188. package/src/scripts/ai_council/orchestrator.ts +252 -2
  189. package/src/scripts/ai_council/prompts.ts +121 -11
  190. package/src/scripts/ai_council/replay.ts +17 -0
  191. package/src/scripts/ai_council/stance_tally.ts +184 -0
  192. package/src/scripts/ai_tells_rules.ts +433 -0
  193. package/src/scripts/bench_humanizer_eval.ts +240 -0
  194. package/src/scripts/bench_persona_placebo.ts +308 -0
  195. package/src/scripts/bench_quality_rerun.ts +357 -0
  196. package/src/scripts/build_discovery_manifest.ts +6 -0
  197. package/src/scripts/build_proof.ts +30 -9
  198. package/src/scripts/check_artefact_count_messaging.ts +56 -0
  199. package/src/scripts/check_claims.ts +40 -0
  200. package/src/scripts/check_knowledge_cards.ts +33 -4
  201. package/src/scripts/check_portability.ts +1 -0
  202. package/src/scripts/check_rule_invariants.ts +10 -3
  203. package/src/scripts/complexity_report.ts +776 -0
  204. package/src/scripts/condense.ts +16 -2
  205. package/src/scripts/consumer_matrix.ts +292 -14
  206. package/src/scripts/council_cli.ts +203 -1
  207. package/src/scripts/detect_ai_tells.ts +312 -0
  208. package/src/scripts/explain_run.ts +593 -0
  209. package/src/scripts/install.ts +12 -0
  210. package/src/scripts/knowledge_global_cli.ts +235 -46
  211. package/src/scripts/lint_framework_leakage.ts +88 -7
  212. package/src/scripts/lint_framework_leakage_allowlist.json +59 -572
  213. package/src/scripts/lint_knowledge_scale.ts +30 -0
  214. package/src/scripts/lint_originality_shingles.ts +210 -0
  215. package/src/scripts/orchestration_record.ts +1 -0
  216. package/src/scripts/rule_backlinks.ts +0 -0
  217. package/src/scripts/schemas/agent-settings.schema.json +11 -0
  218. package/src/scripts/self_review_gate.ts +41 -15
  219. package/src/scripts/skill_eval_coverage.ts +71 -3
  220. package/src/scripts/skill_linter.ts +1 -0
  221. package/src/scripts/trigger_eval_rotation.ts +344 -0
  222. package/src/scripts/update_counts.ts +5 -17
  223. package/src/scripts/worktree_cleanup_check.ts +263 -0
  224. package/src/server/schemas/settings.ts +8 -3
  225. package/src/scripts/analysis_freshness.ts +0 -362
  226. package/src/scripts/export_replay_corpus.ts +0 -208
@@ -5,8 +5,8 @@ _Auto-generated by `scripts/adr/regenerate_index.py`. Do not edit._
5
5
  | # | Title | Status | Date | Supersedes |
6
6
  |---|---|---|---|---|
7
7
  | [ADR-001](ADR-001-kernel-swap-deferred.md) | Kernel Swap Deferred | accepted | 2026-05-06 | — |
8
- | [ADR-002](ADR-002-kernel-bucket-overrides.md) | Kernel Bucket Overrides | — | — | — |
9
- | [ADR-003](ADR-003-flat-cluster-subs-and-colon-syntax.md) | Flat Cluster Subs And Colon Syntax | — | — | — |
8
+ | [ADR-002](ADR-002-kernel-bucket-overrides.md) | Kernel Bucket Overrides | accepted | 2026-05-06 | — |
9
+ | [ADR-003](ADR-003-flat-cluster-subs-and-colon-syntax.md) | Flat Cluster Subs And Colon Syntax | accepted | 2026-05-07 | — |
10
10
  | [ADR-004](ADR-004-rule-governance-pruning.md) | Rule Governance Pruning | accepted | 2026-05-08 | — |
11
11
  | [ADR-005](ADR-005-subagent-worktrees.md) | Subagent Worktrees No Auto Merge | accepted | 2026-05-09 | — |
12
12
  | [ADR-006](ADR-006-skill-tools-python-pilot.md) | Skill Tools Python Pilot Pass | accepted | 2026-05-09 | — |
@@ -31,7 +31,7 @@ _Auto-generated by `scripts/adr/regenerate_index.py`. Do not edit._
31
31
  | [ADR-025](ADR-025-workspace-chrome.md) | Workspace Chrome | accepted | 2026-05-24 | — |
32
32
  | [ADR-026](ADR-026-explain-mode-translation.md) | Explain Mode Translation | accepted | 2026-05-24 | — |
33
33
  | [ADR-027](ADR-027-changelog-machine-vs-manual.md) | Changelog Machine Vs Manual | accepted | 2026-05-25 | — |
34
- | [ADR-028](ADR-028-root-layout.md) | Root Layout | accepted | 2026-05-25 | — |
34
+ | [ADR-028](ADR-028-root-layout.md) | Root Layout | superseded | 2026-05-25 | — |
35
35
  | [ADR-029](ADR-029-multi-workspace-deferred.md) | Multi Workspace Deferred | accepted | 2026-05-25 | — |
36
36
  | [ADR-030](ADR-030-claude-code-command-projection.md) | Claude Code Command Projection | accepted | 2026-05-28 | — |
37
37
  | [ADR-031](ADR-031-validation-severity-tiers-and-projection-roundtrip.md) | Validation Severity Tiers And Projection Roundtrip | accepted | 2026-05-29 | — |
@@ -41,7 +41,7 @@ _Auto-generated by `scripts/adr/regenerate_index.py`. Do not edit._
41
41
  | [ADR-035](ADR-035-model-capability-tiers.md) | Model Capability Tiers | accepted | 2026-05-30 | 034 |
42
42
  | [ADR-036](ADR-036-global-install-browser-wizard-handoff.md) | Global Install Browser Wizard Handoff | accepted | 2026-06-01 | — |
43
43
  | [ADR-037](ADR-037-cost-profile-untangle.md) | Cost Profile Untangle | accepted | 2026-06-01 | — |
44
- | [ADR-038](ADR-038-canonical-settings-path.md) | Canonical Settings Path | — | — | — |
44
+ | [ADR-038](ADR-038-canonical-settings-path.md) | Canonical Settings Path | accepted | 2026-06-01 | — |
45
45
  | [ADR-039](ADR-039-claude-skills-untracked.md) | Claude Skills Untracked | accepted | 2026-06-01 | — |
46
46
  | [ADR-040](ADR-040-execution-model-projection-time-filtering.md) | Execution Model Projection Time Filtering | accepted | 2026-06-02 | — |
47
47
  | [ADR-041](ADR-041-controlled-command-verbs.md) | Controlled Command Verbs | accepted | 2026-06-03 | — |
@@ -96,7 +96,7 @@ _Auto-generated by `scripts/adr/regenerate_index.py`. Do not edit._
96
96
  | [ADR-090](ADR-090-visibility-command-frontmatter-field.md) | Visibility Command Frontmatter Field | accepted | 2026-06-13 | — |
97
97
  | [ADR-091](ADR-091-split-meta-capability-packs.md) | Split Meta Capability Packs | accepted | 2026-06-13 | — |
98
98
  | [ADR-092](ADR-092-defer-command-tier-alias-removal.md) | Defer Command Tier Alias Removal | accepted | 2026-06-13 | — |
99
- | [ADR-093](ADR-093-ai-council-config-user-global.md) | Ai Council Config User Global | accepted | 2026-06-13 | — |
99
+ | [ADR-093](ADR-093-ai-council-config-user-global.md) | Ai Council Config User Global | superseded | 2026-06-13 | — |
100
100
  | [ADR-094](ADR-094-agent-memory-layer-removal.md) | Agent Memory Layer Removal | accepted | 2026-06-14 | — |
101
101
  | [ADR-095](ADR-095-workspace-boundary-contract.md) | Workspace Boundary Contract | accepted | 2026-06-14 | — |
102
102
  | [ADR-096](ADR-096-analysis-workbench.md) | Analysis Workbench | accepted | 2026-06-15 | — |
@@ -106,7 +106,7 @@ _Auto-generated by `scripts/adr/regenerate_index.py`. Do not edit._
106
106
  | [ADR-100](ADR-100-global-knowledge-card-sharing.md) | Global Knowledge Card Sharing | accepted | 2026-06-15 | ADR-098 |
107
107
  | [ADR-101](ADR-101-ticket-bundle-emission.md) | Ticket Bundle Emission | proposed | 2026-06-15 | — |
108
108
  | [ADR-102](ADR-102-ticket-handoff-paste-and-mcp.md) | Ticket Handoff Paste And Mcp | accepted | 2026-06-16 | — |
109
- | [ADR-103](ADR-103-global-knowledge-default-off-until-measured.md) | Global Knowledge Default Off Until Measured | accepted | 2026-06-16 | — |
109
+ | [ADR-103](ADR-103-global-knowledge-default-off-until-measured.md) | Global Knowledge Default Off Until Measured | superseded | 2026-06-16 | — |
110
110
  | [ADR-104](ADR-104-ai-council-config-global-only.md) | Ai Council Config Global Only | accepted | 2026-06-22 | 093 |
111
111
  | [ADR-105](ADR-105-automatic-subagent-orchestration.md) | Automatic Subagent Orchestration | accepted | 2026-06-23 | — |
112
112
  | [ADR-106](ADR-106-recursive-verification-benchmark-gate.md) | Recursive Verification Benchmark Gate | accepted | 2026-06-23 | — |
@@ -117,14 +117,18 @@ _Auto-generated by `scripts/adr/regenerate_index.py`. Do not edit._
117
117
  | [ADR-111](ADR-111-canonical-glama-listing.md) | Canonical Glama Listing | accepted | 2026-07-07 | — |
118
118
  | [ADR-112](ADR-112-stdio-lite-stays-read-only.md) | Stdio Lite Stays Read Only | accepted | 2026-07-07 | — |
119
119
  | [ADR-113](ADR-113-ci-native-release-label-trigger.md) | Ci Native Release Label Trigger | accepted | 2026-07-08 | — |
120
- | [ADR-114](ADR-114-commit-policy-iron-law-override.md) | Commit Policy Iron Law Override | — | — | — |
120
+ | [ADR-114](ADR-114-commit-policy-iron-law-override.md) | Commit Policy Iron Law Override | accepted | 2026-07-08 | — |
121
121
  | [ADR-115](ADR-115-command-cluster-consolidation-phase-4.md) | Command Cluster Consolidation Phase 4 | accepted | 2026-07-08 | — |
122
122
  | [ADR-116](ADR-116-memory-tripwire-activation-path.md) | Memory Tripwire Activation Path | accepted | 2026-07-08 | — |
123
- | [ADR-117](ADR-117-subagents-auto-default-on.md) | Subagents Auto Default On | accepted | 2026-07-09 | 105 |
123
+ | [ADR-117](ADR-117-subagents-auto-default-on.md) | Subagents Auto Default On | accepted | 2026-07-09 | — |
124
+ | [ADR-118](ADR-118-loop-engineering-boundaries.md) | Loop Engineering Boundaries | accepted | 2026-07-10 | — |
125
+ | [ADR-119](ADR-119-global-knowledge-default-on.md) | Global Knowledge Default On | accepted | 2026-07-12 | 103 |
126
+ | [ADR-120](ADR-120-council-chairman-mode.md) | Council Chairman Mode | accepted | 2026-07-12 | — |
127
+ | [ADR-121](ADR-121-knowledge-sensitivity-classes.md) | Knowledge Sensitivity Classes | accepted | 2026-07-12 | — |
124
128
  | [ADR-200](ADR-200-python-to-typescript-migration.md) | Python To Typescript Migration | accepted | 2026-06-11 | — |
125
129
 
126
130
  ## Unnumbered (legacy)
127
131
 
128
132
  | # | Title | Status | Date | Supersedes |
129
133
  |---|---|---|---|---|
130
- | [ADR-rule-kernel-and-router](ADR-rule-kernel-and-router.md) | — | — | — | — |
134
+ | [ADR-rule-kernel-and-router](ADR-rule-kernel-and-router.md) | Rule Kernel And Router Roadmap Closure | accepted | 2026-05-06 | — |
@@ -0,0 +1,92 @@
1
+ # Council-vs-solo baseline eval — design (pre-registered)
2
+
3
+ > Design artifact for `road-to-feedback-8.11` Phase 3. It fixes the
4
+ > methodology **before** the first billable call; the run itself is
5
+ > spend-gated (blocker `council-baseline-spend-authorization` — the user
6
+ > confirms the rendered estimate in-session). This document is the "design
7
+ > the baseline" step — not the run. Companion claim:
8
+ > `docs/CLAIMS.md § council-vs-solo-baseline` (status: unbacked until the run
9
+ > resolves).
10
+
11
+ ## Why this exists
12
+
13
+ The council deliberation protocol (stance tally, chairman, debate gates,
14
+ anti-conformity) is well-built and default-off — but there is **no evidence
15
+ that convening the council beats a single strong model** on any decision
16
+ class. The 2026-07-12 feedback-disposition debate (claude-sonnet-4-5 +
17
+ gpt-4o) REJECTED adding a ≥2-of-5 admission gate for exactly this reason and
18
+ ADOPTED this baseline as the precondition for ANY further
19
+ deliberation-protocol expansion: admission criteria must be derived from
20
+ empirical decision characteristics, not a-priori heuristics.
21
+
22
+ Shadow-log status at design time (2026-07-12): `agents/runtime/council/
23
+ shadow-log.jsonl` is **absent/empty** on both the main checkout and the run
24
+ worktree — the shadow-dispatch agreement mechanism has produced zero
25
+ analyzable lines. That absence is itself the first finding: the only
26
+ council-vs-solo signal the package planned to collect has no data, so a
27
+ deliberate baseline run is the only path to a verdict.
28
+
29
+ ## Arms
30
+
31
+ | Arm | What runs | Cost profile |
32
+ |---|---|---|
33
+ | A — solo | ONE strong model (the council's strongest configured member, single call, standard prompt) | 1 call/decision |
34
+ | B — council | The full configured council in `debate` mode (2 members × ≤2 rounds, current defaults; stance tally ON so dissent is recorded) | 4–5 calls/decision |
35
+
36
+ Same decision text, same context budget, both arms blind to each other.
37
+
38
+ ## Corpus — ≥30 real decisions
39
+
40
+ - Source: real decision questions from the repo's own history — the
41
+ council-labelled golden set (labels final per the 2026-07-11 amendment; no
42
+ re-labelling) plus archived council question files whose ground-truth
43
+ disposition is now KNOWN (the decision shipped and survived, was reverted,
44
+ or was killed by later evidence). Minimum n = 30; pre-register the exact
45
+ list in the run manifest BEFORE the first call.
46
+ - Class mix: at least 8 decisions per impact class {low, medium, high} so the
47
+ per-class analysis (the whole point — which characteristics correlate with
48
+ council lift) is not vacuous.
49
+
50
+ ## Metrics — fixed before data
51
+
52
+ 1. **Quality**: blind post-hoc grading of both arms' verdicts against the
53
+ known ground-truth disposition — primary judge = strongest available
54
+ model, blind second judge, report Cohen's κ (reuse `cohensKappa()` /
55
+ `judgeKappa()` from `src/scripts/check_quality_regression.ts`); verdict
56
+ admissible only at κ ≥ 0.60.
57
+ 2. **Cost**: tokens + USD (from the council cost ledger) + wall-clock per
58
+ decision, per arm.
59
+ 3. **Characteristics capture**: per decision, record the five feedback-
60
+ proposed dimensions (reversibility cost, material spend/risk,
61
+ multi-perspective conflict, evidence tension, policy/governance change) as
62
+ booleans AT PRE-REGISTRATION TIME (not after results) — so the ≥2-of-5
63
+ hypothesis is testable as a POST-HOc correlate without having gated
64
+ anything.
65
+
66
+ ## Kill criterion (falsifiable, from the 2026-07-12 debate)
67
+
68
+ - **No lift anywhere**: if council decisions show no identifiable quality
69
+ lift on ANY decision subset (overall AND per impact class AND per
70
+ dimension-count stratum), further deliberation-protocol phases STOP and
71
+ the protocol goes maintenance-only; `road-to-opt-council-deliberation`
72
+ records the honest null.
73
+ - **Lift on a subset**: derive empirical admission criteria FROM that
74
+ subset's recorded characteristics (which may or may not match the ≥2-of-5
75
+ heuristic — the data decides), and only then design an admission gate.
76
+ - **Judge floor**: κ < 0.60 → record κ, withhold the win-rate, do not claim
77
+ either direction.
78
+
79
+ ## Spend gate
80
+
81
+ Execution requires in-session user confirmation of the rendered estimate
82
+ (existing council estimate machinery; ~30 decisions × (1 + ~4.5) calls —
83
+ estimate rendered by `council estimate` at run time). Authoring the corpus
84
+ manifest and this design is unblocked and free.
85
+
86
+ ## Non-goals
87
+
88
+ - Not a cross-provider capability comparison (both arms use the configured
89
+ members; provider identity is held constant per arm definition).
90
+ - Not a re-test of the deliberation features individually (stance tally,
91
+ chairman) — arm B runs the current default debate shape; feature ablations
92
+ are follow-ups only if B beats A at all.
@@ -0,0 +1,82 @@
1
+ # Cross-model parity eval — re-scoped design
2
+
3
+ > Design artifact for `road-to-opt-measurement-unblock` Phase 3 step 1. It
4
+ > re-scopes the archive's most-deferred item (deferred across 4+ roadmaps) to the
5
+ > **smallest capability** that produces a real cross-vendor parity signal, so the
6
+ > build-vs-defer decision (step 2) rests on a concrete design, not the generic
7
+ > "the harness doesn't exist". Writing this design is autonomous; **building and
8
+ > running it is a maintainer cost decision** (step 2/3), disclosed and gated.
9
+
10
+ ## What changed since the last deferral
11
+
12
+ | Original blocker | Status now |
13
+ |---|---|
14
+ | No delegable-task corpus | **RESOLVED** — `internal/bench/orchestration/corpus/` exists (`orch-*` orchestration tasks + `pv-*` production-validator tasks) |
15
+ | Harness cannot execute model-emitted subagent calls | **STILL TRUE** — do not assume it away; re-scope around it |
16
+
17
+ The corpus blocker no longer holds, so the item is re-openable — but only if we
18
+ stop trying to build the thing that is still blocked (a full in-host harness that
19
+ runs arbitrary model-emitted subagent calls).
20
+
21
+ ## The re-scope: council-transport execution, not an in-host harness
22
+
23
+ **Don't** build a harness that executes model-emitted subagent calls end-to-end
24
+ (the still-open blocker). **Do** reuse the capability that already exists: the AI
25
+ council transport dispatches the *same* prompt to *multiple vendors* through
26
+ `consult(members: ExternalAIClient[], …)` in
27
+ [`src/scripts/ai_council/orchestrator.ts`](../../src/scripts/ai_council/orchestrator.ts).
28
+
29
+ The smallest capability that yields a cross-model parity signal:
30
+
31
+ 1. **Task adapter.** Render each corpus task (`internal/bench/orchestration/corpus/*.md`)
32
+ into a single self-contained council prompt: the task + its rubric, asking the
33
+ model to *produce the findings it would surface* (not to actually spawn
34
+ subagents). This sidesteps the subagent-execution blocker — we measure the
35
+ model's **finding output on the delegable task**, not its ability to drive a
36
+ live subagent runtime.
37
+ 2. **≥ 2 vendors, same corpus.** Dispatch the identical prompt set to two distinct
38
+ vendors via the existing `ExternalAIClient` array — no new transport, no new
39
+ auth surface beyond what the council already has.
40
+ 3. **Per-host finding-count distribution.** For each (host × task), record the
41
+ count and the findings; aggregate to a per-host distribution over the corpus.
42
+ 4. **Blind judged quality (optional, gated).** If a quality signal beyond raw
43
+ counts is wanted, reuse the blind second-judge + Cohen's κ from
44
+ [`check_quality_regression.ts`](../../src/scripts/check_quality_regression.ts)
45
+ — the same discipline the Phase-1 rerun uses. This is the billable half; the
46
+ count distributions (step 3) are cheap and already informative.
47
+
48
+ **Explicitly out of scope:** running the models' emitted subagent calls, a
49
+ persistent multi-host runtime, any new vendor integration. If the signal needs
50
+ more than council-transport can give, that is a *separate, later* build — named,
51
+ not assumed.
52
+
53
+ ## What the signal feeds — `finding_floor` calibration
54
+
55
+ `finding_floor` is an **inert mechanism today** (referenced in
56
+ `run_skill_evals.ts` / `skill_linter.ts` / `evals.schema.json`); its recorded
57
+ deferral reason was exactly the missing calibration input this eval produces. The
58
+ per-host finding-count distributions calibrate the floor:
59
+
60
+ - Derive the floor from the **cross-host lower envelope** (e.g. a low percentile of
61
+ the per-task finding counts across vendors) so the gate fires on a host/task that
62
+ under-produces relative to the cross-vendor norm, not relative to one vendor.
63
+ - Once calibrated, promote `finding_floor` from inert to an **enforcing CI gate**
64
+ (its intended end state).
65
+
66
+ ## Build-vs-defer decision inputs (for step 2, maintainer)
67
+
68
+ - **Cost:** the count-distribution pass (steps 1–3) is `N_tasks × N_vendors`
69
+ council calls — small and cheap; render the `council:estimate`-class disclosure
70
+ before the first call. The judged-quality half (step 4) roughly doubles it.
71
+ - **Value:** unblocks `finding_floor` (arms a real CI gate) **and** produces the
72
+ first honest cross-vendor parity number the portfolio has ever had.
73
+ - **Defer condition:** if built later, park with the concrete missing capability
74
+ named — here it would be "council-transport task-adapter for the orchestration
75
+ corpus", never the generic "harness doesn't exist".
76
+
77
+ ## Exit criteria mapping
78
+
79
+ - This design doc **exists** (step 1 — done by writing this). ✓
80
+ - Explicit **build/defer decision recorded** (step 2 — maintainer, cost attached). ⏳
81
+ - If built: `finding_floor` calibration data exists and the gate is armed
82
+ (step 3 — gated on the decision + spend). ⏳
@@ -0,0 +1,92 @@
1
+ # Length-neutral judge rerun — design
2
+
3
+ > Design artifact for `road-to-opt-measurement-unblock` Phase 1. It fixes the
4
+ > methodology **before** the first billable call; the run itself is a maintainer
5
+ > `/dev/tty`-gated, money-moving execution (disclose the estimate, confirm the
6
+ > budget in-session, then run). This document is the "design the rerun" step —
7
+ > not the run.
8
+
9
+ ## Why a rerun
10
+
11
+ The 2026-07-09 discipline-lift judge run was **inconclusive** and now gates ~40%
12
+ of the active token-program portfolio. Three recorded failure modes made it
13
+ un-trustworthy; each has a concrete fix below. Nothing ships from the prior run —
14
+ its verdict is void, not "weakly positive".
15
+
16
+ | # | Failure mode (2026-07-09) | Magnitude | Fix in this design |
17
+ |---|---|---|---|
18
+ | a | **Length confound** — the preferred arm was systematically longer, so the judge rewarded length, not discipline | 69% of variance | Length-matched pairs **and** a length-partialed rubric (both, belt-and-braces) |
19
+ | b | **Judge inconsistency** — a single judge disagreed with itself / a second grader | 33% inconsistency | Stronger judge tier + a blind second judge, reported as Cohen's κ |
20
+ | c | **Underpowered comparison** | p = 0.196 (n too small) | Pre-registered sample size from the golden corpus, fixed before the first call |
21
+
22
+ ## (a) Length confound — neutralise it two ways
23
+
24
+ 1. **Length-matched pairing.** For each decision task, constrain the two arms
25
+ (vanilla vs `essential` discipline) to within a **±15% token band** of each
26
+ other before judging. Pairs that cannot be matched within the band are
27
+ dropped from the primary analysis and reported separately (never silently
28
+ discarded). This removes length as a *between-arm* signal.
29
+ 2. **Length-partialed rubric.** The judge prompt scores **task quality only** and
30
+ is explicitly instructed that response length is **not** a quality signal;
31
+ the harness additionally records each response's token count and runs the
32
+ verdict through a length-partialed check — if the win-rate correlates with the
33
+ length delta (Spearman ρ over the surviving pairs), the run is flagged
34
+ `length-confounded` and the verdict is withheld, exactly as the exit criterion
35
+ demands ("no length confound flag").
36
+
37
+ Both, not either: matching removes the gross effect, partialing catches residual
38
+ leakage the band still admits.
39
+
40
+ ## (b) Judge inconsistency — stronger tier + a second judge, reported as κ
41
+
42
+ - **Judge tier.** Use the strongest available judge model for the primary grade
43
+ (not the cheapest); the grading cost is a fraction of the generation cost and
44
+ judge quality is the binding constraint here.
45
+ - **Blind second judge + Cohen's κ — reuse, do not rebuild.** The second-judge
46
+ agreement machinery already exists: `cohensKappa()` + `judgeKappa()` in
47
+ [`src/scripts/check_quality_regression.ts`](../../src/scripts/check_quality_regression.ts)
48
+ align two judges' per-pair winner labels by task id and return chance-corrected
49
+ κ. Run both judges **blind to arm labels** and to each other; report κ
50
+ **alongside every verdict**.
51
+ - **κ floor.** The verdict is admissible only when **κ ≥ 0.60** (substantial
52
+ agreement). Below the floor, the win-rate rests on an unreliable grader — record
53
+ the κ, do **not** report the win-rate as a finding, and stop (see disposition).
54
+
55
+ ## (c) Underpowered — pre-register the sample size
56
+
57
+ - **Corpus.** Draw decision tasks from the council-labelled golden set landed by
58
+ PR #885 (labels are final per the 2026-07-11 amendment — **no re-labelling**).
59
+ - **Power target.** Pre-register n for **80% power** at the smallest
60
+ effect worth shipping (target: detect a **≥ 10pp** win-rate difference from 50%
61
+ at α = 0.05). Fix n **before** the first billable call; do not grow n after
62
+ seeing results (that is the p-hacking the prior run's `p = 0.196` invites).
63
+ - **Statistic.** Paired win/loss over matched pairs → the exact binomial
64
+ sign-test (`signTestP` already in `second_brain_retrieval.ts`) or McNemar
65
+ (`bench_ab_v2_stats.ts`); report the two-sided p and the effect size, never a
66
+ bare "significant".
67
+
68
+ ## Report schema (verdict artifact)
69
+
70
+ Written under `internal/bench/reports/` with, inline and non-optional:
71
+
72
+ - per-arm win/loss/tie counts over the **surviving matched pairs** (+ the dropped-pair count);
73
+ - **κ** (both judges) and the κ floor used;
74
+ - the length-confound diagnostic (Spearman ρ of win-rate vs length delta) and the
75
+ pass/`length-confounded` flag;
76
+ - pre-registered n, achieved power, and the sign-test / McNemar p + effect size;
77
+ - a one-line **verdict**: `ships-lift` / `honest-null` / `inconclusive-<reason>`.
78
+
79
+ ## Disposition (Phase 1 step 4)
80
+
81
+ - **Trustworthy verdict, either direction** (κ ≥ floor, no length flag, powered):
82
+ update the token-program tracking table in `road-to-token-proof-and-story.md`
83
+ and unblock/close the dependent gates.
84
+ - **Second inconclusive:** record *why* with the diagnostics above and **stop** —
85
+ no third run without a further design change. The anti-pattern this roadmap
86
+ kills is "gate pending" with no diagnosis.
87
+
88
+ ## What this design does NOT decide
89
+
90
+ The **execution** — the cost estimate, the in-session budget confirmation, and the
91
+ paid paired run — is the maintainer's, disclosed and confirmed per the acceptance
92
+ criteria. This document only makes the run, when authorized, trustworthy.
@@ -0,0 +1,51 @@
1
+ # Utilization-window decision criteria — pre-registered
2
+
3
+ > Design artifact for `road-to-feedback-8.11-2` Phase 0. The engagement
4
+ > observation window (telemetry.artifact_engagement, id-only,
5
+ > PII-excluded-by-construction) has been RUNNING in the agent-config repo
6
+ > since 2026-07-12. Per the repo's claims convention, the window's decision
7
+ > rules are fixed HERE, BEFORE the numbers accumulate — the reviewer's
8
+ > warning was precise: without pre-fixed criteria "the window ends with
9
+ > many events and no decidable statement." Companion claim:
10
+ > `docs/CLAIMS.md § utilization-window-decidability`.
11
+
12
+ ## Observation floor (all three, else "underpowered")
13
+
14
+ 1. **≥ 100 recorded task boundaries** in `.agent-engagement.jsonl`
15
+ (boundary_kind `task` or `phase-step`).
16
+ 2. **≥ 2 distinct hosts** contributed records (host identity read from the
17
+ session context at analysis time, not stored in the event — the event
18
+ schema stays id-only; if host cannot be attributed without widening the
19
+ schema, the floor degrades to "≥ 2 distinct recording periods ≥ 14 days
20
+ apart" and this deviation is recorded in the closing report).
21
+ 3. **≥ 45 elapsed days** since 2026-07-12.
22
+
23
+ Below the floor at day 90 → the window is **underpowered**: extend ONCE by
24
+ 30 days. Still below → STOP, record the honest null ("insufficient natural
25
+ usage volume to decide utilization"), and do NOT rebuild collection
26
+ apparatus without a new demand signal.
27
+
28
+ ## Decision rules (fixed now — no goalpost-moving)
29
+
30
+ | # | Observation at window close | Bound decision |
31
+ |---|---|---|
32
+ | D1 | Artifact kind entry (skill/rule/command/guideline/persona id) **loaded-never-consulted** across the full window (requires the U1a `loaded` denominator; if U1a has not landed, D1 degrades to consulted-set analysis and says so) | Goes on the **retirement-candidate list** feeding U1's ranked cut list — candidate, not auto-cut; kernel + safety floors exempt by construction |
33
+ | D2 | Artifact **consulted-never-applied** with ≥ 5 consultations and applied-ratio < 10% | Goes on the **trigger-review queue** (description/trigger overhaul, not deletion) |
34
+ | D3 | Window closes **above the floor** | The first U1 report MUST name ≥ 1 concrete keep/cut/review decision per artifact kind, or record per kind why the data does not support one |
35
+ | D4 | Window closes **below the floor** (after the one extension) | Honest null; lifecycle-automation and field-outcome-ledger gates STAY closed (their revisit-if remains "≥ 1 full window") |
36
+
37
+ ## Explicitly out of scope for this window
38
+
39
+ - **Outcome-quality attribution** (did artifact X improve the result) —
40
+ needs the `loaded` denominator plus far more volume; stays with U1a.
41
+ - **Cost-vs-rework economics** — owned by the orchestration telemetry
42
+ track (`road-to-subagent-value-realization-followup`).
43
+ - **Cross-repo aggregation** — the window is this repo only (council
44
+ condition from the 8.11 disposition).
45
+
46
+ ## Kill criterion
47
+
48
+ If the window closes decidable (D3) but its decisions are cited by zero
49
+ actual portfolio changes within 2 releases, the analysis layer (not the
50
+ telemetry) is the dead weight — record that honest null before building
51
+ any further reporting on top.
@@ -1,6 +1,6 @@
1
1
  # Featured Skills
2
2
 
3
- A curated subset of the 270 skills. Three tiers, one per primary audience. Full catalog lives in [`dist/agent-src/skills/`](../dist/agent-src/skills/); see also [`docs/catalog.md`](catalog.md) for the complete index and [`docs/featured-commands.md`](featured-commands.md) for command-level highlights.
3
+ A curated subset of the 271 skills. Three tiers, one per primary audience. Full catalog lives in [`dist/agent-src/skills/`](../dist/agent-src/skills/); see also [`docs/catalog.md`](catalog.md) for the complete index and [`docs/featured-commands.md`](featured-commands.md) for command-level highlights.
4
4
 
5
5
  > **Eval-gated messaging note.** Until `task bench --corpus non-dev` reports `selection_accuracy >= 0.60` (see `road-to-product-adoption.md` Phase 1), this page is documentation, not marketing. The entries below are the candidates the corpus tests against; their description quality is what the eval validates.
6
6
 
@@ -92,4 +92,4 @@ task lint-featured-skills
92
92
 
93
93
  CI runs this in `taskfiles/ci-fast.yml`. Stale entries (renamed / removed skill or command) fail the build. See [`scripts/lint_featured_skills.py`](../src/scripts/lint_featured_skills.py) for the matcher.
94
94
 
95
- → Browse all 270 skills: [`dist/agent-src/skills/`](../dist/agent-src/skills/) · all 177 commands: [`dist/agent-src/commands/`](../dist/agent-src/commands/)
95
+ → Browse all 271 skills: [`dist/agent-src/skills/`](../dist/agent-src/skills/) · all 178 commands: [`dist/agent-src/commands/`](../dist/agent-src/commands/)
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Pick the entry that matches what you do day-to-day. Each section names the three skills you will reach for first and shows whether MCP (no terminal) or CLI (terminal) is the simpler install path for that role.
4
4
 
5
- `agent-config` ships 270 skills, 103 governed rules, and 177 commands. You do not need all of them. Each role below filters to the slice that pays back in week one; the rest stays available and shows up on demand when a task references it.
5
+ `agent-config` ships 271 skills, 104 governed rules, and 178 commands. You do not need all of them. Each role below filters to the slice that pays back in week one; the rest stays available and shows up on demand when a task references it.
6
6
 
7
7
  > **Taglines at a glance →** [`docs/role-experiences.md`](role-experiences.md) — the one-line pitch per role experience, in one table.
8
8
 
@@ -134,7 +134,7 @@ Your agent is now:
134
134
  - **Respecting your codebase** — no conflicting patterns
135
135
  - **Following standards** — consistent code quality
136
136
 
137
- This is enforced automatically by 103 rules. No configuration needed.
137
+ This is enforced automatically by 104 rules. No configuration needed.
138
138
 
139
139
  ---
140
140
 
@@ -174,7 +174,7 @@ Your agent now understands slash commands:
174
174
  | `/fix quality` | Run and fix all quality checks |
175
175
  | `/chat-history import` | Pull a prior session into the current chat (resume) |
176
176
 
177
- → [Browse all 177 active commands](../dist/agent-src/commands/)
177
+ → [Browse all 178 active commands](../dist/agent-src/commands/)
178
178
 
179
179
  ---
180
180
 
@@ -33,7 +33,7 @@ the host lacks (a static host gives it no runtime attention guarantee, but a
33
33
  runtime-only system gives it nothing at all here). A runtime-only system contributes *nothing* on these hosts.
34
34
 
35
35
  ### 2. Intent routing, not a 500-artefact dump
36
- A prompt does not load all 270 skills. `dist/router.json` (99 routed rules, intent →
36
+ A prompt does not load all 271 skills. `dist/router.json` (100 routed rules, intent →
37
37
  skill, keyword/phrase/path triggers) carries the right skill on intent. The
38
38
  governance value is *selection discipline* — the host gets the relevant rule
39
39
  set, not the whole catalogue as context ballast.
@@ -95,6 +95,74 @@ When making decisions:
95
95
  - Avoid rework caused by wrong assumptions
96
96
  - Prefer: short clarification early → correct implementation once
97
97
 
98
+ ## 8. Improve before implement — pre-implementation validation
99
+
100
+ _Origin: migrated from `src/rules/improve-before-implement.md` per the P4 pattern of `road-to-kernel-and-router.md`. The rule keeps the activation lists and the golden rule ("Challenge to improve, never to refuse"); the check detail lives here._
101
+
102
+ Before coding a new feature, refactor, module, or behavior-altering change, quickly verify:
103
+
104
+ ### 8a. Is the request clear?
105
+
106
+ - Are acceptance criteria defined or derivable?
107
+ - Is the scope bounded? (not "make it better" but "add X to Y")
108
+ - Are edge cases considered?
109
+
110
+ **If unclear** → ask ONE focused question. Max 2 questions, never an interrogation.
111
+
112
+ ### 8b. Does it fit the existing architecture?
113
+
114
+ - Does similar functionality already exist?
115
+ - Does it follow established patterns in the codebase?
116
+ - Does it contradict existing conventions?
117
+ - Do **multiple valid patterns/frameworks** already exist (e.g. Tailwind + Flux, multiple form libraries, competing state stores)? If yes, do NOT pick one arbitrarily — ask which to use.
118
+ - Is the change a **second branch on the same discriminator** — second `match`/`switch` arm, second `if/elseif`, or second class hardcoded to one enum value (e.g. `Provider::FOO`, `'stripe'`)? If yes, run the Strategy sniff test before adding the branch — see [`strategy.md`](../php/patterns/strategy.md#sniff-test--when-an-enumstring-discriminator-wants-to-become-a-strategy).
119
+
120
+ **If misfit** → show evidence (file references), propose alternative.
121
+ **If multiple valid options** → list them, ask which to use. See [§ 2 — No blind implementation](#2-no-blind-implementation).
122
+
123
+ ### 8c. Is the approach sound?
124
+
125
+ - Is there a simpler way to achieve the same result?
126
+ - Are there known problems with the requested approach?
127
+ - Does the scope match the stated goal? (not over-engineered, not under-specified)
128
+
129
+ **If problematic** → explain the concern, propose a better approach.
130
+
131
+ ### How to challenge
132
+
133
+ - **Be concise** — one sentence per concern, not paragraphs
134
+ - **Show evidence** — reference existing code, patterns, or conventions
135
+ - **Offer alternatives** — don't just say "this is wrong"
136
+ - **Use numbered options** — let the user choose quickly
137
+ - **Respect "just do it"** — if the user insists after your challenge, execute immediately
138
+
139
+ Example:
140
+
141
+ ```
142
+ > ⚠️ `UserService` already has a `deactivate()` method that covers this case.
143
+ >
144
+ > 1. Use existing method — extend with new parameter
145
+ > 2. Create new method anyway — I'll explain the overlap in a comment
146
+ > 3. Skip validation — implement as requested
147
+ ```
148
+
149
+ After presenting concerns: user picks an option → execute immediately; user says "just do it" → execute immediately. Never argue twice about the same point. Never block work — delay is only justified if it prevents a clear mistake.
150
+
151
+ ### Scope limits
152
+
153
+ - **Max 1-2 challenges per task** — not every request needs validation
154
+ - **Max 1 minute of analysis** — if the check takes longer, skip it
155
+ - **Never validate simple tasks** — only features, architecture, significant changes
156
+ - **Never validate after the user already explained their reasoning**
157
+
158
+ ### Verify with concrete tools, not prose
159
+
160
+ If the challenge requires you to confirm current behavior before proposing an alternative, use a concrete probe — a `curl` against the endpoint, a Playwright spec, a debugger / `xdebug` step-through, or the project's test runner with a targeted filter. Asserting current behavior from memory is not validation.
161
+
162
+ ### Intent inference (RDP, standard host)
163
+
164
+ When the literal request and the underlying goal may differ, **state the inferred goal in one line and give ONE recommendation** — do not spread 2–3 framings (that is the overplanning [`direct-answers`](../../../src/rules/direct-answers.md) suppresses). Standard host only; a strong-reasoning host self-infers, so skip it there. Engage per [`rdp-gate`](../../../src/agent-src/contexts/execution/rdp-gate.md).
165
+
98
166
  ## Anti-patterns
99
167
 
100
168
  - Asking 5 complex questions at once
@@ -155,11 +155,11 @@ when the diff is empty. The `command:` triggers on
155
155
  `/roadmap:process-*` run; the guard is the deterministic backstop
156
156
  that catches a forgotten flip per step rather than at run end.
157
157
 
158
- **In-progress marker:** when a step takes more than one reply,
159
- mark it `[~]` the moment work starts on it and regenerate. The
160
- user sees one row move from `[ ]` to `[~]` to `[x]` instead of
161
- silent rows. `[~]` is treated as open for `count_open` but moves
162
- the phase percentage forward in the dashboard.
158
+ **`[~]` semantics — superseded note:** `[~]` is **not** an "in-progress"
159
+ indicator (the earlier in-progress-marker guidance here is superseded by
160
+ the glyph table in § Glyph semantics below — kept as the stronger, current
161
+ source of truth). Mid-reply work-in-flight has no checkbox change until
162
+ the step lands; that's a normal `[ ] → [x]` transition.
163
163
 
164
164
  ## Mechanics — triggers, regen command, self-check, failures
165
165
 
@@ -190,3 +190,78 @@ The hook implementation is the specification; on Copilot the agent
190
190
  runs the regenerator itself after the same triggers fire. Skipping
191
191
  it is a rule violation, not a hook gap — the Iron Law on dashboard
192
192
  sync survives the missing hook surface.
193
+
194
+ ## Migrated depth from the `roadmap-progress-sync` rule (per P4)
195
+
196
+ The sections below carry the long-form body of the
197
+ `roadmap-progress-sync` rule; the Iron-Law fences and the mandatory
198
+ pre-send self-check stay in the rule itself.
199
+
200
+ ### Iron Law 2 — cadence detail
201
+
202
+ `/roadmap:process-step`, `/roadmap:process-phase`, `/roadmap:process-full`, and any other multi-step autonomous run flip the box for step N **before** moving on to step N+1. The checkbox itself is the real-time monitor — the markdown file is the source of truth, the dashboard is a derived view.
203
+
204
+ The `command:` triggers in the rule's frontmatter ensure it loads the moment one of the `/roadmap:process-*` commands is invoked and stays loaded for the whole run — independent of whether the agent is currently editing files under `agents/roadmaps/`. The loop carries its own deterministic flip-guard at `roadmap-process-loop § 5b` — defense-in-depth, not a substitute for the inline flip. (Merged with § Autonomous execution → "Deterministic flip-guard" above, which carries the concrete guard command.)
205
+
206
+ **Step counts as done** when its code/doc change is written and saved AND the verification cited in the step has passed (fresh output in this reply or an earlier one). (Merged with § Autonomous execution → "Step counts as completed" above — same contract.)
207
+
208
+ ### Glyph semantics — single source of truth
209
+
210
+ Keep aligned with the dashboard counter in `scripts/update_roadmap_progress.ts` (regenerated via `./agent-config roadmap:progress`) and the closure-table in the `roadmap-management` skill:
211
+
212
+ | Glyph | Meaning | Counts towards |
213
+ |---|---|---|
214
+ | `[ ]` | open — planned, not yet done | `count_open` |
215
+ | `[x]` | done — work landed + verified | `count_done` |
216
+ | `[~]` | deferred — planned but not happening **this** run; resolution required before archive (Iron Law 3) | `count_deferred` |
217
+ | `[-]` | cancelled — scope dropped, won't happen at all | `count_cancelled` |
218
+
219
+ `[~]` is **not** an "in-progress" indicator. Mid-reply work-in-flight has no checkbox change until the step lands; that's a normal `[ ] → [x]` transition.
220
+
221
+ **Dashboard regen cadence — opt-in batching.** The checkbox flip is non-batchable. The **subprocess regen** (`./agent-config roadmap:progress`) is batchable per `roadmap.dashboard_regen_cadence` in `.agent-settings.yml` (`per_step` default · `every_5_steps` · `phase_boundary`). Run end, phase boundary, and any file-shape touch (rename / phase add / archive — Iron Law 1) always force an immediate regen regardless of cadence.
222
+
223
+ **Blockers follow the same cadence as checkboxes.** Clearing a `## Blockers` entry (per `templates/roadmaps.md` rule 20) flips its `Status: resolved` and regenerates the dashboard in the same reply — Iron Law 1's "same response" obligation applies to blocker resolution exactly as it applies to a checkbox flip.
224
+
225
+ ### Iron Law 3 — deferred-resolution flow
226
+
227
+ When the closure check fires (`count_open == 0` and `count_deferred > 0`), the agent MUST:
228
+
229
+ 1. Enumerate every `[~]` step in the roadmap (phase + step text + any inline `<!-- deferred: ... -->` annotation).
230
+ 2. Present numbered options (per the `user-interaction` rule) — at minimum:
231
+ 1. **Follow-up roadmap (draft)** — spawn `agents/roadmaps/road-to-<slug>.md` with `status: draft` frontmatter, `parent_roadmap: <this-slug>`, and the deferred steps lifted verbatim into phases. Draft stays hidden from the dashboard until the user flips it to `ready`.
232
+ 2. **Follow-up roadmap (ready, blocked)** — spawn the file with `status: ready` (default), frontmatter `parent_roadmap: <this-slug>` plus a body note (`> Blocked until <condition>`) so the dashboard surfaces it but execution waits.
233
+ 3. **Keep in this archive** — confirm the deferred items stay searchable in the archived file; no follow-up roadmap. Choosing this records an explicit decision-to-drop in the same reply.
234
+ 4. **Restore selected items to `[ ]`** — finish them in this roadmap before archive.
235
+ 5. **Convert selected items to `[-]` cancelled** — drop them with rationale recorded inline.
236
+ 3. Only after the user resolves the deferrals does the `git mv` to `archive/` run. The dashboard regen happens after the resolution, not before.
237
+
238
+ The migration mechanics (file naming, frontmatter pattern, body shape, parent-back-link) live in `roadmap-management § Spawn follow-up from deferred items`. The rule owns the obligation; the skill owns the procedure.
239
+
240
+ ### Later disposition — detail
241
+
242
+ `later/` is the fourth disposition alongside `archive/` (done, none planned) and `skipped/` (won't pursue): open work remains but is blocked-for-later. Set frontmatter `status: later` + a `Blocked until` / `Trigger` resume line, `git mv` to `agents/roadmaps/later/`, migrate inbound `agents/roadmaps/<x>.md` refs to the new path, regen. Open `[ ]` items stay open — the roadmap is parked whole, not cancelled or deferred-item-by-item. `later/` is excluded from the dashboard and `/roadmap:process-*` (same as `archive/`/`skipped/`); the `lint_roadmap_later_disposition` guard enforces the `status: later` ⇔ `later/` placement contract and that every parked roadmap records a resume condition. Procedure + the Active-vs-Later test live in the `roadmap-management` skill.
243
+
244
+ ### PR-gate — detail
245
+
246
+ A roadmap that reaches `count_open == 0 && count_deferred == 0` is **complete**
247
+ and is archived **in the same PR that completes it** — deterministically, by a
248
+ script, before the PR exists. There is no "hold the last item open + archive
249
+ manually after merge" step (that step got forgotten and left finished roadmaps
250
+ rotting unarchived in the trunk — the exact failure this gate makes impossible).
251
+
252
+ The sweep — `scripts/archive_completed_roadmaps.ts`, invoked by
253
+ `/create-pr` § 1c — archives every roadmap that is
254
+ complete **and** touched in this branch (`git log origin/main..HEAD`), `git mv`s
255
+ it to `archive/`, migrates inbound `agents/roadmaps/<x>.md` references to the
256
+ archive path in the **same branch** (so links never break — this was the only
257
+ real reason the old design deferred archival), regenerates the dashboard, and
258
+ stages it. Completion is read from the checkbox counts; no marker is required.
259
+
260
+ **Backstop:** `./agent-config roadmap:progress-check` (wrapping `update_roadmap_progress.ts --check`) hard-fails when a roadmap
261
+ hits `count_open == 0` while still under `agents/roadmaps/`. Because
262
+ `/create-pr` archives before the push, the PR branch is green; a push that
263
+ bypasses the sweep red-flags in CI — the forcing function that makes
264
+ "finished roadmap left unarchived in the trunk" structurally impossible. Legacy
265
+ `merge-gated` annotations are archived by the next `/create-pr` like any other
266
+ completed roadmap; the dashboard still surfaces any stranded
267
+ complete-but-unarchived roadmap so it can never hide inside a partial progress bar.