@trajectonomics/cli 0.8.0-alpha.137 → 0.8.0-alpha.139

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 (2) hide show
  1. package/README.md +50 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -214,24 +214,31 @@ letters, digits or hyphens, is refused by name. A plan without a partner or with
214
214
  lists the `filers` when it has any, and the household's Owners are read each time the
215
215
  tax is written, so after changing them run `traj scenario tax <name> --from-stored`.
216
216
 
217
- A couple who file separately get one Levy each. `--filing-status married_separate`
218
- writes `th-2026-pit@me` and `th-2026-pit@partner`, one per person who has a labelled
219
- Flow or Account, with the same Owner suffixes. Each Prepayment of the tax moves to the
220
- Levy of its Flow's Owner (a Prepayment of a Levy of your own stays). A `shared` Flow's
221
- Prepayment is split half to each, and its capped Prepayment stays whole on the holder's.
222
- Each allowance flag takes a person (`--parents partner=2`) so each Return states its own
223
- claims, a bare value names the holder, and each Return's children default to 0. A value
224
- for someone with no income is refused, because no Return carries it. A Return claims at
225
- most its own two parents. Each Return has its own home-loan interest ceiling; interest on
226
- a loan borrowed together shares one 100,000 baht ceiling, which `traj` cannot tell from
227
- two separate loans, so state each person's share yourself. When both claim interest and a
228
- loan's Owner is `shared`, the result's `assumptions` say the loans are taken to be
229
- separate. `--merge` and `--from-stored` keep the stored `returns`, and `--merge` to
230
- `married_joint` keeps the partner's for a later switch back. The stored profile's
231
- `claimsHolder` says whose claims its other keys are, so if the household swaps which
232
- person is the holder, each person's claims stay theirs. A `projection run` then
233
- reports a `filer` on each `taxYears` entry, `--carry-in` takes one record per Levy, and
234
- `projection allowances` answers per Return.
217
+ A couple who file separately get one Levy each. `--filing-status married_separate` writes
218
+ `th-2026-pit@me` and `th-2026-pit@partner`, one per person who has a labelled Flow or
219
+ Account, with the same Owner suffixes. Each Prepayment of the tax moves to the Levy of its
220
+ Flow's Owner (a Prepayment of a Levy of your own stays). A `shared` Flow's Prepayment is
221
+ split half to each, and its capped Prepayment stays whole on the holder's. Each allowance
222
+ flag takes a person (`--parents partner=2`) so each Return states its own claims, a bare
223
+ value names the holder, and each Return's children default to 0. A value for someone with
224
+ no income is refused, because no Return carries it. A Return claims at most its own two
225
+ parents. Interest on one loan borrowed together is stated once, as `--mortgage-interest
226
+ shared=60000`: each Return claims half, an odd satang goes to the holder, and a sole
227
+ person with income claims it all. The shared total is at most 100,000 baht
228
+ (`MORTGAGE_OVER_CEILING`), and `shared=` is refused under any other filing status. A
229
+ person's own `--mortgage-interest` is for their other loans, and each Return claims at
230
+ most 100,000 baht of its own interest and its share together. `traj` cannot tell which
231
+ loan interest is on, so when both claim their own, a loan's Owner is `shared` and no
232
+ shared interest is stated, the result's `assumptions` say the loans are taken to be
233
+ separate. `--merge` and `--from-stored` keep the stored `returns` and
234
+ `sharedMortgageInterest`, and `--merge` to `married_joint` keeps the partner's Return and
235
+ the shared interest for a later switch back; a joint Return claims neither, so state its
236
+ interest bare. A write that claims neither says so in its `assumptions`, on
237
+ `allowances.mortgageInterestCeiling`. The stored profile's `claimsHolder` says whose
238
+ claims its other keys are, so if the household swaps which person is the holder, each
239
+ person's claims stay theirs. A `projection run` then reports a `filer` on each `taxYears`
240
+ entry, `--carry-in` takes one record per Levy, and `projection allowances` answers per
241
+ Return.
235
242
 
236
243
  A Projection that starts inside a tax period also needs what that period had
237
244
  already taken: `--carry-in carry-in.json` states it, one record per Scenario,
@@ -400,6 +407,31 @@ each side.
400
407
  ]
401
408
  ```
402
409
 
410
+ ## Naming a Flow, a Milestone or a person
411
+
412
+ > **Ships in 0.8.0.**
413
+
414
+ Every Flow, every Milestone and every person of a household may carry a `displayLabel`: the words a
415
+ page reads in place of the id, such as Thai text. It is free text of 1 to 80 code points, with no
416
+ control, invisible or bidirectional characters and no leading or trailing whitespace. It is no key
417
+ and changes no figure: the id still addresses the item, the label may repeat or change, and the
418
+ engine never reads it. `traj schema scenario apply` and `traj schema scenario household` publish it
419
+ with that rule.
420
+
421
+ A label travels in the document, so `--file` and `--add` carry it, and `--set` writes it:
422
+
423
+ ```bash
424
+ traj scenario apply base --set 'flows.school-fees.displayLabel="School fees"'
425
+ traj scenario apply base --set 'milestones.condo.displayLabel="Condo down payment"'
426
+ traj scenario household base --file household.json # a person's label, in the household
427
+ ```
428
+
429
+ A plan written before the field may lack it, and the first `--set` that names it begins it, as
430
+ `--set accounts.<id>.volatility=…` does. Because a label is stored content, a change to one moves the
431
+ plan's `contentHash`; a plan without labels keeps its bytes and its hash. To clear a label, write the
432
+ document without it (`--file`), or empty the Name field in the Dashboard: `--set` writes a value and
433
+ cannot remove a key, so `null` and `""` are refused.
434
+
403
435
  ## Where each year's money went
404
436
 
405
437
  > **Ships in 0.8.0.**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trajectonomics/cli",
3
- "version": "0.8.0-alpha.137",
3
+ "version": "0.8.0-alpha.139",
4
4
  "description": "trajectonomics command line",
5
5
  "license": "MIT",
6
6
  "type": "module",