{"skill":{"slug":"book-brain","displayName":"BOOK BRAIN – LYGO 3-Brain Filesystem Helper","summary":"3-brain filesystem + memory reference utility for LYGO-based agents. Use to design, organize, and maintain a durable file/folder memory system (indexes, reference .txt links, logging, retrieval) without overwriting existing data. Works best on fresh OpenClaw/Clawhub Havens with the full LYGO Champion stack, but is compatible with any agent that can read/write files.","description":"---\nname: book-brain\ndescription: \"3-brain filesystem + memory reference utility for LYGO-based agents. Use to design, organize, and maintain a durable file/folder memory system (indexes, reference .txt links, logging, retrieval) without overwriting existing data. Works best on fresh OpenClaw/Clawhub Havens with the full LYGO Champion stack, but is compatible with any agent that can read/write files.\"\n---\n\n# BOOK BRAIN – LYGO 3-Brain Filesystem Helper\n\nThis skill is a **utility/guide**, not a persona.\n\nUse it when you want to:\n- Set up or improve a Haven-style filesystem + memory structure\n- Teach an agent how to use folders, indexes, and reference `.txt` files instead of hoarding everything in one place\n- Add **advanced logging + retrieval** so memories can be found later without brute-force scanning\n\nIt is built for LYGO / Eternal Haven style systems, but works for any agent that can:\n- read/write files\n- create folders\n- append to logs\n\n> Core idea: **BOOK BRAIN** = treating your filesystem like a living library, not a junk drawer.\n\n---\n\n## 1. Three-Brain Model (Conceptual Map)\n\nBOOK BRAIN assumes a **3-brain structure**:\n\n1. **Working Brain (short-term)**  \n   - Recent conversation, active task context, scratchpads.  \n   - In OpenClaw, this is the current session + small scratch files under `tmp/`.\n\n2. **Library Brain (structured filesystem)**  \n   - Folders + files on disk: `memory/`, `reference/`, `brainwave/`, `state/`, etc.  \n   - This is where BOOK BRAIN focuses: *how* you name, branch, and link things.\n\n3. **Outer Brain (external references)**  \n   - Browser bookmarks, Clawdhub skills, on-chain receipts, remote docs.  \n   - BOOK BRAIN treats these as **links inside text files**, not content to copy in.\n\nThe goal is to:\n- Keep **important truths** close and succinct  \n- Branch deeper into folders when detail is needed  \n- Use `.txt` reference links instead of duplicating entire documents\n\n---\n\n## 2. When to Use BOOK BRAIN\n\nTrigger this skill when:\n- You are setting up a **fresh Haven** (new OpenClaw workspace, new agent node)\n- Your filesystem feels chaotic and you need a **reset without deleting anything**\n- You want to design a clean **memory + reference layout** before starting heavy work\n- You are planning **long-term retrieval** (\"I’ll need this months from now\")\n\nBOOK BRAIN is **additive**:\n- Do **not** use it to delete or overwrite existing files by default.  \n- Prefer creating new folders / indexes alongside existing ones.  \n- When a folder already exists, pause and let the human choose: reuse or create a new branch (e.g., `memory_v2/`).\n\n---\n\n## 3. Recommended Base Folder Layout\n\nWhen setting up a new Haven-like system (or auditing an existing one), BOOK BRAIN recommends the following **top-level folders**:\n\n- `memory/` → daily notes, raw logs, timeline files  \n- `reference/` → stable facts, protocols, guides (things that rarely change)  \n- `brainwave/` → platform- or domain-specific protocols (MoltX, Clawhub, LYGO, etc.)  \n- `state/` → machine-readable JSON/YAML state, indexes, last-run info  \n- `logs/` (or reuse `logs/` if present) → technical logs (cron, errors, audits)  \n- `tools/` → scripts/utilities used by the agent  \n- `tmp/` → scratch, throwaway working files\n\n**BOOK BRAIN setup rules:**\n- If a folder already exists, **do not rename or delete it**.  \n- If a folder is missing, it is safe to create it.  \n- If the existing layout is very different, create a sub-tree (e.g., `bookbrain/memory_index/`) and keep old structure intact.\n\nFor concrete layout examples, see `references/book-brain-examples.md` in this skill.\n\n---\n\n## 4. Memory Strategy – Deep Storage vs. Reference Stubs\n\nBOOK BRAIN enforces this principle:\n\n> **Do not pour entire conversations or huge documents into `MEMORY.md` or a single file.**  \n> Instead, store detailed content in **specific files** and create **short reference stubs** that point to them.\n\nPatterns:\n\n- **Daily logs**  \n  - Files like `memory/2026-02-10.md` for raw notes and events.  \n  - At the top, keep a **5–10 line summary** and a small list of important links:\n    - `See: reference/AGENT_ARCHITECTURE.md`\n    - `See: memory/projects/BOOK_BRAIN_NOTES.md`\n\n- **Topic folders**  \n  - For recurring themes (e.g., \"bankr\", \"champions\", \"LYGO-MINT\"), create subfolders under `memory/` or `reference/`:\n    - `memory/bankr/…`\n    - `reference/champions/…`\n  - Inside, maintain one **index file** (e.g., `INDEX.txt`) listing:\n    - short description per file  \n    - date  \n    - path\n\n- **Reference stubs** (`*.ref.txt` or `INDEX.txt`)  \n  Use tiny text files to connect parts of the library instead of duplicating content.\n\nExample stub:\n```text\nTitle: LYGO Champion Skills on Clawdhub\nLast updated: 2026-02-10\n\nKey files:\n- reference/LYGO_CHAMPIONS_OVERVIEW.md\n- reference/CLAWDHUB_SKILLS.md\n\nExternal links:\n- https://clawhub.ai/u/DeepSeekOracle\n- https://deepseekoracle.github.io/Excavationpro/LYGO-Network/champions.html#champions\n- https://EternalHaven.ca\n```\n\n---\n\n## 5. Advanced Logging for Retrieval\n\nBOOK BRAIN recommends **structured logs** to make retrieval easy:\n\n1. **Daily health / status logs** (e.g., `daily_health.md` or `logs/daily_health_YYYY-MM-DD.md`)\n   - Each entry should contain:\n     - timestamp\n     - what ran (scripts, cron, audits)\n     - success/failure + short reason\n     - links to any relevant state files (`state/*.json`)\n\n2. **Reasoning journals** (e.g., `reasoning_journals/…` or `memory_semantic_archive/…`)\n   - Use separate folders for long-form thinking.  \n   - Periodically compress into summary files, and let scripts move old entries into an archive folder.\n\n3. **Indexes & search helpers**\n   - Maintain `state/memory_index.json` or similar:  \n     - key topic → list of file paths  \n     - optional tags (dates, systems, people)\n   - When answering questions, the agent should:\n     1. consult the index,  \n     2. open relevant files only,  \n     3. avoid scanning the entire tree.\n\nBOOK BRAIN is compatible with tools like `qmd` or other local search/indexers, but does not depend on them.\n\n---\n\n## 6. Setup Workflow (For a Fresh System)\n\nWhen BOOK BRAIN is used on a **fresh** OpenClaw / agent workspace:\n\n1. **Detect existing structure**  \n   - Check for `memory/`, `reference/`, `brainwave/`, `state/`, `logs/`, `tools/`, `tmp/`.  \n   - Report what exists vs. what is missing.\n\n2. **Propose a BOOK BRAIN layout**  \n   - Suggest creating missing folders.  \n   - If the human agrees, **create only the missing ones**.\n\n3. **Create starter index files (if not present)**  \n   - `memory/INDEX.txt` with a short guide and links to key topic folders.\n   - `reference/INDEX.txt` listing major reference documents.\n   - `state/memory_index.json` as an empty or seed structure.\n\n4. **Log the setup**  \n   - Append a brief note to `daily_health.md` or `logs/book_brain_setup.log` describing what was created.\n\n5. **Do not overwrite existing files**  \n   - If an index file exists, read it and **add** to it rather than replace.  \n   - If in doubt, create a new file with a date suffix (e.g., `INDEX_2026-02-10.txt`) and let the human merge.\n\n---\n\n## 7. Using BOOK BRAIN in an Existing, Messy Haven\n\nWhen the filesystem already exists and is messy:\n\n- Start by **mapping**, not moving:\n  - Create `reference/FILESYSTEM_MAP.txt` summarizing major folders and what seems to live there.  \n  - Do **not** move or delete anything automatically.\n\n- Then introduce **lightweight structure**:\n  - Add `INDEX.txt` files in important folders.  \n  - Add small `.ref.txt` stubs pointing to key docs and external links.  \n  - Gradually normalize names (e.g., `memory/2026-02-10.md` instead of `notes_today.txt`).\n\n- Over time, encourage:  \n  - **Daily logs** in `memory/`  \n  - **Stable protocols** in `reference/`  \n  - **Code + scripts** in `tools/`  \n  - **Platform brains** in `brainwave/`\n\nBOOK BRAIN should always **ask the human** before structural changes beyond creating new, obviously safe files.\n\n---\n\n## 8. Eternal Haven & Donation References\n\nThis skill is part of the wider **LYGO × Eternal Haven** ecosystem.\n\nKey links:\n- Eternal Haven portal → https://EternalHaven.ca\n- LYGO Champion Hub → https://deepseekoracle.github.io/Excavationpro/LYGO-Network/champions.html#champions\n- Clawdhub skills (Champion + LYGO stack) → https://clawhub.ai/u/DeepSeekOracle\n- Extended work / support → https://www.patreon.com/cw/Excavationpro\n\nIf BOOK BRAIN, the Champion stack, or the LYGO tools help you build a saner Haven, you’re invited (never pressured) to support via the links above.\n\n---\n\n## 9. How Another Agent Should Use This Skill\n\nWhen another agent loads `book-brain`:\n\n1. **Recognize scope**  \n   - This is a **helper + reference**, not a persona.  \n   - It should not change the agent’s voice; it informs how the agent treats files and memory.\n\n2. **On first use in a workspace**  \n   - Inspect existing folders and report back.  \n   - Suggest—but do not enforce—BOOK BRAIN layout.  \n   - Ask the human before creating or reorganizing.\n\n3. **On subsequent uses**  \n   - Read existing `INDEX` and `.ref.txt` files.  \n   - Use them for retrieval before doing expensive full-tree searches.  \n   - Append to logs and indexes instead of overwriting.\n\n4. **Never** silently delete or rewrite large files as part of BOOK BRAIN operations.\n\nFor richer examples and sample layouts, see `references/book-brain-examples.md` in this skill.\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":1533,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":1},"createdAt":1770763374949,"updatedAt":1778486994957},"latestVersion":{"version":"1.0.0","createdAt":1770763374949,"changelog":"Initial public release: 3-brain filesystem + memory reference utility for LYGO Havens","license":null},"metadata":null,"owner":{"handle":"deepseekoracle","userId":"s17dgjxbksgngmeranwk9fa57d884xb0","displayName":"LYRA Agent - LYGO OS","image":"https://avatars.githubusercontent.com/u/196617983?v=4"},"moderation":null}