RUBY MEETUP x AI COLLECTIVE
ContextBoundariesRolesIsolationGuardrailsFeedbackHuman
01 / 28
Harness Engineering

Build the
harness,
not the prompt.

AS
Ankit Shukla
Software Engineer at BetaCraft
A question

Same model.
Different results.

The difference is the harness.
The definition
Agent
=
Model
rented · same for all
+
Harness
built · yours

Prompts · context · tools · rules · loops · checkpoints

The map for today

Seven layers. Seven questions.

01

Context

What does it see?

02

Boundaries

What can't it touch?

03

Roles

Who does what?

04

Isolation

Where does it work?

05

Guardrails

What has it learned?

06

Feedback

How does it know it's right?

07

Human

Who decides?

= the harness

Answer all seven on purpose.

Why not just better prompts?

A prompt is a sentence.
A harness is a system.

Prompt
Harness
lives in
a chat box
files in git
lasts
one session
every session
remembers
you do
the system does
checks work
you hope
it verifies
scales with
your attention
your design
How we got here

The bottleneck keeps moving.

1

Autocomplete

bottleneck
typing
2

Chat

bottleneck
asking
3

Agents

bottleneck
trusting
4

Harness

bottleneck
designing

Agents can write the code. Can you trust it?

Where I started

An agent with no harness forgets.

Context is
scattered

AI notes
pollute git

Every session
starts at zero

Layer 01 · Context

I don't start the agent
in my codebase.

I start it one folder up.
~/work/project-wrapper/project-codebase
Layer 01 · Context

One folder for thinking.
One for code.

the harness
the product
project-wrapper/agent starts here
├── .claude/agents · skills · memory
├── docs/plans · decisions
├── loop/nightly QA
├── .worktrees/one per task
└── project-codebase/own git remote
Layer 02 · Boundaries

Two git histories. Zero mixing.

the harness

project-wrapper

agents · plans · memory

.gitignore
/project-codebase/
the product

project-codebase

code + a lean CLAUDE.md

The agent can reach everything. The client sees only code.

Layer 03 · Roles

A team, not a chatbot.

conduct

orchestrator

01 · plan

architect

02 · build

implementer

03 · attack

reviewer

04 · prove

verifier

PR ✓ human merges
Layer 03 · Roles

A role is just
a markdown file.

→Narrow job. One gate, done well.
→Narrow tools. No Edit or Write tool.
→A stance. Prove it wrong, not right.
.claude/agents/reviewer.md
---
name: reviewer
description: Gate 1. Adversarial read of the diff
tools: Read, Grep, Bash
---
Adversarial by default: try to find why
it's wrong, not confirm it's right.

## Rules
- Read the plan first, then the diff.
- Check the diff against every memory rule.
- Mark each finding block or nit.
- Never edit code. Report only.
Layer 03 · Roles

Every hand-off is a gate.

Gate 0
implementer

Self-check

Builds to the plan, then checks its own work first.

Gate 1
reviewer

Try to break it

Adversarial read. Block or nit.

Gate 2
verifier

Run it for real

Real app, screenshots, compared to the design.

Gate 3
steward

Audit the drift

Checks scope and every decision the agents made alone.

↺ any gate fails → back to the implementer

“A criterion with no evidence is a fail.” the verifier

Layer 04 · Isolation

One story. One worktree.

codebase · fresh main
.worktrees/hq-142implementerbuilding…
.worktrees/hq-143reviewer1 block · 2 nits
.worktrees/hq-144verifierreal stack ✓
Branch from a fresh main Resume in place, never recreate Cap at ~6 lanes. 10 crashed the machine.
Layer 05 · Guardrails

Every mistake
becomes a rule.

0portable rules, plus ~90 live memories
◆Fix the pattern, not the screen
◉Test on the real stack
⟳Rebuild before you trust a red
■The final report ends the task
Layer 05 · Guardrails

Anatomy of
a rule.

1Agent makes a mistake
↓
2You write the rule + why
↓
3Agents read it before acting
memory-seed/final-report-ends-task.md
---
name: final-report-ends-task
type: feedback
---
A background agent's final report
ends the task. No action after it.

