pantheon-opencode 1.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.
Files changed (128) hide show
  1. package/AGENTS.md +37 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1013 -0
  4. package/bin/pantheon-init.mjs +183 -0
  5. package/commands/pantheon-audit.md +25 -0
  6. package/commands/pantheon-bg.md +10 -0
  7. package/commands/pantheon-consolidate.md +11 -0
  8. package/commands/pantheon-deepwork.md +128 -0
  9. package/commands/pantheon-doc.md +10 -0
  10. package/commands/pantheon-focus.md +9 -0
  11. package/commands/pantheon-forget.md +58 -0
  12. package/commands/pantheon-hash.md +11 -0
  13. package/commands/pantheon-optimize.md +79 -0
  14. package/commands/pantheon-remember.md +44 -0
  15. package/commands/pantheon-search.md +48 -0
  16. package/commands/pantheon-status.md +71 -0
  17. package/commands/pantheon-todo.md +11 -0
  18. package/commands/pantheon.md +49 -0
  19. package/docs/AGENT-MCP.md +194 -0
  20. package/docs/ARCHITECTURE.md +384 -0
  21. package/docs/BRANCH-PROTECTION.md +142 -0
  22. package/docs/INDEX.md +81 -0
  23. package/docs/INSTALLATION.md +217 -0
  24. package/docs/MCP.md +238 -0
  25. package/docs/MEMORY.md +471 -0
  26. package/docs/MIGRATION-MEMORY-BANK.md +139 -0
  27. package/docs/PLATFORMS.md +5 -0
  28. package/docs/QUICKSTART.md +49 -0
  29. package/docs/README.md +18 -0
  30. package/docs/RELEASING.md +256 -0
  31. package/docs/SETUP.md +5 -0
  32. package/docs/UPGRADING.md +41 -0
  33. package/docs/mcp-recommendations.md +439 -0
  34. package/docs/mcp-tools.md +156 -0
  35. package/docs/mcp-user-guide.md +204 -0
  36. package/docs/persistence-mcp.md +111 -0
  37. package/package.json +72 -0
  38. package/pantheon.schema.json +158 -0
  39. package/scripts/__init__.py +0 -0
  40. package/scripts/_pantheon_paths.py +68 -0
  41. package/scripts/check-version-consistency.sh +23 -0
  42. package/scripts/code_mode_server.py +202 -0
  43. package/scripts/doctor.mjs +763 -0
  44. package/scripts/generate-prompts.sh +222 -0
  45. package/scripts/generate-routing-docs.mjs +104 -0
  46. package/scripts/hash_verify.py +192 -0
  47. package/scripts/init-pantheon-mcp.sh +118 -0
  48. package/scripts/install/agents-md.mjs +214 -0
  49. package/scripts/install/health-check.mjs +196 -0
  50. package/scripts/install/migrate.mjs +209 -0
  51. package/scripts/install/opencode.mjs +645 -0
  52. package/scripts/install/shared.mjs +655 -0
  53. package/scripts/install/venv.mjs +116 -0
  54. package/scripts/install-mcp.mjs +885 -0
  55. package/scripts/install.mjs +26 -0
  56. package/scripts/manifest.mjs +622 -0
  57. package/scripts/mcp_persistence_server.py +459 -0
  58. package/scripts/mcp_resources_server.py +206 -0
  59. package/scripts/memory_cache.py +78 -0
  60. package/scripts/memory_mcp_server.py +605 -0
  61. package/scripts/paths.py +64 -0
  62. package/scripts/prune_context.py +72 -0
  63. package/scripts/release-bundle.mjs +109 -0
  64. package/scripts/scrub-secrets.py +282 -0
  65. package/scripts/scrub_secrets.py +281 -0
  66. package/scripts/test-context-compression.sh +166 -0
  67. package/scripts/themis_heuristic_scan.py +287 -0
  68. package/scripts/todo_enforcer.py +242 -0
  69. package/scripts/uninstall.mjs +1057 -0
  70. package/scripts/validate-routing.mjs +160 -0
  71. package/scripts/validate_agent_frontmatter.py +226 -0
  72. package/scripts/versioning.mjs +254 -0
  73. package/skills-lock.json +16 -0
  74. package/src/agents/aphrodite.md +162 -0
  75. package/src/agents/apollo.md +109 -0
  76. package/src/agents/athena.md +226 -0
  77. package/src/agents/demeter.md +146 -0
  78. package/src/agents/gaia.md +82 -0
  79. package/src/agents/hephaestus.md +105 -0
  80. package/src/agents/hermes.md +302 -0
  81. package/src/agents/iris.md +99 -0
  82. package/src/agents/mnemosyne.md +226 -0
  83. package/src/agents/nyx.md +87 -0
  84. package/src/agents/prometheus.md +199 -0
  85. package/src/agents/talos.md +93 -0
  86. package/src/agents/themis.md +187 -0
  87. package/src/agents/zeus.md +209 -0
  88. package/src/instructions/agent-return-format.instructions.md +26 -0
  89. package/src/instructions/backend-standards.instructions.md +45 -0
  90. package/src/instructions/documentation-standards.instructions.md +53 -0
  91. package/src/instructions/frontend-standards.instructions.md +46 -0
  92. package/src/instructions/memory-protocol.instructions.md +67 -0
  93. package/src/instructions/yagni.instructions.md +21 -0
  94. package/src/instructions/zeus-anti-stall.instructions.md +72 -0
  95. package/src/instructions/zeus-communication-rules.instructions.md +15 -0
  96. package/src/instructions/zeus-council-synthesis.instructions.md +105 -0
  97. package/src/instructions/zeus-timeout-retry.instructions.md +127 -0
  98. package/src/mcp/_pantheon_paths.py +67 -0
  99. package/src/mcp/code_mode_server.py +202 -0
  100. package/src/mcp/init-pantheon-mcp.sh +118 -0
  101. package/src/mcp/install-mcp.mjs +885 -0
  102. package/src/mcp/mcp_persistence_server.py +458 -0
  103. package/src/mcp/mcp_resources_server.py +205 -0
  104. package/src/mcp/memory_mcp_server.py +604 -0
  105. package/src/mcp/requirements-mcp-core.txt +5 -0
  106. package/src/mcp/requirements-mcp.txt +5 -0
  107. package/src/plugin.ts +19 -0
  108. package/src/plugins/tui/dist/tui.js +143 -0
  109. package/src/plugins/tui/dist/tui.tsx +144 -0
  110. package/src/plugins/tui/package.json +32 -0
  111. package/src/plugins/tui/src/index.tsx +144 -0
  112. package/src/plugins/tui/tsdown.config.ts +22 -0
  113. package/src/routing.yml +499 -0
  114. package/src/skills/README.md +230 -0
  115. package/src/skills/agent-coordination/SKILL.md +95 -0
  116. package/src/skills/artifact-management/SKILL.md +118 -0
  117. package/src/skills/auto-continue/SKILL.md +280 -0
  118. package/src/skills/code-review-checklist/SKILL.md +139 -0
  119. package/src/skills/context-compression/SKILL.md +861 -0
  120. package/src/skills/git-workflow-and-versioning/SKILL.md +32 -0
  121. package/src/skills/incremental-implementation/SKILL.md +27 -0
  122. package/src/skills/memory-bank/SKILL.md +165 -0
  123. package/src/skills/orchestration-workflow/SKILL.md +311 -0
  124. package/src/skills/security-hardening/SKILL.md +36 -0
  125. package/src/skills/session-goal/SKILL.md +138 -0
  126. package/src/skills/spec-driven-development/SKILL.md +23 -0
  127. package/src/skills/tdd-with-agents/SKILL.md +170 -0
  128. package/src/skills/visual-review-pipeline/SKILL.md +200 -0
