subagent-execution-governance

Governs implementation subagents with contract snapshots, bounded reads, budgets, and structured BLOCKED protocols.

3|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/ooooooooooooooooooop/personal-ai --skill subagent-execution-governance-ooooooooooooooooooop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subagent-execution-governance
Source: https://github.com/ooooooooooooooooooop/personal-ai/tree/main/skills/subagent-execution-governance
Command: npx skills add https://github.com/ooooooooooooooooooop/personal-ai --skill subagent-execution-governance-ooooooooooooooooooop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) components.

What problem does it solve? Implementation subagents often spin without producing output: they read dozens of files without writing code, conflict with parallel agents on the same files, burn millions of tokens, and force the orchestrator into endless send_message催促 loops. This Skill replaces supervision-style management with contract-based governance so subagent work boundaries, read permissions, write ownership, and exit conditions are engineered upfront. ## Core Features & Use Cases - Contract Snapshots with Negative Space: Every implementation subagent dispatch requires a contract defining GOAL, OWN files, MAY READ whitelist, OUT OF SCOPE, MUST NOT, EXIT criteria, and BLOCKED conditions. - Three-Level Bounded Reading & Action Gates: Level 0 auto-allowed reads, Level 1 budgeted reads with reason codes, Level 2 escalation; subagents must produce a mutation or a structured BLOCKED before budgets exhaust—no "keep researching" state. - Single-Writer Ownership & Structured Result Recycling: File-level conflict checks before parallel dispatch, plus compact DONE/FAILED reports (status, changed files, validation, artifact refs) that keep subagent work history out of the orchestrator context to protect prefix caching. - Audit & Routing Tooling: Ships session-discipline-audit.js and splice-ab-experiment.js for post-hoc session discipline checks, plus workflow_preflight_router.py for logical-role model routing, pre-flight validation, and explicit fallback policy. - Use Case: Before dispatching three parallel coding subagents, generate contract snapshots with disjoint OWN file sets, set tool-call budgets, and require structured BLOCKED reports—then audit the session afterward to verify no催收 loops or cache-miss spikes occurred. ## Quick Start Ask the agent to dispatch an implementation subagent using the subagent-execution-governance contract snapshot template with bounded reads, budgets, and structured BLOCKED reporting.

Frequently Asked Questions about subagent-execution-governance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent AI subagents from endlessly exploring without writing code?

Use action gates instead of round-based limits: require either a first code mutation or a structured BLOCKED report before the exploration budget exhausts. Combine this with a contract snapshot defining owned files and a three-level read whitelist so the subagent never freely explores the repository.

How to avoid parallel subagents conflicting on the same files?

Enforce single-writer file ownership: before dispatch, compute the intersection of every subagent's OWN file set and only parallelize when it is empty. Shared files are merged last by the orchestrator or a dedicated integration agent.

What is a structured BLOCKED report for subagents?

A structured BLOCKED is a machine-checkable escalation containing blocked_reason, evidence, recovery steps attempted, the exact missing external fact, and why the agent cannot obtain it. Reports missing key fields are rejected as BLOCKED_INVALID, preventing vague natural-language help requests.

Why do subagent reports cause token spikes in the main session?

Splicing full subagent work histories back into the orchestrator context breaks prefix caching, producing large cache-miss input steps. The fix is structured result recycling: subagents return only status, changed files, validation results, and artifact references under 500 words.

When should I not use contract-based subagent governance?

Skip it for pure Q&A, single-turn small edits, or routine delegations that already follow a mature task flow. The contract overhead only pays off for implementation-type subagents that write code or files.

How do I audit a past session for subagent discipline problems?

Run the bundled session-discipline-audit.js script with a session ID or session.jsonl.zstd path. It reports model routing, per-turn token usage, subagent inventory, send_message/interrupt counts, cache-miss steps, short polling, and full-file read risks.