@zigrivers/scaffold 3.4.1 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -0
- package/content/knowledge/game/game-accessibility.md +328 -0
- package/content/knowledge/game/game-ai-patterns.md +567 -0
- package/content/knowledge/game/game-asset-pipeline.md +363 -0
- package/content/knowledge/game/game-audio-design.md +344 -0
- package/content/knowledge/game/game-binary-vcs-strategy.md +396 -0
- package/content/knowledge/game/game-design-document.md +269 -0
- package/content/knowledge/game/game-domain-patterns.md +299 -0
- package/content/knowledge/game/game-economy-design.md +355 -0
- package/content/knowledge/game/game-engine-selection.md +242 -0
- package/content/knowledge/game/game-input-systems.md +379 -0
- package/content/knowledge/game/game-level-content-design.md +483 -0
- package/content/knowledge/game/game-liveops-analytics.md +280 -0
- package/content/knowledge/game/game-localization.md +323 -0
- package/content/knowledge/game/game-milestone-definitions.md +337 -0
- package/content/knowledge/game/game-modding-ugc.md +390 -0
- package/content/knowledge/game/game-narrative-design.md +404 -0
- package/content/knowledge/game/game-networking.md +393 -0
- package/content/knowledge/game/game-performance-budgeting.md +389 -0
- package/content/knowledge/game/game-platform-certification.md +417 -0
- package/content/knowledge/game/game-project-structure.md +360 -0
- package/content/knowledge/game/game-save-systems.md +452 -0
- package/content/knowledge/game/game-testing-strategy.md +470 -0
- package/content/knowledge/game/game-ui-patterns.md +477 -0
- package/content/knowledge/game/game-vr-ar-design.md +313 -0
- package/content/knowledge/review/review-art-bible.md +305 -0
- package/content/knowledge/review/review-game-design.md +303 -0
- package/content/knowledge/review/review-game-economy.md +272 -0
- package/content/knowledge/review/review-game-ui.md +293 -0
- package/content/knowledge/review/review-netcode.md +280 -0
- package/content/knowledge/review/review-platform-cert.md +341 -0
- package/content/methodology/custom-defaults.yml +25 -0
- package/content/methodology/deep.yml +25 -0
- package/content/methodology/game-overlay.yml +145 -0
- package/content/methodology/mvp.yml +25 -0
- package/content/pipeline/architecture/ai-behavior-design.md +87 -0
- package/content/pipeline/architecture/netcode-spec.md +86 -0
- package/content/pipeline/architecture/review-netcode.md +78 -0
- package/content/pipeline/foundation/performance-budgets.md +91 -0
- package/content/pipeline/modeling/narrative-bible.md +84 -0
- package/content/pipeline/pre/game-design-document.md +90 -0
- package/content/pipeline/pre/review-gdd.md +74 -0
- package/content/pipeline/quality/analytics-telemetry.md +98 -0
- package/content/pipeline/quality/live-ops-plan.md +99 -0
- package/content/pipeline/quality/platform-cert-prep.md +129 -0
- package/content/pipeline/quality/playtest-plan.md +84 -0
- package/content/pipeline/specification/art-bible.md +87 -0
- package/content/pipeline/specification/audio-design.md +97 -0
- package/content/pipeline/specification/content-structure-design.md +142 -0
- package/content/pipeline/specification/economy-design.md +105 -0
- package/content/pipeline/specification/game-accessibility.md +82 -0
- package/content/pipeline/specification/game-ui-spec.md +97 -0
- package/content/pipeline/specification/input-controls-spec.md +81 -0
- package/content/pipeline/specification/localization-plan.md +113 -0
- package/content/pipeline/specification/modding-ugc-spec.md +116 -0
- package/content/pipeline/specification/online-services-spec.md +104 -0
- package/content/pipeline/specification/review-economy.md +87 -0
- package/content/pipeline/specification/review-game-ui.md +73 -0
- package/content/pipeline/specification/save-system-spec.md +116 -0
- package/dist/cli/commands/adopt.d.ts.map +1 -1
- package/dist/cli/commands/adopt.js +25 -0
- package/dist/cli/commands/adopt.js.map +1 -1
- package/dist/cli/commands/adopt.test.js +28 -1
- package/dist/cli/commands/adopt.test.js.map +1 -1
- package/dist/cli/commands/build.test.js +3 -0
- package/dist/cli/commands/build.test.js.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +6 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/init.test.js +12 -1
- package/dist/cli/commands/init.test.js.map +1 -1
- package/dist/cli/commands/knowledge.test.js +8 -0
- package/dist/cli/commands/knowledge.test.js.map +1 -1
- package/dist/cli/commands/next.d.ts.map +1 -1
- package/dist/cli/commands/next.js +19 -5
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/next.test.js +56 -0
- package/dist/cli/commands/next.test.js.map +1 -1
- package/dist/cli/commands/rework.d.ts.map +1 -1
- package/dist/cli/commands/rework.js +11 -2
- package/dist/cli/commands/rework.js.map +1 -1
- package/dist/cli/commands/rework.test.js +5 -0
- package/dist/cli/commands/rework.test.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +54 -4
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/run.test.js +384 -0
- package/dist/cli/commands/run.test.js.map +1 -1
- package/dist/cli/commands/skip.test.js +3 -0
- package/dist/cli/commands/skip.test.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +16 -3
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/status.test.js +55 -0
- package/dist/cli/commands/status.test.js.map +1 -1
- package/dist/cli/output/auto.d.ts +3 -0
- package/dist/cli/output/auto.d.ts.map +1 -1
- package/dist/cli/output/auto.js +9 -0
- package/dist/cli/output/auto.js.map +1 -1
- package/dist/cli/output/context.d.ts +6 -0
- package/dist/cli/output/context.d.ts.map +1 -1
- package/dist/cli/output/context.js.map +1 -1
- package/dist/cli/output/context.test.js +87 -0
- package/dist/cli/output/context.test.js.map +1 -1
- package/dist/cli/output/error-display.test.js +3 -0
- package/dist/cli/output/error-display.test.js.map +1 -1
- package/dist/cli/output/interactive.d.ts +3 -0
- package/dist/cli/output/interactive.d.ts.map +1 -1
- package/dist/cli/output/interactive.js +76 -0
- package/dist/cli/output/interactive.js.map +1 -1
- package/dist/cli/output/json.d.ts +3 -0
- package/dist/cli/output/json.d.ts.map +1 -1
- package/dist/cli/output/json.js +9 -0
- package/dist/cli/output/json.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +3 -2
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +641 -15
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +26 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/config/schema.test.js +192 -1
- package/dist/config/schema.test.js.map +1 -1
- package/dist/core/assembly/overlay-loader.d.ts +24 -0
- package/dist/core/assembly/overlay-loader.d.ts.map +1 -0
- package/dist/core/assembly/overlay-loader.js +190 -0
- package/dist/core/assembly/overlay-loader.js.map +1 -0
- package/dist/core/assembly/overlay-loader.test.d.ts +2 -0
- package/dist/core/assembly/overlay-loader.test.d.ts.map +1 -0
- package/dist/core/assembly/overlay-loader.test.js +106 -0
- package/dist/core/assembly/overlay-loader.test.js.map +1 -0
- package/dist/core/assembly/overlay-resolver.d.ts +15 -0
- package/dist/core/assembly/overlay-resolver.d.ts.map +1 -0
- package/dist/core/assembly/overlay-resolver.js +58 -0
- package/dist/core/assembly/overlay-resolver.js.map +1 -0
- package/dist/core/assembly/overlay-resolver.test.d.ts +2 -0
- package/dist/core/assembly/overlay-resolver.test.d.ts.map +1 -0
- package/dist/core/assembly/overlay-resolver.test.js +246 -0
- package/dist/core/assembly/overlay-resolver.test.js.map +1 -0
- package/dist/core/assembly/overlay-state-resolver.d.ts +26 -0
- package/dist/core/assembly/overlay-state-resolver.d.ts.map +1 -0
- package/dist/core/assembly/overlay-state-resolver.js +63 -0
- package/dist/core/assembly/overlay-state-resolver.js.map +1 -0
- package/dist/core/assembly/overlay-state-resolver.test.d.ts +2 -0
- package/dist/core/assembly/overlay-state-resolver.test.d.ts.map +1 -0
- package/dist/core/assembly/overlay-state-resolver.test.js +256 -0
- package/dist/core/assembly/overlay-state-resolver.test.js.map +1 -0
- package/dist/core/assembly/preset-loader.d.ts +1 -0
- package/dist/core/assembly/preset-loader.d.ts.map +1 -1
- package/dist/core/assembly/preset-loader.js +2 -0
- package/dist/core/assembly/preset-loader.js.map +1 -1
- package/dist/core/dependency/eligibility.test.js +3 -0
- package/dist/core/dependency/eligibility.test.js.map +1 -1
- package/dist/e2e/game-pipeline.test.d.ts +10 -0
- package/dist/e2e/game-pipeline.test.d.ts.map +1 -0
- package/dist/e2e/game-pipeline.test.js +298 -0
- package/dist/e2e/game-pipeline.test.js.map +1 -0
- package/dist/e2e/init.test.js +3 -0
- package/dist/e2e/init.test.js.map +1 -1
- package/dist/project/adopt.d.ts +3 -1
- package/dist/project/adopt.d.ts.map +1 -1
- package/dist/project/adopt.js +29 -1
- package/dist/project/adopt.js.map +1 -1
- package/dist/project/adopt.test.js +51 -1
- package/dist/project/adopt.test.js.map +1 -1
- package/dist/types/config.d.ts +50 -4
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.test.d.ts +2 -0
- package/dist/types/config.test.d.ts.map +1 -0
- package/dist/types/config.test.js +97 -0
- package/dist/types/config.test.js.map +1 -0
- package/dist/utils/eligible.d.ts +3 -2
- package/dist/utils/eligible.d.ts.map +1 -1
- package/dist/utils/eligible.js +18 -4
- package/dist/utils/eligible.js.map +1 -1
- package/dist/utils/errors.d.ts +4 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +31 -0
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/errors.test.js +4 -1
- package/dist/utils/errors.test.js.map +1 -1
- package/dist/wizard/questions.d.ts +4 -0
- package/dist/wizard/questions.d.ts.map +1 -1
- package/dist/wizard/questions.js +59 -1
- package/dist/wizard/questions.js.map +1 -1
- package/dist/wizard/questions.test.js +178 -4
- package/dist/wizard/questions.test.js.map +1 -1
- package/dist/wizard/wizard.d.ts +1 -0
- package/dist/wizard/wizard.d.ts.map +1 -1
- package/dist/wizard/wizard.js +4 -1
- package/dist/wizard/wizard.js.map +1 -1
- package/dist/wizard/wizard.test.js +102 -4
- package/dist/wizard/wizard.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: modding-ugc-spec
|
|
3
|
+
description: Specify mod API surface, packaging format, sandboxing, versioning, content moderation, and distribution channels
|
|
4
|
+
summary: "Specifies the modding and user-generated content system — mod API surface and capability tiers, packaging format and validation, runtime sandboxing, compatibility and versioning strategy, content moderation pipeline, and distribution channels (Steam Workshop, mod.io, local file-based) with platform certification implications."
|
|
5
|
+
phase: "specification"
|
|
6
|
+
order: 872
|
|
7
|
+
dependencies: [system-architecture]
|
|
8
|
+
outputs: [docs/modding-spec.md]
|
|
9
|
+
conditional: "if-needed"
|
|
10
|
+
reads: [game-design-document]
|
|
11
|
+
knowledge-base: [game-modding-ugc]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
Specify the modding and user-generated content (UGC) system — the APIs,
|
|
16
|
+
packaging formats, runtime boundaries, and distribution infrastructure that
|
|
17
|
+
allow players and third-party creators to extend the game safely and
|
|
18
|
+
sustainably.
|
|
19
|
+
|
|
20
|
+
Modding support is an architectural commitment, not a feature toggle. The mod
|
|
21
|
+
API surface determines what creators can change (textures, levels, gameplay
|
|
22
|
+
rules, UI), the packaging format determines how mods are distributed and
|
|
23
|
+
validated, and the sandboxing model determines what damage a malicious or
|
|
24
|
+
buggy mod can inflict. These decisions cascade into security requirements,
|
|
25
|
+
platform certification constraints, and long-term versioning strategy.
|
|
26
|
+
|
|
27
|
+
Three categories of modding complexity exist, each with different engineering
|
|
28
|
+
costs:
|
|
29
|
+
|
|
30
|
+
1. **Asset replacement**: Swapping textures, models, audio, or localization
|
|
31
|
+
strings. Lowest risk — mods cannot execute code, only replace data.
|
|
32
|
+
2. **Content authoring**: Creating new levels, quests, items, or game entities
|
|
33
|
+
using structured data formats (JSON, YAML, custom editors). Medium risk —
|
|
34
|
+
mods define data that the engine interprets, with schema validation as the
|
|
35
|
+
safety boundary.
|
|
36
|
+
3. **Scripted mods**: Running custom logic via a scripting layer (Lua, C#,
|
|
37
|
+
WASM). Highest risk — mods execute code, requiring sandboxing, resource
|
|
38
|
+
limits, and capability-based permission models.
|
|
39
|
+
|
|
40
|
+
This specification must also address the tension between openness and platform
|
|
41
|
+
certification: console platforms restrict arbitrary code execution and require
|
|
42
|
+
content moderation for UGC, which constrains what modding features can ship on
|
|
43
|
+
each platform.
|
|
44
|
+
|
|
45
|
+
## Conditional Evaluation
|
|
46
|
+
Enable when: the project config indicates modding support (`hasModding` is
|
|
47
|
+
true) — the GDD describes mod support, workshop integration, user-generated
|
|
48
|
+
content, level editors, or any system allowing players to create, share, or
|
|
49
|
+
install content beyond the shipped game.
|
|
50
|
+
|
|
51
|
+
Skip when: the game has no modding or UGC features — players can only
|
|
52
|
+
experience developer-created content. Games with cosmetic customization
|
|
53
|
+
(character creators, paint jobs) that use built-in assets do not require a
|
|
54
|
+
modding specification.
|
|
55
|
+
|
|
56
|
+
## Inputs
|
|
57
|
+
- docs/system-architecture.md (required) — engine architecture, asset loading pipeline, scripting runtime, security boundaries
|
|
58
|
+
- docs/plan.md (required) — target platforms informing modding feasibility per platform (PC vs console vs mobile)
|
|
59
|
+
- docs/game-design.md (optional, forward-read) — moddable systems, expected mod types, community creation goals
|
|
60
|
+
- docs/security.md (optional, forward-read) — threat model, sandboxing requirements, anti-cheat considerations for modded game states
|
|
61
|
+
|
|
62
|
+
## Expected Outputs
|
|
63
|
+
- docs/modding-spec.md — mod API surface, packaging format, sandboxing model,
|
|
64
|
+
versioning strategy, content moderation pipeline, and distribution channel
|
|
65
|
+
integration
|
|
66
|
+
|
|
67
|
+
## Quality Criteria
|
|
68
|
+
- (mvp) Mod capability tiers defined: which game systems are moddable (asset replacement, content authoring, scripted logic) with explicit boundaries for each tier
|
|
69
|
+
- (mvp) Packaging format specified: mod manifest schema, directory structure, required metadata (name, version, author, compatibility range, permissions)
|
|
70
|
+
- (mvp) Runtime sandboxing model documented: what mods can and cannot access (filesystem, network, memory), resource limits (CPU time, memory allocation), and failure isolation (one mod crash does not crash the game)
|
|
71
|
+
- (mvp) Mod loading and conflict resolution: load order management, asset override priority, incompatible mod detection, graceful degradation when mods fail validation
|
|
72
|
+
- (mvp) Distribution channel integration for at least one channel: Steam Workshop, mod.io, or local file-based sideloading
|
|
73
|
+
- (deep) Versioning and compatibility strategy: semantic versioning for mod API, compatibility matrix (which game versions support which mod API versions), migration tooling for mod authors when API breaks
|
|
74
|
+
- (deep) Content moderation pipeline: automated scanning (file type validation, size limits, known-malware signatures), community reporting, manual review queue, takedown process
|
|
75
|
+
- (deep) Platform certification analysis: which modding features are permitted per platform (PC unrestricted, console UGC requires certification-compliant moderation, mobile requires app store policy compliance)
|
|
76
|
+
- (deep) Mod development toolkit: editor tools, debugging support, documentation generation, sample mods, mod template scaffolding
|
|
77
|
+
- (deep) Multiplayer mod compatibility: mod-matching in matchmaking (only connect players with identical mod sets), server-authoritative mod validation, anti-cheat interaction with modded game states
|
|
78
|
+
|
|
79
|
+
## Methodology Scaling
|
|
80
|
+
- **deep**: Full modding specification covering all three capability tiers,
|
|
81
|
+
comprehensive sandboxing with capability-based permissions, multi-channel
|
|
82
|
+
distribution, content moderation pipeline, platform certification analysis,
|
|
83
|
+
versioning strategy with migration tooling, mod development toolkit, and
|
|
84
|
+
multiplayer mod compatibility. 15-25 pages.
|
|
85
|
+
- **mvp**: Mod capability tiers, packaging format, basic sandboxing, single
|
|
86
|
+
distribution channel, and load-order conflict resolution. 4-8 pages.
|
|
87
|
+
- **custom:depth(1-5)**:
|
|
88
|
+
- Depth 1: asset replacement tier only with local file-based sideloading.
|
|
89
|
+
- Depth 2: add content authoring tier with packaging format and manifest schema.
|
|
90
|
+
- Depth 3: add scripted mod tier with sandboxing model, conflict resolution, and second distribution channel.
|
|
91
|
+
- Depth 4: add content moderation pipeline, versioning strategy, platform certification analysis, and mod development toolkit.
|
|
92
|
+
- Depth 5: full specification with multiplayer mod compatibility, automated mod testing infrastructure, mod analytics (install rates, crash rates, popularity), and community curation tools.
|
|
93
|
+
|
|
94
|
+
## Mode Detection
|
|
95
|
+
Check for docs/modding-spec.md. If it exists, operate in update mode: read
|
|
96
|
+
existing modding spec and diff against current system architecture and GDD
|
|
97
|
+
modding requirements. Preserve existing API surface definitions, packaging
|
|
98
|
+
format, and distribution channel integrations. Update sandboxing model if
|
|
99
|
+
security requirements changed. Add new capability tiers if GDD expanded
|
|
100
|
+
moddable systems.
|
|
101
|
+
|
|
102
|
+
## Update Mode Specifics
|
|
103
|
+
- **Detect prior artifact**: docs/modding-spec.md exists
|
|
104
|
+
- **Preserve**: mod API surface definitions, packaging format and manifest
|
|
105
|
+
schema, sandboxing model, distribution channel integrations, versioning
|
|
106
|
+
strategy, content moderation pipeline
|
|
107
|
+
- **Triggers for update**: system architecture changed asset loading or
|
|
108
|
+
scripting runtime, GDD expanded or narrowed moddable systems, security
|
|
109
|
+
requirements changed sandboxing constraints, target platforms changed
|
|
110
|
+
(affects platform certification analysis), distribution channel added or
|
|
111
|
+
removed
|
|
112
|
+
- **Conflict resolution**: if platform certification requirements conflict
|
|
113
|
+
with desired modding features (e.g., console prohibiting scripted mods),
|
|
114
|
+
document the per-platform capability matrix explicitly — never silently
|
|
115
|
+
reduce PC modding capability to match console restrictions; instead, define
|
|
116
|
+
platform-specific mod capability tiers with clear feature parity documentation
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: online-services-spec
|
|
3
|
+
description: Specify identity/auth, leaderboards, matchmaking, entitlements, remote config, moderation, and cloud save
|
|
4
|
+
summary: "Specifies online service infrastructure — identity and authentication, leaderboards, matchmaking, entitlements and DLC, remote config, content moderation, and cloud save — bridging system architecture with platform-specific service requirements."
|
|
5
|
+
phase: "specification"
|
|
6
|
+
order: 871
|
|
7
|
+
dependencies: [system-architecture]
|
|
8
|
+
outputs: [docs/online-services-spec.md]
|
|
9
|
+
conditional: "if-needed"
|
|
10
|
+
reads: [game-design-document, netcode-spec]
|
|
11
|
+
knowledge-base: [game-networking, game-liveops-analytics]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
Specify the online services layer that sits between the game client and backend
|
|
16
|
+
infrastructure. Online services are the platform-facing systems that handle
|
|
17
|
+
player identity, persistent state, social features, and content delivery —
|
|
18
|
+
distinct from the netcode layer (which handles real-time gameplay
|
|
19
|
+
synchronization) and the economy layer (which handles virtual currency and
|
|
20
|
+
progression).
|
|
21
|
+
|
|
22
|
+
Every online service has platform-specific requirements: Xbox Live, PlayStation
|
|
23
|
+
Network, Steam, Epic Online Services, Apple Game Center, and Google Play Games
|
|
24
|
+
each have mandatory integration points for identity, achievements, entitlements,
|
|
25
|
+
and cloud saves. Abstracting these behind a unified service layer prevents
|
|
26
|
+
platform-specific code from spreading throughout the game codebase.
|
|
27
|
+
|
|
28
|
+
This specification covers: identity and authentication (platform SSO, cross-play
|
|
29
|
+
identity linking), leaderboards (submission, anti-cheat validation, seasonal
|
|
30
|
+
resets), matchmaking (skill-based, region-based, queue management), entitlements
|
|
31
|
+
and DLC (purchase verification, content unlocking), remote configuration
|
|
32
|
+
(feature flags, A/B testing, live tuning), content moderation (chat filtering,
|
|
33
|
+
reporting, sanctions), and cloud save (conflict resolution, migration).
|
|
34
|
+
|
|
35
|
+
## Conditional Evaluation
|
|
36
|
+
Enable when: the game requires any online service beyond local storage — online
|
|
37
|
+
multiplayer, leaderboards, cloud saves, in-app purchases requiring server
|
|
38
|
+
verification, remote configuration, or any feature requiring server
|
|
39
|
+
communication outside of real-time gameplay.
|
|
40
|
+
|
|
41
|
+
Skip when: the game is entirely offline with no online features — no
|
|
42
|
+
leaderboards, no cloud saves, no server-verified purchases, no remote config.
|
|
43
|
+
Games using only local save files and platform-native achievement systems
|
|
44
|
+
(which are handled by platform SDKs without custom backend) do not need this
|
|
45
|
+
specification.
|
|
46
|
+
|
|
47
|
+
## Inputs
|
|
48
|
+
- docs/system-architecture.md (required) — backend service boundaries and data flow
|
|
49
|
+
- docs/plan.md (required) — target platforms informing platform-specific service requirements
|
|
50
|
+
- docs/game-design.md (optional, forward-read) — multiplayer modes, social features, progression requiring persistence
|
|
51
|
+
- docs/netcode-spec.md (optional, forward-read) — matchmaking requirements, session management, connection lifecycle
|
|
52
|
+
|
|
53
|
+
## Expected Outputs
|
|
54
|
+
- docs/online-services-spec.md — service specifications for identity, leaderboards,
|
|
55
|
+
matchmaking, entitlements, remote config, moderation, and cloud save
|
|
56
|
+
|
|
57
|
+
## Quality Criteria
|
|
58
|
+
- (mvp) Identity and authentication flow documented: platform SSO integration per target platform, session token lifecycle, guest-to-account upgrade path
|
|
59
|
+
- (mvp) Every online service specifies: API contract (request/response), failure modes and fallback behavior, data ownership and retention policy
|
|
60
|
+
- (mvp) Cloud save strategy documented: save format, conflict resolution (last-write-wins, merge, user-choice), platform-specific cloud save API mapping
|
|
61
|
+
- (mvp) Entitlement verification flow documented: purchase validation, content unlocking, receipt verification per platform
|
|
62
|
+
- (deep) Leaderboard specification: submission validation (anti-cheat checks before write), ranking algorithm, seasonal reset strategy, regional vs global boards
|
|
63
|
+
- (deep) Matchmaking specification: skill rating system (Elo, Glicko-2, TrueSkill), queue management, region selection, party handling, backfill strategy
|
|
64
|
+
- (deep) Remote configuration specification: feature flag schema, A/B test segmentation, rollout strategy, emergency kill switches
|
|
65
|
+
- (deep) Content moderation specification: text filtering (blocklist + ML classification), player reporting workflow, sanction tiers (warning, mute, temp ban, permanent ban), appeal process
|
|
66
|
+
- (deep) Cross-play identity linking: account merging strategy, entitlement portability, platform TOS compliance for cross-platform purchases
|
|
67
|
+
- (deep) Service degradation strategy: graceful fallback when individual services are unavailable (offline mode, cached leaderboards, local save fallback)
|
|
68
|
+
|
|
69
|
+
## Methodology Scaling
|
|
70
|
+
- **deep**: Full online services specification covering all seven service
|
|
71
|
+
domains with platform-specific integration details, failure mode analysis,
|
|
72
|
+
cross-play considerations, moderation pipeline, and service degradation
|
|
73
|
+
strategy. 15-25 pages.
|
|
74
|
+
- **mvp**: Identity/auth, cloud save, and entitlement verification for primary
|
|
75
|
+
platform. 4-8 pages.
|
|
76
|
+
- **custom:depth(1-5)**:
|
|
77
|
+
- Depth 1: identity/auth flow and cloud save strategy for primary platform only.
|
|
78
|
+
- Depth 2: add entitlement verification and basic leaderboard submission.
|
|
79
|
+
- Depth 3: add matchmaking specification, remote config, and multi-platform identity mapping.
|
|
80
|
+
- Depth 4: add content moderation pipeline, cross-play identity linking, and service degradation strategy.
|
|
81
|
+
- Depth 5: full specification with A/B testing infrastructure, analytics event taxonomy for online services, and platform certification compliance checklist.
|
|
82
|
+
|
|
83
|
+
## Mode Detection
|
|
84
|
+
Check for docs/online-services-spec.md. If it exists, operate in update mode:
|
|
85
|
+
read existing spec and diff against current system architecture and platform
|
|
86
|
+
targets. Preserve existing service API contracts, identity flows, and cloud
|
|
87
|
+
save strategy. Update matchmaking if netcode-spec changed session management.
|
|
88
|
+
Add services for new platforms added to target list.
|
|
89
|
+
|
|
90
|
+
## Update Mode Specifics
|
|
91
|
+
- **Detect prior artifact**: docs/online-services-spec.md exists
|
|
92
|
+
- **Preserve**: identity/auth flow, cloud save conflict resolution strategy,
|
|
93
|
+
entitlement verification flow, leaderboard ranking algorithm, matchmaking
|
|
94
|
+
skill rating system, moderation sanction tiers
|
|
95
|
+
- **Triggers for update**: system architecture changed backend service
|
|
96
|
+
boundaries, target platforms changed (new platform requires new SSO
|
|
97
|
+
integration), netcode-spec changed matchmaking or session management,
|
|
98
|
+
GDD added social features or new online modes, economy-design added
|
|
99
|
+
server-verified purchases
|
|
100
|
+
- **Conflict resolution**: if platform requirements conflict across target
|
|
101
|
+
platforms (e.g., different cloud save APIs with incompatible merge
|
|
102
|
+
strategies), document the conflict and propose an abstraction layer that
|
|
103
|
+
accommodates all platforms; never implement platform-specific behavior
|
|
104
|
+
without the abstraction boundary
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-economy
|
|
3
|
+
description: Review economy design for inflation trajectories, exploit vectors, ethical monetization, and legal compliance
|
|
4
|
+
summary: "Multi-pass review of economy design checking inflation/deflation trajectories, exploit vectors, ethical monetization compliance, pay-to-win detection, legal compliance per market, progression-monetization separation, and live-service sustainability."
|
|
5
|
+
phase: "specification"
|
|
6
|
+
order: 869
|
|
7
|
+
dependencies: [economy-design]
|
|
8
|
+
outputs: [docs/reviews/specification-review-economy.md]
|
|
9
|
+
conditional: "if-needed"
|
|
10
|
+
reads: [game-design-document]
|
|
11
|
+
knowledge-base: [review-game-economy, review-step-template, multi-model-review-dispatch]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
Multi-pass review of the economy design targeting economy-specific failure modes:
|
|
16
|
+
unchecked inflation or deflation trajectories, exploitable currency conversion
|
|
17
|
+
paths, predatory monetization patterns, pay-to-win competitive advantages,
|
|
18
|
+
legal non-compliance per target market, broken progression-monetization
|
|
19
|
+
separation, and unsustainable live-service economy plans.
|
|
20
|
+
|
|
21
|
+
Economy bugs discovered in live service cost orders of magnitude more to fix
|
|
22
|
+
than those caught at design time — a duplication exploit discovered post-launch
|
|
23
|
+
can destroy an economy in hours, and rebalancing a live economy with real-money
|
|
24
|
+
purchases has legal implications. This review catches these failures before
|
|
25
|
+
implementation begins.
|
|
26
|
+
|
|
27
|
+
At depth 4+, dispatches to external AI models (Codex, Gemini) for
|
|
28
|
+
independent review validation.
|
|
29
|
+
|
|
30
|
+
## Conditional Evaluation
|
|
31
|
+
Enable when: economy-design is enabled (i.e., the game has virtual currencies,
|
|
32
|
+
resource systems, loot tables, or monetization mechanics). If economy-design
|
|
33
|
+
runs, this review must follow it.
|
|
34
|
+
|
|
35
|
+
Skip when: economy-design is skipped (i.e., the game has no resource economy).
|
|
36
|
+
No economy design means no economy review.
|
|
37
|
+
|
|
38
|
+
## Inputs
|
|
39
|
+
- docs/economy-design.md (required) — economy specification to review
|
|
40
|
+
- docs/game-design.md (required) — core loop and progression mechanics for cross-reference
|
|
41
|
+
- docs/plan.md (required) — target markets and business model for legal compliance verification
|
|
42
|
+
|
|
43
|
+
## Expected Outputs
|
|
44
|
+
- docs/reviews/specification-review-economy.md — findings and resolution log
|
|
45
|
+
- docs/economy-design.md — updated with fixes
|
|
46
|
+
- docs/reviews/economy/review-summary.md (depth 4+) — multi-model review synthesis
|
|
47
|
+
- docs/reviews/economy/codex-review.json (depth 4+, if available) — raw Codex findings
|
|
48
|
+
- docs/reviews/economy/gemini-review.json (depth 4+, if available) — raw Gemini findings
|
|
49
|
+
|
|
50
|
+
## Quality Criteria
|
|
51
|
+
- (mvp) Inflation/deflation trajectory verified: currency generation and removal rates produce a stable or managed economy over the player lifecycle
|
|
52
|
+
- (mvp) Exploit vectors audited: duplication, overflow, conversion rate manipulation, and timing exploits identified and mitigated at design level
|
|
53
|
+
- (mvp) Ethical monetization verified: no pay-to-win advantages in PvP contexts, spending limit awareness mechanisms present, no predatory patterns targeting vulnerable players
|
|
54
|
+
- (mvp) Every finding categorized P0-P3 with specific section and issue. Severity definitions: P0 = Breaks downstream work. P1 = Prevents quality milestone. P2 = Known tech debt. P3 = Polish.
|
|
55
|
+
- (mvp) Fix plan documented for all P0/P1 findings; fixes applied to economy-design.md and re-validated
|
|
56
|
+
- (deep) Legal compliance verified per target market: probability disclosure, age-gating, spending limits, loot box classification
|
|
57
|
+
- (deep) Progression-monetization separation verified: removing all real-money paths leaves a satisfying progression experience
|
|
58
|
+
- (deep) Live-service sustainability checked: seasonal economy additions do not compound inflation, event currencies have clear expiration or conversion paths
|
|
59
|
+
- (deep) Economy simulation formulas verified for mathematical consistency (no negative balances, no infinite loops, no unreachable milestones)
|
|
60
|
+
- (mvp) Review report includes explicit Readiness Status section
|
|
61
|
+
- (mvp) Downstream readiness confirmed — no unresolved P0 or P1 findings remain
|
|
62
|
+
- (depth 4+) Multi-model findings synthesized: Consensus, Majority, or Divergent with user escalation
|
|
63
|
+
|
|
64
|
+
## Methodology Scaling
|
|
65
|
+
- **deep**: All 7 review passes (Inflation Trajectory, Exploit Vectors,
|
|
66
|
+
Ethical Monetization, Pay-to-Win Detection, Legal Compliance,
|
|
67
|
+
Earn Rate vs Engagement Projection, Sink Effectiveness Analysis).
|
|
68
|
+
Multi-model review dispatched to Codex and Gemini if available, with
|
|
69
|
+
graceful fallback to Claude-only enhanced review.
|
|
70
|
+
- **mvp**: Three passes — Inflation Trajectory, Exploit Vectors, and Ethical
|
|
71
|
+
Monetization only.
|
|
72
|
+
- **custom:depth(1-5)**:
|
|
73
|
+
- Depth 1: two passes — Inflation Trajectory and Exploit Vectors only.
|
|
74
|
+
- Depth 2: three passes — add Ethical Monetization compliance.
|
|
75
|
+
- Depth 3: five passes — add Pay-to-Win Detection and Legal Compliance.
|
|
76
|
+
- Depth 4: all 7 passes + one external model (if CLI available).
|
|
77
|
+
- Depth 5: all 7 passes + multi-model with reconciliation.
|
|
78
|
+
|
|
79
|
+
## Mode Detection
|
|
80
|
+
Re-review mode if previous review exists. If multi-model review artifacts exist
|
|
81
|
+
under docs/reviews/economy/, preserve prior findings still valid.
|
|
82
|
+
|
|
83
|
+
## Update Mode Specifics
|
|
84
|
+
- **Detect**: `docs/reviews/specification-review-economy.md` exists with tracking comment
|
|
85
|
+
- **Preserve**: prior findings still valid, resolution decisions, multi-model review artifacts
|
|
86
|
+
- **Triggers**: upstream artifact changed since last review (compare tracking comment dates)
|
|
87
|
+
- **Conflict resolution**: previously resolved findings reappearing = regression; flag and re-evaluate
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-game-ui
|
|
3
|
+
description: Review game UI specification for completeness, accessibility coverage, and controller navigation
|
|
4
|
+
summary: "Multi-pass review of game UI spec checking HUD clarity, menu completeness, controller accessibility, settings coverage, FTUE effectiveness, state machine completeness, and platform shell compliance."
|
|
5
|
+
phase: "specification"
|
|
6
|
+
order: 864
|
|
7
|
+
dependencies: [game-ui-spec]
|
|
8
|
+
outputs: [docs/reviews/specification-review-game-ui.md]
|
|
9
|
+
conditional: null
|
|
10
|
+
reads: [game-design-document, game-accessibility, input-controls-spec]
|
|
11
|
+
knowledge-base: [review-game-ui, game-accessibility, review-step-template, multi-model-review-dispatch]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
Review the game UI specification for completeness, accessibility compliance,
|
|
16
|
+
and controller navigation coverage. This is a multi-pass review targeting
|
|
17
|
+
game-UI-specific failure modes: HUD information overload, incomplete menu
|
|
18
|
+
hierarchies, missing controller navigation paths, inadequate settings coverage,
|
|
19
|
+
ineffective FTUE design, incomplete UI state machines, and platform shell
|
|
20
|
+
non-compliance.
|
|
21
|
+
|
|
22
|
+
At depth 4+, dispatches to external AI models (Codex, Gemini) for
|
|
23
|
+
independent review validation.
|
|
24
|
+
|
|
25
|
+
## Inputs
|
|
26
|
+
- docs/game-ui-spec.md (required) — spec to review
|
|
27
|
+
- docs/game-design.md (required) — for mechanic-to-HUD coverage verification
|
|
28
|
+
- docs/game-accessibility.md (required) — for accessibility requirement compliance
|
|
29
|
+
- docs/input-controls-spec.md (required) — for controller navigation consistency
|
|
30
|
+
|
|
31
|
+
## Expected Outputs
|
|
32
|
+
- docs/reviews/specification-review-game-ui.md — findings and resolution log
|
|
33
|
+
- docs/game-ui-spec.md — updated with fixes
|
|
34
|
+
- docs/reviews/game-ui/review-summary.md (depth 4+) — multi-model review synthesis
|
|
35
|
+
- docs/reviews/game-ui/codex-review.json (depth 4+, if available) — raw Codex findings
|
|
36
|
+
- docs/reviews/game-ui/gemini-review.json (depth 4+, if available) — raw Gemini findings
|
|
37
|
+
|
|
38
|
+
## Quality Criteria
|
|
39
|
+
- (mvp) Every GDD mechanic with player-visible feedback has a corresponding HUD element or UI flow
|
|
40
|
+
- (mvp) Controller navigation verified: every menu screen is reachable and has defined focus order
|
|
41
|
+
- (mvp) Accessibility requirements from game-accessibility.md are reflected in UI spec (colorblind palette, font scaling, subtitle rendering)
|
|
42
|
+
- (mvp) Settings screen covers all five minimum categories (gameplay, video, audio, controls, accessibility)
|
|
43
|
+
- (mvp) Every finding categorized P0-P3 with specific screen, element, and issue
|
|
44
|
+
- (mvp) Fix plan documented for all P0/P1 findings; fixes applied to game-ui-spec.md and re-validated
|
|
45
|
+
- (deep) FTUE teaches all core loop mechanics — no mechanic requires undocumented player discovery
|
|
46
|
+
- (deep) UI state machines cover all transitions (no orphaned states, no missing error/disconnect states)
|
|
47
|
+
- (deep) Platform shell compliance verified (console certification UI requirements)
|
|
48
|
+
- (mvp) Review report includes explicit Readiness Status section
|
|
49
|
+
- (mvp) Downstream readiness confirmed — no unresolved P0 or P1 findings remain
|
|
50
|
+
- (depth 4+) Multi-model findings synthesized: Consensus, Majority, or Divergent with user escalation
|
|
51
|
+
|
|
52
|
+
## Methodology Scaling
|
|
53
|
+
- **deep**: Full multi-pass review covering HUD clarity, menu completeness,
|
|
54
|
+
controller navigation, accessibility compliance, FTUE effectiveness, state
|
|
55
|
+
machine completeness, and platform shell compliance. Multi-model review
|
|
56
|
+
dispatched if available.
|
|
57
|
+
- **mvp**: HUD coverage and controller navigation pass only.
|
|
58
|
+
- **custom:depth(1-5)**:
|
|
59
|
+
- Depth 1: two passes — HUD-to-mechanic coverage and controller navigation reachability.
|
|
60
|
+
- Depth 2: four passes — add settings completeness and accessibility compliance.
|
|
61
|
+
- Depth 3: six passes — add FTUE effectiveness and UI state machine completeness.
|
|
62
|
+
- Depth 4: all 7 passes (add platform shell compliance) + one external model (if CLI available).
|
|
63
|
+
- Depth 5: all 7 passes + multi-model review with reconciliation.
|
|
64
|
+
|
|
65
|
+
## Mode Detection
|
|
66
|
+
Re-review mode if previous review exists. If multi-model review artifacts exist
|
|
67
|
+
under docs/reviews/game-ui/, preserve prior findings still valid.
|
|
68
|
+
|
|
69
|
+
## Update Mode Specifics
|
|
70
|
+
- **Detect**: `docs/reviews/specification-review-game-ui.md` exists with tracking comment
|
|
71
|
+
- **Preserve**: prior findings still valid, resolution decisions, multi-model review artifacts
|
|
72
|
+
- **Triggers**: upstream artifact changed since last review (compare tracking comment dates)
|
|
73
|
+
- **Conflict resolution**: previously resolved findings reappearing = regression; flag and re-evaluate
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: save-system-spec
|
|
3
|
+
description: Specify persistence strategy, serialization format, save slots, cloud save, corruption detection, anti-tamper, and migration
|
|
4
|
+
summary: "Specifies the save system — what data is persisted (adapts by persistence level), serialization format, save slot management, cloud save per platform, auto-save strategy, corruption detection and recovery, anti-tamper measures, and save format migration strategy for patches and DLC."
|
|
5
|
+
phase: "specification"
|
|
6
|
+
order: 873
|
|
7
|
+
dependencies: [system-architecture, domain-modeling]
|
|
8
|
+
outputs: [docs/save-system-spec.md]
|
|
9
|
+
conditional: "if-needed"
|
|
10
|
+
reads: [economy-design, narrative-bible]
|
|
11
|
+
knowledge-base: [game-save-systems]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
Specify the save system — the persistence layer that captures, stores,
|
|
16
|
+
restores, and migrates player state across sessions. The save system sits at
|
|
17
|
+
the intersection of gameplay design (what matters enough to persist), engine
|
|
18
|
+
architecture (when and how to serialize), platform requirements (cloud save
|
|
19
|
+
APIs, storage quotas), and security (anti-tamper for competitive or economy-
|
|
20
|
+
critical data).
|
|
21
|
+
|
|
22
|
+
Save system design decisions cascade widely. The serialization format affects
|
|
23
|
+
load times and save file size. The persistence granularity affects what players
|
|
24
|
+
lose on crash vs. what they can exploit via save-scumming. The migration
|
|
25
|
+
strategy determines whether patches and DLC can ship without corrupting
|
|
26
|
+
existing saves. Cloud save conflict resolution determines whether players lose
|
|
27
|
+
progress when switching devices.
|
|
28
|
+
|
|
29
|
+
Three persistence levels exist, each requiring different engineering depth:
|
|
30
|
+
|
|
31
|
+
1. **Minimal persistence**: Settings, preferences, and high scores only. No
|
|
32
|
+
gameplay state survives between sessions beyond configuration.
|
|
33
|
+
2. **Session persistence**: Game progress is saved at checkpoints or manual
|
|
34
|
+
save points. The canonical model for single-player narrative and campaign
|
|
35
|
+
games.
|
|
36
|
+
3. **Continuous persistence**: Game state is persisted in near-real-time
|
|
37
|
+
(auto-save, server-authoritative state). Required for live-service games,
|
|
38
|
+
MMOs, and games where progress loss is unacceptable.
|
|
39
|
+
|
|
40
|
+
This specification adapts its depth to the project's persistence level — a
|
|
41
|
+
minimal-persistence game needs a settings serializer, not a cloud save
|
|
42
|
+
conflict resolution strategy.
|
|
43
|
+
|
|
44
|
+
## Conditional Evaluation
|
|
45
|
+
Enable when: the project config indicates persistence is not `none` — the
|
|
46
|
+
game saves any player state between sessions, whether settings, progress,
|
|
47
|
+
inventory, narrative choices, world state, or any data that must survive
|
|
48
|
+
application exit and relaunch.
|
|
49
|
+
|
|
50
|
+
Skip when: persistence is `none` — the game is entirely session-based with no
|
|
51
|
+
state carried between launches. Pure arcade games, party games with no
|
|
52
|
+
unlock systems, and ephemeral multiplayer-only experiences with server-
|
|
53
|
+
authoritative state (no client save) do not need a save system specification.
|
|
54
|
+
|
|
55
|
+
## Inputs
|
|
56
|
+
- docs/system-architecture.md (required) — data flow, storage layer, serialization strategy, platform abstraction
|
|
57
|
+
- docs/domain-models/ (required) — entity definitions, relationships, and state that must be persisted
|
|
58
|
+
- docs/plan.md (required) — target platforms informing cloud save APIs and storage quotas
|
|
59
|
+
- docs/economy-design.md (optional, forward-read) — currency balances, inventory, transaction history requiring tamper-resistant persistence
|
|
60
|
+
- docs/narrative-bible.md (optional, forward-read) — narrative state, branching flags, relationship values, quest progress requiring persistence
|
|
61
|
+
|
|
62
|
+
## Expected Outputs
|
|
63
|
+
- docs/save-system-spec.md — persistence scope, serialization format, save slot
|
|
64
|
+
management, cloud save integration, auto-save strategy, corruption detection,
|
|
65
|
+
anti-tamper measures, and migration strategy
|
|
66
|
+
|
|
67
|
+
## Quality Criteria
|
|
68
|
+
- (mvp) Persistence scope defined: explicit list of what is saved (player progress, inventory, settings, world state) and what is not saved (transient visual state, cached data, derived values) with rationale for each exclusion
|
|
69
|
+
- (mvp) Serialization format specified: binary vs text (JSON, MessagePack, FlatBuffers, custom), versioning header, compression strategy, target save file size budget
|
|
70
|
+
- (mvp) Save slot management: number of slots (or slotless), slot metadata (timestamp, playtime, thumbnail, location), manual save vs auto-save slot allocation
|
|
71
|
+
- (mvp) Auto-save strategy: trigger conditions (checkpoint reached, zone transition, timer interval), player notification, performance budget for serialization (max frame time impact)
|
|
72
|
+
- (mvp) Corruption detection: checksum or hash validation on load, recovery strategy (fall back to previous save, partial recovery, notify player), write-ahead or atomic write to prevent partial-write corruption
|
|
73
|
+
- (deep) Cloud save integration per platform: Steam Cloud, PlayStation Plus Cloud, Xbox Cloud Saves, iCloud, Google Play saved games — API mapping, conflict resolution strategy (last-write-wins, merge, user-choice), quota management
|
|
74
|
+
- (deep) Anti-tamper measures: signed save files for economy-critical or competitive data, server-side validation for live-service games, tamper detection response (flag vs reject vs re-sync)
|
|
75
|
+
- (deep) Save format migration strategy: version field in save header, forward-compatible schema design, migration functions per version increment, rollback plan if migration fails, DLC-aware save extension (new fields without breaking base game saves)
|
|
76
|
+
- (deep) Performance profiling: serialization/deserialization benchmarks per platform, async save to prevent hitching, memory budget for save buffers, streaming save for large world states
|
|
77
|
+
- (deep) Platform certification compliance: required save behaviors per platform (PS5 Activities integration, Xbox Quick Resume state, Switch suspend/resume), mandatory user-facing save indicators
|
|
78
|
+
|
|
79
|
+
## Methodology Scaling
|
|
80
|
+
- **deep**: Full save system specification covering persistence scope analysis,
|
|
81
|
+
serialization format with benchmarks, save slot management, cloud save per
|
|
82
|
+
platform with conflict resolution, auto-save with performance profiling,
|
|
83
|
+
corruption detection and recovery, anti-tamper for competitive/economy data,
|
|
84
|
+
migration strategy with DLC awareness, and platform certification compliance.
|
|
85
|
+
15-25 pages.
|
|
86
|
+
- **mvp**: Persistence scope, serialization format, save slots, auto-save
|
|
87
|
+
strategy, and corruption detection. 4-8 pages.
|
|
88
|
+
- **custom:depth(1-5)**:
|
|
89
|
+
- Depth 1: persistence scope and serialization format only (settings and minimal state).
|
|
90
|
+
- Depth 2: add save slot management, auto-save strategy, and basic corruption detection.
|
|
91
|
+
- Depth 3: add cloud save for primary platform, anti-tamper for economy data, and save format versioning.
|
|
92
|
+
- Depth 4: add multi-platform cloud save with conflict resolution, migration strategy with DLC awareness, and performance profiling.
|
|
93
|
+
- Depth 5: full specification with platform certification compliance, save analytics (save frequency, corruption rates, cloud sync failures), automated save system testing framework, and save-game replay for debugging.
|
|
94
|
+
|
|
95
|
+
## Mode Detection
|
|
96
|
+
Check for docs/save-system-spec.md. If it exists, operate in update mode:
|
|
97
|
+
read existing spec and diff against current domain model and system
|
|
98
|
+
architecture. Preserve existing serialization format, save slot structure,
|
|
99
|
+
and cloud save strategy. Update persistence scope if domain model added new
|
|
100
|
+
entities. Update migration strategy if save format version needs incrementing.
|
|
101
|
+
|
|
102
|
+
## Update Mode Specifics
|
|
103
|
+
- **Detect prior artifact**: docs/save-system-spec.md exists
|
|
104
|
+
- **Preserve**: serialization format, save slot structure, cloud save conflict
|
|
105
|
+
resolution strategy, anti-tamper approach, existing migration functions
|
|
106
|
+
- **Triggers for update**: domain model changed entity definitions requiring
|
|
107
|
+
new persisted fields, system architecture changed storage layer or platform
|
|
108
|
+
abstraction, economy-design added new currency types or inventory systems,
|
|
109
|
+
narrative-bible added new branching flags or quest state, target platforms
|
|
110
|
+
changed (new platform requires new cloud save integration)
|
|
111
|
+
- **Conflict resolution**: if domain model changes require new persisted fields
|
|
112
|
+
that would break existing save format, document the migration path explicitly
|
|
113
|
+
— specify the new version number, the migration function from previous
|
|
114
|
+
version, default values for new fields, and the testing strategy for
|
|
115
|
+
migration; never add fields to the save format without incrementing the
|
|
116
|
+
version and providing a migration path
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/adopt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAQ,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/adopt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAQ,MAAM,OAAO,CAAA;AAahD,UAAU,SAAS;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CA+HnE,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import yaml from 'js-yaml';
|
|
3
4
|
import { findProjectRoot } from '../middleware/project-root.js';
|
|
4
5
|
import { resolveOutputMode } from '../middleware/output-mode.js';
|
|
5
6
|
import { createOutputContext } from '../output/context.js';
|
|
@@ -82,6 +83,28 @@ const adoptCommand = {
|
|
|
82
83
|
stateManager.saveState(state);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
86
|
+
// Write detected game config into config.yml
|
|
87
|
+
if (!dryRun && adoptResult.projectType) {
|
|
88
|
+
const configPath = path.join(projectRoot, '.scaffold', 'config.yml');
|
|
89
|
+
let raw = {};
|
|
90
|
+
if (fs.existsSync(configPath)) {
|
|
91
|
+
try {
|
|
92
|
+
const content = fs.readFileSync(configPath, 'utf8');
|
|
93
|
+
const parsed = yaml.load(content);
|
|
94
|
+
if (typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)) {
|
|
95
|
+
raw = parsed;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch { /* start fresh if parse fails */ }
|
|
99
|
+
}
|
|
100
|
+
const project = (raw['project'] ?? {});
|
|
101
|
+
project['projectType'] = adoptResult.projectType;
|
|
102
|
+
if (adoptResult.gameConfig) {
|
|
103
|
+
project['gameConfig'] = adoptResult.gameConfig;
|
|
104
|
+
}
|
|
105
|
+
raw['project'] = project;
|
|
106
|
+
fs.writeFileSync(configPath, yaml.dump(raw), 'utf8');
|
|
107
|
+
}
|
|
85
108
|
const resultData = {
|
|
86
109
|
mode: adoptResult.mode,
|
|
87
110
|
artifacts_found: adoptResult.artifactsFound,
|
|
@@ -89,6 +112,8 @@ const adoptCommand = {
|
|
|
89
112
|
steps_remaining: adoptResult.stepsRemaining,
|
|
90
113
|
methodology: adoptResult.methodology,
|
|
91
114
|
dry_run: dryRun,
|
|
115
|
+
...(adoptResult.projectType && { project_type: adoptResult.projectType }),
|
|
116
|
+
...(adoptResult.gameConfig && { game_config: adoptResult.gameConfig }),
|
|
92
117
|
};
|
|
93
118
|
if (outputMode === 'json') {
|
|
94
119
|
output.result(resultData);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adopt.js","sourceRoot":"","sources":["../../../src/cli/commands/adopt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAWpD,MAAM,YAAY,GAAsD;IACtE,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,yCAAyC;IACnD,OAAO,EAAE,CAAC,KAAoC,EAAE,EAAE;QAChD,OAAO,KAAK;aACT,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,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,GAAG,CAAC,SAAS,CAAC,GAAG,OAAO,CAAA;gBACxB,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAA;YACtD,CAAC;YAED,MAAM,UAAU,GAAG;gBACjB,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,eAAe,EAAE,WAAW,CAAC,cAAc;gBAC3C,eAAe,EAAE,WAAW,CAAC,cAAc;gBAC3C,eAAe,EAAE,WAAW,CAAC,cAAc;gBAC3C,WAAW,EAAE,WAAW,CAAC,WAAW;gBACpC,OAAO,EAAE,MAAM;gBACf,GAAG,CAAC,WAAW,CAAC,WAAW,IAAI,EAAE,YAAY,EAAE,WAAW,CAAC,WAAW,EAAE,CAAC;gBACzE,GAAG,CAAC,WAAW,CAAC,UAAU,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC;aACvE,CAAA;YAED,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;gBAC1B,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;YAC3B,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,OAAO,CACZ,sBAAsB,WAAW,CAAC,cAAc,oBAAoB;oBACpE,GAAG,WAAW,CAAC,cAAc,CAAC,MAAM,kBAAkB,CACvD,CAAA;YACH,CAAC;YAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;gBAAS,CAAC;YACT,WAAW,CAAC,WAAW,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC;CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -226,7 +226,34 @@ describe('adopt command', () => {
|
|
|
226
226
|
expect(mockInitializeState).toHaveBeenCalled();
|
|
227
227
|
expect(exitSpy).toHaveBeenCalledWith(0);
|
|
228
228
|
});
|
|
229
|
-
// Test 6:
|
|
229
|
+
// Test 6: Writes detected game config to config.yml (even when config doesn't exist)
|
|
230
|
+
it('writes projectType and gameConfig to config.yml when game detected', async () => {
|
|
231
|
+
// Create .scaffold/ dir in tmpDir but no config.yml
|
|
232
|
+
const scaffoldDir = path.join(tmpDir, '.scaffold');
|
|
233
|
+
fs.mkdirSync(scaffoldDir, { recursive: true });
|
|
234
|
+
// No state.json either — triggers initializeState path
|
|
235
|
+
mockFindProjectRoot.mockReturnValue(tmpDir);
|
|
236
|
+
mockRunAdoption.mockReturnValue({
|
|
237
|
+
mode: 'brownfield',
|
|
238
|
+
artifactsFound: 1,
|
|
239
|
+
detectedArtifacts: [],
|
|
240
|
+
stepsCompleted: [],
|
|
241
|
+
stepsRemaining: [],
|
|
242
|
+
methodology: 'deep',
|
|
243
|
+
errors: [],
|
|
244
|
+
warnings: [],
|
|
245
|
+
projectType: 'game',
|
|
246
|
+
gameConfig: { engine: 'unity' },
|
|
247
|
+
});
|
|
248
|
+
await adoptCommand.handler(defaultArgv({ 'dry-run': false }));
|
|
249
|
+
const configPath = path.join(scaffoldDir, 'config.yml');
|
|
250
|
+
expect(fs.existsSync(configPath)).toBe(true);
|
|
251
|
+
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
252
|
+
expect(configContent).toContain('projectType: game');
|
|
253
|
+
expect(configContent).toContain('engine: unity');
|
|
254
|
+
expect(exitSpy).toHaveBeenCalledWith(0);
|
|
255
|
+
});
|
|
256
|
+
// Test 7: Marks matched steps as completed in state
|
|
230
257
|
it('marks stepsCompleted in state when state.json exists', async () => {
|
|
231
258
|
// Create .scaffold/state.json in tmpDir so fs.existsSync returns true
|
|
232
259
|
const scaffoldDir = path.join(tmpDir, '.scaffold');
|