pantheon-opencode 1.6.0-beta.10 → 1.6.0-beta.12

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 (71) hide show
  1. package/AGENTS.global.md +42 -18
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +46 -0
  4. package/README.md +122 -38
  5. package/README.pt-BR.md +5 -4
  6. package/bin/pantheon-init.mjs +322 -101
  7. package/package.json +7 -6
  8. package/plugin.json +1 -1
  9. package/pyproject.toml +1 -1
  10. package/scripts/build-agents-md.mjs +128 -10
  11. package/scripts/check-plugin-v2-coverage.mjs +7 -7
  12. package/scripts/doctor.mjs +242 -19
  13. package/scripts/install/backup.mjs +648 -0
  14. package/scripts/install/cli-ui.mjs +79 -1
  15. package/scripts/install/exit-codes.mjs +26 -0
  16. package/scripts/install/file-inventory.mjs +555 -0
  17. package/scripts/install/interactive.mjs +15 -1
  18. package/scripts/install/migrate.mjs +32 -6
  19. package/scripts/install/model-picker.mjs +63 -22
  20. package/scripts/install/opencode-version.mjs +9 -1
  21. package/scripts/install/opencode.mjs +761 -63
  22. package/scripts/install/plan-artifact.mjs +517 -0
  23. package/scripts/install/plan.mjs +449 -0
  24. package/scripts/install/plugin.mjs +136 -18
  25. package/scripts/install/shared.mjs +249 -94
  26. package/scripts/install/state.mjs +63 -8
  27. package/scripts/install/strings.mjs +20 -0
  28. package/scripts/install/venv.mjs +25 -6
  29. package/scripts/install/verify.mjs +128 -0
  30. package/scripts/install/vision-prompt.mjs +13 -1
  31. package/scripts/install-mcp.mjs +1 -1
  32. package/scripts/manifest-inventory.mjs +49 -3
  33. package/scripts/mcp_persistence.py +50 -15
  34. package/scripts/node-engine-policy.mjs +74 -0
  35. package/scripts/package-evidence.mjs +6 -0
  36. package/scripts/postinstall.mjs +3 -4
  37. package/scripts/prune.mjs +9 -3
  38. package/scripts/reconcile.mjs +325 -0
  39. package/scripts/restore.mjs +222 -0
  40. package/scripts/uninstall.mjs +258 -34
  41. package/scripts/update.mjs +164 -0
  42. package/scripts/validate-node-engine-policy.mjs +13 -0
  43. package/scripts/version-check.mjs +34 -1
  44. package/scripts/versioning.mjs +9 -1
  45. package/skills-lock.json +4 -4
  46. package/src/agents/iris.md +6 -0
  47. package/src/agents/mnemosyne.md +7 -2
  48. package/src/agents/zeus.md +19 -62
  49. package/src/instructions/agent-return-format.instructions.md +17 -15
  50. package/src/instructions/memory-protocol.instructions.md +3 -2
  51. package/src/instructions/test-economy.instructions.md +21 -0
  52. package/src/instructions/zeus-anti-stall.instructions.md +6 -6
  53. package/src/instructions/zeus-council-synthesis.instructions.md +10 -11
  54. package/src/instructions/zeus-memory-operations.instructions.md +11 -6
  55. package/src/instructions/zeus-timeout-retry.instructions.md +28 -9
  56. package/src/mcp/mcp_persistence.py +50 -15
  57. package/src/pantheon/cost-command.ts +5 -2
  58. package/src/pantheon/model-agents.ts +19 -0
  59. package/src/pantheon/model-command.ts +218 -56
  60. package/src/pantheon/v2-model-overrides.ts +275 -0
  61. package/src/pantheon/v2-tools.ts +18 -29
  62. package/src/pantheon/v2-unsupported.mjs +2 -3
  63. package/src/plugin-v2.ts +13 -0
  64. package/src/plugins/tui/dist/tui-v2.js +2 -2
  65. package/src/plugins/tui/dist/tui.js +1 -1
  66. package/src/plugins/tui/package-lock.json +3 -3
  67. package/src/plugins/tui/package.json +2 -2
  68. package/src/skills/artifact-management/SKILL.md +5 -1
  69. package/src/skills/auto-continue/SKILL.md +14 -6
  70. package/src/skills/memory-bank/SKILL.md +5 -1
  71. package/src/skills/worktrees/SKILL.md +30 -11
