pantheon-opencode 1.5.2 → 1.6.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 +4 -2
- package/.pantheon/code-mode/checkpoint_session.py +138 -102
- package/.pantheon/code-mode/compress-inline.py +102 -57
- package/.pantheon/code-mode/manifest.json +2 -8
- package/AGENTS.global.md +182 -0
- package/AGENTS.md +10 -891
- package/CHANGELOG.md +343 -0
- package/README.md +577 -79
- package/README.pt-BR.md +345 -60
- package/bin/pantheon-init.mjs +26 -3
- 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-optimize.md +2 -2
- package/commands/pantheon-vision.md +61 -12
- package/package.json +30 -11
- package/plugin.json +2 -2
- package/pyproject.toml +11 -16
- package/scripts/build-agents-md.mjs +376 -58
- package/scripts/changelog-merge.mjs +161 -0
- package/scripts/check-plugin-v2-coverage.mjs +213 -0
- package/scripts/ci-validate-yaml.py +7 -5
- package/scripts/{code_mode_server.py → code_mode.py} +119 -27
- package/scripts/cost.mjs +244 -41
- package/scripts/doctor.mjs +236 -29
- package/scripts/install/agents-md.mjs +4 -4
- package/scripts/install/cli-ui.mjs +1 -1
- package/scripts/install/config-migration.mjs +319 -6
- package/scripts/install/health-check.mjs +26 -37
- package/scripts/install/interactive.mjs +7 -7
- package/scripts/install/migrate.mjs +1 -1
- package/scripts/install/opencode-version.mjs +246 -4
- package/scripts/install/opencode.mjs +627 -179
- package/scripts/install/plugin.mjs +43 -9
- package/scripts/install/shared.mjs +120 -12
- package/scripts/install/vision-prompt.mjs +161 -0
- package/scripts/install-mcp.mjs +28 -9
- package/scripts/{mcp_persistence_server.py → mcp_persistence.py} +392 -78
- package/{src/mcp/mcp_resources_server.py → scripts/mcp_resources.py} +2 -2
- package/scripts/{memory_mcp_server.py → memory_mcp.py} +372 -198
- package/scripts/postinstall.mjs +0 -7
- package/scripts/probe-context-rehydrate.mjs +36 -13
- package/scripts/probe-pantheon-cost.mjs +71 -15
- package/scripts/prune.mjs +2 -2
- 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 +1913 -0
- package/scripts/validate-routing.mjs +43 -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 +15 -16
- 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 +1 -1
- package/src/agents/mnemosyne.md +23 -60
- 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 -130
- package/src/instructions/agent-return-format.instructions.md +18 -3
- 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 +11 -110
- package/src/instructions/zeus-anti-stall.instructions.md +14 -61
- package/src/instructions/zeus-communication-rules.instructions.md +0 -1
- package/src/instructions/zeus-council-synthesis.instructions.md +32 -260
- package/src/instructions/zeus-memory-operations.instructions.md +26 -0
- package/src/instructions/zeus-timeout-retry.instructions.md +40 -87
- package/src/mcp/{code_mode_server.py → code_mode.py} +119 -27
- package/src/mcp/eval_store.py +2 -2
- package/src/mcp/mcp_codemap_module.py +559 -129
- package/src/mcp/{mcp_persistence_server.py → mcp_persistence.py} +392 -78
- package/{scripts/mcp_resources_server.py → src/mcp/mcp_resources.py} +2 -2
- package/src/mcp/{memory_mcp_server.py → memory_mcp.py} +373 -250
- package/src/mcp/{pantheon_vision_server.py → pantheon_vision.py} +396 -40
- package/src/mcp/requirements-mcp.txt +10 -6
- package/src/mcp/requirements-vision.txt +4 -2
- package/src/pantheon/cost-command.ts +399 -101
- package/src/pantheon/delegation-enforce.ts +10 -1
- package/src/pantheon/model-command.ts +18 -7
- package/src/pantheon/presets.d.mts +0 -8
- package/src/pantheon/presets.mjs +5 -32
- package/src/pantheon/todo-enforcer.ts +1 -1
- 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-tools.ts +429 -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 +1161 -116
- package/src/plugin-v2.ts +1244 -288
- 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 +5504 -1341
- package/src/plugins/tui/package.json +25 -15
- 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 -22
- package/src/skills/README.md +34 -39
- 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 +54 -95
- 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/.pantheon/code-mode/eval-llm-judge.py +0 -255
- package/.pantheon/code-mode/eval-monte-carlo.py +0 -368
- package/.pantheon/code-mode/eval-run.py +0 -197
- package/.pantheon/code-mode/eval-static.py +0 -321
- package/.pantheon/code-mode/session-end-save.py +0 -186
- package/.pantheon/code-mode/session-end-save.sh +0 -18
- package/opencode.json +0 -58
- package/scripts/recover-zenodo-deposition.mjs +0 -146
- package/scripts/test-opencode-v1-v2-sandbox.sh +0 -862
- package/scripts/validate-zenodo-release.mjs +0 -154
- package/scripts/zenodo-artifact.mjs +0 -94
- package/scripts/zenodo-release-state.mjs +0 -53
- package/src/skills/orchestration-workflow/SKILL.md +0 -311
|
@@ -34,8 +34,8 @@ Route tasks to optimized agents based on category instead of specifying agents m
|
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
1. User describes feature
|
|
37
|
-
2. @athena
|
|
38
|
-
3.
|
|
37
|
+
2. @athena returns the complete PLAN to Zeus (no approval prompt from the child session)
|
|
38
|
+
3. Zeus displays the full PLAN in the main conversation, then asks the user to approve it (GATE 1)
|
|
39
39
|
4. Zeus dispatches agents to phases (parallel when possible)
|
|
40
40
|
5. Each agent: TDD cycle → writes IMPL artifact
|
|
41
41
|
6. @themis reviews all phases (GATE 2)
|
|
@@ -67,6 +67,11 @@ All phase outputs go to `.pantheon/memory-bank/.tmp/`. See `skill: artifact-mana
|
|
|
67
67
|
|
|
68
68
|
## Safety Gates
|
|
69
69
|
|
|
70
|
+
For every requested plan, Gate 1 is not satisfied by a child-agent approval
|
|
71
|
+
question or a link to a hidden artifact: the complete plan must be visible in
|
|
72
|
+
the main conversation before Zeus asks for approval. If the user requests
|
|
73
|
+
changes, Zeus presents the complete revised plan and repeats Gate 1.
|
|
74
|
+
|
|
70
75
|
| Gate | When | Why |
|
|
71
76
|
|------|------|-----|
|
|
72
77
|
| **GATE 1** | After PLAN | User confirms scope |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: artifact-management
|
|
3
|
-
description: "Structured
|
|
3
|
+
description: "Structured artifacts for planned, multi-phase, or materially risky implementation work."
|
|
4
4
|
context: fork
|
|
5
5
|
globs: []
|
|
6
6
|
alwaysApply: false
|
|
@@ -8,7 +8,7 @@ alwaysApply: false
|
|
|
8
8
|
|
|
9
9
|
# Artifact Management
|
|
10
10
|
|
|
11
|
-
Structured artifact trail
|
|
11
|
+
Structured artifact trail for planned, multi-phase, or materially risky implementation work. Artifacts are not a prerequisite for simple fixes or read-only investigation.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -55,6 +55,13 @@ All ephemeral artifacts live in `.pantheon/memory-bank/.tmp/` — gitignored and
|
|
|
55
55
|
|
|
56
56
|
> **Zeus does NOT generate artifacts.** He orchestrates agents that generate them.
|
|
57
57
|
|
|
58
|
+
## Proportional Use
|
|
59
|
+
|
|
60
|
+
- Create PLAN/IMPL/REVIEW artifacts for planned multi-phase work or when risk, auditability, or an explicit request needs a durable phase trail.
|
|
61
|
+
- A bounded, reversible fix should be investigated only as far as needed, implemented, verified with focused checks, and returned as a concise summary. Do not create PLAN, IMPL, or REVIEW artifacts for it.
|
|
62
|
+
- Read-only lookup or trivial discovery needs no DISC artifact; use one only when findings are broad enough to be reused or drive a material decision.
|
|
63
|
+
- The absence of an artifact never waives Themis review or human approval for auth/security, data/schema/migrations, production-impacting work, or sensitive actions.
|
|
64
|
+
|
|
58
65
|
---
|
|
59
66
|
|
|
60
67
|
## Templates
|
|
@@ -103,9 +110,9 @@ All ephemeral artifacts live in `.pantheon/memory-bank/.tmp/` — gitignored and
|
|
|
103
110
|
|
|
104
111
|
## Human Pause Points
|
|
105
112
|
|
|
106
|
-
1. **After PLAN** →
|
|
107
|
-
2. **After REVIEW** →
|
|
108
|
-
3. **Before
|
|
113
|
+
1. **After a required PLAN** → pause only when a material scope/risk decision needs approval.
|
|
114
|
+
2. **After required REVIEW** → preserve auth/security/data/schema and other sensitive approval gates.
|
|
115
|
+
3. **Before commit/push/merge/deploy or destructive/global action** → require explicit human approval.
|
|
109
116
|
|
|
110
117
|
---
|
|
111
118
|
|
|
@@ -18,16 +18,16 @@ Disciplined automatic continuation through multi-step tasks. Eliminates unnecess
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Risk-Proportional Gates
|
|
22
22
|
|
|
23
23
|
| Gate | Trigger | What happens |
|
|
24
24
|
|---|---|---|
|
|
25
|
-
| **GATE 0 —
|
|
26
|
-
| **GATE 1 — Plan Approval** |
|
|
27
|
-
| **GATE 2 —
|
|
28
|
-
| **GATE 3 — Git
|
|
25
|
+
| **GATE 0 — Explicit Council** | User explicitly invokes council and it returns `AWAITING_APPROVAL` | Stop and follow the approval the council requests; do not launch a council automatically for ordinary implementation. |
|
|
26
|
+
| **GATE 1 — Plan Approval** | A plan was requested or scope/risk makes planning necessary | Ask before implementation only when the plan introduces a material choice or risk; omit this gate for a bounded, clear fix. |
|
|
27
|
+
| **GATE 2 — Risk Review** | Auth/security, data/schema/migration, API contract, production configuration, or other material risk | Themis review and human approval before sensitive or irreversible action. For a trivial, isolated, reversible edit, provide a concise result instead of manufacturing a review phase. |
|
|
28
|
+
| **GATE 3 — Git / External Action** | Commit, push, merge, production deploy, destructive operation, global configuration, or broad permission change | Always stop for explicit human approval. Full-auto never authorizes these actions by implication. |
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
An explicit `AWAITING_APPROVAL` from an invoked council remains a hard stop. Authentication/security and data/schema changes retain their review and approval gates even in full-auto.
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
@@ -36,28 +36,31 @@ Disciplined automatic continuation through multi-step tasks. Eliminates unnecess
|
|
|
36
36
|
**Continue automatically when:**
|
|
37
37
|
- Next todo is a direct consequence of the current one
|
|
38
38
|
- Action is reversible (file edits, tests, linting)
|
|
39
|
-
- Scope is within the
|
|
39
|
+
- Scope is within the user's explicitly authorized task (a prior plan is not required for a small clear fix)
|
|
40
40
|
- No new ambiguity has emerged
|
|
41
41
|
|
|
42
42
|
**Stop and ask when:**
|
|
43
43
|
- A todo requires a decision not covered by the plan
|
|
44
44
|
- An unexpected error changes the approach
|
|
45
45
|
- A dependency is missing or broken
|
|
46
|
-
-
|
|
46
|
+
- Remaining context is too thin to carry the task through — write an explicit handoff instead
|
|
47
|
+
- The task reaches a sensitive gate in the table above; full-auto does not override it
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
### Full-auto Authorization
|
|
50
|
+
|
|
51
|
+
Full-auto may continue only within a task and scope the user explicitly authorized. It may run reversible edits and proportionate verification; it must stop for auth/security, data/schema changes with risk, destructive or global changes, broad permissions, deploy, push, or merge. Never infer permission to expand the scope from a full-auto request.
|
|
49
52
|
|
|
50
53
|
---
|
|
51
54
|
|
|
52
55
|
## Implementation Pattern
|
|
53
56
|
|
|
54
57
|
```
|
|
55
|
-
1. Create todos for
|
|
58
|
+
1. Create todos only for multi-step work; a one-step fix needs no todo ceremony
|
|
56
59
|
2. Mark first todo in_progress
|
|
57
60
|
3. Complete work → mark completed immediately
|
|
58
61
|
4. Mark next todo in_progress → repeat
|
|
59
62
|
5. Do NOT ask "should I continue?" between clear steps
|
|
60
|
-
6. Stop at
|
|
63
|
+
6. Stop at any applicable risk gate; do not require a plan/review gate for a low-risk edit
|
|
61
64
|
7. After gate approval, resume with next todo
|
|
62
65
|
```
|
|
63
66
|
|
|
@@ -70,7 +73,7 @@ Disciplined automatic continuation through multi-step tasks. Eliminates unnecess
|
|
|
70
73
|
- [ ] Previous step completed successfully (tests pass, no errors)
|
|
71
74
|
- [ ] Next step is within approved plan scope
|
|
72
75
|
- [ ] No new blocking issues emerged
|
|
73
|
-
- [ ]
|
|
76
|
+
- [ ] Remaining context can carry the next step, or an explicit handoff will be written
|
|
74
77
|
|
|
75
78
|
---
|
|
76
79
|
|
|
@@ -89,9 +92,9 @@ Phase N complete. Summary:
|
|
|
89
92
|
|
|
90
93
|
### Cooldown Rules
|
|
91
94
|
1. **Between parallel waves (no dependency):** No cooldown needed — wave results are independent
|
|
92
|
-
2. **Between sequential
|
|
93
|
-
3. **After Themis review
|
|
94
|
-
4. **Session reuse check:**
|
|
95
|
+
2. **Between sequential phases:** Summarize when dependencies or risk changed; skip ceremony for one-step work
|
|
96
|
+
3. **After required Themis review:** Reassess findings before continuing
|
|
97
|
+
4. **Session reuse check:** Reuse a prior specialist session only when it reduces real context duplication
|
|
95
98
|
|
|
96
99
|
### Abbreviated Cooldown
|
|
97
100
|
When auto-continuing between sequential non-gated phases, the cooldown is abbreviated to one line:
|
|
@@ -104,27 +107,18 @@ Only expand to full cooldown when hitting a mandatory gate.
|
|
|
104
107
|
|
|
105
108
|
## Timeout & Retry Enforcement
|
|
106
109
|
|
|
107
|
-
When a delegated agent does not respond in time, enforce the timeout policy
|
|
108
|
-
|
|
109
|
-
### Behavior by Agent Role
|
|
110
|
-
|
|
111
|
-
| Agent Role | Timeout | Retry Policy | Fallback | Timeout Parcial? |
|
|
112
|
-
|------------|---------|-------------|----------|------------------|
|
|
113
|
-
| Explorer (apollo) | 60s | 2 retries, exponential backoff | athena | ✅ Yes — partial results OK |
|
|
114
|
-
| Implementer (hermes, aphrodite) | 180s | 3 retries, exponential backoff | talos | ❌ No — must produce artifact |
|
|
115
|
-
| Reviewer (themis) | 120s | 2 retries, exponential backoff | zeus | ❌ No — must produce verdict |
|
|
116
|
-
| Infrastructure (prometheus) | 300s | 2 retries, exponential backoff | hermes | ❌ No |
|
|
117
|
-
| Hotfix (talos) | 30s | 1 retry, no backoff | hermes | ✅ Yes — one-liner fix OK |
|
|
110
|
+
When a delegated agent does not respond in time, enforce the timeout policy defined in
|
|
111
|
+
`src/instructions/zeus-timeout-retry.instructions.md`.
|
|
118
112
|
|
|
113
|
+
**That file is the single authority** for per-role timeouts, retry counts, fallback chains, and
|
|
114
|
+
whether partial results are acceptable. It is force-fed into every session via `AGENTS.md`; this
|
|
115
|
+
skill is opt-in. Do not restate those values here — a copy in this skill is precisely what drifted
|
|
116
|
+
out of sync with them. If a dispatch times out, read the role's row from the instruction file.
|
|
119
117
|
|
|
120
118
|
### Timeout Parcial (Partial Results)
|
|
121
119
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
- ✅ @gaia (literature review) — can return partial findings
|
|
125
|
-
- ✅ @talos (hotfix confirmation) — can return without fix if timeout
|
|
126
|
-
- ❌ Never for implementers (@hermes, @aphrodite, @demeter) — must complete or fail
|
|
127
|
-
- ❌ Never for reviewers (@themis) — must produce a verdict
|
|
120
|
+
Whether an agent may return partial results is the **Partial Results OK?** column in that table.
|
|
121
|
+
Only agents marked ✅ there may return partial — never implementers, never reviewers.
|
|
128
122
|
|
|
129
123
|
**How to signal timeout parcial:**
|
|
130
124
|
When dispatching, set the expectation explicitly:
|
|
@@ -167,69 +161,34 @@ Ready for Phase 2? Waiting for go-ahead.
|
|
|
167
161
|
Should I now run the migration tests? [waiting]
|
|
168
162
|
```
|
|
169
163
|
|
|
170
|
-
## Session Heartbeat
|
|
171
|
-
|
|
172
|
-
Auto-save checkpoint every N turns (configurable, default 5).
|
|
173
|
-
|
|
174
|
-
### Heartbeat File
|
|
175
|
-
|
|
176
|
-
`.pantheon/deepwork/<slug>/heartbeat.json`
|
|
177
|
-
|
|
178
|
-
### Heartbeat JSON Format
|
|
179
|
-
|
|
180
|
-
```json
|
|
181
|
-
{
|
|
182
|
-
"slug": "task-identifier",
|
|
183
|
-
"last_action": "2026-07-16T20:00:00Z",
|
|
184
|
-
"turn_count": 10,
|
|
185
|
-
"current_phase": 2,
|
|
186
|
-
"status": "alive | warning | stalled | paused | completed",
|
|
187
|
-
"next_action": "brief description of next planned action"
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Heartbeat Rules
|
|
192
|
-
1. Update every 5 turns minimum (by default)
|
|
193
|
-
2. Contains NO context — only timestamps and counters
|
|
194
|
-
3. Single file, always overwritten (not versioned)
|
|
195
|
-
4. Used for quick "is this session alive?" checks
|
|
164
|
+
## Session Heartbeat & Checkpoints
|
|
196
165
|
|
|
197
|
-
|
|
166
|
+
Session state is **not** file-based. It lives in **pantheon-persistence** under the
|
|
167
|
+
`checkpoint:<slug>` namespace and is cleaned up automatically by a 4h TTL.
|
|
198
168
|
|
|
199
|
-
|
|
169
|
+
Use checkpoints only when `context_save` and `context_get` are explicitly
|
|
170
|
+
present in the active session's tool list. If unavailable, do not attempt a
|
|
171
|
+
checkpoint or guess a session ID; carry the handoff in the normal response.
|
|
200
172
|
|
|
201
|
-
|
|
173
|
+
When available, call `context_save` with `content=JSON.stringify(state)` and an
|
|
174
|
+
explicit `session_id`. A successful save needs no immediate `context_get`; read
|
|
175
|
+
only when resuming or when the save result is uncertain. Reuse the same session
|
|
176
|
+
ID so the `latest` pointer survives compaction. `state` must be an object — never pass a bare string as `content`: its
|
|
177
|
+
`goal`/`phase`/`delegations`/`heartbeat` values are objects and `tail` is an array.
|
|
178
|
+
`goal` is optional; when unset, omit the key rather than passing a string placeholder.
|
|
202
179
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
.pantheon/deepwork/<slug>/
|
|
207
|
-
├── PLAN.md # Immutable plan (created at start)
|
|
208
|
-
├── STATUS.md # Human-readable current state (updated every phase)
|
|
209
|
-
├── heartbeat.json # Lightweight ping (updated every N turns)
|
|
210
|
-
├── checkpoint-<N>.json # Full state snapshot (created at phase boundaries)
|
|
211
|
-
├── session.json # Session metadata (created at start, updated on stop)
|
|
212
|
-
└── REVIEW.md # Final Themis review (created at end)
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Checkpoint JSON Schema
|
|
216
|
-
|
|
217
|
-
```json
|
|
218
|
-
{
|
|
219
|
-
"slug": "string — unique task identifier",
|
|
220
|
-
"phase": "integer — current phase number",
|
|
221
|
-
"turn_count": "integer — total turns elapsed",
|
|
222
|
-
"timestamp": "string — ISO 8601 timestamp",
|
|
223
|
-
"context_hash": "string — first 8 hex chars of SHA-256 of STATUS.md",
|
|
224
|
-
"version": "integer — schema version (current: 2)"
|
|
225
|
-
}
|
|
226
|
-
```
|
|
180
|
+
### Heartbeat Check
|
|
181
|
+
- Check heartbeat only when checkpoint tools are available and the workflow needs a durable resume.
|
|
182
|
+
- Write a heartbeat after anti-stall recovery only when the current session exposes checkpoint tools.
|
|
227
183
|
|
|
228
184
|
### Checkpoint Rules
|
|
229
|
-
1. Save
|
|
230
|
-
2.
|
|
231
|
-
3.
|
|
232
|
-
|
|
185
|
+
1. Save checkpoints only for long-running/multi-phase work, context-loss risk, or substantive parallel work — not a one-off command or bounded fix
|
|
186
|
+
2. Include current phase and remaining tasks when a checkpoint is warranted
|
|
187
|
+
3. On resume, read the latest checkpoint only with a known session ID; otherwise request the missing handoff context.
|
|
188
|
+
|
|
189
|
+
> Do not create `heartbeat.json`, `checkpoint-<N>.json`, or `session.json` under
|
|
190
|
+
> `.pantheon/deepwork/`. That file-based mechanism is retired — TTL handles cleanup, and reading
|
|
191
|
+
> a file that nothing writes back returns stale state.
|
|
233
192
|
|
|
234
193
|
---
|
|
235
194
|
|
|
@@ -239,10 +198,10 @@ Configurable gates for different platforms and risk levels:
|
|
|
239
198
|
|
|
240
199
|
| Gate | Default | Auto-Approval Condition |
|
|
241
200
|
|------|---------|------------------------|
|
|
242
|
-
|
|
|
243
|
-
|
|
|
244
|
-
|
|
|
245
|
-
|
|
|
201
|
+
| Council | Only when explicitly invoked | Never auto-start a council for ordinary implementation |
|
|
202
|
+
| Plan approval | Only for requested or risk-required plans | Skip for bounded, clear work |
|
|
203
|
+
| Themis review | Required for sensitive/material changes | May omit for trivial isolated edits; never auto-bypass required findings |
|
|
204
|
+
| Git / external actions | Never Auto | Commit, push, merge, deploy, destructive/global changes require explicit approval |
|
|
246
205
|
| Deploy | Always Ask | N/A — always requires human |
|
|
247
206
|
| Destructive DB Ops | Always Ask | N/A — always requires human |
|
|
248
207
|
|
|
@@ -255,8 +214,8 @@ auto-continue:
|
|
|
255
214
|
idle_stall: 120 # seconds before stall detection
|
|
256
215
|
idle_pause: 300 # seconds before auto-pause
|
|
257
216
|
gates:
|
|
258
|
-
plan_approval:
|
|
259
|
-
themis_review:
|
|
217
|
+
plan_approval: when_required_by_scope_or_risk
|
|
218
|
+
themis_review: required_for_sensitive_or_material_changes
|
|
260
219
|
git_commit: never_auto
|
|
261
220
|
deploy: always_ask
|
|
262
221
|
destructive_ops: always_ask
|
|
@@ -52,11 +52,11 @@ biome check --write --unsafe <files>
|
|
|
52
52
|
- [ ] Proper file sizes (<300 lines)
|
|
53
53
|
|
|
54
54
|
### Testing
|
|
55
|
-
- [ ]
|
|
56
|
-
- [ ]
|
|
57
|
-
- [ ] Integration tests
|
|
58
|
-
- [ ]
|
|
59
|
-
- [ ]
|
|
55
|
+
- [ ] Tests cover the changed behavior where meaningful; documentation/format-only changes do not need invented tests
|
|
56
|
+
- [ ] Apply an explicit repository coverage threshold only when measurable and relevant to the changed code
|
|
57
|
+
- [ ] Integration tests where the change crosses workflow boundaries
|
|
58
|
+
- [ ] Relevant edge cases tested for the changed behavior/risk
|
|
59
|
+
- [ ] Relevant error conditions tested
|
|
60
60
|
|
|
61
61
|
### Security (OWASP Top 10)
|
|
62
62
|
- [ ] Input validation present
|