hayao 0.4.0 → 0.4.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.
Files changed (131) hide show
  1. package/design/00-process/README.md +49 -0
  2. package/design/00-process/composition.md +148 -0
  3. package/design/00-process/core-loop.md +146 -0
  4. package/design/00-process/intent-to-brief.md +128 -0
  5. package/design/00-process/pillars.md +139 -0
  6. package/design/00-process/refine-and-handoff.md +156 -0
  7. package/design/00-process/the-twist.md +108 -0
  8. package/design/10-anchors/README.md +99 -0
  9. package/design/10-anchors/age-of-empires.md +103 -0
  10. package/design/10-anchors/baba-is-you.md +127 -0
  11. package/design/10-anchors/balatro.md +132 -0
  12. package/design/10-anchors/celeste.md +136 -0
  13. package/design/10-anchors/civilization.md +101 -0
  14. package/design/10-anchors/dead-cells.md +125 -0
  15. package/design/10-anchors/factorio.md +100 -0
  16. package/design/10-anchors/hades.md +127 -0
  17. package/design/10-anchors/into-the-breach.md +125 -0
  18. package/design/10-anchors/it-takes-two.md +104 -0
  19. package/design/10-anchors/loop-hero.md +131 -0
  20. package/design/10-anchors/nuclear-throne.md +130 -0
  21. package/design/10-anchors/outer-wilds.md +107 -0
  22. package/design/10-anchors/overcooked.md +102 -0
  23. package/design/10-anchors/peggle.md +133 -0
  24. package/design/10-anchors/reigns.md +99 -0
  25. package/design/10-anchors/return-of-the-obra-dinn.md +108 -0
  26. package/design/10-anchors/rimworld.md +101 -0
  27. package/design/10-anchors/shadow-of-mordor.md +106 -0
  28. package/design/10-anchors/slay-the-spire.md +127 -0
  29. package/design/10-anchors/starcraft.md +98 -0
  30. package/design/10-anchors/stardew-valley.md +103 -0
  31. package/design/10-anchors/tetris.md +122 -0
  32. package/design/10-anchors/vampire-survivors.md +122 -0
  33. package/design/20-genres/README.md +62 -0
  34. package/design/20-genres/action-adventure.md +126 -0
  35. package/design/20-genres/auto-battler.md +121 -0
  36. package/design/20-genres/bullet-hell.md +123 -0
  37. package/design/20-genres/city-builder.md +124 -0
  38. package/design/20-genres/coop-chaos.md +124 -0
  39. package/design/20-genres/deckbuilder.md +122 -0
  40. package/design/20-genres/exploration.md +131 -0
  41. package/design/20-genres/farming-sim.md +122 -0
  42. package/design/20-genres/grid-puzzle.md +126 -0
  43. package/design/20-genres/horde-survival.md +128 -0
  44. package/design/20-genres/incremental.md +120 -0
  45. package/design/20-genres/match3.md +120 -0
  46. package/design/20-genres/metroidvania.md +132 -0
  47. package/design/20-genres/narrative-decisions.md +122 -0
  48. package/design/20-genres/physics-arcade.md +124 -0
  49. package/design/20-genres/precision-platformer.md +127 -0
  50. package/design/20-genres/racing.md +126 -0
  51. package/design/20-genres/rhythm.md +125 -0
  52. package/design/20-genres/roguelike.md +122 -0
  53. package/design/20-genres/rts.md +169 -0
  54. package/design/20-genres/stealth.md +125 -0
  55. package/design/20-genres/survival-horror.md +124 -0
  56. package/design/20-genres/tactics.md +123 -0
  57. package/design/20-genres/tower-defense.md +120 -0
  58. package/design/30-systems/README.md +69 -0
  59. package/design/30-systems/accessibility.md +110 -0
  60. package/design/30-systems/boss-design.md +126 -0
  61. package/design/30-systems/build-diversity.md +120 -0
  62. package/design/30-systems/collectibles.md +108 -0
  63. package/design/30-systems/combat-model.md +113 -0
  64. package/design/30-systems/coop-and-competition.md +118 -0
  65. package/design/30-systems/counter-systems.md +115 -0
  66. package/design/30-systems/crafting.md +115 -0
  67. package/design/30-systems/difficulty-and-dda.md +114 -0
  68. package/design/30-systems/economy.md +117 -0
  69. package/design/30-systems/emergent-systems.md +114 -0
  70. package/design/30-systems/encounter-design.md +107 -0
  71. package/design/30-systems/enemy-ai.md +121 -0
  72. package/design/30-systems/enemy-archetypes.md +117 -0
  73. package/design/30-systems/faction-asymmetry.md +144 -0
  74. package/design/30-systems/grace.md +124 -0
  75. package/design/30-systems/mastery-curve.md +116 -0
  76. package/design/30-systems/meta-progression.md +114 -0
  77. package/design/30-systems/onboarding.md +115 -0
  78. package/design/30-systems/procgen-design.md +118 -0
  79. package/design/30-systems/progression.md +120 -0
  80. package/design/30-systems/resource-loops.md +112 -0
  81. package/design/30-systems/reward-schedules.md +124 -0
  82. package/design/30-systems/save-and-checkpoint.md +113 -0
  83. package/design/30-systems/session-structure.md +113 -0
  84. package/design/30-systems/skill-trees.md +111 -0
  85. package/design/30-systems/status-effects.md +111 -0
  86. package/design/30-systems/tech-tree.md +112 -0
  87. package/design/30-systems/telegraphs.md +106 -0
  88. package/design/30-systems/unit-rosters.md +123 -0
  89. package/design/40-worldbuilding/README.md +49 -0
  90. package/design/40-worldbuilding/aesthetic-direction.md +155 -0
  91. package/design/40-worldbuilding/faction-identity.md +136 -0
  92. package/design/40-worldbuilding/naming-and-tone.md +130 -0
  93. package/design/40-worldbuilding/narrative-delivery.md +129 -0
  94. package/design/40-worldbuilding/theme-vectors.md +134 -0
  95. package/design/40-worldbuilding/worldbuilding-scaffold.md +132 -0
  96. package/design/50-patterns/README.md +54 -0
  97. package/design/50-patterns/anti-frustration.md +121 -0
  98. package/design/50-patterns/emergence.md +121 -0
  99. package/design/50-patterns/feedback-loops.md +121 -0
  100. package/design/50-patterns/juice-choreography.md +124 -0
  101. package/design/50-patterns/mastery-and-flow.md +121 -0
  102. package/design/50-patterns/pacing-and-tension.md +120 -0
  103. package/design/50-patterns/readability.md +121 -0
  104. package/design/50-patterns/risk-reward.md +120 -0
  105. package/design/CONTRIBUTING.md +183 -0
  106. package/design/INDEX.md +133 -0
  107. package/design/README.md +86 -0
  108. package/design/_TEMPLATE.md +69 -0
  109. package/design/index.json +2720 -0
  110. package/dist/anim/blend.d.ts +68 -0
  111. package/dist/anim/clip.d.ts +87 -0
  112. package/dist/anim/ik.d.ts +40 -0
  113. package/dist/anim/skeleton.d.ts +64 -0
  114. package/dist/hayao.global.js +12 -12
  115. package/dist/index.d.ts +11 -1
  116. package/dist/index.js +1683 -516
  117. package/dist/index.js.map +4 -4
  118. package/dist/index.min.js +12 -12
  119. package/dist/render/canvas2d-core.d.ts +4 -0
  120. package/dist/render/commands.d.ts +19 -0
  121. package/dist/render/lightRun.d.ts +35 -0
  122. package/dist/render/svgString.d.ts +8 -3
  123. package/dist/scene/clipPlayer.d.ts +58 -0
  124. package/dist/scene/ikTarget.d.ts +25 -0
  125. package/dist/scene/light.d.ts +80 -0
  126. package/dist/scene/shadow2d.d.ts +25 -0
  127. package/dist/scene/skeletonDebug.d.ts +28 -0
  128. package/dist/verify/gates.d.ts +25 -0
  129. package/docs/API.md +66 -8
  130. package/docs/CONVENTIONS.md +56 -0
  131. package/package.json +2 -1
