# fagemx/gstack-game architecture

> Architecture diagram of the GitHub repository fagemx/gstack-game, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fagemx/gstack-game
- Repository: https://github.com/fagemx/gstack-game

## Overview

gstack-game is a Claude Code game-development support system: users choose a skill for their project stage, receive structured design or implementation feedback, and can follow a recommended next step. Its separate game-autoplan CLI interrogates design documents, revises weak areas, independently scores revisions, and produces result dashboards. The README documents the skill workflow; the autoplan call structure is supported by sampled source. Other skill internals were not inspected, so their links are limited to documented workflow relationships.

Main entry points: [`scripts/game-autoplan/runner.ts`](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/runner.ts) (Pipeline runner), [`scripts/game-autoplan/call-claude.ts`](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/call-claude.ts) (Claude subprocess), [`scripts/game-autoplan.ts`](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan.ts) (Autoplan CLI), [`scripts/game-autoplan/stage-interrogate.ts`](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/stage-interrogate.ts) (Design interrogation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creative["Creative and planning"]
  node_triage["Project triage<br/>[SKILL.md]"]
  node_spark["Spark exploration<br/>[SKILL.md]"]
  node_import["Document import<br/>[SKILL.md]"]
  node_ideation["Game ideation<br/>[SKILL.md]"]
  node_direction["Game direction<br/>[SKILL.md]"]
  node_slice["Prototype planning<br/>[SKILL.md]"]
end

subgraph group_review["Design and quality review"]
  node_designreview["Game design review<br/>[SKILL.md]"]
  node_balance["Balance review<br/>[SKILL.md]"]
  node_experience["Player experience<br/>[SKILL.md]"]
  node_ux["UX review<br/>[SKILL.md]"]
  node_playtest["Playtest analysis<br/>[SKILL.md]"]
end

subgraph group_delivery["Implementation and release"]
  node_handoff["Implementation handoff<br/>[SKILL.md]"]
  node_implementation["Code review<br/>[SKILL.md]"]
  node_feel["Game feel diagnosis<br/>[SKILL.md]"]
  node_qa["Game QA<br/>[SKILL.md]"]
  node_ship["Release review<br/>[SKILL.md]"]
end

subgraph group_autoplan["Automated document review"]
  node_autoplancli["Autoplan CLI<br/>[game-autoplan.ts]"]
  node_runner["Pipeline runner<br/>[runner.ts]"]
  node_interrogate["Design interrogation"]
  node_fix["Document revision<br/>[stage-fix.ts]"]
  node_score["Independent scoring<br/>[stage-score.ts]"]
  node_prompts["Prompt templates<br/>[prompts.ts]"]
  node_claude["Claude subprocess<br/>[call-claude.ts]"]
  node_cost["Cost tracking<br/>[cost-tracker.ts]"]
  node_dashboard["Results dashboard<br/>[dashboard.ts]"]
  node_types["Pipeline data types<br/>[types.ts]"]
end

node_developer(("Game developer"))
node_documents["Design documents"]
node_claudecli["Claude Code CLI"]

node_developer -->|"starts with"| node_triage
node_triage -->|"recommends skill"| node_developer
node_developer -->|"explores concept"| node_spark
node_developer -->|"imports document"| node_import
node_import -->|"writes GDD"| node_documents
node_developer -->|"structures idea"| node_ideation
node_developer -->|"reviews GDD"| node_designreview
node_developer -->|"assesses experience"| node_experience
node_developer -->|"reviews code"| node_implementation
node_developer -.->|"develops direction"| node_direction
node_developer -.->|"plans prototype"| node_slice
node_developer -.->|"reviews balance"| node_balance
node_developer -.->|"reviews UX"| node_ux
node_developer -.->|"analyzes playtest"| node_playtest
node_developer -.->|"prepares handoff"| node_handoff
node_developer -.->|"diagnoses feel"| node_feel
node_developer -.->|"checks quality"| node_qa
node_developer -.->|"reviews release"| node_ship
node_developer -->|"runs pipeline"| node_autoplancli
node_autoplancli -->|"runs pipeline"| node_runner
node_autoplancli -->|"generates dashboard"| node_dashboard
node_runner -->|"interrogates document"| node_interrogate
node_runner -->|"revises document"| node_fix
node_runner -->|"scores revision"| node_score
node_runner -->|"tracks usage"| node_cost
node_interrogate -->|"builds prompt"| node_prompts
node_fix -->|"builds prompt"| node_prompts
node_score -->|"builds prompt"| node_prompts
node_interrogate -->|"calls model"| node_claude
node_fix -->|"calls model"| node_claude
node_score -->|"calls model"| node_claude
node_claude -->|"spawns subprocess"| node_claudecli
node_runner -->|"uses data types"| node_types
node_dashboard -->|"uses result types"| node_types
node_runner -->|"reads and writes"| node_documents
node_runner -->|"returns results"| node_dashboard

click node_triage "https://github.com/fagemx/gstack-game/blob/main/skills/triage/SKILL.md"
click node_spark "https://github.com/fagemx/gstack-game/blob/main/skills/spark-lens/SKILL.md"
click node_import "https://github.com/fagemx/gstack-game/blob/main/skills/game-import/SKILL.md"
click node_ideation "https://github.com/fagemx/gstack-game/blob/main/skills/game-ideation/SKILL.md"
click node_direction "https://github.com/fagemx/gstack-game/blob/main/skills/game-direction/SKILL.md"
click node_slice "https://github.com/fagemx/gstack-game/blob/main/skills/prototype-slice-plan/SKILL.md"
click node_designreview "https://github.com/fagemx/gstack-game/blob/main/skills/game-review/SKILL.md"
click node_balance "https://github.com/fagemx/gstack-game/blob/main/skills/balance-review/SKILL.md"
click node_experience "https://github.com/fagemx/gstack-game/blob/main/skills/player-experience/SKILL.md"
click node_ux "https://github.com/fagemx/gstack-game/blob/main/skills/game-ux-review/SKILL.md"
click node_playtest "https://github.com/fagemx/gstack-game/blob/main/skills/playtest/SKILL.md"
click node_handoff "https://github.com/fagemx/gstack-game/blob/main/skills/implementation-handoff/SKILL.md"
click node_implementation "https://github.com/fagemx/gstack-game/blob/main/skills/gameplay-implementation-review/SKILL.md"
click node_feel "https://github.com/fagemx/gstack-game/blob/main/skills/feel-pass/SKILL.md"
click node_qa "https://github.com/fagemx/gstack-game/blob/main/skills/game-qa/SKILL.md"
click node_ship "https://github.com/fagemx/gstack-game/blob/main/skills/game-ship/SKILL.md"
click node_autoplancli "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan.ts"
click node_runner "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/runner.ts"
click node_interrogate "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/stage-interrogate.ts"
click node_fix "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/stage-fix.ts"
click node_score "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/stage-score.ts"
click node_prompts "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/prompts.ts"
click node_claude "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/call-claude.ts"
click node_cost "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/cost-tracker.ts"
click node_dashboard "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/dashboard.ts"
click node_types "https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/types.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_triage,node_spark,node_import,node_ideation,node_direction,node_slice toneBlue
class node_designreview,node_balance,node_experience,node_ux,node_playtest toneAmber
class node_handoff,node_implementation,node_feel,node_qa,node_ship toneMint
class node_autoplancli,node_runner,node_interrogate,node_fix,node_score,node_prompts,node_claude,node_cost,node_dashboard,node_types toneRose
class node_developer,node_documents,node_claudecli toneIndigo
```

## Components

### Creative and planning

- [Project triage](https://github.com/fagemx/gstack-game/blob/main/skills/triage/SKILL.md): `skills/triage/SKILL.md`
- [Spark exploration](https://github.com/fagemx/gstack-game/blob/main/skills/spark-lens/SKILL.md): `skills/spark-lens/SKILL.md`
- [Document import](https://github.com/fagemx/gstack-game/blob/main/skills/game-import/SKILL.md): `skills/game-import/SKILL.md`
- [Game ideation](https://github.com/fagemx/gstack-game/blob/main/skills/game-ideation/SKILL.md): `skills/game-ideation/SKILL.md`
- [Game direction](https://github.com/fagemx/gstack-game/blob/main/skills/game-direction/SKILL.md): `skills/game-direction/SKILL.md`
- [Prototype planning](https://github.com/fagemx/gstack-game/blob/main/skills/prototype-slice-plan/SKILL.md): `skills/prototype-slice-plan/SKILL.md`

### Design and quality review

- [Game design review](https://github.com/fagemx/gstack-game/blob/main/skills/game-review/SKILL.md): `skills/game-review/SKILL.md`
- [Balance review](https://github.com/fagemx/gstack-game/blob/main/skills/balance-review/SKILL.md): `skills/balance-review/SKILL.md`
- [Player experience](https://github.com/fagemx/gstack-game/blob/main/skills/player-experience/SKILL.md): `skills/player-experience/SKILL.md`
- [UX review](https://github.com/fagemx/gstack-game/blob/main/skills/game-ux-review/SKILL.md): `skills/game-ux-review/SKILL.md`
- [Playtest analysis](https://github.com/fagemx/gstack-game/blob/main/skills/playtest/SKILL.md): `skills/playtest/SKILL.md`

### Implementation and release

- [Implementation handoff](https://github.com/fagemx/gstack-game/blob/main/skills/implementation-handoff/SKILL.md): `skills/implementation-handoff/SKILL.md`
- [Code review](https://github.com/fagemx/gstack-game/blob/main/skills/gameplay-implementation-review/SKILL.md): `skills/gameplay-implementation-review/SKILL.md`
- [Game feel diagnosis](https://github.com/fagemx/gstack-game/blob/main/skills/feel-pass/SKILL.md): `skills/feel-pass/SKILL.md`
- [Game QA](https://github.com/fagemx/gstack-game/blob/main/skills/game-qa/SKILL.md): `skills/game-qa/SKILL.md`
- [Release review](https://github.com/fagemx/gstack-game/blob/main/skills/game-ship/SKILL.md): `skills/game-ship/SKILL.md`

### Automated document review

- [Autoplan CLI](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan.ts): `scripts/game-autoplan.ts`
- [Pipeline runner](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/runner.ts): `scripts/game-autoplan/runner.ts`
- [Design interrogation](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/stage-interrogate.ts): `scripts/game-autoplan/stage-interrogate.ts`
- [Document revision](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/stage-fix.ts): `scripts/game-autoplan/stage-fix.ts`
- [Independent scoring](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/stage-score.ts): `scripts/game-autoplan/stage-score.ts`
- [Prompt templates](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/prompts.ts): `scripts/game-autoplan/prompts.ts`
- [Claude subprocess](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/call-claude.ts): `scripts/game-autoplan/call-claude.ts`
- [Cost tracking](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/cost-tracker.ts): `scripts/game-autoplan/cost-tracker.ts`
- [Results dashboard](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/dashboard.ts): `scripts/game-autoplan/dashboard.ts`
- [Pipeline data types](https://github.com/fagemx/gstack-game/blob/main/scripts/game-autoplan/types.ts): `scripts/game-autoplan/types.ts`

### Other components

- **Game developer**
- **Design documents**
- **Claude Code CLI**

## Connections

- Game developer → Project triage: starts with (evidence: `README.md`)
- Project triage → Game developer: recommends skill (evidence: `README.md`)
- Game developer → Spark exploration: explores concept (evidence: `README.md`)
- Game developer → Document import: imports document (evidence: `README.md`)
- Document import → Design documents: writes GDD (evidence: `README.md`)
- Game developer → Game ideation: structures idea (evidence: `README.md`)
- Game developer → Game design review: reviews GDD (evidence: `README.md`)
- Game developer → Player experience: assesses experience (evidence: `README.md`)
- Game developer → Code review: reviews code (evidence: `README.md`)
- Game developer → Game direction: develops direction (evidence: `README.md`)
- Game developer → Prototype planning: plans prototype (evidence: `README.md`)
- Game developer → Balance review: reviews balance (evidence: `README.md`)
- Game developer → UX review: reviews UX (evidence: `README.md`)
- Game developer → Playtest analysis: analyzes playtest (evidence: `README.md`)
- Game developer → Implementation handoff: prepares handoff (evidence: `README.md`)
- Game developer → Game feel diagnosis: diagnoses feel (evidence: `README.md`)
- Game developer → Game QA: checks quality (evidence: `README.md`)
- Game developer → Release review: reviews release (evidence: `README.md`)
- Game developer → Autoplan CLI: runs pipeline (evidence: `scripts/game-autoplan.ts`)
- Autoplan CLI → Pipeline runner: runs pipeline (evidence: `scripts/game-autoplan.ts`)
- Autoplan CLI → Results dashboard: generates dashboard (evidence: `scripts/game-autoplan.ts`)
- Pipeline runner → Design interrogation: interrogates document (evidence: `scripts/game-autoplan/runner.ts`)
- Pipeline runner → Document revision: revises document (evidence: `scripts/game-autoplan/runner.ts`)
- Pipeline runner → Independent scoring: scores revision (evidence: `scripts/game-autoplan/runner.ts`)
- Pipeline runner → Cost tracking: tracks usage (evidence: `scripts/game-autoplan/runner.ts`)
- Design interrogation → Prompt templates: builds prompt (evidence: `scripts/game-autoplan/stage-interrogate.ts`)
- Document revision → Prompt templates: builds prompt (evidence: `scripts/game-autoplan/stage-fix.ts`)
- Independent scoring → Prompt templates: builds prompt (evidence: `scripts/game-autoplan/stage-score.ts`)
- Design interrogation → Claude subprocess: calls model (evidence: `scripts/game-autoplan/stage-interrogate.ts`)
- Document revision → Claude subprocess: calls model (evidence: `scripts/game-autoplan/stage-fix.ts`)
- Independent scoring → Claude subprocess: calls model (evidence: `scripts/game-autoplan/stage-score.ts`)
- Claude subprocess → Claude Code CLI: spawns subprocess (evidence: `scripts/game-autoplan/call-claude.ts`)
- Pipeline runner → Pipeline data types: uses data types (evidence: `scripts/game-autoplan/runner.ts`)
- Results dashboard → Pipeline data types: uses result types (evidence: `scripts/game-autoplan/dashboard.ts`)
- Pipeline runner → Design documents: reads and writes (evidence: `scripts/game-autoplan/runner.ts`)
- Pipeline runner → Results dashboard: returns results (evidence: `scripts/game-autoplan.ts`)
