add dolibarr-tva-reconciliation, dolibarr-recurring-templates, dolibarr-data-snapshot

V3 bundle — three sibling skills under .claude/skills/, all read-only,
all depending on the dolibarr base skill.

dolibarr-tva-reconciliation:
- tva-by-month.sh: HT + TVA grouped by (year-month × tva_tx), ready
  for CA3 / CA12 transcription.
- tva-line-detail.sh: per-line audit trail with country-based bucket
  assignment (A1 domestic / A4 intra-UE autoliquidation / E2 export
  hors UE). Documents the French TVA mental model.
- Today every Arcodange line is E2 (KissMetrics, US, autoliquidation
  259-1° CGI). The skill scales for the day a French B2B is invoiced.

dolibarr-recurring-templates:
- list-templates.sh: probes /invoices/templates/{id} since there's no
  list endpoint. Stops after 5 consecutive empty responses.
- inspect-template.sh: full audit per template, with health checks.
- Surfaces that the "Kiss Metrics Invoice" template has frequency=0
  and nb_gen_done=0 — it is NOT auto-firing. Every KM invoice today
  was manually duplicated. Cohort-review implication: the deferred
  9-month cycle depends on Gabriel clicking "Generate" each month,
  not on a Dolibarr cron.

dolibarr-data-snapshot:
- snapshot.sh: bundles every read endpoint the dolibarr-* family uses
  into one JSON with a content_hash (sha256 of data only, excluding
  timestamp — so identical state hashes identically across runs).
- Use cases: cohort evidence packs, drift detection, archival before
  a known-risky UI change.
- V1 baseline summary captured at examples/snapshot-summary.txt
  (the ~246 KB snapshot file itself is intentionally not committed).

Also extends dolibarr/SKILL.md endpoint catalogue with
/invoices/templates/{id} (and its no-list-endpoint quirk + the
id-null sentinel for missing ids), plus links to the three new
sibling skills.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-29 00:01:06 +02:00
parent d34cba3fa0
commit f19b1d2ef2
16 changed files with 1554 additions and 1 deletions

View File

