arcodange-bank-reco: known-patterns catalog + annotated bank-only buckets #7

Merged
arcodange merged 1 commits from claude/arcodange-bank-reco-patterns into main 2026-05-31 14:07:40 +02:00
Owner

Summary

V6.1 — splits the noisy BANK-ONLY bucket into known (intentional gaps documented in a JSON catalog) and UNKNOWN (real action items). Operator now sees one bucket per concern.

What ships

  • known-patterns.json — operator-curated catalog with 7 entries:
    • FOUREZ Quentin → capital_deposit (apport en capital 1000 € via notaire, 2026-01-21, account 1013)
    • URSSAF → social_charges
    • MISTRAL.AI, CLAUDE.AI → ai_subscription (account 6262)
    • Wise *Plan, qonto_fee → bank_fee (account 627)
    • BALANCE_DEPOSIT|For your account plan → internal_topup
  • bank-match.sh extension: loads the catalog, matches each BANK-ONLY entry case-insensitively against label + " | " + op, annotates matches with [classification] + the operator note.
  • SKILL.md section documenting the schema + editing workflow.
  • New baseline at examples/bank-match-2026-01-to-05.txt.

Effect on the baseline

Before V6.1 After V6.1
BANK-ONLY total 8 (noisy) 7 known + 1 UNKNOWN
UNKNOWN signal drowned +2147 € KM Wise 2026-05-29 (real action item)

Schema (JSON, stdlib-only)

{
  "patterns": [{
    "pattern": "regex (case-insensitive, matched on label + op)",
    "classification": "capital_deposit | social_charges | ai_subscription | bank_fee | internal_topup | ...",
    "bank":   "qonto | wise   (optional)",
    "side":   "credit | debit (optional)",
    "amount_min": 0.0,
    "amount_max": 99999.0,
    "note": "human context: which Dolibarr account, recurring schedule, etc."
  }]
}

The exit code now reflects only UNKNOWN + dolibarr-only — intentional gaps no longer pollute the verdict.

Test plan

  • bin/arcodange bank match --since 2026-01-01 --until 2026-05-31 → 6 matched / 1 internal / 7 known / 1 UNKNOWN / 9 dolibarr-only
  • FOUREZ Quentin appears with [capital_deposit] annotation
  • URSSAF appears with [social_charges] annotation
  • MISTRAL.AI + CLAUDE.AI appear with [ai_subscription] annotation
  • +2147 € KM stays in UNKNOWN bucket (correct — needs Dolibarr entry)
  • git diff --cached | grep -F <qonto-secret> empty
  • git diff --cached | grep -F <wise-token> empty
## Summary V6.1 — splits the noisy BANK-ONLY bucket into **known** (intentional gaps documented in a JSON catalog) and **UNKNOWN** (real action items). Operator now sees one bucket per concern. ### What ships - `known-patterns.json` — operator-curated catalog with 7 entries: - `FOUREZ Quentin` → capital_deposit (apport en capital 1000 € via notaire, 2026-01-21, account 1013) - `URSSAF` → social_charges - `MISTRAL.AI`, `CLAUDE.AI` → ai_subscription (account 6262) - `Wise *Plan`, `qonto_fee` → bank_fee (account 627) - `BALANCE_DEPOSIT|For your account plan` → internal_topup - `bank-match.sh` extension: loads the catalog, matches each BANK-ONLY entry case-insensitively against `label + " | " + op`, annotates matches with `[classification]` + the operator note. - `SKILL.md` section documenting the schema + editing workflow. - New baseline at `examples/bank-match-2026-01-to-05.txt`. ### Effect on the baseline | | Before V6.1 | After V6.1 | |---|---|---| | BANK-ONLY total | 8 (noisy) | 7 known + 1 UNKNOWN | | UNKNOWN signal | drowned | **+2147 € KM Wise 2026-05-29** (real action item) | ### Schema (JSON, stdlib-only) ```json { "patterns": [{ "pattern": "regex (case-insensitive, matched on label + op)", "classification": "capital_deposit | social_charges | ai_subscription | bank_fee | internal_topup | ...", "bank": "qonto | wise (optional)", "side": "credit | debit (optional)", "amount_min": 0.0, "amount_max": 99999.0, "note": "human context: which Dolibarr account, recurring schedule, etc." }] } ``` The exit code now reflects only UNKNOWN + dolibarr-only — intentional gaps no longer pollute the verdict. ## Test plan - [ ] `bin/arcodange bank match --since 2026-01-01 --until 2026-05-31` → 6 matched / 1 internal / **7 known / 1 UNKNOWN** / 9 dolibarr-only - [ ] FOUREZ Quentin appears with `[capital_deposit]` annotation - [ ] URSSAF appears with `[social_charges]` annotation - [ ] MISTRAL.AI + CLAUDE.AI appear with `[ai_subscription]` annotation - [ ] +2147 € KM stays in UNKNOWN bucket (correct — needs Dolibarr entry) - [ ] `git diff --cached | grep -F <qonto-secret>` empty - [ ] `git diff --cached | grep -F <wise-token>` empty
arcodange added 1 commit 2026-05-31 14:07:32 +02:00
V6.1 follow-up to the bank-reco V6 ship. Splits the BANK-ONLY bucket into
"known patterns" (intentional gaps, documented and classified) vs
"unknown" (real action items).

What the catalog covers today:
- FOUREZ Quentin → capital_deposit (apport en capital 1000 € initial,
  notaire FOUREZ centralisateur du dépôt). Maps to Dolibarr account 1013.
- URSSAF → social_charges (account 645100)
- MISTRAL.AI, CLAUDE.AI → ai_subscription (account 6262)
- Wise *Plan, qonto_fee → bank_fee (account 627)
- BALANCE_DEPOSIT / FEATURE_CHARGE on Wise → internal_topup (self-funding
  pair, often nets to zero)

Effect on the V6 baseline (Jan-May 2026):
- Before catalog: 8 BANK-ONLY mixed entries (noise + signal)
- After catalog:  7 known + 1 UNKNOWN (just the +2147 € KM Wise payment
  2026-05-29 that genuinely needs a Dolibarr entry)

The catalog is JSON (not YAML — stdlib only, no dependency). Schema
documented in SKILL.md. Pattern matches case-insensitive regex against
both bank label AND operation type. Optional filters: bank, side,
amount_min, amount_max.

Exit code now reflects only the UNKNOWN bank-only and dolibarr-only
counts — the verdict is no longer noisy because of intentional gaps.

Edit known-patterns.json as new recurring patterns emerge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
arcodange merged commit 0f5b6bcbad into main 2026-05-31 14:07:40 +02:00
arcodange deleted branch claude/arcodange-bank-reco-patterns 2026-05-31 14:07:41 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arcodange-org/erp#7