· via Hacker News – Front Page (native)
Deepsense.ai publishes ten harness patterns for more reliable AI coding agents
Deepsense.ai's harness engineering guide argues that reliable AI-assisted coding comes from the system around the model — agent-readable repos, just-in-time context and validation loops — not from better prompts.

A playbook for engineering around the agent
Deepsense.ai has published a hands-on guide to what it calls harness engineering: improving AI coding agents by changing the systems around them rather than the prompts given to them. The post reached the Hacker News front page under the title "Ten harness patterns that you can apply to a real repo". According to deepsense.ai, the advice draws on two efforts: building HyperCode, a repository-intelligence layer that prepares relevant context for agents before they start and which won an OpenAI Codex hackathon earlier this year, and trialling the patterns internally with Codex and Claude Code across staff with different backgrounds, workflows and experience levels.
The team is candid that some patterns proved useful while others needed adjustment. One small inconsistency: the article's headline and URL say nine patterns, but its own summary and body list ten.
What a harness is
By harness, deepsense.ai means everything built around the model: repository structure, AGENTS.md files and specs, tools and skills, hooks and sidecars, validation commands, observability, and the cleanup routines that keep the setup from decaying. Humans set objectives and design the harness; agents execute inside it. A bug fix shows the loop a harness enables — the agent reads the code, makes a change, runs a test, inspects the failure and tries again — and the harness both makes that loop possible and sets its limits.
The economic argument behind the whole piece is that generated code has become cheap while human time and model context remain scarce. That inversion is why the authors recommend investing in documentation, context loading, validation and feedback loops that let a model safely take on more of the work, instead of chasing marginal gains through prompt wording.
The repository as a knowledge base
The first layer of advice concerns making a repo readable to agents. An AGENTS.md file at the repo root should act as an orientation brief for a capable engineer on day one: an architecture overview, key constraints such as never bypassing auth middleware, naming and structure conventions, entry points for common task types, and areas that are off limits without explicit instruction.
The file should stay short enough to load at the start of every task and work as a table of contents that points into deeper documentation, letting the model discover detail progressively. Without it, deepsense.ai argues, an agent either invents assumptions or burns context inferring structure from the file tree.
The post also positions commit messages and test docstrings as the durable record of reasoning: the diff shows what changed, while the commit body and test explanations capture why — and both are already versioned and searchable in the repository.
The remaining patterns
The rest of the playbook, from the post's own summary:
- Load context just in time, assembling the relevant files, tests, history and past decisions for each task rather than preloading everything.
- Start with durable tools: familiar commands plus a few focused, task-relevant skills.
- Make validation discoverable through a fast command menu shared by humans, agents and CI.
- Close the feedback loop by letting agents validate, observe and fix, with explicit retry limits.
- Use visual feedback selectively — text first, targeted screenshots only when pixels matter.
- Prompt for intent by explaining the desired outcome and decision process, reserving rigid rules for true invariants.
- Keep planning proportional: short plans and low-risk experiments, adding detail only where mistakes are expensive.
- Turn mistakes into guardrails by capturing friction at checkpoints and promoting recurring issues into docs, tests or linters.
- Build for model changes, keeping the workflow and validation contract stable as models and tools evolve.
Why it matters
The guide is a field report on a shift that is already underway in engineering teams: as coding agents take on more implementation work, the ceiling on their reliability is set less by prompt quality and more by the surrounding system — what context the agent receives, what it is allowed to touch, and which checks it must pass before review. That reframes agent adoption as an infrastructure investment: AGENTS.md files, validation menus and lint-level guardrails are versioned assets in the repo that outlive any particular model or tool. The final pattern makes the durability point directly — models will keep churning, so the lasting part of the setup is the contract between the workflow and its validation. For teams evaluating agentic coding, the deepsense.ai checklist offers concrete, testable steps rather than vendor promises, and its honest accounting of what worked and what needed adjustment makes it a useful baseline to measure against.
- #ai-agents
- #coding-agents
- #developer-tools
- #best-practices
- #context-engineering