Skip to content

feat(ai) Add legibility for AI agents#38

Draft
lightclient wants to merge 2 commits intoBKDaugherty:mainfrom
lightclient:add-ai-assist
Draft

feat(ai) Add legibility for AI agents#38
lightclient wants to merge 2 commits intoBKDaugherty:mainfrom
lightclient:add-ai-assist

Conversation

@lightclient
Copy link
Copy Markdown

This PR adds an AGENT.md and two skills:

  • bevy-tactics: specific instructions to understand the game engine
  • play-test: specific instructions on how to play and verify real game states

To support play-test, the PR adds simple game state tracing via console logs. This gives agents a direct feedback loop to understand the game state and mechanics. Combined with play-test they can "close the loop" and make progress on the original prompt toward the success criteria without intervention.

@lightclient lightclient marked this pull request as draft February 6, 2026 23:24
@lightclient
Copy link
Copy Markdown
Author

You can just close this if you want, just thought you might like to see :)

@BKDaugherty
Copy link
Copy Markdown
Owner

This is super cool

Comment on lines +36 to +42
### 3) Messages for cross-domain decoupling
This repo uses Bevy messages heavily in battle/combat.
- Define messages with `#[derive(Message)]`
- Register in plugin with `app.add_message::<T>()`
- Use `MessageReader<T>` / `MessageWriter<T>` in systems

Use messages when coupling would otherwise cross boundaries (combat↔animation, UI↔action dispatch, projectile↔damage, audio triggers, etc.).
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you didn't write this right? What did you do? Just ask the system to summarize what was up and then put that summary here? Or is this a claude thing?

Comment on lines +94 to +99
## Bevy 0.17 Guidance for This Repo

1. Prefer `add_systems(Schedule, (...))` style already used throughout code.
2. Use modern message APIs (`add_message`, `MessageReader`, `MessageWriter`) consistent with current code.
3. Keep state predicates explicit with `run_if(in_state(...))`.
4. Use observers only where the project already benefits from event-style UI handling (e.g. pointer click handlers).
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol this is interesting. I feel like whenever I've tried to use the ais they always fail to pull in the right context for what version I'm using here.

Interesting to see it call it modern message APIs.

Also Bevy Observers were recently rolled out, but I haven't really figured out how to use them well, (but I feel like I should be using them way more) so it's funny that it was like "no observers plz"

Comment thread src/battle.rs
Comment on lines +640 to +645
/// Logs the cursor's grid position whenever it actually changes, so play-test
/// scripts can verify cursor location via `[CURSOR_POS]` console markers.
///
/// Uses a `Local` to track the last emitted position per player, because
/// `Changed<GridPosition>` fires every frame due to DerefMut in
/// `handle_cursor_movement` even when the position stays the same.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a better way for me to send the GameData to le AIs.

I've been thinking about integrating a lil scripting language to mutate some things at runtime in general. But I imagine that would give them a lot more to go off of

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can see my transcript with the LLM 😆 #38 (comment)

Basically just told it to build these skills and I skimmed them to see if they seemed reasonable. Obviously could do much better if you actually know what the repo is or what the engine is!

@lightclient
Copy link
Copy Markdown
Author

This is every message I gave the LLM to make these PRs:

# Session Transcripts — tactics-exploration

All user messages from pi sessions in this repository.

## Session 1 (16:46) — Setup: skill & AGENTS.md creation

- what game engine does this code base use
- analyze bevy architecture, documentation, and usage. create a skill for this project to use bevy effectively. review the code in this project to see how the maintainer is using bevy, incorporate that into the skill
- create the skill file only for this repository
- will it load automatically in future sessions?
- is it currently loaded
- can you analyze this repository and create a minimal AGENT.md file? make sure it instructs agents to use the bevy skill when preparing code
- do it now

## Session 2 (16:52) — Model questions

- is gpt 5.3 codex a thinking model?
- in pi i'm using gpt 5.3 and it says thinking off. should i turn it on if i'm planning
- how do i turn thinking on

## Session 3 (16:54) — Stun implementation & manual testing

