gstack-game icon indicating copy to clipboard operation
gstack-game copied to clipboard

feat: game-dev voice directive — centralized tone/vocabulary in preamble

Open fagemx opened this issue 8 months ago • 3 comments

Problem

gstack-game has no centralized voice/tone directive in its preamble. Anti-sycophancy rules are scattered across individual references/gotchas.md files in each skill, creating inconsistent voice across the 28-skill suite.

gstack upstream added a centralized Voice directive in PR #520 (v0.12.3.0) that:

  • Encodes builder philosophy and tone calibration
  • Bans AI vocabulary (delve, crucial, robust, comprehensive, nuanced...)
  • Requires concreteness (file names, line numbers, real numbers)
  • Connects work to user outcomes
  • Tier-aware: trimmed for T1 skills, full for T2+

Current State

gstack-game gotchas.md distribution:

  • game-review: 7 forbidden phrases, 3 rules
  • balance-review: 6 forbidden phrases, 5 forcing questions
  • game-direction: 6 forbidden phrases
  • asset-review: 6 forbidden phrases, 4 forcing questions
  • game-eng-review: 7 forbidden phrases
  • game-ideation: 6 forbidden phrases (inline in .tmpl)
  • game-codex: full anti-sycophancy protocol

Problem: Each skill speaks a different "anti-sycophancy dialect." No unified vocabulary ban, no tone calibration, no game-dev philosophy layer.

Proposed: Game-Dev Voice Directive

Add ## Voice section to skills/shared/preamble.md (~150-250 words):

Content outline

  1. Philosophy: "Sound like a game dev who shipped games, shipped them late, and learned why."
  2. Tone calibration by context:
    • Design challenge energy when scope is unclear
    • Balance expert energy when numbers don't work
    • Shipping energy when testing is overdue
  3. Game vocabulary anchoring: Core loop, FTUE, D1/D7/D30, skill gate, Achiever/Explorer/Socializer/Killer, whale/dolphin/minnow, difficulty curve, aha moment, churn point, faucet/sink
  4. Unified forbidden vocabulary:
    • AI slop: delve, crucial, robust, comprehensive, nuanced, multifaceted, furthermore, moreover, pivotal, landscape, tapestry, underscore, foster, showcase, intricate, vibrant
    • Game-specific bans: "fun" (without mechanism), "players will love," "engaging," "strategic" (without specifics), "balanced" (without numbers)
  5. Concreteness standard:
    • Not "this feels slow" → "load time 3.2s on iPhone 11 = 5% D1 churn"
    • Not "players get confused" → "3/8 playtesters missed tutorial skip at 2:15"
    • Not "economy might break" → "Day 30 free player: 50K gold, sink demand 40K/day = 1.25-day stockpile"
  6. Game-specific humor: Dry observations about game-dev absurdity. "Tutorial teaches 3 mechanics, players discover 1."
  7. Writing rules: No em dashes, short paragraphs, end with what to do, name specifics.

Relationship to existing gotchas.md

Keep skill-specific gotchas for domain-specific forbidden phrases (e.g., balance-review bans "fair pricing" — too specific for preamble). The preamble Voice covers universal tone; gotchas.md covers skill-specific calibration.

Upstream Reference

  • gstack PR #520: feat: voice directive for all skills (v0.12.3.0)
  • scripts/resolvers/preamble.ts lines 399-451: generateVoiceDirective(tier)

Acceptance Criteria

  • [ ] ## Voice section added to skills/shared/preamble.md
  • [ ] Universal game-dev forbidden vocabulary list
  • [ ] Tone calibration guidance
  • [ ] Concreteness standard with game-specific examples
  • [ ] bun run build regenerates all 28 SKILL.md files
  • [ ] bun test passes

fagemx avatar Mar 27 '26 17:03 fagemx

Research Phase: Issue #22 — Game-Dev Voice Directive

Current State Analysis

Preamble (skills/shared/preamble.md) — 140 lines

