agentleFS
solanodzsolanodz/harness-engineering-skills/skills/harness-observability/SKILL.md

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.

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
  1. Distinctive:

    If you cannot see what the agent did, you cannot fix what it broke (Lesson 11).

    line 17
  2. Very specific:

    Add .harness/*.log to .gitignore if ephemeral.

    line 58
  3. Distinctive:

    When the agent fails repeatedly:

    line 89
  4. Distinctive:

    Document results in progress.md.

    line 109
  5. Distinctive:

    No health check before smoke tests

    line 115

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

SignalPurposeWhere
Structured logsWhat ran, what failedstdout, files in logs/
Service stateIs app running? DB up?health endpoints, status bar
Verification resultsPass/fail evidenceprogress.md, feature_list evidence
Change diffWhat the agent modifiedgit diff, git log
Runtime errorsPost-implementation bugsconsole, 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.log

The 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 contains

Add .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:

  1. Can it execute the command? (Gulf of Execution)
  2. Can it interpret the output? (Gulf of Evaluation)
  3. Is the output visible in its context?
  4. 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 evidence
  • harness-evaluator — sprint contracts and rubrics (process observability)
  • harness-lifecycle — session logs in progress/handoff
  • harness-audit — detect observability gaps
  • harness-e2e — runtime signals from smoke/E2E runs

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.