From 5aea83749dd62edea2c97c3f6180e7c5e4abdc83 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Wed, 15 Jul 2026 18:49:05 +0200 Subject: [PATCH 1/2] =?UTF-8?q?docs(prd):=20harness=20portability=20?= =?UTF-8?q?=E2=80=94=20Claude=20as=20escalation=20tier,=20not=20hard=20dep?= =?UTF-8?q?endency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator direction 2026-07-15: the orchestration layer itself (builder sessions, cold verifiers) must run on Mistral or hermes+Ornith/MLX too. The protocol already carries everything in files+issues; new model-fleet section defines the evidence-gated ladder — verifier roles migrate first (cross-family refutation is stronger verification), scoped builders benched on unchanged acceptance gates, Claude default until the bench says otherwise. D2 row records the direction; spike = erp#63. Co-Authored-By: Claude Fable 5 --- vibe/PRD/ai-back-office/agent-architecture.md | 2 +- vibe/PRD/ai-back-office/model-fleet.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) 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 | From c7320d28116255d829534a44120fb3bf6b04d582 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Wed, 15 Jul 2026 18:50:05 +0200 Subject: [PATCH 2/2] =?UTF-8?q?docs(prd):=20STATUS=20=E2=80=94=20erp#63=20?= =?UTF-8?q?harness-portability=20spike=20joins=20P3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- vibe/PRD/ai-back-office/STATUS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) |