The preamble currently handles:

  • Lines 1-44: Bash setup (bin detection, project ID, session tracking, telemetry, artifact storage)
  • Lines 46-53: Shared artifact directory documentation
  • Lines 55-71: AskUserQuestion format with game vocabulary list (12 terms)
  • Lines 73-76: Completion Status Protocol
  • Lines 78-129: Next Step Routing Protocol (workflow pipeline, backtrack rules)
  • Lines 131-139: Telemetry block

No Voice section exists. The closest thing is the game vocabulary list on lines 63-71, which defines 12 terms but gives no tone, writing rules, or forbidden vocabulary guidance.

Upstream Voice Directive (gstack preamble.ts:399-451)

gstack upstream has a generateVoiceDirective(tier) function with two tiers:

Tier 1 (compact, ~50 words): Tone (direct, concrete, sharp), writing rules (no em dashes, no AI vocabulary), short paragraphs, end with action.

Tier 2+ (full, ~450 words): Builder philosophy, core belief, tone calibration by context (YC partner / senior eng / blog post energy), humor style, concreteness standard with examples, connect to user outcomes, writing rules with 19 banned AI words and 7 banned phrases, stylistic guidance (punchy sentences, curiosity over lecturing).

Key upstream elements that need game-dev adaptation:

  • "YC partner energy" needs to become game-dev energy types
  • "Senior eng energy" maps partially but needs game-specific contexts
  • Concreteness examples are SaaS/web-focused, need game equivalents
  • No game-specific vocabulary bans (e.g., "fun" without mechanism)

Gotchas File Survey — Anti-Sycophancy Distribution

Skill Forbidden Phrases Forcing Questions Gotchas Push-Back Protocol
game-review 7 generic ("really fun", "players will love") 0 5 Claude-specific 3-step push-back
balance-review 6 economy-specific ("economy feels balanced") 5 (Q1-Q5 with routing table) 7 Claude-specific Via forcing questions
game-direction 6 vision-specific ("strong vision") 0 0 5-point operating posture
asset-review 6 aesthetic-specific ("beautiful assets") 4 (Q1-Q4) 6 Claude-specific Via forcing questions
game-codex 7 praise-specific ("code looks solid") 0 6 Claude-specific 3-step push-back
game-eng-review 7+ ("great architecture") N/A (inline) 9 Claude-specific Inline

Total unique forbidden phrases across all gotchas: ~39

What's Missing (Gap Analysis)

  1. No unified banned AI vocabulary. Each skill bans domain-specific phrases but none ban generic AI slop (delve, crucial, robust, comprehensive, nuanced, etc.). Upstream bans 19 AI words; gstack-game bans 0 at the preamble level.

  2. No tone calibration. Upstream defines context-specific energy levels. gstack-game has no equivalent. Each skill independently defines its "operating posture" but there is no shared tone guidance.

  3. No writing rules. No em-dash ban, no paragraph length guidance, no "end with action" rule. These exist in upstream but not in gstack-game at all.

  4. No concreteness standard. balance-review has excellent concrete examples ("Faucet output is 150 gold/hr...") but this pattern is not universal. Most skills lack a concreteness requirement.

  5. No humor guidance. Upstream defines dry humor about software absurdity. Game-dev has its own rich tradition of absurd observations that could be codified.

  6. No game-specific AI vocabulary bans. Beyond skill-specific forbidden phrases, there are game-industry weasel words that should be universally banned: "fun" (without mechanism), "engaging", "immersive", "strategic" (without specifics), "balanced" (without numbers).

What Overlaps

  1. Game vocabulary (preamble lines 63-71) already defines 12 terms. The Voice section should reference these, not duplicate them.

  2. Skill-specific forbidden phrases in gotchas files are more specific than a preamble Voice section should be. They should stay in gotchas. The Voice section covers universal bans only.

  3. Push-back cadence already exists in game-review and game-codex gotchas. The Voice section should not duplicate this — it belongs at the skill level.

