pantheon-opencode 1.6.0-beta.7 → 1.6.0-beta.8

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 (49) hide show
  1. package/AGENTS.md +58 -15
  2. package/CHANGELOG.md +37 -100
  3. package/README.md +78 -102
  4. package/README.pt-BR.md +19 -37
  5. package/package.json +1 -2
  6. package/plugin.json +2 -2
  7. package/pyproject.toml +1 -1
  8. package/scripts/build-agents-md.mjs +2 -3
  9. package/scripts/doctor.mjs +22 -104
  10. package/scripts/hooks/scan-secrets.sh +97 -0
  11. package/scripts/install/config-migration.mjs +9 -42
  12. package/scripts/install/interactive.mjs +1 -1
  13. package/scripts/install/opencode.mjs +114 -43
  14. package/scripts/install/strings.mjs +0 -8
  15. package/scripts/probe-pantheon-cost.mjs +3 -16
  16. package/scripts/test-opencode-v2-sandbox.sh +203 -786
  17. package/scripts/validate-sandbox-install.mjs +138 -0
  18. package/skills-lock.json +3 -4
  19. package/src/agents/aphrodite.md +2 -9
  20. package/src/agents/demeter.md +0 -9
  21. package/src/agents/gaia.md +1 -0
  22. package/src/agents/hephaestus.md +0 -9
  23. package/src/agents/hermes.md +2 -9
  24. package/src/agents/mnemosyne.md +14 -42
  25. package/src/agents/prometheus.md +0 -9
  26. package/src/agents/themis.md +0 -1
  27. package/src/agents/zeus.md +180 -19
  28. package/src/instructions/agent-return-format.instructions.md +48 -3
  29. package/src/instructions/memory-protocol.instructions.md +8 -9
  30. package/src/instructions/zeus-anti-stall.instructions.md +54 -6
  31. package/src/instructions/zeus-council-synthesis.instructions.md +71 -0
  32. package/src/instructions/zeus-memory-operations.instructions.md +4 -4
  33. package/src/instructions/zeus-timeout-retry.instructions.md +81 -7
  34. package/src/pantheon/v2-delegation-enforce.ts +2 -1
  35. package/src/plugin-v2.ts +251 -168
  36. package/src/plugins/pantheon-hooks.ts +35 -82
  37. package/src/plugins/tui/dist/tui.d.ts.map +1 -1
  38. package/src/plugins/tui/dist/tui.js +26 -50
  39. package/src/plugins/tui/package-lock.json +2 -2
  40. package/src/plugins/tui/package.json +1 -1
  41. package/src/plugins/tui/src/index.tsx +25 -60
  42. package/src/routing.yml +4 -2
  43. package/src/skills/README.md +7 -12
  44. package/src/skills/agent-coordination/SKILL.md +83 -13
  45. package/src/skills/auto-continue/SKILL.md +13 -14
  46. package/src/skills/context-compression/SKILL.md +26 -879
  47. package/src/pantheon/secret-scanner.ts +0 -489
  48. package/src/plugins/tui/README.md +0 -14
  49. package/src/skills/council-synthesis/SKILL.md +0 -29
@@ -6,7 +6,7 @@ agents: ["*"]
6
6
 
7
7
  # Agent Return Format
8
8
 
9
- Implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) return:
9
+ All implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) MUST return results to Zeus in this format:
10
10
 
11
11
  ## subtask_summary
12
12
  **files_changed:** [list of file paths, one per line]
@@ -17,10 +17,55 @@ Implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) retur
17
17
  **status:** complete | partial (reason) | escalated (reason)
18
18
  **blockers:** [list any blockers or null]
19
19
 
20
- Investigation agents (Apollo, Athena) return structured findings with:
20
+ For investigation agents (Apollo, Athena), return structured findings with:
21
21
  - Key findings as bullet points
22
22
  - File paths with line numbers
23
23
  - Relevant code snippets (max 3 lines each)
24
24
 
