@event4u/agent-config 8.9.0 → 8.11.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 (267) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +189 -0
  3. package/README.md +5 -5
  4. package/dist/agent-src/commands/challenge-me/vision.md +121 -32
  5. package/dist/agent-src/commands/challenge-me/with-docs.md +21 -8
  6. package/dist/agent-src/commands/commit/in-chunks.md +1 -1
  7. package/dist/agent-src/commands/commit.md +2 -1
  8. package/dist/agent-src/commands/cost/report.md +14 -3
  9. package/dist/agent-src/commands/feature/dev.md +4 -4
  10. package/dist/agent-src/commands/humanize.md +101 -0
  11. package/dist/agent-src/commands/jira-ticket.md +2 -2
  12. package/dist/agent-src/commands/memory/load.md +15 -0
  13. package/dist/agent-src/commands/optimize/project.md +12 -0
  14. package/dist/agent-src/commands/roadmap/create.md +12 -11
  15. package/dist/agent-src/commands/tests/create.md +29 -7
  16. package/dist/agent-src/commands/work.md +33 -0
  17. package/dist/agent-src/commands/worktree/cleanup.md +83 -0
  18. package/dist/agent-src/commands/worktree/create.md +64 -0
  19. package/dist/agent-src/commands/worktree/status.md +75 -0
  20. package/dist/agent-src/commands/worktree/verify.md +70 -0
  21. package/dist/agent-src/commands/worktree.md +85 -0
  22. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +66 -0
  23. package/dist/agent-src/contexts/execution/orchestration-benchmark-gate.md +1 -0
  24. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +91 -34
  25. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +14 -0
  26. package/dist/agent-src/contexts/execution/roadmap-writing-source-derived.md +65 -0
  27. package/dist/agent-src/contexts/execution/subagent-modes-detail.md +84 -0
  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 +148 -0
  31. package/dist/agent-src/rules/context-hygiene.md +14 -0
  32. package/dist/agent-src/rules/delegation-policy.md +10 -8
  33. package/dist/agent-src/rules/design-fidelity.md +44 -0
  34. package/dist/agent-src/rules/git-history-discipline.md +4 -79
  35. package/dist/agent-src/rules/legal-safety-floor.md +11 -55
  36. package/dist/agent-src/rules/roadmap-progress-sync.md +5 -56
  37. package/dist/agent-src/rules/spreadsheet-source-quality.md +61 -0
  38. package/dist/agent-src/rules/think-before-action.md +10 -0
  39. package/dist/agent-src/rules/verify-before-complete.md +12 -0
  40. package/dist/agent-src/skills/accessibility-auditor/evals/evals.json +15 -0
  41. package/dist/agent-src/skills/agent-docs-writing/SKILL.md +13 -12
  42. package/dist/agent-src/skills/ai-council/SKILL.md +19 -9
  43. package/dist/agent-src/skills/analysis-skill-router/evals/evals.json +13 -0
  44. package/dist/agent-src/skills/api-design/SKILL.md +7 -5
  45. package/dist/agent-src/skills/api-testing/SKILL.md +16 -2
  46. package/dist/agent-src/skills/authz-review/SKILL.md +59 -2
  47. package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
  48. package/dist/agent-src/skills/bug-analyzer/SKILL.md +19 -16
  49. package/dist/agent-src/skills/character-consistency/evals/evals.json +16 -0
  50. package/dist/agent-src/skills/code-refactoring/SKILL.md +9 -9
  51. package/dist/agent-src/skills/command-routing/evals/evals.json +14 -0
  52. package/dist/agent-src/skills/content-funnel-design/SKILL.md +2 -0
  53. package/dist/agent-src/skills/dashboard-design/evals/evals.json +16 -0
  54. package/dist/agent-src/skills/data-flow-mapper/SKILL.md +1 -1
  55. package/dist/agent-src/skills/dcf-modeling/evals/evals.json +20 -0
  56. package/dist/agent-src/skills/decision-record/evals/evals.json +20 -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-intelligence/evals/evals.json +14 -0
  61. package/dist/agent-src/skills/design-review/SKILL.md +29 -2
  62. package/dist/agent-src/skills/design-system-capture/SKILL.md +21 -0
  63. package/dist/agent-src/skills/design-system-capture/evals/evals.json +15 -0
  64. package/dist/agent-src/skills/developer-like-execution/evals/evals.json +16 -0
  65. package/dist/agent-src/skills/doc-coauthoring/SKILL.md +29 -0
  66. package/dist/agent-src/skills/doc-coauthoring/evals/evals.json +16 -0
  67. package/dist/agent-src/skills/editorial-calendar/SKILL.md +2 -0
  68. package/dist/agent-src/skills/editorial-calendar/evals/domain-truth.json +16 -0
  69. package/dist/agent-src/skills/editorial-calendar/evals/evals.json +16 -0
  70. package/dist/agent-src/skills/estimate-ticket/evals/evals.json +16 -0
  71. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +30 -0
  72. package/dist/agent-src/skills/existing-ui-audit/evals/triggers.json +47 -0
  73. package/dist/agent-src/skills/fe-design/SKILL.md +43 -14
  74. package/dist/agent-src/skills/fe-design/evals/triggers.json +47 -0
  75. package/dist/agent-src/skills/forecasting/evals/evals.json +20 -0
  76. package/dist/agent-src/skills/fundraising-narrative/evals/domain-truth.json +16 -0
  77. package/dist/agent-src/skills/fundraising-narrative/evals/evals.json +16 -0
  78. package/dist/agent-src/skills/git-workflow/SKILL.md +86 -0
  79. package/dist/agent-src/skills/html-deck/SKILL.md +27 -0
  80. package/dist/agent-src/skills/humanizer/SKILL.md +147 -0
  81. package/dist/agent-src/skills/humanizer/data/patterns.md +190 -0
  82. package/dist/agent-src/skills/humanizer/evals/triggers.json +17 -0
  83. package/dist/agent-src/skills/iconography/SKILL.md +24 -0
  84. package/dist/agent-src/skills/incident-commander/evals/domain-truth.json +16 -0
  85. package/dist/agent-src/skills/incident-commander/evals/evals.json +20 -0
  86. package/dist/agent-src/skills/laravel/SKILL.md +14 -1
  87. package/dist/agent-src/skills/launch-readiness/SKILL.md +20 -19
  88. package/dist/agent-src/skills/launch-readiness/evals/evals.json +21 -0
  89. package/dist/agent-src/skills/legal-practice-profile/SKILL.md +126 -0
  90. package/dist/agent-src/skills/logging-monitoring/SKILL.md +1 -1
  91. package/dist/agent-src/skills/logging-monitoring/evals/evals.json +16 -0
  92. package/dist/agent-src/skills/mcp/SKILL.md +1 -1
  93. package/dist/agent-src/skills/memory-consolidation/SKILL.md +14 -1
  94. package/dist/agent-src/skills/messaging-architecture/evals/domain-truth.json +16 -0
  95. package/dist/agent-src/skills/messaging-architecture/evals/evals.json +16 -0
  96. package/dist/agent-src/skills/migration-architect/SKILL.md +2 -1
  97. package/dist/agent-src/skills/perf-feedback-craft/evals/evals.json +16 -0
  98. package/dist/agent-src/skills/performance/SKILL.md +1 -1
  99. package/dist/agent-src/skills/pest-testing/SKILL.md +1 -1
  100. package/dist/agent-src/skills/php-debugging/SKILL.md +17 -0
  101. package/dist/agent-src/skills/playwright-testing/SKILL.md +16 -0
  102. package/dist/agent-src/skills/prompt-engineering-patterns/evals/evals.json +16 -0
  103. package/dist/agent-src/skills/readme-writing/SKILL.md +2 -0
  104. package/dist/agent-src/skills/readme-writing-package/SKILL.md +2 -0
  105. package/dist/agent-src/skills/refine-prompt/evals/evals.json +16 -0
  106. package/dist/agent-src/skills/refine-ticket/evals/evals.json +16 -0
  107. package/dist/agent-src/skills/release-comms/SKILL.md +2 -0
  108. package/dist/agent-src/skills/release-comms/evals/evals.json +16 -0
  109. package/dist/agent-src/skills/rice-prioritization/evals/evals.json +20 -0
  110. package/dist/agent-src/skills/roadmap-writing/SKILL.md +22 -51
  111. package/dist/agent-src/skills/runway-cognition/evals/evals.json +20 -0
  112. package/dist/agent-src/skills/scenario-modeling/evals/evals.json +20 -0
  113. package/dist/agent-src/skills/security-audit/SKILL.md +6 -9
  114. package/dist/agent-src/skills/sentry-integration/SKILL.md +2 -2
  115. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +8 -0
  116. package/dist/agent-src/skills/source-discovery/SKILL.md +26 -24
  117. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +98 -0
  118. package/dist/agent-src/skills/spreadsheet-authoring/evals/triggers.json +47 -0
  119. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +55 -46
  120. package/dist/agent-src/skills/subagent-orchestration/evals/evals.json +42 -0
  121. package/dist/agent-src/skills/systematic-debugging/SKILL.md +10 -0
  122. package/dist/agent-src/skills/systematic-debugging/evals/evals.json +20 -0
  123. package/dist/agent-src/skills/test-case-discovery/SKILL.md +118 -0
  124. package/dist/agent-src/skills/test-case-discovery/evals/triggers.json +52 -0
  125. package/dist/agent-src/skills/test-driven-development/SKILL.md +32 -6
  126. package/dist/agent-src/skills/test-driven-development/evals/evals.json +16 -0
  127. package/dist/agent-src/skills/testing-anti-patterns/SKILL.md +7 -6
  128. package/dist/agent-src/skills/threat-modeling/evals/evals.json +21 -0
  129. package/dist/agent-src/skills/typography-system/evals/evals.json +14 -0
  130. package/dist/agent-src/skills/unit-economics-modeling/evals/evals.json +24 -0
  131. package/dist/agent-src/skills/using-git-worktrees/SKILL.md +10 -0
  132. package/dist/agent-src/skills/verify-completion-evidence/evals/evals.json +16 -0
  133. package/dist/agent-src/skills/vision-articulation/evals/evals.json +16 -0
  134. package/dist/agent-src/skills/voice-and-tone-design/evals/evals.json +16 -0
  135. package/dist/agent-src/skills/worktree-lifecycle/SKILL.md +187 -0
  136. package/dist/agent-src/skills/worktree-lifecycle/evals/evals.json +38 -0
  137. package/dist/agent-src/skills/worktree-lifecycle/evals/triggers.json +52 -0
  138. package/dist/agent-src/templates/agent-settings.md +3 -2
  139. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +15 -1
  140. package/dist/agent-src/templates/roadmaps.md +14 -0
  141. package/dist/cli/commands/recordTriggerEval.js +4 -14
  142. package/dist/cli/commands/recordTriggerEval.js.map +1 -1
  143. package/dist/discovery/deprecation-report.md +1 -1
  144. package/dist/discovery/discovery-manifest.json +374 -88
  145. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  146. package/dist/discovery/discovery-manifest.summary.md +9 -9
  147. package/dist/discovery/orphan-report.md +1 -1
  148. package/dist/discovery/packs.json +30 -18
  149. package/dist/discovery/trust-report.md +5 -5
  150. package/dist/discovery/workspaces.json +31 -15
  151. package/dist/install/install.mjs +12 -7
  152. package/dist/mcp/registry-manifest.json +4 -4
  153. package/dist/router.json +1 -1
  154. package/dist/scripts/_lib/claude_settings_hooks.js +8 -0
  155. package/dist/scripts/_lib/claude_settings_hooks.js.map +1 -1
  156. package/dist/scripts/_lib/trigger_eval_floors.js +24 -0
  157. package/dist/scripts/_lib/trigger_eval_floors.js.map +1 -0
  158. package/dist/scripts/condense.js +12 -2
  159. package/dist/scripts/condense.js.map +1 -1
  160. package/dist/server/schemas/settings.js +5 -2
  161. package/dist/server/schemas/settings.js.map +1 -1
  162. package/docs/CLAIMS.md +24 -3
  163. package/docs/architecture.md +3 -3
  164. package/docs/benchmark.md +51 -0
  165. package/docs/catalog.md +23 -9
  166. package/docs/command-flows.md +7 -1
  167. package/docs/contracts/CHANGELOG-conventions.md +6 -0
  168. package/docs/contracts/ai-council-config.md +92 -0
  169. package/docs/contracts/command-clusters.md +1 -0
  170. package/docs/contracts/design-artifact-lifecycle.md +93 -0
  171. package/docs/contracts/design-artifact-verification.md +30 -1
  172. package/docs/contracts/evidence-based-pruning.md +1 -0
  173. package/docs/contracts/hook-architecture-v1.md +25 -0
  174. package/docs/contracts/kernel-membership.md +35 -0
  175. package/docs/contracts/measurement-baseline.md +1 -0
  176. package/docs/contracts/release-pr-gating.md +26 -0
  177. package/docs/contracts/release-sizing.md +107 -0
  178. package/docs/contracts/surface-agent-contracts.md +153 -0
  179. package/docs/contracts/write-engine.md +38 -1
  180. package/docs/customization.md +12 -0
  181. package/docs/decisions/ADR-002-kernel-bucket-overrides.md +11 -0
  182. package/docs/decisions/ADR-003-flat-cluster-subs-and-colon-syntax.md +11 -0
  183. package/docs/decisions/ADR-006-skill-tools-python-pilot.md +1 -1
  184. package/docs/decisions/ADR-028-root-layout.md +1 -1
  185. package/docs/decisions/ADR-038-canonical-settings-path.md +10 -0
  186. package/docs/decisions/ADR-092-defer-command-tier-alias-removal.md +29 -5
  187. package/docs/decisions/ADR-093-ai-council-config-user-global.md +1 -1
  188. package/docs/decisions/ADR-100-global-knowledge-card-sharing.md +7 -0
  189. package/docs/decisions/ADR-103-global-knowledge-default-off-until-measured.md +2 -2
  190. package/docs/decisions/ADR-105-automatic-subagent-orchestration.md +1 -1
  191. package/docs/decisions/ADR-114-commit-policy-iron-law-override.md +11 -0
  192. package/docs/decisions/ADR-115-command-cluster-consolidation-phase-4.md +1 -1
  193. package/docs/decisions/ADR-116-memory-tripwire-activation-path.md +11 -1
  194. package/docs/decisions/ADR-117-subagents-auto-default-on.md +2 -1
  195. package/docs/decisions/ADR-118-loop-engineering-boundaries.md +162 -0
  196. package/docs/decisions/ADR-119-global-knowledge-default-on.md +104 -0
  197. package/docs/decisions/ADR-200-python-to-typescript-migration.md +11 -1
  198. package/docs/decisions/ADR-rule-kernel-and-router.md +11 -0
  199. package/docs/decisions/INDEX.md +11 -9
  200. package/docs/design/cross-model-parity-eval.md +82 -0
  201. package/docs/design/length-neutral-judge-rerun.md +92 -0
  202. package/docs/distribution/consumer-matrix.md +96 -0
  203. package/docs/featured-skills.md +2 -2
  204. package/docs/getting-started-by-role.md +1 -1
  205. package/docs/getting-started.md +2 -2
  206. package/docs/governance-advantage.md +1 -1
  207. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +80 -5
  208. package/docs/guidelines/code-clarity.md +106 -1
  209. package/docs/guidelines/design-antipatterns.md +20 -0
  210. package/docs/guidelines/php/php-coding-patterns.md +12 -2
  211. package/docs/proof.md +21 -15
  212. package/docs/release-runbook.md +3 -0
  213. package/docs/self-review-gate.md +51 -0
  214. package/docs/wedge/production-validator/production-validator.md +27 -0
  215. package/package.json +1 -1
  216. package/src/config/agent-settings.template.yml +29 -9
  217. package/src/scripts/_cli/cmd_doctor.ts +34 -1
  218. package/src/scripts/_lib/auto_dispatch.corpus.test.ts +87 -0
  219. package/src/scripts/_lib/claude_settings_hooks.ts +8 -0
  220. package/src/scripts/_lib/knowledge_global.ts +6 -2
  221. package/src/scripts/_lib/knowledge_global_redaction.ts +42 -4
  222. package/src/scripts/_lib/lexical_index.ts +15 -2
  223. package/src/scripts/_lib/orchestration_record.ts +27 -0
  224. package/src/scripts/_lib/orchestration_savings.ts +52 -0
  225. package/src/scripts/_lib/trigger_eval_floors.ts +31 -0
  226. package/src/scripts/ai_council/chairman.ts +90 -0
  227. package/src/scripts/ai_council/clients.ts +18 -3
  228. package/src/scripts/ai_council/config.ts +157 -0
  229. package/src/scripts/ai_council/debate_gates.ts +89 -0
  230. package/src/scripts/ai_council/orchestrator.ts +65 -2
  231. package/src/scripts/ai_council/prompts.ts +121 -11
  232. package/src/scripts/ai_council/replay.ts +17 -0
  233. package/src/scripts/ai_council/stance_tally.ts +184 -0
  234. package/src/scripts/ai_tells_rules.ts +433 -0
  235. package/src/scripts/bench_humanizer_eval.ts +240 -0
  236. package/src/scripts/build_discovery_manifest.ts +6 -0
  237. package/src/scripts/build_proof.ts +21 -9
  238. package/src/scripts/check_claims.ts +40 -0
  239. package/src/scripts/check_release_adjacent_health.ts +121 -0
  240. package/src/scripts/check_rule_invariants.ts +282 -0
  241. package/src/scripts/condense.ts +16 -2
  242. package/src/scripts/consumer_matrix.ts +392 -0
  243. package/src/scripts/council_cli.ts +147 -0
  244. package/src/scripts/detect_ai_tells.ts +312 -0
  245. package/src/scripts/generate_index.ts +3 -2
  246. package/src/scripts/install.ts +12 -0
  247. package/src/scripts/knowledge_global_cli.ts +1 -1
  248. package/src/scripts/lint_changelog_rollback.ts +293 -0
  249. package/src/scripts/lint_framework_leakage.ts +88 -7
  250. package/src/scripts/lint_framework_leakage_allowlist.json +59 -572
  251. package/src/scripts/lint_knowledge_scale.ts +30 -0
  252. package/src/scripts/lint_originality_shingles.ts +210 -0
  253. package/src/scripts/orchestration_record.ts +17 -0
  254. package/src/scripts/orchestration_savings_report.ts +36 -3
  255. package/src/scripts/schemas/agent-settings.schema.json +11 -0
  256. package/src/scripts/second_brain_retrieval.ts +44 -2
  257. package/src/scripts/self_review_gate.test.ts +65 -0
  258. package/src/scripts/self_review_gate.ts +298 -0
  259. package/src/scripts/skill_eval_coverage.ts +71 -3
  260. package/src/scripts/skill_linter.ts +1 -0
  261. package/src/scripts/trigger_eval_grandfather.json +223 -224
  262. package/src/scripts/trigger_eval_rotation.ts +344 -0
  263. package/src/scripts/update_counts.ts +5 -17
  264. package/src/scripts/worktree_cleanup_check.ts +263 -0
  265. package/src/server/schemas/settings.ts +8 -3
  266. package/src/scripts/analysis_freshness.ts +0 -362
  267. package/src/scripts/export_replay_corpus.ts +0 -208
