pantheon-opencode 1.6.1 → 1.6.2-beta.10

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 (169) hide show
  1. package/AGENTS.global.md +11 -11
  2. package/AGENTS.md +2 -2
  3. package/CHANGELOG.md +179 -0
  4. package/README.md +268 -20
  5. package/README.pt-BR.md +34 -11
  6. package/bin/pantheon-init.mjs +301 -32
  7. package/package.json +13 -4
  8. package/plugin.json +1 -1
  9. package/prompts/README.md +58 -0
  10. package/prompts/debug-issue.prompt.md +46 -0
  11. package/prompts/dynamic/agora-generated.txt +38 -0
  12. package/prompts/dynamic/orchestrate-generated.txt +51 -0
  13. package/prompts/focus.prompt.md +42 -0
  14. package/prompts/implement-feature.prompt.md +39 -0
  15. package/prompts/optimize-database.prompt.md +58 -0
  16. package/prompts/orchestrate-with-zeus.prompt.md +441 -0
  17. package/prompts/plan-architecture.prompt.md +59 -0
  18. package/prompts/quick-discovery-large-codebase.prompt.md +294 -0
  19. package/prompts/quick-plan-large-feature.prompt.md +197 -0
  20. package/prompts/semantic-summarize.md +50 -0
  21. package/prompts/sketch.prompt.md +91 -0
  22. package/prompts/subtask.prompt.md +131 -0
  23. package/pyproject.toml +1 -1
  24. package/scripts/build-agents-md.mjs +1 -1
  25. package/scripts/decision-router-budget.mjs +780 -0
  26. package/scripts/decision-router-v2-budget.mjs +218 -0
  27. package/scripts/decision-router-v2-egress.mjs +272 -0
  28. package/scripts/decision-router.mjs +758 -0
  29. package/scripts/docs-check-changelog.mjs +5 -3
  30. package/scripts/doctor.mjs +213 -45
  31. package/scripts/install/agents-md.mjs +2 -1
  32. package/scripts/install/component-selection.mjs +9 -4
  33. package/scripts/install/config-migration.mjs +344 -393
  34. package/scripts/install/config-paths.mjs +15 -0
  35. package/scripts/install/decision-layer-preview.mjs +376 -0
  36. package/scripts/install/decision-router-config.mjs +560 -0
  37. package/scripts/install/health-check.mjs +20 -11
  38. package/scripts/install/interactive.mjs +103 -14
  39. package/scripts/install/interrupt.mjs +4 -3
  40. package/scripts/install/mcp-permissions.mjs +164 -0
  41. package/scripts/install/migrate.mjs +123 -72
  42. package/scripts/install/opencode-version.mjs +31 -13
  43. package/scripts/install/opencode-wildcard.mjs +106 -0
  44. package/scripts/install/opencode.mjs +411 -184
  45. package/scripts/install/plan-artifact.mjs +12 -1
  46. package/scripts/install/plan.mjs +8 -1
  47. package/scripts/install/plugin.mjs +18 -1
  48. package/scripts/install/state.mjs +12 -0
  49. package/scripts/install/strings.mjs +22 -0
  50. package/scripts/install/v2-capabilities.mjs +5 -6
  51. package/scripts/install/venv.mjs +34 -17
  52. package/scripts/mcp_resources.py +11 -9
  53. package/scripts/package-evidence.mjs +1 -0
  54. package/scripts/release-notes.mjs +30 -7
  55. package/scripts/restore.mjs +22 -10
  56. package/scripts/sandbox-env.sh +174 -0
  57. package/scripts/setup-v2-config.mjs +1703 -0
  58. package/scripts/setup.mjs +415 -0
  59. package/scripts/sync-tui.mjs +9 -1
  60. package/scripts/test-opencode-v2-sandbox.sh +448 -157
  61. package/scripts/update-skills-lock.mjs +30 -0
  62. package/scripts/versioning.mjs +41 -5
  63. package/skills-lock.json +10 -10
  64. package/src/agents/aphrodite.md +11 -3
  65. package/src/agents/apollo.md +6 -0
  66. package/src/agents/athena.md +7 -1
  67. package/src/agents/demeter.md +6 -2
  68. package/src/agents/gaia.md +5 -0
  69. package/src/agents/hephaestus.md +7 -2
  70. package/src/agents/hermes.md +14 -13
  71. package/src/agents/iris.md +6 -2
  72. package/src/agents/mnemosyne.md +21 -50
  73. package/src/agents/nyx.md +6 -2
  74. package/src/agents/prometheus.md +5 -1
  75. package/src/agents/talos.md +10 -1
  76. package/src/agents/themis.md +5 -1
  77. package/src/agents/zeus.md +61 -65
  78. package/src/instructions/agent-return-format.instructions.md +1 -1
  79. package/src/instructions/memory-protocol.instructions.md +3 -3
  80. package/src/instructions/test-economy.instructions.md +6 -6
  81. package/src/mcp/eval_store.py +11 -4
  82. package/src/mcp/mcp_resources.py +11 -9
  83. package/src/mcp/memory_mcp.py +293 -150
  84. package/src/mcp/pantheon_vision.py +37 -36
  85. package/src/pantheon/cost-command.ts +30 -133
  86. package/src/pantheon/jev-decision-tool.ts +347 -0
  87. package/src/pantheon/jev-decisions.ts +625 -0
  88. package/src/pantheon/local-decision-agents.ts +170 -0
  89. package/src/pantheon/local-decision-budget.ts +1046 -0
  90. package/src/pantheon/local-decision-egress-gate.ts +144 -0
  91. package/src/pantheon/local-decision-prompt.ts +256 -0
  92. package/src/pantheon/local-decision-provider-matrix.ts +44 -0
  93. package/src/pantheon/local-decision-router.ts +225 -0
  94. package/src/pantheon/local-decision-skills.ts +281 -0
  95. package/src/pantheon/local-decision-tool.ts +160 -0
  96. package/src/pantheon/local-decision-turn.ts +101 -0
  97. package/src/pantheon/local-decision-usage-evidence.internal.ts +168 -0
  98. package/src/pantheon/local-orchestration.ts +322 -0
  99. package/src/pantheon/model-pricing.ts +1 -536
  100. package/src/pantheon/pantheon-decision-catalog.ts +101 -0
  101. package/src/pantheon/v2-decision-budget.ts +456 -0
  102. package/src/pantheon/v2-decision-contracts.ts +300 -0
  103. package/src/pantheon/v2-decision-egress.ts +203 -0
  104. package/src/pantheon/v2-decision-events.ts +180 -0
  105. package/src/pantheon/v2-decision-heuristic.ts +121 -0
  106. package/src/pantheon/v2-decision-points/p1-agent.ts +91 -0
  107. package/src/pantheon/v2-decision-points/p10-claims.ts +243 -0
  108. package/src/pantheon/v2-decision-points/p11-catalog.ts +220 -0
  109. package/src/pantheon/v2-decision-points/p2-skill.ts +83 -0
  110. package/src/pantheon/v2-decision-points/p3-complexity.ts +108 -0
  111. package/src/pantheon/v2-decision-points/p4-memory.ts +137 -0
  112. package/src/pantheon/v2-decision-points/p5-themis-verify.ts +190 -0
  113. package/src/pantheon/v2-decision-points/p6-council.ts +161 -0
  114. package/src/pantheon/v2-decision-points/p7-loop.ts +263 -0
  115. package/src/pantheon/v2-decision-points/p8-guardrail.ts +367 -0
  116. package/src/pantheon/v2-decision-points/p9-memory-compaction.ts +304 -0
  117. package/src/pantheon/v2-decision-points.ts +242 -0
  118. package/src/pantheon/v2-decision-policy.ts +166 -0
  119. package/src/pantheon/v2-decision-premises.ts +146 -0
  120. package/src/pantheon/v2-decision-prompt-surface.ts +115 -0
  121. package/src/pantheon/v2-decision-rank.ts +91 -0
  122. package/src/pantheon/v2-decision-registry.ts +391 -0
  123. package/src/pantheon/v2-decision-resource-ids.ts +127 -0
  124. package/src/pantheon/v2-decision-shadow.ts +123 -0
  125. package/src/pantheon/v2-decision-telemetry.ts +214 -0
  126. package/src/pantheon/v2-decision-verify.ts +51 -0
  127. package/src/pantheon/v2-hook-engine.ts +307 -0
  128. package/src/pantheon/v2-native-decisions.ts +365 -0
  129. package/src/pantheon/v2-shell-hooks.ts +66 -2
  130. package/src/pantheon/v2-tools.ts +38 -15
  131. package/src/pantheon/v2-vision.ts +34 -29
  132. package/src/pantheon/vision.ts +43 -10
  133. package/src/plugin-v2.ts +449 -79
  134. package/src/plugin.ts +4 -0
  135. package/src/plugins/tui/THIRD_PARTY_NOTICES.md +24 -0
  136. package/src/plugins/tui/dist/server-v2.d.ts +22 -0
  137. package/src/plugins/tui/dist/server-v2.d.ts.map +1 -0
  138. package/src/plugins/tui/dist/server-v2.js +26 -0
  139. package/src/plugins/tui/dist/server-v2.js.map +1 -0
  140. package/src/plugins/tui/dist/tui-v2.d.ts +54 -51
  141. package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -1
  142. package/src/plugins/tui/dist/tui-v2.js +762 -529
  143. package/src/plugins/tui/dist/tui-v2.js.map +1 -1
  144. package/src/plugins/tui/dist/tui.js +1 -1
  145. package/src/plugins/tui/index-v2.ts +3 -6
  146. package/src/plugins/tui/package-lock.json +17 -2
  147. package/src/plugins/tui/package.json +6 -3
  148. package/src/plugins/tui/src/context-gauge.ts +59 -0
  149. package/src/plugins/tui/src/cost-data.ts +607 -0
  150. package/src/plugins/tui/src/index-v2.tsx +360 -242
  151. package/src/plugins/tui/src/model-pricing.ts +536 -0
  152. package/src/plugins/tui/src/model-usage-limits.ts +4 -0
  153. package/src/plugins/tui/src/server-v2.ts +21 -0
  154. package/src/plugins/tui/src/sidebar-width.ts +129 -0
  155. package/src/plugins/tui/tsconfig.typecheck.json +1 -1
  156. package/src/plugins/tui/tsdown.config.ts +34 -5
  157. package/src/routing.yml +72 -13
  158. package/src/skills/README.md +4 -0
  159. package/src/skills/agent-coordination/SKILL.md +0 -3
  160. package/src/skills/artifact-management/SKILL.md +0 -3
  161. package/src/skills/auto-continue/SKILL.md +0 -3
  162. package/src/skills/code-review-checklist/SKILL.md +0 -3
  163. package/src/skills/context-compression/SKILL.md +0 -3
  164. package/src/skills/memory-bank/SKILL.md +6 -28
  165. package/src/skills/session-goal/SKILL.md +0 -3
  166. package/src/skills/simplify/SKILL.md +5 -4
  167. package/src/skills/tdd-with-agents/SKILL.md +0 -3
  168. package/src/skills/visual-review-pipeline/SKILL.md +0 -1
  169. package/src/pantheon/memory-context.ts +0 -1017
