How chachamaru127/claude-code-harness works
Claude Code Harness is a multi-agent development plugin whose central workflow turns an authorized request into an approved plan, implementation, verification and correction, independent review, drift reconciliation, and release preflight. The Go CLI and hook runtime provide command dispatch and execution-time safety; supporting subsystems manage parallel workers, sessions, memory, and release health. The graph combines documented workflow relationships with sampled Go call/import evidence. Several capabilities are documented but their implementation was not sampled, so those links cite the README rather than implying inspected code paths.
Main entry points: main.go Harness CLI · work_team.go Work execution · reviewiterate.go Review cycle · pre_tool.go Guardrail checks
Components 20
Delivery workflow
- Plan drafting
go/cmd/harness/plans.go - Work execution
go/cmd/harness/work_team.go - Verification
go/internal/ci/ci.go - Review cycle
go/internal/reviewiterate/reviewiterate.go - Review persistence
go/cmd/harness/subagentstop_reviewer_persist.go - Plan sync
go/cmd/harness/sync.go - Release preflight
go/internal/releasetrain/releasetrain.go
CLI and hooks
- Harness CLI
go/cmd/harness/main.go - Hook handlers
go/internal/hookhandler - Project state
go/internal/state/store.go
Execution safety
- Guardrail checks
go/internal/guardrail/pre_tool.go - Policy rules
go/internal/policy/rules.go - Runtime floor
go/internal/runtimefloor/runtimefloor.go
Agents and sessions
- Worker orchestration
go/internal/breezing/orchestrator.go - Orchestration ledger
go/internal/orchestrationledger/orchestrationledger.go
Project operations
- Session monitoring
go/internal/session/monitor.go - Harness memory
go/internal/harnessmem/companion.go - Environment diagnosis
go/cmd/harness/doctor.go - Host generation
go/cmd/harness/gen.go
Other components
- Developer
Connections 24
- Developer → Harness CLI: requests work
README.md - Harness CLI → Plan drafting: dispatches plan
README.md - Plan drafting → Developer: requests approval
README.md - Developer → Work execution: authorizes work
README.md - Work execution → Verification: runs checks
README.md - Work execution → Review cycle: submits result
README.md - Review cycle → Work execution: returns findings
README.md - Review cycle → Review persistence: persists verdict
- Review cycle → Plan sync: informs reconciliation
- Plan sync → Release preflight: precedes release
- Harness CLI → Hook handlers: dispatches hooks
go/cmd/harness/main.go - Hook handlers → Guardrail checks: evaluates actions
- Guardrail checks → Policy rules: evaluates rules
go/internal/guardrail/pre_tool.go - Guardrail checks → Runtime floor: checks floor
go/internal/guardrail/pre_tool.go - Guardrail checks → Project state: reads context
go/internal/guardrail/pre_tool.go - Work execution → Worker orchestration: runs parallel tasks
- Worker orchestration → Project state: uses lifecycle state
go/internal/breezing/orchestrator.go - Worker orchestration → Orchestration ledger: records outcomes
- Session monitoring → Project state: collects session state
- Session monitoring → Release preflight: checks candidate
go/internal/session/monitor.go - Harness CLI → Session monitoring: monitors sessions
- Harness CLI → Environment diagnosis: runs diagnosis
go/cmd/harness/doctor.go - Harness CLI → Host generation: generates host config
go/cmd/harness/gen.go - Developer → Harness memory: uses stored context