بنقرة واحدة
gf-balance
Stage 3B: Fill your data tables with balanced values
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Stage 3B: Fill your data tables with balanced values
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Show Game Forge project progress with pipeline visualization
Resume a Game Forge project with full context restoration
Export your game design deliverables in various formats
Stage 1: Co-create your game concept document chapter by chapter
Stage 2: Expand your concept into detailed, traceable system designs
Stage 4: Produce art, UI/UX, and tech specifications
| name | gf-balance |
| description | Stage 3B: Fill your data tables with balanced values |
| disable-model-invocation | true |
| allowed-tools | ["Read","Write","Bash","Task"] |
Generate balanced numerical values from your system designs' 7B inputs and the frozen data schema. The balance generator reads all 7B inputs, produces 4 balance documentation files (difficulty, economy, monetization, tuning), updates CSV config files with balanced values, then runs a quality gate to validate everything before completion.
Run:
node bin/gf-tools.cjs init progress
project_exists is false: Display "No Game Forge project found. Run /gf:new-game to start." Stop.Auto-mode detection: Check $ARGUMENTS for --auto flag. Store as AUTO_MODE (true/false). When AUTO_MODE is true, all user interaction is skipped and the entire balance stage runs in a single autonomous pass.
stages.data_schema -- if not complete and NOT AUTO_MODE: Display "Stage 3B requires data schema to be complete (frozen). Run /gf:data-schema first." Stop.
AUTO_MODE: Skip prerequisite check (the auto pipeline just completed data schema stage).Check freeze status:
node bin/gf-tools.cjs data-schema freeze-status
frozen is false and NOT AUTO_MODE: Display "Stage 3B requires a frozen schema. Run /gf:data-schema and freeze your schema first." Stop.
AUTO_MODE: Skip freeze check (the auto pipeline just froze the schema).Load configuration:
node bin/gf-tools.cjs config-get language
node bin/gf-tools.cjs config-get genre
Store as LANGUAGE and GENRE.
If AUTO_MODE: Skip session granularity calculation and split prompt entirely. Auto mode always uses a single pass regardless of system count. Proceed directly to Step 2.
Run:
node bin/gf-tools.cjs system-design system-status
Count confirmed systems from the response.
Adjust generation strategy:
Run:
node bin/gf-tools.cjs balance status
If AUTO_MODE: Always take the Generate path (not_started -> Step 3), then automatically continue through Review (Step 5) and Complete (Step 6) without stopping. The entire generate-review-complete pipeline runs in one pass.
Branch based on the returned status value:
not_started -> Go to Step 3 (Generate path)in_progress -> Go to Step 5 (Review path)complete -> Display completion message: "Stage 3B Numerical Balance is complete. Quality gate has passed. To re-run the quality gate, reply 'review'. To start fresh, reply 'regenerate'." Wait for user input.
Run:
node bin/gf-tools.cjs balance extract-7b
Parse the JSON response. Display summary: "Found {N} systems with 7B balance inputs."
List each system briefly: system ID, system name.
Read the frozen schema files for context:
.gf/stages/03a-data-schema/tables.md -- table structures and current sample data.gf/stages/03a-data-schema/relationships.md -- table relationshipsThe GENRE value determines which column in the genre-specific target ranges (lifecycle-phases.md) the balance generator uses:
Spawn .claude/agents/gf-balance-generator.md via the Task tool with:
You are generating complete numerical balance documentation and updating CSV config files with balanced values.
**7B Balance Inputs:**
{paste full JSON from balance extract-7b}
**Genre:** {GENRE} -- use the appropriate genre column from lifecycle-phases.md for target ranges
**Language:** {LANGUAGE} -- ALL balance content must be in this language (descriptions, rationales, risk assessments). Parameter names, field names, system IDs, and enum keys remain in English.
**Frozen schema files to read:**
- .gf/stages/03a-data-schema/tables.md (table structures, field definitions, current sample data)
- .gf/stages/03a-data-schema/relationships.md (table relationships)
**System design files to read for 7B cross-reference:**
{list all .gf/stages/02-system-design/systems/*.md files}
**Reference files to read:**
- .claude/skills/gf-balance/references/lifecycle-phases.md (lifecycle phase definitions with genre-specific targets)
**Template files to read (output format specifications):**
- .claude/skills/gf-balance/templates/difficulty-template.md
- .claude/skills/gf-balance/templates/economy-template.md
- .claude/skills/gf-balance/templates/monetization-template.md
- .claude/skills/gf-balance/templates/tuning-template.md
**Output directory:** .gf/stages/03b-balance/
**CSV update location:** .gf/stages/03a-data-schema/configs/
**CLI commands available:**
- node bin/gf-tools.cjs balance update-csv --table "TABLE_NAME" --data '[...]' (update CSV data rows)
- node bin/gf-tools.cjs balance validate-economy --flows '{...}' (validate economy flows)
- node bin/gf-tools.cjs balance validate-freeze (verify schema integrity after updates)
**Output files to produce:**
1. difficulty.md -- numerical target matrix + per-segment difficulty tables with inline adjustment strategies
2. economy.md -- resource flow tables + cross-resource dependencies + prohibited drought points
3. monetization.md -- protected parameters list + experience protection rules + commercialization boundary summary
4. tuning.md -- tuning priority table + validation thresholds + rollback strategy + self-check conclusions
**Constraints:**
- You may ONLY modify: sample data row values, default value fields, validation range fields.
- You may NOT add/remove/rename tables, fields, types, PKs, or FKs.
- Every balanced value MUST trace to a 7B input category. Values without upstream justification will be rejected by the quality gate.
- All output uses structured tables, not narratives.
- 7B Category 8 (no-go zones) defines problems that must NOT be solved by tuning numbers -- do not generate values for these.
- After updating CSV files, run: node bin/gf-tools.cjs balance validate-freeze
After the agent completes:
Update balance status to in_progress:
node bin/gf-tools.cjs state patch balance_status in_progress
Display: "Balance documentation generated with 4 balance files and CSV value updates. Review the output, then run /gf:balance again to validate with the quality gate."
Show progress:
node bin/gf-tools.cjs progress full
Display: "Running balance quality gate..."
Read and display a brief summary of what was generated:
.gf/stages/03b-balance/ (difficulty.md, economy.md, monetization.md, tuning.md)If AUTO_MODE: Skip the "review and approve" prompt. Proceed directly to Step 5b (extract 7B inputs for quality gate).
If NOT AUTO_MODE:
Ask user: "Review the balance documentation and approve to run the quality gate, or request specific adjustments."
node bin/gf-tools.cjs balance extract-7b
Spawn .claude/agents/gf-balance-quality-reviewer.md via the Task tool:
Run the balance quality gate.
**Balance files location:** .gf/stages/03b-balance/
- difficulty.md (numerical target matrix + per-segment difficulty)
- economy.md (resource flow tables + cross-resource dependencies)
- monetization.md (protected parameters + experience protection rules)
- tuning.md (tuning priority table + validation thresholds + rollback + self-check)
**Quality criteria:** .claude/skills/gf-balance/references/balance-quality-criteria.md
**Language:** {LANGUAGE} -- REVIEW.md content in this language
**7B Balance Inputs (for traceability check):**
{paste full JSON from balance extract-7b}
**CLI commands available:**
- node bin/gf-tools.cjs balance validate-economy --flows '{...}' (validate economy sustainability)
- node bin/gf-tools.cjs balance validate-freeze (verify schema integrity)
**Instructions:**
- Read all 4 balance files from .gf/stages/03b-balance/
- Read balance-quality-criteria.md for the 8 auto-fix + 4 must-ask classification rules
- Run 8 auto-fix checks (structural): fix issues directly, log all fixes
- Run 4 must-ask checks (creative): flag for user decision, NEVER auto-fill
- Run economy validation via balance validate-economy CLI command
- Run freeze integrity via balance validate-freeze CLI command
- Run self-check validation from tuning.md Section 4
- Write REVIEW.md to .gf/stages/03b-balance/REVIEW.md
- After auto-fixes: run balance validate-freeze to confirm schema integrity
{IF AUTO_MODE:}
**AUTO MODE:** For must-ask items, use AI best judgment instead of flagging for user decision. Apply your recommendation directly. Log what you decided in REVIEW.md under a new 'Auto-Resolved Decisions' section.
{END IF}
If AUTO_MODE:
If NOT AUTO_MODE:
Read and display .gf/stages/03b-balance/REVIEW.md contents to the user.
If REVIEW.md has "Needs User Decision" items:
If all checks pass (no user decisions needed):
Show progress:
node bin/gf-tools.cjs progress full
Run freeze integrity check:
node bin/gf-tools.cjs balance validate-freeze
If intact is false: Display "WARNING: Schema structure has been modified during balance work. This must be resolved before completion." Stop.
node bin/gf-tools.cjs state patch balance_status complete
node bin/gf-tools.cjs state update balance complete
node bin/gf-tools.cjs commit "feat(balance): complete Stage 3B numerical balance" --files .gf/stages/03b-balance/ .gf/stages/03a-data-schema/configs/
If AUTO_MODE:
Display: "Balance stage complete (auto mode). Proceeding to next stage..."
If NOT AUTO_MODE:
Display: "Stage 3B Numerical Balance complete. Run /gf:production for Stage 4."
node bin/gf-tools.cjs progress full
These rules are locked decisions and must never be violated:
node bin/gf-tools.cjs balance update-csv, which preserves BOM, field names, and field types rows. Never manually edit CSV files.node bin/gf-tools.cjs balance validate-freeze. If schema structure was modified, completion is blocked.--auto flag is present, all user interaction is skipped. Session split prompts are bypassed (always single pass). Review approval prompt is skipped. Quality gate must-ask items are resolved by AI judgment. The structural quality (traceability, freeze integrity, economy validation) is identical to interactive mode.