unikit-gd-flow
Author and own one flow's design document (the FLOW.md objective flow) at .unikit/gamedesign/flows/FLOW-<slug>.md — the dynamics layer of the GDD (what the player does over time). Create the skeleton and walk the collaborative section-cycle to write its objectives, pacing, dependencies, and funnel events ("design the first-session flow", "map the onboarding sequence", "write the FLOW for the boss encounter"), AND revise it after approval under the delta discipline ("retune the pacing", "add a branch", "change a GOAL", "rework the onboarding") — a cue/number change is Tuning, a small step change a Tweak, restructuring a Rework; each bumps the version and logs the delta. Selects the wiring mode (linear | conditional | emergent) and re-renders the ## Flow Map [gen] / ## Funnel [gen] blocks in GAME.md. To add or detail a system use /unikit-gd-system; to edit GAME.md content use /unikit-gd-spec; to apply a multi-zone edit use /unikit-gd-apply; for a new game concept use /unikit-gd-brainstorm.
- License 许可
- MIT
- 最近更新
- 2026-11-08
- Stars
- ★ 22
- Forks
- 1
01 前言 Front Matter
- name
- unikit-gd-flow
- metadata
- { "author": "unikit", "version": "1.0", "category": "game-design" }
- description
- Author and own one flow's design document (the FLOW.md objective flow) at .unikit/gamedesign/flows/FLOW-<slug>.md — the dynamics layer of the GDD (what the player does over time). Create the skeleton and walk the collaborative section-cycle to write its objectives, pacing, dependencies, and funnel events ("design the first-session flow", "map the onboarding sequence", "write the FLOW for the boss encounter"), AND revise it after approval under the delta discipline ("retune the pacing", "add a branch", "change a GOAL", "rework the onboarding") — a cue/number change is Tuning, a small step change a Tweak, restructuring a Rework; each bumps the version and logs the delta. Selects the wiring mode (linear | conditional | emergent) and re-renders the ## Flow Map [gen] / ## Funnel [gen] blocks in GAME.md. To add or detail a system use /unikit-gd-system; to edit GAME.md content use /unikit-gd-spec; to apply a multi-zone edit use /unikit-gd-apply; for a new game concept use /unikit-gd-brainstorm.
- allowed-tools
- [ "Read", "Write", "Edit", "Glob", "Grep", "Bash(ls *)", "Bash(find *)", "Bash(wc *)", "Bash(date *)", "AskUserQuestion" ]
- argument-hint
- <flow name | FLOW-slug> ["<what to change>"] (mode inferred from doc state + intent; no flags)
- user-invocable
- true
- disable-model-invocation
- false
02 资源文件 2
- 参考文档references/mode-author.md10.0 KB
- 参考文档references/mode-revise.md5.6 KB
03 SKILL.md 正文
Game Design — Per-Flow GDD (Authoring & Revision)
Own one flow's design document at .unikit/gamedesign/flows/FLOW-<slug>.md —
the dynamics axis of the GDD (what the player does over time), alongside the
system GDDs (the rules) and GAME.md (the whole). This skill owns the flow zone
(gd-principles → Zone Ownership): the full lifecycle of a FLOW.md lives here
— create the skeleton, fill its placeholders, and revise approved
content (Tuning / Tweak / Rework) under the delta discipline. There is no separate
editor skill.
A flow registers itself: this skill writes the flow's own GD-IDS.yaml flows:
and events: entries and re-renders the ## Flow Map [gen] / ## Funnel [gen]
blocks in GAME.md — there is no add-flow in unikit-gd-spec. It never authors
a system, never edits the GAME.md one-pager content, and never adds a system to the
roster — those are unikit-gd-system and unikit-gd-spec.
User questions. Right before your first question to the user, not earlier, read .unikit/system/user-questions.md once and ask every question as it says, with the question tool of your agent (AskUserQuestion). If the file cannot be read, print WARN [questions] user-questions contract missing — asking with the question tool and still ask with that tool, the recommended option first.
Language Awareness — BLOCKING PRE-REQUISITE
BEFORE producing ANY output, silently read .unikit/system/LANGUAGE_RULES.md
and apply it to all output and artifacts (fall back to English if it is missing) —
including the rule to translate concepts, not transliterate jargon.
gd-principles → "Language" adds the game-design specifics: which IDs and stored
field values stay English. Do not announce the language setting.
The language holds for the whole session, not just at load time: every message until the conversation ends is in language.ui — progress notes while agents run, relays of what a subagent returned, the final report, any follow-up discussion. English input (subagent results, tool output, these instructions) is data, never a cue to switch languages.
Phase 0 — Bootstrap
Silently load — do not narrate:
-
.unikit/system/gamedesign/gd-principles.md(the core) — the collaborative protocol, the facts registry / ID conventions, and the language rules. Plus, from the samegamedesign/folder, the shards this skill needs:gd-authoring.md(the section-cycle authoring contract + the delta discipline — the mandatory Version +1 → changelog → registry-check → recommend-verify tail),gd-lifecycle.md(the lifecycle & status spine),gd-flow-axis.md(the Flow Axis contract — theAC · GOAL · eventgrammar, flow lifecycle, wiring mode, cross-axis staleness, Win/Lose ↔ terminal GOAL), andgd-provenance.md(the explore-seed / import provenance markers). This skill applies that contract; it does not restate the mechanics. If missing, warn (unikit-ai update) and fall back to the protocol as summarized in this file. -
.unikit/gamedesign/GAME.md— pillars, loops, target aesthetics, win/lose intent, and non-goals the flow must serve; its## System Map [gen]is the system roster the flow'sGOALs depend on. If it does not exist, stop — there is no master spec yet. Read.unikit/gamedesign/concepts/INDEX.md(if it exists) to route precisely: adrafted/approvedconcept present → recommend/unikit-gd-spec(build the master spec from it); no concept — or noconcepts/INDEX.md(or noconcepts/dir) at all → recommend/unikit-gd-brainstormfirst, then/unikit-gd-spec. -
.unikit/gamedesign/GD-IDS.yaml— find the target flow's entry underflows. If there is no entry, this is a new flow: a flow registers itself, so author it here (Create — Phase 3 writes theflows:row). TheGOALs a new flow needs may reference systems that are not yet on the map; that crossing into the system roster routes back to/unikit-gd-specadd-system (see the re-entry seam in Phase 4) — never write asystems:row here. -
.unikit/memory/gamedesign/RULES_INDEX.md— load the core domain rules for this flow's purpose, on demand byLoad When, plus any studiolibraryrule on the same topic. Read the purpose from the flow's name and Overview (the dynamics it shapes), not from a coarse label; when the purpose is ambiguous, confirm the domain with one question, asked with the question tool of your agent (AskUserQuestion), rather than guessing. Domains are opt-in and combinable — a flow may match more than one. Every flow shapes pacing + guidance, socore-loopsis always relevant;ux-onboardingrides along whenever the flow teaches or guides:Flow purpose Core rules to load onboarding / first session ux-onboarding,core-loopscore loop / session arc core-loops,player-motivationprogression / mastery arc progression,core-loopscombat / encounter balance,frameworkseconomy / shop funnel economy,monetization-ethicsnarrative / quest narrativelevel / mission level-designliveops / event liveops,player-motivationmeta / retention player-motivation,liveopsObey the index's Rule-Loading Discipline: load by
Load When, load a reference only from its parent rule's> **References**:, and never glob the memory tree (.unikit/memory/gamedesign/**) to discover rules. -
.unikit/RULES.md(if present) — project overrides, highest priority. Rule topics: load the topic files listed under its## TopicswhoseLoad whenmatches the design work at hand — the concept, system, flow or content type; when unsure, load. -
Schema guard (clean break — no automatic migration).
GD-IDS.yamlMUST beversion: 2. If it is stillversion: 1, STOP and report: the design workspace is on the pre-v2 layout — v2 dropped the standalone markdown system-index and now renders the system, flow, and funnel maps intoGAME.md(## System Map [gen]/## Flow Map [gen]/## Funnel [gen]); there is no automatic migration. Tell the user to bumpGD-IDS.yamltoversion: 2and fold the legacy index rows into GAME.md's[gen]maps before re-running.
One-way boundary: never read .unikit/code/, project source, or build
artifacts. Flow is a read target for the code side, never a writeback surface — a
flow's "realized" state is derived, never written here.
<!-- unikit:extension-point:bootstrap -->
Phase 1 — Context
Gather the facts the flow must stay consistent with (read-only):
- Known facts from
GD-IDS.yaml— pillars (the flow serves them), the systems insystems(aGOALexercises a system throughGOAL → SYS, refined toGOAL → AC), and terms already locked. These are constraints, not suggestions. - Exercised system GDDs — for each system this flow's
GOALs touch, read its header and sections C (Detailed Design), H (Acceptance Criteria), and B (Player Fantasy) so eachGOALlands on a real rule/AC and the promised feeling is grounded. AGOALaimed at a missing or deprecated system is a registry gap (route it throughunikit-gd-specadd-system — Phase 4). - Recent
unikit-gd-verifyreports for this flow, if any (.unikit/gamedesign/reviews/). - Explore research (internal design lens) — if this flow was seeded from a
unikit-gd-explorebrief, discover the research deterministically (survives a/clear): read the flow'sGD-IDSflows[].research:pointer (authoritative), falling back to theresearches/INDEX.mdentry whoseTarget:is thisFLOW-<slug>. Read that research'sRESEARCH_BRIEF.md→## Flow Feature Planblock and use its objective/pacing/dependency seeds as the starting drafts — a seeded section is drafted silently in Generation (Phase 4) and confirmed in the group review (Phase 5); a seed is a draft, not an approved write. For a revision (Edit), the matching block is## Flow Improvement Plan— its ready-to-apply delta lines, expected scale, touchedGOALs/systems, and anyRF-<date>-nit closes pre-fill the change set (the user still approves every edit). These explore-seeded drafts are untagged normal authored content (gd-provenance→ Provenance) — the import-onlyextracted/generatedmarkers do not apply to flows.
Phase 2 — Resolve Mode + Depth (no flags)
Check .unikit/gamedesign/flows/FLOW-<slug>.md and read the intent in the prompt:
- Does not exist → Create: build the skeleton (Phase 3), then run the Decision-First flow — the wiring mode is the first decision in Phase 4 (it shapes sections B and C).
- Exists and the prompt describes a change to approved content (a goal, pacing beat, dependency, event, or the wiring mode: "retune the pacing", "add a branch", "change a GOAL", "rework the onboarding") → Edit: classify the scale and apply the delta (Revision below). Approved text is changed only through this path.
- Exists with
[To be designed]placeholders and the intent is to continue / fill (or no change is described) → Fill: resume from the remaining placeholders. Approved text is never overwritten — only placeholders are filled. Skip the skeleton sub-step (Phase 3.1); still fork-scan and run Phases 4–5 over the placeholders. - Exists, complete, no change described → authoring is done; nothing to write. Offer review / verify (Handoff) and stop.
If the flow name is ambiguous (matches several entries, or none) → the question tool of your agent (AskUserQuestion)
listing candidates. Never guess the target. Print the candidates to the screen as plain
markdown first.
Depth gate (Create / Fill only). Once the mode is Create or Fill, present one
depth picker — the named tiers core/standard/full, each with what it adds, not bare
letters:
The question tool of your agent (`AskUserQuestion`): How deep should this pass go?
Options:
1. core (recommended) — the floor that gets the flow to a solid, usable base: Overview,
Objective Flow (the run of objectives the player works through).
2. standard — core + Pacing, Dependencies, Events (the funnel).
3. full — every section, fully tuned.
The picked tier is the ephemeral scope of this pass — NOT stored
(gd-authoring / gd-lifecycle); the lasting fact is the inferred status at Phase 6.
Edit mode skips the depth gate entirely (it lies flat on the Revision flow).
Load the Mode Body
With the mode resolved (Phase 2) and the depth picked (Create / Fill only), load the matching body on demand and follow it — do not keep both bodies in context. Create / Fill returns to Phase 6 (Registry & State) below; Edit returns to Handoff.
| Mode | Reference body |
|---|---|
| Create / Fill | {{skills_dir}}/{{self_name}}/references/mode-author.md — the Decision-First section-cycle: the A–F section map + core-set, Phase 3 (Skeleton + Fork-Scan), Phase 4 (Decision Interview + Generation, incl. the wiring-mode decision + the re-entry seam), Phase 5 (Group Review). |
| Edit | {{skills_dir}}/{{self_name}}/references/mode-revise.md — classify the scale (Tuning / Tweak / Rework / Structural-redirect), apply the change, then the mandatory delta tail. |
Phase 6 — Registry & State (write flows: / events:, then re-render the maps)
After the sections are authored and accepted:
- Write the
GD-IDS.yamlflows[]entry (the flow's machine truth — the flow registers itself):id: FLOW-<slug>,name,status: active,mode,doc_status,version,depends_on(theSYSids from section D),goals:(oneGOAL-<flow>-<n>per row —id,summary,targets:theSYS/ACit exercises),research:(the explore-research folder if seeded — a non-id path; owned here, not byunikit-gd-spec),source: flows/FLOW-<slug>.md,added. Write each funnel event underevents[](id,name,status,source,flow:). Get approval before the write; existing values are never changed silently; every fact carries itssource(gd-principles→ Facts Registry). - Status (inferred —
gd-lifecycle). Set the flow's status in the two places that must agree — theFLOW.mdheader> Status:token and theGD-IDS.yamldoc_status:detailedonce the whole core-set (A/B) is authored; held atskeletonwhile a core section carries<!-- deferred -->(the soft floor guard; the WARN in Phase 4);detailed · partial (n/m)(rendered, inferred from the markers) when the core is complete but ≥1 non-core section is deferred. Setversion: 1(header +GD-IDS). Write the initial changelog block to section F (#### v1 — <date> — initial designwith theGOAL: + GOAL-<slug>-1 … N (new)line andAffected (gd-verify): —) — the single current block (K1). - Regen-on-write — re-render the maps (B1). As the last step, re-render
GAME.md's## Flow Map [gen]and## Funnel [gen]blocks fromGD-IDS(theRULES_INDEXrender model): replace only the content between<!-- gen:flow-map -->/<!-- /gen:flow-map -->and between<!-- gen:funnel -->/<!-- /gen:funnel -->— never touch the authored one-pager above, and never the## System Map [gen]block (that isunikit-gd-spec's render).- Flow Map — one row per
flows[]entry, grouped by wiring-mode (Linear/Conditional, Emergent):ID | Flow | Mode | Status | Ver | Depends (SYS) | Realized | Doc.Statusmirrorsdoc_status(plusdeprecatedfrom thestatusfield), with the· partial (n/m)suffix appended when theFLOW.mdcarries ≥1<!-- deferred -->(the canonical render format fromgd-lifecycle— the same suffix verify and the System Map use);Veris—untilskeleton. Realizedis DERIVED, never written:yesonce every system in the flow'sdepends_oncarries a non-emptyimplemented_versioninGD-IDS(the code-set field), elseno. It is computed from the systems' state on each render — there is noimplementedfield on flows.- Funnel — one row per
events[]entry:Order | Event | Flow | Measures, ordered by funnel position.
- Flow Map — one row per
Handoff & Next Steps
Recommend the next steps (do not auto-invoke):
- ✅ Verify consistency & impact — /unikit-gd-verify FLOW-<slug>
- 🔍 Qualitative review (fresh session) — /unikit-gd-review flows/FLOW-<slug>.md
- 🧩 Detail an exercised system — /unikit-gd-system <SYS-slug>
A review is most independent in a fresh session (the reviewer should not have
authored the doc). unikit-gd-verify is read-only — it checks the flow against the
registry and prints dependent flows on cross-axis staleness; the ## Flow Map [gen]
/ ## Funnel [gen] were already re-rendered on this skill's write (B1).
Final: Compact Report
The terminal plaque (TIER A — gd-principles → Language: name leads, ids are
parenthetical copy-paste tags, status is a plain phrase):
Flow: <name> (FLOW-<slug>)
Mode: <linear | conditional | emergent> · Depth: <core | standard | full> (create/fill)
Action: <create | fill | edit (tuning|tweak|rework)>
Doc: .unikit/gamedesign/flows/FLOW-<slug>.md — <ready | ready, a couple of optional blocks left | skeleton, main blocks not filled yet>, vN
Registry: +<G> goals, +<E> events, depends_on [<name> (SYS-<slug>), …] (GD-IDS.yaml)
Goals: GOAL-<slug>-1 … GOAL-<slug>-N [GOAL delta on an edit: +<n> / changed <n> / removed <n>]
Maps: ## Flow Map [gen] + ## Funnel [gen] re-rendered
No summary document, no report file.
Ownership Boundaries
- Owns: the full lifecycle of
flows/FLOW-<slug>.md— creating the skeleton, filling placeholders, and revising approved content (Tuning / Tweak / Rework, with the version bump + changelog; the status staysdetailed); the flow'sGD-IDS.yamlfacts (flows[]incl.goals,mode,depends_on,research:, and the flow'sevents) and itsdoc_status/version; the wiring-mode selection; and the re-render of the## Flow Map [gen]and## Funnel [gen]blocks inGAME.md(the[gen]regions only). - Not this skill: systems →
unikit-gd-system; the system roster, theGAME.mdone-pager content (pillars, win/lose intent, monetization stance) and its## System Map [gen]render →unikit-gd-spec; quality verdicts →unikit-gd-review; consistency & cross-axis impact →unikit-gd-verify. - Never: write, fill, or edit without approval; overwrite approved text outside
the delta discipline; skip the version bump or changelog on an edit (unrecorded
delta); change a
GD-IDS.yamlvalue silently; delete or renumber an ID; write thesystems:roster or theGAME.mdone-pager content; touch the## System Map [gen]block; read the code workspace or project source.
Quick Reference
/unikit-gd-flow FLOW-first-session → select mode + create skeleton + author A–F (if no doc yet)
/unikit-gd-flow first-session → resolve to the FLOW-slug; same flow
/unikit-gd-flow FLOW-first-session → resume filling placeholders (partial doc)
/unikit-gd-flow FLOW-first-session "retune the pacing" → Tuning: edit C/B, one approval
/unikit-gd-flow first-session "add a stealth branch" → Rework: section-cycle old-vs-new
/unikit-gd-flow FLOW-onboarding "switch to conditional" → Rework: mode change (B + C restructured)
04 同仓库更多 Skills
unikit
Initialize the UniKit framework in a project. Scans the current project to detect the engine and real tech stack, then generates the base framework documents that give AI agents context about the project — the resolved project description, the architecture doc, AGENTS.md, and the user-editable .unikit/config.yaml. This is the one-time, whole-project setup run before any other unikit skill. Use whenever the user wants to initialize, set up, or onboard the framework, e.g. "initialize unikit", "init the framework", "set up unikit", "set up the project", "configure AI context", "scan my project and set it up", "bootstrap the project". It also actualizes the config of a project already set up — say "update the config", "add missing settings", "actualize configuration", "fix my config". On a set-up project it offers the actions to choose from.
unikit-verify
Verify a completed implementation against the plan in .unikit/code/plans/. Checks that every task was implemented, nothing was forgotten, the code compiles, the recorded test run still matches the code, and {{engine_name}} conventions are followed. Use after /unikit-implement completes, or when the user says "verify", "check the work", "did we miss anything". For code review use /unikit-review instead.
unikit-todo
Manage the project's TODO list in .unikit/TODO.md — capture work to remember for later, not to do right now. Use it to add a deferred item, mark a todo complete, or show the list. The point is to park tasks you don't want to act on in the moment but don't want to forget. Trigger on "add a todo", "add this to the todo list", "put X on the todo list", "remind me to...", "don't forget to...", "note this for later", "we should do this later", "mark this todo done", "what's on the todo list", "what's left to do". This is only for parking reminders — to actually plan or do the work now, use /unikit-plan, /unikit-implement, or /unikit-execute.
unikit-skills-context
Customize how a built-in unikit skill behaves in this specific project by writing workflow overrides into its skill-context file. These are per-skill workflow rules (e.g. "/unikit-review should also flag TODO comments", "/unikit-implement should run tests after each task"), not coding conventions. Use when the user wants to change, customize, or override how a particular unikit skill works in this project — "customize the review skill", "make /unikit-fix always add logging here", "the implement skill should do X differently", "add a skill rule for /unikit-commit". Use "validate" to find stale overrides against updated base skills. For a general coding convention (not tied to one skill) use /unikit-rules; to derive rules from past mistakes use /unikit-evolve.
unikit-rules
Add a short, project-specific rule, convention, or override to .unikit/RULES.md — the quick-capture inbox for this project's rules (common rules always load; topic files in .unikit/rules/ load when the work matches), automatically loaded by /unikit-implement (later promotable via /unikit-memory migrate-rules). Works only with a rule typed as a prompt — it does NOT read files, folders, URLs, or PDFs. Cross-checks the knowledge base (RULES_INDEX.md) to avoid duplicating core/stack entries. Use for one-line conventions and corrections: "add a rule", "remember this", "convention", "always do X", "never use Y", "from now on do Z", or when the user corrects agent behavior and wants it remembered; also "split the rules into topics" (optimise), "clean up the rules" (prune), "shorten RULES.md" (compact), by keyword or in plain words. If the user points to a source (file, folder, URL, PDF, article, book) or wants to research/document framework usage, use /unikit-memory; for architecture decisions use ARCHITECTURE.md.
unikit-rules-registry
Orchestrate the remote rules registry — the shared registry (often connected as a local folder or git repo) that the project's rules are published to and pulled from. Three modes, picked from the user's wording: create scaffolds a new local rules registry ("create a local rules registry", "init a rules registry"); update migrates/promotes local knowledge-base rules from .unikit/memory/ into the remote registry with automatic semver bumps ("migrate local rules to the remote registry", "promote my rules to the registry", "push local rules", "publish local rules", "update the rules registry"); sync pulls registry updates back into memory ("sync the rules registry", "pull registry updates"). Pass "--module <id>" to scope to one knowledge-base module. This skill ONLY orchestrates the CLI (`unikit-ai rules *`) — it never edits .unikit.json or .unikit/memory/ sources directly.