How rubanchakravarthib308-spec/agent-control-plane works
Agent Control Plane is a guarded agent-execution layer. A goal is planned and validated, high-risk steps require scoped human approval, and each step must acquire an idempotency claim before tool execution and verification. The control plane records run state and audit events through a pluggable store, with in-memory and PostgreSQL implementations. Optional model-provider and human-review callbacks are integration boundaries, not execution authorities. Edges reflect the README and shown source; unsampled integrations are not expanded beyond documented boundaries.
Main entry points: control-plane.ts Control Plane · planner.ts Planner Adapter · run-store.ts Run Store Contract · postgres-run-store.ts PostgreSQL Store
Components 17
Planning
- Planner Adapter
src/planner.ts - Plan Validation
src/planner.ts
Safety Governance
- Control Plane
src/control-plane.ts - Approval Policy
src/approval-policy.ts - Domain Types
src/types.ts
Execution
- Tool Registry
src/tool-registry.ts - Registered Tool Handlers
src/tool-registry.ts - Verification Callback
Run Persistence
- Run Store Contract
src/run-store.ts - In-Memory Store
src/memory-run-store.ts - PostgreSQL Store
src/postgres-run-store.ts - PostgreSQL Database
- Run Schema
migrations/001_run_store.sql - Execution Claims Schema
migrations/002_execution_claims.sql
Other components
- Agent Goal
- Model Provider
- Human Reviewer
Connections 17
- Agent Goal → Control Plane: submits goal
README.md - Control Plane → Planner Adapter: requests plan
src/control-plane.ts - Planner Adapter → Model Provider: generates proposal
src/planner.ts - Planner Adapter → Plan Validation: validates plan
src/planner.ts - Control Plane → Approval Policy: builds and checks
src/control-plane.ts - Control Plane → Human Reviewer: requests decision
src/control-plane.ts - Control Plane → Tool Registry: executes step
src/control-plane.ts - Tool Registry → Registered Tool Handlers: dispatches handler
src/tool-registry.ts - Control Plane → Verification Callback: verifies output
src/control-plane.ts - Control Plane → Run Store Contract: records run
src/control-plane.ts - In-Memory Store → Run Store Contract: implements contract
src/memory-run-store.ts - PostgreSQL Store → Run Store Contract: implements contract
src/postgres-run-store.ts - Control Plane → In-Memory Store: defaults to
src/control-plane.ts - PostgreSQL Store → PostgreSQL Database: reads and writes
src/postgres-run-store.ts - PostgreSQL Database → Run Schema: uses run tables
- PostgreSQL Database → Execution Claims Schema: uses claim table
- Control Plane → Domain Types: uses domain records
src/control-plane.ts