@event4u/agent-config 9.27.0 → 9.29.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +13 -12
- package/CHANGELOG.md +165 -0
- package/README.md +1 -1
- package/agents/templates/.ai-council.yml.example +55 -24
- package/dist/agent-src/commands/analyze/conformance.md +24 -0
- package/dist/agent-src/commands/cost/report.md +2 -2
- package/dist/agent-src/commands/team/adversarial.md +8 -7
- package/dist/agent-src/commands/team/delegate.md +13 -12
- package/dist/agent-src/commands/team/review.md +9 -8
- package/dist/agent-src/commands/team/status.md +9 -8
- package/dist/agent-src/commands/team.md +29 -19
- package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +88 -2
- package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +29 -21
- package/dist/agent-src/contexts/execution/host-capability-manifest.md +26 -15
- package/dist/agent-src/contexts/execution/orchestration-telemetry.md +28 -3
- package/dist/agent-src/contexts/execution/subagent-response-contract.md +54 -0
- package/dist/agent-src/contexts/execution/subagent-routing.md +13 -11
- package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +25 -0
- package/dist/agent-src/contexts/execution/subagent-steering.md +6 -3
- package/dist/agent-src/rules/artifact-engagement-recording.md +4 -1
- package/dist/agent-src/rules/autonomous-execution.md +1 -1
- package/dist/agent-src/rules/brand-source-of-truth.md +33 -6
- package/dist/agent-src/rules/context-hygiene.md +3 -1
- package/dist/agent-src/rules/council-availability.md +93 -0
- package/dist/agent-src/rules/cross-source-consistency.md +3 -0
- package/dist/agent-src/rules/delegation-policy.md +38 -10
- package/dist/agent-src/rules/design-fidelity.md +3 -0
- package/dist/agent-src/rules/evaluator-independence.md +2 -1
- package/dist/agent-src/rules/external-code-graph-interop.md +2 -1
- package/dist/agent-src/rules/finance-safety-floor.md +1 -1
- package/dist/agent-src/rules/git-history-discipline.md +1 -1
- package/dist/agent-src/rules/history-discipline.md +3 -1
- package/dist/agent-src/rules/legal-safety-floor.md +1 -1
- package/dist/agent-src/rules/no-pr-progress-comments.md +3 -1
- package/dist/agent-src/rules/onboarding-gate.md +3 -1
- package/dist/agent-src/rules/roadmap-ci-steps-policy.md +4 -1
- package/dist/agent-src/rules/role-mode-adherence.md +1 -1
- package/dist/agent-src/rules/scale-discipline.md +3 -1
- package/dist/agent-src/rules/self-repair-loop.md +103 -0
- package/dist/agent-src/rules/session-canary.md +2 -1
- package/dist/agent-src/rules/settings-ask-protocol.md +8 -7
- package/dist/agent-src/rules/strategy-safety-floor.md +1 -1
- package/dist/agent-src/rules/token-budget-discipline.md +4 -2
- package/dist/agent-src/rules/tool-safety.md +5 -1
- package/dist/agent-src/skills/adversarial-review/SKILL.md +1 -1
- package/dist/agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
- package/dist/agent-src/skills/forensics-report/SKILL.md +114 -0
- package/dist/agent-src/skills/forensics-report/evals/triggers.json +17 -0
- package/dist/agent-src/skills/performance-analysis/SKILL.md +1 -1
- package/dist/agent-src/skills/persona-improvement/SKILL.md +1 -1
- package/dist/agent-src/skills/premortem/SKILL.md +30 -1
- package/dist/agent-src/skills/project-analyzer/SKILL.md +1 -1
- package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +2 -1
- package/dist/agent-src/skills/security-audit/SKILL.md +1 -1
- package/dist/agent-src/skills/sequential-thinking/SKILL.md +1 -1
- package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +1 -1
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +7 -5
- package/dist/agent-src/skills/subagent-orchestration/schemas/subagent-status.json +61 -3
- package/dist/agent-src/skills/test-case-discovery/SKILL.md +1 -1
- package/dist/agent-src/skills/universal-project-analysis/SKILL.md +1 -1
- package/dist/agent-src/templates/AGENTS.md +8 -12
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/roadmaps.md +23 -0
- package/dist/cli/registry.js +7 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli-delegate/chunk-66OVWGB5.js +270 -0
- package/dist/cli-delegate/{chunk-HJ6DAJHR.js → chunk-LCFJIQ4J.js} +89 -7
- package/dist/cli-delegate/{chunk-VSYT7OHO.js → chunk-LVRYBKTI.js} +31 -2
- package/dist/cli-delegate/{chunk-DVRS2KVR.js → chunk-MMXA5GY7.js} +10 -17
- package/dist/cli-delegate/{chunk-WR6GTRHJ.js → chunk-MP3JT3IU.js} +3 -3
- package/dist/cli-delegate/{chunk-3KJIMFTB.js → chunk-NZ5N2XQL.js} +467 -305
- package/dist/cli-delegate/{chunk-AIIUU73N.js → chunk-OJM3MBJM.js} +1 -1
- package/dist/cli-delegate/{chunk-BCPIOAGV.js → chunk-RCIA67XN.js} +117 -96
- package/dist/cli-delegate/chunk-REKCMYOU.js +2991 -0
- package/dist/cli-delegate/cmd_analyze_session.js +1 -1
- package/dist/cli-delegate/cmd_brand_status.js +134 -0
- package/dist/cli-delegate/cmd_conformance.js +10 -47
- package/dist/cli-delegate/cmd_converge.js +3 -3
- package/dist/cli-delegate/cmd_doctor.js +10 -6
- package/dist/cli-delegate/cmd_explain.js +80 -330
- package/dist/cli-delegate/cmd_export.js +6 -6
- package/dist/cli-delegate/cmd_fleet.js +3 -3
- package/dist/cli-delegate/cmd_handoff.js +3 -3
- package/dist/cli-delegate/cmd_mcp_available.js +433 -0
- package/dist/cli-delegate/cmd_migrate.js +3 -3
- package/dist/cli-delegate/cmd_packs_active.js +153 -0
- package/dist/cli-delegate/cmd_preflight.js +1 -1
- package/dist/cli-delegate/cmd_prune.js +6 -6
- package/dist/cli-delegate/cmd_route_audit.js +8 -8
- package/dist/cli-delegate/cmd_route_explain.js +4 -4
- package/dist/cli-delegate/cmd_settings_get.js +266 -0
- package/dist/cli-delegate/cmd_settings_migrate.js +6 -6
- package/dist/cli-delegate/cmd_settings_set.js +8 -2968
- package/dist/cli-delegate/cmd_sync.js +6 -6
- package/dist/cli-delegate/cmd_uninstall.js +6 -6
- package/dist/cli-delegate/cmd_update.js +4 -4
- package/dist/cli-delegate/cmd_upgrade.js +4 -4
- package/dist/cli-delegate/cmd_validate.js +6 -6
- package/dist/cli-delegate/cmd_versions.js +4 -4
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +164 -55
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +4 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +44 -5
- package/dist/discovery/trust-report.md +11 -11
- package/dist/discovery/workspaces.json +16 -6
- package/dist/hooks/dispatch.js +9341 -6131
- package/dist/install/install.mjs +739 -524
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +777 -281
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/agent_settings.js +134 -15
- package/dist/scripts/_lib/agent_settings.js.map +1 -1
- package/dist/scripts/condense.js +147 -2
- package/dist/scripts/condense.js.map +1 -1
- package/dist/server/schemas/settings.js +6 -7
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/shared/settingsCarveOut.js +0 -9
- package/dist/shared/settingsCarveOut.js.map +1 -1
- package/dist/shared/settingsClasses.js +11 -9
- package/dist/shared/settingsClasses.js.map +1 -1
- package/dist/ui/assets/{index-DmR0mbk4.js → index-JDAF00bC.js} +2 -2
- package/dist/ui/assets/{index-DmR0mbk4.js.map → index-JDAF00bC.js.map} +1 -1
- package/dist/ui/index.html +1 -1
- package/docs/contracts/settings-classes.md +68 -17
- package/docs/guidelines/agent-infra/memory-access.md +14 -3
- package/package.json +1 -1
- package/src/agent-src/templates/AGENTS.md +8 -12
- package/src/config/agent-settings.template.yml +52 -66
- package/src/config/budgets.yml +29 -0
- package/src/config/discovery/packs.yml +11 -0
- package/src/config/discovery/workspaces.yml +1 -1
- package/src/config/evaluator-budgets.json +4 -4
- package/src/config/gate-coverage.yml +26 -0
- package/src/config/gate-violation-baselines.json +3 -3
- package/src/scripts/_cli/cmd_brand_status.ts +174 -0
- package/src/scripts/_cli/cmd_conformance.ts +14 -42
- package/src/scripts/_cli/cmd_doctor.ts +65 -48
- package/src/scripts/_cli/cmd_mcp_available.ts +266 -0
- package/src/scripts/_cli/cmd_packs_active.ts +225 -0
- package/src/scripts/_cli/cmd_settings_get.ts +324 -0
- package/src/scripts/_dispatch.bash +57 -0
- package/src/scripts/_lib/agent_settings.ts +140 -16
- package/src/scripts/_lib/auto_dispatch.corpus.test.ts +1 -1
- package/src/scripts/_lib/auto_dispatch.ts +23 -18
- package/src/scripts/_lib/capsule_trigger.ts +124 -0
- package/src/scripts/_lib/carrier_divergence.ts +135 -0
- package/src/scripts/_lib/host_capability.ts +144 -4
- package/src/scripts/_lib/judgment_ladder.ts +382 -0
- package/src/scripts/_lib/orchestration_gate.ts +8 -0
- package/src/scripts/_lib/orchestration_record.ts +37 -0
- package/src/scripts/_lib/orchestration_savings.ts +1 -1
- package/src/scripts/_lib/prompt_shape.ts +88 -0
- package/src/scripts/_lib/review_skipped_record.ts +102 -0
- package/src/scripts/_lib/rule_layer_overlap.ts +254 -0
- package/src/scripts/_lib/self_repair.ts +489 -0
- package/src/scripts/_lib/self_repair_store.ts +128 -0
- package/src/scripts/_lib/subagent_capsule.ts +182 -0
- package/src/scripts/_lib/subagent_response.ts +19 -0
- package/src/scripts/_lib/subagent_spawn.ts +13 -0
- package/src/scripts/_lib/subagent_steering.ts +9 -4
- package/src/scripts/_lib/tier_budget_routing.ts +6 -1
- package/src/scripts/_lib/transcript_entry.ts +80 -0
- package/src/scripts/_lib/worker_budget.ts +37 -2
- package/src/scripts/ai_council/clients.ts +76 -54
- package/src/scripts/ai_council/config.ts +94 -6
- package/src/scripts/ai_council/handoff.ts +113 -0
- package/src/scripts/ai_council/modes.ts +19 -4
- package/src/scripts/ai_council/orchestrator.ts +105 -0
- package/src/scripts/ai_council/quorum.ts +84 -0
- package/src/scripts/ai_council/session.ts +44 -0
- package/src/scripts/ai_council/transport_resolver.ts +127 -1
- package/src/scripts/ai_team/availability.ts +110 -0
- package/src/scripts/ai_team/config.ts +34 -14
- package/src/scripts/ai_team/team_dispatch.ts +71 -29
- package/src/scripts/bench_critic_protocol.ts +396 -0
- package/src/scripts/check_branch_freshness.ts +255 -0
- package/src/scripts/check_council_config_location.ts +125 -1
- package/src/scripts/check_detector_corpus.ts +202 -0
- package/src/scripts/check_hook_bundle_freshness.ts +4 -1
- package/src/scripts/check_standing_rule_delivery.ts +314 -0
- package/src/scripts/condense.ts +162 -2
- package/src/scripts/config/profiles.ts +13 -3
- package/src/scripts/conformance_scan.ts +272 -24
- package/src/scripts/council_availability_hook.ts +188 -0
- package/src/scripts/council_cli.ts +527 -32
- package/src/scripts/forensics_report.ts +333 -0
- package/src/scripts/hook_manifest.yaml +107 -26
- package/src/scripts/hooks/block_no_verify.ts +39 -2
- package/src/scripts/hooks/block_unauthorized_git.ts +156 -7
- package/src/scripts/hooks/concern_registry.ts +10 -0
- package/src/scripts/hooks/delegation_nudge_hook.ts +484 -0
- package/src/scripts/hooks/end_review_nudge_hook.ts +726 -0
- package/src/scripts/hooks/orchestration_record_hook.ts +342 -0
- package/src/scripts/install.ts +151 -0
- package/src/scripts/language_mirror_hook.ts +30 -37
- package/src/scripts/lint_discovery_vocabulary.ts +2 -0
- package/src/scripts/lint_never_silent.ts +276 -0
- package/src/scripts/lint_no_activation_gates.ts +271 -0
- package/src/scripts/measure_scope_dedup.ts +19 -13
- package/src/scripts/onboarding_gate_hook.ts +40 -1
- package/src/scripts/orchestration_record.ts +12 -1
- package/src/scripts/preamble_byte_census.ts +9 -20
- package/src/scripts/rebuild_hook_bundle.ts +177 -0
- package/src/scripts/release.ts +74 -2
- package/src/scripts/report_carrier_divergence.ts +364 -0
- package/src/scripts/report_skill_activation.ts +257 -0
- package/src/scripts/report_skill_obligation_violations.ts +579 -0
- package/src/scripts/routing_doctor.ts +95 -39
- package/src/scripts/score_skill_selection.ts +19 -5
- package/src/scripts/self_repair_cli.ts +470 -0
- package/src/scripts/self_repair_hook.ts +241 -0
- package/src/scripts/team_events_spike.ts +271 -0
- package/src/scripts/team_review_gate_hook.ts +31 -9
- package/src/server/schemas/settings.ts +10 -17
- package/src/shared/settingsCarveOut.ts +0 -10
- package/src/shared/settingsClasses.ts +11 -9
|
@@ -15,7 +15,7 @@ type: orchestrator
|
|
|
15
15
|
suggestion:
|
|
16
16
|
eligible: true
|
|
17
17
|
trigger_description: "second model, GPT drüberschauen lassen, cross-model review, review gate, let another strong model check the diff, team review"
|
|
18
|
-
trigger_context: "
|
|
18
|
+
trigger_context: "/team is available (codex CLI installed + authenticated, not halted) AND the user wants a second strong model to review the actual working-tree diff with repo access (depth) — not a neutral artefact opinion (that is /council)"
|
|
19
19
|
workspaces:
|
|
20
20
|
- agent-config-maintainer
|
|
21
21
|
packs:
|
|
@@ -55,25 +55,33 @@ pre-registered benchmark (§ No-claims note).
|
|
|
55
55
|
| Model choice | Mid-tier default (cost decision) | Strongest available — `ai_team.model: 'auto'` defers to the CLI default |
|
|
56
56
|
| Write access | Never (text only; one opt-in PR comment under `pr`) | Read-only by default; `/team delegate` is the single write path, behind a second opt-in |
|
|
57
57
|
|
|
58
|
-
##
|
|
58
|
+
## Availability gate — check FIRST, before anything else
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
(
|
|
62
|
-
|
|
60
|
+
`/team` carries no on/off setting — `ai_team.enabled` was REMOVED
|
|
61
|
+
(road-to-always-on-orchestration Phase 1, Step 1.3). Availability is a FACT
|
|
62
|
+
resolved from the machine: the codex CLI must resolve on `$PATH`, AND some
|
|
63
|
+
auth for it must be detectable (subscription login, API key, key file, or
|
|
64
|
+
env key) — the same check `agent-config doctor --check team` runs. Missing
|
|
65
|
+
either → print the degrade line and **STOP**. Do not route, do not suggest
|
|
66
|
+
a sub-command, do not probe for the plugin:
|
|
63
67
|
|
|
64
|
-
>
|
|
65
|
-
>
|
|
66
|
-
>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
>
|
|
73
|
-
>
|
|
68
|
+
> codex CLI not available — `/team` needs the codex CLI installed and
|
|
69
|
+
> authenticated. Install: `npm install -g @openai/codex`, then run
|
|
70
|
+
> `codex login`. Verify with `agent-config doctor --check team`.
|
|
71
|
+
|
|
72
|
+
Also check the one incident switch: `emergency.orchestration_halt: true`
|
|
73
|
+
in `.agent-settings.yml` halts `/team` along with the rest of the always-on
|
|
74
|
+
orchestration stack (subagents, council, team). Halted → print:
|
|
75
|
+
|
|
76
|
+
> `/team` is halted (`emergency.orchestration_halt: true`) — the always-on
|
|
77
|
+
> orchestration stack is paused for incident response. Resume: set
|
|
78
|
+
> `orchestration_halt: false` with a non-empty
|
|
79
|
+
> `orchestration_halt_justification` in `.agent-settings.yml`.
|
|
74
80
|
|
|
75
81
|
Every sub-command repeats this check independently — the gate holds even when
|
|
76
|
-
a wrapper is invoked directly.
|
|
82
|
+
a wrapper is invoked directly. A leftover `ai_team.enabled` key from an
|
|
83
|
+
older install is ignored (one deprecation-warning line on load) — it no
|
|
84
|
+
longer gates anything.
|
|
77
85
|
|
|
78
86
|
## Sub-commands
|
|
79
87
|
|
|
@@ -89,7 +97,8 @@ rather than routing to an in-suite skill — the second column names that target
|
|
|
89
97
|
|
|
90
98
|
## Dispatch
|
|
91
99
|
|
|
92
|
-
1. Run the
|
|
100
|
+
1. Run the availability gate above. Unavailable or halted → the matching
|
|
101
|
+
one-line block, stop.
|
|
93
102
|
2. Parse the user's argument: `/team <sub-command> [args]`.
|
|
94
103
|
3. Look up the sub-command in the table above; load the routed file and
|
|
95
104
|
follow its `## Instructions` verbatim with the remaining args.
|
|
@@ -106,7 +115,7 @@ When the official plugin is absent on a Claude Code host, every wrapper
|
|
|
106
115
|
fails **closed** with the doctor remediation pointer — never a silent no-op,
|
|
107
116
|
never an inline reimplementation of the plugin:
|
|
108
117
|
|
|
109
|
-
> ❌
|
|
118
|
+
> ❌ `/team` is available, but the official plugin is not installed on this
|
|
110
119
|
> Claude Code host. `/team <sub>` fails closed — it never reimplements the
|
|
111
120
|
> plugin inline and never silently no-ops.
|
|
112
121
|
>
|
|
@@ -156,4 +165,5 @@ measured improvement.
|
|
|
156
165
|
- `adversarial-review` skill — the free single-model first rung below
|
|
157
166
|
`/team adversarial`.
|
|
158
167
|
- `docs/contracts/ai-team-config.md` — the `ai_team` settings block
|
|
159
|
-
(`
|
|
168
|
+
(`model`, `allow_delegate`, `max_calls_per_day`) and the availability
|
|
169
|
+
contract (codex CLI + auth, `emergency.orchestration_halt`).
|
|
@@ -44,8 +44,10 @@ dwarfs the work). Below the floor → in-session.
|
|
|
44
44
|
|
|
45
45
|
- Trivial / single-step edits below the size floor.
|
|
46
46
|
- Tasks with cross-step shared mutable state that cannot be sliced.
|
|
47
|
-
- Anything that fails to match a signal above
|
|
48
|
-
|
|
47
|
+
- Anything that fails to match a signal above, once past the activation gate
|
|
48
|
+
and the size floor, is **ambiguous** → **ask**, always — a verdict to the
|
|
49
|
+
user, never a speculative spawn (always-on orchestration: there is no more
|
|
50
|
+
`subagents.auto` setting to route this on).
|
|
49
51
|
|
|
50
52
|
## Mode selection summary
|
|
51
53
|
|
|
@@ -55,6 +57,76 @@ dwarfs the work). Below the floor → in-session.
|
|
|
55
57
|
| `parallelizable: files\|independent` / independent slices | `do-in-parallel` |
|
|
56
58
|
| change needing verification (any of the above) | implementer + cross-model judge per the `subagent-orchestration` Iron Law |
|
|
57
59
|
|
|
60
|
+
## Judgment ladder (Phase 2 — road-to-always-on-orchestration)
|
|
61
|
+
|
|
62
|
+
One committed table replacing three scattered classification surfaces
|
|
63
|
+
(the delegable-signal rules above, ad-hoc "should this be a team" calls,
|
|
64
|
+
and the absence of any council-routing signal on the task side). Resolver:
|
|
65
|
+
[`judgment_ladder.ts`](../../../../src/scripts/_lib/judgment_ladder.ts)
|
|
66
|
+
(`classifyLadder`) — a WRAPPER around `classifyTask`, never a replacement:
|
|
67
|
+
rungs 1 and 2 ARE `classifyTask`'s existing dispatch verdict.
|
|
68
|
+
|
|
69
|
+
| Rung | Shape signals | Resolves to |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| 0 | mechanical transform, no semantics (rename / codemod / formatter-run / bulk search-and-replace), OR a lookup-class match (§ Lookup-class rung above) | deterministic script, no spawn |
|
|
72
|
+
| 1 | single bounded read-heavy slice (`classifyTask` structurally cannot see this — it requires ≥2 slices, an ordered plan, or a declared `parallelizable` value) | one subagent, `lite` tier |
|
|
73
|
+
| 2 | enumerable independent slices, or an ordered plan (`classifyTask` dispatch: `do-in-parallel` / `do-in-steps` both land here in this v1 — see the resolver's doc comment for why) | parallel subagents, downshifted |
|
|
74
|
+
| 3 | slices that must communicate (cross-layer work, a review-with-challenge shape, an explicit shared task list) | team — only when the host reports `agent_teams: true`; else degrades to whatever `classifyTask` resolves on the same signals (usually rung 2), with a recorded `degraded_from: 3` line — never a fabricated slice count |
|
|
75
|
+
| 4 | judgment under disagreement (a design decision, a proposed security downgrade, a release-gate escalation) | council |
|
|
76
|
+
| ∅ | interactive-approval-required (caller-stated), trivial (below the size floor), or ambiguous | in-session; ambiguity is an `ask` VERDICT, never a speculative spawn |
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
AMBIGUITY NEVER SPAWNS. RUNG 0 NEVER SPAWNS EITHER — IT NEVER NEEDED TO.
|
|
80
|
+
A MATCHED RUNG-3/4 SIGNAL WITHOUT ITS HOST PRECONDITION DEGRADES,
|
|
81
|
+
RECORDED — IT NEVER SILENTLY DROPS TO ∅.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Resolution order is fixed and documented on `classifyLadder` itself**:
|
|
85
|
+
interactive-approval-required → rung 0 → recursive-dispatch guard →
|
|
86
|
+
activation gate → rung 4 → rung 3 (+ degrade) → rungs 1/2. Two signals
|
|
87
|
+
matching the same text resolve deterministically on this order, never on
|
|
88
|
+
evaluation-order accident.
|
|
89
|
+
|
|
90
|
+
**Recursive-dispatch guard (2.3) — honest scope.** No verified host
|
|
91
|
+
discriminator exists for "is this classification running inside a
|
|
92
|
+
subagent/teammate session" — this roadmap's own `point-of-action-carrier`
|
|
93
|
+
blocker records the upstream PreToolUse agent-identity request as closed
|
|
94
|
+
NOT_PLANNED, and no field in this repo's hook envelope carries session
|
|
95
|
+
lineage. The guard is therefore a CALLER-SUPPLIED fact
|
|
96
|
+
(`insideSubagentSession`), never a `process.env` probe for an unverified
|
|
97
|
+
variable name — the same "no discriminator is publishable" null the
|
|
98
|
+
`point-of-action-carrier` blocker already names. When set, it resolves ∅
|
|
99
|
+
(in-session) for rungs 1-4; rung 0 is exempt (it never spawns).
|
|
100
|
+
|
|
101
|
+
**Relationship to the council's own necessity gate.** Rung 4's three
|
|
102
|
+
signals (design decision / security downgrade / release-gate escalation)
|
|
103
|
+
are a deliberately narrow, TASK-side vocabulary — NOT an import of
|
|
104
|
+
`ai_council/necessity.ts`'s broader `NECESSARY_TRIGGERS`
|
|
105
|
+
(architecture/tradeoff/ambiguity/strategic). That module stays the
|
|
106
|
+
council's own necessity gate (its `off|educate|block|warn-only` modes are
|
|
107
|
+
the council-side surface); this resolver only decides whether a TASK
|
|
108
|
+
should route to rung 4 in the first place.
|
|
109
|
+
|
|
110
|
+
## Cheapest-sufficient-model table (Phase 2.4 — the ladder's tie-breaker)
|
|
111
|
+
|
|
112
|
+
Once a slice resolves to rung 1 or 2, this table is the tie-breaker
|
|
113
|
+
`classifyLadder`'s caller consults for the concrete tier — `lite` by
|
|
114
|
+
default, escalating only on a named criterion. Consolidates mechanisms that
|
|
115
|
+
already exist elsewhere in this contract set; this table is the ONE place
|
|
116
|
+
that lists them side by side.
|
|
117
|
+
|
|
118
|
+
| Escalation criterion | Tier | Basis |
|
|
119
|
+
|---|---|---|
|
|
120
|
+
| (none — default) | `lite` | the downshift default (`subagent-routing.md`) |
|
|
121
|
+
| Slice failed verification on its current tier | next tier up (`lite`→`medium`→`medium`→`high`) | [`subagent-steering`](subagent-steering.md) § Verify-fail escalation cascade |
|
|
122
|
+
| Slice touches ≥ 5 files (or > 200 lines) | `medium` | the ticket-bundle `lite` size floor (`docs/contracts/ticket-bundle-format.md`) |
|
|
123
|
+
| Architecture-shaped slice (structural/boundary decision — the same shape as rung 4's design-decision signal, one level down in stakes) | `medium` | [`subagent-modes-detail`](subagent-modes-detail.md) § Severity-conditioned team composition |
|
|
124
|
+
| Security-sensitive slice (auth, tenant, secrets, billing — `security-sensitive-stop`'s surface table) | `high` | [`subagent-modes-detail`](subagent-modes-detail.md) § Critical severity row |
|
|
125
|
+
|
|
126
|
+
Criteria are independent and additive in the obvious way (a slice matching
|
|
127
|
+
two rows takes the higher of the two tiers); this table never lowers a
|
|
128
|
+
tier `inferSliceTier` (§ below) already raised.
|
|
129
|
+
|
|
58
130
|
## Per-slice tier inference (v1.5 — deterministic, task-TYPE-keyed)
|
|
59
131
|
|
|
60
132
|
Once a slice is classified **delegable**, a second deterministic table infers
|
|
@@ -174,8 +246,22 @@ and the lookup corpus in
|
|
|
174
246
|
[`src/scripts/_lib/auto_dispatch.corpus.test.ts`](../../../../src/scripts/_lib/auto_dispatch.corpus.test.ts)
|
|
175
247
|
(`LOOKUP_CORPUS` — the four live-observed shapes + negative controls).
|
|
176
248
|
|
|
249
|
+
The judgment ladder (§ above) is encoded in
|
|
250
|
+
[`src/scripts/_lib/judgment_ladder.ts`](../../../../src/scripts/_lib/judgment_ladder.ts)
|
|
251
|
+
(`classifyLadder`, plus the rung-0/1/3/4 signal-detection functions), covered
|
|
252
|
+
by
|
|
253
|
+
[`tests/scripts/_lib_judgment_ladder.test.ts`](../../../../tests/scripts/_lib_judgment_ladder.test.ts)
|
|
254
|
+
(every rung, the rung-3 degrade path, the recursive-dispatch guard, and every
|
|
255
|
+
∅ case). The delegation-nudge hook
|
|
256
|
+
([`delegation_nudge_hook.ts`](../../../../src/scripts/hooks/delegation_nudge_hook.ts))
|
|
257
|
+
is its first production caller — its injected line cites the resolved rung
|
|
258
|
+
(`rung-2: dispatch do-in-parallel …`), scoped to the subagent dispatch rungs
|
|
259
|
+
(1/2); a rung-0/3/4 verdict stays silent on this carrier until Phase 3/4 give
|
|
260
|
+
team/council their own.
|
|
261
|
+
|
|
177
262
|
## Related
|
|
178
263
|
|
|
179
264
|
- [`auto-orchestration-activation`](auto-orchestration-activation.md) — the enable/auto/manifest gate that runs before classification.
|
|
180
265
|
- [`subagent-orchestration`](../../skills/subagent-orchestration/SKILL.md) — the modes this selects.
|
|
181
266
|
- [`autonomous-execution`](../../rules/autonomous-execution.md) — the N=3 budget any LLM-classification v2 must respect.
|
|
267
|
+
- [`orchestration-telemetry`](orchestration-telemetry.md) § Registered always-on metrics — the judgment-ladder precision metric this ladder feeds.
|
|
@@ -1,55 +1,62 @@
|
|
|
1
1
|
# Auto-Orchestration Activation
|
|
2
2
|
|
|
3
|
-
How
|
|
4
|
-
subagent dispatch at runtime. Companion to
|
|
3
|
+
How automatic subagent dispatch resolves at runtime. Companion to
|
|
5
4
|
[`subagent-configuration`](../subagent-configuration.md) (which covers the
|
|
6
5
|
model / parallelism keys) and
|
|
7
6
|
[`host-capability-manifest`](host-capability-manifest.md) (which decides
|
|
8
7
|
whether dispatch is physically possible on the host).
|
|
9
8
|
|
|
9
|
+
Always-on orchestration (road-to-always-on-orchestration, Phase 1): the layer
|
|
10
|
+
carries no per-run on/off setting. `subagents.enabled`, `subagents.auto`, and
|
|
11
|
+
`subagents.host_capabilities` were removed from `.agent-settings.yml` — a
|
|
12
|
+
fresh install with an empty settings file activates on any capable host.
|
|
13
|
+
Activation now reads only two facts: whether the emergency incident switch is
|
|
14
|
+
set, and what the host can physically do.
|
|
15
|
+
|
|
10
16
|
## Settings
|
|
11
17
|
|
|
12
18
|
| Key | Default | Purpose |
|
|
13
19
|
|---|---|---|
|
|
14
|
-
| `subagents.enabled` | `true` | Global master switch. `false` = the whole layer is off — the canonical kill-switch. No auto-dispatch, no routing, everything runs in-session. |
|
|
15
|
-
| `subagents.auto` | `on` | Auto-dispatch mode: `off` \| `ask` \| `on`. Shipped default `on` on subagent-capable hosts (flipped from `ask` 2026-07-09, ADR-117), `off` elsewhere. |
|
|
16
20
|
| `subagents.downshift` | `true` | Route delegable sub-tasks to the lowest-capable tier (Phase 2). |
|
|
17
21
|
| `subagents.quota_arbitrage` | `true` | Prefer a separate-quota-pool model where the host manifest allows it (Phase 2 bonus). |
|
|
18
22
|
| `subagents.model_map` | `{}` | Optional per-tier model override for downshift routing. |
|
|
19
|
-
| `
|
|
23
|
+
| `emergency.orchestration_halt` | `false` | The ONE audited incident switch — see [`settings-classes.md`](../../../../docs/contracts/settings-classes.md) § "The one exception". NOT an activation gate: on-by-default, ceremony-free to arm, requires a non-empty `orchestration_halt_justification` to disarm. |
|
|
20
24
|
|
|
21
25
|
## Activation decision
|
|
22
26
|
|
|
23
27
|
For any task, auto-dispatch is attempted **only when all hold**:
|
|
24
28
|
|
|
25
29
|
```
|
|
26
|
-
|
|
27
|
-
AND subagents.auto != off
|
|
30
|
+
emergency.orchestration_halt != true
|
|
28
31
|
AND host_manifest.subagent_spawn == true
|
|
29
32
|
AND the task is classified delegable (see auto-dispatch-classification.md)
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
If any condition fails → **in-session execution**, no subagent. This is the
|
|
33
|
-
safe path:
|
|
36
|
+
safe path: an unresolved host capability, an active incident halt, or an
|
|
34
37
|
unclassifiable task all degrade silently to single-agent.
|
|
35
38
|
|
|
36
|
-
##
|
|
39
|
+
## Verdict behaviour
|
|
37
40
|
|
|
38
|
-
|
|
|
39
|
-
|
|
40
|
-
| `
|
|
41
|
-
| `ask`
|
|
42
|
-
|
|
|
41
|
+
| Task shape | Verdict |
|
|
42
|
+
|---|---|
|
|
43
|
+
| A matched delegable signal | `dispatch` — surface the chosen mode + per-subtask tiers in one line, never silent |
|
|
44
|
+
| No enumerated signal (ambiguous) | `ask` — a verdict to the user, never a speculative spawn |
|
|
45
|
+
| Below the size floor, halted, or no host primitive | in-session |
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
There is no more `off`/`ask`/`on` MODE setting driving this table — the row a
|
|
48
|
+
task lands on is a property of the task and the host, not a configuration
|
|
49
|
+
choice.
|
|
46
50
|
|
|
47
51
|
## Resolution order
|
|
48
52
|
|
|
49
|
-
1.
|
|
53
|
+
1. Resolve the emergency halt from settings once per run; cache for the run,
|
|
50
54
|
mirroring [`subagent-configuration § When settings change`](../subagent-configuration.md).
|
|
51
|
-
2. Resolve the host-capability manifest once (cached)
|
|
52
|
-
|
|
55
|
+
2. Resolve the host-capability manifest once (cached) via
|
|
56
|
+
`probeHostCapabilities` — the committed registry row merged with
|
|
57
|
+
observable environment facts. Per
|
|
58
|
+
[`host-capability-manifest`](host-capability-manifest.md), a settings
|
|
59
|
+
override no longer participates in production resolution.
|
|
53
60
|
3. Apply the activation decision above per task.
|
|
54
61
|
|
|
55
62
|
## Safety floors are never lifted
|
|
@@ -57,8 +64,9 @@ per-subtask tiers are surfaced before/at dispatch — never silent.
|
|
|
57
64
|
Auto-dispatch never bypasses a floor. The cross-model judge Iron Law
|
|
58
65
|
(`subagent-orchestration`), `verify-before-complete`, the N=3 autonomous
|
|
59
66
|
budget, `scope-control`, and `non-destructive-by-default` all apply to
|
|
60
|
-
auto-delegated work exactly as they do to in-session work.
|
|
61
|
-
disables the layer
|
|
67
|
+
auto-delegated work exactly as they do to in-session work.
|
|
68
|
+
`emergency.orchestration_halt: true` disables the layer for the duration of an
|
|
69
|
+
incident; it never disables a floor.
|
|
62
70
|
|
|
63
71
|
## Related
|
|
64
72
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Host-Capability Manifest
|
|
2
2
|
|
|
3
|
-
Resolved once per session
|
|
4
|
-
cached for the rest of the session. Tells the orchestration
|
|
5
|
-
subagent primitives the current host actually exposes, so
|
|
6
|
-
attempts a primitive the host cannot run.
|
|
3
|
+
Resolved once per session (via `probeHostCapabilities`, not a long-running
|
|
4
|
+
process) and cached for the rest of the session. Tells the orchestration
|
|
5
|
+
layer which subagent primitives the current host actually exposes, so
|
|
6
|
+
auto-dispatch never attempts a primitive the host cannot run.
|
|
7
7
|
|
|
8
8
|
## Schema
|
|
9
9
|
|
|
@@ -15,19 +15,30 @@ A single JSON object, `schema_version: 1`:
|
|
|
15
15
|
"subagent_spawn": false,
|
|
16
16
|
"parallel_spawn": false,
|
|
17
17
|
"status_polling": false,
|
|
18
|
-
"separate_quota_pool": false
|
|
18
|
+
"separate_quota_pool": false,
|
|
19
|
+
"agent_teams": false
|
|
19
20
|
}
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
## Resolution
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
`probeHostCapabilities(hostId)` (`src/scripts/_lib/host_capability.ts`) fills
|
|
26
|
+
the manifest from OBSERVABLE FACTS ONLY — capability is a fact about the
|
|
27
|
+
host, never a configuration decision (always-on orchestration, Phase 1):
|
|
25
28
|
|
|
26
|
-
1. The
|
|
27
|
-
subagent primitives.
|
|
28
|
-
2.
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
1. The committed `HOST_CAPABILITY_REGISTRY` row for the detected host — the
|
|
30
|
+
agent's own knowledge of documented subagent primitives.
|
|
31
|
+
2. A live environment probe merged on top: `agent_teams` resolves `true`
|
|
32
|
+
when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` is set in the process
|
|
33
|
+
environment — the one host fact this repo can observe about Claude
|
|
34
|
+
Code's experimental multi-instance Agent Teams feature.
|
|
35
|
+
3. `SAFE_DEFAULT` (all `false`) for an unrecognized host or an unset probe.
|
|
36
|
+
|
|
37
|
+
`resolveHostCapabilities(hostId, override?)` still accepts an optional
|
|
38
|
+
whole-object override for tests and back-compat callers, but no production
|
|
39
|
+
caller passes a settings-derived override into it any more — the former
|
|
40
|
+
`subagents.host_capabilities` settings key was removed. A leftover key in a
|
|
41
|
+
consumer's `.agent-settings.yml` is ignored.
|
|
31
42
|
|
|
32
43
|
The manifest is resolved once and cached — the agent does not re-resolve it
|
|
33
44
|
mid-session.
|
|
@@ -40,10 +51,9 @@ AN UNKNOWN HOST IS ASSUMED TO HAVE NO SUBAGENT PRIMITIVE.
|
|
|
40
51
|
A MISSING OR INVALID FIELD IS false, NEVER true.
|
|
41
52
|
```
|
|
42
53
|
|
|
43
|
-
This is a hard rule. When the host is unrecognized, or a
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
unsupported primitive.
|
|
54
|
+
This is a hard rule. When the host is unrecognized, or a probed fact is
|
|
55
|
+
absent, the field resolves to `false`. The orchestration layer then degrades
|
|
56
|
+
to in-session execution rather than attempting an unsupported primitive.
|
|
47
57
|
|
|
48
58
|
## Fields
|
|
49
59
|
|
|
@@ -53,6 +63,7 @@ unsupported primitive.
|
|
|
53
63
|
| `parallel_spawn` | bool | Concurrent dispatch of multiple subagents. `false` → delegation is serial, one subagent at a time. |
|
|
54
64
|
| `status_polling` | bool | Monitoring running subagents (progress / completion checks). `false` → fire-and-collect only, no mid-run polling. |
|
|
55
65
|
| `separate_quota_pool` | bool | Quota-arbitrage bonus (Phase 2) — subagents draw from a distinct quota pool than the session. `false` → assume shared quota. |
|
|
66
|
+
| `agent_teams` | bool | Claude Code's experimental multi-instance Agent Teams primitive (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`). `false` → the [judgment ladder](auto-dispatch-classification.md#judgment-ladder-phase-2--road-to-always-on-orchestration)'s rung 3 (team) degrades to parallel subagents, recorded as `degraded_from: 3`. |
|
|
56
67
|
|
|
57
68
|
A field being `true` is a **precondition**, not a mandate: `parallel_spawn:
|
|
58
69
|
true` permits concurrency but the dispatch cap still applies (see
|
|
@@ -150,9 +150,16 @@ conformant audit-log-v1 line from the counts you already have:
|
|
|
150
150
|
[--first-pass-success true|false] [--escalated true|false]
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
A capture **hook** is the
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
A capture **hook** is now the primary path where the host has a
|
|
154
|
+
`post_tool_use` slot: the 2026-08-07 transcript backfill measured that
|
|
155
|
+
SYNCHRONOUS dispatch results DO carry `resolvedModel` / `totalTokens` /
|
|
156
|
+
`usage` — the 2026-06-30 "payload carries no usage" premise held only for
|
|
157
|
+
async dispatches, which stay metrics-absent. The `orchestration-record`
|
|
158
|
+
concern (`src/scripts/hooks/orchestration_record_hook.ts`, registered in
|
|
159
|
+
`hook_manifest.yaml`) emits the line deterministically on every Agent/Task
|
|
160
|
+
completion; measured model-carried capture before it existed was 1 of 370
|
|
161
|
+
dispatches (0.27 %). The CLI above stays for hosts without the slot and for
|
|
162
|
+
orchestrator-side records the hook cannot see. Reader:
|
|
156
163
|
`src/scripts/orchestration_savings_report.ts`.
|
|
157
164
|
|
|
158
165
|
**`token_delta` sourcing priority:**
|
|
@@ -209,6 +216,24 @@ condition outright. No consumer of `payload_hash` or `cache_hit` may wire a
|
|
|
209
216
|
measure→adjust step off them — no default flip, no tier change, no dispatch
|
|
210
217
|
throttle. They are read-only diagnostic fields.
|
|
211
218
|
|
|
219
|
+
## Registered always-on metrics and kill criteria (pre-registered 2026-08-09)
|
|
220
|
+
|
|
221
|
+
The always-on orchestration doctrine fixes "the stack is always available"
|
|
222
|
+
and moves falsifiability into its TRIGGERS. Registered before any behaviour
|
|
223
|
+
data existed, so later readings cannot be fitted to a desired outcome:
|
|
224
|
+
|
|
225
|
+
| Metric | Source | Kill/tighten criterion (per layer, applied by evidence-bearing PR, never a settings flag) |
|
|
226
|
+
|---|---|---|
|
|
227
|
+
| Dispatch rate per delegable verdict | `orchestration_record` vs nudge/ladder verdict lines | A layer whose verdicts are measurably ignored gets its trigger set tightened or the injected line removed |
|
|
228
|
+
| Judgment-ladder precision (verdict vs what the session did) | ladder verdict telemetry joined with dispatch/team records | A rung below registered precision at review gets its signal set tightened; a rung nobody hits gets removed |
|
|
229
|
+
| Council fire rate + unactioned-verdict rate | pass artifacts + handoff adoption | Unactioned-verdict rate is the kill criterion for any auto-fire trigger |
|
|
230
|
+
| Per-session quota burn per provider | transport/attendance records | Sustained quota exhaustion tightens `cli_call_budget` defaults, never re-introduces an activation gate |
|
|
231
|
+
| Metered-fallback spend | billing-classified transport records | Target trends to ~0 on CLI hosts; a rising trend is a transport-resolution defect to fix, not a reason to disable |
|
|
232
|
+
|
|
233
|
+
Review discipline: each criterion is evaluated against an accumulation
|
|
234
|
+
window (the gated blockers name their own windows); a reading below the bar
|
|
235
|
+
removes or tightens THE TRIGGER, and the removal PR cites the numbers.
|
|
236
|
+
|
|
212
237
|
## Related
|
|
213
238
|
|
|
214
239
|
- [`audit-log-v1`](../../../../docs/contracts/audit-log-v1.md) — the frozen
|
|
@@ -41,6 +41,60 @@ refs-not-bodies floor as `evidence_refs`. Validator:
|
|
|
41
41
|
`worker_budget.validateWorkerPartialResult` — the orchestrator never adopts an
|
|
42
42
|
invalid partial return.
|
|
43
43
|
|
|
44
|
+
## Stated assumptions — `assumptions[]`
|
|
45
|
+
|
|
46
|
+
Both the result body above and the CHECKPOINT capsule below may carry:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{ "statement": "<one line>", "basis": "<ref token>", "epistemic_state": "verified | assumed | gap" }
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The vocabulary is the **Evidence-Report buckets** from
|
|
53
|
+
[`evidence-discipline`](evidence-discipline.md#evidence-report--the-discovery-output)
|
|
54
|
+
— pinned once, in `subagent_capsule.EPISTEMIC_STATES`, and deliberately not a
|
|
55
|
+
private scale: a capsule that graded its premises differently from the rest of
|
|
56
|
+
the suite would fork the vocabulary every other surface reasons in.
|
|
57
|
+
|
|
58
|
+
Absent `assumptions[]` means **not recorded** — never "no assumptions were
|
|
59
|
+
made". Unstated premises are the first thing compression drops, which is
|
|
60
|
+
exactly why the field exists on the handoff surface.
|
|
61
|
+
|
|
62
|
+
## CHECKPOINT capsule — the generation handoff
|
|
63
|
+
|
|
64
|
+
`CHECKPOINT` is the fifth envelope status. A worker that reaches its budget
|
|
65
|
+
**watermark** (below the stop-loss line, so it still has the headroom to
|
|
66
|
+
summarise itself) returns a capsule instead of running on to be killed:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"status": "CHECKPOINT",
|
|
71
|
+
"summary": "<one or two sentences>",
|
|
72
|
+
"generation": 1,
|
|
73
|
+
"done": ["file:line | id | path"],
|
|
74
|
+
"remaining": ["<one short line each>"],
|
|
75
|
+
"decisions": ["<choices the successor must not silently re-open>"],
|
|
76
|
+
"open_risks": ["<still open at handoff>"],
|
|
77
|
+
"touched_files": ["path | file:line"],
|
|
78
|
+
"assumptions": [{ "statement": "", "basis": "", "epistemic_state": "verified" }]
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Transcript-exclusion by construction.** Every field is a ref token, a single
|
|
83
|
+
short line, or a count; array entries are capped so a transcript cannot be
|
|
84
|
+
reached by accumulation either. There is no field a raw transcript fits in —
|
|
85
|
+
and that is load-bearing, not stylistic: the claim under test is whether a
|
|
86
|
+
successor can work from the *capsule*, which is unmeasurable the moment raw
|
|
87
|
+
context can ride along. Validator:
|
|
88
|
+
[`subagent_capsule.validateCapsule`](../../../../src/scripts/_lib/subagent_capsule.ts);
|
|
89
|
+
the orchestrator never briefs a successor from an invalid capsule.
|
|
90
|
+
|
|
91
|
+
**Status today: additive and off.** Nothing reads a capsule. Emission is
|
|
92
|
+
shadow-only (the worker still runs to stop-loss exactly as before) and the
|
|
93
|
+
synthesis duties below have no `CHECKPOINT` branch, so the measurement is not
|
|
94
|
+
confounded by the mechanism it is measuring. The recycling loop that consumes a
|
|
95
|
+
capsule is gated behind `blocker: host-worker-respawn` and
|
|
96
|
+
`blocker: capsule-quality-near-budget`.
|
|
97
|
+
|
|
44
98
|
## Orchestrator synthesis duties
|
|
45
99
|
|
|
46
100
|
```
|
|
@@ -36,24 +36,26 @@ THE SAME MINUS THE QUOTA WIN.
|
|
|
36
36
|
the tier/model choice is unchanged. This is the only place the
|
|
37
37
|
"Sonnet-has-its-own-allowance" idea lives, and it lives as a runtime-detected
|
|
38
38
|
flag, never as portable prose.
|
|
39
|
-
4. **Budget routing** (
|
|
39
|
+
4. **Budget routing** (design:
|
|
40
40
|
[`budget-routing` contract](../../../../docs/contracts/budget-routing.md)) →
|
|
41
|
-
AFTER the tier resolves per 1–3,
|
|
42
|
-
|
|
41
|
+
AFTER the tier resolves per 1–3, the budget relation via `pickTier`
|
|
42
|
+
(`src/scripts/_lib/tier_budget_routing.ts`) would apply: cheapest
|
|
43
43
|
classifier-adequate tier WITH available budget; that tier exhausted or
|
|
44
44
|
cooling → next tier up with budget; all unavailable → session model +
|
|
45
45
|
surfaced one-line notice. Work is never blocked to save money. Before
|
|
46
46
|
the dispatch is created, acquire the atomic reserve
|
|
47
47
|
(`acquireBudgetPermit`; check state via `node src/scripts/cost/budget.mjs
|
|
48
48
|
tier <t>`); a 429/quota error trips `tripCooldown` for that tier and
|
|
49
|
-
falls back per the relation — never a retry loop.
|
|
50
|
-
`budget_routing
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
falls back per the relation — never a retry loop.
|
|
50
|
+
`subagents.budget_routing` was removed as a settings key (always-on
|
|
51
|
+
orchestration, road-to-always-on-orchestration Phase 1: no per-layer
|
|
52
|
+
on/off switch survives) — `pickTier` has NO production caller today, so
|
|
53
|
+
this point documents the DESIGNED relation, not a currently wired one;
|
|
54
|
+
wiring it is a later phase of that roadmap (council-side
|
|
55
|
+
`cli_call_budget`/`cost_budget` are the caps that replace the settings
|
|
56
|
+
gate). Every budget-routed dispatch, once wired, would emit one
|
|
57
|
+
`orchestration_record` line (tier + provenance-tagged token delta) so
|
|
58
|
+
realized savings are measured, not asserted.
|
|
57
59
|
|
|
58
60
|
**Cache trade-off (road-to-cache-economy Phase 4).** A tier downshift changes
|
|
59
61
|
the sub-task's model, and the prompt cache is keyed by `(model, prefix)` — so
|
|
@@ -64,6 +64,31 @@ ADR-109 response contract — it replaces nothing. Live evidence
|
|
|
64
64
|
(2026-07-28): four lookup-class workers burned 280–327k tokens each on tasks
|
|
65
65
|
a deterministic primitive answers for <1k.
|
|
66
66
|
|
|
67
|
+
### Capsule watermark — the line below the kill line
|
|
68
|
+
|
|
69
|
+
The budget now carries **two** lines. `capsule_watermark` sits at
|
|
70
|
+
`CAPSULE_WATERMARK_FRACTION` (0.8) of `max_tokens_per_worker` and is **derived**
|
|
71
|
+
from it in `composeSpawnBrief`, never set independently — a watermark that could
|
|
72
|
+
drift away from the budget it sits under is a watermark nobody can reason about.
|
|
73
|
+
Reaching it means: emit a `CHECKPOINT` capsule
|
|
74
|
+
([response contract](subagent-response-contract.md#checkpoint-capsule--the-generation-handoff))
|
|
75
|
+
**while there is still headroom to write one**. A worker at 100 % of its budget
|
|
76
|
+
cannot summarise itself; that headroom is the entire mechanism.
|
|
77
|
+
|
|
78
|
+
`evaluateWorkerBudget` reports the band between the two lines as
|
|
79
|
+
`watermark_hit` — the only window in which a capsule can be written at all.
|
|
80
|
+
|
|
81
|
+
**Shadow only, today.** The worker still runs on to the stop-loss and still
|
|
82
|
+
returns the `BLOCKED` partial result exactly as before; the capsule is recorded,
|
|
83
|
+
never acted on. Behaviour is unchanged on purpose, so the Phase-1 measurement is
|
|
84
|
+
not confounded by the mechanism it is measuring. A second candidate trigger —
|
|
85
|
+
novelty-per-step saturation
|
|
86
|
+
([`capsule_trigger.ts`](../../../../src/scripts/_lib/capsule_trigger.ts),
|
|
87
|
+
term-frequency, no embeddings) — is logged alongside it, and the paired
|
|
88
|
+
comparison is pre-registered as `worker-capsule-trigger-arm` in
|
|
89
|
+
[`docs/CLAIMS.md`](../../../../docs/CLAIMS.md) with both arms losing as an
|
|
90
|
+
explicitly publishable outcome.
|
|
91
|
+
|
|
67
92
|
## Bundle resolver — bind to the existing surfaces
|
|
68
93
|
|
|
69
94
|
The brief is **resolved**, not hand-built. `resolveBundle(slice)` maps a task
|
|
@@ -144,11 +144,14 @@ dashboards alone look fine while quality regresses.
|
|
|
144
144
|
## Kill-switch
|
|
145
145
|
|
|
146
146
|
```
|
|
147
|
-
|
|
147
|
+
emergency.orchestration_halt: true
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
A single, no-deploy settings flip fully disables the layer (`isLayerDisabled()`)
|
|
151
|
-
|
|
150
|
+
A single, no-deploy settings flip fully disables the layer (`isLayerDisabled()`)
|
|
151
|
+
for the duration of an incident — the one audited switch that survives
|
|
152
|
+
always-on orchestration (road-to-always-on-orchestration Phase 1;
|
|
153
|
+
`docs/contracts/settings-classes.md` § "The one exception"). Disarming it
|
|
154
|
+
requires a non-empty `emergency.orchestration_halt_justification`.
|
|
152
155
|
|
|
153
156
|
## Reference implementation
|
|
154
157
|
|
|
@@ -23,7 +23,10 @@ obligation_frequency: "per-task"
|
|
|
23
23
|
|
|
24
24
|
**Iron Law.** After a `/implement-ticket` or `/work` phase-step, emit one
|
|
25
25
|
`telemetry:record` call with consulted + applied ids when telemetry is
|
|
26
|
-
enabled. Default-off; opt-in via `.agent-settings.yml
|
|
26
|
+
enabled. Default-off; opt-in via `.agent-settings.yml` — which is the **project
|
|
27
|
+
layer of a cascade that starts user-global**, so never read a value or its
|
|
28
|
+
absence from that file alone; `agent-config settings:get <key>` reports the
|
|
29
|
+
value and the file it actually came from. Zero overhead when
|
|
27
30
|
disabled. Recording contract + privacy floor:
|
|
28
31
|
[`contexts/contracts/artifact-engagement-flow.md`](../contexts/contracts/artifact-engagement-flow.md).
|
|
29
32
|
|
|
@@ -67,7 +67,7 @@ ALLOWLIST > 20 ENTRIES IN ONE SESSION = THE LINTER IS WRONG.
|
|
|
67
67
|
STOP. PROPOSE LINTER REDESIGN OR REMOVAL. DO NOT EXPAND THE ALLOWLIST FURTHER.
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
Crossing 20 entries counts as the 3rd validation-target failure — fix the tool shape, not the list. Enforced at tool-call time by the `block-config-weakening` PreToolUse guard (`src/scripts/hooks/block_config_weakening.ts`): it counts allowlist entries added per session, warns from 5, and blocks past 20. Baselines and budget thresholds warn only — a rising count there may be a legitimate ratchet reset, which the edit alone cannot distinguish. Verify with the narrowest tool that proves the target green (a single `curl` / Playwright spec for HTTP/UI, the test runner with a `--filter`, an `xdebug` step-through) — never a meta-pipeline as per-iteration probe. Failed-attempt detail, suppression-sweep equivalents, probe-efficiency detail, and adaptive effort & stop (RDP): [`autonomy-mechanics § Validation-loop budget`](../contexts/execution/autonomy-mechanics.md).
|
|
70
|
+
Crossing 20 entries counts as the 3rd validation-target failure — fix the tool shape, not the list. Enforced at tool-call time by the `block-config-weakening` PreToolUse guard (`src/scripts/hooks/block_config_weakening.ts`) **on the three hosts that have a `pre_tool_use` slot at all** — augment, claude, cowork: it counts allowlist entries added per session, warns from 5, and blocks past 20. On cursor, cline, windsurf, gemini and copilot the guard has nowhere to bind, so there the cap is model-carried and "enforced at tool-call time" is not a claim this rule can make. Run `agent-config hooks:status` to see which slots are bound on the host you are actually on — the sibling rules `git-history-discipline` and `evaluator-independence` qualify the identical slot, and an unqualified claim here would read as a guarantee the manifest does not give. Baselines and budget thresholds warn only — a rising count there may be a legitimate ratchet reset, which the edit alone cannot distinguish. Verify with the narrowest tool that proves the target green (a single `curl` / Playwright spec for HTTP/UI, the test runner with a `--filter`, an `xdebug` step-through) — never a meta-pipeline as per-iteration probe. Failed-attempt detail, suppression-sweep equivalents, probe-efficiency detail, and adaptive effort & stop (RDP): [`autonomy-mechanics § Validation-loop budget`](../contexts/execution/autonomy-mechanics.md).
|
|
71
71
|
|
|
72
72
|
Body migrated to `contexts/execution/autonomy-mechanics.md` (per P4 of `road-to-kernel-and-router.md`) — opt-in detection summary, task-scope shapes table, N=3 mechanics, allowlist-antipattern detail, probe efficiency, adaptive effort (RDP).
|
|
73
73
|
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|