jaz-clio 5.74.1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +8 -8
  2. package/assets/skills/api/SKILL.md +4 -37
  3. package/assets/skills/api/references/endpoints.md +1 -1
  4. package/assets/skills/api/references/full-api-surface.md +1 -1
  5. package/assets/skills/api/references/report-templates.md +1 -1
  6. package/assets/skills/api/references/search-enums.md +1 -1
  7. package/assets/skills/api/references/search-reference.md +1 -1
  8. package/assets/skills/cli/SKILL.md +18 -28
  9. package/assets/skills/cli/references/agent-gotchas.md +2 -2
  10. package/assets/skills/cli/references/command-catalog.md +16 -32
  11. package/assets/skills/cli/references/common-workflows.md +19 -28
  12. package/assets/skills/conversion/SKILL.md +1 -1
  13. package/assets/skills/jaz-kit/SKILL.md +1 -1
  14. package/assets/skills/jaz-kit/references/flows.md +2 -2
  15. package/assets/skills/jaz-pseudo-sql/SKILL.md +1 -1
  16. package/assets/skills/jobs/SKILL.md +42 -42
  17. package/assets/skills/jobs/references/audit-prep.md +8 -8
  18. package/assets/skills/jobs/references/bank-match.md +1 -1
  19. package/assets/skills/jobs/references/bank-recon.md +6 -6
  20. package/assets/skills/jobs/references/building-blocks.md +49 -30
  21. package/assets/skills/jobs/references/credit-control.md +13 -12
  22. package/assets/skills/jobs/references/document-collection.md +6 -6
  23. package/assets/skills/jobs/references/fa-review.md +28 -29
  24. package/assets/skills/jobs/references/gst-vat-filing.md +3 -3
  25. package/assets/skills/jobs/references/month-end-close.md +37 -33
  26. package/assets/skills/jobs/references/payment-run.md +3 -4
  27. package/assets/skills/jobs/references/quarter-end-close.md +20 -18
  28. package/assets/skills/jobs/references/supplier-recon.md +5 -5
  29. package/assets/skills/jobs/references/year-end-close.md +31 -21
  30. package/assets/skills/transaction-recipes/SKILL.md +54 -117
  31. package/assets/skills/transaction-recipes/references/accrued-expenses.md +86 -61
  32. package/assets/skills/transaction-recipes/references/asset-disposal.md +135 -93
  33. package/assets/skills/transaction-recipes/references/bad-debt-provision.md +87 -65
  34. package/assets/skills/transaction-recipes/references/bank-loan.md +104 -70
  35. package/assets/skills/transaction-recipes/references/building-blocks.md +168 -72
  36. package/assets/skills/transaction-recipes/references/capital-wip.md +9 -8
  37. package/assets/skills/transaction-recipes/references/declining-balance.md +91 -64
  38. package/assets/skills/transaction-recipes/references/deferred-revenue.md +105 -68
  39. package/assets/skills/transaction-recipes/references/dividend.md +100 -64
  40. package/assets/skills/transaction-recipes/references/employee-accruals.md +111 -73
  41. package/assets/skills/transaction-recipes/references/fixed-deposit.md +116 -63
  42. package/assets/skills/transaction-recipes/references/fx-revaluation.md +28 -19
  43. package/assets/skills/transaction-recipes/references/hire-purchase.md +45 -44
  44. package/assets/skills/transaction-recipes/references/ifrs16-lease.md +108 -73
  45. package/assets/skills/transaction-recipes/references/intercompany.md +8 -6
  46. package/assets/skills/transaction-recipes/references/prepaid-amortization.md +104 -65
  47. package/assets/skills/transaction-recipes/references/provisions.md +116 -64
  48. package/assets/templates/platform-rules/jaz-agent-rules.md +10 -9
  49. package/cli.mjs +529 -607
  50. package/package.json +1 -1
package/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
  <p align="center">
4
4
  <a href="https://www.npmjs.com/package/jaz-clio"><img src="https://img.shields.io/npm/v/jaz-clio?style=for-the-badge&logo=npm" alt="npm"></a>
5
5
  <a href="https://www.npmjs.com/package/jaz-clio"><img src="https://img.shields.io/npm/dm/jaz-clio?style=for-the-badge&label=downloads" alt="npm downloads"></a>
6
- <img src="https://img.shields.io/badge/tools-386-blue?style=for-the-badge" alt="386 tools">
6
+ <img src="https://img.shields.io/badge/tools-381-blue?style=for-the-badge" alt="381 tools">
7
7
  <a href="https://github.com/teamtinvio/jaz-ai/blob/main/LICENSE"><img src="https://img.shields.io/github/license/teamtinvio/jaz-ai?style=for-the-badge&color=green" alt="License"></a>
8
8
  </p>
9
9
 
10
10
  <p align="center"><b>Jaz accounting on the command line, and inside any AI agent.</b></p>
11
11
 
12
- 386 tools · 76 command groups · 7 skills · 13 calculators · 12 close playbooks · 160 field-tested API rules.
12
+ 381 tools · 74 command groups · 7 skills · 13 calculators · 12 close playbooks · 148 field-tested API rules.
13
13
 
14
14
  ```bash
15
15
  npm install -g jaz-clio
@@ -58,7 +58,7 @@ clio invoices create --contact "ACME" --json # draft an invoice, JSON
58
58
  clio bank import --file statement.csv --account <id> # import and auto-reconcile
59
59
  clio exports download --type profit-and-loss --format PDF # download the P&L as a PDF
60
60
  clio calc lease --payment 5000 --term 36 --rate 5 # IFRS 16, offline, instant
61
- clio jobs month-end --period 2026-03 # step-by-step close playbook
61
+ clio jobs bank-recon match --input bank-data.json # bank reconciliation matcher, offline
62
62
  clio magic create --file receipt.pdf # AI extracts, drafts the transaction
63
63
  clio invoices search --query 'status:unpaid AND $500+' # structured per-entity search
64
64
  clio ledger-find-fix preview --level TRANSACTIONS --input recode.json # find & fix (recode) across record types
@@ -70,17 +70,17 @@ clio modules list # which features are swit
70
70
  clio navigate reports.profit-and-loss # deep link into the Jaz dashboard (offline)
71
71
  ```
72
72
 
73
- 76 command groups, 17 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
73
+ 74 command groups, 17 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
74
74
 
75
75
  Command groups by area:
76
76
 
77
77
  - **Sales and purchases**: `invoices`, `bills`, `customer-credit-notes`, `supplier-credit-notes`, `sale-orders`, `purchase-orders`, `payments`, `unapplied-payments`, `approvals`, `drafts`, `schedulers`, `subscriptions`
78
78
  - **Ledger and banking**: `journals`, `cash-in`, `cash-out`, `cash-transfer`, `cashflow`, `bank`, `bank-rules`, `reconciliations` (`recon`), `ledger-find-fix`, `quick-fix`, `fixed-assets` (`fa`)
79
- - **Master data**: `accounts`, `contacts`, `contact-groups`, `items`, `purchase-items`, `catalogs`, `inventory` (`inv`), `tags`, `custom-fields`, `nano-classifiers`, `tax-profiles`, `currencies`, `currency-rates`, `capsules`, `capsule-recipes`
79
+ - **Master data**: `accounts`, `contacts`, `contact-groups`, `items`, `purchase-items`, `catalogs`, `inventory` (`inv`), `tags`, `custom-fields`, `nano-classifiers`, `tax-profiles`, `currencies`, `currency-rates`, `capsules`
80
80
  - **Claims**: `claims`, `claim-types`, `claim-profiles`, `posting-rules`, `employees`
81
81
  - **Reports and data**: `reports`, `exports`, `export-records`, `report-templates`, `pseudo-sql` (`sql`), `filing-submissions`, `background-jobs`
82
82
  - **Organization**: `org`, `org-users`, `references`, `modules` (`features`), `bookmarks`, `attachments`, `magic`, `jots`, `navigate` (`nav`), `help-center` (`hc`)
83
- - **Offline**: `calc`, `capsule-transaction` (`ct`), `jobs`
83
+ - **Calculators and job tools**: `calc` (offline), `jobs`
84
84
  - **Setup and tooling**: `auth`, `init`, `update`, `versions`, `version`, `health`, `completion`, `context`, `schema`, `resolve`, `mcp`, `mcp-call`, `serve`
85
85
 
86
86
  ### Foreign currency
@@ -108,7 +108,7 @@ that ends up in a journal.
108
108
 
109
109
  ## MCP server
110
110
 
111
- 386 tools for any AI agent that speaks MCP. Runs locally: no cloud, no ports.
111
+ 381 tools for any AI agent that speaks MCP. Runs locally: no cloud, no ports.
112
112
 
