feat(ai) Add legibility for AI agents#38
feat(ai) Add legibility for AI agents#38lightclient wants to merge 2 commits intoBKDaugherty:mainfrom
Conversation
|
You can just close this if you want, just thought you might like to see :) |
|
This is super cool |
| ### 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.). |
There was a problem hiding this comment.
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?
| ## 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). |
There was a problem hiding this comment.
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"
| /// 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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
|
This is every message I gave the LLM to make these PRs: |
This PR adds an
AGENT.mdand two skills:bevy-tactics: specific instructions to understand the game engineplay-test: specific instructions on how to play and verify real game statesTo 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 withplay-testthey can "close the loop" and make progress on the original prompt toward the success criteria without intervention.