- what statuses can affect a player character currently
- write a prompt to finish the implementation of stun. save it in PROMPT.md. write tests and verify it is correct. follow patterns established with poisoned
- and what does the stun effect do
- why is turn count 3?
- what else is there to implement from PROMPT.md
- is there a poison indicator or reason in menu/log?
- what commit message would you give this changes to src currently?
- why feat(battle) instead of feat(combat)
- how do i open editor to type commit msg
- i want to run this application in browser, what commands will allow me to run it
- do we need git-lfs
- okay i installed it
- getting an error trying to run for browser when i do the build-wasm.sh. how do i fix: wasm-bindgen --no-typescript --target web --out-dir ./out/ --out-name tactics-exploration ./target/wasm32-unknown-unknown/release/tactics-exploration.wasm
- at the join game menu, to select New Player in wasm version, what do i press on keyboard
- how do i "select" though, J isn't selecting
- how can i test stun works
- how do turns work? can you move and attack?
- when i hit the enemy with stun, it seems like they still play their turn
- what is the effect of stun on the enemy?
- what is a turn? is the entire 4 move, 1 AP phase?
- can you save the summary of what was accomplished to SUMMARY.md

## Session 4 (18:29) — Play-test skill development

- can we develop a skill for this project to build the game and play it in the webassembly engine to verify it is working correctly?
- we need to actually play the game and verify the mechanics of the game are working, not just check the rendering of the main page works
- update the skill to first try to get to the battle load screen, by optimistically going through the initial main menu and character creation steps without verifying
- *(invoked play-test skill)*
- *(invoked play-test skill)*
- add a debug log in the console to print the users and enemy position on the grid. then use skill:play-test to verify that stun is working correctly in gameplay
- summarize what you've learned about playing the game and logging in LOGGING.md

## Session 5 (19:18) — Improving log-based testing

- how can we improve the log-based testing so it isn't delayed
- write a prompt to implement these changes in GAMESTATE.md, be sure to use the skill and verify the changes work

## Session 6 (19:22) — Executing gamestate changes

- execute GAMESTATE.md
- update the play-skill to use the new functionality
- now use the play-skill to verify that stun move is working correctly

## Session 7 (19:39) — Cursor/selector debugging

- review GAMESTATE.md, update the doc and the code to also output the current selected location so that during play-test we can see if it matches with the enemy. note in play test that if the selector coordinates match the enemy, then it is safe to attack

## Session 8 (20:11) — Play-test execution

- *(invoked play-test skill)*
- save learnings to LEARNING.md

## Session 9 (20:51) — Event-driven testing cleanup

- review play-skill, GAMESTATE.md, and LEARNING.md. remove all info about wait-based testing in play-skill, make sure it ONLY uses event driven testing. then verify the event driven testing works, DO NOT change game code

## Session 10 (20:53) — Cursor navigation debugging

- review play-skill, GAMESTATE.md, and LEARNING.md. remove all info about wait-based testing in play-skill, make sure it ONLY uses event driven testing. then verify the event driven testing works, DO NOT change game code
- why do you have so much trouble identifying the enemy position and navigating with the cursor?
- add a reliable log of the enemy and player position at the start of the game. figure out how to control the isometric cursor mapping consistently and update the skill with the information

## Session 11 (22:21) — Play-test execution

- *(invoked play-test skill)*

## Session 12 (22:21) — Branch cleanup & PR prep

- *(invoked play-test skill)*
- this branch should not add any new logging code that wasn't in main, it should only be the feature. inspect the changes in this branch and remove any logging code that is still here
- give me a commit title and PR title + summary
- give me a commit title and PR title + summary for this branch to merge to main

## Session 13 (23:04) — Current session

- give me a commit title and PR title + summary for this branch to merge to main
- is feat(battle) correct based on other commits in the project?
- give me a commit title and PR title + summary for this branch to merge to main
- can you give me all sessions transcripts related to this repository? i only want to see the messages that i sent
- give me the list
- transcripts aren't saved from other sessions?
- write this to transcript.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants