jaz-clio 3.4.1 → 4.1.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 (158) hide show
  1. package/README.md +272 -55
  2. package/assets/skills/api/SKILL.md +33 -7
  3. package/assets/skills/api/help-center-mirror/ai-agents.md +142 -0
  4. package/assets/skills/api/help-center-mirror/approvals.md +68 -0
  5. package/assets/skills/api/help-center-mirror/bank-reconciliations.md +644 -0
  6. package/assets/skills/api/help-center-mirror/bills.md +1104 -0
  7. package/assets/skills/api/help-center-mirror/cashflow.md +33 -0
  8. package/assets/skills/api/help-center-mirror/collaboration.md +58 -0
  9. package/assets/skills/api/help-center-mirror/contacts.md +200 -0
  10. package/assets/skills/api/help-center-mirror/customer-credits.md +737 -0
  11. package/assets/skills/api/help-center-mirror/dashboard.md +29 -0
  12. package/assets/skills/api/help-center-mirror/deposits.md +75 -0
  13. package/assets/skills/api/help-center-mirror/fixed-assets.md +117 -0
  14. package/assets/skills/api/help-center-mirror/get-started.md +491 -0
  15. package/assets/skills/api/help-center-mirror/import-data.md +254 -0
  16. package/assets/skills/api/help-center-mirror/index.md +24 -0
  17. package/assets/skills/api/help-center-mirror/invoices.md +1309 -0
  18. package/assets/skills/api/help-center-mirror/journal-entries.md +350 -0
  19. package/assets/skills/api/help-center-mirror/products.md +201 -0
  20. package/assets/skills/api/help-center-mirror/reports.md +511 -0
  21. package/assets/skills/api/help-center-mirror/security-privacy.md +28 -0
  22. package/assets/skills/api/help-center-mirror/settings.md +1703 -0
  23. package/assets/skills/api/help-center-mirror/supplier-credits.md +695 -0
  24. package/assets/skills/api/references/endpoints.md +125 -4
  25. package/assets/skills/api/references/field-map.md +77 -4
  26. package/assets/skills/api/references/full-api-surface.md +6 -11
  27. package/assets/skills/conversion/SKILL.md +2 -2
  28. package/assets/skills/jobs/SKILL.md +6 -6
  29. package/assets/skills/transaction-recipes/SKILL.md +2 -2
  30. package/dist/commands/accounts.js +118 -0
  31. package/dist/commands/api-action.js +61 -0
  32. package/dist/commands/auth.js +382 -0
  33. package/dist/commands/bank.js +95 -0
  34. package/dist/commands/bills.js +336 -0
  35. package/dist/commands/calc.js +11 -11
  36. package/dist/commands/capsules.js +215 -0
  37. package/dist/commands/cash-entry.js +249 -0
  38. package/dist/commands/cash-transfer.js +186 -0
  39. package/dist/commands/contacts.js +222 -0
  40. package/dist/commands/currencies.js +43 -0
  41. package/dist/commands/currency-rates.js +91 -0
  42. package/dist/commands/customer-credit-notes.js +296 -0
  43. package/dist/commands/init.js +24 -11
  44. package/dist/commands/invoices.js +353 -0
  45. package/dist/commands/items.js +205 -0
  46. package/dist/commands/jobs.js +102 -37
  47. package/dist/commands/journals.js +217 -0
  48. package/dist/commands/org.js +32 -0
  49. package/dist/commands/pagination.js +55 -0
  50. package/dist/commands/parsers.js +160 -0
  51. package/dist/commands/payments.js +85 -0
  52. package/dist/commands/recipe.js +382 -0
  53. package/dist/commands/reports.js +84 -0
  54. package/dist/commands/resolve.js +221 -0
  55. package/dist/commands/supplier-credit-notes.js +296 -0
  56. package/dist/commands/tags.js +121 -0
  57. package/dist/core/api/attachments.js +21 -0
  58. package/dist/core/api/bank.js +31 -0
  59. package/dist/core/api/bills.js +30 -0
  60. package/dist/core/api/bookmarks.js +12 -0
  61. package/dist/core/api/capsules.js +46 -0
  62. package/dist/core/api/cash-entries.js +32 -0
  63. package/dist/core/api/cash-transfers.js +12 -0
  64. package/dist/core/api/cashflow.js +6 -0
  65. package/dist/core/api/chart-of-accounts.js +18 -0
  66. package/dist/core/api/client.js +187 -0
  67. package/dist/core/api/contacts.js +18 -0
  68. package/dist/core/api/currencies.js +23 -0
  69. package/dist/core/api/custom-fields.js +9 -0
  70. package/dist/core/api/customer-cn.js +27 -0
  71. package/dist/core/api/data-exports.js +7 -0
  72. package/dist/core/api/index.js +29 -0
  73. package/dist/core/api/invoices.js +42 -0
  74. package/dist/core/api/items.js +56 -0
  75. package/dist/core/api/journals.js +24 -0
  76. package/dist/core/api/org-users.js +15 -0
  77. package/dist/core/api/organization.js +6 -0
  78. package/dist/core/api/pagination.js +66 -0
  79. package/dist/core/api/payments.js +18 -0
  80. package/dist/core/api/reports.js +21 -0
  81. package/dist/core/api/schedulers.js +9 -0
  82. package/dist/core/api/supplier-cn.js +27 -0
  83. package/dist/core/api/tags.js +15 -0
  84. package/dist/core/api/tax-profiles.js +9 -0
  85. package/dist/core/api/types.js +2 -0
  86. package/dist/core/auth/credentials.js +155 -0
  87. package/dist/core/auth/index.js +2 -0
  88. package/dist/core/auth/resolve.js +99 -0
  89. package/dist/core/auth/types.js +1 -0
  90. package/dist/core/intelligence/account-resolver.js +48 -0
  91. package/dist/core/intelligence/actions-summary.js +152 -0
  92. package/dist/core/intelligence/amount-parser.js +101 -0
  93. package/dist/core/intelligence/bank-resolver.js +65 -0
  94. package/dist/core/intelligence/contact-resolver.js +28 -0
  95. package/dist/core/intelligence/date-normalizer.js +146 -0
  96. package/dist/core/intelligence/fuzzy.js +102 -0
  97. package/dist/core/intelligence/index.js +17 -0
  98. package/dist/{jobs → core/jobs}/bank-recon/tools/match/match-utils.js +10 -1
  99. package/dist/{jobs → core/jobs}/bank-recon/tools/match/match.js +4 -2
  100. package/dist/core/jobs/document-collection/tools/ingest/classify.js +176 -0
  101. package/dist/core/jobs/document-collection/tools/ingest/format.js +94 -0
  102. package/dist/core/jobs/document-collection/tools/ingest/upload.js +95 -0
  103. package/dist/core/recipe/engine.js +301 -0
  104. package/dist/core/recipe/index.js +3 -0
  105. package/dist/core/recipe/plan.js +60 -0
  106. package/dist/core/recipe/types.js +14 -0
  107. package/dist/index.js +83 -0
  108. package/dist/types/index.js +5 -5
  109. package/dist/utils/template.js +12 -4
  110. package/package.json +9 -7
  111. package/dist/jobs/document-collection/tools/ingest/classify.js +0 -79
  112. package/dist/jobs/document-collection/tools/ingest/format.js +0 -50
  113. /package/dist/{calc → core/calc}/amortization.js +0 -0
  114. /package/dist/{calc → core/calc}/asset-disposal.js +0 -0
  115. /package/dist/{calc → core/calc}/blueprint.js +0 -0
  116. /package/dist/{calc → core/calc}/depreciation.js +0 -0
  117. /package/dist/{calc → core/calc}/ecl.js +0 -0
  118. /package/dist/{calc → core/calc}/fixed-deposit.js +0 -0
  119. /package/dist/{calc → core/calc}/format.js +0 -0
  120. /package/dist/{calc → core/calc}/fx-reval.js +0 -0
  121. /package/dist/{calc → core/calc}/lease.js +0 -0
  122. /package/dist/{calc → core/calc}/loan.js +0 -0
  123. /package/dist/{calc → core/calc}/provision.js +0 -0
  124. /package/dist/{calc → core/calc}/types.js +0 -0
  125. /package/dist/{calc → core/calc}/validate.js +0 -0
  126. /package/dist/{jobs → core/jobs}/audit-prep/blueprint.js +0 -0
  127. /package/dist/{jobs → core/jobs}/bank-recon/blueprint.js +0 -0
  128. /package/dist/{jobs → core/jobs}/credit-control/blueprint.js +0 -0
  129. /package/dist/{jobs → core/jobs}/document-collection/blueprint.js +0 -0
  130. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/cloud/dropbox.js +0 -0
  131. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/cloud/gdrive.js +0 -0
  132. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/cloud/index.js +0 -0
  133. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/cloud/onedrive.js +0 -0
  134. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/cloud/providers.js +0 -0
  135. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/cloud/types.js +0 -0
  136. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/cloud/utils.js +0 -0
  137. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/cloud/zip.js +0 -0
  138. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/ingest.js +0 -0
  139. /package/dist/{jobs → core/jobs}/document-collection/tools/ingest/scanner.js +0 -0
  140. /package/dist/{jobs → core/jobs}/fa-review/blueprint.js +0 -0
  141. /package/dist/{jobs → core/jobs}/format.js +0 -0
  142. /package/dist/{jobs → core/jobs}/gst-vat/blueprint.js +0 -0
  143. /package/dist/{jobs → core/jobs}/month-end/blueprint.js +0 -0
  144. /package/dist/{jobs → core/jobs}/payment-run/blueprint.js +0 -0
  145. /package/dist/{jobs → core/jobs}/quarter-end/blueprint.js +0 -0
  146. /package/dist/{jobs → core/jobs}/statutory-filing/blueprint.js +0 -0
  147. /package/dist/{jobs → core/jobs}/statutory-filing/tools/sg-tax/capital-allowances.js +0 -0
  148. /package/dist/{jobs → core/jobs}/statutory-filing/tools/sg-tax/constants.js +0 -0
  149. /package/dist/{jobs → core/jobs}/statutory-filing/tools/sg-tax/exemptions.js +0 -0
  150. /package/dist/{jobs → core/jobs}/statutory-filing/tools/sg-tax/form-cs.js +0 -0
  151. /package/dist/{jobs → core/jobs}/statutory-filing/tools/sg-tax/format-sg.js +0 -0
  152. /package/dist/{jobs → core/jobs}/statutory-filing/tools/sg-tax/format.js +0 -0
  153. /package/dist/{jobs → core/jobs}/statutory-filing/tools/sg-tax/types.js +0 -0
  154. /package/dist/{jobs → core/jobs}/statutory-filing/tools/sg-tax/validate.js +0 -0
  155. /package/dist/{jobs → core/jobs}/supplier-recon/blueprint.js +0 -0
  156. /package/dist/{jobs → core/jobs}/types.js +0 -0
  157. /package/dist/{jobs → core/jobs}/validate.js +0 -0
  158. /package/dist/{jobs → core/jobs}/year-end/blueprint.js +0 -0
