jaz-clio 5.4.5 → 5.4.7

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 (42) hide show
  1. package/assets/skills/api/SKILL.md +1 -1
  2. package/assets/skills/cli/SKILL.md +2 -2
  3. package/assets/skills/cli/references/command-catalog.md +0 -1
  4. package/assets/skills/conversion/SKILL.md +4 -2
  5. package/assets/skills/jobs/SKILL.md +4 -2
  6. package/assets/skills/jobs/references/audit-prep.md +153 -221
  7. package/assets/skills/jobs/references/bank-recon.md +165 -166
  8. package/assets/skills/jobs/references/building-blocks.md +112 -96
  9. package/assets/skills/jobs/references/credit-control.md +126 -203
  10. package/assets/skills/jobs/references/document-collection.md +142 -180
  11. package/assets/skills/jobs/references/fa-review.md +98 -215
  12. package/assets/skills/jobs/references/gst-vat-filing.md +137 -183
  13. package/assets/skills/jobs/references/month-end-close.md +165 -213
  14. package/assets/skills/jobs/references/payment-run.md +99 -179
  15. package/assets/skills/jobs/references/quarter-end-close.md +106 -202
  16. package/assets/skills/jobs/references/supplier-recon.md +79 -267
  17. package/assets/skills/jobs/references/year-end-close.md +161 -261
  18. package/assets/skills/practice/SKILL.md +1 -1
  19. package/assets/skills/practice/references/annual-statutory.md +17 -8
  20. package/assets/skills/practice/references/client-md-schema.md +2 -2
  21. package/assets/skills/practice/references/monthly-close.md +16 -12
  22. package/assets/skills/practice/references/troubleshooting.md +1 -1
  23. package/assets/skills/transaction-recipes/SKILL.md +5 -3
  24. package/assets/skills/transaction-recipes/references/accrued-expenses.md +97 -112
  25. package/assets/skills/transaction-recipes/references/asset-disposal.md +144 -117
  26. package/assets/skills/transaction-recipes/references/bad-debt-provision.md +146 -93
  27. package/assets/skills/transaction-recipes/references/bank-loan.md +111 -103
  28. package/assets/skills/transaction-recipes/references/building-blocks.md +128 -7
  29. package/assets/skills/transaction-recipes/references/capital-wip.md +183 -125
  30. package/assets/skills/transaction-recipes/references/declining-balance.md +96 -143
  31. package/assets/skills/transaction-recipes/references/deferred-revenue.md +102 -82
  32. package/assets/skills/transaction-recipes/references/dividend.md +113 -72
  33. package/assets/skills/transaction-recipes/references/employee-accruals.md +126 -102
  34. package/assets/skills/transaction-recipes/references/fixed-deposit.md +102 -117
  35. package/assets/skills/transaction-recipes/references/fx-revaluation.md +96 -86
  36. package/assets/skills/transaction-recipes/references/hire-purchase.md +76 -151
  37. package/assets/skills/transaction-recipes/references/ifrs16-lease.md +127 -139
  38. package/assets/skills/transaction-recipes/references/intercompany.md +178 -127
  39. package/assets/skills/transaction-recipes/references/prepaid-amortization.md +93 -81
  40. package/assets/skills/transaction-recipes/references/provisions.md +109 -92
  41. package/cli.mjs +424 -469
  42. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-api
3
- version: 5.4.5
3
+ version: 5.4.7
4
4
  description: >-
5
5
  Use this skill whenever you call, debug, or review code that touches the Jaz
6
6
  REST API. Covers field names, response shapes, 141 production gotchas, error
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-cli
3
- version: 5.4.5
3
+ version: 5.4.7
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,
@@ -260,7 +260,7 @@ Sending `lineItems[]` to the FLAT endpoint silently ignores them and creates a $
260
260
 
261
261
  **Calculators**: `calc` (loan, lease, depreciation, prepaid-expense, deferred-revenue, fx-reval, ecl, provision, fixed-deposit, asset-disposal, accrued-expense, leave-accrual, dividend)
262
262
 
263
- **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, bank-file, outstanding, ingest, sg-cs, sg-ca)
263
+ **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)
264
264
 
265
265
  **Organization**: `org` (info), `org-users`, `auth`
266
266
 
@@ -437,7 +437,6 @@ Blueprints are offline (no auth). Tools require auth.
437
437
  | `match` | Tool | `--input` (bank records + transactions JSON) |
438
438
  | `gst-vat` | Blueprint | `--period`, `--jurisdiction` |
439
439
  | `payment-run` | Blueprint | `--date` |
440
- | `bank-file` | Tool | `--format`, `--input` (generates GIRO/FAST/PayNow file) |
441
440
  | `outstanding` | Tool | `--contact`, `--limit` (group outstanding bills) |
442
441
  | `credit-control` | Blueprint | `--aging-days` |
443
442
  | `supplier-recon` | Blueprint | `--contact` |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-conversion
3
- version: 5.4.5
3
+ version: 5.4.7
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:
@@ -17,7 +17,9 @@ description: >-
17
17
 
