Skip to main content

Tasks, Tools & Governance

AI Coder demonstrates how ACM tasks, tools, policies, and budgets collaborate to automate developer workflows.

Capability map

CapabilityDescriptionKey Tasks
context.collectIndex repository files, symbols, dependenciesAnalyzeWorkspaceTask, CollectContextPackTask
code.searchRetrieve code snippets via BM25 or grepSearchCodeTask, FindSymbolDefinitionTask
code.editApply AI-generated patches with user approvalImplementFunctionTask, RefactorRenameSymbolTask, CodeEditToolV2
quality.testRun targeted tests or buildsRunTestsTaskV2, BuildTool
knowledge.retrievePull docs via MCP servers (filesystem, GitHub)CodeSearchTool, FilesystemTool

All capabilities are implemented with the same Tool and Task abstractions available to your own agents.

Tooling highlights

  • File operations — Read, diff, and patch files with backup safeguards.
  • Search — Combine BM25 indexes with repo-aware grep for high recall.
  • Tests — Run pnpm/npm scripts, capture exit codes, and stream logs.
  • MCP — Reach external knowledge bases or memory stores deterministically.

Policy & verification

  • Budget policy — Checks forecasted and actual spend before each LLM call.
  • Path allowlists — Prevent edits outside the workspace or to restricted directories.
  • Verification — Ensures generated diffs compile and tests succeed.

Context lifecycle

  1. Index workspace metadata into structured artifacts.
  2. Promote relevant files and symbols into the context packet.
  3. Planner reasons about the augmented context to craft tasks.
  4. Runtime executes tasks, streaming updates to the TUI and ledger.

Extending AI Coder

  • Register new tools under src/tools-v2/.
  • Create tasks under src/tasks-v2/ and register them with SimpleCapabilityRegistry.
  • Update budgets in src/config/budget.ts and policy rules in src/config/policy.ts.
  • Add new MCP integrations in src/context/ by registering additional servers.

References