How maneeshchaturvedi/ai-engineering-harness works
aih is a Go CLI that installs and operates an AI engineering harness in a user’s repository. Its main workflow moves from repository inspection and setup, through an interview and approved spec/design, to locked acceptance checks and scoped task work; hooks and GitHub CI enforce the rules at edit, commit, and merge time. The README documents these product stages and capabilities. Sampled source confirms several implementation responsibilities, but many lifecycle and integration details are unsampled, so the graph avoids asserting undocumented calls between those components.
Main entry points: init.go Initialize harness · root.go aih CLI · more.go Feature lifecycle · guard.go Edit hooks
Components 24
Repository setup
- Initialize harness
internal/bootstrap/init.go - Preflight checks
internal/preflight/preflight.go - Project detection
internal/detect/detect.go - Setup interview
internal/interview/form.go - Harness rendering
internal/render/render.go - Project scaffold
internal/scaffold/scaffold.go - Setup plan
internal/plan/plan.go
Feature planning
- Feature lifecycle
internal/lifecycle/more.go - Spec and design
internal/spec/spec.go - Acceptance checks
internal/blackbox/blackbox.go
Task execution
- Scoped task
internal/scope/scope.go - Copilot session
internal/hooks/session.go - Claude adapter
internal/adapters/claude/settings.go - Kiro adapter
internal/adapters/kiro/kiro.go
Policy enforcement
- Edit hooks
internal/hooks/guard.go - Git commit hooks
internal/githooks/githooks.go - Merge-time CI
internal/ci/approval.go
Harness operations
- aih CLI
internal/cli/root.go - Harness doctor
internal/doctor/doctor.go - GitHub setup
internal/ghsetup/ghsetup.go
Other components
- Person
- GitHub Actions
- Coding copilot
- User repository
Connections 29
- Person → aih CLI: runs commands
README.md - aih CLI → Initialize harness: runs init
README.md - Initialize harness → Preflight checks: checks repository
internal/bootstrap/init.go - Initialize harness → Project detection: detects project
internal/bootstrap/init.go - Initialize harness → Setup interview: collects answers
internal/bootstrap/init.go - Initialize harness → Harness rendering: renders harness
internal/bootstrap/init.go - Initialize harness → Setup plan: previews changes
internal/bootstrap/init.go - Initialize harness → Project scaffold: creates project
- Initialize harness → User repository: writes harness
README.md - Person → aih CLI: starts feature
README.md - aih CLI → Feature lifecycle: advances feature
README.md - Feature lifecycle → Spec and design: creates and validates
README.md - Person → Spec and design: approves decisions
README.md - Feature lifecycle → Acceptance checks: generates checks
README.md - Person → Acceptance checks: approves and locks
README.md - Feature lifecycle → Scoped task: opens scoped work
README.md - Scoped task → Copilot session: sets session context
internal/hooks/session.go - Copilot session → Coding copilot: provides design context
internal/hooks/session.go - Claude adapter → Edit hooks: configures hooks
- Kiro adapter → Edit hooks: configures hooks
- Coding copilot → Edit hooks: checked during edits
README.md - Person → Git commit hooks: commits changes
README.md - Git commit hooks → User repository: checks approvals
README.md - GitHub Actions → Merge-time CI: runs merge checks
README.md - Merge-time CI → User repository: rechecks changes
README.md - aih CLI → Harness doctor: checks installation
README.md - Initialize harness → Harness doctor: checks setup
internal/bootstrap/init.go - Initialize harness → GitHub setup: offers GitHub setup
internal/bootstrap/init.go - GitHub setup → GitHub Actions: sets up workflow