@@ -0,0 +1,71 @@
1
+ ---
2
+ description: "Show Pantheon version, model tier, and all available agents with status"
3
+ agent: "zeus"
4
+ ---
5
+ # /pantheon-status — System Status & Agent Registry
6
+
7
+ **What:** Displays the current Pantheon version, model tier (Pro/Free), and a full status table of all agents.
8
+ **Usage:** `/pantheon-status`
9
+ **Returns:** Version badge · model tier · agent table with availability
10
+ **Use when:** You want to see what version of Pantheon is running and which agents are loaded
11
+
12
+ ## Output Format
13
+
14
+ Produce EXACTLY this structure:
15
+
16
+ ```
17
+ ## 🏛️ Pantheon System Status
18
+
19
+ **Version:** vX.Y.Z
20
+ **Model Tier:** Pro (premium models) | Free (default models)
21
+ **Platform:** <detect: opencode | claude | cursor | windsurf | vscode>
22
+ **Agents loaded:** N of 14
23
+
24
+ ### Agent Registry
25
+
26
+ | Agent | Role | Tier | Status |
27
+ |-------|------|------|--------|
28
+ | @zeus | Central orchestrator | default | ✅ |
29
+ | @athena | Strategic planner | premium | ✅ |
30
+ | @hermes | Backend (FastAPI) | default | ✅ |
31
+ | @aphrodite | Frontend (React) | default | ✅ |
32
+ | @demeter | Database | default | ✅ |
33
+ | @themis | Quality & security | premium | ✅ |
34
+ | @prometheus | Infrastructure | default | ✅ |
35
+ | @apollo | Codebase discovery | fast | ✅ |
36
+ | @iris | GitHub operations | fast | ✅ |
37
+ | @mnemosyne | Memory bank | fast | ✅ |
38
+ | @talos | Hotfixes | fast | ✅ |
39
+ | @hephaestus | AI pipelines | default | ✅ |
40
+ | @nyx | Observability | fast | ✅ |
41
+ | @gaia | Remote sensing | fast | ✅ |
42
+
43
+ ### Commands Available
44
+
45
+ `/pantheon` `/pantheon-status` `/audit` `/focus` `/deepwork` `/optimize` `/sketch` `/pantheon-cancel` `/pantheon-install` `/pantheon-update` `/pantheon-remember` `/pantheon-search` `/pantheon-consolidate` `/pantheon-forget`
46
+
47
+ ### Health
48
+
49
+ - ✅ All agents responding
50
+ - ⚠️ N agents degraded (if any)
51
+ - ❌ N agents unavailable (if any)
52
+ ```
53
+
54
+ ## How to Detect Version
55
+
56
+ Read `package.json` → `"version"` field. If unavailable, read `plugin.json` → `"version"`.
57
+
58
+ ## How to Detect Model Tier
59
+
60
+ - **Pro:** Any agent with `model_tier: premium` in `routing.yml` is using a premium model (athena, themis)
61
+ - **Free:** All agents using `default` or `fast` tier models
62
+ - Report based on what `routing.yml` declares for the active platform
63
+
64
+ ## How to Detect Platform
65
+
66
+ Check for platform-specific markers:
67
+ - `opencode.json` present → **OpenCode**
68
+ - `.claude/` directory → **Claude Code**
69
+ - `.cursor/` directory → **Cursor**
70
+ - `.windsurf/` directory → **Windsurf**
71
+ - `.vscode/` directory → **VS Code Copilot**
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Enforce TODO tracking across agents and sessions"
3
+ agent: zeus
4
+ ---
5
+
6
+ Track and enforce TODO items:
7
+
8
+ 1. Read current todos via session.todo()
9
+ 2. Cross-reference with kv_store("todo:..." entries
10
+ 3. Flag stale or overdue items
11
+ 4. Suggest next actions for each TODO
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: "Dispatch a question to 2-4 specialist agents via inline Zeus council"
3
+ agent: zeus
4
+ ---
5
+ # /pantheon — Council Synthesis
6
+
7
+ **What:** Dispatches the question to 2-3 specialist agents **in parallel** via `task()`, then synthesizes their responses into a single recommendation with resolved divergences.
8
+ **Usage:** `/pantheon <question>`
9
+ **When:** Architecture trade-offs, technology selection, security assessments, multi-stakeholder concerns
10
+ **Returns:** Structured synthesis with recommendation, confidence level, resolved divergences
11
+
12
+ ## Dispatch Selection
13
+
14
+ Choose 2-3 agents based on domain:
15
+
16
+ | Domain | Specialists |
17
+ |--------|-------------|
18
+ | Architecture | hermes, demeter, themis, athena |
19
+ | Security | themis, hermes, prometheus, nyx |
20
+ | Database | demeter, hermes, prometheus |
21
+ | AI/RAG | hephaestus, nyx |
22
+ | Infrastructure | prometheus, hermes, themis |
23
+ | Frontend/UX | aphrodite, themis, hermes |
24
+ | Observability | nyx, hermes |
25
+ | General | athena, themis, hermes |
26
+
27
+ Send ALL `task()` calls in a single message. Each must return: Recommendation · Reasoning · Trade-offs · Risks · Confidence.
28
+
29
+ ## Synthesis Structure
30
+
31
+ After ALL responses arrive, produce EXACTLY this structure:
32
+
33
+ ### 📋 Individual Assessments
34
+ For each specialist: Recommendation, Reasoning, Trade-offs, Risks, Confidence
35
+
36
+ ### ✅ Agreements
37
+ Where 2+ specialists converge
38
+
39
+ ### ⚡ Divergences
40
+ Where they disagree — resolve each one with reasoning
41
+
42
+ ### 🔥 Total Divergence
43
+ If ALL specialists disagree on a point, call this out explicitly
44
+
45
+ ### 🏆 Recommendation
46
+ Decisive conclusion with confidence level
47
+
48
+ ## Question:
49
+ $ARGUMENTS
@@ -0,0 +1,194 @@
1
+ # Per-Agent MCP Reference
2
+
3
+ How each Pantheon agent uses the 3 built-in MCP servers (pantheon-resources,
4
+ pantheon-code-mode, pantheon-memory) plus the optional third-party servers.
5
+
6
+ ---
7
+
8
+ ## Overview Matrix
9
+
10
+ | Agent | Resources | Code-Mode | Memory | context7 | playwright |
11
+ |-------|-----------|-----------|--------|----------|------------|
12
+ | **zeus** | ✅ routing, deepwork | ✅ orchestration | ✅ recall | — | — |
13
+ | **athena** | ✅ agents, routing | ✅ research | ✅ recall | ✅ | — |
14
+ | **apollo** | ✅ agents, skills | ✅ — | ✅ search | ✅ | — |
15
+ | **hermes** | ✅ agents, skills | ✅ build/test | ✅ store, recall | ✅ | ✅ |
16
+ | **aphrodite** | ✅ memory-bank | ✅ build | ✅ store, recall | ✅ | ✅ |
17
+ | **demeter** | ✅ agents, routing | ✅ — | ✅ store, recall | ✅ | — |
18
+ | **themis** | ✅ agents | ✅ lint checks | ✅ search | ✅ | ✅ |
19
+ | **prometheus** | ✅ agents, routing | ✅ deploy scripts | ✅ store, recall | ✅ | — |
20
+ | **hephaestus** | ✅ agents, skills | ✅ — | ✅ search, link | ✅ | — |
21
+ | **nyx** | ✅ routing | ✅ — | ✅ sessions | ✅ | — |
22
+ | **gaia** | ✅ agents | — | minimal | ✅ | — |
23
+ | **iris** | ✅ agents | — | minimal | — | — |
24
+ | **mnemosyne** | ✅ memory-bank | ✅ — | ✅ full (store, recall, export) | — | — |
25
+ | **talos** | ✅ agents, skills | ✅ hotfix scripts | ✅ recall | ✅ | — |
26
+
27
+ ---
28
+
29
+ ## pantheon-resources Usage by Agent
30
+
31
+ | Agent | Resources Used | When | Purpose |
32
+ |-------|---------------|------|---------|
33
+ | **zeus** | `pantheon://routing`, `pantheon://deepwork/{slug}`, `pantheon://agents` | Orchestration | Read routing rules, check deepwork plan/status |
34
+ | **athena** | `pantheon://routing`, `pantheon://agents`, `pantheon://skills/{name}` | Planning | Understand delegation rules, load agent roles |
35
+ | **apollo** | `pantheon://agents`, `pantheon://skills` | Discovery | Identify agents to search for, load domain skills |
36
+ | **hermes** | `pantheon://agents`, `pantheon://skills` | Implementation | Read backend skill instructions |
37
+ | **aphrodite** | `pantheon://memory-bank/{path}` | Frontend work | Read memory bank for architecture context |
38
+ | **demeter** | `pantheon://agents`, `pantheon://routing` | Database work | Understand delegation flow for handoffs |
39
+ | **themis** | `pantheon://agents` | Review | Verify agent capabilities match reviewed code |
40
+ | **prometheus** | `pantheon://agents`, `pantheon://routing` | Infrastructure | Check deployment routing constraints |
41
+ | **hephaestus** | `pantheon://agents`, `pantheon://skills` | AI pipelines | Load RAG pipeline skill instructions |
42
+ | **nyx** | `pantheon://routing` | Monitoring | Read routing rules for anomaly detection |
43
+ | **gaia** | `pantheon://agents` | Remote sensing | Verify agent capabilities |
44
+ | **iris** | `pantheon://agents` | GitHub ops | Reference agent names for PR/issue |
45
+ | **mnemosyne** | `pantheon://memory-bank/{path}` | Documentation | Read and write memory bank files |
46
+ | **talos** | `pantheon://agents`, `pantheon://skills` | Hotfixes | Quick reference to agent files |
47
+
48
+ ---
49
+
50
+ ## pantheon-code-mode Usage by Agent
51
+
52
+ | Agent | Use Case | When |
53
+ |-------|----------|------|
54
+ | **zeus** | Run orchestration sequences — build, test, deploy automation | Multi-phase orchestration |
55
+ | **athena** | Run research automation scripts | During planning phase |
56
+ | **apollo** | Execute automated codebase scanners | Discovery phase |
57
+ | **hermes** | Run `pytest`, `ruff check`, `ruff format` | After implementation, before handoff to Themis |
58
+ | **aphrodite** | Run `npm test`, `biome check` | After implementation, before handoff |
59
+ | **demeter** | Run `pytest` on migration tests | After migration implementation |
60
+ | **themis** | Run lint/quality check scripts during review | Code review phase |
61
+ | **prometheus** | Deploy scripts, Docker builds, CI triggers | Infrastructure phase |
62
+ | **hephaestus** | Run evaluation scripts for AI pipelines | Post-implementation |
63
+ | **talos** | Automated hotfix sequences, batch fixes | Rapid repair |
64
+
65
+ Agents not listed (**gaia**, **iris**, **nyx**, **mnemosyne**) typically do not
66
+ need script execution for their core workflows.
67
+
68
+ ---
69
+
70
+ ## pantheon-memory Usage by Agent
71
+
72
+ | Agent | Key Tools | When | Why |
73
+ |-------|-----------|------|-----|
74
+ | **zeus** | `memory_recall` | Session start | Recall context about active sprint and decisions |
75
+ | **athena** | `memory_recall` | Planning | Recall past architecture decisions and plans |
76
+ | **apollo** | `memory_search` | Discovery | Search for existing patterns and related files |
77
+ | **hermes** | `memory_store`, `memory_recall`, `memory_search` | Throughout | Store implementation decisions, recall backend patterns |
78
+ | **aphrodite** | `memory_store`, `memory_recall`, `memory_search` | Throughout | Store UI decisions, recall component patterns |
79
+ | **demeter** | `memory_store`, `memory_recall` | Throughout | Store schema decisions, recall migration patterns |
80
+ | **themis** | `memory_search` | Review | Search for past review findings |
81
+ | **prometheus** | `memory_store`, `memory_recall` | Throughout | Store infra decisions, recall deployment patterns |
82
+ | **hephaestus** | `memory_search`, `memory_link` | Throughout | Search for relevant RAG patterns, link AI pipeline decisions |
83
+ | **nyx** | `memory_sessions` | Monitoring | List sessions for observability analysis |
84
+ | **gaia** | `memory_recall` | Session start | Recall analysis context from previous sessions |
85
+ | **iris** | `memory_recall` | Session start | Recall PR/release context |
86
+ | **mnemosyne** | All 14 tools | Documentation | Full memory management — store, recall, export, consolidate |
87
+ | **talos** | `memory_recall` | Session start | Recall hotfix context for rapid fixes |
88
+
89
+ ### Recommended Tool Sequences by Agent
90
+
91
+ **Zeus** (orchestration):
92
+ ```
93
+ memory_recall(context="current sprint context") → start orchestration
94
+ memory_recall(context="planning user auth feature") → delegate to Athena
95
+ ```
96
+
97
+ **Hermes** (backend implementation):
98
+ ```
99
+ memory_recall(context="implementing JWT authentication") → recall prior decisions
100
+ ...implement...
101
+ memory_store(content="JWT uses refresh token rotation", category="decision", importance=0.9)
102
+ ```
103
+
104
+ **Mnemosyne** (memory steward — deepest integration):
105
+ ```
106
+ memory_recall(context="documenting sprint close") → check active context
107
+ memory_export(session_id="sprint-17") → export for archival
108
+ memory_consolidate() → deduplicate before close
109
+ memory_compress(session_id="sprint-17") → compress old entries
110
+ ```
111
+
112
+ ---
113
+
114
+ ## Third-Party MCP Usage
115
+
116
+ ### context7 (Library Documentation)
117
+
118
+ Used by **11 agents** for up-to-date library docs:
119
+
120
+ | Agent | Libraries |
121
+ |-------|-----------|
122
+ | **hermes** | FastAPI, Pydantic, SQLAlchemy |
123
+ | **aphrodite** | React, Next.js, Tailwind |
124
+ | **demeter** | SQLAlchemy, Alembic |
125
+ | **hephaestus** | LangChain, LangGraph |
126
+ | **themis** | Pydantic, FastAPI (security review context) |
127
+ | **athena** | General (any framework during planning) |
128
+ | **prometheus** | Docker, Docker Compose |
129
+ | **gaia** | Scientific Python (rasterio, xarray, numpy) |
130
+ | **nyx** | OpenTelemetry |
131
+ | **apollo** | General (any library during discovery) |
132
+ | **zeus** | General (any library during orchestration) |
133
+
134
+ > **Note:** Exa MCP was removed in v3.15.0. Use the built-in `websearch` tool instead.
135
+
136
+ ### playwright (Browser Automation)
137
+
138
+ Used by **3 agents**:
139
+
140
+ | Agent | Use Case |
141
+ |-------|----------|
142
+ | **aphrodite** | Visual review pipeline — screenshots, accessibility snapshots |
143
+ | **themis** | Visual regression checking during review |
144
+ | **hermes** | API response verification via browser (edge cases) |
145
+
146
+ ---
147
+
148
+ ## MCP Config in Agent Frontmatter
149
+
150
+ Each agent template (`agents/*.agent.md`) declares its MCP bindings in YAML
151
+ frontmatter:
152
+
153
+ ```yaml
154
+ ---
155
+ mcpServers:
156
+ - name: pantheon-resources
157
+ tools:
158
+ - read_mcp_resource
159
+ when: "reading agent/skills/routing info"
160
+ - name: pantheon-memory
161
+ tools:
162
+ - memory_recall
163
+ - memory_store
164
+ - memory_search
165
+ when: "persistent memory access"
166
+ - name: context7
167
+ tools:
168
+ - context7_resolve-library-id
169
+ - context7_query-docs
170
+ when: "resolving library documentation"
171
+ ---
172
+ ```
173
+
174
+ ### Rules
175
+
176
+ - Maximum 5 MCPs per agent
177
+ - `tools` lists the specific MCP tools the agent can access
178
+ - `when` describes the activation condition
179
+ - Third-party MCPs require explicit `env` config with `${VAR}` interpolation
180
+
181
+ ---
182
+
183
+ ## Security Notes
184
+
185
+ | Server | Risk Level | Notes |
186
+ |--------|-----------|-------|
187
+ | **pantheon-resources** | Low | Read-only. Same trust boundary as repository |
188
+ | **pantheon-code-mode** | Medium | Executes scripts. Permission: `ask` (user confirms each execution) |
189
+ | **pantheon-memory** | Low | Read/write within agent sandbox. No system access |
190
+ | **context7** | Low | Read-only library documentation. No auth needed |
191
+ | ~~exa~~ | *Removed in v3.15.0* | Use `websearch` tool instead |
192
+ | **playwright** | Medium | Runs headless Chromium. Permission: `ask` recommended |
193
+
194
+ See `skill: mcp-security` for complete MCP security rules.