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
@@ -1,25 +1,95 @@
1
1
  ---
2
2
  name: agent-coordination
3
- description: "Coordinate two or more specialists for substantial multi-phase work. Skip for questions, bounded fixes, and one-agent tasks."
3
+ description: "Multi-agent orchestration with model routing, category delegation, and sprint management. Use for coordinating Pantheon agents."
4
4
  context: fork
5
5
  globs: []
6
6
  alwaysApply: false
7
7
  ---
8
8
 
9
- # Agent coordination
9
+ # Agent Coordination
10
10
 
11
- Load only when the work genuinely needs multiple specialists or dependent phases. For the default routing, retry, and safety rules, follow Zeus and `pantheon://routing`.
11
+ Master guide to orchestrating the multi-agent system. Includes category routing, model selection, and sprint management for rapid, TDD-driven feature development.
12
12
 
13
- ## Lean coordination
13
+ ---
14
+
15
+ ## Agent Hierarchy
16
+
17
+ See `AGENTS.md` for the full agent table.
18
+
19
+ ---
20
+
21
+ ## Category Routing
22
+
23
+ Route tasks to optimized agents based on category instead of specifying agents manually:
24
+
25
+ | Category | Agent | Use For |
26
+ |----------|-------|---------|
27
+ | **Deep** | Athena, Hephaestus | Complex planning, AI pipelines |
28
+ | **Quick** | Talos, Apollo | Fast fixes, codebase search |
29
+ | **Ultrabrain** | Zeus | Multi-agent orchestration, model routing |
30
+
31
+ ---
32
+
33
+ ## Sprint Workflow
34
+
35
+ ```
36
+ 1. User describes feature
37
+ 2. @athena creates PLAN with phases and agents
38
+ 3. User approves PLAN (GATE 1)
39
+ 4. Zeus dispatches agents to phases (parallel when possible)
40
+ 5. Each agent: TDD cycle → writes IMPL artifact
41
+ 6. @themis reviews all phases (GATE 2)
42
+ 7. User reviews Themis findings
43
+ 8. If approved → user commits (GATE 3)
44
+ 9. @mnemosyne updates memory bank
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Parallel Execution Declaration
14
50
 
15
- 1. State the desired outcome and split only work with distinct ownership or dependencies. Ask @athena to plan only when scope, architecture, or acceptance criteria are materially unclear.
16
- 2. Assign each bounded task to the most specific configured specialist. Include relevant context, expected result, and focused verification; do not make @apollo rediscover context the implementer can inspect directly.
17
- 3. Dispatch independent tasks together only when native background delegation is enabled. Otherwise use normal `task()` calls. Do not create waves for a single task or poll without a returned task ID.
18
- 4. Collect summaries once, resolve dependencies, and report evidence, remaining risk, and blockers. Add @themis, artifacts, or user approval only where the task's risk or requested workflow requires them.
51
+ ```
52
+ 🔀 PARALLEL EXECUTION — Phase 2
53
+ Running simultaneously:
54
+ - @hermes → backend tests → .tmp/IMPL-phase2-hermes.md
55
+ - @aphrodite → frontend → .tmp/IMPL-phase2-aphrodite.md
56
+ - @demeter → migrations → .tmp/IMPL-phase2-demeter.md
57
+ Themis reviews all three after completion.
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Artifact Protocol
63
+
64
+ All phase outputs go to `.pantheon/memory-bank/.tmp/`. See `skill: artifact-management` for the complete protocol (who generates what, templates, lifecycle).
65
+
66
+ ---
67
+
68
+ ## Safety Gates
69
+
70
+ | Gate | When | Why |
71
+ |------|------|-----|
72
+ | **GATE 1** | After PLAN | User confirms scope |
73
+ | **GATE 2** | After Themis review | User sees changes |
74
+ | **GATE 3** | Before git commit | User controls history |
75
+
76
+ ---
77
+
78
+ ## Model Selection
79
+
80
+ Model routing is handled by Prometheus and the platform configuration. Zeus delegates model selection to the tier system (`fast` / `default` / `coding` / `premium`).
81
+
82
+ - **Deep tasks** → High-quality models (Claude, GPT-4)
83
+ - **Quick tasks** → Fast/cheap models (Haiku, 4o-mini)
84
+ - **Visual tasks** → Multimodal models (GPT-4V, Claude Vision)
85
+ - **Cost optimization** → Route to cheapest model that meets quality bar
86
+
87
+ ---
19
88
 
