How samartomar/ai-harness works
AIH is a cross-platform CLI and library for preparing developer environments and repositories for governed AI-assisted coding. Its principal workflow is: an operator invokes a command, AIH resolves organizational policy and selected capabilities, verifies pinned sources and evidence where required, then plans or applies managed configuration and produces reviewable verification evidence. Major branches include the policy workbench, capability and MCP management, skill governance, trust/evidence handling, and verification. The tree and sampled source support the named subsystems; several branch connections are documented in the README but their internal wiring was not sampled.
Main entry points: baseline-evidence/pipeline.ts Baseline evidence · index.ts Command registry · ecc/pipeline.ts ECC lifecycle · superpowers/pipeline.ts Superpowers lifecycle
Components 21
Command surface
- CLI program
src/program.ts - Command registry
src/commands/index.ts - Plan runner
src/commands/run.ts
Policy and selection
- Organization policy
src/org-policy/schema.ts - Policy workbench
src/org-policy/workbench/ui/main.ts - Selection engine
src/org-policy/workbench/selection-engine.ts - Policy compiler
src/org-policy/workbench/compile-policy.ts - Policy binding
src/binding/index.ts
Managed capabilities
- ECC lifecycle
src/ecc/pipeline.ts - Superpowers lifecycle
src/superpowers/pipeline.ts - MCP management
src/mcp/index.ts - Skill governance
src/skill/index.ts
Trust and evidence
- Baseline evidence
src/baseline-evidence/pipeline.ts - Trust sources
src/trust/fetch.ts - Baseline catalogs
src/baseline-evidence/catalogs.ts
Verification and records
- Verification pipeline
src/verification/pipeline.ts - Truth records
src/truth/index.ts - Reports
src/report/index.ts
Other components
- Operator
- External source
- Repository state
Connections 22
- Operator → CLI program: invokes
- CLI program → Command registry: registers commands
- Command registry → Plan runner: runs capability
- Policy workbench → Selection engine: reduces actions
- Policy workbench → Policy compiler: projects policy
- Command registry → Policy workbench: opens workbench
- ECC lifecycle → Organization policy: reads policy
- ECC lifecycle → Baseline catalogs: selects catalog
- ECC lifecycle → Plan runner: executes plan
- Superpowers lifecycle → Baseline catalogs: selects catalog
- Superpowers lifecycle → Trust sources: resolves source
- Superpowers lifecycle → Baseline evidence: runs evidence gate
- Baseline evidence → Organization policy: reads policy
- Baseline evidence → Trust sources: validates source
- Baseline evidence → Plan runner: executes plan
- Baseline evidence → External source: acquires source
- MCP management → Organization policy: evaluates policy
- Skill governance → Repository state: records approval lock
- Policy binding → Repository state: binds policy
- Verification pipeline → Reports: summarizes results
- Truth records → Repository state: writes sidecar state
- Command registry → Verification pipeline: exposes verification