18
18
  You are performing an **accounting data conversion** — migrating a customer's financial data from their previous accounting software (Xero, QuickBooks, Sage, MYOB, or Excel-based systems) into Jaz.
19
19
 
20
- **This skill provides conversion domain knowledge. For API details (field names, endpoints, gotchas), load the `jaz-api` skill alongside this one.**
20
+ > **Jaz-native, not generic.** The clearing-account pattern, the CoA-bulk-upsert all-or-nothing semantics, the `currencyCode`-string-silently-ignored-on-invoices gotcha, the `bulk_upsert_invoices` PARTIAL_SUCCESS path — every rule in this skill is an opinion shaped by Jaz's specific API behavior, not by generic migration theory. Source-system mapping (Xero, QB, Sage) is included only as input parsing; everything downstream is Jaz-shaped.
21
+
22
+ **This skill provides Jaz-contextual conversion domain knowledge. For API details (field names, endpoints, gotchas), load the `jaz-api` skill alongside this one.**
21
23
 
22
24
  **Engagement context:** when this skill is invoked from inside a `jaz-practice` client folder, the onboarding flow (`practice_onboard_client`) loads CLIENT.md to capture FY-end, GST scheme, banking, and the prior firm's name — then routes to this skill for the actual data move. After conversion completes (Step 7 verification), the practitioner closes the onboarding engagement and the recurring engagement cadence (monthly-close / quarterly-gst / annual-statutory) takes over. See `jaz-practice/references/onboarding.md` for the complete sequence.
23
25
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-jobs
3
- version: 5.4.5
3
+ version: 5.4.7
4
4
  description: >-
5
5
  Use this skill for recurring accounting workflows — month/quarter/year-end
6
6
  close, bank reconciliation, GST/VAT filing, payment runs, credit control,
@@ -16,7 +16,9 @@ compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent t
16
16
 
17
17
  You are helping an **SMB accountant or bookkeeper** complete recurring accounting tasks in Jaz — period-end closes, bank reconciliation, tax filing, payment processing, and operational reviews. These are the real jobs that keep the books accurate and the business compliant.
18
18
 
19
- **Jobs combine recipes, calculators, and API calls into complete business processes.** If recipes are ingredients, jobs are the meal.
19
+ > **Jaz-native, not generic.** Every job in this skill names specific Jaz MCP tools (`search_invoices`, `quick_reconcile`, `bulk_finalize_drafts`, `generate_*_blueprint`, `download_export`), Jaz reconciliation modes, and Jaz capsule patterns. It is NOT an interchangeable accounting workflow reference; it is the operating manual for running these processes through the Jaz API surface. When the playbook says "match bank entries", it means call `clio jobs bank-recon match` (the 5-phase cascade matcher built into the CLI), not "use any matching algorithm".
20
+
21
+ **Jobs combine recipes, calculators, and API calls into complete business processes.** If recipes are ingredients, jobs are the meal. Within a practitioner engagement (`jaz-practice` skill), the engagement-type playbook (`practice/references/<type>.md`) is the canonical end-to-end orchestration — the references in this skill describe the building-block jobs the engagement playbook invokes.
20
22
 
21
23
  ## When to Use This Skill
22
24
 
@@ -1,319 +1,251 @@
1
1
  # Audit Preparation
2
2
 
