@trajectonomics/cli 0.0.1-bootstrap.0 → 0.2.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 (2) hide show
  1. package/README.md +68 -2
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # trajectonomics
2
2
 
3
- The trajectonomics command line. The sources are Bun-only; a released binary needs nothing.
3
+ `traj` is a free and open source command line for personal money. An AI agent operates it.
4
+ The command line never calls a model, so every result is repeatable.
5
+
6
+ The landing page is [trajectonomics.com](https://trajectonomics.com/) and the docs are at
7
+ [trajectonomics.com/docs](https://trajectonomics.com/docs/).
4
8
 
5
9
  ## Install
6
10
 
@@ -26,6 +30,23 @@ npx @trajectonomics/cli@latest --version
26
30
  bunx @trajectonomics/cli@latest --version
27
31
  ```
28
32
 
33
+ Then give your agent the setup skill:
34
+
35
+ ```bash
36
+ npx skills add trajectonomics/skills --skill traj-onboarding -y
37
+ ```
38
+
39
+ The setup skill asks about your situation and goal, then its second step installs the `traj`
40
+ operating skill from `trajectonomics/internal-skills`.
41
+
42
+ ```bash
43
+ npx skills add trajectonomics/internal-skills --skill traj -y
44
+ ```
45
+
46
+ That is the operating skill on its own, for an agent that is already set up. Both commands
47
+ use `npx`, so they need Node, which the npm channel already requires; the install scripts
48
+ do not.
49
+
29
50
  Which channel: all three end at the same compiled binary and the same version. Use the
30
51
  script for a machine that should keep `traj` on `PATH`, npm when you already have Node or
31
52
  Bun and want one command. Pin a release with `TRAJ_VERSION=X.Y.Z` for the script, or
@@ -36,6 +57,8 @@ Uninstall by deleting the one file: `~/.local/bin/traj`, `%LOCALAPPDATA%\traj\bi
36
57
 
37
58
  ## Development
38
59
 
60
+ The sources are Bun-only; a released binary needs nothing.
61
+
39
62
  ```bash
40
63
  bun install
41
64
  bun run dev -- --help # run from source
@@ -50,6 +73,47 @@ From a checkout, run the CLI with `bun run dev -- …`. The npm launcher refuses
50
73
  `0.0.0` a checkout carries, because that version is never a release; set
51
74
  `TRAJ_BINARY_PATH` to run a binary you built with `bun run build`.
52
75
 
76
+ ## Reading the future
77
+
78
+ > **Ships in 0.2.0.**
79
+ > The release you installed has no `projection`, `fi` or `scenario tax`: they are on `main`
80
+ > and reach the install channels with `0.2.0`.
81
+
82
+ Three read-only commands run a stored Scenario over the Baseline the ledger
83
+ states at a date: `traj projection run` rolls net worth up year by year,
84
+ nominal and real (monthly rows with `--monthly`); `traj projection compare`
85
+ puts two Scenarios side by side, or one against a `--set` what-if, with the
86
+ deltas in FI date, net worth at the ages you name and run-out year; and
87
+ `traj fi` reports the survival FI date beside the 25× rule of thumb as a
88
+ labelled reference. Every result states its As-of, the engine version, the
89
+ Scenario's hashes, the Overrides it applied, and its tax status.
90
+ `traj schema <command>` describes each one.
91
+
92
+ Tax is the Scenario's. `traj scenario tax <name> --tax th-2026` writes Thailand's
93
+ 2026 personal income tax into it, and `--label salary=income.section40_1` says
94
+ which Section 40 class each income Flow belongs to, because a Levy tallies
95
+ labels and never guesses them; `--none` takes both out again. A Scenario
96
+ without the Levy is projected pre-tax, and every result says which it is.
97
+
98
+ A Projection that starts inside a tax period also needs what that period had
99
+ already taken: `--carry-in carry-in.json` states it, one record per Scenario,
100
+ Levy and period, with a `"0.00"` for every class the period had no income in or
101
+ one `"rest": "0.00"` for all the rest. The result echoes every record it used
102
+ and where it came from, and one that starts on a period boundary needs nothing:
103
+
104
+ ```json
105
+ [
106
+ {
107
+ "scenario": "base",
108
+ "levy": "th-2026-pit",
109
+ "periodStart": "2026-01-01",
110
+ "tallies": [{ "label": "income.section40_1", "basis": "gross", "amount": "0.00" }],
111
+ "prepaid": "0.00",
112
+ "rest": "0.00"
113
+ }
114
+ ]
115
+ ```
116
+
53
117
  ## Docs
54
118
 
55
119
  - [`GLOSSARY.md`](GLOSSARY.md): the project's vocabulary.
@@ -65,7 +129,9 @@ examples, the error codes it raises, and a `run` that returns `ok(data)` or
65
129
  `fail(code)`. Register it in `src/commands/index.ts`, inside a `defineGroup` if
66
130
  it is nested. Fields of the input schema that are not positionals become flags
67
131
  automatically (`fromDate` is `--from-date`). A new failure is a new entry in the
68
- registry in `src/errors.ts` with its exit class. Commands never format output or
132
+ registry in `src/registry.ts` with its exit class. An input-validation sentence
133
+ comes from the shared table beside it, so a new command needs no wording of its
134
+ own. Commands never format output or
69
135
  exit; `traj help <path>` and `traj schema <path>` are generated from the same
70
136
  schemas that validate them. Test through `run(argv, io, env)`, which needs no
71
137
  process. See ADR 0015.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trajectonomics/cli",
3
- "version": "0.0.1-bootstrap.0",
3
+ "version": "0.2.0",
4
4
  "description": "trajectonomics command line",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,7 +38,8 @@
38
38
  "devDependencies": {
39
39
  "@biomejs/biome": "2.6.3",
40
40
  "@trajectonomics/ledger": "0.1.0-alpha.0",
41
- "@trajectonomics/sim": "0.1.0",
41
+ "@trajectonomics/sim": "0.2.0-alpha.17",
42
+ "@trajectonomics/tax": "0.2.0-alpha.6",
42
43
  "@trajectonomics/tooling": "1.1.0",
43
44
  "@types/bun": "^1.4.4",
44
45
  "typescript": "^7.0.2",