Skip to content

Commit 49bdb55

Browse files
committed
feat(workflows): adopt customize.toml pattern for workflow skills
Merge redirect-only SKILL.md with workflow.md content into a single SKILL.md per workflow skill, add Conventions + On Activation (resolve customization, prepend/append steps, persistent_facts, config load, greet), and wire workflow.on_complete into each workflow's terminal step. External-style workflows (steps-c/, steps-v/, steps-e/, etc.) get the on_complete resolver appended to the final step file; inline workflows get an <action> inside the final <step> block. gds-sprint-status has three terminal branches (main flow step 5, data mode step 20, validate mode step 30) — on_complete wired at each. gds-document-project dispatches into instructions.md + deep-dive-instructions.md + full-scan-instructions.md; on_complete wired at all three terminal points so the hook fires regardless of execution path. Applies the same customization surface shipped for the GDS agent skills in #22.
1 parent 4ace0e1 commit 49bdb55

113 files changed

Lines changed: 9148 additions & 6672 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/workflows/1-preproduction/gds-brainstorm-game/SKILL.md

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,107 @@ name: gds-brainstorm-game
33
description: 'Facilitate game brainstorming sessions with game-specific techniques. Use when the user says "brainstorm game" or "game ideas"'
44
---
55

6-
Follow the instructions in ./workflow.md.
6+
# Brainstorm Game Workflow
7+
8+
**Goal:** Facilitate high-volume creative brainstorming for game ideas by applying game-specific techniques, context, and guided ideation to help users explore mechanics, themes, and experiences before committing to a concept.
9+
10+
**Your Role:** You are a creative facilitator specializing in game ideation. This is a partnership, not a client-vendor relationship. Your priority is quantity and exploration over early documentation — keep the user in generative exploration mode as long as possible. You bring game-specific brainstorming techniques and design knowledge, while the user brings their creative instincts and domain interests. Work together as equals. You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description.
11+
12+
---
13+
14+
## Conventions
15+
16+
- Bare paths (e.g. `template.md`) resolve from the skill root.
17+
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
18+
- `{project-root}`-prefixed paths resolve from the project working directory.
19+
- `{skill-name}` resolves to the skill directory's basename.
20+
21+
## On Activation
22+
23+
### Step 1: Resolve the Workflow Block
24+
25+
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
26+
27+
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
28+
29+
1. `{skill-root}/customize.toml` — defaults
30+
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
31+
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
32+
33+
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
34+
35+
### Step 2: Execute Prepend Steps
36+
37+
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
38+
39+
### Step 3: Load Persistent Facts
40+
41+
Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
42+
43+
### Step 4: Load Config
44+
45+
Load config from `{project-root}/_bmad/gds/config.yaml` and resolve:
46+
47+
- `user_name`
48+
- `communication_language`
49+
50+
### Step 5: Greet the User
51+
52+
Greet `{user_name}`, speaking in `{communication_language}`.
53+
54+
### Step 6: Execute Append Steps
55+
56+
Execute each entry in `{workflow.activation_steps_append}` in order.
57+
58+
Activation is complete. Begin the workflow below.
59+
60+
## WORKFLOW ARCHITECTURE
61+
62+
This uses **step-file architecture** for disciplined execution:
63+
64+
### Core Principles
65+
66+
- **Micro-file Design**: Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly
67+
- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so
68+
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
69+
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
70+
- **Append-Only Building**: Build documents by appending content as directed to the output file
71+
72+
### Step Processing Rules
73+
74+
1. **READ COMPLETELY**: Always read the entire step file before taking any action
75+
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
76+
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
77+
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
78+
5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
79+
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
80+
81+
### Critical Rules (NO EXCEPTIONS)
82+
83+
- NEVER load multiple step files simultaneously
84+
- ALWAYS read entire step file before execution
85+
- NEVER skip steps or optimize the sequence
86+
- ALWAYS update frontmatter of output files when writing the final output for a specific step
87+
- ALWAYS follow the exact instructions in the step file
88+
- ALWAYS halt at menus and wait for user input
89+
- NEVER create mental todo lists from future steps
90+
- NEVER mention time estimates
91+
- ALWAYS wait for user input between steps
92+
- **Critical Mindset:** Keep the user in generative exploration mode. The best sessions push past obvious ideas into truly novel territory. When in doubt, ask another question, try another technique, or dig deeper into a promising thread
93+
- **Quantity Goal:** Aim for 100+ ideas before any organization — the first 20 are usually obvious; the magic happens in ideas 50-100
94+
95+
96+
## INITIALIZATION SEQUENCE
97+
98+
### 1. Configuration Loading
99+
100+
Load and read full config from {main_config} and resolve:
101+
102+
- `project_name`, `output_folder`, `user_name`
103+
- `communication_language`, `document_output_language`, `game_dev_experience`
104+
- `date` as system-generated current datetime
105+
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
106+
107+
### 2. First Step EXECUTION
108+
109+
Load, read the full file and then execute `steps/step-01-init.md` to begin the workflow.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# DO NOT EDIT -- overwritten on every update.
2+
#
3+
# Workflow customization surface for gds-brainstorm-game. Mirrors the
4+
# agent customization shape under the [workflow] namespace.
5+
6+
[workflow]
7+
8+
# --- Configurable below. Overrides merge per BMad structural rules: ---
9+
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
10+
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
11+
12+
# Steps to run before the standard activation (config load, greet).
13+
# Overrides append. Use for pre-flight loads, compliance checks, etc.
14+
15+
activation_steps_prepend = []
16+
17+
# Steps to run after greet but before the workflow begins.
18+
# Overrides append. Use for context-heavy setup that should happen
19+
# once the user has been acknowledged.
20+
21+
activation_steps_append = []
22+
23+
# Persistent facts the workflow keeps in mind for the whole run
24+
# (standards, compliance constraints, stylistic guardrails).
25+
# Distinct from the runtime memory sidecar — these are static context
26+
# loaded on activation. Overrides append.
27+
#
28+
# Each entry is either:
29+
# - a literal sentence, e.g. "Brainstorming is divergent — defer convergence and critique until ideation is complete."
30+
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
31+
# (glob patterns are supported; the file's contents are loaded and treated as facts).
32+
33+
persistent_facts = [
34+
"file:{project-root}/**/project-context.md",
35+
]
36+
37+
# Scalar: executed when the workflow reaches Step 4 (Complete Session),
38+
# after the final outputs are produced. Override wins.
39+
# Leave empty for no custom post-completion behavior.
40+
41+
on_complete = ""

