create-githolon 0.105.12 → 0.105.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-githolon",
3
- "version": "0.105.12",
3
+ "version": "0.105.14",
4
4
  "type": "module",
5
5
  "description": "Scaffold a Nomos domain package: the starter domain + compile config + live e2e. `npm create githolon my-app`.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -10,11 +10,22 @@ Model the business language. Do not recreate Nomos as application infrastructure
10
10
  - Relationships use `t.ref(Aggregate)` and `idOf(Aggregate)`; generated code carries `NomosRef<Aggregate>`.
11
11
  - Pass the generated application through the UI as the sole business state. Do not add repositories, SQLite
12
12
  mirrors, runtime hosts, session providers, custom sync, ID stores, or replacement aggregate versions.
13
+ - Treat `nomos.identity.usda` as the compiler-owned memory of committed identity. Do not edit stable IDs or
14
+ pass deployment waivers. When compile identifies a real breaking change, declare it separately in
15
+ `evolutions/<domain>/**/*.evolution.ts`; additions and inferred renames need no evolution file.
13
16
 
14
17
  ```bash
15
18
  npm run compile
16
19
  npm run proof
20
+ # After the first deployed model, prove the candidate over copied real custody too:
21
+ npx githolon proof --upgrade
17
22
  ```
18
23
 
24
+ `compile` is the evolution gate. `proof` exercises the emitted candidate in the real local kernel, including
25
+ cold custody restore. `proof --upgrade` resolves the workspace already bound in `nomos.project.ts`, copies
26
+ its custody into a disposable local kernel, replays the candidate over the exact history, promotes it only
27
+ in that copy, and cold-opens the result. If history changes meaning, it stops for an explicit
28
+ `--acceptance-reason`; never invent one. Never make deployment the first place a candidate law is executed.
29
+
19
30
  If either command exposes framework implementation machinery, treat that as a Nomos defect rather than
20
31
  teaching the application to handle it.
@@ -63,9 +63,42 @@ npm run proof
63
63
  real local engine, discards resident state, restores it from durable custody, verifies its history, and reads
64
64
  the business world back.
65
65
 
66
+ From the second compile onward, `compile` also compares the candidate with the committed
67
+ `nomos.identity.usda`. Additions and inferred renames pass automatically. A removal, contract change, or
68
+ merge-driver change stops locally with the exact declaration path and the evolution it needs; it cannot
69
+ quietly become a deployment problem. Put that separate concern in
70
+ `evolutions/<domain>/**/*.evolution.ts`, for example:
71
+
72
+ ```ts
73
+ import { Lww, evolution, formerAggregate, retirement, t } from "@githolon/dsl";
74
+ import { Asset } from "../../domains/estate.js";
75
+
76
+ const formerAsset = formerAggregate("Asset", ["legacyCode"] as const);
77
+ export const retireLegacyCode = retirement(formerAsset.fields.legacyCode);
78
+
79
+ const formerName = t.enum(["unnamed", "named"] as const).merge(Lww);
80
+ export const evolveAssetName = evolution(Asset, "name")
81
+ .from(formerName, value => value === "unnamed" ? "Unnamed asset" : "Named asset");
82
+ ```
83
+
84
+ These files are discovered by compile and editor checks but are never loaded as application plans. Keep the
85
+ updated identity file beside the domain source, run `proof`, and deploy only those locally proven bytes.
86
+
87
+ Before upgrading an existing application, run the history-shaped proof as well:
88
+
89
+ ```bash
90
+ npx githolon proof --upgrade
91
+ ```
92
+
93
+ It uses the workspace binding in `nomos.project.ts` (or accepts a workspace/local-ledger argument), copies
94
+ that custody into the local kernel, exercises the candidate against its exact history, promotes only in the
95
+ copy, and proves a cold restart. The source is never modified. If the candidate deliberately changes an old
96
+ business outcome, the command names the differences and requires an accountable `--acceptance-reason`.
97
+
66
98
  Useful files:
67
99
 
68
100
  - [`domains/estate.ts`](domains/estate.ts): nouns, private consequences, and public language;
101
+ - `evolutions/`: explicit transitions from previously committed business law;
69
102
  - [`nomos.project.ts`](nomos.project.ts): typed business-law authoring input; it emits the readable USDA law closure and its `.law.usdz` package;
70
103
  - [`nomos.application.ts`](nomos.application.ts): application-composition authoring input; only the emitted `.application.usda` travels;
71
104
  - `build/application/__APP_DART_NAME___application/`: the sole Flutter application dependency;