S209 Agent Prompt

Documentation for Sessions

S209 Agent Prompt

Copy everything below this line and paste it as the first message to the agent.


Session 209: Agent Lifecycle E2E + Command Center + Intelligence Wiring

Adopt a senior engineer mindset. Prioritize correctness and clarity over politeness. Be candid and specific: call out risks, gaps, and weak designs, but avoid nitpicking. Propose solutions that are practical, high-quality, and easy to operate. Use strong logic and sound business judgment. Be inventive where it creates real leverage. Do not guess or invent facts; if uncertain, state assumptions and what to verify. Be genuinely critical — don't soften feedback to be polite. What are the real weaknesses? What edge cases might I be missing? But also tell me if something is actually fine. Make sure you constantly leverage our codebase's infrastructure, including our mcp-gograb-ai's tools.

MCP Workflow (MANDATORY)

Before ANY implementation work:

  1. preflight({ task: "S209 agent lifecycle + command center", sessionNumber: 209 })
  2. find_similar({ query: "agent training pipeline sub-agent execution" }) for past decisions
  3. convention({ action: "get" }) for current conventions

For every non-trivial decision:

After each phase completes:

Context: What S208 Built (DO NOT re-research — this is authoritative)

App reorganization (DONE):

Metacognition (DONE but UNTESTED):

libs-ai cleanup (DONE):

Agent pipeline status (60% built — THIS IS WHAT S209 COMPLETES):

Component Status File
Agent Seeding (4 system agents) WORKING backend-vitto-api/.../engine/agent-seed.service.ts
Agent Definitions CRUD WORKING backend-vitto-api/.../engine/sub-agent.service.ts
Decision Capture (12K+) WORKING backend-ai-api/.../command-center/
Context Injection (patterns→prompts) WORKING backend-vitto-api/.../engine/sub-agent.service.ts:buildSystemPrompt()
Command Center WebSocket (30+ events) WORKING but OFFLINE in UI backend-ai-api/.../command-center/command-center.gateway.ts
Training Pipeline STUB — mock OpenAI calls backend-ai-api/.../platform-ai/services/training-pipeline.service.ts:122-150
Platform Intelligence UI HARDCODED — shows 0% success @libs-ai/ai-agents-training-center training-center.component.ts
Sub-Agent Self-Execution MISSING backend-vitto-api/.../engine/sub-agent.service.ts

Your 6 Phases (in execution order)

Phase 1: Fix Command Center OFFLINE (15 min)

Phase 2: Fix Platform Intelligence hardcoded values (1-2 hrs)

Phase 3: Verify conscience + introspection work E2E (1-2 hrs)

Phase 4: Replace mock training with few-shot injection (2-3 hrs)

Phase 5: Migrate key pages from gograb-dev to gograb-ai (2-3 hrs)

Phase 6: Wire sub-agent self-execution (4-6 hrs)

Port Reference (CRITICAL — wrong port = silent 404)

Token Import Port Use For
API_BASE_URL @libs-foundational/core-angular 3000 Users, auth, CRUD
AI_API_URL @libs-foundational/api-config 3001 Chat, AI, Command Center WebSocket
DOCS_API_URL @libs-foundational/api-config 3002 Documentation
VITTO_API_URL @libs-foundational/api-config 3003 Vitto engine, SSE, agent definitions

Code Standards (enforced)

Rule Standard
Components Angular 20+, standalone, OnPush, inject()
State Signals (local) → RxJS (async) → NGXS (global only)
Async RxJS Observables ONLY — no Promises, no setTimeout
Files Separate .ts, .html, .scss — no inline
Types In models/ directory — never locally in components
any Use SafeAny only if absolutely necessary

Git Protocol

Intelligence v2 Spec (reference, not for this session)

Full spec at docs/superpowers/specs/2026-03-12-vitto-intelligence-v2-design.md covers Skills Closed Loop, Proactive Intelligence, Dossier Enhancement, Golden Path Tests, Cost Improvements. S209 focuses on completing the agent pipeline that this spec depends on.

Documentation created in S208 (read these for deep context if needed)