mirror of
https://github.com/Donchitos/Claude-Code-Game-Studios
synced 2026-04-21 13:27:18 +00:00
* Add context resilience: file-backed state, incremental writing, auto-recovery Prevents "prompt too long" crashes from killing sessions by persisting work to disk incrementally instead of relying on conversation memory. Changes: - pre-compact.sh: dumps session state before context compression - session-start.sh: detects active.md for crash recovery - session-stop.sh: archives and clears active.md on clean shutdown - context-management.md: file-backed state as primary strategy - 9 agents updated with incremental section writing protocol (game-designer, systems-designer, economy-designer, narrative-director, level-designer, world-builder, writer, art-director, audio-director) - CLAUDE.md: trimmed redundant imports (10 → 5) to reduce token overhead - design-docs.md rule: enforces incremental writing pattern - .gitignore: excludes ephemeral session state files - directory-structure.md: documents session-state/ and session-logs/ - COLLABORATIVE-DESIGN-PRINCIPLE.md: documents incremental writing pattern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add AskUserQuestion integration across collaborative protocols Explicitly reference the AskUserQuestion tool in all collaborative agent definitions, protocol templates, team orchestrator skills, and the master principle doc. Introduces the Explain-then-Capture pattern: agents write full expert analysis in conversation, then call AskUserQuestion with concise labels to capture decisions via structured UI. 26 files updated: - 3 protocol templates (design, leadership, implementation) - 14 agent definitions (10 design + 3 leadership + writer) - 8 orchestrator skills (brainstorm + 7 team-*) - 1 master principle doc (COLLABORATIVE-DESIGN-PRINCIPLE.md) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add /design-systems skill: concept-to-GDD decomposition workflow Bridges the gap between game concept and per-system design documents. Professional studios use systems enumeration + dependency sorting between concept and feature docs — skipping this step is one of the most expensive mistakes (systems discovered during production cost 5-10x more to add). New files: - .claude/skills/design-systems/SKILL.md — 7-phase orchestration skill (enumerate systems, map dependencies, assign priorities, write GDDs) - .claude/docs/templates/systems-index.md — master tracking template Flow integration (7 existing skills updated): - brainstorm, start, setup-engine, design-review, gate-check, project-stage-detect, game-concept template all reference /design-systems at the appropriate workflow touchpoints Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix cross-platform bugs, add missing tool permissions, and update docs for v0.2.0 Hooks: fix \s → [[:space:]] in grep -E fallbacks (3 files), fix detect-gaps.sh empty-variable bug, fix log-agent.sh field name (agent_name → agent_type), harden validate-push.sh with explicit $MATCHED_BRANCH, convert for-in loops to while-read for space-safe iteration, add POSIX head -n syntax, increase PreCompact timeout, widen session-stop log window. Skills: add AskUserQuestion to 10 skills and TodoWrite to 8 multi-phase skills. Fix project-stage-detect template/output paths, tech-artist → technical-artist. Docs: add /design-systems to all references (README, quick-start, workflow guide, skills-reference), update skill count 35 → 36, remove stale AI artifacts from COLLABORATIVE-DESIGN-PRINCIPLE.md, add AskUserQuestion note to examples README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
199 lines
7.8 KiB
Markdown
199 lines
7.8 KiB
Markdown
# Collaborative Session Examples
|
|
|
|
This directory contains realistic, end-to-end session transcripts showing how the Game Studio Agent Architecture works in practice. Each example demonstrates the **collaborative workflow** where agents ask questions, present options, and wait for user approval rather than autonomously generating content.
|
|
|
|
---
|
|
|
|
## 📚 **Available Examples**
|
|
|
|
### [Session: Designing the Crafting System](session-design-crafting-system.md)
|
|
**Type:** Design
|
|
**Agent:** game-designer
|
|
**Duration:** ~45 minutes (12 turns)
|
|
**Complexity:** Medium
|
|
|
|
**Scenario:**
|
|
Solo dev needs to design a crafting system that serves Pillar 2 ("Emergent Discovery Through Experimentation"). The agent guides them through question/answer, presents 3 design options with game theory analysis, incorporates user modifications, and iteratively drafts the GDD with approval at each step.
|
|
|
|
**Key Collaborative Moments:**
|
|
- Agent asks 5 clarifying questions upfront
|
|
- Presents 3 distinct options with pros/cons + MDA alignment
|
|
- User modifies recommended option, agent incorporates immediately
|
|
- Edge case flagged proactively ("what if non-recipe combo?")
|
|
- Each GDD section shown for approval before moving to next
|
|
- Explicit "May I write to [file]?" before creating file
|
|
|
|
**Learn:**
|
|
- How design agents ask about goals, constraints, references
|
|
- How to present options using game design theory (MDA, SDT, Bartle)
|
|
- How to iterate on drafts section-by-section
|
|
- When to delegate to specialists (systems-designer, economy-designer)
|
|
|
|
---
|
|
|
|
### [Session: Implementing Combat Damage Calculation](session-implement-combat-damage.md)
|
|
**Type:** Implementation
|
|
**Agent:** gameplay-programmer
|
|
**Duration:** ~30 minutes (10 turns)
|
|
**Complexity:** Low-Medium
|
|
|
|
**Scenario:**
|
|
User has a complete design doc and wants the damage calculation implemented. Agent reads the spec, identifies 7 ambiguities/gaps, asks clarifying questions, proposes architecture for approval, implements with rule enforcement, and proactively writes tests.
|
|
|
|
**Key Collaborative Moments:**
|
|
- Agent reads design doc first, identifies 7 spec ambiguities
|
|
- Architecture proposed with code samples BEFORE implementation
|
|
- User requests type safety, agent refines and re-proposes
|
|
- Rules catch issues (hardcoded values), agent fixes transparently
|
|
- Tests written proactively following verification-driven development
|
|
- Agent offers options for next steps rather than assuming
|
|
|
|
**Learn:**
|
|
- How implementation agents clarify specs before coding
|
|
- How to propose architecture with code samples for approval
|
|
- How rules enforce standards automatically
|
|
- How to handle spec gaps (ask, don't assume)
|
|
- Verification-driven development (tests prove it works)
|
|
|
|
---
|
|
|
|
### [Session: Scope Crisis - Strategic Decision Making](session-scope-crisis-decision.md)
|
|
**Type:** Strategic Decision
|
|
**Agent:** creative-director
|
|
**Duration:** ~25 minutes (8 turns)
|
|
**Complexity:** High
|
|
|
|
**Scenario:**
|
|
Solo dev faces crisis: Alpha milestone in 2 weeks, crafting system needs 3 weeks, investor demo is make-or-break. Creative director gathers context, frames the decision, presents 3 strategic options with honest trade-off analysis, makes recommendation but defers to user, then documents decision with ADR and demo script.
|
|
|
|
**Key Collaborative Moments:**
|
|
- Agent reads context docs before proposing solutions
|
|
- Asks 5 questions to understand decision constraints
|
|
- Frames decision properly (what's at stake, evaluation criteria)
|
|
- Presents 3 options with risk analysis and historical precedent
|
|
- Makes strong recommendation but explicitly: "this is your call"
|
|
- Documents decision + provides demo script to support user
|
|
|
|
**Learn:**
|
|
- How leadership agents frame strategic decisions
|
|
- How to present options with trade-off analysis
|
|
- How to use game dev precedent and theory in recommendations
|
|
- How to document decisions (ADRs)
|
|
- How to cascade decisions to affected departments
|
|
|
|
---
|
|
|
|
## 🎯 **What These Examples Demonstrate**
|
|
|
|
All examples follow the **collaborative workflow pattern:**
|
|
|
|
```
|
|
Question → Options → Decision → Draft → Approval
|
|
```
|
|
|
|
> **Note:** These examples show the collaborative pattern as conversational text.
|
|
> In practice, agents now use the `AskUserQuestion` tool at decision points to
|
|
> present structured option pickers (with labels, descriptions, and multi-select).
|
|
> The pattern is **Explain → Capture**: agents explain their analysis in
|
|
> conversation first, then present a structured UI picker for the user's decision.
|
|
|
|
### ✅ **Collaborative Behaviors Shown:**
|
|
|
|
1. **Agents Ask Before Assuming**
|
|
- Design agents ask about goals, constraints, references
|
|
- Implementation agents clarify spec ambiguities
|
|
- Leadership agents gather full context before recommending
|
|
|
|
2. **Agents Present Options, Not Dictates**
|
|
- 2-4 options with pros/cons
|
|
- Reasoning based on theory, precedent, project pillars
|
|
- Recommendation made, but user decides
|
|
|
|
3. **Agents Show Work Before Finalizing**
|
|
- Design drafts shown section-by-section
|
|
- Architecture proposals shown before implementation
|
|
- Strategic analysis presented before decisions
|
|
|
|
4. **Agents Get Approval Before Writing Files**
|
|
- Explicit "May I write to [file]?" before using Write/Edit tools
|
|
- Multi-file changes list all affected files first
|
|
- User says "Yes" before any file is created
|
|
|
|
5. **Agents Iterate on Feedback**
|
|
- User modifications incorporated immediately
|
|
- No defensiveness when user changes recommendations
|
|
- Celebrate when user improves agent's suggestion
|
|
|
|
---
|
|
|
|
## 📖 **How to Use These Examples**
|
|
|
|
### For New Users:
|
|
Read these examples BEFORE your first session. They show realistic expectations for how agents work:
|
|
- Agents are consultants, not autonomous executors
|
|
- You make all creative/strategic decisions
|
|
- Agents provide expert guidance and options
|
|
|
|
### For Understanding Specific Workflows:
|
|
- **Designing a system?** → Read session-design-crafting-system.md
|
|
- **Implementing code?** → Read session-implement-combat-damage.md
|
|
- **Making strategic decisions?** → Read session-scope-crisis-decision.md
|
|
|
|
### For Training:
|
|
If you're teaching someone to use this system, walk through one example turn-by-turn to show:
|
|
- What good questions look like
|
|
- How to evaluate presented options
|
|
- When to approve vs. request changes
|
|
- How to maintain creative control while leveraging AI expertise
|
|
|
|
---
|
|
|
|
## 🔍 **Common Patterns Across All Examples**
|
|
|
|
### Turn 1-2: **Understand Before Acting**
|
|
- Agent reads context (design docs, specs, constraints)
|
|
- Agent asks clarifying questions
|
|
- No assumptions or guesses
|
|
|
|
### Turn 3-5: **Present Options with Reasoning**
|
|
- 2-4 distinct approaches
|
|
- Pros/cons for each
|
|
- Theory/precedent supporting the analysis
|
|
- Recommendation made, decision deferred to user
|
|
|
|
### Turn 6-8: **Iterate on Drafts**
|
|
- Show work incrementally
|
|
- Incorporate feedback immediately
|
|
- Flag edge cases or ambiguities proactively
|
|
|
|
### Turn 9-10: **Approval and Completion**
|
|
- "May I write to [file]?"
|
|
- User: "Yes"
|
|
- Agent writes files
|
|
- Agent offers next steps (tests, review, integration)
|
|
|
|
---
|
|
|
|
## 🚀 **Try It Yourself**
|
|
|
|
After reading these examples, try this exercise:
|
|
|
|
1. Pick one of your game systems (combat, inventory, progression, etc.)
|
|
2. Ask the relevant agent to design or implement it
|
|
3. Notice if the agent:
|
|
- ✅ Asks clarifying questions upfront
|
|
- ✅ Presents options with reasoning
|
|
- ✅ Shows drafts before finalizing
|
|
- ✅ Requests approval before writing files
|
|
|
|
If the agent skips any of these, remind it:
|
|
> "Please follow the collaborative protocol from docs/COLLABORATIVE-DESIGN-PRINCIPLE.md"
|
|
|
|
---
|
|
|
|
## 📝 **Additional Resources**
|
|
|
|
- **Full Principle Documentation:** [docs/COLLABORATIVE-DESIGN-PRINCIPLE.md](../COLLABORATIVE-DESIGN-PRINCIPLE.md)
|
|
- **Workflow Guide:** [docs/WORKFLOW-GUIDE.md](../WORKFLOW-GUIDE.md)
|
|
- **Agent Roster:** [.claude/docs/agent-roster.md](../../.claude/docs/agent-roster.md)
|
|
- **CLAUDE.md (Collaboration Protocol):** [CLAUDE.md](../../CLAUDE.md#collaboration-protocol)
|