pantheon-opencode 1.6.0-beta.1 → 1.6.0-beta.11
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 +206 -0
- package/AGENTS.md +10 -891
- package/CHANGELOG.md +350 -0
- package/README.md +561 -52
- package/README.pt-BR.md +285 -20
- package/bin/pantheon-init.mjs +70 -4
- package/commands/pantheon-audit.md +7 -1
- package/commands/pantheon-consolidate.md +1 -1
- package/commands/pantheon-deepwork.md +14 -3
- package/commands/pantheon-focus.md +17 -0
- package/commands/pantheon-vision.md +61 -12
- package/package.json +24 -17
- package/plugin.json +2 -2
- package/pyproject.toml +8 -6
- package/scripts/build-agents-md.mjs +428 -56
- package/scripts/changelog-merge.mjs +161 -0
- package/scripts/{code_mode_server.py → code_mode.py} +3 -3
- package/scripts/cost.mjs +244 -41
- package/scripts/doctor.mjs +151 -1
- package/scripts/install/agents-md.mjs +4 -4
- package/scripts/install/backup.mjs +475 -0
- package/scripts/install/cli-ui.mjs +6 -1
- package/scripts/install/config-migration.mjs +317 -4
- package/scripts/install/exit-codes.mjs +26 -0
- package/scripts/install/health-check.mjs +21 -19
- package/scripts/install/interactive.mjs +16 -2
- package/scripts/install/migrate.mjs +41 -22
- package/scripts/install/opencode-version.mjs +246 -4
- package/scripts/install/opencode.mjs +1175 -215
- package/scripts/install/plan.mjs +287 -0
- package/scripts/install/plugin.mjs +62 -14
- package/scripts/install/shared.mjs +190 -48
- package/scripts/install/strings.mjs +20 -0
- package/scripts/install/venv.mjs +13 -3
- package/scripts/install/vision-prompt.mjs +171 -0
- package/scripts/install-mcp.mjs +28 -9
- package/scripts/{mcp_persistence_server.py → mcp_persistence.py} +52 -17
- package/{src/mcp/mcp_resources_server.py → scripts/mcp_resources.py} +2 -2
- package/scripts/{memory_mcp_server.py → memory_mcp.py} +2 -2
- package/scripts/probe-context-rehydrate.mjs +8 -2
- package/scripts/probe-pantheon-cost.mjs +71 -15
- package/scripts/prune.mjs +9 -3
- package/scripts/restore.mjs +222 -0
- package/scripts/run-node-tests.mjs +189 -0
- package/scripts/sync-artifacts.mjs +26 -13
- package/scripts/sync-tui.mjs +24 -3
- package/scripts/test-opencode-v2-sandbox.sh +180 -26
- package/scripts/validate-routing.mjs +3 -3
- package/scripts/validate-sandbox-install.mjs +138 -0
- package/scripts/versioning.mjs +13 -1
- package/scripts/vision-status.mjs +682 -0
- package/skills-lock.json +8 -8
- package/src/agents/aphrodite.md +20 -37
- package/src/agents/apollo.md +7 -3
- package/src/agents/athena.md +63 -35
- package/src/agents/demeter.md +8 -28
- package/src/agents/gaia.md +1 -1
- package/src/agents/hephaestus.md +10 -21
- package/src/agents/hermes.md +15 -38
- package/src/agents/iris.md +7 -1
- package/src/agents/mnemosyne.md +18 -54
- package/src/agents/nyx.md +1 -1
- package/src/agents/prometheus.md +16 -20
- package/src/agents/talos.md +10 -2
- package/src/agents/themis.md +5 -5
- package/src/agents/zeus.md +99 -172
- package/src/instructions/agent-return-format.instructions.md +34 -17
- package/src/instructions/backend-standards.instructions.md +2 -0
- package/src/instructions/frontend-standards.instructions.md +3 -1
- package/src/instructions/memory-protocol.instructions.md +12 -110
- package/src/instructions/test-economy.instructions.md +21 -0
- package/src/instructions/zeus-anti-stall.instructions.md +20 -67
- package/src/instructions/zeus-communication-rules.instructions.md +0 -1
- package/src/instructions/zeus-council-synthesis.instructions.md +31 -260
- package/src/instructions/zeus-memory-operations.instructions.md +30 -0
- package/src/instructions/zeus-timeout-retry.instructions.md +61 -89
- package/src/mcp/{code_mode_server.py → code_mode.py} +3 -3
- package/src/mcp/eval_store.py +2 -2
- package/src/mcp/{mcp_persistence_server.py → mcp_persistence.py} +52 -17
- package/{scripts/mcp_resources_server.py → src/mcp/mcp_resources.py} +2 -2
- package/src/mcp/{memory_mcp_server.py → memory_mcp.py} +2 -2
- package/src/mcp/{pantheon_vision_server.py → pantheon_vision.py} +286 -42
- package/src/mcp/requirements-mcp.txt +6 -4
- package/src/mcp/requirements-vision.txt +2 -2
- package/src/pantheon/cost-command.ts +403 -102
- package/src/pantheon/delegation-enforce.ts +10 -1
- package/src/pantheon/model-agents.ts +19 -0
- package/src/pantheon/model-command.ts +218 -56
- package/src/pantheon/presets.d.mts +0 -8
- package/src/pantheon/presets.mjs +5 -32
- package/src/pantheon/v2-bounded-read.ts +640 -0
- package/src/pantheon/v2-delegation-enforce.ts +214 -0
- package/src/pantheon/v2-execute-after.ts +186 -0
- package/src/pantheon/v2-model-overrides.ts +275 -0
- package/src/pantheon/v2-tools.ts +418 -0
- package/src/pantheon/v2-unsupported.d.mts +11 -0
- package/src/pantheon/v2-unsupported.mjs +90 -0
- package/src/pantheon/v2-vision.ts +622 -0
- package/src/pantheon/vision-local.ts +531 -0
- package/src/pantheon/vision.ts +1160 -115
- package/src/plugin-v2.ts +1158 -219
- package/src/plugin.ts +12 -9
- package/src/plugins/tui/dist/server.d.ts +1 -2
- package/src/plugins/tui/dist/server.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui-v2.d.ts +154 -0
- package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -0
- package/src/plugins/tui/dist/tui-v2.js +659 -0
- package/src/plugins/tui/dist/tui-v2.js.map +1 -0
- package/src/plugins/tui/dist/tui.d.ts +85 -82
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +72 -59
- package/src/plugins/tui/index-v2.ts +6 -0
- package/src/plugins/tui/package-lock.json +5516 -1353
- package/src/plugins/tui/package.json +22 -12
- package/src/plugins/tui/src/index-v2.tsx +734 -0
- package/src/plugins/tui/src/index.tsx +106 -85
- package/src/plugins/tui/src/opencode-v2.d.ts +13 -0
- package/src/plugins/tui/tsconfig.build.json +5 -0
- package/src/plugins/tui/tsconfig.typecheck.json +5 -0
- package/src/plugins/tui/tsdown.config.ts +22 -2
- package/src/plugins/tui/tui-v2.ts +2 -0
- package/src/plugins/tui/tui.ts +3 -0
- package/src/routing.yml +11 -21
- package/src/skills/README.md +3 -3
- package/src/skills/agent-coordination/SKILL.md +7 -2
- package/src/skills/artifact-management/SKILL.md +12 -5
- package/src/skills/auto-continue/SKILL.md +52 -35
- package/src/skills/code-review-checklist/SKILL.md +5 -5
- package/src/skills/context-compression/SKILL.md +26 -879
- package/src/skills/session-goal/SKILL.md +14 -5
- package/src/skills/spec-driven-development/SKILL.md +3 -1
- package/src/skills/tdd-with-agents/SKILL.md +18 -10
- package/opencode.json +0 -58
|
@@ -14,10 +14,10 @@ Use this skill to pin a session objective at the start of a long or complex sess
|
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
-
Invoke via the `/focus` command:
|
|
17
|
+
Invoke via the `/pantheon-focus` command (a conversation-only goal anchor):
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
/focus Implement JWT authentication with refresh token rotation
|
|
20
|
+
/pantheon-focus Implement JWT authentication with refresh token rotation
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Or state it explicitly at the start of a session:
|
|
@@ -70,9 +70,18 @@ Before each major delegation or decision, run this quick check:
|
|
|
70
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
73
|
-
## Cross-Session
|
|
73
|
+
## Cross-Session Continuity
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
V2 does not provide durable goal tools. `/pantheon-focus` only anchors the current
|
|
76
|
+
conversation and must not be described as surviving compaction or a new
|
|
77
|
+
session. For multi-phase work that needs persistent checkpoints, use
|
|
78
|
+
`/pantheon-deepwork`; otherwise ask before writing a goal to a project file.
|
|
79
|
+
|
|
80
|
+
In V1, use the implemented goal tools when they are available and explicitly
|
|
81
|
+
authorized. Do not infer that their presence in one host generation means they
|
|
82
|
+
exist in V2.
|
|
83
|
+
|
|
84
|
+
Historical path example (not a V2 runtime command):
|
|
76
85
|
|
|
77
86
|
```
|
|
78
87
|
/memories/session/current-goal.md
|
|
@@ -84,7 +93,7 @@ Status: Phase 2 of 3 (backend done, frontend in progress)
|
|
|
84
93
|
Next: POST /auth/refresh endpoint
|
|
85
94
|
```
|
|
86
95
|
|
|
87
|
-
This
|
|
96
|
+
This file-based approach requires explicit authorization and is not automatic.
|
|
88
97
|
|
|
89
98
|
---
|
|
90
99
|
|
|
@@ -12,7 +12,9 @@ description: "Define requirements via spec-first before any code — PRD, edge c
|
|
|
12
12
|
2. **PRD** — Escreva um documento de requisitos: objetivo, personas, fluxos, regras de negócio, critérios de aceitação
|
|
13
13
|
3. **Edge Cases** — Mapeie entradas inválidas, concorrência, falhas de API, estados vazios
|
|
14
14
|
4. **Technical Spec** — Decisões de arquitetura: componentes, dados, API contracts, deploy
|
|
15
|
-
5. **Approval** — Apresente ao usuário antes de codar.
|
|
15
|
+
5. **Approval** — Apresente o plano completo ao usuário antes de codar. Se o
|
|
16
|
+
planejamento veio de um subagente, devolva o plano integral ao orquestrador
|
|
17
|
+
para que ele o exiba na conversa principal antes de pedir aprovação.
|
|
16
18
|
|
|
17
19
|
## Anti-patterns
|
|
18
20
|
- ❌ Pular direto pra implementação
|
|
@@ -8,13 +8,21 @@ alwaysApply: false
|
|
|
8
8
|
|
|
9
9
|
# TDD with Agents
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Use RED → GREEN → REFACTOR for behavior-changing implementation where a meaningful test can express the change. Keep verification proportional to the changed surface and risk; advanced testing patterns are reserved for changes that warrant them.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
## Core Principle
|
|
16
16
|
|
|
17
|
-
> **
|
|
17
|
+
> **For testable behavior changes, write the focused test first, observe RED, implement minimally, then refactor.**
|
|
18
|
+
|
|
19
|
+
## Proportional TDD
|
|
20
|
+
|
|
21
|
+
- Use the complete RED → GREEN → REFACTOR cycle for new or changed behavior when a focused test is practical. Include a focused regression check for bug fixes.
|
|
22
|
+
- For typo, formatting, documentation-only, or otherwise non-behavioral edits, do not invent a test; inspect the diff and run the narrowest relevant validation.
|
|
23
|
+
- Run targeted tests for a small change. Run broader suites when the changed surface, integration boundaries, or risk make them useful; do not run the whole suite solely because one line changed.
|
|
24
|
+
- If a relevant existing test already captures the behavior, use it instead of adding a duplicate. If no automated check can express the change, report the manual or static verification performed.
|
|
25
|
+
- Auth, security, payment, data-integrity, and schema/migration changes retain focused RED/GREEN tests, required regression coverage, and Themis review. Do not weaken a project-specific required safety gate.
|
|
18
26
|
|
|
19
27
|
---
|
|
20
28
|
|
|
@@ -112,12 +120,12 @@ def test_provider_satisfies_consumer_contract():
|
|
|
112
120
|
pass
|
|
113
121
|
```
|
|
114
122
|
|
|
115
|
-
### Mutation Testing
|
|
123
|
+
### Mutation Testing (high-risk/critical logic only)
|
|
116
124
|
- Mutate source code (change `>` to `<`, remove conditions)
|
|
117
125
|
- Run tests → should fail (mutation killed)
|
|
118
126
|
- If tests pass → test is weak; improve it
|
|
119
127
|
|
|
120
|
-
### Visual Regression
|
|
128
|
+
### Visual Regression (visual behavior only)
|
|
121
129
|
```typescript
|
|
122
130
|
test('homepage looks the same', async ({ page }) => {
|
|
123
131
|
await page.goto('/')
|
|
@@ -129,8 +137,8 @@ test('homepage looks the same', async ({ page }) => {
|
|
|
129
137
|
|
|
130
138
|
## Coverage Rules
|
|
131
139
|
|
|
132
|
-
-
|
|
133
|
-
- **Critical paths
|
|
140
|
+
- Follow a repository's explicit coverage threshold when the changed code is in its measurement scope; do not manufacture a coverage target for docs, formatting, or a tiny isolated edit.
|
|
141
|
+
- **Critical paths:** preserve project-required coverage and tests for auth, payments, and data integrity.
|
|
134
142
|
- **No snapshot testing** — test behavior, not output shape
|
|
135
143
|
- **Test edge cases**: empty input, null, boundary values, errors
|
|
136
144
|
|
|
@@ -143,20 +151,20 @@ test('homepage looks the same', async ({ page }) => {
|
|
|
143
151
|
| **Hermes** | Unit + integration for FastAPI endpoints, services, middleware |
|
|
144
152
|
| **Aphrodite** | Component behavior tests with React Testing Library |
|
|
145
153
|
| **Demeter** | Migration upgrade/downgrade, query correctness |
|
|
146
|
-
| **Themis** |
|
|
154
|
+
| **Themis** | Reviews the changed surface, relevant edge/error cases, and applicable repository coverage requirements; always review sensitive/material changes |
|
|
147
155
|
|
|
148
156
|
---
|
|
149
157
|
|
|
150
158
|
## Workflow
|
|
151
159
|
|
|
152
160
|
```
|
|
153
|
-
1.
|
|
161
|
+
1. Use a plan/spec only when scope, risk, or ambiguity warrants it; a bounded fix may proceed directly
|
|
154
162
|
2. Hermes writes failing test (RED)
|
|
155
163
|
3. Hermes implements minimal code (GREEN)
|
|
156
164
|
4. Hermes refactors (REFACTOR)
|
|
157
165
|
5. Aphrodite writes frontend tests in parallel
|
|
158
|
-
6. Themis reviews
|
|
159
|
-
7.
|
|
166
|
+
6. Themis reviews sensitive or material changes, checking changed behavior and applicable quality gates
|
|
167
|
+
7. Escalate unmet repository or safety-critical test requirements; do not fail a micro-edit against an unrelated global coverage figure
|
|
160
168
|
```
|
|
161
169
|
|
|
162
170
|
---
|
package/opencode.json
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://opencode.ai/config.json",
|
|
3
|
-
"provider": {
|
|
4
|
-
"opencode-go": {
|
|
5
|
-
"models": {
|
|
6
|
-
"mimo-v2.5": {
|
|
7
|
-
"attachment": true,
|
|
8
|
-
"modalities": { "input": ["text", "image"] }
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"default_agent": "zeus",
|
|
14
|
-
"plugins": ["src/plugin-v2"],
|
|
15
|
-
"experimental": {
|
|
16
|
-
"subagent_depth": 2
|
|
17
|
-
},
|
|
18
|
-
"permission": {
|
|
19
|
-
"skill": {
|
|
20
|
-
"*": "allow"
|
|
21
|
-
},
|
|
22
|
-
"websearch": "deny",
|
|
23
|
-
"bash": {
|
|
24
|
-
"git *": "allow",
|
|
25
|
-
"npm *": "allow",
|
|
26
|
-
"npx *": "allow",
|
|
27
|
-
"pytest *": "allow",
|
|
28
|
-
"ruff *": "allow",
|
|
29
|
-
"pip *": "allow",
|
|
30
|
-
"python3 *": "allow"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"mcp": {
|
|
34
|
-
"bifrost": {
|
|
35
|
-
"type": "remote",
|
|
36
|
-
"url": "https://llm.ofertachina.cloud/mcp",
|
|
37
|
-
"enabled": true
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"agent": {
|
|
41
|
-
"talos": {
|
|
42
|
-
"permission": {
|
|
43
|
-
"edit": {
|
|
44
|
-
"*": "allow",
|
|
45
|
-
"**/migrations/**": "deny",
|
|
46
|
-
"**/alembic/**": "deny",
|
|
47
|
-
"**/models/**": "deny",
|
|
48
|
-
"**/auth/**": "deny",
|
|
49
|
-
"**/*.sql": "deny"
|
|
50
|
-
},
|
|
51
|
-
"bash": {
|
|
52
|
-
"*": "allow",
|
|
53
|
-
"alembic *": "deny"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|