Skip to main content

27 docs tagged with "harness"

View all tags

A map of ~/.claude's components

A list of where Claude Code's harness components — CLAUDE.md, rules, skills, agents, hooks, MCP, and memory — are placed and when they work.

Adopting takt's philosophy: porting nrslib/takt to Claude Code

How this harness ports the philosophy of nrslib/takt — an AI Agent Orchestration Framework — including Faceted Prompting, Output Contracts, Worktree Isolation, and the 8 design principles, onto Claude Code's skills + agents + handoff dir without using the takt CLI itself.

Agent = Model + Harness

An explanation of the core idea that an AI agent's reliability is determined by the design quality of the "harness" surrounding it, not by the model itself.

Directory structure and composition rules

The post-rebuild directory layout under ~/.claude/, and the criticality-driven 3-tier delivery rule that splits how each facet reaches the agent, explained with real examples.

Faceted Prompting: 5-concern separation

An explanation of Faceted Prompting — an organizing axis that splits prompts into Persona / Policy / Instruction / Knowledge / Output Contract — covering each facet's responsibility and the routing rules between them.

From utterance to skill launch

We follow the first few hundred milliseconds, from a one-line bug report passing through the UserPromptSubmit hook, launching the /debug skill, to SKILL.md becoming the work procedure.

Growth discipline and reverse ratchet

The five disciplines (usage-driven addition / size cap / one-file-one-concern / reverse ratchet / hooks-after-evidence) that structurally prevent harness re-bloat, and the inverted-approval workflow that makes deletion the default.

How hooks work

Hooks are scripts registered against events in settings.json. We organize the 8 events used in this environment and the self-correction feedback mechanism via exit 2.

How rules are loaded

Rules come in two kinds—always-loaded and path-scoped. We dig into the mechanism where the frontmatter paths (glob) means "load only when you open a matching file."

Introduction to Claude Code Harness Engineering

A guide that follows a single run of the debug command /debug to learn how Claude Code's skills, rules, memory, hooks, and MCP work together. Understand the harness engineering workflow through a concrete, worked example.

Ratchet — making learnings permanent

So you never step into the same hole twice, we look at the Ratchet flow that promotes learnings to rules / hooks / fitness functions, starting from the recurrence-prevention judgment in /debug.

Real iteration cycles

Post-bootstrap iterations (silent drop / doubled worktrees / wording drift, and more) walked through as problem → analysis → fix → verification.

Step 0 — On-demand loading of MCP

The first move of /debug is loading MCP. We explain why MCP is not available from the start and is loaded each time with ToolSearch, and why sequential-thinking is mandatory.

Subagents and role separation (a detour: /review)

We look at Generator-Evaluator separation—keeping the one who implements separate from the one who evaluates—and at multi-perspective-review, which runs multiple subagents in parallel, via a detour into /review.

Summary — making the harness your own

We look back at the overall picture of the harness, followed through one run of /debug, and show the first step to starting your own harness small and growing it.

Summary and open work

The final chapter of the series, organizing a 3-tier summary, the state of the 4 Quality metrics, and the road ahead.

The Guide-and-Sensor pair (detour: /grill-me)

Protect a standard with a pair of "a Guide that steers in prose" and "a Sensor that mechanically catches what is missed." We look at the sharpest example of the cross-classification, using the requirements-grilling skill /grill-me.

The Guides-and-Sensors cross-classification

Classify the harness's components along two axes, "before/after the action" × "deterministic/inferential," and show with concrete examples why either one alone is insufficient.

The Stop hook at the end of a response

The moment /debug returns its answer, seven hooks run in parallel on the Stop event. We explain the difference between Sensors that block immediately and log-only Sensors that just observe first.

The three layers of memory

A session forgets when it ends. With three layers—learnings, project memory, and handoff—we organize what to keep, where, and at what granularity.

The two-stage loading of MCP

MCP is controlled in two stages, "loading the schema" and "connecting to the server." We organize the loading of deferred tools via ToolSearch and the autonomous loading based on a usage table.

The verify loop — proving you fixed it

Iterate Investigate→Fix→Verify up to 3 times, and back "it is fixed" with the evidence of test output. You experience the harness's core principle, "show evidence, do not assert success," through /debug.

Walking the autodev flow

A walkthrough of each phase (⓪'-⑤) of the autodev flow using autodev-smoke's anagram-check task, with real spec / plan / story / done / review excerpts.

Why I rebuilt from scratch

A walkthrough of the four symptoms observed in the pre-rebuild Claude Code harness and the decision to rebuild from zero, along with the four design decisions that shaped the new setup.