113
113
  > **No install at all?** Claude.ai, ChatGPT, Cowork, and Microsoft Copilot Studio can use Jaz through the hosted connector. Add `https://mcp.jaz.ai/mcp` as a custom connector and sign in with OAuth, no key. The local setup below is for terminal use, scripting, and editors that run MCP servers as local processes.
114
114
 
@@ -141,7 +141,7 @@ OAuth can reach the organizations granted at sign-in; `--org` pins one, and with
141
141
 
142
142
  ## Skills
143
143
 
144
- 160 API rules from production testing: field-name maps, error-recovery patterns, response-shape quirks, plus 12 job playbooks. Installable into any agent project, no server involved.
144
+ 148 API rules from production testing: field-name maps, error-recovery patterns, response-shape quirks, plus 12 job playbooks. Installable into any agent project, no server involved.
145
145
 
146
146
  ```bash
147
147
  clio init # auto-detect the agent, install skills + agent-rules
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: jaz-api
3
- version: 5.74.1
3
+ version: 6.0.0
4
4
  description: >-
5
5
  Use this skill whenever you call, debug, or review code that touches the Jaz
6
- REST API. Covers field names, response shapes, 160 production gotchas, error
6
+ REST API. Covers field names, response shapes, 148 production gotchas, error
7
7
  recovery (422/400/404/500), search filters, pagination, and edge cases for
8
8
  every endpoint: invoices, bills, credit notes, journals, cash entries,
9
9
  payments, contacts, CoA, items, tax profiles, bank records, fixed assets,
@@ -171,7 +171,7 @@ The rest of this skill (field names, gotchas, error catalog, dependency order, s
171
171
  43. **Search sort is an object**: `{ sort: { sortBy: ["valueDate"], order: "DESC" } }`. Required when `offset` is present (even `offset: 0`).
172
172
  44. **Bank records**. **Create**: Multipart CSV/OFX via `POST /magic/importBankStatementFromAttachment` or JSON via `POST /bank-records/:accountResourceId` with `{ records: [{amount, transactionDate, description?, payerOrPayee?, reference?}] }` (positive = cash-in, negative = cash-out, response: `{data: {errors: []}}`). **Search**: `POST /bank-records/:accountResourceId/search`; filter fields: `valueDate` (DateExpression), `status` (StringExpression: UNRECONCILED, RECONCILED, ARCHIVED, POSSIBLE_DUPLICATE), `description`, `extContactName` (payer/payee), `extReference`, `netAmount` (BigDecimalExpression), `extAccountNumber`. Sort by `valueDate` DESC default.
173
173
  45. **Withholding tax** on bills/supplier CNs only. Retry pattern: if `WITHHOLDING_CODE_NOT_FOUND`, strip field and retry.
174
- 46. **Known API bugs (500s)**: capsules POST (upstream returns nil). **Catalogs POST, inventory balances by status GET, contact groups PUT and custom fields PUT are NO LONGER on this list.** Catalogs POST returned 201 on a live probe 2026-09-23 (item `unit` omitted, it is optional); its response is counts (`createdCatalogs`, `createdCatalogItems`), not a resourceId, so find the new catalog with `search_catalogs`. Inventory balances by status works (Rule 97). Contact groups PUT and custom fields PUT were re-probed live 2026-09-02 and returned 200 and applied the change. Do not route around any of them.
174
+ 46. **Known API bugs (500s)**: none on this list today. **Capsules POST, catalogs POST, inventory balances by status GET, contact groups PUT and custom fields PUT are NO LONGER on this list.** Capsules POST creates the capsule and returns its `resourceId`. Catalogs POST returned 201 on a live probe 2026-09-23 (item `unit` omitted, it is optional); its response is counts (`createdCatalogs`, `createdCatalogItems`), not a resourceId, so find the new catalog with `search_catalogs`. Inventory balances by status works (Rule 97). Contact groups PUT and custom fields PUT were re-probed live 2026-09-02 and returned 200 and applied the change. Do not route around any of them.
175
175
  47. **Non-existent endpoints**: `POST /inventory/adjustments` (and `/inventory-adjustments`, `/inventory-items/:id/adjustments`, `/items/:id/inventory-adjustments`; no stock-adjustment write path exists at any spelling), `GET /payments` (list), and `POST /payments/search` return 404; these endpoints are not implemented. For payments, per-payment CRUD is `GET/PUT/DELETE /payments/:resourceId` and there ARE two payment-scoped searches; see Rule 64. `POST /deposits` also 404s, but for a different reason, see Rule 47a; do not read it as a missing feature.
176
176
  47a. **Deposits are not an entity; the 404 on `/deposits` is by design.** A deposit is a **flag on a Chart of Accounts account**, not a document: the account carries `depositContactType` = `CUSTOMER` (advance received, a liability) or `SUPPLIER` (advance paid, an asset). Once flagged, a deposit movement is an **ordinary transaction against that account**: top up with `POST /journals` / `POST /cash-in-entries` / `POST /cash-out-entries` (one leg on the flagged account), draw down with `POST /invoices/:id/payments` or `POST /bills/:id/payments` passing `accountResourceId` = the flagged account **and `paymentMethod` set to something other than BANK_TRANSFER / CASH / CHEQUE** (use `OTHER`; those three force a bank/cash account and 422 here, see Rule 80), read with `POST /cashflow-transactions/search`. **Flagging the account is a web-app action**: `depositContactType` is on no chart-of-accounts request or response model here, and the platform-backend mutation that sets it (`configureDepositAccounts`) is not proxied, so `POST /chart-of-accounts` cannot create a deposit account. Over the API you can only read and post against an account someone already flagged. Full walkthrough: `references/endpoints.md` → Deposits.
177
177
  48. **Attachments (full CRUD)**: **Add**: `POST /:type/:id/attachments` (multipart, `file` field, `application/pdf` or `image/*`, NOT `text/plain`). **List**: `GET /:type/:id/attachments`. **Delete**: `DELETE /:type/:id/attachments/:attachmentResourceId` (HTTP 200). CLI: `clio attachments add --file <path>` or `--url <url>`, `clio attachments list`, `clio attachments delete <attachmentResourceId>`. **The list response shape depends on the entity**. Measured raw 2026-09-07: `/invoices/:id/attachments` returns `{ reference, resourceId, attachments: [{fileName, fileType, fileId, attachmentResourceId}] }`, while `/bills/:id/attachments` and `/journals/:id/attachments` return the conventional `{ data: [...] }`. Both credit-note types were unmeasured (every sampled record was void; see below). `listAttachments` in `core/api/attachments.ts` reads either key, so through the CLI or a tool you get `.data` in all cases; only a raw request sees the split. The attachment ID field is `attachmentResourceId` (not `resourceId`). **A VOIDED record 404s on three of the five types.** Measured 2026-09-07: a voided invoice, customer credit note and supplier credit note each answer `404 not_found` with `"<Entity> is voided"`, while a voided bill and a voided journal return 200 and list normally. The 404 is about the record's status, not its existence (`GET /invoices/:id` on the same id works), so never read this 404 as a bad resourceId. Anything fanning out to attachments alongside other calls must treat that leg as degradable, or one voided record destroys the whole response; `get_transaction_summary` did exactly that until 5.55.1.
@@ -222,7 +222,6 @@ The rest of this skill (field names, gotchas, error catalog, dependency order, s
222
222
 
223
223
  ### Entity Resolution (Fuzzy Matching)
224
224
  78. **`--contact`, `--account`, and `--bank-account` accept names**: any CLI flag that takes a contact, chart of accounts entry, or bank account accepts EITHER a UUID resourceId OR a fuzzy name. Examples: `--contact "ACME Corp"`, `--account "DBS Operating"`, `--bank-account "Business"`. The CLI auto-resolves to the best match (strict thresholds) and shows the resolved entity on stderr. UUIDs are passed through without API calls. If the match is ambiguous, the CLI errors with a list of candidates, never silently picks the wrong entity.
225
- 79. **`capsule-transaction` recipes auto-resolve accounts**: when `--input` is omitted, the CLI searches the org's chart of accounts for each blueprint account name (e.g., "Interest Expense", "Loan Payable"). If all accounts resolve with high confidence, no JSON mapping file is needed. If any fail, the error message shows exactly which accounts could not be found and suggests close matches. `--contact` and `--bank-account` on recipes also accept names.
226
225
  80. **Payment/refund account is gated by `paymentMethod`, not by the field's type**: the field itself accepts any chart-of-accounts id (the REST layer applies no type filter), but the platform then rejects anything outside Bank Accounts / Cash **when the method is BANK_TRANSFER, CASH or CHEQUE**: `INVALID_ACCOUNT_FOR_BUSINESS_TRANSACTION_FOUND`. Every other method reaches a non-bank account, which is the only way a deposit drawdown works: pay an invoice with `paymentMethod: OTHER` and `accountResourceId` set to the deposit account. The CLI mirrors this, filtering `--account` to bank/cash for those three methods only. Do not read the permissive field as permission: the REST layer is a proxy, and the accounting engine behind it is the authority.
227
226
 
228
227
  ### Draft Finalization Pipeline (Convert & Next)
@@ -454,48 +453,16 @@ Bills, invoices, and credit notes share identical mandatory field specs. Adding
454
453
 
455
454
  141. **`bulk_upsert_chart_of_accounts`: sync bulk-upsert with PARTIAL_SUCCESS**. Wraps `POST /api/v1/chart-of-accounts/bulk-upsert` (max 500 per call). Returns synchronously (no jobId polling): `{ resourceIds: string[], failedRows: ImportedRowError[], failedCount: number }` per rule 136. Each successful row contributes one `resourceId`; each failure surfaces a `failedRows[]` entry with `rowIndex` (1-based per the API), `columnName`, `columnValue`, `errorCode`, `errorMessage`. **Dedup is by NAME, not code**; collisions emit `ORGANIZATION_CHART_OF_ACCOUNT_DUPLICATED` per row (other rows in the batch still succeed). Provide `resourceId` per account to update; omit to create. Accepts the all 23 `accountType` values per rules 21 and 140 (variants normalized client-side). For one-off creates with auto-dedup-on-name (returns existing if found), use `create_account` instead. CLI counterpart: `clio accounts bulk-upsert --input <file.json>`.
456
455
 
457
- 142. **`capsuleRecipe` payload is mutually exclusive with `capsuleResourceId`** on trigger mutations (create/update of invoice, bill, journal, cash_in, cash_out). Use `capsuleRecipe` to CREATE a new capsule via the recipe engine; use `capsuleResourceId` to ATTACH a base-trx to an existing capsule. Sending both returns 422 (`excluded_with` validator).
458
-
459
- 143. **Capsule recipe publish is best-effort post-commit: silent-null failure mode.** On success the trigger-mutation response carries `capsuleRecipeJob: { jobResourceId, capsuleResourceId, subscriptionFBPath, totalRecords, idempotentHit, recipeKey }` (verified live 2026-05-27). **Note `jobResourceId` (NOT `resourceId`)** on the trigger-mutation payload; this is the polling key. **On publish failure, `capsuleRecipeJob` is absent (or null) from the response, the trigger mutation STILL returns its normal success status (201 on create, 200 on update; see endpoints.md "Success Status Codes"), the base-trx is committed, and NO error reason is surfaced to the caller.** The response echoes `capsuleRecipe.{recipeName, inputs}` back unchanged, which can look like success at a glance. **Three known causes** of silent null `capsuleRecipeJob` (must pre-validate before sending):
460
- - **(a) Wrong `recipeName` for the base trx type**: every recipe is locked to `allowedBaseTransactionTypes` (e.g. PREPAID_AMORTIZATION = PURCHASE only; DEFERRED_REVENUE = SALE only; ACCRUAL_REVERSAL, IFRS16_LEASE = JOURNAL_MANUAL only; LOAN_AMORTIZATION = JOURNAL_DIRECT_CASH_IN or JOURNAL_MANUAL). On `preview_capsule_recipe`, mismatch surfaces as 422 `RECIPE_INVALID_BASE_TRANSACTION_TYPE`. **On the trigger mutation, it silently nulls the job**; the validation happens post-commit in customer-service and arap catches the exception. Always check `get_capsule_recipe(name).allowedBaseTransactionTypes` matches the trigger mutation you're calling.
461
- - **(b) Currency mismatch**: see Rule 156 (single-currency v1 recipes: recipe `currency`, every `*AccountResourceId` account's `currencyCode`, and the base trx currency MUST all match). Mismatch surfaces as 422 `ERR_RECIPE_ACCOUNT_CURRENCY_MISMATCH` on `preview_capsule_recipe` but silently nulls on the trigger mutation.
462
- - **(c) Wrong `x-accountClass` on an input field**: see Rule 157 (each `*AccountResourceId` slot has a required account class). Mismatch silently nulls; preview returns the matching `RECIPE_FIELDS_*` 422.
463
-
464
- **Diagnosis sequence when the response has null/absent `capsuleRecipeJob`:**
465
- 1. **Re-run `preview_capsule_recipe`** with the same `recipeName` + `inputs` (without a base trx). This is the canonical pre-flight: it returns the exact 422 reason (`ERR_RECIPE_ACCOUNT_CURRENCY_MISMATCH`, `RECIPE_INVALID_BASE_TRANSACTION_TYPE`, `RECIPE_FIELDS_MUST_DIFFER`, etc.). Most reliable diagnostic: fix the input and retry the trigger.
466
- 2. **Poll `search_background_jobs --filter '{"baseTransactionResourceId":{"eq":"<id>"}}'`**: if a `FAILED` job exists, its `errorDetails` has the publish failure reason. **If no job exists for the base-trx, the publish never queued** (validation rejected pre-queue in customer-service).
467
- 3. **`resume_capsule_recipe(capsuleResourceId)`** is only available if a capsule WAS created: i.e. the recipe partially ran. For pre-queue rejections (3 causes above), no capsule exists; the only recovery is to re-issue the trigger mutation with corrected inputs.
468
-
469
- Pre-flight gate (recommended for agents and integrations): always call `preview_capsule_recipe(recipeName, inputs)` before the trigger mutation. Preview is pure-compute (no side effects) and surfaces every input/account/currency problem with a clear error_type, which eliminates the silent-null class entirely. **Same gate covers `templateOverrides`** (Customize Recipe): pass `capsuleRecipe.templateOverrides: [{slotKey, template}]` to customize generated text (capsule title/description, leg labels, line memos, schedule reference). Valid slotKeys + `{{variables}}` come from `get_capsule_recipe → versions[].templateSlots[]`; `slotKey` ≤128 chars (no dups), `template` ≤2000 (empty string clears a nullable slot). Invalid overrides return 422 `ERR_RECIPE_OVERRIDE_*` (UNKNOWN_RECIPE / MISSING_SLOT_KEY / DUPLICATE_SLOT / UNKNOWN_SLOT / NON_NULLABLE_BLANK / TEMPLATE_TOO_LONG / UNKNOWN_VARIABLE) on preview but silently null on the trigger path, so preview first.
470
-
471
- 144. **`recipeName` IS enum-constrained at the API layer** (verified live 2026-05-27): closed enum `LOAN_AMORTIZATION | ACCRUAL_REVERSAL | PREPAID_AMORTIZATION | DEFERRED_REVENUE | IFRS16_LEASE` on `POST /capsule-recipes/preview` and on `capsuleRecipe.recipeName` payloads on trigger mutations. Send a string not in the set → 422 validation_error. Don't hard-code the 5 values in motherboard descriptions; discover via `list_capsule_recipes` (the source of truth) and pass the discovered name through.
472
-
473
456
  145. **Pseudo-SQL `truncated:true` does NOT mean "you hit the cap"**; it means "more rows matched than were returned in this preview". Inspect `rowCount` vs preview cap (100) or your LIMIT to interpret. If you need every row, switch to `export_pseudo_sql`.
474
457
 
475
458
  146. **Pseudo-SQL export `downloadUrl` is S3 pre-signed with ~15min expiry** (`X-Amz-Expires=900`). Fetch immediately; don't store the URL. If a fetch returns 403 (expired), call `get_pseudo_sql_export(jobId)` again for a fresh URL.
476
459
 
477
460
  147. **Cashflow report** (`download_export(exportType='cashflow')`) returns the org's CASHFLOW template (IAS 7). If no template configured, returns 404 `template_not_found`. Configure via Jaz settings before invoking.
478
461
 
479
- 148. **`resume_capsule_recipe` after `terminalReason=BLOCKED_AFTER_3_RESUME_ATTEMPTS` is unavailable.** Only path forward is `rollback_capsule_recipe(capsuleResourceId)` or manual cleanup via Jaz admin. Resume is NOT idempotent; each call counts toward the 3-attempt limit.
480
-
481
- 149. **`rollback_capsule_recipe` returning `status=PARTIAL_ROLLBACK`** with `blockedAtomResourceIds[]` is safe to retry (rollback is idempotent on already-deleted atoms). Persistent partial-rollback typically indicates an atom is referenced downstream; escalate to ops if retry doesn't resolve.
482
-
483
- 150. **`preview_capsule_recipe` returns 422 `RECIPE_INVALID_BASE_TRANSACTION_TYPE`** when the recipe's `allowedBaseTransactionTypes` doesn't include the supplied base trx type (see descriptor at `get_capsule_recipe`). **The trigger mutation does NOT surface this 422 to the caller**; it silently nulls `capsuleRecipeJob` on the response (see Rule 143). The allowed types are: PREPAID_AMORTIZATION → PURCHASE only; DEFERRED_REVENUE → SALE only; ACCRUAL_REVERSAL → JOURNAL_MANUAL only; IFRS16_LEASE → JOURNAL_MANUAL only; LOAN_AMORTIZATION → JOURNAL_DIRECT_CASH_IN or JOURNAL_MANUAL. Always check `get_capsule_recipe(name).allowedBaseTransactionTypes` before sending `capsuleRecipe` on any trigger mutation.
484
-
485
- 151. **Sending BOTH `capsuleRecipe` AND `capsuleResourceId`** on the same trigger mutation returns 422 (`excluded_with` validator; same lock as Rule 142). Pick one based on intent.
486
-
487
- 152. **`saveAsDraft: true` + `capsuleRecipe` payload**: recipe is stashed in the draft's `pending_capsule_recipe` JSONB column and fires on draft activation (not on draft create). The base-trx commits as DRAFT immediately; the recipe job is created later when the draft is activated via `convert_drafts_to_active`.
488
-
489
462
  153. **Pseudo-SQL `Idempotency-Key` dedup is server-side primary key**: same key + DIFFERENT query body returns the prior job's result (the server does NOT cross-check the new query body). For agent reliability, `run_pseudo_sql_and_download` auto-keys from `sha256(query).slice(0,16)` so dedup is query-tied automatically. If you call `export_pseudo_sql` directly with a manual key, treat it as a per-intent token; don't reuse across different queries.
490
463
 
491
- 154. **`rollback_capsule_recipe` on a non-recipe capsule** (a capsule created by the legacy `create_capsule` tool or imported, not by the recipe engine) returns 422 `RECIPE_ROLLBACK_JOB_NOT_FOUND` ("No CAPSULE_RECIPE job found for capsule X in organization Y — nothing to roll back"). Rollback only works on capsules whose lifecycle was managed by the recipe engine. For legacy capsules, use `delete_capsule` instead.
492
-
493
464
  155. **Pseudo-SQL schema is canonical; call `get_pseudo_sql_schema` before any query.** The response returns the live curated catalog (tables / columns / joins / functions) PLUS the canonical `jaz-pseudo-sql.md` skill body in `agentSkillsDoc.content`. Drop the `.md` body into context as the syntax-rules source; treat `tables[] / joins[] / functions[]` as the column-list source. **Cache contract:** the `version` field is a stable 16-char hex hash; within a session, cache by version and don't re-call unless you have reason to believe the schema changed (e.g. a fresh backend deploy mid-session). Don't re-fetch on a wall-clock timer (upstream is `private, no-cache, must-revalidate`). A static curated-schema snapshot used to ship with the `jaz-pseudo-sql` skill before v5.6.0; it was dropped because it was structurally guaranteed to drift. Never write a query from a memorized column list.
494
465
 
495
- 156. **v1 capsule recipes are single-currency: `ERR_RECIPE_ACCOUNT_CURRENCY_MISMATCH`.** The recipe `currency` field, every `*AccountResourceId` account's `currencyCode`, and the base transaction's `currencyCode` ALL MUST match. Preview returns 422 `ERR_RECIPE_ACCOUNT_CURRENCY_MISMATCH` with a concrete message (e.g. "account X is denominated in USD but the recipe currency is SGD"). **Trigger mutation silently nulls `capsuleRecipeJob`** (Rule 143). Practical recipe: never hardcode `currency`; derive from the account's `currencyCode` (`search_accounts(filter: {resourceId: {eq: <prepaidAssetAccountResourceId>}})`) (or the base trx currency) and use the same value as the recipe input. The recipe descriptor's `currency.x-baseTrxBinding: "strict"` field marks this: when present, the value is bound to (and must equal) `trx.currencyCode` post-commit. Caught by smoke runs since v5.5.0; tests 65/66 hardcoded `SGD` and silently nulled against a USD fire-test org for 20+ hours.
496
-
497
- 157. **Recipe input `*AccountResourceId` fields are account-class-locked; `x-accountClass` in inputSchema is authoritative.** Each `*AccountResourceId` slot on a recipe's input schema carries an `x-accountClass` constraint (`"Asset"`, `"Liability"`, `"Expense"`, `"Revenue"`, `"Equity"`). Passing an account whose class doesn't match the slot's `x-accountClass` is rejected post-commit and silently nulls `capsuleRecipeJob` (Rule 143). Schema location: `get_capsule_recipe(name).data.versions[0].inputSchema.properties.<fieldName>['x-accountClass']`; **note `versions[0].inputSchema`, NOT `inputSchema` at the top level**. Examples: PREPAID_AMORTIZATION needs `prepaidAssetAccountResourceId: Asset` + `expenseAccountResourceId: Expense`; DEFERRED_REVENUE needs `deferredRevenueAccountResourceId: Liability` + `revenueAccountResourceId: Revenue`; ACCRUAL_REVERSAL needs `expenseAccountResourceId: Expense` + `accruedLiabilityAccountResourceId: Liability`. Always pre-validate the account's `accountClass` (`search_accounts(filter: {resourceId: {eq: <id>}})`) against the slot constraint, or just call `preview_capsule_recipe(recipeName, inputs)` to surface every class violation as a clean 422.
498
-
499
466
  ## Supporting Files
500
467
 
501
468
  For detailed reference, read these files in this skill directory:
@@ -559,4 +526,4 @@ When the user wants to OPEN, SEE, or SHARE something in the Jaz dashboard ("open
559
526
 
560
527
  160. **Payment `adjustment` is a CASH-LEG-only correction; it never moves the document balance.** Records an overpayment or a rounding difference on the bank side of a payment: `netCash = paymentAmount -/+ fees +/- adjustmentValue` (fees are deducted from cash received on an invoice and added to cash spent on a bill). AR/AP is untouched, so an overpaid invoice stays PAID with the excess sitting on the account you chose and NO credit note is created. Shape: `adjustment: { adjustmentValue, adjustmentAccountResourceId, adjustmentDescription? }`, signed, non-zero, max 2dp, always FLAT (never a percentage), never taxed. Accepted on `pay_invoice` / `pay_bill` / both credit-note refunds / `update_payment` / both receipt reconciliations. **NOT** on batch payments, and not for `DEBT_WRITE_OFF` / `CLEARING_SETTLEMENT` / `INTER_COMPANY` / `WITHHOLDING_TAX_CERTIFICATE` (those record a settlement, so there is no cash leg). The account must be non-controlled: not AR/AP, not the VAT or FX accounts, not bank/cash, not deposit-linked. **Write/read asymmetry:** you WRITE the nested `adjustment.adjustmentValue` but READ a flat `adjustmentAmount` on the payment record, alongside `adjustmentOrganizationAccountResourceId`. Don't confuse either with `lineItems[].taxVatAdjustment.adjustmentAmount`, which is line-item tax and unrelated. **On `update_payment`, adding an adjustment and changing an existing one both APPLY.** Verified against production on arap `v10.7.21` (2026-08-11): an amount move and an account-plus-description move both returned 200 and applied. `paymentAmount` and `transactionAmount` are untouched. **Removing one does NOT work.** `adjustmentValue: 0` is rejected at the edge with a 422, and `"adjustment": null` is indistinguishable from omitting the field, so both leave the stored value unchanged. To remove an adjustment, delete the payment record and record it again without one. An explicit clear flag is being added upstream; zero stays rejected, so omit-to-clear will never be the answer. Anything describing this field as inert on update is stale. **arap `v10.7.21` put both guards behind one comparator, and a CHANGE now has two rejection conditions.** `PaymentAmountCalculator.adjustmentChanged` answers "did the adjustment change?" for the reconciled check AND for lock-date validation, which previously disagreed: the reconciled check compared the amount alone, and lock-date validation did not look at the adjustment at all. It compares **amount, account AND description** (amount by `compareTo`, so `5.0` and `5.00` are equal). Two conditions reject a change: **(a) the payment is RECONCILED** to a bank statement entry, giving `PAYMENT_ADJUSTMENT_CANNOT_CHANGE_WHEN_RECONCILED` (moving it to a different account trips this now, where the amount-only check let it through); **(b) an account on the payment's LEDGER ROWS carries a lock date later than the `valueDate`**, giving `DELETE_TRANSACTION_VALUE_DATE_CANNOT_BE_EARLIER_THAN_LOCK_DATE` -- an update deletes and recreates the ledger rows, so the delete half trips first and the code names a delete for a call that was an update. **The escape hatch:** resending the same adjustment, or omitting the field, compares equal and is NOT a change, so it does not by itself trip either guard. **But that is not a general exemption, and this is the trap.** `adjustmentDescription` is optional, so resending only `adjustmentValue` + `adjustmentAccountResourceId` against a payment that HAS a description compares unequal and counts as a change. Resend all three, or omit the object entirely. And lock-date validation gates on seven other fields independently: changing `reference`, `valueDate`, `paymentMethod`, `organizationAccountResourceId`, `paymentAmount`, `transactionAmount`, or converting a draft to active is lock-date validated on its own. Only edits that move no ledger row survive a lock. **Measured on production 2026-08-11**, throwaway account locked at 2026-07-31 over a payment dated 2026-06-15: change the adjustment -> 422; change ONLY `reference` -> 422; resend all three values unchanged -> 200; resend WITHOUT the description -> 422; then unlock and repeat the first call -> 200 and applied. That last row is the control. Condition (a) is read from the deployed source, not triggered: it needs a bank statement entry, which has no delete, so proving it costs permanent state on a shared org.
561
528
 
562
- 161. **Report templates: the saved layout of a report, one default per report type, and packs.** Eight verbs on MCP and CLI (list, get, search, default-configuration, create, update, set-default, delete), each taking a template by **resourceId or exact name**; render one with `download_export` / `clio exports download --template <name>`. `templateConfiguration` is a JSON-encoded string on the wire; Clio hands it over as an object, never shows the server-owned `coaSnapshot` (a copy of the whole chart of accounts, up to 324 KB), and returns a large layout as a key map plus a row outline. Change part of one with `edits` (set / insert / remove by path; updateRow / addRow / removeRow / moveRow by row id), applied all or nothing and refused when they introduce a silent fault (an unknown enum value, a formula naming a missing row, a removed engine total). **Set default changes every export and dashboard view** of that report for the whole organization; the answer carries `previousDefault` to undo it. A pack's reports come from `packTemplates` (names or ids, in order), written to both places the server reads them from. Measured upstream quirks (2026-09-24): an export given a template it cannot use (unknown, or of another report type) answers **HTTP 200 with an empty body**, so Clio checks the template first; for P&L and cashflow only `IAS_1` and `IFRS_18` have a default layout (`GAAP` / `IND_AS` / `IFRS_SME` answer 422 `NO_TEMPLATE_FOUND` without one); profit-and-loss and balance-sheet saves drop keys the server does not model with no error (Clio reports them as `notSaved`); deleting a pack's last report leaves an empty pack whenever the pack has any other component (Clio refuses it); four of five search filters answer 500 (Clio filters the list). Full reference: `references/report-templates.md`.
529
+ 161. **Report templates: the saved layout of a report, one default per report type, and packs.** Eight verbs on MCP and CLI (list, get, search, default-configuration, create, update, set-default, delete), each taking a template by **resourceId or exact name**; render one with `download_export` / `clio exports download --template <name>`. `templateConfiguration` is a JSON-encoded string on the wire; Clio hands it over as an object, never shows the server-owned `coaSnapshot` (a copy of the whole chart of accounts, up to 324 KB), and returns a large layout as a key map plus a row outline. Change part of one with `edits` (set / insert / remove by path; updateRow / addRow / removeRow / moveRow by row id), applied all or nothing and refused when they introduce a silent fault (an unknown enum value, a formula naming a missing row, a removed engine total). **Set default changes every export and dashboard view** of that report for the whole organization; the answer carries `previousDefault` to undo it. A pack's reports come from `packTemplates` (names or ids, in order), written to both places the server reads them from. Measured upstream quirks (2026-09-24): an export given a template it cannot use (unknown, or of another report type) answers **HTTP 200 with an empty body**, so Clio checks the template first; for P&L and cashflow only `IAS_1` and `IFRS_18` have a default layout (`GAAP` / `IND_AS` / `IFRS_SME` answer 422 `NO_TEMPLATE_FOUND` without one); profit-and-loss and balance-sheet saves drop keys the server does not model with no error (Clio reports them as `notSaved`); deleting a pack's last report leaves an empty pack whenever the pack has any other component (Clio refuses it); upstream search refuses `and` / `or` and name sort (Clio filters the list). Full reference: `references/report-templates.md`.
@@ -2927,7 +2927,7 @@ Every template of the organization in one response, **under `reportTemplates`, n
2927
2927
 
2928
2928
  ### POST /api/v1/organization-report-template/search
2929
2929
 
2930
- `{ filter, sort }`, answers a bare array. **Four of its five filters answer 500** (`reportCategory` without `reportType`, `isDefault`, `reportTypes`, `resourceId`), and there is no name filter. Clio filters the list instead.
2930
+ `{ filter, sort }`, answers a bare array. Honours `isDefault`, `reportCategory`, `resourceId`, `reportType` (plain string), `reportTypes` (plain array) and `templateName` (eq, contains); refuses `and` / `or` (400) and sorting by `templateName` (422). Measured 2026-10-01. Clio filters the full list instead, which supports all of them.
2931
2931
 
2932
2932
  ### GET /api/v1/organization-report-template/default-configuration
2933
2933
 
@@ -521,7 +521,7 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
521
521
  |--------|------|-------------|
522
522
  | GET | `/organization-report-template` | List every template (rows under `reportTemplates`; ignores paging) |
523
523
  | GET | `/organization-report-template/:resourceId` | Get one |
524
- | POST | `/organization-report-template/search` | Search (4 of 5 filters answer 500; Clio filters the list instead) |
524
+ | POST | `/organization-report-template/search` | Search (no `and` / `or` or name sort; Clio filters the list instead) |
525
525
  | GET | `/organization-report-template/default-configuration` | The default layout a new template of a report type starts from |
526
526
  | POST | `/organization-report-template` | Create (layout defaults to the system layout; a pack needs its layout and `packTemplates`) |
527
527
  | PUT | `/organization-report-template/:resourceId` | Rename, replace the layout, or replace a pack's reports |
@@ -289,7 +289,7 @@ clio report-templates create --name "Board pack" --type REPORT_PACK \
289
289
 
290
290
  ### Search
291
291
 
292
- Upstream's search endpoint answers 500 for four of its five filters, and has no name filter, so `search_organization_report_templates` filters the full list instead. That matches because the list is every template at once. It uses the same filter grammar, plus `templateName`:
292
+ Upstream's search endpoint now honours `isDefault`, `reportCategory`, `resourceId`, `reportType`, `reportTypes` and `templateName` (eq, contains), but still refuses `and` / `or` and sorting by `templateName` (measured 2026-10-01), so `search_organization_report_templates` filters the full list instead. That matches because the list is every template at once. It uses the same filter grammar, plus `templateName`:
293
293
 
294
294
  ```jsonc
295
295
  { "filter": { "or": [ { "templateName": { "contains": "board" } }, { "isDefault": { "eq": true }, "reportType": "REPORT_PACK" } ] } }
@@ -548,7 +548,7 @@ All search endpoints return:
548
548
  }
549
549
  ```
550
550
 
551
- **Exception**: `GET /organization-report-template` returns its rows under a `reportTemplates` key, not `data` (measured 2026-09-06). Its `/search` sibling returns a **bare array** with no envelope (measured 2026-09-07). The tools normalize the list; read `.data` on both. Since 2026-09-24 the report template search tool filters the list itself instead of calling `/search`, because four of the search endpoint's five filters answer 500; it takes the same filter grammar plus `templateName` (`references/report-templates.md`).
551
+ **Exception**: `GET /organization-report-template` returns its rows under a `reportTemplates` key, not `data` (measured 2026-09-06). Its `/search` sibling returns a **bare array** with no envelope (measured 2026-09-07). The tools normalize the list; read `.data` on both. Since 2026-09-24 the report template search tool filters the list itself instead of calling `/search`, because the search endpoint still refuses `and` / `or` and sorting by name (measured 2026-10-01); it takes the same filter grammar plus `templateName` (`references/report-templates.md`).
552
552
 
553
553
  ---
554
554
 
@@ -28,7 +28,7 @@ All search endpoints share this identical structure:
28
28
 
29
29
  **Response shape**: `{ totalElements, totalPages, data: [...] }`; all search/list endpoints return this flat structure directly (no outer `data` wrapper).
30
30
 
31
- > **Exception**: the two halves of this family answer differently upstream. `POST /organization-report-template/search` returns a **bare array** with no envelope; `GET /organization-report-template` returns its rows under a **`reportTemplates`** key with no counts. Measured 2026-09-07: the two halves disagree with each other and with the house style. The tools normalize the list, so you always read `.data`. The report template search tool does not call `/search` at all: four of its five filters answer 500 upstream (re-measured 2026-09-24), so it filters the full list with the same grammar plus `templateName`. See `references/report-templates.md`.
31
+ > **Exception**: the two halves of this family answer differently upstream. `POST /organization-report-template/search` returns a **bare array** with no envelope; `GET /organization-report-template` returns its rows under a **`reportTemplates`** key with no counts. Measured 2026-09-07: the two halves disagree with each other and with the house style. The tools normalize the list, so you always read `.data`. The report template search tool does not call `/search` at all: upstream still refuses `and` / `or` and sorting by name (measured 2026-10-01), so it filters the full list with the same grammar plus `templateName`. See `references/report-templates.md`.
32
32
 
33
33
  ---
34
34
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-cli
3
- version: 5.74.1
3
+ version: 6.0.0
4
4
  description: >-
5
5
  Use this skill when running Clio CLI commands, building shell scripts with
6
6
  Clio, debugging auth issues, understanding --json output, paginating results,
@@ -8,7 +8,7 @@ description: >-
8
8
  precedence, output formats, entity resolution, and common workflow patterns.
9
9
  Also use when the user asks how to use clio, what commands are available, or
10
10
  how to automate accounting tasks from the command line. Covers all
11
- 76 command groups and 386 tools, including employee-expense claims.
11
+ 74 command groups and 381 tools, including employee-expense claims.
12
12
  license: MIT
13
13
  compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
14
14
  ---
@@ -17,7 +17,7 @@ compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
17
17
 
18
18
  > **Audience note:** for power users and CI/automation. Load this skill only when you're scripting from a terminal, building shell pipelines, or debugging from `clio --json` output. For day-to-day accounting inside Claude Desktop / Cowork, the MCP tools cover the common flows without dropping to the CLI.
19
19
 
20
- You are working with **Clio** (`jaz-clio`), the CLI for the Jaz accounting platform. 76 command groups, 13 calculators, 12 job blueprints, 386 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
20
+ You are working with **Clio** (`jaz-clio`), the CLI for the Jaz accounting platform. 74 command groups, 13 calculators, 12 job playbooks (jaz-jobs skill), 381 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
21
21
 
22
22
  ## When to Use This Skill
23
23
 
@@ -180,7 +180,6 @@ Rules:
180
180
  | `--ref <reference>` | Search/create commands | Reference string |
181
181
  | `--tag <name>` | Search/create commands | Tag filter or assignment |
182
182
  | `--input <file>` | Create/update commands | Read full JSON body from file |
183
- | `--plan` | Recipe commands | Offline plan mode (no auth) |
184
183
 
185
184
  ## Search Query Expressions (`--query`)
186
185
 
@@ -277,13 +276,13 @@ Sending `lineItems[]` to the FLAT endpoint silently ignores them and creates a $
277
276
 
278
277
  **Reports & Exports**: `reports` (16 report types), `exports`
279
278
 
280
- **AI & Automation**: `magic` (create, status), `quick-fix`, `ledger-find-fix` (preview, apply), `capsules`, `capsule-transaction` (alias: `ct`, 13 recipe types)
279
+ **AI & Automation**: `magic` (create, status), `quick-fix`, `ledger-find-fix` (preview, apply), `capsules`
281
280
 
282
281
  **Judgment journal**: `jots` (create, recall, dispose). Every write command also takes `--jot "<one line>"` to log the judgment behind that specific write inline, no extra call (see `--jot` in Common Flags).
283
282
 
284
283
  **Calculators**: `calc` (loan, lease, depreciation, prepaid-expense, deferred-revenue, fx-reval, ecl, provision, fixed-deposit, asset-disposal, accrued-expense, leave-accrual, dividend)
285
284
 
286
- **Jobs**: `jobs` (month-end, quarter-end, year-end, bank-recon, gst-vat, payment-run, credit-control, supplier-recon, audit-prep, fa-review, document-collection, statutory-filing) + tools (match, outstanding, ingest, sg-cs, sg-ca)
285
+ **Jobs**: `jobs` (`bank-recon match`, `payment-run outstanding`, `document-collection ingest`, `statutory-filing sg-cs`, `statutory-filing sg-ca`). The job playbooks themselves are in the **jaz-jobs** skill.
287
286
 
288
287
  **Organization**: `org` (info), `org-users`, `auth`
289
288
 
@@ -295,7 +294,7 @@ See `references/command-catalog.md` for the full catalog with subcommands and fl
295
294
 
296
295
  ## Offline vs Online
297
296
 
298
- Offline commands (no auth needed): `calc`, `jobs` (blueprints only), `capsule-transaction --plan`, `help-center`, `init`, `versions`, `update`
297
+ Offline commands (no auth needed): `calc`, `jobs bank-recon match`, `jobs statutory-filing sg-cs` / `sg-ca`, `help-center`, `init`, `versions`, `update`
299
298
 
300
299
  Everything else requires authentication (API key).
301
300
 
@@ -357,32 +356,23 @@ Transaction create commands (`invoices`, `bills`, `customer-credit-notes`, `supp
357
356
 
358
357
  This catches mistakes before the API call, saving round-trip time and providing clearer error messages.
359
358
 
360
- ## Capsule-Transaction Recipes
359
+ ## Calculated Schedules (calculate, capsule, post)
361
360
 
362
- The `capsule-transaction` (alias: `ct`) command group is the most powerful CLI feature. Each subcommand:
361
+ There is no one-shot recipe command. A loan, lease, prepaid, deferred revenue, accrual, ECL, provision, fixed deposit, disposal or dividend is three steps:
363
362
 
364
- 1. Runs a financial calculator (same as `clio calc`)
365
- 2. Creates a capsule to group the transactions
366
- 3. Posts all transactions (invoices, bills, journals) in sequence
367
-
368
- Two entry paths:
369
- - **Full**: provide `--input` (account mapping) or let it auto-resolve from your chart of accounts
370
- - **Attach**: provide `--existing-txn <id>` to skip the initial transaction and create only the delta (e.g., attach depreciation to an existing purchase bill)
371
-
372
- Plan mode (`--plan`) is offline and shows what accounts are needed and what steps will be created, without making any API calls.
363
+ 1. **Calculate (offline):** `clio calc <type> ... --json` returns the schedule and, when `--start-date` is given, a `blueprint`: the capsule type and name plus dated steps with journal lines. It posts nothing.
364
+ 2. **Create the capsule:** `clio capsules types` to find the type id (`clio capsules create-type --name <name>` if it is missing), then `clio capsules create --type <typeId> --title <title>`.
365
+ 3. **Post each step** with `clio journals create` / `clio bills create` / `clio invoices create` / `clio cash-in create` / `clio cash-out create`, passing a JSON body via `--input` that includes `capsuleResourceId`. A fixed amount repeating every period can be one `clio schedulers create-journal`.
373
366
 
374
367
  ```bash
375
- # Plan mode: see what's needed (offline)
376
- clio ct loan --principal 100000 --rate 5 --term 60 --plan
377
-
378
- # Execute with auto-resolve (uses fuzzy matching against your chart of accounts)
379
- clio ct loan --principal 100000 --rate 5 --term 60 --start-date 2026-01-01 --ref LOAN-001
380
-
381
- # Execute with explicit account mapping
382
- clio ct loan --principal 100000 --rate 5 --term 60 --start-date 2026-01-01 \
383
- --input account-mapping.json --bank-account "Bank - SGD" --contact "HSBC"
368
+ clio calc loan --principal 100000 --rate 5 --term 60 --start-date 2026-01-01 --json > loan.json
369
+ clio capsules types --json
370
+ clio capsules create --type <typeId> --title "Bank loan 2026" --json
371
+ clio journals create --input step-2.json --json # body includes capsuleResourceId
384
372
  ```
385
373
 
374
+ `clio calc fx-reval` is verification only: Jaz revalues foreign-currency balances at period end, so do not post its result.
375
+
386
376
  ## Tips
387
377
 
388
378
  1. **Pipe JSON to jq**: `clio invoices list --json | jq '.data[] | {ref: .reference, amount: .totalAmount}'`
@@ -391,7 +381,7 @@ clio ct loan --principal 100000 --rate 5 --term 60 --start-date 2026-01-01 \
391
381
  4. **Draft-then-finalize**: The CLI defaults to saving as draft (overrides the API default of `saveAsDraft: false`). Use `--finalize` to create a finalized transaction immediately. Note: `cash-in`, `cash-out` and `cash-transfer` have no draft state and so take no `--finalize`; they always post ACTIVE.
392
382
  5. **Idempotent creates**: Use `--input` with the same JSON to get consistent results. The API dedup guards catch duplicate contacts, items, and accounts.
393
383
  6. **Check before bulk ops**: Always preview with `--json | jq length` before piping IDs into `quick-fix`. To find & fix (recode, retag, re-date) records found by a condition, across record types, `clio ledger-find-fix preview` lists what would change and why anything is excluded, and `clio ledger-find-fix apply -- <previewId>` runs exactly that, once.
394
- 7. **Offline calculators for exploration**: `clio calc` commands need no auth -- use them to explore scenarios before committing with `clio ct`.
384
+ 7. **Offline calculators for exploration**: `clio calc` commands need no auth -- use them to explore scenarios before posting anything.
395
385
  8. **Help center for guidance**: `clio hc "how to reconcile"` searches the full Jaz help center locally (hybrid: embeddings + keyword).
396
386
 
397
387
  See `references/common-workflows.md` for end-to-end multi-command patterns.
@@ -27,9 +27,9 @@
27
27
 
28
28
  11. **`clio schema` is for tool introspection, not data.** `clio schema --json` lists command groups and tool counts. `clio schema invoices --json` shows tool definitions. `clio schema invoices create --json` shows parameter schema. None of these hit the API.
29
29
 
30
- 12. **Job blueprints output plain text by default.** `clio jobs month-end` prints a checklist. Add `--json` for structured output. Some job tools (`match`, `outstanding`, `sg-cs`) require auth; blueprint generators are offline.
30
+ 12. **`clio jobs` is five working tools, not checklists.** `bank-recon match`, `payment-run outstanding`, `document-collection ingest`, `statutory-filing sg-cs` and `statutory-filing sg-ca`. No checklist commands exist (month-end, GST/VAT, audit prep and the rest are not commands): the job playbooks are reference docs in the jaz-jobs skill. `payment-run outstanding` and `ingest --upload` need auth; `match`, `sg-cs` and `sg-ca` run offline. Add `--json` for structured output.
31
31
 
32
- 13. **Capsule-transaction recipes: always `--plan` first.** `clio ct loan --plan` shows what accounts and transactions will be created, offline. Only run without `--plan` when you know the account mapping is correct. Recipes create real finalized transactions.
32
+ 13. **There is no recipe command: calculate, then post.** `clio calc <type> --json` returns the schedule and journal lines and posts nothing. To book it, create a capsule (`clio capsules create`) and post each step yourself (`journals` / `bills` / `invoices` / `cash-in` / `cash-out` `create`, with `capsuleResourceId` in the `--input` body). The calculator's account names are generic ("Cash / Bank Account"): map each to a real account before posting. `clio calc fx-reval` is verification only; never post its result.
33
33
 
34
34
  14. **The `--input` flag reads JSON from a file.** For complex payloads (multi-line-item invoices, detailed journals), write JSON to a temp file and pass `--input payload.json` instead of long `--lines` flags with shell escaping issues. When `--input` is provided, all other body flags are ignored.
35
35
 
@@ -1,6 +1,6 @@
1
1
  # Clio Command Catalog
2
2
 
3
- Complete reference for all 76 command groups. Organized by domain.
3
+ Complete reference for all 74 command groups. Organized by domain.
4
4
 
5
5
  ---
6
6
 
@@ -463,7 +463,7 @@ clio exports download --type profit-and-loss --format PDF --start-date 2026-01-0
463
463
  clio report-templates set-default "Board P&L"
464
464
  ```
465
465
 
466
- `list` and `search` return summaries without layouts (`configurationChars` gives each layout's size); `get` returns the layout as an object without the server-owned `coaSnapshot`. Search runs over the full list, so every filter works, `--name` included (upstream's own search answers 500 for four of its five filters). A write prints what the server did not keep, if anything (`notSaved`): profit-and-loss and balance-sheet layouts drop keys the server does not model.
466
+ `list` and `search` return summaries without layouts (`configurationChars` gives each layout's size); `get` returns the layout as an object without the server-owned `coaSnapshot`. Search runs over the full list, so every filter works, `--name` included (upstream's own search refuses `and` / `or` and sorting by name). A write prints what the server did not keep, if anything (`notSaved`): profit-and-loss and balance-sheet layouts drop keys the server does not model.
467
467
 
468
468
  ### `clio pseudo-sql` (alias: `sql`): Read-only SQL over the curated reporting tables (6 tools)
469
469
  A restricted SQL subset against Jaz's curated reporting schema, **not** the customer's database. SELECT only, single statement, 16384-char cap; the engine rejects DML, so there is no write verb.
@@ -605,15 +605,11 @@ Every write after `record` takes `--hash` (from `search` or the last write). A l
605
605
  | `create` | `--title`, `--type`, `--input` |
606
606
  | `update <id>` | `--title`, `--input` |
607
607
  | `delete <id>` | |
608
+ | `types` | `--json` (list capsule types; gives the id `create --type` needs) |
609
+ | `create-type` | `--name`, `--description`, `--input` |
610
+ | `move` | `--transactions`, `--to`, `--from` |
608
611
 
609
- ### `clio capsule-transaction` (alias: `ct`): Transaction recipes
610
- 13 IFRS-compliant recipe subcommands. Each runs a calculator, creates a capsule, and posts all transactions.
611
-
612
- Subcommands: `loan`, `lease`, `depreciation`, `prepaid-expense`, `deferred-revenue`, `fx-reval`, `ecl`, `provision`, `fixed-deposit`, `asset-disposal`, `accrued-expense`, `leave-accrual`, `dividend`
613
-
614
- Shared flags: `--plan`, `--input`, `--bank-account`, `--contact`, `--existing-txn`, `--ref`, `--finalize`, `--json`
615
-
616
- Each subcommand has calculator-specific required options (e.g., `--principal`, `--rate`, `--term` for loan).
612
+ To post a calculated schedule: `clio calc <type> --json` for the steps, `clio capsules create` for the capsule, then one `journals` / `bills` / `invoices` / `cash-in` / `cash-out` `create` per step with `capsuleResourceId` in the `--input` body.
617
613
 
618
614
  ---
619
615
 
@@ -642,30 +638,18 @@ Common optional flags: `--start-date`, `--currency`, `--json`
642
638
 
643
639
  ---
644
640
 
645
- ## Jobs (Offline Blueprints + Online Tools)
641
+ ## Jobs (Working Tools)
646
642
 
647
- ### `clio jobs`: 12 job blueprints + tools
648
- Blueprints are offline (no auth). Tools require auth.
643
+ ### `clio jobs`: job tools
644
+ Five working sub-tools. The job playbooks themselves (month-end close, GST/VAT filing, audit prep, ...) are reference docs in the jaz-jobs skill, not commands.
649
645
 
650
- | Subcommand | Type | Key flags |
646
+ | Subcommand | Auth | Key flags |
651
647
  |------------|------|-----------|
652
- | `month-end` | Blueprint | `--period`, `--currency` |
653
- | `quarter-end` | `--period`, Blueprint | `--currency` |
654
- | `year-end` | `--period`, Blueprint | `--currency` |
655
- | `bank-recon` | Blueprint | `--account`, `--period`, `--currency` |
656
- | `match` | Tool | `--input` (bank records + transactions JSON) |
657
- | `gst-vat` | Blueprint | `--period` |
658
- | `payment-run` | Blueprint | `--due-before`, `--currency` |
659
- | `outstanding` | Tool | `--limit` (group outstanding bills) |
660
- | `credit-control` | `--overdue-days`, Blueprint | |
661
- | `supplier-recon` | `--supplier`, `--period`, Blueprint | |
662
- | `audit-prep` | `--period`, Blueprint | |
663
- | `fa-review` | `--currency`, Blueprint | |
664
- | `document-collection` | Blueprint | `--currency` |
665
- | `ingest` | `--source`, Tool | `<path>` (classify + upload documents) |
666
- | `statutory-filing` | Blueprint | `--ya`, `--jurisdiction`, `--currency` |
667
- | `sg-cs` | Tool | `--input` (compute Singapore Form C-S) |
668
- | `sg-ca` | Tool | `--input` (compute Singapore capital allowances) |
648
+ | `bank-recon match` | Offline | `--input` (bank records + transactions JSON), `--tolerance`, `--date-window`, `--max-group`, `--currency`, `--find-all`, `--json` |
649
+ | `payment-run outstanding` | Required | `--due-before`, `--currency`, `--supplier`, `--limit`, `--json` (outstanding bills grouped by supplier) |
650
+ | `document-collection ingest` | Only with `--upload` | `--source` (local dir, .zip, or share URL), `--type`, `--upload`, `--bank-account`, `--timeout`, `--json` |
651
+ | `statutory-filing sg-cs` | Offline | `--input`, or `--ya`, `--revenue`, `--profit`, `--depreciation`, `--exemption`, `--json` (Singapore Form C-S) |
652
+ | `statutory-filing sg-ca` | Offline | `--input`, or `--ya`, `--cost`, `--category`, `--acquired`, `--json` (Singapore capital allowances) |
669
653
 
670
654
  ---
671
655
 
@@ -750,7 +734,7 @@ Valid entity types: INVOICE, BILL, CUSTOMER_CREDIT_NOTE, SUPPLIER_CREDIT_NOTE, S
750
734
  Universal async tracker: any operation returning a jobId (contacts bulk-upsert, items bulk-upsert, bank import, magic processing) can be polled here.
751
735
 
752
736
  ### `clio mcp`: MCP stdio server
753
- Starts an MCP server for Claude Code / AI tool integration. Exposes all 386 operations.
737
+ Starts an MCP server for Claude Code / AI tool integration. Exposes all 381 operations.
754
738
 
755
739
  ### `clio serve`: HTTP daemon
756
740
  Starts the HTTP daemon for ChatKit and email channel integrations.
@@ -63,12 +63,9 @@ clio bank records "$BANK_ID" --status POSSIBLE_DUPLICATE --json
63
63
 
64
64
  ## 3. Month-End Close Workflow
65
65
 
66
- Generate a blueprint, run reports, and create any adjusting journals.
66
+ Follow the month-end playbook in the jaz-jobs skill (`references/month-end-close.md`), run reports, and create any adjusting journals.
67
67
 
68
68
  ```bash
69
- # Generate month-end checklist (offline, no auth)
70
- clio jobs month-end --period 2026-03 --currency SGD --json > month-end-checklist.json
71
-
72
69
  # Run key reports for review
73
70
  clio reports generate trial-balance --to 2026-03-31 --json > tb-mar.json
74
71
  clio reports generate profit-loss --from 2026-03-01 --to 2026-03-31 --json > pl-mar.json
@@ -134,42 +131,36 @@ clio invoices pay "$INVOICE_ID" \
134
131
 
135
132
  ## 5. Equipment Purchase with Depreciation
136
133
 
137
- Record a fixed asset purchase, calculate depreciation, and create journal entries via capsule-transaction.
134
+ Register a fixed asset, cross-check its depreciation schedule, and (for a declining-balance method only) post the charges into a capsule.
138
135
 
139
136
  ```bash
140
- # Create the fixed asset record
137
+ # Register the asset. Jaz posts straight-line depreciation itself: do not also journal it.
141
138
  clio fixed-assets create \
142
139
  --name "Office Printer" \
143
140
  --type "Office Equipment" \
144
141
  --amount 3600 \
145
142
  --date 2026-01-01 \
146
- --input '{"depreciationMethod":"STRAIGHT_LINE","usefulLifeMonths":36,"salvageValue":0}'
143
+ --depreciation-start 2026-01-01 \
144
+ --asset-account "$ASSET_ACCOUNT_ID" \
145
+ --depreciation-method STRAIGHT_LINE \
146
+ --effective-life 36 \
147
+ --residual 0
147
148
 
148
- # Preview the depreciation schedule (offline, no auth)
149
+ # Cross-check the schedule (offline, no auth). --life is in YEARS; --method is sl, ddb or 150db.
149
150
  clio calc depreciation \
150
151
  --cost 3600 \
151
152
  --salvage 0 \
152
- --life 36 \
153
- --method straight-line \
153
+ --life 3 \
154
+ --method sl \
155
+ --frequency monthly \
154
156
  --currency SGD \
155
157
  --json
156
158
 
157
- # Execute as a capsule-transaction (creates capsule + monthly journals)
158
- clio ct depreciation \
159
- --cost 3600 \
160
- --salvage 0 \
161
- --life 36 \
162
- --method straight-line \
163
- --ref "DEP-PRINTER" \
164
- --json
165
-
166
- # Or plan first (offline) to see what accounts are needed
167
- clio ct depreciation \
168
- --cost 3600 \
169
- --salvage 0 \
170
- --life 36 \
171
- --method straight-line \
172
- --plan
159
+ # Declining balance (ddb / 150db) is not a register method: register the asset with
160
+ # --depreciation-method NO_DEPRECIATION, then post each period's charge from the calculator yourself.
161
+ clio capsules types --json
162
+ clio capsules create --type "$CAPSULE_TYPE_ID" --title "Office Printer depreciation" --json
163
+ clio journals create --input dep-2026-01.json --json # body: valueDate, journalEntries, capsuleResourceId
173
164
  ```
174
165
 
175
166
  ## 6. Search, Filter, and Bulk-Update Workflow
@@ -244,8 +235,8 @@ eval "$(clio auth shell-init)"
244
235
  Ingest documents, extract data via AI, and review results.
245
236
 
246
237
  ```bash
247
- # Ingest a folder of mixed PDFs (invoices, bills, bank statements)
248
- clio jobs document-collection --json
238
+ # Scan and classify a folder of mixed PDFs (invoices, bills, bank statements); add --upload to send them to Jaz
239
+ clio jobs document-collection ingest --source ./client-docs --json
249
240
 
250
241
  # Or extract a single document (file, URL, or raw HTML)
251
242
  clio magic create --file ./invoice-from-supplier.pdf --type bill --json
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-conversion
3
- version: 5.74.1
3
+ version: 6.0.0
4
4
  description: >-
5
5
  Use this skill when migrating accounting data into Jaz, importing from Xero,
6
6
  QuickBooks, Sage, MYOB, or Excel exports. Covers the full conversion pipeline:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-kit
3
- version: 5.74.1
3
+ version: 6.0.0
4
4
  description: >-
5
5
  Use this skill when an accountant, bookkeeper, or owner is running real books
6
6
  in Jaz across one or more organizations from the terminal: setting up a
@@ -7,7 +7,7 @@ Schemas live in `workspace.md` (KIT.md, ORG.md, `.env`) and `close-state.md` (CL
7
7
  ## Ground rules for every flow
8
8
 
9
9
  1. **One organization per session; ORG.md decides which.** Use its `organization_id` on every call. OAuth CLI: `clio <command> --org oauth:<organization_id> --json`. Hosted MCP: pass the same ID explicitly. Never rely on the shared active organization. For the optional API-key route only, source the folder's `.env` in the same command and omit `--org`; verify the key resolves to the recorded ID.
10
- 2. **Draft first.** `saveAsDraft` defaults to `false` in the API; omitting it posts live. Every write in a Jaz Kit flow sets `saveAsDraft: true` (or `--plan` then a non-finalized run for `clio ct`) unless the org's `rules/` explicitly relaxes that transaction type. Finalization happens in the review flow, never as a side effect.
10
+ 2. **Draft first.** `saveAsDraft` defaults to `false` in the API; omitting it posts live. Every write in a Jaz Kit flow sets `saveAsDraft: true` unless the org's `rules/` explicitly relaxes that transaction type. Finalization happens in the review flow, never as a side effect.
11
11
  3. **Never print a key.** The key lives in the workspace `.env`, which the user pastes into (never chat, never a message, never an error). Source the file; do not read the key value into your own output. `jk-` strings are redacted on sight.
12
12
  4. **Judgment gets recorded.** When the user accepts a variance, carries a residual, or overrides a default, call `jot` at that moment. Mechanical steps never jot.
13
13
  5. **Report exceptions, not dumps.** Surface the top few items that need a decision; write the full output to the period's `workpapers/`.
@@ -101,7 +101,7 @@ Requires an open session. The playbooks are in the jobs skill; this flow adds st
101
101
 
102
102
  **3. Open or resume CLOSE.md** at `closes/<period>/CLOSE.md`. Resuming: read it and **do not re-run confirmed steps**. Any step marked `started` but not `confirmed` crashed mid-write; see the resume rule below before touching it.
103
103
 
104
- **4. Walk the playbook**: month-end, quarter-end, or year-end from the jobs skill (`clio jobs <type> --period <period> --json` prints the same phased checklist if you want it as data). For each step:
104
+ **4. Walk the playbook**: month-end, quarter-end, or year-end from the jobs skill (the per-job reference doc is the plan; there is no checklist command). For each step:
105
105
  - mark it `started` in CLOSE.md **before** the call that writes
106
106
  - create as draft; add each created record to the review queue with a link built by `navigate` (never write a dashboard URL from memory)
107
107
  - mark `confirmed` only after the platform confirms
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-pseudo-sql
3
- version: 5.74.1
3
+ version: 6.0.0
4
4
  description: >-
5
5
  Use this skill when answering ad-hoc data questions that aren't covered by
6
6
  download_export (canonical reports: anomaly, audit, aging, P&L, BS, GL,