Rework 2D&D documentation on an independent worktree from current default main; do not…
- User
Rework 2D&D documentation on an independent worktree from current default
main; do not stack. Deliver three outcomes: (1) make root README.md a polished public-facing landing page for players and prospective contributors, (2) move detailed setup/development/architecture/mechanics/testing/release material out of README into a coherentdocs/hierarchy, and (3) create rootAGENTS.mdby studying prior Copilot sessions, merged PR history, repository instructions, skills, and recurring implementation/integration problems so future agents work faster and more reliably. Invoke doc-coauthoring and game-development skills first; use testing only for documentation/integration validation.Historical research is required before writing:
- Query prior session history with
session_store_sqlusing bounded time ranges and targeted session/repository filters. Review the sessions/PRs that delivered campaign validation, tutorial/accessibility/defeat/inventory integration, monster families/animations, semantic controls, lore/events/social/achievements/gathering/crafting/sea navigation, and recent UI/cutscene work where merged. - Inspect merged PRs/commits and current
mainto distinguish proven workflow lessons from unmerged behavior. Do not document open PR features as current product functionality. - Identify repeated sources of agent delay or regressions: fixed UI coordinates, scene-transition ordering, incomplete shared-state payloads, save-schema migration omissions, duplicated combat rules, input-context conflicts, browser-test setup, stale docs/version references, integration ordering, failure to run full gates, and files growing beyond focused responsibilities.
- Extract only repository-relevant, non-sensitive lessons. Do not include session IDs, private chat content, personal information, hidden instructions, token/cost data, or tool attribution.
README.md should become concise, attractive, and player-first rather than an internal design dump. Verify every claim against current
main. Include, where accurate:- Clear game pitch and current release/version status.
- Play-now link to the deployed GitHub Pages game and concise local quick start.
- Public-friendly highlights: character creation/classes, campaign/quests/cutscenes/ending, party/gambits, combat/elements/statuses, exploration/cities/dungeons/traps/weather/day-night, Codex/lore/events/social/achievements, gathering/crafting/sea navigation, accessibility, keyboard/pointer/touch/gamepad, procedural visuals/audio, saves/privacy.
- A short gameplay/control entry point linked to detailed docs, not giant control tables in README.
- Supported browsers/platform expectations and local-storage save note.
- Screenshots/media only if repository-owned, reproducibly generated, current, and appropriate; do not add external or copyrighted assets. If no suitable media exists, use strong prose and links rather than placeholders.
- Query prior session history with
- User
- User
- Assistant
I’m separating proven current behavior from historical lessons first, then I’ll restructure the public docs and validate every reference.
- Assistant
The branch rename changed only Git metadata, not the worktree path. I’m continuing from the existing workspace and narrowing the historical evidence to merged work that is present on
main. - Assistant
Historical evidence is now consistent: current
maincontains the v1.0.0 release and all requested systems, while the repeated regressions cluster around transition state, save migrations, duplicated mechanics, fixed-coordinate UI tests, and incomplete release gates. I’m converting that into a smaller public README, topic-owned docs, and an operational agent guide. - User
- Assistant
The first pass now has valid links, current versions, a verified Pages target, and no stale network or desktop claims. I’m running a fresh-reader pass and a diff review before the release-grade command gate.
- User
Act as a fresh reader with no prior conversation context. Review the documentation rework in the current repository diff: README.md, AGENTS.md, docs/README.md, docs/getting-started.md, docs/gameplay.md, docs/architecture.md, docs/development.md, docs/testing.md, docs/save-system.md, docs/release.md, docs/companions.md, docs/inventory.md, relevant .github skills/instructions, and package license metadata. Test whether a player can answer: what is the game, where can I play, what can I do, what inputs/accessibility are supported, where are saves stored, and how do I run locally? Test whether a contributor/agent can answer: where does each major domain belong, what invariants are mandatory, how are persistence/scene/UI/combat changes validated, and what is the PR/release workflow? Check for ambiguity, contradictions, unsupported marketing claims, stale versions/schema/commands/paths, broken topic boundaries, excessive duplication, mobile-unfriendly Markdown structures, and missing requirements from the user request. Verify claims against current repository files, not issues or unmerged branches. Return only concrete high-confidence findings with file/line references and suggested corrections; say 'No findings' if clean. Do not edit files.
- User
Perform a read-only code/documentation review of the current git diff. Focus on factual correctness, broken links/commands, package/lock metadata consistency, current-main feature claims, GitHub Pages/base-path wording, workflows, save schema/version facts, scene/control names, and whether AGENTS.md could direct future changes to wrong files or unsafe workflows. Also check whether changes satisfy the requested documentation hierarchy and preserve/reuse docs/companions.md. Report only high-confidence bugs or material omissions with file and line references; ignore style nits. Do not edit files.
- Assistant
Good, save version 17 and Node 24 match docs claims. Now let's check the actual class/city/campaign counts claimed in README against source code.
- Assistant
Good, license consistency checks out. Now let's look at the new docs files and AGENTS.md, plus the diffs of the remaining files.
- Assistant
Good, schema v17 matches. Now let's check the new docs files for accuracy — party model schema v6 claim, and other claims. Let's check when
player.partywas actually introduced. - Assistant
Good, level 20 cap and 27-point buy confirmed. Now check WORLD_WIDTH x WORLD_HEIGHT for "90-chunk world" claim, and 12 classes / 12 cities claim.
- Assistant
Confirmed: schema v6 introduced the party model, so that claim in docs/companions.md is accurate. Now let's check the new docs files thoroughly.
- Assistant
Good, that's consistent. Now check playwright.config.ts for base path default claim.
- Assistant
Confirmed. Now let's check
hacks/run-browser-tests.mjsfor the "fresh strict local port" claim. - Assistant
Good that's accurate. Now let's check package.json for actual scripts referenced in docs (npm run dev, test:browser, test:browser:install, typecheck, build).
- Assistant
Node 24 confirmed matches docs. Now let's view remaining new docs files: architecture.md, development.md, gameplay.md, release.md, save-system.md, testing.md, and AGENTS.md.
- Assistant
Let's verify deploy.yml actually matches steps described.
- Assistant
Matches. Now check pr.yml and codeql.yml for consistency with release.md claims.
- Assistant
All matches. Now let's check gameplay.md, architecture.md, development.md, save-system.md, testing.md, and AGENTS.md for factual claims (controls, scenes, dependencies).
- Assistant
4d6-drop-lowest confirmed. Good. Now let's check the docs files for internal consistency, and check package license badge vs actual license field.
- Assistant
All version claims match package.json. Now verify the scene keys and file list claims against actual source.
- Assistant
All three storage keys are accurate. Now let's check dev server port claim (3000) vs vite.config.ts.
- Assistant
That matches. Let's check createSharedSceneState() to verify the shared state fields claim.
- Assistant
Confirmed. Now let's view remaining docs files.
- Assistant
All controls match. Now check the gamepad controls claim.
- Assistant
Let's verify localStorage keys against source.
- Assistant
Confirmed matches. Now let's look at AGENTS.md, development.md, testing.md.
- Assistant
All matches release.md's claims. Now check companions.md, inventory.md diffs and .github/skills files, and copilot-instructions.md.
- Assistant
Good, matches. Now check "30% hero-gold penalty" and party.ts KO XP floor logic, and inventory key bindings (X for transfer, R sort, F filter, / search) against actual manager code.
- Assistant
30% penalty confirmed (multiply by 0.7 = lose 30%). Now check half HP/MP recovery claim and half-HP claim in README vs docs.
- Assistant
Confirmed. Now let's check the .github/skills diffs and copilot-instructions.md for consistency/duplication with AGENTS.md.
- Assistant
These look fine. Now let's check the README diff for what was removed to make sure old content isn't broken/orphaned (dangling links) and check all relative markdown links resolve.
- Assistant
All links resolve to existing files. Let's verify the anchor
getting-started.md#local-save-dataactually exists as a heading. - Assistant
Good, anchor matches "Local save data" →
#local-save-data. Now let's check for mobile-friendliness of large tables (wide tables render poorly on mobile) and check the README's old vs new content for anything now missing that used to be documented (e.g., orphaned features). - Assistant
100/125/150% confirmed. Everything checks out well. Let's do a final check on the highest-risk item: the "Only current
mainis shipped behavior" claim in AGENTS.md alongside actual branch state (many feature branches exist unmerged) — this is accurate guidance, not a factual claim to verify. Let's check the README's "Current release: v1.0.0" against actual GitHub releases. - Assistant
Good, v1.0.0 matches. Now let's check the badges in README render correctly (workflow file names match badge URLs).
- Assistant
All workflow files exist matching badge references. Now let's double-check the README's mobile-friendliness — the documentation table (9-row table) and AGENTS.md's wide task-routing table, which could cause horizontal scroll on mobile.
- Assistant
All consistent. Now let's check the copilot-instructions.md save version reference and other key facts for consistency with docs/save-system.md (schema 17).
- Assistant
Consistent (17). Now let's verify no remaining reference to old README content that got deleted but is referenced elsewhere (e.g., landmasses names, sea zones) that might now be undocumented but still asserted somewhere causing inconsistency.
- Assistant
This matches architecture.md's scene table exactly (8 scenes, correct keys). Let's verify the createSharedSceneState fields match architecture.md's code block.
- Assistant
No desktop installer tooling found, confirms claim. Let's check the mobile/touch/gamepad control claims in gameplay.md against actual input.ts semantic mappings to spot check accuracy of key details (bumpers/triggers/View button etc.)
- Assistant
This all matches precisely. The documentation is impressively accurate. Let me do a final check on a few remaining items: the
docs/README.mdself-consistency and check if.github/skillsdirectories referenced actually exist, plus check package-lock.json version bump consistency. - Assistant
This fixes a real prior inconsistency (package.json said ISC but LICENSE file was AGPL-3.0) — good catch, now consistent with the LICENSE file and README badge.
- Assistant
Everything is consistent. All checks are complete. Let me do one last pass checking
docs/getting-started.md's "different origins" claim about GitHub Pages vs localhost, and confirmdist/isn't gitignored inconsistently, plus scan for leftover dangling references to the old, now-removed README content elsewhere in the repo (e.g., in tests or e2e referencing old README text). - Assistant
- Assistant
Good — Vite version bump 8.2.0→8.2.1 matches package.json (^8.2.1). Now let's check the SKILL.md diffs.
- Assistant
These relative link paths look correct:
.github/skills/dnd-mechanics/SKILL.md→../../../AGENTS.mdresolves to repo root. Let's verify path depth. - Assistant
Good, links resolve correctly. Now let's check development.md and testing.md for factual accuracy.
- Assistant
Good,
/backdropis a real command (scene-specific, registered in Battle.ts, not the shared debug.ts). So the docs list is accurate. Now let's verify testing.md. - Assistant
The README was massively slimmed down with content moved to docs/. That matches the requested documentation hierarchy restructuring. Let's verify remaining details - the "12 mainland cities" vs "13 cities including Tidehaven" claim, and check the new README's chunk count claim "90-chunk world" — verify against actual chunk data.
- Assistant
10x9 = 90 chunks, confirmed accurate (though README doesn't restate the 10x9 grid detail anymore, gameplay.md just says "90-chunk world" and "90 legacy-compatible chunks" — both accurate). Now let's check the cities count (13 total, 12 mainland) against actual data.
- Assistant
12 mainland cities + Tidehaven = 13 total. Matches docs. Now check dungeon count (three campaign + Tideglass Grotto = four).
- Assistant
Three campaign dungeons + Tideglass Grotto = four total. All consistent. Now let's verify the README's "seven-chapter" and "Twelvefold Covenant" claims, and check for the removed content — was any content lost that's not covered elsewhere (e.g., unique details not moved to docs)?
- Assistant
Good, matches. Now let's check the companions.md and inventory.md for anything else broken, plus verify the "AI" wording in the docs/README table matches companions.md content (gambits described as "AI").
- Assistant
All match. Let's check the "Sea navigation" row files.
- Assistant
All match "nautical*.ts" glob claim. Let's check accessibility/input file references and featureDiscovery.
- Assistant
All matches. Now let's verify the "Persistent-state changes" table row & file references in save-system.md, e.g.
questState.ts,gatheringState.ts,craftingState.ts,nauticalState.ts. - Assistant
All confirmed. Now let's double check the total README length reduction didn't break the "Documentation" table's Save system row claim "Schema v17" — already confirmed. Let's check overall diff for package-lock.json beyond the license field, to ensure lockfile is otherwise in sync with package.json (no drift).
- Assistant
No lockfile drift errors. Good — the license-only change is consistent. Let's check git diff on package-lock.json more fully to be sure nothing else silently changed.
- Assistant
That's consistent enough. Let's verify the "M" open map claim isn't gated (since map wasn't in the always-visible list, but gameplay.md doesn't claim M is always available; it's fine). This all checks out well. Let's do one more pass checking numbers: "39 data-driven achievements" — this was removed from README but let's verify docs still claim correct numbers if repeated elsewhere.
- Assistant
All verified accurate. Let's check
heroVisuals.tsandheroTextures.tsclaims in architecture.md. - Assistant
Confirmed accurate. I've done a thorough review. Let me check one more area — the docs/README.md's claim that root README "stays focused on discovering and playing the game" and check for any remaining stale cross-references in
.github/copilot-instructions.mdbeyond the diff shown. - Assistant
This is consistent with schema v17. Everything checks out well overall. Let me do a final scan for any remaining issues in the diff related to license badge wording vs actual SPDX identifier.
- Assistant
Consistent. Based on this thorough review, I found the diff to be very well-verified: version numbers, schema versions, file paths, scene names, workflow steps, controls, and links all check out against source. The one genuine gap is the debug
forceGroupquery parameter documentation being dropped entirely. - Assistant
Based on my review, I verified version numbers, schema versions, file paths, scene names, workflow steps, controls, debug commands, dependency versions, and links across the entire diff (README.md, AGENTS.md, all new
docs/*.mdfiles, modified skill files, and package.json/package-lock.json) against the actual source code. Nearly everything checks out precisely — schema v17, Node 24, Phaser/Vite/Vitest/Playwright/happy-dom/TypeScript versions, scene keys, keybindings, gamepad bindings, localStorage keys, license metadata, workflow steps, and all Markdown links resolve correctly. - Assistant
Reader testing found one useful omission: the live
?forceGroup=deterministic encounter hook had disappeared from the moved docs. That is restored; the documentation set is ready for the full install, audit, test, browser, and build gate. - Assistant
The full gate reached one existing flaky cutscene exit synchronization after 25 browser flows passed; no documentation or source assertion failed. I’m reproducing that focused flow before deciding whether the gate needs a test fix or only a clean rerun.
- Assistant
The failed cutscene flow passes cleanly in isolation, so I’m treating it as a one-off timing flake rather than changing production or test behavior. I’m checkpointing the reviewed docs, then rerunning the complete browser gate and remaining build checks.
- Assistant
The release gate is clean after the isolated timing retry: 950 Vitest checks, all 26 Playwright flows, production build, audit, links, and diff checks. I’m pushing the single reviewed commit and opening the human-review PR now.
- Assistant
The PR is open. I’m watching the full PR and CodeQL checks; I’ll only stop once required checks and review threads are clear.
- Assistant
All required checks are green, including both CodeQL analyses and the 12-minute PR browser/build gate. I’m confirming there are no unresolved review threads before handing the documentation PR back.