25
+ ## Council Specialist Response Format
26
+
27
+ When responding to a `/pantheon` council synthesis invocation, specialists MUST return this structured format:
28
+
29
+ ```
30
+ ## specialist_response
31
+ **position:** <clear one-sentence position answering the question>
32
+ **reasoning:** <2-4 sentences with logical chain>
33
+ **trade_offs:** <what's gained vs lost, specific>
34
+ **risks:** <what could go wrong, max 3 items>
35
+ **confidence:** High | Medium | Low
36
+ **agreement_signals:** agree:@agent1 on <issue>, agree:@agent2 on <issue> | disagree:@agent3 on <issue>
37
+ **specific_claims:** <count of specific factual claims in response>
38
+ ```
39
+
40
+ ### Field Rules
41
+
42
+ | Field | Required | Validation |
43
+ |-------|----------|------------|
44
+ | position | ✅ | Single sentence, must directly answer the question |
45
+ | reasoning | ✅ | 2-4 sentences with logical chain |
46
+ | trade_offs | ✅ | At least one gain and one loss, specific to context |
47
+ | risks | ✅ | Max 3 bullet points |
48
+ | confidence | ✅ | One of: High, Medium, Low |
49
+ | agreement_signals | Optional | Format: `agree:@agent on issue \| disagree:@agent on issue`. Use only when you can reference other specialists expected positions. |
50
+ | specific_claims | ✅ | Integer count of verifiable factual statements in the response |
51
+
52
+ ### Confidence Guidelines
53
+
54
+ - **High**: Position backed by 3+ specific claims with evidence or direct experience
55
+ - **Medium**: Position backed by 1-2 specific claims
56
+ - **Low**: Position is opinion-based or speculative
57
+
58
+ ### Example
59
+ ```
60
+ ## specialist_response
61
+ **position:** The BackgroundJobBoard should be used for council crash recovery
62
+ **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.
63
+ **trade_offs:** Gain: crash recovery for multi-minute council sessions. Lose: ~50ms registration overhead per council.
64
+ **risks:** Board persistence failure could block council start — implement with fire-and-forget error handling
65
+ **confidence:** High
66
+ **agreement_signals:** agree:@themis on persist-before-notify
67
+ **specific_claims:** 3
68
+ ```
69
+
25
70
  ## Memory Context
26
- If this agent used `memory_recall` or `memory_search`, include the relevant memory entries used as context for the response.
71
+ If memory affected the result, state the takeaway briefly; do not repeat the entry or task context.
@@ -10,15 +10,14 @@ These rules apply to all agents; each agent file may add domain-specific rules.
10
10
 
11
11
  ## Universal Rules
12
12
 
13
- ### Task-start search
14
- **Before any file reads, call exactly once at task start:** `memory_search(query=task_prompt, top_k=2)`.
15
- - Reuse the same result for task context and delegation routing. A KV cache hit does not skip this search or trigger another task FTS search.
16
- - Council-precedent lookup is separate. Use domain-relevant context; do not issue another task-memory search for routing.
17
- - Agents have read-only memory access: only `memory_search()` is available.
13
+ ### Retrieval
14
+ - Search only when prior project history could change the outcome; skip self-contained questions and bounded changes.
15
+ - For delegated work, Zeus searches at most once and passes useful hits to the specialist. Reuse supplied results; search separately only if relevant history is needed but missing.
16
+ - Use a targeted query (`top_k=2`); do not search the whole prompt by default. Missing or irrelevant results never block current work.
18
17
 
19
- ### Summary persistence and WAL
20
- `memory_store()` is called automatically by Zeus when an agent returns a `subtask_summary`; include a clear `summary`. This is the only persistence path, for implementers and read-only agents alike.
21
- Before storing, Zeus writes `.pantheon/memory-wal/<agent>/<timestamp>.json` with `{agent, phase, summary, files_changed, status, timestamp}`. The WAL precedes storage, is recovered next session if storage fails, and expires after 7 days.
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.
22
21
 
23
22
  ### Relevance and permanent records
24
- Skip `memory_search()` results below 0.3 relevance. Delegate ADR-level architecture decisions, significant trade-offs, and pattern changes to @mnemosyne; routine summaries use auto-store.
23
+ Ignore weak matches; routine summaries do not belong in durable memory.
@@ -1,13 +1,61 @@
1
1
  ---
2
- description: "Minimal stall recovery and progress guidance for Zeus"
2
+ description: "Stall detection, phase reminders, delegate retry, and progress checkpoints for Zeus"
3
3
  name: "Zeus Anti-Stall"
4
4
  agents: [zeus]
5
5
  fallback: shared
6
6
  ---
7
7
 
8
- # Stall recovery
8
+ # 🛑 ANTI-STALL & STALL DETECTION
9
9
 
