How diegoagd10/ai-harness works
ai-harness centralizes version-controlled agent persona, skills, and change-agent configuration, then distributes them to supported coding-agent CLIs. Its user-facing workflow starts at the Typer CLI: users scaffold a repository, install or remove global artifacts, configure model overrides, or run a file-backed change/task workflow; worktree commands isolate sessions. Provider-specific administrators render native artifacts, while the change subsystem manages changes, tasks, and review state. README documents the installer capabilities; source excerpts are limited, so some internal links are omitted where invocation is not evidenced.
Main entry points: main.py Command CLI · change.py Change Engine · tui.py Model Wizard · operations.py Artifact Operations
Components 25
CLI and Commands
- Command CLI
src/ai_harness/main.py - Repo Scaffolding
src/ai_harness/commands/init.py - Install Command
src/ai_harness/commands/install.py - Uninstall Command
src/ai_harness/commands/uninstall.py - Model Command
src/ai_harness/commands/set_models.py - Worktree Commands
src/ai_harness/commands/worktree.py - Change Commands
src/ai_harness/commands/change.py
Artifact Distribution
- Artifact Operations
src/ai_harness/modules/harness/operations.py - Provider Dispatch
src/ai_harness/modules/harness/administrators/__init__.py - Provider Renderers
src/ai_harness/modules/harness/administrators/base.py - Agent Config Homes
Change Sessions
- Git Worktree Logic
src/ai_harness/modules/harness/worktree.py - Change Engine
src/ai_harness/modules/harness/change.py - Change Flow
src/ai_harness/modules/harness/change_flow.py - Task Store
src/ai_harness/modules/harness/tasks.py - Change Config
src/ai_harness/modules/change_config/models.py
Review Contracts
- Review Contracts
src/ai_harness/modules/harness/review_transactions.py - Review Persistence
src/ai_harness/modules/harness/review_transaction_storage.py - Review Checkpoints
src/ai_harness/modules/harness/review_transaction_checkpoints.py - Receipts and Evidence
src/ai_harness/modules/harness/receipts.py - Shared Review Codec
src/ai_harness/modules/harness/_review_contract_codec_shared.py
Configuration
- Model Wizard
src/ai_harness/modules/wizard/tui.py - Wizard Data Logic
src/ai_harness/modules/wizard/pure.py - Model Overrides
src/ai_harness/modules/harness/override_store.py
Other components
- Engineer
Connections 28
- Engineer → Command CLI: runs commands
README.md - Command CLI → Repo Scaffolding: dispatches
src/ai_harness/main.py - Command CLI → Install Command: dispatches
src/ai_harness/main.py - Command CLI → Uninstall Command: dispatches
src/ai_harness/main.py - Command CLI → Model Command: dispatches
src/ai_harness/main.py - Command CLI → Worktree Commands: dispatches
src/ai_harness/main.py - Command CLI → Change Commands: dispatches
src/ai_harness/main.py - Repo Scaffolding → Change Config: scaffolds
src/ai_harness/commands/init.py - Install Command → Artifact Operations: installs
- Uninstall Command → Artifact Operations: removes artifacts
- Artifact Operations → Provider Dispatch: selects provider
src/ai_harness/modules/harness/administrators/__init__.py - Provider Dispatch → Provider Renderers: dispatches render
src/ai_harness/modules/harness/administrators/__init__.py - Artifact Operations → Agent Config Homes: writes artifacts
README.md - Model Command → Model Wizard: starts wizard
src/ai_harness/commands/set_models.py - Model Wizard → Wizard Data Logic: uses data logic
src/ai_harness/modules/wizard/tui.py - Model Wizard → Provider Dispatch: reads metadata
src/ai_harness/modules/wizard/tui.py - Model Wizard → Model Overrides: persists choices
src/ai_harness/modules/wizard/tui.py - Worktree Commands → Git Worktree Logic: creates worktrees
src/ai_harness/commands/worktree.py - Change Commands → Change Engine: invokes change operations
src/ai_harness/commands/change.py - Change Commands → Task Store: invokes task operations
src/ai_harness/commands/change.py - Change Engine → Change Flow: uses flow
src/ai_harness/modules/harness/change.py - Change Engine → Task Store: uses task store
src/ai_harness/modules/harness/change.py - Change Engine → Change Config: uses config models
src/ai_harness/modules/harness/change.py - Review Persistence → Review Contracts: encodes records
src/ai_harness/modules/harness/review_transaction_storage.py - Review Persistence → Receipts and Evidence: publishes bundles
src/ai_harness/modules/harness/review_transaction_storage.py - Review Checkpoints → Shared Review Codec: uses codec
src/ai_harness/modules/harness/review_transaction_checkpoints.py - Review Checkpoints → Review Persistence: uses storage errors
src/ai_harness/modules/harness/review_transaction_checkpoints.py - Review Checkpoints → Receipts and Evidence: publishes evidence
src/ai_harness/modules/harness/review_transaction_checkpoints.py