6.3 KiB
Skill Test Spec: /balance-check
Skill Summary
/balance-check reads balance data files (JSON or YAML in assets/data/) and
checks each value against the design formulas defined in GDDs under design/gdd/.
It produces a findings table with columns: Value → Formula → Deviation → Severity.
No director gates are invoked (read-only analysis). The skill may optionally write
a balance report but asks "May I write" before doing so. Verdicts: BALANCED,
CONCERNS, or OUT OF BALANCE.
Static Assertions (Structural)
Verified automatically by /skill-test static — no fixture needed.
- Has required frontmatter fields:
name,description,argument-hint,user-invocable,allowed-tools - Has ≥2 phase headings
- Contains verdict keywords: BALANCED, CONCERNS, OUT OF BALANCE
- Contains "May I write" language (optional report write)
- Has a next-step handoff (what to do after findings are reviewed)
Director Gate Checks
None. Balance check is a read-only analysis skill; no gates are invoked.
Test Cases
Case 1: Happy Path — All balance values within formula tolerances
Fixture:
assets/data/combat-balance.jsonexists with 6 stat valuesdesign/gdd/combat-system.mdcontains formulas for all 6 stats with ±10% tolerance- All 6 values fall within tolerance
Input: /balance-check
Expected behavior:
- Skill reads all balance data files in
assets/data/ - Skill reads GDD formulas from
design/gdd/ - Skill computes deviation for each value against its formula
- All deviations are within ±10% tolerance
- Skill outputs findings table with all rows showing PASS
- Verdict is BALANCED
Assertions:
- Findings table is shown for all checked values
- Each row shows: stat name, formula target, actual value, deviation percentage
- All rows show PASS or equivalent when within tolerance
- Verdict is BALANCED
- No files are written without user approval
Case 2: Out of Balance — Player damage 40% above formula target
Fixture:
assets/data/combat-balance.jsonhasplayer_damage_base: 140design/gdd/combat-system.mdformula specifiesplayer_damage_base = 100(±10%)- All other stats are within tolerance
Input: /balance-check
Expected behavior:
- Skill reads combat-balance.json and computes deviation for
player_damage_base - Deviation is +40% — far outside ±10% tolerance
- Skill flags this row as severity HIGH in the findings table
- Verdict is OUT OF BALANCE
- Skill surfaces the HIGH severity item prominently before the table
Assertions:
player_damage_baserow shows deviation of +40%- Severity is HIGH for deviations exceeding tolerance by more than 2×
- Verdict is OUT OF BALANCE when any stat has HIGH severity deviation
- The HIGH severity item is called out explicitly, not buried in table rows
Case 3: No GDD Formulas — Cannot validate, guidance given
Fixture:
assets/data/economy-balance.yamlexists with 10 stat values- No GDD in
design/gdd/contains formula definitions for economy stats
Input: /balance-check
Expected behavior:
- Skill reads balance data files
- Skill searches GDDs for formula definitions — finds none for economy stats
- Skill outputs: "Cannot validate economy stats — no formulas defined. Run /design-system first."
- No findings table is generated for the economy stats
- Verdict is CONCERNS (data exists but cannot be validated)
Assertions:
- Skill does not fabricate formula targets when none exist in GDDs
- Output explicitly names the missing formula source
- Output recommends running
/design-systemto define formulas - Verdict is CONCERNS (not BALANCED, since validation was impossible)
Case 4: Orphan Reference — Balance file references an undefined stat
Fixture:
assets/data/combat-balance.jsoncontains a statlegacy_armor_mult: 1.5design/gdd/combat-system.mdhas no formula forlegacy_armor_mult- All other stats have formula definitions and pass validation
Input: /balance-check
Expected behavior:
- Skill reads all stats from combat-balance.json
- Skill cannot find a formula for
legacy_armor_multin any GDD - Skill flags
legacy_armor_multas ORPHAN REFERENCE in the findings table - Other stats are evaluated normally; those within tolerance show PASS
- Verdict is CONCERNS (orphan reference prevents full validation)
Assertions:
legacy_armor_multappears in findings table with status ORPHAN REFERENCE- Orphan references are distinguished from formula deviations in the table
- Verdict is CONCERNS when any orphan references are found
- Skill does not skip orphan stats silently
Case 5: Gate Compliance — Read-only; no gate; optional report requires approval
Fixture:
- Balance data and GDD formulas exist; 1 stat has CONCERNS-level deviation (15% above target)
review-mode.txtcontainsfull
Input: /balance-check
Expected behavior:
- Skill reads data and GDDs; generates findings table
- Verdict is CONCERNS (one stat slightly out of range)
- No director gate is invoked
- Skill presents findings table to user
- Skill offers to write an optional balance report
- If user says yes: skill asks "May I write to
production/qa/balance-report-[date].md?" - If user says no: skill ends without writing
Assertions:
- No director gate is invoked in any review mode
- Findings table is presented without writing anything automatically
- Optional report write is offered but not forced
- "May I write" prompt appears only if user opts in to the report
Protocol Compliance
- Reads both balance data files and GDD formulas before analysis
- Findings table shows Value, Formula, Deviation, and Severity columns
- Does not write any files without explicit user approval
- No director gates are invoked
- Verdict is one of: BALANCED, CONCERNS, OUT OF BALANCE
Coverage Notes
- The case where
assets/data/is entirely empty is not tested; behavior follows the CONCERNS pattern with a message that no data files were found. - Tolerance thresholds (±10%, ±20%) are implementation details of the skill; the tests verify that deviations are detected and classified, not the exact threshold values.