A production-grade skill for Claude Code and OpenClaw that transforms a repository into a
self-improving software system using six core harness engineering principles.
Treat context as a finite, precious resource. Curate aggressively.
See: runtime/context-engineering.md, runtime/compaction.md
Each sub-agent receives only the tools it needs -- no more.
See: tools/TOOL_REGISTRY.md, references/mcp-tools.md
Every output is verified by someone other than who produced it.
See: agents/reviewer.md, references/testing-standards.md
State lives outside the context window, in the repo.
See: runtime/status-management.md, templates/handoff.md
Track what happens. Feed failures back into the harness, not the code.
See: runtime/observability.md, runtime/memory-system.md
Humans approve high-impact events. The harness surfaces them explicitly.
See: runtime/autonomy-rules.md, runtime/prioritization.md
Memory => Maintainability => Cost
Adaptive timeouts: Default timeouts are guidelines, not hard kills. Check process logs before killing — if the agent is actively producing output, extend the timeout instead of killing. Only kill-and-split if the agent is silent/stuck for >10min or producing garbage. Scale timeouts by effort: S-effort=15min, M-effort=20min, L-effort=30-40min.
Before anything else: read PLATFORM_REQUIREMENTS.md and verify every item.
The harness depends on platform enforcement that cannot be checked from these files alone.
Step 1 -- Verify platform requirements (PLATFORM_REQUIREMENTS.md)
Run through the five platform capability checks before any other step.
Step 2 -- Sandbox first
Run on a throwaway branch. Observe one single-pass cycle before enabling continuous mode.
Step 2 -- Review CONFIG.yaml before every run
| loop_mode | single-pass | Change after sandbox validation |
|---|---|---|
| max_parallel_agents | 3 | Increase after confirming behavior |
| block_destructive... | true | Never change |
PRs always require human approval. There is no auto-merge.
Step 3 -- Protect main branch
Require human reviewers on main/trunk in your git host.
Step 4 -- Graduation path: single-pass => maintenance => continuous
When activated in Claude Code or OpenClaw, read in this order:
| File | When to read |
|---|---|
| ----------------------------------- | ------------------------------------------- |
| CLAUDE.md / AGENTS.md | First, every session -- base knowledge |
| CONFIG.yaml | At startup |
| MEMORY.md | At startup and after every failure |
| runtime/loop.md | Each loop cycle |
| runtime/context-engineering.md | Continuously -- governs context budget |
| runtime/compaction.md | When compacting context within a phase |
| runtime/status-management.md | At startup (resume) and after each task |
| runtime/observability.md | After VERIFY phase |
| runtime/memory-system.md | When writing or querying memory |
| runtime/self-improvement.md | After any failure |
| runtime/prioritization.md | When selecting the next task |
| runtime/autonomy-rules.md | When blocked or at human gate |
| agents/dispatcher.md | Before decomposing any task (worktree agent) |
| agents/researcher.md | Research phase (Q-Agent + R-Agent model) |
| agents/planner.md | Plan phase (3-phase: design, outline, master plan) |
| agents/implementer.md | Implement phase (worktree-driven execution) |
| agents/reviewer.md | Review cycle |
| agents/debugger.md | On any failure |
| agents/optimizer.md | Optimization mode |
| agents/garbage-collector.md | GC interval |
| tools/TOOL_REGISTRY.md | Before any tool call |
| tools/tool-router.md | Routing and redaction rules |
| tools/execution-protocol.md | Full tool call lifecycle |
| references/harness-rules.md | Core constraints |
| references/testing-standards.md | Before writing or running tests |
| references/security-performance.md | Before any implementation |
| references/simplification-checklist.md | During review and refactoring |
| references/git-workflow.md | Before any commit or PR |
| references/mcp-tools.md | MCP tool definitions and per-agent sets |
| references/sensitive-paths.md | Forbidden read paths -- enforced in-skill |
| references/constraints.md | Active prevention rules |
| templates/ | Plans, ADRs, handoffs, status docs |
共 1 个版本