Component map
Companion forecast_agent_architecture.md is not in this repo. C1 and C3 are unnamed in the PRD body.
TODO: recover C1 and C3 names from the missing architecture companion.
Invariants
Section titled “Invariants”- C4 owns every write. The agent does not write to Postgres except through middleware tools.
- C2b is additive only. It may insert
kind = judgementflags. It may not clear, modify, or contradict a rule flag. It may raise priority, never lower it. It has no path to RAG or weighted value. - RAG derives from MEDDIC completeness alone. Analyst output is not an input.
- Nothing writes to
opportunitiesexcept through rep approval (or seed/admin reset). Failed stage gates still queue a proposal; apply re-checks the gate.
Components in the PRD
Section titled “Components in the PRD”C2 — Triage engine
Section titled “C2 — Triage engine”Deterministic. apps/api/src/services/triage.ts plus config/triage.yaml. Writes flags with kind = 'rule'. See Triage rules.
C2b — Analyst pass
Section titled “C2b — Analyst pass”LLM judgement flags only. Prompt in config/analyst.md. Expiry from judgement_ttl_days. Suppression is an operator edit of the prompt, not automatic.
C4 — Middleware and rules service
Section titled “C4 — Middleware and rules service”Fastify in apps/api. Tools, evidence validation, stage gates, session lifecycle, post-call webhook. See Agent tool contracts and Stage gates.
C5 — Rep and manager UI
Section titled “C5 — Rep and manager UI”React app in apps/web. Renders server state. No methodology math in the browser.
C6 — Config
Section titled “C6 — Config”Seeded from /config, versioned in config_files. Postgres is authoritative at runtime. The admin console holds history, diffs and revert. This doc site does not.
C7 — Evaluation and regression
Section titled “C7 — Evaluation and regression”Per-session scores over the tool-call log. Simulation via ElevenLabs is optional. Middleware scenario tests in apps/api/src/services/scenarios.test.ts are the regression that runs in CI without voice.
C8 — Admin console
Section titled “C8 — Admin console”Unguessable route prefix. Data browser, config editor, operations, tuning map, graduation/suppression candidates.
Mock Salesforce adapter
Section titled “Mock Salesforce adapter”apps/api/src/services/crm.ts. pushChanges writes mock_crm_writes. Real Salesforce is out of scope.
Diagram
Section titled “Diagram”TODO: export a C1–C8 diagram here once the companion architecture doc is in the repo. Markdown remains the source; any image is an export.