How duckz289/maf works
Adaptive Agent Harness is a local-first control plane for running coding tasks through native agents, while preserving their own planning and context loops. A user submits a repository task through the dashboard or API; the run service compiles its mission, executes it in an isolated worktree, gathers runtime evidence, and applies verification and bounded recovery policy. Results and operational state feed the dashboard. The README also documents repository knowledge, provider and agent connections, telemetry, health/evolution views, and benchmarking. Several links reflect documented capabilities rather than inspected wiring; those are left unconnected where ownership is uncertain.
Main entry points: run-service.ts Run Service · app.ts HTTP API · App.tsx Operations Dashboard · model-gateway.ts Native Agent Gateway
Components 21
User Interfaces
- Operations Dashboard
src/web/App.tsx - HTTP API
src/server/app.ts
Run Execution
- Run Service
src/application/run-service.ts - Mission Compiler
src/application/mission-compiler.ts - Isolated Worktree
src/infrastructure/local-worktree.ts - Verification
src/infrastructure/verifier.ts - Capability Execution
src/application/capability-execution.ts
Runtime Intelligence
- Adaptive Mode Policy
src/domain/mode-controller.ts - Runtime Signal Collector
src/application/runtime-signal-collector.ts - Repository Knowledge
src/application/project-knowledge.ts - Project Brain
src/infrastructure/project-brain.ts
Integrations
- Native Agent Gateway
src/infrastructure/model-gateway.ts - Agent Adapters
src/infrastructure/native-cli-adapter.ts - Provider Connections
src/infrastructure/provider-connections.ts
Operations
- Run State Store
src/infrastructure/memory-store.ts - PostgreSQL Store
src/infrastructure/postgres/store.ts - Telemetry
src/infrastructure/telemetry.ts - Benchmark Evaluation
src/evaluation/benchmark-bridge.ts - Control Center
src/application/control-center.ts
Other components
- User
- Installed Agent CLI
Connections 21
- User → Operations Dashboard: submits task
- Operations Dashboard → HTTP API: calls API
- HTTP API → Run Service: creates run
- Run Service → Mission Compiler: compiles mission
- Run Service → Isolated Worktree: isolates changes
- Run Service → Capability Execution: executes capabilities
- Run Service → Repository Knowledge: persists knowledge
- Run Service → Runtime Signal Collector: collects evidence
- Run Service → Adaptive Mode Policy: decides mode
- Run Service → Verification: verifies candidate
- Run Service → Native Agent Gateway: runs agent
- Native Agent Gateway → Agent Adapters: dispatches
- Agent Adapters → Installed Agent CLI: invokes
- HTTP API → Provider Connections: manages connections
- Run Service → Project Brain: stores project knowledge
- HTTP API → Run State Store: reads and writes runs
- HTTP API → PostgreSQL Store: uses durable state
- HTTP API → Telemetry: serves cost metrics
- User → Benchmark Evaluation: requests benchmark
- HTTP API → Control Center: serves operations views
- Operations Dashboard → Control Center: displays operations