harness-observability
Skill4 starsChanged 6 months agoMITView on GitHub
See what the agent actually did — captured logs, health checks, and debug commands. Use when the agent says it worked but you can't tell why, or when failures are hard to diagnose.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/agents.mdAGENTS.md
- harness-auditSkill
- harness-diagnoseSkill
- harness-e2eSkill
- harness-environmentSkill
- harness-evaluatorSkill
- harness-instructionsSkill
- harness-lifecycleSkill
- harness-repo-knowledgeSkill
- harness-scaffoldSkill
- harness-scopeSkill
- harness-stateSkill
- harness-verificationSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
If you cannot see what the agent did, you cannot fix what it broke (Lesson 11).
- Very specific: line 58
Add .harness/*.log to .gitignore if ephemeral.
- Distinctive: line 89
When the agent fails repeatedly:
- Distinctive: line 109
Document results in progress.md.
- Distinctive: line 115
No health check before smoke tests
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Harness Observability
What this does for you
- Evidence you can read — test output and logs saved, not lost in the terminal
- Health before smoke tests — know the app is up before declaring success
- Faster debugging — documented commands instead of guessing what ran
If you cannot see what the agent did, you cannot fix what it broke (Lesson 11). Observability belongs inside the harness, not as an afterthought.
What to make observable
| Signal | Purpose | Where |
| Structured logs | What ran, what failed | stdout, files in logs/ |
| Service state | Is app running? DB up? | health endpoints, status bar |
| Verification results | Pass/fail evidence | progress.md, feature_list evidence |
| Change diff | What the agent modified | git diff, git log |
| Runtime errors | Post-implementation bugs | console, test output |
Practical patterns
1. Verification with captured output
npm test 2>&1 | tee .harness/last-test-run.log
echo "Exit: $?" >> .harness/last-test-run.logThe agent (and you) can read the log afterward.
2. Visible status in the app
For apps with UI (like the course capstone project):
- Status bar: indexed docs, last sync, errors
- On-screen health indicators
- Agent can verify state without guessing
3. .harness/ directory (optional)
.harness/
├── last-init.log
├── last-test-run.log
├── session-metrics.json
└── README.md # what each file containsAdd .harness/*.log to .gitignore if ephemeral; commit metrics if they are evidence.
4. Documented debug commands
In AGENTS.md or session-handoff:
## Debug
- View logs: `tail -50 logs/app.log`
- Health check: `curl localhost:3000/health`
- DB status: `npm run db:status`Integration with verification
Observability + verification = complete evidence:
{
"evidence": [{
"date": "2026-06-16",
"commands": ["./init.sh", "npm run test:e2e"],
"result": "pass",
"artifacts": [".harness/last-test-run.log"],
"observations": "Status bar shows 42 docs indexed"
}]
}Agent failure diagnosis
When the agent fails repeatedly:
- Can it execute the command? (Gulf of Execution)
- Can it interpret the output? (Gulf of Evaluation)
- Is the output visible in its context?
- Is there a feedback loop to correct?
Close the gap with harness, not longer prompts.
Ablation study (Project 06)
For the capstone, remove subsystems one at a time and measure:
Baseline (full harness) → success rate X%
Without observability → success rate Y%
Without verification → success rate Z%
...Document results in progress.md.
Anti-patterns
- Agent declares done without verification logs
- Errors only in ephemeral terminal (not captured)
- No health check before smoke tests
- Observability only in production, not in dev harness
Course reference
- Lesson 11: Why observability belongs in the harness
- Project 06: Full harness with observability and debugging
- references/course/gotchas.md
Related skills
harness-verification— pass/fail evidenceharness-evaluator— sprint contracts and rubrics (process observability)harness-lifecycle— session logs in progress/handoffharness-audit— detect observability gapsharness-e2e— runtime signals from smoke/E2E runs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

