pantheon-opencode 1.6.0-beta.9 → 1.6.1
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 +118 -0
- package/AGENTS.md +18 -168
- package/CHANGELOG.md +144 -365
- package/README.md +124 -607
- package/README.pt-BR.md +120 -345
- package/bin/pantheon-init.mjs +504 -141
- package/commands/pantheon-deepwork.md +14 -3
- package/commands/pantheon-vision.md +61 -12
- package/package.json +22 -13
- package/plugin.json +1 -1
- package/pyproject.toml +6 -2
- package/scripts/_pantheon_paths.py +24 -0
- package/scripts/build-agents-md.mjs +368 -69
- package/scripts/changelog-merge.mjs +161 -0
- package/scripts/check-plugin-v2-coverage.mjs +11 -8
- package/scripts/docs-check-changelog.mjs +204 -0
- package/scripts/docs-link-check.mjs +314 -0
- package/scripts/docs-media.mjs +157 -0
- package/scripts/doctor.mjs +850 -45
- package/scripts/install/agents-md.mjs +2 -2
- package/scripts/install/backup.mjs +648 -0
- package/scripts/install/cli-ui.mjs +303 -72
- package/scripts/install/component-selection.mjs +61 -0
- package/scripts/install/config-migration.mjs +583 -27
- package/scripts/install/exit-codes.mjs +26 -0
- package/scripts/install/file-inventory.mjs +555 -0
- package/scripts/install/health-check.mjs +31 -25
- package/scripts/install/interactive.mjs +99 -383
- package/scripts/install/interrupt.mjs +78 -0
- package/scripts/install/migrate.mjs +49 -25
- package/scripts/install/model-picker.mjs +218 -250
- package/scripts/install/opencode-state.mjs +91 -0
- package/scripts/install/opencode-version.mjs +83 -21
- package/scripts/install/opencode.mjs +1675 -187
- package/scripts/install/plan-artifact.mjs +517 -0
- package/scripts/install/plan.mjs +475 -0
- package/scripts/install/plugin.mjs +214 -27
- package/scripts/install/prompt-result.mjs +2 -0
- package/scripts/install/run-record.mjs +115 -0
- package/scripts/install/shared.mjs +256 -99
- package/scripts/install/state.mjs +63 -8
- package/scripts/install/strings.mjs +93 -8
- package/scripts/install/v2-capabilities.mjs +205 -0
- package/scripts/install/venv.mjs +90 -47
- package/scripts/install/verify.mjs +128 -0
- package/scripts/install/vision-prompt.mjs +173 -0
- package/scripts/install-mcp.mjs +2 -2
- package/scripts/manifest-inventory.mjs +49 -3
- package/scripts/mcp_persistence.py +1535 -1050
- package/scripts/memory_mcp.py +12 -843
- package/scripts/node-engine-policy.mjs +85 -0
- package/scripts/package-evidence.mjs +10 -2
- package/scripts/postinstall.mjs +26 -26
- package/scripts/probe-pantheon-cost.mjs +118 -19
- package/scripts/prune.mjs +9 -3
- package/scripts/reconcile.mjs +325 -0
- package/scripts/release-gates.mjs +687 -0
- package/scripts/restore.mjs +222 -0
- package/scripts/run-node-tests.mjs +24 -8
- package/scripts/sync-artifacts.mjs +19 -7
- package/scripts/sync-tui.mjs +5 -1
- package/scripts/test-opencode-v2-sandbox.sh +36 -123
- package/scripts/uninstall.mjs +369 -34
- package/scripts/update.mjs +164 -0
- package/scripts/validate-node-engine-policy.mjs +13 -0
- package/scripts/version-check.mjs +34 -1
- package/scripts/versioning.mjs +23 -3
- package/scripts/vision-status.mjs +682 -0
- package/skills-lock.json +8 -8
- package/src/agents/aphrodite.md +13 -10
- package/src/agents/apollo.md +4 -5
- package/src/agents/athena.md +74 -46
- package/src/agents/demeter.md +10 -7
- package/src/agents/gaia.md +0 -1
- package/src/agents/hephaestus.md +4 -3
- package/src/agents/hermes.md +10 -9
- package/src/agents/iris.md +6 -1
- package/src/agents/mnemosyne.md +10 -4
- package/src/agents/nyx.md +4 -4
- package/src/agents/prometheus.md +12 -11
- package/src/agents/talos.md +6 -0
- package/src/agents/zeus.md +84 -56
- package/src/instructions/agent-return-format.instructions.md +12 -41
- package/src/instructions/memory-protocol.instructions.md +5 -11
- package/src/instructions/test-economy.instructions.md +12 -0
- package/src/instructions/yagni.instructions.md +6 -15
- package/src/instructions/zeus-anti-stall.instructions.md +6 -6
- package/src/instructions/zeus-communication-rules.instructions.md +6 -6
- package/src/instructions/zeus-council-synthesis.instructions.md +11 -12
- package/src/instructions/zeus-memory-operations.instructions.md +13 -7
- package/src/instructions/zeus-timeout-retry.instructions.md +36 -10
- package/src/mcp/_pantheon_paths.py +24 -0
- package/src/mcp/mcp_codemap_module.py +86 -18
- package/src/mcp/mcp_persistence.py +1535 -1050
- package/src/mcp/memory_mcp.py +444 -94
- package/src/mcp/pantheon_vision.py +285 -41
- package/src/mcp/requirements-mcp.txt +6 -1
- package/src/mcp/requirements-vision.txt +1 -1
- package/src/pantheon/context-pruner.ts +541 -0
- package/src/pantheon/cost-command.ts +901 -60
- package/src/pantheon/delegation-enforce.ts +160 -23
- package/src/pantheon/goal-loop.ts +11 -8
- package/src/pantheon/guard-path.ts +162 -0
- package/src/pantheon/memory-context.ts +1017 -0
- package/src/pantheon/model-agents.ts +19 -0
- package/src/pantheon/model-command.ts +218 -56
- package/src/pantheon/model-pricing.ts +536 -0
- package/src/pantheon/presets.mjs +2 -0
- package/src/pantheon/task-result-guard.ts +50 -14
- package/src/pantheon/v2-bounded-read.ts +654 -0
- package/src/pantheon/v2-bridge.ts +27 -0
- package/src/pantheon/v2-delegation-enforce.ts +133 -6
- package/src/pantheon/v2-execute-after.ts +135 -24
- package/src/pantheon/v2-model-overrides.ts +275 -0
- package/src/pantheon/v2-shell-hooks.ts +260 -0
- package/src/pantheon/v2-tools.ts +89 -35
- package/src/pantheon/v2-unsupported.mjs +34 -7
- package/src/pantheon/v2-vision.ts +622 -0
- package/src/pantheon/vision-local.ts +531 -0
- package/src/pantheon/vision.ts +1166 -116
- package/src/plugin-v2.ts +1039 -171
- package/src/plugin.ts +37 -13
- package/src/plugins/tui/dist/tui-v2.d.ts +1029 -2
- package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui-v2.js +3742 -85
- package/src/plugins/tui/dist/tui.js +1 -1
- package/src/plugins/tui/package-lock.json +15 -15
- package/src/plugins/tui/package.json +7 -5
- package/src/plugins/tui/src/index-v2.tsx +4314 -50
- package/src/plugins/tui/tsconfig.typecheck.json +5 -0
- package/src/routing.yml +50 -5
- package/src/skills/agent-coordination/SKILL.md +7 -2
- package/src/skills/artifact-management/SKILL.md +5 -1
- package/src/skills/auto-continue/SKILL.md +14 -6
- package/src/skills/codemap/SKILL.md +1 -1
- package/src/skills/memory-bank/SKILL.md +21 -13
- package/src/skills/session-goal/SKILL.md +12 -22
- package/src/skills/spec-driven-development/SKILL.md +3 -1
- package/src/skills/worktrees/SKILL.md +30 -11
- package/scripts/probe-context-rehydrate.mjs +0 -263
package/AGENTS.global.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
|
|
2
|
+
<!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
|
|
3
|
+
<!-- Source of truth: src/instructions/*.instructions.md + the static sections in this script. -->
|
|
4
|
+
<!-- pantheon:agents-md v2 artifact=global generated-at=2026-10-22T13:57:53-03:00 sha=ceade5f -->
|
|
5
|
+
|
|
6
|
+
# Pantheon Agent System — OpenCode
|
|
7
|
+
|
|
8
|
+
## Available Agents
|
|
9
|
+
|
|
10
|
+
| Agent | Role |
|
|
11
|
+
|-------|------|
|
|
12
|
+
| @aphrodite | Frontend — React 19, strict TypeScript, WCAG, responsive design, deprecated npm detection. |
|
|
13
|
+
| @apollo | Read-only investigation scout — 3–10 parallel searches (codebase, docs, GitHub). No edits, no commands. |
|
|
14
|
+
| @athena | Planner/architect — research-first, plan-only, never implements. Plans carry quality gates (ruff/Biome, dep detection, LTS policy). |
|
|
15
|
+
| @demeter | Database — SQLAlchemy 2.0, Alembic, query optimization, N+1 prevention, migrations; preserves schema/data review gates. |
|
|
16
|
+
| @gaia | Remote sensing — satellite/spectral analysis, SAR, change detection, time series, ML/DL classification; read-only. |
|
|
17
|
+
| @hephaestus | AI pipelines — LangChain/LangGraph, RAG, vector stores, embeddings. |
|
|
18
|
+
| @hermes | Backend — FastAPI, Python, async, modern stdlib, obsolete lib detection. |
|
|
19
|
+
| @iris | GitHub ops — branches, PRs, issues, releases, tags; called by zeus after review. Never pushes or merges without explicit human approval. |
|
|
20
|
+
| @mnemosyne | Memory bank — initializes .pantheon/memory-bank/; writes ADRs/task records only on explicit request. Called by zeus, never automatically. |
|
|
21
|
+
| @nyx | Observability — OpenTelemetry tracing, token/cost tracking, agent analytics, LangSmith. |
|
|
22
|
+
| @prometheus | Infrastructure + model providers — Docker, CI/CD, multi-model routing, cost optimization, provider abstraction. |
|
|
23
|
+
| @talos | Hotfix lane — small bugs, CSS, typos, minor logic; no TDD ceremony, standalone, no subagents. Escalates complex issues to zeus. |
|
|
24
|
+
| @themis | Quality/security gate — ruff/Biome, dead/legacy code, OWASP Top 10, coverage, correctness, deprecation audit. Reviews material/sensitive changes. |
|
|
25
|
+
| @zeus | Central orchestrator — never implements. Delegates to: athena, apollo, hermes, aphrodite, demeter, prometheus, themis, iris, mnemosyne, talos, hephaestus, nyx. |
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# Agent Instructions
|
|
29
|
+
|
|
30
|
+
Shared rules from `src/instructions/*.instructions.md`, identical for OpenCode V1 and V2 (V2 ignores `instructions`). Repo-specific setup stays in that project's AGENTS.md, so no rule loads twice; agent-scoped rules live only in the matching prompt.
|
|
31
|
+
|
|
32
|
+
<!-- Source: src/instructions/agent-return-format.instructions.md -->
|
|
33
|
+
## Agent Return Format
|
|
34
|
+
|
|
35
|
+
Implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) MUST return results to Zeus in this format:
|
|
36
|
+
|
|
37
|
+
## subtask_summary
|
|
38
|
+
**files_changed:** [list of file paths, one per line]
|
|
39
|
+
**summary:** What was done, in 2-3 sentences
|
|
40
|
+
**tests:** ✅ All passing / ⚠️ X failing / ❌ Not run (reason)
|
|
41
|
+
**coverage:** X% (if applicable)
|
|
42
|
+
**tokens:** ~N input / ~M output (estimated)
|
|
43
|
+
**status:** complete | partial (reason) | escalated (reason)
|
|
44
|
+
**blockers:** [list any blockers or null]
|
|
45
|
+
**memory_context:** {"refs":[{"namespace":"<safe namespace>","key":"<safe key>"}],"takeaway":"<concise relevant takeaway>"} (optional only if memory affected; non-sensitive refs/takeaway, no secrets or copied memory; only in this summary, not Apollo/Athena or council formats)
|
|
46
|
+
|
|
47
|
+
For investigation agents (Apollo, Athena), return structured findings: key findings as bullets, file paths with line numbers, code snippets of max 3 lines.
|
|
48
|
+
|
|
49
|
+
### Athena Plan Handoff
|
|
50
|
+
|
|
51
|
+
When Zeus delegates Athena through the root `subagent` dispatch, its final task result MUST contain the complete Markdown plan (not a summary, artifact path, or approval question): goal, scope and assumptions, phases, affected files or areas, dependencies, verification, risks, open questions, acceptance criteria — unknowns marked, never guessed. This supersedes the structured-findings format. Athena must not call `agent/askQuestions`, pause for user input, or ask for approval in the child session. Zeus publishes the full plan as a normal message before any approval UI, never bundling plan and approval question; if the runtime cannot guarantee that order, Zeus asks for approval in plain text afterwards and waits for the next user message. Direct Athena invocations show the complete plan before requesting approval.
|
|
52
|
+
|
|
53
|
+
## Council Specialist Response Format
|
|
54
|
+
|
|
55
|
+
On a `/pantheon` council invocation, specialists MUST return this format. First-round prompts are independent — whether dispatch is parallel or synchronous/sequential — so respond without peer responses: never guess peer positions or claim unseen agreement. Omit `agreement_signals` or write `none` in the first round and cite only peer responses visible in a rebuttal prompt. Zeus derives agreement by comparing actual responses.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
## specialist_response
|
|
59
|
+
**position:** <clear one-sentence position answering the question>
|
|
60
|
+
**reasoning:** <2-4 sentences with logical chain>
|
|
61
|
+
**trade_offs:** <what's gained vs lost — at least one of each, specific>
|
|
62
|
+
**risks:** <what could go wrong, max 3 items>
|
|
63
|
+
**confidence:** High | Medium | Low
|
|
64
|
+
**agreement_signals:** <omit or `none` in first round; rebuttal may cite only visible peer responses>
|
|
65
|
+
**specific_claims:** <optional self-reported count; advisory only, not evidence>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Required: position, reasoning, trade_offs, risks, confidence. Optional `agreement_signals` and `specific_claims` are advisory — never speculate or self-reference, and do not treat a self-reported count alone as evidence or proof of confidence. **High** needs ≥3 verifiable claims supported by evidence; **Medium** ≥1; **Low** is opinion-based or speculative. Equal self-reported counts do not by themselves prove fabrication; judge the actual claims.
|
|
69
|
+
|
|
70
|
+
<!-- Source: src/instructions/memory-protocol.instructions.md -->
|
|
71
|
+
## Memory Protocol
|
|
72
|
+
|
|
73
|
+
### Retrieval
|
|
74
|
+
- Search only when prior project history could change the outcome; skip self-contained questions and bounded changes.
|
|
75
|
+
- Delegated work: Zeus searches at most once and passes useful hits; reuse supplied results, and search again only if relevant history is missing.
|
|
76
|
+
- Use a targeted query (`top_k=2`) and ignore weak matches; missing or irrelevant results never block current work.
|
|
77
|
+
|
|
78
|
+
### Persistence
|
|
79
|
+
- Use only tools granted in the active session: Zeus has `memory_search` and temporary `context_save`/`context_get` checkpoints but no durable writes; Mnemosyne has `memory_store` and other durable tools.
|
|
80
|
+
- Store at most one concise, reusable top-level result; never persist routine child summaries, phase updates, test logs, or temporary state. Confirm a successful write before claiming persistence. Never store secrets, credentials, or tokens; `memory_store` does not guarantee redaction, so omit or redact sensitive content first.
|
|
81
|
+
- If no write tool is available or the write did not succeed, say the information was not persisted; never imply automatic storage or recovery. Add ADRs to the memory bank only when explicitly requested.
|
|
82
|
+
|
|
83
|
+
<!-- Source: src/instructions/test-economy.instructions.md -->
|
|
84
|
+
## Test Economy
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
Write the smallest test that proves the behavior: one behavior → one focused test; never duplicate coverage across suites or files.
|
|
88
|
+
|
|
89
|
+
- No E2E, full-install, or network-dependent tests unless the change alters that end-to-end path; prefer unit or integration tests.
|
|
90
|
+
- No assertions on copy/format strings, and none that only restate the implementation ("test the test").
|
|
91
|
+
- Heavy or slow suites (real install/E2E) MUST be opt-in via a separate tier, never per edit or phase; respect a per-phase time budget and reserve the full suites for release gates.
|
|
92
|
+
- Fixing a bug: one targeted regression test, not a broad new suite.
|
|
93
|
+
- This economy rule does NOT weaken stronger gates: auth, security, data-integrity, and required coverage thresholds stay mandatory.
|
|
94
|
+
|
|
95
|
+
<!-- Source: src/instructions/yagni.instructions.md -->
|
|
96
|
+
## YAGNI Anti-overengineering
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
1. **Don't add abstractions before the third repetition** — three uses make a pattern; prefer duplication over the wrong abstraction.
|
|
100
|
+
2. **If it's not tested, it doesn't exist** — untested code is not "done".
|
|
101
|
+
3. **Delete more than you add** — every line is a liability; remove unused code immediately.
|
|
102
|
+
4. **Prefer the standard library over dependencies** — fewer dependencies, fewer vulnerabilities.
|
|
103
|
+
5. **Don't optimize before measuring** — measure, then optimize.
|
|
104
|
+
|
|
105
|
+
When reviewing code, ask: "Is this YAGNI? Could we solve it more simply?"
|
|
106
|
+
|
|
107
|
+
<!-- Source: src/instructions/zeus-communication-rules.instructions.md -->
|
|
108
|
+
## Zeus Communication Rules
|
|
109
|
+
|
|
110
|
+
Applies to Zeus and all agents:
|
|
111
|
+
|
|
112
|
+
- **No Flattery**: no opening compliments or affirmations; begin with the answer or action.
|
|
113
|
+
- **Honest Pushback**: if a request is unsound, say so, explain why, and offer a better approach — avoiding friction is worse than a useful correction.
|
|
114
|
+
- **Concise Execution**: skip preambles; state the action, do it, report the outcome.
|
|
115
|
+
- **No Padding**: no filler or restating — every sentence carries information.
|
|
116
|
+
- **Uncertainty = Ask**: ambiguous requirements get one targeted question, never a guess.
|
|
117
|
+
|
|
118
|
+
<!-- pantheon:generated:end — user content outside this region is preserved verbatim -->
|
package/AGENTS.md
CHANGED
|
@@ -1,186 +1,36 @@
|
|
|
1
|
+
<!-- pantheon:generated:begin — Pantheon-managed region; regenerated on install/upgrade, never edit inside -->
|
|
1
2
|
<!-- Generated by scripts/build-agents-md.mjs — do not edit directly. -->
|
|
2
|
-
<!-- Source of truth:
|
|
3
|
+
<!-- Source of truth: project sections in scripts/build-agents-md.mjs. -->
|
|
4
|
+
<!-- pantheon:agents-md v2 artifact=project generated-at=2026-10-22T13:57:53-03:00 sha=ceade5f -->
|
|
3
5
|
|
|
4
|
-
# Pantheon
|
|
5
|
-
|
|
6
|
-
This project uses the Pantheon multi-agent framework with 14 specialized agents.
|
|
7
|
-
|
|
8
|
-
## Available Agents
|
|
9
|
-
|
|
10
|
-
| Agent | Role |
|
|
11
|
-
|-------|------|
|
|
12
|
-
| @aphrodite | Frontend specialist — React 19, TypeScript strict, WCAG accessibility, responsive design, TDD, modern API patterns, deprecated npm detection. Uses discovery/review proportionally to scope and risk. |
|
|
13
|
-
| @apollo | Read-only investigation scout — 3–10 parallel searches across codebase, external docs, and GitHub. Called by: athena, zeus, hermes, aphrodite, demeter. No edits, no commands. |
|
|
14
|
-
| @athena | Strategic planner & architect — research-first, plan-only, never implements. Plans include quality gates (ruff/Biome, dep detection, LTS policy). Calls apollo for discovery. |
|
|
15
|
-
| @demeter | Database specialist — SQLAlchemy 2.0, Alembic, query optimization, N+1 prevention, TDD migrations, modern DB libs. Preserves review gates for schema/data changes. |
|
|
16
|
-
| @gaia | Remote sensing domain specialist — satellite image processing, spectral analysis, SAR, change detection, time series, ML/DL classification. Read-only analysis of geospatial data. |
|
|
17
|
-
| @hephaestus | AI tooling & pipelines specialist — LangChain/LangGraph chains, RAG architecture, vector stores, embedding strategies. Forges AI infrastructure. Calls apollo, sends to themis. |
|
|
18
|
-
| @hermes | Backend specialist — FastAPI, Python, async, TDD (RED→GREEN→REFACTOR), modern Python stdlib, obsolete lib detection. Uses discovery/review proportionally to scope and risk. |
|
|
19
|
-
| @iris | GitHub operations specialist — branches, pull requests, issues, releases, tags. Called by zeus after review. Never pushes or merges without explicit human approval. Integrates with VS Code GitHub Pull Requests extension. |
|
|
20
|
-
| @mnemosyne | Memory bank quality owner — initializes .pantheon/memory-bank/, writes ADRs and task records on explicit request. Called by zeus. Never invoked automatically after phases. |
|
|
21
|
-
| @nyx | Observability & monitoring specialist — OpenTelemetry tracing, token/cost tracking, agent performance analytics, LangSmith integration. Calls apollo for discovery, sends to themis. |
|
|
22
|
-
| @prometheus | Infrastructure + model provider specialist — Docker, CI/CD, multi-model routing, cost optimization, provider abstraction |
|
|
23
|
-
| @talos | Hotfix express lane — direct fixes for small bugs, CSS, typos, minor logic. No TDD ceremony, no orchestration overhead. Standalone, no subagents. Escalates complex issues to zeus. |
|
|
24
|
-
| @themis | Quality & security gate — ruff/Biome linting, dead/legacy code detection, OWASP Top 10, applicable coverage requirements, correctness, deprecation audit. Reviews material/sensitive changes. |
|
|
25
|
-
| @zeus | Central orchestrator — never implements. Delegates to: athena, apollo, hermes, aphrodite, demeter, prometheus, themis, iris, mnemosyne, talos, hephaestus, nyx |
|
|
6
|
+
# Pantheon — Repository Setup
|
|
26
7
|
|
|
27
8
|
## OpenCode Setup
|
|
28
9
|
|
|
29
|
-
|
|
10
|
+
Setup: [INSTALLATION.md](docs/INSTALLATION.md).
|
|
30
11
|
|
|
31
|
-
- Build: `npm test`
|
|
32
|
-
- Test: `npm test`
|
|
12
|
+
- Build/Test: `npm test`
|
|
33
13
|
- Lint: `npm run lint`
|
|
34
14
|
|
|
35
15
|
## Teste de Instalação Global (sandbox)
|
|
36
16
|
|
|
37
|
-
|
|
17
|
+
Valide a instalação global COMO UM USUÁRIO REAL no sandbox `~/pantheon-sandbox/` (fora do repo; HOME, prefix npm e venv próprios); o ambiente de dev NÃO serve para empacotamento.
|
|
38
18
|
|
|
39
|
-
- Rodar: `bash ~/pantheon-sandbox/run-test.sh` (
|
|
40
|
-
- Regra para agentes:
|
|
19
|
+
- Rodar: `bash ~/pantheon-sandbox/run-test.sh` (MCPs, doctor, TUI)
|
|
20
|
+
- Regra para agentes: valide instalação global (npm pack, `init`, MCPs, hooks) no sandbox — NUNCA no ambiente de dev
|
|
41
21
|
- Descarte: `rm -rf ~/pantheon-sandbox`
|
|
42
|
-
- Detalhes:
|
|
22
|
+
- Detalhes: `~/pantheon-sandbox/README.md`
|
|
23
|
+
|
|
24
|
+
## Worktrees
|
|
25
|
+
|
|
26
|
+
- Nunca crie worktrees dentro do projeto principal; use `<project-parent>/.pantheon-worktrees/<basename-do-repo>/<task>`.
|
|
27
|
+
- `.pantheon/workflows/` e `.pantheon/worktrees/` não são o padrão para worktrees.
|
|
43
28
|
|
|
44
29
|
## Conventions
|
|
45
30
|
|
|
46
31
|
- TDD: RED→GREEN→REFACTOR for testable behavior; use focused checks for micro-edits
|
|
47
|
-
-
|
|
32
|
+
- Stronger gates (auth, security, data-integrity, coverage) are canonical in the global `Test Economy` section
|
|
48
33
|
- Async/await on all I/O
|
|
49
34
|
- Type hints on all functions
|
|
50
|
-
- PRs always update the README
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
# Agent Instructions
|
|
55
|
-
|
|
56
|
-
The following sections are consolidated from `src/instructions/*.instructions.md`
|
|
57
|
-
so both OpenCode V1 (auto-loads AGENTS.md) and V2 (loads AGENTS.md, ignores the
|
|
58
|
-
`instructions` config key) receive identical shared rules. Agent-scoped rules
|
|
59
|
-
are rendered into only the matching installed agent prompts.
|
|
60
|
-
|
|
61
|
-
<!-- Source: src/instructions/agent-return-format.instructions.md -->
|
|
62
|
-
## Agent Return Format
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
# Agent Return Format
|
|
66
|
-
|
|
67
|
-
All implementation agents (Hermes, Aphrodite, Demeter, Hephaestus, Prometheus) MUST return results to Zeus in this format:
|
|
68
|
-
|
|
69
|
-
## subtask_summary
|
|
70
|
-
**files_changed:** [list of file paths, one per line]
|
|
71
|
-
**summary:** What was done, in 2-3 sentences
|
|
72
|
-
**tests:** ✅ All passing / ⚠️ X failing / ❌ Not run (reason)
|
|
73
|
-
**coverage:** X% (if applicable)
|
|
74
|
-
**tokens:** ~N input / ~M output (estimated)
|
|
75
|
-
**status:** complete | partial (reason) | escalated (reason)
|
|
76
|
-
**blockers:** [list any blockers or null]
|
|
77
|
-
|
|
78
|
-
For investigation agents (Apollo, Athena), return structured findings with:
|
|
79
|
-
- Key findings as bullet points
|
|
80
|
-
- File paths with line numbers
|
|
81
|
-
- Relevant code snippets (max 3 lines each)
|
|
82
|
-
|
|
83
|
-
## Council Specialist Response Format
|
|
84
|
-
|
|
85
|
-
When responding to a `/pantheon` council synthesis invocation, specialists MUST return this structured format:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
## specialist_response
|
|
89
|
-
**position:** <clear one-sentence position answering the question>
|
|
90
|
-
**reasoning:** <2-4 sentences with logical chain>
|
|
91
|
-
**trade_offs:** <what's gained vs lost, specific>
|
|
92
|
-
**risks:** <what could go wrong, max 3 items>
|
|
93
|
-
**confidence:** High | Medium | Low
|
|
94
|
-
**agreement_signals:** agree:@agent1 on <issue>, agree:@agent2 on <issue> | disagree:@agent3 on <issue>
|
|
95
|
-
**specific_claims:** <count of specific factual claims in response>
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Field Rules
|
|
99
|
-
|
|
100
|
-
| Field | Required | Validation |
|
|
101
|
-
|-------|----------|------------|
|
|
102
|
-
| position | ✅ | Single sentence, must directly answer the question |
|
|
103
|
-
| reasoning | ✅ | 2-4 sentences with logical chain |
|
|
104
|
-
| trade_offs | ✅ | At least one gain and one loss, specific to context |
|
|
105
|
-
| risks | ✅ | Max 3 bullet points |
|
|
106
|
-
| confidence | ✅ | One of: High, Medium, Low |
|
|
107
|
-
| agreement_signals | Optional | Format: `agree:@agent on issue \| disagree:@agent on issue`. Use only when you can reference other specialists expected positions. |
|
|
108
|
-
| specific_claims | ✅ | Integer count of verifiable factual statements in the response |
|
|
109
|
-
|
|
110
|
-
### Confidence Guidelines
|
|
111
|
-
|
|
112
|
-
- **High**: Position backed by 3+ specific claims with evidence or direct experience
|
|
113
|
-
- **Medium**: Position backed by 1-2 specific claims
|
|
114
|
-
- **Low**: Position is opinion-based or speculative
|
|
115
|
-
|
|
116
|
-
### Example
|
|
117
|
-
```
|
|
118
|
-
## specialist_response
|
|
119
|
-
**position:** The BackgroundJobBoard should be used for council crash recovery
|
|
120
|
-
**reasoning:** The board already supports running→completed→reconciled state machine with persistence. Registering council dispatches there adds ~50ms overhead but prevents total session loss on context crash. The WAL pattern ensures no data loss on restart.
|
|
121
|
-
**trade_offs:** Gain: crash recovery for multi-minute council sessions. Lose: ~50ms registration overhead per council.
|
|
122
|
-
**risks:** Board persistence failure could block council start — implement with fire-and-forget error handling
|
|
123
|
-
**confidence:** High
|
|
124
|
-
**agreement_signals:** agree:@themis on persist-before-notify
|
|
125
|
-
**specific_claims:** 3
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Memory Context
|
|
129
|
-
If memory affected the result, state the takeaway briefly; do not repeat the entry or task context.
|
|
130
|
-
|
|
131
|
-
<!-- Source: src/instructions/memory-protocol.instructions.md -->
|
|
132
|
-
## Memory Protocol
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
# 🧠 Memory Protocol — Universal Rules
|
|
136
|
-
|
|
137
|
-
These rules apply to all agents; each agent file may add domain-specific rules.
|
|
138
|
-
|
|
139
|
-
## Universal Rules
|
|
140
|
-
|
|
141
|
-
### Retrieval
|
|
142
|
-
- Search only when prior project history could change the outcome; skip self-contained questions and bounded changes.
|
|
143
|
-
- For delegated work, Zeus searches at most once and passes useful hits to the specialist. Reuse supplied results; search separately only if relevant history is needed but missing.
|
|
144
|
-
- Use a targeted query (`top_k=2`); do not search the whole prompt by default. Missing or irrelevant results never block current work.
|
|
145
|
-
|
|
146
|
-
### Persistence
|
|
147
|
-
- `memory_store()` is manual, not automatic. Store at most one concise, reusable top-level result; never persist routine child summaries, phase updates, test logs, or temporary state.
|
|
148
|
-
- Confirm the store succeeded before claiming persistence. There is no automatic memory WAL or recovery. Add ADRs to the memory bank only when explicitly requested.
|
|
149
|
-
|
|
150
|
-
### Relevance and permanent records
|
|
151
|
-
Ignore weak matches; routine summaries do not belong in durable memory.
|
|
152
|
-
|
|
153
|
-
<!-- Source: src/instructions/yagni.instructions.md -->
|
|
154
|
-
## YAGNI Anti-overengineering
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
## YAGNI Principles
|
|
158
|
-
|
|
159
|
-
1. **Don't add abstractions before the third repetition** — Two similar pieces of code are a coincidence. Three are a pattern.
|
|
160
|
-
2. **Prefer duplication over the wrong abstraction** — A bad abstraction is worse than copy-paste.
|
|
161
|
-
3. **Solve today's problem, not tomorrow's** — You don't know what tomorrow looks like.
|
|
162
|
-
4. **If it's not tested, it doesn't exist** — Code without tests is not "done".
|
|
163
|
-
5. **The simplest working solution is the best** — Fancy patterns add cognitive load.
|
|
164
|
-
6. **Don't optimize prematurely** — Measure first, then optimize.
|
|
165
|
-
7. **Remove unused code immediately** — Dead code is debt.
|
|
166
|
-
8. **Prefer standard library over dependencies** — One less dependency = one less vulnerability.
|
|
167
|
-
9. **Avoid configuration systems until something needs to vary** — Hard-coded values are fine until you have at least 3 different values.
|
|
168
|
-
10. **Don't build for scale you don't have** — YAGNI applies to infrastructure too.
|
|
169
|
-
11. **Delete more than you add** — Every line of code is a liability.
|
|
170
|
-
12. **If you're not sure you need it, you don't need it** — Trust your gut.
|
|
171
|
-
|
|
172
|
-
When reviewing code, always ask: "Is this YAGNI? Could we solve this more simply?"
|
|
173
|
-
|
|
174
|
-
<!-- Source: src/instructions/zeus-communication-rules.instructions.md -->
|
|
175
|
-
## Zeus Communication Rules
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
# 🗣️ COMMUNICATION RULES
|
|
179
|
-
|
|
180
|
-
These rules apply to Zeus and all agents in the system:
|
|
181
|
-
|
|
182
|
-
- **No Flattery**: Never start a response with compliments or affirmations ("Great question!", "Absolutely!", "Sure!"). Begin directly with the answer or action.
|
|
183
|
-
- **Honest Pushback**: If a request is technically unsound or will cause problems, say so clearly and explain why. Offer a better approach. Agreeing to avoid friction is worse than a useful correction.
|
|
184
|
-
- **Concise Execution**: Skip lengthy preambles. State what you're doing in one line, do it, report the outcome. Avoid verbose commentary around trivial steps.
|
|
185
|
-
- **No Padding**: Don't add filler sentences, summaries of what was just said, or redundant confirmations. Every sentence must carry information.
|
|
186
|
-
- **Uncertainty = Ask**: If requirements are ambiguous, ask one targeted question. Don't guess and implement the wrong thing.
|
|
35
|
+
- PRs always update the README: document new features, behaviors, env vars, and commands before opening.
|
|
36
|
+
<!-- pantheon:generated:end — user content outside this region is preserved verbatim -->
|