[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AVKYDGSP7PZREK90Q31DJK":3,"skill-same:01M7AVKYDGSP7PZREK90Q31DJK":61},{"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},"01M7AVKYDGSP7PZREK90Q31DJK","brain-artifact-miner",null,"Extract, deconstruct, and synthesize operational skills, plan evolutions, and reusable scratch utilities from IDE brain artifact stores and streaming transcripts. Do not use for simple file listing or raw SQLite database mutations.","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\u002Fbrain-artifact-miner\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: brain-artifact-miner\ndescription: Extract, deconstruct, and synthesize operational skills, plan evolutions, and reusable scratch utilities from IDE brain artifact stores and streaming transcripts. Do not use for simple file listing or raw SQLite database mutations.\n---\n\n# Brain Artifact Miner\n\n`brain-artifact-miner` is the filesystem-native workspace archaeology and scratch utility salvage engine for autonomous coding agents. It extracts, deconstructs, and synthesizes operational skills, plan evolutions, and reusable scratch utilities from IDE brain artifact stores (`C:\\Users\\spectre\\.gemini\\antigravity-ide\\brain\\`) and streaming transcripts (`transcript.jsonl` \u002F `transcript_full.jsonl`).\n\nWhile `conversations\u002F*.db` contains the relational SQLite database of step execution payloads (addressed by [conversation-trajectory-miner](..\u002Fconversation-trajectory-miner\u002FSKILL.md)), the `brain\u002F` directory constitutes the **filesystem-native epistemic workspace**: an orthogonal artifact tier capturing Python scratch tools, implementation plans, walkthrough documents, subprocess task logs, and untruncated model reasoning streams.\n\nThe miner executes an automated 5-stage mining progression across workspace artifact stores:\n\n```\n[1. Store Discovery & Boundary-Safe Handshake] → [2. Dual-Transcript & Artifact Topology Index] → [3. Scratch Tool Archaeology & Subprocess Task Triage] → [4. Dual-Lens Cognitive Bifurcation] → [5. Skill SDLC Validation & Knowledge Graph Commit]\n```\n\nSee [CARD.md](CARD.md) for the companion summary card, prompt catalog, and verification rubrics.\nConsult [book-to-skill-forge](..\u002Fbook-to-skill-forge\u002FSKILL.md) for literature-to-skill distillation and [epistemic-memory-lifecycle](..\u002Fepistemic-memory-lifecycle\u002FSKILL.md) for knowledge item promotion.\n\n---\n\n## 1. Store Discovery & Boundary-Safe Handshake\n\nEnumerate, validate, and establish non-invasive connections to candidate conversation workspaces in the IDE brain store:\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│             BOUNDARY-RESILIENT HANDSHAKE PROTOCOL           │\n├─────────────────────────────────────────────────────────────┤\n│ 1. Codec: sys.stdout.reconfigure(encoding='utf-8')          │\n│ 2. Safety: Pivot to non-modifying shell reads on denial.    │\n│ 3. Paging: Pipe commands with Out-File -Encoding utf8.      │\n│ 4. Fallback: Query relational steps when payloads restrict. │\n│ 5. Inventory: Enumerate CIDs, mtimes, and artifact trees.   │\n└─────────────────────────────────────────────────────────────┘\n```\n\n1. **Configure Standard Streams**:\n   - Reconfigure standard output and error streams to UTF-8 at module entrypoint to eliminate `cp1252` encoding crashes on Unicode DAG symbols (Rule 23, Rule 50).\n2. **Execute Non-Invasive Protection Fallback**:\n   - When encountering IDE system protection boundary denials on `brain\u002F\u003Ccid>\u002F` paths, pivot immediately to non-modifying shell reads (`Get-Content`, `Get-ChildItem`) or decoupled relational SQLite databases (`conversations\u002F\u003Ccid>.db`, Rule 46) without stalling.\n3. **Piping & Redirection Hygiene**:\n   - Never rely on bare PowerShell `>` redirects for machine-parsed logs; enforce UTF-8 streams via `Out-File -Encoding utf8` or native subprocess piping to prevent UTF-16 LE BOM null-byte corruptions (Rule 26).\n\nConsumes artifact: brain_workspace_directory\nPrimary artifact: brain_manifest.json\n\n> **Completion criterion**: All target brain directories enumerated via UTF-8-safe shell reads, codec invariants initialized, zero protection boundary stalls, and zero bare > PowerShell redirects in any log-producing command.\n\n---\n\n## 2. Dual-Transcript & Artifact Topology Index\n\nExtract and cross-link execution streams and strategic documents across gigabyte-scale session trees without memory exhaustion:\n\n1. **Construct Binary Byte-Offset Seek Table**:\n   - For multi-megabyte `transcript.jsonl` and `transcript_full.jsonl` files exceeding 10 MB, never load files line-by-line via `f.readlines()` (Rule 48).\n   - Scan the file once in binary mode (`open(..., 'rb')`) to build an in-memory lookup table mapping `step_index` to `(byte_offset, byte_length)`.\n   - Execute all subsequent step retrievals via direct $O(1)$ random seeks (`f.seek(offset)`, `f.read(length)`).\n2. **Dual-Transcript Synchronization & Truncation Dereference**:\n   - Map compact `transcript.jsonl` steps to their untruncated reasoning counterparts in `transcript_full.jsonl` using `step_index` as the join key (Rule 22).\n   - When `is_truncated: true` is detected in a compact step, automatically dereference to `transcript_full.jsonl` to recover planner thoughts and raw tool arguments.\n3. **Artifact Lifecycle Versioning & Null-Safe Metadata Parsing**:\n   - Index `implementation_plan.md`, `walkthrough.md`, and `task.md` documents using bounded directory traversal (depth $\\le 3$, Rule 52).\n   - When parsing `.metadata.json` sidecar files, extract optional collections via `dict.get(\"key\") or []` to guard against explicit JSON `null` values returning `None` (Rule 33).\n   - Compare initial plans against final walkthroughs to measure scope deltas and completion drift.\n\nConsumes artifact: brain_manifest.json\nPrimary artifact: artifact_topology_map.json\n\n> **Completion criterion**: O(1) byte-offset index built for all transcripts >10 MB; dual-transcript step cross-links established with is_truncated dereference logic; artifact lifecycle map constructed with null-safe sidecar parsing.\n\n---\n\n## 3. Scratch Tool Archaeology & Subprocess Task Triage\n\nCatalog reusable domain utilities from ephemeral scratch folders and triage background process execution health:\n\n```\n| Category | File Archetype | Primary Role | Inspection Method |\n| :--- | :--- | :--- | :--- |\n| ast_and_lint | lint_*.py, check_*.py | Structural syntax verification | ast.parse & ast.walk |\n| database_and_sql | db_*.py, query_*.py | Relational schema reflection | sqlite3 PRAGMA reflection |\n| brief_and_visual | brief_*.py, visual_*.py | Standalone HTML generation | Regex doubled-brace checks |\n| test_and_verify | test_*.py, verify_*.py | Characterization test contracts | pytest invocation patterns |\n| search_and_grep | search_*.py, grep_*.py | Bounded pattern extraction | Regex token analysis |\n| task_subprocesses | task-*.log | Subprocess exit triage | Stderr ring-buffer scan |\n```\n\n1. **AST-Based Scratch Tool Classification**:\n   - Scan dormant Python scripts in `brain\u002F\u003Ccid>\u002Fscratch\u002F` using bounded directory walks (depth $\\le 3$, Rule 52).\n   - Parse scripts via `ast.parse` and `ast.walk` to inspect functions, docstrings, and imports (Rule 42). Classify scripts into typed domain categories.\n2. **Defensive Batch Exception Logging**:\n   - Never use bare `except Exception: continue` in batch scanning loops (Rule 32).\n   - Log unexpected errors at `logger.warning()`, and explicitly reraise programming errors (`NameError`, `TypeError`, `AttributeError`) so schema and import defects fail loudly.\n3. **Subprocess Stderr Drainage & Deadlock Triage**:\n   - Ingest `.system_generated\u002Ftasks\u002Ftask-*.log` background task outputs.\n   - Scan for non-zero exit codes, tracebacks, and proactor pipe buffer deadlocks.\n   - Maintain a bounded ring-buffer for stderr lines to surface failure diagnostics cleanly (Rule 53).\n4. **F-String Template Hygiene**:\n   - When synthesizing HTML visual briefs, ensure all CSS rules and regex syntax inside Python f-strings use doubled braces (`{{`, `}}`) to prevent runtime string formatting crashes (Rule 51).\n\nConsumes artifact: artifact_topology_map.json\nPrimary artifact: scratch_and_task_catalog.json\n\n> **Completion criterion**: >= 50 scripts classified across >= 4 categories; background task triage report emitted with non-zero exit code and deadlock signature counts; zero silent except: continue suppressions; zero bare > PowerShell redirects in log capture commands.\n\n---\n\n## 4. Dual-Lens Cognitive Bifurcation (Epistemic & Procedural)\n\nStrictly bifurcate distilled artifact learnings into two complementary operational seams (Rule 41):\n\nConsumes artifact: scratch_and_task_catalog.json\nPrimary artifact: epistemic_procedural_spec.json\n\n> **Completion criterion**: Distillation strictly bifurcated into validated Knowledge Vault items with unbroken isnad lineage and executable skill scaffolds with zero-fork configuration.\n\n### 4a. Epistemic Introspection Seam (Knowledge Vault)\n- Extract verified heuristics, workspace topologies, and failure recovery invariants from artifact lifecycle drift and background task triage.\n- Commit distilled items to the Knowledge Vault under `.harness\u002Fknowledge\u002F\u003Cki_id>\u002F` strictly adhering to the canonical dual-file directory format (`metadata.json` + `summary.md`, Rule 40).\n- Anchor every claim with unbroken isnad provenance citing primary conversation UUIDs, script paths, and transcript step indices.\n\n### 4b. Procedural Skill Synthesis Seam (Agent Skill Scaffolding)\n- Synthesize executable agent skills under `.agents\u002Fskills\u002F\u003Cskill-name>\u002F` with structured 5-stage progression matrices.\n- Author companion summary cards (`CARD.md`) with ASCII metadata boxes, stage tables, and mandatory invariant checklists using relative links (Rule 37, Rule 47).\n- Provide co-located `config.default.yaml` defining baseline operational budgets (timeouts, token limits, retry bounds, Rule 44).\n- Implement modular, executable Python scripts in `scripts\u002F` using domain-prefixed names (`brain_artifact_miner.py`) to prevent global `sys.modules` collisions (Rule 57).\n\n---\n\n## 5. Skill SDLC Validation & Knowledge Graph Commit\n\nValidate the synthesized artifacts against craft standards and index the capabilities into the runtime knowledge graph:\n\n1. **Execute Diagnostic Craft Validation**:\n   - Run `SkillValidator.validate()` to assert complete compliance across structural, frontmatter, pillar, and card rules (Rule 34).\n   - Evaluate boolean status via `report.valid` and inspect granular rule executions through `report.checks` (never check `.passed`).\n   - Verify frontmatter description length (100–350 characters) with explicit negative boundaries (Rule 44).\n   - Ensure companion `CARD.md` utilizes single-pipe `│` borders and the exact `SKILL: \u003Cname>` tag (Rule 37).\n2. **Index into Skill Knowledge Graph**:\n   - Trigger `BuiltinSkillRegistryService.index_catalog()` to register the new skill node and compute topological dependency edges (`FEEDS`, `REQUIRES`, Rule 35, Rule 55).\n3. **Register in Context Map**:\n   - Update `CONTEXT-MAP.md` under the Agent Orchestration domain, defining explicit negative boundaries distinguishing from relational trajectory mining.\n\nConsumes artifact: epistemic_procedural_spec.json\nPrimary artifact: skill_validation_report.json\n\n> **Completion criterion**: Skill SDLC pipeline completes with valid status and zero warnings; skill indexed in knowledge graph with validated FEEDS edges.\n\n---\n\n## The Three Foundational Pillars\n\n### Pillar I: The Visual Brief\nSynthesize findings, artifact inventory heatmaps, and task log triage metrics into a self-contained HTML visual brief written to `%TEMP%\\brain-artifact-miner-\u003Ctimestamp>.html` (or `\u002Ftmp\u002Fbrain-artifact-miner-\u003Ctimestamp>.html` on Unix) loading Tailwind CSS and Mermaid.js via CDN. Present the absolute clickable path to the user for visual review.\n\n### Pillar II: The Mandatory Checkpoint\nWhen proposing new skill creation, structural modifications, or epistemic knowledge commits, always author an `implementation_plan.md` artifact with `RequestFeedback: true`. The agent must **STOP and wait** for explicit human confirmation before executing mutating actions.\n\n### Pillar III: Explicit Anti-Patterns\nRigid behavioral boundaries must be maintained to prevent catastrophic failure modes.\n\n---\n\n## Anti-Patterns\n\n- **Unbounded Directory Traversal** — Executing unpruned recursive walks across 343 conversation directories causing pipe exhaustion and CPU thrash instead of depth-bounded traversal.\n- **Protection Boundary Stall** — Halting or repeatedly failing when file tools encounter IDE system protection denials instead of pivoting immediately to non-modifying shell reads.\n- **Scratch Script Amnesia** — Leaving valuable AST tools and diagnostic scripts dormant in dead conversation folders without cataloging or salvage.\n- **Silent Batch Exception Suppression** — Using bare `except Exception: continue` in batch scanning loops, masking missing imports and schema bugs as empty classification results.\n- **Subprocess Pipe Deadlock Blindness** — Ignoring background task stderr dumps and buffer locks in task logs instead of ring-buffered stderr drainage.\n- **Truncated Transcript Blindness** — Relying solely on compact transcripts where model thoughts are truncated without auto-dereferencing to full transcripts.\n- **Generic Script Module Naming** — Naming helper scripts with generic names like `miner.py` that pollute `sys.modules` instead of domain-prefixed naming.\n- **Absolute URI Links in CARD.md** — Using `file:\u002F\u002F\u002F` absolute paths in cross-skill references breaking portability across CI runners and container sandboxes.\n- **JSON Null-Field Iteration Crash** — Using `dict.get(\"key\", [])` when reading optional sidecar lists, crashing on explicit JSON `null` values instead of `dict.get(\"key\") or []`.\n- **Epistemic Seam Bypass** — Scaffolding procedural skill files while failing to commit ground-truth isnad items to the Knowledge Vault.\n- **Unverified Skill Scaffolding** — Committing skills without running `SkillValidator` or consuming reports via `report.valid` and `report.checks`.\n","# Brain Artifact Miner\n\n`brain-artifact-miner` is the filesystem-native workspace archaeology and scratch utility salvage engine for autonomous coding agents. It extracts, deconstructs, and synthesizes operational skills, plan evolutions, and reusable scratch utilities from IDE brain artifact stores (`C:\\Users\\spectre\\.gemini\\antigravity-ide\\brain\\`) and streaming transcripts (`transcript.jsonl` \u002F `transcript_full.jsonl`).\n\nWhile `conversations\u002F*.db` contains the relational SQLite database of step execution payloads (addressed by [conversation-trajectory-miner](..\u002Fconversation-trajectory-miner\u002FSKILL.md)), the `brain\u002F` directory constitutes the **filesystem-native epistemic workspace**: an orthogonal artifact tier capturing Python scratch tools, implementation plans, walkthrough documents, subprocess task logs, and untruncated model reasoning streams.\n\nThe miner executes an automated 5-stage mining progression across workspace artifact stores:\n\n```\n[1. Store Discovery & Boundary-Safe Handshake] → [2. Dual-Transcript & Artifact Topology Index] → [3. Scratch Tool Archaeology & Subprocess Task Triage] → [4. Dual-Lens Cognitive Bifurcation] → [5. Skill SDLC Validation & Knowledge Graph Commit]\n```\n\nSee [CARD.md](CARD.md) for the companion summary card, prompt catalog, and verification rubrics.\nConsult [book-to-skill-forge](..\u002Fbook-to-skill-forge\u002FSKILL.md) for literature-to-skill distillation and [epistemic-memory-lifecycle](..\u002Fepistemic-memory-lifecycle\u002FSKILL.md) for knowledge item promotion.\n\n---\n\n## 1. Store Discovery & Boundary-Safe Handshake\n\nEnumerate, validate, and establish non-invasive connections to candidate conversation workspaces in the IDE brain store:\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│             BOUNDARY-RESILIENT HANDSHAKE PROTOCOL           │\n├─────────────────────────────────────────────────────────────┤\n│ 1. Codec: sys.stdout.reconfigure(encoding='utf-8')          │\n│ 2. Safety: Pivot to non-modifying shell reads on denial.    │\n│ 3. Paging: Pipe commands with Out-File -Encoding utf8.      │\n│ 4. Fallback: Query relational steps when payloads restrict. │\n│ 5. Inventory: Enumerate CIDs, mtimes, and artifact trees.   │\n└─────────────────────────────────────────────────────────────┘\n```\n\n1. **Configure Standard Streams**:\n   - Reconfigure standard output and error streams to UTF-8 at module entrypoint to eliminate `cp1252` encoding crashes on Unicode DAG symbols (Rule 23, Rule 50).\n2. **Execute Non-Invasive Protection Fallback**:\n   - When encountering IDE system protection boundary denials on `brain\u002F\u003Ccid>\u002F` paths, pivot immediately to non-modifying shell reads (`Get-Content`, `Get-ChildItem`) or decoupled relational SQLite databases (`conversations\u002F\u003Ccid>.db`, Rule 46) without stalling.\n3. **Piping & Redirection Hygiene**:\n   - Never rely on bare PowerShell `>` redirects for machine-parsed logs; enforce UTF-8 streams via `Out-File -Encoding utf8` or native subprocess piping to prevent UTF-16 LE BOM null-byte corruptions (Rule 26).\n\nConsumes artifact: brain_workspace_directory\nPrimary artifact: brain_manifest.json\n\n> **Completion criterion**: All target brain directories enumerated via UTF-8-safe shell reads, codec invariants initialized, zero protection boundary stalls, and zero bare > PowerShell redirects in any log-producing command.\n\n---\n\n## 2. Dual-Transcript & Artifact Topology Index\n\nExtract and cross-link execution streams and strategic documents across gigabyte-scale session trees without memory exhaustion:\n\n1. **Construct Binary Byte-Offset Seek Table**:\n   - For multi-megabyte `transcript.jsonl` and `transcript_full.jsonl` files exceeding 10 MB, never load files line-by-line via `f.readlines()` (Rule 48).\n   - Scan the file once in binary mode (`open(..., 'rb')`) to build an in-memory lookup table mapping `step_index` to `(byte_offset, byte_length)`.\n   - Execute all subsequent step retrievals via direct $O(1)$ random seeks (`f.seek(offset)`, `f.read(length)`).\n2. **Dual-Transcript Synchronization & Truncation Dereference**:\n   - Map compact `transcript.jsonl` steps to their untruncated reasoning counterparts in `transcript_full.jsonl` using `step_index` as the join key (Rule 22).\n   - When `is_truncated: true` is detected in a compact step, automatically dereference to `transcript_full.jsonl` to recover planner thoughts and raw tool arguments.\n3. **Artifact Lifecycle Versioning & Null-Safe Metadata Parsing**:\n   - Index `implementation_plan.md`, `walkthrough.md`, and `task.md` documents using bounded directory traversal (depth $\\le 3$, Rule 52).\n   - When parsing `.metadata.json` sidecar files, extract optional collections via `dict.get(\"key\") or []` to guard against explicit JSON `null` values returning `None` (Rule 33).\n   - Compare initial plans against final walkthroughs to measure scope deltas and completion drift.\n\nConsumes artifact: brain_manifest.json\nPrimary artifact: artifact_topology_map.json\n\n> **Completion criterion**: O(1) byte-offset index built for all transcripts >10 MB; dual-transcript step cross-links established with is_truncated dereference logic; artifact lifecycle map constructed with null-safe sidecar parsing.\n\n---\n\n## 3. Scratch Tool Archaeology & Subprocess Task Triage\n\nCatalog reusable domain utilities from ephemeral scratch folders and triage background process execution health:\n\n```\n| Category | File Archetype | Primary Role | Inspection Method |\n| :--- | :--- | :--- | :--- |\n| ast_and_lint | lint_*.py, check_*.py | Structural syntax verification | ast.parse & ast.walk |\n| database_and_sql | db_*.py, query_*.py | Relational schema reflection | sqlite3 PRAGMA reflection |\n| brief_and_visual | brief_*.py, visual_*.py | Standalone HTML generation | Regex doubled-brace checks |\n| test_and_verify | test_*.py, verify_*.py | Characterization test contracts | pytest invocation patterns |\n| search_and_grep | search_*.py, grep_*.py | Bounded pattern extraction | Regex token analysis |\n| task_subprocesses | task-*.log | Subprocess exit triage | Stderr ring-buffer scan |\n```\n\n1. **AST-Based Scratch Tool Classification**:\n   - Scan dormant Python scripts in `brain\u002F\u003Ccid>\u002Fscratch\u002F` using bounded directory walks (depth $\\le 3$, Rule 52).\n   - Parse scripts via `ast.parse` and `ast.walk` to inspect functions, docstrings, and imports (Rule 42). Classify scripts into typed domain categories.\n2. **Defensive Batch Exception Logging**:\n   - Never use bare `except Exception: continue` in batch scanning loops (Rule 32).\n   - Log unexpected errors at `logger.warning()`, and explicitly reraise programming errors (`NameError`, `TypeError`, `AttributeError`) so schema and import defects fail loudly.\n3. **Subprocess Stderr Drainage & Deadlock Triage**:\n   - Ingest `.system_generated\u002Ftasks\u002Ftask-*.log` background task outputs.\n   - Scan for non-zero exit codes, tracebacks, and proactor pipe buffer deadlocks.\n   - Maintain a bounded ring-buffer for stderr lines to surface failure diagnostics cleanly (Rule 53).\n4. **F-String Template Hygiene**:\n   - When synthesizing HTML visual briefs, ensure all CSS rules and regex syntax inside Python f-strings use doubled braces (`{{`, `}}`) to prevent runtime string formatting crashes (Rule 51).\n\nConsumes artifact: artifact_topology_map.json\nPrimary artifact: scratch_and_task_catalog.json\n\n> **Completion criterion**: >= 50 scripts classified across >= 4 categories; background task triage report emitted with non-zero exit code and deadlock signature counts; zero silent except: continue suppressions; zero bare > PowerShell redirects in log capture commands.\n\n---\n\n## 4. Dual-Lens Cognitive Bifurcation (Epistemic & Procedural)\n\nStrictly bifurcate distilled artifact learnings into two complementary operational seams (Rule 41):\n\nConsumes artifact: scratch_and_task_catalog.json\nPrimary artifact: epistemic_procedural_spec.json\n\n> **Completion criterion**: Distillation strictly bifurcated into validated Knowledge Vault items with unbroken isnad lineage and executable skill scaffolds with zero-fork configuration.\n\n### 4a. Epistemic Introspection Seam (Knowledge Vault)\n- Extract verified heuristics, workspace topologies, and failure recovery invariants from artifact lifecycle drift and background task triage.\n- Commit distilled items to the Knowledge Vault under `.harness\u002Fknowledge\u002F\u003Cki_id>\u002F` strictly adhering to the canonical dual-file directory format (`metadata.json` + `summary.md`, Rule 40).\n- Anchor every claim with unbroken isnad provenance citing primary conversation UUIDs, script paths, and transcript step indices.\n\n### 4b. Procedural Skill Synthesis Seam (Agent Skill Scaffolding)\n- Synthesize executable agent skills under `.agents\u002Fskills\u002F\u003Cskill-name>\u002F` with structured 5-stage progression matrices.\n- Author companion summary cards (`CARD.md`) with ASCII metadata boxes, stage tables, and mandatory invariant checklists using relative links (Rule 37, Rule 47).\n- Provide co-located `config.default.yaml` defining baseline operational budgets (timeouts, token limits, retry bounds, Rule 44).\n- Implement modular, executable Python scripts in `scripts\u002F` using domain-prefixed names (`brain_artifact_miner.py`) to prevent global `sys.modules` collisions (Rule 57).\n\n---\n\n## 5. Skill SDLC Validation & Knowledge Graph Commit\n\nValidate the synthesized artifacts against craft standards and index the capabilities into the runtime knowledge graph:\n\n1. **Execute Diagnostic Craft Validation**:\n   - Run `SkillValidator.validate()` to assert complete compliance across structural, frontmatter, pillar, and card rules (Rule 34).\n   - Evaluate boolean status via `report.valid` and inspect granular rule executions through `report.checks` (never check `.passed`).\n   - Verify frontmatter description length (100–350 characters) with explicit negative boundaries (Rule 44).\n   - Ensure companion `CARD.md` utilizes single-pipe `│` borders and the exact `SKILL: \u003Cname>` tag (Rule 37).\n2. **Index into Skill Knowledge Graph**:\n   - Trigger `BuiltinSkillRegistryService.index_catalog()` to register the new skill node and compute topological dependency edges (`FEEDS`, `REQUIRES`, Rule 35, Rule 55).\n3. **Register in Context Map**:\n   - Update `CONTEXT-MAP.md` under the Agent Orchestration domain, defining explicit negative boundaries distinguishing from relational trajectory mining.\n\nConsumes artifact: epistemic_procedural_spec.json\nPrimary artifact: skill_validation_report.json\n\n> **Completion criterion**: Skill SDLC pipeline completes with valid status and zero warnings; skill indexed in knowledge graph with validated FEEDS edges.\n\n---\n\n## The Three Foundational Pillars\n\n### Pillar I: The Visual Brief\nSynthesize findings, artifact inventory heatmaps, and task log triage metrics into a self-contained HTML visual brief written to `%TEMP%\\brain-artifact-miner-\u003Ctimestamp>.html` (or `\u002Ftmp\u002Fbrain-artifact-miner-\u003Ctimestamp>.html` on Unix) loading Tailwind CSS and Mermaid.js via CDN. Present the absolute clickable path to the user for visual review.\n\n### Pillar II: The Mandatory Checkpoint\nWhen proposing new skill creation, structural modifications, or epistemic knowledge commits, always author an `implementation_plan.md` artifact with `RequestFeedback: true`. The agent must **STOP and wait** for explicit human confirmation before executing mutating actions.\n\n### Pillar III: Explicit Anti-Patterns\nRigid behavioral boundaries must be maintained to prevent catastrophic failure modes.\n\n---\n\n## Anti-Patterns\n\n- **Unbounded Directory Traversal** — Executing unpruned recursive walks across 343 conversation directories causing pipe exhaustion and CPU thrash instead of depth-bounded traversal.\n- **Protection Boundary Stall** — Halting or repeatedly failing when file tools encounter IDE system protection denials instead of pivoting immediately to non-modifying shell reads.\n- **Scratch Script Amnesia** — Leaving valuable AST tools and diagnostic scripts dormant in dead conversation folders without cataloging or salvage.\n- **Silent Batch Exception Suppression** — Using bare `except Exception: continue` in batch scanning loops, masking missing imports and schema bugs as empty classification results.\n- **Subprocess Pipe Deadlock Blindness** — Ignoring background task stderr dumps and buffer locks in task logs instead of ring-buffered stderr drainage.\n- **Truncated Transcript Blindness** — Relying solely on compact transcripts where model thoughts are truncated without auto-dereferencing to full transcripts.\n- **Generic Script Module Naming** — Naming helper scripts with generic names like `miner.py` that pollute `sys.modules` instead of domain-prefixed naming.\n- **Absolute URI Links in CARD.md** — Using `file:\u002F\u002F\u002F` absolute paths in cross-skill references breaking portability across CI runners and container sandboxes.\n- **JSON Null-Field Iteration Crash** — Using `dict.get(\"key\", [])` when reading optional sidecar lists, crashing on explicit JSON `null` values instead of `dict.get(\"key\") or []`.\n- **Epistemic Seam Bypass** — Scaffolding procedural skill files while failing to commit ground-truth isnad items to the Knowledge Vault.\n- **Unverified Skill Scaffolding** — Committing skills without running `SkillValidator` or consuming reports via `report.valid` and `report.checks`.\n",{"name":5,"description":7},"main","eff3b00e36d1d233ad4a4389605c82fbfa0326d3",".agents\u002Fskills\u002Fbrain-artifact-miner","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 brain-artifact-miner",{"tool":37,"command":38},"bunx","bunx skills add SpectreDeath\u002FBrain-Harness --skill brain-artifact-miner",{"tool":40,"command":41},"pnpm","pnpm dlx skills add SpectreDeath\u002FBrain-Harness --skill brain-artifact-miner","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbrain-artifact-miner\u002FSKILL.md",true,[45,51,55],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"CARD.md","REFERENCE","参考文档",5842,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbrain-artifact-miner\u002FCARD.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"config.default.yaml",288,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbrain-artifact-miner\u002Fconfig.default.yaml",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"scripts\u002Fbrain_artifact_miner.py","SCRIPT","脚本",7534,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbrain-artifact-miner\u002Fscripts\u002Fbrain_artifact_miner.py",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"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":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"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":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"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":84,"name":85,"nameZh":6,"description":86,"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},"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":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"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":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"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",[],[]]