@@ -111,7 +111,15 @@ function analyzeConventionalCommits(since) {
111
111
  function prepareManifests(newVersion) {
112
112
  if (!SEMVER_PATTERN.test(newVersion)) throw new Error(`invalid version: ${newVersion}`)
113
113
  const inventory = validateInventory(ROOT, { allowVersionDivergence: true })
114
- return { inventory, updates: prepareInventoryVersion(inventory, newVersion) }
114
+ const releaseMetadataFiles = new Set(
115
+ inventory.documents
116
+ .filter(({ entry }) => entry.role === 'metadata')
117
+ .map(({ entry }) => entry.file),
118
+ )
119
+ const updates = prepareInventoryVersion(inventory, newVersion).filter(
120
+ ({ path }) => !releaseMetadataFiles.has(path.slice(ROOT.length + 1)),
121
+ )
122
+ return { inventory, updates }
115
123
  }
116
124
 
117
125
  /**
package/skills-lock.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "src/skills/agent-coordination/SKILL.md": "d4bd70c18bc5726ea6784fe0a9c514446ca313e4c3ba4d658a0ff6658001aece",
3
- "src/skills/artifact-management/SKILL.md": "91d68c8f2d1b642725adfc6df11e55865a8491aca690dc27d02ea7c778d49d41",
4
- "src/skills/auto-continue/SKILL.md": "79aa1786ab62332abc45986d147ee944836e6f7a496c289e793639add4211229",
3
+ "src/skills/artifact-management/SKILL.md": "24dc1ca4660246ef37c3d3a5b246b7f63e3739f0ef741ed0a2e21d9abd3e9165",
4
+ "src/skills/auto-continue/SKILL.md": "3fd4167b2e015510aec428098d27bb15854ba239c4dc7a064177d62e2353af86",
5
5
  "src/skills/clonedeps/SKILL.md": "3e0b43cf96da98c83699dc48db3fd58fbfda84b9022bb70d3747875c81c3e124",
6
6
  "src/skills/code-review-checklist/SKILL.md": "6445513ab880efdb1005861ae13cb9a215f80b9d260f6278499f60771e07858c",
7
7
  "src/skills/codemap/SKILL.md": "87af5271e1576e154cadff313eab16264b726e43d094520736b7a5b03b409a4a",
@@ -9,7 +9,7 @@
9
9
  "src/skills/git-workflow-and-versioning/SKILL.md": "685a94041f1b4ce2a430301f517b89102055696267c369a7e8fb191606659276",
10
10
  "src/skills/incremental-implementation/SKILL.md": "7065ddb45da3c6b6751de07f290e92e6cb072e949a2e3aaae13ee7762f0a70fc",
11
11
  "src/skills/loop-engineering/SKILL.md": "f804e545821b9cca8fe0ec517307ed902446f28c2ca8ff9194c0f987cf7229e3",
12
- "src/skills/memory-bank/SKILL.md": "4717cf18b43550c9f02cfab810968b97a5b2584f00a15516ecba643c80cdc110",
12
+ "src/skills/memory-bank/SKILL.md": "7fd7a65cd48f68793f60afa0d18b87692957888c7dad414213907b5e83d76395",
13
13
  "src/skills/reflect/SKILL.md": "4c7608c2a55cb8a50ac90fc0e2446bdf25e7914b1748cb7731c311d13c29dfdd",
14
14
  "src/skills/security-hardening/SKILL.md": "6d637e122421f7bc3b751f04854ad343a5a5d35249458bc8939233138fd3f20d",
15
15
  "src/skills/session-goal/SKILL.md": "3a708d15a59a6bff2dd32ff7ead6548ecccc7be8d39437fee3133ea6254b6134",
@@ -18,5 +18,5 @@
18
18
  "src/skills/tdd-with-agents/SKILL.md": "9d20607ea34fc3e02c7e3ef5186b103d84196bd9a13aaadd55a44f41339125da",
19
19
  "src/skills/verification-planning/SKILL.md": "14186446ef51e1ba2c87b337e8d5f86e566d805156ab21fba2a75f8c4a99df3f",
20
20
  "src/skills/visual-review-pipeline/SKILL.md": "f6e65ff75a9325c38e0e9dde8e87f09b873e14e490936ef48aa80201bb68fe10",
21
- "src/skills/worktrees/SKILL.md": "0033c5f8a50f210f31f0256ba8cc0fd99c65674a2aabedb05d8e69447b5ec218"
21
+ "src/skills/worktrees/SKILL.md": "9cf2b036e90d9ff7c6deb786ad7bab2cb78d6bf39166a67d5cbeafc29f593c6e"
22
22
  }
@@ -46,6 +46,12 @@ mcp_tools:
46
46
  - Always open PRs as DRAFT unless explicitly told otherwise
47
47
  - Wait for human approval before merging
48
48
  - Never delete branches without confirmation
49
+ - **Never bypass hooks.** Never pass `--no-verify`, `-n`, or any hook-skipping
50
+ equivalent to `git commit`/`git push`. The pre-commit and commit-msg hooks MUST
51
+ run: they are a fail-closed security gate, not an optional step.
52
+ - **A failing or missing hook tool is a STOP, not an obstacle.** Report the exact
53
+ hook and error to @zeus and halt; never bypass it, amend around it, or work
54
+ around it — even when the failure looks unrelated to the staged change.
49
55
 
50
56
  ## Handoffs
51
57
  - Called by @zeus after review phase
@@ -84,7 +84,7 @@ Mnemosyne executes the expanded compression pipeline. When Zeus delegates compre
84
84
  - IMPL/REVIEW artifacts to archive
85
85
  - Next phase agent info
86
86
 
87
- 2. **Scrub**: Automatic — `memory_store` MCP server applies regex scrub before persisting. No manual steps.
87
+ 2. **Privacy check**: Never store secrets, credentials, or tokens in durable memory. The current `memory_store` handler stores submitted values and metadata; automatic regex scrubbing/redaction is not guaranteed. Omit sensitive content or redact it before storing.
88
88
 
89
89
  3. **Write ZZ artifact**: Create `.pantheon/memory-bank/.tmp/ZZ-phase{N}-context.md` with:
90
90
  - From/To agent info
@@ -112,7 +112,7 @@ Mnemosyne executes the expanded compression pipeline. When Zeus delegates compre
112
112
 
113
113
  ### Write Protocol
114
114
  - Atomic write: .tmp → fsync → validate → rename
115
- - Scrubbing: automatic via MCP layer on persistence
115
+ - Secret handling: omit or manually redact secrets before durable storage; do not rely on automatic MCP scrubbing.
116
116
 
117
117
  ### Safety
118
118
  - NEVER compress ADR notes, active PLAN, NEEDS_REVISION/FAILED reviews
@@ -154,6 +154,11 @@ Use this only when the user or Zeus explicitly asks to preserve a reusable resul
154
154
 
155
155
  **Use only for an explicit request to preserve one reusable result.** Background completion, Apollo discovery, and `subtask_summary` return are not triggers for durable storage.
156
156
 
157
+ `pantheon-memory` stores durable SQLite entries with no entry TTL. Its search is
158
+ FTS5/BM25 lexical matching only, with no semantic/vector fallback. Never store
159
+ secrets, credentials, or tokens: the MCP stores submitted values and metadata
160
+ without guaranteed automatic scrubbing.
161
+
157
162
  **Command:** `@mnemosyne Store <concise reusable result>`
158
163
 
159
164
  **What it does:**
@@ -34,7 +34,7 @@ skills:
34
34
 
35
35
  Zeus never implements code, but visual references from the user are implementation context and must reach the specialist who does the work.
36
36
 
37
- - When a request includes an image or screenshot, inspect it with native image input or `vision_describe`. If neither can access it, state that limitation instead of guessing.
37
+ - When a request includes an image or screenshot, use image content already available in the conversation. Call `vision_describe` only if it appears in the active root tool list; otherwise state the limitation instead of guessing.
38
38
  - For UI work, delegate to @aphrodite and include the image reference (URL/path when available) plus a concise description of the relevant layout, elements, and requested outcome in the task prompt.
39
39
  - Tell the implementer to compare the reference with the current UI and preserve unrelated existing changes. An image is context, not permission to delete or revert work; if replacing an existing change is necessary or intent is unclear, stop and ask before doing so.
40
40
 
@@ -52,12 +52,12 @@ Zeus nunca toca no código. Use o menor fluxo que preserve segurança: encaminhe
52
52
  | Ação | Status | Como fazer |
53
53
  |------|--------|------------|
54
54
  | Editar arquivo | ❌ BLOQUEADO | Delegar para @hermes, @aphrodite, @talos |
55
- | Bash shell | ❌ BLOQUEADO | Usar task() com subagente apropriado |
55
+ | Bash shell | ❌ BLOQUEADO | Delegar via ferramenta `subagent` para o especialista apropriado |
56
56
  | Executar script | ❌ BLOQUEADO | Delegar para @prometheus |
57
57
  | Instalar dep | ❌ BLOQUEADO | Delegar para @prometheus |
58
58
  | Git commit/push | ❌ BLOQUEADO | Delegar para @iris |
59
59
  | Ler arquivo | ✅ Permitido | Via Read/Glob/Grep tools |
60
- | task() delegar | ✅ Permitido | Única ferramenta de ação de Zeus |
60
+ | `subagent` delegar | ✅ Observado no root Beta 10 | Use o schema mostrado pelo runtime; `task()` é nomenclatura da API/host, não ferramenta root presumida |
61
61
  | memory MCP | ✅ Permitido | memory_search |
62
62
  | persistence MCP | ✅ Checkpoints | context_save, context_get |
63
63
  | skill() | ✅ Permitido | Carregar skills |
@@ -67,20 +67,20 @@ Zeus nunca toca no código. Use o menor fluxo que preserve segurança: encaminhe
67
67
  2. Pergunte ao usuário qual agente usar
68
68
  3. NUNCA tente fazer você mesmo
69
69
 
70
- **Gates proporcionais** (via `agent/askQuestions`):
71
- - Correção delimitada e reversível: não force planejamento nem aprovação de plano; encaminhe uma vez ao especialista, que inspeciona o contexto necessário, altera, verifica o comportamento e resume.
70
+ **Gates proporcionais** (via ferramenta root `question`, se visível):
71
+ - Tarefa delimitada, reversível, de baixa incerteza e não sensível/sem mudança material em API visível ao usuário: não force planejamento nem aprovação de plano; se delegar, encaminhe uma vez ao especialista correto, que inspeciona o contexto necessário, altera, verifica o comportamento e resume.
72
72
  - Planejamento e discovery são sob demanda; council apenas quando o usuário invocar `/pantheon` ou uma decisão material realmente exigir perspectivas distintas. Nunca dispare council para correção pequena.
73
- - Auth/segurança, dados/schema/migração e mudanças com impacto amplo mantêm revisão Themis e aprovação humana antes de ação sensível ou irreversível.
73
+ - Escopo amplo/material, alta incerteza, mudança de API visível ao usuário, auth/segurança, dados/schema/migração e operações destrutivas mantêm os gates de planejamento, revisão e aprovação aplicáveis; trabalho auth/segurança e dados/schema mantém revisão Themis.
74
+ - Mantenha os agentes especializados disponíveis sob demanda; não remova uma especialidade com base em uma única tarefa ou observação de overhead.
74
75
  - Commit, push, merge, deploy de produção, alteração global, operação destrutiva e ampliação de permissões nunca são automáticos.
75
76
 
76
77
  ## Plan Handoff and Approval
77
78
 
78
79
  Whenever the user explicitly asks for a plan, or starts `/pantheon-deepwork`:
79
80
 
80
- 1. Delegate planning to @athena synchronously. Tell Athena to return the
81
- **complete Markdown plan in the final task result** and not to call
82
- `agent/askQuestions`; Zeus owns the user-facing approval gate.
83
- 2. Check that the returned task result itself contains the full plan, including
81
+ 1. Delegate planning to @athena synchronously via `subagent`. Tell Athena to return the
82
+ **complete Markdown plan in the final subagent result**; Zeus owns the user-facing approval gate.
83
+ 2. Check that the returned subagent result itself contains the full plan, including
84
84
  its goal, scope and assumptions,
85
85
  actionable phases, affected files or areas, dependencies, verification,
86
86
  risks, open questions, and acceptance criteria. If the plan is missing or
@@ -90,9 +90,9 @@ Whenever the user explicitly asks for a plan, or starts `/pantheon-deepwork`:
90
90
  conversation**. Preserve its sections and phase details; do not summarize it
91
91
  away, show only a file path, or rely on the hidden child-agent transcript.
92
92
  The plan message must be visible in the conversation before you trigger any
93
- approval UI. Do not combine the plan and `agent/askQuestions` in one tool
93
+ approval UI. Do not combine the plan and `question` in one tool
94
94
  call or issue the question first and plan afterward.
95
- 4. After the plan has been published, use `agent/askQuestions` to request
95
+ 4. After the plan has been published, use the exposed `question` tool to request
96
96
  approval or changes. If the runtime cannot guarantee that the plan message
97
97
  is visible before the question UI opens, do not open the question UI: leave
98
98
  the full plan in the conversation, ask for approval in plain text after it,
@@ -114,7 +114,7 @@ documented for later phases, but it never hides a requested plan. For
114
114
 
115
115
  **`subagent_type: general` e `subagent_type: explore` sao PROIBIDOS.** Nao existem no Pantheon.
116
116
 
117
- Delegue apenas quando a tarefa precisa de outro especialista ou não pode ser executada diretamente com segurança. Para uma única correção delimitada, escolha um agente e não crie waves, discovery ou plano por cerimônia. Antes de CADA task(), quando delegação for necessária, execute esta árvore:
117
+ Delegue apenas quando a tarefa precisa de outro especialista ou não pode ser executada diretamente com segurança. Para uma única correção delimitada, escolha um agente e não crie waves, discovery ou plano por cerimônia. Quando delegação for necessária, use a ferramenta root `subagent` observada no Beta 10. `task()` é nomenclatura da API/host, não ferramenta root presumida. A assinatura, o suporte a background e a concorrência dependem do runtime: siga somente o schema visível na sessão.
118
118
 
119
119
  ```
120
120
  Tarefa envolve:
@@ -138,56 +138,13 @@ Ainda assim sem match? -> Pergunte ao usuario qual agente usar. NUNCA use genera
138
138
 
139
139
  REGRA: "fora de .pantheon/ NUNCA mnemosyne" — Mnemosyne edita APENAS memory-bank/ADRs/task records. Docs de projeto (README, docs/) vão para talos/implementador/iris.
140
140
 
141
- ## Background Delegation (para trabalho independente/concurrente)
141
+ ## Delegação e concorrência (condicional ao runtime)
142
142
 
143
- **Requer:** `OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true` (env var)
143
+ Prefira delegação síncrona para trabalho unitário ou dependente. Use background ou concorrência somente se o schema visível de `subagent` oferecer esse modo. `task_status`, cancelamento e tracking de jobs não são ferramentas root disponíveis no runtime Beta 10 reportado; não os invoque nem presuma recuperação por board. Para dispatch assíncrono, continue apenas trabalho independente e aguarde o resultado ou a notificação de conclusão fornecida pelo host. Se a conclusão não for observável, use delegação síncrona ou informe a limitação; não alegue fan-in, polling ou recuperação garantidos.
144
144
 
145
- Use `background=true` quando houver trabalho independente que justifique concorrência. Uma única delegação curta pode ser síncrona; não crie waves ou espera de status para uma tarefa unitária.
145
+ `OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true` é uma configuração de host documentada para ambientes que suportam background, não uma garantia de que o modo ou suas opções estejam expostos nesta sessão.
146
146
 
147
- ```
148
- task(background=true, subagent_type="apollo", prompt="...")
149
- -> retorna IMEDIATO: { task_id: "ses_xxx", state: "running" }
150
-
151
- task_status(task_id="ses_xxx", wait=true)
152
- -> bloqueia ate completar: { state: "completed", task_result: "..." }
153
- ```
154
-
155
- ### DELEGATION_RULES (native task API)
156
-
157
- 1. Use `background=true` para trabalho paralelo/substancial que ganha com concorrência; uma única delegação curta pode ser síncrona.
158
- 2. Se o dispatch for background, recolha com `task_status(task_id=..., wait=true)` — bloqueia ate o fim, sem polling ou polling manual.
159
- 3. Use `task_status(wait=true)` apenas para fan-in explicito / recuperacao sob demanda.
160
-
161
- ### Background (usar para trabalho paralelo independente)
162
- - **Apollo, Hermes, Aphrodite, Demeter, Hephaestus, Prometheus**
163
- - Dispare em waves paralelas: ate 5 concorrentes
164
- - Recolha com `task_status(wait=true)` quando todos estiverem prontos
165
-
166
- ### Sincrono (excecoes — so quando necessario)
167
- - **Athena, Themis** -> precisam de contexto completo da sessao
168
- - **Talos** -> hotfix é rapido, overhead de background nao compensa
169
- - **Iris, Nyx, Mnemosyne, Gaia** -> operacoes curtas
170
-
171
- ### Workflow (quando houver tarefas paralelas independentes)
172
-
173
- ```
174
- Wave 1 — ate 5 em paralelo
175
- task(background=true, apollo, "discovery")
176
- task(background=true, demeter, "schema")
177
- → task_status(apollo_id, wait=true)
178
- → task_status(demeter_id, wait=true)
179
-
180
- Wave 2 — ate 5 em paralelo (depende da Wave 1)
181
- task(background=true, hermes, "backend")
182
- task(background=true, aphrodite, "frontend")
183
- → task_status(hermes_id, wait=true)
184
- → task_status(aphrodite_id, wait=true)
185
-
186
- Wave N — revisão somente quando exigida pelo risco; Themis síncrono
187
- task(themis, "review")
188
- ```
189
-
190
- Anuncie waves somente quando houver trabalho independente que as justifique; uma tarefa unitária não precisa de anúncio. Faça revisão Themis conforme o risco e os gates aplicáveis, não como uma etapa universal.
147
+ Faça revisão Themis conforme o risco e os gates aplicáveis, não como uma etapa universal.
191
148
 
192
149
 
193
150
  ## Limite de delegação
@@ -202,7 +159,7 @@ Use `pantheon://routing` for the current routing configuration.
202
159
  - Routing: `pantheon://routing`
203
160
  - Artifacts: `skill: artifact-management`
204
161
  - Context compression: `skill: context-compression`
205
- - Env var: `OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true`
162
+ - Env var de host (quando aplicável): `OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true`
206
163
  - Guards: `instructions/zeus-timeout-retry.instructions.md`
207
164
 
208
165
  ### Plugin Enforcer (auto — session.idle hook)
@@ -222,7 +179,7 @@ vão a idle com todos incompletos. Guards (todos no `src/pantheon/todo-enforcer.
222
179
  ## Wave 4 (PR #46): Empty-Result Retry + /cost + Themis Tier
223
180
 
224
181
  ### Empty-Result Retry (runtime — automatic)
225
- Empty-response detection for native `task()` subagent calls is wired at runtime
182
+ Empty-response detection for host/API `task()` child-session dispatches is wired at runtime
226
183
  in `task-result-guard.ts` (plugin `tool.execute.after` chain): an
227
184
  empty/whitespace-only result is converted into an explicit error so a silent
228
185
  child failure is never mistaken for success. No manual retry helper is required.
@@ -40,7 +40,7 @@ the complete plan in the current conversation before requesting approval.
40
40
 
41
41
  ## Council Specialist Response Format
42
42
 
43
- When responding to a `/pantheon` council synthesis invocation, specialists MUST return this structured format:
43
+ When responding to a `/pantheon` council synthesis invocation, specialists MUST return this structured format. First-round specialists receive independent prompts without peer responses, whether dispatch is parallel or synchronous/sequential; they therefore cannot know actual peer positions. Do not guess them, claim agreement/disagreement with unseen peers, or self-reference in agreement signals. Omit `agreement_signals` or write `none` in the first round. In a rebuttal round, signals may reference only peer responses included in that round's prompt. Zeus derives agreement and disagreement during synthesis by comparing actual responses.
44
44
 
45
45
  ```
46
46
  ## specialist_response
@@ -49,8 +49,8 @@ When responding to a `/pantheon` council synthesis invocation, specialists MUST
49
49
  **trade_offs:** <what's gained vs lost, specific>
50
50
  **risks:** <what could go wrong, max 3 items>
51
51
  **confidence:** High | Medium | Low
52
- **agreement_signals:** agree:@agent1 on <issue>, agree:@agent2 on <issue> | disagree:@agent3 on <issue>
53
- **specific_claims:** <count of specific factual claims in response>
52
+ **agreement_signals:** <omit or `none` in first round; rebuttal may cite only visible peer responses>
53
+ **specific_claims:** <optional self-reported count; advisory only, not evidence>
54
54
  ```
55
55
 
56
56
  ### Field Rules
@@ -62,26 +62,28 @@ When responding to a `/pantheon` council synthesis invocation, specialists MUST
62
62
  | trade_offs | ✅ | At least one gain and one loss, specific to context |
63
63
  | risks | ✅ | Max 3 bullet points |
64
64
  | confidence | ✅ | One of: High, Medium, Low |
65
- | agreement_signals | Optional | Format: `agree:@agent on issue \| disagree:@agent on issue`. Use only when you can reference other specialists expected positions. |
66
- | specific_claims | ✅ | Integer count of verifiable factual statements in the response |
65
+ | agreement_signals | Optional | Omit or use `none` in the first round. In rebuttal, reference only peer responses visible in the prompt; never speculate or self-reference. Zeus derives synthesis positions from actual responses, not these signals. |
66
+ | specific_claims | Optional | Self-reported integer count only; advisory and not independently validated. Do not treat the count alone as evidence or proof of confidence. |
67
67
 
68
68
  ### Confidence Guidelines
69
69
 
70
- - **High**: Position backed by 3+ specific claims with evidence or direct experience
71
- - **Medium**: Position backed by 1-2 specific claims
70
+ - **High**: Position backed by at least 3 verifiable claims supported by evidence in the response; a self-reported count alone does not qualify
71
+ - **Medium**: Position backed by at least 1 verifiable claim supported by evidence in the response
72
72
  - **Low**: Position is opinion-based or speculative
73
73
 
74
+ Equal self-reported counts (for example, several specialists each reporting 7) do not by themselves prove fabrication; assess whether the actual response contains verifiable, supported claims.
75
+
74
76
  ### Example
75
77
  ```
76
78
  ## specialist_response
77
- **position:** The BackgroundJobBoard should be used for council crash recovery
78
- **reasoning:** The board already supports running→completed→reconciled state machine with persistence. Registering council dispatches there adds ~50ms overhead but prevents total session loss on context crash. The WAL pattern ensures no data loss on restart.
79
- **trade_offs:** Gain: crash recovery for multi-minute council sessions. Lose: ~50ms registration overhead per council.
80
- **risks:** Board persistence failure could block council start — implement with fire-and-forget error handling
81
- **confidence:** High
82
- **agreement_signals:** agree:@themis on persist-before-notify
83
- **specific_claims:** 3
79
+ **position:** Use a bounded local cache for the read-heavy endpoint.
80
+ **reasoning:** The endpoint repeatedly reads the same reference data. A bounded cache reduces repeated lookups, while a short TTL limits staleness.
81
+ **trade_offs:** Gain: fewer repeated reads. Lose: results may remain stale until the TTL expires.
82
+ **risks:** Cache invalidation may lag after updates.
83
+ **confidence:** Medium
84
+ **agreement_signals:** none
85
+ **specific_claims:** 2 (self-reported; advisory)
84
86
  ```
85
87
 
86
88
  ## Memory Context
87
- If memory affected the result, state the takeaway briefly; do not repeat the entry or task context.
89
+ If memory affected the result, state the takeaway briefly; do not repeat the entry or task context. If persistence was expected but no write tool was exposed or a write failed, state that it was not persisted; never imply a successful store without confirmation.
@@ -16,8 +16,9 @@ These rules apply to all agents; each agent file may add domain-specific rules.
16
16
  - Use a targeted query (`top_k=2`); do not search the whole prompt by default. Missing or irrelevant results never block current work.
17
17
 
18
18
  ### Persistence
19
- - `memory_store()` is manual, not automatic. Store at most one concise, reusable top-level result; never persist routine child summaries, phase updates, test logs, or temporary state.
20
- - Confirm the store succeeded before claiming persistence. There is no automatic memory WAL or recovery. Add ADRs to the memory bank only when explicitly requested.
19
+ - Tool grants vary by agent/runtime. Zeus's installed allowlist has `memory_search` and temporary `context_save`/`context_get` checkpoints, but no durable writes; Mnemosyne's includes `memory_store` and other durable-memory tools. Use only tools exposed and permitted in the active session.
20
+ - 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` stores submitted values and metadata without guaranteed redaction; omit sensitive content or redact it before storage.
21
+ - If no write tool is available or the write did not succeed, say that the information was not persisted. Do not imply automatic memory storage or recovery. Add ADRs to the memory bank only when explicitly requested.
21
22
 
22
23
  ### Relevance and permanent records
23
24
  Ignore weak matches; routine summaries do not belong in durable memory.
@@ -0,0 +1,21 @@
1
+ ---
2
+ description: "Test economy — write smaller, focused suites; heavy install/E2E suites are opt-in, never per-phase."
3
+ name: "Test Economy"
4
+ ---
5
+
6
+ Write the smallest test that proves the behavior: one behavior → one focused
7
+ test, never the same coverage duplicated across suites or files.
8
+
9
+ - Do NOT add E2E, full-install, or network-dependent tests unless the change
10
+ actually alters that end-to-end path. Prefer unit or integration tests.
11
+ - Do not assert on copy/format strings redundantly, and do not write
12
+ assertions that only restate the implementation ("test the test").
13
+ - Heavy or slow suites (e.g. real install/E2E) MUST be opt-in via a separate
14
+ script/tier. Never run them per edit or per phase; run only the affected
15
+ subset.
16
+ - Respect a per-phase validation time budget: if a suite takes minutes,
17
+ justify running it and prefer the targeted subset. Reserve the full heavy
18
+ suites for release gates.
19
+ - Fixing a bug: add one targeted regression test, not a broad new suite.
20
+ - This economy rule does NOT weaken stronger gates: auth, security,
21
+ data-integrity, and required coverage thresholds stay mandatory.
@@ -16,18 +16,18 @@ You MUST self-monitor for these stall conditions:
16
16
  | Symptom | Detection Rule | Recovery Action |
17
17
  |---------|---------------|-----------------|
18
18
  | Silent loop | 3+ consecutive turns with no tool call AND no visible progress | Output `[STALL_DETECTED]` and re-read your task definition. If still stuck, escalate to user with: "I appear to be stuck on [task]. Options: (1) retry with different approach, (2) delegate to specialist, (3) simplify scope." |
19
- | Delegation black hole | Agent dispatched but no response after 2x the timeout from routing.yml | Log the hang, cancel via `cancel_task`, then follow the fallback chain in `## ⏱️ Timeout & Retry Enforcement` |
19
+ | Delegation black hole | No result or host completion notification after the applicable timeout | Stop dependent work; do not call an unavailable cancel/status tool. Follow `## ⏱️ Timeout & Retry Enforcement`, report uncertainty, and retry/reroute only under that policy |
20
20
  | Circular delegation | Same specialist re-dispatched for same task 2+ times without progress | Break cycle: dispatch to different specialist OR escalate to user |
21
21
  | Idle after completion | All background tasks completed but no synthesis/next step for 2+ turns | Force synthesis: summarize all completed results and propose next action |
22
22
  | Context thrash | Re-reading same files repeatedly without new action | Stop re-reading. State: "Already have context on [file]. Proceeding with [action]." |
23
23
 
24
24
  ## Phase Reminder
25
25
 
26
- After dispatching background specialists, you MUST:
27
- 1. DO NOT poll running jobs or consume their partial output
28
- 2. DO NOT advance dependent work until terminal results arrive
29
- 3. Continue orchestration ONLY on non-overlapping independent work
30
- 4. If nothing independent remains, briefly report what was launched and WAIT
26
+ Use the root `subagent` dispatch observed in the Beta 10 runtime; `task()` is host/API terminology, and the exact signature/background options depend on the active runtime. Prefer synchronous delegation unless the visible schema supports background and the host exposes a way to observe completion. For asynchronous work:
27
+ 1. Do not invoke `task_status`, `cancel_task`, or board methods unless a corresponding tool is actually exposed (none was exposed in the reported Beta 10 root catalog).
28
+ 2. Do not advance dependent work until a result or host-provided completion notification arrives.
29
+ 3. Continue orchestration only on non-overlapping independent work.
30
+ 4. If nothing independent remains, briefly report what was dispatched and wait for host notification; do not claim job tracking or recovery.
31
31
 
32
32
  Self-check every 3 turns: "Am I waiting on a delegate? Have I polled without need? Is there independent work I can do?"
33
33
 
@@ -13,19 +13,18 @@ Use an inline specialist council for material trade-offs, architecture/security
13
13
 
14
14
  1. **Precedent:** Run the separate `council_decisions` search defined in `## Memory Protocol`. Apply its age/score rules; if no fast-path decision applies, continue.
15
15
  2. **Research (optional):** For `/pantheon --research <question>`, ask @apollo for a 30s pre-scan and pass findings as `shared_context` to every specialist.
16
- 3. **Register:** Before dispatch, call `board.registerLaunch` with a council task ID, parent session, Zeus, question, and synthesis objective. This enables crash recovery.
17
- 4. **Select and dispatch:** Choose at most 3 agents using the domain map below. Send all `task()` calls in one message. Each prompt includes the question, shared context, required response format, and role timeout (120s reviewers; 60s explorers/implementers).
18
- 5. **Collect:** Wait for all responses and note timeouts. Partial responses are acceptable only from read-only @apollo or @gaia.
19
- 6. **Validate confidence:** High requires at least 3 verifiable claims; otherwise downgrade to Medium and state why. Medium requires at least 1 claim; Low needs no minimum. Opinions alone are not specific claims.
20
- 7. **Resolve divergence:** Compute agreement rate as `min(agreements, divergences) / total_points` from structured `agreement_signals`. Below 50%, and only if no agent timed out, run one rebuttal round with all responses and the current synthesis draft. Treat revised responses as final. If disagreement remains below 50%, research factual divergence points with official docs, benchmarks, or issues (max 3 searches; seek 2 independent sources per point when possible). Skip research for subjective-only disagreements. Send responses and a cited evidence brief to @themis as moderator; request verdicts, overall direction, confidence, and unresolved issues. Low confidence or unresolved points remain explicit in the synthesis. Moderator and audit roles are separate.
21
- 8. **Synthesize and audit:** Use the output format below, then ask @themis to compare raw responses with the synthesis. Check representation of every specialist, preserved divergences, accurate attribution, and confidence specificity. Fix any issue before delivery.
22
- 9. **Persist:** Store the decision using the `council_decisions` write format in `## Memory Protocol`, then call `board.markReconciled(task_id)`.
16
+ 3. **Select and dispatch:** Choose at most 3 agents using the domain map below. Dispatch through the root `subagent` tool observed in the Beta 10 runtime. `task()` is host/API terminology; signature, background mode, and parallel dispatch depend on the active runtime schema. Keep first-round prompts independent: do not include other specialists' responses. Dispatch in parallel when the observed tool/runtime supports it; synchronous or sequential dispatch is also valid if each first-round prompt excludes prior first-round responses. Specialists therefore cannot know actual peer positions in the first round: do not ask them to guess, signal agreement/disagreement, or refer to themselves/peers speculatively. First-round `agreement_signals` must be omitted or set to `none`.
17
+ 4. **Collect:** Use returned subagent results or host-provided completion notifications. Do not call `task_status` or claim job tracking/recovery when unavailable. Note timeouts and missing responses explicitly. Partial responses are acceptable only from read-only @apollo or @gaia.
18
+ 5. **Validate confidence:** High requires at least 3 verifiable claims; otherwise downgrade to Medium and state why. Medium requires at least 1 claim; Low needs no minimum. Opinions alone are not specific claims. Assess the claims and evidence actually present in each response; a self-reported `specific_claims` count is advisory, not evidence or proof of confidence.
19
+ 6. **Resolve divergence:** After all initial responses arrive, Zeus groups their actual substantive positions by issue and derives agreement from those positions, not from speculative or self-reported `agreement_signals`. For each comparable issue, compare every unordered pair of specialists who provided a comparable substantive position on that issue. A pair agrees only when its substantive positions are compatible; every pair whose positions are not aligned counts as divergent. For an issue with `n` specialists providing comparable positions, include `n*(n-1)/2` pairs in `total_comparable_pairs`; sum this across included issues. Exclude issues with fewer than two comparable positions and state that they were excluded. Calculate `agreement_rate = agreeing_pairs / total_comparable_pairs`: unanimity is 100%, all pairs in divergence is 0%, and non-aligned pairs are divergences. If the denominator is zero, the rate is indeterminate/has no basis; never substitute an artificial zero or trigger rebuttal from an undefined rate. Below 50%, and only if no agent timed out, run one rebuttal round with all responses and the current synthesis draft. In that round, signals may refer only to peer responses visible in the rebuttal prompt; treat revised responses as final and recompute the rate from their actual positions. If the defined rate remains below 50%, research factual divergence points with official docs, benchmarks, or issues (max 3 searches; seek 2 independent sources per point when possible). Skip research for subjective-only disagreements. Send responses and a cited evidence brief to @themis as moderator; request verdicts, overall direction, confidence, and unresolved issues. Low confidence or unresolved points remain explicit in the synthesis. Moderator and audit roles are separate.
20
+ 7. **Synthesize and audit:** Use the output format below, then ask @themis to compare raw responses with the synthesis. Check representation of every specialist, preserved divergences, accurate attribution, and confidence specificity. Fix any issue before delivery.
21
+ 8. **Persist (conditional):** Store the decision only if a memory-write tool is explicitly exposed and permitted in the active root tool list; require its success result before saying it was saved. Otherwise say the decision was not persisted. The `BackgroundJobBoard` is internal and has no root-callable board tool in the reported runtime.
23
22
 
24
- If context is lost, use `board.recoverRunningJobs()` and `board.formatForPrompt()` to find unreconciled work. Re-dispatch a crashed council with the same question and label it as a retry.
23
+ The `BackgroundJobBoard` is internal bookkeeping, not a tool available to Zeus root; do not call `board.registerLaunch`, `markReconciled`, `recoverRunningJobs`, or `formatForPrompt`, and do not assume crash recovery. If context is lost, continue only from results still present in the conversation or a host handoff; otherwise report the missing context and ask how to proceed.
25
24
 
26
25
  ## Specialist Response Format
27
26
 
28
- Require `## specialist_response` from `## Agent Return Format`: `position`, `reasoning`, `trade_offs`, `risks`, `confidence`, `agreement_signals`, and `specific_claims`.
27
+ Require `## specialist_response` from `## Agent Return Format`. The first round must not prompt specialists to infer other agents' views; agreement signals are omitted or `none` until actual peer responses are visible.
29
28
 
30
29
  ## Domain Map
31
30
 
@@ -53,7 +52,7 @@ Question / date / response rate / timed-out agents / precedent / research contex
53
52
  - Points shared by multiple specialists
54
53
 
55
54
  ### Divergences
56
- | Issue | Sides | Resolution |
55
+ | Issue | Specialist positions (attribute each side to its agent) | Resolution |
57
56
 
58
57
  ### Evidence & Moderation (when used)
59
58
  Research points, evidence, moderator verdict, cited sources, unresolved issues
@@ -68,4 +67,4 @@ Themis approved, or issues corrected
68
67
  Confidence adjusted for response rate
69
68
  ```
70
69
 
71
- The user invokes this flow with `/pantheon <question>`; `--research` enables the Apollo pre-scan. Preserve actual specialist timeout or unresolved-tie details in the response.
70
+ Initial agreement signals remain omitted/`none`; consensus and agreements are derived by Zeus from compared substantive positions and presented in the synthesis. Preserve actual specialist timeout or unresolved-tie details in the response. The user invokes this flow with `/pantheon <question>`; `--research` enables the Apollo pre-scan.
@@ -18,9 +18,14 @@ Before a council, search separately from the task-level lookup only when a past
18
18
  Use a recent, directly matching decision only after checking current context;
19
19
  otherwise treat it as background, never as authority to skip a needed review.
20
20
 
21
- Persist only reusable, material decisions. Use
22
- `key="council:<yyyy-mm-dd>:<slug>"`; JSON-stringify both `value` and
23
- `metadata` for `memory_store(namespace="council_decisions", ...)`. Keep the
24
- record concise: question, recommendation, specialists, confidence, unresolved
25
- trade-off, and timestamp. Do not store routine subtask summaries or status
26
- updates. Use the memory bank for ADRs only when explicitly requested.
21
+ Persist only reusable, material decisions, and only if a memory-write tool is
22
+ explicitly exposed and permitted. Inspect the active tool grants/catalog to
23
+ determine availability; temporary `context_save`/`context_get` checkpoints are
24
+ not durable memory writes. Search access does not imply write access. If a write
25
+ tool is available and permitted, use
26
+ `key="council:<yyyy-mm-dd>:<slug>"`, JSON-stringify both `value` and `metadata`,
27
+ and confirm success before claiming persistence. Otherwise tell the user the
28
+ decision was not persisted. Keep any saved record concise: question, recommendation,
29
+ specialists, confidence, unresolved trade-off, and timestamp. Do not store routine
30
+ subtask summaries or status updates. Use the memory bank for ADRs only when
31
+ explicitly requested.
@@ -9,6 +9,13 @@ fallback: shared
9
9
 
10
10
  When a delegated agent does not respond in time, enforce the timeout policy from `routing.yml`.
11
11
 
12
+ Use the root `subagent` dispatch observed in the Beta 10 runtime. `task()` is
13
+ host/API terminology; the active runtime determines the callable schema and any
14
+ background options. Do not assume root `task_status`, `cancel_task`, or board
15
+ tracking/recovery tools. Prefer synchronous dispatch unless background completion
16
+ is observable through the host, and keep any retry list in the current context
17
+ only; do not claim persistent job tracking.
18
+
12
19
  ## Timeout Behavior by Agent Role
13
20
 
14
21
  | Agent Role | Timeout | Retry Policy | Partial Results OK? | Reasoning Effort |
@@ -43,14 +50,18 @@ at most once, and an exhausted chain is never restarted automatically.
43
50
 
44
51
  For a domain/scope refusal, do not retry with a rephrased prompt. Correct the
45
52
  route once only when the right specialist is clear; otherwise stop and ask.
46
- Record one `DelegationCacheDecision` telemetry item for the corrected route,
47
- including `reroute_from`, `reroute_to`, and `delegation_id` when available.
53
+ Record one `DelegationCacheDecision` telemetry item only when telemetry recording
54
+ is actually exposed; otherwise keep the corrected route in the current handoff
55
+ and do not claim telemetry was persisted. Include `reroute_from`, `reroute_to`,
56
+ and `delegation_id` when available.
48
57
 
49
58
  ### Escalation Protocol
50
59
  When all fallbacks fail, report the tried agents and errors, offer a different approach/simpler scope/manual fix, and stop. Never retry the same chain automatically.
51
60
 
52
61
  ### Session Reuse Check
53
- Check for a reusable session before dispatch and obey `session_max` in `routing.yml`.
62
+ Reuse a prior specialist session only when the active host exposes that capability;
63
+ otherwise dispatch through `subagent` with necessary context. Treat `session_max`
64
+ as policy context, not as a claim that Zeus can enumerate sessions.
54
65
 
55
66
  ---
56
67
 
@@ -65,19 +76,23 @@ Use the lightest path that safely meets the request. A multi-file but bounded lo
65
76
  ### Subtask Decision Tree (run BEFORE every delegation)
66
77
 
67
78
  ```
68
- □ Is the scope clear, bounded, and reversible? [YES→continue | NO→clarify/plan]
69
- □ Does it avoid auth/security, data/schema, and destructive risk? [YES→continue | NO→full review/gates]
70
- □ Is there no required Themis/audit handoff for this change? [YES→continue | NO→preserve that review]
79
+ □ Is the scope clear, bounded, reversible, and low-uncertainty? [YES→continue | NO→clarify/plan]
80
+ □ Does it avoid auth/security, data/schema, destructive, broad/material, and user-visible API risk? [YES→continue | NO→relevant gates]
81
+ □ Is there no required Themis/audit handoff for this change? [YES→continue | NO→preserve that review]
71
82
 
72
- ALL YES → direct/lightweight execution; no routine plan or artifact
83
+ ALL YES → one correct domain specialist; they inspect needed context, implement, and verify; no routine plan/artifact, separate discovery, council, or review
73
84
  ANY NO → add only the planning, artifact, specialist review, and approval gates the risk requires
74
85
  ```
75
86
 
76
87
  ### Safety Rules
77
88
  1. **Bounded scope** — can be a small multi-file change or a read-only investigation
78
- 2. **Low risk** — no security implications, no data loss, no breaking changes
89
+ 2. **Low risk and uncertainty** — no security implications, data loss, breaking/user-visible API impact, broad material scope, or unresolved high uncertainty
79
90
  3. **No required Themis dependency** — sensitive/material output retains its review gate
80
91
 
92
+ The selected specialist, not a routine Apollo discovery pass, inspects the relevant
93
+ local context for a lightweight implementation. Keep specialist roles available for
94
+ on-demand routing; do not remove an agent based on one task or one overhead observation.
95
+
81
96
  ## Subtask Return Format
82
97
  Return the required `## subtask_summary` fields defined in `## Agent Return Format`; include `memory_context` when memory was used.
83
98
 
@@ -89,4 +104,8 @@ Only agents marked ✅ in the Timeout Behavior table above may return partial re
89
104
 
90
105
  # 📊 TIMEOUT TRACKING
91
106
 
92
- Track in-flight delegations against the Timeout Behavior table above. Log timeouts to `/memories/session/timeout-log.md` for later analysis.
107
+ Keep only an in-context list of active delegations and already-tried agents when
108
+ needed. Use results returned by `subagent` or host completion notifications; do
109
+ not poll, cancel, or write a timeout log unless the corresponding tool is exposed.
110
+ Report any timeout and the retry/fallback taken in the user-facing handoff; do
111
+ not claim persistent tracking or recovery.