create-githolon 0.51.0 → 0.53.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.
package/index.mjs CHANGED
@@ -55,6 +55,14 @@ cpSync(TEMPLATE, targetDir, { recursive: true });
55
55
  // and the scaffold restores the dot.
56
56
  renameSync(path.join(targetDir, "gitignore"), path.join(targetDir, ".gitignore"));
57
57
 
58
+ // Same dotfile-restore for the VS Code workspace recommendation: the template ships
59
+ // `vscode/` (no dot; a leading-dot dir does not reliably survive `npm publish`), and
60
+ // the scaffold restores `.vscode/` so opening the project prompts installing the
61
+ // Nomos Law extension (the author-time check gate as red squiggles while typing).
62
+ if (existsSync(path.join(targetDir, "vscode"))) {
63
+ renameSync(path.join(targetDir, "vscode"), path.join(targetDir, ".vscode"));
64
+ }
65
+
58
66
  // Parameterize the scaffold to the app name. The generated typed client + its baked
59
67
  // hash const are NAMED off the package name (`__APP_NAME__`): the artifact filename
60
68
  // keeps the raw name (build/<app>.client.ts), the hash SYMBOL normalizes it to
@@ -62,7 +70,7 @@ renameSync(path.join(targetDir, "gitignore"), path.join(targetDir, ".gitignore")
62
70
  // client FACTORY (`todoClient`) is named off the DOMAIN key, which stays `todo`.
63
71
  const appHash = `${appName.replace(/[-\s]+/g, "_").replace(/([a-z0-9])([A-Z])/g, "$1_$2").toUpperCase()}_DOMAIN_HASH`;
64
72
  const subst = (s) => s.replaceAll("__APP_NAME__", appName).replaceAll("__APP_HASH__", appHash);
65
- for (const f of ["package.json", "README.md", "nomos.package.mjs", "domains/todo.ts", "test/e2e.mts"]) {
73
+ for (const f of ["package.json", "README.md", "nomos.package.mjs", "CLAUDE.md", "domains/todo.ts", "test/e2e.mts"]) {
66
74
  const p = path.join(targetDir, f);
67
75
  if (existsSync(p)) writeFileSync(p, subst(readFileSync(p, "utf8")), "utf8");
68
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-githolon",
3
- "version": "0.51.0",
3
+ "version": "0.53.0",
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",
@@ -0,0 +1,36 @@
1
+ # __APP_NAME__ — Nomos domain package
2
+
3
+ A local-first Nomos domain: law authored in the `@githolon/dsl` TypeScript DSL under
4
+ `domains/`, compiled into ONE deterministic GitHolon artifact, deployed to a workspace.
5
+ Read `docs/01-mental-model.md` first — the docs travel with this repo, offline.
6
+
7
+ ## For AI agents
8
+
9
+ This project's law is guarded by an author-time gate (static twins). Use it:
10
+
11
+ - **Lint the law** — before compiling or deploying, run the gate over `nomos.package.mjs`:
12
+
13
+ ```bash
14
+ npx githolon check # human report; exits non-zero on any REFUSE
15
+ npx githolon check --json # the findings as a machine-readable array (file:line)
16
+ ```
17
+
18
+ - **Preview a law evolution** — before deploying a change to already-deployed law, diff
19
+ against the prior deployed law and paste any generated `dispositions` block:
20
+
21
+ ```bash
22
+ npx githolon check --against build/<name>.deploy.json
23
+ ```
24
+
25
+ - **Editor / agent diagnostics** — `npx githolon lsp` is a standard stdio Language Server
26
+ (red squiggles as you write law). For Claude Code, the `nomos-law` plugin ships it as a
27
+ plugin LSP; for Codex or other MCP clients, `githolon mcp` exposes the same gate as the
28
+ `nomos_check` and `nomos_evolve_preview` tools (`codex mcp add nomos -- githolon mcp`).
29
+
30
+ ## The loop
31
+
32
+ ```bash
33
+ npx githolon compile # → build/: deployable package + typed client + a generated proof
34
+ npx githolon proof # run that proof offline on a local holon
35
+ npx githolon deploy <ws>
36
+ ```
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["captain-app.nomos-law"]
3
+ }