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.
- package/AGENTS.md +37 -0
- package/LICENSE +21 -0
- package/README.md +1013 -0
- package/bin/pantheon-init.mjs +183 -0
- package/commands/pantheon-audit.md +25 -0
- package/commands/pantheon-bg.md +10 -0
- package/commands/pantheon-consolidate.md +11 -0
- package/commands/pantheon-deepwork.md +128 -0
- package/commands/pantheon-doc.md +10 -0
- package/commands/pantheon-focus.md +9 -0
- package/commands/pantheon-forget.md +58 -0
- package/commands/pantheon-hash.md +11 -0
- package/commands/pantheon-optimize.md +79 -0
- package/commands/pantheon-remember.md +44 -0
- package/commands/pantheon-search.md +48 -0
- package/commands/pantheon-status.md +71 -0
- package/commands/pantheon-todo.md +11 -0
- package/commands/pantheon.md +49 -0
- package/docs/AGENT-MCP.md +194 -0
- package/docs/ARCHITECTURE.md +384 -0
- package/docs/BRANCH-PROTECTION.md +142 -0
- package/docs/INDEX.md +81 -0
- package/docs/INSTALLATION.md +217 -0
- package/docs/MCP.md +238 -0
- package/docs/MEMORY.md +471 -0
- package/docs/MIGRATION-MEMORY-BANK.md +139 -0
- package/docs/PLATFORMS.md +5 -0
- package/docs/QUICKSTART.md +49 -0
- package/docs/README.md +18 -0
- package/docs/RELEASING.md +256 -0
- package/docs/SETUP.md +5 -0
- package/docs/UPGRADING.md +41 -0
- package/docs/mcp-recommendations.md +439 -0
- package/docs/mcp-tools.md +156 -0
- package/docs/mcp-user-guide.md +204 -0
- package/docs/persistence-mcp.md +111 -0
- package/package.json +72 -0
- package/pantheon.schema.json +158 -0
- package/scripts/__init__.py +0 -0
- package/scripts/_pantheon_paths.py +68 -0
- package/scripts/check-version-consistency.sh +23 -0
- package/scripts/code_mode_server.py +202 -0
- package/scripts/doctor.mjs +763 -0
- package/scripts/generate-prompts.sh +222 -0
- package/scripts/generate-routing-docs.mjs +104 -0
- package/scripts/hash_verify.py +192 -0
- package/scripts/init-pantheon-mcp.sh +118 -0
- package/scripts/install/agents-md.mjs +214 -0
- package/scripts/install/health-check.mjs +196 -0
- package/scripts/install/migrate.mjs +209 -0
- package/scripts/install/opencode.mjs +645 -0
- package/scripts/install/shared.mjs +655 -0
- package/scripts/install/venv.mjs +116 -0
- package/scripts/install-mcp.mjs +885 -0
- package/scripts/install.mjs +26 -0
- package/scripts/manifest.mjs +622 -0
- package/scripts/mcp_persistence_server.py +459 -0
- package/scripts/mcp_resources_server.py +206 -0
- package/scripts/memory_cache.py +78 -0
- package/scripts/memory_mcp_server.py +605 -0
- package/scripts/paths.py +64 -0
- package/scripts/prune_context.py +72 -0
- package/scripts/release-bundle.mjs +109 -0
- package/scripts/scrub-secrets.py +282 -0
- package/scripts/scrub_secrets.py +281 -0
- package/scripts/test-context-compression.sh +166 -0
- package/scripts/themis_heuristic_scan.py +287 -0
- package/scripts/todo_enforcer.py +242 -0
- package/scripts/uninstall.mjs +1057 -0
- package/scripts/validate-routing.mjs +160 -0
- package/scripts/validate_agent_frontmatter.py +226 -0
- package/scripts/versioning.mjs +254 -0
- package/skills-lock.json +16 -0
- package/src/agents/aphrodite.md +162 -0
- package/src/agents/apollo.md +109 -0
- package/src/agents/athena.md +226 -0
- package/src/agents/demeter.md +146 -0
- package/src/agents/gaia.md +82 -0
- package/src/agents/hephaestus.md +105 -0
- package/src/agents/hermes.md +302 -0
- package/src/agents/iris.md +99 -0
- package/src/agents/mnemosyne.md +226 -0
- package/src/agents/nyx.md +87 -0
- package/src/agents/prometheus.md +199 -0
- package/src/agents/talos.md +93 -0
- package/src/agents/themis.md +187 -0
- package/src/agents/zeus.md +209 -0
- package/src/instructions/agent-return-format.instructions.md +26 -0
- package/src/instructions/backend-standards.instructions.md +45 -0
- package/src/instructions/documentation-standards.instructions.md +53 -0
- package/src/instructions/frontend-standards.instructions.md +46 -0
- package/src/instructions/memory-protocol.instructions.md +67 -0
- package/src/instructions/yagni.instructions.md +21 -0
- package/src/instructions/zeus-anti-stall.instructions.md +72 -0
- package/src/instructions/zeus-communication-rules.instructions.md +15 -0
- package/src/instructions/zeus-council-synthesis.instructions.md +105 -0
- package/src/instructions/zeus-timeout-retry.instructions.md +127 -0
- package/src/mcp/_pantheon_paths.py +67 -0
- package/src/mcp/code_mode_server.py +202 -0
- package/src/mcp/init-pantheon-mcp.sh +118 -0
- package/src/mcp/install-mcp.mjs +885 -0
- package/src/mcp/mcp_persistence_server.py +458 -0
- package/src/mcp/mcp_resources_server.py +205 -0
- package/src/mcp/memory_mcp_server.py +604 -0
- package/src/mcp/requirements-mcp-core.txt +5 -0
- package/src/mcp/requirements-mcp.txt +5 -0
- package/src/plugin.ts +19 -0
- package/src/plugins/tui/dist/tui.js +143 -0
- package/src/plugins/tui/dist/tui.tsx +144 -0
- package/src/plugins/tui/package.json +32 -0
- package/src/plugins/tui/src/index.tsx +144 -0
- package/src/plugins/tui/tsdown.config.ts +22 -0
- package/src/routing.yml +499 -0
- package/src/skills/README.md +230 -0
- package/src/skills/agent-coordination/SKILL.md +95 -0
- package/src/skills/artifact-management/SKILL.md +118 -0
- package/src/skills/auto-continue/SKILL.md +280 -0
- package/src/skills/code-review-checklist/SKILL.md +139 -0
- package/src/skills/context-compression/SKILL.md +861 -0
- package/src/skills/git-workflow-and-versioning/SKILL.md +32 -0
- package/src/skills/incremental-implementation/SKILL.md +27 -0
- package/src/skills/memory-bank/SKILL.md +165 -0
- package/src/skills/orchestration-workflow/SKILL.md +311 -0
- package/src/skills/security-hardening/SKILL.md +36 -0
- package/src/skills/session-goal/SKILL.md +138 -0
- package/src/skills/spec-driven-development/SKILL.md +23 -0
- package/src/skills/tdd-with-agents/SKILL.md +170 -0
- package/src/skills/visual-review-pipeline/SKILL.md +200 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { homedir, platform } from 'os';
|
|
6
|
+
import { execSync } from 'child_process';
|
|
7
|
+
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
10
|
+
const CFG = path.join(homedir(), '.config', 'opencode');
|
|
11
|
+
|
|
12
|
+
function printUsage() {
|
|
13
|
+
console.log('Pantheon Orchestrator — Multi-agent orchestration platform');
|
|
14
|
+
console.log('');
|
|
15
|
+
console.log('Usage:');
|
|
16
|
+
console.log(' npx pantheon-orchestrator init # Install globally');
|
|
17
|
+
console.log(' npx pantheon-orchestrator init --project # Install in project');
|
|
18
|
+
console.log(' npx pantheon-orchestrator init --dry-run # Preview only');
|
|
19
|
+
console.log(' npx pantheon-orchestrator init --no-mcp # Skip MCP + venv');
|
|
20
|
+
console.log(' npx pantheon-orchestrator init --force # Overwrite + recreate venv');
|
|
21
|
+
console.log(' npx pantheon-orchestrator --help # Show this help');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function getPkgVersion() {
|
|
25
|
+
try {
|
|
26
|
+
const p = path.join(ROOT, 'package.json');
|
|
27
|
+
return JSON.parse(fs.readFileSync(p, 'utf8')).version || '?';
|
|
28
|
+
} catch { return '?'; }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function getAgentList() {
|
|
32
|
+
const agentsDir = path.resolve(ROOT, 'src', 'agents');
|
|
33
|
+
if (!fs.existsSync(agentsDir)) return [];
|
|
34
|
+
return fs.readdirSync(agentsDir)
|
|
35
|
+
.filter(f => f.endsWith('.md') && f !== 'README.md')
|
|
36
|
+
.map(f => f.replace('.md', ''));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async function main() {
|
|
40
|
+
const args = process.argv.slice(2);
|
|
41
|
+
const command = args[0];
|
|
42
|
+
|
|
43
|
+
if (args.includes('--help')) { printUsage(); process.exit(0); }
|
|
44
|
+
|
|
45
|
+
if (command === 'init' || !command) {
|
|
46
|
+
const isProject = args.includes('--project');
|
|
47
|
+
const isDryRun = args.includes('--dry-run');
|
|
48
|
+
const skipMCP = args.includes('--no-mcp');
|
|
49
|
+
const forceReinstall = args.includes('--force');
|
|
50
|
+
const base = isProject
|
|
51
|
+
? path.join(process.cwd(), '.opencode')
|
|
52
|
+
: CFG;
|
|
53
|
+
|
|
54
|
+
const version = getPkgVersion();
|
|
55
|
+
console.log(`Pantheon Orchestrator v${version} — ${isDryRun ? 'DRY RUN' : 'Installing...'}`);
|
|
56
|
+
if (forceReinstall && !isDryRun) console.log(' 🔄 Force mode — overwriting existing files + recreating venv');
|
|
57
|
+
console.log(`Target: ${base}${isProject ? ' (project-local)' : ' (global)'}`);
|
|
58
|
+
console.log('');
|
|
59
|
+
|
|
60
|
+
// Force: delete old venv to force clean install
|
|
61
|
+
if (forceReinstall && !isDryRun) {
|
|
62
|
+
const venvPath = path.join(base, '.venv');
|
|
63
|
+
if (fs.existsSync(venvPath)) {
|
|
64
|
+
fs.rmSync(venvPath, { recursive: true, force: true });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 1. Agents
|
|
69
|
+
console.log(' Agents:');
|
|
70
|
+
const agentList = getAgentList();
|
|
71
|
+
let count = 0;
|
|
72
|
+
for (const agent of agentList) {
|
|
73
|
+
const s = path.join(ROOT, 'src', 'agents', `${agent}.md`);
|
|
74
|
+
const d = path.join(base, 'agents', `${agent}.md`);
|
|
75
|
+
if (fs.existsSync(s)) {
|
|
76
|
+
if (!isDryRun) {
|
|
77
|
+
fs.mkdirSync(path.join(base, 'agents'), { recursive: true });
|
|
78
|
+
fs.copyFileSync(s, d);
|
|
79
|
+
}
|
|
80
|
+
count++;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
console.log(` ${count} agent files → ${isDryRun ? '(preview)' : `${base}/agents/`}`);
|
|
84
|
+
|
|
85
|
+
// 2. Skills
|
|
86
|
+
console.log(' Skills:');
|
|
87
|
+
const skillsSrc = path.resolve(ROOT, 'src', 'skills');
|
|
88
|
+
if (fs.existsSync(skillsSrc)) {
|
|
89
|
+
const skills = fs.readdirSync(skillsSrc).filter(f => fs.statSync(path.join(skillsSrc, f)).isDirectory());
|
|
90
|
+
if (!isDryRun) {
|
|
91
|
+
for (const skill of skills) {
|
|
92
|
+
const s = path.join(skillsSrc, skill);
|
|
93
|
+
const d = path.join(base, 'skills', skill);
|
|
94
|
+
fs.cpSync(s, d, { recursive: true, force: true });
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
console.log(` ${skills.length} skills → ${isDryRun ? '(preview)' : `${base}/skills/`}`);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// 3. Instructions
|
|
101
|
+
console.log(' Instructions:');
|
|
102
|
+
const instrSrc = path.resolve(ROOT, 'src', 'instructions');
|
|
103
|
+
if (fs.existsSync(instrSrc)) {
|
|
104
|
+
const instrs = fs.readdirSync(instrSrc).filter(f => f.endsWith('.instructions.md'));
|
|
105
|
+
if (!isDryRun) {
|
|
106
|
+
fs.mkdirSync(path.join(base, 'instructions'), { recursive: true });
|
|
107
|
+
for (const f of instrs) {
|
|
108
|
+
fs.copyFileSync(path.join(instrSrc, f), path.join(base, 'instructions', f));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
console.log(` ${instrs.length} files → ${isDryRun ? '(preview)' : `${base}/instructions/`}`);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// 4. Commands
|
|
115
|
+
console.log(' Commands:');
|
|
116
|
+
const cmdSrc = path.resolve(ROOT, 'commands');
|
|
117
|
+
if (fs.existsSync(cmdSrc)) {
|
|
118
|
+
const cmds = fs.readdirSync(cmdSrc).filter(f => f.endsWith('.md'));
|
|
119
|
+
if (!isDryRun) {
|
|
120
|
+
fs.mkdirSync(path.join(base, 'commands'), { recursive: true });
|
|
121
|
+
for (const f of cmds) {
|
|
122
|
+
fs.copyFileSync(path.join(cmdSrc, f), path.join(base, 'commands', f));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
console.log(` ${cmds.length} commands → ${isDryRun ? '(preview)' : `${base}/commands/`}`);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// 5. TUI plugin
|
|
129
|
+
console.log(' TUI Plugin:');
|
|
130
|
+
const tuiSrc = path.resolve(ROOT, 'src', 'plugins', 'tui');
|
|
131
|
+
if (fs.existsSync(tuiSrc)) {
|
|
132
|
+
if (!isDryRun) {
|
|
133
|
+
fs.cpSync(tuiSrc, path.join(base, 'plugins', 'pantheon-tui'), { recursive: true, force: true });
|
|
134
|
+
const tuiJson = path.join(base, 'tui.json');
|
|
135
|
+
const tuiConfig = { $schema: 'https://opencode.ai/tui.json', plugin: ['plugins/pantheon-tui'] };
|
|
136
|
+
fs.writeFileSync(tuiJson, JSON.stringify(tuiConfig, null, 2));
|
|
137
|
+
}
|
|
138
|
+
console.log(` Plugin → ${isDryRun ? '(preview)' : `${base}/plugins/pantheon-tui/`}`);
|
|
139
|
+
console.log(` tui.json → ${isDryRun ? '(preview)' : `${base}/tui.json`}`);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// 6. AGENTS.md
|
|
143
|
+
const agentsMd = path.resolve(ROOT, 'AGENTS.md');
|
|
144
|
+
if (fs.existsSync(agentsMd) && !isDryRun) {
|
|
145
|
+
fs.copyFileSync(agentsMd, path.join(base, 'AGENTS.md'));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// 7. .venv + MCP servers (skip if --no-mcp)
|
|
149
|
+
if (!skipMCP && !isDryRun) {
|
|
150
|
+
console.log('');
|
|
151
|
+
console.log(' MCP Servers + .venv...');
|
|
152
|
+
const installScript = path.resolve(ROOT, 'scripts', 'install.mjs');
|
|
153
|
+
if (fs.existsSync(installScript)) {
|
|
154
|
+
try {
|
|
155
|
+
execSync(`node "${installScript}" "${base}"`, { stdio: 'inherit', cwd: ROOT });
|
|
156
|
+
} catch (e) {
|
|
157
|
+
console.log(' ⚠️ MCP install issue (non-fatal):', e.message.split('\n')[0]);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// 8. Done
|
|
163
|
+
console.log('');
|
|
164
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
165
|
+
console.log(` ✅ Pantheon Orchestrator v${version} installed!`);
|
|
166
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
167
|
+
console.log('');
|
|
168
|
+
console.log(' Next steps:');
|
|
169
|
+
console.log(' 1. Enable background subagents:');
|
|
170
|
+
console.log(' echo \'export OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true\' >> ~/.zshrc');
|
|
171
|
+
console.log(' 2. Launch OpenCode:');
|
|
172
|
+
console.log(' source ~/.zshrc && opencode');
|
|
173
|
+
console.log(' 3. Test background delegation:');
|
|
174
|
+
console.log(' @zeus, dispatch 2 apollo in parallel to research');
|
|
175
|
+
console.log('');
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
printUsage();
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
main().catch(err => { console.error('Error:', err.message); process.exit(1); });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Audit: heuristic scan (zero LLM) + Themis review. Usage: /pantheon-audit [--light|--full|--plan]"
|
|
3
|
+
agent: "themis"
|
|
4
|
+
---
|
|
5
|
+
# /pantheon-audit — Quality & Security Audit
|
|
6
|
+
|
|
7
|
+
**What:** Layer 1 heuristic scan (zero tokens, <2s). If BLOCKING, returns score. If APPROVED, Themis deep review.
|
|
8
|
+
|
|
9
|
+
**Usage:**
|
|
10
|
+
- `/pantheon-audit` — Full audit (Layer 1 → 2 → 3)
|
|
11
|
+
- `/pantheon-audit --light` — Layer 1 only (quick scan)
|
|
12
|
+
- `/pantheon-audit --full` — Force full review
|
|
13
|
+
- `/pantheon-audit --plan` — Verification planning only
|
|
14
|
+
|
|
15
|
+
## Layers
|
|
16
|
+
|
|
17
|
+
### Layer 1 — Heuristic Scan
|
|
18
|
+
`python3 scripts/themis_heuristic_scan.py [--path=<dir>]`
|
|
19
|
+
Zero tokens, <2s. Checks: ruff, biome, anti-pattern slop, anti-overengineering (YAGNI), hash-anchored edits. Returns score 0-100 + APPROVED/BLOCKING.
|
|
20
|
+
|
|
21
|
+
### Layer 2 — Themis Deep Review
|
|
22
|
+
~500 tokens. Confidence scoring, regression prediction, OWASP Top 10.
|
|
23
|
+
|
|
24
|
+
### Layer 3 — Verification Planning
|
|
25
|
+
For N>5 file changes. Sugere plano de verificação antes de implementar.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "List background tasks and their status"
|
|
3
|
+
agent: zeus
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
List all active background subagent tasks:
|
|
7
|
+
|
|
8
|
+
1. Query `task_status()` for any running task IDs
|
|
9
|
+
2. Show task_id, agent type, timestamp, and state
|
|
10
|
+
3. Keep the user informed of progress
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Merge and consolidate memory entries"
|
|
3
|
+
agent: zeus
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Merge related memory entries and consolidate duplicates:
|
|
7
|
+
|
|
8
|
+
1. Search for related memories via memory_search
|
|
9
|
+
2. Merge overlapping entries
|
|
10
|
+
3. Remove duplicates via memory_forget
|
|
11
|
+
4. Store consolidated entry via memory_store
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Start a heavy multi-phase task with persisted checkpoints, phased specialist dispatch, and Themis review gates. Progress saved to .pantheon/deepwork/ for resumability. Usage: /pantheon-deepwork"
|
|
3
|
+
agent: "zeus"
|
|
4
|
+
---
|
|
5
|
+
# /pantheon-deepwork — Heavy Task Workflow
|
|
6
|
+
|
|
7
|
+
**What:** Starts a structured, checkpointed workflow for complex multi-step tasks. Progress is persisted to `.pantheon/deepwork/<task-slug>/` so work can resume if interrupted. Each phase is gated by Themis review.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- Tasks expected to take 10+ turns
|
|
12
|
+
- Multi-agent orchestration with dependencies
|
|
13
|
+
- Work that spans multiple sessions
|
|
14
|
+
- Anything where losing context mid-way would be costly
|
|
15
|
+
|
|
16
|
+
## When NOT to Use
|
|
17
|
+
|
|
18
|
+
- Simple fixes (use @talos)
|
|
19
|
+
- Single-file changes (use /subtask)
|
|
20
|
+
- Tasks completable in < 5 turns (use normal delegation)
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Phase 0: SCOPING
|
|
26
|
+
└─ Zeus + Athena define task scope, phases, and acceptance criteria
|
|
27
|
+
└─ Output: .pantheon/deepwork/<slug>/PLAN.md
|
|
28
|
+
|
|
29
|
+
Phase 1: DISCOVERY
|
|
30
|
+
└─ @apollo maps relevant codebase areas
|
|
31
|
+
└─ Output: .pantheon/deepwork/<slug>/DISCOVERY.md
|
|
32
|
+
|
|
33
|
+
Phase 2-N: IMPLEMENTATION (parallel per phase)
|
|
34
|
+
└─ @hermes / @aphrodite / @demeter implement phase scope
|
|
35
|
+
└─ Output: .pantheon/deepwork/<slug>/phase-<N>-<agent>.md
|
|
36
|
+
|
|
37
|
+
GATE after each phase:
|
|
38
|
+
└─ @themis reviews phase output
|
|
39
|
+
└─ FAIL → fix and re-submit
|
|
40
|
+
└─ PASS → continue to next phase
|
|
41
|
+
|
|
42
|
+
Phase FINAL: VERIFICATION
|
|
43
|
+
└─ @themis full integration review
|
|
44
|
+
└─ All tests pass, coverage >80%
|
|
45
|
+
└─ Output: .pantheon/deepwork/<slug>/REVIEW.md
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Checkpoint System
|
|
49
|
+
|
|
50
|
+
Each phase writes a checkpoint file. If work is interrupted:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
/pantheon-deepwork --resume <slug> # Resume from last checkpoint
|
|
54
|
+
/pantheon-deepwork --status <slug> # Show current progress
|
|
55
|
+
/pantheon-deepwork --list # List all deepwork tasks
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Checkpoint files:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
.pantheon/deepwork/<slug>/
|
|
62
|
+
├── PLAN.md # Scope and phase plan
|
|
63
|
+
├── DISCOVERY.md # Codebase map
|
|
64
|
+
├── phase-1-hermes.md # Phase 1 backend work
|
|
65
|
+
├── phase-1-aphrodite.md # Phase 1 frontend work
|
|
66
|
+
├── phase-1-review.md # Phase 1 Themis review
|
|
67
|
+
├── phase-2-*.md # Subsequent phases
|
|
68
|
+
├── REVIEW.md # Final Themis review
|
|
69
|
+
└── STATUS.md # Current state (phase, progress, blockers)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## ⚡ Full-Auto Mode (`--full-auto`)
|
|
73
|
+
|
|
74
|
+
> ⚠️ **WARNING:** This bypasses human review gates. Only for experienced operators. Tier 1 gates (plan, commit, deploy) still require human approval.
|
|
75
|
+
|
|
76
|
+
New in v4.0 — **Ultrawork-style execution**. When `--full-auto` is passed:
|
|
77
|
+
|
|
78
|
+
- **All gates auto-approve** — no waiting for Themis approval between phases
|
|
79
|
+
- Only stops if Themis returns a **BLOCKING** verdict
|
|
80
|
+
- Equivalent to the "ultrawork" paradigm from OMO (one-minute-optimization)
|
|
81
|
+
- Checkpoints still saved at every phase boundary
|
|
82
|
+
- Use for: high-confidence tasks, batch processing, experienced operators
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
/pantheon-deepwork --full-auto "Refactor auth service to use JWT" # Full auto mode
|
|
86
|
+
/pantheon-deepwork --full-auto --resume auth-jwt # Resume in full-auto
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Anti-Stall Integration
|
|
90
|
+
|
|
91
|
+
Deepwork automatically applies:
|
|
92
|
+
|
|
93
|
+
- **Stall Detection Protocol** — 3 turns no progress → escalate
|
|
94
|
+
- **Phase Reminder** — after each dispatch, continue only independent work
|
|
95
|
+
- **Progress Checkpoint** — every 5 turns, summarize completed vs remaining
|
|
96
|
+
- **Delegate Retry** — delegation failures retried once with rephrased prompt
|
|
97
|
+
|
|
98
|
+
If a phase stalls:
|
|
99
|
+
|
|
100
|
+
1. Checkpoint current progress
|
|
101
|
+
2. Report to user: "Phase [N] stalled. Progress saved. Options: (a) retry with different approach, (b) simplify scope, (c) skip phase and revisit."
|
|
102
|
+
|
|
103
|
+
## Usage
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
/pantheon-deepwork "Add user authentication with OAuth2" # Start new deepwork session
|
|
107
|
+
/pantheon-deepwork --resume auth-oauth2 # Resume interrupted session
|
|
108
|
+
/pantheon-deepwork --status auth-oauth2 # Show progress
|
|
109
|
+
/pantheon-deepwork --list # List all tasks
|
|
110
|
+
/pantheon-deepwork --archive auth-oauth2 # Archive completed task
|
|
111
|
+
/pantheon-deepwork --full-auto "Refactor auth service" # Full auto (ultrawork mode)
|
|
112
|
+
/pantheon-deepwork --full-auto --resume auth-refactor # Resume full-auto session
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Safety
|
|
116
|
+
|
|
117
|
+
- All progress persisted — work is never lost
|
|
118
|
+
- Each phase gated by Themis — quality enforced at every step
|
|
119
|
+
- Explicit resume required — won't auto-continue without user intent (unless `--full-auto`)
|
|
120
|
+
- `.pantheon/deepwork/` is gitignored — no accidental commits
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Related: `/pantheon-praxis` (merged)
|
|
125
|
+
|
|
126
|
+
`/pantheon-praxis` was merged into `/pantheon-deepwork` in v4.0. Use `/pantheon-deepwork` for all multi-phase execution.
|
|
127
|
+
|
|
128
|
+
For ad-hoc single-phase execution, use normal agent delegation (`@hermes`, `@aphrodite`, etc.) directly.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Generate or update project documentation"
|
|
3
|
+
agent: zeus
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Generate or update project documentation:
|
|
7
|
+
|
|
8
|
+
1. Check ADRs in `.pantheon/memory-bank/`
|
|
9
|
+
2. Update INSTALLATION.md, README.md, CHANGELOG.md
|
|
10
|
+
3. Use @mnemosyne for memory bank documentation
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Pin a session goal to prevent scope creep. Usage: /pantheon-focus"
|
|
3
|
+
agent: "zeus"
|
|
4
|
+
---
|
|
5
|
+
# /pantheon-focus — Session Goal
|
|
6
|
+
|
|
7
|
+
**What:** Pins a session objective. When active, all agents verify every action against the pinned goal. Off-topic work is flagged and blocked.
|
|
8
|
+
**Usage:** `/pantheon-focus <short objective>`
|
|
9
|
+
**Commands:** `/pantheon-focus list` — show all active goals, `/pantheon-focus clear` — remove all
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Compress old memory entries into summarized form. /pantheon-forget lists entries older than N days, then replaces them with a compressed summary. --auto applies without confirmation. Usage: /pantheon-forget"
|
|
3
|
+
agent: "zeus"
|
|
4
|
+
---
|
|
5
|
+
# /pantheon-forget — Memory Range Compression
|
|
6
|
+
|
|
7
|
+
**What:** Applies range compression to old memory entries — groups entries by time period and namespace, generates a concise summary via fast LLM, replaces N raw entries with 1 summary. Companion to memory_consolidate (merge) vs memory_forget (compress).
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/pantheon-forget → Lista candidatas (7+ dias, modo interativo)
|
|
13
|
+
/pantheon-forget --days=30 → Só entradas com 30+ dias
|
|
14
|
+
/pantheon-forget --namespace=sessions → Namespace específico
|
|
15
|
+
/pantheon-forget --namespace=sessions --days=14 Combinado
|
|
16
|
+
/pantheon-forget --auto → Comprime sem confirmação
|
|
17
|
+
/pantheon-forget --auto --days=30 --compress → Agressivo: 30+ dias + comprimir em 1 arquivo
|
|
18
|
+
/pantheon-forget --dry-run → Preview sem modificar
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Flags
|
|
22
|
+
|
|
23
|
+
| Flag | Default | Descrição |
|
|
24
|
+
|------|---------|-----------|
|
|
25
|
+
| `--days=<N>` | `7` | Idade mínima em dias |
|
|
26
|
+
| `--namespace=<ns>` | `all` | Namespace específico |
|
|
27
|
+
| `--auto` | off | Comprimir sem confirmação |
|
|
28
|
+
| `--dry-run` | off | Preview sem modificar |
|
|
29
|
+
| `--compress` | off | Comprimir tudo em 1 único entry (modo agressivo) |
|
|
30
|
+
|
|
31
|
+
## How It Works
|
|
32
|
+
|
|
33
|
+
1. `memory_list()` → obtém entradas, filtra por idade
|
|
34
|
+
2. Agrupa por namespace + mês
|
|
35
|
+
3. Cada grupo: envia para LLM fast com prompt:
|
|
36
|
+
```
|
|
37
|
+
Summarize these N memory entries into 2-3 sentences:
|
|
38
|
+
[entries...]
|
|
39
|
+
```
|
|
40
|
+
4. Substitui grupo por entry único com key `compressed:<namespace>:<YYYY-MM>`
|
|
41
|
+
5. Entradas originais são deletadas via `memory_forget()`
|
|
42
|
+
|
|
43
|
+
## Output
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
🗜️ Memory Range Compression
|
|
47
|
+
|
|
48
|
+
Group: sessions · 2026-06 (15 entries · 1.2K tokens)
|
|
49
|
+
→ "Sessões de junho focadas em migração FastAPI, ajustes de rota e correção de testes."
|
|
50
|
+
→ Compressed: 15 → 1 entry ✅
|
|
51
|
+
|
|
52
|
+
Group: decisions · 2026-05 (8 entries · 640 tokens)
|
|
53
|
+
→ "Decisões de maio sobre arquitetura: monorepo mantido, SQLAlchemy 2.0 como padrão."
|
|
54
|
+
→ Compressed: 8 → 1 entry ✅
|
|
55
|
+
|
|
56
|
+
Summary: 2 groups compressed, 23 entries → 2 entries (-91%)
|
|
57
|
+
Tokens saved: ~1.8K
|
|
58
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Track file changes via content hashing"
|
|
3
|
+
agent: zeus
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Track file modifications using SHA-256 hashes:
|
|
7
|
+
|
|
8
|
+
1. Hash all files before edits: kv_store("hash:<path>", sha256(content))
|
|
9
|
+
2. After edits, compare: kv_get("hash:<path>") vs new hash
|
|
10
|
+
3. Report which files changed and by how much
|
|
11
|
+
4. Useful for audit trail and change detection
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Scan, clean, cache, and archive Pantheon project files. Scans for bloat, archives completed deepwork, migrates flat files to MCP memory, and reports optimization opportunities. Usage: /pantheon-optimize"
|
|
3
|
+
agent: "zeus"
|
|
4
|
+
---
|
|
5
|
+
# /pantheon-optimize — Pantheon Project Optimizer
|
|
6
|
+
|
|
7
|
+
**What:** Multi-mode optimization: scans for documentation bloat, archives completed deepwork, migrates memory-bank flat files to MCP memory (ChromaDB), and reports token savings.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/pantheon-optimize → Full scan + compress (default)
|
|
13
|
+
/pantheon-optimize --dry-run → Preview only, no changes
|
|
14
|
+
/pantheon-optimize --archive → Archive completed deepwork sessions
|
|
15
|
+
/pantheon-optimize --cache → Migrate memory-bank to MCP memory
|
|
16
|
+
/pantheon-optimize --path=<dir> → Limit scan to directory
|
|
17
|
+
/pantheon-optimize --all → Run all modes (default)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Modes
|
|
21
|
+
|
|
22
|
+
### `--archive` — Deepwork Archiving
|
|
23
|
+
Archives completed deepwork sessions from `.pantheon/deepwork/<slug>/` to `.pantheon/deepwork/archive/<slug>/`.
|
|
24
|
+
|
|
25
|
+
**Criteria:** A session is "completed" if it has a `REVIEW.md` containing "APPROVED".
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/pantheon-optimize archive → Interactive (ask per slug)
|
|
29
|
+
/pantheon-optimize archive --dry-run → Preview only
|
|
30
|
+
/pantheon-optimize archive --auto → Archive all completed
|
|
31
|
+
/pantheon-optimize archive --auto --keep=2 → Keep only PLAN.md + REVIEW.md
|
|
32
|
+
/pantheon-optimize archive --auto --compress → Single .md per slug
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### `--cache` — Memory Bank Migration
|
|
36
|
+
Scans `.pantheon/memory-bank/` for flat `.md` files and migrates them to the MCP memory server (ChromaDB).
|
|
37
|
+
|
|
38
|
+
**What it does:**
|
|
39
|
+
1. Reads all `.md` files in `.pantheon/memory-bank/`
|
|
40
|
+
2. Chunks by heading (## sections)
|
|
41
|
+
3. Calls `memory_store()` for each chunk with appropriate namespace
|
|
42
|
+
4. Optionally archives the original files after successful migration
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
/pantheon-optimize cache → Preview candidates, ask confirm
|
|
46
|
+
/pantheon-optimize cache --dry-run → Show what would migrate
|
|
47
|
+
/pantheon-optimize cache --auto → Migrate + archive originals
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### `--dry-run` (global flag)
|
|
51
|
+
Prevents any destructive action. Shows what WOULD be done.
|
|
52
|
+
|
|
53
|
+
### Default mode (no flags)
|
|
54
|
+
Runs bloat scan on all `.md` and `.json` files + compression report.
|
|
55
|
+
|
|
56
|
+
## Output
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
🧹 Pantheon Optimize Report
|
|
60
|
+
|
|
61
|
+
📦 Bloat Scan: 47 .md + 12 .json files
|
|
62
|
+
→ 3 oversized files found
|
|
63
|
+
→ ~2.4K tokens recoverable
|
|
64
|
+
|
|
65
|
+
📁 Deepwork Archive: 15 candidates
|
|
66
|
+
→ 12 completed (REVIEW.md APPROVED)
|
|
67
|
+
→ 3 in progress (skipped)
|
|
68
|
+
→ Run with --archive --auto to archive 12 sessions
|
|
69
|
+
|
|
70
|
+
🗄️ Memory Cache: 24 files in memory-bank/
|
|
71
|
+
→ 18 already in MCP memory (dedup)
|
|
72
|
+
→ 6 candidates for migration (~3.2K tokens)
|
|
73
|
+
→ Run with --cache to migrate
|
|
74
|
+
|
|
75
|
+
📊 Summary:
|
|
76
|
+
⚡ 15 files optimizable → ~5.6K tokens
|
|
77
|
+
🗑️ 12 deepworks archivable → ~320 files cleanup
|
|
78
|
+
🗄️ 6 memory files → MCP migration ready
|
|
79
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Store or recall a memory interactively. /pantheon-remember <text> → stores it. /pantheon-remember recall <key> → retrieves it. Omitting args starts interactive mode. Usage: /pantheon-remember"
|
|
3
|
+
agent: "zeus"
|
|
4
|
+
---
|
|
5
|
+
# /pantheon-remember — Memory Store & Recall
|
|
6
|
+
|
|
7
|
+
**What:** Stores a memory entry via `memory_store()` or recalls via `memory_recall()`. Interactive mode if no arguments.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/pantheon-remember "Decisão: usar FastAPI em vez de Flask" → Store (namespace: default)
|
|
13
|
+
/pantheon-remember "Decisão: ..." --namespace=decisions → Store em namespace específico
|
|
14
|
+
/pantheon-remember recall "FastAPI decision" → Recall por key
|
|
15
|
+
/pantheon-remember recall "FastAPI decision" --namespace=decisions → Recall em namespace
|
|
16
|
+
/pantheon-remember → Modo interativo (pergunta→store→pergunta recall)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
### Store mode (default)
|
|
22
|
+
1. Chama `memory_store()` com o texto fornecido
|
|
23
|
+
2. Metadata: preenche `agent`, `type`, `timestamp` automaticamente
|
|
24
|
+
3. Pergunta: "Quer buscar algo relacionado? (y/n)"
|
|
25
|
+
- `y` → `memory_recall()` com extração automática de keywords
|
|
26
|
+
- `n` → fim
|
|
27
|
+
|
|
28
|
+
### Recall mode
|
|
29
|
+
1. Chama `memory_recall()` com a key fornecida
|
|
30
|
+
2. Se não achar, tenta `memory_search()` como fallback
|
|
31
|
+
|
|
32
|
+
### Interactive mode (no args)
|
|
33
|
+
1. "O que você quer armazenar?"
|
|
34
|
+
2. Recebe texto → `memory_store()`
|
|
35
|
+
3. "Quer buscar algo relacionado?"
|
|
36
|
+
4. Opcional: "Qual namespace?" (default: "default")
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
✅ Stored — id: 42 | namespace: decisions | key: auto-generated
|
|
42
|
+
📎 Related entries (memory_recall):
|
|
43
|
+
- #1: "Decisão: usar FastAPI..." (score: 0.92)
|
|
44
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Search memories by text with optional namespace filter, category, and result limit. /pantheon-search <query> --namespace=<ns> --top=<N> --stats. Usage: /pantheon-search"
|
|
3
|
+
agent: "zeus"
|
|
4
|
+
---
|
|
5
|
+
# /pantheon-search — Memory Search
|
|
6
|
+
|
|
7
|
+
**What:** Searches memory entries via `memory_search()` with hybrid vector + keyword (RRF fusion). Supports namespace filter, result limit, and stats view.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/pantheon-search "FastAPI performance" → Busca em todos os namespaces
|
|
13
|
+
/pantheon-search "FastAPI" --namespace=decisions → Busca só em decisions
|
|
14
|
+
/pantheon-search "bug pattern" --namespace=sessions --top=10 → 10 resultados
|
|
15
|
+
/pantheon-search --stats → memory_stats() completo
|
|
16
|
+
/pantheon-search --stats --namespace=decisions → Stats por namespace
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Flags
|
|
20
|
+
|
|
21
|
+
| Flag | Default | Descrição |
|
|
22
|
+
|------|---------|-----------|
|
|
23
|
+
| `--namespace=<ns>` | `all` | Filtrar por namespace específico |
|
|
24
|
+
| `--top=<N>` | `5` | Número de resultados (max 50) |
|
|
25
|
+
| `--stats` | off | Mostrar estatísticas em vez de buscar |
|
|
26
|
+
|
|
27
|
+
## Output (search)
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
🔍 Memory Search: "FastAPI performance"
|
|
31
|
+
|
|
32
|
+
Results (namespace: all):
|
|
33
|
+
#1 │ decisions │ "Decisão: usar FastAPI..." │ score: 0.89 │ 2026-07-20
|
|
34
|
+
#2 │ repo │ "FastAPI async patterns" │ score: 0.74 │ 2026-07-18
|
|
35
|
+
#3 │ sessions │ "FastAPI migration done" │ score: 0.61 │ 2026-07-15
|
|
36
|
+
|
|
37
|
+
Found 3 results in 2 namespaces (0.23s)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Output (stats)
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
📊 Memory Stats
|
|
44
|
+
Total entries: 142
|
|
45
|
+
Namespaces: decisions (58), sessions (44), repo (28), default (12)
|
|
46
|
+
Vector entries: 142
|
|
47
|
+
DB size: 1.2 MB
|
|
48
|
+
```
|