agentleFS
ailess-labailess-lab/CCFG/.agents/skills/design-system/SKILL.md

design-system

Skill2 starsChanged 6 months agoMITView on GitHub

Godot 项目的系统设计/GDD 主入口。负责系统索引、完整 GDD、轻量设计补丁、设计审查、跨 GDD 一致性、平衡和设计变更影响。

108 other projects use a version of this, 5 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use playtest-report, team-audio and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CoralGameSkill

    playtest-report

    Generates a structured playtest report template or analyzes existing playtest notes into a structured format. Use this to standardize playtest feedback collection and analysis.

    Also in 6 projects that use this

  • CoralGameSkill

    team-audio

    Orchestrate audio team: audio-director + sound-designer + technical-artist + gameplay-programmer for full audio pipeline from direction to implementation.

    Also in 6 projects that use this

  • cenconq25Skill

    asset-spec

    Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.

    Also in 5 projects that use this

  • cenconq25Skill

    create-control-manifest

    Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.

    Also in 5 projects that use this

  • +2 more from CoralGame
  • +5 more from cenconq25

The file

Show its rules and text

We split this skill into the rules it gives an agent

107 rules. 0 are common, 65 are distinctive, and 42 are very specific to this project.

  • 0

    Common

    Most of the 98 edited versions we read keep these.

  • 65

    Distinctive

    This author's own choices. Worth a look.

  • 42

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the smallest mode that fits:

    line 18
  2. Very specific:

    No systems index: create or update design/gdd/systems-index.md first.

    line 20
  3. Very specific:

    If this same session authored the GDD, do not self-approve it.

    line 43
  4. Very specific:

    Do not read .agents/skills-archive/ during normal use.

    line 58
  5. Distinctive:

    When this skill is invoked:

    line 72
  6. Very specific:

    Do not parse review mode arguments and do not read or create production/review-mode.txt.

    line 76
  7. Very specific:

    No argument and no design/gdd/systems-index.md: read references/system-index-patch-impact.md and run the Systems Index Flow.

    line 83
  8. Very specific:

    Check if design/gdd/systems-index.md exists.

    line 100
  9. Very specific:

    If it exists: read it, find the highest-priority system with status "Not Started" or equivalent, and use AskUserQuestion:

    line 101
  10. Distinctive:

    If [A]: proceed with that system name.

    line 104
  11. Very specific:

    If no systems index exists, run the Systems Index Flow from references/system-index-patch-impact.md instead of failing.

    line 105
  12. Very specific:

    If the argument starts with retrofit or the argument is a file path to an existing .md file in design/gdd/, enter retrofit mode:

    line 111
  13. Distinctive:

    Read the existing GDD file.

    line 114
  14. Distinctive:

    Ask: "Shall I fill the [N] missing sections?

    line 133
  15. Distinctive:

    If yes: proceed to Phase 2 (Gather Context) as normal, but in Phase 3 skip creating the skeleton (file already exists) and in Phase 4 skip …

    line 134
  16. Very specific:

    Never overwrite existing section content: Use Edit tool to replace only [To be designed] placeholders or empty section bodies.

    line 138
  17. Very specific:

    If NOT in retrofit mode, normalize the system name to kebab-case for the filename (e.g., "combat system" becomes combat-system).

    line 141
  18. Distinctive:

    Read all relevant context before asking the user anything.

    line 148
  19. Very specific:

    Game concept: Read design/gdd/game-concept.md — fail if missing:

    line 153
  20. Very specific:

    Systems index: Read design/gdd/systems-index.md — fail if missing:

    line 155
  21. Very specific:

    Entity registry: Read design/registry/entities.yaml if it exists.

    line 160
  22. Very specific:

    Reflexion log: Read docs/consistency-failures.md if it exists.

    line 165
  23. Very specific:

    Game pillars: Read design/gdd/game-pillars.md if it exists

    line 187
  24. Very specific:

    Existing GDD: Read design/gdd/[system-name].md if it exists (resume, don't restart from scratch)

    line 188
  25. Distinctive:

    Before starting design work, present a brief summary to the user:

    line 196
  26. Distinctive:

    If any upstream dependencies are undesigned, warn:

    line 214
  27. Distinctive:

    Before asking the user to begin designing, load engine context and surface any constraints or knowledge gaps that will shape the design.

    line 221
  28. Very specific:

    Read .codex/docs/technical-preferences.md to identify the engine and version

    line 241
  29. Very specific:

    If engine is configured, read docs/engine-reference/[engine]/VERSION.md

    line 242
  30. Very specific:

    Read docs/engine-reference/[engine]/modules/[domain].md if it exists

    line 243
  31. Very specific:

    Read docs/engine-reference/[engine]/breaking-changes.md for domain-relevant entries

    line 244
  32. Distinctive:

    If engine reference docs exist, present before starting design:

    line 250
  33. Distinctive:

    If no engine reference docs exist (engine not yet configured), show a short note:

    line 272
  34. Very specific:

    Use the template structure from .codex/docs/templates/game-design-document.md:

    line 295
  35. Very specific:

    Ask: "May I create the skeleton file at design/gdd/[system-name].md?"

    line 360
  36. Distinctive:

    If the user declines: Stop with the following message:

    line 362
  37. Distinctive:

    Do not proceed to Section A.

    line 364
  38. Very specific:

    After writing, update production/session-state/active.md:

    line 366
  39. Distinctive:

    Use Glob to check if the file exists.

    line 367
  40. Distinctive:

    If it does not exist: use the Write tool to create it.

    line 368
  41. Distinctive:

    If it already exists: use the Edit tool to update the relevant fields.

    line 369
  42. Distinctive:

    After package approval, write sections incrementally to protect context, but do not ask for a new write approval for every section if the …

    line 384
  43. Very specific:

    Questions: Ask clarifying questions specific to this section.

    line 397
  44. Distinctive:

    Complete Package: Write the full system package in conversation text for review.

    line 407
  45. Distinctive:

    Approval: Ask once for the complete GDD package.

    line 410
  46. Distinctive:

    Write: Use the Edit tool to replace placeholders with approved package content.

    line 416
  47. Very specific:

    CRITICAL: Always include the section heading in the old_string to ensure uniqueness — never match [To be designed] alone, as multiple …

    line 417
  48. Distinctive:

    After writing, scan the section content for entity names, item names, formula names, and numeric constants that appear in the registry.

    line 427
  49. Distinctive:

    If they differ: surface the conflict immediately before starting the next section.

    line 430
  50. Distinctive:

    If new (not in registry): flag it as a candidate for registry registration (will be handled in Phase 5).

    line 434
  51. Very specific:

    After writing each meaningful section or milestone, update production/session-state/active.md with the completed section name.

    line 437
  52. Distinctive:

    Derive recommended options before building the widget: Read the system's category and layer from the systems index (already in context from …

    line 452
  53. Very specific:

    Framing questions (ask BEFORE drafting): Use AskUserQuestion with a multi-tab widget:

    line 459
  54. Distinctive:

    Use the user's answers to shape the draft.

    line 464
  55. Distinctive:

    Cross-reference: Check that the description aligns with how the systems index describes it.

    line 471
  56. Distinctive:

    Derive recommended option before building the widget: Read the system's category and layer from Phase 2 context:

    line 487
  57. Very specific:

    Framing question (ask BEFORE drafting): Use AskUserQuestion:

    line 494
  58. Distinctive:

    Use the answer to frame the Player Fantasy section appropriately.

    line 498
  59. Distinctive:

    Cross-reference: Must align with the game pillars.

    line 505
  60. Distinctive:

    CFG creative-framing pass (mandatory): After the framing answer is given but before drafting:

    line 512
  61. Distinctive:

    States and Transitions: If the system has states, map every state and every valid transition.

    line 531
  62. Distinctive:

    CFG specialist-lens pass (mandatory): Before drafting Section C:

    line 545
  63. Distinctive:

    Look up the system category in the routing table (Section 6 of this Skill).

    line 546
  64. Distinctive:

    Use: system name, game concept summary, pillar set, dependency GDD excerpts, and the specific section being worked on.

    line 548
  65. Distinctive:

    Goal: Every mathematical formula, with variables defined, ranges specified, and edge cases noted.

    line 566
  66. Very specific:

    Do NOT write [Formula TBD] or describe a formula in prose without the variable table.

    line 585
  67. Distinctive:

    Should scaling be linear, logarithmic, or stepped?

    line 590
  68. Distinctive:

    CFG balance pass (mandatory): Before proposing formulas or balance values:

    line 597
  69. Distinctive:

    Always apply the systems/balance lens: use Core Rules from Section C, tuning goals from the user, and balance context from dependency GDDs.

    line 598
  70. Distinctive:

    For economy/cost systems, also apply the economy lens: use placement costs, upgrade cost intent, and progression goals.

    line 601
  71. Distinctive:

    Cross-reference: If a dependency GDD defines a formula whose output feeds into this system, reference it explicitly.

    line 610
  72. Distinctive:

    Do NOT write vague entries like "handle appropriately" — each must name the exact condition and the exact resolution.

    line 626
  73. Distinctive:

    CFG edge-case pass (mandatory): Before finalising edge cases, use completed Sections C and D to identify edge cases from the formula and …

    line 639
  74. Distinctive:

    Cross-reference: Check edge cases against dependency GDDs.

    line 644
  75. Distinctive:

    Goal: Every designer-adjustable value, with safe ranges and extreme behaviors.

    line 668
  76. Distinctive:

    CFG balance pass: If formulas are complex, use the systems/balance lens to derive tuning knobs from the formula variables.

    line 675
  77. Distinctive:

    Cross-reference: If a dependency GDD lists tuning knobs that affect this system, reference them here.

    line 678
  78. Distinctive:

    CFG testability pass (mandatory): Before finalising acceptance criteria, use completed GDD sections C, D, and E to validate that the …

    line 702
  79. Very specific:

    After writing this section, check whether it contains real content (not just [To be designed] or a note that this system has no UI).

    line 752
  80. Distinctive:

    After all sections are written:

    line 771
  81. Distinctive:

    Read back the complete GDD from file (not from conversation memory — the file is the source of truth).

    line 775
  82. Distinctive:

    All 8 required sections have real content (not placeholders)

    line 777
  83. Distinctive:

    Run an internal GDD alignment checklist instead:

    line 789
  84. Very specific:

    If concerns remain, keep status Designed or Needs Revision.

    line 798
  85. Very specific:

    Ask: "May I update design/registry/entities.yaml with these [N] new entries and update referenced_by for the existing entries?"

    line 828
  86. Very specific:

    If yes: append new entries and update referenced_by arrays.

    line 831
  87. Very specific:

    NEVER offer to run /design-system inline: Always direct the user to a fresh window.

    line 850
  88. Distinctive:

    After the GDD is complete (and optionally reviewed):

    line 854
  89. Distinctive:

    Read the systems index

    line 856
  90. Distinctive:

    Update the target system's row:

    line 857
  91. Distinctive:

    If the fresh review flow was run and verdict is APPROVED: Status → "Approved"

    line 858
  92. Distinctive:

    If the fresh review flow was run and verdict is NEEDS REVISION: Status → "In Review"

    line 859
  93. Distinctive:

    If review was not requested or this same session authored the GDD: Status → "Designed" (pending review)

    line 860
  94. Distinctive:

    If the user chose "I'll review it myself first": Status → "Designed"

    line 861
  95. Distinctive:

    Update the Progress Tracker counts

    line 863
  96. Very specific:

    Ask: "May I update the systems index at design/gdd/systems-index.md?"

    line 865
  97. Distinctive:

    Use: system name, game concept summary, dependency GDD excerpts, the specific section being worked on, and what question needs expert input.

    line 911
  98. Distinctive:

    If the session is interrupted (compaction, crash, new session):

    line 923
  99. Very specific:

    Read production/session-state/active.md — it records the current system and which sections are complete

    line 925
  100. Very specific:

    Read design/gdd/[system-name].md — sections with real content are done.

    line 927
  101. Distinctive:

    Session state updates: After every section write

    line 948
  102. Distinctive:

    Cross-referencing: Every section checks existing GDDs for conflicts

    line 949
  103. Distinctive:

    Never: write outside the approved package without user approval.

    line 954
  104. Very specific:

    Run /design-system design/gdd/[system-name].md in a fresh session to validate the completed GDD independently

    line 972
  105. Very specific:

    Run /design-system to verify this GDD's values don't conflict with other GDDs

    line 973
  106. Very specific:

    Run /design-system next to move to the next highest-priority undesigned system

    line 974
  107. Very specific:

    Run /gate-check pre-production when all MVP GDDs are authored and reviewed

    line 975

“Common” is measured: kept by at least 6 in 10 of the 98 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design System

Absorbed Responsibilities

This is now the single design/GDD entrypoint. It also covers the former map-systems, quick-design, design-review, review-all-gdds, consistency-check, balance-check, and propagate-design-change routes.

Use the smallest mode that fits:

  • No systems index: create or update design/gdd/systems-index.md first.
  • Small tuning/change: produce a compact design patch instead of a full GDD.
  • Review request: run the relevant checklist inside this Skill and return APPROVED / CONCERNS / NEEDS WORK.
  • Cross-document concern: scan only the affected GDD sections before reading whole files.

Preserved CCGS value:

  • Systems index output: design/gdd/systems-index.md.
  • System GDD output: design/gdd/[system-name].md.
  • Quick design output: design/quick-specs/[name]-[date].md.
  • Review log output: design/gdd/reviews/[doc-name]-review-log.md.
  • Change impact output, when architecture/stories may be stale: docs/architecture/change-impact-[date]-[system-slug].md.
  • GDD status values should stay machine-readable: Not Started, Designed, In Review, Approved, Needs Revision.
  • Review verdicts: APPROVED, NEEDS REVISION, MAJOR REVISION NEEDED.
  • Cross-GDD concerns to preserve: broken dependencies, duplicate entities with conflicting attributes, formula variable mismatch, unresolved tuning ranges, dominant strategies, economy/progression cliffs, and pillar drift.
  • Balance checks must read actual data/formulas/config before judging; do not invent balance findings from taste.
  • If this same session authored the GDD, do not self-approve it. Record Designed and route a later/fresh review pass through this same core Skill.

CFG Specialist Policy

The inherited 49 CCGS agent files are not active project architecture. Do not invoke legacy agents and do not read .codex/agents/. The role names preserved below are professional lenses inside this Skill: game design, systems/balance, economy, narrative, UX, art direction, audio, implementation feasibility, and QA/testability. If one of these lenses becomes a recurring standalone need, add it back through CFG governance as a Skill or narrow agent with a concrete artifact boundary.

Reference Loading Rules

Do not read .agents/skills-archive/ during normal use. Old design Skill contents have been extracted into direct references:

  • For systems index creation, quick design patches, and design-change impact: read references/system-index-patch-impact.md.
  • For single-GDD review, cross-GDD review, consistency registry checks, and balance checks: read references/review-consistency-balance.md.
  • For checking what was absorbed during future governance work: read references/absorption-map.md.

Load only the reference matching the user's request. Full GDD authoring can run from this SKILL.md alone once design/gdd/systems-index.md exists and the target system is known.

When this skill is invoked:

1. Parse Arguments & Validate

Do not parse review mode arguments and do not read or create production/review-mode.txt. Use the fixed review standard: internal checks here, fresh-session review through this Skill when needed, and phase-gate director review only in /gate-check.

Mode routing:

  • No argument and no design/gdd/systems-index.md: read references/system-index-patch-impact.md and run the Systems Index Flow.
  • Argument includes map, systems, index, or next: read references/system-index-patch-impact.md.
  • Argument includes quick, patch, tuning, or small: read references/system-index-patch-impact.md and use the Quick Design Patch Flow.
  • Argument includes review, audit, an existing design/gdd/*.md path, or current: read references/review-consistency-balance.md and use the relevant review flow before or instead of authoring.
  • Argument includes all, cross, consistency, registry, balance, or formula: read references/review-consistency-balance.md.
  • Argument includes change, impact, propagate, stale, or ADR: read references/system-index-patch-impact.md and use the Design Change Impact Flow.

A system name or retrofit path is required. If missing:

  1. Check if design/gdd/systems-index.md exists.
  2. If it exists: read it, find the highest-priority system with status "Not Started" or equivalent, and use AskUserQuestion:
    • Prompt: "The next system in your design order is [system-name] ([priority] | [layer]). Start designing it?"
    • Options: [A] Yes — design [system-name] / [B] Pick a different system / [C] Stop here
    • If [A]: proceed with that system name. If [B]: ask which system to design (plain text). If [C]: exit.
  3. If no systems index exists, run the Systems Index Flow from references/system-index-patch-impact.md instead of failing. Ask before writing design/gdd/systems-index.md, then offer the first system from the resulting design order.

Detect retrofit mode: If the argument starts with retrofit or the argument is a file path to an existing .md file in design/gdd/, enter retrofit mode:

  1. Read the existing GDD file.
  2. Identify which of the 8 required sections are present (scan for section headings). Required sections: Overview, Player Fantasy, Detailed Design/Rules, Formulas, Edge Cases, Dependencies, Tuning Knobs, Acceptance Criteria.
  3. Identify which sections contain only placeholder text ([To be designed] or equivalent — blank, a single line, or obviously incomplete).
  4. Present to the user before doing anything:
    ## Retrofit: [System Name]
    File: design/gdd/[filename].md
    
    Sections already written (will not be touched):
    ✓ [section name]
    ✓ [section name]
    
    Missing or incomplete sections (will be authored):
    ✗ [section name] — missing
    ✗ [section name] — placeholder only
  5. Ask: "Shall I fill the [N] missing sections? I will not modify any existing content."
  6. If yes: proceed to Phase 2 (Gather Context) as normal, but in Phase 3 skip creating the skeleton (file already exists) and in Phase 4 skip sections that are already complete. Only run the section cycle for missing/ incomplete sections.
  7. Never overwrite existing section content. Use Edit tool to replace only [To be designed] placeholders or empty section bodies.

If NOT in retrofit mode, normalize the system name to kebab-case for the filename (e.g., "combat system" becomes combat-system).


2. Gather Context (Read Phase)

Read all relevant context before asking the user anything. This is the skill's primary advantage over ad-hoc design — it arrives informed.

2a: Required Reads

  • Game concept: Read design/gdd/game-concept.md — fail if missing:

    "No game concept found. Run /brainstorm first."

  • Systems index: Read design/gdd/systems-index.md — fail if missing:

    "No systems index found. Run /design-system first to map your systems."

  • Target system: Find the system in the index. If not listed, warn:

    "[system-name] is not in the systems index. Would you like to add it, or design it as an off-index system?"

  • Entity registry: Read design/registry/entities.yaml if it exists. Extract all entries referenced by or relevant to this system (grep referenced_by.*[system-name] and source.*[system-name]). Hold these in context as known facts — values that other GDDs have already established and this GDD must not contradict.
  • Reflexion log: Read docs/consistency-failures.md if it exists. Extract entries whose Domain matches this system's category. These are recurring conflict patterns — present them under "Past failure patterns" in the Phase 2d context summary so the user knows where mistakes have occurred before in this domain.

2b: Dependency Reads

From the systems index, identify:

  • Upstream dependencies: Systems this one depends on. Read their GDDs if they exist (these contain decisions this system must respect).
  • Downstream dependents: Systems that depend on this one. Read their GDDs if they exist (these contain expectations this system must satisfy).

For each dependency GDD that exists, extract and hold in context:

  • Key interfaces (what data flows between the systems)
  • Formulas that reference this system's outputs
  • Edge cases that assume this system's behavior
  • Tuning knobs that feed into this system

2c: Optional Reads

  • Game pillars: Read design/gdd/game-pillars.md if it exists
  • Existing GDD: Read design/gdd/[system-name].md if it exists (resume, don't restart from scratch)
  • Related GDDs: Glob design/gdd/*.md and read any that are thematically related (e.g., if designing a system that overlaps with another in scope, read the related GDD even if it's not a formal dependency)

2d: Present Context Summary

Before starting design work, present a brief summary to the user:

Designing: [System Name]

  • Priority: [from index] | Layer: [from index]
  • Depends on: [list, noting which have GDDs vs. undesigned]
  • Depended on by: [list, noting which have GDDs vs. undesigned]
  • Existing decisions to respect: [key constraints from dependency GDDs]
  • Pillar alignment: [which pillar(s) this system primarily serves]
  • Known cross-system facts (from registry):
    • [entity_name]: [attribute]=[value], [attribute]=[value] (owned by [source GDD])
    • [item_name]: [attribute]=[value], [attribute]=[value] (owned by [source GDD])
    • [formula_name]: variables=[list], output=[min–max] (owned by [source GDD])
    • [constant_name]: [value] [unit] (owned by [source GDD]) (These values are locked — if this GDD needs different values, surface the conflict before writing. Do not silently use different numbers.)

If no registry entries are relevant: omit the "Known cross-system facts" section.

If any upstream dependencies are undesigned, warn:

"[dependency] doesn't have a GDD yet. We'll need to make assumptions about its interface. Consider designing it first, or we can define the expected contract and flag it as provisional."

2e: Technical Feasibility Pre-Check

Before asking the user to begin designing, load engine context and surface any constraints or knowledge gaps that will shape the design.

Step 1 — Determine the engine domain for this system: Map the system's category (from systems-index.md) to an engine domain:

System CategoryEngine Domain
Combat, physics, collisionPhysics
Rendering, visual effects, shadersRendering
UI, HUD, menusUI
Audio, sound, musicAudio
AI, pathfinding, behavior treesNavigation / Scripting
Animation, IK, rigsAnimation
Networking, multiplayer, syncNetworking
Input, controls, keybindingInput
Save/load, persistence, dataCore
Dialogue, quests, narrativeScripting

Step 2 — Read engine context (if available):

  • Read .codex/docs/technical-preferences.md to identify the engine and version
  • If engine is configured, read docs/engine-reference/[engine]/VERSION.md
  • Read docs/engine-reference/[engine]/modules/[domain].md if it exists
  • Read docs/engine-reference/[engine]/breaking-changes.md for domain-relevant entries
  • Glob docs/architecture/adr-*.md and read any ADRs whose domain matches (check the Engine Compatibility table's "Domain" field)

Step 3 — Present the Feasibility Brief:

If engine reference docs exist, present before starting design:

## Technical Feasibility Brief: [System Name]
Engine: [name + version]
Domain: [domain]

### Known Engine Capabilities (verified for [version])
- [capability relevant to this system]
- [capability 2]

### Engine Constraints That Will Shape This Design
- [constraint from engine-reference or existing ADR]

### Knowledge Gaps (verify before committing to these)
- [post-cutoff feature this design might rely on — mark HIGH/MEDIUM risk]

### Existing ADRs That Constrain This System
- ADR-XXXX: [decision summary] — means [implication for this GDD]
  (or "None yet")

If no engine reference docs exist (engine not yet configured), show a short note:

"No engine configured yet — skipping technical feasibility check. Run /setup-engine before moving to architecture if you haven't already."

Step 4 — Ask before proceeding:

Use AskUserQuestion:

  • "Any constraints to add before we begin, or shall we proceed with these noted?"
    • Options: "Proceed with these noted", "Add a constraint first", "I need to check the engine docs — pause here"

Use AskUserQuestion:

  • "Ready to start designing [system-name]?"
    • Options: "Yes, let's go", "Show me more context first", "Design a dependency first"

3. Create File Skeleton

Once the user confirms, immediately create the GDD file with empty section headers. This ensures incremental writes have a target.

Use the template structure from .codex/docs/templates/game-design-document.md:

# [System Name]

> **Status**: In Design
> **Author**: [user + agents]
> **Last Updated**: [today's date]
> **Implements Pillar**: [from context]

## Overview

[To be designed]

## Player Fantasy

[To be designed]

## Detailed Design

### Core Rules

[To be designed]

### States and Transitions

[To be designed]

### Interactions with Other Systems

[To be designed]

## Formulas

[To be designed]

## Edge Cases

[To be designed]

## Dependencies

[To be designed]

## Tuning Knobs

[To be designed]

## Visual/Audio Requirements

[To be designed]

## UI Requirements

[To be designed]

## Acceptance Criteria

[To be designed]

## Open Questions

[To be designed]

Ask: "May I create the skeleton file at design/gdd/[system-name].md?"

If the user declines: Stop with the following message:

"Verdict: BLOCKED — skeleton creation declined. The design session cannot proceed without the skeleton file, as all subsequent phases use it as the base. Re-run /design-system [system] when ready to create the file." Do not proceed to Section A.

After writing, update production/session-state/active.md:

  • Use Glob to check if the file exists.
  • If it does not exist: use the Write tool to create it. Never attempt Edit on a file that may not exist.
  • If it already exists: use the Edit tool to update the relevant fields.

File content:

  • Task: Designing [system-name] GDD
  • Current section: Starting (skeleton created)
  • File: design/gdd/[system-name].md

4. Complete GDD Package, Then Incremental Writing

First produce a complete GDD package for the system: scope, section outline, major design decisions, dependencies, formulas/tuning needs, files to write, risk areas, and acceptance criteria. Ask for one approval of that package.

After package approval, write sections incrementally to protect context, but do not ask for a new write approval for every section if the section stays inside the approved package.

The Package Cycle

Context -> Questions -> Options -> Decision -> Complete Package -> Approval -> Incremental Write
  1. Context: State what this section needs to contain, and surface any relevant decisions from dependency GDDs that constrain it.
  2. Questions: Ask clarifying questions specific to this section. Use AskUserQuestion for constrained questions, conversational text for open-ended exploration.
  3. Options: Where the section involves design choices (not just documentation), present 2-4 approaches with pros/cons. Explain reasoning in conversation text, then use AskUserQuestion to capture the decision.
  4. Decision: User picks an approach or provides custom direction.
  5. Complete Package: Write the full system package in conversation text for review. Flag provisional assumptions about undesigned dependencies.
  6. Approval: Ask once for the complete GDD package.

    • Prompt: "Approve this GDD package and write the planned sections?"
    • Options: [A] Approve package / [B] Revise package / [C] Start over

    The package and approval widget should appear together in one response.

  7. Write: Use the Edit tool to replace placeholders with approved package content. CRITICAL: Always include the section heading in the old_string to ensure uniqueness — never match [To be designed] alone, as multiple sections use the same placeholder and the Edit tool requires a unique match. Use this pattern:
    old_string: "## [Section Name]\n\n[To be designed]"
    new_string: "## [Section Name]\n\n[approved content]"
    Confirm the write.
  8. Registry conflict check (Sections C and D only — Detailed Design and Formulas): After writing, scan the section content for entity names, item names, formula names, and numeric constants that appear in the registry. For each match:
    • Compare the value just written against the registry entry.
    • If they differ: surface the conflict immediately before starting the next section. Do not continue silently.

      "Registry conflict: [name] is registered in [source GDD] as [registry_value]. This section just wrote [new_value]. Which is correct?"

    • If new (not in registry): flag it as a candidate for registry registration (will be handled in Phase 5).

After writing each meaningful section or milestone, update production/session-state/active.md with the completed section name. Use Glob to check if the file exists — use Write to create it if absent, Edit to update it if present.

Section-Specific Guidance

Each section has unique design considerations and may benefit from specialist agents:


Section A: Overview

Goal: One paragraph a stranger could read and understand.

Derive recommended options before building the widget: Read the system's category and layer from the systems index (already in context from Phase 2), then determine the recommended option for each tab:

  • Framing tab: Foundation/Infrastructure layer → [A] recommended. Player-facing categories (Combat, UI, Dialogue, Character, Animation, Visual Effects, Audio) → [C] Both recommended.
  • ADR ref tab: Glob docs/architecture/adr-*.md and grep for the system name in the GDD Requirements section of any ADR. If a matching ADR is found → [A] Yes — cite the ADR recommended. If none found → [B] No recommended.
  • Fantasy tab: Foundation/Infrastructure layer → [B] No recommended. All other categories → [A] Yes recommended.

Append (Recommended) to the appropriate option text in each tab.

Framing questions (ask BEFORE drafting): Use AskUserQuestion with a multi-tab widget:

  • Tab "Framing" — "How should the overview frame this system?" Options: [A] As a data/infrastructure layer (technical framing) / [B] Through its player-facing effect (design framing) / [C] Both — describe the data layer and its player impact
  • Tab "ADR ref" — "Should the overview reference the existing ADR for this system?" Options: [A] Yes — cite the ADR for implementation details / [B] No — keep the GDD at pure design level
  • Tab "Fantasy" — "Does this system have a player fantasy worth stating?" Options: [A] Yes — players feel it directly / [B] No — pure infrastructure, players feel what it enables

Use the user's answers to shape the draft. Do NOT answer these questions yourself and auto-draft.

Questions to ask:

  • What is this system in one sentence?
  • How does a player interact with it? (active/passive/automatic)
  • Why does this system exist — what would the game lose without it?

Cross-reference: Check that the description aligns with how the systems index describes it. Flag discrepancies.

Design vs. implementation boundary: Overview questions must stay at the behavior level — what the system does, not how it is built. If implementation questions arise during the Overview (e.g., "Should this use an Autoload singleton or a signal bus?"), note them as "→ becomes an ADR" and move on. Implementation patterns belong in /create-architecture, not the GDD. The GDD describes behavior; the ADR describes the technical approach used to achieve it.


Section B: Player Fantasy

Goal: The emotional target — what the player should feel.

Derive recommended option before building the widget: Read the system's category and layer from Phase 2 context:

  • Player-facing categories (Combat, UI, Dialogue, Character, Animation, Audio, Level/World) → [A] Direct recommended
  • Foundation/Infrastructure layer → [B] Indirect recommended
  • Mixed categories (Camera/input, Economy, AI with visible player effects) → [C] Both recommended

Append (Recommended) to the appropriate option text.

Framing question (ask BEFORE drafting): Use AskUserQuestion:

  • Prompt: "Is this system something the player engages with directly, or infrastructure they experience indirectly?"
  • Options: [A] Direct — player actively uses or feels this system / [B] Indirect — player experiences the effects, not the system / [C] Both — has a direct interaction layer and infrastructure beneath it

Use the answer to frame the Player Fantasy section appropriately. Do NOT assume the answer.

Questions to ask:

  • What emotion or power fantasy does this serve?
  • What reference games nail this feeling? What specifically creates it?
  • Is this a "system you love engaging with" or "infrastructure you don't notice"?

Cross-reference: Must align with the game pillars. If the system serves a pillar, quote the relevant pillar text.

CFG specialist policy: apply the implementation-risk lenses only for HIGH implementation risk in Sections D and H. For other sections, draft without extra feasibility analysis and note the reason in the section draft.

CFG creative-framing pass (mandatory): After the framing answer is given but before drafting:

  • Provide: system name, framing answer (direct/indirect/both), game pillars, any reference games the user mentioned, the game concept summary
  • Shape the Player Fantasy for this system. What emotion or power fantasy should it serve? What player moment should anchor it? What tone and language fits the game's established feeling? Be specific: give 2-3 candidate framings.
  • Present the candidate framings to the user alongside the draft.

Do not draft Section B without first running the creative-framing pass. The framing answer tells us what kind of fantasy it is; the creative lens shapes how it is described: tone, language, and the specific player moment to anchor.


Section C: Detailed Design (Core Rules, States, Interactions)

Goal: Unambiguous specification a programmer could implement without questions.

This is usually the largest section. Break it into sub-sections:

  1. Core Rules: The fundamental mechanics. Use numbered rules for sequential processes, bullets for properties.
  2. States and Transitions: If the system has states, map every state and every valid transition. Use a table.
  3. Interactions with Other Systems: For each dependency (upstream and downstream), specify what data flows in, what flows out, and who owns the interface.

Questions to ask:

  • Walk me through a typical use of this system, step by step
  • What are the decision points the player faces?
  • What can the player NOT do? (Constraints are as important as capabilities)

CFG specialist policy: apply the implementation-risk lenses only for HIGH implementation risk in Sections D and H. For other sections, draft without extra feasibility analysis and note the reason in the section draft.

CFG specialist-lens pass (mandatory): Before drafting Section C:

  • Look up the system category in the routing table (Section 6 of this Skill).
  • Apply the primary lens and supporting lenses listed for this category.
  • Use: system name, game concept summary, pillar set, dependency GDD excerpts, and the specific section being worked on.
  • Collect the findings before drafting.
  • Surface disagreements between lenses to the user via AskUserQuestion.
  • Draft only after the lens pass is complete.

Do not draft Section C without the appropriate specialist-lens pass. A systems/balance review of rules and mechanics catches design gaps the main session can miss.

Cross-reference: For each interaction listed, verify it matches what the dependency GDD specifies. If a dependency defines a value or formula and this system expects something different, flag the conflict.


Section D: Formulas

Goal: Every mathematical formula, with variables defined, ranges specified, and edge cases noted.

Completion Steering — always begin each formula with this exact structure:

The [formula_name] formula is defined as:

`[formula_name] = [expression]`

**Variables:**
| Variable | Symbol | Type | Range | Description |
|----------|--------|------|-------|-------------|
| [name] | [sym] | float/int | [min–max] | [what it represents] |

**Output Range:** [min] to [max] under normal play; [behaviour at extremes]
**Example:** [worked example with real numbers]

Do NOT write [Formula TBD] or describe a formula in prose without the variable table. A formula without defined variables cannot be implemented without guesswork.

Questions to ask:

  • What are the core calculations this system performs?
  • Should scaling be linear, logarithmic, or stepped?
  • What should the output ranges be at early/mid/late game?

CFG specialist policy: apply the implementation-risk lenses only for HIGH implementation risk in Sections D and H. For other sections, draft without extra feasibility analysis and note the reason in the section draft.

CFG balance pass (mandatory): Before proposing formulas or balance values:

  • Always apply the systems/balance lens: use Core Rules from Section C, tuning goals from the user, and balance context from dependency GDDs. Propose formulas with variable tables and output ranges.
  • For economy/cost systems, also apply the economy lens: use placement costs, upgrade cost intent, and progression goals. Validate cost curves and ratios.
  • Present the proposals to the user for review via AskUserQuestion.
  • The user decides; the main session writes to file.
  • Do not invent formula values or balance numbers without the balance pass. A user without balance design expertise cannot evaluate raw numbers without the reasoning behind them.

Cross-reference: If a dependency GDD defines a formula whose output feeds into this system, reference it explicitly. Don't reinvent — connect.


Section E: Edge Cases

Goal: Explicitly handle unusual situations so they don't become bugs.

Completion Steering — format each edge case as:

  • If [condition]: [exact outcome]. [rationale if non-obvious]

Example (adapt terminology to the game's domain):

  • If [resource] reaches 0 while [protective condition] is active: hold at minimum until condition ends, then apply consequence.
  • If two [triggers/events] fire simultaneously: resolve in [defined priority order]; ties use [defined tiebreak rule].

Do NOT write vague entries like "handle appropriately" — each must name the exact condition and the exact resolution. An edge case without a resolution is an open design question, not a specification.

Questions to ask:

  • What happens at zero? At maximum? At out-of-range values?
  • What happens when two rules apply at the same time?
  • What happens if a player finds an unintended interaction? (Identify degenerate strategies)

CFG specialist policy: apply the implementation-risk lenses only for HIGH implementation risk in Sections D and H. For other sections, draft without extra feasibility analysis and note the reason in the section draft.

CFG edge-case pass (mandatory): Before finalising edge cases, use completed Sections C and D to identify edge cases from the formula and rule space that the main session may have missed. For narrative systems, also apply the narrative lens. Present the findings and ask the user which to include.

Cross-reference: Check edge cases against dependency GDDs. If a dependency defines a floor, cap, or resolution rule that this system could violate, flag it.


Section F: Dependencies

Goal: Map every system connection with direction and nature.

This section is partially pre-filled from the context gathering phase. Present the known dependencies from the systems index and ask:

  • Are there dependencies I'm missing?
  • For each dependency, what's the specific data interface?
  • Which dependencies are hard (system cannot function without it) vs. soft (enhanced by it but works without it)?

Cross-reference: This section must be bidirectionally consistent. If this system lists "depends on Combat", then the Combat GDD should list "depended on by [this system]". Flag any one-directional dependencies for correction.


Section G: Tuning Knobs

Goal: Every designer-adjustable value, with safe ranges and extreme behaviors.

Questions to ask:

  • What values should designers be able to tweak without code changes?
  • For each knob, what breaks if it's set too high? Too low?
  • Which knobs interact with each other? (Changing A makes B irrelevant)

CFG balance pass: If formulas are complex, use the systems/balance lens to derive tuning knobs from the formula variables.

Cross-reference: If a dependency GDD lists tuning knobs that affect this system, reference them here. Don't create duplicate knobs — point to the source of truth.


Section H: Acceptance Criteria

Goal: Testable conditions that prove the system works as designed.

Completion Steering — format each criterion as Given-When-Then:

  • GIVEN [initial state], WHEN [action or trigger], THEN [measurable outcome]

Example (adapt terminology to the game's domain):

  • GIVEN [initial state], WHEN [player action or system trigger], THEN [specific measurable outcome].
  • GIVEN [a constraint is active], WHEN [player attempts an action], THEN [feedback shown and action result].

Include at least: one criterion per core rule from Section C, and one per formula from Section D. Do NOT write "the system works as designed" — every criterion must be independently verifiable by a QA tester without reading the GDD.

CFG specialist policy: apply the implementation-risk lenses only for HIGH implementation risk in Sections D and H. For other sections, draft without extra feasibility analysis and note the reason in the section draft.

CFG testability pass (mandatory): Before finalising acceptance criteria, use completed GDD sections C, D, and E to validate that the criteria are independently testable and cover all core rules and formulas. Surface gaps or untestable criteria to the user.

Questions to ask:

  • What's the minimum set of tests that prove this works?
  • What performance budget does this system get? (frame time, memory)
  • What would a QA tester check first?

Cross-reference: Include criteria that verify cross-system interactions work, not just this system in isolation.


Optional Sections: Visual/Audio, UI Requirements, Open Questions

These sections are included in the template. Visual/Audio is REQUIRED for visual system categories — not optional. Determine the requirement level before asking:

Visual/Audio is REQUIRED (mandatory — do not offer to skip) for these system categories:

  • Combat, damage, health
  • UI systems (HUD, menus)
  • Animation, character movement
  • Visual effects, particles, shaders
  • Character systems
  • Dialogue, quests, lore
  • Level/world systems

For required systems: apply the art-direction lens before drafting this section. Use: system name, game concept, game pillars, and art bible sections 1-4 if they exist. Specify: (1) VFX and visual feedback requirements for this system's events, (2) any animation or visual style constraints, (3) which art bible principles most directly apply to this system. Present the output; do not leave this section as [To be designed] for visual systems.

For all other system categories (Foundation/Infrastructure, Economy, AI/pathfinding, Camera/input), offer the optional sections after the required sections:

Use AskUserQuestion:

  • "The 8 required sections are complete. Do you want to also define Visual/Audio requirements, UI requirements, or capture open questions?"
    • Options: "Yes, all three", "Just open questions", "Skip — I'll add these later"

For Visual/Audio (non-required systems): coordinate with art-direction and audio-direction lenses if detail is needed. Often a brief note suffices at the GDD stage.

Asset Spec Flag: After the Visual/Audio section is written with real content, output this notice: "📌 Asset Spec — Visual/Audio requirements are defined. After the art bible is approved, run /art-bible system:[system-name] to produce per-asset visual descriptions, dimensions, and generation prompts from this section."

For UI Requirements: use the UX lens for complex UI systems. After writing this section, check whether it contains real content (not just [To be designed] or a note that this system has no UI). If it does have real UI requirements, output this flag immediately:

📌 UX Flag — [System Name]: This system has UI requirements. In Phase 4 (Pre-Production), run /art-bible to create a UX spec for each screen or HUD element this system contributes to before writing production work orders. Work orders that reference UI should cite design/ux/[screen].md, not the GDD directly.

Note this in the systems index for this system if you update it.

For Open Questions: Capture anything that came up during design that wasn't fully resolved. Each question should have an owner and target resolution date.


5. Post-Design Validation

After all sections are written:

5a: Self-Check

Read back the complete GDD from file (not from conversation memory — the file is the source of truth). Verify:

  • All 8 required sections have real content (not placeholders)
  • Formulas reference defined variables
  • Edge cases have resolutions
  • Dependencies are listed with interfaces
  • Acceptance criteria are testable

5a-bis: Creative Director Pillar Review

CD-GDD-ALIGN is not invoked as a separate gate. Do not invoke a standalone creative-direction gate here; run the internal GDD alignment checklist below and proceed to Step 5b.

Run an internal GDD alignment checklist instead:

  • Each section supports at least one pillar or explicitly explains why it is infrastructure.
  • Player fantasy and acceptance criteria are not contradicted by formulas or dependencies.
  • New entity/item/formula facts are registered or listed as candidates.
  • Any conflict with upstream GDDs is surfaced before status updates.

If concerns remain, keep status Designed or Needs Revision; do not mark the GDD approved in the same authoring session. Record: > **GDD Alignment Check**: COMPLETE [date] / CONCERNS [date] / REVISED [date]


5b: Update Entity Registry

Scan the completed GDD for cross-system facts that should be registered:

  • Named entities (enemies, NPCs, bosses) with stats or drops
  • Named items with values, weights, or categories
  • Named formulas with defined variables and output ranges
  • Named constants referenced by value in more than one place

For each candidate, check if it already exists in design/registry/entities.yaml:

Grep pattern="  - name: [candidate_name]" path="design/registry/entities.yaml"

Present a summary:

Registry candidates from this GDD:
  NEW (not yet registered):
    - [entity_name] [entity]: [attribute]=[value], [attribute]=[value]
    - [item_name] [item]: [attribute]=[value], [attribute]=[value]
    - [formula_name] [formula]: variables=[list], output=[min–max]
  ALREADY REGISTERED (referenced_by will be updated):
    - [constant_name] [constant]: value=[N] ← matches registry ✅

Ask: "May I update design/registry/entities.yaml with these [N] new entries and update referenced_by for the existing entries?"

If yes: append new entries and update referenced_by arrays. Never modify existing value / attribute fields without surfacing it as a conflict first.

5c: Offer Design Review

Present a completion summary:

GDD Complete: [System Name]

  • Sections written: [list]
  • Provisional assumptions: [list any assumptions about undesigned dependencies]
  • Cross-system conflicts found: [list or "none"]

To validate this GDD, open a fresh Codex session and run: /design-system design/gdd/[system-name].md

Never run /design-system in the same session as /design-system. The reviewing agent must be independent of the authoring context. Running it here would inherit the full design history, making independent critique impossible.

NEVER offer to run /design-system inline. Always direct the user to a fresh window.

5d: Update Systems Index

After the GDD is complete (and optionally reviewed):

  • Read the systems index
  • Update the target system's row:
    • If the fresh review flow was run and verdict is APPROVED: Status → "Approved"
    • If the fresh review flow was run and verdict is NEEDS REVISION: Status → "In Review"
    • If review was not requested or this same session authored the GDD: Status → "Designed" (pending review)
    • If the user chose "I'll review it myself first": Status → "Designed"
    • Design Doc: link to design/gdd/[system-name].md
  • Update the Progress Tracker counts

Ask: "May I update the systems index at design/gdd/systems-index.md?"

5e: Update Session State

Update production/session-state/active.md with:

  • Task: [system-name] GDD
  • Status: Complete (or In Review if the fresh review flow was run)
  • File: design/gdd/[system-name].md
  • Sections: All 8 written
  • Next: [suggest next system from design order]

5f: Suggest Next Steps

Use AskUserQuestion:

  • "What's next?"
    • Options:
      • "Run /design-system — verify this GDD's values don't conflict with existing GDDs (recommended before designing the next system)"
      • "Design next system ([next-in-order])" — if undesigned systems remain
      • "Fix review findings" — if the review flow flagged issues
      • "Stop here for this session"
      • "Run /gate-check" — if enough MVP systems are designed

6. CFG Specialist Lens Routing

This Skill uses professional lenses for domain expertise. The main session orchestrates the overall flow; the lenses provide expert checks and proposals.

System CategoryPrimary LensSupporting Lenses
Foundation/Infrastructure (event bus, save/load, scene mgmt, service locator)Systems designGameplay feasibility, engine integration
Combat, damage, healthGame designSystems/balance, AI behavior, art direction for hit feedback and VFX intent
Economy, loot, craftingEconomy designSystems/balance curves, game-loop design
Progression, XP, skillsGame designSystems/balance curves, economy sinks
Dialogue, quests, loreGame designNarrative, writing/content, art direction for character visual profiles and cinematic tone
UI systems (HUD, menus)Game designUX flows, UI implementation feasibility, art direction, technical-art constraints
Audio systemsGame designAudio direction, sound spec
AI, pathfinding, behaviorGame designAI implementation feasibility, systems scoring
Level/world systemsGame designLevel design, world/lore
Camera, input, controlsGame designUX feel, gameplay implementation feasibility
Animation, character movementGame designArt direction for animation/pose language, technical-art rig/blend constraints, gameplay feel
Visual effects, particles, shadersGame designArt direction for VFX, technical-art performance/shader constraints, systems trigger/state integration
Character systems (stats, archetypes)Game designArt direction for archetypes, narrative arc alignment, systems/stat formulas

When applying lenses:

  • Use: system name, game concept summary, dependency GDD excerpts, the specific section being worked on, and what question needs expert input.
  • The main session records analysis/proposals before writing.
  • The main session presents conflicts or consequential choices to the user via AskUserQuestion.
  • The user decides; the main session writes to file.
  • Lenses do not write to files directly; the main session owns all file writes.

7. Recovery & Resume

If the session is interrupted (compaction, crash, new session):

  1. Read production/session-state/active.md — it records the current system and which sections are complete
  2. Read design/gdd/[system-name].md — sections with real content are done; sections with [To be designed] still need work
  3. Resume from the next incomplete section — no need to re-discuss completed ones

This is why incremental writing matters: every approved section survives any disruption.


Collaborative Protocol

This skill follows the package-first collaborative design principle:

  1. Goal -> Scope -> Complete GDD Package -> Approval -> Incremental Write
  2. AskUserQuestion at every decision point (Explain -> Capture pattern):
    • Phase 2: "Ready to start, or need more context?"
    • Phase 3: "Approve package and create the skeleton?"
    • Phase 4: Package-level design choices and package approval
    • Phase 5: "Run design review? Update systems index? What's next?"
  3. One write approval for the skeleton and planned sections inside the approved package
  4. Incremental writing: Sections are written to file after package approval
  5. Session state updates: After every section write
  6. Cross-referencing: Every section checks existing GDDs for conflicts
  7. Specialist routing: Complex sections get expert agent input, presented to the user for decision — never written silently

Never auto-generate the full GDD and present it as a fait accompli. Never write outside the approved package without user approval. Never contradict an existing approved GDD without flagging the conflict. Always show where decisions come from (dependency GDDs, pillars, user choices).

Context Window Awareness

This is a long-running skill. After writing each section, check if the status line shows context at or above 70%. If so, append this notice to the response:

Context is approaching the limit (≥70%). Your progress is saved — all approved sections are written to design/gdd/[system-name].md. When you're ready to continue, open a fresh Codex session and run /design-system [system-name] — it will detect which sections are complete and resume from the next one.


Recommended Next Steps

  • Run /design-system design/gdd/[system-name].md in a fresh session to validate the completed GDD independently
  • Run /design-system to verify this GDD's values don't conflict with other GDDs
  • Run /design-system next to move to the next highest-priority undesigned system
  • Run /gate-check pre-production when all MVP GDDs are authored and reviewed

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.