Self-tuned AI agents
I build the layer around Claude Code: rules, skills, hooks and subagents. A piece stays only if the transcripts show it works.
Harness architecture
The closer to Claude, the more often it loads, so the smaller it stays.
On dispatchSubagents
- codebase search
- security review
On an eventHooks
- auto-format on edit
- secret scan before commit
- test cleanup reminder
- reply language check
On demandSkills, commands, docs
- code walkthroughs
- past fixes in plans
- search past findings
- save notes to docs
- library docs
Every turnRules, 338 lines
- shared coding rules
- per-machine settings
- minimal-change rules
Claude Code
install.sh links every layer into ~/.claude.
Before / After
Rates from Claude Code session transcripts.
Before: audit of 128 sessions, 2026-08-07 → 09-17.
How it's measured
metrics.py counts events in each transcript, then turns the counts into rates.
load()find sessions, 3+ turnsparse()count eventsparse_group by dateperiods() aggregate()divide or median--jsonwrite for this page
Ratecountper session, in parse()÷sums per period, in aggregate()
- Context read per response
- tokens read÷model responses
- Output tokens per turn
- tokens written÷user turns
- Subagent dispatches per session
- Agent calls÷sessions
- Sessions that ran tests
- sessions with a test÷sessions
- Tool output per turn
- tool output size÷user turns
- Context at session start
- median offirst-response context
- Responses per turn
- model responses÷user turns