dream
Skill5 starsChanged 6 months agoApache-2.0View on GitHub
Auto-dream protocol: 4-phase MemPalace maintenance cycle (orient, gather, consolidate, prune) over drawers + FTS + KG + diary
44 other projects use a version of this.
Adopted by
Most recently taken up by
- lbussell/agent-skillstheir own version, first seen Nov 16, 2026
- Jewgah/claude-code-skillstheir own version, first seen Nov 16, 2026
- borkweb/skillstheir own version, first seen Nov 15, 2026
- srinator22/agent-kerneltheir own version, first seen Nov 15, 2026
- fjwood69/moritheir own version, first seen Nov 10, 2026
- srinator22/New-Projecttheir own version, first seen Nov 8, 2026
Used with
Projects with it also use ingest, start and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JaimeGBASkillingest
Digest an external source (article, paper, transcript, URL, book chapter) and integrate its content into the knowledge base
Also in 4 projects that use this
AnthropicSkillstart
Set up your bio-research environment and explore available tools. Use when first getting oriented with the plugin, checking which literature, drug-discovery, or visualization MCP servers are connected, or surveying available analysis skills before starting a new project.
Also in 4 projects that use this
genomewalkerSkillresume
Resume a thread by loading its ~800-token context capsule
Also in 3 projects that use this
MicrosoftSkillinit
Also in 4 projects that use this
MicrosoftSkillcouncil
Convene the persona panel — six orthogonal review lenses — on a target. Cold independent fan-out, debate-to-consensus, synthesized verdict with recorded dissent and a roster manifest.
Also in 4 projects that use this
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 3 projects that use this
Other versions44 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 44
- Noizefield/audio-plugin-coder★ 334same name
- grandamenium/dream-skill★ 136same name
- sneg55/agent-starter★ 76same name
- oprogramadorreal/optimus-claude★ 75same name
- tranhieutt/software_development_department★ 71same name
- Melvynx/ai-maxxing-skills★ 46same name
- maxvaega/awesome-skills★ 40same name
- seldonframe/seldonframe★ 40same name
- hyperb1iss/hyperskills★ 36same name
- fjwood69/mori★ 32same name
34 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- db-healthSkill
- forum-pulseSkill
- genesisSkill
- grill-meSkill
- handoffSkill
- hireSkill
- inbox-processSkill
- kaizenSkill
- quality-gateSkill
- quarterly-reviewSkill
- session-endSkill
- session-startSkill
- sync-upstreamSkill
- twin-updateSkill
- voice-gateSkill
- weekly-reviewSkill
- write-a-skillSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 43 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
Decision gate: if everything is green (indexes in sync, FTS ok, integrity ok, no anomalies in status), skip to Phase 4.
- Very specific: line 117
After any UPDATE on drawers, the drawers_fts_au trigger keeps the FTS index current.
- Very specific: line 132
Never propose for pruning: the owner wing, the identity and preferences rooms, hall_preferences, or any content tied to an active project.
- Distinctive: line 137
Delete the corresponding vector rows for every deleted drawer (no trigger does this)
- Distinctive: line 177
If everything is green: "MemPalace healthy, dream cycle complete."
“Common” is measured: kept by at least 6 in 10 of the 43 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Auto-Dream Protocol
Delegate to your Knowledge Architect. Four phases, all mandatory.
Substrate: MemPalace in Database/team.db — drawers (content), drawers_fts
(FTS5 external-content index), kg_entities / kg_triples (knowledge graph),
diary_entries. If you run a vector index alongside, it is part of the substrate
too and every consistency check below applies to it as well.
SQL access: the sqlite3 CLI does not load the vector extension. For anything
touching the vector table, use Python with apsw plus sqlite_vec.load(db) — the
same pattern as scripts/palace.py::connect(). PRAGMAs on every connection:
foreign_keys=ON, journal_mode=WAL, busy_timeout=5000.
Golden rule: no destructive action without sign-off
The dream cycle NEVER deletes, merges or archives drawers, triples or diary
entries on its own initiative. Phases 1 and 2 are read-only. Phase 3 performs
only additive or corrective non-destructive writes (room/hall reclassification,
tier moves via memory_tiers.py). Phase 4 produces a LIST of candidates and takes
it to the user for approval. Deletions execute only after an explicit OK, and
always with a fresh backup of team.db first — taken with VACUUM INTO, never
by copying the file while WAL mode is on.
A maintenance job with delete permission and no human in the loop is one bad heuristic away from erasing the memory it exists to protect.
Phase 1 — ORIENT
General state:
python3 scripts/palace.py status # counts by wing/room/tier
python3 scripts/palace.py kg-stats # KG health (staleness, orphans)
python3 scripts/memory_tiers.py --report # hot/warm/cold distribution (non-destructive)Structural consistency:
-- 1a. FTS5 integrity (external-content index; errors out if it has drifted)
INSERT INTO drawers_fts(drawers_fts, rank) VALUES('integrity-check', 1);
-- 1b. Index population vs source rows (should match)
SELECT (SELECT COUNT(*) FROM drawers_fts) AS fts_rows,
(SELECT COUNT(*) FROM drawers) AS drawer_rows;
-- 1c. File integrity
PRAGMA integrity_check;Decision gate: if everything is green (indexes in sync, FTS ok, integrity ok, no anomalies in status), skip to Phase 4.
FTS note: the drawers_fts_ad (AFTER DELETE) trigger does not reliably clean
an external-content index. After any deletion from drawers, always run
INSERT INTO drawers_fts(drawers_fts) VALUES('rebuild');. A vector table has no
trigger at all — its rows must be deleted by hand.
Phase 2 — GATHER SIGNAL
-- 2a. Drawers added since the last dream
SELECT id, wing, room, hall, substr(content,1,80)
FROM drawers
WHERE filed_at > COALESCE(
(SELECT MAX(occurred_at) FROM activity_history WHERE action = 'auto_dream_completed'),
'2000-01-01')
ORDER BY filed_at DESC;
-- 2b. Catch-alls and rooms outside the taxonomy (see the room table in CLAUDE.md)
SELECT room, COUNT(*) FROM drawers
WHERE room NOT IN ('identity','decisions','architecture','research','reference',
'protocols','content','configuration','code','cases','reports','operations',
'preferences','archive')
GROUP BY room;
-- 2c. Halls outside the taxonomy
SELECT hall, COUNT(*) FROM drawers
WHERE hall NOT IN ('hall_facts','hall_events','hall_discoveries','hall_preferences','hall_advice')
GROUP BY hall;
-- 2d. Exact full-field duplicates
SELECT content, wing, room, hall, COUNT(*) n, GROUP_CONCAT(id) ids
FROM drawers GROUP BY content, wing, room, hall HAVING COUNT(*) > 1;
-- 2e. Cross-wing duplicates — could be an intentional tunnel OR double ingestion.
-- Check source_file before concluding anything.
SELECT content, COUNT(DISTINCT wing) wings, GROUP_CONCAT(id) ids
FROM drawers GROUP BY content HAVING COUNT(DISTINCT wing) > 1;Supporting signal:
python3 scripts/palace.py diary-read "<orchestrator>" --last 10 # recurring patterns
python3 scripts/palace.py kg-stats # triples due for invalidationPhase 3 — CONSOLIDATE (non-destructive writes only)
- Reclassify drawers sitting in out-of-taxonomy rooms/halls into the correct semantic room and hall (UPDATE, never DELETE).
- Promote or demote tiers via
scripts/memory_tiers.py --execute. It respects the structural rules:identity/preferences/protocols/configurationrooms, thehall_preferenceshall and the owner wing stay hot;reference/architecture/cases/codestay warm even when old. - KG:
palace.py kg-addfor newly detected facts,palace.py kg-invalidatefor relationships that no longer hold. Invalidation is soft, so it is safe here. - After any UPDATE on
drawers, thedrawers_fts_autrigger keeps the FTS index current. An embedding does NOT update itself — if the content changed, re-embed it, the same waypalace.py adddoes.
Phase 4 — PRUNE (propose, do not execute)
Compile the candidate list and put it to the user for sign-off:
| Candidate | Criterion |
| Exact full-field duplicates (2d) | Keep MIN(id), propose deleting the rest |
| Cross-wing duplicates from double ingestion (2e) | Pick the canonical wing per content type; propose only where source_file proves double ingestion; leave ambiguous ones alone |
Drawers in archive for more than 90 days with no hits | Propose deletion or export to a file |
| Invalid or contradictory KG triples | Propose kg-invalidate |
Never propose for pruning: the owner wing, the identity and preferences rooms,
hall_preferences, or any content tied to an active project.
After approved deletions execute (mandatory checklist):
- Delete the corresponding vector rows for every deleted drawer (no trigger does this)
INSERT INTO drawers_fts(drawers_fts) VALUES('rebuild');INSERT INTO drawers_fts(drawers_fts, rank) VALUES('integrity-check', 1);PRAGMA integrity_check;- A test
palace.py search(hybrid and keyword) to confirm retrieval still works
Step 5 is the one people skip. The first four confirm the database is structurally fine; only the fifth confirms the thing the database exists to do still works.
Logging (MANDATORY)
INSERT INTO activity_history (actor_id, action, entity_type, summary, metadata, occurred_at)
VALUES (
(SELECT id FROM team_members WHERE name = '<knowledge architect>'),
'auto_dream_completed', 'drawers',
'Auto-dream cycle: X drawers reviewed, Y reclassified, Z prune candidates proposed',
json_object('drawers_total', ?, 'reclassified', ?, 'prune_candidates', ?,
'kg_triples_flagged', ?, 'fts_ok', ?, 'vec_synced', ?),
strftime('%Y-%m-%dT%H:%M:%SZ', 'now')
);Plus a diary entry:
palace.py diary-write "<agent>" "SESSION:YYYY-MM-DD|dream.cycle|..." --topic "dream".
Health check (MANDATORY after logging)
python3 scripts/palace.py status
python3 scripts/memory_tiers.py --reportReport to the user ONLY if a threshold was breached:
- Exact duplicates > 0
- Indexes out of sync, or the FTS integrity check failed
- More than 20 drawers in out-of-taxonomy rooms/halls
- Prune candidates awaiting sign-off
If everything is green: "MemPalace healthy, dream cycle complete."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