10
- - For a known background task, wait only on its returned task ID; do not poll or start dependent work before it completes.
11
- - For transient dispatch failures, use the single retry and fallback policy in `Zeus Timeout & Retry`. A refusal or failed check is information to act on, not a reason to repeat the same attempt.
12
- - If the same task makes no progress after one corrected route, stop and report the blocker or ask one focused question. Do not invent task IDs, session APIs, or recovery state.
13
- - Use progress checkpoints only for work expected to span more than five turns. State what is complete, what remains, and any blocker; do not create a status file for bounded work.
10
+ You MUST proactively detect and recover from stalled states. Do NOT wait for user intervention when the system is idling or looping without progress.
11
+
12
+ ## Stall Detection Protocol
13
+
14
+ You MUST self-monitor for these stall conditions:
15
+
16
+ | Symptom | Detection Rule | Recovery Action |
17
+ |---------|---------------|-----------------|
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` |
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
+ | 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
+ | Context thrash | Re-reading same files repeatedly without new action | Stop re-reading. State: "Already have context on [file]. Proceeding with [action]." |
23
+
24
+ ## Phase Reminder
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
31
+
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
+
34
+ ## Delegate Retry Enhancement
35
+
36
+ When a delegation has a transient dispatch failure (timeout, crash, or empty
37
+ response), check known causes first and allow at most one corrected retry per
38
+ agent/task. Do not retry a scope refusal or a failed test/validation; reroute
39
+ only when the correct specialist is clear, otherwise diagnose or escalate.
40
+ After a transient retry fails, follow the canonical fallback chain once and
41
+ escalate rather than restarting it. See `## ⏱️ Timeout & Retry Enforcement`.
42
+
43
+ ## Progress Checkpoint
44
+
45
+ For long-running or multi-phase tasks expected to run > 5 turns only:
46
+ - After turn 5: output `[CHECKPOINT] Completed so far: [summary]. Remaining: [list].`
47
+ - After turn 10: re-evaluate. If < 50% done, consider splitting or escalating.
48
+ - If 3 consecutive turns produce no tool calls: trigger Stall Detection Protocol (see above).
49
+
50
+ ## Heartbeat & Checkpoint Integration
51
+
52
+ Use checkpoints only for long-running or multi-phase work when `context_save` and `context_get` are available. Never add persistence calls for a bounded task.
53
+
54
+ ### Checkpoint / Pre-Compaction
55
+ Checkpoint only when context loss is plausible and both checkpoint tools are present. Save once at a meaningful boundary using `content=JSON.stringify(state)` and an explicit session ID; `state` must be an object with object-valued `phase`/`goal`/`delegations`/`heartbeat` fields and an array `tail`, and omit an unset `goal`. A successful save needs no immediate read. Checkpoints expire after 4h.
56
+
57
+ ### Context Retrieval
58
+ Read a checkpoint only when resuming a workflow with a known session ID. Do not retrieve it after every dispatch; carry ordinary handoffs in the task context.
59
+
60
+ ### Long-Session Progress
61
+ For long-lived multi-phase work, update an existing/requested progress record every 5 turns with completed and pending work and blockers. Do not create STATUS.md for a bounded task.
@@ -0,0 +1,71 @@
1
+ ---
2
+ description: "Council synthesis — dispatch 2-3 specialists inline for multi-perspective decisions with precedent fast-path, confidence cross-validation, rebuttal rounds, and Themis audit gate"
3
+ name: "Zeus Council Synthesis"
4
+ agents: [zeus]
5
+ fallback: shared
6
+ ---
7
+
8
+ # 🏛️ INLINE COUNCIL SYNTHESIS — /pantheon
9
+
10
+ Use an inline specialist council for material trade-offs, architecture/security choices, technology selection, cost/quality decisions, or multi-stakeholder questions. Do not use it for ordinary implementation tasks.
11
+
12
+ ## Dispatch and Synthesis
13
+
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
+ 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)`.
23
+
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.
25
+
26
+ ## Specialist Response Format
27
+
28
+ Require `## specialist_response` from `## Agent Return Format`: `position`, `reasoning`, `trade_offs`, `risks`, `confidence`, `agreement_signals`, and `specific_claims`.
29
+
30
+ ## Domain Map
31
+
32
+ | Domain | Candidate agents |
33
+ |---|---|
34
+ | Architecture | athena, hermes, demeter, themis |
35
+ | Security | themis, hermes, prometheus, nyx |
36
+ | Database | demeter, hermes, prometheus |
37
+ | AI/RAG | hephaestus, nyx |
38
+ | Infrastructure | prometheus, hermes, themis |
39
+ | Frontend/UX | aphrodite, themis, hermes |
40
+ | Observability | nyx, hermes |
41
+ | General | athena, themis, hermes |
42
+
43
+ ## User-Facing Synthesis
44
+
45
+ ```text
46
+ ## 🏛️ Council Synthesis
47
+ Question / date / response rate / timed-out agents / precedent / research context
48
+
49
+ ### Specialist Perspectives
50
+ | Agent | Position | Trade-offs | Confidence |
51
+
52
+ ### Agreements
53
+ - Points shared by multiple specialists
54
+
55
+ ### Divergences
56
+ | Issue | Sides | Resolution |
57
+
58
+ ### Evidence & Moderation (when used)
59
+ Research points, evidence, moderator verdict, cited sources, unresolved issues
60
+
61
+ ### Recommendation
62
+ Decisive conclusion
63
+
64
+ ### Audit Gate
65
+ Themis approved, or issues corrected
66
+
67
+ ### Decision Gate
68
+ Confidence adjusted for response rate
69
+ ```
70
+
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.
@@ -9,11 +9,11 @@ fallback: shared
9
9
 
