pantheon-opencode 1.0.1 → 1.0.6
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/README.md +61 -109
- package/bin/pantheon-init.mjs +57 -136
- package/commands/pantheon-audit.md +1 -1
- package/commands/pantheon-deepwork.md +32 -81
- package/commands/pantheon-reflect.md +16 -0
- package/commands/pantheon-status.md +1 -1
- package/commands/pantheon-verify.md +17 -0
- package/opencode.json +25 -0
- package/package.json +20 -9
- package/scripts/ci-validate-yaml.py +19 -0
- package/scripts/doctor.mjs +10 -65
- package/scripts/install/opencode.mjs +69 -6
- package/scripts/install/shared.mjs +39 -13
- package/scripts/manifest.mjs +5 -30
- package/scripts/postinstall.mjs +47 -0
- package/scripts/release-bundle.mjs +2 -2
- package/scripts/uninstall.mjs +5 -5
- package/scripts/validate-routing.mjs +19 -16
- package/scripts/versioning.mjs +12 -1
- package/skills-lock.json +9 -2
- package/src/agents/aphrodite.md +15 -57
- package/src/agents/apollo.md +9 -48
- package/src/agents/athena.md +17 -54
- package/src/agents/demeter.md +10 -47
- package/src/agents/gaia.md +7 -40
- package/src/agents/hephaestus.md +9 -52
- package/src/agents/hermes.md +17 -52
- package/src/agents/iris.md +8 -45
- package/src/agents/mnemosyne.md +12 -47
- package/src/agents/nyx.md +8 -45
- package/src/agents/prometheus.md +11 -49
- package/src/agents/talos.md +6 -45
- package/src/agents/themis.md +10 -35
- package/src/agents/zeus.md +5 -7
- package/src/mcp/mcp_resources_server.py +2 -0
- package/src/plugins/tui/dist/tui.tsx +203 -93
- package/src/plugins/tui/src/index.tsx +203 -93
- package/src/routing.yml +33 -93
- package/src/skills/clonedeps/SKILL.md +45 -0
- package/src/skills/codemap/SKILL.md +47 -0
- package/src/skills/loop-engineering/SKILL.md +51 -0
- package/src/skills/reflect/SKILL.md +49 -0
- package/src/skills/simplify/SKILL.md +39 -0
- package/src/skills/verification-planning/SKILL.md +52 -0
- package/src/skills/worktrees/SKILL.md +43 -0
- package/commands/pantheon-bg.md +0 -10
- package/commands/pantheon-consolidate.md +0 -11
- package/commands/pantheon-doc.md +0 -10
- package/commands/pantheon-hash.md +0 -11
- package/commands/pantheon-todo.md +0 -11
- package/docs/AGENT-MCP.md +0 -194
- package/docs/ARCHITECTURE.md +0 -384
- package/docs/BRANCH-PROTECTION.md +0 -142
- package/docs/INDEX.md +0 -81
- package/docs/INSTALLATION.md +0 -217
- package/docs/MCP.md +0 -238
- package/docs/MEMORY.md +0 -471
- package/docs/MIGRATION-MEMORY-BANK.md +0 -139
- package/docs/PLATFORMS.md +0 -5
- package/docs/QUICKSTART.md +0 -49
- package/docs/README.md +0 -18
- package/docs/RELEASING.md +0 -256
- package/docs/SETUP.md +0 -5
- package/docs/UPGRADING.md +0 -41
- package/docs/mcp-recommendations.md +0 -439
- package/docs/mcp-tools.md +0 -156
- package/docs/mcp-user-guide.md +0 -204
- package/docs/persistence-mcp.md +0 -111
- package/scripts/init-pantheon-mcp.sh +0 -118
- package/scripts/install.mjs +0 -26
- package/src/instructions/documentation-standards.instructions.md +0 -53
- package/src/mcp/init-pantheon-mcp.sh +0 -118
package/docs/MEMORY.md
DELETED
|
@@ -1,471 +0,0 @@
|
|
|
1
|
-
# Pantheon Memory System Guide
|
|
2
|
-
|
|
3
|
-
Pantheon's memory system provides persistent, multi-strategy memory for AI
|
|
4
|
-
agents using ChromaDB (vector database) + sentence-transformers (local
|
|
5
|
-
embeddings). All 14 tools are accessible via the `pantheon-memory` MCP server.
|
|
6
|
-
|
|
7
|
-
**Server script:** `scripts/memory_mcp_server.py`
|
|
8
|
-
**Storage:** `~/.pantheon/memory/chroma.sqlite3`
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## How Memory Works
|
|
13
|
-
|
|
14
|
-
### Architecture
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
Agent tool call → MCP server → ChromaDB PersistentClient
|
|
18
|
-
│
|
|
19
|
-
sentence-transformers
|
|
20
|
-
(all-MiniLM-L6-v2)
|
|
21
|
-
│
|
|
22
|
-
SQLite storage
|
|
23
|
-
(~/.pantheon/memory/)
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### Scoring Strategy
|
|
27
|
-
|
|
28
|
-
Each memory retrieval uses **fusion scoring** that combines three signals:
|
|
29
|
-
|
|
30
|
-
| Signal | Weight | Description |
|
|
31
|
-
|--------|--------|-------------|
|
|
32
|
-
| **Dense vector similarity** | Primary | ChromaDB's built-in cosine similarity between query and stored embeddings |
|
|
33
|
-
| **Freshness decay** | Boost | 30-day exponential half-life. Newer entries score higher |
|
|
34
|
-
| **Importance boost** | Boost | User-set `importance` (0.0–1.0). Higher = more weight |
|
|
35
|
-
|
|
36
|
-
**Freshness decay formula:** `score = cosine_sim × freshness × (1 + importance)`
|
|
37
|
-
|
|
38
|
-
Where `freshness = 2^(-days_since_store / 30)` — after 30 days, an entry's
|
|
39
|
-
freshness contribution halves.
|
|
40
|
-
|
|
41
|
-
### Memory Metadata
|
|
42
|
-
|
|
43
|
-
Every entry stores:
|
|
44
|
-
|
|
45
|
-
| Field | Type | Description |
|
|
46
|
-
|-------|------|-------------|
|
|
47
|
-
| `id` | UUID | Auto-generated unique identifier |
|
|
48
|
-
| `content` | str | The text content (max 50,000 chars) |
|
|
49
|
-
| `timestamp` | ISO 8601 | When the entry was created/updated |
|
|
50
|
-
| `agent` | str | Which agent stored this (e.g., `"hermes"`) |
|
|
51
|
-
| `category` | str | Classification (`"memory"`, `"session_fact"`, `"decision"`, `"tool_output"`) |
|
|
52
|
-
| `session_id` | str | Logical session grouping |
|
|
53
|
-
| `importance` | float | 0.0–1.0 |
|
|
54
|
-
| `verified` | bool | Whether claim verification ran |
|
|
55
|
-
| `truncated` | bool | Whether RTK output filtering was applied |
|
|
56
|
-
| `links` | list[str] \| null | Linked entry IDs (knowledge graph) |
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Tool Reference
|
|
61
|
-
|
|
62
|
-
### 1. `memory_store` — Store a Memory Entry
|
|
63
|
-
|
|
64
|
-
Stores content with metadata. Returns entry ID and timestamp.
|
|
65
|
-
|
|
66
|
-
```python
|
|
67
|
-
memory_store(
|
|
68
|
-
content: str, # The text to store
|
|
69
|
-
category: str = "memory", # "session_fact", "memory", "decision", "tool_output"
|
|
70
|
-
agent: str = "unknown", # Your agent name
|
|
71
|
-
session_id: str = "default", # Session grouping key
|
|
72
|
-
importance: float = 0.5, # 0.0 (trivial) to 1.0 (critical)
|
|
73
|
-
truncate: bool = False, # Apply RTK output filtering
|
|
74
|
-
links: str | list[str] | None = None # Entry IDs to link to
|
|
75
|
-
) -> str: # JSON: {"id": "...", "timestamp": "..."}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**Examples:**
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
# Store a simple fact
|
|
82
|
-
memory_store(
|
|
83
|
-
content="The JWT refresh token rotation uses SHA-256 hashing",
|
|
84
|
-
category="decision",
|
|
85
|
-
agent="hermes",
|
|
86
|
-
session_id="sprint-17",
|
|
87
|
-
importance=0.8
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
# Store with RTK filtering (dedup + truncate)
|
|
91
|
-
memory_store(
|
|
92
|
-
content=large_tool_output,
|
|
93
|
-
category="tool_output",
|
|
94
|
-
truncate=True,
|
|
95
|
-
session_id="session-abc"
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
# Store with knowledge graph links
|
|
99
|
-
memory_store(
|
|
100
|
-
content="User model updated with role-based access control",
|
|
101
|
-
category="decision",
|
|
102
|
-
links=["abc123", "def456"]
|
|
103
|
-
)
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### 2. `memory_search` — Search with Fusion Scoring
|
|
107
|
-
|
|
108
|
-
Search by semantic similarity, with freshness and importance boosts.
|
|
109
|
-
|
|
110
|
-
```python
|
|
111
|
-
memory_search(
|
|
112
|
-
query: str, # Natural language query
|
|
113
|
-
n_results: int = 5, # Max results (1–100)
|
|
114
|
-
category_filter: str | None = None # Optional category filter
|
|
115
|
-
) -> str: # JSON with ranked results
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Examples:**
|
|
119
|
-
|
|
120
|
-
```python
|
|
121
|
-
# General semantic search
|
|
122
|
-
memory_search(query="how do we handle JWT refresh tokens?")
|
|
123
|
-
|
|
124
|
-
# Search within a specific category
|
|
125
|
-
memory_search(
|
|
126
|
-
query="database migration strategy",
|
|
127
|
-
category_filter="decision",
|
|
128
|
-
n_results=10
|
|
129
|
-
)
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### 3. `memory_recall` — Auto-Recall for Prompt Injection
|
|
133
|
-
|
|
134
|
-
Takes your current context, searches memory, and returns a formatted markdown
|
|
135
|
-
block ready to inject into your prompt. This is the **primary entry point** for
|
|
136
|
-
agents at session start.
|
|
137
|
-
|
|
138
|
-
```python
|
|
139
|
-
memory_recall(
|
|
140
|
-
context: str, # Your current task context
|
|
141
|
-
n_results: int = 3 # Number of relevant memories (1–20)
|
|
142
|
-
) -> str: # Formatted markdown for prompt injection
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Example output format:**
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
## 🔍 Relevant Past Memories
|
|
149
|
-
- [2026-07-09] JWT: refresh token rotation uses SHA-256 hashing (importance: 0.8)
|
|
150
|
-
Content: The JWT refresh token rotation uses SHA-256 hashing for secure invalidation.
|
|
151
|
-
...
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
**Recommended usage — call at session start:**
|
|
155
|
-
|
|
156
|
-
```python
|
|
157
|
-
# At the start of every session, recall relevant context
|
|
158
|
-
past = memory_recall(context="implementing user authentication with JWT", n_results=5)
|
|
159
|
-
# Inject `past` into your prompt for continuity
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### 4. `memory_compress` — Compress Old Entries
|
|
163
|
-
|
|
164
|
-
Summarizes the oldest entries in a session into a single compressed entry.
|
|
165
|
-
This frees up search space while preserving key information.
|
|
166
|
-
|
|
167
|
-
```python
|
|
168
|
-
memory_compress(
|
|
169
|
-
session_id: str, # Session to compress
|
|
170
|
-
max_entries: int = 50, # Max entries before compression triggers
|
|
171
|
-
compression_ratio: float = 0.5 # Target compression ratio (0.0–1.0)
|
|
172
|
-
) -> str: # Status message
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
**When to use:** When a session has accumulated many entries (>50), call
|
|
176
|
-
compress to reduce noise. The original entries remain expandable.
|
|
177
|
-
|
|
178
|
-
### 5. `memory_expand` — Restore Compressed Entry
|
|
179
|
-
|
|
180
|
-
If a compressed entry's detail is needed, expand it back.
|
|
181
|
-
|
|
182
|
-
```python
|
|
183
|
-
memory_expand(entry_id: str) -> str # Original detailed content
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### 6. `memory_consolidate` — Merge Similar Entries
|
|
187
|
-
|
|
188
|
-
Finds entries with high cosine similarity in the same session/category and
|
|
189
|
-
merges them into a single entry (keeping the most recent timestamp).
|
|
190
|
-
|
|
191
|
-
```python
|
|
192
|
-
memory_consolidate(
|
|
193
|
-
session_id: str | None = None # Session scope (None = all sessions)
|
|
194
|
-
) -> str: # Status with merge count
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
**When to use:** Periodically, to deduplicate similar memories and reduce
|
|
198
|
-
vector search noise.
|
|
199
|
-
|
|
200
|
-
### 7. `memory_delete` — Delete an Entry
|
|
201
|
-
|
|
202
|
-
```python
|
|
203
|
-
memory_delete(entry_id: str) -> str # Status message
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### 8. `memory_update` — Update Entry Content/Metadata
|
|
207
|
-
|
|
208
|
-
```python
|
|
209
|
-
memory_update(
|
|
210
|
-
entry_id: str,
|
|
211
|
-
content: str | None = None,
|
|
212
|
-
category: str | None = None,
|
|
213
|
-
importance: float | None = None
|
|
214
|
-
) -> str: # Status message
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### 9. `memory_link` — Create Knowledge Graph Relationship
|
|
218
|
-
|
|
219
|
-
Creates a bidirectional link between two entries with a relation label.
|
|
220
|
-
|
|
221
|
-
```python
|
|
222
|
-
memory_link(
|
|
223
|
-
from_id: str, # Source entry ID
|
|
224
|
-
to_id: str, # Target entry ID
|
|
225
|
-
relation: str = "references" # Relation label
|
|
226
|
-
) -> str: # Status message
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
**Relation labels:**
|
|
230
|
-
|
|
231
|
-
| Label | Meaning |
|
|
232
|
-
|-------|---------|
|
|
233
|
-
| `references` | General reference (default) |
|
|
234
|
-
| `supersedes` | New entry replaces old one |
|
|
235
|
-
| `contradicts` | Opposing information |
|
|
236
|
-
| `supports` | Reinforcing evidence |
|
|
237
|
-
| `causes` | Causal relationship |
|
|
238
|
-
| `depends_on` | Prerequisite relationship |
|
|
239
|
-
|
|
240
|
-
### 10. `memory_traverse` — Walk Knowledge Graph
|
|
241
|
-
|
|
242
|
-
Starting from an entry, follow links up to `max_depth` hops.
|
|
243
|
-
|
|
244
|
-
```python
|
|
245
|
-
memory_traverse(
|
|
246
|
-
entry_id: str, # Starting entry
|
|
247
|
-
max_depth: int = 1 # Link traversal depth
|
|
248
|
-
) -> str: # Tree of related entries with summaries
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
**Example:**
|
|
252
|
-
|
|
253
|
-
```python
|
|
254
|
-
# Find all related decisions linked from this entry
|
|
255
|
-
graph = memory_traverse(entry_id="abc123", max_depth=2)
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### 11. `memory_verify` — Claim Verification
|
|
259
|
-
|
|
260
|
-
Verifies a memory claim exists and checks its freshness (Shokunin-style).
|
|
261
|
-
|
|
262
|
-
```python
|
|
263
|
-
memory_verify(entry_id: str) -> str # JSON: {exists, fresh, age_days, ...}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
An entry is considered **stale** if:
|
|
267
|
-
- Age > 90 days (no confidence)
|
|
268
|
-
- Age > 30 days and importance below 0.5
|
|
269
|
-
|
|
270
|
-
### 12. `memory_sessions` — List All Sessions
|
|
271
|
-
|
|
272
|
-
```python
|
|
273
|
-
memory_sessions(format: str = "json") -> str # Sessions list in JSON or markdown
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### 13. `memory_export` — Export Memories as Markdown
|
|
277
|
-
|
|
278
|
-
```python
|
|
279
|
-
memory_export(
|
|
280
|
-
session_id: str | None = None, # Filter by session
|
|
281
|
-
filename: str | None = None # Optional file path to write to
|
|
282
|
-
) -> str: # Markdown formatted memories
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### 14. `memory_cleanup` — Delete Test Sessions
|
|
286
|
-
|
|
287
|
-
```python
|
|
288
|
-
memory_cleanup(session_prefix: str = "test-") -> str # Status message
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
Minimum prefix length: 3 characters (safety guard).
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
## Knowledge Graph
|
|
296
|
-
|
|
297
|
-
The memory system supports a bidirectional knowledge graph via `memory_link`
|
|
298
|
-
and `memory_traverse`.
|
|
299
|
-
|
|
300
|
-
### Creating Links
|
|
301
|
-
|
|
302
|
-
```python
|
|
303
|
-
# Store entries first, then link them
|
|
304
|
-
r1 = memory_store(content="Decided to use Redis for session caching", category="decision")
|
|
305
|
-
r2 = memory_store(content="Implementing Redis adapter in session_service.py", category="session_fact")
|
|
306
|
-
|
|
307
|
-
# Parse IDs from returned JSON
|
|
308
|
-
import json
|
|
309
|
-
id1 = json.loads(r1)["id"]
|
|
310
|
-
id2 = json.loads(r2)["id"]
|
|
311
|
-
|
|
312
|
-
# Link them
|
|
313
|
-
memory_link(from_id=id1, to_id=id2, relation="causes")
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
### Traversing Links
|
|
317
|
-
|
|
318
|
-
```python
|
|
319
|
-
# Walk the graph
|
|
320
|
-
graph = memory_traverse(entry_id=id1, max_depth=3)
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
This returns a tree structure showing all linked entries up to 3 hops away.
|
|
324
|
-
|
|
325
|
-
### Link Constraints
|
|
326
|
-
|
|
327
|
-
- Max depth guard prevents cycles (max 10 hops in a single traverse call)
|
|
328
|
-
- Links are bidirectional — linking A→B also allows traversal B→A
|
|
329
|
-
- Links stored in the entry's `links` metadata field
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## Freshness Decay
|
|
334
|
-
|
|
335
|
-
The freshness scoring system ensures recent, important information surfaces
|
|
336
|
-
above old, low-importance noise.
|
|
337
|
-
|
|
338
|
-
### Decay Curve
|
|
339
|
-
|
|
340
|
-
| Age | Freshness Multiplier |
|
|
341
|
-
|-----|---------------------|
|
|
342
|
-
| 0 days | 1.0 |
|
|
343
|
-
| 30 days | 0.5 (half-life) |
|
|
344
|
-
| 60 days | 0.25 |
|
|
345
|
-
| 90 days | 0.125 |
|
|
346
|
-
| 180 days | ~0.016 |
|
|
347
|
-
|
|
348
|
-
### Practical Effects
|
|
349
|
-
|
|
350
|
-
- **Recent decisions** (today–7 days) strongly prioritized
|
|
351
|
-
- **Last month's work** still surfaces if important (importance ≥ 0.7)
|
|
352
|
-
- **Old tool output** (session noise) naturally fades away
|
|
353
|
-
- **High-importance anchors** (importance 0.9–1.0) remain relevant longer
|
|
354
|
-
|
|
355
|
-
### Verification Staleness
|
|
356
|
-
|
|
357
|
-
`memory_verify` flags entries as stale using:
|
|
358
|
-
- **Stale**: age > 90 days (no confidence in accuracy)
|
|
359
|
-
- **Warn**: age > 30 days AND importance < 0.5
|
|
360
|
-
|
|
361
|
-
---
|
|
362
|
-
|
|
363
|
-
## Compression System
|
|
364
|
-
|
|
365
|
-
The compression system (DCP-style range compression) is **deterministic** —
|
|
366
|
-
not LLM-based. It groups entries by category and creates summary entries.
|
|
367
|
-
|
|
368
|
-
### When to Compress
|
|
369
|
-
|
|
370
|
-
```python
|
|
371
|
-
# After a session accumulates many entries
|
|
372
|
-
memory_compress(session_id="sprint-17", max_entries=50, compression_ratio=0.5)
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
### What Compression Does
|
|
376
|
-
|
|
377
|
-
1. Finds the oldest entires in a session
|
|
378
|
-
2. Groups them by category
|
|
379
|
-
3. Creates a single compressed entry summarizing the group
|
|
380
|
-
4. Returns a status message with the compressed entry ID
|
|
381
|
-
|
|
382
|
-
### Expanding
|
|
383
|
-
|
|
384
|
-
If you need details from a compressed entry:
|
|
385
|
-
|
|
386
|
-
```python
|
|
387
|
-
details = memory_expand(entry_id="compressed-entry-id")
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
---
|
|
391
|
-
|
|
392
|
-
## Agent Usage Patterns
|
|
393
|
-
|
|
394
|
-
### Session Start — Always Recall
|
|
395
|
-
|
|
396
|
-
Every agent should call `memory_recall` at session start:
|
|
397
|
-
|
|
398
|
-
```python
|
|
399
|
-
# At session start
|
|
400
|
-
ctx = "implementing user authentication with refresh tokens"
|
|
401
|
-
memories = memory_recall(context=ctx, n_results=5)
|
|
402
|
-
# Inject into your system prompt
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
### Important Decisions — Always Store
|
|
406
|
-
|
|
407
|
-
When you make a decision:
|
|
408
|
-
|
|
409
|
-
```python
|
|
410
|
-
memory_store(
|
|
411
|
-
content="decision details",
|
|
412
|
-
category="decision",
|
|
413
|
-
agent="hermes",
|
|
414
|
-
importance=0.9
|
|
415
|
-
)
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
### Cross-Referencing — Link Related Entries
|
|
419
|
-
|
|
420
|
-
When two memories are related:
|
|
421
|
-
|
|
422
|
-
```python
|
|
423
|
-
memory_link(from_id="decision-id", to_id="implementation-id", relation="causes")
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
### Periodic Maintenance
|
|
427
|
-
|
|
428
|
-
```python
|
|
429
|
-
# Consolidate duplicates
|
|
430
|
-
memory_consolidate(session_id="sprint-17")
|
|
431
|
-
|
|
432
|
-
# Compress old entries
|
|
433
|
-
memory_compress(session_id="sprint-17", max_entries=100, compression_ratio=0.5)
|
|
434
|
-
|
|
435
|
-
# Export for review
|
|
436
|
-
memory_export(session_id="sprint-17", filename="/tmp/sprint-17-export.md")
|
|
437
|
-
```
|
|
438
|
-
|
|
439
|
-
---
|
|
440
|
-
|
|
441
|
-
## Storage & Performance
|
|
442
|
-
|
|
443
|
-
| Aspect | Detail |
|
|
444
|
-
|--------|--------|
|
|
445
|
-
| **Database** | ChromaDB PersistentClient (SQLite-backed) |
|
|
446
|
-
| **Location** | `~/.pantheon/memory/chroma.sqlite3` |
|
|
447
|
-
| **Embedding model** | `all-MiniLM-L6-v2` (~80MB, downloaded once via sentence-transformers) |
|
|
448
|
-
| **Max content length** | 50,000 characters per entry |
|
|
449
|
-
| **Max results** | 100 per search, 20 per recall |
|
|
450
|
-
| **Categories** | Unlimited (user-defined strings) |
|
|
451
|
-
|
|
452
|
-
### Performance Tips
|
|
453
|
-
|
|
454
|
-
- Use `category_filter` in `memory_search` for faster, more relevant results
|
|
455
|
-
- Use `truncate=True` in `memory_store` for large tool outputs
|
|
456
|
-
- Run `memory_consolidate` periodically to reduce vector search noise
|
|
457
|
-
- Run `memory_compress` when a session has >50 entries
|
|
458
|
-
- Use `memory_cleanup("test-")` to remove test data after development
|
|
459
|
-
|
|
460
|
-
---
|
|
461
|
-
|
|
462
|
-
## Troubleshooting
|
|
463
|
-
|
|
464
|
-
| Symptom | Likely Cause | Fix |
|
|
465
|
-
|---------|-------------|-----|
|
|
466
|
-
| `memory_recall` returns empty | No entries match context | Store some content first, try broader query |
|
|
467
|
-
| "Failed to store memory" | Content too long (>50k chars) | Use `truncate=True` or reduce content size |
|
|
468
|
-
| Search returns irrelevant results | No entries with matching semantics | Store more content, use specific category filters |
|
|
469
|
-
| Entry not found in link/traverse | ID was from a different ChromaDB instance | Check `~/.pantheon/memory/` exists and is consistent |
|
|
470
|
-
| Export creates empty file | No entries match the session_id | Verify session_id with `memory_sessions()` |
|
|
471
|
-
| Model download fails | No internet for first-time download | Ensure network access for `all-MiniLM-L6-v2` download |
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
# Migrating Memory Bank to `.pantheon/`
|
|
2
|
-
|
|
3
|
-
> **Date:** 2026-07-11
|
|
4
|
-
> **Applies to:** Pantheon projects using `docs/memory-bank/` for project memory.
|
|
5
|
-
|
|
6
|
-
## Why `.pantheon/`?
|
|
7
|
-
|
|
8
|
-
Pantheon now standardizes all **local, generated, and ephemeral** artifacts under `.pantheon/`:
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
.pantheon/ ← Fully local (gitignored)
|
|
12
|
-
├── memory-bank/ ← Project memory (ADRs, tasks, progress, context)
|
|
13
|
-
├── deepwork/ ← Deepwork plans and checkpoints
|
|
14
|
-
├── code-mode/ ← Orchestration scripts
|
|
15
|
-
├── .tmp/ ← Ephemeral artifacts (PLAN, IMPL, REVIEW)
|
|
16
|
-
└── tasks/ ← Task system
|
|
17
|
-
|
|
18
|
-
docs/ ← Versioned user documentation only
|
|
19
|
-
├── (installation guides, architecture, platform docs)
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Benefits
|
|
23
|
-
|
|
24
|
-
| Before | After |
|
|
25
|
-
|--------|-------|
|
|
26
|
-
| Memory bank versioned in git | Memory bank local (`.gitignore`) |
|
|
27
|
-
| Cluttered `docs/` with internal + user docs | Clean `docs/` with only user-facing docs |
|
|
28
|
-
| No separation between generated/permanent | Clear split: `.pantheon/` = local, `docs/` = permanent |
|
|
29
|
-
| `.gitignore` scattered entries | Single `.pantheon/` ignore rule |
|
|
30
|
-
| Bleeding internal context into PRs | Memory stays local, only relevant code is committed |
|
|
31
|
-
|
|
32
|
-
## Migration Steps
|
|
33
|
-
|
|
34
|
-
### Step 1: Move memory bank
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
mv docs/memory-bank .pantheon/memory-bank
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Step 2: Update `.gitignore`
|
|
41
|
-
|
|
42
|
-
Add at the end of `.gitignore`:
|
|
43
|
-
|
|
44
|
-
```gitignore
|
|
45
|
-
# Pantheon local data
|
|
46
|
-
.pantheon/
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Remove any old entries that are now covered:
|
|
50
|
-
|
|
51
|
-
```gitignore
|
|
52
|
-
# Remove these lines if they exist:
|
|
53
|
-
.pantheon/deepwork/
|
|
54
|
-
docs/memory-bank/.tmp/
|
|
55
|
-
docs/memory-bank/.vectordb/
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Step 3: Remove from git tracking
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
git rm -r --cached docs/memory-bank/
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
This removes the files from tracking **without deleting them** (they're now at `.pantheon/memory-bank/`).
|
|
65
|
-
|
|
66
|
-
### Step 4: Update scripts and references
|
|
67
|
-
|
|
68
|
-
Search and replace `docs/memory-bank/` → `.pantheon/memory-bank/` across your codebase:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# Python scripts
|
|
72
|
-
sed -i 's|docs/memory-bank/|.pantheon/memory-bank/|g' scripts/**/*.py
|
|
73
|
-
|
|
74
|
-
# Shell scripts
|
|
75
|
-
sed -i 's|docs/memory-bank/|.pantheon/memory-bank/|g' scripts/**/*.sh
|
|
76
|
-
|
|
77
|
-
# Markdown docs
|
|
78
|
-
sed -i 's|docs/memory-bank/|.pantheon/memory-bank/|g' docs/*.md
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
> ⚠️ Update all: agent files, instructions, skills, commands, routing, and any config that references the old path.
|
|
82
|
-
|
|
83
|
-
### Step 5: (Optional) Purge from git history
|
|
84
|
-
|
|
85
|
-
If you want to fully remove `docs/memory-bank/` from your git history:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# Backup first!
|
|
89
|
-
git bundle create /tmp/repo-backup-$(date +%Y%m%d).bundle --all
|
|
90
|
-
|
|
91
|
-
# Remove from all commits
|
|
92
|
-
git filter-repo --path docs/memory-bank/ --invert-paths --force
|
|
93
|
-
|
|
94
|
-
# Re-add remote and force push
|
|
95
|
-
git remote add origin <your-remote-url>
|
|
96
|
-
git push origin --force --all
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
> 🚨 **Warning:** This rewrites history. Coordinate with your team. All open PRs will need to be recreated.
|
|
100
|
-
|
|
101
|
-
### Step 6: Commit
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
git add -A
|
|
105
|
-
git commit -m "refactor: move memory-bank to .pantheon/ as local data"
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Complete `.pantheon/` Structure Reference
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
.pantheon/
|
|
112
|
-
├── memory-bank/ ← Project memory (local)
|
|
113
|
-
│ ├── 00-project.md
|
|
114
|
-
│ ├── 01-active-context.md
|
|
115
|
-
│ ├── 02-progress-log.md
|
|
116
|
-
│ ├── _notes/ ← ADRs and decisions
|
|
117
|
-
│ ├── _tasks/ ← Task records
|
|
118
|
-
│ ├── _xref/ ← Cross-references
|
|
119
|
-
│ └── .vectordb/ ← ChromaDB cache (gitignored)
|
|
120
|
-
├── deepwork/ ← Deepwork plans
|
|
121
|
-
├── code-mode/ ← Orchestration scripts (versioned separately in scripts/)
|
|
122
|
-
├── .tmp/ ← Ephemeral artifacts (PLAN, IMPL, REVIEW)
|
|
123
|
-
├── learnings/ ← Session learnings
|
|
124
|
-
└── tasks/ ← Task system
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## FAQ
|
|
128
|
-
|
|
129
|
-
### Will my memory bank be lost?
|
|
130
|
-
**No.** All files are preserved — they move from `docs/memory-bank/` to `.pantheon/memory-bank/`. Nothing is deleted.
|
|
131
|
-
|
|
132
|
-
### Can I still version my memory bank?
|
|
133
|
-
If you prefer to keep it in git, keep `docs/memory-bank/` as-is. The `.pantheon/` convention is the recommended standard but not enforced.
|
|
134
|
-
|
|
135
|
-
### Does this affect platform templates?
|
|
136
|
-
**No.** Platform templates (`platform/*/`) keep `docs/memory-bank/` as reference — they are for external projects that may choose their own convention.
|
|
137
|
-
|
|
138
|
-
### What about other people on my team?
|
|
139
|
-
Since `.pantheon/` is gitignored, each developer gets their own local copy. The memory bank is not shared via git — use explicit handoffs for cross-team context.
|
package/docs/PLATFORMS.md
DELETED
package/docs/QUICKSTART.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Pantheon Quick Start
|
|
2
|
-
|
|
3
|
-
## What is Pantheon
|
|
4
|
-
|
|
5
|
-
A multi-agent framework for , OpenCode, , , , , and . 14 specialized agents with TDD enforcement, quality gates (Themis), and memory MCP. **v4.0** — 100/100 audit score.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
### Option 1: CLI (recommended, coming soon)
|
|
10
|
-
```bash
|
|
11
|
-
npx @pantheon/cli init
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### Option 2: Git clone
|
|
15
|
-
```bash
|
|
16
|
-
git clone https://github.com/ils15/pantheon.git
|
|
17
|
-
cd pantheon
|
|
18
|
-
npm run sync
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Then copy to your platform's config dir:
|
|
22
|
-
```bash
|
|
23
|
-
# OpenCode
|
|
24
|
-
cp -r .opencode/* ~/.config/opencode/
|
|
25
|
-
# Or use platform-specific scripts
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## v4.0 What's New
|
|
29
|
-
|
|
30
|
-
- **14 commands** — all `/pantheon-*` (remember, search, consolidate, forget, audit v2, cancel...)
|
|
31
|
-
- **Themis 2.0** — 3-layer review (heuristic scanner + deep review + verification planning)
|
|
32
|
-
- **Memory MCP** — agents read-only, Zeus auto-stores every result
|
|
33
|
-
- **TUI Plugin** — live deepwork status + activity feed + toast notifications
|
|
34
|
-
- **YAGNI + Anti-overengineering** — built into every agent's workflow
|
|
35
|
-
- **Background Agents** — parallel execution with `subagent_depth: 2`
|
|
36
|
-
|
|
37
|
-
## Usage
|
|
38
|
-
|
|
39
|
-
| Command | What it does |
|
|
40
|
-
|---------|-------------|
|
|
41
|
-
| `/pantheon` | Council multi-agent synthesis |
|
|
42
|
-
| `/pantheon-status` | System status & agent registry |
|
|
43
|
-
| `/pantheon-audit --light` | Code quality scan (zero LLM) |
|
|
44
|
-
| `/pantheon-deepwork` | Multi-phase task execution |
|
|
45
|
-
| `/pantheon-remember` | Store in memory |
|
|
46
|
-
| `/pantheon-search` | Search memory |
|
|
47
|
-
| `/pantheon-cancel` | Stop auto-continuation |
|
|
48
|
-
|
|
49
|
-
Full list: 14 commands — all start with `/pantheon-`.
|
package/docs/README.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Pantheon Documentation
|
|
2
|
-
|
|
3
|
-
Reference documentation for the Pantheon multi-agent framework.
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
6
|
-
|
|
7
|
-
- **[model-routing.md](reference/model-routing.md)** — Deep analysis of model assignments per plan with per-plan fallback chains, cost optimization, and benchmark data (LMSYS Arena, SWE-bench, Artificial Analysis). Covers all 14 agents and 24 unique models.
|
|
8
|
-
|
|
9
|
-
## Structure
|
|
10
|
-
|
|
11
|
-
| File | Purpose |
|
|
12
|
-
|------|---------|
|
|
13
|
-
| `reference/` | Framework reference docs (benchmark data, model analysis, architecture) |
|
|
14
|
-
| `memory-bank/` | Project-specific context — **not tracked in git** (initialized by adopters) |
|
|
15
|
-
|
|
16
|
-
## Note
|
|
17
|
-
|
|
18
|
-
The `docs/memory-bank/` directory is **not tracked in git**. It exists as a template structure for projects that adopt Pantheon. Each project initializes its own memory bank with project-specific context.
|