r/ClaudeCode • u/palmerden5 • 3d ago
Help/Question Can Claude Code check examples in board game rules without rewriting them?
a turn example in my rules lets a player spend a token they just picked up. the rule for picking up tokens says to keep them for the next turn. both passages read fine on their own, which is why i missed it. for a Claude Code pass over the rules, what do you ask it to report so you can check these conflicts yourself and leave the wording alone?
1
Upvotes
1
u/leo_heo 3d ago
ask for a table instead. each example, the rule it leans on, and whether they actually agree, with line numbers. then you only read the rows marked no
1
u/jayvpk 3d ago
Tell it up front it's a read-only pass and it isn't allowed to edit the file. Then ask it to write every conflict to a separate file, quoting both passages word for word with where they are, plus one line on why they clash. I'd also have it walk through each turn example step by step against the rules, 'cause that's exactly where yours hid. You should read the list and fix the wording yourself.
1
u/mettavestor 2d ago
Another option: ask Claude to turn your rules into a throwaway simulator and run your turn examples through it. Prose can hide contradictions that code has to resolve.
I had a similar bug in my game. Newly recruited units could act immediately, but clearing a tree ended their turn. What happens when you recruit directly onto a tree? Both rules made sense independently.
I'd do the same with your tokens. List every way a player can acquire one and explicitly define when it becomes spendable. And for bonus points ask Claude to list every assumption it had to make while writing the simulator. You'll likely get some good insights that way.
1
u/AutoModerator 3d 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/eagle2809 3d ago
Two things that helped me with this kind of bug: tell it explicitly to not edit anything and only report, and make it trace the examples instead of just reading them. Reading each passage on its own is exactly how you missed it, so Claude will miss it too unless you force it to walk through the state.
Something like: "Don't change the file. First list every rule as a short numbered statement with its line number. Then for each example, go through it step by step and track the game state (what each player holds, what was picked up this turn, etc). Every time an action in the example breaks or isn't covered by a rule, quote both the example line and the rule line side by side and say what they disagree on. Also list any terms that mean different things in different places (like 'next turn'). If an example is fine, say so, so I know it was actually checked."
Then you get a list of quoted pairs and you decide what to fix yourself. I'd also ask it for "assumptions the example makes that no rule states", that's usually where the other bugs are hiding.