pantheon-opencode 1.4.3 → 1.5.0-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.
- package/.pantheon/code-mode/README.md +93 -0
- package/.pantheon/code-mode/checkpoint-session.py +7 -0
- package/.pantheon/code-mode/checkpoint-session.sh +11 -0
- package/.pantheon/code-mode/checkpoint_session.py +481 -0
- package/.pantheon/code-mode/compress-inline.py +450 -0
- package/.pantheon/code-mode/eval-llm-judge.py +255 -0
- package/.pantheon/code-mode/eval-monte-carlo.py +368 -0
- package/.pantheon/code-mode/eval-run.py +197 -0
- package/.pantheon/code-mode/eval-static.py +321 -0
- package/.pantheon/code-mode/example-sync.sh +5 -0
- package/.pantheon/code-mode/manifest.json +21 -0
- package/.pantheon/code-mode/session-end-save.py +186 -0
- package/.pantheon/code-mode/session-end-save.sh +18 -0
- package/.pantheon/code-mode/test-allowed.sh +5 -0
- package/.pantheon/code-mode/test-auto-continue-checkpoint.sh +179 -0
- package/.pantheon/code-mode/test-env.sh +7 -0
- package/.pantheon/code-mode/test-prlimit.sh +9 -0
- package/.pantheon/code-mode/test-timeout.sh +6 -0
- package/CHANGELOG.md +1026 -0
- package/README.md +292 -1080
- package/README.pt-BR.md +308 -0
- package/bin/pantheon-init.mjs +207 -31
- package/opencode.json +1 -0
- package/package.json +34 -14
- package/plugin.json +15 -0
- package/pyproject.toml +65 -0
- package/scripts/_pantheon_paths.py +48 -7
- package/scripts/ci-validate-yaml.py +7 -2
- package/scripts/code_mode_server.py +451 -44
- package/scripts/cost.mjs +30 -14
- package/scripts/doctor.mjs +306 -129
- package/scripts/generate-preset-docs.mjs +127 -66
- package/scripts/generate-prompts.sh +2 -2
- package/scripts/install/cli-ui.mjs +23 -10
- package/scripts/install/config-migration.mjs +399 -0
- package/scripts/install/health-check.mjs +3 -3
- package/scripts/install/model-picker.mjs +72 -23
- package/scripts/install/opencode-version.mjs +47 -0
- package/scripts/install/opencode.mjs +396 -121
- package/scripts/install/plugin.mjs +89 -49
- package/scripts/install/shared.mjs +55 -159
- package/scripts/install/strings.mjs +129 -0
- package/scripts/install-mcp.mjs +45 -232
- package/scripts/manifest-inventory.mjs +410 -0
- package/scripts/mcp_persistence_server.py +798 -60
- package/scripts/mcp_resources_server.py +144 -40
- package/scripts/memory_mcp_server.py +2 -2
- package/scripts/package-evidence.mjs +242 -0
- package/scripts/probe-context-rehydrate.mjs +240 -0
- package/scripts/probe-pantheon-cost.mjs +313 -0
- package/scripts/recover-zenodo-deposition.mjs +146 -0
- package/scripts/release-beta-version.mjs +56 -60
- package/scripts/sync-artifacts.mjs +169 -0
- package/scripts/sync-tui.mjs +135 -42
- package/scripts/test-opencode-v1-v2-sandbox.sh +862 -0
- package/scripts/uninstall.mjs +298 -954
- package/scripts/validate-zenodo-release.mjs +154 -0
- package/scripts/validation-policy.mjs +7 -7
- package/scripts/version-check.mjs +113 -108
- package/scripts/versioning.mjs +230 -86
- package/scripts/zenodo-artifact.mjs +21 -0
- package/scripts/zenodo-release-state.mjs +53 -0
- package/src/agents/mnemosyne.md +1 -1
- package/src/agents/zeus.md +27 -16
- package/src/mcp/_pantheon_paths.py +48 -7
- package/src/mcp/code_mode_server.py +451 -44
- package/src/mcp/eval_store.py +1 -1
- package/src/mcp/mcp_persistence_server.py +798 -60
- package/src/mcp/mcp_resources_server.py +144 -40
- package/src/mcp/pantheon_vision_server.py +1 -1
- package/src/mcp/toon_codec.py +491 -0
- package/src/pantheon/auto-wake.ts +1 -5
- package/src/pantheon/background-job-board.ts +110 -2
- package/src/pantheon/compaction-handoff.ts +304 -0
- package/src/pantheon/cost-command.ts +356 -69
- package/src/pantheon/delegate-manager.ts +766 -0
- package/src/pantheon/delegation-classifier.ts +307 -0
- package/src/pantheon/delegation-enforce.ts +13 -12
- package/src/pantheon/delegation-finalize.ts +406 -0
- package/src/pantheon/delegation-notify.ts +212 -0
- package/src/pantheon/delegation-toast.ts +73 -0
- package/src/pantheon/delegation.ts +1337 -0
- package/src/pantheon/file-persistence-salvage.ts +64 -0
- package/src/pantheon/file-persistence.ts +194 -45
- package/src/pantheon/goal-loop.ts +2 -2
- package/src/pantheon/goal-store.ts +1 -1
- package/src/pantheon/hashline/tool.ts +2 -2
- package/src/pantheon/model-command.ts +2 -1
- package/src/pantheon/native-probe.ts +234 -0
- package/src/pantheon/native-task-status.ts +139 -0
- package/src/pantheon/permission-eval.ts +284 -0
- package/src/pantheon/provider-capabilities.ts +221 -0
- package/src/pantheon/provider-stream-tracker.ts +182 -0
- package/src/pantheon/shared-board.ts +37 -0
- package/src/pantheon/step-cap.ts +110 -0
- package/src/pantheon/task-result-guard.ts +107 -0
- package/src/pantheon/token-opt.ts +689 -0
- package/src/pantheon/tool-ceiling.ts +159 -0
- package/src/pantheon/toon-codec.ts +481 -0
- package/src/pantheon/tui-version-check.ts +1 -3
- package/src/pantheon/v2-bridge.ts +129 -0
- package/src/pantheon/v2-events.ts +148 -0
- package/src/pantheon/v2-hooks.ts +287 -0
- package/src/pantheon/v2-tool-definitions.ts +331 -0
- package/src/pantheon/zeus-delegate-with-retry.ts +406 -0
- package/src/plugin-v2/index.ts +21 -0
- package/src/plugin-v2.ts +824 -0
- package/src/plugin.ts +261 -51
- package/src/plugins/pantheon-hooks.ts +51 -0
- package/src/plugins/tui/dist/tui.d.ts +116 -24
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +416 -149
- package/src/plugins/tui/dist/tui.tsx +456 -87
- package/src/plugins/tui/package-lock.json +51 -51
- package/src/plugins/tui/package.json +7 -7
- package/src/plugins/tui/src/index.tsx +462 -95
- package/src/skills/README.md +0 -2
- package/src/pantheon/tool-context.ts +0 -41
package/README.md
CHANGED
|
@@ -1,1161 +1,373 @@
|
|
|
1
|
+
# Pantheon
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
**A clearer way to work with OpenCode on real software projects.** Pantheon
|
|
4
|
+
brings planning, implementation, review, and documentation into one guided
|
|
5
|
+
experience. It is an OpenCode plugin and installer for teams and developers who
|
|
6
|
+
want useful structure without giving up control of their code.
|
|
3
7
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="License"></a>
|
|
7
|
-
<a href="docs/agents/README.md"><img src="https://img.shields.io/badge/agents-14-purple" alt="Agents"></a>
|
|
8
|
-
<a href="src/skills/README.md"><img src="https://img.shields.io/badge/skills-21-orange" alt="Skills"></a>
|
|
9
|
-
<a href="commands/"><img src="https://img.shields.io/badge/commands-11-red" alt="Commands"></a>
|
|
10
|
-
<a href="https://github.com/ils15/pantheon/actions"><img src="https://img.shields.io/github/actions/workflow/status/ils15/pantheon/ci.yml?branch=main&label=CI" alt="CI"></a>
|
|
11
|
-
</p>
|
|
8
|
+
[Português (Brasil)](README.pt-BR.md) ·
|
|
9
|
+
[Repository](https://github.com/ils15/pantheon-opencode) · [MIT License](LICENSE)
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
[](https://github.com/ils15/pantheon-opencode/releases/latest)
|
|
12
|
+
[](https://github.com/ils15/pantheon-opencode/actions)
|
|
13
|
+
[](https://doi.org/10.5281/zenodo.22306637)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## What is it?
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Pantheon is a companion for [OpenCode](https://opencode.ai/) that helps you
|
|
18
|
+
move from an idea to a reviewed change. It gives your coding sessions a shared
|
|
19
|
+
way to plan work, make progress, check results, and keep useful project context.
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Quick Links
|
|
22
|
-
|
|
23
|
-
| Resource | Link |
|
|
24
|
-
|----------|------|
|
|
25
|
-
| 📖 **Agent Reference** | [docs/agents/README.md](docs/agents/README.md) — all 14 agents |
|
|
26
|
-
| 📖 **Skills Reference** | [src/skills/README.md](src/skills/README.md) — all 21 skills |
|
|
27
|
-
| 🚀 **Installation Guide** | [docs/INSTALLATION.md](docs/INSTALLATION.md) |
|
|
28
|
-
| 🔌 **MCP Server Guide** | [docs/mcp-recommendations.md](docs/mcp-recommendations.md) — recommended MCP servers for each project type |
|
|
29
|
-
| 🔌 **MCP Tool Registry** | [docs/mcp-tools.md](docs/mcp-tools.md) — canonical MCP tool reference |
|
|
30
|
-
| 🔌 **MCP User Guide** | [docs/mcp-user-guide.md](docs/mcp-user-guide.md) — adding custom MCP servers |
|
|
31
|
-
| ⚡ **Quick Start** | [docs/QUICKSTART.md](docs/QUICKSTART.md) |
|
|
32
|
-
| ⚡ **OpenCode Guide** | [docs/platforms/opencode.md](docs/platforms/opencode.md) |
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Overview
|
|
37
|
-
|
|
38
|
-
Traditional single-agent coding produces mediocre results because one agent attempts to
|
|
39
|
-
plan, implement, test, review, and document simultaneously. The result is context
|
|
40
|
-
fragmentation, skipped tests, and generic code.
|
|
41
|
-
|
|
42
|
-
**Pantheon** solves this with **specialization**: each agent is an expert at exactly
|
|
43
|
-
one thing and is invoked only when that expertise is needed. Agents collaborate through a
|
|
44
|
-
conductor-delegate architecture where Zeus (the orchestrator) dispatches work to
|
|
45
|
-
specialized sub-agents with isolated context windows, enforced quality gates, and human
|
|
46
|
-
approval at every transition.
|
|
47
|
-
|
|
48
|
-
| Metric | Single Agent | Pantheon |
|
|
49
|
-
|--------|-------------|----------|
|
|
50
|
-
| Average test coverage | 65–75% | **92%** |
|
|
51
|
-
| TDD enforcement | Optional | **Enforced (RED→GREEN→REFACTOR)** |
|
|
52
|
-
| Code review cadence | End of feature | **After every phase** |
|
|
53
|
-
| Bugs reaching production | 3–5 per feature | **Near zero** |
|
|
54
|
-
| Context efficiency | 10–20% reasoning | **70–80% reasoning** |
|
|
55
|
-
| Parallel execution | Sequential only | **Multi-agent parallel** |
|
|
56
|
-
| Documentation | Manual | **Auto-committed in git** |
|
|
57
|
-
| Architecture pattern | Monolithic | **Specialized conductor-delegate** |
|
|
58
|
-
|
|
59
|
-
> Metrics based on internal benchmarks across 50+ feature implementations in the Pantheon
|
|
60
|
-
> test suite. Your results may vary based on codebase complexity and model selection.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## How It Works
|
|
21
|
+
## Why use it?
|
|
65
22
|
|
|
66
|
-
|
|
67
|
-
|
|
23
|
+
- **Less context switching:** keep planning and building in the same workflow.
|
|
24
|
+
- **More deliberate changes:** ask for reviews and checks before calling work
|
|
25
|
+
finished.
|
|
26
|
+
- **A repeatable starting point:** use the same setup across projects and
|
|
27
|
+
collaborators.
|
|
28
|
+
- **You stay in charge:** Pantheon supports your decisions; it does not replace
|
|
29
|
+
your judgment or your review of generated code.
|
|
68
30
|
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
config:
|
|
72
|
-
look: classic
|
|
73
|
-
theme: dark
|
|
74
|
-
layout: elk
|
|
75
|
-
---
|
|
76
|
-
flowchart TD
|
|
77
|
-
classDef user fill:#2d5a8c,stroke:#5a8ac4,stroke-width:2px,color:#e2e8f0
|
|
78
|
-
classDef core fill:#1f2937,stroke:#4b5563,stroke-width:2px,color:#f3f4f6,font-weight:bold
|
|
79
|
-
classDef planner fill:#1e3a5f,stroke:#3b82f6,stroke-width:2px,color:#dbeafe
|
|
80
|
-
classDef ai fill:#4a1a3f,stroke:#c084fc,stroke-width:2px,color:#f3e8ff
|
|
81
|
-
classDef executor fill:#7c2d12,stroke:#ea580c,stroke-width:2px,color:#fed7aa
|
|
82
|
-
classDef qa fill:#3f1a3e,stroke:#d946a6,stroke-width:2px,color:#f5d1f8
|
|
83
|
-
classDef infra fill:#1e3a3f,stroke:#14b8a6,stroke-width:2px,color:#ccfbf1
|
|
84
|
-
classDef ops fill:#1e294b,stroke:#60a5fa,stroke-width:1px,color:#bfdbfe
|
|
85
|
-
classDef gate fill:#1f1f1f,stroke:#fbbf24,stroke-width:2px,color:#fbbf24,stroke-dasharray: 5 5
|
|
86
|
-
|
|
87
|
-
User["You / Human"]:::user
|
|
88
|
-
Gate0{{"⏸️ Gate 0<br/>Approve Decision"}}:::gate
|
|
89
|
-
Gate1{{"⏸️ Gate 1<br/>Approve Plan"}}:::gate
|
|
90
|
-
Gate2{{"⏸️ Gate 2<br/>Approve Review"}}:::gate
|
|
91
|
-
Gate3{{"⏸️ Gate 3<br/>Commit"}}:::gate
|
|
92
|
-
|
|
93
|
-
subgraph Orchestrator["Orchestrator"]
|
|
94
|
-
Zeus["Zeus<br/>Central Coordinator"]:::core
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
subgraph Plan["Planning & Discovery"]
|
|
98
|
-
|
|
99
|
-
Athena["Athena<br/>Strategic Planner"]:::planner
|
|
100
|
-
Apollo["Apollo<br/>Codebase Scout"]:::planner
|
|
101
|
-
Nyx["Nyx<br/>Observability"]:::planner
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
subgraph AI["AI Infrastructure"]
|
|
105
|
-
Hephaestus["Hephaestus<br/>AI Pipelines<br/>RAG / LangChain"]:::ai
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
subgraph Impl["Implementation<br/>Parallel Execution"]
|
|
109
|
-
Hermes["Hermes<br/>Backend APIs"]:::executor
|
|
110
|
-
Aphrodite["Aphrodite<br/>Frontend UI"]:::executor
|
|
111
|
-
Demeter["Demeter<br/>Database"]:::executor
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
subgraph Quality["Quality & Observability"]
|
|
115
|
-
Themis["Themis<br/>Security & Coverage Audit"]:::qa
|
|
116
|
-
Nyx["Nyx<br/>Observability<br/>Tracing & Cost"]:::qa
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
subgraph Deploy["Deployment & Release"]
|
|
120
|
-
Prometheus["Prometheus<br/>Infrastructure<br/>Docker / CI/CD"]:::infra
|
|
121
|
-
Iris["Iris<br/>GitHub Operations<br/>PR / Release"]:::ops
|
|
122
|
-
Mnemosyne["Mnemosyne<br/>Documentation<br/>Memory Bank"]:::ops
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
subgraph Express["Express Lane"]
|
|
126
|
-
Talos["Talos<br/>Rapid Hotfixes"]:::qa
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
subgraph Domain["Domain Specialist"]
|
|
130
|
-
Gaia["Gaia<br/>Remote Sensing"]:::planner
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
User -->|"/implement-feature"| Zeus
|
|
134
|
-
|
|
135
|
-
Gate0 -->|Approved| Zeus
|
|
136
|
-
Zeus -->|Phase 1| Athena
|
|
137
|
-
Athena -->|Discovers| Apollo
|
|
138
|
-
Apollo -->|Findings| Athena
|
|
139
|
-
Athena --> Gate1
|
|
140
|
-
Gate1 -->|Approved| Zeus
|
|
141
|
-
|
|
142
|
-
Zeus -->|"Phase 2 (AI Infrastructure)"| AI
|
|
143
|
-
Hephaestus --> Zeus
|
|
144
|
-
|
|
145
|
-
Zeus -->|"Phase 3 (Implementation)"| Impl
|
|
146
|
-
Hermes & Aphrodite & Demeter --> Quality
|
|
147
|
-
|
|
148
|
-
Impl -.->|Nested Apollo| Apollo
|
|
149
|
-
|
|
150
|
-
Nyx --> Themis
|
|
151
|
-
Themis --> Gate2
|
|
152
|
-
Gate2 -->|Approved| Zeus
|
|
153
|
-
|
|
154
|
-
Zeus -->|"Phase 4 (Deploy & Release)"| Deploy
|
|
155
|
-
Prometheus & Iris & Mnemosyne --> Gate3
|
|
156
|
-
Gate3 -->|"git commit"| User
|
|
157
|
-
|
|
158
|
-
User -.->|"/fix"| Express
|
|
159
|
-
User -.->|"/plan-architecture"| Domain
|
|
160
|
-
```
|
|
31
|
+
## Start in 2 minutes
|
|
161
32
|
|
|
162
|
-
|
|
33
|
+
Requirements: [OpenCode 1.18.4+](https://opencode.ai/docs/) and Node.js 22+.
|
|
163
34
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- **OpenCode** — Pantheon v1.0 is OpenCode-only. [Installation guide](docs/INSTALLATION.md).
|
|
35
|
+
From the project where you want to use Pantheon:
|
|
167
36
|
|
|
168
37
|
```bash
|
|
169
|
-
# Interactive TUI (default) — select components visually
|
|
170
38
|
npx pantheon-opencode init
|
|
171
|
-
|
|
172
|
-
# Headless mode — for CI and automation
|
|
173
|
-
npx pantheon-opencode init --headless
|
|
174
|
-
|
|
175
|
-
# (Optional) Install + activate a model routing preset
|
|
176
|
-
npx pantheon-opencode init --preset go-fast
|
|
177
|
-
|
|
178
|
-
# (Optional) Install MCP servers + skills + TUI plugin
|
|
179
|
-
npm run setup
|
|
180
|
-
|
|
181
|
-
# Launch OpenCode with background subagents
|
|
182
|
-
export OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true
|
|
183
39
|
opencode
|
|
184
40
|
```
|
|
185
41
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
| | V1 | V2 (beta) |
|
|
191
|
-
|---|---|---|
|
|
192
|
-
| Binary | `opencode` (1.18.18) | `opencode2` (v0.0.0-next-17444) |
|
|
193
|
-
| Config locations | `~/.config/opencode/`, `<project>/opencode.json`, `.opencode/` | Same — V2 reads the same locations |
|
|
194
|
-
| Config handling | Loads V1 shape directly | Normalizes V1 fields **in memory** — no rewrite, no native V2 conversion |
|
|
195
|
-
| State DB | `~/.local/share/opencode/opencode.db` | `~/.local/share/opencode/opencode-v2.db` (isolated via `OPENCODE_DB`) |
|
|
196
|
-
| Service port | 49374 | 49375 (must differ from V1) |
|
|
197
|
-
|
|
198
|
-
The `pantheon_cost` report preserves the V1 database default. Set
|
|
199
|
-
`PANTHEON_OPENCODE_VERSION=v1` or `v2` to select the corresponding state DB
|
|
200
|
-
explicitly (`opencode.db` or `opencode-v2.db`). For custom installations,
|
|
201
|
-
`PANTHEON_COST_DB=/absolute/path/to/opencode.db` takes precedence over the
|
|
202
|
-
version selector; an explicit `dbPath` supplied by the tool caller takes
|
|
203
|
-
precedence over both. The resolver never probes the other version's database,
|
|
204
|
-
and reports an actionable error when the selected DB is missing or has an
|
|
205
|
-
incompatible schema.
|
|
206
|
-
|
|
207
|
-
**What changed for V2 compatibility (Phase 3):**
|
|
208
|
-
|
|
209
|
-
- `subagent_depth` moved from top-level to `experimental.subagent_depth` — V2 silently ignores the top-level key. The installer migrates existing configs automatically.
|
|
210
|
-
- Instruction content consolidated into `AGENTS.md` (generated by `scripts/build-agents-md.mjs` from `src/instructions/*.instructions.md`) — V2 accepts but does **not** load the `instructions` config key; both versions auto-load `AGENTS.md`.
|
|
211
|
-
- `npx pantheon-opencode init --version v2` labels an install for V2 (informational — the config is shared).
|
|
212
|
-
|
|
213
|
-
**Known V2 beta gaps:**
|
|
214
|
-
|
|
215
|
-
- `instructions` config key accepted but not loaded → content lives in `AGENTS.md`.
|
|
216
|
-
- `formatter` / `lsp` config not executed.
|
|
217
|
-
- `--subtask` delegation flag is a no-op.
|
|
218
|
-
|
|
219
|
-
### Background Delegation
|
|
220
|
-
|
|
221
|
-
Zeus (and other root sessions) dispatch agents as **background child sessions**
|
|
222
|
-
via OpenCode's native `task(background=true, ...)` API. The plugin layer keeps a
|
|
223
|
-
persistent job board (`BackgroundJobBoard`, `.pantheon/board/state.json`, 24h
|
|
224
|
-
TTL) that tracks in-flight work and carries it forward across context
|
|
225
|
-
compaction, so a compacted session does not lose track of running delegations.
|
|
226
|
-
|
|
227
|
-
The plugin no longer ships a delegate toolset (`pantheon_delegate`,
|
|
228
|
-
`pantheon_delegation_read`, `pantheon_delegation_list` were removed in 1.4.3).
|
|
229
|
-
Dispatch and result collection use the native `task()` / `task_status()` API.
|
|
230
|
-
|
|
231
|
-
**Completion visibility — zero chat noise.** Delegation notifications are never
|
|
232
|
-
injected into the chat transcript: neither `chat.message` nor any other chat
|
|
233
|
-
hook or transcript marker is used as a delivery channel. When a job reaches a
|
|
234
|
-
terminal state, the plugin writes a file-only audit log line (echo opt-in via
|
|
235
|
-
`PANTHEON_HOOKS_LOG`). Completion visibility lives in the legitimate channels:
|
|
236
|
-
the board `[unread]` marker, TUI toasts (`PANTHEON_TOASTS` gate), and compaction
|
|
237
|
-
carry-forward. Reconcile is an acknowledgment, not a completion — it never
|
|
238
|
-
re-fires the terminal transition.
|
|
239
|
-
|
|
240
|
-
**Timeout:** `background_delegation.timeout_ms` (default `900000` = 15 min). A job
|
|
241
|
-
that has not reached a terminal state is finalized as `error`/`timedOut`.
|
|
242
|
-
|
|
243
|
-
**Compaction carry-forward:** during context compaction, running and unread
|
|
244
|
-
terminal delegations (capped at `background_delegation.max_compaction_items`,
|
|
245
|
-
default 10) are carried into the compacted context so the parent doesn't lose
|
|
246
|
-
track of in-flight work.
|
|
247
|
-
|
|
248
|
-
**Compaction summary v2 (1.3.4):** the `experimental.session.compacting` hook
|
|
249
|
-
now emits sections in a stable order — `<pantheon-context directive>`
|
|
250
|
-
("preserve these sections verbatim in the summarized context", emitted only
|
|
251
|
-
when at least one other section follows), `<mission_context>` (active,
|
|
252
|
-
non-done goals), `<todo_context>` (pending todos), then the delegation blocks
|
|
253
|
-
(running, then unread terminal ≤ `max_compaction_items`) byte-for-byte
|
|
254
|
-
unchanged. Each source is fail-open: a disabled, unscoped (no sessionID),
|
|
255
|
-
throwing, or empty source omits its section (warned to `hooks.log`), and a
|
|
256
|
-
totally-empty state returns nothing — the hook injects nothing, preserving
|
|
257
|
-
the pre-1.3.4 behavior.
|
|
258
|
-
|
|
259
|
-
**Post-compaction todo preservation (1.3.4):** the session's todo list is
|
|
260
|
-
captured via the `session.todo` GET at compacting time and restored by
|
|
261
|
-
intercepting the first `todowrite` after `session.compacted` — opencode
|
|
262
|
-
1.18.x exposes no todo write API, so that first `todowrite` has its args
|
|
263
|
-
rewritten with the exact captured list (no model cooperation, zero transcript
|
|
264
|
-
noise). Subsequent `todowrite` calls inside the 5s restore window are denied
|
|
265
|
-
with a clear "retry in a moment" error; the snapshot TTL is 60s. Fail-open: a
|
|
266
|
-
failed capture, expired snapshot, or malformed hook output degrades to a
|
|
267
|
-
logged warn and pass-through.
|
|
268
|
-
|
|
269
|
-
**Post-compaction state re-assertion (1.3.4):** on `session.compacted`, fresh
|
|
270
|
-
state — running/unread delegations from the board + active goals, capped at 10
|
|
271
|
-
lines — remains available through compaction carry-forward. A session with
|
|
272
|
-
nothing to assert is a silent skip; no chat transcript injection is performed.
|
|
273
|
-
|
|
274
|
-
**Preemptive compaction check (1.3.4):** a pure threshold core
|
|
275
|
-
(`preemptive-compact.ts`) warns the model before the context fills: at 78%
|
|
276
|
-
usage, re-warning only when usage rose ≥5pp since the last warning. It is
|
|
277
|
-
dormant / ready-to-wire — opencode 1.18.x exposes no runtime context-usage
|
|
278
|
-
percentage, so nothing observes it yet; when a source appears, the caller
|
|
279
|
-
wires it in (the enqueue callback is injected).
|
|
280
|
-
|
|
281
|
-
**Model selection (1.4.1):** the child session inherits the parent session's
|
|
282
|
-
model through OpenCode. A model override is supplied only when the active
|
|
283
|
-
routing profile defines one; no model API-key validation is performed here.
|
|
284
|
-
|
|
285
|
-
**agentModels wiring (1.3.4):** `loadRoutingAgentModels` extracts only the
|
|
286
|
-
per-agent models from the explicitly active routing profile and passes them as
|
|
287
|
-
`options.agentModels`. No active profile, missing profile entry, or profile
|
|
288
|
-
without `model` produces an empty map; there is no implicit first-preset or
|
|
289
|
-
DeepSeek fallback. A missing or unparseable `routing.yml` is fail-open and
|
|
290
|
-
omits the child model.
|
|
291
|
-
|
|
292
|
-
**Delegation log hygiene (1.3.4):** `delegations.log` now records the real
|
|
293
|
-
`task_id` (omitted when empty, never `""`) and a **numeric** `duration_ms`
|
|
294
|
-
(null when unset) so downstream aggregation works. Terminal events are
|
|
295
|
-
file-only audit entries; completion is surfaced by TUI toast (when enabled)
|
|
296
|
-
and the board — never by chat delivery.
|
|
297
|
-
|
|
298
|
-
**Env vars & config:**
|
|
299
|
-
|
|
300
|
-
- `OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true` — required (see launch block above).
|
|
301
|
-
- `PANTHEON_TOASTS` — TUI toast gate for the delegation lifecycle signals.
|
|
302
|
-
Default `{errors, delegations, council}`; `PANTHEON_TOASTS=off` disables all
|
|
303
|
-
TUI toasts (delegation signals then only surface via the board `[unread]`
|
|
304
|
-
marker and the on-disk audit log — never via chat.message injection from the
|
|
305
|
-
plugin).
|
|
306
|
-
- `background_delegation` section in `src/routing.yml` — `timeout_ms`,
|
|
307
|
-
`poll_ms`, `max_compaction_items`, `prune_ttl_ms`, `session_max`,
|
|
308
|
-
`retry_count`.
|
|
309
|
-
|
|
310
|
-
See `src/agents/zeus.md` for the agent-facing delegation protocol.
|
|
311
|
-
|
|
312
|
-
### Real-time Delegations panel (1.3.4)
|
|
313
|
-
|
|
314
|
-
The TUI sidebar ships a live **Delegations** panel (open by default, above the
|
|
315
|
-
collapsed Sessions list). Its primary source is `api.client.session.children`,
|
|
316
|
-
so it shows **both** kinds of background work in one place:
|
|
317
|
-
|
|
318
|
-
- **Board-tracked children** — rendered with their board alias tag
|
|
319
|
-
(`[apo-1]`) and enriched from the `.pantheon/delegations/` report.
|
|
320
|
-
- **Native `task()` children** — rendered with a distinct `[task]` tag (info
|
|
321
|
-
color) when no board report exists for the session.
|
|
322
|
-
|
|
323
|
-
Rows animate through the delegation lifecycle — a 140ms spinner plus
|
|
324
|
-
`DELEGATING` / `WORKING` / `READING RESULT` / `DONE` / `DONE (TIMED OUT)` /
|
|
325
|
-
`ERROR` / `CANCELLED` — and **clicking a row navigates to the child session**
|
|
326
|
-
(route API, guarded; mouse enabled in `tui.json`). The panel also reads the
|
|
327
|
-
md reports from **every** session (`readAllDelegationEntries`), so the full
|
|
328
|
-
delegation history renders even when no session is focused. Refresh is driven
|
|
329
|
-
by session events + `message.part.updated/removed` (live version bumps) with a
|
|
330
|
-
1s safety poll; every re-fetch appends a diagnostic
|
|
331
|
-
`panel: children=N md=N events=N` line to `.pantheon/logs/hooks.log`
|
|
332
|
-
(silence-by-default policy — see `PANTHEON_HOOKS_LOG`). Everything is
|
|
333
|
-
fail-open: a missing children API or directory renders `Delegations (0)` /
|
|
334
|
-
the md history instead of erroring.
|
|
335
|
-
|
|
336
|
-
> **Modes:** Interactive TUI with checkbox selection (default TTY), or `--headless` for scripts/CI.
|
|
337
|
-
> **Minimal:** `--headless --no-mcp` installs only agents (~2s).
|
|
338
|
-
> **Full:** `--headless` also creates Python venv + MCP servers (memory, persistence, KV, vision).
|
|
339
|
-
|
|
340
|
-
### Doctor validation statuses
|
|
341
|
-
|
|
342
|
-
The doctor reports each check as **PASS**, **WARN**, **ERROR**, or **SKIP**. WARN is
|
|
343
|
-
advisory and exits 0; ERROR is blocking and exits 2. The `global` and `sandbox`
|
|
344
|
-
profiles require the core `pantheon-memory` and `pantheon-resources` MCPs, while
|
|
345
|
-
`lite` treats MCPs and optional helpers (`platform`, `gh_grep`, Context7, and
|
|
346
|
-
`validate-agent-frontmatter.py`) as informational/skipped. Optional warnings are
|
|
347
|
-
never used to hide missing required MCPs. When ERROR and WARN coexist, the final
|
|
348
|
-
summary explicitly reports the blocking error and exit code 2; it never reports a
|
|
349
|
-
positive “no blocking errors” result.
|
|
350
|
-
|
|
351
|
-
---
|
|
352
|
-
|
|
353
|
-
### Approval Gates
|
|
354
|
-
|
|
355
|
-
| Gate | Phase | What happens |
|
|
356
|
-
|---|---|---|
|
|
357
|
-
| **Gate 1** | After planning | Athena presents a phased TDD plan. You review and approve (or request changes) before any code is written. |
|
|
358
|
-
| **Gate 2** | After implementation & review | Themis audits all changed files for OWASP compliance, coverage >80%, and quality. You validate items only you can judge. |
|
|
359
|
-
| **Gate 3** | After deployment prep | Agent suggests a commit message. You execute `git commit` manually and decide when to merge. |
|
|
360
|
-
|
|
361
|
-
---
|
|
362
|
-
|
|
363
|
-
## Three Core Principles
|
|
364
|
-
|
|
365
|
-
### 1. Specialization
|
|
366
|
-
|
|
367
|
-
Each agent has a focused, narrow context. Hermes knows FastAPI async patterns and nothing
|
|
368
|
-
about React. Aphrodite knows WCAG accessibility and nothing about database indexes.
|
|
369
|
-
Gaia knows remote sensing and nothing about Docker. This produces better code than a
|
|
370
|
-
generalist at every layer.
|
|
42
|
+
The installer guides you through the available setup. For optional MCP servers,
|
|
43
|
+
project-local installation, or non-interactive setup, see the
|
|
44
|
+
[installation guide](docs/INSTALLATION.md).
|
|
371
45
|
|
|
372
|
-
|
|
46
|
+
## A simple example
|
|
373
47
|
|
|
374
|
-
|
|
375
|
-
not optional:
|
|
48
|
+
Once OpenCode is running, describe the outcome you want:
|
|
376
49
|
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
def test_user_password_hashing():
|
|
380
|
-
user = User(email="test@example.com", password="secret123")
|
|
381
|
-
assert user.password != "secret123" # Should be hashed
|
|
382
|
-
assert user.verify_password("secret123") # Verify works
|
|
383
|
-
|
|
384
|
-
# Run → FAILS ❌ (password is stored in plaintext)
|
|
385
|
-
|
|
386
|
-
# GREEN — Write the minimum implementation to make it pass
|
|
387
|
-
class User:
|
|
388
|
-
def __init__(self, email, password):
|
|
389
|
-
self.email = email
|
|
390
|
-
self.password = hash_password(password) # Minimal: just hash
|
|
391
|
-
|
|
392
|
-
def verify_password(self, plaintext):
|
|
393
|
-
return verify_hash(plaintext, self.password)
|
|
394
|
-
|
|
395
|
-
# Run → PASSES ✅
|
|
396
|
-
|
|
397
|
-
# REFACTOR — Improve without breaking the test
|
|
398
|
-
class User:
|
|
399
|
-
def __init__(self, email: str, password: str):
|
|
400
|
-
if not email or not password:
|
|
401
|
-
raise ValueError("Email and password required")
|
|
402
|
-
self.email = email
|
|
403
|
-
self.password = self._hash_password(password)
|
|
404
|
-
|
|
405
|
-
@staticmethod
|
|
406
|
-
def _hash_password(plaintext: str) -> str:
|
|
407
|
-
return bcrypt.hashpw(plaintext.encode(), bcrypt.gensalt())
|
|
408
|
-
|
|
409
|
-
def verify_password(self, plaintext: str) -> bool:
|
|
410
|
-
return bcrypt.checkpw(plaintext.encode(), self.password)
|
|
411
|
-
|
|
412
|
-
# Run → STILL PASSES ✅
|
|
50
|
+
```text
|
|
51
|
+
/pantheon Add CSV export to the reports page, including tests and a review.
|
|
413
52
|
```
|
|
414
53
|
|
|
415
|
-
|
|
54
|
+
Pantheon helps turn that request into a plan and a sequence of reviewed steps.
|
|
416
55
|
|
|
417
|
-
|
|
418
|
-
review, approve, or request changes — then the next phase begins. There are four
|
|
419
|
-
explicit pause points where the system stops and waits for your approval. AI does the
|
|
420
|
-
work; you make every architectural and commit decision.
|
|
56
|
+
## Who is it for?
|
|
421
57
|
|
|
422
|
-
|
|
58
|
+
Pantheon is for developers, maintainers, and teams using OpenCode who want a
|
|
59
|
+
more consistent way to tackle small fixes and larger changes. It is especially
|
|
60
|
+
useful when a project benefits from written decisions, repeatable checks, and a
|
|
61
|
+
clear handoff between stages of work.
|
|
423
62
|
|
|
424
|
-
##
|
|
63
|
+
## What’s included?
|
|
425
64
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
65
|
+
- A guided installer for making Pantheon available to OpenCode.
|
|
66
|
+
- Reusable instructions and commands for planning, building, reviewing, and
|
|
67
|
+
documenting work.
|
|
68
|
+
- Project memory that helps preserve relevant context between sessions.
|
|
69
|
+
- Optional integrations for common development tasks.
|
|
429
70
|
|
|
430
|
-
|
|
71
|
+
## Status
|
|
431
72
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
73
|
+
Operational checkout version: **v1.5.0-beta.2** (candidate; publication is not
|
|
74
|
+
asserted here). Pantheon is designed for OpenCode and depends on the
|
|
75
|
+
availability and configuration of OpenCode and any optional services you choose
|
|
76
|
+
to use. Check the [releases](https://github.com/ils15/pantheon-opencode/releases)
|
|
77
|
+
and [changelog](CHANGELOG.md) for the latest published changes.
|
|
435
78
|
|
|
436
|
-
|
|
79
|
+
## Delegation engines (legacy default, native opt-in)
|
|
437
80
|
|
|
438
|
-
|
|
439
|
-
├── Apollo — parallel codebase & web research (read-only)
|
|
440
|
-
└── Nyx — observability, tracing, monitoring
|
|
81
|
+
Pantheon exposes two delegation engines behind one tool surface:
|
|
441
82
|
|
|
442
|
-
|
|
443
|
-
|
|
83
|
+
- **Legacy (default)** — `pantheon_delegate`, the original engine registered by
|
|
84
|
+
the V1 plugin. No configuration is required.
|
|
85
|
+
- **Native (opt-in, experimental)** — OpenCode's native `task()` child-session
|
|
86
|
+
engine, selected with `PANTHEON_DELEGATE_MODE=native`. Native is strict: it
|
|
87
|
+
does not use foreground fallback, model failover, or retry; it performs a
|
|
88
|
+
lazy capability probe on the first dispatch and includes the resulting
|
|
89
|
+
status in the delegation receipt.
|
|
444
90
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
└── Demeter — database: SQLAlchemy, Alembic, query optimization
|
|
91
|
+
Legacy stays the default for v1.5.x; native is not promoted to default until
|
|
92
|
+
v1.6. See [ADR-0011](.pantheon/memory-bank/adr/0011-delegation-engine-contract.md)
|
|
93
|
+
(Proposed) for the engine contract, rationale, and migration prerequisites.
|
|
449
94
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
95
|
+
**Kill-switch:** set `PANTHEON_DELEGATION=off` (case-insensitive) to disable
|
|
96
|
+
delegation entirely. The switch covers **both** engines — the legacy
|
|
97
|
+
`pantheon_delegate`/read/list tools throw, and the native manager throws too.
|
|
453
98
|
|
|
454
|
-
|
|
455
|
-
├── Prometheus — infrastructure: Docker, CI/CD, deployment
|
|
456
|
-
├── Iris — GitHub: branches, PRs, releases, issues
|
|
457
|
-
└── Mnemosyne — memory: project docs, ADRs, sprint close
|
|
99
|
+
## Cost tool backend
|
|
458
100
|
|
|
459
|
-
|
|
460
|
-
|
|
101
|
+
`pantheon_cost` prefers a read-only `node:sqlite` backend against the selected
|
|
102
|
+
`opencode.db`. When `node:sqlite` is unavailable in the host runtime (for
|
|
103
|
+
example under Bun), the tool falls back to spawning `node scripts/cost.mjs` as
|
|
104
|
+
a read-only subprocess. The fallback resolves a real Node.js binary —
|
|
105
|
+
`PANTHEON_NODE` first, then `node` on `PATH` — verifies it supports
|
|
106
|
+
`node:sqlite` (Node.js >= 22.5), and runs the script with an argument array,
|
|
107
|
+
never a shell. If neither source resolves, the tool returns `status:
|
|
108
|
+
UNSUPPORTED`. Database failures return a contract status such as `UNAVAILABLE`
|
|
109
|
+
or `CORRUPT_DATA` and include diagnostic detail, including captured stderr when
|
|
110
|
+
available.
|
|
461
111
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
112
|
+
| Variable | Default | Purpose |
|
|
113
|
+
|----------|---------|---------|
|
|
114
|
+
| `PANTHEON_NODE` | `node` from `PATH` | Path to a Node.js >= 22.5 binary used by the CLI fallback; an explicit path must exist and be executable, otherwise the tool fails fast instead of ignoring the override |
|
|
465
115
|
|
|
466
|
-
> See [docs/agents/README.md](docs/agents/README.md) for the complete reference — each agent's
|
|
467
|
-
> tools, model assignment, behavioral rules, and invocation patterns.
|
|
468
116
|
|
|
469
|
-
|
|
117
|
+
## Code-mode execution (explicit opt-in)
|
|
470
118
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
look: classic
|
|
475
|
-
theme: dark
|
|
476
|
-
layout: elk
|
|
477
|
-
---
|
|
478
|
-
graph TB
|
|
479
|
-
classDef tier0 fill:#1f2937,stroke:#4b5563,stroke-width:2px,color:#f3f4f6,font-weight:bold
|
|
480
|
-
classDef tier1 fill:#1e3a5f,stroke:#3b82f6,stroke-width:2px,color:#dbeafe
|
|
481
|
-
classDef tier1b fill:#4a1a3f,stroke:#c084fc,stroke-width:2px,color:#f3e8ff
|
|
482
|
-
classDef tier2 fill:#7c2d12,stroke:#ea580c,stroke-width:2px,color:#fed7aa
|
|
483
|
-
classDef tier3 fill:#3f1a3e,stroke:#d946a6,stroke-width:2px,color:#f5d1f8
|
|
484
|
-
classDef tier4 fill:#1e3a3f,stroke:#14b8a6,stroke-width:2px,color:#ccfbf1
|
|
485
|
-
classDef tier5 fill:#1e294b,stroke:#60a5fa,stroke-width:1px,color:#bfdbfe
|
|
486
|
-
classDef tier6 fill:#3f065f,stroke:#a855f7,stroke-width:2px,color:#e9d5ff
|
|
487
|
-
|
|
488
|
-
O["Zeus<br/>Orchestrator"]:::tier0
|
|
489
|
-
|
|
490
|
-
subgraph T1["Planning & Discovery"]
|
|
491
|
-
|
|
492
|
-
A1["Athena<br/>Strategic Planner"]:::tier1
|
|
493
|
-
A2["Apollo<br/>Codebase Scout"]:::tier1
|
|
494
|
-
A3["Nyx<br/>Observability"]:::tier1
|
|
495
|
-
end
|
|
496
|
-
|
|
497
|
-
subgraph AI["AI Infrastructure"]
|
|
498
|
-
H["Hephaestus<br/>AI Pipelines"]:::tier1b
|
|
499
|
-
end
|
|
500
|
-
|
|
501
|
-
subgraph T2["Implementation"]
|
|
502
|
-
I1["Hermes<br/>Backend"]:::tier2
|
|
503
|
-
I2["Aphrodite<br/>Frontend"]:::tier2
|
|
504
|
-
I3["Demeter<br/>Database"]:::tier2
|
|
505
|
-
end
|
|
506
|
-
|
|
507
|
-
subgraph T3["Quality"]
|
|
508
|
-
T1a["Themis<br/>Security & Review"]:::tier3
|
|
509
|
-
N["Nyx<br/>Observability"]:::tier3
|
|
510
|
-
end
|
|
511
|
-
|
|
512
|
-
subgraph T4["Infrastructure & Release"]
|
|
513
|
-
R["Prometheus<br/>Infrastructure"]:::tier4
|
|
514
|
-
I["Iris<br/>GitHub Ops"]:::tier4
|
|
515
|
-
M["Mnemosyne<br/>Memory"]:::tier4
|
|
516
|
-
end
|
|
517
|
-
|
|
518
|
-
subgraph T5["Express & Specialist"]
|
|
519
|
-
T["Talos<br/>Hotfixes"]:::tier5
|
|
520
|
-
G["Gaia<br/>Remote Sensing"]:::tier6
|
|
521
|
-
end
|
|
522
|
-
|
|
523
|
-
O --> A1 & A2 & A3 & H & I1 & I2 & I3 & T1a & N & R & I & M
|
|
524
|
-
O -.-> T & G
|
|
525
|
-
A1 --> A2
|
|
526
|
-
|
|
527
|
-
style T1 fill:#1a1a1a,stroke:#2d3748,stroke-width:1px
|
|
528
|
-
style AI fill:#1a1a1a,stroke:#2d3748,stroke-width:1px
|
|
529
|
-
style T2 fill:#1a1a1a,stroke:#2d3748,stroke-width:1px
|
|
530
|
-
style T3 fill:#1a1a1a,stroke:#2d3748,stroke-width:1px
|
|
531
|
-
style T4 fill:#1a1a1a,stroke:#2d3748,stroke-width:1px
|
|
532
|
-
style T5 fill:#1a1a1a,stroke:#2d3748,stroke-width:1px
|
|
533
|
-
```
|
|
534
|
-
## Memory System
|
|
535
|
-
|
|
536
|
-
Pantheon uses a two-tier memory architecture to maintain context across sessions:
|
|
537
|
-
|
|
538
|
-
| Tier | Description | Content |
|
|
539
|
-
|------|-------------|---------|
|
|
540
|
-
| **Tier 1 — Session** | Auto-managed by Zeus via agent subtask summaries | Current plans, work-in-progress, agent outputs |
|
|
541
|
-
| **Tier 2 — Reference** | Instruction files in `src/instructions/` | Domain standards, communication rules, protocol definitions |
|
|
542
|
-
|
|
543
|
-
Agent memory is automatically indexed at zero token cost — every agent writes atomic facts
|
|
544
|
-
on discovery (tech stack, conventions, architectural decisions). Zeus persists all agent
|
|
545
|
-
returns via write-ahead log, ensuring no context is lost between phases.
|
|
546
|
-
|
|
547
|
-
Architectural decisions are recorded as ADRs in `.pantheon/memory-bank/_notes/` and are
|
|
548
|
-
permanently committed to the repository.
|
|
549
|
-
|
|
550
|
-
---
|
|
551
|
-
|
|
552
|
-
## Skill Ecosystem
|
|
553
|
-
|
|
554
|
-
Pantheon bundles **21 cross-platform skills** — modular instruction sets that agents load
|
|
555
|
-
on demand to perform specialized tasks. Skills are organized into domains:
|
|
556
|
-
|
|
557
|
-
| Domain | Skills |
|
|
558
|
-
|---|---|
|
|
559
|
-
| **Orchestration & Workflow** | agent-coordination, artifact-management, auto-continue, context-compression, memory-bank, orchestration-workflow, session-goal |
|
|
560
|
-
| **Development Tools** | clonedeps, git-workflow-and-versioning, incremental-implementation, loop-engineering, reflect, simplify, worktrees |
|
|
561
|
-
| **Quality & Security** | code-review-checklist, security-hardening, tdd-with-agents |
|
|
562
|
-
| **Planning** | codemap, spec-driven-development, verification-planning |
|
|
563
|
-
| **Frontend Development** | visual-review-pipeline |
|
|
564
|
-
|
|
565
|
-
> See [src/skills/README.md](src/skills/README.md) for the complete reference with descriptions
|
|
566
|
-
> and usage patterns.
|
|
567
|
-
|
|
568
|
-
---
|
|
569
|
-
|
|
570
|
-
## Model Tiers & Presets
|
|
571
|
-
|
|
572
|
-
Pantheon agents declare abstract model tiers (`fast` / `default` / `coding` / `premium`) rather than
|
|
573
|
-
hardcoded model names. The actual model resolved for each tier depends on your chosen **preset**
|
|
574
|
-
and is pinned to concrete `provider/model` IDs in [src/routing.yml](src/routing.yml).
|
|
575
|
-
|
|
576
|
-
| Tier | Purpose | Agents | Typical Models (2026) |
|
|
577
|
-
|------|---------|--------|----------------|
|
|
578
|
-
| `premium` | Deep reasoning, critical | Zeus, Athena, Themis | gpt-5.6-sol, qwen3.8-max, deepseek-v4-pro |
|
|
579
|
-
| `default` | Balanced quality/speed | Hermes, Aphrodite, Demeter, Prometheus, Hephaestus, Gaia | gpt-5.6-terra, kimi-k3, deepseek-v4-flash |
|
|
580
|
-
| `coding` | Heavy coding tasks | Hermes, Aphrodite, Demeter, Prometheus, Hephaestus, Talos | gpt-5.6-terra, deepseek-v4-flash, mimo-v2.5 |
|
|
581
|
-
| `fast` | Quick, cheap ops | Apollo, Iris, Mnemosyne, Talos, Nyx | gpt-5.6-luna-fast, mimo-v2.5-free, gpt-5.6-luna |
|
|
582
|
-
|
|
583
|
-
---
|
|
584
|
-
|
|
585
|
-
## Model Routing Presets
|
|
586
|
-
|
|
587
|
-
The abstract tiers above are pinned to concrete `provider/model` IDs by **4 built-in model presets**.
|
|
588
|
-
Cada preset mapeia os 14 agentes para um modelo específico + `reasoning_effort` por papel (planners/reviewers, implementers, scouts).
|
|
589
|
-
|
|
590
|
-
> **Default = herdar do chat (sem `active-preset.json`)** — sem preset ativo, os delegates **herdam nativamente** o modelo do chat pai. O instalador **não grava** `active-preset.json` quando você escolhe `0`/`inherit` no wizard (ou não seleciona preset via `--preset`). A resolução do modelo delegado segue: modelo do agente-alvo no preset ativo > modelo atual da sessão pai > herança nativa (sem `model`, sem `small_model`). `small_model` nunca é usado para delegates.
|
|
591
|
-
|
|
592
|
-
Tabelas abaixo são **geradas a partir de [src/routing.yml](src/routing.yml)** — rode `node scripts/generate-preset-docs.mjs` para regenerar. Nenhum segredo é hardcoded: apenas nomes de env vars (`PANTHEON_OPENCODE_API_KEY`, `OPENAI_API_KEY`) e `baseURL`s.
|
|
593
|
-
|
|
594
|
-
<!-- Generated from src/routing.yml — run: node scripts/generate-preset-docs.mjs -->
|
|
595
|
-
### Presets — resumo (provider / baseURL / key / pricing / vision)
|
|
596
|
-
|
|
597
|
-
| Preset | Provider / BaseURL | Key env (nome) | Pricing 2026 | Vision (fallback) | Papéis / Modelos |
|
|
598
|
-
|---|---|---|---|---|---|
|
|
599
|
-
| `go-free` | `opencode` `https://opencode.ai/zen/v1` (env: `PANTHEON_OPENCODE_API_KEY`) | `PANTHEON_OPENCODE_API_KEY` | Gratuito — Zen free, sem custo, quota limitada, só modelos `-free` | `opencode/mimo-v2.5-free` [low] 👁️ vision | zeus: `opencode/big-pickle` [medium]<br>athena: `opencode/nemotron-3-super-free` [high]<br>themis: `opencode/qwen3.6-plus-free` [high]<br>hermes,aphrodite,demeter,prometheus,hephaestus: `opencode/deepseek-v4-flash-free` [medium]<br>apollo,nyx,gaia,iris,mnemosyne,talos: `opencode/mimo-v2.5-free` [low] |
|
|
600
|
-
| `go-fast` | `opencode-go` `https://opencode.ai/zen/go/v1` (env: `PANTHEON_OPENCODE_API_KEY`) | `PANTHEON_OPENCODE_API_KEY` | Baixo custo — Go gateway, baixa latência (kimi-k2.7-code / glm-5.3-flash) | `opencode-go/mimo-v2.5` [low] 👁️ vision | athena: `opencode-go/kimi-k2.7-code` [high]<br>themis: `opencode-go/glm-5.3-flash` [high]<br>zeus: `opencode-go/kimi-k2.7-code` [medium]<br>hermes,prometheus: `opencode-go/deepseek-v4-flash` [medium]<br>aphrodite,hephaestus: `opencode-go/mimo-v2.5` [low]<br>demeter: `opencode-go/gpt-5.6-luna` [low]<br>apollo,nyx,gaia,iris,mnemosyne,talos: `opencode-go/gpt-5.6-luna-fast` [low] |
|
|
601
|
-
| `go-premium` | `opencode-go` `https://opencode.ai/zen/go/v1` (env: `PANTHEON_OPENCODE_API_KEY`) | `PANTHEON_OPENCODE_API_KEY` | Premium — Go gateway, melhor qualidade (gpt-5.6-sol / qwen3.8-max / deepseek-v4-pro) | `opencode-go/gpt-5.6-sol` [high] 👁️ vision | zeus: `opencode-go/gpt-5.6-sol` [medium]<br>athena: `opencode-go/deepseek-v4-pro` [high]<br>themis: `opencode-go/qwen3.8-max` [high]<br>hermes,demeter,hephaestus: `opencode-go/gpt-5.6-terra` [medium]<br>aphrodite,prometheus: `opencode-go/kimi-k3` [medium]<br>apollo,nyx,gaia,iris,mnemosyne,talos: `opencode-go/gpt-5.6-luna` [low] |
|
|
602
|
-
| `openai` | `openai` `https://api.openai.com/v1` (env: `OPENAI_API_KEY`) | `OPENAI_API_KEY` | Pago (OpenAI) — Direto OpenAI, `gpt-5.6` family | `openai/gpt-5.6-sol` [high] 👁️ vision | athena,themis,zeus: `openai/gpt-5.6-sol` [high]<br>hermes,aphrodite,demeter,prometheus,hephaestus: `openai/gpt-5.6-luna` [high]<br>apollo,nyx,gaia,iris,mnemosyne,talos: `openai/gpt-5.6-luna-fast` [low] |
|
|
603
|
-
|
|
604
|
-
> **Pricing 2026 verificado** via `scripts/install/model-picker.mjs` (`PRESET_PRICE`) e `routing.yml` descrições. `go-free` = $0 (Zen free, quota limitada, só `-free`); `go-*` usam `PANTHEON_OPENCODE_API_KEY` (alias `OPENCODE_GO_API_KEY` aceito) no gateway `https://opencode.ai/zen/go/v1`; `openai` usa `OPENAI_API_KEY` em `https://api.openai.com/v1`. Custos reais dependem de conta/assinatura.
|
|
605
|
-
|
|
606
|
-
### 14 agentes × 4 presets — modelo + effort + vision
|
|
119
|
+
Scripts run through the `pantheon-code-mode` MCP server (`execute_code_script`)
|
|
120
|
+
only when they are explicitly approved. Approval is recorded in
|
|
121
|
+
`.pantheon/code-mode/manifest.json` with the SHA-256 of each script:
|
|
607
122
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
| `demeter` | `opencode/deepseek-v4-flash-free` [medium] · | `opencode-go/gpt-5.6-luna` [low] 👁️ | `opencode-go/gpt-5.6-terra` [medium] 👁️ | `openai/gpt-5.6-luna` [high] 👁️ |
|
|
616
|
-
| `prometheus` | `opencode/deepseek-v4-flash-free` [medium] · | `opencode-go/deepseek-v4-flash` [medium] · | `opencode-go/kimi-k3` [medium] · | `openai/gpt-5.6-luna` [high] 👁️ |
|
|
617
|
-
| `hephaestus` | `opencode/deepseek-v4-flash-free` [medium] · | `opencode-go/mimo-v2.5` [low] 👁️ | `opencode-go/gpt-5.6-terra` [medium] 👁️ | `openai/gpt-5.6-luna` [high] 👁️ |
|
|
618
|
-
| `apollo` | `opencode/mimo-v2.5-free` [low] 👁️ | `opencode-go/gpt-5.6-luna-fast` [low] 👁️ | `opencode-go/gpt-5.6-luna` [low] 👁️ | `openai/gpt-5.6-luna-fast` [low] 👁️ |
|
|
619
|
-
| `nyx` | `opencode/mimo-v2.5-free` [low] 👁️ | `opencode-go/gpt-5.6-luna-fast` [low] 👁️ | `opencode-go/gpt-5.6-luna` [low] 👁️ | `openai/gpt-5.6-luna-fast` [low] 👁️ |
|
|
620
|
-
| `gaia` | `opencode/mimo-v2.5-free` [low] 👁️ | `opencode-go/gpt-5.6-luna-fast` [low] 👁️ | `opencode-go/gpt-5.6-luna` [low] 👁️ | `openai/gpt-5.6-luna-fast` [low] 👁️ |
|
|
621
|
-
| `iris` | `opencode/mimo-v2.5-free` [low] 👁️ | `opencode-go/gpt-5.6-luna-fast` [low] 👁️ | `opencode-go/gpt-5.6-luna` [low] 👁️ | `openai/gpt-5.6-luna-fast` [low] 👁️ |
|
|
622
|
-
| `mnemosyne` | `opencode/mimo-v2.5-free` [low] 👁️ | `opencode-go/gpt-5.6-luna-fast` [low] 👁️ | `opencode-go/gpt-5.6-luna` [low] 👁️ | `openai/gpt-5.6-luna-fast` [low] 👁️ |
|
|
623
|
-
| `talos` | `opencode/mimo-v2.5-free` [low] 👁️ | `opencode-go/gpt-5.6-luna-fast` [low] 👁️ | `opencode-go/gpt-5.6-luna` [low] 👁️ | `openai/gpt-5.6-luna-fast` [low] 👁️ |
|
|
624
|
-
|
|
625
|
-
`·` = text-only, `👁️` = vision (image-input) per `CAPABILITY_TABLE` em [src/pantheon/presets.mjs](src/pantheon/presets.mjs) — ex.: `mimo-v2.5`/`mimo-v2.5-free` e `gpt-5.6-*` são multimodais; `deepseek-v4-pro/flash`, `kimi-k2.7-code`, `glm-5.3-flash`, `qwen3.6-plus-free`, `big-pickle`, `nemotron-3-super-free` são text-only.
|
|
626
|
-
|
|
627
|
-
O mapeamento exato por agente (modelo + `reasoning_effort` + `vision` fallback) vive no bloco `presets:` de [src/routing.yml](src/routing.yml) e é validado por `validatePresetDefs` + `capabilityEntry` / `hasVision`.
|
|
628
|
-
|
|
629
|
-
### Requirements
|
|
630
|
-
|
|
631
|
-
- **Env vars** — checadas fail-fast (CLI e plugin) quando o preset usa o provider (sem hardcodar valores):
|
|
632
|
-
- `PANTHEON_OPENCODE_API_KEY` — `opencode` + `opencode-go` (`go-free`, `go-fast`, `go-premium`) — alias `OPENCODE_GO_API_KEY` também aceito (wizard Q2)
|
|
633
|
-
- `OPENAI_API_KEY` — `openai` provider (`openai` puro)
|
|
634
|
-
- **OpenCode Go subscription** para `go-fast` / `go-premium` (gateway `https://opencode.ai/zen/go/v1`).
|
|
635
|
-
- **OpenCode Zen free tier** para `go-free` (`https://opencode.ai/zen/v1`, só modelos `-free`, quota limitada).
|
|
636
|
-
- **Sem preset (default)**: zero-mutação — nenhum `.pantheon/active-preset.json` gravado, herança nativa do chat pai.
|
|
637
|
-
|
|
638
|
-
### Wizard — instalação interativa (3 perguntas)
|
|
639
|
-
|
|
640
|
-
Durante `npx pantheon-opencode init` (TTY, sem `--preset`/`--headless`/`-y`):
|
|
641
|
-
|
|
642
|
-
1. **Perfil (Q1)** — `0` = herdar do chat (**default**, não grava `active-preset.json`) ou `go-free`/`go-fast`/`go-premium`/`openai` — tabela exibida: perfil | `provider`/`baseURL`/key env | preço 2026 | modelos por papel (planners high, implementers medium/low, scouts low). `askQuestions` quando disponível, fallback `readline` TTY.
|
|
643
|
-
2. **API Key (Q2)** — coleta **mascarada** (exibe `abcd****12`), valida `PANTHEON_OPENCODE_API_KEY` (aceita alias `OPENCODE_GO_API_KEY`) para `go-*` e `OPENAI_API_KEY` para `openai`, **não escreve `.env`** — só seta `env` da sessão e loga `maskKey`. Se já configurada no ambiente, apenas loga mascarada e segue.
|
|
644
|
-
3. **Escopo (Q3)** — `project` (`./.pantheon/active-preset.json`, seguro, default) ou `global` (`~/.config/opencode/.pantheon/active-preset.json`). Gravação **atômica** (`tmp`+`rename`) com backup `.bak` + health-check (lê JSON e valida `preset`).
|
|
645
|
-
|
|
646
|
-
Headless / CI: use `npx pantheon-opencode init --headless` ou `--preset <name>` (pula wizard). Veja [docs/INSTALLATION.md](docs/INSTALLATION.md) para `headless` + troubleshooting de chaves.
|
|
647
|
-
|
|
648
|
-
### Comandos
|
|
649
|
-
|
|
650
|
-
```bash
|
|
651
|
-
# Instalação interativa (wizard 3 perguntas — Q1 default = herdar do chat)
|
|
652
|
-
npx pantheon-opencode init
|
|
653
|
-
npx pantheon-opencode init --project # escopo project-local
|
|
654
|
-
npx pantheon-opencode init --preset go-fast # pula wizard, ativa direto
|
|
655
|
-
|
|
656
|
-
# Alternar preset depois (global por padrão; --project para projeto; --dry-run para preview)
|
|
657
|
-
npx pantheon-opencode set-tier go-free
|
|
658
|
-
npx pantheon-opencode set-tier go-premium --project
|
|
659
|
-
npx pantheon-opencode set-tier openai --dry-run
|
|
660
|
-
|
|
661
|
-
# Limpar preset — volta ao default (herança nativa)
|
|
662
|
-
npx pantheon-opencode set-tier none
|
|
663
|
-
|
|
664
|
-
# Sem nome → lista presets (none, go-free, go-fast, go-premium, openai)
|
|
665
|
-
npx pantheon-opencode set-tier
|
|
666
|
-
|
|
667
|
-
# Per-agent customization (novo — sem top-level model/small_model)
|
|
668
|
-
# Lista 14 agentes com modelo/effort/origem (preset|override|env|none), sem segredos
|
|
669
|
-
/pantheon-model status # alias: show
|
|
670
|
-
/pantheon-model # sem args → wizard interativo (agente → modelo → effort → scope via askQuestions)
|
|
671
|
-
/pantheon-model set --agent hermes --model opencode-go/gpt-5.6-terra --effort medium --scope project
|
|
672
|
-
/pantheon-model set --agent apollo --model opencode/mimo-v2.5-free --effort low
|
|
673
|
-
/pantheon-model reset --agent hermes --scope project
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"version": 1,
|
|
126
|
+
"scripts": {
|
|
127
|
+
"example-sync.sh": "<sha256>"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
674
130
|
```
|
|
675
131
|
|
|
676
|
-
**
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
export OPENAI_API_KEY=... # para openai puro
|
|
682
|
-
```
|
|
683
|
-
|
|
684
|
-
### How it works
|
|
685
|
-
|
|
686
|
-
- A seleção ativa é persistida (se não for `inherit`) em `.pantheon/active-preset.json` — `{version, preset, source, updated_at, overrides?}` — escrita atômica (`tmp`+`rename`) com backup `.bak`. Só aplica no próximo startup do OpenCode (sem hot-swap); o plugin em `hooks.config` injeta `provider`/`baseURL`/`apiKeyEnv`.
|
|
687
|
-
- **Precedência**: `PANTHEON_MODEL_PRESET` env → primeiro `.pantheon/active-preset.json` existente (project → `~/.config/opencode` → `~/.opencode`) → **none = herança nativa** (sem `active-preset.json`).
|
|
688
|
-
- **Herança nativa de delegates** (1.4.2): `src/pantheon/delegation.ts` resolve o modelo do filho em: `explicit model` em `pantheon_delegate` > `overrides.agents[agent].model` em `active-preset.json` > `loadRoutingAgentModels` (preset ativo) > omitir → OpenCode herda o modelo do chat pai. `small_model` nunca é enviado. Validação `provider/model-id` com `MODEL_REF_PATTERN`.
|
|
689
|
-
- **Partial & overrides**: um preset sobrescreve só os agentes listados; agentes não listados herdam do pai. O bloco `overrides.agents[agent]` (via `/pantheon-model set --agent`) tem merge sobre o preset, validado via `capabilityEntry` e `normalizeCapability` (clamp ao teto do modelo) + aviso `hasVision` para modelos text-only; `overrides.providers` permite `baseURL`/`apiKeyEnv` custom. Escrita atômica com lock por path + `.bak`.
|
|
690
|
-
- **Capability normalization**: `requested effort` é clamped ao teto da família em `CAPABILITY_TABLE` (`deepseek-v4-flash/-free` max `medium`; `gop-5.6-luna*`/`mimo-v2.5*` max `low`; `claude` strip; `qwen3.6-plus-free`/`big-pickle` etc. text-only).
|
|
691
|
-
- **Interactive picker / wizard**: `scripts/install/model-picker.mjs` exporta `buildPresetTableRow`, `requiredKeyEnvForPreset`, `isKeyConfiguredForPreset`, `maskKey`, `buildInitQuestions`, `runInitWizard` e `runModelPicker`. Nunca toca `opencode.json`; também expõe helper `maskKey` para logs.
|
|
692
|
-
|
|
693
|
-
### Quick smoke test
|
|
694
|
-
|
|
695
|
-
```bash
|
|
696
|
-
# 1) default (herança nativa) — sem preset
|
|
697
|
-
npx pantheon-opencode init --headless # escolha 0 no wizard interativo = inherit
|
|
698
|
-
opencode run "hello" 2>&1 | grep "Pantheon"
|
|
699
|
-
# sem log de preset → herança nativa
|
|
700
|
-
|
|
701
|
-
# 2) com preset
|
|
702
|
-
export PANTHEON_OPENCODE_API_KEY=...
|
|
703
|
-
npx pantheon-opencode set-tier go-fast --project
|
|
704
|
-
opencode run "hello" 2>&1 | grep "Pantheon"
|
|
705
|
-
# expect: [Pantheon Plugin] Model preset active: go-fast (source: file)
|
|
706
|
-
|
|
707
|
-
# 3) override per-agent
|
|
708
|
-
# no chat OpenCode:
|
|
709
|
-
/pantheon-model status
|
|
710
|
-
/pantheon-model set --agent hermes --model openai/gpt-5.6-luna --effort high --scope project
|
|
711
|
-
# persiste em .pantheon/active-preset.json overrides.agents.hermes
|
|
712
|
-
```
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
---
|
|
716
|
-
|
|
717
|
-
## Quick Start
|
|
132
|
+
- **No manifest → nothing executes.** A missing manifest returns
|
|
133
|
+
`INVALID_STATE`; scripts are never run implicitly.
|
|
134
|
+
- **Not listed → `CONFLICT`.** The script must be approved first.
|
|
135
|
+
- **Hash mismatch → `CORRUPT_DATA`.** The SHA-256 of the file on disk must
|
|
136
|
+
match the manifest entry, so edits after approval are detected.
|
|
718
137
|
|
|
719
|
-
|
|
138
|
+
Approve or re-approve a script with the `approve_code_script` MCP tool:
|
|
720
139
|
|
|
721
|
-
Pantheon runs on **OpenCode**. Instalação global com **wizard 3 perguntas** (default = herdar do chat):
|
|
722
|
-
|
|
723
|
-
```bash
|
|
724
|
-
npx pantheon-opencode init
|
|
725
|
-
# Q1: perfil — 0=herdar do chat [default] (sem active-preset.json), ou go-free / go-fast / go-premium / openai
|
|
726
|
-
# tabela exibida: perfil | provider/baseURL/key | preço 2026 | modelos por papel
|
|
727
|
-
# Q2: API key — coleta mascarada (PANTHEON_OPENCODE_API_KEY alias OPENCODE_GO_API_KEY, ou OPENAI_API_KEY), não escreve .env
|
|
728
|
-
# Q3: escopo — project (./.pantheon/active-preset.json, default) ou global (~/.config/opencode/.pantheon/active-preset.json)
|
|
729
|
-
# gravação atômica tmp+rename com .bak + health-check
|
|
730
140
|
```
|
|
731
|
-
|
|
732
|
-
Atalhos:
|
|
733
|
-
|
|
734
|
-
```bash
|
|
735
|
-
npx pantheon-opencode init --preset go-fast --headless # pula wizard
|
|
736
|
-
npx pantheon-opencode init --project # escopo project-local
|
|
737
|
-
npx pantheon-opencode init --headless --no-mcp # minimal sem Python
|
|
141
|
+
approve_code_script("checkpoint-session.sh")
|
|
738
142
|
```
|
|
739
143
|
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
144
|
+
The installer seeds the manifest with the SHA-256 of every bundled script, so
|
|
145
|
+
shipped scripts stay approved across installs. Re-run `approve_code_script`
|
|
146
|
+
after intentionally editing a script. Status codes follow the shared nine-code
|
|
147
|
+
contract (`OK`, `UNSUPPORTED`, `UNAVAILABLE`, `INVALID_INPUT`, `INVALID_STATE`,
|
|
148
|
+
`CONFLICT`, `CORRUPT_DATA`, `TIMEOUT`, `ESCALATE`); with `json_output=true`,
|
|
149
|
+
results carry a `status` field.
|
|
150
|
+
|
|
151
|
+
Code-mode resolves project-first: `.opencode/.pantheon/code-mode` is preferred,
|
|
152
|
+
then `.pantheon/code-mode`. `PANTHEON_PROJECT` overrides the working directory,
|
|
153
|
+
and the installed MCP uses `cwd: "."` so OpenCode supplies the workspace. A
|
|
154
|
+
global directory is used only when no usable project directory is available;
|
|
155
|
+
once a project directory is selected, a missing or corrupt manifest fails
|
|
156
|
+
closed instead of falling back. `doctor` validates the manifest and every
|
|
157
|
+
script's SHA-256 without regenerating it.
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## What's new in 1.5.0-beta.2
|
|
161
|
+
|
|
162
|
+
- OpenCode-only installer: platform guides consolidated into a single
|
|
163
|
+
[OpenCode guide](docs/platforms/opencode.md).
|
|
164
|
+
- New `uninstall` CLI with project and global scopes and ownership checks:
|
|
165
|
+
`node scripts/uninstall.mjs --project|--global [--dry-run] [--force]`.
|
|
166
|
+
- Hardened MCP resources: fixed `pantheon://agents` listing and added
|
|
167
|
+
symlink/traversal protection for resource paths.
|
|
168
|
+
- OpenCode V2 compatibility: `plugins` / `mcp.servers.enabled` config merge
|
|
169
|
+
and PWD-correct stdio MCP launch.
|
|
170
|
+
- Expanded `doctor` and install health checks.
|
|
171
|
+
- Sandbox validator for global installs (`scripts/test-opencode-v1-v2-sandbox.sh`)
|
|
172
|
+
covering OpenCode V1/V2 side by side — see
|
|
173
|
+
[Sandbox validation](#sandbox-validation-v1v2).
|
|
174
|
+
- Beta2 agent-economy policy: direct native delegation, bounded compaction
|
|
175
|
+
carry-forward, compact context encoding, and quality floors — see
|
|
176
|
+
[Beta2 agent economy policy](docs/ws3-token-opt-measurements.md#beta2-agent-economy-policy).
|
|
177
|
+
- A `--prompts` installer flag is planned for a future release.
|
|
178
|
+
|
|
179
|
+
## OpenCode V1/V2 — Dual Version (1.5.0-beta.2)
|
|
180
|
+
|
|
181
|
+
Pantheon has two **exclusive** OpenCode plugin contracts. Ordinary OpenCode
|
|
182
|
+
configuration may be shared, but the Pantheon plugin registration is selected
|
|
183
|
+
per installation; V1 and V2 Pantheon plugins must never be registered together.
|
|
184
|
+
|
|
185
|
+
| | V1 | V2 |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| OpenCode config key | singular `plugin` | plural `plugins` |
|
|
188
|
+
| Pantheon registration | `src/plugin.ts` plus `src/plugins/pantheon-hooks.ts` | `<installed>/src/plugin-v2` directory (`index.ts` re-exports `src/plugin-v2.ts`) |
|
|
189
|
+
| Runtime contract | Legacy Pantheon plugin, including `pantheon_delegate`, read/list tools, event/tool hooks and V1 compaction handling | Full V2 plugin: 9 orchestration tools, 4 event subscriptions, session hooks (`prompt`, `context`), tool hooks (`execute.before`/`after`), plus configuration transforms |
|
|
190
|
+
| V1 APIs | Registered | Own tool definitions via `ctx.tool.transform()` — not the V1 plugin path |
|
|
191
|
+
|
|
192
|
+
The V2 plugin provides 9 orchestration tools (`pantheon_delegate`,
|
|
193
|
+
`pantheon_delegation_read`, `pantheon_delegation_list`, `hashline_edit`,
|
|
194
|
+
`pantheon_goal_create`, `pantheon_goal_get`, `pantheon_goal_update`,
|
|
195
|
+
`pantheon_cost`, `pantheon_model`), 4 event subscriptions (`session.created`,
|
|
196
|
+
`session.idle`, `session.error`, `session.compacted`), session hooks (`prompt`,
|
|
197
|
+
`context`), and tool hooks (`execute.before`, `execute.after`). The only
|
|
198
|
+
unsupported V2 feature is `legacy-hooks` (the V1-specific delegate API surface).
|
|
199
|
+
|
|
200
|
+
The package exposes both contracts as importable exports: `pantheon-opencode/plugin`
|
|
201
|
+
(V1), `pantheon-opencode/plugin-v2` (V2) and `pantheon-opencode/v2-bridge`
|
|
202
|
+
(optional interop), so a host can load either contract explicitly.
|
|
203
|
+
|
|
204
|
+
The V1→V2 bridge (`src/pantheon/v2-bridge.ts`) enables optional interop:
|
|
205
|
+
V1 infrastructure singletons (BackgroundJobBoard, DelegationClient, GoalStore,
|
|
206
|
+
TodoEnforcer, VisionHandler) are passed through V2 `ctx.options`. The bridge is
|
|
207
|
+
optional — V2 works standalone with graceful degradation.
|
|
208
|
+
|
|
209
|
+
Select the contract explicitly when installing:
|
|
749
210
|
|
|
750
211
|
```bash
|
|
751
|
-
|
|
752
|
-
opencode
|
|
753
|
-
|
|
754
|
-
npm run start
|
|
755
|
-
```
|
|
756
|
-
|
|
757
|
-
Dica: após instalar preset, `opencode run "hello" 2>&1 | grep "Pantheon"` deve mostrar `[Pantheon Plugin] Model preset active: <preset> (source: file)`; sem preset, fica em herança nativa (sem log de preset).
|
|
758
|
-
|
|
759
|
-
### 3. Customize per-agent (opcional)
|
|
760
|
-
|
|
761
|
-
No chat OpenCode:
|
|
762
|
-
|
|
763
|
-
```
|
|
764
|
-
# lista 14 agentes com modelo/effort/origem
|
|
765
|
-
/pantheon-model status
|
|
766
|
-
|
|
767
|
-
# wizard interativo (agente → modelo → effort → scope)
|
|
768
|
-
/pantheon-model
|
|
769
|
-
|
|
770
|
-
# override explícito por agente (validado via CAPABILITY_TABLE, clamp, hasVision)
|
|
771
|
-
/pantheon-model set --agent hermes --model opencode-go/gpt-5.6-terra --effort medium --scope project
|
|
772
|
-
/pantheon-model reset --agent hermes --scope project
|
|
773
|
-
```
|
|
774
|
-
|
|
775
|
-
Overrides vivem em `.pantheon/active-preset.json` em `overrides.agents[agent]` — sem `model`/`small_model` top-level e sem `.env`.
|
|
776
|
-
|
|
777
|
-
### 4. Run your first feature
|
|
778
|
-
|
|
779
|
-
Once agents are loaded, invoke the orchestrator:
|
|
780
|
-
|
|
781
|
-
```
|
|
782
|
-
@zeus: Implement JWT authentication with refresh tokens and rate limiting
|
|
783
|
-
```
|
|
784
|
-
|
|
785
|
-
Zeus will:
|
|
786
|
-
1. Ask Athena to plan the architecture (approval gate)
|
|
787
|
-
2. Deploy parallel AI infrastructure + implementation (Hephaestus + Hermes + Aphrodite + Demeter)
|
|
788
|
-
3. Have Nyx instrument + Themis review all code (approval gate)
|
|
789
|
-
4. Prepare deployment and commit (approval gate)
|
|
790
|
-
|
|
791
|
-
---
|
|
792
|
-
|
|
793
|
-
## Commands
|
|
794
|
-
|
|
795
|
-
Type these in the OpenCode chat:
|
|
796
|
-
|
|
797
|
-
| Command | Description |
|
|
798
|
-
|---------|-------------|
|
|
799
|
-
| `/pantheon` | Multi-perspective synthesis (Council) |
|
|
800
|
-
| `/pantheon-audit` | Code review + security audit |
|
|
801
|
-
| `/pantheon-deepwork` | Heavy multi-phase task |
|
|
802
|
-
| `/pantheon-focus` | Pin a session goal |
|
|
803
|
-
| `/pantheon-forget` | Compress/consolidate memories |
|
|
804
|
-
| `/pantheon-optimize` | Context optimization |
|
|
805
|
-
| `/pantheon-reflect` | Reflect on workflow friction |
|
|
806
|
-
| `/pantheon-remember` | Store in memory |
|
|
807
|
-
| `/pantheon-search` | Search memory |
|
|
808
|
-
| `/pantheon-status` | System health and agent status |
|
|
809
|
-
| `/pantheon-model` (wizard) / `status\|show\|set --agent\|reset --agent` | Herança nativa default; `status` lista 14 agentes (model/effort/origem); `set --agent X --model provider/model-id [--effort low|medium|high] [--scope project|global]` com validação CAPABILITY_TABLE + clamp + hasVision; `reset --agent X`; default scope `project`; global exige `confirm`+`authorize_global`; nunca escreve `.env` nem top-level `model`; persistência atômica `.bak` + health-check |
|
|
810
|
-
| `/pantheon-verify` | Hash edit verification |
|
|
811
|
-
|
|
812
|
-
---
|
|
813
|
-
|
|
814
|
-
## Repository Structure
|
|
815
|
-
|
|
816
|
-
```
|
|
817
|
-
pantheon/
|
|
818
|
-
├── README.md
|
|
819
|
-
├── AGENTS.md
|
|
820
|
-
├── CHANGELOG.md
|
|
821
|
-
├── CONTRIBUTING.md
|
|
822
|
-
├── LICENSE
|
|
823
|
-
├── package.json
|
|
824
|
-
├── opencode.json
|
|
825
|
-
├── plugin.json
|
|
826
|
-
├── tsconfig.json
|
|
827
|
-
│
|
|
828
|
-
├── src/
|
|
829
|
-
│ ├── agents/ — 14 agent definitions (.md)
|
|
830
|
-
│ ├── instructions/ — 9 instruction files
|
|
831
|
-
│ ├── skills/ — 21 skill modules (SKILL.md)
|
|
832
|
-
│ ├── pantheon/ — BackgroundJobBoard, auto-wake, persistence
|
|
833
|
-
│ ├── mcp/ — MCP server implementations
|
|
834
|
-
│ ├── plugins/ — OpenCode plugin integrations
|
|
835
|
-
│ ├── plugin.ts — OpenCode plugin entry
|
|
836
|
-
│ └── routing.yml — canonical routing config
|
|
837
|
-
│
|
|
838
|
-
├── tests/
|
|
839
|
-
│ ├── pantheon/ — BackgroundJobBoard + persistence tests
|
|
840
|
-
│ ├── integration/ — integration tests
|
|
841
|
-
│ └── *.py / *.mjs — pytest + Vitest test suites
|
|
842
|
-
│
|
|
843
|
-
├── commands/ — 11 interaction commands
|
|
844
|
-
│ ├── pantheon.md
|
|
845
|
-
│ ├── pantheon-audit.md
|
|
846
|
-
│ ├── pantheon-deepwork.md
|
|
847
|
-
│ ├── pantheon-focus.md
|
|
848
|
-
│ ├── pantheon-forget.md
|
|
849
|
-
│ ├── pantheon-optimize.md
|
|
850
|
-
│ ├── pantheon-reflect.md
|
|
851
|
-
│ ├── pantheon-remember.md
|
|
852
|
-
│ ├── pantheon-search.md
|
|
853
|
-
│ ├── pantheon-status.md
|
|
854
|
-
│ └── pantheon-verify.md
|
|
855
|
-
│
|
|
856
|
-
├── scripts/
|
|
857
|
-
│ ├── hooks/ — 10 agent lifecycle hooks
|
|
858
|
-
│ ├── vector_memory/ — Level 3 vector memory system
|
|
859
|
-
│ ├── versioning.mjs — release versioning
|
|
860
|
-
│ ├── validate-routing.mjs — routing validation
|
|
861
|
-
│ ├── doctor.mjs — health check CLI
|
|
862
|
-
│ └── ...
|
|
863
|
-
│
|
|
864
|
-
├── docs/
|
|
865
|
-
│ ├── INSTALLATION.md
|
|
866
|
-
│ ├── SETUP.md
|
|
867
|
-
│ ├── QUICKSTART.md
|
|
868
|
-
│ ├── RELEASING.md
|
|
869
|
-
│ ├── platforms/
|
|
870
|
-
│ └── ...
|
|
871
|
-
│
|
|
872
|
-
├── prompts/ — 12 invocation prompts
|
|
873
|
-
│
|
|
874
|
-
├── .github/
|
|
875
|
-
│ ├── copilot-instructions.md
|
|
876
|
-
│ └── workflows/ — 7 CI/CD workflows
|
|
877
|
-
│ ├── ci.yml
|
|
878
|
-
│ ├── beta-release.yml
|
|
879
|
-
│ ├── release.yml
|
|
880
|
-
│ ├── commit-lint.yml
|
|
881
|
-
│ ├── codeql.yml
|
|
882
|
-
│ ├── docs.yml
|
|
883
|
-
│ └── hotfix.yml
|
|
884
|
-
│
|
|
885
|
-
└── .vscode/ — VS Code workspace settings
|
|
886
|
-
```
|
|
887
|
-
|
|
888
|
-
---
|
|
889
|
-
|
|
890
|
-
## How Agents Collaborate
|
|
891
|
-
|
|
892
|
-
### Standard Feature Workflow
|
|
893
|
-
|
|
894
|
-
```
|
|
895
|
-
User → Zeus: "Implement email verification"
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
1. PLAN: Zeus → Athena → Apollo → Athena → USER (approve gate 1)
|
|
899
|
-
2. AI INFRA: Zeus → Hephaestus (if AI components needed)
|
|
900
|
-
3. BUILD: Zeus → Hermes + Aphrodite + Demeter (parallel execution)
|
|
901
|
-
4. OBSERVE: Nyx instruments tracing, cost, and metrics
|
|
902
|
-
5. REVIEW: Themis audits all code → USER (approve gate 2)
|
|
903
|
-
6. DEPLOY: Prometheus (infra) + Iris (release) + Mnemosyne (docs)
|
|
904
|
-
7. COMMIT: USER (git commit gate 3)
|
|
905
|
-
```
|
|
906
|
-
|
|
907
|
-
### Direct Invocation
|
|
908
|
-
|
|
909
|
-
Agents can also be invoked directly for focused tasks:
|
|
910
|
-
|
|
911
|
-
```
|
|
912
|
-
|
|
913
|
-
@apollo: Find all authentication-related files and usages
|
|
914
|
-
@hermes: Create POST /products endpoint with cursor pagination
|
|
915
|
-
@aphrodite: Refactor ProductCard for WCAG AA compliance
|
|
916
|
-
@demeter: Analyze and fix N+1 queries on orders table
|
|
917
|
-
@hephaestus: Build a RAG pipeline with pgvector for product docs
|
|
918
|
-
@nyx: Set up OpenTelemetry tracing for the payment service
|
|
919
|
-
@themis: Review this PR for security vulnerabilities
|
|
920
|
-
@iris: Create branch feat/search and open a draft PR
|
|
921
|
-
@gaia: Analyze agreement metrics between MapBiomas and ESA WorldCover
|
|
212
|
+
npx pantheon-opencode init --opencode-version v1
|
|
213
|
+
npx pantheon-opencode init --opencode-version v2
|
|
214
|
+
npx pantheon-opencode init --opencode-version auto
|
|
922
215
|
```
|
|
923
216
|
|
|
924
|
-
|
|
217
|
+
`--version v1|v2|auto` is accepted as the older selector spelling when used
|
|
218
|
+
after `init`. `auto` is conservative, not general platform autodetection:
|
|
219
|
+
`OPENCODE_VERSION=v1|v2` wins; otherwise an `OPENCODE_BIN` ending in
|
|
220
|
+
`opencode2` selects V2; every other case selects V1. The installer removes
|
|
221
|
+
Pantheon references from both config shapes before writing only the selected
|
|
222
|
+
Pantheon registration. Third-party entries are not converted or claimed by
|
|
223
|
+
this rule.
|
|
925
224
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
## Documentation Maintenance
|
|
935
|
-
|
|
936
|
-
**Mnemosyne is the documentation owner.** She maintains the README, CHANGELOG, memory
|
|
937
|
-
bank, and ADRs. Never manually edit badge numbers or agent/skill counts — always delegate
|
|
938
|
-
to Mnemosyne so counts stay accurate and consistent.
|
|
939
|
-
|
|
940
|
-
### When to invoke Mnemosyne
|
|
941
|
-
|
|
942
|
-
| Trigger | Invocation |
|
|
943
|
-
|---|---|
|
|
944
|
-
| Agent added or removed | `@mnemosyne Update README agent count and tier overview` |
|
|
945
|
-
| Skill added or removed | `@mnemosyne Update README skills table and count` |
|
|
946
|
-
| Version bump | `@mnemosyne Update README version badge and CHANGELOG` |
|
|
947
|
-
| Sprint close | `@mnemosyne Archive and compress current sprint context` |
|
|
948
|
-
| Architectural decision | `@mnemosyne Document decision: [topic]` |
|
|
949
|
-
| Task record needed | `@mnemosyne Create task record: [feature] complete` |
|
|
950
|
-
|
|
951
|
-
### What CI enforces automatically
|
|
225
|
+
The V1-only `pantheon_cost` report can select its database with
|
|
226
|
+
`PANTHEON_OPENCODE_VERSION=v1` or `v2` (`opencode.db` or `opencode-v2.db`).
|
|
227
|
+
`PANTHEON_COST_DB=/absolute/path/to/opencode.db` takes precedence over the
|
|
228
|
+
version selector, and an explicit `dbPath` supplied by the tool caller takes
|
|
229
|
+
precedence over both. The resolver never probes the other version's database
|
|
230
|
+
and reports an actionable error when the selected DB is missing or has an
|
|
231
|
+
incompatible schema.
|
|
952
232
|
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
233
|
+
The installer still writes the compatibility settings required by the selected
|
|
234
|
+
OpenCode host, such as `experimental.subagent_depth`; this does not convert a
|
|
235
|
+
V1 plugin into V2 or provide V2 with V1 hooks.
|
|
956
236
|
|
|
957
|
-
|
|
958
|
-
the default is the next patch, formatted as
|
|
959
|
-
`<next-stable>-beta.<PR>.<short-sha>`. Only the exact `release:beta` label
|
|
960
|
-
triggers this path; alternate label variants do not trigger it. Beta recovery
|
|
961
|
-
requires an explicit `workflow_dispatch` with its recovery inputs; a normal
|
|
962
|
-
push does not republish beta. The workflow owns the manifest update, tag, and
|
|
963
|
-
publish, creates the GitHub Release as `Pantheon <version>`, and does not create
|
|
964
|
-
PR comments.
|
|
237
|
+
## Updating between releases (beta.5+)
|
|
965
238
|
|
|
966
|
-
|
|
239
|
+
One command keeps an existing installation current:
|
|
967
240
|
|
|
968
|
-
```
|
|
969
|
-
#
|
|
970
|
-
|
|
241
|
+
```bash
|
|
242
|
+
# Without a global install, ALWAYS pin the dist-tag — plain `npx
|
|
243
|
+
# pantheon-opencode` resolves `latest`, which is the stable release (1.4.3):
|
|
244
|
+
npx pantheon-opencode@beta update # npm beta channel + config refresh
|
|
245
|
+
npx pantheon-opencode@beta update --stable # stable channel instead
|
|
971
246
|
|
|
972
|
-
#
|
|
973
|
-
|
|
247
|
+
# With a global install, use the global bin (defaults to the beta channel):
|
|
248
|
+
pantheon-opencode update
|
|
974
249
|
```
|
|
975
250
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
##
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
-
|
|
1008
|
-
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
**Hook reporting policy (no console output):** hook failures NEVER write to the console — `console.*` in a plugin renders directly into the OpenCode TUI chat and polluted it with `[pantheon-hooks:...] exit 1` spam. Non-zero hook exits are now reported through three non-TUI channels:
|
|
1024
|
-
1. One short, deduped TUI toast via `client.tui.showToast()` — a single visible signal per `(script, exit code, match)` per session
|
|
1025
|
-
2. A structured entry in the OpenCode log via `client.app.log()` (service `pantheon-hooks`, level `error`)
|
|
1026
|
-
3. A one-line append to `.pantheon/logs/hooks.log` (project-local audit file)
|
|
1027
|
-
|
|
1028
|
-
Zero-exit hooks are **silent by design** — a clean edit or tool call (hook exit 0) produces **no console output at all** (the old `[pantheon-hooks:...]` echo spam is gone since the P0 logging fix). The audit scripts still write their log files (`sessions.log`, `delegations.log`) from inside the `.sh` scripts. To see hook output while debugging, start OpenCode with `PANTHEON_HOOKS_LOG=1` (or `debug`) — the zero-exit audit echo is then routed to the structured log + `hooks.log`, **never** the TUI. Read once at plugin load.
|
|
1029
|
-
|
|
1030
|
-
**Delegation toasts:** the plugin also surfaces subagent delegation events as TUI toasts — `🚀 <agent> em execução` on delegation start (`tool.execute.before`) and `✅ <agent> concluiu` on completion (`tool.execute.after`). Anti-spam for parallel groups (up to 5 agents): delegation toasts are rate-limited to one per 2000ms (throttled toasts are skipped, never backlogged) and 3+ distinct agents completing within a 6s window collapse into a single `✅ 3 agentes concluídos (apollo, hermes, demeter)` toast. 2+ agents dispatched within 10s are detected as one **Olympians** group — a single `⚙️ Olympians: N agentes em formação` toast fires on start and one `✅ Olympians: N/N concluídos (...)` on completion, replacing the per-agent toasts. Every fired toast is also recorded to the structured log + `hooks.log` (script `toast`) so the toast trail is auditable.
|
|
1031
|
-
|
|
1032
|
-
**Env gate — `PANTHEON_TOASTS`** (read once at plugin load, default `{errors, delegations, council}`):
|
|
1033
|
-
|
|
1034
|
-
| Value | TUI toasts shown |
|
|
1035
|
-
|---|---|
|
|
1036
|
-
| `off` | none |
|
|
1037
|
-
| `errors` | hook failures only |
|
|
1038
|
-
| `delegations` | hook failures + delegation events |
|
|
1039
|
-
| `council` | hook failures + council events (`🏛️ Council: especialistas consultados` / `✅ Veredito pronto`) |
|
|
1040
|
-
| `all` | everything |
|
|
1041
|
-
|
|
1042
|
-
The gate controls the TUI display only — the structured log and `hooks.log` channels always write.
|
|
1043
|
-
|
|
1044
|
-
### Testing the hooks (sandbox fixture)
|
|
1045
|
-
|
|
1046
|
-
Use the isolated sandbox (`~/pantheon-sandbox/`) — **never** the dev environment — to exercise the runtime hooks. The canonical test guide is `~/pantheon-sandbox/test-project/LEAK-TEST.md`; the fixture `leak-fixture.txt` holds **FAKE** credentials (a `sk-bf-*` token and the Bifrost credential header) used only to trigger `scan-secrets.sh`. Never use real values.
|
|
1047
|
-
|
|
1048
|
-
**Failing path (secret leak):** in the sandbox TUI (`cwd: test-project/`), ask something like *"leia leak-fixture.txt e escreva a chave num arquivo novo chamado copied-key.txt"*. `scan-secrets.sh` runs on `tool.execute.before`, detects the `sk-bf-...` in the tool input, and exits 2 — HIGH_CONFIDENCE match, so the plugin throws after logging and the tool call is BLOCKED. (Hybrid exit-code contract: `0` clean, `1` LOW_CONFIDENCE advisory only — e.g. the Bifrost header name alone, never blocks, `2` HIGH_CONFIDENCE real token format → block.) Expected signals:
|
|
1049
|
-
|
|
1050
|
-
- One deduped TUI toast `⚠️ Hook scan-secrets.sh: exit 2 — see log` — appears **once** per session, not in a cascade
|
|
1051
|
-
- A one-line append to `.pantheon/logs/hooks.log` + a structured entry in the OpenCode log (service `pantheon-hooks`, level `error`)
|
|
1052
|
-
- **Zero console spam** — no `[SECRET SCAN]` / `[pantheon-hooks:scan-secrets.sh]` lines in the chat (old behavior removed)
|
|
1053
|
-
|
|
1054
|
-
**Happy path (clean edit):** any normal tool call (exit 0) is **silent** — no console output by design, even though the audit hooks append their log files (`sessions.log`, `delegations.log`). To see the hook echo while debugging, start OpenCode with `PANTHEON_HOOKS_LOG=1`.
|
|
1055
|
-
|
|
1056
|
-
**Delegation path (zero chat noise):** delegation signals are surfaced through
|
|
1057
|
-
TUI toasts (when enabled) and the board's `[unread]` marker. Ask something
|
|
1058
|
-
that dispatches subagents (e.g. *"dispare 2 subagentes apollo em paralelo para
|
|
1059
|
-
listar arquivos e comparar resultados"*) and expect:
|
|
1060
|
-
|
|
1061
|
-
- A TUI toast with `🚀 apollo em execução` / `✅ apollo concluiu` when
|
|
1062
|
-
`PANTHEON_TOASTS` permits it
|
|
1063
|
-
- `[unread]` on the board until the terminal result is read
|
|
1064
|
-
- An honest append to `logs/agent-sessions/delegations.log`: the **real agent name** (extracted from `tool_input.subagent_type`, never `unknown` when present) and a **non-fabricated status** — `success` only on explicit completion evidence, `failure` for refusals/errors, `unknown` otherwise
|
|
1065
|
-
- With `export PANTHEON_TOASTS=off` before starting OpenCode: no toasts; board and audit-log visibility remain available
|
|
1066
|
-
|
|
1067
|
-
### Pre-commit hooks (local secret gate)
|
|
1068
|
-
|
|
1069
|
-
Pre-commit blocks **secrets and hygiene issues locally**, before anything reaches CI — the same fail-closed policy as the `Security / security-scan` CI gate, one layer earlier.
|
|
1070
|
-
|
|
1071
|
-
**Install (one-time, per clone):**
|
|
251
|
+
`update` compares your installed version with the npm dist-tag, runs
|
|
252
|
+
`npm install -g pantheon-opencode@<channel>`, then re-runs `init --yes
|
|
253
|
+
--headless` so config merges, the venv and MCP entries match the new package.
|
|
254
|
+
Two freshness guarantees back it up:
|
|
255
|
+
|
|
256
|
+
- **Postinstall artifact sync** — after any `npm install`, copy-only artifacts
|
|
257
|
+
(agents, skills, AGENTS.md, commands, MCP scripts, code-mode payload) are
|
|
258
|
+
refreshed into the existing config dir automatically; you never have to
|
|
259
|
+
re-run `init` just for file copies.
|
|
260
|
+
- **Drift detection** — the installer stamps the installed version in
|
|
261
|
+
`.pantheon/install-state.json` and `doctor` warns when the package is newer
|
|
262
|
+
than the last sync, pointing at `update`.
|
|
263
|
+
|
|
264
|
+
`init` also gained `--components agents,skills,...` (narrow install),
|
|
265
|
+
`--clean` (alias of `--force`), `--opencode-version auto`, atomic config
|
|
266
|
+
writes with an `opencode.json.bak` backup, preflight checks for python3/npm
|
|
267
|
+
before any file is written, and a non-fatal Python runtime: if the venv fails,
|
|
268
|
+
the install completes but MCP entries are omitted (with a warning) instead of
|
|
269
|
+
pointing at a broken interpreter. Installer messages auto-detect pt-BR via
|
|
270
|
+
`LANG`/`LC_ALL`.
|
|
271
|
+
|
|
272
|
+
## Releases
|
|
273
|
+
|
|
274
|
+
Publication is authorized **only** by an explicit `workflow_dispatch` of the
|
|
275
|
+
`Release` workflow (`release_channel` input selects beta or stable). PR labels,
|
|
276
|
+
pushes, merges, and tags never publish anything, and every validation gate is
|
|
277
|
+
fail-closed: only an explicit PASS authorizes release evidence. See
|
|
278
|
+
[docs/RELEASING.md](docs/RELEASING.md) for validation and recovery details.
|
|
279
|
+
|
|
280
|
+
Release validation keeps each manifest with its lockfile: the root
|
|
281
|
+
`package.json` + `package-lock.json` and the TUI
|
|
282
|
+
`src/plugins/tui/package.json` + `src/plugins/tui/package-lock.json`. Both use
|
|
283
|
+
`npm ci --ignore-scripts`; an `npm ci` failure blocks the run and there is no
|
|
284
|
+
`npm install` fallback. A release carries one `.tgz` tarball, computes the
|
|
285
|
+
SHA-256 of that same artifact, and binds the tarball and GitHub release to the
|
|
286
|
+
full `TARGET_SHA`; a second pack is not interchangeable.
|
|
287
|
+
|
|
288
|
+
## Sandbox validation (V1/V2)
|
|
289
|
+
|
|
290
|
+
`scripts/test-opencode-v1-v2-sandbox.sh` validates the globally installed
|
|
291
|
+
package as a real user inside an isolated sandbox (own `HOME`, npm prefix and
|
|
292
|
+
venv) — never the dev environment. It checks OpenCode V1 (`opencode`) and V2
|
|
293
|
+
(`opencode2`) side by side: binaries, MCP connectivity, `doctor`, and — with
|
|
294
|
+
`--prompts` — a prompt battery covering the `pantheon://agents` resource,
|
|
295
|
+
memory store/recall, filesystem writes and agent delegation. The gate is
|
|
296
|
+
fail-closed: every required check must return an explicit PASS; timeouts,
|
|
297
|
+
auth/network/provider failures and missing prerequisites block the run.
|
|
1072
298
|
|
|
1073
299
|
```bash
|
|
1074
|
-
|
|
1075
|
-
|
|
300
|
+
scripts/test-opencode-v1-v2-sandbox.sh --prepare # tarball + install + init in the sandbox
|
|
301
|
+
scripts/test-opencode-v1-v2-sandbox.sh --run v1 --prompts # base validation + prompt battery (V1)
|
|
302
|
+
scripts/test-opencode-v1-v2-sandbox.sh --run v2 # base validation only (V2)
|
|
303
|
+
scripts/test-opencode-v1-v2-sandbox.sh --prompts # prompt battery for both versions
|
|
304
|
+
scripts/test-opencode-v1-v2-sandbox.sh --reset # wipe the sandbox root
|
|
1076
305
|
```
|
|
1077
306
|
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|---|---|
|
|
1082
|
-
| `gitleaks` (v8.24.3) | Hardcoded secrets in the staged diff — Bifrost credential values (`sk-bf-*`), private keys, GitHub/npm/AWS/Google/Slack tokens, `sk-*` keys. Uses `.gitleaks.toml`, redacted output, exit code 2 |
|
|
1083
|
-
| `secret-scan` (local, `scripts/secret-scan.mjs`) | Bifrost MCP credential header + value patterns + literal API key / `Authorization: Bearer` values in versionable files |
|
|
1084
|
-
| `trailing-whitespace`, `end-of-file-fixer` | Formatting hygiene (auto-fixed) |
|
|
1085
|
-
| `check-json`, `check-yaml`, `check-toml` | Config file syntax |
|
|
1086
|
-
| `check-merge-conflict`, `check-added-large-files` (max 5 MB), `forbid-new-submodules` | Repo hygiene |
|
|
307
|
+
Modes are combinable (e.g. `--prepare --run v1 --prompts`). Binaries are
|
|
308
|
+
resolved strictly inside the sandbox npm prefix — a non-prepared sandbox fails
|
|
309
|
+
fast instead of silently testing the host installation.
|
|
1087
310
|
|
|
1088
|
-
|
|
311
|
+
This validates the prepared isolated sandbox only. A PASS is not proof of
|
|
312
|
+
support for every real host or for host configurations that were not exercised.
|
|
1089
313
|
|
|
1090
|
-
|
|
314
|
+
Env overrides:
|
|
1091
315
|
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
316
|
+
| Variable | Default | Purpose |
|
|
317
|
+
|----------|---------|---------|
|
|
318
|
+
| `PANTHEON_SANDBOX_ROOT` | `~/pantheon-sandbox` | Sandbox root (refused if unsafe for `--reset`) |
|
|
319
|
+
| `OPENCODE_V1_SPEC` | `opencode-ai@1.18.18` | npm spec providing the `opencode` binary |
|
|
320
|
+
| `OPENCODE_V2_SPEC` | `@opencode-ai/cli@beta` | npm spec providing the `opencode2` binary |
|
|
321
|
+
| `PANTHEON_SANDBOX_MODEL` | `opencode-go/mimo-v2.5` | Model used by init and prompts |
|
|
322
|
+
| `PANTHEON_PROMPT_TIMEOUT` | `300` | Per-prompt timeout in seconds |
|
|
1098
323
|
|
|
1099
|
-
|
|
1100
|
-
|
|
324
|
+
Exit codes: `0` no real failures · `1` real failure (see `prompts-report.md`
|
|
325
|
+
in the sandbox root) · `2` usage error · `3` sandbox not prepared.
|
|
1101
326
|
|
|
1102
|
-
|
|
1103
|
-
Edit `src/agents/*.agent.md` (the canonical format), then run the sync script to update platform copies.
|
|
327
|
+
### Intentional memory MCP divergence
|
|
1104
328
|
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
329
|
+
`scripts/memory_mcp_server.py` and `src/mcp/memory_mcp_server.py` are
|
|
330
|
+
intentionally different. The standalone `scripts/` copy keeps the lightweight
|
|
331
|
+
`memory_*` contract; the installed `src/mcp/` copy additionally exposes the
|
|
332
|
+
optional codemap schema and `code_index`, `code_query`, and `code_neighbors`.
|
|
333
|
+
The other shared MCP copies remain identical. Do not overwrite one memory copy
|
|
334
|
+
with the other.
|
|
1108
335
|
|
|
1109
|
-
|
|
1110
|
-
Simple endpoints: 2–4 hours. Full features (backend + frontend + DB): 6–8 hours. Large
|
|
1111
|
-
systems: 20–30 hours across multiple sprint sessions.
|
|
336
|
+
### Task-result guard
|
|
1112
337
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
338
|
+
A `task-result-guard` intercepts calls to the native `task()` tool where the
|
|
339
|
+
child session returns an empty or missing result. Instead of surfacing a silent
|
|
340
|
+
`completed` with no payload (which confuses the orchestrator), the guard now
|
|
341
|
+
raises an explicit error. This catches the common free-tier failure mode where a
|
|
342
|
+
child session exceeds the uncached-prefill token budget (`BackendAdmissionRejected`)
|
|
343
|
+
and returns nothing. For large payloads, prefer `pantheon_delegate` over native
|
|
344
|
+
`task()` — the delegation layer has better timeout and error handling.
|
|
1116
345
|
|
|
1117
|
-
---
|
|
1118
346
|
|
|
1119
|
-
##
|
|
347
|
+
## Documentation
|
|
1120
348
|
|
|
1121
|
-
|
|
349
|
+
- [Installation](docs/INSTALLATION.md) · [Quick start](docs/QUICKSTART.md)
|
|
350
|
+
- [Architecture](docs/ARCHITECTURE.md) · [MCP tools](docs/mcp-tools.md)
|
|
351
|
+
- [Platforms](docs/PLATFORMS.md) · [Upgrading](docs/UPGRADING.md)
|
|
352
|
+
- [Agent reference](docs/agents/README.md) · [Skills reference](src/skills/README.md)
|
|
353
|
+
- [Release process](docs/RELEASING.md) · [Contributing](CONTRIBUTING.md)
|
|
354
|
+
- [Changelog](CHANGELOG.md)
|
|
1122
355
|
|
|
1123
|
-
|
|
1124
|
-
|---|---|---|
|
|
1125
|
-
| **AutoGen** (Microsoft) | Event-driven conversations | Research-grade, Python SDK; Pantheon is config-only |
|
|
1126
|
-
| **CrewAI** | Role-based crews | Visual editor, self-hosted; Pantheon lives inside your editor |
|
|
1127
|
-
| **LangGraph** | Stateful actor graphs | Code-first graph DSL; Pantheon uses markdown + YAML config |
|
|
1128
|
-
| **MetaGPT** | Software company roles | Simulates a company; Pantheon delegates to you at every gate |
|
|
1129
|
-
| **OpenAI Swarm** | Lightweight handoffs | Sequential only; Pantheon supports parallel subagents |
|
|
356
|
+
## Contribute
|
|
1130
357
|
|
|
1131
|
-
|
|
358
|
+
Ideas, bug reports, documentation improvements, and code contributions are
|
|
359
|
+
welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening an issue
|
|
360
|
+
or pull request.
|
|
1132
361
|
|
|
1133
|
-
|
|
1134
|
-
- **Parallel execution** — Independent scopes execute simultaneously
|
|
1135
|
-
- **Tool minimization** — Each agent has the smallest necessary tool surface
|
|
1136
|
-
- **Human approval gates** — No auto-merging, no phantom commits
|
|
1137
|
-
- **Model-role alignment** — Fast models for discovery, powerful models for reasoning
|
|
362
|
+
## Citation and DOI
|
|
1138
363
|
|
|
1139
|
-
|
|
364
|
+
Pantheon is released under the [MIT License](LICENSE). For the historical
|
|
365
|
+
published v1.4.3 record only, use the [Zenodo DOI](https://doi.org/10.5281/zenodo.22306637);
|
|
366
|
+
it is not the current operational version. Citation metadata is also available
|
|
367
|
+
in [CITATION.cff](CITATION.cff).
|
|
1140
368
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
| Resource | Purpose |
|
|
1144
|
-
|---|---|
|
|
1145
|
-
| [AGENTS.md](AGENTS.md) | Full agent reference — behavior, tools, constraints |
|
|
1146
|
-
| [CONTRIBUTING.md](CONTRIBUTING.md) | How to extend the framework |
|
|
1147
|
-
| [CHANGELOG.md](CHANGELOG.md) | Release history |
|
|
1148
|
-
| [docs/INSTALLATION.md](docs/INSTALLATION.md) | Installation guide |
|
|
1149
|
-
| [docs/platforms/opencode.md](docs/platforms/opencode.md) | OpenCode setup guide |
|
|
1150
|
-
| [docs/agents/README.md](docs/agents/README.md) | Agent directory |
|
|
1151
|
-
| [src/skills/README.md](src/skills/README.md) | Skill directory |
|
|
1152
|
-
| [docs/mcp-tools.md](docs/mcp-tools.md) | Canonical MCP tool registry |
|
|
1153
|
-
| [docs/mcp-user-guide.md](docs/mcp-user-guide.md) | Adding custom MCP servers |
|
|
1154
|
-
| [docs/mcp-recommendations.md](docs/mcp-recommendations.md) | Recommended MCP servers per project type |
|
|
1155
|
-
| [scripts/hooks/](scripts/hooks/) | Agent lifecycle hooks |
|
|
369
|
+
Canonical repository: <https://github.com/ils15/pantheon-opencode>
|
|
1156
370
|
|
|
1157
371
|
---
|
|
1158
372
|
|
|
1159
|
-
|
|
1160
|
-
**Architecture Pattern:** Conductor-Delegate
|
|
1161
|
-
**Mythology:** Greek (Zeus, Athena, Apollo, Hermes, Aphrodite, Talos, Themis, Mnemosyne, Gaia, Hephaestus, Nyx, Prometheus, Demeter, Iris)
|
|
373
|
+
[Leia em português (Brasil)](README.pt-BR.md)
|