jaz-clio 3.1.0 → 3.3.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.
- package/assets/skills/api/SKILL.md +1 -1
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jobs/SKILL.md +14 -11
- package/assets/skills/jobs/references/bank-recon.md +1 -1
- package/assets/skills/jobs/references/document-collection.md +137 -0
- package/assets/skills/jobs/references/sg-tax/add-backs-guide.md +1 -1
- package/assets/skills/jobs/references/sg-tax/capital-allowances-guide.md +4 -4
- package/assets/skills/jobs/references/sg-tax/data-extraction.md +2 -2
- package/assets/skills/jobs/references/sg-tax/form-cs-fields.md +3 -3
- package/assets/skills/jobs/references/sg-tax/overview.md +5 -5
- package/assets/skills/jobs/references/sg-tax/wizard-workflow.md +3 -3
- package/assets/skills/transaction-recipes/SKILL.md +5 -5
- package/assets/skills/transaction-recipes/references/bank-match.md +5 -5
- package/dist/commands/calc.js +2 -58
- package/dist/commands/jobs.js +323 -16
- package/dist/index.js +0 -2
- package/dist/jobs/{audit-prep.js → audit-prep/blueprint.js} +2 -2
- package/dist/jobs/{bank-recon.js → bank-recon/blueprint.js} +2 -2
- package/dist/{calc/bank-match-utils.js → jobs/bank-recon/tools/match/match-utils.js} +1 -1
- package/dist/{calc/bank-match.js → jobs/bank-recon/tools/match/match.js} +3 -3
- package/dist/jobs/{credit-control.js → credit-control/blueprint.js} +2 -2
- package/dist/jobs/document-collection/blueprint.js +153 -0
- package/dist/jobs/document-collection/tools/ingest/classify.js +79 -0
- package/dist/jobs/document-collection/tools/ingest/cloud/dropbox.js +131 -0
- package/dist/jobs/document-collection/tools/ingest/cloud/gdrive.js +99 -0
- package/dist/jobs/document-collection/tools/ingest/cloud/index.js +68 -0
- package/dist/jobs/document-collection/tools/ingest/cloud/onedrive.js +165 -0
- package/dist/jobs/document-collection/tools/ingest/cloud/providers.js +71 -0
- package/dist/jobs/document-collection/tools/ingest/cloud/types.js +4 -0
- package/dist/jobs/document-collection/tools/ingest/cloud/utils.js +96 -0
- package/dist/jobs/document-collection/tools/ingest/cloud/zip.js +107 -0
- package/dist/jobs/document-collection/tools/ingest/format.js +86 -0
- package/dist/jobs/document-collection/tools/ingest/ingest.js +169 -0
- package/dist/jobs/document-collection/tools/ingest/magic-upload.js +142 -0
- package/dist/jobs/document-collection/tools/ingest/scanner.js +157 -0
- package/dist/jobs/{fa-review.js → fa-review/blueprint.js} +1 -1
- package/dist/jobs/{gst-vat.js → gst-vat/blueprint.js} +2 -2
- package/dist/jobs/{month-end.js → month-end/blueprint.js} +2 -2
- package/dist/jobs/{payment-run.js → payment-run/blueprint.js} +2 -2
- package/dist/jobs/{quarter-end.js → quarter-end/blueprint.js} +3 -3
- package/dist/jobs/statutory-filing/blueprint.js +135 -0
- package/dist/{tax/sg → jobs/statutory-filing/tools/sg-tax}/capital-allowances.js +2 -2
- package/dist/{tax/sg → jobs/statutory-filing/tools/sg-tax}/exemptions.js +1 -1
- package/dist/{tax/sg → jobs/statutory-filing/tools/sg-tax}/form-cs.js +2 -2
- package/dist/{tax → jobs/statutory-filing/tools/sg-tax}/format.js +1 -1
- package/dist/{tax → jobs/statutory-filing/tools/sg-tax}/types.js +1 -1
- package/dist/jobs/{supplier-recon.js → supplier-recon/blueprint.js} +2 -2
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/{year-end.js → year-end/blueprint.js} +3 -3
- package/package.json +14 -9
- package/dist/__tests__/amortization.test.js +0 -101
- package/dist/__tests__/asset-disposal.test.js +0 -249
- package/dist/__tests__/bank-match.test.js +0 -752
- package/dist/__tests__/blueprint.test.js +0 -72
- package/dist/__tests__/depreciation.test.js +0 -125
- package/dist/__tests__/ecl.test.js +0 -134
- package/dist/__tests__/fixed-deposit.test.js +0 -214
- package/dist/__tests__/fx-reval.test.js +0 -115
- package/dist/__tests__/jobs-audit-prep.test.js +0 -125
- package/dist/__tests__/jobs-bank-recon.test.js +0 -108
- package/dist/__tests__/jobs-credit-control.test.js +0 -98
- package/dist/__tests__/jobs-fa-review.test.js +0 -104
- package/dist/__tests__/jobs-gst-vat.test.js +0 -113
- package/dist/__tests__/jobs-month-end.test.js +0 -162
- package/dist/__tests__/jobs-payment-run.test.js +0 -106
- package/dist/__tests__/jobs-quarter-end.test.js +0 -155
- package/dist/__tests__/jobs-supplier-recon.test.js +0 -115
- package/dist/__tests__/jobs-validate.test.js +0 -181
- package/dist/__tests__/jobs-year-end.test.js +0 -149
- package/dist/__tests__/lease.test.js +0 -96
- package/dist/__tests__/loan.test.js +0 -80
- package/dist/__tests__/provision.test.js +0 -141
- package/dist/__tests__/tax-sg-capital-allowances.test.js +0 -389
- package/dist/__tests__/tax-sg-exemptions.test.js +0 -232
- package/dist/__tests__/tax-sg-form-cs.test.js +0 -687
- package/dist/__tests__/tax-validate.test.js +0 -208
- package/dist/__tests__/validate.test.js +0 -81
- package/dist/commands/tax.js +0 -195
- /package/dist/{tax/sg → jobs/statutory-filing/tools/sg-tax}/constants.js +0 -0
- /package/dist/{tax/sg → jobs/statutory-filing/tools/sg-tax}/format-sg.js +0 -0
- /package/dist/{tax → jobs/statutory-filing/tools/sg-tax}/validate.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: api
|
|
3
|
-
version: 3.
|
|
3
|
+
version: 3.3.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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: conversion
|
|
3
|
-
version: 3.
|
|
3
|
+
version: 3.3.0
|
|
4
4
|
description: Accounting data conversion skill — migrates customer data from Xero, QuickBooks, Sage, MYOB, and Excel exports to Jaz. Covers config, quick, and full conversion workflows, Excel parsing, CoA/contact/tax/items mapping, clearing accounts, TTB, and TB verification.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jobs
|
|
3
|
-
version: 3.
|
|
4
|
-
description:
|
|
3
|
+
version: 3.3.0
|
|
4
|
+
description: 12 accounting jobs for SMB bookkeepers and accountants — month-end, quarter-end, and year-end close playbooks plus 9 ad-hoc operational jobs (bank recon, document collection, GST/VAT filing, payment runs, credit control, supplier recon, audit prep, fixed asset review, statutory filing). Jobs can have paired tools as nested subcommands (e.g., `clio jobs bank-recon match`, `clio jobs document-collection ingest`, `clio jobs statutory-filing sg-cs`). Paired with an interactive CLI blueprint generator (clio jobs).
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For API payloads, load the jaz-api skill. For individual transaction patterns, load the transaction-recipes skill.
|
|
7
7
|
---
|
|
@@ -15,7 +15,8 @@ You are helping an **SMB accountant or bookkeeper** complete recurring accountin
|
|
|
15
15
|
## When to Use This Skill
|
|
16
16
|
|
|
17
17
|
- Closing the books for a month, quarter, or year
|
|
18
|
-
- Catching up on bank reconciliation
|
|
18
|
+
- Catching up on bank reconciliation (with automated pre-matching)
|
|
19
|
+
- Collecting and uploading client documents (invoices, bills, bank statements)
|
|
19
20
|
- Preparing GST/VAT returns for filing
|
|
20
21
|
- Running a payment batch to clear outstanding bills
|
|
21
22
|
- Chasing overdue invoices (credit control)
|
|
@@ -39,13 +40,15 @@ Period-close jobs build on each other. Quarter = month + extras. Year = quarter
|
|
|
39
40
|
|
|
40
41
|
| Job | CLI Command | Description |
|
|
41
42
|
|-----|-------------|-------------|
|
|
42
|
-
| **Bank Recon** | `clio jobs bank-recon` | Clear unreconciled items: match, categorize, resolve. |
|
|
43
|
+
| **Bank Recon** | `clio jobs bank-recon` | Clear unreconciled items: match, categorize, resolve. Paired tool: `clio jobs bank-recon match`. |
|
|
44
|
+
| **Document Collection** | `clio jobs document-collection` | Scan, classify, and upload client documents (invoices, bills, bank statements). Paired tool: `clio jobs document-collection ingest`. |
|
|
43
45
|
| **GST/VAT Filing** | `clio jobs gst-vat --period YYYY-QN` | Tax ledger review, discrepancy check, filing summary. |
|
|
44
46
|
| **Payment Run** | `clio jobs payment-run` | Select outstanding bills by due date, process payments. |
|
|
45
47
|
| **Credit Control** | `clio jobs credit-control` | AR aging review, overdue chase list, bad debt assessment. |
|
|
46
48
|
| **Supplier Recon** | `clio jobs supplier-recon` | AP vs supplier statement, identify mismatches. |
|
|
47
49
|
| **Audit Preparation** | `clio jobs audit-prep --period YYYY` | Compile reports, schedules, reconciliations for auditor/tax. |
|
|
48
50
|
| **FA Review** | `clio jobs fa-review` | Fixed asset register review, disposal/write-off processing. |
|
|
51
|
+
| **Statutory Filing** | `clio jobs statutory-filing` | Corporate income tax computation and filing. Paired tools: `clio jobs statutory-filing sg-cs`, `clio jobs statutory-filing sg-ca`. |
|
|
49
52
|
|
|
50
53
|
## How Jobs Work
|
|
51
54
|
|
|
@@ -114,7 +117,7 @@ Corporate income tax computation for Singapore-incorporated companies. The AI ag
|
|
|
114
117
|
```
|
|
115
118
|
┌──────────────────────────────┐ ┌───────────────────────────────┐
|
|
116
119
|
│ Reference Docs (this skill) │ │ CLI Computation Engine │
|
|
117
|
-
│ "The Wizard Script" │ │ clio
|
|
120
|
+
│ "The Wizard Script" │ │ clio jobs statutory-filing sg-cs [--json] │
|
|
118
121
|
│ - Guides AI agent │ │ - Pure deterministic math │
|
|
119
122
|
│ - API calls to make │ │ - Accepts structured JSON │
|
|
120
123
|
│ - Questions to ask user │ │ - Outputs workpaper + │
|
|
@@ -128,7 +131,7 @@ Corporate income tax computation for Singapore-incorporated companies. The AI ag
|
|
|
128
131
|
3. Classifies GL items
|
|
129
132
|
4. Asks user questions
|
|
130
133
|
5. Assembles input JSON
|
|
131
|
-
6. Runs clio
|
|
134
|
+
6. Runs clio jobs statutory-filing sg-cs
|
|
132
135
|
7. Presents results + filing guidance
|
|
133
136
|
```
|
|
134
137
|
|
|
@@ -136,15 +139,15 @@ Corporate income tax computation for Singapore-incorporated companies. The AI ag
|
|
|
136
139
|
|
|
137
140
|
```bash
|
|
138
141
|
# Full computation (JSON input from wizard or file)
|
|
139
|
-
clio
|
|
140
|
-
echo '{ "ya": 2026, ... }' | clio
|
|
142
|
+
clio jobs statutory-filing sg-cs --input tax-data.json [--json]
|
|
143
|
+
echo '{ "ya": 2026, ... }' | clio jobs statutory-filing sg-cs --json
|
|
141
144
|
|
|
142
145
|
# Simple mode (manual flags)
|
|
143
|
-
clio
|
|
146
|
+
clio jobs statutory-filing sg-cs --ya 2026 --revenue 500000 --profit 120000 --depreciation 15000 --exemption pte [--json]
|
|
144
147
|
|
|
145
148
|
# Capital allowance schedule (standalone)
|
|
146
|
-
clio
|
|
147
|
-
clio
|
|
149
|
+
clio jobs statutory-filing sg-ca --input assets.json [--json]
|
|
150
|
+
clio jobs statutory-filing sg-ca --ya 2026 --cost 50000 --category general --acquired 2024-06-15 [--json]
|
|
148
151
|
```
|
|
149
152
|
|
|
150
153
|
### Tax Reference Files
|
|
@@ -79,7 +79,7 @@ Work through each unreconciled item. There are four resolution paths.
|
|
|
79
79
|
|
|
80
80
|
The bank record matches an invoice payment, bill payment, or journal already in the books. This is the ideal case — the transaction exists, it just hasn't been linked to the bank record.
|
|
81
81
|
|
|
82
|
-
**For large volumes:** Use `clio
|
|
82
|
+
**For large volumes:** Use `clio jobs bank-recon match --input data.json --json` to auto-match bank records to transactions before manual review. The calculator finds 1:1, N:1, 1:N, and N:M matches with confidence scores. See the [bank-match reference](../../transaction-recipes/references/bank-match.md) for input format and algorithm details.
|
|
83
83
|
|
|
84
84
|
**How to find the match manually:** Search cashflow transactions for the same amount and approximate date:
|
|
85
85
|
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Document Collection
|
|
2
|
+
|
|
3
|
+
Scan, classify, and upload client documents (invoices, bills, bank statements) to Jaz via the Magic API endpoints.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Client sends a folder of PDFs (invoices, bills, receipts) for bulk upload
|
|
8
|
+
- Processing bank statement CSVs/OFX files for import
|
|
9
|
+
- Migrating documents from file dumps (Dropbox, shared folders, email attachments)
|
|
10
|
+
- Batch-uploading scanned documents during onboarding
|
|
11
|
+
|
|
12
|
+
## How It Works
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Local folder Jaz Magic API
|
|
16
|
+
┌───────────────┐ ┌──────────────────────────────────────────┐
|
|
17
|
+
│ invoices/ │──── PDF/JPG ──► POST /magic/createBusinessTransaction │
|
|
18
|
+
│ inv-001.pdf │ │ FromAttachment │
|
|
19
|
+
│ inv-002.jpg │ │ → OCR + extraction + contact match │
|
|
20
|
+
│ │ │ → Draft invoice created │
|
|
21
|
+
│ bills/ │──── PDF/JPG ──► POST /magic/createBusinessTransaction │
|
|
22
|
+
│ acme-jan.pdf│ │ FromAttachment │
|
|
23
|
+
│ │ │ → Draft bill created │
|
|
24
|
+
│ bank/ │──── CSV/OFX ──► POST /magic/importBankStatement │
|
|
25
|
+
│ dbs-jan.csv │ │ FromAttachment │
|
|
26
|
+
│ │ │ → Bank records imported │
|
|
27
|
+
└───────────────┘ └──────────────────────────────────────────┘
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Folder Classification
|
|
31
|
+
|
|
32
|
+
The tool auto-classifies documents by **folder name** (case-insensitive prefix match):
|
|
33
|
+
|
|
34
|
+
| Folder name pattern | Classification | API Endpoint |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `invoice*`, `sales*`, `ar*`, `receivable*`, `revenue*` | INVOICE | `createBusinessTransactionFromAttachment` |
|
|
37
|
+
| `bill*`, `purchase*`, `expense*`, `ap*`, `payable*`, `supplier*`, `vendor*`, `cost*` | BILL | `createBusinessTransactionFromAttachment` |
|
|
38
|
+
| `bank*`, `statement*`, `recon*` | BANK_STATEMENT | `importBankStatementFromAttachment` |
|
|
39
|
+
| (unknown) | UNKNOWN — skipped unless `--type` forced | — |
|
|
40
|
+
|
|
41
|
+
### File Extension Filters
|
|
42
|
+
|
|
43
|
+
- **Invoices/Bills**: `.pdf`, `.jpg`, `.jpeg`, `.png`
|
|
44
|
+
- **Bank Statements**: `.csv`, `.ofx`
|
|
45
|
+
- **Skipped** (with warning): `.xlsx`, `.xls`, `.doc`, `.docx`, `.txt`, `.zip`, `.rar`, `.7z`
|
|
46
|
+
|
|
47
|
+
### Traversal Rules
|
|
48
|
+
|
|
49
|
+
1. **Subfolders** — each classified by name; nested subfolders inherit from nearest classified ancestor
|
|
50
|
+
2. **Root-level files** — classified as UNKNOWN (no folder context)
|
|
51
|
+
3. **Max depth** — 10 levels (prevents runaway recursion)
|
|
52
|
+
4. **Hidden files/dirs** — skipped (anything starting with `.`)
|
|
53
|
+
|
|
54
|
+
## CLI Usage
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Dry-run (default) — scan + classify, no uploads
|
|
58
|
+
clio jobs document-collection ingest --source ./client-docs/ [--json]
|
|
59
|
+
|
|
60
|
+
# Execute — scan + classify + upload to Jaz
|
|
61
|
+
clio jobs document-collection ingest --source ./client-docs/ --execute \
|
|
62
|
+
--api-key <key> --api-url https://api.jaz.ai [--json]
|
|
63
|
+
|
|
64
|
+
# Force classification (skip auto-detect)
|
|
65
|
+
clio jobs document-collection ingest --source ./scans/ --type invoice --execute \
|
|
66
|
+
--api-key <key> --api-url https://api.jaz.ai
|
|
67
|
+
|
|
68
|
+
# Bank statements need --bank-account (CoA resourceId)
|
|
69
|
+
clio jobs document-collection ingest --source ./bank-csvs/ --execute \
|
|
70
|
+
--bank-account <resourceId> --api-key <key> --api-url https://api.jaz.ai
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Options
|
|
74
|
+
|
|
75
|
+
| Flag | Description |
|
|
76
|
+
|------|-------------|
|
|
77
|
+
| `--source <path>` | Local directory path (required) |
|
|
78
|
+
| `--type <type>` | Force all files to: `invoice`, `bill`, or `bank-statement` |
|
|
79
|
+
| `--execute` | Upload to Jaz API (without this flag, only scans/classifies) |
|
|
80
|
+
| `--api-key <key>` | Jaz Magic API key (required for `--execute`) |
|
|
81
|
+
| `--api-url <url>` | Jaz API base URL (required for `--execute`) |
|
|
82
|
+
| `--bank-account <id>` | Bank account CoA resourceId (required for bank statement uploads) |
|
|
83
|
+
| `--json` | Structured JSON output |
|
|
84
|
+
|
|
85
|
+
## Magic API Details
|
|
86
|
+
|
|
87
|
+
### Invoices & Bills
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
POST /api/v1/magic/createBusinessTransactionFromAttachment
|
|
91
|
+
Content-Type: multipart/form-data
|
|
92
|
+
Header: x-magic-api-key: <key>
|
|
93
|
+
|
|
94
|
+
Fields:
|
|
95
|
+
- sourceFile: PDF/JPG file blob (NOT "file")
|
|
96
|
+
- businessTransactionType: "INVOICE" or "BILL"
|
|
97
|
+
- sourceType: "FILE"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Key points:**
|
|
101
|
+
- Extraction is **asynchronous** — response confirms upload, extraction runs server-side
|
|
102
|
+
- `subscriptionFBPath` in response tracks extraction progress via Firebase
|
|
103
|
+
- Response maps: `INVOICE` → `SALE`, `BILL` → `PURCHASE`
|
|
104
|
+
- Jaz Magic extracts: line items, contact, CoA mapping, tax, dates, currency
|
|
105
|
+
|
|
106
|
+
### Bank Statements
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
POST /api/v1/magic/importBankStatementFromAttachment
|
|
110
|
+
Content-Type: multipart/form-data
|
|
111
|
+
Header: x-magic-api-key: <key>
|
|
112
|
+
|
|
113
|
+
Fields:
|
|
114
|
+
- sourceFile: CSV/OFX file (NOT "file")
|
|
115
|
+
- accountResourceId: bank account CoA resourceId
|
|
116
|
+
- businessTransactionType: "BANK_STATEMENT"
|
|
117
|
+
- sourceType: "FILE"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**CSV format:** `Date,Description,Debit,Credit`
|
|
121
|
+
|
|
122
|
+
## Phases (Blueprint)
|
|
123
|
+
|
|
124
|
+
When run without `ingest` subcommand, produces a 6-phase blueprint:
|
|
125
|
+
|
|
126
|
+
1. **Intake** — Identify source, validate access
|
|
127
|
+
2. **Scan** — Traverse directory tree, list all files
|
|
128
|
+
3. **Classify** — Auto-classify by folder name
|
|
129
|
+
4. **Review** — Present plan for user approval (dry-run)
|
|
130
|
+
5. **Upload** — Upload each file to correct Magic API endpoint
|
|
131
|
+
6. **Verify** — Check extraction results, flag failures
|
|
132
|
+
|
|
133
|
+
## Relationship to Other Skills
|
|
134
|
+
|
|
135
|
+
- **api skill** — Field names, auth headers, error codes for Magic endpoints
|
|
136
|
+
- **bank-recon job** — After bank statement import, use bank-recon to match and reconcile
|
|
137
|
+
- **transaction-recipes** — After Magic creates draft transactions, use recipes for complex accounting patterns
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
How to identify, classify, and quantify non-deductible expenses for the Singapore CIT computation. Each category maps to a field in `SgFormCsInput.addBacks`. For each item: what it is, why it is non-deductible, where to find it in Jaz, and what questions to ask the user.
|
|
4
4
|
|
|
5
|
-
**CLI:** `clio
|
|
5
|
+
**CLI:** `clio jobs statutory-filing sg-cs --input tax-data.json --json`
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
How to classify fixed assets for Singapore capital allowance claims. Capital allowances (CA) are the tax equivalent of accounting depreciation — they allow the cost of qualifying capital assets to be deducted over time for tax purposes. Accounting depreciation is always added back; CA is claimed separately.
|
|
4
4
|
|
|
5
|
-
**CLI:** `clio
|
|
6
|
-
**CLI:** `clio
|
|
5
|
+
**CLI:** `clio jobs statutory-filing sg-ca --input assets.json --json` (per-asset CA schedule)
|
|
6
|
+
**CLI:** `clio jobs statutory-filing sg-cs --input tax-data.json --json` (full tax computation with CA)
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -286,7 +286,7 @@ For each qualifying asset:
|
|
|
286
286
|
### Step 4: Run the CA schedule
|
|
287
287
|
|
|
288
288
|
```bash
|
|
289
|
-
clio
|
|
289
|
+
clio jobs statutory-filing sg-ca --input assets.json --json
|
|
290
290
|
```
|
|
291
291
|
|
|
292
292
|
The output provides a per-asset schedule with:
|
|
@@ -338,6 +338,6 @@ If the company has unabsorbed (unclaimed) CA from prior YAs, these are carried f
|
|
|
338
338
|
|
|
339
339
|
**Ask about S-plates early.** If the company has motor vehicles, the S-plate vs Q-plate question is the first thing to resolve. It affects both the CA schedule (no CA for S-plate) and the add-backs (`addBacks.privateCar` for all S-plate expenses).
|
|
340
340
|
|
|
341
|
-
**The CLI is your calculation engine.** Do not manually compute CA schedules. Feed the asset list into `clio
|
|
341
|
+
**The CLI is your calculation engine.** Do not manually compute CA schedules. Feed the asset list into `clio jobs statutory-filing sg-ca` and use the output. It handles: multi-year spreading, low-value cap enforcement, IP write-off period election, and prior-year claim tracking.
|
|
342
342
|
|
|
343
343
|
**For first-time filers:** All assets acquired since incorporation are potentially claimable. Go through the entire FA register and build the complete CA schedule. For subsequent years, only new acquisitions and continuing multi-year claims are needed.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Data Extraction for SG CIT Computation
|
|
2
2
|
|
|
3
|
-
Step-by-step guide to extracting the data you need from the Jaz API to build the `SgFormCsInput` JSON for `clio
|
|
3
|
+
Step-by-step guide to extracting the data you need from the Jaz API to build the `SgFormCsInput` JSON for `clio jobs statutory-filing sg-cs`. Each phase pulls specific data and maps it to input fields.
|
|
4
4
|
|
|
5
|
-
**CLI:** `clio
|
|
5
|
+
**CLI:** `clio jobs statutory-filing sg-cs --input tax-data.json --json`
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Form C-S / C-S Lite — Field Mapping
|
|
2
2
|
|
|
3
|
-
Complete mapping of every field on the IRAS Form C-S and Form C-S Lite returns to the `clio
|
|
3
|
+
Complete mapping of every field on the IRAS Form C-S and Form C-S Lite returns to the `clio jobs statutory-filing sg-cs` CLI output. Use this reference when populating the IRAS myTax Portal or verifying the computation output.
|
|
4
4
|
|
|
5
|
-
**CLI:** `clio
|
|
5
|
+
**CLI:** `clio jobs statutory-filing sg-cs --input tax-data.json --json`
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -72,7 +72,7 @@ The ultra-simplified return for companies with revenue of $200,000 or below. Onl
|
|
|
72
72
|
| **5** | Tax Payable | Dollar amount | `grossTax` | `(chargeableIncome - exemptAmount) x 17%` |
|
|
73
73
|
| **6** | Net Tax Payable (after rebate) | Dollar amount | `netTaxPayable` | `grossTax - citRebate` |
|
|
74
74
|
|
|
75
|
-
**C-S Lite simplification:** The taxpayer still performs the full computation (add-backs, CA, losses, donations) to arrive at chargeable income. They just don't need to report the intermediate steps on the form itself. The `clio
|
|
75
|
+
**C-S Lite simplification:** The taxpayer still performs the full computation (add-backs, CA, losses, donations) to arrive at chargeable income. They just don't need to report the intermediate steps on the form itself. The `clio jobs statutory-filing sg-cs` engine computes everything regardless — the `formType` field in the output indicates which form applies.
|
|
76
76
|
|
|
77
77
|
---
|
|
78
78
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Foundational context for Singapore corporate income tax (CIT). Read this first before working on any CIT computation, Form C-S preparation, or tax adjustment classification.
|
|
4
4
|
|
|
5
|
-
**CLI:** `clio
|
|
5
|
+
**CLI:** `clio jobs statutory-filing sg-cs --help`
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -66,7 +66,7 @@ An even simpler version for micro businesses.
|
|
|
66
66
|
|
|
67
67
|
### Form C (Full)
|
|
68
68
|
|
|
69
|
-
For companies that do not qualify for C-S or C-S Lite. Requires detailed financial statements, tax computation, and supporting schedules. Not covered by the `clio
|
|
69
|
+
For companies that do not qualify for C-S or C-S Lite. Requires detailed financial statements, tax computation, and supporting schedules. Not covered by the `clio jobs statutory-filing sg-cs` command — use a tax agent.
|
|
70
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
@@ -128,7 +128,7 @@ For all other companies (not on SUTE).
|
|
|
128
128
|
| Next $190,000 | $10,001 to $200,000 | 50% | Up to $16,150 |
|
|
129
129
|
| **Maximum saving** | | | **$17,425 per YA** |
|
|
130
130
|
|
|
131
|
-
**Note:** PTE applies automatically unless SUTE is elected. For the `clio
|
|
131
|
+
**Note:** PTE applies automatically unless SUTE is elected. For the `clio jobs statutory-filing sg-cs` input, set `exemptionType` to `'sute'`, `'pte'`, or `'none'`.
|
|
132
132
|
|
|
133
133
|
---
|
|
134
134
|
|
|
@@ -142,7 +142,7 @@ IRAS occasionally grants a CIT rebate (percentage discount on gross tax, subject
|
|
|
142
142
|
| 2025 | 50% | $40,000 |
|
|
143
143
|
| 2026 | 40% | $40,000 |
|
|
144
144
|
|
|
145
|
-
The `clio
|
|
145
|
+
The `clio jobs statutory-filing sg-cs` engine applies the correct rebate for the given YA automatically. If a YA has no rebate in the schedule, the rebate is zero.
|
|
146
146
|
|
|
147
147
|
---
|
|
148
148
|
|
|
@@ -202,6 +202,6 @@ Accounting Profit (from P&L)
|
|
|
202
202
|
|
|
203
203
|
**Accounting depreciation is ALWAYS added back.** This is the single most common add-back. Depreciation per the books is non-deductible — capital allowances (tax depreciation) replace it. No exceptions.
|
|
204
204
|
|
|
205
|
-
**Keep it stateless.** The `clio
|
|
205
|
+
**Keep it stateless.** The `clio jobs statutory-filing sg-cs` engine is a pure computation tool. It does not store or retrieve prior-year data. The agent must provide carry-forward balances (unabsorbed losses, unabsorbed CA, unabsorbed donations) from the user or prior-year workpapers.
|
|
206
206
|
|
|
207
207
|
**Common SMB profile:** Revenue under $5M, standard trade income, no foreign tax credits, no group relief. This describes the vast majority of companies that file Form C-S.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Step-by-step procedure an AI agent follows to produce a complete Form C-S corporate income tax computation for a Singapore company. The wizard collects data through four phases — context, extraction, classification, and compute — ultimately assembling a `SgFormCsInput` JSON and running the computation engine.
|
|
4
4
|
|
|
5
|
-
**CLI:** `clio
|
|
5
|
+
**CLI:** `clio jobs statutory-filing sg-cs --json`
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -201,7 +201,7 @@ For each asset, record: `description`, `cost`, `acquisitionDate`, `category`, `p
|
|
|
201
201
|
|
|
202
202
|
**Maps to:** `capitalAllowances.currentYearClaim` (compute via `clio calc` or the CA schedule engine), `capitalAllowances.assets`
|
|
203
203
|
|
|
204
|
-
**Calculator:** `clio
|
|
204
|
+
**Calculator:** `clio jobs statutory-filing sg-ca --json` computes the per-asset CA schedule.
|
|
205
205
|
|
|
206
206
|
### Step 18: Enhanced deductions
|
|
207
207
|
|
|
@@ -305,7 +305,7 @@ Compile all gathered data into the input structure. Example:
|
|
|
305
305
|
|
|
306
306
|
**CLI:**
|
|
307
307
|
```bash
|
|
308
|
-
clio
|
|
308
|
+
clio jobs statutory-filing sg-cs --json
|
|
309
309
|
```
|
|
310
310
|
|
|
311
311
|
Or call `computeFormCs(input)` directly if running programmatically.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: transaction-recipes
|
|
3
|
-
version: 3.
|
|
4
|
-
description: 16 IFRS-compliant recipes for complex multi-step accounting in Jaz — prepaid amortization, deferred revenue, loan schedules, IFRS 16 leases, hire purchase, fixed deposits, asset disposal, FX revaluation, ECL provisioning, IAS 37 provisions, dividends, intercompany, and capital WIP. Each recipe includes journal entries, capsule structure, and verification steps. Paired with
|
|
3
|
+
version: 3.3.0
|
|
4
|
+
description: 16 IFRS-compliant recipes for complex multi-step accounting in Jaz — prepaid amortization, deferred revenue, loan schedules, IFRS 16 leases, hire purchase, fixed deposits, asset disposal, FX revaluation, ECL provisioning, IAS 37 provisions, dividends, intercompany, and capital WIP. Each recipe includes journal entries, capsule structure, and verification steps. Paired with 10 financial calculators that produce execution-ready blueprints with workings.
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For API payloads, load the jaz-api skill alongside this one.
|
|
7
7
|
---
|
|
@@ -119,7 +119,7 @@ Each recipe includes: scenario description, accounts involved, journal entries,
|
|
|
119
119
|
|
|
120
120
|
### Utility — Reconciliation
|
|
121
121
|
|
|
122
|
-
17. **[Bank Reconciliation Matcher](references/bank-match.md)** — 5-phase cascade algorithm matching bank records to cashflow transactions. Finds 1:1, N:1, 1:N, and N:M matches with confidence scores. *Paired
|
|
122
|
+
17. **[Bank Reconciliation Matcher](references/bank-match.md)** — 5-phase cascade algorithm matching bank records to cashflow transactions. Finds 1:1, N:1, 1:N, and N:M matches with confidence scores. *Paired job tool: `clio jobs bank-recon match`*
|
|
123
123
|
|
|
124
124
|
## How to Use These Recipes
|
|
125
125
|
|
|
@@ -134,7 +134,7 @@ Each recipe includes: scenario description, accounts involved, journal entries,
|
|
|
134
134
|
|
|
135
135
|
## Financial Calculators (CLI)
|
|
136
136
|
|
|
137
|
-
The `jaz-clio` CLI includes
|
|
137
|
+
The `jaz-clio` CLI includes 10 IFRS-compliant financial calculators. Each produces a formatted schedule + per-period journal entries + human-readable workings. Use `--json` for structured output with a complete **blueprint** — capsule type/name, tags, custom fields, workings (capsuleDescription), and every step with action type, date, accounts, and amounts.
|
|
138
138
|
|
|
139
139
|
All calculators support `--currency <code>` and `--json`.
|
|
140
140
|
|
|
@@ -181,7 +181,7 @@ clio calc provision --amount 500000 --rate 4 --term 60 [--start-date 2025-01-01]
|
|
|
181
181
|
# ── Reconciliation Calculator ─────────────────────────────────
|
|
182
182
|
|
|
183
183
|
# Bank reconciliation matcher — 5-phase cascade (1:1, N:1, 1:N, N:M)
|
|
184
|
-
clio
|
|
184
|
+
clio jobs bank-recon match --input bank-data.json [--tolerance 0.01] [--date-window 14] [--max-group 5] [--json]
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
### Blueprint Output (`--json`)
|
|
@@ -71,16 +71,16 @@ For remaining unmatched items, groups bank records and transactions by contact n
|
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
73
|
# From file
|
|
74
|
-
clio
|
|
74
|
+
clio jobs bank-recon match --input bank-data.json [--json]
|
|
75
75
|
|
|
76
76
|
# From stdin (pipe from API output)
|
|
77
|
-
cat bank-data.json | clio
|
|
77
|
+
cat bank-data.json | clio jobs bank-recon match --json
|
|
78
78
|
|
|
79
79
|
# With options
|
|
80
|
-
clio
|
|
80
|
+
clio jobs bank-recon match --input data.json --tolerance 0.05 --date-window 7 --max-group 3 --currency SGD --json
|
|
81
81
|
|
|
82
82
|
# Analysis mode — all possible matches per record
|
|
83
|
-
clio
|
|
83
|
+
clio jobs bank-recon match --input data.json --find-all --json
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
### Options
|
|
@@ -283,7 +283,7 @@ When bank records and transactions are in different currencies, the calculator a
|
|
|
283
283
|
This calculator is designed to work as a pre-matching step in the `clio jobs bank-recon` workflow:
|
|
284
284
|
|
|
285
285
|
1. **Pull data:** Fetch unreconciled bank records + cashflow transactions from Jaz API
|
|
286
|
-
2. **Run matcher:** `clio
|
|
286
|
+
2. **Run matcher:** `clio jobs bank-recon match --input data.json --json`
|
|
287
287
|
3. **Review matches:** High/exact confidence matches can be auto-reconciled; medium/low need manual review
|
|
288
288
|
4. **Resolve unmatched:** Use Path B/C/D from the bank recon job for remaining items
|
|
289
289
|
|
package/dist/commands/calc.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { readFileSync } from 'node:fs';
|
|
3
2
|
import { calculateLoan } from '../calc/loan.js';
|
|
4
3
|
import { calculateLease } from '../calc/lease.js';
|
|
5
4
|
import { calculateDepreciation } from '../calc/depreciation.js';
|
|
@@ -9,9 +8,8 @@ import { calculateEcl } from '../calc/ecl.js';
|
|
|
9
8
|
import { calculateProvision } from '../calc/provision.js';
|
|
10
9
|
import { calculateFixedDeposit } from '../calc/fixed-deposit.js';
|
|
11
10
|
import { calculateAssetDisposal } from '../calc/asset-disposal.js';
|
|
12
|
-
import { matchBankRecords } from '../calc/bank-match.js';
|
|
13
11
|
import { printResult, printJson } from '../calc/format.js';
|
|
14
|
-
import { CalcValidationError
|
|
12
|
+
import { CalcValidationError } from '../calc/validate.js';
|
|
15
13
|
/** Wrap calc action with validation error handling. */
|
|
16
14
|
function calcAction(fn) {
|
|
17
15
|
return (opts) => {
|
|
@@ -30,7 +28,7 @@ function calcAction(fn) {
|
|
|
30
28
|
export function registerCalcCommand(program) {
|
|
31
29
|
const calc = program
|
|
32
30
|
.command('calc')
|
|
33
|
-
.description('Financial calculators — loan, lease, depreciation, prepaid-expense, deferred-revenue, fx-reval, ecl, provision, fixed-deposit, asset-disposal
|
|
31
|
+
.description('Financial calculators — loan, lease, depreciation, prepaid-expense, deferred-revenue, fx-reval, ecl, provision, fixed-deposit, asset-disposal');
|
|
34
32
|
// ── clio calc loan ──────────────────────────────────────────────
|
|
35
33
|
calc
|
|
36
34
|
.command('loan')
|
|
@@ -251,58 +249,4 @@ export function registerCalcCommand(program) {
|
|
|
251
249
|
});
|
|
252
250
|
opts.json ? printJson(result) : printResult(result);
|
|
253
251
|
}));
|
|
254
|
-
// ── clio calc bank-match ──────────────────────────────────────
|
|
255
|
-
calc
|
|
256
|
-
.command('bank-match')
|
|
257
|
-
.description('Bank reconciliation matcher — finds 1:1, N:1, 1:N, and N:M matches between bank records and transactions')
|
|
258
|
-
.option('--input <file>', 'JSON file with bankRecords + transactions (or pipe via stdin)')
|
|
259
|
-
.option('--tolerance <amount>', 'Amount tolerance in functional currency (default: 0.01)', parseFloat)
|
|
260
|
-
.option('--date-window <days>', 'Max days apart for matching (default: 14)', parseInt)
|
|
261
|
-
.option('--max-group <k>', 'Max subset size for N:1/1:N matching (default: 5, max: 10)', parseInt)
|
|
262
|
-
.option('--currency <code>', 'Functional/reporting currency (e.g. SGD)')
|
|
263
|
-
.option('--find-all', 'Return all possible matches per record (analysis mode)')
|
|
264
|
-
.option('--json', 'Output as JSON')
|
|
265
|
-
.action(calcAction((opts) => {
|
|
266
|
-
let rawJson;
|
|
267
|
-
if (opts.input) {
|
|
268
|
-
try {
|
|
269
|
-
rawJson = readFileSync(opts.input, 'utf-8');
|
|
270
|
-
}
|
|
271
|
-
catch {
|
|
272
|
-
throw new CalcValidationError(`Cannot read file: ${opts.input}`);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
else if (!process.stdin.isTTY) {
|
|
276
|
-
// Read from stdin (piped input)
|
|
277
|
-
rawJson = readFileSync(0, 'utf-8');
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
throw new CalcValidationError('No input provided. Use --input <file> or pipe JSON via stdin:\n' +
|
|
281
|
-
' clio calc bank-match --input match-data.json\n' +
|
|
282
|
-
' cat data.json | clio calc bank-match --json');
|
|
283
|
-
}
|
|
284
|
-
let parsed;
|
|
285
|
-
try {
|
|
286
|
-
parsed = JSON.parse(rawJson);
|
|
287
|
-
}
|
|
288
|
-
catch {
|
|
289
|
-
throw new CalcValidationError('Invalid JSON input — check file format');
|
|
290
|
-
}
|
|
291
|
-
const input = validateBankMatchInput(parsed);
|
|
292
|
-
// Apply CLI option overrides
|
|
293
|
-
if (!input.options)
|
|
294
|
-
input.options = {};
|
|
295
|
-
if (opts.tolerance !== undefined)
|
|
296
|
-
input.options.tolerance = opts.tolerance;
|
|
297
|
-
if (opts.dateWindow !== undefined)
|
|
298
|
-
input.options.dateWindowDays = opts.dateWindow;
|
|
299
|
-
if (opts.maxGroup !== undefined)
|
|
300
|
-
input.options.maxGroupSize = opts.maxGroup;
|
|
301
|
-
if (opts.currency)
|
|
302
|
-
input.options.currency = opts.currency;
|
|
303
|
-
if (opts.findAll)
|
|
304
|
-
input.options.findAll = true;
|
|
305
|
-
const result = matchBankRecords(input);
|
|
306
|
-
opts.json ? printJson(result) : printResult(result);
|
|
307
|
-
}));
|
|
308
252
|
}
|