docs(prd): integrate the second brain as the fleet's knowledge layer
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]>
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
Arcodange is a one-person SAS (software consulting, incorporated January 2026). The same person is the engineer, the salesperson, and the entire back office. The recurring administrative and accounting work — pulling supplier invoices out of mailboxes, recording them in Dolibarr with the right VAT ventilation, issuing the monthly client invoice with its mandatory legal mentions, reconciling Qonto/Wise against the ERP, preparing TVA, watching fiscal deadlines — is manual, interrupt-driven, and competes directly with billable work. Volumes are small (tens of documents a month), so the pain is not throughput: it is **consistency, deadline safety, and cognitive load**. A missed acompte, a malformed invoice, or an unrecorded supplier bill carries fiscal and legal risk out of proportion with the five minutes it would have taken.
|
||||
|
||||
Most of the hard groundwork already exists: a read-only skill catalogue over the Dolibarr API (invoices, payments, TVA, thirdparties, templates, snapshots), bank-side reconciliation over the Qonto and Wise APIs, Zoho mailbox ingestion, an iso-prod ERP sandbox with a write-scoped agent and a human-gated promote flow ([ADR 0003](../../ADR/0003-sandbox-state-lifecycle.md)), daily off-site backups with tested restore, and a Telegram webhook gateway. But these bricks only run **when a human thinks to launch them**. There is no standing fleet, no scheduler, no policy that routes the right task to the right model, and no explicit autonomy contract saying which agent may do what unattended.
|
||||
Most of the hard groundwork already exists: a read-only skill catalogue over the Dolibarr API (invoices, payments, TVA, thirdparties, templates, snapshots), bank-side reconciliation over the Qonto and Wise APIs, Zoho mailbox ingestion, an iso-prod ERP sandbox with a write-scoped agent and a human-gated promote flow ([ADR 0003](../../ADR/0003-sandbox-state-lifecycle.md)), daily off-site backups with tested restore, a Telegram webhook gateway, and an **agent-integrated second brain** — the PARA Obsidian vault, git-synced to the forge, whose digest/triage/ingest jobs already run unattended on the local hermes runtime. But the accounting bricks only run **when a human thinks to launch them** (the vault side already shows the standing-automation way). There is no standing fleet, no scheduler, no policy that routes the right task to the right model, and no explicit autonomy contract saying which agent may do what unattended.
|
||||
|
||||
Meanwhile three dated regulatory obligations are about to *raise* the admin surface: **e-invoice reception becomes mandatory for every French company on 2026-09-01**; the **régime réel simplifié de TVA disappears on 2027-01-01** (the annual CA12 + acomptes give way to quarterly CA3 declarations); and **e-invoice emission plus e-reporting of international transactions becomes mandatory for PME on 2027-09-01** — which covers Arcodange's export invoices to its US client. Doing nothing means strictly more paperwork every quarter from 2027.
|
||||
|
||||
@@ -35,6 +35,7 @@ A **single operator wearing three hats**, plus the fleet itself:
|
||||
- **Human-gated writes as an invariant**: every ERP mutation is rehearsed on the sandbox and promoted through the existing ADR-0003 gate; approvals and digests flow through Telegram. See [agent architecture](agent-architecture.md).
|
||||
- **Efficiency**: routine admin costs the human ≤ 15 minutes/day (review + approvals), with hard deadlines never carried in a human head.
|
||||
- **Resilience**: no single point of failure — a cloud outage degrades to local triage + queueing, every write is replayable from manifests, books are restorable (tested backups) and provable (content-hashed snapshots).
|
||||
- **Institutional memory**: what the fleet learns, decides and audits is distilled into the operator's **second brain** (the PARA Obsidian vault, already live and agent-automated) following its existing conventions — knowledge compounds instead of evaporating into chat logs. See [T17](task-inventory.md#t17--knowledge-capture--retrieval-second-brain).
|
||||
- **Prove feasibility with real POCs** — actual implementations against the real mailbox, real bank feeds, and the iso-prod sandbox. See the [POC plan](poc-plan.md).
|
||||
|
||||
**Non-goals**
|
||||
@@ -74,6 +75,7 @@ flowchart TB
|
||||
claude["Claude tier (frontier)<br>business validation · orchestration"]:::proc
|
||||
end
|
||||
|
||||
brain["Second brain (Obsidian, PARA)<br>context in · knowledge out"]:::store
|
||||
validators["Deterministic validators<br>format + arithmetic + dedupe"]:::gate
|
||||
sandbox["ERP sandbox<br>rehearsed writes (ADR-0003)"]:::store
|
||||
tg["Telegram gateway<br>digest · approval cards"]:::gate
|
||||
@@ -90,6 +92,7 @@ flowchart TB
|
||||
sandbox --> tg
|
||||
tg --> human
|
||||
human --> prod
|
||||
fleet <--> brain
|
||||
|
||||
classDef src fill:#2563eb,stroke:#1e40af,color:#fff
|
||||
classDef proc fill:#059669,stroke:#047857,color:#fff
|
||||
@@ -103,10 +106,11 @@ flowchart TB
|
||||
4. **Deterministic validators** — arithmetic, VAT rates, checksums, dedupe keys — are the format guarantors; anything that fails is quarantined, never guessed.
|
||||
5. The **Claude tier** performs business-level validation against the fiscal profile, assembles write manifests, and orchestrates.
|
||||
6. Writes are **rehearsed on the ERP sandbox**, surfaced as **Telegram approval cards**, and only the **human gate** promotes them to **prod**, where snapshots and daily backups close the evidence loop.
|
||||
7. The **second brain** (the PARA Obsidian vault, git-synced and already agent-automated) closes the knowledge loop: atoms retrieve context from it (contracts, client history, past decisions) and deposit distilled notes back into its inbox — the ERP stays the book of record, the vault the institutional memory.
|
||||
|
||||
## Requirements
|
||||
|
||||
- **[Task inventory](task-inventory.md)** — the enumerated tasks (T01–T16 + backlog), each with trigger, mode opératoire, guardrails, current tooling, and target autonomy. *This is the functional requirement set.*
|
||||
- **[Task inventory](task-inventory.md)** — the enumerated tasks (T01–T17 + backlog), each with trigger, mode opératoire, guardrails, current tooling, and target autonomy. *This is the functional requirement set.*
|
||||
- **[Agent architecture](agent-architecture.md)** — atom contracts, pipeline shape, write safety, security model (least-privilege ephemeral ERP credentials), prompt-injection defenses, runtimes/scheduling, and the human channel.
|
||||
- **[Model fleet](model-fleet.md)** — the four tiers, routing policy, structured-output enforcement, availability model, degraded modes, and cost envelope.
|
||||
- **[Challenges](challenges.md)** — the twelve identified risks and their mitigation strategies (the technical "second temps" of this PRD).
|
||||
@@ -144,7 +148,7 @@ flowchart TB
|
||||
| **5 — Fiscal autopilot** | POC-4 TVA dry-runs (acomptes, CA12 2026, CA3-2027 simulation), compliance calendar | proves €-parity before 2027 regime switch |
|
||||
| **6 — Emission era** | E-invoice emission + e-reporting pipeline (PME deadline) | **hard deadline 2027-09-01** |
|
||||
|
||||
Phases are streams, not strict gates: **phase 2 starts immediately, in parallel with phase 1** — its 2026-09-01 deadline cannot wait for the flagship. Tasks not named in a phase ride the nearest infrastructure: T05 (and decision D3) lands with phase 4's money loops, T12/T15 with phase 5's fiscal autopilot, and T16 grows out of POC-1's GED attach.
|
||||
Phases are streams, not strict gates: **phase 2 starts immediately, in parallel with phase 1** — its 2026-09-01 deadline cannot wait for the flagship. Tasks not named in a phase ride the nearest infrastructure: T05 (and decision D3) lands with phase 4's money loops, T12/T15 with phase 5's fiscal autopilot, T16 grows out of POC-1's GED attach, and T17 starts as soon as phase 1 produces its first journals — its vault-side rails (hermes cron, `sb.py`) already run.
|
||||
|
||||
## QA strategy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user