Why: an agent was told "do not merge".
It reported done, then merged and
deployed anyway.

How to apply: after every agent,
check remote state before trusting it.
Layer 06 · Feedback

Eight checks before a human looks.

01

Red-first tests

The failing test comes first

02

Differential gate

No new failures vs main

03

Adversarial review

On every risky diff

04

Real-stack canary

Real server, real logins

05

Quality verdict

Pass · with debt · block

06

Migration check

No collisions

07

CI + static analysis

Green, not "mostly"

08

Test-tamper gate

No deleted, skipped or weakened tests

Layer 06 · Feedback

The night shift.

22:00

Run it all

Smoke test, then the full suite

night

Triage

Known rules first, cluster the rest

06:30

Re-run

Then one morning report

~10 min

You rule

New · healed · needs a ruling

next night

Rule → code

Your ruling becomes a deterministic rule

Code-blind QA. It knows only the spec and the running app.
Report only. No auto-fixes. One "failure" was a stale test.
Layer 07 · Human

Agents propose. Humans decide.

the agents do
  • Plan, build, review, verify
  • Open a draft PR
  • Log every solo call
  • Ask for a yes or no
⇄decisions
inbox
always a human
  • Auth, money, migrations
  • Scope and public contracts
  • New dependencies
  • Every merge
Layer 07 · Human

Who decides? A rule, not a mood.

1

Reversible?

Can we undo it cheaply?

2

Local?

Is the blast radius small?

3

Settled?

Does the charter already answer it?

All yesagent decides, logs why
Any nodecisions inbox

“Bringing a reversible, local decision to the human is a defect, not diligence.” the orchestrator

All seven layers, running

One command. A pipeline.

iTerm2 · tmux · project-wrapper
Does it work?

8 weeks. One client project.

729PRs opened694 merged, by a human
1,986commits on mainacross parallel worktrees
259evidence foldersscreenshots and gate verdicts
583QA scenariosrun every night, code-blind
222human rulingslogged word for word
34portable ruleseach one a past mistake
Tools in the loop

The harness has hands.

Wispr Flow logo
Speak

Wispr Flow

Talk, don't type

→ context
px0 logo
See

px0

Read AI code fast

→ human
gstack logo
Ship

gstack

/review → /qa → /ship

→ feedback
CraftHQ logo
Plan

CraftHQ

Stories in, PRs out

→ roles · human
iTerm2 logotmux logo
Run

iTerm2 + tmux

Many agents, one screen

→ isolation
CraftHQ · what it is

A control plane for agent-driven builds.

You plan and approve in the browser. Agents build and report back.

Planning
You · planning
Approved
✋ approve the plan
In progress
Agent · working
In review
You · review
Done
✋ accept the result
Storiesplan page, notes, runs, PR
Turn badgewhose move is it?
Decisions inboxonly what a human must answer
Previewsa live build per story

“A note is a conversation. A status is an instruction.”

CraftHQ · how it works

Stories in. PRs out.

Youbrowser
Agentsloop
1

Intake

Drafts the story, plan and open questions

2

Approve

Answer decisions, approve the plan

3

Claim & build

Worktree, live run log, draft PR

4

Verify

A second agent sets In review, or asks you

5

Accept

Read PR + preview, merge, Done

The builder never moves its own story to review Open decision → agent skips the story The assistant never merges
What we got wrong

Harness anti-patterns.

✕

Agent reviews its own work

It defends what it wrote. A second agent verifies.

✕

Screenshots on fake data

Looked great, proved nothing. Real stack, real logins.

✕

Ten agents at once

The machine crashed. Cap the lanes.

✕

Auto-fixing night failures

The test was stale, not the app. Report, then rule.

Start tomorrow

Your first harness, in five steps.

Move your repo into a wrapper folder

context · boundaries

Write down what's in your head

context

Turn your next mistake into a rule, with a why

guardrails

Give the agent one loop it can run itself

feedback

Keep a human on merge

human
One line to remember

Your codebase is for code.
Your harness is for everything else.

Wispr Flowpx0gstackCraftHQiTerm2tmux
Thank you!Ankit ShuklaBetaCraftQuestions?
→ / space to advance · ← back · F fullscreen