[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AVK1RWNE64R6QEZ44X0GFT":3,"skill-same:01M7AVK1RWNE64R6QEZ44X0GFT":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},"01M7AVK1RWNE64R6QEZ44X0GFT","ai-native-harness-engineer",null,"Architect, construct, and govern production AI coding harnesses using 4-gate behavioral pipelines, credential-free MCP security, and continuous drift telemetry. Do not use for generic prompt writing, superficial AST style linting, or unauthenticated shared database backdoors.","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\u002Fai-native-harness-engineer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ai-native-harness-engineer\ndescription: Architect, construct, and govern production AI coding harnesses using 4-gate behavioral pipelines, credential-free MCP security, and continuous drift telemetry. Do not use for generic prompt writing, superficial AST style linting, or unauthenticated shared database backdoors.\n---\n\n# AI-Native Harness Engineer: Production Coding & Governance Playbook\n\n`ai-native-harness-engineer` is the procedural engineering and organizational governance engine for transforming development teams into AI-native engineering organizations. Synthesized from Tech With RJ's foundational literature (*How I Used Harness Engineering to Make Our Company AI-Native*, freeCodeCamp, Sept 2026), this skill operationalizes the core axiom of autonomous software development: **\"You stop trusting the AI. You start trusting the harness.\"**\n\nWhen software teams adopt AI coding agents, velocity frequently evaporates because engineers manually inspect and second-guess every line of generated diffs. `ai-native-harness-engineer` inverts this bottleneck. Instead of reviewing syntax, engineers design the **behavioral verification harness**—a four-gate pipeline, an enterprise Model Context Protocol (MCP) server holding zero credentials, a repo rules file with a graveyard of rejected ideas, and automated telemetry tracking documentation drift and negative demand backlogs.\n\nEvery harness engineering implementation executes this five-stage progression:\n\n```\n[1. Scoping & Baseline Telemetry] → [2. Repo Rules & Graveyard] → [3. Four Behavioral Gates] → [4. Credential-Free MCP Bridge] → [5. Drift Telemetry & Backlog Mining]\n```\n\nSee [CARD.md](CARD.md) for the companion summary card, 5-stage reference matrix, and quality checklist.\nConsult [..\u002Fagent-harness-architect\u002FSKILL.md](..\u002Fagent-harness-architect\u002FSKILL.md) for harness runtime selection, [..\u002Fcodebase-context-architect\u002FSKILL.md](..\u002Fcodebase-context-architect\u002FSKILL.md) for multi-layer rules management, and [..\u002Fdeterministic-validation-loop\u002FSKILL.md](..\u002Fdeterministic-validation-loop\u002FSKILL.md) for deterministic spec validation.\n\n---\n\n## 1. Process Scoping & Baseline Telemetry\n\nIsolate a high-friction, bounded workflow and establish measurable drift baselines before introducing coding agents:\n\n1. **Target Selection (The Anti-Mandate Rule)**:\n   - Target one high-friction, low-risk operational workflow that currently annoys engineers (e.g. stale system documentation, manual ticket triage, release note synchronization, PR validation summaries).\n   - Reject high-risk, uncontained rewrites or strategic architectural overhauls as initial harness pilots.\n   - Restrict the pilot to a single internal team boundary where data stays in-house and team members provide immediate feedback.\n2. **Data Structuring & Ownership**:\n   - Transform informal, scattered communication (Slack chats, emails, unrecorded standups) into structured, timestamped records.\n   - Assign every operational asset an explicit human owner and an authoritative source path.\n3. **Establish Baseline Staleness Metrics**:\n   - Define a concrete formula for drift:\n     $$\\text{Drift Count} = \\sum \\text{Code commits modifying path } P \\text{ since last update of doc } D(P)$$\n   - Log the baseline staleness and cycle time so that subsequent agent improvements are proved by empirical numbers rather than qualitative slide decks.\n\n> **Completion criterion**: Bounded operational workflow selected, structured ownership schema established, and baseline drift metric recorded.\n\n---\n\n## 2. Repo Rules & Graveyard Formulation\n\nConstruct the immutable contextual scaffolding that guides agent code generation across all turns:\n\n1. **System Architecture & Operational Recipes**:\n   - Author a lean repository instruction file (`AGENTS.md` \u002F `CLAUDE.md`) defining the non-negotiable tech stack, directory layouts, and step-by-step recipes for every feature.\n   - Enforce bounded context rules (\u003C150 lines) to prevent prompt bloat and context blowout.\n2. **The Graveyard of Rejected Ideas**:\n   - Explicitly document previously tested, failed, or prohibited design patterns along with the technical rationale for their rejection.\n   - Force every fresh agent session to ingest this graveyard to prevent agents from re-proposing previously discarded or invalid solutions.\n3. **Seam Definition & Negative Boundaries**:\n   - Declare strict boundaries defining files and directories that the agent must NEVER modify (e.g., vendor caches, production database seeds, authentication kernels).\n\n> **Completion criterion**: Rules file authored containing architecture recipes, explicit negative boundaries, and a populated graveyard of rejected ideas.\n\n---\n\n## 3. The Four Behavioral Gates\n\nConstruct the non-negotiable, four-gate automated verification pipeline. Allocate the entire validation budget to verifiable runtime behavior rather than superficial AST style linters:\n\n1. **Gate 1: Static Type Checker (`tsc --noEmit` \u002F `mypy`)**:\n   - Run complete, strict static type checking across the entire repository.\n   - Enforce zero type errors; reject any change with type coercion hacks (`as any`, `shoehorn` violations). Catches signature mismatches and missing properties immediately at zero runtime cost.\n2. **Gate 2: 100% Core Logic Coverage**:\n   - Enforce binary 100% line, branch, and function coverage on core business logic.\n   - Treat coverage reports as an objective, non-negotiable to-do list for the agent: an uncovered branch mandates an additional unit test.\n3. **Gate 3: End-to-End User Simulation (Playwright)**:\n   - Execute an automated browser or API test suite simulating authentic user workflows.\n   - Author assertions in plain-English user-observable states (e.g., \"page displays confirmation badge\", \"dialog closes\") rather than internal implementation details.\n4. **Gate 4: Live Runtime Verification & Feature Usage Demo**:\n   - Mandate that the agent boot the live application or test server and observe the exact behavior it claims to have changed.\n   - Require the agent to author a short, runnable feature usage demo page or script exercising the feature in practice. Proves behavioral claims beyond passing unit tests.\n5. **The Partial Payload Omission Audit**:\n   - Adversarially inspect update and patch endpoints to ensure partial payloads do NOT quietly reset unmentioned fields (such as visibility or security scopes) to defaults.\n\n> **Completion criterion**: All four gates automated in CI and local test runners; 100% logic coverage enforced; feature usage demo authored.\n\n---\n\n## 4. Deploy Credential-Free MCP Security Bridge\n\nExpose application tools and operational data to AI agents using the Model Context Protocol (MCP) without compromising enterprise security:\n\n1. **Zero Stored Credentials Architecture**:\n   - Ensure the MCP server holds zero database credentials, zero service keys, and zero master tokens.\n   - Forward the human user's Personal Access Token (PAT) with every tool invocation.\n2. **Server-Side Dynamic RBAC**:\n   - Require the backend API to evaluate role-based access control (RBAC) dynamically on every tool execution against the user's active role.\n   - Ensure role revocation or group privilege changes take effect instantaneously without re-minting or tracking down tokens.\n3. **Uniform Error Sanitization & Leakage Defense**:\n   - Catch 403 Forbidden responses and return clean, structured error payloads (`isError: true, text: \"Error: Forbidden.\"`).\n   - Return an identical 404 response (`No document: {slug}`) for both non-existent resources and restricted resources the user lacks permission to see, preventing enumeration attacks.\n4. **Human Authority Workflow Markers**:\n   - Implement inline `[!VERIFY]` markers for agent-flagged uncertainties during automated drafting.\n   - Implement `[!SME]` sign-off gates for compliance, financial rates, or security-sensitive paths, blocking merge\u002Fapproval until an authorized subject matter expert signs off.\n\n> **Completion criterion**: MCP server operational holding zero credentials, user PAT forwarding verified, dynamic RBAC enforced, and 403\u002F404 errors sanitized.\n\n---\n\n## 5. Activate Negative Telemetry & Agent Bottleneck Mining\n\nHarness the compounding intelligence of the AI-native feedback loop:\n\n1. **Negative Query Demand Mining**:\n   - Instrument the AI assistant to log every query it cannot answer with certainty.\n   - Cluster and rank unanswered questions into an automated backlog of documentation demand, reflecting actual user information gaps.\n2. **CI Code-to-Doc Drift Triggers**:\n   - Map code repository paths to documentation slugs.\n   - When a commit modifies code paths associated with a document, CI automatically increments the drift count and transitions approval badges from green to amber.\n3. **Document Health Scoring**:\n   - Maintain a composite health score per document (based on days since last edit, code drift count, and user feedback).\n   - Generate automated weekly digests alerting document owners to decaying assets.\n4. **Agent-Assisted Bottleneck Auditing**:\n   - Regularly query the agent against accumulated operational telemetry:\n     * *\"Where is work piling up across current PRs?\"*\n     * *\"Which step in the approval cycle has the highest wait time?\"*\n     * *\"Which documented APIs have experienced the highest code churn without documentation updates?\"*\n\n> **Completion criterion**: Unanswered queries transformed into prioritized backlog; CI drift triggers active; automated health scores computed.\n\n---\n\n## The Visual Brief Pillar\n\nWhenever architecting or reforming an operational harness, synthesize the 5-stage lifecycle DAG, 4 behavioral gates, and MCP security topology into an interactive HTML visual brief:\n\n1. **Target File Location**: Render the report into `%TEMP%\\harness-brief-\u003Ctimestamp>.html` (or `\u002Ftmp\u002F` on Unix).\n2. **Interactive Elements**: Embed dark-theme Mermaid.js diagrams illustrating the four behavioral gates and the credential-free token flow.\n3. **Telemetry Dashboard**: Include live tables of drift counts, doc health scores, and ranked negative query backlogs.\n4. **Delivery**: Present the absolute, clickable link to the user before code execution.\n\n---\n\n## Mandatory Checkpoint Gate\n\nPrevent ungrounded or unchecked mutations to the production system:\n\n1. **Implementation Plan Gate**: Before modifying repository configuration, CI pipelines, or MCP servers, author an `implementation_plan.md` artifact specifying proposed changes, boundary definitions, and testing gates.\n2. **Explicit User Sign-Off**: Set `RequestFeedback: true` in artifact metadata. STOP and wait for explicit human review before applying destructive or wide-ranging state changes.\n3. **SME Authority Invariant**: Any modification touching compliance, financial calculations, or authentication boundaries requires a mandatory checkpoint sign-off from an authorized human reviewer.\n\n---\n\n## Diagnostic Coaching Rubrics\n\n### Trust Inversion & Gate Allocation Rubric\n- **Level 1 (Failing - Score \u003C 5)**: Engineers spend 80% of their time reading agent diffs line-by-line; tests are spotty; linting errors fail builds while logic branches remain untested.\n- **Level 2 (Transitional - Score 6-8)**: Type checker and unit tests pass, but end-to-end tests are missing; engineers must manually run and verify features; agent re-proposes rejected designs.\n- **Level 3 (AI-Native - Score 9-10)**: 4 automated gates enforce 100% logic coverage and live execution; rules file maintains a graveyard of rejected patterns; engineers only review high-level boundaries and live demonstrations.\n\n### Enterprise MCP Security Rubric\n- **Level 1 (Failing - Score \u003C 5)**: MCP server connects directly to the database via root\u002Fshared credentials; actions are anonymous; 404 responses reveal hidden document titles.\n- **Level 2 (Transitional - Score 6-8)**: Token authentication is present but relies on a shared service account; role revocation requires restarting the MCP server.\n- **Level 3 (AI-Native - Score 9-10)**: MCP server holds 0 credentials; forwards user PATs; live RBAC checks on every call; actions attributed to real individuals in audit trails; identical 404 responses eliminate resource enumeration.\n\n---\n\n## Micro-Kernel IoC & Headless CLI Seams (Rule 49 & Rule 10)\n\n`ai-native-harness-engineer` is elevated into the Harness micro-kernel with typed IoC service keys, domain plugin entrypoints, and headless Click CLI commands:\n\n### 1. In-Memory Service Resolution (Rule 49)\n```python\nfrom harness.services import AI_NATIVE_HARNESS_SERVICE_KEY\n\n# Resolve authoritative service from IoC container\nharness_service = context.require(AI_NATIVE_HARNESS_SERVICE_KEY)\n\n# Run 4 behavioral verification gates\ngates = harness_service.evaluate_gates()\n\n# Calculate code-to-doc commit drift\ndrift = harness_service.calculate_code_to_doc_drift()\n\n# Audit credential-free MCP security\nmcp_check = harness_service.audit_mcp_security()\n\n# Mine unanswered queries into documentation demand\nbacklog = harness_service.mine_negative_backlog()\n```\n\n### 2. Headless Click CLI Seams (Rule 10)\n```powershell\n# Run comprehensive audit across all 3 pillars\nharness gate audit [--target \u003Cdir>] [--json]\n\n# Evaluate the 4 behavioral verification gates\nharness gate evaluate [--target \u003Cdir>] [--json]\n\n# Audit MCP server posture for zero credentials & leak defense\nharness gate mcp [--config \u003Cpath>] [--json]\n\n# Calculate Git code-to-doc commit drift\nharness gate drift [--target \u003Cdir>] [--json]\n\n# Mine negative assistant queries into demand backlog\nharness gate mine [--logs \u003Cpath>] [--json]\n\n# Generate interactive HTML visual brief\nharness gate brief [--output \u003Cpath>] [--no-open]\n```\n\n### 3. Domain Plugin Tool Entrypoints (Rule 45)\nRegistered under `plugins\u002Fagent_orchestration\u002Fai_native_harness`:\n- `four_gates_evaluate`: Executes Gate 1-4 pipeline.\n- `doc_drift_audit`: Runs Git code-to-doc drift calculations.\n- `mcp_security_audit`: Asserts zero-credential MCP posture.\n- `negative_backlog_mine`: Clusters unanswered queries.\n- `ai_native_harness_brief`: Renders HTML visual brief.\n\n---\n\n## Anti-Patterns\n\n- **Line-Review Bottleneck** — Reading and fixing every line of agent output by hand because you don't trust the model.\n- **Shared Credential Backdoor** — Connecting agents to databases using shared service keys, creating anonymous privilege escalation.\n- **Payload Omission Blindspot** — Testing only what a payload carries, allowing unmentioned fields to quietly reset to defaults.\n- **Style-Gate Misallocation** — Spending gate and token budgets enforcing AST linting\u002Fformatting while skipping live runtime verification.\n- **Silent Drift Decay** — Letting documentation quietly rot by failing to link code paths to documentation owners and omitting automated staleness telemetry.\n- **Untracked Knowledge Gap** — Discarding failed or unanswered agent queries instead of capturing them as a ranked demand backlog.\n","# AI-Native Harness Engineer: Production Coding & Governance Playbook\n\n`ai-native-harness-engineer` is the procedural engineering and organizational governance engine for transforming development teams into AI-native engineering organizations. Synthesized from Tech With RJ's foundational literature (*How I Used Harness Engineering to Make Our Company AI-Native*, freeCodeCamp, Sept 2026), this skill operationalizes the core axiom of autonomous software development: **\"You stop trusting the AI. You start trusting the harness.\"**\n\nWhen software teams adopt AI coding agents, velocity frequently evaporates because engineers manually inspect and second-guess every line of generated diffs. `ai-native-harness-engineer` inverts this bottleneck. Instead of reviewing syntax, engineers design the **behavioral verification harness**—a four-gate pipeline, an enterprise Model Context Protocol (MCP) server holding zero credentials, a repo rules file with a graveyard of rejected ideas, and automated telemetry tracking documentation drift and negative demand backlogs.\n\nEvery harness engineering implementation executes this five-stage progression:\n\n```\n[1. Scoping & Baseline Telemetry] → [2. Repo Rules & Graveyard] → [3. Four Behavioral Gates] → [4. Credential-Free MCP Bridge] → [5. Drift Telemetry & Backlog Mining]\n```\n\nSee [CARD.md](CARD.md) for the companion summary card, 5-stage reference matrix, and quality checklist.\nConsult [..\u002Fagent-harness-architect\u002FSKILL.md](..\u002Fagent-harness-architect\u002FSKILL.md) for harness runtime selection, [..\u002Fcodebase-context-architect\u002FSKILL.md](..\u002Fcodebase-context-architect\u002FSKILL.md) for multi-layer rules management, and [..\u002Fdeterministic-validation-loop\u002FSKILL.md](..\u002Fdeterministic-validation-loop\u002FSKILL.md) for deterministic spec validation.\n\n---\n\n## 1. Process Scoping & Baseline Telemetry\n\nIsolate a high-friction, bounded workflow and establish measurable drift baselines before introducing coding agents:\n\n1. **Target Selection (The Anti-Mandate Rule)**:\n   - Target one high-friction, low-risk operational workflow that currently annoys engineers (e.g. stale system documentation, manual ticket triage, release note synchronization, PR validation summaries).\n   - Reject high-risk, uncontained rewrites or strategic architectural overhauls as initial harness pilots.\n   - Restrict the pilot to a single internal team boundary where data stays in-house and team members provide immediate feedback.\n2. **Data Structuring & Ownership**:\n   - Transform informal, scattered communication (Slack chats, emails, unrecorded standups) into structured, timestamped records.\n   - Assign every operational asset an explicit human owner and an authoritative source path.\n3. **Establish Baseline Staleness Metrics**:\n   - Define a concrete formula for drift:\n     $$\\text{Drift Count} = \\sum \\text{Code commits modifying path } P \\text{ since last update of doc } D(P)$$\n   - Log the baseline staleness and cycle time so that subsequent agent improvements are proved by empirical numbers rather than qualitative slide decks.\n\n> **Completion criterion**: Bounded operational workflow selected, structured ownership schema established, and baseline drift metric recorded.\n\n---\n\n## 2. Repo Rules & Graveyard Formulation\n\nConstruct the immutable contextual scaffolding that guides agent code generation across all turns:\n\n1. **System Architecture & Operational Recipes**:\n   - Author a lean repository instruction file (`AGENTS.md` \u002F `CLAUDE.md`) defining the non-negotiable tech stack, directory layouts, and step-by-step recipes for every feature.\n   - Enforce bounded context rules (\u003C150 lines) to prevent prompt bloat and context blowout.\n2. **The Graveyard of Rejected Ideas**:\n   - Explicitly document previously tested, failed, or prohibited design patterns along with the technical rationale for their rejection.\n   - Force every fresh agent session to ingest this graveyard to prevent agents from re-proposing previously discarded or invalid solutions.\n3. **Seam Definition & Negative Boundaries**:\n   - Declare strict boundaries defining files and directories that the agent must NEVER modify (e.g., vendor caches, production database seeds, authentication kernels).\n\n> **Completion criterion**: Rules file authored containing architecture recipes, explicit negative boundaries, and a populated graveyard of rejected ideas.\n\n---\n\n## 3. The Four Behavioral Gates\n\nConstruct the non-negotiable, four-gate automated verification pipeline. Allocate the entire validation budget to verifiable runtime behavior rather than superficial AST style linters:\n\n1. **Gate 1: Static Type Checker (`tsc --noEmit` \u002F `mypy`)**:\n   - Run complete, strict static type checking across the entire repository.\n   - Enforce zero type errors; reject any change with type coercion hacks (`as any`, `shoehorn` violations). Catches signature mismatches and missing properties immediately at zero runtime cost.\n2. **Gate 2: 100% Core Logic Coverage**:\n   - Enforce binary 100% line, branch, and function coverage on core business logic.\n   - Treat coverage reports as an objective, non-negotiable to-do list for the agent: an uncovered branch mandates an additional unit test.\n3. **Gate 3: End-to-End User Simulation (Playwright)**:\n   - Execute an automated browser or API test suite simulating authentic user workflows.\n   - Author assertions in plain-English user-observable states (e.g., \"page displays confirmation badge\", \"dialog closes\") rather than internal implementation details.\n4. **Gate 4: Live Runtime Verification & Feature Usage Demo**:\n   - Mandate that the agent boot the live application or test server and observe the exact behavior it claims to have changed.\n   - Require the agent to author a short, runnable feature usage demo page or script exercising the feature in practice. Proves behavioral claims beyond passing unit tests.\n5. **The Partial Payload Omission Audit**:\n   - Adversarially inspect update and patch endpoints to ensure partial payloads do NOT quietly reset unmentioned fields (such as visibility or security scopes) to defaults.\n\n> **Completion criterion**: All four gates automated in CI and local test runners; 100% logic coverage enforced; feature usage demo authored.\n\n---\n\n## 4. Deploy Credential-Free MCP Security Bridge\n\nExpose application tools and operational data to AI agents using the Model Context Protocol (MCP) without compromising enterprise security:\n\n1. **Zero Stored Credentials Architecture**:\n   - Ensure the MCP server holds zero database credentials, zero service keys, and zero master tokens.\n   - Forward the human user's Personal Access Token (PAT) with every tool invocation.\n2. **Server-Side Dynamic RBAC**:\n   - Require the backend API to evaluate role-based access control (RBAC) dynamically on every tool execution against the user's active role.\n   - Ensure role revocation or group privilege changes take effect instantaneously without re-minting or tracking down tokens.\n3. **Uniform Error Sanitization & Leakage Defense**:\n   - Catch 403 Forbidden responses and return clean, structured error payloads (`isError: true, text: \"Error: Forbidden.\"`).\n   - Return an identical 404 response (`No document: {slug}`) for both non-existent resources and restricted resources the user lacks permission to see, preventing enumeration attacks.\n4. **Human Authority Workflow Markers**:\n   - Implement inline `[!VERIFY]` markers for agent-flagged uncertainties during automated drafting.\n   - Implement `[!SME]` sign-off gates for compliance, financial rates, or security-sensitive paths, blocking merge\u002Fapproval until an authorized subject matter expert signs off.\n\n> **Completion criterion**: MCP server operational holding zero credentials, user PAT forwarding verified, dynamic RBAC enforced, and 403\u002F404 errors sanitized.\n\n---\n\n## 5. Activate Negative Telemetry & Agent Bottleneck Mining\n\nHarness the compounding intelligence of the AI-native feedback loop:\n\n1. **Negative Query Demand Mining**:\n   - Instrument the AI assistant to log every query it cannot answer with certainty.\n   - Cluster and rank unanswered questions into an automated backlog of documentation demand, reflecting actual user information gaps.\n2. **CI Code-to-Doc Drift Triggers**:\n   - Map code repository paths to documentation slugs.\n   - When a commit modifies code paths associated with a document, CI automatically increments the drift count and transitions approval badges from green to amber.\n3. **Document Health Scoring**:\n   - Maintain a composite health score per document (based on days since last edit, code drift count, and user feedback).\n   - Generate automated weekly digests alerting document owners to decaying assets.\n4. **Agent-Assisted Bottleneck Auditing**:\n   - Regularly query the agent against accumulated operational telemetry:\n     * *\"Where is work piling up across current PRs?\"*\n     * *\"Which step in the approval cycle has the highest wait time?\"*\n     * *\"Which documented APIs have experienced the highest code churn without documentation updates?\"*\n\n> **Completion criterion**: Unanswered queries transformed into prioritized backlog; CI drift triggers active; automated health scores computed.\n\n---\n\n## The Visual Brief Pillar\n\nWhenever architecting or reforming an operational harness, synthesize the 5-stage lifecycle DAG, 4 behavioral gates, and MCP security topology into an interactive HTML visual brief:\n\n1. **Target File Location**: Render the report into `%TEMP%\\harness-brief-\u003Ctimestamp>.html` (or `\u002Ftmp\u002F` on Unix).\n2. **Interactive Elements**: Embed dark-theme Mermaid.js diagrams illustrating the four behavioral gates and the credential-free token flow.\n3. **Telemetry Dashboard**: Include live tables of drift counts, doc health scores, and ranked negative query backlogs.\n4. **Delivery**: Present the absolute, clickable link to the user before code execution.\n\n---\n\n## Mandatory Checkpoint Gate\n\nPrevent ungrounded or unchecked mutations to the production system:\n\n1. **Implementation Plan Gate**: Before modifying repository configuration, CI pipelines, or MCP servers, author an `implementation_plan.md` artifact specifying proposed changes, boundary definitions, and testing gates.\n2. **Explicit User Sign-Off**: Set `RequestFeedback: true` in artifact metadata. STOP and wait for explicit human review before applying destructive or wide-ranging state changes.\n3. **SME Authority Invariant**: Any modification touching compliance, financial calculations, or authentication boundaries requires a mandatory checkpoint sign-off from an authorized human reviewer.\n\n---\n\n## Diagnostic Coaching Rubrics\n\n### Trust Inversion & Gate Allocation Rubric\n- **Level 1 (Failing - Score \u003C 5)**: Engineers spend 80% of their time reading agent diffs line-by-line; tests are spotty; linting errors fail builds while logic branches remain untested.\n- **Level 2 (Transitional - Score 6-8)**: Type checker and unit tests pass, but end-to-end tests are missing; engineers must manually run and verify features; agent re-proposes rejected designs.\n- **Level 3 (AI-Native - Score 9-10)**: 4 automated gates enforce 100% logic coverage and live execution; rules file maintains a graveyard of rejected patterns; engineers only review high-level boundaries and live demonstrations.\n\n### Enterprise MCP Security Rubric\n- **Level 1 (Failing - Score \u003C 5)**: MCP server connects directly to the database via root\u002Fshared credentials; actions are anonymous; 404 responses reveal hidden document titles.\n- **Level 2 (Transitional - Score 6-8)**: Token authentication is present but relies on a shared service account; role revocation requires restarting the MCP server.\n- **Level 3 (AI-Native - Score 9-10)**: MCP server holds 0 credentials; forwards user PATs; live RBAC checks on every call; actions attributed to real individuals in audit trails; identical 404 responses eliminate resource enumeration.\n\n---\n\n## Micro-Kernel IoC & Headless CLI Seams (Rule 49 & Rule 10)\n\n`ai-native-harness-engineer` is elevated into the Harness micro-kernel with typed IoC service keys, domain plugin entrypoints, and headless Click CLI commands:\n\n### 1. In-Memory Service Resolution (Rule 49)\n```python\nfrom harness.services import AI_NATIVE_HARNESS_SERVICE_KEY\n\n# Resolve authoritative service from IoC container\nharness_service = context.require(AI_NATIVE_HARNESS_SERVICE_KEY)\n\n# Run 4 behavioral verification gates\ngates = harness_service.evaluate_gates()\n\n# Calculate code-to-doc commit drift\ndrift = harness_service.calculate_code_to_doc_drift()\n\n# Audit credential-free MCP security\nmcp_check = harness_service.audit_mcp_security()\n\n# Mine unanswered queries into documentation demand\nbacklog = harness_service.mine_negative_backlog()\n```\n\n### 2. Headless Click CLI Seams (Rule 10)\n```powershell\n# Run comprehensive audit across all 3 pillars\nharness gate audit [--target \u003Cdir>] [--json]\n\n# Evaluate the 4 behavioral verification gates\nharness gate evaluate [--target \u003Cdir>] [--json]\n\n# Audit MCP server posture for zero credentials & leak defense\nharness gate mcp [--config \u003Cpath>] [--json]\n\n# Calculate Git code-to-doc commit drift\nharness gate drift [--target \u003Cdir>] [--json]\n\n# Mine negative assistant queries into demand backlog\nharness gate mine [--logs \u003Cpath>] [--json]\n\n# Generate interactive HTML visual brief\nharness gate brief [--output \u003Cpath>] [--no-open]\n```\n\n### 3. Domain Plugin Tool Entrypoints (Rule 45)\nRegistered under `plugins\u002Fagent_orchestration\u002Fai_native_harness`:\n- `four_gates_evaluate`: Executes Gate 1-4 pipeline.\n- `doc_drift_audit`: Runs Git code-to-doc drift calculations.\n- `mcp_security_audit`: Asserts zero-credential MCP posture.\n- `negative_backlog_mine`: Clusters unanswered queries.\n- `ai_native_harness_brief`: Renders HTML visual brief.\n\n---\n\n## Anti-Patterns\n\n- **Line-Review Bottleneck** — Reading and fixing every line of agent output by hand because you don't trust the model.\n- **Shared Credential Backdoor** — Connecting agents to databases using shared service keys, creating anonymous privilege escalation.\n- **Payload Omission Blindspot** — Testing only what a payload carries, allowing unmentioned fields to quietly reset to defaults.\n- **Style-Gate Misallocation** — Spending gate and token budgets enforcing AST linting\u002Fformatting while skipping live runtime verification.\n- **Silent Drift Decay** — Letting documentation quietly rot by failing to link code paths to documentation owners and omitting automated staleness telemetry.\n- **Untracked Knowledge Gap** — Discarding failed or unanswered agent queries instead of capturing them as a ranked demand backlog.\n",{"name":5,"description":7},"main","eff3b00e36d1d233ad4a4389605c82fbfa0326d3",".agents\u002Fskills\u002Fai-native-harness-engineer","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 ai-native-harness-engineer",{"tool":37,"command":38},"bunx","bunx skills add SpectreDeath\u002FBrain-Harness --skill ai-native-harness-engineer",{"tool":40,"command":41},"pnpm","pnpm dlx skills add SpectreDeath\u002FBrain-Harness --skill ai-native-harness-engineer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fai-native-harness-engineer\u002FSKILL.md",true,[45,51,55],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"CARD.md","REFERENCE","参考文档",4776,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fai-native-harness-engineer\u002FCARD.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"config.default.yaml",610,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fai-native-harness-engineer\u002Fconfig.default.yaml",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"scripts\u002Fai_native_harness.py","SCRIPT","脚本",42543,"https:\u002F\u002Fgithub.com\u002FSpectreDeath\u002FBrain-Harness\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fai-native-harness-engineer\u002Fscripts\u002Fai_native_harness.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",[],[]]