[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75BBD8TGPWH4MST3Y0KKQH1":3,"skill-same:01M75BBD8TGPWH4MST3Y0KKQH1":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":14,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M75BBD8TGPWH4MST3Y0KKQH1","second-brain-operations",null,"Step-by-step playbook for setting up and operating a PARA-first Second Brain with Hermes — vault creation, semantic search engine, pull\u002Fpush skills, health-check cron, weekly review, and operational rhythm.","fmercurio\u002Fclawdia-custom-skills","fmercurio","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15571697?v=4","01M75B9TGVV3RPB40SY7AT0VNH","Felippe Mercurio","01M75B9THMAWYGFT755CR1PT9A",1,"MIT","https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Fskills\u002Fnote-taking\u002Fsecond-brain-operations\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: second-brain-operations\ndescription: Step-by-step playbook for setting up and operating a PARA-first Second Brain with Hermes — vault creation, semantic search engine, pull\u002Fpush skills, health-check cron, weekly review, and operational rhythm.\nversion: 1.1.0\nauthor: Hermes Agent\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [second-brain, para, obsidian, hermes, operations, playbook]\n    related_skills: [second-brain-knowledge-architecture, pull-brain, push-brain, brain-search]\n---\n\n# Second Brain Operations\n\n## Overview\n\nImplementation playbook for building and operating a PARA-first Second Brain with Hermes as the operator.\n\nUse this skill when the user wants to:\n- Set up a new second brain from scratch;\n- Understand the proven vault structure and conventions;\n- Create brain-search, pull-brain, and push-brain skills;\n- Configure health-check automation;\n- Run the weekly review ritual;\n- Understand the operational rhythm of a live second brain.\n\nFor architecture\u002Fdesign questions (layers, sensitivity routing, multi-agent, fractal patterns), use `second-brain-knowledge-architecture` instead.\n\n## What We Proven\n\nThis playbook encodes lessons from the real FMercurio Tech deployment:\n- Vault: Markdown + Git + Obsidian\n- Operator: Hermes Agent via Telegram\n- Method: PARA + CODE (Tiago Forte)\n- Health-check: deterministic script, cron, silent-when-healthy\n- Search: FTS5 + semantic embeddings (brain_search.py) for concept-level retrieval\n- Skills: `brain-search`, `pull-brain`, and `push-brain` as Hermes local skills\n- Git-backed: vault commits + pushes to GitHub remote; index rebuild after each push\n- Separation: vault (durable knowledge) ≠ runtime (Hermes) ≠ backups\n\n## How to Use This Skill\n\n### Setup (one-time)\n\nThe client invokes this skill to start a new second brain:\n\n```\n\u002Fsecond-brain-operations\n```\n\nOr in natural language: \"quero montar um segundo cérebro\", \"setup second brain\", \"criar vault PARA\".\n\nThe agent then follows Phases 1–10 in order, asking the client questions at each phase and implementing as it goes. The client does not need to know Git, Python, YAML, or Hermes internals — the agent handles everything.\n\n**What the client provides:**\n- Purpose and scope of the vault\n- Owner name\n- Sensitivity preferences\n- Whether Hermes will be the operator\n\n**What the agent creates:**\n- Vault with PARA structure + root files\n- Health-check script\n- Brain search engine (FTS5 + optional semantic embeddings)\n- `brain-search`, `pull-brain`, and `push-brain` skills\n- Cron configuration for automated auditing\n\n**What the client receives as commands:**\n- `\u002Fbrain-search` — search the vault by keyword or concept\n- `\u002Fpull-brain` — load context from the vault\n- `\u002Fpush-brain` — save session output to the vault\n\n### Ongoing use\n\nAfter setup, the client uses `\u002Fbrain-search`, `\u002Fpull-brain`, and `\u002Fpush-brain` naturally in their sessions. The agent follows the rituals automatically when these commands are invoked.\n\n## Phase 1: Project Charter\n\nBefore creating files, define:\n\n1. **Purpose** — Why does this brain exist?\n2. **Scope** — Personal? Company? Client? Which domains?\n3. **Owner** — Who is responsible?\n4. **Sensitivity model** — What's public, internal, restricted?\n5. **Operator** — Hermes? Human-only? Both?\n6. **Interface** — Telegram? Obsidian? CLI?\n\nWrite a one-paragraph charter and keep it in `README.md`.\n\n## Phase 2: Vault Creation\n\n### Directory structure\n\n```text\nvault-name\u002F\n├── 00_Inbox\u002F            — raw capture, 30-day max\n├── 10_Projects\u002F         — active efforts with outcome + deadline\n├── 20_Areas\u002F            — ongoing responsibilities\n├── 30_Resources\u002F        — distilled reusable knowledge\n├── 40_Archives\u002F         — inactive\u002Fconcluded\u002Fsuperseded\n├── 50_Templates\u002F        — starter files for each note type\n├── _Hermes\u002F             — bridge docs (NOT runtime copies)\n├── _Meta\u002F               — vault governance + decision log\n├── scripts\u002F             — deterministic utilities\n├── MAPA.md              — root map\n├── PARA.md              — routing rules + frontmatter spec\n├── HERMES.md            — how Hermes reads\u002Fwrites this vault\n├── README.md            — human-facing overview\n└── .gitignore           — exclude .env, secrets, .obsidian\u002F, backups\n```\n\n### Frontmatter PARA contract\n\nEvery canonical note must declare:\n\n```yaml\n---\npara: project          # project | area | resource | archive\nscope: personal        # personal | company | client | product | hermes | leadership\nstatus: active         # inbox | active | waiting | paused | complete | archived | distilled\nsensitivity: internal  # public | internal | restricted\nowner: \u003Cname>\ncreated: YYYY-MM-DD\nupdated: YYYY-MM-DD\nreview: weekly         # weekly | monthly | quarterly | ad-hoc\nrelated: []\n---\n```\n\nRoot files and changelog are exempt.\n\n### Templates\n\nCreate starter templates in `50_Templates\u002F` for: project, area, resource, decision, playbook, client-partner, bridge-note. Each with correct frontmatter pre-filled.\n\n### Git init + Obsidian\n\n```bash\ngit init && git add . && git commit -m \"Initial vault structure\"\nopen -a Obsidian \u002Fpath\u002Fto\u002Fvault\n```\n\nAdd `.obsidian\u002F` and `.brain-index\u002F` to `.gitignore`.\n\n## Phase 3: Health-Check Script\n\n### What to audit\n\n1. Frontmatter compliance — canonical notes with valid `para:`\n2. Project staleness — active projects without `updated:` in 14 days\n3. Inbox staleness — items older than 30 days\n4. Runtime contamination — `.env`, `config.yaml` inside vault\n5. Sensitivity routing — `sensitivity: restricted` notes outside restricted areas\n6. Overall compliance %\n\n### Design decisions\n\n- **Script-first** — deterministic, zero LLM cost\n- **Silent when healthy** — empty stdout; non-empty only for issues\n- **Wrapper in profile** — cron resolves scripts relative to profile dir\n\n### Wrapper pattern\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\nimport subprocess, sys\nVAULT = \"\u002Fpath\u002Fto\u002Fvault\"\nresult = subprocess.run(\n    [sys.executable, f\"{VAULT}\u002Fscripts\u002Fbrain-health-check.py\"],\n    capture_output=True, text=True, cwd=VAULT\n)\nif result.returncode != 0:\n    print(result.stdout); print(result.stderr, file=sys.stderr); sys.exit(result.returncode)\noutput = result.stdout.strip()\nif output and \"saudável\" not in output.lower() and \"healthy\" not in output.lower():\n    print(output)\n```\n\n## Phase 4: Brain Search Engine\n\nA FTS5 + optional semantic search engine that enables concept-level retrieval across the vault. This is the backbone that makes `pull-brain` effective beyond keyword grep.\n\n### What it does\n\n1. **Chunking** — Markdown files split by headings (##\u002F###). Oversized sections split by paragraphs. Each chunk keeps heading context.\n2. **FTS5** — Full-text search with unicode61 tokenizer (handles accented characters). Keyword matching with relevance ranking.\n3. **Embeddings** (optional) — Uses a local embedding model (e.g. `nomic-embed-text-v1.5` via LM Studio\u002FOllama) for semantic similarity. Stores float32 vectors in SQLite. Cosine similarity for concept matching.\n4. **Combined search** — FTS results first, then unique vector results not already found by FTS. Deduplication by path+heading.\n5. **PARA awareness** — Each chunk tagged with its layer (project\u002Farea\u002Fresource\u002Farchive) from path detection and frontmatter.\n\n### Script: brain_search.py\n\nCreate `\u003Cvault>\u002Fscripts\u002Fbrain_search.py`. Core operations:\n\n```bash\n# Rebuild full index (FTS only — \u003C1s)\npython3 scripts\u002Fbrain_search.py --rebuild --json\n\n# Rebuild with semantic embeddings (~17s for ~75 files)\nBRAIN_EMBED_MODEL=\"text-embedding-nomic-embed-text-v1.5\" \\\n  python3 scripts\u002Fbrain_search.py --rebuild --embeddings --json\n\n# Keyword search\npython3 scripts\u002Fbrain_search.py --query \"termos de busca\" --limit 8 --json\n\n# Semantic search (concept-level)\nBRAIN_EMBED_MODEL=\"text-embedding-nomic-embed-text-v1.5\" \\\n  python3 scripts\u002Fbrain_search.py --query \"conceito ou pergunta\" --vector --limit 8 --json\n\n# Update a single file (incremental)\npython3 scripts\u002Fbrain_search.py --update \"10_Projects\u002Fmy-project\u002FProjeto.md\" --json\n\n# Stats\npython3 scripts\u002Fbrain_search.py --stats --json\n```\n\n### Design decisions\n\n- **FTS is always available** — embeddings require a running local model server; FTS works standalone\n- **Graceful degradation** — if LM Studio\u002FOllama is down, search falls back to FTS-only automatically\n- **Index is cache, not source** — `.brain-index\u002F` directory is gitignored and can be rebuilt anytime\n- **Rebuild is cheap** — FTS-only \u003C1s; with embeddings ~17s for ~75 files\n\n### Skill: brain-search\n\nCreate `~\u002F.hermes\u002Fskills\u002Fnote-taking\u002Fbrain-search\u002FSKILL.md` with:\n- Triggers: \"search brain\", \"buscar no cérebro\", \"o que temos sobre X?\"\n- Commands: rebuild, search (FTS), search (semantic), update single file, stats\n- Integration notes for pull-brain and push-brain\n- Pitfalls: model must be running for embeddings; threshold guidance (below ~0.60 = noise)\n\n### Embedding model setup\n\nRequires a local embedding server. Tested with:\n- **LM Studio** — load `nomic-embed-text-v1.5`, default endpoint `http:\u002F\u002F127.0.0.1:1234\u002Fv1\u002Fembeddings`\n- **Ollama** — `ollama pull nomic-embed-text`, endpoint `http:\u002F\u002F127.0.0.1:11434\u002Fv1\u002Fembeddings`\n\nThe `BRAIN_EMBED_MODEL` env var overrides the model name. If no server is running, FTS-only search is always available.\n\n## Phase 5: Pull-Brain Skill\n\nCreate `~\u002F.hermes\u002Fskills\u002Fnote-taking\u002Fpull-brain\u002FSKILL.md`.\n\n### Retrieval order (PARA)\n\n1. Project → 2. Area → 3. Resource → 4. Archive → 5. Brain Search → 6. Inbox\u002Fsession_search\n\n### Brain-search integration\n\nWhen searching the vault, prefer `brain_search.py` over raw grep:\n\n```bash\nBRAIN_EMBED_MODEL=\"text-embedding-nomic-embed-text-v1.5\" \\\n  python3 \u002Fpath\u002Fto\u002Fvault\u002Fscripts\u002Fbrain_search.py \\\n  --query \"termo ou conceito\" --vector --limit 8 --json\n```\n\nBenefits over grep:\n- Concept-level matching (semantic) finds notes without exact keyword match\n- Relevance ranking (FTS rank + cosine similarity)\n- Chunk-level results instead of file-level (more precise context)\n- PARA layer tagging in results\n\n### Key sections\n\n- Triggers and aliases\n- Source of truth (vault path + key files)\n- Workflow (scope → root → brain-search → read → fallback to session_search)\n- Return format (consolidated \u002F session recall \u002F assumptions \u002F gaps)\n- Sensitivity routing\n- Pitfalls (memory over vault, resources before projects, mixing layers)\n\n## Phase 6: Push-Brain Skill\n\nCreate `~\u002F.hermes\u002Fskills\u002Fnote-taking\u002Fpush-brain\u002FSKILL.md`.\n\n### Classification\n\n| Deliverable in progress? | → Project |\n| Ongoing standard? | → Area |\n| Reusable knowledge? | → Resource |\n| Inactive? | → Archive |\n| Raw\u002Funcertain? | → Inbox |\n| Governance decision? | → _Meta\u002Fdecisoes\u002F |\n| Runtime knowledge? | → _Hermes\u002F bridge |\n| Secrets? | → NEVER |\n\n### Workflow\n\n1. Read current state → 2. Choose destination → 3. Obtain explicit write confirmation → 4. Write concisely → 5. Health-check. Treat commit, push, and index rebuild as separate authorization gates.\n\n### Git push to remote\n\nCommit is distinct from writing, and push is distinct from commit. Push only after explicit confirmation to publish remotely:\n\n```bash\ncd \u002Fpath\u002Fto\u002Fvault\ngit push origin HEAD\n```\n\nRun `pull-brain` first if the push updates shared state (projects, areas, decisions) that may have changed since the last session.\n\n### Rebuild search index\n\nAfter pushing, rebuild the brain-search index so FTS5 + embeddings stay current:\n\n```bash\ncd \u002Fpath\u002Fto\u002Fvault\npython3 scripts\u002Fbrain_search.py --rebuild --json\n# Or with embeddings if local model is running:\nBRAIN_EMBED_MODEL=\"text-embedding-nomic-embed-text-v1.5\" \\\n  python3 scripts\u002Fbrain_search.py --rebuild --embeddings --json\n```\n\n### URL archiving (optional quick-archive)\n\nA bare URL is not authorization to fetch, archive, write, commit, or push. Ask what operation is wanted before mutating the vault or contacting the URL.\n\nArchive note structure:\n- Source URL and fetch date\n- Title, author, publication date\n- Key points extracted (3-7 bullets)\n- Tags \u002F PARA classification\n- Full content or summary depending on length\n\n### Key sections\n\n- Triggers and aliases\n- Classification table\n- PARA destinations\n- Sensitivity routing\n- Output format (paths, health-check, commit hash, push result, index status, next step)\n- Pitfalls (chat dumps, duplicates, forgetting health-check, skipping push)\n\n## Phase 7: Cron Configuration\n\n```yaml\nschedule: \"0 9 * * 1\"\nscript: \u003Cwrapper-name>.py\nno_agent: true\ndeliver: origin\nprofile: \u003Cprofile-name>\nworkdir: \u002Fpath\u002Fto\u002Fvault\n```\n\n### Critical pitfall\n\n`script:` resolves relative to **profile's** `scripts\u002F` directory. Put wrapper in `~\u002F.hermes\u002Fprofiles\u002F\u003Cprofile>\u002Fscripts\u002F`, not in vault or global scripts.\n\n### Test sequence\n\n1. Test wrapper directly (exit 0, empty stdout when healthy)\n2. Create cron\n3. Trigger once with `cronjob(action='run')`\n4. Verify `last_status: ok`\n\n## Phase 8: Weekly Review\n\n### Checklist\n\n1. Projects — still active? stalled? archive?\n2. Areas — context current? decisions\u002Flessons to add?\n3. Resources — distill, update, or archive?\n4. Inbox — promote, archive, or discard (items > 30 days)\n5. Decisions — reflected in area\u002Fproject files?\n6. Gaps — what's missing?\n7. Health-check — manual run\n8. Brain search index — rebuild after review changes\n9. Git — commit and push all\n\n### Output\n\nSave to `_Meta\u002Frevisoes-semanais\u002FYYYY-MM-DD.md`:\n- Executive summary\n- Projects\u002Fareas reviewed\n- Inbox processed\n- Decisions made\n- Gaps identified\n- Next priorities\n\n## Phase 9: Operational Rhythm\n\n| Cadence | Actions |\n|---------|---------|\n| Daily | Capture to inbox; push-brain after meaningful sessions |\n| Weekly | Health-check cron + manual review + inbox processing |\n| Monthly | Review areas; archive inactive; update contexts |\n| Quarterly | Review structure; consider splitting vaults |\n\n## Phase 10: Client Offering\n\n### Deliverables\n\n1. Vault template (PARA folders + templates)\n2. Health-check script (drop-in)\n3. Brain search engine (drop-in)\n4. Setup guide (this skill as reference)\n5. Training session (search\u002Fpull\u002Fpush walkthrough)\n6. Optional: Hermes operator (skills + cron)\n\n### Pricing tiers\n\n| Tier | Included |\n|------|----------|\n| DIY | Template + guide + health-check + brain-search scripts |\n| Assisted | Template + setup + first 4 weekly reviews |\n| Managed | Full setup + Hermes operator + ongoing support |\n\n## Common Pitfalls\n\n1. Over-engineering before operating — start minimal, grow by use\n2. Mixing layers — vault ≠ runtime ≠ backups\n3. Forgetting the push — knowledge in chat dies\n4. Over-reading on pull — PARA order prevents drowning\n5. Ignoring sensitivity — route before writing\n6. No health-check — frontmatter decays without auditing\n7. Obsidian as source — vault + Git is source of truth\n8. Saving everything — classify first, only durable knowledge enters\n9. **brain-health-check.py VAULT_ROOT hardcoded** — the script uses `Path(__file__).resolve().parent.parent` as default vault root. Always pass `--vault \u002Fpath\u002Fto\u002Fvault` when running from outside, or use the wrapper pattern which sets `cwd=VAULT`.\n10. **Missing sensitivity routing check** — add `check_sensitivity_routing()` to detect `sensitivity: restricted` notes outside designated restricted areas.\n11. **Stale search index** — after vault changes (push-brain, weekly review), rebuild brain_search index. Semantic search on a stale index misses new content. Rebuild is cheap (\u003C1s FTS, ~17s with embeddings).\n12. **Git push without pull on shared state** — when pushing updates to shared project\u002Farea\u002Fdecision files, pull first if state may have changed since the last session. Health-check catches structural issues but not semantic staleness.\n13. **Embedding model name mismatch** — LM Studio loads it as `text-embedding-nomic-embed-text-v1.5`, not `nomic-embed-text`. Always set `BRAIN_EMBED_MODEL` env var.\n\n## Verification Checklist\n\n- [ ] Vault created with PARA structure\n- [ ] Root files exist (MAPA, PARA, HERMES, README)\n- [ ] Frontmatter PARA contract defined\n- [ ] Templates created\n- [ ] Health-check script created and tested\n- [ ] Brain search engine created and tested (FTS + optional embeddings)\n- [ ] Pull-brain skill created and tested (with brain-search integration)\n- [ ] Push-brain skill created and tested (with git push + index rebuild)\n- [ ] `\u002Freload-skills` run after skill creation\n- [ ] Skills tested as `\u002F` commands in gateway\n- [ ] Cron configured and triggered once\n- [ ] Weekly review ritual defined\n- [ ] First real session consolidated via push-brain\n- [ ] Git initialized with initial commit + remote configured\n- [ ] `.gitignore` protects secrets, `.obsidian\u002F`, and `.brain-index\u002F`\n","# Second Brain Operations\n\n## Overview\n\nImplementation playbook for building and operating a PARA-first Second Brain with Hermes as the operator.\n\nUse this skill when the user wants to:\n- Set up a new second brain from scratch;\n- Understand the proven vault structure and conventions;\n- Create brain-search, pull-brain, and push-brain skills;\n- Configure health-check automation;\n- Run the weekly review ritual;\n- Understand the operational rhythm of a live second brain.\n\nFor architecture\u002Fdesign questions (layers, sensitivity routing, multi-agent, fractal patterns), use `second-brain-knowledge-architecture` instead.\n\n## What We Proven\n\nThis playbook encodes lessons from the real FMercurio Tech deployment:\n- Vault: Markdown + Git + Obsidian\n- Operator: Hermes Agent via Telegram\n- Method: PARA + CODE (Tiago Forte)\n- Health-check: deterministic script, cron, silent-when-healthy\n- Search: FTS5 + semantic embeddings (brain_search.py) for concept-level retrieval\n- Skills: `brain-search`, `pull-brain`, and `push-brain` as Hermes local skills\n- Git-backed: vault commits + pushes to GitHub remote; index rebuild after each push\n- Separation: vault (durable knowledge) ≠ runtime (Hermes) ≠ backups\n\n## How to Use This Skill\n\n### Setup (one-time)\n\nThe client invokes this skill to start a new second brain:\n\n```\n\u002Fsecond-brain-operations\n```\n\nOr in natural language: \"quero montar um segundo cérebro\", \"setup second brain\", \"criar vault PARA\".\n\nThe agent then follows Phases 1–10 in order, asking the client questions at each phase and implementing as it goes. The client does not need to know Git, Python, YAML, or Hermes internals — the agent handles everything.\n\n**What the client provides:**\n- Purpose and scope of the vault\n- Owner name\n- Sensitivity preferences\n- Whether Hermes will be the operator\n\n**What the agent creates:**\n- Vault with PARA structure + root files\n- Health-check script\n- Brain search engine (FTS5 + optional semantic embeddings)\n- `brain-search`, `pull-brain`, and `push-brain` skills\n- Cron configuration for automated auditing\n\n**What the client receives as commands:**\n- `\u002Fbrain-search` — search the vault by keyword or concept\n- `\u002Fpull-brain` — load context from the vault\n- `\u002Fpush-brain` — save session output to the vault\n\n### Ongoing use\n\nAfter setup, the client uses `\u002Fbrain-search`, `\u002Fpull-brain`, and `\u002Fpush-brain` naturally in their sessions. The agent follows the rituals automatically when these commands are invoked.\n\n## Phase 1: Project Charter\n\nBefore creating files, define:\n\n1. **Purpose** — Why does this brain exist?\n2. **Scope** — Personal? Company? Client? Which domains?\n3. **Owner** — Who is responsible?\n4. **Sensitivity model** — What's public, internal, restricted?\n5. **Operator** — Hermes? Human-only? Both?\n6. **Interface** — Telegram? Obsidian? CLI?\n\nWrite a one-paragraph charter and keep it in `README.md`.\n\n## Phase 2: Vault Creation\n\n### Directory structure\n\n```text\nvault-name\u002F\n├── 00_Inbox\u002F            — raw capture, 30-day max\n├── 10_Projects\u002F         — active efforts with outcome + deadline\n├── 20_Areas\u002F            — ongoing responsibilities\n├── 30_Resources\u002F        — distilled reusable knowledge\n├── 40_Archives\u002F         — inactive\u002Fconcluded\u002Fsuperseded\n├── 50_Templates\u002F        — starter files for each note type\n├── _Hermes\u002F             — bridge docs (NOT runtime copies)\n├── _Meta\u002F               — vault governance + decision log\n├── scripts\u002F             — deterministic utilities\n├── MAPA.md              — root map\n├── PARA.md              — routing rules + frontmatter spec\n├── HERMES.md            — how Hermes reads\u002Fwrites this vault\n├── README.md            — human-facing overview\n└── .gitignore           — exclude .env, secrets, .obsidian\u002F, backups\n```\n\n### Frontmatter PARA contract\n\nEvery canonical note must declare:\n\n```yaml\n---\npara: project          # project | area | resource | archive\nscope: personal        # personal | company | client | product | hermes | leadership\nstatus: active         # inbox | active | waiting | paused | complete | archived | distilled\nsensitivity: internal  # public | internal | restricted\nowner: \u003Cname>\ncreated: YYYY-MM-DD\nupdated: YYYY-MM-DD\nreview: weekly         # weekly | monthly | quarterly | ad-hoc\nrelated: []\n---\n```\n\nRoot files and changelog are exempt.\n\n### Templates\n\nCreate starter templates in `50_Templates\u002F` for: project, area, resource, decision, playbook, client-partner, bridge-note. Each with correct frontmatter pre-filled.\n\n### Git init + Obsidian\n\n```bash\ngit init && git add . && git commit -m \"Initial vault structure\"\nopen -a Obsidian \u002Fpath\u002Fto\u002Fvault\n```\n\nAdd `.obsidian\u002F` and `.brain-index\u002F` to `.gitignore`.\n\n## Phase 3: Health-Check Script\n\n### What to audit\n\n1. Frontmatter compliance — canonical notes with valid `para:`\n2. Project staleness — active projects without `updated:` in 14 days\n3. Inbox staleness — items older than 30 days\n4. Runtime contamination — `.env`, `config.yaml` inside vault\n5. Sensitivity routing — `sensitivity: restricted` notes outside restricted areas\n6. Overall compliance %\n\n### Design decisions\n\n- **Script-first** — deterministic, zero LLM cost\n- **Silent when healthy** — empty stdout; non-empty only for issues\n- **Wrapper in profile** — cron resolves scripts relative to profile dir\n\n### Wrapper pattern\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\nimport subprocess, sys\nVAULT = \"\u002Fpath\u002Fto\u002Fvault\"\nresult = subprocess.run(\n    [sys.executable, f\"{VAULT}\u002Fscripts\u002Fbrain-health-check.py\"],\n    capture_output=True, text=True, cwd=VAULT\n)\nif result.returncode != 0:\n    print(result.stdout); print(result.stderr, file=sys.stderr); sys.exit(result.returncode)\noutput = result.stdout.strip()\nif output and \"saudável\" not in output.lower() and \"healthy\" not in output.lower():\n    print(output)\n```\n\n## Phase 4: Brain Search Engine\n\nA FTS5 + optional semantic search engine that enables concept-level retrieval across the vault. This is the backbone that makes `pull-brain` effective beyond keyword grep.\n\n### What it does\n\n1. **Chunking** — Markdown files split by headings (##\u002F###). Oversized sections split by paragraphs. Each chunk keeps heading context.\n2. **FTS5** — Full-text search with unicode61 tokenizer (handles accented characters). Keyword matching with relevance ranking.\n3. **Embeddings** (optional) — Uses a local embedding model (e.g. `nomic-embed-text-v1.5` via LM Studio\u002FOllama) for semantic similarity. Stores float32 vectors in SQLite. Cosine similarity for concept matching.\n4. **Combined search** — FTS results first, then unique vector results not already found by FTS. Deduplication by path+heading.\n5. **PARA awareness** — Each chunk tagged with its layer (project\u002Farea\u002Fresource\u002Farchive) from path detection and frontmatter.\n\n### Script: brain_search.py\n\nCreate `\u003Cvault>\u002Fscripts\u002Fbrain_search.py`. Core operations:\n\n```bash\n# Rebuild full index (FTS only — \u003C1s)\npython3 scripts\u002Fbrain_search.py --rebuild --json\n\n# Rebuild with semantic embeddings (~17s for ~75 files)\nBRAIN_EMBED_MODEL=\"text-embedding-nomic-embed-text-v1.5\" \\\n  python3 scripts\u002Fbrain_search.py --rebuild --embeddings --json\n\n# Keyword search\npython3 scripts\u002Fbrain_search.py --query \"termos de busca\" --limit 8 --json\n\n# Semantic search (concept-level)\nBRAIN_EMBED_MODEL=\"text-embedding-nomic-embed-text-v1.5\" \\\n  python3 scripts\u002Fbrain_search.py --query \"conceito ou pergunta\" --vector --limit 8 --json\n\n# Update a single file (incremental)\npython3 scripts\u002Fbrain_search.py --update \"10_Projects\u002Fmy-project\u002FProjeto.md\" --json\n\n# Stats\npython3 scripts\u002Fbrain_search.py --stats --json\n```\n\n### Design decisions\n\n- **FTS is always available** — embeddings require a running local model server; FTS works standalone\n- **Graceful degradation** — if LM Studio\u002FOllama is down, search falls back to FTS-only automatically\n- **Index is cache, not source** — `.brain-index\u002F` directory is gitignored and can be rebuilt anytime\n- **Rebuild is cheap** — FTS-only \u003C1s; with embeddings ~17s for ~75 files\n\n### Skill: brain-search\n\nCreate `~\u002F.hermes\u002Fskills\u002Fnote-taking\u002Fbrain-search\u002FSKILL.md` with:\n- Triggers: \"search brain\", \"buscar no cérebro\", \"o que temos sobre X?\"\n- Commands: rebuild, search (FTS), search (semantic), update single file, stats\n- Integration notes for pull-brain and push-brain\n- Pitfalls: model must be running for embeddings; threshold guidance (below ~0.60 = noise)\n\n### Embedding model setup\n\nRequires a local embedding server. Tested with:\n- **LM Studio** — load `nomic-embed-text-v1.5`, default endpoint `http:\u002F\u002F127.0.0.1:1234\u002Fv1\u002Fembeddings`\n- **Ollama** — `ollama pull nomic-embed-text`, endpoint `http:\u002F\u002F127.0.0.1:11434\u002Fv1\u002Fembeddings`\n\nThe `BRAIN_EMBED_MODEL` env var overrides the model name. If no server is running, FTS-only search is always available.\n\n## Phase 5: Pull-Brain Skill\n\nCreate `~\u002F.hermes\u002Fskills\u002Fnote-taking\u002Fpull-brain\u002FSKILL.md`.\n\n### Retrieval order (PARA)\n\n1. Project → 2. Area → 3. Resource → 4. Archive → 5. Brain Search → 6. Inbox\u002Fsession_search\n\n### Brain-search integration\n\nWhen searching the vault, prefer `brain_search.py` over raw grep:\n\n```bash\nBRAIN_EMBED_MODEL=\"text-embedding-nomic-embed-text-v1.5\" \\\n  python3 \u002Fpath\u002Fto\u002Fvault\u002Fscripts\u002Fbrain_search.py \\\n  --query \"termo ou conceito\" --vector --limit 8 --json\n```\n\nBenefits over grep:\n- Concept-level matching (semantic) finds notes without exact keyword match\n- Relevance ranking (FTS rank + cosine similarity)\n- Chunk-level results instead of file-level (more precise context)\n- PARA layer tagging in results\n\n### Key sections\n\n- Triggers and aliases\n- Source of truth (vault path + key files)\n- Workflow (scope → root → brain-search → read → fallback to session_search)\n- Return format (consolidated \u002F session recall \u002F assumptions \u002F gaps)\n- Sensitivity routing\n- Pitfalls (memory over vault, resources before projects, mixing layers)\n\n## Phase 6: Push-Brain Skill\n\nCreate `~\u002F.hermes\u002Fskills\u002Fnote-taking\u002Fpush-brain\u002FSKILL.md`.\n\n### Classification\n\n| Deliverable in progress? | → Project |\n| Ongoing standard? | → Area |\n| Reusable knowledge? | → Resource |\n| Inactive? | → Archive |\n| Raw\u002Funcertain? | → Inbox |\n| Governance decision? | → _Meta\u002Fdecisoes\u002F |\n| Runtime knowledge? | → _Hermes\u002F bridge |\n| Secrets? | → NEVER |\n\n### Workflow\n\n1. Read current state → 2. Choose destination → 3. Obtain explicit write confirmation → 4. Write concisely → 5. Health-check. Treat commit, push, and index rebuild as separate authorization gates.\n\n### Git push to remote\n\nCommit is distinct from writing, and push is distinct from commit. Push only after explicit confirmation to publish remotely:\n\n```bash\ncd \u002Fpath\u002Fto\u002Fvault\ngit push origin HEAD\n```\n\nRun `pull-brain` first if the push updates shared state (projects, areas, decisions) that may have changed since the last session.\n\n### Rebuild search index\n\nAfter pushing, rebuild the brain-search index so FTS5 + embeddings stay current:\n\n```bash\ncd \u002Fpath\u002Fto\u002Fvault\npython3 scripts\u002Fbrain_search.py --rebuild --json\n# Or with embeddings if local model is running:\nBRAIN_EMBED_MODEL=\"text-embedding-nomic-embed-text-v1.5\" \\\n  python3 scripts\u002Fbrain_search.py --rebuild --embeddings --json\n```\n\n### URL archiving (optional quick-archive)\n\nA bare URL is not authorization to fetch, archive, write, commit, or push. Ask what operation is wanted before mutating the vault or contacting the URL.\n\nArchive note structure:\n- Source URL and fetch date\n- Title, author, publication date\n- Key points extracted (3-7 bullets)\n- Tags \u002F PARA classification\n- Full content or summary depending on length\n\n### Key sections\n\n- Triggers and aliases\n- Classification table\n- PARA destinations\n- Sensitivity routing\n- Output format (paths, health-check, commit hash, push result, index status, next step)\n- Pitfalls (chat dumps, duplicates, forgetting health-check, skipping push)\n\n## Phase 7: Cron Configuration\n\n```yaml\nschedule: \"0 9 * * 1\"\nscript: \u003Cwrapper-name>.py\nno_agent: true\ndeliver: origin\nprofile: \u003Cprofile-name>\nworkdir: \u002Fpath\u002Fto\u002Fvault\n```\n\n### Critical pitfall\n\n`script:` resolves relative to **profile's** `scripts\u002F` directory. Put wrapper in `~\u002F.hermes\u002Fprofiles\u002F\u003Cprofile>\u002Fscripts\u002F`, not in vault or global scripts.\n\n### Test sequence\n\n1. Test wrapper directly (exit 0, empty stdout when healthy)\n2. Create cron\n3. Trigger once with `cronjob(action='run')`\n4. Verify `last_status: ok`\n\n## Phase 8: Weekly Review\n\n### Checklist\n\n1. Projects — still active? stalled? archive?\n2. Areas — context current? decisions\u002Flessons to add?\n3. Resources — distill, update, or archive?\n4. Inbox — promote, archive, or discard (items > 30 days)\n5. Decisions — reflected in area\u002Fproject files?\n6. Gaps — what's missing?\n7. Health-check — manual run\n8. Brain search index — rebuild after review changes\n9. Git — commit and push all\n\n### Output\n\nSave to `_Meta\u002Frevisoes-semanais\u002FYYYY-MM-DD.md`:\n- Executive summary\n- Projects\u002Fareas reviewed\n- Inbox processed\n- Decisions made\n- Gaps identified\n- Next priorities\n\n## Phase 9: Operational Rhythm\n\n| Cadence | Actions |\n|---------|---------|\n| Daily | Capture to inbox; push-brain after meaningful sessions |\n| Weekly | Health-check cron + manual review + inbox processing |\n| Monthly | Review areas; archive inactive; update contexts |\n| Quarterly | Review structure; consider splitting vaults |\n\n## Phase 10: Client Offering\n\n### Deliverables\n\n1. Vault template (PARA folders + templates)\n2. Health-check script (drop-in)\n3. Brain search engine (drop-in)\n4. Setup guide (this skill as reference)\n5. Training session (search\u002Fpull\u002Fpush walkthrough)\n6. Optional: Hermes operator (skills + cron)\n\n### Pricing tiers\n\n| Tier | Included |\n|------|----------|\n| DIY | Template + guide + health-check + brain-search scripts |\n| Assisted | Template + setup + first 4 weekly reviews |\n| Managed | Full setup + Hermes operator + ongoing support |\n\n## Common Pitfalls\n\n1. Over-engineering before operating — start minimal, grow by use\n2. Mixing layers — vault ≠ runtime ≠ backups\n3. Forgetting the push — knowledge in chat dies\n4. Over-reading on pull — PARA order prevents drowning\n5. Ignoring sensitivity — route before writing\n6. No health-check — frontmatter decays without auditing\n7. Obsidian as source — vault + Git is source of truth\n8. Saving everything — classify first, only durable knowledge enters\n9. **brain-health-check.py VAULT_ROOT hardcoded** — the script uses `Path(__file__).resolve().parent.parent` as default vault root. Always pass `--vault \u002Fpath\u002Fto\u002Fvault` when running from outside, or use the wrapper pattern which sets `cwd=VAULT`.\n10. **Missing sensitivity routing check** — add `check_sensitivity_routing()` to detect `sensitivity: restricted` notes outside designated restricted areas.\n11. **Stale search index** — after vault changes (push-brain, weekly review), rebuild brain_search index. Semantic search on a stale index misses new content. Rebuild is cheap (\u003C1s FTS, ~17s with embeddings).\n12. **Git push without pull on shared state** — when pushing updates to shared project\u002Farea\u002Fdecision files, pull first if state may have changed since the last session. Health-check catches structural issues but not semantic staleness.\n13. **Embedding model name mismatch** — LM Studio loads it as `text-embedding-nomic-embed-text-v1.5`, not `nomic-embed-text`. Always set `BRAIN_EMBED_MODEL` env var.\n\n## Verification Checklist\n\n- [ ] Vault created with PARA structure\n- [ ] Root files exist (MAPA, PARA, HERMES, README)\n- [ ] Frontmatter PARA contract defined\n- [ ] Templates created\n- [ ] Health-check script created and tested\n- [ ] Brain search engine created and tested (FTS + optional embeddings)\n- [ ] Pull-brain skill created and tested (with brain-search integration)\n- [ ] Push-brain skill created and tested (with git push + index rebuild)\n- [ ] `\u002Freload-skills` run after skill creation\n- [ ] Skills tested as `\u002F` commands in gateway\n- [ ] Cron configured and triggered once\n- [ ] Weekly review ritual defined\n- [ ] First real session consolidated via push-brain\n- [ ] Git initialized with initial commit + remote configured\n- [ ] `.gitignore` protects secrets, `.obsidian\u002F`, and `.brain-index\u002F`\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"description":7},"Hermes Agent","1.1.0",{"hermes":27},{"tags":28,"related_skills":35},[29,30,31,32,33,34],"second-brain","para","obsidian","hermes","operations","playbook",[36,37,38,39],"second-brain-knowledge-architecture","pull-brain","push-brain","brain-search","main","b5c05537c2a696d4f96f17b51e5e2951fcab8f5b","skills\u002Fnote-taking\u002Fsecond-brain-operations","https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills","https:\u002F\u002Fgithub.com\u002Ffmercurio","2026-11-07 04:26:06",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add fmercurio\u002Fclawdia-custom-skills --skill second-brain-operations",{"tool":52,"command":53},"bunx","bunx skills add fmercurio\u002Fclawdia-custom-skills --skill second-brain-operations",{"tool":55,"command":56},"pnpm","pnpm dlx skills add fmercurio\u002Fclawdia-custom-skills --skill second-brain-operations","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Fskills\u002Fnote-taking\u002Fsecond-brain-operations\u002FSKILL.md",true,[60,66],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"scripts\u002Fbrain-health-check.py","SCRIPT","脚本",9929,"https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Fskills\u002Fnote-taking\u002Fsecond-brain-operations\u002Fscripts\u002Fbrain-health-check.py",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"tests\u002Ftest_brain_health_security.py",2691,"https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Fskills\u002Fnote-taking\u002Fsecond-brain-operations\u002Ftests\u002Ftest_brain_health_security.py",[71,78,84,90,96,101],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M75BDD9N7RSFBWGDNTZK9NYT","overlay-skill","Fixture skill for deployment planner tests.","https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Ftools\u002Fskill_deploy\u002Ftests\u002Ffixtures\u002Fworkspace\u002Fskills\u002Fproductivity\u002Foverlay-skill\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M75BDAV2X86DYXADGV8B1ZCZ","candidate-skill","https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Ftools\u002Fskill_deploy\u002Ftests\u002Ffixtures\u002Fworkspace\u002Fskills\u002Fproductivity\u002Fcandidate-skill\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M75BD9NPF9EKPHAZMBVDM8GN","builtin-collision","https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Ftools\u002Fskill_deploy\u002Ftests\u002Ffixtures\u002Fworkspace\u002Fskills\u002Fproductivity\u002Fbuiltin-collision\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M75BD7NV55ZMQVC0GY7FSG2F","approved-global","https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Ftools\u002Fskill_deploy\u002Ftests\u002Ffixtures\u002Fworkspace\u002Fskills\u002Fproductivity\u002Fapproved-global\u002FSKILL.md",[],[],{"skillNo":97,"name":92,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M75BD54973NF4BHPZR3F4Z8A","https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Ftools\u002Fskill_deploy\u002Ftests\u002Ffixtures\u002Fworkspace\u002Fskills\u002Fproductivity\u002Fapproved-global-duplicate\u002FSKILL.md",[],[],{"skillNo":102,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M75BD2N1FJZ142MYPJ19R29Z","https:\u002F\u002Fgithub.com\u002Ffmercurio\u002Fclawdia-custom-skills\u002Fblob\u002Fmain\u002Ftools\u002Fskill_deploy\u002Ftests\u002Ffixtures\u002Fworkspace\u002Fruntime\u002Fskills\u002Fproductivity\u002Foverlay-skill\u002FSKILL.md",[],[]]