[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C70SSX4ZXG68QGMMV2XEXM":3,"skill-same:01M7C70SSX4ZXG68QGMMV2XEXM":47},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7C70SSX4ZXG68QGMMV2XEXM","curated-thoughts-ops",null,"Use when Curated Thoughts looks broken — sidecar unreachable, vault errors, tier mismatches, or failed MCP tool calls.","equationalapplications\u002Fcurated-thoughts-integrations","equationalapplications","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F65428263?v=4","01M7C6ZHJS8PPEAFTH378P8GYF","Kurt VanDusen","01M7C6ZHKA4MZDX5W68T69GH7S",2,"MIT","https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations\u002Fblob\u002Fmain\u002Fintegrations\u002Fopencode\u002Fskills\u002Fcurated-thoughts-ops\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: curated-thoughts-ops\ndescription: Use when Curated Thoughts looks broken — sidecar unreachable, vault errors, tier mismatches, or failed MCP tool calls.\n---\n\n# Curated Thoughts Operations\n\nDiagnose and report problems with a Curated Thoughts (CT) integration — for\nmaintainers and power users. Scope is diagnosis and safe routing, never repair\nby out-of-band writes.\n\n## First move: run the doctor\n\nRun the plugin's doctor (`node lib\u002Fscripts\u002Fct_doctor.js check`) before\nguessing. It reports PASS \u002F WARN \u002F FAIL per check, each with a fix hint:\n\n1. **Sidecar binary** — `curated-thoughts-mcp` on PATH, or in this platform's\n   install location (macOS app bundle, Linux `\u002Fusr\u002Fbin`, Windows Programs\n   dir). FAIL here invalidates everything downstream.\n2. **Sidecar identity** — the binary is an installed sidecar, not a build\n   output from a source checkout (`target\u002F`, `tools\u002F`). A same-named dev build\n   shadowing the installed one gives two servers on one brain.\n3. **Sidecar reachable** — `tools\u002Flist` over MCP; prints the tool count, which\n   is what determines the capability tier. WARN at 8 tools means the write\n   path is dormant (`curated_add_wisdom` absent) — an older sidecar, not\n   breakage.\n4. **Brain directory** — the directory holding `brain.db` and `config.json`,\n   resolved exactly as Curated Thoughts resolves it: `CURATED_BRAIN_DIR`,\n   defaulting to `~\u002F.brain`.\n5. **Vault** — the documents tree named by `vault_path` **inside\n   config.json**. This is a different thing from the brain directory, and it\n   is machine-specific: a brain imported from another machine almost always\n   has a `vault_path` that does not exist here.\n6. **Embedding backend** — the configured embedding host responds. WARN\u002FFAIL\n   degrades semantic search but the sidecar may still answer.\n7. **Harness registration** — the `mcp[\"curated-thoughts\"]` entry and the\n   loader file `~\u002F.config\u002Fopencode\u002Fplugins\u002Fcurated-thoughts.js` pointing at a\n   readable payload, plus the three skill directories under\n   `~\u002F.config\u002Fopencode\u002Fskills\u002F`, so the tools and skills actually load.\n8. **Import pre-flight** — reads the engine version and censuses every\n   `llm_wiki_entries.source_ref`. See below; this is the check that protects\n   an imported graph.\n9. **Version compat** — best-effort sidecar version against\n   `shared\u002Fcompat.yaml`. Undiscoverable on most platforms, which is fine and\n   reported as PASS; it only warns when a discoverable version disagrees with\n   the live tool count (the signature of a stale sidecar process).\n\nExit code 0 = all PASS, 1 = any FAIL, 2 = WARNs but no FAIL.\n\n## Import pre-flight: when a brain arrives from another machine\n\nCurated Thoughts is memory-in-a-box, so a brain is meant to travel. Two things\ncan destroy an imported graph before an agent reads a word of it, and the\npre-flight check reports both.\n\n**The engine rewrites `source_ref`.** core-llm-wiki's `setup()` runs an\nunconditional back-rewrite. `findRowsForSourceRefMigration()` selects a row if\n**any of five predicates** holds — `TRIM(source_ref) != source_ref`,\n`INSTR '\u002F'`, `INSTR '\\'`, `INSTR CHAR(0)`, or the GLOB\n`'*[^-A-Za-z0-9._ ]*'` — then strips it through `normalizeSourceRef`. Every\nJSON blob qualifies, destroying the `proposal_id` needed for retraction and the\nevidence array behind provenance display. It fires on every app launch, over\nthe shared `brain.db`. The current engine pin, 7.1.0, still mangles.\n\nNote the GLOB is not the whole selector: **space is inside the keep-set**, so a\nwhitespace-padded ref clears the GLOB and is still caught by `TRIM`.\n\nDetection is a **positive token-shape test** (§2.5.1): a non-`NULL` row is\ndamaged iff its `source_ref` does not match `^librarian-[0-9a-f]{32}$`. The\n`evidence…` prefixes\ndrive *recovery* (§2.5.4), never detection.\n\nThe census is scoped to `source_type = 'librarian_inferred'`, and this matters:\na legitimate document-sourced ref can itself reach the 255-char cap (long vault\npaths normalize to exactly 255), so an unscoped shape test would report a\nhealthy brain as damaged. `NULL` refs are legitimate engine-era data, counted\nseparately as `null_ref_count`.\n\nVerdicts:\n\n- **mangled** → FAIL. Evidence already destroyed. Do not trust this graph's\n  provenance. The V18 repair migration re-derives it (outbox-first, then\n  proposal lookup) and exports before mutating.\n- **at_risk** → FAIL. Rows still hold JSON or whitespace-padded refs; intact\n  right now, destroyed at the next app launch. Do not open this brain with the\n  desktop app until Curated Thoughts carries the PR #188 fix.\n- **token** with no `librarian_evidence` **table** → FAIL. The entries\n  travelled, their provenance did not — a broken import contract.\n- **token** rows missing individual evidence **rows** → WARN. §2.3 treats these\n  as still-grounded and never auto-purges them, so nothing is being deleted;\n  provenance display and retraction just cannot resolve them.\n- **token** with evidence → PASS. `unanchored=1` rows are expected under §2.4\n  Phase 1 write-with-flag, not damage.\n\n**Export whole brains, not table subsets.** §2.5.5 defines a supported export\nas brain-complete — entries, evidence, chunks and proposals. A partial export\nmade legitimately-anchored facts look like orphans, so the repair migration now\nasserts a complete chunk schema before any orphan deletion and skips it loudly\nif the assertion fails. `shared\u002Fcompat.yaml` lists what must travel.\n\n## Registration in OpenCode\n\nThe sidecar is registered as `mcp[\"curated-thoughts\"]` in the global\n`~\u002F.config\u002Fopencode\u002Fopencode.json[c]` with `--mcp` arguments, and the plugin\nloads from the loader file\n`~\u002F.config\u002Fopencode\u002Fplugins\u002Fcurated-thoughts.js`, which points at the payload\ndirectory under `${XDG_DATA_HOME:-~\u002F.local\u002Fshare}\u002Fcurated-thoughts\u002Fopencode\u002F`.\nAll three pieces matter: without the `mcp` entry there are no tools, without\nthe loader file the health snapshot never loads, and without the skill\ndirectories under `~\u002F.config\u002Fopencode\u002Fskills\u002F` the skills never appear.\n`scripts\u002Finstall.sh` prints the proposed merge by default and only writes it\nunder `CT_INSTALL_EDIT=1` — it merges the `mcp` entry only if absent, never\noverwrites an existing entry, and never touches the `plugin` config array.\nIf both a plugin-installed copy and a loose\n`~\u002F.config\u002Fopencode\u002Fskills\u002Fcurated-thoughts*` skill exist, remove the loose\ncopy to avoid skill collisions (the installer warns; it never deletes user\nfiles). Verify with `node lib\u002Fscripts\u002Fct_doctor.js check`: check 7 reports\n`UNKNOWN` when an entry is simply absent from the global config (OpenCode also\nmerges project and managed config the doctor cannot see) and FAILs only on\nlocal, unambiguous problems such as a loader pointing at a missing payload.\n\n## Safe routing when things fail\n\n- **Report, don't improvise.** Capture the exact tool error, the doctor check\n  that failed, and the tool count. Sidecar errors mean route around: use\n  non-CT sources for this session and surface the error to the user.\n- **Never write out-of-band.** Fixing a vault problem by hand-editing files or\n  opening the database directly corrupts indexing and embeddings. The sidecar\n  is the only writer, always.\n- **Tier mismatch ≠ failure.** A WARN on tool count just means the sidecar\n  version predates the write path; read tools still work. Check\n  `shared\u002Fcompat.yaml` for the expected surface at that version.\n- **Fail open.** A down sidecar must not block a session; state it plainly and\n  continue without CT memory.\n","# Curated Thoughts Operations\n\nDiagnose and report problems with a Curated Thoughts (CT) integration — for\nmaintainers and power users. Scope is diagnosis and safe routing, never repair\nby out-of-band writes.\n\n## First move: run the doctor\n\nRun the plugin's doctor (`node lib\u002Fscripts\u002Fct_doctor.js check`) before\nguessing. It reports PASS \u002F WARN \u002F FAIL per check, each with a fix hint:\n\n1. **Sidecar binary** — `curated-thoughts-mcp` on PATH, or in this platform's\n   install location (macOS app bundle, Linux `\u002Fusr\u002Fbin`, Windows Programs\n   dir). FAIL here invalidates everything downstream.\n2. **Sidecar identity** — the binary is an installed sidecar, not a build\n   output from a source checkout (`target\u002F`, `tools\u002F`). A same-named dev build\n   shadowing the installed one gives two servers on one brain.\n3. **Sidecar reachable** — `tools\u002Flist` over MCP; prints the tool count, which\n   is what determines the capability tier. WARN at 8 tools means the write\n   path is dormant (`curated_add_wisdom` absent) — an older sidecar, not\n   breakage.\n4. **Brain directory** — the directory holding `brain.db` and `config.json`,\n   resolved exactly as Curated Thoughts resolves it: `CURATED_BRAIN_DIR`,\n   defaulting to `~\u002F.brain`.\n5. **Vault** — the documents tree named by `vault_path` **inside\n   config.json**. This is a different thing from the brain directory, and it\n   is machine-specific: a brain imported from another machine almost always\n   has a `vault_path` that does not exist here.\n6. **Embedding backend** — the configured embedding host responds. WARN\u002FFAIL\n   degrades semantic search but the sidecar may still answer.\n7. **Harness registration** — the `mcp[\"curated-thoughts\"]` entry and the\n   loader file `~\u002F.config\u002Fopencode\u002Fplugins\u002Fcurated-thoughts.js` pointing at a\n   readable payload, plus the three skill directories under\n   `~\u002F.config\u002Fopencode\u002Fskills\u002F`, so the tools and skills actually load.\n8. **Import pre-flight** — reads the engine version and censuses every\n   `llm_wiki_entries.source_ref`. See below; this is the check that protects\n   an imported graph.\n9. **Version compat** — best-effort sidecar version against\n   `shared\u002Fcompat.yaml`. Undiscoverable on most platforms, which is fine and\n   reported as PASS; it only warns when a discoverable version disagrees with\n   the live tool count (the signature of a stale sidecar process).\n\nExit code 0 = all PASS, 1 = any FAIL, 2 = WARNs but no FAIL.\n\n## Import pre-flight: when a brain arrives from another machine\n\nCurated Thoughts is memory-in-a-box, so a brain is meant to travel. Two things\ncan destroy an imported graph before an agent reads a word of it, and the\npre-flight check reports both.\n\n**The engine rewrites `source_ref`.** core-llm-wiki's `setup()` runs an\nunconditional back-rewrite. `findRowsForSourceRefMigration()` selects a row if\n**any of five predicates** holds — `TRIM(source_ref) != source_ref`,\n`INSTR '\u002F'`, `INSTR '\\'`, `INSTR CHAR(0)`, or the GLOB\n`'*[^-A-Za-z0-9._ ]*'` — then strips it through `normalizeSourceRef`. Every\nJSON blob qualifies, destroying the `proposal_id` needed for retraction and the\nevidence array behind provenance display. It fires on every app launch, over\nthe shared `brain.db`. The current engine pin, 7.1.0, still mangles.\n\nNote the GLOB is not the whole selector: **space is inside the keep-set**, so a\nwhitespace-padded ref clears the GLOB and is still caught by `TRIM`.\n\nDetection is a **positive token-shape test** (§2.5.1): a non-`NULL` row is\ndamaged iff its `source_ref` does not match `^librarian-[0-9a-f]{32}$`. The\n`evidence…` prefixes\ndrive *recovery* (§2.5.4), never detection.\n\nThe census is scoped to `source_type = 'librarian_inferred'`, and this matters:\na legitimate document-sourced ref can itself reach the 255-char cap (long vault\npaths normalize to exactly 255), so an unscoped shape test would report a\nhealthy brain as damaged. `NULL` refs are legitimate engine-era data, counted\nseparately as `null_ref_count`.\n\nVerdicts:\n\n- **mangled** → FAIL. Evidence already destroyed. Do not trust this graph's\n  provenance. The V18 repair migration re-derives it (outbox-first, then\n  proposal lookup) and exports before mutating.\n- **at_risk** → FAIL. Rows still hold JSON or whitespace-padded refs; intact\n  right now, destroyed at the next app launch. Do not open this brain with the\n  desktop app until Curated Thoughts carries the PR #188 fix.\n- **token** with no `librarian_evidence` **table** → FAIL. The entries\n  travelled, their provenance did not — a broken import contract.\n- **token** rows missing individual evidence **rows** → WARN. §2.3 treats these\n  as still-grounded and never auto-purges them, so nothing is being deleted;\n  provenance display and retraction just cannot resolve them.\n- **token** with evidence → PASS. `unanchored=1` rows are expected under §2.4\n  Phase 1 write-with-flag, not damage.\n\n**Export whole brains, not table subsets.** §2.5.5 defines a supported export\nas brain-complete — entries, evidence, chunks and proposals. A partial export\nmade legitimately-anchored facts look like orphans, so the repair migration now\nasserts a complete chunk schema before any orphan deletion and skips it loudly\nif the assertion fails. `shared\u002Fcompat.yaml` lists what must travel.\n\n## Registration in OpenCode\n\nThe sidecar is registered as `mcp[\"curated-thoughts\"]` in the global\n`~\u002F.config\u002Fopencode\u002Fopencode.json[c]` with `--mcp` arguments, and the plugin\nloads from the loader file\n`~\u002F.config\u002Fopencode\u002Fplugins\u002Fcurated-thoughts.js`, which points at the payload\ndirectory under `${XDG_DATA_HOME:-~\u002F.local\u002Fshare}\u002Fcurated-thoughts\u002Fopencode\u002F`.\nAll three pieces matter: without the `mcp` entry there are no tools, without\nthe loader file the health snapshot never loads, and without the skill\ndirectories under `~\u002F.config\u002Fopencode\u002Fskills\u002F` the skills never appear.\n`scripts\u002Finstall.sh` prints the proposed merge by default and only writes it\nunder `CT_INSTALL_EDIT=1` — it merges the `mcp` entry only if absent, never\noverwrites an existing entry, and never touches the `plugin` config array.\nIf both a plugin-installed copy and a loose\n`~\u002F.config\u002Fopencode\u002Fskills\u002Fcurated-thoughts*` skill exist, remove the loose\ncopy to avoid skill collisions (the installer warns; it never deletes user\nfiles). Verify with `node lib\u002Fscripts\u002Fct_doctor.js check`: check 7 reports\n`UNKNOWN` when an entry is simply absent from the global config (OpenCode also\nmerges project and managed config the doctor cannot see) and FAILs only on\nlocal, unambiguous problems such as a loader pointing at a missing payload.\n\n## Safe routing when things fail\n\n- **Report, don't improvise.** Capture the exact tool error, the doctor check\n  that failed, and the tool count. Sidecar errors mean route around: use\n  non-CT sources for this session and surface the error to the user.\n- **Never write out-of-band.** Fixing a vault problem by hand-editing files or\n  opening the database directly corrupts indexing and embeddings. The sidecar\n  is the only writer, always.\n- **Tier mismatch ≠ failure.** A WARN on tool count just means the sidecar\n  version predates the write path; read tools still work. Check\n  `shared\u002Fcompat.yaml` for the expected surface at that version.\n- **Fail open.** A down sidecar must not block a session; state it plainly and\n  continue without CT memory.\n",{"name":5,"description":7},"main","3897a2f61629f385db2b784c4d0ccf9c127bc559","integrations\u002Fopencode\u002Fskills\u002Fcurated-thoughts-ops",1,"https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations","https:\u002F\u002Fgithub.com\u002Fequationalapplications","https:\u002F\u002Fequationalapplications.com","Equational Applications LLC -\r\nKurt VanDusen, Founder and Sole Member","2026-11-14 10:05:44",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add equationalapplications\u002Fcurated-thoughts-integrations --skill curated-thoughts-ops",{"tool":39,"command":40},"bunx","bunx skills add equationalapplications\u002Fcurated-thoughts-integrations --skill curated-thoughts-ops",{"tool":42,"command":43},"pnpm","pnpm dlx skills add equationalapplications\u002Fcurated-thoughts-integrations --skill curated-thoughts-ops","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations\u002Fblob\u002Fmain\u002Fintegrations\u002Fopencode\u002Fskills\u002Fcurated-thoughts-ops\u002FSKILL.md",true,[],[48,55,62,68,74,80],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7C714WKC3TC9D122726STJB","curated-thoughts-usage","Host-contract fixture skill (curated-thoughts-usage); verifies OpenCode discovers skills from ~\u002F.config\u002Fopencode\u002Fskills.","https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations\u002Fblob\u002Fmain\u002Fintegrations\u002Fopencode\u002Ftests\u002Fhost\u002Ffixtures\u002Fskills\u002Fcurated-thoughts-usage\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7C712WNMBQD6QAM8K2QY0VE","curated-thoughts-sidecar","Host-contract fixture skill (curated-thoughts-sidecar); verifies OpenCode discovers skills from ~\u002F.config\u002Fopencode\u002Fskills.","https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations\u002Fblob\u002Fmain\u002Fintegrations\u002Fopencode\u002Ftests\u002Fhost\u002Ffixtures\u002Fskills\u002Fcurated-thoughts-sidecar\u002FSKILL.md",[],[],{"skillNo":63,"name":5,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7C7112318HHS45BG4A1Q1XG","Host-contract fixture skill (curated-thoughts-ops); verifies OpenCode discovers skills from ~\u002F.config\u002Fopencode\u002Fskills.","https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations\u002Fblob\u002Fmain\u002Fintegrations\u002Fopencode\u002Ftests\u002Fhost\u002Ffixtures\u002Fskills\u002Fcurated-thoughts-ops\u002FSKILL.md",[],[],{"skillNo":69,"name":50,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7C70Z7P8NX0GT45R91BH37Z","Use when a harness session needs Curated Thoughts memory — search, recall, or wisdom writes via the CT MCP sidecar.","https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations\u002Fblob\u002Fmain\u002Fintegrations\u002Fopencode\u002Fskills\u002Fcurated-thoughts-usage\u002FSKILL.md",[],[],{"skillNo":75,"name":57,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7C70W1JQ6EK8J1CMC6EJV92","Use when managing the Curated Thoughts MCP sidecar — respawns, staleness, upgrades, or same-named binary confusion.","https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations\u002Fblob\u002Fmain\u002Fintegrations\u002Fopencode\u002Fskills\u002Fcurated-thoughts-sidecar\u002FSKILL.md",[],[],{"skillNo":81,"name":50,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7C70QMA565TQ4FTJ6S758QZ","https:\u002F\u002Fgithub.com\u002Fequationalapplications\u002Fcurated-thoughts-integrations\u002Fblob\u002Fmain\u002Fintegrations\u002Fopenclaw\u002Fskills\u002Fcurated-thoughts-usage\u002FSKILL.md",[],[]]