20
- ## Boundaries
89
+ ## Anti-Patterns
21
90
 
22
- - Zeus coordinates; implementation agents inspect, edit, and verify their assigned scope.
23
- - Preserve auth/security, data/schema, destructive-action, production, and permission gates.
24
- - Do not commit, push, merge, deploy, or broaden scope without explicit authorization.
25
- - Model selection comes from the active configured preset; do not invent a model tier or price.
91
+ - ❌ Zeus doing implementation work (orchestrates, doesn't code)
92
+ - ❌ Skipping TDD cycle (RED → GREEN → REFACTOR)
93
+ - ❌ Auto-committing without user approval
94
+ - ❌ Parallel phases with dependencies (order matters)
95
+ - ❌ Ignoring Themis CRITICAL findings
@@ -52,8 +52,6 @@ Full-auto may continue only within a task and scope the user explicitly authoriz
52
52
 
53
53
  ---
54
54
 
55
- ---
56
-
57
55
  ## Implementation Pattern
58
56
 
59
57
  ```
@@ -165,25 +163,26 @@ Should I now run the migration tests? [waiting]
165
163
 
166
164
  ## Session Heartbeat & Checkpoints
167
165
 
168
- Use checkpoints only when `context_save` and `context_get` are explicitly present
169
- in the active session's tool list. Standalone OpenCode V2 agent profiles do not
170
- currently grant these tools; in that case, do not attempt a checkpoint or guess
171
- a session ID. Carry forward the phase and remaining tasks in the normal task
172
- handoff instead.
166
+ Session state is **not** file-based. It lives in **pantheon-persistence** under the
167
+ `checkpoint:<slug>` namespace and is cleaned up automatically by a 4h TTL.
168
+
169
+ Use checkpoints only when `context_save` and `context_get` are explicitly
170
+ present in the active session's tool list. If unavailable, do not attempt a
171
+ checkpoint or guess a session ID; carry the handoff in the normal response.
173
172
 
174
- When the tools are available, write state with `context_save(slug=slug, key=key, content=JSON.stringify(state), session_id=...)` and read it back with
175
- `context_get(slug=slug, key="latest", session_id=...)`. Capture `session_id` from the first `context_save`
176
- of the session and reuse it for the rest of the session, so the `latest` pointer survives
177
- compaction. `state` must be an object — never pass a bare string as `content`: its
173
+ When available, call `context_save` with `content=JSON.stringify(state)` and an
174
+ explicit `session_id`. A successful save needs no immediate `context_get`; read
175
+ only when resuming or when the save result is uncertain. Reuse the same session
176
+ ID so the `latest` pointer survives compaction. `state` must be an object — never pass a bare string as `content`: its
178
177
  `goal`/`phase`/`delegations`/`heartbeat` values are objects and `tail` is an array.
179
178
  `goal` is optional; when unset, omit the key rather than passing a string placeholder.
180
179
 
181
180
  ### Heartbeat Check
182
- - When checkpoint tools are available, an old heartbeat (>300s) is a stall signal; log it before resuming.
183
- - Write a heartbeat after anti-stall recovery only when the current session exposes the checkpoint tools.
181
+ - Check heartbeat only when checkpoint tools are available and the workflow needs a durable resume.
182
+ - Write a heartbeat after anti-stall recovery only when the current session exposes checkpoint tools.
184
183
 
185
184
  ### Checkpoint Rules
186
- 1. Save checkpoints for long-running/multi-phase work, context-loss risk, or substantive parallel work — not a one-off command or bounded fix, and only when the tools are available
185
+ 1. Save checkpoints only for long-running/multi-phase work, context-loss risk, or substantive parallel work — not a one-off command or bounded fix
187
186
  2. Include current phase and remaining tasks when a checkpoint is warranted
188
187
  3. On resume, read the latest checkpoint only with a known session ID; otherwise request the missing handoff context.
189
188