@@ -0,0 +1,70 @@
1
+ ---
2
+ model_tier: medium
3
+ name: worktree-verify
4
+ pack: engineering-base
5
+ tier: 2
6
+ visibility: internal
7
+ cluster: worktree
8
+ sub: verify
9
+ skills: [worktree-lifecycle, verify-completion-evidence]
10
+ description: Run the scoped verification for a worktree's declared change — narrow probes matched to the diff, never the full CI pipeline
11
+ suggestion:
12
+ eligible: true
13
+ trigger_description: "verify the worktree change, prove this worktree is ready"
14
+ trigger_context: "a governed worktree with committed changes but no verification evidence attached"
15
+ workspaces:
16
+ - agent-config-maintainer
17
+ packs:
18
+ - meta
19
+ ---
20
+
21
+ # /worktree verify
22
+ ## Instructions
23
+
24
+ Produce fresh, scoped verification evidence for ONE worktree's declared
25
+ change. Narrow probes only — this command never runs the full CI
26
+ pipeline locally (`roadmap-ci-steps-policy` / `quality.local_auto_run`
27
+ default: remote CI on the PR is the gate).
28
+
29
+ ### 1. Resolve target + scope
30
+
31
+ Target worktree = the current one, or the path/branch given as arg.
32
+ Read its `.worktree-scope.md` (`owns:` paths + task line) per
33
+ [`worktree-lifecycle § Scope lock`](../../../skills/worktree-lifecycle/SKILL.md#2-scope-lock).
34
+ No scope lock → stop and route to `/worktree create` step 3 first.
35
+
36
+ ### 2. Scope-conformance check
37
+
38
+ ```bash
39
+ git diff --name-only "$(git merge-base HEAD <base>)"..HEAD
40
+ ```
41
+
42
+ Paths outside `owns:` → surface as scope creep (`scope-control`) before
43
+ verifying anything; the evidence must describe the declared change.
44
+
45
+ ### 3. Pick the narrowest probes
46
+
47
+ Map the diff to probes per `verify-completion-evidence` (claim →
48
+ command): the single test filter for touched behavior, the
49
+ type-checker/linter scoped to changed files, a `curl`/spec run for a
50
+ touched endpoint. Never substitute the full CI meta-pipeline for a
51
+ targeted probe.
52
+
53
+ ### 4. Run fresh + record
54
+
55
+ Run the probes now (no cached/earlier results — `verify-before-complete`),
56
+ capture command + exit code + output tail, and append the evidence to
57
+ the worktree's `.worktree-scope.md` under a `## Verification evidence`
58
+ heading (command, date, result) so `/worktree status` can report it.
59
+
60
+ ### 5. Report
61
+
62
+ Use the [`worktree-lifecycle § Output format`](../../../skills/worktree-lifecycle/SKILL.md#output-format):
63
+ evidence section carries the probe commands + tails; verdict states
64
+ whether checklist item 3 (evidence attached) now passes.
65
+
66
+ ### Rules
67
+
68
+ - **Do NOT commit or push.** Evidence lives in the untracked scope note.
69
+ - Red probe → report it plainly and stop; never downgrade to a weaker
70
+ probe to get green (N=3 budget per `autonomous-execution`).
@@ -0,0 +1,85 @@
1
+ ---
2
+ model_tier: medium
3
+ name: worktree
4
+ disable-model-invocation: true
5
+ pack: engineering-base
6
+ tier: 2
7
+ visibility: internal
8
+ description: Worktree orchestrator — routes to create, status, verify, cleanup
9
+ cluster: worktree
10
+ type: orchestrator
11
+ auto_detect: true
12
+ suggestion:
13
+ eligible: true
14
+ trigger_description: "isolate this in a worktree, which worktrees are active, is the worktree merge-ready, clean up finished worktrees"
15
+ trigger_context: "parallel work needs an isolated working directory, or existing worktrees need status/verification/removal"
16
+ workspaces:
17
+ - agent-config-maintainer
18
+ packs:
19
+ - meta
20
+ ---
21
+
22
+ # /worktree
23
+
24
+ Top-level orchestrator for the governed-worktree family — a THIN layer
25
+ over host-native primitives (Claude Code `EnterWorktree`/`ExitWorktree`,
26
+ subagent `isolation: "worktree"`) and plain `git worktree` elsewhere.
27
+ Explicitly OUT of scope: auto-merge, daemons, background watchers,
28
+ dispatch beyond the existing subagent worktree isolation.
29
+
30
+ ## Sub-commands
31
+
32
+ | Sub-command | Routes to | Purpose |
33
+ |---|---|---|
34
+ | `/worktree create` | `commands/worktree/create.md` | Create a governed worktree + write the scope-lock note (propose-once branch naming) |
35
+ | `/worktree status` | `commands/worktree/status.md` | List active worktrees — ownership, dirty state, ahead/behind, merge-readiness incl. verification evidence |
36
+ | `/worktree verify` | `commands/worktree/verify.md` | Run the scoped verification for the worktree's declared change — narrow probes, not full CI |
37
+ | `/worktree cleanup` | `commands/worktree/cleanup.md` | Safe removal gate — refuses while the branch has commits on no other ref |
38
+
39
+ All four route through the
40
+ [`worktree-lifecycle`](../../skills/worktree-lifecycle/SKILL.md) skill;
41
+ creation mechanics live in
42
+ [`using-git-worktrees`](../../skills/using-git-worktrees/SKILL.md).
43
+
44
+ ## Non-interactive & auto-detection
45
+
46
+ `/worktree` honors the [`non-interactive-contract`](../contexts/execution/non-interactive-contract.md)
47
+ (surface detection, confidence tiers, `--yes`/`--json`, abort schemas,
48
+ the `auto_detect` kill-switch). Detection table:
49
+
50
+ | Basis (signal) | Sub-command | Confidence |
51
+ |---|---|---|
52
+ | Explicit sub given (`/worktree status`) | that one | — (detection skipped) |
53
+ | "isolate / do this on the side / new worktree for X" | `worktree/create` | HIGH |
54
+ | "which worktrees / what's active / merge-ready?" | `worktree/status` | HIGH |
55
+ | "verify the worktree change", scoped probe intent | `worktree/verify` | MEDIUM |
56
+ | "remove / clean up the worktree(s)" | `worktree/cleanup` | HIGH |
57
+ | No clear signal | — | LOW → menu (interactive) / `ambiguous_routing` (CI) |
58
+
59
+ `cleanup` is the only destructive sub-command — on MEDIUM-or-lower
60
+ confidence it is never auto-selected; show the menu instead.
61
+
62
+ ## Dispatch
63
+
64
+ 1. Parse the user's argument: `/worktree <sub-command> [args]`.
65
+ 2. **Explicit sub** → look it up and route. Otherwise run the detection
66
+ table above per the non-interactive-contract.
67
+ 3. Load the body of the routed file and follow its `## Instructions`
68
+ section verbatim with the remaining args.
69
+ 4. On **LOW** confidence (or `--no-auto-detect`): interactive → print
70
+ the menu and ask; non-interactive → emit `ambiguous_routing` and stop.
71
+
72
+ > 1. create — new governed worktree + scope-lock note
73
+ > 2. status — list worktrees with merge-readiness
74
+ > 3. verify — run the scoped verification for a worktree
75
+ > 4. cleanup — safely remove finished worktrees
76
+
77
+ ## Rules
78
+
79
+ - **Do NOT commit, push, or open a PR** unless the sub-command
80
+ explicitly authorizes it.
81
+ - **Do NOT chain sub-commands.** One `/worktree <sub>` per turn.
82
+ - **No auto-merge, no watchers.** The cluster reports and gates; the
83
+ user (or an explicitly invoked command) merges.
84
+ - Auto-detection never guesses past LOW, and never auto-selects
85
+ `cleanup` below HIGH confidence.
@@ -72,6 +72,72 @@ Push, merge, rebase, branch creation, PR operations, and tags
72
72
  remain permission-gated by
73
73
  [`scope-control § git-operations`](../../rules/scope-control.md#git-operations--permission-gated).
74
74
 
75
+ ## Opt-in detection — rule-level summary
76
+
77
+ (Migrated from the [`autonomous-execution`](../../rules/autonomous-execution.md)
78
+ rule per P4 of `road-to-kernel-and-router.md`; the detection algorithm itself
79
+ lives in [`autonomy-detection.md`](autonomy-detection.md) — that file is the
80
+ stronger, operative source.)
81
+
82
+ In `auto` mode, flip to `on` for the rest of the conversation when the user expresses **"stop asking on trivial steps, just work"**. Recognize **intent**, not the literal substring. Opt-out (same intent, reversed) flips back to `off`. Both directions are **speech-act-checked**: the phrase must be a meta-instruction to the agent, not content / quote / subject / code / third-party reference / hypothetical. In doubt → keep current mode, no speculative flips.
83
+
84
+ Algorithm and speech-act heuristic: [`autonomy-detection.md`](autonomy-detection.md). Anchor phrases (DE+EN), no-flip patterns, counter-examples, trivial-vs-blocking taxonomy, commit-policy summary, and named failure modes: this file + [`autonomy-examples.md`](autonomy-examples.md).
85
+
86
+ ## Task-scope — two autonomy shapes
87
+
88
+ Depth for the rule's task-scope Iron Law (`NEW TASK → FRESH CONFIRMATION`).
89
+ Two distinct autonomy shapes — keep them apart:
90
+
91
+ | Shape | Trigger | Scope |
92
+ |---|---|---|
93
+ | **Conversation-wide trivial-question suppression** | "stop asking on trivial steps, just work" — no deliverable named. | Sticky for the rest of the conversation. Suppresses trivial workflow questions only; never lifts blocking, Hard Floor, or [`scope-control`](../../rules/scope-control.md) gates. |
94
+ | **Task-scoped autonomous execution** | "work autonomously on X", "arbeite die Roadmap Y komplett ab", "do PROJ-123 end-to-end" — a deliverable / artifact / ticket is named. | Bound to **that** task. Ends when the task ends. Does **not** authorize starting a new, distinct task autonomously. |
95
+
96
+ Litmus test: does the directive name (or unambiguously point to) a single concrete deliverable? Yes → task-scoped, scope ends with the deliverable. No → conversation-wide, trivial-question suppression only.
97
+
98
+ When the user later issues a **new** request — different ticket, different roadmap, different artifact, different feature — treat it as a fresh task. Re-confirm autonomy for the new scope before:
99
+
100
+ - creating a branch / worktree / PR / tag for the new work,
101
+ - implementing a roadmap whose **authoring** was the prior turn's deliverable (per [`scope-control § authoring vs implementation`](../../rules/scope-control.md#authoring-vs-implementation--verb-discipline)),
102
+ - expanding scope beyond the new task's literal ask.
103
+
104
+ In doubt whether the new request inherits or needs fresh confirmation → fresh confirmation. The Hard Floor and [`scope-control`](../../rules/scope-control.md) gates apply to every task regardless.
105
+
106
+ ## Validation-loop budget — mechanics (N=3)
107
+
108
+ Autonomous flows must not iterate indefinitely on the same validation target. **Validation target** = a single identifiable artefact: a file path, a lint rule ID, a test name, a CI sub-task name. Natural-language clustering ("the linter stuff") does **not** count as a target — agents will rename their way out of the budget.
109
+
110
+ A "failed attempt" is an iteration that did not move the target from red to green. Tuning the tool around the target (e.g. growing an allowlist, loosening a threshold, suppressing a check) counts as an attempt — and is usually a sign the **tool**, not the content, is wrong.
111
+
112
+ ### Allowlist-growth antipattern — detail
113
+
114
+ Crossing the 20-entry threshold counts as the 3rd validation-target failure for the linter in question, regardless of prior attempt count. The fix is a tool-shape change (heuristic tightening, scope narrowing, deletion), not more entries. Same logic for: warning-suppression lists growing past ~20, `// noqa` / `# type: ignore` sweeps over many files in one session, test `skip` / `xfail` bulk-adds to chase green.
115
+
116
+ ### Probe efficiency — direct over orchestration
117
+
118
+ When validating a single target, run the **specific** check, not a meta-task that fans out to dozens of sub-tasks. Use the failing tool's direct entry point (the specific script invocation, the specific runner target, the single-test filter for the project's test runner) rather than the full CI meta-pipeline. Full-pipeline runs are appropriate at phase boundaries, not as a per-iteration probe.
119
+
120
+ Concrete tool mapping — verify with the narrowest tool that proves the target green: a single `curl` / Playwright spec / browser run for HTTP behavior, the project's test runner with a `--filter` for one test, a debugger / `xdebug` step-through for one frame. Never substitute a meta-pipeline for a tool that pinpoints the failure.
121
+
122
+ ## Adaptive effort & stop (RDP)
123
+
124
+ Scale effort to task difficulty, and stop when marginal evidence drops — coupled
125
+ to the N=3 budget above, never replacing it. On a host with a native effort knob
126
+ (e.g. an `effort` parameter), the right move is to **set it high** for hard tasks
127
+ rather than scaffold; the scaffold here is for a standard host **without** such a
128
+ knob. The per-dimension uncertainty score (see
129
+ [`notes-first-reasoning`](../../rules/notes-first-reasoning.md)) feeds this
130
+ decision. Engage per [`rdp-gate`](rdp-gate.md).
131
+
132
+ **Concrete diminishing-returns stop-signal.** Operationalize "marginal evidence
133
+ drops" so it is checkable, not vibes: when **two consecutive investigative probes**
134
+ (a read, a grep, a query) yield **no new load-bearing information** — nothing that
135
+ changes the plan or the hypothesis — stop gathering and act on what you have (or
136
+ ask). The diminishing-returns twin of N=3: N=3 stops fruitless *fixing*, this stops
137
+ fruitless *searching*. Never overrides the read-loop abort in
138
+ [`context-hygiene`](../../rules/context-hygiene.md) — that is the hard ceiling;
139
+ this is the earlier soft signal.
140
+
75
141
  ## End-of-turn checkpoint
76
142
 
77
143
  Before ending a turn, check the last paragraph of the reply. If it is a
@@ -69,6 +69,7 @@ is auditable rather than asserted.
69
69
 
70
70
  ## Related
71
71
 
72
+ - ADR-118 (`docs/decisions/ADR-118-loop-engineering-boundaries.md`) — demotion stays manual human edit by decision; never automated (disposition #1).
72
73
  - [`auto-orchestration-activation`](auto-orchestration-activation.md) — the `subagents.auto` key this gate sets the default for.
73
74
  - [`host-capability-manifest`](host-capability-manifest.md) — `subagent_spawn` gates the flip.
74
75
  - [`orchestration-telemetry`](orchestration-telemetry.md) — the per-dispatch metrics the benchmark aggregates.
@@ -21,12 +21,15 @@ v1 forward-compat rule on unknown fields).
21
21
  "verify_mode": "deterministic",
22
22
  "verdict_changed_outcome": null,
23
23
  "task_class": null,
24
+ "dispatch_mode": null,
24
25
  "tier_chosen": null,
25
26
  "tier_source": null,
26
27
  "dispatch_tokens": null,
27
28
  "session_tier": null,
28
29
  "escalated_from": null,
29
- "verify_result_by_tier": null
30
+ "verify_result_by_tier": null,
31
+ "first_pass_success": null,
32
+ "escalated": null
30
33
  }
31
34
  ```
32
35
 
@@ -34,27 +37,72 @@ v1 forward-compat rule on unknown fields).
34
37
 
35
38
  | Field | Type | Meaning |
36
39
  |---|---|---|
37
- | `task_size_estimate` | int | Pre-dispatch estimate of the task's size (orchestrator's sizing heuristic). Counts only, no body. |
38
- | `spawn_count` | int | Subagents dispatched for this task. `0` → handled in-session. |
39
- | `tiers` | string[] | Model tiers dispatched to, one per spawn class (e.g. `["sonnet","opus"]`). Tier names only, no prompts. |
40
- | `token_delta` | int | Net token cost vs the in-session baseline. Positive = cost more; negative = saved. Counts only. |
41
- | `token_delta_provenance` | enum | `"measured"` from host-reported `usage` metadata (preferred); `"estimated"` when self-estimated from response length (mark always when host usage unavailable). |
42
- | `wall_clock_ms` | int | Dispatch wall-clock duration, milliseconds. |
40
+ | `task_size_estimate` | int | Pre-dispatch estimate of the task's size (the orchestrator's sizing heuristic). Counts only, no body. |
41
+ | `spawn_count` | int | Number of subagents dispatched for this task. `0` → handled in-session. |
42
+ | `tiers` | string[] | Model tiers dispatched to, one entry per spawn class (e.g. `["sonnet","opus"]`). Tier names only, no prompts. |
43
+ | `token_delta` | int | Net token cost of the dispatch versus the in-session baseline. Positive = orchestration cost more; negative = saved tokens. Counts only. |
44
+ | `token_delta_provenance` | enum | `"measured"` when sourced from host-reported `usage` metadata (preferred); `"estimated"` when self-estimated from response length (mark always when host usage is unavailable). |
45
+ | `wall_clock_ms` | int | Wall-clock duration of the dispatch, milliseconds. |
43
46
  | `outcome` | enum | One of `DONE` · `DONE_WITH_CONCERNS` · `NEEDS_CONTEXT` · `BLOCKED` · `killed`. |
44
- | `verify_mode` | enum | How output was verified: `deterministic` · `judge` · `none`. |
45
- | `verdict_changed_outcome` | bool \| null | **A3 extension (ADR-109 Track A).** For a review/verdict subagent (e.g. `production-validator`): did the verdict change the outcome vs the in-session baseline? `true` = caught a real issue the baseline missed / flipped a false `READY`→`NOT READY`; `false` = no lift; `null` = not a verdict dispatch / not measured. **Negative-control (clean single-file) tasks MUST record `false`** — a `true` on a control = spurious findings, fails Gate A. Additive field on THIS object, not a second schema. Boolean/counts only, no bodies. |
47
+ | `verify_mode` | enum | How the dispatch's output was verified: `deterministic` · `judge` · `none`. |
48
+ | `verdict_changed_outcome` | bool \| null | **A3 extension (ADR-109 Track A).** For a review/verdict subagent (e.g. `production-validator`): did the subagent's verdict actually change the outcome versus the in-session baseline? `true` = it caught a real issue the baseline missed or flipped a false `READY`→`NOT READY`; `false` = same outcome as baseline (no lift); `null` = not a verdict dispatch / not measured. **Negative-control tasks (a clean single-file task) MUST record `false`** — a subagent that reports `true` on a control is producing spurious findings and fails Gate A. This is an additive field on THIS object, not a second schema. Counts/boolean only, no bodies. |
49
+ | `dispatch_mode` | enum \| null | **Form-gate extension (road-to-opt-subagent-harvest P2).** Which orchestration mode the deterministic form gate selected for this dispatch (`do-and-judge`, `do-and-judge-two-stage`, `do-in-steps`, `do-in-parallel`, `do-competitively`, `judge-with-debate`, `do-in-worktrees`, `do-with-live-app-judge`) or `none` (gate declined dispatch). Mode id only. `null` = pre-extension line. Makes the form-gate's value measurable inside the ADR-117 prove-or-drop window. |
46
50
  | `task_class` | string \| null | **Routing extension (road-to-cost-aware-model-routing Phase 0).** Category id of the dispatched slice (e.g. `read-only-fanout`, `mechanical-edit`, `implementation`, `review-synthesis`). Enum-style id only, never free-form task text. `null` = pre-extension line / unclassified. |
47
51
  | `tier_chosen` | string \| null | Tier the slice was dispatched on (`lite` \| `medium` \| `high`). `null` = pre-extension line. |
48
52
  | `tier_source` | enum \| null | Where `tier_chosen` came from: `static` (frontmatter/category pin) · `inferred` (deterministic per-slice inference) · `inherit` (session tier — no downshift decision). Lets the evidence gate score inferred routing separately from static pinning. |
49
- | `escalated_from` | string \| null | When the slice re-dispatched after a verification failure: tier of the FAILED attempt (e.g. `lite` when a lite return failed verify and the slice re-ran on `medium`). `null` = no escalation. |
50
- | `verify_result_by_tier` | object \| null | Map tier → verification result per attempt of this slice (e.g. `{"lite":"fail","medium":"pass"}`). Values: `pass` \| `fail` \| `skipped`. Feeds the per-tier verify-pass-rate tripwire. Enums only, no verdict bodies. |
53
+ | `escalated_from` | string \| null | When the slice was re-dispatched after a verification failure: the tier of the FAILED attempt (e.g. `lite` when a lite return failed verify and the slice re-ran on `medium`). `null` = no escalation. |
54
+ | `verify_result_by_tier` | object \| null | Map of tier → verification result for every attempt of this slice (e.g. `{"lite":"fail","medium":"pass"}`). Values: `pass` \| `fail` \| `skipped`. Feeds the per-tier verify-pass-rate tripwire. Enums only, no verdict bodies. |
51
55
  | `dispatch_tokens` | int \| null | **Cost-% extension.** Absolute tokens the dispatched slice consumed (measured subagent usage). Feeds the MODELED cost-% in `orchestration_savings_report`, which needs an absolute base the token-count delta lacks. `null` = not recorded. Counts only. |
52
56
  | `session_tier` | string \| null | **Cost-% extension.** The orchestrator's OWN tier — the baseline the downshift cost-% measures `tier_chosen` against (a `high`→`lite` downshift is a rate win the token count can't see). `null` = not recorded. |
57
+ | `first_pass_success` | bool \| null | **QUALITY extension (council verdict: quality × cost paired).** `true` = the subagent return was adopted without parent rework; `false` = the parent had to rework the return before adopting. Precise rework definition: § Operationalization below. `null` = pre-extension line / not measured. Boolean only, no bodies. |
58
+ | `escalated` | bool \| null | **QUALITY extension (council verdict: quality × cost paired).** `true` = the slice was retried on a higher tier after a verification failure; `false` = no escalation. Semantics: § Operationalization below. `null` = pre-extension line / not measured. Boolean only, no bodies. |
53
59
 
54
60
  These routing + cost fields are additive and optional — a line without them is
55
61
  still a valid orchestration line; readers ignore unknown fields per the v1
56
62
  forward-compat rule.
57
63
 
64
+ ## Operationalization — `first_pass_success` / `escalated` (definitions, no schema change)
65
+
66
+ The two quality booleans are only comparable across sessions when "parent
67
+ rework" means the same thing everywhere. The mechanical decision table:
68
+
69
+ ```
70
+ first_pass_success = TRUE iff the parent adopts the subagent work product
71
+ with NO scope-relevant modification and issues NO corrective follow-up
72
+ prompt to the same subagent within the same task scope.
73
+
74
+ EXCLUDED from "modification" (still TRUE):
75
+ - auto-formatter output (prettier / eslint --fix / pint --fix)
76
+ - import sorting
77
+ - lockfile regeneration
78
+ - whitespace-only diffs
79
+
80
+ INCLUDED as rework (FALSE):
81
+ - any business-logic line diff to the returned work product
82
+ - added or changed tests
83
+ - changed API contract / signature
84
+ - manual conflict resolution
85
+ - architectural restructuring of the returned diff
86
+
87
+ escalated = TRUE iff the parent re-dispatched the same slice to a higher
88
+ tier after a verification failure. A mechanism metric, not a quality
89
+ verdict — it records that the escalation path fired, not how good the
90
+ final output was.
91
+ ```
92
+
93
+ **Honest boundary:** both fields are machine-observable proxies from the
94
+ orchestrator's own actions; they do NOT measure output quality directly. An
95
+ adopted-without-rework return can still be mediocre; a rejected return can
96
+ have failed on a formality. Field extensions (`verification_passed`,
97
+ `parent_rework_level`, `regression_detected`, `task_completed`,
98
+ `judge_confidence`, `human_rejected`) are explicitly NOT added: five of the
99
+ six are unobservable without new infrastructure (verification harness, diff
100
+ classifier, judge step, human feedback loop) and would breach the counts-only
101
+ privacy floor or record guesses. Revisit-if: a verification harness exists
102
+ that makes a candidate field machine-observable without content inspection.
103
+ The two-field cap is a council decision (2026-07-10); this section
104
+ operationalizes it rather than widening it.
105
+
58
106
  ## Privacy floor
59
107
 
60
108
  Counts and ids only — **no bodies**. This preserves the audit-log-v1 privacy
@@ -74,49 +122,58 @@ object is an additive extension on an otherwise standard audit-log-v1 line:
74
122
 
75
123
  After every auto-dispatched orchestration run, the orchestrating agent writes one
76
124
  telemetry line to `agents/runtime/state/audit/YYYY-MM.jsonl` (the existing
77
- audit-log-v1 path; `YYYY-MM` = current UTC month). The line is a standard
78
- audit-log-v1 object with `input_kind: "orchestration"` and an `orchestration`
79
- sub-object carrying this shape.
125
+ audit-log-v1 path, where `YYYY-MM` is the current UTC month). The line is a
126
+ standard audit-log-v1 object with `input_kind: "orchestration"` and an
127
+ `orchestration` sub-object carrying this shape.
80
128
 
81
- **No hook or daemon required.** The agent writes the line directly —
82
- no-runtime-compatible capture path (decided 2026-06-30, maintainer decision; see
83
- `road-to-subagent-value-realization.md § Council notes`). Do NOT hand-author the
84
- JSON: run the recorder, which validates + builds a conformant line from the
85
- counts you already have:
129
+ **No hook or daemon required.** The agent writes the line directly — the
130
+ no-runtime-compatible capture path (decided 2026-06-30, maintainer decision;
131
+ see `road-to-subagent-value-realization.md § Council notes`). Do NOT
132
+ hand-author the JSON: run the recorder, which validates the inputs and builds a
133
+ conformant audit-log-v1 line from the counts you already have:
86
134
 
87
135
  ```bash
88
136
  ./scripts-run src/scripts/orchestration_record --spawn-count <n> \
89
137
  --token-delta <±n> --provenance measured|estimated \
90
138
  [--tier-chosen lite|medium|high] [--tier-source static|inferred|inherit] \
91
- [--task-class <id>] [--tiers a,b] [--dispatch-outcome DONE|BLOCKED|…]
139
+ [--task-class <id>] [--tiers a,b] [--dispatch-outcome DONE|BLOCKED|…] \
140
+ [--first-pass-success true|false] [--escalated true|false]
92
141
  ```
93
142
 
94
- A capture **hook** is the wrong tool: the PostToolUse payload carries no subagent
95
- token usage (only the orchestrator sees it) and a hook reverses the 2026-06-30
96
- no-hook decision. Reader: `src/scripts/orchestration_savings_report.ts`.
143
+ A capture **hook** is the wrong tool here: the PostToolUse payload carries no
144
+ subagent token usage — only the orchestrator sees it (via the run result) — and
145
+ a hook would reverse the 2026-06-30 no-hook decision. Reader:
146
+ `src/scripts/orchestration_savings_report.ts`.
97
147
 
98
148
  **`token_delta` sourcing priority:**
99
149
  1. Host-reported: read `usage.output_tokens` (and `usage.input_tokens` if
100
- available) from each subagent call's response metadata. Use the sum minus the
101
- estimated single-agent baseline. Set `token_delta_provenance: "measured"`.
102
- 2. Self-estimate fallback: host usage metadata unavailable → estimate from
150
+ available) from the response metadata of each subagent call. Use the sum
151
+ minus the estimated single-agent baseline. Set `token_delta_provenance:
152
+ "measured"`.
153
+ 2. Self-estimate fallback: if host usage metadata is unavailable, estimate from
103
154
  response length (chars / 4 ≈ tokens). Set `token_delta_provenance:
104
- "estimated"`. Lossy; measured always preferred.
155
+ "estimated"`. This estimate is lossy; measured is always preferred.
105
156
 
106
157
  ## Savings report
107
158
 
108
- Aggregate accumulated telemetry into a token-savings report:
159
+ Aggregate the accumulated telemetry into a token-savings report:
109
160
 
110
161
  ```bash
111
162
  ./scripts-run src/scripts/orchestration_savings_report [--dir <path>] [--format text|json]
112
163
  ```
113
164
 
114
- Sums `token_delta` across dispatches (negative = net saved); splits by
115
- provenance (measured vs estimated), `tier_chosen`, `task_class`. Reports
116
- **ABSOLUTE net tokens saved, never a percentage**: telemetry records net delta,
117
- not the absolute in-session baseline → "% of session saved" not derivable. A
118
- percentage needs an additive absolute-baseline field (deferred follow-up).
119
- Reader: [`src/scripts/_lib/orchestration_savings.ts`](../../../../src/scripts/_lib/orchestration_savings.ts).
165
+ It sums `token_delta` across dispatches (negative = net saved) and splits by
166
+ provenance (measured vs estimated), `tier_chosen`, and `task_class`. **Quality
167
+ and cost render as PAIRED columns** (council verdict — never savings alone):
168
+ `first_pass_success_rate` and `escalation_rate` aggregate over the lines that
169
+ carry the quality booleans (per the § Operationalization definitions above); with ≥ 20 such lines in the window the real rates
170
+ render beside the savings figures, below 20 the quality columns render as
171
+ `n/a (n=<count>)`. It reports
172
+ **ABSOLUTE net tokens saved, never a percentage**: the telemetry records net
173
+ delta, not the absolute in-session baseline, so a "% of session saved" is not
174
+ derivable from this data. A percentage would require an additive
175
+ absolute-baseline field on this object (deferred follow-up). Reader:
176
+ [`src/scripts/_lib/orchestration_savings.ts`](../../../../src/scripts/_lib/orchestration_savings.ts).
120
177
 
121
178
  ## Related
122
179
 
@@ -242,6 +242,20 @@ For each open step in the working set (scope-bound — see wrapper):
242
242
  every scope (`process-step`, `process-phase`, `process-full`);
243
243
  cost is one `git diff` per step.
244
244
 
245
+ **`verify:` gate (when a step carries one).** If the step declares a
246
+ named `verify:` command (step-field convention, see
247
+ [`templates/roadmaps.md`](../../templates/roadmaps.md)), a `[x]` flip
248
+ additionally requires a **fresh green run of that exact command this
249
+ iteration** — its passing output in this reply or an earlier one this
250
+ run. Flipping a `verify:`-bearing step without that run is the same
251
+ class of violation as a forgotten flip: **halt loudly** ("step \<N\>
252
+ flipped without its `verify:` run — \`<cmd>\`"), do not auto-fix. A
253
+ check on existing output, not a new loop or script — the agent runs
254
+ the step's own command, as `think-before-action`'s `step → verify:`
255
+ planning already asks. Steps with no `verify:` field stay governed by
256
+ the flip-guard above unchanged (agent-decidable criteria remain the
257
+ default; `verify:` is the opt-in machine-checkable tightening).
258
+
245
259
  6. **Dashboard regen — cadence-gated.** Run
246
260
  `./agent-config roadmap:progress` when due per
247
261
  `roadmap.dashboard_regen_cadence` (resolved in § 4):
@@ -0,0 +1,65 @@
1
+ # Roadmap Writing — source-derived & capability-adoption roadmaps
2
+
3
+ Conditional procedure for [`roadmap-writing`](../../skills/roadmap-writing/SKILL.md)
4
+ § 8. Split out of the skill body to keep it under the size budget. This fires
5
+ **only** for source-derived or capability-adoption roadmaps; an ordinary
6
+ internally-originated roadmap skips it entirely (§§ 0–7 of the skill are the
7
+ whole job). Pull this when the roadmap originates from an external input or
8
+ adopts capabilities into the suite.
9
+
10
+ ## When this section fires
11
+
12
+ This section fires **only** when the roadmap originates from an
13
+ external input or adopts capabilities into the suite:
14
+
15
+ - a competitive / capability harvest, an external suggestion, or an
16
+ external LLM ideation thread, **or**
17
+ - a decision to integrate/adopt new skills, commands, or a pack, **or**
18
+ - a plan whose design has genuinely contested, not-yet-resolved
19
+ trade-offs.
20
+
21
+ For an ordinary internally-originated roadmap, **skip this section** —
22
+ §§ 0–7 are the whole job. Do not bolt a Provenance block or a
23
+ gap-table onto a plan that needs neither (template rule 19).
24
+
25
+ ## The four extra moves
26
+
27
+ When it fires, add these four moves to the §§ 0–7 procedure:
28
+
29
+ **A. Gap-table before drafting (don't adopt — integrate).** Audit each
30
+ proposed item against the *existing* skill / command / rule surface and
31
+ classify it `KEEP` (verified gap), `FOLD` (into a named existing
32
+ artefact), or `CUT` (already covered). Only `KEEP` items become
33
+ roadmap scope; `FOLD`/`CUT` are recorded so the cut is auditable. A
34
+ negative grep is not proof — open the nearest existing artefacts (per
35
+ [`think-before-action`](../../rules/think-before-action.md) and, for an
36
+ external source, [`external-reference-deep-dive`](../../rules/external-reference-deep-dive.md)).
37
+
38
+ **B. Resolve contested design in the council *first*, then author.**
39
+ The default council flow (`/roadmap:ai-council`) *challenges a finished
40
+ roadmap*. For a contested or source-derived plan, run the council
41
+ **up front** on the design questions (`/council:design`, or the
42
+ [`ai-council`](../../skills/ai-council/SKILL.md) skill), converge, **then** write
43
+ the roadmap encoding the verdicts — so the plan ships already-decided,
44
+ not as open questions in prose. One run, converge; do not relitigate.
45
+
46
+ **C. Encode the decision so it survives.**
47
+ - Inline council convergence under a `## Council notes (<date>, <depth>)`
48
+ block — members + date, **never** a session filepath
49
+ ([`no-roadmap-references`](../../rules/no-roadmap-references.md)).
50
+ - Add a `## Provenance` block — source by a **neutral descriptor**
51
+ (never the raw competitor/tool name,
52
+ [`source-confidentiality`](../../rules/source-confidentiality.md));
53
+ retain the real link as an `ENC1:` token via
54
+ `src/scripts/_lib/link_crypto.ts encrypt --value <url>`.
55
+ - Save the locked decision to memory (project type, "don't relitigate")
56
+ so a future session does not re-derive it.
57
+
58
+ **D. Make "integration, not dump" a testable acceptance criterion.**
59
+ The AC must encode the anti-dump litmus, decidably: visible commands
60
+ within the pack's `size_class` budget; each new visible command reuses
61
+ ≥ 2 existing skills; no new artefact duplicates an existing one;
62
+ governance preflight recorded — `domain-adoption-policy` (does it open a
63
+ new domain?), `persona-governance` (new personas?),
64
+ `framework-neutrality`, `size-enforcement` — with the disposition
65
+ stated in the roadmap.
@@ -0,0 +1,84 @@
1
+ # Subagent Modes — worktree + live-app-judge detail
2
+
3
+ Extended detail for the two heaviest [`subagent-orchestration`](../../skills/subagent-orchestration/SKILL.md)
4
+ modes — `do-in-worktrees` (mode 7) and `do-with-live-app-judge` (mode 8).
5
+ Split out of the skill body to keep it under the size budget; the mode list,
6
+ selection rules, and the six common modes stay inline in the skill. Pull this
7
+ when you actually dispatch one of these two modes.
8
+
9
+ ## Mode 7 — do-in-worktrees
10
+
11
+ Cross-wing or cross-skill chain executed across isolated git
12
+ worktrees — each handoff in the chain runs in its own worktree, so
13
+ the workspace state of one step never leaks into the next. Operationalizes
14
+ the worktree boundary clause in
15
+ [`docs/contracts/cross-wing-handoff.md`](../../../../docs/contracts/cross-wing-handoff.md)
16
+ § 3. State-machine layer only — worktree creation/destruction lives
17
+ in [`using-git-worktrees`](../../skills/using-git-worktrees/SKILL.md) and
18
+ [`finishing-a-development-branch`](../../skills/finishing-a-development-branch/SKILL.md).
19
+
20
+ | When to use | When not | Model pairing |
21
+ |---|---|---|
22
+ | Multi-step cross-wing chain (≥2 senior skills, each ≥30 min) where one step's open files / branch state would confuse the next | Fast iteration where each step < 30 min — worktree overhead exceeds isolation benefit | implementers = same tier per step; judge = one tier up at chain end |
23
+
24
+ **Handoff shape:** initiator-skill emits the typed output declared in
25
+ its `## Output` block → control passes to delegated-skill in a fresh
26
+ worktree → delegated-skill consumes the input shape declared in its
27
+ `## Input` (or `## When the agent should load this`) block. The
28
+ handoff is auditable; `lint_handoffs.ts` validates the chain.
29
+
30
+ **Example chain (W3 launch):** `positioning-strategy` (worktree A) →
31
+ `messaging-architecture` (worktree B, consumes positioning's
32
+ `positioning-statement.md`) → `gtm-launch` (worktree C, consumes
33
+ both prior artifacts). Each worktree carries one branch; the chain
34
+ end produces a single integration PR.
35
+
36
+ **Anti-pattern:** do not use for fast iteration loops where each
37
+ step is under ~30 minutes. The branch-creation, context-switch, and
38
+ worktree-cleanup cost dominates. Stick with mode 1 (do-and-judge)
39
+ or mode 3 (do-in-steps) for those.
40
+
41
+ **Competitive variant — per-candidate isolation.** When mode 5
42
+ (`do-competitively`) is combined with worktrees, each candidate
43
+ implementer runs in its own worktree (so candidates cannot read each
44
+ other's open files or branch state). Selection rules:
45
+
46
+ - **No auto-merge.** The orchestrator never merges a candidate
47
+ branch. Hard Floor per [`non-destructive-by-default`](../../rules/non-destructive-by-default.md) —
48
+ applies even under standing autonomy. ADR-005 records the reasoning.
49
+ - **Ranked presentation.** Judge ranks candidates (1..N) with a
50
+ one-line justification per rank; user picks the winner.
51
+ - **Loser worktrees stay.** The orchestrator does not delete losing
52
+ worktrees automatically — the user keeps the option to harvest a
53
+ partial idea before cleanup.
54
+
55
+ ## Mode 8 — do-with-live-app-judge (gated — UI-heavy tasks)
56
+
57
+ Implementer ships the change AND starts the dev server; the judge drives
58
+ the RUNNING application (Playwright / browser) against a written rubric —
59
+ it never reads the diff. Catches the class static review misses: wired-but-
60
+ broken flows, dead buttons, state that renders wrong only at runtime.
61
+
62
+ | When to use | When not | Model pairing |
63
+ |---|---|---|
64
+ | UI-heavy change where "looks right in the diff" ≠ "works in the app"; a dev server + browser tooling exist | Backend/logic change (a diff judge is cheaper and sharper); no runnable app surface | implementer = session; judge = same tier, fresh context, browser tools only |
65
+
66
+ Rules:
67
+
68
+ - The judge's rubric is written BEFORE dispatch (what flows to click, what
69
+ must render) — never improvised from the diff it must not read.
70
+ - Record `dispatch_mode: do-with-live-app-judge` + `verdict_changed_outcome`
71
+ on every use. **Adoption gate:** this mode stays experimental until its
72
+ `verdict_changed_outcome` telemetry shows it changes outcomes (caught a
73
+ real issue a diff judge missed); a mode that never flips a verdict is
74
+ cost without value and gets removed.
75
+ - No self-play/"adversarial training" framing — this is one judge, one
76
+ rubric, one running app.
77
+ - **Low-priority future candidate (needs real screenshot tooling — do not
78
+ build speculatively):** the async silent-verifier shape from
79
+ [`design-review`](../../skills/design-review/SKILL.md) § Async-verifier pattern — a
80
+ background verifier that owns UI verification via screenshots, forbids the
81
+ main agent from self-checking, and stays silent on pass — is the natural
82
+ mechanism for this mode's judge once dependable screenshot tooling lands.
83
+ Recorded from road-to-opt-design-polish; gate it behind the same
84
+ `verdict_changed_outcome` adoption evidence above.