docs(prd): AI back-office — agent fleet for daily admin & accounting #21

Merged
arcodange merged 12 commits from arcodange/prd-ai-back-office into main 2026-07-11 20:21:07 +02:00
Owner

What

New PRD tree vibe/PRD/ai-back-office/ — the groundwork for implementing AI agents (Claude, Mistral, local model on the M4, SLM on the Pi cluster) that run Arcodange's daily administrative and accounting work. High-level PRD in the hub; technical depth (architecture, model routing, challenges & mitigations, POC plan, QA) in the leaves.

Advances PRD: vibe/PRD/ai-back-office/README.md (this PR authors it)

Contents

Page What
README.md (hub) Problem, personas, goals/non-goals, autonomy ladder A0–A3, architecture at a glance (validated mermaid), regulatory milestones (e-invoicing 2026-09-01 / 2027-09-01, fin du régime simplifié 2027-01-01), success criteria, phased roadmap
task-inventory.md T01–T16 + backlog — every recurring task with trigger, mode opératoire ([AGENT]/[HUMAN] steps), guardrails, current tooling, target autonomy
agent-architecture.md Atom contracts (registry), pipeline shape (validated mermaid), ADR-0003 write gate reuse, ephemeral scoped ERP workers, prompt-injection defenses, runtimes, open decisions D1–D6
model-fleet.md The four tiers, routing policy (sensitivity → complexity → stakes → availability), structured-output enforcement, degraded modes, cost envelope
challenges.md C1–C12 risks with strategies + residual ownership
poc-plan.md POC-1…6 with hard exit criteria + challenge coverage matrix
qa-strategy.md Golden sets, eval harness, mechanical autonomy-promotion gates, write-path QA, €-parity fiscal checks, ops QA
STATUS.md Foundation ledger (erp#21–35, factory#15–19, tools#2/3/5 …) + phase tracker

Plus: index row in vibe/PRD/README.md, bidirectional backlinks in the erp guidebook and the safe-prod-like-environment PRD.

QA done

  • Both mermaid diagrams validated with the Mermaid MCP (+ numbered-list restatement per house rules).
  • Fresh-reader subagent review: 209 links/anchors script-verified (0 broken), Continuity-Warden checklist green (breadcrumbs, blockquotes, bidirectional links, no tombstones, ID/date consistency), 8-question reader test passed — its 8 friction findings (acronym glosses, A3-eligible wording, degraded-mode scope, 98 % bar denominator, unrouted T01 classes, phase overlap…) are all fixed in this diff.
  • Regulatory dates cross-checked against economie.gouv / service-public / LégiFiscal (LF 2025 art. 38).

🤖 Generated with Claude Code

## What New PRD tree **`vibe/PRD/ai-back-office/`** — the groundwork for implementing AI agents (Claude, Mistral, local model on the M4, SLM on the Pi cluster) that run Arcodange's daily administrative and accounting work. High-level PRD in the hub; technical depth (architecture, model routing, challenges & mitigations, POC plan, QA) in the leaves. **Advances PRD:** [vibe/PRD/ai-back-office/README.md](https://gitea.arcodange.lab/arcodange-org/factory/src/branch/arcodange/prd-ai-back-office/vibe/PRD/ai-back-office/README.md) (this PR authors it) ## Contents | Page | What | | --- | --- | | `README.md` (hub) | Problem, personas, goals/non-goals, autonomy ladder A0–A3, architecture at a glance (validated mermaid), regulatory milestones (e-invoicing 2026-09-01 / 2027-09-01, fin du régime simplifié 2027-01-01), success criteria, phased roadmap | | `task-inventory.md` | T01–T16 + backlog — every recurring task with trigger, mode opératoire (`[AGENT]`/`[HUMAN]` steps), guardrails, current tooling, target autonomy | | `agent-architecture.md` | Atom contracts (registry), pipeline shape (validated mermaid), ADR-0003 write gate reuse, ephemeral scoped ERP workers, prompt-injection defenses, runtimes, open decisions D1–D6 | | `model-fleet.md` | The four tiers, routing policy (sensitivity → complexity → stakes → availability), structured-output enforcement, degraded modes, cost envelope | | `challenges.md` | C1–C12 risks with strategies + residual ownership | | `poc-plan.md` | POC-1…6 with hard exit criteria + challenge coverage matrix | | `qa-strategy.md` | Golden sets, eval harness, mechanical autonomy-promotion gates, write-path QA, €-parity fiscal checks, ops QA | | `STATUS.md` | Foundation ledger (erp#21–35, factory#15–19, tools#2/3/5 …) + phase tracker | Plus: index row in `vibe/PRD/README.md`, bidirectional backlinks in the erp guidebook and the safe-prod-like-environment PRD. ## QA done - Both mermaid diagrams validated with the Mermaid MCP (+ numbered-list restatement per house rules). - Fresh-reader subagent review: 209 links/anchors script-verified (0 broken), Continuity-Warden checklist green (breadcrumbs, blockquotes, bidirectional links, no tombstones, ID/date consistency), 8-question reader test passed — its 8 friction findings (acronym glosses, A3-eligible wording, degraded-mode scope, 98 % bar denominator, unrouted T01 classes, phase overlap…) are all fixed in this diff. - Regulatory dates cross-checked against economie.gouv / service-public / LégiFiscal (LF 2025 art. 38). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
arcodange added 1 commit 2026-07-11 14:25:34 +02:00
New PRD tree vibe/PRD/ai-back-office/ (hub + 6 leaves + STATUS): task
inventory T01-T16 with mode operatoire, atom/contract architecture on
the ADR-0003 write gate, four-tier model fleet (Claude/Mistral/M4/Pi),
12 challenges with mitigations, POC plan with exit criteria, QA
strategy with autonomy promotion gates. Index row + bidirectional
backlinks (erp guidebook, safe-prod PRD).

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 14:26:02 +02:00
arcodange added 1 commit 2026-07-11 14:35:27 +02:00
The PARA Obsidian vault (arcodange/SecondBrain — git-synced, sb.py
digest/inbox/gitea-ingest jobs on the hermes cron ticker, local Ornith
model, mcp-obsidian access) enters the PRD as a first-class component:
new T17 knowledge capture & retrieval fiche, knowledge-layer section in
the architecture (ERP = book of record, vault = context + institutional
memory, append-only idempotent deposits, trusted-but-stale retrieval),
hermes/Ornith recognized as the resident M4 runtime (D2 leaning, new D7
cluster<->vault access decision), foundation ledger row, diagram +
goals updated (mermaid revalidated, 231 links/anchors re-checked green).

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 14:39:47 +02:00
Operator direction: Qonto is the capital-deposit bank, a DGFiP-registered
PA with e-invoicing included in every plan, and the fleet's richest
existing API integration. POC-6 rewritten from shortlist to validation
spike (reception + business-API pull + GED archival + 2027 e-reporting
path for the KM export invoices); C12 residual now names the vendor-
concentration trade-off; terminology refreshed PDP -> PA (renamed by the
administration in July 2025); 2027-09 milestone clarified (e-reporting
for export invoices; emission only if a French B2B client arrives).

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 14:48:26 +02:00
New compliance.md leaf: French bookkeeping obligations mapped to fleet
mechanisms — inaltérabilité (L.123-22) via an append-only production
ledger grammar (create/validate/pay/avoir, never mutate a validated
document) enforced by a promote-plan compliance linter; FEC (L.47 A
LPF) with quarterly export + Test Compta Demat validation (accounting-
module binding flagged as unverified gap); piste d'audit fiable (289
VII CGI) framed as a by-product of journals + tx-id reco + monthly
packs; retention, numbering, copie fiable; loi anti-fraude scoped out
(B2B-only) with BlockedLog as sandbox-first belt-and-braces.

