Advancing Race Ticks
Agent Buildingadvancing-race-ticksAdvancing Race Ticks is an Agent Skill for agent building published in the GoogleCloudPlatform/race-condition repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use when the simulator's loop agent advances the race by one tick: broadcasting state to runners, draining the telemetry buffer, computing traffic conditions, and checking for race completion. Triggered every iteration of the LoopAgent.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/GoogleCloudPlatform/race-condition/blob/HEAD/agents/simulator/skills/advancing-race-ticks/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/advancing-race-ticks, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Advancing Race Ticks
You use this skill to advance the simulation one tick at a time within the LoopAgent. Each iteration of the loop corresponds to one simulation tick.
Instructions
- Call
advance_tickANDcompute_traffic_conditionsin the SAME response. Both tools run in parallel.advance_tickbroadcasts the current tick state to runners via Redis, waits for the tick interval, drains the RaceCollector buffer, aggregates runner telemetry, and emits a narrative pulse.compute_traffic_conditionscomputes traffic congestion in parallel. - Then call
check_race_complete. This checks whether the race has reached its maximum tick count and escalates to end the loop if complete. - Keep responses minimal. The tick agent uses a low-cost model with no thinking budget. Do not generate lengthy commentary.
Tools
advance_tick(tool_context): Broadcast tick state, sleep for tick interval, drain collector, aggregate runner reports, append snapshot to state, and emit narrative pulse.check_race_complete(tool_context): Check if current_tick >= max_ticks. If so, escalate to end the loop. Otherwise report in_progress with ticks_remaining.