jaz-clio 5.4.8 → 5.4.12
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/README.md +5 -3
- package/assets/skills/api/SKILL.md +1 -1
- package/assets/skills/cli/SKILL.md +1 -1
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jobs/SKILL.md +1 -1
- package/assets/skills/practice/SKILL.md +1 -1
- package/assets/skills/transaction-recipes/SKILL.md +1 -1
- package/assets/templates/platform-rules/jaz-agent-rules.md +53 -0
- package/cli.mjs +333 -332
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,13 +83,15 @@ claude mcp add jaz -- npx jaz-clio mcp
|
|
|
83
83
|
|
|
84
84
|
## Skills
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
141 production-tested API rules. Field name mappings. Error recovery patterns. 12 job playbooks. Installable into any AI-aware project.
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
clio init
|
|
89
|
+
clio init # auto-detect tool + install skills + agent-rules
|
|
90
|
+
clio init --platform cursor # explicit platform
|
|
91
|
+
clio init --no-rules # skills only, skip the agent-rules file
|
|
90
92
|
```
|
|
91
93
|
|
|
92
|
-
Auto-detects the AI tool (Claude Code, Codex, Copilot, Cursor, Antigravity) and installs the right skill files.
|
|
94
|
+
Auto-detects the AI tool (Claude Code, Codex, Copilot, Cursor, Antigravity, Gemini, Windsurf, Goose) and installs the right skill files. `init` also writes a one-page `jaz-agent-rules.md` to the path your platform reads on workspace open (`CLAUDE.md` / `AGENTS.md` / `.github/copilot-instructions.md` / `.cursor/rules/jaz.mdc` / `.windsurf/rules/jaz.md` / `GEMINI.md`) so any agent starts every session with the meta-tool flow, the 6 API gotchas, and the recipe-engine carve-outs.
|
|
93
95
|
|
|
94
96
|
---
|
|
95
97
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Jaz — Agent Operating Rules
|
|
2
|
+
|
|
3
|
+
How any AI agent (Claude / GPT / Gemini / Copilot / Cursor) should use the Jaz accounting stack in this workspace. Drop this file into the path your platform expects and your agent picks it up automatically.
|
|
4
|
+
|
|
5
|
+
Source of truth lives in the installed skills (`.claude/skills/jaz-*/SKILL.md` or `.agents/skills/jaz-*/SKILL.md`). This file is a 30-second bias prompt — load the skill for the deep contract.
|
|
6
|
+
|
|
7
|
+
## Discovery
|
|
8
|
+
|
|
9
|
+
The Jaz MCP server exposes 274 tools across 34 namespaces via 3 meta-tools. **Use the meta-tool flow — never enumerate tools blindly.**
|
|
10
|
+
|
|
11
|
+
1. `search_tools(query)` → top-N tool names + namespaces.
|
|
12
|
+
2. `describe_tools(names)` → full parameter schemas.
|
|
13
|
+
3. `execute_tool(name, args)` → run.
|
|
14
|
+
|
|
15
|
+
Offline tools (no API key needed): `plan_recipe`, `search_help_center`, all `practice_*`, all `generate_*_blueprint`. The MCP server says `Offline.` at the start of those tools' descriptions.
|
|
16
|
+
|
|
17
|
+
## API contract — the 6 rules that prevent 90% of 422s
|
|
18
|
+
|
|
19
|
+
1. **IDs are `resourceId`** — never `id`.
|
|
20
|
+
2. **Transaction dates are `valueDate`** (YYYY-MM-DD) — never `issueDate` / `invoiceDate` / `date`.
|
|
21
|
+
3. **Line item text field is `name`** — never `description`.
|
|
22
|
+
4. **`saveAsDraft` defaults `false`** at the API; CLI/MCP create-tools default `true`. Set explicitly when the user says "finalize".
|
|
23
|
+
5. **Pagination uses `limit` / `offset`** — sort is required when `offset` is set.
|
|
24
|
+
6. **Create responses return `{ resourceId }` only** — re-GET to load the full entity.
|
|
25
|
+
|
|
26
|
+
## Transactions — never hand-construct journals for IFRS
|
|
27
|
+
|
|
28
|
+
For depreciation, amortization, ECL, IFRS 16 leases, hire purchase, loans, IAS 37 provisions, deferred revenue, fixed deposits, asset disposal, accrued expenses, leave accrual, dividends — **always use the recipe engine**:
|
|
29
|
+
|
|
30
|
+
1. `plan_recipe(recipe, ...)` → schedule + journals (offline, no posting).
|
|
31
|
+
2. `execute_recipe(recipe, ..., startDate)` → posts capsule + all entries (replaces ~20 manual tool calls).
|
|
32
|
+
|
|
33
|
+
Exception: `fx-reval` is verification-only — Jaz auto-handles period-end IAS 21.23 FX translation. Calling `execute_recipe(recipe: 'fx-reval')` would double-post.
|
|
34
|
+
|
|
35
|
+
## Bulk operations
|
|
36
|
+
|
|
37
|
+
- `bulk_upsert_*` tools accept up to 500 rows per call. Async tools return a `jobId` — poll `search_background_jobs(filter:{resourceId:{eq:jobId}})` until SUCCESS / FAILED / PARTIAL_SUCCESS.
|
|
38
|
+
- On `PARTIAL_SUCCESS`: succeeded rows are committed. Inspect `errorDetails[].rowIndex` and re-submit only failed rows.
|
|
39
|
+
- Sync `bulk_upsert_chart_of_accounts` returns `failedRows[]` inline — no polling.
|
|
40
|
+
|
|
41
|
+
## Practitioner workspace (multi-client agencies)
|
|
42
|
+
|
|
43
|
+
If `~/Documents/Jaz Practice/` exists (or `PRACTICE_HOME` is set), the user is operating across multiple Jaz orgs:
|
|
44
|
+
|
|
45
|
+
1. `practice_list_clients` first — identify which client this task is for.
|
|
46
|
+
2. `practice_load_client` — loads CLIENT.md (FY end, GST scheme, COA, banks, recurring accruals).
|
|
47
|
+
3. For close / GST / year-end work, ensure an `ENGAGEMENT.md` exists for the period (`practice_create_engagement` if not). Follow `jaz-practice/references/<engagement-type>.md` as the canonical playbook.
|
|
48
|
+
|
|
49
|
+
## Safety
|
|
50
|
+
|
|
51
|
+
- Never echo `JAZ_API_KEY` or `jk-*` strings to the user or into generated code.
|
|
52
|
+
- Never invent enum values (UPPER_SNAKE_CASE only — match exactly).
|
|
53
|
+
- Errors come back structured (`code`, `message`, `failedRows[]`, `errorDetails[]`). Read them — don't guess at what went wrong.
|