create-githolon 0.1.3 → 0.1.4
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 +1 -1
- package/template/README.md +28 -0
package/package.json
CHANGED
package/template/README.md
CHANGED
|
@@ -43,6 +43,34 @@ After birth, `holon/` tracks YOUR workspace: new writes admitted on main arrive
|
|
|
43
43
|
with `git pull`. (`githolon git setup` installed a git credential helper, so plain
|
|
44
44
|
git just works against the cloud.)
|
|
45
45
|
|
|
46
|
+
## Make it YOURS — the five-minute walkthrough
|
|
47
|
+
|
|
48
|
+
The starter is the tutorial; this is the exact path from guestbook to your own law.
|
|
49
|
+
|
|
50
|
+
1. **Rename the law file** and reshape it:
|
|
51
|
+
`git mv domains/guestbook.ts domains/<yours>.ts` — keep the patterns
|
|
52
|
+
(aggregate fields each tagged a merge driver; directives = zod payload → pure
|
|
53
|
+
plan; `addToSet` for AddWins sets — `set()` on a set field is refused).
|
|
54
|
+
2. **Point the compile config at it** — `nomos.package.mjs`:
|
|
55
|
+
```js
|
|
56
|
+
export default { name: "<pkg>", domains: [{ key: "<pkg>", modules: ["./domains/<yours>.ts"] }] };
|
|
57
|
+
```
|
|
58
|
+
**Naming convention:** make `<pkg>` ONE lowercase word (`potluck`, `studygroup`).
|
|
59
|
+
It becomes the generated symbols verbatim: `build/<pkg>.client.ts` exporting
|
|
60
|
+
`<pkg>Client(holon)` and `<PKG>_DOMAIN_HASH`.
|
|
61
|
+
3. **Compile and read what you built:**
|
|
62
|
+
```bash
|
|
63
|
+
npx githolon compile && cat build/<pkg>.summary.txt
|
|
64
|
+
```
|
|
65
|
+
4. **Re-point the proof** — in `test/e2e.mts`, update the client import and the
|
|
66
|
+
directive/query/count names to yours; `npm run typecheck` names every stale
|
|
67
|
+
reference until it's clean.
|
|
68
|
+
5. **Prove it live:** `npm run e2e` — your law deploys to a throwaway workspace,
|
|
69
|
+
an offline write syncs through admission, the cloud answers your declared
|
|
70
|
+
query and count, and two blind clients prove the AddWins merge.
|
|
71
|
+
|
|
72
|
+
Then deploy it for real: `npx githolon login --agent && npx githolon ws create <ws> && npx githolon deploy <ws>`.
|
|
73
|
+
|
|
46
74
|
## What's here
|
|
47
75
|
|
|
48
76
|
- `domains/guestbook.ts` — the starter domain (the law): one aggregate, two
|