New Environments section in agent-architecture: prod = the ledger
(grammar-bound), sandbox = disposable iso-prod rehearsal (exempt, never
wired to production third parties); side_effect_class -> environment/
credential mapping; POCs write on sandbox only; evals target fresh
checkpoints; irreversible-by-design features trial on checkpoints.

Woven through hub (goal, requirement, success criteria, leaves table),
T03/T05/T15 guardrails, QA (linter suite, pure-append snapshots, FEC
cadence, PAF evidence framing), C2, POC-1 exit criteria.

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 15:02:09 +02:00
New roadmap.md: mermaid Gantt (validated) putting the six phases on
calendar time from baseline 2026-07-11 — P2 e-invoicing opens the plan
(ADR D4 target 08-14, two-week fallback before the hard 09-01), P1
flagship in parallel (golden set first, A2 earned ~10-09), ledger-
compliance verifications early September (FY-2026 FEC depends on the
accounting-module answer), P3 standing fleet through autumn (sentinel
24/7 ~11-13), P4 money-loop exit over December, P5 riding the fiscal
calendar (acompte 12-15, CA3 switch 01-01, Q1 filing April, CA12 early
May, AG 06-30), P6 e-reporting proven months before 2027-09-01.
Immovable-milestone table, dependency notes, re-baselining rule
(engineering bars slide, diamonds don't — slips shed scope instead).
Wired: hub pointer + leaves row, poc-plan/STATUS backlinks.

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 15:09:33 +02:00
New agent-catalog.md leaf answering three operator directions:
(1) the document surface agents read is now specified — AGENTS.md
orientation maps, SKILL.md with trigger-carrying descriptions
(Use-when/SKIP-for), atom.yaml registry contracts, thin prompt.md
files (no business rules in prompts — rules live in profile files
and validators), schema'd fiscal.yaml/calendar.yaml with
effective_from dates, [AGENT]/[HUMAN] runbooks, env-var-indirected
.mcp.json; same-change freshness rule extended to the fleet.
(2) hermes's telegram-gateway confirmed as THE human channel when
available (cluster-served cards, email fallback; D1 operator-endorsed).
(3) the categorization to prove: seven agent classes (incl. the
LLM-free deterministic controller) and a T01-T17 assignment matrix
with per-row proof gates and statuses (proven / to-prove / not-built),
re-scored monthly from run journals (fallback rate >20% = wrong cell).
New D8 (fleet code home, leaning erp fleet/).

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 17:42:03 +02:00
Operator requirement (2026-07-11): mechanical measures against
hallucinated values in agent-performed edits. Four deterministic
layers in agent-architecture: (1) no free-text critical fields —
code copies values from validated extraction/bank-feed payloads,
the model never re-types them; (2) provenance anchors per critical
field {source_sha256, raw_excerpt} re-verified by a deterministic
checker against re-extracted source text (locale-normalized);
(3) cross-system corroboration against FRESH bank pulls + arithmetic
/checksum invariants; (4) read-back closes the loop. A failed check
refuses, never repairs. Woven into hub goal, C1 strategy, and QA
write-path (seeded-wrong-value fixtures must FAIL). Proven live:
the books-regularization pack shipped with a standalone
verify-provenance checker — 36 field-level checks green against
source PDFs + fresh Qonto/Wise feeds before the human gate.

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 18:22:15 +02:00
Operator request 2026-07-11: decompose the PRD into less-high-level,
unambiguous work items. 23 self-contained issues filed (context,
deliverables, acceptance criteria, dependencies, PRD links): erp#38-57
across 6 dated milestones (P1 flagship, P2 e-invoicing hard 09-01,
P3 standing fleet, ledger compliance, P4 money loops, P5 fiscal),
telegram-gateway#1-2 (queue D1 + digest/cards), factory#22 (ADR
tracking for D1/D2/D4/D6/D7). STATUS phase tracker now points each
phase at its milestone; resume protocol for future sessions: pick the
top unblocked issue of the earliest open milestone.

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 20:08:45 +02:00
Agents discovering the lab through AGENTS.md now find the decomposed
AI back-office backlog (STATUS map, erp milestones, gateway issues,
factory#22 ADR tracking) and the resume protocol.

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 20:16:20 +02:00
Operator requirement: the resume protocol's twin. A milestone closes
only through an 8-step sweep that OPENS with a QA gate (acceptance
criteria re-verified with evidence, test suites green — golden-set
bars, injection fixtures, linter suites incl. seeded-wrong provenance
FAILs, idempotency replay; catalog status flips backed by proving-
protocol evidence; can't pass QA -> shed scope, don't close) and ENDS
with doc-surface QA (link/anchor check, deprecation grep of the claims
the milestone retired, fresh-reader smoke test by a context-free
subagent). In between: STATUS flip, roadmap re-baseline (diamonds never
move), no-tombstone truth-pass of leaves, AGENTS.md/SKILL.md/guidebook
sweep, outward loop (ADRs, memories, second-brain REX). Reader's half:
trust order live system > code > STATUS > leaves > memories; stale
Last Updated = suspect. Summarized as a house rule in factory
AGENTS.md, canonical checklist in the PRD STATUS.

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange added 1 commit 2026-07-11 20:19:24 +02:00
Operator addition to the closure protocol: the QA gate is held by an
independent verifier subagent — context-free, prompted to REFUTE, repo
+ issues + journals as its only inputs; verdict posted on the milestone,
unresolved refutation blocks. New qa-strategy section extends no-self-
grading to POC exit gates and autonomy promotions (verdict attached to
the artifact it gates), mirroring at process level what the pipelines
do at data level (dual extraction, seeded-wrong fixtures).

Co-Authored-By: Claude Fable 5 <[email protected]>
arcodange merged commit 3df2dd0700 into main 2026-07-11 20:21:07 +02:00
arcodange deleted branch arcodange/prd-ai-back-office 2026-07-11 20:21:08 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arcodange-org/factory#21