How tigerless-labs/autoharness works
AutoHarness is a Claude Code skill layer that learns from sessions and maintains its own skill library. Its main flow captures and redacts session activity, launches a reflector to propose changes, queues those proposals, and uses a deterministic promoter to validate and land them. Session-start recall and lifecycle review, curator consolidation, and usage evidence support the ongoing library. Several connections are documented or indicated by the SOURCE INDEX; unsampled implementations are represented at their existing source paths, and uncertain links are omitted.
Main entry points: promoter.py Deterministic promoter · on_session_start.py Session start · dispatch.py Hook dispatch · spawn.py Reflector and curator launch
Components 25
Session hooks
- Hook dispatch
src/autoharness/hook/dispatch.py - Session capture
src/autoharness/hook/capture.py - Session start
src/autoharness/hook/on_session_start.py - Skill-use tracking
src/autoharness/hook/on_skill_call.py - Stop and session end
src/autoharness/hook/on_stop.py
Learning and review
- Reflector and curator launch
src/autoharness/hook/spawn.py - Reflector agent
agents/reflector.md - Curator agent
agents/curator.md
Proposal admission
- Stage-skill MCP tool
src/autoharness/stage_skill/server.py - Intent queue
src/autoharness/lib/intent_queue.py - Deterministic promoter
src/autoharness/hook/promoter.py - Skill validation
src/autoharness/lib/validate.py
Skill library
- Skill files and archives
src/autoharness/lib/skill_store.py - Skill metadata
src/autoharness/lib/sidecar.py - Decision ledger
src/autoharness/lib/ledger.py - Lifecycle review
src/autoharness/lib/lifecycle.py - Usage metrics
src/autoharness/lib/metrics.py
Shared runtime
- Layer paths
src/autoharness/lib/layer.py - Session counters
src/autoharness/lib/counters.py - Redaction
src/autoharness/lib/redact.py - Atomic writes
src/autoharness/lib/atomic.py - Runtime configuration
src/autoharness/config.py - Run notifications
src/autoharness/lib/notify.py
Other components
- Claude Code user
- Claude Code
Connections 39
- Claude Code user → Claude Code: works in
README.md - Claude Code → Hook dispatch: fires hooks
- Hook dispatch → Session start: dispatches
src/autoharness/hook/dispatch.py - Hook dispatch → Skill-use tracking: dispatches
src/autoharness/hook/dispatch.py - Hook dispatch → Stop and session end: dispatches
src/autoharness/hook/dispatch.py - Hook dispatch → Deterministic promoter: dispatches
src/autoharness/hook/dispatch.py - Claude Code → Session capture: provides session activity
- Session capture → Redaction: redacts activity
src/autoharness/hook/capture.py - Session start → Lifecycle review: reviews skills
src/autoharness/hook/on_session_start.py - Session start → Skill files and archives: reads and archives
src/autoharness/hook/on_session_start.py - Session start → Skill metadata: reads ownership and counters
src/autoharness/hook/on_session_start.py - Session start → Session counters: reads request counts
src/autoharness/hook/on_session_start.py - Skill-use tracking → Skill metadata: records use
src/autoharness/hook/on_skill_call.py - Stop and session end → Session counters: updates cadence
src/autoharness/hook/on_stop.py - Stop and session end → Reflector and curator launch: triggers learning
- Session capture → Reflector and curator launch: supplies episode
src/autoharness/hook/spawn.py - Reflector and curator launch → Reflector agent: launches
src/autoharness/hook/spawn.py - Reflector and curator launch → Curator agent: launches periodic pass
src/autoharness/hook/spawn.py - Reflector agent → Stage-skill MCP tool: proposes skill changes
README.md - Claude Code user → Stage-skill MCP tool: requests /learn
README.md - Stage-skill MCP tool → Skill validation: front-checks proposals
src/autoharness/stage_skill/server.py - Stage-skill MCP tool → Intent queue: appends intents
src/autoharness/stage_skill/server.py - Reflector and curator launch → Intent queue: drains run intents
- Deterministic promoter → Intent queue: reads intents
src/autoharness/hook/promoter.py - Deterministic promoter → Skill validation: validates shaped changes
src/autoharness/hook/promoter.py - Deterministic promoter → Skill files and archives: lands or archives
src/autoharness/hook/promoter.py - Deterministic promoter → Skill metadata: updates metadata
src/autoharness/hook/promoter.py - Deterministic promoter → Decision ledger: records decisions
src/autoharness/hook/promoter.py - Deterministic promoter → Session counters: reads request count
src/autoharness/hook/promoter.py - Deterministic promoter → Redaction: redacts evidence
src/autoharness/hook/promoter.py - Curator agent → Skill files and archives: consolidates library
- Usage metrics → Skill metadata: reads usage data
src/autoharness/lib/metrics.py - Usage metrics → Decision ledger: reads decisions
src/autoharness/lib/metrics.py - Session start → Usage metrics: provides lifecycle inputs
- Runtime configuration → Layer paths: uses layer definitions
src/autoharness/config.py - Skill files and archives → Atomic writes: writes atomically
src/autoharness/lib/skill_store.py - Skill metadata → Atomic writes: writes atomically
src/autoharness/lib/sidecar.py - Session counters → Atomic writes: writes atomically
src/autoharness/lib/counters.py - Deterministic promoter → Run notifications: reports run outcome
src/autoharness/hook/promoter.py