hayao 0.4.1 → 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 (110) 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/package.json +2 -1
@@ -0,0 +1,86 @@
1
+ # The Hayao Design Codex
2
+
3
+ **A generative game-design library for AI agents.** Where [`docs/FUN.md`](../docs/FUN.md),
4
+ [`docs/JUICE.md`](../docs/JUICE.md), and [`docs/JUDGE.md`](../docs/JUDGE.md) prove a
5
+ game *isn't broken*, the Codex is the front half: it turns a high-level intent —
6
+ *"design an RTS with deeply strategic choices, faction asymmetry, and visually
7
+ impressive battles"* — into a concrete, creative, buildable design **before** the
8
+ proof playbook ever runs.
9
+
10
+ The engine pre-solves *implementation*. This library pre-solves *conception*: it
11
+ gives you reference DNA to anchor to, modular systems to compose, a twist formula
12
+ to make it yours, and a pipeline that ends where FUN.md begins.
13
+
14
+ > **You are still the designer.** The Codex is scaffolding, not a slot machine.
15
+ > It exists so you spend your creativity on the *twist* and the *feel*, not on
16
+ > re-deriving what every roguelite already knows about meta-progression. Compose
17
+ > the known, then bend it.
18
+
19
+ ---
20
+
21
+ ## How to use it — the design pipeline
22
+
23
+ Run these in order. Each stage names the modules that drive it. Do **not** open
24
+ `examples/` for ideas (see [AGENTS.md](../AGENTS.md)); design from the mechanic
25
+ and the fantasy, using this library as your parts bin.
26
+
27
+ ```
28
+ INTENT ──▶ ANCHOR ──▶ COMPOSE ──▶ TWIST ──▶ SHAPE ──▶ HANDOFF ──▶ (FUN/JUICE/JUDGE)
29
+ ```
30
+
31
+ 1. **INTENT → brief.** Parse the request into a design brief: player fantasy,
32
+ the one-sentence hook, scope, hard constraints. → [`00-process/intent-to-brief`](00-process/intent-to-brief.md)
33
+ 2. **ANCHOR.** Name the 1–3 touchstone games this *is*. Pull their design DNA —
34
+ the load-bearing structures, not the theme. "This is Overcooked-like" imports
35
+ a solved core loop for free. → [`10-anchors/`](10-anchors/)
36
+ 3. **COMPOSE.** Assemble the design from modular pieces — genre template + the
37
+ systems it needs (progression, economy, combat, factions…). Genres blend;
38
+ satisfy every parent. → [`20-genres/`](20-genres/) · [`30-systems/`](30-systems/)
39
+ 4. **TWIST.** Add the creative bend that makes it *not* a clone. Apply a twist
40
+ vector (theme, mechanic-swap, structure, perspective, constraint). *Unrailed =
41
+ Overcooked + voxel + roguelite + train.* → [`00-process/the-twist`](00-process/the-twist.md)
42
+ 5. **SHAPE.** Derive pillars, the loop stack, the world, and the aesthetic; check
43
+ every choice against the pillars. → [`00-process/pillars`](00-process/pillars.md) ·
44
+ [`00-process/core-loop`](00-process/core-loop.md) · [`40-worldbuilding/`](40-worldbuilding/)
45
+ 6. **HANDOFF.** Convert the design into the verification contract and hand off to
46
+ the proof playbook. → [`00-process/refine-and-handoff`](00-process/refine-and-handoff.md)
47
+
48
+ Cross-cutting fun/polish concerns (feedback loops, risk-reward, mastery, pacing,
49
+ anti-frustration) apply at every stage → [`50-patterns/`](50-patterns/).
50
+
51
+ ---
52
+
53
+ ## Layout
54
+
55
+ | Dir | What's in it | Reach for it when |
56
+ |---|---|---|
57
+ | [`00-process/`](00-process/) | The pipeline: intent→brief, pillars, loops, **the twist**, composition, handoff | Running a design end-to-end |
58
+ | [`10-anchors/`](10-anchors/) | Reference-game **DNA** — touchstones distilled to load-bearing structure | Naming what a game *is*; importing a solved loop |
59
+ | [`20-genres/`](20-genres/) | Deep **creative** genre templates (pillars, loops, essential systems, seeds, pitfalls) | You know the genre; you need its design skeleton |
60
+ | [`30-systems/`](30-systems/) | The modular **systems library** — progression, economy, combat, factions, AI, rewards… | Composing the parts a design needs |
61
+ | [`40-worldbuilding/`](40-worldbuilding/) | Theme / lore / faction / aesthetic **kits** | Giving the design a world and a look |
62
+ | [`50-patterns/`](50-patterns/) | Cross-cutting **fun & polish** design patterns | Any stage — these are always on |
63
+ | [`INDEX.md`](INDEX.md) · [`index.json`](index.json) | The searchable index of every module (id · kind · tags · summary) | Looking something up by keyword |
64
+
65
+ ## Searching the Codex
66
+
67
+ Every module carries YAML frontmatter with `id`, `tags`, `use-when`, and
68
+ `composes-with`. To find pieces:
69
+
70
+ - **By keyword:** `grep -ri "asymmetr" design/` or search [`INDEX.md`](INDEX.md).
71
+ - **By tag:** `grep -rl "tags:.*economy" design/`.
72
+ - **By relationship:** follow `composes-with:` and inline `[[module-id]]` links.
73
+
74
+ IDs are stable and namespaced by kind: `process-*`, `anchor-*`, `genre-*`,
75
+ `system-*`, `world-*`, `pattern-*`. A link like `[[system-faction-asymmetry]]`
76
+ always resolves to `30-systems/faction-asymmetry.md`.
77
+
78
+ ## The relationship to the proof playbook
79
+
80
+ The Codex hands off; it never duplicates. When a module needs to state *how you
81
+ prove the thing is fun/fair*, it **links** the matching entry in
82
+ [`docs/FUN.md`](../docs/FUN.md) (mechanical truth + verify pattern),
83
+ [`docs/JUICE.md`](../docs/JUICE.md) (feel gates), or
84
+ [`docs/VERIFICATION.md`](../docs/VERIFICATION.md) rather than restating it. Design
85
+ here; verify there. A design isn't done until it names its proofs —
86
+ [`00-process/refine-and-handoff`](00-process/refine-and-handoff.md) is the seam.
@@ -0,0 +1,69 @@
1
+ ---
2
+ id: kind-slug # STABLE. namespaced: process-* anchor-* genre-* system-* world-* pattern-*
3
+ title: Human Readable Title
4
+ kind: process | anchor | genre | system | worldbuilding | pattern
5
+ tags: [lowercase, search, keywords] # 4–10; the words an agent would grep for
6
+ summary: One sentence, <140 chars — this is what appears in INDEX.md and index.json.
7
+ use-when: One line — the situation in which an agent should reach for this module.
8
+ composes-with: [other-id, other-id] # sibling modules that pair with this one (use real ids)
9
+ anchors: [anchor-id, anchor-id] # reference games this draws on (omit for process/pattern if N/A)
10
+ verify-with: docs/FUN.md#... | docs/JUICE.md#... | docs/VERIFICATION.md#... | none
11
+ ---
12
+
13
+ # {Title}
14
+
15
+ <!--
16
+ AUTHORING CONTRACT — delete these comments in real files.
17
+
18
+ VOICE: the house voice of docs/FUN.md — terse, imperative, second-person,
19
+ proof-aware. Every claim earns its place. No filler, no "in the world of game
20
+ design…" throat-clearing. Bold the load-bearing noun of a sentence, not whole
21
+ sentences.
22
+
23
+ LENGTH: 120–260 lines. Comprehensive but scannable. Prefer tables and tight
24
+ bullets over paragraphs. One screen should orient a reader.
25
+
26
+ GROUNDING:
27
+ - Never invent a Hayao API. If you cite one, it must exist in docs/API.md.
28
+ Prefer POINTING to the sandbox/example/doc that already wires it over pasting
29
+ code. Grep before you cite.
30
+ - Never restate FUN.md's mechanical-truth/verify content — LINK it via verify-with
31
+ and inline. Design here, prove there.
32
+ - Cross-link liberally with [[module-id]] (renders as text; the id resolves via
33
+ INDEX.md). A [[id]] that isn't written yet is fine — it marks intent.
34
+ - Cite real reference games by name where it sharpens a point. Be concrete
35
+ ("Slay the Spire's card-reward-of-3 with a skip") not vague ("some games").
36
+ -->
37
+
38
+ **What it is.** 1–3 sentences. The design concept in its most compressed form.
39
+
40
+ **Player fantasy / why it's fun.** What the player *feels*. The pull.
41
+
42
+ ## Body — structure by `kind`
43
+
44
+ Pick the skeleton for this module's kind (see design/CONTRIBUTING.md for the full
45
+ spec). In brief:
46
+
47
+ - **anchor** → Design DNA · The load-bearing structures · What to steal · What's
48
+ theme (drop it) · Composes into.
49
+ - **genre** → Pillars (3) · The loop stack · Essential systems (link `system-*`) ·
50
+ Content & difficulty model · Signature-mechanic seeds · Common pitfalls ·
51
+ Anchors · Verify (link FUN.md).
52
+ - **system** → What it is · When to use / when NOT · Variants · Tuning levers ·
53
+ How it wires to Hayao · Fails when… · Verify.
54
+ - **process** → The step · Inputs → outputs · How to run it · Worked example ·
55
+ Traps.
56
+ - **worldbuilding** → The kit · Vectors / options · Method · Hayao/aesthetic hook
57
+ (Kentō palette) · Traps.
58
+ - **pattern** → The principle · Why it works · Levers · Applied across genres ·
59
+ Overdone when… · Verify/feel-gate link.
60
+
61
+ ## Composes with
62
+
63
+ Bulleted `[[links]]` to the modules that most naturally combine with this one,
64
+ each with a half-line on *why*.
65
+
66
+ ## See also
67
+
68
+ Links into `docs/` (FUN, JUICE, JUDGE, CONVENTIONS) and any `sandboxes/` or
69
+ `examples/` that demonstrate the wiring.