Inspiration Agent skills can improve performance—but more skills can also make an agent worse. Similar skills compete, incorrect skills shadow useful ones, and model-generated skills can introduce unsafe behavior or regressions. I built The KING around one idea: self-generated skill failure is not only a generation problem. It is a skill-harness management problem. What it does The KING is a self-managing skill harness for coding agents. It manages the complete skill lifecycle: Generate and register candidate skills Provision only relevant skills through metadata-first routing Diagnose wrong-skill selection and skill shadowing Validate candidates with typed hooks and deterministic gates Hide, repair, merge, promote, roll back, or retire skills Request human approval only for high-risk or irreversible changes Preserve trace-backed evidence for every management decision Its desktop interface combines an agent chat with a visual Harness Map, allowing users to inspect skills, validators, lifecycle history, and approval requests. How I built it The core runtime uses contract-first Python components with bounded I/O, immutable evidence records, copy-on-write promotion, quarantined candidate execution, and same-verifier regression checks. A skill is treated as a managed contract rather than a prompt fragment. Each contract defines its trigger, expected artifacts, validators, failure modes, permissions, and lifecycle state. The HarnessX runtime applies typed hooks around generation, provisioning, selection, execution, validation, and promotion. Low-risk reversible improvements can proceed automatically, while network access, destructive mutations, or other high-risk changes stop for user approval. The desktop application connects to Codex CLI and provides persistent chats, project workspaces, model settings, managed autonomy controls, and evidence-backed skill inspection. Results In a controlled lifecycle-recovery experiment, skill overload reduced task success to 1/10 and produced 89% shadowing. After trace-based diagnosis and managed intervention, the same verifier measured 9/10 success with 0% shadowing, passing all 5/5 lifecycle gates. In a separate selection-only scale pilot, the system maintained 47/48 exact selections across skill catalogs containing 6, 16, 56, and 209 skills. This result measures selection retention—not end-to-end task generalization. The system also demonstrated model-authored skill generation, repair, rollback, duplicate merging, pre-execution rejection of unsafe candidates, and post-execution rejection of routing regressions. Challenges The hardest problem was separating what the system exposed, selected, invoked, and actually found useful. These are different evidence levels, and treating them as equivalent would create misleading results. Another challenge was balancing autonomy with safety. Requiring approval for every change defeats self-management, while unrestricted self-modification is unsafe. The KING therefore uses selective approval based on risk, reversibility, verifier results, and mutation scope. What I learned Reliable agent improvement requires more than generating better prompts. Skills need contracts, health metrics, lifecycle actions, regression gates, and auditable evidence. I also learned that a rejected candidate can be more valuable evidence than a successful one: it proves that the harness can detect unsafe code or behavioral regressions before they contaminate the active library. What’s next Next steps include broader end-to-end evaluation, additional baselines and ablations, long-running autonomous maintenance, provider-native invocation evidence, and governance-overhead measurements. The long-term goal is an agent that does not merely accumulate experience, but continuously maintains the harness that determines how that experience is used.

Built With

  • codex
  • gpt-5.6
  • sol
  • terra
Share this project:

Updates