rts-observability-architecture

Implements tiered telemetry, deterministic replay, and debug visualization for RTS simulation loops.

Updated Jul 13, 2026
One-click install
npx skills add https://github.com/Ohmnia/site-build --skill rts-observability-architecture-ohmnia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rts-observability-architecture
Source: https://github.com/Ohmnia/site-build/tree/main/.opencode/skills/rts-observability-architecture
Command: npx skills add https://github.com/Ohmnia/site-build --skill rts-observability-architecture-ohmnia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? RTS games run simulation-heavy loops that are nearly impossible to debug with ordinary logging. This Skill provides a structured four-tier observability architecture—event logs, error monitors, performance timelines, and deterministic replay recorders—so developers can introspect ECS systems without destroying frame budgets. ## Core Features & Use Cases - Four-Tier Telemetry Matrix: Separates structural event logs, error monitoring, performance timelines, and deterministic replay recording into independent zero-allocation streams. - Structured JSON Event Standard: Enforces strictly typed, filterable log entries with simulation tick, system name, action tag, and flat payloads. - High-Scale Debug Visualization: Batches pathfinding nodes, steering vectors, and spatial grids through THREE.InstancedMesh to keep draw calls near zero. - Deterministic Replay Constraints: Records only command IDs, ticks, targets, and RNG seeds inside a fixed 1/20s timestep for exact frame reproduction. - Use Case: When a unit formation bug appears only after 10 minutes of gameplay, use the replay recorder to reproduce the exact tick sequence, then inspect the error monitor and perf timeline to isolate the failing ECS system. ## Quick Start Ask the AI to implement a structured JSON event logger and deterministic replay recorder for your TypeScript Three.js RTS simulation loop following the four-tier observability architecture.

Frequently Asked Questions about rts-observability-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add logging to an RTS game loop without hurting performance?

Use structured JSON event logs buffered in memory and flushed asynchronously, never raw console.log calls inside systems. Keep disk I/O out of update frames and flush instantly only on critical error states.

How to implement deterministic replay in a TypeScript RTS game?

Record only command IDs, tick limits, targets, and RNG seeds inside a strict fixed timestep such as 1/20 seconds. Never store spatial transforms or visual mesh data, since same inputs plus same starting state must reproduce identical results.

What is the best way to visualize ECS debug data in Three.js?

Batch all debug graphics such as steering vectors, pathfinding nodes, and spatial grid cells into a unified THREE.InstancedMesh or pre-allocated vertex arrays. Never allocate new objects like THREE.Vector3 inside system updates to keep draw calls near zero.

Can I use console.log inside ECS systems for debugging?

No, unstructured raw logging inside game loops is a disallowed antipattern in this architecture. Use strictly typed JSON event objects with time, system, type, and payload fields that can be filtered and buffered efficiently.

Why does my RTS replay desync from the original simulation?

Desyncs occur when replay files contain spatial state, when the simulation lacks a fixed timestep, or when RNG seeds are not recorded. Ensure updates run at a fixed delta and replays store only commands, ticks, and seeds.