What's Game-Specific vs Generic

Game-specific (must write fresh):

  • Tone calibration by game-dev context (design challenge / balance expert / shipping energy)
  • Game-industry vocabulary bans ("fun" without mechanism, "players will love")
  • Concreteness examples with game metrics (D1 churn, session length, economy ratios)
  • Game-dev humor style (observations about tutorials, playtest absurdity)

Portable from upstream (adapt, don't copy):

  • AI vocabulary ban list (19 words, directly reusable)
  • Banned phrase patterns (7 phrases, directly reusable)
  • Writing rules (em dashes, paragraph length, end with action)
  • Concreteness-as-standard philosophy (reframe examples for games)

Template Engine Constraints

The template engine (scripts/gen-skill-docs.ts) is 122 lines, supports only 2 placeholders: {{PREAMBLE}} and {{SKILL_NAME}}. Adding a new placeholder (e.g., {{GAME_VOICE}}) would require modifying the fragment registry on line 31-33. This is straightforward (~3 lines of code) but adds complexity for a single fragment.

The simplest path: add the Voice section directly to preamble.md. Every skill gets it automatically via {{PREAMBLE}} with zero template engine changes.

fagemx avatar Mar 27 '26 21:03 fagemx

Innovate Phase: Issue #22 — Game-Dev Voice Directive

Approach A: Add Voice Section Directly to preamble.md

How it works: Add a ## Voice section (~150-250 words) to skills/shared/preamble.md after the "Shared artifact directory" section (after line 53). All 28 skills inherit it immediately via existing {{PREAMBLE}} placeholder.

Pros:

  • Zero template engine changes. The 122-line gen-skill-docs.ts stays untouched.
  • Every skill gets the Voice section automatically on next bun run build.
  • Matches the existing architecture pattern (preamble = shared, gotchas = skill-specific).
  • Simplest to implement, review, and maintain.
  • Natural placement: after "what the project is" (artifact dir), before "how to communicate" (AskUserQuestion format).

Cons:

  • Preamble grows from 140 to ~170 lines. Still reasonable.
  • No per-skill customization of voice (but that is by design -- voice should be consistent).
  • If issue #26 (tier system) later wants different voice per tier, this would need restructuring.

Tier system compatibility (#26): Moderate. A future tier system could conditionally include/exclude the Voice section, but would require either (a) moving Voice to a separate fragment, or (b) adding tier-conditional logic to the template engine. This is the same refactor Approach B does now, so choosing A now does not create technical debt -- it just defers optionality.

Effort: Human ~30 min / CC ~5 min.

Approach B: Separate voice.md Fragment with {{GAME_VOICE}} Placeholder

How it works: Create skills/shared/voice.md containing the Voice section. Add {{GAME_VOICE}} to the fragment registry in gen-skill-docs.ts. Each skill template includes {{GAME_VOICE}} where appropriate.

Pros:

  • Clean separation of concerns (preamble = setup, voice = tone).
  • Future tier system (#26) could have voice-t1.md / voice-t2.md easily.
  • Skills could opt out of voice by not including the placeholder (though why would they?).

Cons:

  • Requires modifying gen-skill-docs.ts (small change, ~3 lines).
  • Requires updating all 28 SKILL.md.tmpl files to add {{GAME_VOICE}} -- significant churn.
  • More moving parts for no immediate benefit. Over-engineering for current needs.
  • The "opt out" capability is a footgun, not a feature. Voice should be mandatory.

Tier system compatibility (#26): Excellent. The fragment-per-tier pattern is ready-made.

Effort: Human ~1.5 hr / CC ~15 min.

Approach C: Enhance Existing Gotchas Files (Status Quo++)

How it works: Add unified AI vocabulary bans, tone calibration, and writing rules to each skill's gotchas.md. No preamble changes. Standardize the existing scattered anti-sycophancy into a common template.

Pros:

  • No shared infrastructure changes.
  • Each skill can have slightly tailored tone guidance.
  • Incremental -- can be done one skill at a time.

Cons:

  • Perpetuates the exact problem the issue describes: 28 skills each defining voice independently.
  • Guaranteed drift over time as skills evolve.
  • Does not address the 11 skills that currently have NO gotchas.md.
  • Massive surface area (28 files) for what should be a single source of truth.
  • Contradicts gstack methodology principle: centralize what's universal, specialize what's domain-specific.

Tier system compatibility (#26): Poor. Would need 28 files updated for any voice change.

Effort: Human ~3 hr / CC ~30 min.

Recommendation: Approach A

Choose Approach A because:

  1. It solves the problem (centralized voice) with zero infrastructure changes.
  2. It matches the existing architecture (preamble = shared concerns).
  3. It does not preclude Approach B later if #26 tier system needs fragment-level control.
  4. The ~30-line addition to a 140-line file is proportional -- not bloating the preamble.
  5. Gotchas files keep their skill-specific forbidden phrases (no conflict, clean layering).

The migration path is clear: if #26 needs per-tier voice, extract the Voice section from preamble into voice.md at that time. The content stays the same; only the delivery mechanism changes.

Relationship to Existing Anti-Sycophancy

The Voice section is additive, not replacing gotchas files:

Layer Scope Content
preamble.md Voice (new) Universal, all 28 skills AI vocabulary bans, writing rules, tone calibration, concreteness standard, game-dev philosophy
gotchas.md (existing) Per-skill Domain-specific forbidden phrases, Claude-specific mistakes, forcing questions, push-back cadence

No gotchas files need modification. Skills that already ban "beautiful assets" (asset-review) or "economy feels balanced" (balance-review) keep those domain-specific bans. The preamble adds the universal layer underneath.

fagemx avatar Mar 27 '26 21:03 fagemx

Plan Phase: Issue #22 — Game-Dev Voice Directive

Chosen Approach: A (Voice section in preamble.md)

Implementation Plan

Step 1: Write the Voice Section Content

Add ## Voice section to skills/shared/preamble.md after line 53 (after "If PROACTIVE is "false"..." paragraph), before the existing ## AskUserQuestion Format section.

Proposed content (~200 words):

## Voice

Sound like a game dev who shipped games, shipped them late, and learned why. Not a consultant. Not an academic. Someone who has watched playtesters ignore the tutorial and still thinks games are worth making.

**Tone calibration by context:**
- Design review: challenge energy. "What happens when the player does the opposite of what you expect?"
- Balance/economy: spreadsheet energy. Show the math, name the failure mode, project Day 30.
- QA/shipping: urgency energy. What breaks, what ships, what gets cut.
- Architecture: craft energy. Respect the tradeoff, question the assumption, check the budget.

**Forbidden AI vocabulary — never use:** delve, crucial, robust, comprehensive, nuanced, multifaceted, furthermore, moreover, additionally, pivotal, landscape, tapestry, underscore, foster, showcase, intricate, vibrant, fundamental, significant, interplay.

**Forbidden game-industry weasel words — never use without specifics:** "fun" (say what mechanic creates what feeling), "engaging" (say what holds attention and why), "immersive" (say what grounds the player), "strategic" (say what decision and what tradeoff), "balanced" (say what ratio and what target), "players will love" (say what player type and what need it serves).

**Concreteness is the standard.** Not "this feels slow" but "3.2s load on iPhone 11, expect 5% D1 churn." Not "economy might break" but "Day 30 free player: 50K gold, sink demand 40K/day, 1.25-day stockpile." Not "players get confused" but "3/8 playtesters missed the tutorial skip at 2:15."

**Writing rules:** No em dashes (use commas, periods, or "..."). Short paragraphs. End with what to do. Name the file, the metric, the player segment. Be direct about quality: "this works" or "this is broken," not "this could potentially benefit from some refinement."

Step 2: Run Build

bun run build

This regenerates all 28 SKILL.md files with the new Voice section injected via {{PREAMBLE}}.

Step 3: Run Tests

bun test

All 11 tests must pass. The drift detection test will verify all SKILL.md files match their regenerated templates.

Step 4: Verify

Spot-check 2-3 generated SKILL.md files to confirm the Voice section appears in the correct position (after shared artifact directory, before AskUserQuestion format).

Step 5: Commit

Two logical commits (bisect-friendly):

  1. feat: add game-dev voice directive to shared preamble — changes skills/shared/preamble.md only
  2. build: regenerate all SKILL.md from updated preamble — changes all 28 skills/*/SKILL.md files

Or, since preamble.md is a template source and the SKILL.md files are generated output, a single commit is also acceptable:

  • feat: add game-dev voice directive to shared preamble (#22)

Content Design Decisions

Why ~200 words, not ~450 like upstream?

Upstream's full voice directive includes builder philosophy, YC-specific references, and startup-context guidance. gstack-game needs only the game-dev layer. The philosophy is "shipped games, shipped them late" not "there is no one at the wheel." Shorter is better for prompt context.

Why tone calibration uses 4 contexts, not 3?

The issue proposed 3 (design challenge / balance expert / shipping). Adding "architecture/craft" covers game-eng-review, game-codex, and asset-review which have a different energy than the other three. Four contexts map cleanly to the existing skill categories.

Why two forbidden vocabulary lists?

  • AI vocabulary (19 words): directly from upstream, language model tendencies, not game-specific.
  • Game-industry weasel words (6 words): industry-specific vagueness. "Fun" without a mechanism is the game-dev equivalent of "robust" -- it sounds meaningful but says nothing. Each banned word comes with a replacement pattern showing what to say instead.

What stays in gotchas.md?

Everything currently there. The Voice section does not replace or conflict with any existing gotchas content:

  • game-review's "Players will love this" ban stays (more specific than preamble's universal ban)
  • balance-review's 7 Claude-specific gotchas stay (domain expertise, not voice)
  • asset-review's "Beautiful assets" ban stays (pipeline-specific)
  • All forcing questions stay (skill-specific interaction patterns)

Placement rationale

preamble.md structure (after change):
  Lines 1-44:   Bash setup (unchanged)
  Lines 46-53:  Shared artifact directory (unchanged)
  NEW:          ## Voice (~25 lines)
  Lines 55-71:  ## AskUserQuestion Format (unchanged, renumbered)
  Lines 73-76:  ## Completion Status Protocol (unchanged, renumbered)
  Lines 78-129: ## Next Step Routing Protocol (unchanged, renumbered)
  Lines 131-139: ## Telemetry (unchanged, renumbered)

Voice goes after "what the project is" and before "how to interact with the user." This is the natural reading order: identity before behavior.

Acceptance Criteria Mapping

Criterion How addressed
## Voice section in preamble.md Step 1: added after line 53
Universal game-dev forbidden vocabulary Two lists: 19 AI words + 6 game-industry weasel words
Tone calibration guidance 4-context calibration (design/balance/QA-shipping/architecture)
Concreteness standard with game examples 3 game-specific before/after examples
bun run build regenerates all 28 files Step 2
bun test passes Step 3

Risks

  1. Preamble token count increase. ~200 words added to every skill's context window. At ~280 tokens, this is modest. All 28 skills currently share the 140-line preamble (~800 tokens), growing to ~1080 tokens. Well within budget.

  2. Potential conflict with existing gotchas. Reviewed all 6 gotchas files. No conflicts found. The preamble bans universal words; gotchas ban domain-specific phrases. Clean layering.

  3. Future tier system (#26). If implemented, the Voice section can be extracted from preamble to a separate fragment with zero content changes. The refactor is mechanical, not creative.

fagemx avatar Mar 27 '26 21:03 fagemx