diff --git a/vibe/PRD/ai-back-office/STATUS.md b/vibe/PRD/ai-back-office/STATUS.md index 75d025d..56a217d 100644 --- a/vibe/PRD/ai-back-office/STATUS.md +++ b/vibe/PRD/ai-back-office/STATUS.md @@ -14,7 +14,7 @@ | 0 β€” Foundations | read skills, sandbox + promote, backups, snapshots, bank reco, email ingest, Telegram gateway MVP | βœ… shipped pre-PRD (ledger below) | | 1 β€” Flagship pipeline | [POC-1](poc-plan.md#poc-1--supplier-invoice-end-to-end) + [POC-5](poc-plan.md#poc-5--model-routing-bench) | 🟑 in progress β†’ [erp milestone P1](https://gitea.arcodange.lab/arcodange-org/erp/milestone/1) (erp#38–45, #47 β€” due 2026-10-09) Β· **#38 βœ… 2026-07-15** ([PR erp#62](https://gitea.arcodange.lab/arcodange-org/erp/pulls/62)) | | 2 β€” Urgent compliance | [POC-6](poc-plan.md#poc-6--e-invoicing-readiness-spike) β€” **hard deadline 2026-09-01** | ⬜ decomposed β†’ [erp milestone P2](https://gitea.arcodange.lab/arcodange-org/erp/milestone/2) (erp#46 β€” due 2026-09-01) | -| 3 β€” Standing fleet | [POC-2](poc-plan.md#poc-2--pi-sentinel), queue, digest + approval cards | ⬜ decomposed β†’ [erp milestone P3](https://gitea.arcodange.lab/arcodange-org/erp/milestone/3) (erp#48–50, #59 β€” due 2026-11-13) + [gateway#1](https://gitea.arcodange.lab/arcodange/telegram-gateway/issues/1)/[#2](https://gitea.arcodange.lab/arcodange/telegram-gateway/issues/2) | +| 3 β€” Standing fleet | [POC-2](poc-plan.md#poc-2--pi-sentinel), queue, digest + approval cards, harness portability | ⬜ decomposed β†’ [erp milestone P3](https://gitea.arcodange.lab/arcodange-org/erp/milestone/3) (erp#48–50, #59, #63 β€” due 2026-11-13) + [gateway#1](https://gitea.arcodange.lab/arcodange/telegram-gateway/issues/1)/[#2](https://gitea.arcodange.lab/arcodange/telegram-gateway/issues/2) | | Ledger compliance (cross-cutting) | [Dolibarr verifications](compliance.md#dolibarr-verifications-sandbox-first) | ⬜ decomposed β†’ [erp milestone](https://gitea.arcodange.lab/arcodange-org/erp/milestone/4) (erp#51 β€” due 2026-11-27) | | 4 β€” Money loops | [POC-3](poc-plan.md#poc-3--reconciliation--payment-recording), dunning, cash report | ⬜ decomposed β†’ [erp milestone P4](https://gitea.arcodange.lab/arcodange-org/erp/milestone/5) (erp#52–53 β€” due 2026-12-24) | | 5 β€” Fiscal autopilot | [POC-4](poc-plan.md#poc-4--tva-dry-run), compliance calendar | ⬜ decomposed β†’ [erp milestone P5](https://gitea.arcodange.lab/arcodange-org/erp/milestone/6) (erp#54–55, #60 β€” due 2027-05-04) | @@ -26,7 +26,7 @@ Every phase is decomposed into **self-contained issues** (context, deliverables, | Repo | Issues | | --- | --- | -| [erp](https://gitea.arcodange.lab/arcodange-org/erp/issues) | **P1:** #38 fleet scaffold βœ… 2026-07-15 (D8 settled, PR erp#62) Β· #39 golden set+injection fixtures (**entry issue**) Β· #40 invoice-extract atom Β· #41 provenance checker Β· #42 compliance linter Β· #43 GED attach op Β· #44 idempotency keys Β· #45 POC-5 routing bench (D5) Β· #47 POC-1 exit gate (umbrella) β€” **P2:** #46 POC-6 Qonto-as-PA (D4; step 1 = [HUMAN] Qonto UI) β€” **P3:** #48 T13 drift watchdog Β· #59 T14 backup freshness+drill Β· #49 T17 second-brain hooks (D7; meeting lane D9 parked) Β· #50 POC-2 Pi sentinel (D6) β€” **Compliance:** #51 Dolibarr verifications (FEC/BlockedLog, startable today) β€” **P4:** #52 POC-3 reco+payments Β· #53 T05 client invoice (D3, ⚠️ July manual ~07-23) β€” **P5:** #54 fiscal profile+calendar files+ADC register Β· #60 T11 reminder loop Β· #55 POC-4 TVA dry-runs β€” **Ops (post-replay):** #56 known-patterns fix Β· #57 bucket C + document gaps | +| [erp](https://gitea.arcodange.lab/arcodange-org/erp/issues) | **P1:** #38 fleet scaffold βœ… 2026-07-15 (D8 settled, PR erp#62) Β· #39 golden set+injection fixtures (**entry issue**) Β· #40 invoice-extract atom Β· #41 provenance checker Β· #42 compliance linter Β· #43 GED attach op Β· #44 idempotency keys Β· #45 POC-5 routing bench (D5) Β· #47 POC-1 exit gate (umbrella) β€” **P2:** #46 POC-6 Qonto-as-PA (D4; step 1 = [HUMAN] Qonto UI) β€” **P3:** #48 T13 drift watchdog Β· #59 T14 backup freshness+drill Β· #49 T17 second-brain hooks (D7; meeting lane D9 parked) Β· #50 POC-2 Pi sentinel (D6) Β· #63 harness portability β€” verifiers on Ornith/MLX+Mistral (D2) β€” **Compliance:** #51 Dolibarr verifications (FEC/BlockedLog, startable today) β€” **P4:** #52 POC-3 reco+payments Β· #53 T05 client invoice (D3, ⚠️ July manual ~07-23) β€” **P5:** #54 fiscal profile+calendar files+ADC register Β· #60 T11 reminder loop Β· #55 POC-4 TVA dry-runs β€” **Ops (post-replay):** #56 known-patterns fix Β· #57 bucket C + document gaps | | [telegram-gateway](https://gitea.arcodange.lab/arcodange/telegram-gateway/issues) | #1 Postgres durable queue (D1) Β· #2 daily digest + approval cards | | [factory](https://gitea.arcodange.lab/arcodange-org/factory/issues) | #22 ADRs as decisions close (D1/D2/D4/D6/D7) | diff --git a/vibe/PRD/ai-back-office/agent-architecture.md b/vibe/PRD/ai-back-office/agent-architecture.md index 978568e..210fe7a 100644 --- a/vibe/PRD/ai-back-office/agent-architecture.md +++ b/vibe/PRD/ai-back-office/agent-architecture.md @@ -185,7 +185,7 @@ To be settled by POC evidence, each closing with a short ADR: | # | Decision | Options (leaning) | | --- | --- | --- | | D1 | Work queue | telegram-gateway's planned Postgres durable queue (**leaning, operator-endorsed 2026-07** β€” already roadmapped, transactional, one less system) vs. flat files in git vs. Redis | -| D2 | Orchestration runtime | Claude Agent SDK headless for cluster-triggered jobs + **hermes** for M4-side lanes (**leaning** β€” hermes already runs skills + cron there) vs. bespoke TS orchestrator (erp `test/` Deno codebase) vs. pure CronJobs + scripts | +| D2 | Orchestration runtime | Claude Agent SDK headless for cluster-triggered jobs + **hermes** for M4-side lanes (**leaning** β€” hermes already runs skills + cron there) vs. bespoke TS orchestrator (erp `test/` Deno codebase) vs. pure CronJobs + scripts. **Operator direction 2026-07-15: the harness itself must be multi-runtime β€” Claude is an escalation tier, not a hard dependency; the same protocol must run on Mistral or on hermes + Ornith/MLX locally.** Verifier roles migrate first (bounded, read-only β€” and cross-family refutation is *stronger* verification than same-family); builder roles are benched on a scoped issue before trust ([model fleet β€Ί harness portability](model-fleet.md#harness-portability)) | | D3 | KM monthly invoice firing | enable Dolibarr template auto-fire (`frequency>0`) vs. agent-fired via sandbox+promote (**leaning** β€” keeps the gate + mention audit in-line) | | D4 | PA β€” e-invoicing platform (*plateforme agréée*, ex-PDP) | **Leaning: Qonto** (operator direction, 2026-07 β€” the capital-deposit bank, DGFiP-registered PA, e-invoicing included in every plan, and the fleet's richest existing API integration); POC-6 validates reception + API pull before the ADR β€” **must close before 2026-09-01** ([C12](challenges.md#c12--e-invoicing-reform-unknowns)) | | D5 | OCR provider for scanned docs | Mistral OCR (EU cloud) vs. local vision model on M4 vs. Tesseract baseline | diff --git a/vibe/PRD/ai-back-office/model-fleet.md b/vibe/PRD/ai-back-office/model-fleet.md index 629115f..8cfb141 100644 --- a/vibe/PRD/ai-back-office/model-fleet.md +++ b/vibe/PRD/ai-back-office/model-fleet.md @@ -44,6 +44,18 @@ The format guarantee never rests on the model: …and regardless of tier, every payload passes the same deterministic validators downstream ([agent architecture](agent-architecture.md#atom-contract)). Constrained decoding guarantees *shape*; validators guarantee *truth conditions* (arithmetic, checksums, plausibility). +## Harness portability + +The **atoms** above are multi-model by construction. The **harness** β€” the orchestration layer that executes backlog issues (builder sessions), verifies them (cold readers, locate-tests) and files PRs β€” ran its first full loop on Claude (erp#38 β†’ PR erp#62, 2026-07-15). **Operator direction (2026-07-15): that layer must not have Anthropic as a hard dependency either β€” the same loop should run on Mistral, or on hermes + Ornith / MLX-served local models.** + +The protocol was built for this: everything an executing agent needs lives in **files and issues** β€” AGENTS.md orientation, per-issue Execution footers (first command, done-means), acceptance tests defined in the issue itself, deterministic validators around every output. Nothing load-bearing lives in a vendor's context window. Any runtime that can read the forge and run a shell can attempt an issue; the acceptance gates don't care who built the thing. + +Migration ladder (evidence-gated like everything else β€” erp#63): + +1. **Verifier roles first** β€” locate-tests, cold-reader audits, refutation passes: bounded, read-only, cheap. Re-run the already-passed erp#38 locate-test on **Ornith** (hermes, `127.0.0.1:18080`) and on an **MLX-served candidate** (Qwen3 14B/30B-A3B, Mistral Small 3.x class); require verdict parity with the Claude run. Once parity holds, **prefer cross-family verification**: a different model family refuting the builder is stronger evidence than the builder's family agreeing with itself. +2. **Scoped builders benched** β€” one small, tightly-footered issue (a #56-class fix) attempted end-to-end by a Mistral-driven runtime against the unchanged acceptance gates; measure completion rate and intervention count. +3. **Claude stays the default** for multi-file builders, ambiguity and fiscal reasoning **until the bench says otherwise** β€” a routing-policy fact (complexity ceiling above), not an allegiance. + ## Degraded modes | Outage | Keeps working | Queues | Lost until recovery |