pantheon-opencode 2.0.0-rc.1 → 2.0.0
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/AGENTS.global.md +2 -2
- package/AGENTS.md +8 -8
- package/CHANGELOG.md +54 -0
- package/README.md +2 -0
- package/README.pt-BR.md +2 -0
- package/bin/pantheon-init.mjs +13 -0
- package/commands/pantheon-audit.md +1 -1
- package/commands/pantheon-deepwork.md +1 -1
- package/commands/pantheon-optimize.md +41 -63
- package/package.json +4 -3
- package/plugin.json +1 -1
- package/prompts/optimize-database.prompt.md +5 -5
- package/prompts/plan-architecture.prompt.md +6 -6
- package/pyproject.toml +1 -1
- package/scripts/build-agents-md.mjs +10 -10
- package/scripts/build-plugin.mjs +26 -0
- package/scripts/install/opencode-version.mjs +17 -5
- package/scripts/install/opencode.mjs +8 -1
- package/scripts/optimize.mjs +322 -0
- package/scripts/prune.mjs +105 -14
- package/scripts/update.mjs +20 -15
- package/skills-lock.json +11 -11
- package/src/agents/aphrodite.md +15 -14
- package/src/agents/apollo.md +2 -1
- package/src/agents/athena.md +5 -5
- package/src/agents/demeter.md +2 -0
- package/src/agents/hephaestus.md +1 -0
- package/src/agents/hermes.md +19 -95
- package/src/agents/iris.md +3 -0
- package/src/agents/nyx.md +1 -0
- package/src/agents/prometheus.md +2 -0
- package/src/agents/talos.md +3 -0
- package/src/agents/themis.md +91 -87
- package/src/agents/zeus.md +41 -266
- package/src/instructions/agent-return-format.instructions.md +1 -1
- package/src/instructions/memory-protocol.instructions.md +1 -1
- package/src/instructions/zeus-anti-stall.instructions.md +3 -3
- package/src/instructions/zeus-communication-rules.instructions.md +1 -1
- package/src/instructions/zeus-council-synthesis.instructions.md +2 -2
- package/src/instructions/zeus-timeout-retry.instructions.md +10 -10
- package/src/pantheon/model-command.ts +12 -12
- package/src/pantheon/tools.ts +4 -0
- package/src/pantheon/tui-version-check.ts +1 -1
- package/src/pantheon/update-notifier.ts +13 -8
- package/src/pantheon/vision.ts +20 -20
- package/src/plugin/index.js +14594 -0
- package/src/plugins/tui/dist/tui.d.ts +3 -3
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +923 -340
- package/src/plugins/tui/dist/tui.js.map +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/autonomy-state.ts +27 -15
- package/src/plugins/tui/src/index.tsx +44 -23
- package/src/plugins/tui/src/pantheon-settings.tsx +461 -105
- package/src/plugins/tui/src/tui-prefs.ts +106 -4
- package/src/plugins/tui/src/update-notice.ts +9 -6
- package/src/plugins/tui/src/whats-new-open.ts +4 -4
- package/src/plugins/tui/src/whats-new.tsx +119 -17
- package/src/skills/agent-coordination/SKILL.md +6 -6
- package/src/skills/artifact-management/SKILL.md +43 -39
- package/src/skills/artifact-management/references/artifact-templates.md +103 -48
- package/src/skills/auto-continue/references/auto-continue-details.md +13 -13
- package/src/skills/code-review-checklist/SKILL.md +6 -6
- package/src/skills/incremental-implementation/SKILL.md +13 -13
- package/src/skills/memory-bank/references/anti-patterns.md +3 -3
- package/src/skills/spec-driven-development/SKILL.md +12 -14
- package/src/skills/tdd-with-agents/SKILL.md +6 -5
- package/src/skills/visual-review-pipeline/SKILL.md +1 -1
- package/src/skills/visual-review-pipeline/references/workflow-steps.md +1 -1
package/AGENTS.global.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
|
|
2
2
|
<!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
|
|
3
3
|
<!-- Source of truth: src/instructions/*.instructions.md + the static sections in this script. -->
|
|
4
|
-
<!-- pantheon:agents-md v2 artifact=global generated-at=2026-11-
|
|
4
|
+
<!-- pantheon:agents-md v2 artifact=global generated-at=2026-11-11T10:16:35-03:00 sha=d5466bf -->
|
|
5
5
|
|
|
6
6
|
# Pantheon Agent System — OpenCode
|
|
7
7
|
|
|
@@ -37,7 +37,7 @@ All agents check each result against the request and evidence; remove unrelated
|
|
|
37
37
|
## subtask_summary
|
|
38
38
|
**files_changed:** [list of file paths, one per line]
|
|
39
39
|
**summary:** What was done, in 2-3 sentences
|
|
40
|
-
**tests:**
|
|
40
|
+
**tests:** [PASS] All passing / [WARN] X failing / [FAIL] Not run (reason)
|
|
41
41
|
**coverage:** X% (if applicable)
|
|
42
42
|
**tokens:** ~N input / ~M output (estimated)
|
|
43
43
|
**status:** complete | partial (reason) | escalated (reason)
|
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
|
|
2
2
|
<!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
|
|
3
3
|
<!-- Source of truth: project sections in scripts/build-agents-md.mjs. -->
|
|
4
|
-
<!-- pantheon:agents-md v2 artifact=project generated-at=2026-11-
|
|
4
|
+
<!-- pantheon:agents-md v2 artifact=project generated-at=2026-11-11T10:16:35-03:00 sha=d5466bf -->
|
|
5
5
|
|
|
6
6
|
# Pantheon — Repository Setup
|
|
7
7
|
|
|
@@ -13,18 +13,18 @@ Setup: [INSTALLATION.md](docs/INSTALLATION.md).
|
|
|
13
13
|
- Test: focused checks by default; `npm test` for CI/release or broad/high-risk changes
|
|
14
14
|
- Lint: `npm run lint`
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Global Installation Testing (Sandbox)
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Validate global installation AS A REAL USER in the sandbox `~/pantheon-sandbox/` (outside the repo; with dedicated HOME, npm prefix, and venv); the dev environment is NOT suitable for packaging tests.
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
20
|
+
- Run: `bash ~/pantheon-sandbox/run-test.sh` (MCPs, doctor, TUI)
|
|
21
|
+
- Agent rule: validate global installation (npm pack, `init`, MCPs, hooks) in the sandbox — NEVER in the development environment
|
|
22
|
+
- Teardown: `rm -rf ~/pantheon-sandbox`
|
|
23
23
|
|
|
24
24
|
## Worktrees
|
|
25
25
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
26
|
+
- Never create worktrees inside the main project; use `<project-parent>/.pantheon-worktrees/<repo-basename>/<task>`.
|
|
27
|
+
- Worktrees do not live inside `.pantheon/`.
|
|
28
28
|
|
|
29
29
|
## Conventions
|
|
30
30
|
|
package/CHANGELOG.md
CHANGED
|
@@ -71,6 +71,60 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
71
71
|
`node scripts/versioning.mjs apply --notes` pre-fills the generated sections from conventional commits.
|
|
72
72
|
Running apply will move this section to a versioned entry and reset the template below. -->
|
|
73
73
|
|
|
74
|
+
## [v2.0.0] - 2026-11-11
|
|
75
|
+
|
|
76
|
+
### 🆕 What's New
|
|
77
|
+
|
|
78
|
+
- **OpenCode 2.x Architecture**: Official 2.0 release dedicated to OpenCode 2.x, removing legacy V1 shims for low latency.
|
|
79
|
+
- **Fast-Path Direct Dispatch**: Zeus executes direct implementation requests in 1 turn without mandatory planning or approval cascades.
|
|
80
|
+
- **Native Subagent Execution**: Parallel background subagents (`task(background: true)`) for non-blocking test and build workflows.
|
|
81
|
+
- **Implementer Tool Grants**: Added native glob, grep, and bash access across all implementers to eliminate discovery round-trips.
|
|
82
|
+
- **Prompt Diet & English Unification**: Condensed agent prompts by up to 70% and standardized instructions across all agents to English.
|
|
83
|
+
- **TUI Settings Stability**: Fullscreen settings overlay with flexWrap anti-squish layout and live preference preview.
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- **agents** — Fast-Path Direct Implementation in Zeus routing direct coding requests immediately to domain specialists.
|
|
88
|
+
- **agents** — Native glob and grep permissions granted to implementers (Talos, Prometheus, Demeter).
|
|
89
|
+
- **agents** — Parallel background execution guidance for tests and builds using `task(background: true)`.
|
|
90
|
+
|
|
91
|
+
### Changed
|
|
92
|
+
|
|
93
|
+
- **agents** — Condensed Hermes system prompt from 292 to 198 lines, eliminating tutorial boilerplate.
|
|
94
|
+
- **agents** — Cleaned double-spaced headings and emoji remnants across Aphrodite instructions.
|
|
95
|
+
- **instructions** — Standardized all agent instructions and repository headers to English with zero-emoji enforcement.
|
|
96
|
+
|
|
97
|
+
### Fixed
|
|
98
|
+
|
|
99
|
+
- **release** — Corrected canonical changelog structure and bold scope formatting for Gate (e) compliance.
|
|
100
|
+
- **tools** — Replaced legacy shell permissions with native OpenCode V2 bash across all implementers.
|
|
101
|
+
- **tui** — Resolved tab squish and footer overlap on narrow viewports in settings window.
|
|
102
|
+
|
|
103
|
+
## [v2.0.0-rc.2] - 2026-11-11
|
|
104
|
+
|
|
105
|
+
### 🆕 What's New
|
|
106
|
+
|
|
107
|
+
- **Token optimization**: Unified English instructions and condensed Zeus prompt to 73 lines with fast 1-turn bypass.
|
|
108
|
+
- **OpenCode V2 permissions**: Replaced legacy shell permissions with native bash across all implementers.
|
|
109
|
+
- **TUI settings stability**: Fullscreen settings view with flexWrap tabs and footer to prevent compression and overlap.
|
|
110
|
+
- **Sibling config sync**: Automated opencode.jsonc synchronization during install to guarantee pantheon tools.
|
|
111
|
+
- **Pruning CLI**: Added --deepwork and --worktrees flags to scripts/prune.mjs with clean reporting.
|
|
112
|
+
|
|
113
|
+
### Changed
|
|
114
|
+
|
|
115
|
+
- **agents** — Zeus prompt condensed to 73 lines with fast bypass and bounded read permissions.
|
|
116
|
+
- **agents** — Themis, Apollo, Athena, Hermes, and Zeus instructions standardized to English.
|
|
117
|
+
- **agents** — Cleaned emojis from all instruction headers and tables across src/instructions/.
|
|
118
|
+
- **install** — opencode.mjs synchronizes pantheon-opencode into sibling opencode.jsonc.
|
|
119
|
+
- **tui** — src/plugins/tui/src/pantheon-settings.tsx wrapped tabs and footer with flexWrap and capped dialog maxHeight.
|
|
120
|
+
- **scripts** — scripts/prune.mjs added findStaleDeepwork and findStaleWorktrees with zero emojis.
|
|
121
|
+
|
|
122
|
+
### Fixed
|
|
123
|
+
|
|
124
|
+
- **tools** — Fixed "No tool named 'shell' is currently available" by updating agent permission frontmatters to `bash: allow`.
|
|
125
|
+
- **tui** — Fixed squished tab labels and footer button overlap under narrow viewport widths.
|
|
126
|
+
- **install** — Fixed missing pantheon tools caused by opencode.jsonc overriding opencode.json.
|
|
127
|
+
|
|
74
128
|
## [v2.0.0-rc.1] - 2026-11-10
|
|
75
129
|
|
|
76
130
|
### 🆕 What's New
|
package/README.md
CHANGED
|
@@ -188,6 +188,8 @@ Run `/pantheon-settings` (or `Pantheon: Settings` in the command palette) to ope
|
|
|
188
188
|
- **Updates:** Check registry channel (`beta` / `stable`) and trigger upgrades.
|
|
189
189
|
- **Doctor:** Run inline system health diagnostics.
|
|
190
190
|
- **TUI Personalization:** Adjust spacing (`comfortable` vs `compact`), separators, gauge bar styles, and context display rows.
|
|
191
|
+
- **Non-Destructive Overlay & Mouse Navigation:** Opens as a floating dialog overlay over the active session without blanking the workspace (configurable via `dialog` vs `fullscreen`), with full mouse click support for tabs, sidebar, rows, value cyclers, and actions.
|
|
192
|
+
- **Modernized What's New Window:** Card layout with rounded border, pagination buttons, and a dedicated `[OK, Entendido]` button with keyboard (`Enter`/`Esc`/`Q`) and mouse click support.
|
|
191
193
|
|
|
192
194
|
---
|
|
193
195
|
|
package/README.pt-BR.md
CHANGED
|
@@ -184,6 +184,8 @@ Execute `/pantheon-settings` (ou `Pantheon: Settings` na paleta de comandos) par
|
|
|
184
184
|
- **Atualizações:** Verifique o canal do registro (`beta` / `stable`) e dispare upgrades.
|
|
185
185
|
- **Doctor:** Execute o diagnóstico de saúde do sistema diretamente na interface.
|
|
186
186
|
- **Personalização da TUI:** Ajuste espaçamento (`comfortable` vs `compact`), separadores, estilo das barras de progresso e linhas de contexto.
|
|
187
|
+
- **Overlay Não-Destrutivo e Navegação por Clique:** Abre como diálogo flutuante sobre a sessão ativa mantendo a TUI visível (configurável entre `dialog` e `fullscreen`), com suporte completo a cliques de mouse em abas, menu lateral, linhas, seletores e botões de ação.
|
|
188
|
+
- **Janela de Novidades Modernizada:** Layout em card com bordas arredondadas, paginação visual e botão dedicado `[OK, Entendido]` com confirmação via mouse ou teclado (`Enter`/`Esc`/`Q`).
|
|
187
189
|
|
|
188
190
|
---
|
|
189
191
|
|
package/bin/pantheon-init.mjs
CHANGED
|
@@ -114,6 +114,9 @@ function printUsage() {
|
|
|
114
114
|
)
|
|
115
115
|
console.log(' npx pantheon-opencode prune # List legacy artifacts (dry-run)')
|
|
116
116
|
console.log(' npx pantheon-opencode prune --apply # Remove stale backups')
|
|
117
|
+
console.log(
|
|
118
|
+
' npx pantheon-opencode optimize [--apply] # Archive completed deepwork & clean logs',
|
|
119
|
+
)
|
|
117
120
|
console.log(' npx pantheon-opencode doctor [--profile] # Run health check')
|
|
118
121
|
console.log(
|
|
119
122
|
' npx pantheon-opencode restore [--project] [--yes] # Restore an exact installer backup',
|
|
@@ -170,6 +173,16 @@ async function main() {
|
|
|
170
173
|
process.exit(result.status ?? 1)
|
|
171
174
|
}
|
|
172
175
|
|
|
176
|
+
if (command === 'optimize') {
|
|
177
|
+
const { spawnSync } = await import('node:child_process')
|
|
178
|
+
const optimizeScript = path.join(ROOT, 'scripts', 'optimize.mjs')
|
|
179
|
+
const result = spawnSync(process.execPath, [optimizeScript, ...args.slice(1)], {
|
|
180
|
+
stdio: 'inherit',
|
|
181
|
+
cwd: process.cwd(),
|
|
182
|
+
})
|
|
183
|
+
process.exit(result.status ?? 1)
|
|
184
|
+
}
|
|
185
|
+
|
|
173
186
|
if (command === 'uninstall') {
|
|
174
187
|
const { spawnSync } = await import('node:child_process')
|
|
175
188
|
const uninstallScript = path.join(ROOT, 'scripts', 'uninstall.mjs')
|
|
@@ -28,4 +28,4 @@ Zero tokens, <2s. Checks: ruff, biome, anti-pattern slop, anti-overengineering (
|
|
|
28
28
|
~500 tokens. Confidence scoring, regression prediction, OWASP Top 10.
|
|
29
29
|
|
|
30
30
|
### Layer 3 — Verification Planning
|
|
31
|
-
For N>5 file changes.
|
|
31
|
+
For N>5 file changes. Proposes a verification plan before implementing.
|
|
@@ -56,7 +56,7 @@ Usage: --resume <slug> | --status <slug> | --list
|
|
|
56
56
|
|
|
57
57
|
## Full-Auto Mode (`--full-auto`)
|
|
58
58
|
|
|
59
|
-
>
|
|
59
|
+
> [!WARNING] Automates only eligible review gates. Gate 1 and commit/deploy gates still require approval.
|
|
60
60
|
|
|
61
61
|
`--full-auto` does not hide the plan or skip Gate 1: Zeus still displays the
|
|
62
62
|
complete plan in the main conversation and waits for explicit approval before
|
|
@@ -1,79 +1,57 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Scan, clean, cache, and archive Pantheon project files. Scans for bloat, archives completed deepwork,
|
|
2
|
+
description: "Scan, clean, cache, and archive Pantheon project files. Scans for bloat, archives completed deepwork, and cleans workspace artifacts. Usage: /pantheon-optimize"
|
|
3
3
|
agent: "zeus"
|
|
4
4
|
---
|
|
5
5
|
# /pantheon-optimize — Pantheon Project Optimizer
|
|
6
6
|
|
|
7
|
-
**What:** Multi-mode optimization:
|
|
7
|
+
**What:** Multi-mode workspace optimization: archives or cleans completed deepwork sessions from `.pantheon/deepwork/`, prunes stale backups and logs, and reports optimization opportunities.
|
|
8
8
|
|
|
9
|
-
## Usage
|
|
9
|
+
## CLI Usage (Deterministic, Zero-Token)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
/pantheon-optimize → Full scan + compress (default)
|
|
13
|
-
/pantheon-optimize --dry-run → Preview only, no changes
|
|
14
|
-
/pantheon-optimize --archive → Archive completed deepwork sessions
|
|
15
|
-
/pantheon-optimize --cache → Migrate memory-bank to MCP memory
|
|
16
|
-
/pantheon-optimize --path=<dir> → Limit scan to directory
|
|
17
|
-
/pantheon-optimize --all → Run all modes (default)
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Modes
|
|
21
|
-
|
|
22
|
-
### `--archive` — Deepwork Archiving
|
|
23
|
-
Archives completed deepwork sessions from `.pantheon/deepwork/<slug>/` to `.pantheon/deepwork/archive/<slug>/`.
|
|
24
|
-
|
|
25
|
-
**Criteria:** A session is "completed" if it has a `REVIEW.md` containing "APPROVED".
|
|
11
|
+
You can run the optimizer directly from the terminal without AI token spend:
|
|
26
12
|
|
|
13
|
+
```bash
|
|
14
|
+
pantheon-opencode optimize # Dry-run inspection (default)
|
|
15
|
+
pantheon-opencode optimize --apply # Archive completed deepworks and clean old logs
|
|
16
|
+
pantheon-opencode optimize --clean --apply # Permanently remove resolved deepworks
|
|
17
|
+
pantheon-opencode optimize --age 5 # Set inactivity threshold (days)
|
|
27
18
|
```
|
|
28
|
-
/pantheon-optimize archive → Interactive (ask per slug)
|
|
29
|
-
/pantheon-optimize archive --dry-run → Preview only
|
|
30
|
-
/pantheon-optimize archive --auto → Archive all completed
|
|
31
|
-
/pantheon-optimize archive --auto --keep=2 → Keep only PLAN.md + REVIEW.md
|
|
32
|
-
/pantheon-optimize archive --auto --compress → Single .md per slug
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### `--cache` — Memory Bank Migration
|
|
36
|
-
Scans `.pantheon/memory-bank/` for flat `.md` files and migrates them to the FTS5-backed MCP memory server.
|
|
37
19
|
|
|
38
|
-
|
|
39
|
-
1. Reads all `.md` files in `.pantheon/memory-bank/`
|
|
40
|
-
2. Chunks by heading (## sections)
|
|
41
|
-
3. Calls `memory_store()` for each chunk with appropriate namespace
|
|
42
|
-
4. Optionally archives the original files after successful migration
|
|
20
|
+
## Slash Command Usage
|
|
43
21
|
|
|
44
22
|
```
|
|
45
|
-
/pantheon-optimize
|
|
46
|
-
/pantheon-optimize
|
|
47
|
-
/pantheon-optimize
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### `--dry-run` (global flag)
|
|
51
|
-
Prevents any destructive action. Shows what WOULD be done.
|
|
52
|
-
|
|
53
|
-
### Default mode (no flags)
|
|
54
|
-
Runs bloat scan on all `.md` and `.json` files + compression report.
|
|
55
|
-
|
|
56
|
-
## Output
|
|
57
|
-
|
|
23
|
+
/pantheon-optimize → Full inspection (preview only)
|
|
24
|
+
/pantheon-optimize --archive → Archive completed deepwork sessions
|
|
25
|
+
/pantheon-optimize --clean → Delete completed deepwork sessions
|
|
58
26
|
```
|
|
59
|
-
🧹 Pantheon Optimize Report
|
|
60
|
-
|
|
61
|
-
📦 Bloat Scan: 47 .md + 12 .json files
|
|
62
|
-
→ 3 oversized files found
|
|
63
|
-
→ ~2.4K tokens recoverable
|
|
64
27
|
|
|
65
|
-
|
|
66
|
-
→ 12 completed (REVIEW.md APPROVED)
|
|
67
|
-
→ 3 in progress (skipped)
|
|
68
|
-
→ Run with --archive --auto to archive 12 sessions
|
|
69
|
-
|
|
70
|
-
🗄️ Memory Cache: 24 files in memory-bank/
|
|
71
|
-
→ 18 already in MCP memory (dedup)
|
|
72
|
-
→ 6 candidates for migration (~3.2K tokens)
|
|
73
|
-
→ Run with --cache to migrate
|
|
28
|
+
## Modes
|
|
74
29
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
30
|
+
### Deepwork Optimization
|
|
31
|
+
Completed or inactive deepwork sessions in `.pantheon/deepwork/<slug>/` are identified by:
|
|
32
|
+
1. `REVIEW.md` containing "APPROVED" or "PASS".
|
|
33
|
+
2. `STATUS.md` marked "complete".
|
|
34
|
+
3. Inactivity exceeding the age threshold (default: 7 days).
|
|
35
|
+
|
|
36
|
+
### Output
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Pantheon Optimizer — Workspace Inspection
|
|
40
|
+
Target: /path/to/project
|
|
41
|
+
Mode: dry-run (preview only)
|
|
42
|
+
────────────────────────────────────────────────────────────
|
|
43
|
+
Deepwork sessions: 5 total
|
|
44
|
+
Resolvable candidates (4):
|
|
45
|
+
- beta10-jev-uplift (inactive for >7 days)
|
|
46
|
+
- decision-layer-v2 (inactive for >7 days)
|
|
47
|
+
- opencode-v2-dual-migration (inactive for >7 days)
|
|
48
|
+
- v2-cycle (inactive for >7 days)
|
|
49
|
+
Active sessions kept (1):
|
|
50
|
+
- 2.0-jev-uplift (in-progress)
|
|
51
|
+
Stale backups: 0 candidates (>14 days, keeping 3 latest)
|
|
52
|
+
Stale logs: 0 candidates (>7 days)
|
|
53
|
+
────────────────────────────────────────────────────────────
|
|
54
|
+
[DRY-RUN] No changes made.
|
|
55
|
+
To archive resolved deepworks: pantheon-opencode optimize --apply
|
|
56
|
+
To permanently delete resolved deepworks: pantheon-opencode optimize --clean --apply
|
|
79
57
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon-opencode",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Multi-agent orchestration for OpenCode \u2014 14 specialized agents, TDD, Themis review gates.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"setup": "node scripts/setup.mjs",
|
|
21
21
|
"build:agents-md": "node scripts/build-agents-md.mjs",
|
|
22
22
|
"build:decision-router": "node scripts/build-decision-router.mjs",
|
|
23
|
+
"build:plugin": "node scripts/build-plugin.mjs",
|
|
23
24
|
"check:decision-router": "node scripts/build-decision-router.mjs --check",
|
|
24
25
|
"skills:lock": "node scripts/update-skills-lock.mjs",
|
|
25
26
|
"setup:lite": "node bin/pantheon-init.mjs init --yes --clean --components agents,skills,instructions",
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
"init": "node bin/pantheon-init.mjs init --yes",
|
|
29
30
|
"opencode": "OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true opencode",
|
|
30
31
|
"start": "OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true opencode",
|
|
31
|
-
"prepack": "npm run check:decision-router",
|
|
32
|
-
"prepublishOnly": "node scripts/validate-routing.mjs && npm run check:decision-router",
|
|
32
|
+
"prepack": "npm run build:plugin && npm run check:decision-router",
|
|
33
|
+
"prepublishOnly": "node scripts/validate-routing.mjs && npm run build:plugin && npm run check:decision-router",
|
|
33
34
|
"postpublish": "node -e \"console.log('\u2705 Published pantheon-opencode v' + require('./package.json').version + ' to npm')\"",
|
|
34
35
|
"version:status": "node scripts/versioning.mjs status",
|
|
35
36
|
"version:apply": "node scripts/versioning.mjs apply",
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon",
|
|
3
3
|
"publisher": "ils15",
|
|
4
|
-
"version": "2.0.0
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"displayName": "Pantheon",
|
|
6
6
|
"description": "Conductor-Delegate orchestration platform with 14 specialized agents, 25 skills, and OpenCode support.",
|
|
7
7
|
"agents": "./src/agents",
|
|
@@ -45,11 +45,11 @@ tools: ['search', 'usages']
|
|
|
45
45
|
- Replication lag (if applicable)
|
|
46
46
|
|
|
47
47
|
## Output
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
48
|
+
- Performance baseline
|
|
49
|
+
- Optimization recommendations
|
|
50
|
+
- Migration scripts
|
|
51
|
+
- Estimated performance gains
|
|
52
|
+
- Monitoring dashboard setup
|
|
53
53
|
|
|
54
54
|
## When to Use
|
|
55
55
|
- Query is slow
|
|
@@ -46,12 +46,12 @@ After plan, offer:
|
|
|
46
46
|
"Ready to execute with @zeus? I can coordinate all agents..."
|
|
47
47
|
|
|
48
48
|
## Output Format
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
49
|
+
- Requirements summary
|
|
50
|
+
- Codebase findings
|
|
51
|
+
- Comprehensive TDD plan
|
|
52
|
+
- Risk assessment
|
|
53
|
+
- Design decisions with rationale
|
|
54
|
+
- Ready for @zeus handoff
|
|
55
55
|
|
|
56
56
|
## When to Use
|
|
57
57
|
- Planning complex features (payment, auth, etc)
|
package/pyproject.toml
CHANGED
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.backends._legacy:_Backend"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pantheon"
|
|
7
|
-
version = "2.0.0
|
|
7
|
+
version = "2.0.0"
|
|
8
8
|
description = "Multi-agent orchestration framework"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
# Python sources under src/mcp/ import fastmcp/pydantic at runtime, but those
|
|
@@ -138,18 +138,18 @@ Setup: [INSTALLATION.md](docs/INSTALLATION.md).
|
|
|
138
138
|
- Test: focused checks by default; \`npm test\` for CI/release or broad/high-risk changes
|
|
139
139
|
- Lint: \`npm run lint\`
|
|
140
140
|
|
|
141
|
-
##
|
|
141
|
+
## Global Installation Testing (Sandbox)
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
Validate global installation AS A REAL USER in the sandbox \`~/pantheon-sandbox/\` (outside the repo; with dedicated HOME, npm prefix, and venv); the dev environment is NOT suitable for packaging tests.
|
|
144
144
|
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
145
|
+
- Run: \`bash ~/pantheon-sandbox/run-test.sh\` (MCPs, doctor, TUI)
|
|
146
|
+
- Agent rule: validate global installation (npm pack, \`init\`, MCPs, hooks) in the sandbox — NEVER in the development environment
|
|
147
|
+
- Teardown: \`rm -rf ~/pantheon-sandbox\`
|
|
148
148
|
|
|
149
149
|
## Worktrees
|
|
150
150
|
|
|
151
|
-
-
|
|
152
|
-
-
|
|
151
|
+
- Never create worktrees inside the main project; use \`<project-parent>/.pantheon-worktrees/<repo-basename>/<task>\`.
|
|
152
|
+
- Worktrees do not live inside \`.pantheon/\`.
|
|
153
153
|
|
|
154
154
|
## Conventions
|
|
155
155
|
|
|
@@ -603,14 +603,14 @@ function main() {
|
|
|
603
603
|
}
|
|
604
604
|
if (stale.length > 0) {
|
|
605
605
|
console.error(
|
|
606
|
-
|
|
606
|
+
`[ERROR] ${stale.join(' and ')} ${
|
|
607
607
|
stale.length > 1 ? 'are' : 'is'
|
|
608
608
|
} stale — run: node scripts/build-agents-md.mjs`,
|
|
609
609
|
)
|
|
610
610
|
process.exit(1)
|
|
611
611
|
}
|
|
612
612
|
console.log(
|
|
613
|
-
|
|
613
|
+
`[OK] AGENTS.md and AGENTS.global.md are up to date (${sharedCount} shared instruction sections)`,
|
|
614
614
|
)
|
|
615
615
|
return
|
|
616
616
|
}
|
|
@@ -620,7 +620,7 @@ function main() {
|
|
|
620
620
|
verifyRegularFile(AGENTS_GLOBAL_MD_PATH, global)
|
|
621
621
|
verifyRegularFile(AGENTS_MD_PATH, project)
|
|
622
622
|
console.log(
|
|
623
|
-
|
|
623
|
+
`[OK] Generated AGENTS.md (${logicalLineCount(project)} lines) + AGENTS.global.md ` +
|
|
624
624
|
`(${logicalLineCount(global)} lines, ${sharedCount} shared instruction sections)`,
|
|
625
625
|
)
|
|
626
626
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* build-plugin.mjs — Bundles src/plugin.ts into src/plugin/index.js.
|
|
5
|
+
*
|
|
6
|
+
* Ensures OpenCode and Node.js can import the Pantheon plugin from node_modules
|
|
7
|
+
* without triggering ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING on Node 22+.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { dirname, join } from 'node:path'
|
|
11
|
+
import { fileURLToPath } from 'node:url'
|
|
12
|
+
import { buildSync } from 'esbuild'
|
|
13
|
+
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
15
|
+
const root = join(__dirname, '..')
|
|
16
|
+
|
|
17
|
+
buildSync({
|
|
18
|
+
entryPoints: [join(root, 'src', 'plugin.ts')],
|
|
19
|
+
outfile: join(root, 'src', 'plugin', 'index.js'),
|
|
20
|
+
bundle: true,
|
|
21
|
+
platform: 'node',
|
|
22
|
+
format: 'esm',
|
|
23
|
+
packages: 'external',
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
console.log('Built src/plugin/index.js via esbuild.')
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** OpenCode host gate shared by the CLI and installer. */
|
|
2
2
|
|
|
3
3
|
import { spawnSync } from 'node:child_process'
|
|
4
|
-
import { mkdtempSync, rmSync } from 'node:fs'
|
|
5
|
-
import { tmpdir } from 'node:os'
|
|
4
|
+
import { existsSync, mkdtempSync, rmSync } from 'node:fs'
|
|
5
|
+
import { homedir, tmpdir } from 'node:os'
|
|
6
6
|
import { join } from 'node:path'
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -202,6 +202,19 @@ function parseHostMajor(text) {
|
|
|
202
202
|
return { ambiguous: [...majors].sort((a, b) => a - b) }
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
function resolveCandidateBinary(explicitBinary, env) {
|
|
206
|
+
if (explicitBinary) return explicitBinary
|
|
207
|
+
if (env.OPENCODE_BIN) return env.OPENCODE_BIN
|
|
208
|
+
if (process.platform !== 'win32') {
|
|
209
|
+
const userHome = env.HOME || homedir()
|
|
210
|
+
const standardBin = join(userHome, '.opencode', 'bin', 'opencode')
|
|
211
|
+
if (existsSync(standardBin)) {
|
|
212
|
+
return standardBin
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return 'opencode'
|
|
216
|
+
}
|
|
217
|
+
|
|
205
218
|
/**
|
|
206
219
|
* Resolve the target OpenCode generation. There is exactly one, and the probe
|
|
207
220
|
* must CONFIRM the host is 2.x before any write: there is no generation to fall
|
|
@@ -237,11 +250,10 @@ export function resolveOpenCodeVersion(options = {}) {
|
|
|
237
250
|
`Invalid OPENCODE_VERSION "${env.OPENCODE_VERSION}" — only "${SUPPORTED_GENERATION}" can be pinned`,
|
|
238
251
|
)
|
|
239
252
|
}
|
|
240
|
-
const binary = options.binary
|
|
253
|
+
const binary = resolveCandidateBinary(options.binary, env)
|
|
241
254
|
if (/(?:^|[\\/])opencode2(?:\.exe)?$/i.test(binary)) return SUPPORTED_GENERATION
|
|
242
255
|
|
|
243
|
-
const probe =
|
|
244
|
-
options.probe ?? (() => probeHostVersion(binary || 'opencode', options.probeTimeoutMs))
|
|
256
|
+
const probe = options.probe ?? (() => probeHostVersion(binary, options.probeTimeoutMs))
|
|
245
257
|
let raw
|
|
246
258
|
try {
|
|
247
259
|
raw = probe()
|
|
@@ -2587,10 +2587,17 @@ async function installPass(
|
|
|
2587
2587
|
let healed = raw.replace(/,?\s*"source":\s*"agents\/[A-Za-z0-9_-]+\.md"/g, '')
|
|
2588
2588
|
// A source-first entry leaves `"name": {,` — repair the orphan.
|
|
2589
2589
|
healed = healed.replace(/("[A-Za-z0-9_-]+": \{),/g, '$1')
|
|
2590
|
+
if (healed.includes('"plugins":') && !healed.includes('pantheon-opencode')) {
|
|
2591
|
+
const pluginPkg = join(packageDir, 'src', 'plugin')
|
|
2592
|
+
healed = healed.replace(
|
|
2593
|
+
/"plugins":\s*\[/,
|
|
2594
|
+
`"plugins": [\n {\n "package": "${pluginPkg}",\n "options": {}\n },`,
|
|
2595
|
+
)
|
|
2596
|
+
}
|
|
2590
2597
|
if (healed !== raw) {
|
|
2591
2598
|
writeFileSync(jsoncPath, healed)
|
|
2592
2599
|
warning(
|
|
2593
|
-
'Healed the sibling opencode.jsonc: removed stale cwd-relative agent "source" fields ' +
|
|
2600
|
+
'Healed the sibling opencode.jsonc: synchronized plugins and removed stale cwd-relative agent "source" fields ' +
|
|
2594
2601
|
'(the field that made agents vanish outside the config dir). Review the file if you hand-edit it.',
|
|
2595
2602
|
)
|
|
2596
2603
|
}
|