Files
Claude-Code-Game-Studios/.claude/docs/templates/guidance/interaction-pattern-library-guide-navigation-feedback.md
T
DonchitosandClaude Opus 5 d05699707f Release 1.1.0 — one config file, and a process weight you choose
`project.yaml` at the repo root is now the single source of truth for a
project's configuration, replacing `production/stage.txt`,
`production/review-mode.txt` and `.claude/docs/technical-preferences.md` (all
three still read as a fallback; nothing is force-deleted).

**`modes.rigor` — one question instead of six.** `minimal`, `standard` or
`full` fronts six knobs: `modes.workflow`, `docs.density`, `qa.level`,
`modes.story_granularity`, `modes.review_mode` and `team.size`. It defaults to
`minimal`, which is a change from 1.0's behaviour: the heavier tier was
measured costing several times more to reach working code without producing a
better result, and returning nothing when a fresh developer inherited the
project. Pin `modes.rigor: standard` to keep 1.0's process level.

Also in this release:

- `/settings` to view or change any setting, and `project.local.yaml` for
  per-developer preferences that should not be committed.
- `system_overrides` to hold one system to a higher standard than the rest of
  the project, and `testing.strict` to set per test type whether missing
  evidence blocks a story or warns.
- A story that changes anything the player sees is not closed until the game
  has been launched, observed, and a screenshot retained in
  `production/qa/evidence/`. A parse check is not a run. This holds at every
  rigor level, including `minimal`, where automated tests are waived but the
  look is not.
- The code root is engine-specific and enforced as such: Godot `src/`, Unity
  `Assets/`, Unreal `Source/<Module>/`. Two of the three will not build a
  project laid out any other way.
- Migration tooling for existing projects: `.claude/scripts/migrate-v1-config.sh`
  converts a 1.0 layout, non-destructively by default, with a report to review
  before `--finalize` deletes anything.
- Ask-before-write holds regardless of personal automation settings.

Upgrading from 1.0 or earlier: see UPGRADING.md. Full list of changes:
CHANGELOG.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016xvzG3i7pWQg4LjyDwWMXd
2026-09-23 12:25:11 +10:00

8.9 KiB

Authoring guidance for interaction-pattern-library.md. Load only the part covering the section currently being authored — not the whole file at once.

Covers: Navigation Patterns (Screen Push / Pop / Replace, Focus Management, Escape / Cancel) and Feedback and Loading Patterns (Loading State, Empty State, Error State) — full reference specifications.

Navigation Patterns


Screen Push / Pop / Replace

Category: Navigation Status: Draft

These three patterns define how screens enter and exit the navigation stack.

Pattern Trigger Animation Stack Behavior Focus Behavior
Push Navigate deeper (open submenu, open detail view) New screen slides in from right. Previous screen slides left and dims. Previous screen remains on stack Focus moves to first interactive element on new screen
Pop (Back) Back button / Escape / B / Circle Current screen slides right and exits. Previous screen slides in from left and brightens. Current screen removed from stack Focus returns to the element that triggered the Push
Replace Navigate to a peer screen (not child, not parent). Loading screen. Fade out current, fade in new. No directional bias. Current screen removed. New screen added. Focus moves to first interactive element on new screen

Animation durations: Push/Pop: 250ms ease-in-out. Replace: 200ms fade out + 200ms fade in.

Motion reduction: All slide animations become fades. Duration reduces to 100ms.

Implementation Notes: [Godot: Implement as a ScreenManager singleton managing a stack of Control scenes. push(screen_scene) instantiates and animates in. pop() animates out and frees. replace(screen_scene) calls pop then push without the intermediate stack state. Use CanvasLayer per screen to isolate input handling. Store the "return focus" element reference before pushing so it can be restored on pop.]


Focus Management

Category: Navigation Status: Draft

Focus management is the most common keyboard and gamepad accessibility failure in game UIs. These rules must be implemented consistently. A player should never be in a state where they cannot see which element is focused, or where Tab/D-pad produces no visible result.