3
- Compile the complete report pack, supporting schedules, and reconciliations that an auditor or tax agent needs. For most SMBs, this is an annual exercise — either for the statutory audit (if required) or for the annual tax filing with IRAS (SG) or BIR (PH).
4
-
5
- **CLI:** `clio jobs audit-prep --period 2025 [--json]`
3
+ > Compile the report pack + supporting schedules + reconciliations an auditor or tax agent needs to issue an opinion or file a return. Driver tool: `generate_audit_prep_blueprint`.
4
+
5
+ ## Tools, recipes, calculators this job uses
6
+
7
+ ### MCP tools — financial statements
8
+ - **`generate_audit_prep_blueprint`** — used in step 1: emit the phased deliverables list for the period.
9
+ - **`generate_trial_balance(period_end: <FY-end>)`** — step 2: master reconciliation. Every other report ties back to this.
10
+ - **`generate_balance_sheet(period_end: <FY-end>)`** — step 3.
11
+ - **`generate_profit_and_loss(period_start: <FY-start>, period_end: <FY-end>)`** — step 3.
12
+ - **`generate_cashflow(period_start, period_end)`** — step 4.
13
+ - **`generate_equity_movement(period_start, period_end)`** — step 4.
14
+ - **`generate_general_ledger(period_start, period_end, groupBy: 'ACCOUNT')`** — step 5: the auditor's primary working document.
15
+
16
+ ### MCP tools — supporting schedules
17
+ - **`generate_aged_ar(period_end)` / `generate_aged_ap(period_end)`** — step 6.
18
+ - **`generate_bank_recon_summary(period_end)` / `generate_bank_recon_details(period_end)`** — step 7. NON-NEGOTIABLE deliverable.
19
+ - **`generate_bank_balance_summary(period_end)`** — step 7. Cross-reference to bank confirmation letters.
20
+ - **`generate_fa_summary(period_end)` / `generate_fa_recon_summary(period_start, period_end)`** — step 8.
21
+ - **`generate_vat_ledger(period_start, period_end)`** — step 9. Annual total ties to sum of quarterly F5 returns.
22
+
23
+ ### MCP tools — XLSX deliverables
24
+ - **`download_export(exportType: '<type>', startDate, endDate)`** — step 10: pre-signed XLSX URL (~5 min expiry). Per `jaz-api/SKILL.md` rule (data-exports), supported types include `trial-balance`, `profit-and-loss`, `balance-sheet`, `general-ledger`, `ar-report`, `ap-report`, `cashflow`, `analysis-anomalous-bills`, `analysis-anomalous-invoices`, `analysis-cashflow-anomalies`, `analysis-gl-journal-audit`, `analysis-exchange-rate-audit`, `analysis-receivables-customer-risk`, `analysis-cash-expense-health`. The audit-analyses are essential pre-emptive flags for the auditor.
25
+
26
+ ### MCP tools — completeness gates
27
+ - **`search_journals(filter: {status: {eq: 'DRAFT'}, valueDate: {between: [<FY-start>, <FY-end>]}})`** — step 12: must return zero rows before pack hand-off.
28
+ - **`search_invoices(filter: {status: {eq: 'DRAFT'}, valueDate: {between: [<FY-start>, <FY-end>]}})`** — step 12: same gate, sales side.
29
+ - **`search_bills(filter: {status: {eq: 'DRAFT'}, valueDate: {between: [<FY-start>, <FY-end>]}})`** — step 12: same gate, purchases side.
30
+ - **`bulk_finalize_drafts({kind: 'journal', resourceIds: [...]})`** — step 12 fallback: clear residual drafts before pack hand-off.
31
+ - **`update_account(resourceId: <CoA root>, lockDate: <FY-end>)`** — step 12 final: lock the period to prevent backdated entries during fieldwork.
32
+
33
+ ### Calculators (cross-check schedules — no API key needed)
34
+ - **`clio calc loan --principal --rate --term --start-date --json`** — step 8: independent loan amortization for the loan schedule.
35
+ - **`clio calc lease --payment --term --rate --json`** — step 8: IFRS 16 ROU + lease liability schedule.
36
+ - **`clio calc ecl --receivables <json> --json`** — step 8: ECL provision matrix per IFRS 9.
37
+ - **`clio calc fixed-deposit --principal --rate --term --json`** — step 8: FD interest accrual.
38
+ - **`clio calc depreciation --cost --salvage --life --method --json`** — step 8: per-asset depreciation cross-check vs FA register.
39
+
40
+ ### Cross-references
41
+ - Within an engagement: invoked from `practice/references/annual-statutory.md` step 5 (audit-prep is the bridge between year-end close and statutory filing). Practice playbook reads `CLIENT.statutory_audit_required`, `CLIENT.tax_jurisdiction` (`SG` | `PH`), and `CLIENT.fy_end` to scope the deliverables.
42
+ - Sibling jobs: `year-end-close.md` (must complete BEFORE this job — audit-prep assumes books are closed), `statutory-filing.md` (the SG Form C-S / PH ITR step that consumes the pack this job produces — see audit step 13 cross-reference).
43
+ - API rules: `jaz-api/SKILL.md` rule 36 (`endDate` not `startDate` for AR/AP point-in-time reports), rule 38 (pagination for `general-ledger`), rule 52 (response dates are epoch ms).
6
44
 
7
45
  ---
8
46
 
9
- ## Who Needs This
47
+ ## Who needs this
10
48
 
11
49
  | Situation | SG | PH |
12
50
  |-----------|----|----|
13
- | **Statutory audit required** | Companies with revenue > S$10M, assets > S$10M, or employees > 50 | All stock corporations, companies with paid-up capital > PHP 50K |
14
- | **Tax filing (no audit)** | All companies file Form C/C-S with IRAS | All companies file ITR with BIR |
15
- | **Compilation by accountant** | Small exempt private companies — no audit but accountant prepares financial statements | N/A |
16
-
17
- Even if you're a small exempt company not requiring an audit, your external accountant or tax agent needs the same reports to prepare your financial statements and tax return. This job produces the full pack.
18
-
19
- ---
51
+ | Statutory audit required | Revenue > S$10M, assets > S$10M, or employees > 50 | All stock corporations, paid-up capital > PHP 50K |
52
+ | Tax filing only | All companies file Form C / C-S with IRAS | All companies file ITR with BIR |
53
+ | Compilation by accountant | Small exempt private companies | N/A |
20
54
 
21
- ## Phase 1: Core Financial Reports
55
+ Even small exempt SG companies need this pack for the external accountant who prepares the financial statements + Form C-S.
22
56
 
23
- Generate the three primary financial statements. These form the backbone of any audit or tax filing.
24
-
25
- ### Step 1: Trial Balance
26
-
27
- The master reconciliation tool. Everything else derives from this.
57
+ ## Step 1 Emit blueprint
28
58
 
