castle-web-cli 0.4.45 → 0.4.46
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/dist/agent-prompts.js +2 -2
- package/kits/basic-2d/CLAUDE.md +1 -0
- package/package.json +1 -1
package/dist/agent-prompts.js
CHANGED
|
@@ -113,7 +113,7 @@ export function buildTaskPrompt(opts) {
|
|
|
113
113
|
const wrapUp = opts.backend === 'claude'
|
|
114
114
|
? `\n- Wrap up in ONE tool call, not several: once your last file edit is done, combine the 90-progress write, the final \`npm run restart\`, and writing the notes file into a single shell command (\`;\`-separated so the notes land even if the restart hiccups). Then stop -- no extra turns after it.`
|
|
115
115
|
: '';
|
|
116
|
-
return `You are a background build agent for the Castle deck "${opts.deckLabel}" (current directory). A separate conversation agent dispatched you with one task.
|
|
116
|
+
return `You are a background build agent for the Castle deck "${opts.deckLabel}" (current directory). A separate conversation agent dispatched you with one task. Follow the deck's CLAUDE.md / AGENTS.md conventions, and reload the served deck after changes (\`npm run restart\`).
|
|
117
117
|
|
|
118
118
|
Your task (id ${opts.taskId}): ${opts.title}
|
|
119
119
|
|
|
@@ -127,7 +127,7 @@ Operating rules:
|
|
|
127
127
|
- Other task agents may be editing this same deck IN PARALLEL. When you change an existing file, READ it first and make a targeted edit to just the part you need -- never overwrite a whole file you have not read. A blind full-file rewrite clobbers other agents' in-flight changes. Being a bit slower and careful here is the right tradeoff.
|
|
128
128
|
- Favor real, editable assets: for game objects, characters, and scenery, make drawings (drawings/*.drawing pixel art) and place them as real actors in the scene rather than code-drawn shapes -- it keeps the deck editable in the editor and remixable. (Data-driven UI like health bars, score/text, and HUD gauges, plus dynamic things like bullets/particles/effects, stay procedural -- don't force those into drawings.)
|
|
129
129
|
- Update your progress VERY frequently: write a bare integer 0-100 to ${opts.progressPath} (e.g. \`echo 30 > ${opts.progressPath}\`) every time you advance -- at least every 10 points, or every 20 for properly small tasks. Start near 10, write 90 just before wrapping up. Never let it sit stale while you work.
|
|
130
|
-
- Before finishing, write ${opts.notesPath}: a SHORT test guide for the user -- 2
|
|
130
|
+
- Before finishing, write ${opts.notesPath}: a SHORT test guide for the user -- 1-2 sentences (a 3rd only if it really merits). Lead with exactly what to try in the running deck; mention a blocker or open question if you hit one. NO file-by-file implementation detail, no code names unless the user needs them to test. The user reads this verbatim when checking your work off.${wrapUp}
|
|
131
131
|
- If you are truly blocked, write the blocker to the notes file and stop rather than guessing wildly.
|
|
132
132
|
- Never touch files under .castle/ other than those two paths.`;
|
|
133
133
|
}
|
package/kits/basic-2d/CLAUDE.md
CHANGED
|
@@ -17,6 +17,7 @@ The deck is already serving when you start (`castle-web init` set that up; see `
|
|
|
17
17
|
1. **Build incrementally.** Start with the smallest playable thing (one mechanic, one scene change), `npm run restart`, then add the next piece. Do NOT write the whole game in one shot.
|
|
18
18
|
2. **After every edit:** `npm run restart` (no hot reload). The served page refreshes and the user sees the change.
|
|
19
19
|
3. **Prefer real, editable assets.** For game objects, characters, and scenery, make actual drawings (`drawings/*.drawing`) and place them as real actors in `scenes/*.scene` — not shapes drawn in code. Real assets let the creator move and re-skin things in the editor and let other creators remix the deck. Data-driven UI (health bars, score/text, HUD gauges) and dynamic things (bullets, particles, effects) are correctly procedural/code — don't force those into drawings.
|
|
20
|
+
4. **Separate scenes per screen.** Use a separate `scenes/*.scene` file for each distinct screen — menu/title, each level, game-over, etc. — not one mega-scene. Each stays independently editable in the editor. Switch at runtime with `scene.load(targetSceneData)`; wire the transition deck-side (e.g. import the target `.scene` JSON and call `scene.load` on play / win / level change).
|
|
20
21
|
|
|
21
22
|
Card size is **500 wide × 700 tall** (origin top-left, +y is down).
|
|
22
23
|
|