Preserve a project's working context during long sessions, so nothing important is lost when the conversation is compacted, summarized or restarted. Keep a living docs/CONTEXT.md (goal, current task, user preferences and rules, decisions, verified facts, open questions, gotchas, IDs and paths), update it at checkpoints (after decisions, before risky steps, every hour, before compaction), keep s...
Download skill (.zip) Files on GitHubGame context preservation
Conversation memory is temporary: long sessions get compacted or summarized, and details vanish (a decision, a user rule, a working command). Write the important things to a file in the project as you go. The handoff (game-session-handoff) is the end-of-session package; this is the running notebook.
docs/CONTEXT.md
# Context (living notes. Update as you work)
_Last updated: 2026-11-28 15:40 · by: Bash bot_
## Goal
Make "Star Hopper" playable on phones and publish to itch.io by Friday.
## Now
Adding touch controls (src/core/touch-controls.js). Next: test on phone size.
## User rules and preferences
- Short replies, plain words. No emoji.
- Blur usernames in screenshots. Use yourname/my-game in docs.
- Ask before pushing to the public itch.io page. Commit to main directly, batch pushes.
## Decisions (newest first)
- 2026-11-28: No double jump: made levels trivial (user agreed). See docs/decisions/0003.
- 2026-11-27: Letterbox 960×540, not expand.
## Verified facts (how verified)
- Deploy Action works: build ef6fe7d live on itch.io (butler status).
- Saves survive corrupt data (save-test.py, all ok).
## Open questions
- [ ] Preview page name for PR previews (waiting on user)
## Gotchas
- Only www/** changes trigger the itch.io deploy.
- The sandbox browser has no GPU: never load the 3D level there.
## IDs, names and paths (no secrets)
- Repo: yourname/my-game · itch game: yourname/star-hopper (html5 channel)
- Server: port 8000 in tmux · Test steps: tests/steps.json
When to update (checkpoints)
- Right after a decision or a new user rule/preference (“don’t do X”, “always Y”).
- Before a risky or long step (force push, refactor, big install, deploy).
- When something is verified (with how), or proven wrong.
- Every ~hour of a long session, and whenever the conversation feels long (compaction is likely soon).
- When the user says “remember…”.
Keep it short. Replace stale lines; don’t append forever. Move finished decisions to the decision records when they’re big.
Never write
Keys, tokens, passwords, webhook URLs, private share links, personal data the user wouldn’t publish. Write where the secret lives instead (“itch.io key: Bash Settings → API keys”).
Universal continuation prompt
Paste into any AI coding tool (Bash, Codex, Claude Code, Cursor) to resume, or put the same text in AGENTS.md:
You are continuing work on this game project. Before doing anything:
1. Read docs/CONTEXT.md, then docs/HANDOFF.md, docs/GDD.md and README.md.
2. Check reality: git status, git log -5, start the game as described, and confirm the "Verified facts" still hold.
3. Follow every item under "User rules and preferences". Don't reopen settled "Decisions" unless asked.
4. Continue from "Now" / the handoff's next step #1. Tell me in one or two lines what you'll do first.
5. Keep docs/CONTEXT.md updated at each checkpoint, and update docs/HANDOFF.md before you stop.
After a compaction or restart
Re-read docs/CONTEXT.md before the next action. If the summary and the file disagree, trust the file (it was written at the time)
and check the code.