@@ -0,0 +1,49 @@
1
+ # 00-process/ — The Design Pipeline
2
+
3
+ The **process** modules are the spine of the Codex: the ordered steps that turn a
4
+ one-line request into a design that's *designed enough to build*. Where the other
5
+ sections are a **parts bin** (anchors, genres, systems, worlds, patterns), these
6
+ six are the **method** for using it. Run them in order — each stage names the
7
+ sections it draws on and hands its output to the next.
8
+
9
+ ```
10
+ INTENT ──▶ ANCHOR ──▶ COMPOSE ──▶ TWIST ──▶ SHAPE ──▶ HANDOFF ──▶ (FUN/JUICE/JUDGE)
11
+ ```
12
+
13
+ **Intent-to-brief** parses the ask. **Pillars** distill it into a three-way
14
+ decision filter. **The twist** picks the creative bend and **composition** sources
15
+ and blends the parts, scored against the pillars. **Core-loop** shapes the play
16
+ into a nested stack. **Refine-and-handoff** converts the whole thing into a
17
+ verification contract and passes it to the proof playbook — the seam where the
18
+ Codex ends and [docs/FUN.md](../../docs/FUN.md), [docs/JUICE.md](../../docs/JUICE.md),
19
+ and [docs/JUDGE.md](../../docs/JUDGE.md) begin. The Codex never duplicates the
20
+ proof docs; it *routes* to them.
21
+
22
+ ## The six modules
23
+
24
+ | id | title | summary |
25
+ |---|---|---|
26
+ | [process-intent-to-brief](intent-to-brief.md) | Intent → Brief | Parse a vague request into a one-page brief: player fantasy, one-line hook, scope, hard constraints, target session length. |
27
+ | [process-pillars](pillars.md) | The Three Pillars | Derive exactly three pillars — evocative + testable — and use them as the scoring function for every later choice. |
28
+ | [process-core-loop](core-loop.md) | The Core Loop Stack | Design the nested moment/encounter/session/meta loops and the verb→challenge→feedback→reward→growth cycle inside each. |
29
+ | [process-the-twist](the-twist.md) | The Twist — "X but Y" | Anchor to a proven core, then bend it along one of six twist vectors so it's yours, not a clone. *(the quality exemplar)* |
30
+ | [process-composition](composition.md) | Composition | Assemble the design from anchor + genre template + implied systems; blend genres by satisfying every parent's verify pattern. |
31
+ | [process-refine-and-handoff](refine-and-handoff.md) | Refine & Handoff | Turn the finished design into a verification contract and hand off to FUN / JUICE / JUDGE / CONVENTIONS. |
32
+
33
+ ## Order notes
34
+
35
+ The arrows are the default path, not a straitjacket. In practice:
36
+
37
+ - **Pillars gate the twist and composition** — both are *scored against* the three
38
+ pillars, so pillars come before either even though the pipeline draws twist next.
39
+ - **The twist happens *inside* composition** — it's the creative bend you apply
40
+ while assembling parts, not a separate assembly.
41
+ - **The loop stack is the SHAPE step** — design it once the systems are chosen; the
42
+ systems are what fill the loop's layers.
43
+ - **Handoff is always last** — you can only write the verification contract once
44
+ the pillars, loop, and system list exist to be proven.
45
+
46
+ See [`design/README.md`](../README.md) for the full pipeline and how these feed the
47
+ [`10-anchors/`](../10-anchors/), [`20-genres/`](../20-genres/),
48
+ [`30-systems/`](../30-systems/), [`40-worldbuilding/`](../40-worldbuilding/), and
49
+ [`50-patterns/`](../50-patterns/) sections.
@@ -0,0 +1,148 @@
1
+ ---
2
+ id: process-composition
3
+ title: Composition — Assembling the Design
4
+ kind: process
5
+ tags: [composition, genre-blend, systems, assembly, coherence, parent-genres, checklist]
6
+ summary: Assemble a design from anchor + genre template + the systems it implies; blend genres by satisfying every parent's verify pattern.
7
+ use-when: You have a brief and pillars and need to assemble the actual design — which genre template, which systems, and how a genre blend holds together.
8
+ composes-with: [process-intent-to-brief, process-pillars, process-the-twist, process-refine-and-handoff]
9
+ verify-with: docs/FUN.md#part-2--per-genre-cheat-sheet
10
+ ---
11
+
12
+ # Composition — Assembling the Design
13
+
14
+ **What it is.** The assembly step. Take the **anchor** (the X), lay down its
15
+ **genre template**, and bolt on the **systems** that genre implies — progression,
16
+ economy, combat, factions. Composition is *sourcing the parts*; [[process-the-twist]]
17
+ is the bend you apply while you assemble.
18
+
19
+ **Why it's fun.** You don't re-derive what a roguelite knows about meta-progression;
20
+ you *compose* it, pre-solved, and spend your invention on the twist. The craft here
21
+ is picking the right parts and making a blend **cohere** rather than collide.
22
+
23
+ ## The step
24
+
25
+ Anchor + pillars → a composed design: one genre template, N systems, a coherent
26
+ whole. Every included part must pass the [[process-pillars]] filter and serve the
27
+ loop stack ([[process-core-loop]]).
28
+
29
+ ## Inputs → outputs
30
+
31
+ | In | Out |
32
+ |---|---|
33
+ | Anchor(s) + brief + 3 pillars | A named genre template (a [genre](../20-genres/)) as the spine |
34
+ | The twist vector ([[process-the-twist]]) | A **system list** — each `[[system-*]]` justified by a pillar |
35
+ | Session length + scope | A blend map: parent genres and their verify patterns |
36
+
37
+ ## The assembly
38
+
39
+ 1. **Anchor → genre spine.** The anchor names the genre. Pull the deep template
40
+ from [`20-genres/`](../20-genres/) — its pillars, loop stack, and *essential
41
+ systems*. This is your skeleton; you're not starting from zero.
42
+ 2. **Genre → implied systems.** Every genre *implies* systems. A roguelite implies
43
+ meta-progression and procgen; an RTS implies rosters, economy, and asymmetry.
44
+ Use the checklist below.
45
+ 3. **Twist → added/swapped system.** The twist usually *is* a system swap or add
46
+ (Loop Hero adds placement + a deck to auto-combat). Slot it in.
47
+ 4. **Filter every system.** Score each against the pillars. Include only what
48
+ serves one. When in doubt, cut — an unverified system is presumed broken.
49
+
50
+ ## Which systems does this genre imply?
51
+
52
+ A starting checklist. Presence isn't mandatory — but *decide* on each, don't
53
+ forget it.
54
+
55
+ | If the design has… | It almost certainly implies… |
56
+ |---|---|
57
+ | Runs / permadeath | [[system-meta-progression]] · [[system-procgen-design]] · [[system-session-structure]] |
58
+ | A power curve | [[system-progression]] · [[system-mastery-curve]] · [[pattern-pacing-and-tension]] |
59
+ | Currency / shops | [[system-economy]] · [[system-resource-loops]] · [[system-reward-schedules]] |
60
+ | Combat | [[system-combat-model]] · [[system-telegraphs]] · [[system-enemy-archetypes]] · [[system-encounter-design]] |
61
+ | Multiple factions/classes | [[system-faction-asymmetry]] · [[system-unit-rosters]] · [[system-counter-systems]] |
62
+ | Builds / loadouts | [[system-build-diversity]] · [[system-skill-trees]] · [[system-status-effects]] |
63
+ | Precision movement | [[system-grace]] · [[pattern-anti-frustration]] |
64
+ | Bosses / set-pieces | [[system-boss-design]] |
65
+ | A new player | [[system-onboarding]] · [[system-accessibility]] · [[system-difficulty-and-dda]] |
66
+ | Emergent story | [[system-emergent-systems]] |
67
+ | Coop / PvP | [[system-coop-and-competition]] |
68
+ | Any game at all | [[system-save-and-checkpoint]] · [[pattern-readability]] · [[pattern-juice-choreography]] |
69
+
70
+ Two systems on that last row are *always on*: readability (JUDGE hook) and juice
71
+ choreography (JUICE hook). Skip nothing there.
72
+
73
+ ## Genre-blend rules
74
+
75
+ Most interesting games are **blends** — two or more genres under one loop
76
+ (Loop Hero = auto-battler + deckbuilder + placement; rhythm = roguelike + input
77
+ legality). The rule that keeps a blend from collapsing:
78
+
79
+ > **Satisfy every parent genre's verify pattern.** FUN.md's closing note is law:
80
+ > *"If the genre is a blend, satisfy every parent genre's verify pattern — genres
81
+ > compose (rhythm = roguelike + input legality; Peggle = physics + aim search)."*
82
+ > A blend is not an average of two verify suites; it is the **union** of them.
83
+
84
+ Practically:
85
+
86
+ 1. **List the parents.** Name each genre in the blend and its FUN.md section.
87
+ 2. **Union the verify patterns.** A physics-arcade + deckbuilder owes *both* the
88
+ swept-collision/energy invariant (FUN.md §19) *and* the draft-delta + win-rate
89
+ window (FUN.md §11). Neither is optional.
90
+ 3. **Find the seam.** Where two systems meet is where blends break — the moment a
91
+ card *modifies* a physics shot, both models must stay honest. Name that seam and
92
+ plan a proof for it specifically.
93
+ 4. **Pick the dominant parent.** One genre owns the moment verb; the others modify.
94
+ The dominant one's loop stack is the spine; the others graft on.
95
+
96
+ ## Worked example
97
+
98
+ **Intent:** *"a tower defense where the towers are a deck you draft each wave."*
99
+ Pillars: (1) *build decisions that matter*, (2) *drafts with teeth*, (3) *the range
100
+ ring is the UI*. X = tower defense × deckbuilder blend.
101
+
102
+ **Composition:**
103
+
104
+ - **Spine:** [[genre-tower-defense]] owns the moment verb (place a tower). FUN.md
105
+ §8 is the primary verify pattern.
106
+ - **Grafted parent:** [[genre-deckbuilder]] supplies the *draft-of-3 per wave*.
107
+ FUN.md §11's draft-delta + win-rate window applies to the tower draft.
108
+ - **Implied systems:** [[system-economy]] (gold faucet from kills), [[system-counter-systems]]
109
+ (near-hard tower↔enemy counters — §8 demands it), [[system-encounter-design]]
110
+ (wave composition), [[system-reward-schedules]] (the draft is the reward).
111
+ - **The seam:** a drafted tower must respect coverage geometry (§8's range × lane
112
+ chord) *and* the draft must have teeth (§11's delta). The seam-proof: a mixed
113
+ drafted build survives 10/10 while a mono-draft (bigger budget) fails **and**
114
+ never-drafting loses by a margin. Both parents, one scenario.
115
+ - **Cut:** a proposed crafting system — serves no pillar, adds a third verify
116
+ suite for no fantasy gain. Out.
117
+
118
+ ## Traps
119
+
120
+ - **Averaging verify suites.** A blend owes the *union*, not the intersection. Two
121
+ parents = both proofs, in full.
122
+ - **Two dominant parents.** If two genres fight for the moment verb, the game has
123
+ no center. Pick one spine; the rest modify it.
124
+ - **Ignoring the seam.** Blends break where systems touch. The seam needs its own
125
+ named proof, not a hope that both halves compose cleanly.
126
+ - **System sprawl.** Every system you add is a verify suite you owe. Compose the
127
+ fewest systems that serve the pillars; each extra one is scope you must prove.
128
+ - **Composing from the corpus.** Don't survey `examples/` for which systems to
129
+ bolt on (see [CLAUDE.md](../../CLAUDE.md)). Decide from the mechanic and the
130
+ pillars; borrow *structure*, not a menu.
131
+
132
+ ## Composes with
133
+
134
+ - [[process-the-twist]] — the twist is chosen *during* composition; it's the
135
+ creative bend on the parts you're assembling.
136
+ - [[process-pillars]] — the filter that decides which systems are in.
137
+ - [[process-core-loop]] — the systems fill the loop stack's layers.
138
+ - [[process-refine-and-handoff]] — the composed system list becomes the list of
139
+ verify suites you owe.
140
+
141
+ ## See also
142
+
143
+ - [docs/FUN.md](../../docs/FUN.md) Part 2 + closing note — the per-genre verify
144
+ patterns and the blend law you must satisfy for every parent.
145
+ - [`20-genres/`](../20-genres/) · [`30-systems/`](../30-systems/) — the parts bin
146
+ you assemble from.
147
+ - [`examples/`](../../examples/) — *convention* references for how a composed
148
+ design wires state/view, **not** an idea menu (per AGENTS.md).
@@ -0,0 +1,146 @@
1
+ ---
2
+ id: process-core-loop
3
+ title: The Core Loop Stack
4
+ kind: process
5
+ tags: [core-loop, gameplay-loop, verb, feedback, reward, progression, pacing, engagement]
6
+ summary: Design the nested loop stack — moment / encounter / session / meta — and the verb→challenge→feedback→reward→growth cycle inside each layer.
7
+ use-when: You have pillars and need to design the actual moment-to-moment play and how it nests up into a session and a reason to return.
8
+ composes-with: [process-pillars, process-composition, process-refine-and-handoff]
9
+ verify-with: docs/FUN.md#part-2--per-genre-cheat-sheet
10
+ ---
11
+
12
+ # The Core Loop Stack
13
+
14
+ **What it is.** A game is **loops inside loops**. The smallest is one input and its
15
+ answer; the largest is the reason you open it again tomorrow. Design each layer,
16
+ then **nest** them so every turn of a small loop advances a bigger one.
17
+
18
+ **Why it's fun.** Fun is a satisfying loop, repeated, that keeps meaning more. A
19
+ loop that doesn't feed the loop above it is a treadmill; a stack where each turn
20
+ compounds is *"one more run."* The nesting is the engagement.
21
+
22
+ ## The step
23
+
24
+ Pillars → the loop stack. You design four layers and the single cycle that runs
25
+ inside each of them, then check every layer expresses a pillar.
26
+
27
+ ## The four layers
28
+
29
+ | Layer | Timescale | The question it answers | Reference |
30
+ |---|---|---|---|
31
+ | **Moment** | 1 frame – 2 s | "Does the second-to-second feel good?" | the dash, the shot, the swap, the placement |
32
+ | **Encounter** | 10 s – 2 min | "Is a single unit of challenge satisfying?" | a room, a wave, a hand, a corner, a fight |
33
+ | **Session** | 5 – 40 min | "Is one sitting a complete arc?" | a run, a level set, a match, a day |
34
+ | **Meta** | across sessions | "Why open it again?" | unlocks, mastery, collection, story |
35
+
36
+ Not every game needs all four fully loaded. A pure-mastery arcade game
37
+ ([[anchor-tetris]]) is almost all *moment*, thin meta. A roguelite
38
+ ([[anchor-hades]]) leans hard on *meta*. Match the weight to the brief's
39
+ **session length** and fantasy — but design each layer *consciously*, even the
40
+ thin ones.
41
+
42
+ ## The cycle inside every layer
43
+
44
+ Each layer runs the same five-beat cycle. The layers differ in timescale, not in
45
+ shape.
46
+
47
+ ```
48
+ VERB ──▶ CHALLENGE ──▶ FEEDBACK ──▶ REWARD ──▶ GROWTH ──┐
49
+ ▲ │
50
+ └──────────────────────────────────────────────────────┘
51
+ ```
52
+
53
+ - **Verb** — the thing the player *does*. One primary verb per layer; the moment
54
+ layer's verb is the game's soul (jump, place, draft, fire).
55
+ - **Challenge** — what resists the verb. A gap, a guard, a wave, a bad hand.
56
+ - **Feedback** — the game answers *legibly and on ≥ 2 senses*. This is a
57
+ JUICE.md concern — design the *event*, prove the feel there (see
58
+ [docs/JUICE.md](../../docs/JUICE.md) Part 3).
59
+ - **Reward** — what the success buys: territory, a pickup, a clear, a card.
60
+ - **Growth** — how the reward changes future turns: more power, more options, a
61
+ new verb. Growth is the hook into the *next layer up*.
62
+
63
+ ## How to run it
64
+
65
+ 1. **Name the moment verb first.** The one input the whole game orbits. If it
66
+ isn't fun alone, in a grey box, nothing above it saves the game. Prototype it
67
+ as a `sandboxes/*-lab` before anything else.
68
+ 2. **Build the encounter around the verb.** One clean unit of challenge that
69
+ demands the verb. This is your smallest shippable, verifiable thing.
70
+ 3. **Shape the session** as a *sequence* of encounters with a curve — rise,
71
+ breather, peak (pacing is [[pattern-pacing-and-tension]]). A session must
72
+ *end*, and end at its peak.
73
+ 4. **Design the meta hook.** What does finishing a session *change*? Unlock,
74
+ record, story beat, collection tick. Weight it to session length: short
75
+ sessions need strong meta; long ones can carry themselves.
76
+ 5. **Nest — the load-bearing step.** Wire each layer's **growth** to the layer
77
+ above: encounter reward feeds the session build; session reward feeds meta
78
+ progression. If a layer's growth feeds nothing above, it's a dead end.
79
+ 6. **Score against pillars.** Each layer should *dramatise* a pillar. A loop that
80
+ expresses no pillar is a mechanic with no reason to exist.
81
+
82
+ ## Worked example
83
+
84
+ **Intent:** *"a chill deckbuilder I can play in short bursts."* Pillars: (1) *every
85
+ run rewrites the deck*, (2) *decisions with teeth*, (3) *a clean 20-minute arc*.
86
+ X = [[anchor-slay-the-spire]].
87
+
88
+ | Layer | Verb | Challenge | Feedback | Reward | Growth (→ up) |
89
+ |---|---|---|---|---|---|
90
+ | Moment | play a card | mana + timing | number pops, sfx, flash | damage / block | tempo this turn |
91
+ | Encounter | win a fight | enemy intent | telegraph resolves as shown | HP kept, gold | **card reward → session build** |
92
+ | Session | finish a run | boss + curve | run summary | victory / death | **unlock → meta** |
93
+ | Meta | unlock cards | rarer picks | new draft-of-3 options | expanded pool | **future runs diverge (pillar 1)** |
94
+
95
+ The nesting is explicit: the card reward (encounter) *is* the session's deck; the
96
+ run's unlock *is* the meta's new option. Every arrow points up. Pillar 1 lives in
97
+ the meta→moment feedback: yesterday's unlock changes today's draft.
98
+
99
+ **Verify the loop, don't just draw it.** The deckbuilder's *"decisions with teeth"*
100
+ pillar becomes a FUN.md §11 draft-delta proof (drafting on beats drafting off by a
101
+ margin) — declared here, proven there.
102
+
103
+ ## Diagnosing a weak loop
104
+
105
+ | Symptom | Likely broken layer | Fix |
106
+ |---|---|---|
107
+ | "Feels like a treadmill" | growth feeds nothing above | wire the nesting; make a reward change the next layer |
108
+ | "Great for 5 min then boring" | encounter has no variety | vary the challenge, not the verb ([[system-enemy-archetypes]]) |
109
+ | "No reason to come back" | thin/absent meta | add a meta hook sized to the session |
110
+ | "Every run feels the same" | growth doesn't diverge | make rewards branch ([[system-build-diversity]]) |
111
+ | "The core just isn't fun" | the **moment verb** | stop; the verb is wrong — re-prototype it in isolation |
112
+ | "Rewards feel hollow" | feedback, not reward | it's a feel gap → [docs/JUICE.md](../../docs/JUICE.md), not more loot |
113
+
114
+ The single most common failure is a **weak moment verb** propped up by heavy meta
115
+ — unlocks papering over a core that isn't fun. No amount of meta fixes a bad
116
+ moment. Fix the bottom of the stack first.
117
+
118
+ ## Traps
119
+
120
+ - **Skipping the moment prototype.** Designing session/meta before the verb is fun
121
+ is building a tower on sand. Grey-box the verb first.
122
+ - **Loops that don't nest.** Four independent loops are four treadmills. The stack
123
+ is only alive if growth climbs it.
124
+ - **Meta as a bribe.** Progression that exists to mask a dull core is a
125
+ psychological trick, not a design ([[system-reward-schedules]] has the ethics).
126
+ - **A session with no end.** "Endless" still needs a peak and a resolution per
127
+ sitting, or it's just noise until you quit.
128
+ - **Confusing feedback with reward.** Juicy feedback on a worthless reward still
129
+ feels empty; a great reward with no feedback feels flat. You need both.
130
+
131
+ ## Composes with
132
+
133
+ - [[process-pillars]] — every layer must dramatise a pillar; the loop is where
134
+ pillars become play.
135
+ - [[process-composition]] — the systems you compose are *what fills the layers*
136
+ (progression → meta, economy → session, combat → encounter).
137
+ - [[pattern-mastery-and-flow]] / [[pattern-pacing-and-tension]] — the moment and
138
+ session layers live or die on flow and pacing.
139
+ - [[system-progression]] / [[system-meta-progression]] — the meta layer's engine.
140
+
141
+ ## See also
142
+
143
+ - [docs/FUN.md](../../docs/FUN.md) Part 2 — each genre's *mechanical truth* is the
144
+ proof that its core loop actually holds; find your genre and its verify pattern.
145
+ - [`sandboxes/`](../../sandboxes/) — the place to prototype a moment verb in
146
+ isolation before you build the stack on top of it.
@@ -0,0 +1,128 @@
1
+ ---
2
+ id: process-intent-to-brief
3
+ title: Intent → Brief
4
+ kind: process
5
+ tags: [intent, brief, scope, fantasy, hook, constraints, requirements, parse]
6
+ summary: Parse a vague request into a one-page brief — player fantasy, one-line hook, scope, hard constraints, target session length.
7
+ use-when: You have a high-level ask ("make a polished platformer") and need a concrete brief before you anchor, compose, or twist.
8
+ composes-with: [process-pillars, process-the-twist, process-composition]
9
+ verify-with: none
10
+ ---
11
+
12
+ # Intent → Brief
13
+
14
+ **What it is.** The first step of the pipeline. Turn a one-line request into a
15
+ **brief**: five fields an agent can build against. The intent is the seed; the
16
+ brief is the contract you'll pressure-test everything else against.
17
+
18
+ **Why it's fun.** A brief protects fun. Left implicit, a request like *"a polished
19
+ platformer with responsive controls"* silently expands into scope you can't
20
+ verify. Pin the **fantasy** and you know what feeling to protect; pin the
21
+ **constraints** and you know what to refuse.
22
+
23
+ ## The step
24
+
25
+ Parse intent → brief. You are not designing yet — you are *reading the request
26
+ correctly* so the design lands on what was actually asked.
27
+
28
+ ## Inputs → outputs
29
+
30
+ | In | Out |
31
+ |---|---|
32
+ | A high-level request, one sentence to a paragraph | A five-field brief (below) |
33
+ | Named genres, feels, adjectives ("responsive", "impressive", "chill") | Each adjective resolved to a **fantasy** or a **constraint** |
34
+ | Implicit scope ("an RTS", "a roguelite") | An explicit scope + target session length |
35
+
36
+ The five brief fields:
37
+
38
+ 1. **Player fantasy** — what the player *feels they are*. Not "a platformer" but
39
+ *"a body you trust completely, threading gaps by a hair."* One sentence.
40
+ 2. **One-line hook** — the store sentence, provisionally in [[process-the-twist]]'s
41
+ "X but Y" shape. It may still be pure X here; the twist sharpens it later.
42
+ 3. **Scope** — how big: one screen vs. a campaign, one system vs. six. The honest
43
+ size, phrased as content units (levels, rooms, waves, cards).
44
+ 4. **Hard constraints** — the non-negotiables. Some come from the ask ("couch
45
+ coop", "one button"); some are *always on* for Hayao (deterministic sim, pure
46
+ logic, DOM chrome — see [CLAUDE.md](../../CLAUDE.md)).
47
+ 5. **Target session length** — 90-second run? 20-minute sitting? A weekend? This
48
+ sets the loop stack ([[process-core-loop]]) and the meta.
49
+
50
+ ## How to run it
51
+
52
+ 1. **Read the request twice.** First for genre, then for *adjectives*. Every
53
+ adjective is a smuggled requirement — "responsive" = grace system, "impressive
54
+ battles" = mass + spectacle, "chill" = a tonal constraint against fail-states.
55
+ 2. **Extract the fantasy.** Ask "what does the player get to *feel they are*?"
56
+ Write it as a person doing a thing, not a genre label.
57
+ 3. **Draft the hook.** One sentence. If a touchstone game is obvious, name it —
58
+ that's your provisional **X** for [[process-the-twist]].
59
+ 4. **Size the scope honestly.** Convert "an RTS" into countable content and the
60
+ systems it implies (this is where [[process-composition]]'s checklist starts).
61
+ Under-scope on purpose; a small proven thing beats a large unverifiable one.
62
+ 5. **List hard constraints.** Split into *asked* (from the request) and *inherited*
63
+ (Hayao invariants). Constraints are gifts — each one collapses the design space.
64
+ 6. **Set session length.** Pick the sitting the fantasy wants, then let it drive
65
+ the loop layers you'll design in [[process-core-loop]].
66
+ 7. **Write it as one page.** If it doesn't fit a page, the intent isn't parsed yet.
67
+
68
+ ## Worked example A
69
+
70
+ **Intent:** *"make a polished platformer with really responsive controls."*
71
+
72
+ | Field | Parsed |
73
+ |---|---|
74
+ | Fantasy | *"A body you trust completely — every death is your fault, never the game's."* |
75
+ | Hook | *"A precision platformer where the controls are the whole promise."* (X = [[anchor-celeste]]; twist TBD.) |
76
+ | Scope | ~12 handcrafted levels, one movement kit, one hazard family. No combat. |
77
+ | Hard constraints | *Asked:* "responsive" = a full grace system ([[system-grace]]). *Inherited:* deterministic sim, movement envelope derived not vibed, DOM menus. |
78
+ | Session length | 2–5 min per level; 30–45 min for the set. Instant retry. |
79
+
80
+ "Responsive" was the load-bearing word: it resolved straight to [[system-grace]]
81
+ and to FUN.md's coyote/buffer/apex canon — proven, not designed here (see FUN.md
82
+ §2). The brief now *knows what to protect*.
83
+
84
+ ## Worked example B
85
+
86
+ **Intent:** *"design an RTS with faction asymmetry and impressive battles."*
87
+
88
+ | Field | Parsed |
89
+ |---|---|
90
+ | Fantasy | *"A commander whose faction plays like nobody else's, watching a hundred units answer one order."* |
91
+ | Hook | *"An RTS where three factions share no units and still balance."* (X = [[anchor-starcraft]].) |
92
+ | Scope | 3 factions × ~6 units, ~5 skirmish maps, 1 economy, 1 tech ramp. No campaign v1. |
93
+ | Hard constraints | *Asked:* asymmetry that *balances* ([[system-faction-asymmetry]]); "impressive" = mass pathing + spectacle. *Inherited:* flow-field pathing, deterministic sim, exported arrival tolerances. |
94
+ | Session length | 10–20 min per skirmish; sit-down, not snackable. |
95
+
96
+ Two adjectives, two systems: *asymmetry* → [[system-faction-asymmetry]] +
97
+ [[system-unit-rosters]]; *impressive* → mass under command (FUN.md §9) +
98
+ [[system-boss-design]]-grade spectacle. "Impressive" is a **feel** claim — it will
99
+ hand off to JUICE.md's gates, not get argued here.
100
+
101
+ ## Traps
102
+
103
+ - **Adjective blindness.** "Polished", "responsive", "impressive", "chill" are
104
+ requirements in disguise. Leave one unparsed and it becomes untestable scope.
105
+ - **Genre as fantasy.** "A roguelite" is not a fantasy; *"every death teaches you
106
+ the dungeon"* is. Push past the label to the feeling.
107
+ - **Scope inflation.** The request rarely asks for the biggest version. Build the
108
+ smallest thing that delivers the fantasy; grow only what verifies.
109
+ - **Skipping inherited constraints.** Determinism, pure logic, and the cosmetic
110
+ rule are constraints on *every* brief even when unasked — bake them in now, not
111
+ in a painful refactor later.
112
+ - **Hook without an anchor.** If no touchstone comes to mind, the intent may be
113
+ under-specified — name the closest X anyway; [[process-the-twist]] needs one.
114
+
115
+ ## Composes with
116
+
117
+ - [[process-pillars]] — the brief's fantasy + hook are the raw material the three
118
+ pillars distill from.
119
+ - [[process-the-twist]] — the provisional hook here becomes the **X** to bend.
120
+ - [[process-composition]] — scope + constraints feed the systems-checklist.
121
+
122
+ ## See also
123
+
124
+ - [`design/README.md`](../README.md) — where this sits in the pipeline (step 1).
125
+ - [CLAUDE.md](../../CLAUDE.md) / [AGENTS.md](../../AGENTS.md) — the inherited
126
+ invariants every brief must list as hard constraints.
127
+ - [docs/FUN.md](../../docs/FUN.md) — the mechanical truths the parsed adjectives
128
+ will eventually be proven against. Design here; prove there.
@@ -0,0 +1,139 @@
1
+ ---
2
+ id: process-pillars
3
+ title: The Three Pillars
4
+ kind: process
5
+ tags: [pillars, vision, decision-filter, scope-guard, priorities, focus, scoring]
6
+ summary: Derive exactly three design pillars — evocative but testable — and use them as the scoring function for every later choice, including the twist.
7
+ use-when: You have a brief and need a decision filter that resolves every downstream "should we?" including the twist and the cut list.
8
+ composes-with: [process-intent-to-brief, process-the-twist, process-core-loop, process-composition]
9
+ verify-with: none
10
+ ---
11
+
12
+ # The Three Pillars
13
+
14
+ **What it is.** Three short statements of what this game **is about** — the
15
+ feelings and truths every later decision must serve. Not features, not a to-do
16
+ list. The pillars are the **scoring function** you run every candidate mechanic,
17
+ twist, and level through.
18
+
19
+ **Why it's fun.** Focus is fun's precondition. A game that's about three things is
20
+ about *something*; a game about ten is about nothing. When two ideas conflict, the
21
+ pillars decide — that's the whole point of writing them down.
22
+
23
+ ## The step
24
+
25
+ Brief → exactly three pillars. Then everything downstream is scored, not
26
+ debated: [[process-the-twist]]'s candidate bends, [[process-composition]]'s system
27
+ list, and the cut list all resolve against these three.
28
+
29
+ ## Why exactly three
30
+
31
+ Two under-constrains — you can't triangulate a decision. Four+ dilutes: a fourth
32
+ pillar is almost always a *feature* masquerading as a value, or a restatement of
33
+ one you already have. Three forces prioritisation and still fits in your head at
34
+ every choice. If you have five candidates, two are subordinate — demote them.
35
+
36
+ ## Inputs → outputs
37
+
38
+ | In | Out |
39
+ |---|---|
40
+ | The brief's **fantasy** + **hook** ([[process-intent-to-brief]]) | Exactly 3 pillars |
41
+ | The named anchor(s) | Each pillar phrased **evocative + testable** |
42
+ | Nothing else — resist adding features | A one-line **test** per pillar |
43
+
44
+ ## How to phrase a pillar
45
+
46
+ Each pillar is **two halves**: an evocative name you can say out loud, and a
47
+ testable clause that a design decision can pass or fail.
48
+
49
+ | Bad (vague / feature) | Good (evocative + testable) |
50
+ |---|---|
51
+ | "Fun combat" | **Readable violence** — *a player can name the threat that killed them.* |
52
+ | "Deep progression" | **Every run rewrites the deck** — *no two victories share a build.* |
53
+ | "Nice graphics" | **The screen reads at a glance** — *the avatar is the brightest thing on it.* |
54
+ | "Hard but fair" | **Your fault, never the game's** — *every death traces to an input, not a frame.* |
55
+
56
+ The testable clause is what makes a pillar a *filter*. "Readable violence" alone
57
+ is a mood; the clause *"can name the threat that killed them"* you can hold a
58
+ telegraph design up against and get a yes/no.
59
+
60
+ ## How to run it
61
+
62
+ 1. **Mine the brief.** The fantasy usually contains one pillar almost verbatim.
63
+ The hook's **X** (anchor) contributes one — its load-bearing structure. The
64
+ twist-to-be contributes the third (its differentiator).
65
+ 2. **Draft five, cut to three.** Write candidates freely, then merge and demote
66
+ until exactly three remain. If two overlap, they're one pillar.
67
+ 3. **Add the test clause.** For each, write the one-line predicate a decision must
68
+ pass. If you can't write a test, it's a mood — sharpen or cut it.
69
+ 4. **Rank them.** Order matters: when pillars conflict (they will), the higher one
70
+ wins. Pillar 1 is the hill you die on.
71
+ 5. **Sanity-check coverage.** Between them, the three should touch *feel*,
72
+ *depth/structure*, and *the twist*. A gap there means a missing pillar or a
73
+ wrong cut.
74
+
75
+ ## Using pillars as the decision filter
76
+
77
+ This is the payoff. Every downstream question becomes a **score**, not an argument:
78
+
79
+ - **The twist.** In [[process-the-twist]] step 3 you score six candidate bends
80
+ against the pillars and keep the one that *most sharpens* a pillar. A twist that
81
+ fights pillar 1 is a different game — drop it.
82
+ - **System inclusion.** In [[process-composition]], a system earns its place only
83
+ if it serves a pillar. "Does crafting serve any pillar? No → cut it."
84
+ - **The cut list.** When scope must shrink, cut the content that serves the
85
+ *lowest-ranked* pillar first.
86
+ - **Content & difficulty.** A level or encounter that expresses no pillar is
87
+ filler. Every encounter should be a pillar, dramatised.
88
+
89
+ > **The filter test.** If a proposed feature passes zero pillars, it's out — no
90
+ > discussion. If it passes one, it's optional. If it passes two, it's core. This
91
+ > is the entire value of writing them down.
92
+
93
+ ## Worked example
94
+
95
+ **Brief (from [[process-intent-to-brief]] example B):** an RTS with faction
96
+ asymmetry and impressive battles; X = [[anchor-starcraft]].
97
+
98
+ **Five candidates → three pillars:**
99
+
100
+ 1. **Three armies, one balance** — *every faction shares zero units and still wins
101
+ its share of mirrorless matchups.* (from the hook; the twist lives here)
102
+ 2. **A hundred hands, one will** — *mass answers a single order and paths around
103
+ walls without micro.* (from the fantasy + FUN.md §9's mechanical truth)
104
+ 3. **The order you gave is the battle you get** — *unit behaviour is legible and
105
+ deterministic; no surprise from the sim.* (an inherited-constraint pillar)
106
+
107
+ *Cut:* "deep tech tree" (demoted — it serves pillar 1, not its own thing) and
108
+ "cinematic camera" (a JUICE.md feel goal, not a pillar).
109
+
110
+ **Filter in action:** a proposed hero-unit mechanic — does it serve a pillar? It
111
+ sharpens pillar 1 (faction identity) *only if* each faction's hero is distinct;
112
+ generic heroes serve nothing and are cut. Pillar-scoring made the call in one line.
113
+
114
+ ## Traps
115
+
116
+ - **Pillars that are features.** "Has a skill tree" is a feature; *"builds diverge
117
+ by hour two"* is a pillar. Features are downstream of pillars.
118
+ - **Untestable moods.** "Epic", "immersive", "juicy" with no clause can't filter
119
+ anything. Every pillar needs a predicate.
120
+ - **Four pillars.** The fourth is usually a demoted feature or a dupe. Force three.
121
+ - **Unranked pillars.** If they never conflict, they're too vague; if they conflict
122
+ and you haven't ranked them, the next hard call stalls.
123
+ - **Pillars nobody enforces.** Written and forgotten is worse than none. Re-score
124
+ against them at every stage — they are only worth the decisions they make.
125
+
126
+ ## Composes with
127
+
128
+ - [[process-intent-to-brief]] — the brief is the ore; pillars are the refined metal.
129
+ - [[process-the-twist]] — pillars are literally the scoring function for the bend.
130
+ - [[process-core-loop]] — the loop must express the pillars beat by beat.
131
+ - [[process-composition]] — every included system must pass the pillar filter.
132
+
133
+ ## See also
134
+
135
+ - [`design/00-process/the-twist.md`](the-twist.md) — where pillars do their most
136
+ important work: choosing the twist.
137
+ - [docs/FUN.md](../../docs/FUN.md) Part 1 — the mechanical truths a testable pillar
138
+ clause often points straight at (a pillar clause is frequently a FUN.md law,
139
+ named for *your* game).