---
title: "Six layers of a working harness"
lesson_id: "02"
---

# Six layers of a working harness

- **Lesson ID:** 02
- **Goal:** Name Trigger, Orchestration, Tools, Trusted context, Control, and Runtime. Say trusted context does about 80% of success.
- **Human lesson:** [02-six-layers.html](02-six-layers.html)

## Prerequisites

- Lesson 01: harness vs model.

## Inputs, outputs, and artifacts

- **Inputs:** A failed run someone wants to blame on the model.
- **Outputs:** A six-layer map you can point at.
- **Artifacts:** Three progressive Mermaid diagrams, not one mega diagram.

## Agent build steps

1. Diagram 1: Trigger → Orchestration.
2. Define Trigger as a named, replayable event. Define Orchestration as loop, memory, retries, and limits. Link the state-machine course.
3. Diagram 2: add Tools and Trusted context.
4. Say tools hold fixed KPI logic. Say trusted context is truth plus ACL and does about 80% of success. Link the context packer.
5. Diagram 3: add Control and Runtime.
6. Say Control is golden sets, guardrails, and approvals. Say Runtime is traces, cost, audit, and model choice as config. Link guardrails and tracer.
7. Tell the reader to name the failed layer before blaming weights.

## Constraints

Keep the language simple, friendly, and literal. No quizzes, no em dashes, no invented WWDC sessions. Progressive Mermaid only. Do not stuff all six layers into the first diagram.

## Key concepts

- Trigger starts the run from an event you can name and replay.
- Orchestration is the loop, memory, retries, and limits.
- Tools hold fixed logic for KPIs and other facts the model must not invent.
- Trusted context is truth plus access control. It does about 80% of the success.
- Control is golden sets, guardrails, and approvals. Runtime is traces, cost, audit, and model choice as config.

## Takeaways

- Name the failed layer before you change the model.
- Spend most of your care on trusted context and tool contracts.
- Keep model swap as a runtime config change.

## Acceptance checks

- All six layers are named in this order.
- Three Mermaid diagrams build layer by layer.
- Sibling links for orchestrator, context packer, guardrails, and tracer are present.
- [ ] Proceed to [lesson 03 brief](03-sketch-a-harness.llms.md).