29
59
  ```
30
- POST /api/v1/generate-reports/trial-balance
31
- { "startDate": "2025-01-01", "endDate": "2025-12-31" }
60
+ generate_audit_prep_blueprint(period_start: '2025-01-01', period_end: '2025-12-31', currency: <CLIENT.base_currency>, jurisdiction: <CLIENT.tax_jurisdiction>)
32
61
  ```
33
62
 
34
- **What the auditor checks:** Debits = Credits (always). Any imbalance indicates a system error.
63
+ Save to `recurring/annual/<period>/audit-prep/blueprint.json`. Blueprint emits jurisdiction-specific deliverable list (SG: TB / BS / P&L / CF / EM / AR aging / AP aging / bank recon / FA register / GST F5 yearly / supporting schedules. PH: same + ITR-specific schedules).
35
64
 
36
- ### Step 2: Profit & Loss Statement
65
+ ## Step 2 Trial balance (the master)
37
66
 
38
67
  ```
39
- POST /api/v1/generate-reports/profit-and-loss
40
- { "primarySnapshotDate": "2025-12-31", "secondarySnapshotDate": "2025-01-01" }
68
+ generate_trial_balance(period_end: '2025-12-31', currency: <CLIENT.base_currency>)
41
69
  ```
42
70
 
43
- **Comparative:** If the auditor needs prior year comparison:
71
+ Save to `recurring/annual/<period>/audit-prep/tb.json`. Verify: every report from step 3 onwards must tie back to a TB line.
44
72
 
45
- ```
46
- POST /api/v1/generate-reports/profit-and-loss
47
- { "primarySnapshotDate": "2024-12-31", "secondarySnapshotDate": "2024-01-01" }
48
- ```
49
-
50
- ### Step 3: Balance Sheet
73
+ ## Step 3 — Primary financial statements
51
74
 
52
75
  ```
53
- POST /api/v1/generate-reports/balance-sheet
54
- { "primarySnapshotDate": "2025-12-31" }
76
+ generate_balance_sheet(period_end: '2025-12-31')
77
+ generate_profit_and_loss(period_start: '2025-01-01', period_end: '2025-12-31')
55
78
  ```
56
79
 
57
- **Key check:** Assets = Liabilities + Equity.
58
-
59
- ---
60
-
61
- ## Phase 2: Supporting Ledgers
62
-
63
- Detailed transaction-level data behind the summary reports.
64
-
65
- ### Step 4: General Ledger — grouped by account
66
-
80
+ Optional comparative:
67
81
  ```
68
- POST /api/v1/generate-reports/general-ledger
69
- { "startDate": "2025-01-01", "endDate": "2025-12-31", "groupBy": "ACCOUNT" }
82
+ generate_profit_and_loss(period_start: '2024-01-01', period_end: '2024-12-31')
83
+ generate_balance_sheet(period_end: '2024-12-31')
70
84
  ```
71
85
 
72
- This is the auditor's primary working document. Every transaction, grouped by CoA account, with opening balance, movements, and closing balance.
86
+ Assert: BS Total Assets = Total Liabilities + Total Equity. P&L Net Profit ties to Equity Movement (step 4) `netProfit` line.
73
87
 
74
- ### Step 5: Cashflow Statement
88
+ ## Step 4 Cashflow + Equity Movement
75
89
 
76
90
  ```
77
- POST /api/v1/generate-reports/cashflow
78
- { "primaryStartDate": "2025-01-01", "primaryEndDate": "2025-12-31" }
91
+ generate_cashflow(period_start: '2025-01-01', period_end: '2025-12-31')
92
+ generate_equity_movement(period_start: '2025-01-01', period_end: '2025-12-31')
79
93
  ```
80
94
 
81
- Classifies cash movements into Operating, Investing, and Financing activities.
95
+ Cashflow classifies into Operating / Investing / Financing per IAS 7. Equity Movement reconciles opening equity → net profit → dividends → other movements → closing equity. The closing equity must tie to BS step 3 Total Equity.
82
96
 
83
- ### Step 6: Equity Movement
97
+ ## Step 5 General Ledger (auditor's working document)
84
98
 
85
99
  ```
86
- POST /api/v1/generate-reports/equity-movement
87
- { "primarySnapshotStartDate": "2025-01-01", "primarySnapshotEndDate": "2025-12-31" }
100
+ generate_general_ledger(period_start: '2025-01-01', period_end: '2025-12-31', groupBy: 'ACCOUNT')
88
101
  ```
89
102
 
90
- Shows opening equity, net profit, dividends, and other movements during the year.
103
+ Per `jaz-api/SKILL.md` rule 38, paginate via `offset` if `totalElements > <page-size>`. Save full GL to `recurring/annual/<period>/audit-prep/gl.json`. Auditor will sample-test from this.
91
104
 
92
- ---
93
-
94
- ## Phase 3: Aging Reports
95
-
96
- ### Step 7: AR Aging (Accounts Receivable)
105
+ ## Step 6 — AR / AP aging
97
106
 
98
107
  ```
99
- POST /api/v1/generate-reports/ar-report
100
- { "endDate": "2025-12-31" }
108
+ generate_aged_ar(period_end: '2025-12-31')
109
+ generate_aged_ap(period_end: '2025-12-31')
101
110
  ```
