[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AVMSFNWK4JEZ27SBDCSPXF":3,"skill-same:01M7AVMSFNWK4JEZ27SBDCSPXF":65},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7AVMSFNWK4JEZ27SBDCSPXF","codebase-context-governor",null,"Audit, partition, budget, and enforce multi-layer codebase context files across coding agents. Eliminates context rot through Three-Layer boundaries, automated CI linters, and dynamic compute tier calibration. Do not use for generic prompt writing.","SpectreDeath\u002FBrain-Harness","SpectreDeath","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F207463416?v=4","01M7AVGR1D4X8ADT47APKGVH2Z","JL","01M7AVGR2HSGD23BA5DBTJJTVN",0,"MIT","https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcodebase-context-governor\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: codebase-context-governor\ndescription: Audit, partition, budget, and enforce multi-layer codebase context files across coding agents. Eliminates context rot through Three-Layer boundaries, automated CI linters, and dynamic compute tier calibration. Do not use for generic prompt writing.\n---\n\n# Codebase Context Governor: Multi-Agent Context Lifecycle & Budgeting\n\n`codebase-context-governor` is an authoritative composite meta-skill that orchestrates the governance, partitioning, linting, and synchronization of codebase context files (`AGENTS.md`, `CLAUDE.md`, `.cursor\u002Frules\u002F`) across heterogeneous AI coding agents.\n\nIt coordinates four specialized capabilities:\n1. **Multi-Layer Context Architecture & Synchronization** ([`codebase-context-architect`](..\u002Fcodebase-context-architect\u002FSKILL.md))\n2. **Repository Instruction Hygiene & Boundary Enforcement** ([`agent-instruction-architect`](..\u002Fagent-instruction-architect\u002FSKILL.md))\n3. **Enterprise Skill Specification & Progressive Governance** ([`agent-skills-architect`](..\u002Fagent-skills-architect\u002FSKILL.md))\n4. **5D Dynamic Compute & Reasoning Tier Assessment** ([`compute-model-assessor`](..\u002Fcompute-model-assessor\u002FSKILL.md))\n\nSee [CARD.md](CARD.md) for the companion summary card, 5-stage progression matrix, and invariants checklist.\nConsult `\u002Fcodebase-context-architect` for synchronization engines, `\u002Fagent-instruction-architect` for negative boundary guidelines, and [governance-playbook.md](references\u002Fgovernance-playbook.md) for governance playbooks.\n\n---\n\n## The 5-Stage Context Governance Progression\n\n```\n[1. Smell & Budget Audit] ──► [2. Three-Layer Partitioning] ──► [3. SSOT Synchronization]\n                                                                        │\n                                                                        ▼\n[5. Dynamic Compute Calibration] ◄── [4. Automated CI Linter Enforcement] ◄─────┘\n```\n\n---\n\n## 1. Context Rot & Smell Auditing\n\nConduct a comprehensive scan across all agent context and instruction files in the workspace:\n\n1. **Smell Diagnostics (Rule 11)**:\n   - Identify **Lint Leakage**: Repetitive compiler\u002Flinter error lists that pollute context windows.\n   - Identify **Context Bloat**: Instruction files exceeding 150 lines or 4,000 tokens.\n   - Identify **Instruction Contradiction**: Divergent commands or architectural patterns across competing tool files.\n2. **Verify Execution Seams**:\n   - Confirm explicit build, test, and lint commands are defined with zero ambiguity.\n3. **Inspect Negative Boundaries**:\n   - Confirm explicit \"what NOT to touch\" boundaries are present in instruction files.\n\n> **Completion criterion**: Context smell diagnostic scorecard generated with token budget violations and line count hotspots isolated.\n\n---\n\n## 2. Three-Layer Context Partitioning\n\nPartition unstructured context into three strictly bounded architectural layers:\n\n1. **Layer 1: Constitution & Kernel Invariants**:\n   - System identity, core security boundaries, immutable architectural invariants (Rule 1 to Rule 44).\n2. **Layer 2: Project Execution Seams (SSOT)**:\n   - Command palettes, test contracts, domain taxonomies, and modular plugin directories.\n   - Preserved under canonical instruction files (`AGENTS.md`).\n3. **Layer 3: Ephemeral Task Context**:\n   - Session trajectories, sub-agent task allocations, and in-flight transaction states.\n\n> **Completion criterion**: Codebase context partitioned across all 3 layers with zero cross-layer bleeding.\n\n---\n\n## 3. Single Source of Truth (SSOT) Synchronization\n\nSynchronize derived context files from primary repository manifests:\n\n1. **Single Source Generation**:\n   - Derive agent tool lists, plugin registries, and CLI schemas from active workspace code rather than manual copy-paste.\n2. **Cross-Agent Export**:\n   - Project shared architectural rules into client-specific locations (`CLAUDE.md`, `.cursorrules`) using deterministic generators.\n3. **Preserve Custom Overrides**:\n   - Support zero-fork configuration layers (`config.default.yaml` vs `.agents\u002Fskills.config.yaml`).\n\n> **Completion criterion**: All agent context files synchronized against SSOT with zero drift detected.\n\n---\n\n## 4. Automated CI Linter Enforcement\n\nEmbed context validation into continuous integration and pre-commit pipelines:\n\n1. **Context Linter Execution (Rule 10)**:\n   - Execute `harness context lint` to assert line counts ($\\le 150$ lines for instructions), token limits, and link integrity.\n2. **Format & Delimiter Verification**:\n   - Verify frontmatter budgets ($100 \\le \\text{chars} \\le 350$) and ASCII delimiter syntax (Rule 37).\n3. **Git Pre-Commit Seams**:\n   - Block commits that introduce unbudgeted instruction files or malformed YAML configs.\n\n> **Completion criterion**: CI linter passes 100% with zero critical warnings across all repository context files.\n\n---\n\n## 5. Dynamic Compute Model Assessment\n\nEvaluate the governed repository state and calibrate optimal reasoning compute budgets:\n\n1. **5D Complexity Evaluation (Rule 25)**:\n   - Score repository Span, Depth, Concurrency, Rigor, and Domain Heterogeneity.\n2. **Thinking Budget Calibration**:\n   - Route agent sessions to optimal reasoning tiers (High, Medium, Low, Off) calibrated for target foundation models.\n3. **Subprocess Timeout Scaling**:\n   - Dynamically adjust async subprocess runner timeouts to prevent false-positive watchdog terminations during deep refactors.\n\n> **Completion criterion**: Compute tier recommendation and reasoning budget calibrated for current codebase complexity.\n\n---\n\n## The Three Foundational Pillars\n\n### 1. The Visual Brief Pillar\nEvery context governance cycle renders an interactive HTML visual brief in `%TEMP%` displaying layer allocation pie charts, line count distributions, and token budget gauges.\n\n### 2. The Mandatory Checkpoint Pillar\nThe agent must never prune, truncate, or rewrite repository instruction files without first presenting `implementation_plan.md` with `RequestFeedback: true` and awaiting explicit user confirmation.\n\n### 3. Explicit Anti-Patterns\nRigid architectural boundaries prevent context bloating, instruction drift, and silent linter bypasses.\n\n---\n\n## Anti-Patterns\n\n- **Unbounded Instruction Bloat** — Allowing `AGENTS.md` or `CLAUDE.md` to exceed 150 lines or contain verbose tutorials.\n- **Lint Leakage Infiltration** — Pasting transient linter warnings or error logs directly into persistent agent instruction files.\n- **Multi-Source Instruction Drift** — Maintaining duplicate manual rule sets across different agent files instead of generating from SSOT.\n- **Static Reasoning Misallocation** — Running heavy reasoning models on trivial tasks or starving complex multi-agent audits of compute budget.\n- **Unchecked Link Rot** — Maintaining dead markdown links or invalid symbol anchors in context files.\n- **Missing Negative Boundaries** — Specifying agent permissions without explicit negative constraints (\"Do not edit...\").\n","# Codebase Context Governor: Multi-Agent Context Lifecycle & Budgeting\n\n`codebase-context-governor` is an authoritative composite meta-skill that orchestrates the governance, partitioning, linting, and synchronization of codebase context files (`AGENTS.md`, `CLAUDE.md`, `.cursor\u002Frules\u002F`) across heterogeneous AI coding agents.\n\nIt coordinates four specialized capabilities:\n1. **Multi-Layer Context Architecture & Synchronization** ([`codebase-context-architect`](..\u002Fcodebase-context-architect\u002FSKILL.md))\n2. **Repository Instruction Hygiene & Boundary Enforcement** ([`agent-instruction-architect`](..\u002Fagent-instruction-architect\u002FSKILL.md))\n3. **Enterprise Skill Specification & Progressive Governance** ([`agent-skills-architect`](..\u002Fagent-skills-architect\u002FSKILL.md))\n4. **5D Dynamic Compute & Reasoning Tier Assessment** ([`compute-model-assessor`](..\u002Fcompute-model-assessor\u002FSKILL.md))\n\nSee [CARD.md](CARD.md) for the companion summary card, 5-stage progression matrix, and invariants checklist.\nConsult `\u002Fcodebase-context-architect` for synchronization engines, `\u002Fagent-instruction-architect` for negative boundary guidelines, and [governance-playbook.md](references\u002Fgovernance-playbook.md) for governance playbooks.\n\n---\n\n## The 5-Stage Context Governance Progression\n\n```\n[1. Smell & Budget Audit] ──► [2. Three-Layer Partitioning] ──► [3. SSOT Synchronization]\n                                                                        │\n                                                                        ▼\n[5. Dynamic Compute Calibration] ◄── [4. Automated CI Linter Enforcement] ◄─────┘\n```\n\n---\n\n## 1. Context Rot & Smell Auditing\n\nConduct a comprehensive scan across all agent context and instruction files in the workspace:\n\n1. **Smell Diagnostics (Rule 11)**:\n   - Identify **Lint Leakage**: Repetitive compiler\u002Flinter error lists that pollute context windows.\n   - Identify **Context Bloat**: Instruction files exceeding 150 lines or 4,000 tokens.\n   - Identify **Instruction Contradiction**: Divergent commands or architectural patterns across competing tool files.\n2. **Verify Execution Seams**:\n   - Confirm explicit build, test, and lint commands are defined with zero ambiguity.\n3. **Inspect Negative Boundaries**:\n   - Confirm explicit \"what NOT to touch\" boundaries are present in instruction files.\n\n> **Completion criterion**: Context smell diagnostic scorecard generated with token budget violations and line count hotspots isolated.\n\n---\n\n## 2. Three-Layer Context Partitioning\n\nPartition unstructured context into three strictly bounded architectural layers:\n\n1. **Layer 1: Constitution & Kernel Invariants**:\n   - System identity, core security boundaries, immutable architectural invariants (Rule 1 to Rule 44).\n2. **Layer 2: Project Execution Seams (SSOT)**:\n   - Command palettes, test contracts, domain taxonomies, and modular plugin directories.\n   - Preserved under canonical instruction files (`AGENTS.md`).\n3. **Layer 3: Ephemeral Task Context**:\n   - Session trajectories, sub-agent task allocations, and in-flight transaction states.\n\n> **Completion criterion**: Codebase context partitioned across all 3 layers with zero cross-layer bleeding.\n\n---\n\n## 3. Single Source of Truth (SSOT) Synchronization\n\nSynchronize derived context files from primary repository manifests:\n\n1. **Single Source Generation**:\n   - Derive agent tool lists, plugin registries, and CLI schemas from active workspace code rather than manual copy-paste.\n2. **Cross-Agent Export**:\n   - Project shared architectural rules into client-specific locations (`CLAUDE.md`, `.cursorrules`) using deterministic generators.\n3. **Preserve Custom Overrides**:\n   - Support zero-fork configuration layers (`config.default.yaml` vs `.agents\u002Fskills.config.yaml`).\n\n> **Completion criterion**: All agent context files synchronized against SSOT with zero drift detected.\n\n---\n\n## 4. Automated CI Linter Enforcement\n\nEmbed context validation into continuous integration and pre-commit pipelines:\n\n1. **Context Linter Execution (Rule 10)**:\n   - Execute `harness context lint` to assert line counts ($\\le 150$ lines for instructions), token limits, and link integrity.\n2. **Format & Delimiter Verification**:\n   - Verify frontmatter budgets ($100 \\le \\text{chars} \\le 350$) and ASCII delimiter syntax (Rule 37).\n3. **Git Pre-Commit Seams**:\n   - Block commits that introduce unbudgeted instruction files or malformed YAML configs.\n\n> **Completion criterion**: CI linter passes 100% with zero critical warnings across all repository context files.\n\n---\n\n## 5. Dynamic Compute Model Assessment\n\nEvaluate the governed repository state and calibrate optimal reasoning compute budgets:\n\n1. **5D Complexity Evaluation (Rule 25)**:\n   - Score repository Span, Depth, Concurrency, Rigor, and Domain Heterogeneity.\n2. **Thinking Budget Calibration**:\n   - Route agent sessions to optimal reasoning tiers (High, Medium, Low, Off) calibrated for target foundation models.\n3. **Subprocess Timeout Scaling**:\n   - Dynamically adjust async subprocess runner timeouts to prevent false-positive watchdog terminations during deep refactors.\n\n> **Completion criterion**: Compute tier recommendation and reasoning budget calibrated for current codebase complexity.\n\n---\n\n## The Three Foundational Pillars\n\n### 1. The Visual Brief Pillar\nEvery context governance cycle renders an interactive HTML visual brief in `%TEMP%` displaying layer allocation pie charts, line count distributions, and token budget gauges.\n\n### 2. The Mandatory Checkpoint Pillar\nThe agent must never prune, truncate, or rewrite repository instruction files without first presenting `implementation_plan.md` with `RequestFeedback: true` and awaiting explicit user confirmation.\n\n### 3. Explicit Anti-Patterns\nRigid architectural boundaries prevent context bloating, instruction drift, and silent linter bypasses.\n\n---\n\n## Anti-Patterns\n\n- **Unbounded Instruction Bloat** — Allowing `AGENTS.md` or `CLAUDE.md` to exceed 150 lines or contain verbose tutorials.\n- **Lint Leakage Infiltration** — Pasting transient linter warnings or error logs directly into persistent agent instruction files.\n- **Multi-Source Instruction Drift** — Maintaining duplicate manual rule sets across different agent files instead of generating from SSOT.\n- **Static Reasoning Misallocation** — Running heavy reasoning models on trivial tasks or starving complex multi-agent audits of compute budget.\n- **Unchecked Link Rot** — Maintaining dead markdown links or invalid symbol anchors in context files.\n- **Missing Negative Boundaries** — Specifying agent permissions without explicit negative constraints (\"Do not edit...\").\n",{"name":5,"description":7},"main","eff3b00e36d1d233ad4a4389605c82fbfa0326d3",".agents\u002Fskills\u002Fcodebase-context-governor","https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness","https:\u002F\u002Fgithub.com\u002FSpectreDeath","I'm here to manage stress so I wouldn't expect earth shattering break throughs I'm just an enthusiast that likes making stuff. ","2026-11-15 05:32:58",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add SpectreDeath\u002FBrain-Harness --skill codebase-context-governor",{"tool":37,"command":38},"bunx","bunx skills add SpectreDeath\u002FBrain-Harness --skill codebase-context-governor",{"tool":40,"command":41},"pnpm","pnpm dlx skills add SpectreDeath\u002FBrain-Harness --skill codebase-context-governor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcodebase-context-governor\u002FSKILL.md",true,[45,51,55,59],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"CARD.md","REFERENCE","参考文档",3600,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcodebase-context-governor\u002FCARD.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"config.default.yaml",833,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcodebase-context-governor\u002Fconfig.default.yaml",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fgovernance-playbook.md",1267,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcodebase-context-governor\u002Freferences\u002Fgovernance-playbook.md",{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"scripts\u002Fcontext_governance_driver.py","SCRIPT","脚本",3010,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcodebase-context-governor\u002Fscripts\u002Fcontext_governance_driver.py",[66,73,80,87,94,101],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7E0W6FR68J2N9CXCZTAQJFX","ui-behavior-primitive-architect","Architect, audit, and verify zero-dependency headless UI behavior primitives, WebMCP agent bridges, WAI-ARIA\u002FSSR\u002FRTL tri-modal checks, and framework expert routing. Do not use for static CSS theme styling or backend database migrations.","https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fui-behavior-primitive-architect\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"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},"01M7E0VZ7JQNW34G271DENFGYP","trustgraph-ontology-governor","Govern knowledge graphs, SHACL-AF triple policies, OntologyRAG subclass validation, PROV-O dual named graphs, and Laya entropy decision scoring. Do not use for relational SQL queries or generic web scraping.","https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrustgraph-ontology-governor\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7E0VQ6Z7R45Q8QAZ4MT39EK","shim-harness-governor","Govern universal CLI agent loops, 4-tier tool permissions, ancestor-symlink workspace sandboxes, deterministic-first command routing, collision-safe MCP namespacing, and layered skill loading. Do not use for static UI styling or external SQL analytics.","https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fshim-harness-governor\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7E0VC18NMP1QBSRJ3TPQ7MB","graphiti-zep-memory-governor","Govern bi-temporal knowledge graphs with Graphiti future-edge clamping, MinHash\u002FLSH entity dedup, RRF\u002FMMR reranking, and Zep typed ontologies. Do not use for static SQL joins or generic web crawling.","https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgraphiti-zep-memory-governor\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"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},"01M7E0V12ABE1RW3ZRCST8VH5Z","agora-mcp-workbench-architect","Architect, audit, and orchestrate Agora Workbench MCP servers, loopback sidecars, unified state graphs, gateway\u002Fdispatcher connectors, and policy-enforced data lakes. Do not use for static frontend CSS styling or non-MCP desktop GUI automation.","https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fagora-mcp-workbench-architect\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7BFYG6QT3484VC57TZ19V7P","skill-eval-assurance-runner","Evaluate and assure agent skills using small-N Wilson confidence intervals, unbiased pass^k reliability, deterministic trajectory graders, preflight boundary honesty, and sealed digest verification. Do not use for subjective prose review or unconstrained production deployment.","https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fskill-eval-assurance-runner\u002FSKILL.md",[],[]]