PRD_VP-Agent_Local_Code_Operator.md
_(a.k.a. “VP of Engineering” primary agent with local file-system access + multi-kickoff interfaces)_
11/7/2025
Trent Carter
1) Summary (what & why)
We’re shipping a local, sandboxed code operator that acts as the user’s entry point (“VP of Engineering” agent). It runs on the developer’s machine (terminal-first), exposes a small command API (JSON-RPC over stdio/WebSocket), and can read/write/edit files, run tests, call git, and talk to PAS/PLMS/HMI. It can delegate to external LLMs but never requires them to have direct repo access—the agent is the bridge. This gives us one kickoff surface that works from Terminal, VS Code, Cursor, and Windsurf (all can drive a terminal or a small localhost port).
We’ll ship with two open-source code-model options pre-configured (for fully local execution):
(You can swap these for any local or API model via the model broker.)
2) Users & primary jobs
3) Goals & Success metrics
Goalsvp start and complete end-to-end through PAS, with artifacts committed to git.4) Scope (V1) / Non-goals
In scope (V1)5) Architecture (high-level)
[Human] │ (Terminal/IDE/Web) ▼ [VP Agent: Local Code Operator] ├─ File System Sandbox (allowlisted workspace) ├─ Command Runner (build/test/lint) ├─ Git Client (branch/commit/PR) ├─ Model Broker: │ ├─ Local: Qwen-Coder, Phi-code │ └─ API: OpenAI/Gemini/Claude/… (context packaged by VP) ├─ PAS Client (job cards, receipts, KPI emit) └─ PLMS Client (plan/estimate/simulate/start/metrics)
6) Kickoff surfaces (5 ways)
vp new, vp plan, vp simulate --rehearsal 0.01, vp start, vp status, vp logs, vp validate, vp complete.
Extension invokes the terminal client under the hood; no duplicate logic.
--serve 127.0.0.1:7011 provides JSON-RPC over WebSocket for simple web UI buttons.
Git hook or CI step hits local/runner to start a PLMS run with the current commit.
External systems post a PRD to PLMS; PLMS notifies VP Agent on the developer workstation to initialize the local workspace.
7) Command/API specification (essentials)
CLIvp new --name [--template ] → initializes local state, registers with PLMS.vp plan [--from-prd docs/PRD.md] → orchestrates PLMS clarify/PRD gen.vp estimate → PLMS estimates; prints CI bands.vp simulate --rehearsal 0.01 → 1% canary via PAS; shows risk & runway.vp start [--idempotency ] → baseline run, writes replay passport.vp status / vp logs → tails PAS receipts, KPI results.vp validate → Echo + KPI gates; prints violations.vp complete → marks completion if gates pass.vp model set → set model broker policy (cost/capability/latency).vp fs patch → apply unified diff (audit-safe edits).vp git {branch|commit|push|pr} → signed commits, PR metadata.fs.read(path) → {content, sha}fs.patch(unified_diff) → {applied, hunks}search.code(query) → {matches:[{file, line, snippet}]}run.test(args) → {pass_rate, report_path}git.commit(message, signoff) → {sha}pas.submit(jobcard) / plms.* → thin wrappers with idempotency header8) Model broker (cost/capability policy)
- max cost/min, max tokens/min, expected latency, context limits
- required tools (e.g., code-edit, tool-use)
9) Security & safety
pytest, ruff, make, npm, etc.), no raw shell by default.