package/AGENTS.global.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
2
2
  <!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
3
3
  <!-- Source of truth: src/instructions/*.instructions.md + the static sections in this script. -->
4
- <!-- pantheon:agents-md v2 artifact=global generated-at=2026-10-22T13:57:53-03:00 sha=ceade5f -->
4
+ <!-- pantheon:agents-md v2 artifact=global generated-at=2026-10-27T08:34:01-03:00 sha=0a6a8e2 -->
5
5
 
6
6
  # Pantheon Agent System — OpenCode
7
7
 
@@ -32,7 +32,7 @@ Shared rules from `src/instructions/*.instructions.md`, identical for OpenCode V
32
32
  <!-- Source: src/instructions/agent-return-format.instructions.md -->
33
33
  ## Agent Return Format
34
34
 
35
- Implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) MUST return results to Zeus in this format:
35
+ All agents check each result against the request and evidence; remove unrelated work, generic filler, unsupported claims, and unnecessary complexity; state uncertainty and preserve safety constraints. Implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) MUST return results to Zeus in this format:
36
36
 
37
37
  ## subtask_summary
38
38
  **files_changed:** [list of file paths, one per line]
@@ -76,21 +76,21 @@ Required: position, reasoning, trade_offs, risks, confidence. Optional `agreemen
76
76
  - Use a targeted query (`top_k=2`) and ignore weak matches; missing or irrelevant results never block current work.
77
77
 
78
78
  ### Persistence
79
- - Use only tools granted in the active session: Zeus has `memory_search` and temporary `context_save`/`context_get` checkpoints but no durable writes; Mnemosyne has `memory_store` and other durable tools.
80
- - Store at most one concise, reusable top-level result; never persist routine child summaries, phase updates, test logs, or temporary state. Confirm a successful write before claiming persistence. Never store secrets, credentials, or tokens; `memory_store` does not guarantee redaction, so omit or redact sensitive content first.
81
- - If no write tool is available or the write did not succeed, say the information was not persisted; never imply automatic storage or recovery. Add ADRs to the memory bank only when explicitly requested.
79
+ - Use only granted tools: Zeus has `memory_search` and temporary `context_save/get` checkpoints, but no durable writes; Mnemosyne has `memory_store` and other durable tools.
80
+ - Let native OpenCode compaction summarize active context. Use `context_save/get` only for cross-session resume; keep the goal, phase, progress, next step, decisions, blockers, and uncertain outcomes — no transcripts or routine logs.
81
+ - Store at most one concise, reusable top-level result only on explicit request. Never persist child summaries, test logs, or temporary state. Never store secrets, credentials, or tokens; confirm writes and state failures. Create ADRs only on request.
82
82
 
83
83
  <!-- Source: src/instructions/test-economy.instructions.md -->
84
84
  ## Test Economy
85
85
 
86
86
 
87
- Write the smallest test that proves the behavior: one behavior → one focused test; never duplicate coverage across suites or files.
87
+ Write one focused test per behavior; do not duplicate coverage.
88
88
 
89
- - No E2E, full-install, or network-dependent tests unless the change alters that end-to-end path; prefer unit or integration tests.
90
- - No assertions on copy/format strings, and none that only restate the implementation ("test the test").
91
- - Heavy or slow suites (real install/E2E) MUST be opt-in via a separate tier, never per edit or phase; respect a per-phase time budget and reserve the full suites for release gates.
92
- - Fixing a bug: one targeted regression test, not a broad new suite.
93
- - This economy rule does NOT weaken stronger gates: auth, security, data-integrity, and required coverage thresholds stay mandatory.
89
+ - Prefer unit/integration checks; use E2E, install, or network tests only when a change affects that path.
90
+ - Avoid assertions on copy/formatting or tests that merely restate the implementation.
91
+ - Default to focused tests; run the full suite only for scope, risk, or CI/release gates. Bug fixes need one regression test unless existing coverage catches them.
92
+ - Keep slow install/E2E suites opt-in, never per edit or phase; reserve them for release gates.
93
+ - Test economy does NOT weaken stronger gates: auth, security, data-integrity, and required coverage.
94
94
 
95
95
  <!-- Source: src/instructions/yagni.instructions.md -->
96
96
  ## YAGNI Anti-overengineering
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
2
2
  <!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
3
3
  <!-- Source of truth: project sections in scripts/build-agents-md.mjs. -->
4
- <!-- pantheon:agents-md v2 artifact=project generated-at=2026-10-22T13:57:53-03:00 sha=ceade5f -->
4
+ <!-- pantheon:agents-md v2 artifact=project generated-at=2026-10-27T08:34:01-03:00 sha=0a6a8e2 -->
5
5
 
6
6
  # Pantheon — Repository Setup
7
7
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  Setup: [INSTALLATION.md](docs/INSTALLATION.md).
11
11
 
12
- - Build/Test: `npm test`
12
+ - Test: focused checks by default; `npm test` for CI/release or broad/high-risk changes
13
13
  - Lint: `npm run lint`
14
14
 
15
15
  ## Teste de Instalação Global (sandbox)
package/CHANGELOG.md CHANGED
@@ -10,6 +10,185 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
10
10
  <!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
11
11
  move this section to a versioned entry and reset the template below. -->
12
12
 
13
+ ## [v1.6.2-beta.10] - 2026-11-03
14
+
15
+ ### Added
16
+
17
+ - **routing** — Jev refusals carry the sanitized error CLASS in a `detail` field (`TypeError`, `RangeError`, …): enough to tell a detached-call failure from a host-side data failure, while the message (which can carry paths or provider detail) never reaches the chat.
18
+
19
+ ### Changed
20
+
21
+ - **tui** — The native quota surface is removed: the `/quota` panel, the sidebar quota block, usage history, the go-key diagnostics, and the `pantheon.quota` RPC no longer ship. The recommended community plugin [`@slkiser/opencode-quota`](https://github.com/slkiser/opencode-quota) covers provider quota and usage (OpenCode 2.0.26+; an `npx` installer path exists for 1.x hosts) — see [Quota & usage](docs/tui-v2-quota-providers.md). `pantheon_cost` and the sidebar `Context` block are unaffected.
22
+ - **routing** — The visible `&lt;!-- pantheon-decision-router:v1 … --&gt;` marker is no longer appended to the prompt: the host chat rendered the HTML comment to the user. The router keeps running (shadow observation, telemetry, budget, presets); measured evidence showed every prompt mutation was a no-op (F-24, F-08/F-09), so no behavioral routing is lost.
23
+ - **agents** — Zeus's decision-routing instructions no longer reference the removed `/quota-go-check` command.
24
+
25
+ ### Fixed
26
+
27
+ - **routing** — The native Jev runtime now invokes host methods with their owning domain as receiver. `model.list()` was called detached from the host object and threw on real sessions, surfacing only as `CATALOG_UNAVAILABLE`; the canary always exercised the bound call and never caught it. `decisions()` and `skill.list()` are bound the same way, with a contract test that fails on any detached call.
28
+
29
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
30
+ move this section to a versioned entry and reset the template below. --&gt;
31
+ ## [v1.6.2-beta.9] - 2026-11-02
32
+
33
+ ### Added
34
+
35
+ - **install** — `init --decision-model typesafe-jev/jev-1.14.0` merges the TypeSafe provider entry additively into the user's `opencode.json`; only the sign-in remains.
36
+
37
+ ### Changed
38
+
39
+ - **agents** — Every agent frontmatter declares terminal permissions under `shell:` — the action a measured 2.2.5 host actually evaluates (canary-recorded evidence: a `shell` deny is enforced while `bash` falls through unruled).
40
+ - **agents** — Deny intents keep a `bash:` twin; the former `bash:`-only keys never matched, which made specialists' terminal grants inconsistent.
41
+ - **agents** — Zeus must never ask the user to type terminal commands: terminal work dispatches to a bash-capable specialist.
42
+ - **install** — `--opencode-version v1` is refused with a deprecation message front-running the 2.0 removal of the legacy plugin line.
43
+ - **docs** — New [Skill provenance search](docs/reference/skill-search-design.md) investigation (three tiers, Jev as typed ranker; deliberately unwired).
44
+ - **docs** — Measured MCP numbers in [Performance](docs/reference/performance.md) (fastmcp startup, FTS5 memory, vision deps).
45
+
46
+ ### Added
47
+
48
+ - **install** — The wizard's decision-model question now configures the real route (consent + caps + period in one write): Console Jev, the free variant, or TypeSafe direct.
49
+ - **install** — Choosing TypeSafe direct merges the `providers.typesafe-ai` entry additively into the user's opencode.json; only the sign-in remains.
50
+ - **install** — Legacy metadata spellings degrade to skip with a hint; direct OpenAI has no native Decisions route.
51
+ - **install** — The capability notice prints only under `--verbose`.
52
+
53
+ ### Changed
54
+
55
+ - **performance** — The in-process secret scan is gated to exfil-capable tools (shell, file writes, web); read-only tools skip it, unknown names stay scanned (fail-closed).
56
+ - **agents** — Zeus must never ask the user to type terminal commands: terminal work dispatches to a bash-capable specialist.
57
+
58
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
59
+ move this section to a versioned entry and reset the template below. --&gt;
60
+ ## [v1.6.2-beta.8] - 2026-11-02
61
+
62
+ ### Added
63
+
64
+ - **install** — Added `init --decision-model <provider>/<model> --decision-monthly-usd N --decision-per-decision-usd N` to activate the Jev decision route during installation (the same chain as `decision-router setup-model`; `--decision-no-consent` refuses consent), and the post-install next steps now include the optional decision-model path in English and Portuguese.
65
+
66
+ ### Changed
67
+
68
+ - **performance** — The per-tool-call secret scan and the per-dispatch delegation audit now run in-process (`v2-hook-engine.ts`): same patterns, masked trail, exit-code contract, fail-closed classifier, and `delegations.log` artifacts — without the former one `bash` child per tool call and two more per delegation (each also spawning `python3`). Post-write formatting spawns only when the tool call touched a formattable file.
69
+ - **agents** — Specialist prompts carry two-tier verification (small bounded fix → change plus one targeted proof; material change → full discipline), replacing the unconditional TDD mandate in Hermes; Aphrodite and Talos gained the same tier note.
70
+ - **docs** — New Performance and tuning reference (measured hook costs, prompt budget, decision latency, context-growth knob) and an INSTALLATION section for the Jev decision-model flow.
71
+
72
+ ## [v1.6.2-beta.7] - 2026-11-02
73
+
74
+ ### Added
75
+
76
+ - **install** — Added `decision-router setup-model <provider>/<model> --monthly-usd N --per-decision-usd N`: one command performs selection, enablement, egress consent, user/provider/model caps, and budget-period confirmation, then prints the verification checklist (`--no-consent` configures everything except consent).
77
+ - **install** — Added `decision-router doctor`: read-only diagnosis of the whole native decision route (config, consent, selection, budget admission, unresolved holds, best-effort host-catalog probe) printing the exact command to run for each failing gate.
78
+
79
+ ### Changed
80
+
81
+ - **agents** — Modernized the Zeus system prompt: pruned stale release-history sections, kept the operational guards, and granted `pantheon_jev_decide` in the agent permission frontmatter so new installs get the advisory tool without manual config edits.
82
+ - **docs** — Documented ready-to-copy decision-provider examples (TypeSafe direct, OpenRouter-hosted Jev) with the catalog caveat that the flat `opencode models` list can omit decision-typed models.
83
+ - **agents** — Zeus routing policy now prefers one typed `pantheon_jev_decide` call for genuinely ambiguous routing and skill stacking, with `pantheon_local_decision` as the offline fallback.
84
+ - **docs** — Documented the skill-discovery loop (find, review, install, decide) and mapped the candidate MCP-gating expansions as deliberately unwired.
85
+
86
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
87
+ move this section to a versioned entry and reset the template below. --&gt;
88
+ ## [v1.6.2-beta.6] - 2026-11-01
89
+
90
+ ### Added
91
+
92
+ - **routing** — Added the Zeus-only `pantheon_jev_decide` advisory tool: 1–4 typed questions (choice, score, predicate) answered by the Jev decision model through the host's native Decisions API; it registers only on hosts exposing that API and never dispatches agents, runs skills, or changes permissions.
93
+ - **routing** — Added native route selection from the user-level decision-router config (OpenCode Console `jev-1.13` and custom `typesafe-ai` decision models) with a frozen provider→host mapping; direct OpenAI is refused and never substituted.
94
+ - **routing** — Added host-reported settlement: the budget reservation reconciles from the host-reported DecisionResult cost (a reported zero releases the hold), and a failed or unreconciled call stays fail-closed.
95
+ - **routing** — Added catalog presets to `pantheon_jev_decide`: `mode: "skills"` stacks the locally prefiltered skill shortlist (whole-catalog fallback) and `mode: "delegation"` picks a specialist, both single typed calls with `none` always offered.
96
+ - **routing** — Extended the `skills` preset to decide over installed host skills (`ctx.skill.list()`) in addition to the Pantheon catalog: any Agent-Skills-format skill installed in the host becomes stackable without a Pantheon change. Installs stay manual and reviewed; Pantheon never installs or updates skills.
97
+ - **docs** — Documented the native gate chain, routes, and verification boundary in one reference (`docs/reference/native-decisions.md`) and indexed the decision-layer references in the docs nav; added a real-host canary assertion for the new tool's registration.
98
+
99
+ ### Changed
100
+
101
+ - **security** — Removed the direct-fetch decision-provider path entirely (runner, payload protocol, fetch-path usage verifier, per-turn provider cache): Pantheon owns no transport, and the only egress is the host's native layer behind the enabled/consent/budget/permission chain. The per-turn prompt hook stays local-only.
102
+ - **security** — The budget ledger now treats a host-reported zero cost as a real zero (releasing the hold) while still freezing user/provider/model buckets when actual cost exceeds the reservation.
103
+ - **docs** — Consolidated the decision-status narrative to one source of truth per surface, corrected stale env-var rows (no decision credential is read on any production path), and removed an orphan planning note (the tracked deepwork note stays: it is the checkout fixture the resources server resolves against).
104
+
105
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
106
+ move this section to a versioned entry and reset the template below. --&gt;
107
+ ## [v1.6.2-beta.5] - 2026-11-01
108
+
109
+ ## 🆕 What's New
110
+ - **routing** — wire decision points to their declared host surfaces in shadow (#304)
111
+ - **routing** — add V2 decision layer with measured-shape adapters (#303)
112
+
113
+ ## 🐞 Fixed
114
+ - **mcp** — harden memory and resource MCP reliability (#306)
115
+ ## [v1.6.2-beta.4] - 2026-10-31
116
+
117
+ ### Added
118
+
119
+ - **install** — Added a user-level `decision-router` admin CLI for enablement, selection, consent, per-user/provider/model caps, and period confirmation; config is private and non-secret.
120
+ - **install** — Added `decision-router holds` to list unresolved reservations without reserving, reconciling, releasing, or pruning.
121
+ - **docs** — Added an offline protocol for separately evaluating agent routing and task complexity; no benchmark results or provider selection are claimed.
122
+ - **routing** — Added a default-off, local-only recommendation API for exact canonical agent roles and structured complexity dimensions; it does not dispatch agents or change gates.
123
+ - **routing** — Added a private V2 per-turn selector: allowlisted skills, at most one specialist, one call per session/message, and deterministic local fallback.
124
+ - **routing** — Added a private fixed-endpoint adapter for `gpt-6-luna` and `jev-1.14.0` with no caller-supplied transport, retry, or fan-out; Console/Free and Bifrost stay ineligible.
125
+ - **routing** — Provider contract tests run under the real `tsx` runner (`npm run test:ts`) for the exact payload, gate denials, usage reconciliation, and one call per turn; no live call was made.
126
+ - **routing** — Added a user-level `enabled` switch, canonical provider/model matrix, and a single ledger mapping; provider egress also requires the host `permission.assert` gate.
127
+ - **routing** — Added a user-scoped SQLite ledger with explicit UTC reservations and no default caps. Admission caps are local safeguards, not invoice guarantees.
128
+ - **docs** — `decision-router status`/`holds` are read paths: `status` may create the SQLite ledger, and both may migrate it, but neither reserves, reconciles, releases, or prunes.
129
+ - **docs** — The `local-decision-router` subpath is TypeScript source needing the host runtime or a transpiler; the published CLI uses the committed ESM bundle.
130
+
131
+ ### Changed
132
+
133
+ - **security** — Decision egress is fail-closed: a missing gate, cap, period, or credential means zero requests; V1 stays local-only.
134
+ - **release** — `prepack` now runs the `check:decision-router` drift gate, so a stale ledger bundle cannot be packed or published.
135
+
136
+ ### Fixed
137
+
138
+ - **install** — `decision-router caps user` without flags now reports `Both --monthly-usd and --per-decision-usd are required` as a one-line usage error instead of a stack trace.
139
+ - **routing** — `permission.assert` denial (thrown or returned, including the host's `Permission denied: decision.egress` message) means zero requests; an explicit `deny` rule is the kill-switch.
140
+ - **routing** — Egress trusts the user-level config; `permission.assert` is only the host kill-switch. A v2.2.0 canary showed an unruled assertion resolves allow and `evaluate` runs only on that path.
141
+ - **routing** — A cached provider decision re-reads the user-level config/consent gate before reuse, so revoking consent takes effect without waiting for cache expiry.
142
+ - **security** — The prompt hook reuses one decision per turn and never logs or persists the raw request; payloads stay allowlisted.
143
+ - **security** — Credential rejection now requires a token boundary and structured `sk-` prefixes, so prose such as `task-force-*` or `disk-usage-*` is no longer treated as a key.
144
+ - **routing** — Reusing a cached provider decision does not re-prompt the same permission gate; a different or missing gate is still evaluated and denies fail-closed.
145
+ - **docs** — Clarified that `decision-router holds` performs no reservation, reconciliation, release, or pruning, while opening an existing ledger may apply a forward-only schema migration.
146
+
147
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
148
+ move this section to a versioned entry and reset the template below. --&gt;
149
+ ## [v1.6.2-beta.3] - 2026-10-29
150
+
151
+ ### Changed
152
+
153
+ - **install** — Direct `init` uses matching TTY/headless component defaults; Python runtime and prompt templates are opt-in, and `--yes` suppresses prompts without skipping preview or drift checks.
154
+ - **install** — Runtime health checks verify SQLite FTS5 capability and fail when it is unavailable.
155
+
156
+ ### Fixed
157
+
158
+ - **install** — Explicit restore decline exits successfully; missing authorization fails closed, while cancellation exits `130`. Post-write interrupts and runtime failures record the selected target and partial/degraded state.
159
+ - **install** — Migration schema version is tracked separately from the installed package version and remains idempotent across prerelease package versions.
160
+
161
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
162
+ move this section to a versioned entry and reset the template below. --&gt;
163
+ ## [v1.6.2-beta.2] - 2026-10-28
164
+
165
+ ### Added
166
+
167
+ - **TUI** — `/quota` adds recorded usage history for 7, 15, 30 days, and Total, with daily and per-model token summaries plus a clearly non-billable catalog estimate.
168
+ - **quota** — OpenCode Go usage uses the canonical endpoint and falls back to the configured API key when its Console OAuth request fails.
169
+
170
+ ### Fixed
171
+
172
+ - **quota** — Future-dated usage rows are excluded from rolling windows and Total.
173
+
174
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
175
+ move this section to a versioned entry and reset the template below. --&gt;
176
+ ## [v1.6.2-beta.1] - 2026-10-27
177
+
178
+ ### Changed
179
+
180
+ - **agents** — V2 compiles declared skills into per-agent allowlists; metadata, routing, and installed skills are checked for drift.
181
+ - **memory** — Recall stays an explicit `memory_search` MCP call, session checkpoints are reserved for cross-session handoff, and native OpenCode compaction owns active-history summarization.
182
+ - **prompts** — Manual prompt templates use named `{{UPPER_SNAKE_CASE}}` inputs; slash commands keep OpenCode's native `$ARGUMENTS` expansion.
183
+ - **install** — V2 MCP entries use the native `disabled` field and migrate legacy `enabled` values.
184
+ - **install** — Existing native V2 permission arrays remain authoritative; legacy defaults are seeded only when no V2 array exists.
185
+
186
+ ### Removed
187
+
188
+ - **plugin** — Removed ambient V2 memory injection and its debug environment variable; the legacy `memory_injection` option is ignored if preserved in an existing config.
189
+
190
+ &lt;!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
191
+ move this section to a versioned entry and reset the template below. --&gt;
13
192
  ## [v1.6.1] - 2026-10-24
14
193
 
15
194
  ### Added
package/README.md CHANGED
@@ -28,10 +28,10 @@ charge of every decision and every merge.
28
28
  collaborators.
29
29
  - **You stay in charge:** Pantheon supports your judgment; it does not replace
30
30
  it.
31
- - **Right-sized coordination:** bounded work goes to one specialist; planning,
32
- discovery, parallel work, and review are added when scope and risk call for
33
- them. `/pantheon-deepwork` remains the checkpointed workflow for heavy
34
- multi-phase work.
31
+ - **Right-sized coordination:** bounded work goes to one specialist, who
32
+ gathers the needed context. Planning, separate discovery, parallel work, and
33
+ review are added when scope and risk call for them. `/pantheon-deepwork`
34
+ remains the checkpointed workflow for heavy multi-phase work.
35
35
 
36
36
  ## Start in 2 minutes
37
37
 
@@ -46,6 +46,30 @@ npx pantheon-opencode init
46
46
  opencode
47
47
  ```
48
48
 
49
+ Direct `init` uses the same component defaults in TTY and headless runs:
50
+ `agents`, `skills`, `instructions`, `commands`, and `plugins`. `runtime` and
51
+ `prompts` are opt-in. A TTY run selects components and target, shows a preview,
52
+ then asks once for final authorization (default **no**). Without a TTY, `init`
53
+ is preview-only unless `--yes` explicitly authorizes the apply; `--yes` skips
54
+ prompts but still prints the preview and checks for drift.
55
+
56
+ `npm run setup` is a separate repository setup wrapper. On detected OpenCode V2
57
+ it reviews the global config before installer init: legacy permission rules can
58
+ be migrated after explicit review. Config migration and installer changes are
59
+ preflighted before one final authorization; `--yes` alone does not authorize
60
+ setup writes, and headless/CI setup remains preview-only. Direct
61
+ `npx pantheon-opencode init` does not run that V2 config-migration review. See
62
+ the [installation guide](docs/INSTALLATION.md) for layer handling, conflict
63
+ choices, backups, and recovery.
64
+ Existing native V2 `permissions` arrays remain authoritative. Unsafe MCP
65
+ wildcard policies and ineffective `ask` rules require explicit resolution;
66
+ third-party flat MCP entries in `opencode.jsonc` must be converted to
67
+ `mcp.servers` or removed before V2 setup.
68
+
69
+ Global `init` and `setup` use `$XDG_CONFIG_HOME/opencode` when
70
+ `XDG_CONFIG_HOME` is absolute; otherwise they use `~/.config/opencode`.
71
+ Relative `XDG_CONFIG_HOME` values are rejected before writes.
72
+
49
73
  Then describe the outcome you want:
50
74
 
51
75
  ```text
@@ -73,8 +97,36 @@ see [Quick Start](docs/QUICKSTART.md).
73
97
  and documenting work.
74
98
  - **5 local MCP servers** for project memory, persistence, resources, confined
75
99
  script execution, and vision.
100
+ - **A selective, advisory decision router** with structured local results and
101
+ deterministic per-turn skill/specialist recommendations when enabled.
102
+ Pantheon-owned direct-provider egress is inactive; native egress exists only
103
+ via the explicit, Zeus-only `pantheon_jev_decide` advisory tool, which calls
104
+ the host's native Decisions API (TypeSafe Jev via OpenCode Console or a
105
+ configured decision model) behind the user's consent and budget gates — it
106
+ never dispatches agents, runs skills, or changes permissions. This does not
107
+ change the separately documented Vision integration. See the
108
+ [router reference](docs/reference/local-decision-router.md) and the
109
+ [Native Decisions (Jev)](docs/reference/native-decisions.md).
76
110
  - **An optional TUI** with a dispatch sidebar block and a full-width
77
- `/dispatch` panel.
111
+ `/dispatch` panel. The V2 sidebar keeps the Pantheon version, the active
112
+ preset/source, git state, and a `Context` block (tokens, a percent gauge,
113
+ `$<spent> spent`, and a muted `cache <n>% · <n.n> tok/s` line); the native
114
+ prompt footer keeps its own line, and Pantheon only appends
115
+ `▸<preset> · ✦<n> ativos` while delegations are running. The installer
116
+ selects the `plugins` component by default; in interactive setup you can
117
+ change the component selection. A component-scoped install includes the TUI
118
+ only when `plugins` is selected. The TUI ships no quota panel: for provider
119
+ quota and usage inside OpenCode, install the recommended community plugin
120
+ [`@slkiser/opencode-quota`](https://github.com/slkiser/opencode-quota) — see
121
+ [Quota & usage](docs/tui-v2-quota-providers.md). `pantheon_cost` and
122
+ `pantheon_model` keep working unchanged.
123
+
124
+ Vision requests to OpenCode Zen require a valid active session and are rejected
125
+ before image fetching or model-catalog lookup when the session is missing or
126
+ invalid. The Python vision MCP keeps its local metadata/OCR fallback when no
127
+ gateway credential is configured. In the V2 plugin, an explicit Vision model
128
+ pin that is unavailable or ineligible returns an actionable error rather than
129
+ silently switching models; remove the pin to use automatic model discovery.
78
130
 
79
131
  Memory is used selectively: the coordinator searches once only when project
80
132
  history could affect a task, then passes relevant results to specialists. Store
@@ -90,12 +142,11 @@ contract and targets OpenCode 2 only.
90
142
  The support policy, the known-broken exception, and the verified-version
91
143
  evidence have exactly one home: [Compatibility](docs/COMPATIBILITY.md).
92
144
 
93
- ### V2 plugin options (opt-in features)
145
+ ### V2 plugin options
94
146
 
95
147
  The OpenCode V2 host hands a plugin its `options` only from the object form of
96
- the entry, and two features — per-request context pruning and ambient memory
97
- injection — read exactly that bag. `init` therefore writes the object form, so
98
- enabling them is one edit away and nothing is on by default:
148
+ the entry. `init` writes that form for the optional per-request context pruner;
149
+ memory retrieval stays an explicit `memory_search` MCP call.
99
150
 
100
151
  ```json
101
152
  {
@@ -103,30 +154,28 @@ enabling them is one edit away and nothing is on by default:
103
154
  {
104
155
  "package": "/path/to/pantheon-opencode/src/plugin-v2",
105
156
  "options": {
106
- "context_pruner": { "enabled": true },
107
- "memory_injection": { "enabled": true }
157
+ "context_pruner": { "enabled": true }
108
158
  }
109
159
  }
110
160
  ]
111
161
  }
112
162
  ```
113
163
 
114
- Keep the `package` value `init` wrote and add keys inside `options`; any key you
115
- add by hand survives a re-run. Both features are off unless `enabled` is
164
+ Keep the `package` value `init` wrote and add keys inside `options`; custom
165
+ options survive a re-run. The context pruner is off unless `enabled` is
116
166
  literally `true`.
117
167
 
118
168
  | Option | Default | Effect |
119
169
  |---|---|---|
120
170
  | `options.context_pruner.enabled` | `false` | Prune old turns from the request payload and at compaction. Off by default because per-request pruning invalidates the provider prompt cache. |
121
- | `options.memory_injection.enabled` | `false` | Ride the most relevant memory entries along on the session's first request, bounded by `maxEntries`/`maxChars`. |
122
171
 
123
172
  `context_pruner` also accepts `keepTurns`, `purgeAfterTurns`, `protectedTools`,
124
- `minSavingsTokens` and `charsPerToken`; `memory_injection` accepts `maxEntries`,
125
- `maxChars` and `namespace`. Unknown keys are ignored with a one-time warning in
126
- the hook log, so a typo cannot silently change behaviour. Run
173
+ `minSavingsTokens` and `charsPerToken`. Unknown keys are ignored with a
174
+ one-time warning in the hook log, so a typo cannot silently change behaviour. Run
127
175
  `npx pantheon-opencode doctor` to see whether the installed entry can receive
128
- options at all. Full rules: [OpenCode V2](docs/opencode-v2.md) and
129
- [Memory](docs/MEMORY.md).
176
+ options at all. An old `memory_injection` option may remain in an existing
177
+ config because user options are preserved, but the plugin no longer reads it.
178
+ Full rules: [OpenCode V2](docs/opencode-v2.md) and [Memory](docs/MEMORY.md).
130
179
 
131
180
  ## Delegation
132
181
 
@@ -149,6 +198,185 @@ fan-in or job recovery without an exposed mechanism.
149
198
  The delegation model, caller/target matrix, and approval gates are documented
150
199
  in [Architecture](docs/ARCHITECTURE.md) and
151
200
  [Permissions, Gates & Delegation](docs/PERMISSIONS-QUALITY-DELEGATION.md).
201
+ The [local decision router](docs/reference/local-decision-router.md) provides a
202
+ default-off standalone local API (`PANTHEON_LOCAL_DECISION_ROUTER=1`), the
203
+ separate manual `pantheon_local_decision` advisory tool, and deterministic
204
+ per-turn local recommendations when the user-level `enabled` preference is on.
205
+ The prompt hook may add an advisory marker and narrow an existing `prompt.skills`
206
+ array only when identifiable skill IDs overlap the local selection; this never
207
+ dispatches child sessions or changes permissions or approvals. Per-turn selection
208
+ uses no provider egress: the formerly documented direct-provider route remains
209
+ historical/inactive, and legacy consent, caps, period, provider selection, or
210
+ credentials cannot activate it. Native child-session dispatch remains separate.
211
+
212
+ The one native egress surface is the Zeus-only `pantheon_jev_decide` tool,
213
+ available on hosts that expose the V2.2.5 native Decisions API; its full gate
214
+ chain, routes, and settlement rules are documented once in
215
+ [V2 native Decisions](docs/reference/native-decisions.md).
216
+
217
+ The installer may retain a legacy target-specific preference; it does not control
218
+ runtime routing. `npx pantheon-opencode decision-router ...` manages stored
219
+ user-level preferences and budget state: `enabled` gates the local per-turn
220
+ recommendation only; provider-selection and budget/consent state do not activate
221
+ egress. The separate SQLite ledger has no default caps. Installation does not
222
+ contact a model provider or inspect credentials. The published CLI imports
223
+ committed ESM bundles:
224
+ `npm run build:decision-router` regenerates them and `npm run check:decision-router`
225
+ (the `prepack`/`prepublishOnly` drift gate) fails when any is stale. The
226
+ `pantheon-opencode/local-decision-router` subpath itself is TypeScript source, so
227
+ it loads only in the host runtime or under a transpiler such as `tsx`.
228
+
229
+ Decision-layer commands are separated by effect. `decision-router help`,
230
+ `status`, `preview` and `holds` are read-only: they never create, migrate, or
231
+ write the config or the SQLite ledger, and neither does `setup` without
232
+ `--apply`. `select` records a preference and can never enable anything — moving
233
+ the target also revokes consent recorded for the previous one. `setup` prints a
234
+ **computed diff of the target artifacts** (snapshot + SHA-256 per file, compared
235
+ against the exact bytes the writer would produce); `setup --apply` is the form
236
+ that writes, and a second run reports `0 create · 0 update`. It is deliberately
237
+ not the installer's "Change plan", which announced 112 creates for an apply that
238
+ created nothing. `setup --target <dir>` also reconciles the
239
+ `.pantheon/install-state.json` provider/consent record with the user-level config;
240
+ that record is derived from the config and never asserts consent the config lacks.
241
+ Neither path creates a backup: installer backup sets accumulate once per
242
+ application and contain credential-bearing material (API keys/tokens), so no
243
+ extra copy is made. Installer file-ownership tracking is partial and asymmetric —
244
+ `file_inventory` indexes 53 PROJECT artifacts and no GLOBAL ones (F-15); the
245
+ 106-project / 107-global denominators are derived from the 213-artifact total and
246
+ are not separately indexed — so this preview compares the decision-layer
247
+ artifacts it owns, not "everything the installer touched".
248
+
249
+ The old OpenAI/TypeSafe per-turn provider adapters and endpoint descriptions are
250
+ retained as historical, inert code; no legacy consent, cap, period, provider, or
251
+ permission setting wires them into the production prompt hook. The captured-hook
252
+ boundary test supplies an isolated synthetic consent/provider config and fake
253
+ test-only credential, verifies a local recommendation marker, and verifies zero
254
+ native Decisions or global `fetch` calls. This is an offline regression check of
255
+ that hook, not a claim about unexercised network paths or a live-provider test.
256
+ Measured surface coverage is
257
+ reported honestly rather than implied: P7 runs behind `PANTHEON_V2_P7_LOOP` with
258
+ an **advisory** execution cap (never described as enforcement), P2 is
259
+ **advisory-only** (an empirical no-op on the default path), P9 was measured on
260
+ top-level **and child** sessions with `reason:"overflow"` still unmeasured, and
261
+ P8 is **advisory: not activatable by measurement** — its declared rules match no
262
+ delivered permission payload, so it narrows nothing (PROBE-F).
263
+
264
+ ### The V2 decision layer is declared in full and wired in part
265
+
266
+ The V2 decision layer declares eleven integration points (P1–P11) over three
267
+ decision primitives — `ask`, `rank`, and `verify` — and a deterministic policy
268
+ that decides which point may run. **Seven of the eleven have a production call
269
+ site: two behind flags that are off by default, five in shadow.**
270
+
271
+ - **P7 (loop)** is wired to `session.execution.succeeded` behind
272
+ `PANTHEON_V2_P7_LOOP`, which is off. It writes each observation to an
273
+ in-memory, bounded telemetry collector that the plugin never reads back and
274
+ exposes only to tests, so "records" here does not mean an operator-visible log.
275
+ - **P8 (guardrail)** is wired to `permission.evaluate` behind
276
+ `PANTHEON_V2_P8_GUARDRAIL`, which is off. C8 is closed **by measurement**, and
277
+ the measurement is negative: PROBE-F delivered 24 real `permission.evaluate`
278
+ events and every declared rule matched none of them (a valid `action` token and
279
+ a top-level `sessionID` are always present), the host resolves an unrecognised
280
+ effect as `ask` and proceeds, and `permission.evaluate.egress` is unreachable
281
+ (a tool declaring it is never advertised to the provider). As declared, P8 does
282
+ not narrow. The flag stays off.
283
+ - **P1 and P2** are registered on `session.hook('prompt')` in **shadow**. They
284
+ observe the same admission payload through a projection that carries only
285
+ `prompt.agents` and `prompt.skills`: no text, no file bytes, no metadata, no
286
+ mutation, no throw. Every record says `effect: none` and goes to an in-memory,
287
+ bounded collector the plugin never reads back (test-visible only).
288
+ - **P3** is wired at its declared `tool.invoke` in **shadow**: the
289
+ `pantheon_local_decision` tool hands the adapter its own input, whose schema
290
+ requires `complexity` and `gateStatus`. It records a classification when the
291
+ tool is invoked — never a permanent `complexity.invalid` refusal from a payload
292
+ that cannot carry the vector — and applies nothing.
293
+ - **P9** is wired at its declared `session.hook('compaction')` in **shadow**, on
294
+ the carrier that was actually measured: the top-level `sessionID` and the
295
+ `system` part array. It records the decision key and the payload shape and
296
+ pushes nothing — the injected compaction context is unchanged — and a payload
297
+ whose only session id is a nested `session.id` (a field the 2.2.5 host never
298
+ sends) produces no decision at all. The same shape was measured in a **child**
299
+ session (PROBE-G: hook fires 3/3, child `sessionID` at top level, `system` an
300
+ array of 4), so no child-specific branch exists. `reason:"overflow"` was not
301
+ inducible and is not designed for. No measured surface carries the memory
302
+ candidate list it would retain or discard, so its record states that absence
303
+ rather than a retention or a priority.
304
+ - **P11** is wired inside `ctx.tool.transform` in **shadow**: it reads the draft
305
+ the host hands that callback and calls none of its mutators. Shadow has no
306
+ responder, so it records the validated `choice` question over the draft ids —
307
+ never a selection.
308
+
309
+ **The other four — P4, P5, P6 and P10 — are library code with no production call
310
+ site.** Nothing constructs or registers them outside the per-point test suites —
311
+ the offline harness imports no adapter module. P6 and P10 declared the prompt
312
+ hook, but that payload never carries council candidates or counsellor claims, so
313
+ they stay unwired instead of recording a refusal from a surface that cannot feed
314
+ them. P4 ranks a memory candidate array and the measured `context` payload
315
+ carries `system` text parts, not candidates; P5 verifies a declared
316
+ `{ requirements, responses }` pair and the `execute.after` event carries
317
+ neither. On a host they do not read the turn, record no telemetry and have no
318
+ switch to turn off, because nothing registers them.
319
+
320
+ "Shadow" therefore means no behavioural change, not a claim of effect: the five
321
+ shadow points read a narrow slice of their surface and decide nothing from it,
322
+ and the two flag-gated points are off. No activation flag is set in a default
323
+ install.
324
+
325
+ The CLI separates effects: `npx pantheon-opencode decision-router help`, `status`,
326
+ `preview` and `holds` never write, `setup` writes only under `--apply`, `preview`
327
+ is an alias of `setup`, and `select` records a preference without enabling
328
+ anything. Egress stays opt-in and off, and only the explicit `enable`, `consent`,
329
+ `caps` and `period` actions can change that; no read-only command can.
330
+
331
+ What the layer does **not** do today, stated as measured rather than implied:
332
+
333
+ - **P2 (skills) is advisory-only and does not filter.** It is an empirical no-op
334
+ on the default path, because the host sends `prompt.skills` absent. Effective
335
+ project-skill filtering was cancelled by measurement, not emulated, and no
336
+ token reduction is claimed.
337
+ - **P7 (loop) is behind `PANTHEON_V2_P7_LOOP`, off by default, and does not
338
+ enforce loop limits.** It counts executions and writes an `effect: none`
339
+ observation to an in-memory collector that nothing reads back. Its
340
+ 12-execution cap is **advisory**: no measured host surface signals a new user
341
+ turn, so nothing is claimed to reset the streak.
342
+ - **P9 (compaction) is measured in top-level and child sessions.** PROBE-G fired
343
+ the hook in a real child 3/3 with the child's `sessionID` at top level and the
344
+ same payload shape. `reason: "overflow"` was **not inducible** in 6 error
345
+ shapes — the host retried and completed, and the one failure-recovery
346
+ compaction was persisted as `reason:"auto"` — so that path stays unmeasured;
347
+ the checkpoint reinjection inside a child was not exercised, and the `messages`
348
+ channel remains UNKNOWN. The memory candidate list is not available on any
349
+ measured surface, so the wired P9 record names that absence and claims no
350
+ retention or priority.
351
+ - **P8 (guardrail) is not activatable by measurement.** PROBE-F delivered 24 real
352
+ `permission.evaluate` events: the payload is
353
+ `["sessionID","agent","action","resources","metadata","source","effect"]` with
354
+ `effect` an own writable data property pre-populated by the host, and a written
355
+ `deny` **is** honoured. But neither declared rule can match a delivered payload
356
+ (valid `action` token, `sessionID` always present), the host lets an
357
+ unrecognised effect resolve as `ask` and execute, and
358
+ `permission.evaluate.egress` is unreachable — so the current rule set matches
359
+ nothing and does not narrow. The point is recorded as **advisory**, not as
360
+ awaiting review, and the inertness is the measured verdict rather than a design
361
+ claim. `execute.before` remains the only hard barrier.
362
+ - **The embeddings-versus-BM25 comparison has not been run.** The environment is
363
+ offline with no embedding model available, so BM25 remains the baseline and no
364
+ gain or loss in retrieval or tokens is claimed in either direction.
365
+
366
+ Calibration that was run: the offline harness
367
+ (`npx tsx tests/pantheon/v2-decision-harness.test.ts`) executed 264 synthetic
368
+ cases — 132 normal, 66 refusal, 66 adversarial — across the eleven points, with
369
+ 24 cases per point and the suite asserting at least 20 cases, 5 refusals and 5
370
+ adversarial cases per point. All 264 cases passed on 2026-10-31. This harness is
371
+ the only place all eleven points are exercised in one run, but it imports no
372
+ adapter module: it iterates the registry and exercises the shared primitives,
373
+ while the adapters are covered by their per-point suites
374
+ (`v2-decision-p1.test.ts` … `v2-decision-p11.test.ts`). Passing it says nothing
375
+ about whether a point is registered in a host.
376
+ The harness measures contracts (admission, refusal, shadow no-op, telemetry
377
+ redaction, offline discipline, registry integrity), **not** token use, quality,
378
+ latency or any effect inside a host turn. Numbers and unmeasured surfaces are
379
+ recorded in the [router reference](docs/reference/local-decision-router.md).
152
380
 
153
381
  ## Documentation
154
382
 
@@ -160,15 +388,31 @@ in [Architecture](docs/ARCHITECTURE.md) and
160
388
  | [Compatibility](docs/COMPATIBILITY.md) | [OpenCode V2](docs/opencode-v2.md) |
161
389
  | [Agents & Skills](docs/agents/README.md) | [Platforms](docs/PLATFORMS.md) |
162
390
  | [Release Process](docs/RELEASING.md) | [Branch Protection](docs/BRANCH-PROTECTION.md) |
163
- | [Model Routing](docs/reference/model-routing.md) | [Env Vars](docs/reference/env-vars.md) · [Code Mode](docs/reference/code-mode.md) |
391
+ | [Model Routing](docs/reference/model-routing.md) | [Local Decision Router](docs/reference/local-decision-router.md) · [V2 Native Decisions](docs/reference/native-decisions.md) · [Offline Evaluation Protocol](docs/reference/offline-evaluation.md) · [Env Vars](docs/reference/env-vars.md) · [Code Mode](docs/reference/code-mode.md) |
164
392
  | [Contributing](CONTRIBUTING.md) | [Roadmap](ROADMAP.md) · [Changelog](CHANGELOG.md) |
165
393
 
394
+ Memory writes through `pantheon-memory` are serialized, and failed writes are
395
+ reported as failures rather than as stored entries. Eval resources wait for
396
+ SQLite locks and close their connections; project-specific resources resolve
397
+ the current project root per request while preserving the trusted
398
+ `PANTHEON_HOME` fallback. See [Memory](docs/MEMORY.md) for store separation and
399
+ [MCP tools](docs/mcp-tools.md) for details.
400
+
166
401
  The release install gate's tool canary loads the installed tarball's V2 plugin
167
402
  entry under OpenCode 2.0.30 and verifies `hashline_edit` registration, Code Mode
168
403
  visibility, and a bounded edit in an isolated project. It does not prove npm
169
404
  publication or compatibility with untested host versions; details are in the
170
405
  [release process](docs/RELEASING.md).
171
406
 
407
+ Generate beta release notes from commits since the latest prior beta tag with
408
+ `node scripts/versioning.mjs apply --beta --notes`. See the [release
409
+ procedure](docs/RELEASING.md) for details.
410
+ After the version bump, verify and rebuild the TUI workspace from the repository
411
+ root with `npm run typecheck --workspace=src/plugins/tui` and
412
+ `npm run build --workspace=src/plugins/tui`.
413
+ The maintainer-only `release` scope is excluded from public notes and their
414
+ Closed Issues references; see the [release-notes policy](docs/RELEASING.md#release-notes).
415
+
172
416
  ## Status
173
417
 
174
418
  The manifests in this checkout express the version being prepared, not a
@@ -189,6 +433,10 @@ welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening an issue or pull
189
433
  request. That file also defines the documentation rule: one home per fact, with
190
434
  a short list of facts that must not be duplicated.
191
435
 
436
+ For code changes, run the smallest relevant check and expand it to match the
437
+ change's risk. `npm test` is the full repository suite; see
438
+ [CONTRIBUTING.md](CONTRIBUTING.md) for when to use it.
439
+
192
440
  ## Citation and DOI
193
441
 
194
442
  Pantheon is released under the [MIT License](LICENSE). Cite the