[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M722KW1628Z2S53SAJ32DJP6":3,"skill-same:01M722KW1628Z2S53SAJ32DJP6":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":28,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M722KW1628Z2S53SAJ32DJP6","coherence-repair",null,"HUMBLEF0OL\u002Fcoherence","HUMBLEF0OL","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F69069897?v=4","01M722JFPKDTWN60TH4NDCQQE9","AMIT RANA","01M722JFQ8TYAH6SVW21RTTM1S",1,"MIT","https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence\u002Fblob\u002Fmaster\u002F.skill-workspace\u002Fiteration-0-snapshot\u002Fskills\u002Fcoherence-repair\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"# Skill: coherence:repair\nTrigger: `\u002Fcoherence:repair`\nBRD: FR-COMMANDS-3 · DD-038, DD-045\n\n## Purpose\nTargeted recovery from buffer corruption, broken section anchors, or schema validation failures — without a full re-bootstrap. Diagnoses the specific failure mode and applies the minimal fix.\n\n## Steps\n\n### 1. Diagnose\nRun three checks in order and report findings before taking any action:\n\n**a. Buffer schema check** — validate every entry in `.claude\u002Fcoherence\u002Fdrift-buffer.jsonl` against the v1.0 buffer schema:\n- Required fields: `schema_version`, `session_id`, `ts`, `signal_type`, `source_file`, `anchor`, `relation`, `payload`\n- `relation` must be one of: `outdated`, `missing`, `contradicts`, `assertion-failed`\n- `ts` must be parseable as ISO-8601\n- Report: count of valid entries, count of invalid entries, first invalid entry (truncated).\n\n**b. Anchor integrity check** — for each valid buffer entry, verify that the `anchor` value exists as a heading slug or `id=` attribute in the referenced `source_file`:\n- Read each referenced doc (skip if doc is not in the tracked list).\n- Report: count of dangling anchors (anchor in buffer but not found in doc).\n\n**c. Config schema check** — validate `.claude\u002Fcoherence\u002Fconfig.yaml`:\n- Required fields: `schema_version`, `mode`, `tracked`\n- `mode` must be `observe` or `graduated`\n- `tracked` must be an array with at least one entry\n- Report: valid or list of violations.\n\n### 2. Present diagnosis\n```\n─── Coherence Repair Diagnosis ──────────────────────────\nBuffer entries:   \u003Cvalid_count> valid \u002F \u003Cinvalid_count> invalid\nAnchor issues:    \u003Cdangling_count> dangling anchor(s)\nConfig:           \u003COK | N violations>\n─────────────────────────────────────────────────────────\n```\nIf all checks pass, print \"No issues found. Buffer and config are healthy.\" and exit.\n\n### 3. Prompt for repair actions\nFor each issue found, offer a targeted repair:\n\n**Invalid buffer entries:**\n```\nPurge \u003CN> invalid buffer entry\u002Fentries? [y\u002Fn]\n```\nIf yes: rewrite `.claude\u002Fcoherence\u002Fdrift-buffer.jsonl` keeping only valid entries. (DD-038)\n\n**Dangling anchors:**\n```\nDrop \u003CN> buffer entry\u002Fentries with dangling anchors? [y\u002Fn]\n```\nIf yes: remove entries whose `anchor` cannot be resolved in the target doc. (DD-045)\n\n**Config violations:**\nList each violation and for each ask:\n```\nReset '\u003Cfield>' to default value '\u003Cdefault>'? [y\u002Fn]\n```\n\n### 4. Apply repairs atomically\n- All rewrites use temp + rename. (NFR-RELIABILITY-1)\n- Log each repair action to `.claude\u002Fcoherence\u002Fmetrics.jsonl` with `action: \"repair\"`.\n- Update `state.json`: increment `repair_count`, set `last_repair_ts`.\n\n### 5. Post-repair validation\nRe-run the three checks from Step 1. If all pass, print:\n```\n─── Repair complete — all checks pass ───────────────────\n```\nIf any check still fails, print the remaining issues and suggest `\u002Fcoherence:recover` for a full re-bootstrap.\n\n## Constraints\n- All writes must be atomic (temp + rename). (NFR-RELIABILITY-1)\n- Do not invoke LLM subagents — this is a deterministic repair operation. (DD-008)\n- Do not modify tracked doc files — only buffer, config, and state files.\n- Acquire `.claude\u002Fcoherence\u002Fdrift-buffer.jsonl.lock` before modifying the buffer. (FR-FAILURE-3b)\n",{},"master","b84555715a3ada8f330fce8f140d9a6152553120",".skill-workspace\u002Fiteration-0-snapshot\u002Fskills\u002Fcoherence-repair",0,"https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence","https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL","https:\u002F\u002Fhumblefool.vercel.app","Full-stack developer & problem solver. React\u002FNext + Node, plus developer tooling and AI-assisted workflows. Maintainer of Hookpilot.","2026-07-20 11:58:26",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add HUMBLEF0OL\u002Fcoherence --skill coherence-repair",{"tool":37,"command":38},"bunx","bunx skills add HUMBLEF0OL\u002Fcoherence --skill coherence-repair",{"tool":40,"command":41},"pnpm","pnpm dlx skills add HUMBLEF0OL\u002Fcoherence --skill coherence-repair","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence\u002Fblob\u002Fmaster\u002F.skill-workspace\u002Fiteration-0-snapshot\u002Fskills\u002Fcoherence-repair\u002FSKILL.md",true,[],[46,53,60,66,72,78],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M722M3P5V2VG6598NW55B8CX","mcp-sentry-grader","Helper for invoking the mcp-sentry CLI and interpreting its A–F grade output. Use when the user asks about MCP security posture, OWASP MCP Top 10 scan results, or wants to fail a CI gate on a minimum grade threshold.","https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence\u002Fblob\u002Fmaster\u002Ftests\u002Ffixtures\u002Fmcp-sentry\u002F.claude\u002Fskills\u002Fmcp-sentry-grader\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M722M2VHBCPWTG1FYKTY577X","foo-skill","A test skill","https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence\u002Fblob\u002Fmaster\u002Ftests\u002Ffixtures\u002Fcodebases\u002Fsmall\u002F.claude\u002Fskills\u002Ffoo\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M722M1NJJZA0YN23MEHT768M","author","https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence\u002Fblob\u002Fmaster\u002Fprompts\u002Fv2\u002Fauthor\u002Fskill.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M722KZFTXFT1EC89XP89SCC1","coherence-status","https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence\u002Fblob\u002Fmaster\u002F.skill-workspace\u002Fiteration-0-snapshot\u002Fskills\u002Fcoherence-status\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M722KXYH6XCN7W8FHEVJSK1A","coherence-review","https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence\u002Fblob\u002Fmaster\u002F.skill-workspace\u002Fiteration-0-snapshot\u002Fskills\u002Fcoherence-review\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M722KT4TTT00H9RH5E0CEH0N","coherence-recover","https:\u002F\u002Fgithub.com\u002FHUMBLEF0OL\u002Fcoherence\u002Fblob\u002Fmaster\u002F.skill-workspace\u002Fiteration-0-snapshot\u002Fskills\u002Fcoherence-recover\u002FSKILL.md",[],[]]