10
10
  ## Routing
11
11
 
12
- Use the task-start memory result for context and static agent descriptions for routing. Do not add KV/cache calls to ordinary dispatches.
12
+ Reuse relevant memory already present in the request or task context. If prior project history matters and no result is present, Zeus may do one targeted search and pass useful hits with the delegation. Do not search on every turn or add KV/cache calls to ordinary dispatches.
13
13
 
14
14
  ## Council Decisions
15
15
 
16
- Before a council, search separately from the required task-start search:
16
+ Before a council, search separately from the task-level lookup only when a past council decision could affect the recommendation:
17
17
  `memory_search(query=question, top_k=2, namespace="council_decisions")`.
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.
@@ -22,5 +22,5 @@ Persist only reusable, material decisions. Use
22
22
  `key="council:<yyyy-mm-dd>:<slug>"`; JSON-stringify both `value` and
23
23
  `metadata` for `memory_store(namespace="council_decisions", ...)`. Keep the
24
24
  record concise: question, recommendation, specialists, confidence, unresolved
25
- trade-off, and timestamp. Use `default` for routine summaries and @mnemosyne
26
- for ADRs.
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.
@@ -1,18 +1,92 @@
1
1
  ---
2
- description: "Bounded retries and lightweight subtask routing for Zeus"
2
+ description: "Timeout enforcement, retry policies, subtask dispatch, and timeout tracking for Zeus"
3
3
  name: "Zeus Timeout & Retry"
4
4
  agents: [zeus]
5
5
  fallback: shared
6
6
  ---
7
7
 
8
- # Bounded delegation
8
+ # ⏱️ TIMEOUT & RETRY ENFORCEMENT
9
9
 
10
- Use the native `task()` result as the source of truth. Do not simulate per-agent timers, poll without a known background task ID, or check for reusable sessions through APIs that are not available. `routing.yml` defines the concurrency limit, retry count, and canonical fallback chains.
10
+ When a delegated agent does not respond in time, enforce the timeout policy from `routing.yml`.
11
11
 
12
- For a transient dispatch failure (timeout, crash, or empty response), retry that agent once. If it fails again, follow its configured fallback chain left-to-right once; if none is configured or the chain is exhausted, report what failed and stop. Never retry a refusal, failed test, validation, or migration as though it were a dispatch error. Do not restart an exhausted chain.
12
+ ## Timeout Behavior by Agent Role
13
13
 
14
- Fallbacks for auth/security/data/schema work must preserve specialist competence, Themis review, and human approval. Full-auto does not bypass these gates.
14
+ | Agent Role | Timeout | Retry Policy | Partial Results OK? | Reasoning Effort |
15
+ |------------|---------|--------------|---------------------|------------------|
16
+ | Explorer (@apollo) | 60s | 1 retry | ✅ Yes | low |
17
+ | Implementer (@hermes, @aphrodite, @demeter) | 180s | 1 retry | ❌ No | medium |
18
+ | Reviewer (@themis) | 120s | 1 retry | ❌ No | high |
19
+ | Infrastructure (@prometheus) | 300s | 1 retry | ❌ No | medium |
20
+ | Hotfix (@talos) | 30s | 1 retry | ✅ Yes | low |
21
+ | Remote Sensing (@gaia) | 120s | 1 retry | ✅ Yes | high |
15
22
 
