Flows category icon
Harness Engineering
Beginner

Version Your Harness and Track Behavior

Treat prompts, tools, and loop logic as versioned, changelogged artifacts - so behavior changes are decisions, not surprises.

4 steps12 verify checks45-75 minutesWorks with: emergent · chatgpt · claude · cursor
Start Guided Walkthrough

The Route

0/4 verified

Context Pack

Paste this first. It briefs the AI on requirements, constraints, and the Definition of Done before your first build prompt.

Context Pack
PROJECT CONTEXT:
Someone edits the system prompt, the agent gets weirder, nobody knows why or when. Version-evolution research on the leading harness shows behavior tracks harness changes tightly - which means harness changes deserve versioning, changelogs, and behavioral diffs.

GOAL:
Put the harness under behavioral version control: versioned prompt/tool/config artifacts, a behavior changelog, and a smoke eval that diffs behavior across versions.

REQUIREMENTS:
- All behavior-bearing artifacts (prompts, tool descriptions, rules, routing) in version control as reviewable files
- A harness version identifier stamped into logs and session records
- A behavior changelog: every change entry says what behavior is expected to differ
- A fixed smoke-eval suite run before and after changes, with diffs reviewed
- Rollback: any prior harness version reproducible on demand

CONSTRAINTS:
- No behavior-bearing string lives outside versioned files - including 'temporary' prompt tweaks
- Changes without a changelog entry do not merge

DEFINITION OF DONE:
- Prompts and tool descriptions live in files with review history
- Session logs carry the harness version that produced them
- The changelog explains the last five behavior changes in behavioral terms
- A prompt change shows its behavioral diff via the smoke eval before merging

COMMON FAILURES TO AVOID:
- Prompts as unversioned strings buried in code, edited live
- Changelogs listing file edits instead of behavior changes
- No baseline eval, so behavioral drift is discovered by angry users
- Sessions unattributable to harness versions when debugging regressions

Paste this into your AI builder first. It teaches the AI what you want before you give it the build prompt.

Related routes

More Harness Engineering flows that share ground with this one.

Flows category icon
Harness Engineering

Evals for Your Harness

Build the eval suite that tells you whether harness changes help: task sets, graded rubrics, and regression discipline.

01Design the task set
02Implement graders
03Run honestly: variance and the results store

+1 more steps to Done

Best forproduction-grade builds with strict verification

4 steps90-150 minutesAdvanced
Flows category icon
Harness Engineering

Assemble Tool Prompts Dynamically per Environment

Stop shipping one static mega-prompt: generate tool prompts from environment conditions, inject blocks only when features are on, and dedupe config to save tokens.

01Identify conditional blocks
02Build the prompt generator
03Dedupe and budget every block

+1 more steps to Done

Best forproduction-grade builds with strict verification

4 steps90-120 minutesAdvanced
Flows category icon
Harness Engineering

Cost Control: Model Routing and Effort Tiers

Route work to the cheapest model that can do it and match reasoning effort to task difficulty - with quality guardrails.

01Profile spend by call class
02Build the routing table and wire it
03Add escalation on failure

+1 more steps to Done

Best forproduction-grade builds with strict verification

4 steps90-120 minutesAdvanced

Made with Emergent