Rule Description
Screen open Focus is placed on the most logical interactive element — typically the Primary button, the first list item, or the last-focused element if the screen was previously visited. Never on a non-interactive element.
Screen close / pop Focus returns to the element that triggered the navigation (the button that opened the screen, the list item that was selected). If that element no longer exists, focus goes to the nearest preceding interactive element.
Modal open Focus is trapped inside the modal. See Modal Dialog pattern.
Modal close Focus returns to the element that triggered the modal.
Element disabled If the focused element becomes disabled, focus moves to the next available interactive element in the tab order.
Element destroyed If the focused element is removed from the scene, focus moves to the nearest preceding element in the tab order.
Screen without interactive elements Focus management is a no-op. Ensure back/cancel input still works.
Tab key (keyboard) Moves focus forward through interactive elements in document order (left to right, top to bottom). Shift+Tab moves backward.
D-pad (gamepad) Moves focus in the spatial direction pressed. Spatial navigation is preferred over strict tab order for gamepad. Never wrap focus between unrelated regions (e.g., Tab bar and content area should be separate navigation regions).
Focus is always visible Focus ring or equivalent focus indicator must ALWAYS be visible when an element is focused via keyboard or gamepad. Never suppress focus indicators.

Escape / Cancel

Category: Navigation Status: Draft

The "go back" action is the most-used navigation input in all menu systems. It must be consistent across every screen with no exceptions.

Platform Input Behavior
PC (keyboard) Escape Close top-most modal / go back one screen in stack / if at root screen (main menu), open "quit?" confirmation
PC (gamepad) B (Xbox layout) / Circle (PS layout) Same as Escape
Xbox B button Same as Escape
PlayStation Circle button Same as Escape
Nintendo Switch B button Same as Escape (NOTE: Nintendo uses B for confirm in some first-party titles — verify platform convention for this release and document the decision)

Rules: This input must never be overridden to do something other than "go back / cancel." If a screen has no back action (e.g., the game is paused and the player must make a choice), Escape does nothing or shows a "you must choose" message — it does not navigate away. Every screen must define its Escape behavior explicitly in its UX spec.


Feedback and Loading Patterns


Loading State

Category: Feedback Status: Draft

Scope Pattern Notes
Full screen (initial load) Full-screen loading screen with game art, progress bar (determinate if possible), tip text (optional). Never use an empty black screen. Give the player something to read or look at.
Full screen (level transition) Fade to black, loading screen, fade from black to new scene. The fade removes the pop of the previous scene disappearing.
Component / inline Spinner or skeleton placeholder replaces the loading component. Component does not shift layout when content loads. Skeleton placeholder (grey boxes approximating content shape) is preferable to spinner for layout-heavy content — it prevents layout shift on load.
Background / async No visual indication unless operation exceeds 2 seconds. After 2 seconds, show a small spinner or toast. Do not show loading indicators for operations that complete in under 2 seconds — the flash of an indicator is more disruptive than waiting.

Accessibility: Loading states must announce to screen readers: "[Context] loading, please wait." Completion must announce "[Context] loaded." For full-screen loading, ensure the loading screen itself is navigable to screen readers — the tips text and any UI elements must be exposed.


Empty State

Category: Feedback Status: Draft

Empty states are consistently the least-designed parts of game UIs. They are the difference between a player feeling "this is where I'll store my items" and "why is nothing here? did something break?" Every empty list and grid must have a designed empty state. The empty state is not an error — it is a starting point.

Location Empty State Content Notes
Inventory (no items) Icon (subtle, large, centered). Message: "Your inventory is empty." Sub-message: "Items you find on your journey will appear here." Do not say "No items found" — "found" implies a failed search.
Quest Log (no active quests) Icon. Message: "No active quests." Sub-message: "Talk to characters marked with [quest marker icon] to start a quest." Give the player a clear action.
Achievements (none earned) Icon. Message: "No achievements yet." List of hint achievements: "Try [Action] to earn your first achievement." Gamified motivation, not just emptiness.
Search results (no matches) Icon. Message: "No results for '[search term]'." Sub-message: "Try a different search or [browse all]." Mirror the search term back at them. Give an alternative action.

Rule: Every empty state must include an icon, a message, and either a sub-message or an action button. A blank container with no explanation is never acceptable.


Error State

Category: Feedback Status: Draft

Error Type Pattern Tone
Input validation (form field) Inline error message below the field. Error icon left of message. Red border on field (colorblind-safe with icon). Neutral and specific — "Username must be 3-20 characters." Not "Invalid input."
Operation failed (save error, network error) Toast notification for non-critical failures. Modal Dialog for critical failures (save file cannot be written). Calm and actionable — "Save failed. Check storage space." Not "FATAL ERROR."
System error (crash, data corruption) Full-screen error screen with error code, recovery options ("Restart Game," "Load last save"), and support contact. Reassuring — acknowledge the problem, give the player agency. Never blame the player.
Soft error (action cannot be performed) Toast or inline message. Explanatory — "Not enough gold" not "Action unavailable."

Principle: Error messages are never the player's fault. They are the game telling the player what happened and what to do next. Remove the word "invalid" from all error messages — replace with specific explanations.