with one click
game-system
Workflow and checks for adding a new game system
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Workflow and checks for adding a new game system
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
PR review triage, scoped fixes, verification, and merge workflow
Web transport boundaries and feature-layer conventions
Meaningful testing strategy and coverage guardrails
Parallel-path refactor workflow for clean boundary cutovers
Structured domain and transport errors with i18n-friendly messages
Go conventions for architecture-first, maintainable code
| name | game-system |
| description | Workflow and checks for adding a new game system |
| user-invocable | true |
Use docs/architecture/game-systems.md for the comprehensive guide, checklist, and
Daggerheart reference implementation.
Start at manifest.go — open
internal/services/game/domain/systems/manifest/manifest.go first. It shows
all three registry surfaces (BuildModule, BuildMetadataSystem,
BuildAdapter) wired from one SystemDescriptor. Read an existing entry
(Daggerheart) to understand the shape, then add yours.
Pick the right DecideFunc helper — see the decision tree in
docs/architecture/game-systems.md under "DecideFunc decision tree":
DecideFunc[P] — no state needed, same payload for command/eventDecideFuncWithState[S, P] — needs state for validationDecideFuncTransform[S, PIn, POut] — event payload differs from commandDecide switch — multi-event or custom routingFollow the numbered steps in docs/architecture/game-systems.md § "Adding a
new system (current flow)" (steps 1–10).
Run conformance tests after wiring:
go test ./internal/services/game/domain/module/testkit/...
testkit.ValidateSystemConformance composes all startup validators for
module + adapter pairs and fails loudly on missing registrations.
Run full verification:
make test # unit tests
make smoke # quick gRPC + scenario confidence
make check # required before opening or updating a PR
Invariant: rationale.| Validator | What it checks | Fix |
|---|---|---|
ValidateDeciderCommandCoverage | Every registered system command has a decider case | Add missing command type to decider's DeciderHandledCommands() and Decide() |
ValidateSystemFoldCoverage | Every emittable event with replay intent has a fold handler | Register a HandleFold for the missing event type |
ValidateAdapterEventCoverage | Every emittable event with projection intent has an adapter handler | Register a HandleAdapter for the missing event type |
ValidateCommandTypeNamespace | System command types match sys.<system_id>.* | Fix the command type constant string |
ValidateEventTypeNamespace | System event types match sys.<system_id>.* | Fix the event type constant string |
| Concern | Location |
|---|---|
| Manifest registry | domain/systems/manifest/manifest.go |
| Module interface | domain/module/registry.go |
| Adapter interface | domain/systems/adapter_registry.go |
| ProfileAdapter | domain/systems/adapter_registry.go |
| DecideFunc helpers | domain/module/decide_func.go |
| FoldRouter | domain/module/fold_router.go |
| Conformance tests | domain/module/testkit/ |
| Daggerheart example | domain/systems/daggerheart/ |