16
- ## Lightweight subtask
23
+ ## Retry Flow
17
24
 
18
- For clear, bounded, reversible, low-risk work, dispatch directly to one specialist. Skip routine plan/artifact phases and discovery; ask the specialist to inspect only relevant context, make the change, run focused verification, and return `subtask_summary`. Add planning, artifacts, Themis review, or approval only when scope or risk requires them.
25
+ ```
26
+ Initial attempt → timeout/failure → log it → make at most one retry
27
+ └─ retry fails → try fallback agents left-to-right with original task/context
28
+ └─ all fallbacks fail (or none exist) → report the chain and escalate
29
+ ```
30
+ `background_delegation.retry_count: 1` means one retry after the initial attempt, not one total attempt. Never restart an exhausted chain automatically.
31
+
32
+ Apply the retry only to a transient dispatch failure (timeout, crash, or empty response). A failed test, validation, or migration is a result to diagnose, not a reason to repeat the same command or agent blindly. Track agents already tried: each agent may be retried at most once and each listed fallback may be tried at most once. For auth/security/data/schema work, a fallback must preserve specialist competence, Themis review, and human approval; otherwise stop and escalate. Never let full-auto bypass these gates.
33
+ An agent refusal or scope-boundary response is not a transient failure: do not retry it with a rephrased prompt. Correct the route once if the right specialist is clear; otherwise stop and ask.
34
+
35
+ ## Fallback Chain Definitions
36
+
37
+ `routing.yml` → `fallback_chains` is the canonical agent-by-agent mapping. Evaluate
38
+ the configured chain left-to-right; if an agent has no configured chain, stop
39
+ and escalate rather than guessing a fallback. Each listed fallback may be tried
40
+ at most once, and an exhausted chain is never restarted automatically.
41
+
42
+ ### Refusal Is a Routing Error
43
+
44
+ For a domain/scope refusal, do not retry with a rephrased prompt. Correct the
45
+ 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.
48
+
49
+ ### Escalation Protocol
50
+ 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
+
52
+ ### Session Reuse Check
53
+ Check for a reusable session before dispatch and obey `session_max` in `routing.yml`.
54
+
55
+ ---
56
+
57
+ # 📦 SUBTASK DISPATCH (Lightweight Delegation)
58
+
59
+ Subtask is a bounded, low-risk delegation mode that **skips** the standard artifact lifecycle. Choose it by risk and need for review, not by a fixed file/line count.
60
+
61
+ ## When to Use Subtask vs Full Task
62
+
63
+ Use the lightest path that safely meets the request. A multi-file but bounded low-risk change does not automatically need a plan/artifact phase.
64
+
65
+ ### Subtask Decision Tree (run BEFORE every delegation)
66
+
67
+ ```
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]
71
+
72
+ ALL YES → direct/lightweight execution; no routine plan or artifact
73
+ ANY NO → add only the planning, artifact, specialist review, and approval gates the risk requires
74
+ ```
75
+
76
+ ### Safety Rules
77
+ 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
79
+ 3. **No required Themis dependency** — sensitive/material output retains its review gate
80
+
81
+ ## Subtask Return Format
82
+ Return the required `## subtask_summary` fields defined in `## Agent Return Format`; include `memory_context` when memory was used.
83
+
84
+ ## Timeout Parcial (Partial Results)
85
+
86
+ Only agents marked ✅ in the Timeout Behavior table above may return partial results: @apollo (partial file list, e.g. "found 7 of 12 files before timeout"), @gaia (partial literature findings) and @talos (confirm progress if a hotfix times out). Never for implementers or reviewers — they must complete or fail. When dispatching with partial-OK, set the expectation: `@apollo Search for auth files. Timeout parcial OK — return whatever you have.`
87
+
88
+ ---
89
+
90
+ # 📊 TIMEOUT TRACKING
91
+
92
+ Track in-flight delegations against the Timeout Behavior table above. Log timeouts to `/memories/session/timeout-log.md` for later analysis.
@@ -22,8 +22,9 @@ export interface V2PermissionEvent {
22
22
  resources?: unknown
23
23
  /** Optional event identity is checked but never used as authority. */
24
24
  agent?: unknown
25
- /** Permission effect reported by the V2 host event. */
25
+ /** Mutable decision fields exposed by OpenCode V2's evaluate hook. */
26
26
  effect?: unknown
27
+ message?: unknown
27
28
  }
28
29
 
29
30
  export interface AuthoritativeSession {