102
111
 
103
- **Auditor use:** Tests recoverability of receivables. Aging > 90 days triggers bad debt assessment. The AR total MUST tie to the Accounts Receivable balance on the trial balance.
104
-
105
- ### Step 8: AP Aging (Accounts Payable)
112
+ Use `endDate` not `startDate` (rule 36 point-in-time snapshot). Assert:
113
+ - `aged_ar.totalOutstanding == TB['Accounts Receivable'].balance` (recoverability gate; auditor tests > 90d aging for ECL adequacy).
114
+ - `aged_ap.totalOutstanding == TB['Accounts Payable'].balance` (completeness gate).
106
115
 
116
+ If ECL provision feels inadequate for the > 90d bucket, run the ECL recipe immediately:
107
117
  ```
108
- POST /api/v1/generate-reports/ap-report
109
- { "endDate": "2025-12-31" }
118
+ plan_recipe(name: 'ecl', receivables: <aged_ar.buckets converted to ECL input>, ...)
110
119
  ```
120
+ And post any top-up provision via `execute_recipe`. This avoids an auditor-proposed adjustment at fieldwork.
111
121
 
112
- **Auditor use:** Completeness assertion are all liabilities recorded? The AP total MUST tie to the Accounts Payable balance on the trial balance.
113
-
114
- ---
115
-
116
- ## Phase 4: Bank and Cash
117
-
118
- ### Step 9: Bank Reconciliation Summary
122
+ ## Step 7Bank reconciliation (NON-NEGOTIABLE)
119
123
 
120
124
  ```
121
- POST /api/v1/generate-reports/bank-reconciliation-summary
122
- { "primarySnapshotDate": "2025-12-31" }
125
+ generate_bank_recon_summary(period_end: '2025-12-31')
126
+ generate_bank_recon_details(period_end: '2025-12-31')
127
+ generate_bank_balance_summary(period_end: '2025-12-31')
123
128
  ```
124
129
 
125
- **This is non-negotiable for auditors.** The bank recon proves that the cash balance per books matches the bank statement. Any unreconciled items at year-end must be explained.
130
+ For each bank account: `unreconciledCount` MUST be 0 OR every unreconciled item has a documented timing-difference explanation in `ENGAGEMENT.risk_areas`. The auditor will request bank confirmation letters DIRECTLY from your banks — `generate_bank_balance_summary` total must reconcile to those letters within tolerance.
126
131
 
127
- **For detailed reconciliation (per bank account):**
132
+ If `unreconciledCount > 0`: halt audit-prep and route back to `bank-recon.md` job. Do NOT hand the pack to the auditor with unreconciled items.
128
133
 
129
- ```
130
- POST /api/v1/generate-reports/bank-reconciliation-details
131
- { "primarySnapshotDate": "2025-12-31" }
132
- ```
133
-
134
- ### Step 10: Bank Balance Summary
134
+ ## Step 8 — Fixed assets + supporting schedules
135
135
 
136
136
  ```
137
- POST /api/v1/generate-reports/bank-balance-summary
138
- { "primarySnapshotDate": "2025-12-31" }
137
+ generate_fa_summary(period_end: '2025-12-31')
138
+ generate_fa_recon_summary(period_start: '2025-01-01', period_end: '2025-12-31')
139
139
  ```
140
140
 
141
- Summary of all bank account balances at year-end. Cross-reference to bank confirmation letters (which the auditor will request directly from your banks).
142
-
143
- ---
144
-
145
- ## Phase 5: Fixed Assets
146
-
147
- ### Step 11: Fixed Assets Register
141
+ Assert: `fa_recon.openingNbv + additions - disposals - depreciation == fa_recon.closingNbv == TB['Fixed Assets'].balance`.
148
142
 
143
+ For non-FA-register schedules (loan, lease, ECL, fixed-deposit, prepaid, intercompany), pull the underlying capsules:
149
144
  ```
150
- POST /api/v1/generate-reports/fixed-assets-summary
145
+ search_capsules(filter: {capsuleType: {in: ['Loan Repayment', 'Lease', 'Fixed Deposit', 'Prepaid Expenses', 'Provision']}})
151
146
  ```
147
+ For each capsule, run the matching `clio calc <type>` to produce the independent schedule. Save to `recurring/annual/<period>/audit-prep/schedules/<capsule-name>.json`. Auditor uses these to test the IFRS 9 / IFRS 16 / IAS 37 measurements.
152
148
 
153
- Shows all fixed assets: acquisition date, cost, depreciation method, useful life, accumulated depreciation, and net book value.
154
-
155
- **For FA reconciliation (movements during the year):**
149
+ ## Step 9 Tax ledger
156
150
 
157
151
  ```
158
- POST /api/v1/generate-reports/fixed-assets-recon-summary
152
+ generate_vat_ledger(period_start: '2025-01-01', period_end: '2025-12-31')
159
153
  ```
160
154
 
