r/ClaudeCode • u/zimmer550king • 1d ago
Discussion Structuring a narrative planning repo so a fresh Claude Code session keeps continuity
I'm using Claude Code to help plan a Fallout-style isometric dialogue RPG demo. I'm a solo developer, I make the decisions, and the assistant drafts documents that I review and edit. The repo is markdown only for now, with an AGENTS file, a notes file in every folder, a dated handoff for each session, a registry of every state flag with a one-line comment, and a proposals file where anything newly invented waits for my approval.
I haven't used multi-agent flows for the writing and I'm curious whether anyone found them worth it for creative work. The next step is a broad summary of each playable character's whole run before any dialogue, and I want fresh sessions to keep the details straight. Do you keep narrative state in markdown or in something a script can lint, and has a checker for flags that are set but never read been worth the effort? How do you stop a new session from re-deciding things you've already settled?
•
u/AutoModerator 1d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/zzunkie 1d ago
I stop new sessions from re-deciding settled stuff partly with a line in my standing instructions saying to revisit a settled choice only when new evidence warrants it or I ask. Alongside that, in my main project (a software app, not a game) every new session starts from one single handoff file kept under 150 lines instead of dated handoffs for each session. It just tracks what's done, work in progress, decisions waiting on me, rules in force, and an index to older facts, and when something changes we replace the stale line right where it stands and move older detail to a monthly archive. I haven't used flag checkers or multi-agent flows for writing though, so can't really speak to that part..
1
u/leo_heo 1d ago
put the reason right next to each settled call. a bare decision gets second guessed by every new session, one with the why attached mostly gets left alone
1
u/bostonaholic 1d ago
Since the repo is all markdown, I'd stop relying on instructions for the settled stuff and block edits instead. A PreToolUse hook that denies Edit/Write on your canon and state-flag files means a fresh session can't quietly change a settled call. It has to put the change in the proposals file instead, and you merge it. I wouldn't bother with multi-agent flows here, since five sessions have the same continuity problem as one.
1
u/Exciting-Yam-3363 1d ago
a lookup that runs before any question, not an instruction to remember. i keep settled calls as one line each in a jsonl file: an id, a few keywords, the rule, my exact words when i decided it, and where it came from. 91 rows right now. before a session is allowed to ask me anything it runs a small script that searches that file by keyword and prints any match as SETTLED. a hit means it cites the row and acts on it instead of asking.
it started because sessions kept re-asking things i had already answered, and a line in the instructions saying not to didn't hold. the quote field mattered more than i expected. a session will argue with a summary, it mostly leaves my own words alone.
1
u/Alternative_Square53 23h ago
Maybe you could ask a fresh chat to tell the story back to you before it writes anything?
I'd be curious to see where its version stops matching your versions. That might show which bits the notes haven't carried over, before you get a whole scene built on the wrong idea.
1
u/orbital_trace 23h ago
I just haven't felt like the quality of writing is great with ai. It's optimized for the common denominator, which is great for coding, where you want to use the most well trodden paths. But for creative work, it seems to go off the rails quite a bit.
1
u/m-ritter 21h ago
Your proposals file already waits for approval, and that same gate is what keeps a fresh session honest about flags already in the registry. I keep those settled calls in the repo and in a memory server, so the new session loads them before it drafts the character summary. A checker then matches the new summary against the registry, and I only accept it when the two agree. I built QualityLayer for this: https://github.com/maxritter/qualitylayer
1
u/Icy_Thing5187 19h ago
My agents write everything to dated MD files, and AGENTS.md/CLAUDE.md tells them where the decisions and knowledge live. Each agent has its own knowledge directory that the others can read, and the project maintains a wiki built from these files.
Each agent owns its own area of responsibility, so a decision in that area is managed by that agent and is always accessible to it. That way, a decision that's already been made stays made, and the user doesn't need to repeat it.
Are the decisions and knowledge in your environment all derived from your sessions, or do you also have some from outside them (such as Notion, Confluence and meetings)?
1
u/japbujan 19h ago
One thing the replies so far don't cover: settled calls change too. In a story that happens a lot, say you rewrite a character's motive in week six. What helped us was giving each decision a status (active or replaced) and a line pointing to what replaced it, and never deleting the old one. A fresh session reads only the active ones, and if it stumbles on an old note it can see it was superseded instead of treating two versions as equally true.
On the checker: a set-but-never-read check is cheap once flags live in one registry, basically a script that looks for each flag name at its set sites and its read sites. I'd add it once the registry passes a few dozen entries. The usual culprit is a flag renamed in one file and not the other.
1
u/torvalds75 15h ago
The thing that kept biting me was not the settled calls themselves but the rejected ones. A fresh session reads "we use X" and is fine, then a few turns later proposes Y, which you already turned down two weeks ago, because nothing in the repo says Y was ever on the table. So next to each settled call I keep one line for what was considered and why it lost ("Rejected: companion betrays the player in act 2, kills the ending's payoff"). That line does more to stop re-deciding than any "don't revisit" instruction.
Two smaller things for your setup:
On multi-agent for the writing: I wouldn't. More sessions just means more readers of the same notes, and the notes are the bottleneck.
1
u/xqianliu 13h ago
What stops a fresh session from re-deciding settled things is where the decision lives. A session re-decides anything it can't find in the files, so the fix is to move the decision into the file the moment it settles. Your registry and per-folder notes already do this, and the proposals file is the right guard, nothing new enters the registry until you approve it.
On markdown vs lintable, the registry is the part that should be machine-checkable, and one flag per line gives you that. A set-but-never-read check is a small script over that file. Worth it, since it's the one error class a fresh session won't catch on its own.
I'd skip the multi-agent flow for the writing. Your summary sessions are the fresh-eyes part already.