@trajectonomics/cli 0.8.0-alpha.0 → 0.8.0-alpha.10

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 +48 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -173,6 +173,54 @@ and where it came from, and one that starts on a period boundary needs nothing:
173
173
  ]
174
174
  ```
175
175
 
176
+ ## Chance of success
177
+
178
+ > **Ships in 0.8.0.**
179
+
180
+ `traj projection chance` runs one Scenario over seeded Market paths and reports
181
+ the share that never run out before the Horizon, with the net-worth Bands at each
182
+ year. The paths draw from a Return model you state in a JSON file, with
183
+ `--return-model`, and `--paths` and `--seed` are required, so the same model,
184
+ seed and count always give the same answer. The CLI ships no Return model: which
185
+ market history a plan is tested against is your decision, and every figure is
186
+ only as good as that choice. `traj schema projection chance` describes the file.
187
+ Pass the same three flags to `traj dashboard` to add the chance of success to the
188
+ Dashboard, as a page of its own.
189
+
190
+ ## Money as decimals in a Scenario
191
+
192
+ > **Ships in 0.8.0.**
193
+
194
+ `traj scenario show base --decimal` prints a Scenario with each amount as a decimal string of the
195
+ Currency's major unit, such as `"1000.00"` for 100000 satang, and
196
+ `traj scenario apply base --file base.json --decimal` reads that form back. The stored plan is the
197
+ same either way: saving what `show --decimal` printed leaves it unchanged. A value with more places
198
+ than the Currency has is refused, never rounded.
199
+
200
+ ## Milestones: points in the plan that a Flow waits for
201
+
202
+ > **Ships in 0.8.0.**
203
+
204
+ A Scenario may name points in the plan a Flow can wait for: a date, a number of months after another
205
+ point, a net-worth or spending figure, or a multiple of spending. They are the `milestones` of the
206
+ Scenario document, and `traj schema scenario apply` lists every key. A Flow's `startAt` lands it on
207
+ or after a point's date, and its `endAt` before it. `traj projection run` reports each point's date,
208
+ or that it was not reached, in a `milestones` table, and `traj projection compare` reports them under
209
+ each side.
210
+
211
+ ```json
212
+ "milestones": [
213
+ {
214
+ "id": "retire",
215
+ "combine": "all",
216
+ "criteria": [
217
+ { "id": "wealth", "kind": "metric", "metric": "accessibleNetWorth", "op": "atLeast", "amount": 50000000, "terms": "real" },
218
+ { "id": "age", "kind": "date", "on": "2045-01-01" }
219
+ ]
220
+ }
221
+ ]
222
+ ```
223
+
176
224
  ## Seeing it in a browser
177
225
 
178
226
  `traj dashboard --as-of 2026-11-30 --horizon 2056-11-30` reads your ledger once and serves the Dashboard (net worth, the ledger, projections, the FI date, a Scenario compare, tax and health) on `http://127.0.0.1:4321/` until you press Ctrl-C. It only reads, it listens on this machine only, and it takes the same Scenario flags as the projection reads (`--scenario`, `--compare` twice, `--monthly`, `--carry-in`); `--port 0` picks a free port. Run it again to see new figures.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trajectonomics/cli",
3
- "version": "0.8.0-alpha.0",
3
+ "version": "0.8.0-alpha.10",
4
4
  "description": "trajectonomics command line",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,6 +34,6 @@
34
34
  "lint": "biome ci --error-on-warnings .",
35
35
  "format": "biome check --write .",
36
36
  "build": "bun build src/index.ts --compile --no-compile-autoload-bunfig --no-compile-autoload-dotenv --outfile dist/traj",
37
- "check": "bun run lint && bun run typecheck && bun test && bun run build"
37
+ "check": "bun run lint && bun run typecheck && bun test && bun ../../tooling/scripts/build-unless-turbo.ts"
38
38
  }
39
39
  }