161
- This shows: opening NBV + additions - disposals - depreciation = closing NBV. The auditor reconciles this to the trial balance.
162
-
163
- ---
155
+ For SG: annual total ties to sum of 4 quarterly GST F5 returns. For PH: annual total ties to monthly VAT returns + quarterly summary. Cross-reference: `practice/references/quarterly-gst.md` keeps the per-quarter F5/VAT submissions; the annual reconciliation should already be clean if quarterly-gst engagements ran each period.
164
156
 
165
- ## Phase 6: Tax
157
+ ## Step 10 — XLSX deliverables (pre-empt auditor requests)
166
158
 
167
- ### Step 12: Tax Ledger / GST Summary
159
+ For each report the auditor needs in their workpapers:
168
160
 
169
161
  ```
170
- POST /api/v1/generate-reports/vat-ledger
171
- { "startDate": "2025-01-01", "endDate": "2025-12-31" }
162
+ download_export(exportType: 'trial-balance', startDate: '2025-01-01', endDate: '2025-12-31', currencyCode: <CLIENT.base_currency>)
172
163
  ```
173
164
 
174
- Full year tax ledger for the auditor to verify GST returns filed during the year. The annual total should reconcile to the sum of the four quarterly GST F5 returns.
165
+ Returns `{ fileName, fileUrl }` (pre-signed, ~5 min). Download immediately to `recurring/annual/<period>/audit-prep/xlsx/`. Repeat for: `profit-and-loss`, `balance-sheet`, `general-ledger`, `ar-report`, `ap-report`, `cashflow`.
175
166
 
