forgecraft-mcp 1.2.0 → 1.3.2
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/README.md +525 -525
- package/dist/cli/help.js +44 -44
- package/dist/registry/renderer-skeletons.js +92 -92
- package/dist/shared/gs-score-logger.js +6 -6
- package/dist/tools/add-module.js +123 -123
- package/dist/tools/advice-registry.js +18 -18
- package/dist/tools/check-cascade-report.js +64 -64
- package/dist/tools/configure-mcp.d.ts +3 -0
- package/dist/tools/configure-mcp.d.ts.map +1 -1
- package/dist/tools/configure-mcp.js +10 -0
- package/dist/tools/configure-mcp.js.map +1 -1
- package/dist/tools/forgecraft-dispatch.d.ts.map +1 -1
- package/dist/tools/forgecraft-dispatch.js +3 -0
- package/dist/tools/forgecraft-dispatch.js.map +1 -1
- package/dist/tools/forgecraft-schema-params.d.ts +9 -0
- package/dist/tools/forgecraft-schema-params.d.ts.map +1 -1
- package/dist/tools/forgecraft-schema-params.js +21 -0
- package/dist/tools/forgecraft-schema-params.js.map +1 -1
- package/dist/tools/forgecraft-schema.d.ts +9 -0
- package/dist/tools/forgecraft-schema.d.ts.map +1 -1
- package/dist/tools/refresh-output.js +14 -14
- package/dist/tools/scaffold-spec-stubs.js +115 -115
- package/dist/tools/scaffold-templates.js +62 -62
- package/dist/tools/setup-artifact-writers.d.ts +30 -0
- package/dist/tools/setup-artifact-writers.d.ts.map +1 -1
- package/dist/tools/setup-artifact-writers.js +120 -8
- package/dist/tools/setup-artifact-writers.js.map +1 -1
- package/dist/tools/setup-phase1.d.ts +3 -0
- package/dist/tools/setup-phase1.d.ts.map +1 -1
- package/dist/tools/setup-phase1.js +79 -35
- package/dist/tools/setup-phase1.js.map +1 -1
- package/dist/tools/setup-phase2.d.ts +2 -0
- package/dist/tools/setup-phase2.d.ts.map +1 -1
- package/dist/tools/setup-phase2.js +10 -1
- package/dist/tools/setup-phase2.js.map +1 -1
- package/dist/tools/setup-project.d.ts +18 -0
- package/dist/tools/setup-project.d.ts.map +1 -1
- package/dist/tools/setup-project.js +77 -1
- package/dist/tools/setup-project.js.map +1 -1
- package/dist/tools/spec-parser-tags.d.ts +9 -0
- package/dist/tools/spec-parser-tags.d.ts.map +1 -1
- package/dist/tools/spec-parser-tags.js +92 -0
- package/dist/tools/spec-parser-tags.js.map +1 -1
- package/package.json +89 -86
- package/templates/analytics/instructions.yaml +37 -37
- package/templates/analytics/mcp-servers.yaml +11 -11
- package/templates/analytics/structure.yaml +25 -25
- package/templates/api/instructions.yaml +231 -231
- package/templates/api/mcp-servers.yaml +22 -13
- package/templates/api/nfr.yaml +23 -23
- package/templates/api/review.yaml +103 -103
- package/templates/api/structure.yaml +34 -34
- package/templates/api/verification.yaml +132 -132
- package/templates/cli/instructions.yaml +31 -31
- package/templates/cli/mcp-servers.yaml +11 -11
- package/templates/cli/review.yaml +53 -53
- package/templates/cli/structure.yaml +16 -16
- package/templates/data-lineage/instructions.yaml +28 -28
- package/templates/data-lineage/mcp-servers.yaml +22 -22
- package/templates/data-pipeline/instructions.yaml +84 -84
- package/templates/data-pipeline/mcp-servers.yaml +13 -13
- package/templates/data-pipeline/nfr.yaml +39 -39
- package/templates/data-pipeline/structure.yaml +23 -23
- package/templates/fintech/hooks.yaml +55 -55
- package/templates/fintech/instructions.yaml +112 -112
- package/templates/fintech/mcp-servers.yaml +13 -13
- package/templates/fintech/nfr.yaml +46 -46
- package/templates/fintech/playbook.yaml +210 -210
- package/templates/fintech/verification.yaml +239 -239
- package/templates/game/instructions.yaml +289 -289
- package/templates/game/mcp-servers.yaml +38 -38
- package/templates/game/nfr.yaml +64 -64
- package/templates/game/playbook.yaml +214 -214
- package/templates/game/review.yaml +97 -97
- package/templates/game/structure.yaml +67 -67
- package/templates/game/verification.yaml +174 -174
- package/templates/healthcare/instructions.yaml +42 -42
- package/templates/healthcare/mcp-servers.yaml +13 -13
- package/templates/healthcare/nfr.yaml +47 -47
- package/templates/hipaa/instructions.yaml +41 -41
- package/templates/hipaa/mcp-servers.yaml +13 -13
- package/templates/infra/instructions.yaml +104 -104
- package/templates/infra/mcp-servers.yaml +20 -20
- package/templates/infra/nfr.yaml +46 -46
- package/templates/infra/review.yaml +65 -65
- package/templates/infra/structure.yaml +25 -25
- package/templates/library/instructions.yaml +36 -36
- package/templates/library/mcp-servers.yaml +20 -20
- package/templates/library/review.yaml +56 -56
- package/templates/library/structure.yaml +19 -19
- package/templates/medallion-architecture/instructions.yaml +41 -41
- package/templates/medallion-architecture/mcp-servers.yaml +22 -22
- package/templates/ml/instructions.yaml +85 -85
- package/templates/ml/mcp-servers.yaml +11 -11
- package/templates/ml/nfr.yaml +39 -39
- package/templates/ml/structure.yaml +25 -25
- package/templates/ml/verification.yaml +156 -156
- package/templates/mobile/instructions.yaml +44 -44
- package/templates/mobile/mcp-servers.yaml +11 -11
- package/templates/mobile/nfr.yaml +49 -49
- package/templates/mobile/structure.yaml +27 -27
- package/templates/mobile/verification.yaml +121 -121
- package/templates/observability-xray/instructions.yaml +40 -40
- package/templates/observability-xray/mcp-servers.yaml +15 -15
- package/templates/realtime/instructions.yaml +42 -42
- package/templates/realtime/mcp-servers.yaml +13 -13
- package/templates/soc2/instructions.yaml +41 -41
- package/templates/soc2/mcp-servers.yaml +24 -24
- package/templates/social/instructions.yaml +43 -43
- package/templates/social/mcp-servers.yaml +24 -24
- package/templates/state-machine/instructions.yaml +42 -42
- package/templates/state-machine/mcp-servers.yaml +11 -11
- package/templates/tools-registry.yaml +164 -164
- package/templates/universal/hooks.yaml +531 -531
- package/templates/universal/instructions.yaml +1692 -1692
- package/templates/universal/mcp-servers.yaml +50 -50
- package/templates/universal/nfr.yaml +197 -197
- package/templates/universal/reference.yaml +326 -326
- package/templates/universal/review.yaml +204 -204
- package/templates/universal/skills.yaml +262 -262
- package/templates/universal/structure.yaml +67 -67
- package/templates/universal/verification.yaml +416 -416
- package/templates/web-react/hooks.yaml +44 -44
- package/templates/web-react/instructions.yaml +207 -207
- package/templates/web-react/mcp-servers.yaml +20 -20
- package/templates/web-react/nfr.yaml +27 -27
- package/templates/web-react/review.yaml +94 -94
- package/templates/web-react/structure.yaml +46 -46
- package/templates/web-react/verification.yaml +126 -126
- package/templates/web-static/instructions.yaml +115 -115
- package/templates/web-static/mcp-servers.yaml +20 -20
- package/templates/web3/instructions.yaml +44 -44
- package/templates/web3/mcp-servers.yaml +11 -11
- package/templates/web3/verification.yaml +159 -159
- package/templates/zero-trust/instructions.yaml +41 -41
- package/templates/zero-trust/mcp-servers.yaml +15 -15
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
tag: GAME
|
|
2
|
-
section: mcp-servers
|
|
3
|
-
servers:
|
|
4
|
-
- name: unity-mcp
|
|
5
|
-
description: "Unity Editor integration — scene management, asset control, code generation"
|
|
6
|
-
command: npx
|
|
7
|
-
args: ["-y", "@anthropic/unity-mcp"]
|
|
8
|
-
tags: [GAME]
|
|
9
|
-
category: game-engine
|
|
10
|
-
tier: recommended
|
|
11
|
-
url: "https://github.com/CoplayDev/unity-mcp"
|
|
12
|
-
|
|
13
|
-
- name: playwright-mcp
|
|
14
|
-
description: "Headless browser automation for web game integration testing — input simulation, screenshot comparison, frame-rate capture"
|
|
15
|
-
command: npx
|
|
16
|
-
args: ["-y", "@playwright/mcp"]
|
|
17
|
-
tags: [GAME]
|
|
18
|
-
category: testing
|
|
19
|
-
tier: recommended
|
|
20
|
-
url: "https://github.com/microsoft/playwright-mcp"
|
|
21
|
-
|
|
22
|
-
- name: puppeteer-mcp
|
|
23
|
-
description: "Chrome DevTools Protocol access for web game profiling — CPU flame charts, heap snapshots, GPU memory audits"
|
|
24
|
-
command: npx
|
|
25
|
-
args: ["-y", "@modelcontextprotocol/server-puppeteer"]
|
|
26
|
-
tags: [GAME]
|
|
27
|
-
category: testing
|
|
28
|
-
tier: recommended
|
|
29
|
-
url: "https://github.com/modelcontextprotocol/servers/tree/main/src/puppeteer"
|
|
30
|
-
|
|
31
|
-
- name: filesystem-mcp
|
|
32
|
-
description: "Local asset pipeline access — read/write texture atlases, tilemaps, GLTF files, and audio assets"
|
|
33
|
-
command: npx
|
|
34
|
-
args: ["-y", "@modelcontextprotocol/server-filesystem"]
|
|
35
|
-
tags: [GAME]
|
|
36
|
-
category: filesystem
|
|
37
|
-
tier: recommended
|
|
38
|
-
url: "https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem"
|
|
1
|
+
tag: GAME
|
|
2
|
+
section: mcp-servers
|
|
3
|
+
servers:
|
|
4
|
+
- name: unity-mcp
|
|
5
|
+
description: "Unity Editor integration — scene management, asset control, code generation"
|
|
6
|
+
command: npx
|
|
7
|
+
args: ["-y", "@anthropic/unity-mcp"]
|
|
8
|
+
tags: [GAME]
|
|
9
|
+
category: game-engine
|
|
10
|
+
tier: recommended
|
|
11
|
+
url: "https://github.com/CoplayDev/unity-mcp"
|
|
12
|
+
|
|
13
|
+
- name: playwright-mcp
|
|
14
|
+
description: "Headless browser automation for web game integration testing — input simulation, screenshot comparison, frame-rate capture"
|
|
15
|
+
command: npx
|
|
16
|
+
args: ["-y", "@playwright/mcp"]
|
|
17
|
+
tags: [GAME]
|
|
18
|
+
category: testing
|
|
19
|
+
tier: recommended
|
|
20
|
+
url: "https://github.com/microsoft/playwright-mcp"
|
|
21
|
+
|
|
22
|
+
- name: puppeteer-mcp
|
|
23
|
+
description: "Chrome DevTools Protocol access for web game profiling — CPU flame charts, heap snapshots, GPU memory audits"
|
|
24
|
+
command: npx
|
|
25
|
+
args: ["-y", "@modelcontextprotocol/server-puppeteer"]
|
|
26
|
+
tags: [GAME]
|
|
27
|
+
category: testing
|
|
28
|
+
tier: recommended
|
|
29
|
+
url: "https://github.com/modelcontextprotocol/servers/tree/main/src/puppeteer"
|
|
30
|
+
|
|
31
|
+
- name: filesystem-mcp
|
|
32
|
+
description: "Local asset pipeline access — read/write texture atlases, tilemaps, GLTF files, and audio assets"
|
|
33
|
+
command: npx
|
|
34
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem"]
|
|
35
|
+
tags: [GAME]
|
|
36
|
+
category: filesystem
|
|
37
|
+
tier: recommended
|
|
38
|
+
url: "https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem"
|
package/templates/game/nfr.yaml
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
tag: GAME
|
|
2
|
-
section: nfr
|
|
3
|
-
blocks:
|
|
4
|
-
- id: web-game-frame-rate
|
|
5
|
-
tier: recommended
|
|
6
|
-
title: "Frame Rate & Loop"
|
|
7
|
-
content: |
|
|
8
|
-
## NFR: Frame Rate & Game Loop
|
|
9
|
-
|
|
10
|
-
### Targets
|
|
11
|
-
- Desktop: stable 60 FPS with < 1% frame drop rate during 10-minute sessions.
|
|
12
|
-
- Mobile web: stable 30 FPS with graceful quality reduction; 60 FPS on flagship devices.
|
|
13
|
-
- Frame budget: < 6ms JavaScript CPU time per 16ms frame (Chrome Performance panel).
|
|
14
|
-
|
|
15
|
-
### Measurement
|
|
16
|
-
- Instrument `Stats.js` (or FPS overlay) in development builds. Log frame overruns > 20ms.
|
|
17
|
-
- Automated frame-rate regression test: headless Chromium via Puppeteer records 300 frames; test fails if p95 frame time > 20ms.
|
|
18
|
-
|
|
19
|
-
- id: web-game-memory
|
|
20
|
-
tier: recommended
|
|
21
|
-
title: "Memory Management"
|
|
22
|
-
content: |
|
|
23
|
-
## NFR: Memory Management
|
|
24
|
-
|
|
25
|
-
### Targets
|
|
26
|
-
- JS heap: < 256 MB on mobile, < 512 MB on desktop.
|
|
27
|
-
- GPU VRAM: < 128 MB texture budget for mobile-targeted games.
|
|
28
|
-
- Zero texture / geometry leaks across scene transitions (verified with WeakRef probes).
|
|
29
|
-
|
|
30
|
-
### Rules
|
|
31
|
-
- All GPU resources disposed on scene exit: textures, geometries, materials, render targets, audio nodes.
|
|
32
|
-
- Object pools for all frequently-allocated game objects: bullets, particles, tweens, sound instances.
|
|
33
|
-
- GC-free hot path: no array spread, no object construction in the update loop critical section.
|
|
34
|
-
|
|
35
|
-
- id: web-game-loading
|
|
36
|
-
tier: recommended
|
|
37
|
-
title: "Asset Loading & Time-to-Play"
|
|
38
|
-
content: |
|
|
39
|
-
## NFR: Asset Loading
|
|
40
|
-
|
|
41
|
-
### Targets
|
|
42
|
-
- Initial load to main menu: < 5 seconds on a 10 Mbps connection.
|
|
43
|
-
- Level transition: < 2 seconds (background loading during gameplay).
|
|
44
|
-
- First interactive frame: < 1 second (boot scene, no heavy assets).
|
|
45
|
-
|
|
46
|
-
### Asset Compression
|
|
47
|
-
- Atlas textures in KTX2 / Basis Universal: 4–8× smaller GPU upload + lower VRAM than PNG.
|
|
48
|
-
- Audio in Opus (ogg container) + AAC (mp4 fallback) — 20–40% smaller than MP3 at equivalent quality.
|
|
49
|
-
- All static assets served with `Cache-Control: public, max-age=31536000, immutable` from CDN.
|
|
50
|
-
|
|
51
|
-
- id: web-game-input-latency
|
|
52
|
-
tier: recommended
|
|
53
|
-
title: "Input Latency"
|
|
54
|
-
content: |
|
|
55
|
-
## NFR: Input Latency
|
|
56
|
-
|
|
57
|
-
### Targets
|
|
58
|
-
- Input-to-frame response: ≤ 1 frame (~16ms) for keyboard and gamepad input.
|
|
59
|
-
- Touch gesture registration: < 50ms from `pointerdown` event to visual feedback.
|
|
60
|
-
|
|
61
|
-
### Rules
|
|
62
|
-
- `pointer` events only — no separate mouse/touch dual handlers.
|
|
63
|
-
- Canvas CSS: `touch-action: none; user-select: none` to prevent browser gesture interference.
|
|
64
|
-
- Input polling happens at start of each fixed update, not in event callbacks (prevents frame-split input state).
|
|
1
|
+
tag: GAME
|
|
2
|
+
section: nfr
|
|
3
|
+
blocks:
|
|
4
|
+
- id: web-game-frame-rate
|
|
5
|
+
tier: recommended
|
|
6
|
+
title: "Frame Rate & Loop"
|
|
7
|
+
content: |
|
|
8
|
+
## NFR: Frame Rate & Game Loop
|
|
9
|
+
|
|
10
|
+
### Targets
|
|
11
|
+
- Desktop: stable 60 FPS with < 1% frame drop rate during 10-minute sessions.
|
|
12
|
+
- Mobile web: stable 30 FPS with graceful quality reduction; 60 FPS on flagship devices.
|
|
13
|
+
- Frame budget: < 6ms JavaScript CPU time per 16ms frame (Chrome Performance panel).
|
|
14
|
+
|
|
15
|
+
### Measurement
|
|
16
|
+
- Instrument `Stats.js` (or FPS overlay) in development builds. Log frame overruns > 20ms.
|
|
17
|
+
- Automated frame-rate regression test: headless Chromium via Puppeteer records 300 frames; test fails if p95 frame time > 20ms.
|
|
18
|
+
|
|
19
|
+
- id: web-game-memory
|
|
20
|
+
tier: recommended
|
|
21
|
+
title: "Memory Management"
|
|
22
|
+
content: |
|
|
23
|
+
## NFR: Memory Management
|
|
24
|
+
|
|
25
|
+
### Targets
|
|
26
|
+
- JS heap: < 256 MB on mobile, < 512 MB on desktop.
|
|
27
|
+
- GPU VRAM: < 128 MB texture budget for mobile-targeted games.
|
|
28
|
+
- Zero texture / geometry leaks across scene transitions (verified with WeakRef probes).
|
|
29
|
+
|
|
30
|
+
### Rules
|
|
31
|
+
- All GPU resources disposed on scene exit: textures, geometries, materials, render targets, audio nodes.
|
|
32
|
+
- Object pools for all frequently-allocated game objects: bullets, particles, tweens, sound instances.
|
|
33
|
+
- GC-free hot path: no array spread, no object construction in the update loop critical section.
|
|
34
|
+
|
|
35
|
+
- id: web-game-loading
|
|
36
|
+
tier: recommended
|
|
37
|
+
title: "Asset Loading & Time-to-Play"
|
|
38
|
+
content: |
|
|
39
|
+
## NFR: Asset Loading
|
|
40
|
+
|
|
41
|
+
### Targets
|
|
42
|
+
- Initial load to main menu: < 5 seconds on a 10 Mbps connection.
|
|
43
|
+
- Level transition: < 2 seconds (background loading during gameplay).
|
|
44
|
+
- First interactive frame: < 1 second (boot scene, no heavy assets).
|
|
45
|
+
|
|
46
|
+
### Asset Compression
|
|
47
|
+
- Atlas textures in KTX2 / Basis Universal: 4–8× smaller GPU upload + lower VRAM than PNG.
|
|
48
|
+
- Audio in Opus (ogg container) + AAC (mp4 fallback) — 20–40% smaller than MP3 at equivalent quality.
|
|
49
|
+
- All static assets served with `Cache-Control: public, max-age=31536000, immutable` from CDN.
|
|
50
|
+
|
|
51
|
+
- id: web-game-input-latency
|
|
52
|
+
tier: recommended
|
|
53
|
+
title: "Input Latency"
|
|
54
|
+
content: |
|
|
55
|
+
## NFR: Input Latency
|
|
56
|
+
|
|
57
|
+
### Targets
|
|
58
|
+
- Input-to-frame response: ≤ 1 frame (~16ms) for keyboard and gamepad input.
|
|
59
|
+
- Touch gesture registration: < 50ms from `pointerdown` event to visual feedback.
|
|
60
|
+
|
|
61
|
+
### Rules
|
|
62
|
+
- `pointer` events only — no separate mouse/touch dual handlers.
|
|
63
|
+
- Canvas CSS: `touch-action: none; user-select: none` to prevent browser gesture interference.
|
|
64
|
+
- Input polling happens at start of each fixed update, not in event callbacks (prevents frame-split input state).
|
|
@@ -1,214 +1,214 @@
|
|
|
1
|
-
tag: GAME
|
|
2
|
-
section: playbook
|
|
3
|
-
title: "Game Design, Balance & Art Pipeline"
|
|
4
|
-
description: >
|
|
5
|
-
An agent-driven pipeline for game design, mechanics balancing, and art production.
|
|
6
|
-
Covers headless balance simulation, economy tuning, and art asset generation
|
|
7
|
-
via both local (Stable Diffusion) and paid API providers (DALL·E, Midjourney-compatible).
|
|
8
|
-
Run this playbook when designing new systems, balancing existing ones, or bootstrapping
|
|
9
|
-
art assets before a dedicated artist is available.
|
|
10
|
-
|
|
11
|
-
phases:
|
|
12
|
-
|
|
13
|
-
- id: mechanics-specification
|
|
14
|
-
title: "Mechanics Specification"
|
|
15
|
-
rationale: >
|
|
16
|
-
Balance simulation is meaningless without a precise formal specification of the
|
|
17
|
-
mechanics. Vague descriptions produce misleading sim results. Define the system
|
|
18
|
-
mathematically before writing a single line of simulation code.
|
|
19
|
-
steps:
|
|
20
|
-
- id: identify-systems
|
|
21
|
-
instruction: >
|
|
22
|
-
List every game system that affects player power or economy
|
|
23
|
-
(combat, progression, crafting, trading, cooldowns, resource generation, etc.).
|
|
24
|
-
For each system, describe: inputs, outputs, and how it interacts with other systems.
|
|
25
|
-
expected_output: "System map: Name | Inputs | Outputs | Dependencies"
|
|
26
|
-
|
|
27
|
-
- id: formalise-formulas
|
|
28
|
-
instruction: >
|
|
29
|
-
For each system, write the governing formula in explicit mathematical notation.
|
|
30
|
-
Include all variables, their types, valid ranges, and units.
|
|
31
|
-
Example: damage = (base_attack × weapon_multiplier) / (1 + armor / 100) × crit_factor
|
|
32
|
-
where crit_factor ∈ {1.0, 2.5}.
|
|
33
|
-
expected_output: "Formula sheet: System | Formula | Variables with units and ranges"
|
|
34
|
-
|
|
35
|
-
- id: identify-balance-axes
|
|
36
|
-
instruction: >
|
|
37
|
-
Identify the axes you are balancing against:
|
|
38
|
-
- Time-to-kill (TTK) for combat
|
|
39
|
-
- Catch-up mechanics for progression
|
|
40
|
-
- Sink/source ratio for economy
|
|
41
|
-
- Win rate variance for competitive
|
|
42
|
-
For each axis, define: target value, acceptable range, and measurement method.
|
|
43
|
-
expected_output: "Balance axes table: Axis | Target | Acceptable Range | Measurement"
|
|
44
|
-
|
|
45
|
-
- id: headless-balance-simulation
|
|
46
|
-
title: "Headless Balance Simulation"
|
|
47
|
-
rationale: >
|
|
48
|
-
Running simulations headlessly (no renderer, no input, scripted AI agents)
|
|
49
|
-
over thousands of iterations surfaces balance issues that playtesting would
|
|
50
|
-
take months to discover. Automate this before any content ship.
|
|
51
|
-
steps:
|
|
52
|
-
- id: build-sim-harness
|
|
53
|
-
instruction: >
|
|
54
|
-
Build or configure a headless simulation harness:
|
|
55
|
-
- For browser/Node games: use a pure-logic module with no DOM/WebGL dependencies
|
|
56
|
-
- For Unity/Godot: use headless build mode with a scripted test runner
|
|
57
|
-
- For Python sims: write a standalone module with no display imports
|
|
58
|
-
Output: a function runSimulation(config, seed) → SimResult that is deterministic
|
|
59
|
-
given the same seed.
|
|
60
|
-
expected_output: "Simulation harness code + test proving determinism (same seed → same result)"
|
|
61
|
-
tools: ["run_in_terminal"]
|
|
62
|
-
|
|
63
|
-
- id: define-ai-agents
|
|
64
|
-
instruction: >
|
|
65
|
-
Define scripted AI agent strategies for simulation:
|
|
66
|
-
- Greedy (always picks highest immediate reward)
|
|
67
|
-
- Balanced (follows optimal build order)
|
|
68
|
-
- Adversarial (maximises disruption to other players)
|
|
69
|
-
Agents should be configurable via the sim config, not hardcoded.
|
|
70
|
-
expected_output: "Agent strategy implementations + config schema"
|
|
71
|
-
|
|
72
|
-
- id: run-baseline-sim
|
|
73
|
-
instruction: >
|
|
74
|
-
Run 10,000 iterations with baseline parameters and default agents.
|
|
75
|
-
Collect per-run stats: TTK, resource peaks, win rates, average game length,
|
|
76
|
-
P99 outliers. Check all balance axes against their targets.
|
|
77
|
-
expected_output: "Baseline stats report: mean/median/P99 per axis; pass/fail vs targets"
|
|
78
|
-
tools: ["run_in_terminal"]
|
|
79
|
-
|
|
80
|
-
- id: sweep-parameters
|
|
81
|
-
instruction: >
|
|
82
|
-
Run parameter sweeps over the 3–5 most sensitive balance parameters.
|
|
83
|
-
For each sweep: vary the parameter ±50% in 10 steps while holding others constant.
|
|
84
|
-
Produce a sweep chart showing how each axis responds to the knob.
|
|
85
|
-
expected_output: "Sweep results: one line chart per parameter showing axis response curve"
|
|
86
|
-
tools: ["run_in_terminal"]
|
|
87
|
-
|
|
88
|
-
- id: identify-degenerate-strategies
|
|
89
|
-
instruction: >
|
|
90
|
-
Run the adversarial agent against all others across parameter ranges.
|
|
91
|
-
Identify dominant strategies (win rate > 70% consistently) and degenerate
|
|
92
|
-
combos (interactions that break intended constraints).
|
|
93
|
-
Document each finding with the exact parameter values that trigger it.
|
|
94
|
-
expected_output: "Degenerate strategy report: Strategy | Trigger Conditions | Win Rate | Fix Hypothesis"
|
|
95
|
-
|
|
96
|
-
- id: economy-tuning
|
|
97
|
-
title: "Economy Tuning"
|
|
98
|
-
rationale: >
|
|
99
|
-
Game economies follow the same dynamics as real economies: inflation, deflation,
|
|
100
|
-
sink/source imbalance, and wealth concentration. Model them explicitly to prevent
|
|
101
|
-
end-game economic collapse or hyperinflation.
|
|
102
|
-
steps:
|
|
103
|
-
- id: model-flow-graph
|
|
104
|
-
instruction: >
|
|
105
|
-
Build a resource flow graph: nodes are resource types, directed edges are
|
|
106
|
-
production (source) or consumption (sink) flows with rates.
|
|
107
|
-
Generate a Mermaid flowchart of the economy.
|
|
108
|
-
expected_output: "Mermaid flowchart of resource flows + rate table: Resource | Sources | Sinks | Net Rate"
|
|
109
|
-
tools: ["run_in_terminal"]
|
|
110
|
-
|
|
111
|
-
- id: equilibrium-analysis
|
|
112
|
-
instruction: >
|
|
113
|
-
Calculate equilibrium supply for each resource at steady-state play rates.
|
|
114
|
-
Flag any resource with no sink (inflation bomb) or no source (progress blocker).
|
|
115
|
-
Propose corrective sinks/sources for imbalanced resources.
|
|
116
|
-
expected_output: "Equilibrium table: Resource | Steady-State Supply | Balanced? | Fix Proposal"
|
|
117
|
-
|
|
118
|
-
- id: simulate-economy-over-time
|
|
119
|
-
instruction: >
|
|
120
|
-
Run a time-series simulation of the economy over the equivalent of 30, 90, and 180
|
|
121
|
-
days of average play. Track wealth Gini coefficient, resource stockpile growth,
|
|
122
|
-
and price indicators if a player-driven market exists.
|
|
123
|
-
expected_output: "Time-series charts (data) + Gini trend + inflation rate per resource"
|
|
124
|
-
tools: ["run_in_terminal"]
|
|
125
|
-
|
|
126
|
-
- id: art-asset-generation
|
|
127
|
-
title: "Art Asset Generation"
|
|
128
|
-
rationale: >
|
|
129
|
-
AI art generation can bootstrap placeholder and concept art before a dedicated
|
|
130
|
-
artist joins. The choice between local (Stable Diffusion) and paid API depends
|
|
131
|
-
on volume, quality requirements, and cost. Both paths are covered here.
|
|
132
|
-
steps:
|
|
133
|
-
- id: define-style-guide
|
|
134
|
-
instruction: >
|
|
135
|
-
Define the visual style guide: art style (pixel, painterly, cartoon, photorealistic),
|
|
136
|
-
colour palette (hex codes for primary/secondary/accent), perspective (top-down, isometric,
|
|
137
|
-
side-scroll, 3D), and mood keywords.
|
|
138
|
-
This becomes the base prompt prefix for all generation.
|
|
139
|
-
expected_output: "style_guide.yaml: style, palette, perspective, mood_keywords, base_prompt_prefix"
|
|
140
|
-
|
|
141
|
-
- id: choose-generation-path
|
|
142
|
-
instruction: >
|
|
143
|
-
Decide generation approach based on constraints:
|
|
144
|
-
- Local (Stable Diffusion / ComfyUI): use when volume > 500 images, need fine-tuned
|
|
145
|
-
LoRA on game style, or budget is constrained. Requires GPU (8GB+ VRAM).
|
|
146
|
-
- DALL·E 3 API: use when quality > quantity, no local GPU, or fast concept iteration.
|
|
147
|
-
- Replicate / Stability API: use for scalable cloud generation with model flexibility.
|
|
148
|
-
Document the choice, cost estimate, and rate limits.
|
|
149
|
-
expected_output: "Generation path decision: provider, cost model, rate limits, integration approach"
|
|
150
|
-
|
|
151
|
-
- id: scaffold-generation-pipeline
|
|
152
|
-
instruction: >
|
|
153
|
-
Scaffold the asset generation pipeline:
|
|
154
|
-
- Input: asset_spec.yaml (asset_id, category, description, style overrides)
|
|
155
|
-
- Processing: build full prompt from spec + style_guide, call provider API (or local endpoint)
|
|
156
|
-
- Output: named PNG files in assets/generated/{category}/
|
|
157
|
-
- Metadata: generation_log.json mapping asset_id → prompt, provider, seed, timestamp
|
|
158
|
-
Include retry logic and error handling for rate limits.
|
|
159
|
-
expected_output: "Pipeline code + asset_spec.yaml schema + generation_log.json schema"
|
|
160
|
-
tools: ["run_in_terminal"]
|
|
161
|
-
|
|
162
|
-
- id: generate-asset-set
|
|
163
|
-
instruction: >
|
|
164
|
-
Using asset_spec.yaml, generate the first batch of game assets:
|
|
165
|
-
UI elements, character concepts, environment tiles, and icon set.
|
|
166
|
-
Review outputs and iteratively refine prompts for any assets below quality bar.
|
|
167
|
-
Document effective prompt patterns and anti-patterns for the style guide.
|
|
168
|
-
expected_output: "Generated asset set in assets/generated/ + prompt_patterns.md"
|
|
169
|
-
tools: ["run_in_terminal"]
|
|
170
|
-
|
|
171
|
-
- id: local-sd-setup
|
|
172
|
-
instruction: >
|
|
173
|
-
(If local path was chosen) Set up Stable Diffusion with ComfyUI:
|
|
174
|
-
- Install ComfyUI and required model checkpoints (SDXL or SD 1.5)
|
|
175
|
-
- Configure a custom workflow JSON for the game's style
|
|
176
|
-
- Train or source a LoRA checkpoint for the art style if available
|
|
177
|
-
- Expose a local REST endpoint at localhost:8188 consumable by the pipeline
|
|
178
|
-
expected_output: "ComfyUI running locally with workflow exported; pipeline integration test passing"
|
|
179
|
-
tools: ["run_in_terminal"]
|
|
180
|
-
|
|
181
|
-
- id: content-validation
|
|
182
|
-
title: "Content Validation & Shipping Checklist"
|
|
183
|
-
rationale: >
|
|
184
|
-
Before any balance changes or art assets ship, they must pass automated
|
|
185
|
-
validation checks. Manual review of thousands of generated assets is not scalable.
|
|
186
|
-
steps:
|
|
187
|
-
- id: automated-balance-gating
|
|
188
|
-
instruction: >
|
|
189
|
-
Write a balance gate script that runs the headless sim and fails CI if any
|
|
190
|
-
balance axis falls outside its acceptable range. This script must run in < 60s
|
|
191
|
-
(use fewer iterations if needed; label it as a fast-gate vs. full-gate).
|
|
192
|
-
expected_output: "CI balance gate script + target run time verified < 60s"
|
|
193
|
-
tools: ["run_in_terminal"]
|
|
194
|
-
|
|
195
|
-
- id: asset-review-pipeline
|
|
196
|
-
instruction: >
|
|
197
|
-
Build an asset review script that:
|
|
198
|
-
- Checks all generated PNGs have correct dimensions and colour depth
|
|
199
|
-
- Flags assets with generation metadata missing (prompt, seed)
|
|
200
|
-
- Generates a review HTML gallery for human sign-off
|
|
201
|
-
Run it on the current asset batch.
|
|
202
|
-
expected_output: "Asset review script + gallery HTML for current batch"
|
|
203
|
-
tools: ["run_in_terminal"]
|
|
204
|
-
|
|
205
|
-
- id: commit-artefacts
|
|
206
|
-
instruction: >
|
|
207
|
-
Commit all approved artefacts:
|
|
208
|
-
- docs/balance/baseline-sim-YYYY-MM-DD.md (simulation results)
|
|
209
|
-
- docs/balance/economy-analysis.md (flow graph + equilibrium)
|
|
210
|
-
- assets/generated/ (approved art assets)
|
|
211
|
-
- config/balance.yaml (tuned parameter set)
|
|
212
|
-
Use commit format: feat(balance): initial parameter set vX.Y
|
|
213
|
-
expected_output: "Clean git status; all artefacts committed; CI passing"
|
|
214
|
-
tools: ["run_in_terminal"]
|
|
1
|
+
tag: GAME
|
|
2
|
+
section: playbook
|
|
3
|
+
title: "Game Design, Balance & Art Pipeline"
|
|
4
|
+
description: >
|
|
5
|
+
An agent-driven pipeline for game design, mechanics balancing, and art production.
|
|
6
|
+
Covers headless balance simulation, economy tuning, and art asset generation
|
|
7
|
+
via both local (Stable Diffusion) and paid API providers (DALL·E, Midjourney-compatible).
|
|
8
|
+
Run this playbook when designing new systems, balancing existing ones, or bootstrapping
|
|
9
|
+
art assets before a dedicated artist is available.
|
|
10
|
+
|
|
11
|
+
phases:
|
|
12
|
+
|
|
13
|
+
- id: mechanics-specification
|
|
14
|
+
title: "Mechanics Specification"
|
|
15
|
+
rationale: >
|
|
16
|
+
Balance simulation is meaningless without a precise formal specification of the
|
|
17
|
+
mechanics. Vague descriptions produce misleading sim results. Define the system
|
|
18
|
+
mathematically before writing a single line of simulation code.
|
|
19
|
+
steps:
|
|
20
|
+
- id: identify-systems
|
|
21
|
+
instruction: >
|
|
22
|
+
List every game system that affects player power or economy
|
|
23
|
+
(combat, progression, crafting, trading, cooldowns, resource generation, etc.).
|
|
24
|
+
For each system, describe: inputs, outputs, and how it interacts with other systems.
|
|
25
|
+
expected_output: "System map: Name | Inputs | Outputs | Dependencies"
|
|
26
|
+
|
|
27
|
+
- id: formalise-formulas
|
|
28
|
+
instruction: >
|
|
29
|
+
For each system, write the governing formula in explicit mathematical notation.
|
|
30
|
+
Include all variables, their types, valid ranges, and units.
|
|
31
|
+
Example: damage = (base_attack × weapon_multiplier) / (1 + armor / 100) × crit_factor
|
|
32
|
+
where crit_factor ∈ {1.0, 2.5}.
|
|
33
|
+
expected_output: "Formula sheet: System | Formula | Variables with units and ranges"
|
|
34
|
+
|
|
35
|
+
- id: identify-balance-axes
|
|
36
|
+
instruction: >
|
|
37
|
+
Identify the axes you are balancing against:
|
|
38
|
+
- Time-to-kill (TTK) for combat
|
|
39
|
+
- Catch-up mechanics for progression
|
|
40
|
+
- Sink/source ratio for economy
|
|
41
|
+
- Win rate variance for competitive
|
|
42
|
+
For each axis, define: target value, acceptable range, and measurement method.
|
|
43
|
+
expected_output: "Balance axes table: Axis | Target | Acceptable Range | Measurement"
|
|
44
|
+
|
|
45
|
+
- id: headless-balance-simulation
|
|
46
|
+
title: "Headless Balance Simulation"
|
|
47
|
+
rationale: >
|
|
48
|
+
Running simulations headlessly (no renderer, no input, scripted AI agents)
|
|
49
|
+
over thousands of iterations surfaces balance issues that playtesting would
|
|
50
|
+
take months to discover. Automate this before any content ship.
|
|
51
|
+
steps:
|
|
52
|
+
- id: build-sim-harness
|
|
53
|
+
instruction: >
|
|
54
|
+
Build or configure a headless simulation harness:
|
|
55
|
+
- For browser/Node games: use a pure-logic module with no DOM/WebGL dependencies
|
|
56
|
+
- For Unity/Godot: use headless build mode with a scripted test runner
|
|
57
|
+
- For Python sims: write a standalone module with no display imports
|
|
58
|
+
Output: a function runSimulation(config, seed) → SimResult that is deterministic
|
|
59
|
+
given the same seed.
|
|
60
|
+
expected_output: "Simulation harness code + test proving determinism (same seed → same result)"
|
|
61
|
+
tools: ["run_in_terminal"]
|
|
62
|
+
|
|
63
|
+
- id: define-ai-agents
|
|
64
|
+
instruction: >
|
|
65
|
+
Define scripted AI agent strategies for simulation:
|
|
66
|
+
- Greedy (always picks highest immediate reward)
|
|
67
|
+
- Balanced (follows optimal build order)
|
|
68
|
+
- Adversarial (maximises disruption to other players)
|
|
69
|
+
Agents should be configurable via the sim config, not hardcoded.
|
|
70
|
+
expected_output: "Agent strategy implementations + config schema"
|
|
71
|
+
|
|
72
|
+
- id: run-baseline-sim
|
|
73
|
+
instruction: >
|
|
74
|
+
Run 10,000 iterations with baseline parameters and default agents.
|
|
75
|
+
Collect per-run stats: TTK, resource peaks, win rates, average game length,
|
|
76
|
+
P99 outliers. Check all balance axes against their targets.
|
|
77
|
+
expected_output: "Baseline stats report: mean/median/P99 per axis; pass/fail vs targets"
|
|
78
|
+
tools: ["run_in_terminal"]
|
|
79
|
+
|
|
80
|
+
- id: sweep-parameters
|
|
81
|
+
instruction: >
|
|
82
|
+
Run parameter sweeps over the 3–5 most sensitive balance parameters.
|
|
83
|
+
For each sweep: vary the parameter ±50% in 10 steps while holding others constant.
|
|
84
|
+
Produce a sweep chart showing how each axis responds to the knob.
|
|
85
|
+
expected_output: "Sweep results: one line chart per parameter showing axis response curve"
|
|
86
|
+
tools: ["run_in_terminal"]
|
|
87
|
+
|
|
88
|
+
- id: identify-degenerate-strategies
|
|
89
|
+
instruction: >
|
|
90
|
+
Run the adversarial agent against all others across parameter ranges.
|
|
91
|
+
Identify dominant strategies (win rate > 70% consistently) and degenerate
|
|
92
|
+
combos (interactions that break intended constraints).
|
|
93
|
+
Document each finding with the exact parameter values that trigger it.
|
|
94
|
+
expected_output: "Degenerate strategy report: Strategy | Trigger Conditions | Win Rate | Fix Hypothesis"
|
|
95
|
+
|
|
96
|
+
- id: economy-tuning
|
|
97
|
+
title: "Economy Tuning"
|
|
98
|
+
rationale: >
|
|
99
|
+
Game economies follow the same dynamics as real economies: inflation, deflation,
|
|
100
|
+
sink/source imbalance, and wealth concentration. Model them explicitly to prevent
|
|
101
|
+
end-game economic collapse or hyperinflation.
|
|
102
|
+
steps:
|
|
103
|
+
- id: model-flow-graph
|
|
104
|
+
instruction: >
|
|
105
|
+
Build a resource flow graph: nodes are resource types, directed edges are
|
|
106
|
+
production (source) or consumption (sink) flows with rates.
|
|
107
|
+
Generate a Mermaid flowchart of the economy.
|
|
108
|
+
expected_output: "Mermaid flowchart of resource flows + rate table: Resource | Sources | Sinks | Net Rate"
|
|
109
|
+
tools: ["run_in_terminal"]
|
|
110
|
+
|
|
111
|
+
- id: equilibrium-analysis
|
|
112
|
+
instruction: >
|
|
113
|
+
Calculate equilibrium supply for each resource at steady-state play rates.
|
|
114
|
+
Flag any resource with no sink (inflation bomb) or no source (progress blocker).
|
|
115
|
+
Propose corrective sinks/sources for imbalanced resources.
|
|
116
|
+
expected_output: "Equilibrium table: Resource | Steady-State Supply | Balanced? | Fix Proposal"
|
|
117
|
+
|
|
118
|
+
- id: simulate-economy-over-time
|
|
119
|
+
instruction: >
|
|
120
|
+
Run a time-series simulation of the economy over the equivalent of 30, 90, and 180
|
|
121
|
+
days of average play. Track wealth Gini coefficient, resource stockpile growth,
|
|
122
|
+
and price indicators if a player-driven market exists.
|
|
123
|
+
expected_output: "Time-series charts (data) + Gini trend + inflation rate per resource"
|
|
124
|
+
tools: ["run_in_terminal"]
|
|
125
|
+
|
|
126
|
+
- id: art-asset-generation
|
|
127
|
+
title: "Art Asset Generation"
|
|
128
|
+
rationale: >
|
|
129
|
+
AI art generation can bootstrap placeholder and concept art before a dedicated
|
|
130
|
+
artist joins. The choice between local (Stable Diffusion) and paid API depends
|
|
131
|
+
on volume, quality requirements, and cost. Both paths are covered here.
|
|
132
|
+
steps:
|
|
133
|
+
- id: define-style-guide
|
|
134
|
+
instruction: >
|
|
135
|
+
Define the visual style guide: art style (pixel, painterly, cartoon, photorealistic),
|
|
136
|
+
colour palette (hex codes for primary/secondary/accent), perspective (top-down, isometric,
|
|
137
|
+
side-scroll, 3D), and mood keywords.
|
|
138
|
+
This becomes the base prompt prefix for all generation.
|
|
139
|
+
expected_output: "style_guide.yaml: style, palette, perspective, mood_keywords, base_prompt_prefix"
|
|
140
|
+
|
|
141
|
+
- id: choose-generation-path
|
|
142
|
+
instruction: >
|
|
143
|
+
Decide generation approach based on constraints:
|
|
144
|
+
- Local (Stable Diffusion / ComfyUI): use when volume > 500 images, need fine-tuned
|
|
145
|
+
LoRA on game style, or budget is constrained. Requires GPU (8GB+ VRAM).
|
|
146
|
+
- DALL·E 3 API: use when quality > quantity, no local GPU, or fast concept iteration.
|
|
147
|
+
- Replicate / Stability API: use for scalable cloud generation with model flexibility.
|
|
148
|
+
Document the choice, cost estimate, and rate limits.
|
|
149
|
+
expected_output: "Generation path decision: provider, cost model, rate limits, integration approach"
|
|
150
|
+
|
|
151
|
+
- id: scaffold-generation-pipeline
|
|
152
|
+
instruction: >
|
|
153
|
+
Scaffold the asset generation pipeline:
|
|
154
|
+
- Input: asset_spec.yaml (asset_id, category, description, style overrides)
|
|
155
|
+
- Processing: build full prompt from spec + style_guide, call provider API (or local endpoint)
|
|
156
|
+
- Output: named PNG files in assets/generated/{category}/
|
|
157
|
+
- Metadata: generation_log.json mapping asset_id → prompt, provider, seed, timestamp
|
|
158
|
+
Include retry logic and error handling for rate limits.
|
|
159
|
+
expected_output: "Pipeline code + asset_spec.yaml schema + generation_log.json schema"
|
|
160
|
+
tools: ["run_in_terminal"]
|
|
161
|
+
|
|
162
|
+
- id: generate-asset-set
|
|
163
|
+
instruction: >
|
|
164
|
+
Using asset_spec.yaml, generate the first batch of game assets:
|
|
165
|
+
UI elements, character concepts, environment tiles, and icon set.
|
|
166
|
+
Review outputs and iteratively refine prompts for any assets below quality bar.
|
|
167
|
+
Document effective prompt patterns and anti-patterns for the style guide.
|
|
168
|
+
expected_output: "Generated asset set in assets/generated/ + prompt_patterns.md"
|
|
169
|
+
tools: ["run_in_terminal"]
|
|
170
|
+
|
|
171
|
+
- id: local-sd-setup
|
|
172
|
+
instruction: >
|
|
173
|
+
(If local path was chosen) Set up Stable Diffusion with ComfyUI:
|
|
174
|
+
- Install ComfyUI and required model checkpoints (SDXL or SD 1.5)
|
|
175
|
+
- Configure a custom workflow JSON for the game's style
|
|
176
|
+
- Train or source a LoRA checkpoint for the art style if available
|
|
177
|
+
- Expose a local REST endpoint at localhost:8188 consumable by the pipeline
|
|
178
|
+
expected_output: "ComfyUI running locally with workflow exported; pipeline integration test passing"
|
|
179
|
+
tools: ["run_in_terminal"]
|
|
180
|
+
|
|
181
|
+
- id: content-validation
|
|
182
|
+
title: "Content Validation & Shipping Checklist"
|
|
183
|
+
rationale: >
|
|
184
|
+
Before any balance changes or art assets ship, they must pass automated
|
|
185
|
+
validation checks. Manual review of thousands of generated assets is not scalable.
|
|
186
|
+
steps:
|
|
187
|
+
- id: automated-balance-gating
|
|
188
|
+
instruction: >
|
|
189
|
+
Write a balance gate script that runs the headless sim and fails CI if any
|
|
190
|
+
balance axis falls outside its acceptable range. This script must run in < 60s
|
|
191
|
+
(use fewer iterations if needed; label it as a fast-gate vs. full-gate).
|
|
192
|
+
expected_output: "CI balance gate script + target run time verified < 60s"
|
|
193
|
+
tools: ["run_in_terminal"]
|
|
194
|
+
|
|
195
|
+
- id: asset-review-pipeline
|
|
196
|
+
instruction: >
|
|
197
|
+
Build an asset review script that:
|
|
198
|
+
- Checks all generated PNGs have correct dimensions and colour depth
|
|
199
|
+
- Flags assets with generation metadata missing (prompt, seed)
|
|
200
|
+
- Generates a review HTML gallery for human sign-off
|
|
201
|
+
Run it on the current asset batch.
|
|
202
|
+
expected_output: "Asset review script + gallery HTML for current batch"
|
|
203
|
+
tools: ["run_in_terminal"]
|
|
204
|
+
|
|
205
|
+
- id: commit-artefacts
|
|
206
|
+
instruction: >
|
|
207
|
+
Commit all approved artefacts:
|
|
208
|
+
- docs/balance/baseline-sim-YYYY-MM-DD.md (simulation results)
|
|
209
|
+
- docs/balance/economy-analysis.md (flow graph + equilibrium)
|
|
210
|
+
- assets/generated/ (approved art assets)
|
|
211
|
+
- config/balance.yaml (tuned parameter set)
|
|
212
|
+
Use commit format: feat(balance): initial parameter set vX.Y
|
|
213
|
+
expected_output: "Clean git status; all artefacts committed; CI passing"
|
|
214
|
+
tools: ["run_in_terminal"]
|