Foundry Foundry

Epic: QuoteAI Vertical on Autri

Roadmap item 4 of brehob-launch · the actual Phase-1 deliverable · target window: M4 (Jul 24, "Platform config & build") → M5 UAT (Aug 1, in brehob-prod) · → North Star B6 (DB-1: consume, not merge).

Objective

QuoteAI collapses to the vertical: intake form → AI quote drafting grounded in the Brehob KB → template render → PDF exportreview & approval → admin routing — shipped inside Autri's deployment, behind a clean in-process module boundary, built to scale to consumers beyond QuoteAI.

Two locked design calls

  • Retrieval is spike-first, not rewire-first (6/10). Autri's generic surface is the default; QuoteAI's 6 drafter tools are NOT assumed. Four of six map onto generic vector/FTS/lookup (and improve with item 1's keyword metadata). The one specialized capability — search_equipment's numeric-range filtering (HP/CFM/PSI) — gets built as a generic Autri search feature (structured-metadata filters) only if Gate-0b output ⑥ shows generic retrieval falls short.
  • Model path = DB-7. Phase-1 inference on Bedrock inside brehob-prod (the drafter is already an in-app Agent SDK → Sonnet call; Bedrock is an environment switch), direct Anthropic API behind a fallback flag if access approval drags.

Work breakdown

  • S1 — Retrieval integration. Per Gate-0b ⑥: wire the drafter to Autri retrieval (in-process behind the module boundary; same seam the consumable API exposes). If the metadata-filter primitive is demanded, build it in Autri's retrieval package as a generic search parameter + ingest-side structured-attribute extraction for the equipment KB.
  • S2 — Model path. Bedrock env config in brehob-prod + the fallback flag; verify drafting quality parity on the golden scenarios before committing the default.
  • S3 — Data model. Quote tables (requests, drafts, line items, approvals) via Autri migrations, org-scoped (D13). QuoteAI's old pgvector/MCP schemas are NOT migrated — they're shed (DB-1).
  • S4 — Drafting UX in Autri. Port the intake form + draft view (both built in the QuoteAI demo) into the Autri app surface; SSE drafting flow; price-injection render (renderMarkdown placeholders) carries over.
  • S5 — PDF export (build). Disabled-by-design in the demo — this is a real build: render the Brehob template to PDF with line-item totals; pick the rendering approach (HTML→PDF in a worker vs a library) with the Lambda constraints in mind.
  • S6 — Review & approval workflow (build). Genuinely absent. Full scope: submit → review → approve/reject with comments → status + notification. Fallback ②: single-stage v1 if sizing busts.
  • S7 — Admin + reviewer routing. Rides Autri auth/roles; Brehob's actual org is small — don't gold-plate role machinery.
  • S8 — Boundary hygiene (continuous). The carried open question: does the in-process bundle stay clean enough to split QuoteAI out later? Review the import graph at each PR; QuoteAI code may consume Autri's retrieval/auth modules through their public interfaces only.

Acceptance

The UAT script, in brehob-prod: intake → draft grounded in the Brehob KB (golden scenarios incl. Powerex pass) → rendered PDF → approval round-trip → correct routing. Inference via Bedrock (or the flag consciously flipped). No deep imports across the QuoteAI/Autri boundary.

References

DB-1, DB-7, Gate-0b ⑥, the 6-tool inventory + seam analysis (resolved brehob-launch annotations, 6/10), quoteai/app/lib/cc/generate.ts (drafter), quoteai/app/prompts/quote-drafter.md (template + hard rules).

Review

🔒

Enter your access token to view annotations