docs(prd): sandbox-vs-prod posture + certified-accounting-grade operations
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]>
This commit is contained in:
@@ -17,7 +17,7 @@ The fleet's product is *trustworthy books*, so QA is not a phase — it is the o
|
||||
|
||||
## Eval harness
|
||||
|
||||
- **Per-atom regression:** any change to an atom (prompt, model, version bump in the registry) re-runs its golden set; scores are committed alongside the change (a PR that degrades an atom's score is visible as such).
|
||||
- **Per-atom regression:** any change to an atom (prompt, model, version bump in the registry) re-runs its golden set; scores are committed alongside the change (a PR that degrades an atom's score is visible as such). ERP-dependent eval runs target a **fresh sandbox checkpoint** — the iso-prod refresh is a reproducible fixture ([environments](agent-architecture.md#environments--sandbox-vs-production)).
|
||||
- **Injection suite:** every atom that reads untrusted content runs the adversarial fixtures; a single leak (instruction obeyed, field fabricated under influence) is a blocking failure regardless of the accuracy score.
|
||||
- **Disagreement telemetry:** dual-extraction disagreement rates and escalation rates are recorded per run — a drift upward is an early-warning signal *before* accuracy visibly drops.
|
||||
|
||||
@@ -34,8 +34,10 @@ Per atom, mechanical, recorded in the registry ([ladder](README.md#the-autonomy-
|
||||
|
||||
## Write-path QA
|
||||
|
||||
- **Compliance linter:** `promote-plan` rejects any manifest operation outside the production [ledger grammar](compliance.md#the-ledger-grammar-production) (mutating a validated document, supplying a manual ref where Dolibarr owns the sequence, detaching a GED original); the linter carries its own test suite of forbidden manifests.
|
||||
- **Predicted-delta assertion:** every rehearsed manifest re-reads what the sandbox created and diffs it against the draft *before* the approval card goes out; a mismatch is a bug, never a "close enough".
|
||||
- **Post-write verification:** after promote, the prod object is re-read and compared again; the pre/post snapshot pair ([T13](task-inventory.md#t13--erp-snapshot--drift-detection)) must show *exactly* the journaled writes and nothing else.
|
||||
- **Post-write verification:** after promote, the prod object is re-read and compared again; the pre/post snapshot pair ([T13](task-inventory.md#t13--erp-snapshot--drift-detection)) must show *exactly* the journaled writes and nothing else — and the diff must be **pure-append** (a mutation of a validated document is an incident, not a diff).
|
||||
- **Ledger & FEC checks:** quarterly FEC export validated with the DGFiP *Test Compta Demat* tool (once the accounting-module binding is verified — [compliance](compliance.md#dolibarr-verifications-sandbox-first)); numbering gaplessness across validate + avoir cycles; BlockedLog chain verification if adopted. All rehearsed on a sandbox checkpoint before running against prod.
|
||||
- **Idempotency tests:** every write atom's test suite replays its own manifest twice and asserts a no-op second pass.
|
||||
|
||||
## Fiscal parity checks
|
||||
@@ -53,4 +55,4 @@ Per atom, mechanical, recorded in the registry ([ladder](README.md#the-autonomy-
|
||||
|
||||
## Evidence trail
|
||||
|
||||
Every month yields an audit pack: the coherence audit ([T15](task-inventory.md#t15--monthly-coherence-audit)), the month's run journals, snapshot content-hashes, approval-card decisions, and fiscal sheets — archived in git + GED. The pack is written for a third party (expert-comptable, auditor, or a future operator): it must let them reconstruct *what the fleet did and why* without access to this PRD or any chat history. A distilled summary of each pack also lands in the second brain ([T17](task-inventory.md#t17--knowledge-capture--retrieval-second-brain)), so institutional memory outlives both chat logs and this repo.
|
||||
Every month yields an audit pack: the coherence audit ([T15](task-inventory.md#t15--monthly-coherence-audit)), the month's run journals, snapshot content-hashes, approval-card decisions, and fiscal sheets — archived in git + GED. This pack is deliberately shaped as the documented-control set of the **piste d'audit fiable** (CGI art. 289 VII — [compliance](compliance.md#obligations--fleet-mechanisms)): the invoice ↔ service ↔ payment linkage is evidenced continuously, not reconstructed under audit. The pack is written for a third party (expert-comptable, auditor, or a future operator): it must let them reconstruct *what the fleet did and why* without access to this PRD or any chat history. A distilled summary of each pack also lands in the second brain ([T17](task-inventory.md#t17--knowledge-capture--retrieval-second-brain)), so institutional memory outlives both chat logs and this repo.
|
||||
|
||||
Reference in New Issue
Block a user