@@ -93,7 +93,8 @@ Read-only endpoints we've validated against this instance. Live captures are und
| `GET /bankaccounts` / `/{id}` | 200 | List bank accounts / detail | Returns `ref`, `label`, `iban`, `country_code`. `fk_bank_line` on a payment doesn't directly map to the account id — see `dolibarr-payments-state` skill for the lookup. | [bankaccounts_list.json](examples/bankaccounts_list.json) |
| `GET /thirdparties` | 200 | List thirdparties | `mode` MUST be integer (`mode=1` = customers). String fails 400. | (use `/{id}` below) |
| `GET /thirdparties/{id}` | 200 | Thirdparty detail | KissMetrics is `id=1` in this instance | [thirdparty_km.json](examples/thirdparty_km.json) |
| `GET /products` / `/products/{id}` | 200 | Product catalogue | `KM-audit` is `id=1` | — |
| `GET /products` / `/products/{id}` | 200 | Product catalogue | `KM-audit` is `id=1`, `KM-cloud-devops` is `id=2` | [products_list.json](examples/products_list.json) |
| `GET /invoices/templates/{id}` | 200 | Recurring invoice template detail | **No list endpoint** — probe ids 1..N. Empty ids return HTTP 200 with `id=null` (sentinel for "doesn't exist"). Fields: `ref`, `socid`, `frequency`, `unit_frequency`, `nb_gen_done`, `date_when`, `date_last_gen`, `suspended`, `auto_validate`, `lines`. | [invoice_template_km.json](examples/invoice_template_km.json) |
| `GET /documents/download` | 200 | Download a stored document as base64 | `modulepart=facture&original_file=<REF>/<REF>.pdf` (URL-encode slashes). Returns `{filename, content-type, filesize, content}` with `content` base64. | [document_download_meta.json](examples/document_download_meta.json) |
Not available on this account (intentionally): `/setup/modules` (admin-only), `/invoices/templates` (requires a path arg — different route shape; V2).
@@ -135,6 +136,9 @@ Not available on this account (intentionally): `/setup/modules` (admin-only), `/
- Workflow skill for invoice + thirdparty audits: [dolibarr-invoice-audit](../dolibarr-invoice-audit/SKILL.md).
- Workflow skill for payment-state and cash-receipt tracking: [dolibarr-payments-state](../dolibarr-payments-state/SKILL.md).
- Workflow skill for monthly TVA basis (CA3 / CA12 preparation): [dolibarr-tva-reconciliation](../dolibarr-tva-reconciliation/SKILL.md).
- Workflow skill for recurring invoice templates: [dolibarr-recurring-templates](../dolibarr-recurring-templates/SKILL.md).
- Workflow skill for point-in-time state archival: [dolibarr-data-snapshot](../dolibarr-data-snapshot/SKILL.md).
- Future workflow skills follow the `dolibarr-<topic>` convention. Each one depends on this skill for connection + permissions + endpoint reference; each one keeps its triggers focused on its specific business workflow.
## Out of scope

View File

@@ -0,0 +1,261 @@
{
"module": null,
"id": "1",
"entity": "1",
"import_key": null,
"array_options": [],
"array_languages": null,
"contacts_ids": [],
"contacts_ids_internal": null,
"linkedObjectsIds": [],
"fk_project": null,
"contact_id": null,
"user": null,
"origin_type": null,
"origin_id": null,
"ref": "Kiss Metrics Invoice",
"ref_ext": null,
"statut": null,
"status": null,
"country_id": null,
"country_code": null,
"state_id": null,
"region_id": null,
"mode_reglement_id": "2",
"cond_reglement_id": "10",
"demand_reason_id": null,
"transport_mode_id": null,
"shipping_method_id": null,
"shipping_method": null,
"fk_multicurrency": "0",
"multicurrency_code": "EUR",
"multicurrency_tx": "1.00000000",
"multicurrency_total_ht": "5100.00000000",
"multicurrency_total_tva": "0.00000000",
"multicurrency_total_localtax1": null,
"multicurrency_total_localtax2": null,
"multicurrency_total_ttc": "5100.00000000",
"last_main_doc": null,
"fk_account": "2",
"note_public": null,
"note_private": null,
"total_ht": "5100.00000000",
"total_tva": "0.00000000",
"total_localtax1": "0.00000000",
"total_localtax2": "0.00000000",
"total_ttc": "5100.00000000",
"lines": [
{
"module": null,
"id": "1",
"entity": null,
"import_key": null,
"array_options": [],
"array_languages": null,
"contacts_ids": null,
"contacts_ids_internal": null,
"linkedObjectsIds": null,
"origin_type": null,
"origin_id": null,
"ref": "KM-cloud-devops",
"ref_ext": null,
"statut": null,
"status": null,
"state_id": null,
"region_id": null,
"demand_reason_id": null,
"transport_mode_id": null,
"shipping_method": null,
"multicurrency_tx": null,
"multicurrency_total_ht": "5100.00000000",
"multicurrency_total_tva": "0.00000000",
"multicurrency_total_localtax1": null,
"multicurrency_total_localtax2": null,
"multicurrency_total_ttc": "5100.00000000",
"last_main_doc": null,
"fk_account": null,
"total_ht": "5100.00000000",
"total_tva": "0.00000000",
"total_localtax1": null,
"total_localtax2": null,
"total_ttc": "5100.00000000",
"lines": null,
"actiontypecode": null,
"civility_code": null,
"date_creation": null,
"date_validation": null,
"date_modification": null,
"tms": null,
"date_cloture": null,
"user_author": null,
"user_creation": null,
"user_creation_id": null,
"user_valid": null,
"user_validation": null,
"user_validation_id": null,
"user_closing_id": null,
"user_modification": null,
"user_modification_id": null,
"fk_user_creat": null,
"fk_user_modif": null,
"specimen": 0,
"totalpaid": null,
"extraparams": [],
"product": null,
"cond_reglement_supplier_id": null,
"deposit_percent": null,
"retained_warranty_fk_cond_reglement": null,
"warehouse_id": null,
"parent_element": "facturerec",
"fk_parent_attribute": "fk_facture",
"rowid": "1",
"fk_unit": null,
"date_debut_prevue": null,
"date_debut_reel": null,
"date_fin_prevue": null,
"date_fin_reel": null,
"weight": null,
"weight_units": null,
"length": null,
"length_units": null,
"width": null,
"width_units": null,
"height": null,
"height_units": null,
"surface": null,
"surface_units": null,
"volume": null,
"volume_units": null,
"multilangs": null,
"product_type": "1",
"fk_product": "2",
"desc": "TVA non applicable &ndash; Article 259-1 du CGI &ndash; Prestation de services localis&eacute;e hors de France (USA)",
"description": "TVA non applicable &ndash; Article 259-1 du CGI &ndash; Prestation de services localis&eacute;e hors de France (USA)",
"product_ref": "KM-cloud-devops",
"product_label": "KissMetrics - Cloud Devops - 1 day",
"product_barcode": null,
"product_desc": "",
"fk_product_type": "1",
"qty": "10",
"duree": null,
"remise_percent": "0",
"info_bits": "0",
"special_code": "0",
"subprice": "510.00000000",
"subprice_ttc": null,
"tva_tx": "0.0000",
"multicurrency_subprice": "510.00000000",
"multicurrency_subprice_ttc": null,
"label": null,
"libelle": "KissMetrics - Cloud Devops - 1 day",
"price": "510.00000000",
"vat_src_code": "",
"localtax1_tx": "0.0000",
"localtax2_tx": "0.0000",
"localtax1_type": "0",
"localtax2_type": "0",
"remise": null,
"revenuestamp": null,
"date_start_fill": "0",
"date_end_fill": "0",
"buy_price_ht": null,
"buyprice": "0.00000000",
"pa_ht": "0.00000000",
"marge_tx": "",
"marque_tx": "100",
"fk_user_author": null,
"fk_accounting_account": null,
"fk_facture": "1",
"fk_parent_line": null,
"fk_product_fournisseur_price": null,
"fk_fournprice": null,
"rang": "1",
"fk_contract_line": null
}
],
"actiontypecode": null,
"name": null,
"lastname": null,
"firstname": null,
"civility_id": null,
"civility_code": null,
"date_creation": null,
"date_validation": null,
"date_modification": null,
"tms": null,
"date_cloture": null,
"user_author": "1",
"user_creation": null,
"user_creation_id": "1",
"user_valid": null,
"user_validation": null,
"user_validation_id": null,
"user_closing_id": null,
"user_modification": null,
"user_modification_id": null,
"fk_user_creat": null,
"fk_user_modif": null,
"specimen": 0,
"totalpaid": null,
"extraparams": [],
"product": null,
"cond_reglement_supplier_id": null,
"deposit_percent": null,
"retained_warranty_fk_cond_reglement": null,
"warehouse_id": null,
"title": "Kiss Metrics Invoice",
"type": 0,
"subtype": null,
"fk_soc": null,
"socid": "1",
"paye": null,
"date": null,
"date_lim_reglement": "",
"cond_reglement_code": "10DENDMONTH",
"cond_reglement_label": null,
"cond_reglement_doc": "Due in 10 days, end of month",
"mode_reglement_code": "VIR",
"revenuestamp": null,
"totaldeposits": null,
"totalcreditnotes": null,
"sumpayed": null,
"sumpayed_multicurrency": null,
"sumdeposit": null,
"sumdeposit_multicurrency": null,
"sumcreditnote": null,
"sumcreditnote_multicurrency": null,
"remaintopay": null,
"nbofopendirectdebitorcredittransfer": null,
"creditnote_ids": null,
"stripechargedone": null,
"stripechargeerror": null,
"description": null,
"ref_client": null,
"situation_cycle_ref": null,
"close_code": null,
"close_note": null,
"postactionmessages": null,
"fk_incoterms": null,
"label_incoterms": null,
"location_incoterms": null,
"titre": "Kiss Metrics Invoice",
"multicurrency_subprice": null,
"number": null,
"total": null,
"tva": null,
"date_last_gen": "",
"date_when": "",
"nb_gen_done": "0",
"nb_gen_max": "0",
"frequency": "0",
"unit_frequency": "m",
"rule_for_lines_dates": "prepaid",
"rang": null,
"special_code": null,
"usenewprice": "0",
"fk_societe_rib": null,
"suspended": "0",
"auto_validate": "0",
"generate_pdf": "1",
"usenewcurrencyrate": null
}

View File

@@ -0,0 +1,336 @@
[
{
"module": null,
"id": "1",
"entity": "1",
"import_key": null,
"array_options": [],
"array_languages": null,
"contacts_ids": null,
"contacts_ids_internal": null,
"linkedObjectsIds": null,
"canvas": "",
"origin_type": null,
"ref": "KM-audit",
"ref_ext": null,
"status": "0",
"country_id": null,
"country_code": "",
"state_id": null,
"region_id": null,
"barcode_type": null,
"barcode_type_coder": null,
"shipping_method": null,
"fk_multicurrency": null,
"multicurrency_code": null,
"multicurrency_tx": null,
"multicurrency_total_ht": null,
"multicurrency_total_tva": null,
"multicurrency_total_localtax1": null,
"multicurrency_total_localtax2": null,
"multicurrency_total_ttc": null,
"last_main_doc": null,
"note_public": null,
"note_private": "",
"total_ht": null,
"total_tva": null,
"total_localtax1": null,
"total_localtax2": null,
"total_ttc": null,
"actiontypecode": null,
"civility_code": null,
"date_creation": 1769899106,
"date_validation": null,
"date_modification": 1771861714,
"tms": null,
"date_cloture": null,
"user_author": null,
"user_creation": null,
"user_creation_id": null,
"user_valid": null,
"user_validation": null,
"user_validation_id": null,
"user_closing_id": null,
"user_modification": null,
"user_modification_id": null,
"fk_user_creat": null,
"fk_user_modif": null,
"specimen": 0,
"totalpaid": null,
"extraparams": [],
"product": null,
"cond_reglement_supplier_id": null,
"deposit_percent": null,
"retained_warranty_fk_cond_reglement": null,
"warehouse_id": null,
"label": "KissMetrics - Cloud Infrastructure Audit - 1 day - Jan26",
"description": "",
"other": null,
"type": "1",
"price": "510.00000000",
"price_formated": null,
"price_ttc": "612.00000000",
"price_ttc_formated": null,
"price_min": "0.00000000",
"price_min_ttc": "0.00000000",
"price_base_type": "HT",
"price_label": null,
"multiprices": [],
"multiprices_ttc": [],
"multiprices_base_type": [],
"multiprices_default_vat_code": [],
"multiprices_min": [],
"multiprices_min_ttc": [],
"multiprices_tva_tx": [],
"prices_by_qty": [],
"prices_by_qty_list": [],
"level": null,
"multilangs": [],
"default_vat_code": null,
"tva_tx": "20.0000",
"remise_percent": null,
"localtax1_tx": "0.0000",
"localtax2_tx": "0.0000",
"localtax1_type": "0",
"localtax2_type": "0",
"desc_supplier": null,
"vatrate_supplier": null,
"default_vat_code_supplier": null,
"fourn_multicurrency_price": null,
"fourn_multicurrency_unitprice": null,
"fourn_multicurrency_tx": null,
"fourn_multicurrency_id": null,
"fourn_multicurrency_code": null,
"packaging": null,
"lifetime": null,
"qc_frequency": null,
"cost_price": null,
"pmp": "0.00000000",
"seuil_stock_alerte": "0",
"desiredstock": "0",
"duration_value": 1,
"duration_unit": "d",
"duration": "1d",
"fk_default_workstation": null,
"tosell": null,
"status_buy": "0",
"tobuy": null,
"finished": "0",
"fk_default_bom": null,
"product_fourn_price_id": null,
"buyprice": null,
"tobatch": null,
"status_batch": "0",
"sell_or_eat_by_mandatory": "0",
"batch_mask": "",
"customcode": "",
"url": "https://arcodange.fr/honoraires/#tjm=N4IgbiBcCMA0IGMogKwBYAmAzBWAMAHCPBlKAA4BOA9gLYCWAzvQHYDmUA2iBvW/QBcAhgBsABNQQBTISxABdeAAshjRiKlcQGtkIQBPMQmoZNinkP2MoeEkwHI8AWmgoxDFgFcBU6/B9CtAAqUpS01pCctgDMsACcsNFoiQSwaLZoAEywKLFxePIAvoVAA=",
"weight": null,
"weight_units": 0,
"length": null,
"length_units": 0,
"width": null,
"width_units": 0,
"height": null,
"height_units": 0,
"surface": null,
"surface_units": 0,
"volume": null,
"volume_units": 0,
"net_measure": null,
"net_measure_units": null,
"accountancy_code_sell": "7061",
"accountancy_code_sell_intra": "7062",
"accountancy_code_sell_export": "7063",
"accountancy_code_buy": "6041",
"accountancy_code_buy_intra": "6042",
"accountancy_code_buy_export": "6043",
"barcode": null,
"stats_proposal_supplier": [],
"stats_expedition": [],
"stats_mo": [],
"stats_bom": [],
"stats_facturerec": [],
"stats_facture_fournisseur": [],
"stats_facturefournrec": [],
"fk_default_warehouse": null,
"fk_price_expression": null,
"fourn_qty": null,
"fk_unit": null,
"price_autogen": "0",
"sousprods": [],
"res": null,
"is_object_used": null,
"is_sousproduit_qty": null,
"is_sousproduit_incdec": null,
"mandatory_period": "0",
"stockable_product": "1"
},
{
"module": null,
"id": "2",
"entity": "1",
"import_key": null,
"array_options": [],
"array_languages": null,
"contacts_ids": null,
"contacts_ids_internal": null,
"linkedObjectsIds": null,
"canvas": "",
"origin_type": null,
"ref": "KM-cloud-devops",
"ref_ext": null,
"status": "1",
"country_id": null,
"country_code": "",
"state_id": null,
"region_id": null,
"barcode_type": null,
"barcode_type_coder": null,
"shipping_method": null,
"fk_multicurrency": null,
"multicurrency_code": null,
"multicurrency_tx": null,
"multicurrency_total_ht": null,
"multicurrency_total_tva": null,
"multicurrency_total_localtax1": null,
"multicurrency_total_localtax2": null,
"multicurrency_total_ttc": null,
"last_main_doc": null,
"note_public": null,
"note_private": "",
"total_ht": null,
"total_tva": null,
"total_localtax1": null,
"total_localtax2": null,
"total_ttc": null,
"actiontypecode": null,
"civility_code": null,
"date_creation": 1769902706,
"date_validation": null,
"date_modification": 1771862352,
"tms": null,
"date_cloture": null,
"user_author": null,
"user_creation": null,
"user_creation_id": null,
"user_valid": null,
"user_validation": null,
"user_validation_id": null,
"user_closing_id": null,
"user_modification": null,
"user_modification_id": null,
"fk_user_creat": null,
"fk_user_modif": null,
"specimen": 0,
"totalpaid": null,
"extraparams": [],
"product": null,
"cond_reglement_supplier_id": null,
"deposit_percent": null,
"retained_warranty_fk_cond_reglement": null,
"warehouse_id": null,
"label": "KissMetrics - Cloud Devops - 1 day",
"description": "",
"other": null,
"type": "1",
"price": "510.00000000",
"price_formated": null,
"price_ttc": "612.00000000",
"price_ttc_formated": null,
"price_min": "0.00000000",
"price_min_ttc": "0.00000000",
"price_base_type": "HT",
"price_label": null,
"multiprices": [],
"multiprices_ttc": [],
"multiprices_base_type": [],
"multiprices_default_vat_code": [],
"multiprices_min": [],
"multiprices_min_ttc": [],
"multiprices_tva_tx": [],
"prices_by_qty": [],
"prices_by_qty_list": [],
"level": null,
"multilangs": [],
"default_vat_code": null,
"tva_tx": "20.0000",
"remise_percent": null,
"localtax1_tx": "0.0000",
"localtax2_tx": "0.0000",
"localtax1_type": "0",
"localtax2_type": "0",
"desc_supplier": null,
"vatrate_supplier": null,
"default_vat_code_supplier": null,
"fourn_multicurrency_price": null,
"fourn_multicurrency_unitprice": null,
"fourn_multicurrency_tx": null,
"fourn_multicurrency_id": null,
"fourn_multicurrency_code": null,
"packaging": null,
"lifetime": null,
"qc_frequency": null,
"cost_price": null,
"pmp": "0.00000000",
"seuil_stock_alerte": "0",
"desiredstock": "0",
"duration_value": 1,
"duration_unit": "d",
"duration": "1d",
"fk_default_workstation": null,
"tosell": null,
"status_buy": "0",
"tobuy": null,
"finished": "0",
"fk_default_bom": "0",
"product_fourn_price_id": null,
"buyprice": null,
"tobatch": null,
"status_batch": "0",
"sell_or_eat_by_mandatory": "0",
"batch_mask": "",
"customcode": "",
"url": "https://arcodange.fr/honoraires/#tjm=N4IgbiBcCMA0IGMogKwBYAmAzBWAMAHCPBlKAA4BOA9gLYCWAzvQHYDmUA2iBvW/QBcAhgBsABNQQBTISxABdeAAshjRiKlcQGtkIQBPMQmoZNinkP2MoeEkwHI8AWmgoxDFgFcBU6/B9CtAAqUpS01pCctgDMsACcsNFoiQSwaLZoAEywKLFxePIAvoVAA=",
"weight": null,
"weight_units": 0,
"length": null,
"length_units": 0,
"width": null,
"width_units": 0,
"height": null,
"height_units": 0,
"surface": null,
"surface_units": 0,
"volume": null,
"volume_units": 0,
"net_measure": null,
"net_measure_units": null,
"accountancy_code_sell": "7061",
"accountancy_code_sell_intra": "7062",
"accountancy_code_sell_export": "7063",
"accountancy_code_buy": "6041",
"accountancy_code_buy_intra": "6042",
"accountancy_code_buy_export": "6043",
"barcode": null,
"stats_proposal_supplier": [],
"stats_expedition": [],
"stats_mo": [],
"stats_bom": [],
"stats_facturerec": [],
"stats_facture_fournisseur": [],
"stats_facturefournrec": [],
"fk_default_warehouse": null,
"fk_price_expression": null,
"fourn_qty": null,
"fk_unit": null,
"price_autogen": "0",
"sousprods": [],
"res": null,
"is_object_used": null,
"is_sousproduit_qty": null,
"is_sousproduit_incdec": null,
"mandatory_period": "0",
"stockable_product": "1"
}
]