create-shallot 0.8.0 → 0.9.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/index.ts +18 -5
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -9,8 +9,8 @@ import { dirname, join, resolve } from "path";
9
9
  *
10
10
  * the project is pure data — a `shallot.json` manifest + plugin modules + `public/`, no vite
11
11
  * boilerplate. the CLI provides every harness over it: `shallot dev` runs it standalone with hot
12
- * reload, `shallot build` ships it (web + native targets). the emitted CLAUDE.md / AGENTS.md point an
13
- * agent at the installed engine's contract.
12
+ * reload, `shallot build` ships it (web + native targets). the emitted AGENTS.md points an agent at
13
+ * the installed engine's contract, and CLAUDE.md imports it.
14
14
  */
15
15
  export function template(name: string): Record<string, string> {
16
16
  return {
@@ -23,8 +23,8 @@ export function template(name: string): Record<string, string> {
23
23
  version: "0.0.0",
24
24
  private: true,
25
25
  type: "module",
26
- dependencies: { "@dylanebert/shallot": "latest" },
27
- devDependencies: { typescript: "^7.0.2" },
26
+ dependencies: { "@dylanebert/shallot": "latest", typegpu: "~0.11.9" },
27
+ devDependencies: { "unplugin-typegpu": "~0.11.6", typescript: "^7.0.2" },
28
28
  },
29
29
  null,
30
30
  2,
@@ -53,10 +53,21 @@ export function template(name: string): Record<string, string> {
53
53
  "public/scenes/scene.scene": SCENE,
54
54
  "README.md": readme(name),
55
55
  "AGENTS.md": agents(name),
56
- "CLAUDE.md": agents(name),
56
+ "CLAUDE.md": CLAUDE_IMPORT,
57
57
  };
58
58
  }
59
59
 
60
+ // one contract, two entrypoints: Codex reads AGENTS.md, Claude Code reads CLAUDE.md and expands the
61
+ // `@`-import. An import, not a symlink — a Windows checkout without developer mode gets a literal
62
+ // text file from a symlink. The trailing sentence is the cost of that choice: the import expands only
63
+ // for a session rooted in this file's own directory, so opened from a parent the line is literal text
64
+ // and the prose pointer is all the reader gets. Kept identical to the copy-out's stanza in
65
+ // `packages/shallot/bin/scaffold.ts`.
66
+ const CLAUDE_IMPORT = `@AGENTS.md
67
+
68
+ If the import line above is showing as literal text, this file was loaded from a parent directory; read the AGENTS.md next to this file before working here.
69
+ `;
70
+
60
71
  /** write a template file map under dir, creating parent directories as needed. */
61
72
  export function scaffold(dir: string, files: Record<string, string>): void {
62
73
  for (const [rel, content] of Object.entries(files)) {
@@ -145,6 +156,8 @@ The engine is the documentation. Read \`node_modules/@dylanebert/shallot/AGENTS.
145
156
  contract (ECS, plugins, scenes, GPU, UI, and the \`shallot verify\` harness), and every public export
146
157
  carries JSDoc. The examples index lives at \`node_modules/@dylanebert/shallot/examples/AGENTS.md\` — grep
147
158
  it for the problem you have, then read that recipe's source, before writing a pattern from scratch.
159
+ \`bunx shallot recipe <name> [dir]\` copies a recipe out of the installed package into a runnable project
160
+ (bare: lists them).
148
161
 
149
162
  ## Conventions
150
163
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-shallot",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "bin": "./index.ts",
6
6
  "files": ["index.ts"],