176
- ---
167
+ **Pre-emptive audit analyses** (run BEFORE handing over the pack — fix what they'd find):
168
+ - `download_export(exportType: 'analysis-anomalous-bills', startDate, endDate)` — flag bills with unusual amounts vs supplier history
169
+ - `download_export(exportType: 'analysis-anomalous-invoices', startDate, endDate)` — same, customer side
170
+ - `download_export(exportType: 'analysis-gl-journal-audit', startDate, endDate)` — flags unbalanced / round-number / large-value journals likely to draw auditor scrutiny
171
+ - `download_export(exportType: 'analysis-exchange-rate-audit', startDate, endDate)` — FX rates outside expected band
172
+ - `download_export(exportType: 'analysis-cash-expense-health', startDate, endDate)` — cash-only expense patterns auditors flag
177
173
 
178
- ## Phase 7: Data Exports
174
+ If any analysis surfaces issues, fix BEFORE auditor sees them. Document the corrections in `ENGAGEMENT.md`.
179
175
 
180
- Auditors and tax agents often need the data in Excel format for their own workpapers.
176
+ ## Step 11 Reconciliation checklist
181
177
 
182
- ### Step 13: Export all key reports
178
+ Before pack hand-off, assert each row:
183
179
 
184
- ```
185
- POST /api/v1/data-exports/trial-balance
186
- { "startDate": "2025-01-01", "endDate": "2025-12-31" }
187
- ```
180
+ | Account | Source | Must match |
181
+ |---------|--------|------------|
182
+ | Cash / Bank | step 7 bank recon | bank confirmation letters |
183
+ | Accounts Receivable | step 6 AR aging | TB AR line |
184
+ | Accounts Payable | step 6 AP aging | TB AP line |
185
+ | Fixed Assets NBV | step 8 FA register | TB FA lines (gross + accumulated dep) |
186
+ | Loan Payable | step 8 loan schedule (per capsule) | TB Loan Payable line |
187
+ | Lease Liability | step 8 lease schedule (per capsule) | TB Lease Liability line |
188
+ | Revenue | step 3 P&L | step 9 VAT ledger Box 1+2+3 totals |
189
+ | GST Receivable / Payable | step 9 VAT ledger | TB GST Control account |
188
190
 
189
- ```
190
- POST /api/v1/data-exports/profit-and-loss
191
- { "startDate": "2025-01-01", "endDate": "2025-12-31" }
192
- ```
191
+ Any mismatch beyond `CLIENT.materiality_threshold` halts the pack and routes back to the originating job.
193
192
 
194
- ```
195
- POST /api/v1/data-exports/general-ledger
196
- { "startDate": "2025-01-01", "endDate": "2025-12-31", "groupBy": "ACCOUNT" }
197
- ```
193
+ ## Step 12 — Completeness gates (final)
198
194
 
199
195
  ```
200
- POST /api/v1/data-exports/ar-report
201
- { "endDate": "2025-12-31" }
196
+ search_journals(filter: {status: {eq: 'DRAFT'}, valueDate: {between: ['2025-01-01', '2025-12-31']}})
197
+ search_invoices(filter: {status: {eq: 'DRAFT'}, valueDate: {between: ['2025-01-01', '2025-12-31']}})
198
+ search_bills(filter: {status: {eq: 'DRAFT'}, valueDate: {between: ['2025-01-01', '2025-12-31']}})
202
199
  ```
203
200
 
201
+ ALL three must return zero. If any return rows: collect `resourceId`s, classify (delete vs finalize) per practitioner judgment, and `bulk_finalize_drafts({kind, resourceIds: [...]})` for the keep-set.
202
+
203
+ Then lock the period:
204
204
  ```
205
- POST /api/v1/data-exports/ap-report
206
- { "endDate": "2025-12-31" }
205
+ update_account(resourceId: <CoA root>, lockDate: '2025-12-31')
207
206
  ```
208
207
 
209
- **Note:** Data export endpoints use simpler field names than generate-reports. P&L export uses `startDate`/`endDate` instead of `primarySnapshotDate`/`secondarySnapshotDate`.
210
-
211
- ---
212
-
213
- ## Phase 8: Supporting Schedules
214
-
215
- These are typically prepared manually by extracting data from the general ledger. The schedules explain what sits behind specific balance sheet line items.
208
+ This prevents backdated entries during fieldwork. If the auditor needs to post AJEs, lift the lock temporarily, post, re-lock do NOT leave it open during fieldwork.
216
209
 
217
- ### Step 14: Compile supporting schedules
210
+ ## Step 13 Hand-off to statutory filing
218
211
 
219
- **Prepaid Expenses Schedule:**
220
- - Search the general ledger for prepaid asset accounts
221
- - List each prepaid item: description, original amount, amortization to date, remaining balance
222
- - If using capsules for prepaid workflows, group the GL by capsule for a clean view
212
+ The pack is now ready. Cross-reference to `practice/references/annual-statutory.md` step 6-7 (statutory filing) which consumes:
213
+ - TB + P&L + BS for Form C-S Lite eligibility check (revenue ≤ S$200K)
214
+ - Audit-analyses for management-letter content
215
+ - Loan / lease / FA schedules for tax computation add-backs
216
+ - VAT ledger annual reconciliation for IRAS Box 1-7 cross-tie
223
217
 
224
- **Loan Schedule:**
225
- - For each active loan: original principal, interest rate, monthly payment, balance at year-end
226
- - Extract from the loan capsule GL entries
227
- - **Calculator:** `clio calc loan` produces the full amortization table
228
-
229
- **Provision Schedule:**
230
- - List all provisions: ECL/bad debt, employee leave, warranty, legal, etc.
231
- - For each: opening balance, additions, utilizations, reversals, closing balance
232
- - ECL provision: `clio calc ecl` for the year-end calculation
233
-
234
- **Lease Schedule (if IFRS 16 applies):**
235
- - Right-of-use asset: opening, depreciation, closing
236
- - Lease liability: opening, interest, payments, closing
237
- - **Calculator:** `clio calc lease` for the complete schedule
238
-
239
- **Fixed Deposit Schedule:**
240
- - List all fixed deposits: bank, principal, rate, maturity date, accrued interest
241
- - **Calculator:** `clio calc fixed-deposit` for interest calculations
242
-
243
- **Intercompany Balances (if applicable):**
244
- - Receivables and payables with related parties
245
- - Must be disclosed separately in financial statements
218
+ The SG Form C-S wizard (`practice/references/annual-statutory.md` step 7) walks the practitioner field-by-field through the C-S form, prefilling from the audit-prep pack.
246
219
 
247
220
  ---
248
221
 
249
- ## Phase 9: Final Checks
250
-
251
- ### Step 15: Reconciliation checklist
252
-
253
- Before handing the pack to the auditor, verify these tie:
254
-
255
- | Account | Report | Should Match |
256
- |---------|--------|-------------|
257
- | Cash / Bank | Bank Recon Summary (Step 9) | Bank statements |
258
- | Accounts Receivable | AR Aging (Step 7) | Trial balance AR line |
259
- | Accounts Payable | AP Aging (Step 8) | Trial balance AP line |
260
- | Fixed Assets (NBV) | FA Register (Step 11) | Trial balance FA lines |
261
- | Revenue | P&L (Step 2) | GST return Box 1+2+3 totals |
262
- | GST Receivable/Payable | Tax Ledger (Step 12) | Sum of quarterly GST returns |
222
+ ## Common error classes and recovery
263
223
 
264
- ### Step 16: Review for completeness
265
-
266
- Run through this checklist:
267
-
268
- - [ ] All bank accounts reconciled at year-end (zero unreconciled items or documented timing differences)
269
- - [ ] All supplier statements reconciled for major suppliers
270
- - [ ] Lock date set to year-end (prevents backdated entries during audit)
271
- - [ ] No draft transactions in the period (search for status = DRAFT and resolve)
272
- - [ ] Depreciation posted for all 12 months
273
- - [ ] Accruals and prepayments up to date
274
- - [ ] Intercompany balances agree with counterparty
275
- - [ ] Related party transactions identified and documented
224
+ | Source | Error | Recovery |
225
+ |--------|-------|----------|
226
+ | `generate_*` | 422 `period_not_closed` | Year-end close incomplete. Route to `year-end-close.md` first. |
227
+ | `generate_bank_recon_*` | `unreconciledCount > 0` | Route to `bank-recon.md`; do NOT hand pack with this open. |
228
+ | `download_export` | 422 `period_too_long` | GL XLSX rejected for >12 months. Split into per-quarter exports. |
229
+ | `download_export` | 504 timeout | Large org. Re-run with smaller `endDate` range or contact infrastructure team. |
230
+ | `update_account` | 422 `lock_date_in_future` | The CoA `lockDate` must be `period_end`. Use today if unsure. |
231
+ | Reconciliation | TB AR AR aging | Likely a mid-period credit-note application missed. `search_customer_credit_notes(filter: {valueDate: {between: ...}})` and verify each was applied via `apply_credit_to_invoice`. |
232
+ | Reconciliation | TB Cash bank balance summary | Unposted bank journal or unreconciled item. Re-run step 7. |
233
+ | Step 12 gate | Drafts present at year-end | Either clear (finalize) or document in `ENGAGEMENT.risk_areas`. NEVER hand pack with drafts in the audit period. |
276
234
 
277
235
  ---
278
236
 
279
- ## Audit Prep Checklist (Quick Reference)
280
-
281
- | # | Step | Phase | Report/Endpoint |
282
- |---|------|-------|----------------|
283
- | 1 | Trial Balance | Core | `POST /generate-reports/trial-balance` |
284
- | 2 | P&L | Core | `POST /generate-reports/profit-and-loss` |
285
- | 3 | Balance Sheet | Core | `POST /generate-reports/balance-sheet` |
286
- | 4 | General Ledger | Ledgers | `POST /generate-reports/general-ledger` |
287
- | 5 | Cashflow | Ledgers | `POST /generate-reports/cashflow` |
288
- | 6 | Equity Movement | Ledgers | `POST /generate-reports/equity-movement` |
289
- | 7 | AR Aging | Aging | `POST /generate-reports/ar-report` |
290
- | 8 | AP Aging | Aging | `POST /generate-reports/ap-report` |
291
- | 9 | Bank Recon Summary | Bank | `POST /generate-reports/bank-reconciliation-summary` |
292
- | 10 | Bank Balance Summary | Bank | `POST /generate-reports/bank-balance-summary` |
293
- | 11 | FA Register | Assets | `POST /generate-reports/fixed-assets-summary` |
294
- | 12 | Tax Ledger | Tax | `POST /generate-reports/vat-ledger` |
295
- | 13 | Data Exports | Export | `POST /data-exports/*` |
296
- | 14 | Supporting schedules | Schedules | Manual from GL + calculators |
297
- | 15 | Reconciliation checks | Final | Cross-reference all reports |
298
- | 16 | Completeness review | Final | Checklist |
299
-
300
- ---
237
+ ## Tips
301
238
 
302
- ## Tips for SMBs
239
+ - **Start in January for prior FY.** Don't wait for the auditor's request list. Generate the pack in early January; have it ready before the engagement begins. Faster + cheaper audit.
240
+ - **Bank confirmation letters take 2-4 weeks.** Request them from each bank in early January. The auditor will independently request these — yours is for self-verification.
241
+ - **Pre-emptive audit-analyses are the differentiator.** Most accountants hand over the standard pack and wait for queries. Running the 5 `analysis-*` exports proactively in step 10 catches what the auditor would catch — at zero auditor cost.
242
+ - **SG IRAS deadlines:** Form C-S/C: November 30 of the following year. ECI: within 3 months of FY-end. GST F5: 1 month after each quarter-end.
243
+ - **Common audit queries:** "Revenue by customer" → AR Summary; "Top 10 expenses" → P&L sorted; "Related party transactions" → tag during the year, not at audit time; "Variance explanation" → month-by-month P&L.
303
244
 
304
- **Start early.** Don't wait for the auditor's request list. Generate the report pack in January for the prior year and have it ready before the engagement begins. A well-prepared client gets a faster, cheaper audit.
305
-
306
- **The auditor will ask for bank confirmation letters.** These are letters from your bank confirming balances at year-end. Request them from your bank in early January — they can take 2-4 weeks to arrive.
307
-
308
- **Keep a "passed adjustments" list.** If the auditor proposes adjustments you disagree with (within materiality), track them. Below-materiality items may accumulate — the auditor must consider cumulative effect.
245
+ ---
309
246
 
310
- **IRAS filing deadlines (SG):**
311
- - Form C-S/C: November 30 of the following year (e.g., FY 2025 due Nov 30, 2026)
312
- - ECI (Estimated Chargeable Income): Within 3 months of financial year-end
313
- - GST F5: 1 month after each quarter-end
247
+ ## Cross-references back to engagements
314
248
 
315
- **Common audit queries you can pre-empt:**
316
- - "Can you provide a schedule of revenue by customer?" Run AR summary report
317
- - "What are the top 10 expenses?" Run P&L, sort expense lines
318
- - "Are there any related party transactions?" → Tag them during the year, not at audit time
319
- - "Can you explain the $X increase in expenses?" → Have month-by-month P&L ready for variance analysis
249
+ - `practice/references/annual-statutory.md` step 5 — audit-prep is the bridge between `year-end-close` and `statutory-filing` engagement steps. Practice playbook orchestrates audit-prep deliverables into the Form C-S wizard.
250
+ - `practice/references/quarterly-gst.md` keeps per-quarter F5 reconciliations clean; audit-prep step 9 trusts those.
251
+ - `practice/references/onboarding.md` only relevant when conversion happened mid-FY (rare). Then the audit pack must include a "conversion period" note explaining the mid-FY data load.