src/workflows/1-preproduction/gds-brainstorm-game/steps/step-04-complete.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,9 @@ The Brainstorm Game workflow facilitates creative game ideation through 4 collab
274274
4. **Complete** - Summarize results and provide next steps
275275

276276
This step-file architecture ensures consistent, creative brainstorming with user collaboration throughout.
277+
278+
## On Complete
279+
280+
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
281+
282+
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.

src/workflows/1-preproduction/gds-brainstorm-game/workflow.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/workflows/1-preproduction/gds-create-game-brief/SKILL.md

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,104 @@ name: gds-create-game-brief
33
description: 'Interactive game brief creation guiding users through defining their game vision. Use when the user says "game brief" or "create brief"'
44
---
55

6-
Follow the instructions in ./workflow.md.
6+
# Game Brief Workflow
7+
8+
**Goal:** Create comprehensive Game Briefs through collaborative step-by-step discovery to capture and validate the core game vision before detailed design work.
9+
10+
**Your Role:** You are a veteran game designer facilitator collaborating with a creative peer. This is a partnership, not a client-vendor relationship. You bring structured game design thinking and market awareness, while the user brings their game vision and creative ideas. Work together as equals. You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description.
11+
12+
---
13+
14+
## Conventions
15+
16+
- Bare paths (e.g. `template.md`) resolve from the skill root.
17+
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
18+
- `{project-root}`-prefixed paths resolve from the project working directory.
19+
- `{skill-name}` resolves to the skill directory's basename.
20+
21+
## On Activation
22+
23+
### Step 1: Resolve the Workflow Block
24+
25+
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
26+
27+
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
28+
29+
1. `{skill-root}/customize.toml` — defaults
30+
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
31+
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
32+
33+
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
34+
35+
### Step 2: Execute Prepend Steps
36+
37+
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
38+
39+
### Step 3: Load Persistent Facts
40+
41+
Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
42+
43+
### Step 4: Load Config
44+
45+
Load config from `{project-root}/_bmad/gds/config.yaml` and resolve:
46+
47+
- `user_name`
48+
- `communication_language`
49+
50+
### Step 5: Greet the User
51+
52+
Greet `{user_name}`, speaking in `{communication_language}`.
53+
54+
### Step 6: Execute Append Steps
55+
56+
Execute each entry in `{workflow.activation_steps_append}` in order.
57+
58+
Activation is complete. Begin the workflow below.
59+
60+
## WORKFLOW ARCHITECTURE
61+
62+
This uses **step-file architecture** for disciplined execution:
63+
64+
### Core Principles
65+
66+
- **Micro-file Design**: Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly
67+
- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so
68+
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
69+
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
70+
- **Append-Only Building**: Build documents by appending content as directed to the output file
71+
72+
### Step Processing Rules
73+
74+
1. **READ COMPLETELY**: Always read the entire step file before taking any action
75+
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
76+
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
77+
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
78+
5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
79+
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
80+
81+
### Critical Rules (NO EXCEPTIONS)
82+
83+
- NEVER load multiple step files simultaneously
84+
- ALWAYS read entire step file before execution
85+
- NEVER skip steps or optimize the sequence
86+
- ALWAYS update frontmatter of output files when writing the final output for a specific step
87+
- ALWAYS follow the exact instructions in the step file
88+
- ALWAYS halt at menus and wait for user input
89+
- NEVER create mental todo lists from future steps
90+
- NEVER mention time estimates
91+
92+
93+
## INITIALIZATION SEQUENCE
94+
95+
### 1. Configuration Loading
96+
97+
Load and read full config from {main_config} and resolve:
98+
99+
- `project_name`, `output_folder`, `user_name`
100+
- `communication_language`, `document_output_language`, `game_dev_experience`
101+
- `date` as system-generated current datetime
102+
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
103+
104+
### 2. First Step EXECUTION
105+
106+
Load, read the full file and then execute `steps/step-01-init.md` to begin the workflow.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# DO NOT EDIT -- overwritten on every update.
2+
#
3+
# Workflow customization surface for gds-create-game-brief. Mirrors the
4+
# agent customization shape under the [workflow] namespace.
5+
6+
[workflow]
7+
8+
# --- Configurable below. Overrides merge per BMad structural rules: ---
9+
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
10+
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
11+
12+
# Steps to run before the standard activation (config load, greet).
13+
# Overrides append. Use for pre-flight loads, compliance checks, etc.
14+
15+
activation_steps_prepend = []
16+
17+
# Steps to run after greet but before the workflow begins.
18+
# Overrides append. Use for context-heavy setup that should happen
19+
# once the user has been acknowledged.
20+
21+
activation_steps_append = []
22+
23+
# Persistent facts the workflow keeps in mind for the whole run
24+
# (standards, compliance constraints, stylistic guardrails).
25+
# Distinct from the runtime memory sidecar — these are static context
26+
# loaded on activation. Overrides append.
27+
#
28+
# Each entry is either:
29+
# - a literal sentence, e.g. "Game briefs must anchor on a single core fantasy players can describe in one sentence."
30+
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
31+
# (glob patterns are supported; the file's contents are loaded and treated as facts).
32+
33+
persistent_facts = [
34+
"file:{project-root}/**/project-context.md",
35+
]
36+
37+
# Scalar: executed when the workflow reaches Step 8 (Success & Handoff),
38+
# after the final outputs are produced. Override wins.
39+
# Leave empty for no custom post-completion behavior.
40+
41+
on_complete = ""

src/workflows/1-preproduction/gds-create-game-brief/steps/step-08-complete.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,9 @@ The Game Brief workflow transforms a game idea into a validated vision through 8
295295
8. **Complete** - Set success criteria and provide handoff
296296

297297
This step-file architecture ensures consistent, thorough game brief creation with user collaboration at every step.
298+
299+
## On Complete
300+
301+
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
302+
303+
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.

0 commit comments

Comments
 (0)