package/README.md CHANGED
@@ -1,79 +1,88 @@
1
- # Clio — Command Line Interface Orchestrator for Jaz AI
1
+ # Jaz AI
2
2
 
3
- Agent skills + financial calculators + tax computation for the [Jaz](https://jaz.ai) and [Juan](https://juan.ac) accounting platforms.
3
+ <p align="center">
4
+ <a href="https://github.com/teamtinvio/jaz-ai/releases"><img src="https://img.shields.io/github/v/release/teamtinvio/jaz-ai?style=for-the-badge&color=blue" alt="GitHub Release"></a>
5
+ <img src="https://img.shields.io/badge/API_rules-70-green?style=for-the-badge" alt="70 API Rules">
6
+ <img src="https://img.shields.io/badge/skills-4-purple?style=for-the-badge" alt="4 Skills">
7
+ <img src="https://img.shields.io/badge/recipes-16-orange?style=for-the-badge" alt="16 Recipes">
8
+ <img src="https://img.shields.io/badge/calculators-10-red?style=for-the-badge" alt="10 Calculators">
9
+ <img src="https://img.shields.io/badge/jobs-12-teal?style=for-the-badge" alt="12 Jobs">
10
+ <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>
11
+ </p>
4
12
 
5
- Works with Claude Code, OpenAI Codex, GitHub Copilot, Cursor, and any tool supporting the [Agent Skills](https://agentskills.io) open standard.
13
+ <p align="center">
14
+ <a href="https://www.npmjs.com/package/jaz-clio"><img src="https://img.shields.io/npm/v/jaz-clio?style=flat-square&logo=npm&label=CLI" alt="npm"></a>
15
+ <a href="https://www.npmjs.com/package/jaz-clio"><img src="https://img.shields.io/npm/dm/jaz-clio?style=flat-square&label=downloads" alt="npm downloads"></a>
16
+ <a href="https://github.com/teamtinvio/jaz-ai/stargazers"><img src="https://img.shields.io/github/stars/teamtinvio/jaz-ai?style=flat-square&logo=github" alt="GitHub stars"></a>
17
+ </p>
6
18
 
7
- ## Install
19
+ API reference, financial calculators, IFRS recipes, accounting jobs, data conversion playbooks, and tax computation — directly inside the AI that builders, accountants, and developers are already using to get things done.
8
20
 
9
- ```bash
10
- npm install -g jaz-clio
11
- ```
21
+ Agent skills for [Jaz](https://jaz.ai) and [Juan](https://juan.ac) accounting platforms. Works with [Claude Code](https://claude.com/claude-code), [OpenAI Codex](https://openai.com/codex), [GitHub Copilot](https://github.com/features/copilot), [Cursor](https://cursor.com), and any tool that supports the [Agent Skills](https://agentskills.io) open standard.
12
22
 
13
23
  ## Skills
14
24
 
15
- Install agent skills into your project — auto-detects your AI tool.
25
+ | Skill | What It Does |
26
+ |-------|-------------|
27
+ | **jaz-api** | 70 rules, full endpoint catalog, error catalog, field mapping. Agents write correct Jaz API code on the first try instead of guessing |
28
+ | **jaz-conversion** | Xero, QuickBooks, Sage, Excel migration playbook. CoA mapping, tax profiles, FX, clearing accounts, trial balance verification |
29
+ | **jaz-recipes** | 16 IFRS-compliant recipes (loans, leases, depreciation, FX reval, ECL, provisions, and more) + 10 CLI financial calculators with blueprint output |
30
+ | **jaz-jobs** | 12 accounting jobs (month/quarter/year-end close, bank recon, document collection, GST/VAT filing, payment runs, credit control, supplier recon, audit prep, FA review, statutory filing) + Singapore Form C-S tax computation with AI-guided wizard workflow |
31
+
32
+ ## Installation
33
+
34
+ ### Using Clio CLI (Recommended)
35
+
36
+ Works with any AI tool. Auto-detects your platform and installs to the right path.
16
37
 
17
38
  ```bash
18
- clio init # All skills (auto-detect platform)
19
- clio init --skill api # API only
20
- clio init --skill conversion # Conversion only
21
- clio init --skill transaction-recipes # Transaction recipes only
22
- clio init --skill jobs # Jobs only
39
+ # Install CLI globally
40
+ npm install -g jaz-clio
23
41
 
24
- clio init --platform claude # Force Claude Code path
25
- clio init --platform codex # Force Codex/Agent Skills path
26
- ```
42
+ # Go to your project
43
+ cd /path/to/your/project
27
44
 
28
- | Skill | What It Does |
29
- |-------|-------------|
30
- | **api** | 56 rules, full endpoint catalog, error catalog, field mapping |
31
- | **conversion** | Xero, QuickBooks, Sage, Excel migration playbook |
32
- | **transaction-recipes** | 16 IFRS-compliant recipes + 10 financial calculators |
33
- | **jobs** | 12 accounting jobs + Singapore Form C-S tax computation |
45
+ # Install all skills (auto-detects platform)
46
+ clio init
34
47
 
35
- ## Financial Calculators
48
+ # Or install a specific skill
49
+ clio init --skill jaz-api
50
+ clio init --skill jaz-conversion
51
+ clio init --skill jaz-recipes
52
+ clio init --skill jaz-jobs
36
53
 
37
- ```bash
38
- clio calc loan --principal 100000 --rate 6 --term 60 [--json]
39
- clio calc lease --payment 5000 --term 36 --rate 5 [--json]
40
- clio calc depreciation --cost 50000 --salvage 5000 --life 5 --method ddb [--json]
41
- clio calc prepaid-expense --amount 12000 --periods 12 [--json]
42
- clio calc deferred-revenue --amount 36000 --periods 12 [--json]
43
- clio calc fixed-deposit --principal 100000 --rate 3.5 --term 12 [--json]
44
- clio calc asset-disposal --cost 50000 --salvage 5000 --life 5 --acquired 2022-01-01 --disposed 2025-06-15 --proceeds 20000 [--json]
45
- clio calc fx-reval --amount 50000 --book-rate 1.35 --closing-rate 1.38 [--json]
46
- clio calc ecl --current 100000 --30d 50000 --60d 20000 --90d 10000 --120d 5000 --rates 0.5,2,5,10,50 [--json]
47
- clio calc provision --amount 500000 --rate 4 --term 60 [--json]
54
+ # Force a specific platform
55
+ clio init --platform claude # .claude/skills/
56
+ clio init --platform codex # .agents/skills/
57
+ clio init --platform agents # .agents/skills/ (universal)
48
58
  ```
49
59
 
50
- Add `--json` for structured blueprint output with capsule type, journal entries, workings, and step-by-step execution plan. All calculators support `--currency <code>`.
60
+ ### Claude Code Marketplace
51
61
 
52
- ## Job Tools
53
-
54
- Jobs can have paired tools as nested subcommands:
62
+ ```
63
+ /plugin marketplace add teamtinvio/jaz-ai
64
+ /plugin install jaz-ai@jaz-plugins
65
+ ```
55
66
 
56
- ```bash
57
- # Bank reconciliation matcher (5-phase cascade: 1:1, N:1, 1:N, N:M)
58
- clio jobs bank-recon match --input bank-data.json [--tolerance 0.01] [--date-window 14] [--json]
67
+ ### OpenAI Codex
59
68
 
60
- # Document collection — scan and classify client documents (outputs file paths for agent upload)
61
- clio jobs document-collection ingest --source ./client-docs/ [--json] # local directory
62
- clio jobs document-collection ingest --source "https://www.dropbox.com/scl/fo/..." [--json] # Dropbox folder
63
- clio jobs document-collection ingest --source "https://drive.google.com/file/d/..." [--json] # Google Drive file
69
+ ```
70
+ $skill-installer https://github.com/teamtinvio/jaz-ai
64
71
  ```
65
72
 
66
- ## Tax Computation (Singapore Form C-S)
73
+ ### Manual Install
67
74
 
68
- Tax computation is under the `statutory-filing` job:
75
+ Copy the skill directories into your project:
69
76
 
70
77
  ```bash
71
- clio jobs statutory-filing sg-cs --input tax-data.json [--json]
72
- clio jobs statutory-filing sg-cs --ya 2026 --revenue 500000 --profit 120000 --depreciation 15000 --exemption pte [--json]
73
- clio jobs statutory-filing sg-ca --ya 2026 --cost 50000 --category general --acquired 2024-06-15 [--json]
78
+ # For Codex, Copilot, Cursor (Agent Skills standard)
79
+ cp -r .agents/skills/ /path/to/your/project/.agents/skills/
80
+
81
+ # For Claude Code
82
+ cp -r .claude/skills/ /path/to/your/project/.claude/skills/
74
83
  ```
75
84
 
76
- ## Other Commands
85
+ ### Other CLI Commands
77
86
 
78
87
  ```bash
79
88
  clio versions # List available versions
@@ -81,11 +90,219 @@ clio update # Update to latest version
81
90
  clio --help # Show all commands
82
91
  ```
83
92
 
84
- ## Documentation
93
+ ## Usage
94
+
95
+ Skills activate automatically when you or your agent work with Jaz/Juan API code or data conversion tasks. Just describe what you need:
96
+
97
+ ### API Skill
98
+
99
+ ```
100
+ Create an invoice with 3 line items and 7% GST
101
+
102
+ Build a payment for invoice INV-001 in USD
103
+
104
+ Query all overdue bills with pagination
105
+
106
+ Set up chart of accounts for a Singapore company
107
+ ```
108
+
109
+ ### Conversion Skill
110
+
111
+ ```
112
+ Convert this Xero trial balance export to Jaz
113
+
114
+ Migrate QuickBooks aged receivables to conversion invoices
115
+
116
+ Map this Excel chart of accounts to Jaz CoA structure
117
+
118
+ Verify the trial balance after conversion
119
+ ```
120
+
121
+ ### Transaction Recipes Skill
122
+
123
+ ```
124
+ Set up a 5-year bank loan with monthly repayment schedule
125
+
126
+ Model IFRS 16 lease for a 3-year office lease at 5% IBR
127
+
128
+ Calculate ECL provision on aged receivables
129
+
130
+ Record prepaid insurance with monthly amortization via capsule
131
+ ```
132
+
133
+ ### Jobs Skill
134
+
135
+ ```
136
+ Close the books for January 2025
137
+
138
+ Run bank reconciliation for DBS Current account
139
+
140
+ Prepare GST return for Q1 2025
141
+
142
+ Generate a payment run for all overdue bills
143
+
144
+ Prepare audit pack for FY 2025
145
+ ```
146
+
147
+ ### Financial Calculators & Job Tools (CLI)
148
+
149
+ ```bash
150
+ clio calc loan --principal 100000 --rate 6 --term 60 --json
151
+ clio calc depreciation --cost 50000 --salvage 5000 --life 5 --method ddb --json
152
+ clio jobs bank-recon match --input bank-data.json --json
153
+ clio jobs document-collection ingest --source "https://www.dropbox.com/scl/fo/..." --json
154
+ clio jobs statutory-filing sg-cs --ya 2026 --revenue 500000 --profit 120000 --json
155
+ ```
156
+
157
+ 10 financial calculators, 12 job blueprints, and paired tools (bank matcher, document ingest with cloud support, SG Form C-S tax computation). Add `--json` for structured blueprint output with capsule type, journal entries, workings, and step-by-step execution plan.
158
+
159
+ Full command reference: [transaction-recipes skill](src/skills/transaction-recipes/SKILL.md) and [jobs skill](src/skills/jobs/SKILL.md).
160
+
161
+ ## What's Inside
162
+
163
+ ### API Skill (`jaz-api`)
164
+
165
+ | Reference | Lines | Content |
166
+ |-----------|-------|---------|
167
+ | `SKILL.md` | 185 | 70 critical rules — auth, IDs, dates, FX, payments, field aliases, response shapes |
168
+ | `endpoints.md` | 1,299 | Request/response examples for every core endpoint |
169
+ | `errors.md` | 751 | Error catalog with root causes and fixes |
170
+ | `field-map.md` | 428 | Intuitive name -> actual field name mapping |
171
+ | `search-reference.md` | 714 | Filter fields, sort fields, operators for 28 search endpoints |
172
+ | `full-api-surface.md` | 699 | Complete endpoint catalog (80+), enums, limits |
173
+ | `dependencies.md` | 139 | Resource creation order (currencies -> CoA -> transactions) |
174
+ | `feature-glossary.md` | 216 | Business context per feature |
175
+
176
+ ### Conversion Skill (`jaz-conversion`)
177
+
178
+ | Reference | Content |
179
+ |-----------|---------|
180
+ | `SKILL.md` | Conversion domain knowledge, clearing account pattern, FX handling |
181
+ | `mapping-rules.md` | CoA, contact, and tax code mapping rules |
182
+ | `option1-full.md` | Full conversion workflow (all transactions FY + FY-1) |
183
+ | `option2-quick.md` | Quick conversion workflow (opening balances at FYE) |
184
+ | `file-types.md` | Supported file formats and detection heuristics |
185
+ | `edge-cases.md` | Platform-specific quirks (Sage 300 preambles, Xero rounding) |
186
+ | `verification.md` | Trial balance comparison and verification checklist |
187
+ | `file-analysis.md` | Excel/CSV structure analysis and smart detection |
188
+
189
+ ### Transaction Recipes Skill (`jaz-recipes`)
190
+
191
+ | Reference | Content |
192
+ |-----------|---------|
193
+ | `SKILL.md` | 16 recipes in 4 tiers, building blocks, key principles, calculator index |
194
+ | `building-blocks.md` | Capsules, schedulers, manual journals, FA, tracking tags, nano classifiers |
195
+ | `prepaid-amortization.md` | Annual insurance/rent paid upfront, monthly scheduler recognition |
196
+ | `deferred-revenue.md` | Upfront customer payment, monthly revenue recognition |
197
+ | `accrued-expenses.md` | Month-end accrual + reversal cycle using dual schedulers |
198
+ | `bank-loan.md` | Loan disbursement, amortization table, monthly installments |
199
+ | `ifrs16-lease.md` | ROU asset + lease liability unwinding (IFRS 16) |
200
+ | `declining-balance.md` | DDB/150DB with switch-to-SL logic |
201
+ | `fixed-deposit.md` | Placement, compound interest accrual, maturity (IFRS 9) |
202
+ | `hire-purchase.md` | Like IFRS 16 but depreciate over useful life |
203
+ | `asset-disposal.md` | Sale/scrap/write-off with gain/loss (IAS 16) |
204
+ | `fx-revaluation.md` | Non-AR/AP FX revaluation with Day 1 reversal (IAS 21) |
205
+ | `bad-debt-provision.md` | ECL simplified approach provision matrix (IFRS 9) |
206
+ | `employee-accruals.md` | Leave (scheduler) + bonus (manual) accruals (IAS 19) |
207
+ | `provisions.md` | PV recognition + monthly discount unwinding (IAS 37) |
208
+ | `dividend.md` | Declaration + payment (two manual journals) |
209
+ | `intercompany.md` | Mirrored invoices/bills across two entities |
210
+ | `capital-wip.md` | CIP accumulation → FA transfer on completion |
211
+
212
+
213
+ ### Jobs Skill (`jaz-jobs`)
214
+
215
+ | Reference | Content |
216
+ |-----------|---------|
217
+ | `SKILL.md` | 12 accounting jobs + SG tax computation, CLI commands, wizard workflow overview |
218
+ | `building-blocks.md` | Shared concepts: accounting periods, lock dates, period verification |
219
+ | `month-end-close.md` | 5 phases, ~18 steps — the foundation for all period closes |
220
+ | `quarter-end-close.md` | Monthly + quarterly extras (GST/VAT, ECL, bonus accruals) |
221
+ | `year-end-close.md` | Quarterly + annual extras (true-ups, dividends, CYE rollover) |
222
+ | `bank-recon.md` | Match, categorize, resolve unreconciled items |
223
+ | `bank-match.md` | Bank reconciliation matcher — 5-phase cascade algorithm (1:1, N:1, 1:N, N:M) |
224
+ | `document-collection.md` | Scan and classify documents from local directories and cloud links (Dropbox, Google Drive, OneDrive) — outputs file paths for agent upload |
225
+ | `gst-vat-filing.md` | Tax ledger review, discrepancy check, filing summary |
226
+ | `payment-run.md` | Select outstanding bills by due date, process payments |
227
+ | `credit-control.md` | AR aging review, overdue chase list, bad debt assessment |
228
+ | `supplier-recon.md` | AP vs supplier statement, identify mismatches |
229
+ | `audit-prep.md` | Compile reports, schedules, reconciliations for auditor |
230
+ | `fa-review.md` | Fixed asset register review, disposal/write-off processing |
231
+ | `sg-tax/overview.md` | SG CIT framework: 17% rate, YA concept, Form C-S eligibility |
232
+ | `sg-tax/form-cs-fields.md` | 18 Form C-S + 6 C-S Lite fields with IRAS labels |
233
+ | `sg-tax/wizard-workflow.md` | Step-by-step AI agent wizard procedure |
234
+ | `sg-tax/data-extraction.md` | How to pull P&L, TB, GL, FA from Jaz API for tax |
235
+ | `sg-tax/add-backs-guide.md` | Which expenses are non-deductible + GL patterns |
236
+ | `sg-tax/capital-allowances-guide.md` | S19, S19A, S19B, S14Q rules per asset category |
237
+ | `sg-tax/ifrs16-tax-adjustment.md` | IFRS 16 lease reversal for tax purposes |
238
+ | `sg-tax/enhanced-deductions.md` | R&D (250-400%), IP, donations (250% IPC), S14Q |
239
+ | `sg-tax/exemptions-and-rebates.md` | SUTE, PTE, CIT rebate schedule by YA |
240
+ | `sg-tax/losses-and-carry-forwards.md` | Set-off order, carry-forward rules |
241
+
242
+ ## Architecture
243
+
244
+ ```
245
+ .claude-plugin/ Claude Code marketplace manifest
246
+ ├── plugin.json
247
+ └── marketplace.json
248
+
249
+ .agents/skills/ Agent Skills standard (Codex, Copilot, Cursor)
250
+ ├── api/ → src/skills/api/
251
+ ├── conversion/ → src/skills/conversion/
252
+ ├── transaction-recipes/ → src/skills/transaction-recipes/
253
+ └── jobs/ → src/skills/jobs/
254
+
255
+ .claude/skills/ Claude Code native path
256
+ ├── api/ → src/skills/api/
257
+ ├── conversion/ → src/skills/conversion/
258
+ ├── transaction-recipes/ → src/skills/transaction-recipes/
259
+ └── jobs/ → src/skills/jobs/
260
+
261
+ src/skills/ Source of truth (single copy, dual discovery paths)
262
+ ├── api/ 70 rules + 7 reference files
263
+ ├── conversion/ Conversion domain + 7 reference files
264
+ ├── transaction-recipes/ 16 recipes + 18 reference files
265
+ └── jobs/ 12 jobs + 12 job files + 10 sg-tax files
266
+
267
+ src/ npm CLI (jaz-clio)
268
+ ├── commands/ CLI command handlers (23 command groups)
269
+ │ ├── calc.ts 10 financial calculator commands
270
+ │ ├── jobs.ts Job blueprints + nested tools
271
+ │ ├── invoices.ts Invoice CRUD + pay + apply-credits + download
272
+ │ ├── bills.ts Bill CRUD + pay + apply-credits
273
+ │ ├── customer-credit-notes.ts CCN CRUD + refund + refunds (list)
274
+ │ ├── supplier-credit-notes.ts SCN CRUD + refund + refunds (list)
275
+ │ ├── contacts.ts Contact CRUD + search
276
+ │ ├── journals.ts Journal entries + search
277
+ │ ├── cash-entry.ts Cash-in / cash-out journals
278
+ │ ├── cash-transfer.ts Cash transfer journals
279
+ │ ├── currencies.ts Currency list + enable
280
+ │ ├── currency-rates.ts Exchange rate CRUD
281
+ │ └── ... 10 more (auth, org, bank, accounts, reports, etc.)
282
+ ├── core/ Shared logic
283
+ │ ├── api/ Jaz REST client (30+ modules, 70+ endpoints)
284
+ │ ├── calc/ 10 financial calculators
285
+ │ ├── jobs/ 12 job blueprints + paired tools
286
+ │ ├── auth/ Credential management
287
+ │ └── intelligence/ Fuzzy matching, date parsing, contact resolution
288
+ └── assets/skills/ Bundled skill content for npm package
289
+ ```
290
+
291
+ ## Common API Gotchas
292
+
293
+ Mistakes the skill prevents — for agents and humans alike:
85
294
 
86
- - [Full documentation](https://github.com/teamtinvio/jaz-ai)
87
- - [Jaz Help Center](https://help.jaz.ai)
295
+ | Gotcha | Wrong | Right |
296
+ |--------|-------|-------|
297
+ | Auth header | `Authorization: Bearer ...` | `x-jk-api-key: ...` |
298
+ | ID field | `id` | `resourceId` |
299
+ | Date field | `issueDate`, `date` | `valueDate` |
300
+ | FX currency | `currencyCode: "USD"` | `currency: { sourceCurrency: "USD" }` |
301
+ | Org endpoint | `{ data: [...] }` | `{ data: { ... } }` (single object) |
302
+ | Payments | `[{ ... }]` | `{ payments: [{ ... }] }` (wrapped) |
303
+ | CN Refunds | `{ payments: [{ paymentAmount }] }` | `{ refunds: [{ refundAmount }] }` |
304
+ | Apply credits | `{ amount: 100 }` | `{ credits: [{ creditNoteResourceId, amountApplied }] }` |
88
305
 
89
306
  ## License
90
307
 
91
- [MIT](https://github.com/teamtinvio/jaz-ai/blob/main/LICENSE) - Copyright (c) 2026 Tinvio / Jaz
308
+ [MIT](LICENSE) - Copyright (c) 2026 Tinvio / Jaz
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: api
3
- version: 3.4.1
2
+ name: jaz-api
3
+ version: 4.1.0
4
4
  description: Complete reference for the Jaz/Juan REST API — the accounting platform backend. Use this skill whenever building, modifying, debugging, or extending any code that calls the API — including API clients, integrations, data seeding, test data, or new endpoint work. Contains every field name, response shape, error, gotcha, and edge case discovered through live production testing.
5
5
  license: MIT
6
6
  compatibility: Requires Jaz/Juan API key (x-jk-api-key header). Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown.
@@ -53,7 +53,7 @@ You are working with the **Jaz/Juan REST API** — the backend for Jaz (Singapor
53
53
 
54
54
  ### Chart of Accounts
55
55
  17. **Tax profiles pre-exist** — NEVER create them. Only GET and map.
56
- 18. **Bank accounts are CoA entries** with `accountType: "Bank Accounts"`. No separate endpoint.
56
+ 18. **Bank accounts are CoA entries** with `accountType: "Bank Accounts"`. A convenience endpoint `GET /bank-accounts` exists but returns a **flat array** `[{...}]` — NOT the standard paginated `{ data, totalElements, totalPages }` shape. Normalize before use.
57
57
  19. **CoA bulk-upsert wrapper is `accounts`** — not `chartOfAccounts`.
58
58
  20. **CoA POST uses `currency`** — not `currencyCode`. (Asymmetry — GET returns `currencyCode`.)
59
59
  21. **CoA POST uses `classificationType`** — GET returns `accountType`. Same values.
@@ -113,10 +113,10 @@ You are working with the **Jaz/Juan REST API** — the backend for Jaz (Singapor
113
113
  41. **Invoice GET uses `organizationAccountResourceId`** for line item accounts — POST uses `accountResourceId`. Request-side aliases resolve `issueDate` → `valueDate`, `bankAccountResourceId` → `accountResourceId`, etc.
114
114
  42. **Scheduler GET returns `interval`** — POST uses `repeat`. (Response-side asymmetry remains.)
115
115
  43. **Search sort is an object** — `{ sort: { sortBy: ["valueDate"], order: "DESC" } }`. Required when `offset` is present (even `offset: 0`).
116
- 44. **Bank records: two import methods** — Multipart CSV/OFX via `POST /magic/importBankStatementFromAttachment` (fields: `sourceFile`, `accountResourceId`, `businessTransactionType: "BANK_STATEMENT"`, `sourceType: "FILE"`). JSON via `POST /bank-records/:accountResourceId` with `{ records: [{description, netAmount, valueDate, ...}] }`.
116
+ 44. **Bank records: two import methods** — Multipart CSV/OFX via `POST /magic/importBankStatementFromAttachment` (camelCase fields: `sourceFile`, `accountResourceId`, `businessTransactionType: "BANK_STATEMENT"`, `sourceType: "FILE"` — same camelCase rule as rule 59). JSON via `POST /bank-records/:accountResourceId` with `{ records: [{description, netAmount, valueDate, ...}] }`.
117
117
  45. **Withholding tax** on bills/supplier CNs only. Retry pattern: if `WITHHOLDING_CODE_NOT_FOUND`, strip field and retry.
118
118
  46. **Known API bugs (500s)**: Contact groups PUT, custom fields PUT, capsules POST, catalogs POST, inventory balances GET — all return 500.
119
- 47. **Non-existent endpoints**: `POST /deposits` and `POST /inventory/adjustments` return 404 — these endpoints are not implemented.
119
+ 47. **Non-existent endpoints**: `POST /deposits`, `POST /inventory/adjustments`, `GET /payments` (list), and `POST /payments/search` return 404 — these endpoints are not implemented. To list/search payments, use `POST /cashflow-transactions/search` (the unified transaction ledger — see Rule 63).
120
120
  48. **Attachments require PDF/PNG**: `POST /:type/:id/attachments` uses multipart `file` field but rejects `text/plain`. Use `application/pdf` or `image/png`.
121
121
  49. **Currency rate direction: `rate` = functionalToSource (1 base = X foreign)** — POST `rate: 0.74` for a SGD org means 1 SGD = 0.74 USD. **If your data stores rates as "1 USD = 1.35 SGD" (sourceToFunctional), you MUST invert: `rate = 1 / 1.35 = 0.74`.** GET confirms both: `rateFunctionalToSource` (what you POSTed) and `rateSourceToFunctional` (the inverse).
122
122
 
@@ -125,17 +125,43 @@ You are working with the **Jaz/Juan REST API** — the backend for Jaz (Singapor
125
125
  51. **Filter operator reference** — String: `eq`, `neq`, `contains`, `in` (array, max 100), `likeIn` (array, max 100), `reg` (regex array, max 100), `isNull` (bool). Numeric: `eq`, `gt`, `gte`, `lt`, `lte`, `in`. Date (YYYY-MM-DD): `eq`, `gt`, `gte`, `lt`, `lte`, `between` (exactly 2 values). DateTime (RFC3339): same operators, converted to epoch ms internally. Boolean: `eq`. JSON: `jsonIn`, `jsonNotIn`. Logical: nest with `and`/`or`/`not` objects, or use `andGroup`/`orGroup` arrays (invoices, bills, journals, credit notes).
126
126
  52. **Date format asymmetry (CRITICAL)** — Request dates: `YYYY-MM-DD` strings (all create/update and DateExpression filters). Request datetimes: RFC3339 strings (DateTimeExpression filters for `createdAt`, `updatedAt`, `approvedAt`, `submittedAt`). **ALL response dates**: `int64` epoch milliseconds — including `valueDate`, `createdAt`, `updatedAt`, `approvedAt`, `submittedAt`, `matchDate`. Convert: `new Date(epochMs).toISOString().slice(0,10)`.
127
127
  53. **Field aliases on create endpoints** — Middleware transparently maps: `issueDate`/`date` → `valueDate` (invoices, bills, credit notes, journals). `name` → `tagName` (tags) or `internalName` (items). `paymentDate` → `valueDate`, `bankAccountResourceId` → `accountResourceId` (payments). `paymentAmount` → `refundAmount`, `paymentMethod` → `refundMethod` (credit note refunds). `accountType` → `classificationType`, `currencyCode` → `currency` (CoA). Canonical names always work; aliases are convenience only.
128
- 54. **All search/list responses are flat** — every search and list endpoint returns `{ totalElements, totalPages, data: [...] }` directly (no outer `data` wrapper). Access the array via `response.data`, pagination via `response.totalElements`.
128
+ 54. **All search/list responses are flat** — every search and list endpoint returns `{ totalElements, totalPages, data: [...] }` directly (no outer `data` wrapper). Access the array via `response.data`, pagination via `response.totalElements`. **Two exceptions**: (a) `GET /bank-accounts` returns a plain array `[{...}]` (see Rule 18), (b) `GET /invoices/:id` returns a flat object `{...}` (no `data` wrapper) — unlike `GET /bills/:id`, `GET /contacts/:id`, `GET /journals/:id` which wrap in `{ data: {...} }`. Normalize the invoice GET response before use.
129
129
  55. **Scheduled endpoints support date aliases** — `txnDateAliases` middleware (mapping `issueDate`/`date` → `valueDate`) now applies to all scheduled create/update endpoints: `POST/PUT /scheduled/invoices`, `POST/PUT /scheduled/bills`, `POST/PUT /scheduled/journals`, `POST/PUT /scheduled/subscriptions`.
130
130
  56. **Kebab-case URL aliases** — `capsuleTypes` endpoints also accept kebab-case paths: `/capsule-types` (list, search, CRUD). `moveTransactionCapsules` also accepts `/move-transaction-capsules`. Both camelCase and kebab-case work identically.
131
131
 
132
132
  ### Jaz Magic — Extraction & Autofill
133
133
  57. **When the user starts from an attachment, always use Jaz Magic** — if the input is a PDF, JPG, or any document image (invoice, bill, receipt), the correct path is `POST /magic/createBusinessTransactionFromAttachment`. Do NOT manually construct a `POST /invoices` or `POST /bills` payload from an attachment — Jaz Magic handles the entire extraction-and-autofill pipeline server-side: OCR, line item detection, contact matching, CoA auto-mapping via ML learning, and draft creation with all fields pre-filled. Only use `POST /invoices` or `POST /bills` when building transactions from structured data (JSON, CSV, database rows) where the fields are already known.
134
134
  58. **Two upload modes with different content types** — `sourceType: "FILE"` requires **multipart/form-data** with `sourceFile` blob (JSON body fails with 400 "sourceFile is a required field"). `sourceType: "URL"` accepts **application/json** with `sourceURL` string. The OAS only documents URL mode — FILE mode (the common case) is undocumented.
135
- 59. **Three required fields**: `sourceFile` (multipart blob — NOT `file`), `businessTransactionType` (`"INVOICE"` or `"BILL"` only — `EXPENSE` rejected), `sourceType` (`"FILE"` or `"URL"`). All three are validated server-side.
135
+ 59. **Three required fields**: `sourceFile` (multipart blob — NOT `file`), `businessTransactionType` (`"INVOICE"` or `"BILL"` only — `EXPENSE` rejected), `sourceType` (`"FILE"` or `"URL"`). All three are validated server-side. **CRITICAL: multipart form field names are camelCase** — `businessTransactionType`, `sourceType`, `sourceFile`, NOT snake_case. Using `business_transaction_type` returns 422 "businessTransactionType is a required field". The File blob must include a filename and correct MIME type (e.g. `application/pdf`, `image/jpeg`) — bare `application/octet-stream` blobs are rejected with 400 "Invalid file type".
136
136
  60. **Response maps transaction types**: Request `BILL` → response `businessTransactionType: "PURCHASE"`. Request `INVOICE` → response `businessTransactionType: "SALE"`. S3 paths follow: `/purchases/` vs `/sales/`.
137
137
  61. **Extraction is asynchronous** — the API response is immediate (file upload confirmation only). The actual Magic pipeline — OCR, line item extraction, contact matching, CoA learning, and autofill — runs asynchronously. The `subscriptionFBPath` in the response (e.g., `magic_transactions/{orgId}/purchase/{fileId}`) is a Firebase Realtime Database path for subscribing to extraction status updates.
138
138
  62. **Accepts PDF and JPG/JPEG** — both file types confirmed working. Handwritten documents are accepted at upload stage (extraction quality varies). `fileType` in response reflects actual format: `"PDF"`, `"JPEG"`.
139
+ 63. **Never use magic-search endpoints** — `GET /invoices/magic-search` and `GET /bills/magic-search` require a separate `x-magic-api-key` (not available to agents). Always use `POST /invoices/search` or `POST /bills/search` with standard `x-jk-api-key` auth instead.
140
+
141
+ ### Cashflow & Unified Ledger
142
+ 64. **No standalone payments list/search** — `GET /payments`, `POST /payments/search`, and `GET /payments` do NOT exist. Per-payment CRUD (`GET/PUT/DELETE /payments/:resourceId`) exists for individual payment records, but to **list or search** payments, use `POST /cashflow-transactions/search` — the unified transaction ledger that spans invoices, bills, credit notes, journals, cash entries, and payments. Filter by `businessTransactionType` (e.g., `SALE`, `PURCHASE`) and `direction` (`PAYIN`, `PAYOUT`). Response dates are epoch milliseconds.
143
+ 65. **Contacts search uses `name`** — NOT `billingName`. The filter field for searching contacts by name is `name` (maps to `billingName` internally). Sort field is also `name`. Using `billingName` in a search filter returns zero results.
144
+
145
+ ### Response Shape Gotchas
146
+ 66. **Contact boolean fields are `customer`/`supplier`** — NOT `isCustomer`/`isSupplier`. These are plain booleans on the contact object: `{ "customer": true, "supplier": false }`. Using `isCustomer` or `isSupplier` in code will be `undefined`.
147
+ 67. **Finalized statuses differ by resource type** — NOT `"FINALIZED"`, `"FINAL"`, or `"POSTED"`. Journals → `"APPROVED"`. Invoices/Bills → `"UNPAID"` (progresses to `"PAID"`, `"OVERDUE"`). Customer/Supplier Credit Notes → `"UNAPPLIED"` (progresses to `"APPLIED"`). All types support `"DRAFT"` and `"VOIDED"`. When creating without `saveAsDraft: true`, the response status matches the type's finalized status.
148
+ 68. **Create/pay responses are minimal** — POST create endpoints (invoices, bills, journals, contacts, payments) return only `{ resourceId: "..." }` (plus a few metadata fields). They do NOT return the full entity. To verify field values after creation, you MUST do a subsequent `GET /:type/:resourceId`. Never assert on field values from a create response.
149
+ 69. **No `amountDue` field** — Invoices and bills do NOT have an `amountDue` field. To check if a transaction is fully paid, inspect the `paymentRecords` array: if `paymentRecords.length > 0`, payments exist. Compare `totalAmount` with the sum of `paymentRecords[].transactionAmount` to determine remaining balance.
150
+ 70. **Response dates include time component** — Even though request dates are `YYYY-MM-DD`, response dates are epoch milliseconds (see Rule 52). When comparing dates from responses, always convert with `new Date(epochMs).toISOString().slice(0, 10)` — never string-match against the raw epoch value.
151
+ 71. **Items POST requires `saleItemName`/`purchaseItemName`** — When creating items with `appliesToSale: true` or `appliesToPurchase: true`, you MUST include `saleItemName` and/or `purchaseItemName` respectively. These are the display names shown on sale/purchase documents. Omitting them causes 422: "saleItemName is a required field". If not specified, default to the `internalName` value.
152
+ 72. **Items PUT requires `itemCode` + `internalName`** — Even for partial updates, `PUT /items/:id` requires both `itemCode` and `internalName` in the body. Omitting either causes 422. Use read-modify-write pattern: GET current item, merge your updates, PUT the full payload. Clio handles this automatically.
153
+ 73. **Capsules PUT requires `resourceId` + `capsuleTypeResourceId`** — Even for partial updates, `PUT /capsules/:id` requires `resourceId` and `capsuleTypeResourceId` in the body. Omitting either causes 422 or "Capsule type not found". Use read-modify-write pattern: GET current capsule, merge updates, PUT full payload. Clio handles this automatically.
154
+
155
+ ### Cash Entry Response Shape (CRITICAL)
156
+ 74. **Cash-in/out/transfer CREATE returns `parentEntityResourceId`** — The resourceId in the POST response (`{ data: { resourceId: "X" } }`) is the journal header's `parentEntityResourceId`. This ID is used for DELETE (`DELETE /cashflow-journals/X`). But it is **NOT** the same ID used for GET (`GET /cash-in-journals/:id`). GET expects the cashflow-transaction `resourceId` from the LIST response. Three different IDs exist per cash entry: `parentEntityResourceId` (from CREATE + in LIST), `resourceId` (cashflow-transaction ID, from LIST — use for GET), `businessTransactionResourceId` (underlying journal ID — do NOT use for anything).
157
+ 75. **Cash-in/out/transfer LIST/GET return cashflow-transaction shape** — NOT journal shape. Key field differences from journals: `transactionReference` (NOT `reference`), `transactionStatus` (NOT `status` — values: `ACTIVE`/`VOID`), `valueDate` is epoch ms (NOT ISO string), no `journalEntries` array, has `direction` (`PAYIN`/`PAYOUT`), has nested `account` object with bank name, has `businessTransactionType` (`JOURNAL_DIRECT_CASH_IN`/`JOURNAL_DIRECT_CASH_OUT`/`JOURNAL_CASH_TRANSFER`).
158
+ 76. **Cash-in/out/transfer search uses `/cashflow-transactions/search`** — Filter by `businessTransactionType: { eq: "JOURNAL_DIRECT_CASH_IN" }` (or `JOURNAL_DIRECT_CASH_OUT` or `JOURNAL_CASH_TRANSFER`). Other useful filters: `organizationAccountResourceId` (bank account), `businessTransactionReference` (reference), `valueDate` (date range). The search endpoint is shared across all cashflow transaction types.
159
+ 77. **DELETE for cash entries uses `/cashflow-journals/:id`** — NOT the individual resource paths. The ID used is the `parentEntityResourceId` (= the resourceId returned by CREATE). This is a shared endpoint for all cash journal types (cash-in, cash-out, cash-transfer).
160
+
161
+ ### Entity Resolution (Fuzzy Matching)
162
+ 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.
163
+ 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.
164
+ 80. **Payment/refund account filter is conditional on `--method`** — for BANK_TRANSFER, CASH, and CHEQUE, the `--account` resolver filters to bank/cash accounts only. For other payment methods, all account types are considered.
139
165
 
140
166
  ## Supporting Files
141
167
 
@@ -0,0 +1,142 @@
1
+ ### Agent Builder
2
+ Source: https://help.jaz.ai/en/articles/10631219-agent-builder
3
+
4
+ **Q1. What is an AI Agent?**
5
+
6
+ - Jaz’s AI Agent allows you to send emails to perform accounting and finance tasks for your organizations.
7
+ - All actions taken by your agent are recorded as your own in Jaz.
8
+ - Agent tasks follow your user permissions and execute actions on your behalf.
9
+
10
+ **Q2. How do I set up my AI Agent?**
11
+
12
+ - Head over to Settings > Agent Builder and set the following according to your preferences:
13
+ - Name
14
+ - Email
15
+ - Create an agent's email using letters (a-z), numbers (0-9), and the plus (+) symbol.
16
+ - Using the plus (+) symbol is a good way to differentiate agents per organization, for example: [myagent+greengrocery@sendjaz.com](mailto:myagent+greengrocery@sendjaz.com)
17
+ - Tone
18
+ - Friendly
19
+ - Formal
20
+ - Focused
21
+ - Skill Level
22
+ - Assistant
23
+ - Analyst (Growth Plan only)
24
+ - Associate (Coming soon)
25
+ - Memory
26
+ - Predefined
27
+ - Progressive (Growth Plan only)
28
+ - Preferred Language
29
+
30
+ **Q3. What tasks can the AI Agent perform?**
31
+
32
+ The AI Agent can perform the following functions for paid organizations:
33
+ - Bookmarks
34
+ - Create, review, and manage bookmarks.
35
+ - Chart of Accounts
36
+ - Create, update, and search accounts and types.
37
+ - Contacts & Items
38
+ - Create, update, and search contacts and items.
39
+ - Currency Management
40
+ - Add, update, and retrieve currencies and exchange rates.
41
+ - Draft Transactions
42
+ - Create draft invoices, bills, and journals.
43
+ - Jaz Magic (Invoices & Bills)
44
+ - Autofill invoice and bill drafts from emails or attachments.
45
+ - Reports & Data Exports
46
+ - Generate balance sheets, P&L, cash flow, and other reports.
47
+ - Tax Profiles
48
+ - Create tax profiles.
49
+ - Direct Cash Transactions
50
+ - Record direct cash inflows, outflows, or transfers.
51
+ - Note: Only available for organizations under Growth Plan.
52
+ - Updates, Voids, & Deletes
53
+ - Modify or void transactions, contacts, or accounts.
54
+ - Note: Only available for organizations under Growth Plan.
55
+
56
+ **Q4. How does the agent receive instructions?**
57
+
58
+ - Send tasks via email to your agent's assigned email address.
59
+ - Use the ‘To’ field for direct actions and replies.
60
+ - Use ‘Cc’ to keep the agent informed but it will only respond to your verified email.
61
+
62
+ **Q5. Can the AI Agent reply to emails with other recipients?**
63
+
64
+ - No, it only responds to your verified email for security reasons.
65
+
66
+ **Q6. What happens when I update my agent's email?**
67
+
68
+ - Updating your agent’s email cancels all ongoing actions and the previous email will be unavailable for up to 72 hours.
69
+
70
+ **Q7. What happens if I cancel or downgrade my organization plan?**
71
+
72
+ - Your agent will be deactivated and its email will be released.
73
+
74
+ **Q8. Why am I not receiving responses from my agent?**
75
+
76
+ - Ensure you've included instructions in the ‘To**’** field and the email body.
77
+ - Make sure the agent's email is in your email contacts.
78
+ - Whitelist @sendjaz.com (@sendjaz.com), and check spam or other folders.
79
+
80
+ **Q9. Why can’t I add new instructions to the AI Agent?**
81
+
82
+ - Only organizations under the Growth Plan can add new instructions and turn off specific workflows.
83
+
84
+ **Q10. Is it possible to whitelist external email addresses for my agent builder?**
85
+
86
+ - Yes. You can whitelist specific email addresses or domains in your agent builder.
87
+ - Whitelisting allows your agent to CC email addresses in replies, only when these addresses or domains were in your original email to the agent.
88
+
89
+ ---
90
+
91
+ ### Clio
92
+ Source: https://help.jaz.ai/en/articles/10631206-clio
93
+
94
+ **Q1. What is Clio?**
95
+
96
+ - Clio stands for **Command Line Interface Operator**designed to help with accounting and finance tasks on Jaz.
97
+
98
+ **Q2. Is Clio available to all users?**
99
+
100
+ - No, Clio is available only for paid organizations.
101
+
102
+ **Q3. Can I use Clio on the Jaz mobile app?**
103
+
104
+ - Yes, Clio is available on Android (soon for IOS). Go to **Home > Clio AI Support** to access it.**Q4. How does Clio process queries?**
105
+
106
+ - It processes all queries in real-time and does not retain personal or query-related data unless explicitly saved in accounting records or reports.
107
+
108
+ **Q5. What happens when I log out or switch organizations?**
109
+
110
+ - Clio is session-based, meaning it resets when you log out, close the tab, or switch organizations. Chat history is not retained.
111
+
112
+ **Q6. Can Clio handle multiple tasks at once?**
113
+
114
+ - Yes, Clio can process multiple tasks in a single query.
115
+
116
+ **Q7. Are there any restrictions on Clio’s capabilities?**
117
+
118
+ - Yes, Clio's functionality is limited to tasks and features within the Jaz ecosystem.
119
+
120
+ - Its functions are also limited to the user’s access permissions within an organization (e.g., a user without report access cannot generate reports).
121
+
122
+ **Q8. Does Clio store my chat history?**
123
+
124
+ - No, users cannot download or export chat history.
125
+
126
+ **Q9. What happens when I edit a sent query?**
127
+
128
+ - Editing a query replaces the previous one instead of updating it.
129
+
130
+ **Q10. What file formats does Clio support?**
131
+
132
+ - Clio supports all file formats that are compatible within Jaz. This includes:
133
+ - PDFs
134
+ - .xlsx
135
+ - JPG/JPEG
136
+ - PNG
137
+
138
+ **Q11. What languages does Clio support?**
139
+
140
+ - Both chat and voice queries support **all languages** available in Jaz.
141
+
142
+ ---