원클릭으로
mesh-dev
Develop features for the server meshing system — implement, test against AKS, verify with Playwright, and deploy.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Develop features for the server meshing system — implement, test against AKS, verify with Playwright, and deploy.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | mesh-dev |
| description | Develop features for the server meshing system — implement, test against AKS, verify with Playwright, and deploy. |
| user-invocable | true |
You are developing features for a server meshing prototype where multiple Rust sim-servers share authority over the same spatial area, distributing entities at the entity level.
.claude/skills/mesh-dev/CHANGELOG.md for history of completed features and known issuesCLAUDE.md for architecture, conventions, and build/run commands.claude/rules/llm-directions.md for the full system designBrowser ←─ binary/ws ─→ Gateway (Rust) ←─ json/ws ─→ Sim-Servers ←─ udp/bincode ─→ each other
│ │
└──── json/ws ────→ Coordinator ←──── json/ws ──┘
| Service | Crate | Purpose |
|---|---|---|
| Coordinator | crates/coordinator/ | Server registry, heartbeats, crash detection, rebalance directives |
| Sim-Server | crates/sim-server/ | Game loop (20Hz), entity simulation, UDP replication, authority transfers |
| Gateway | crates/gateway/ | Aggregates sim-server snapshots, binary protocol to clients, input routing |
| Shared | crates/shared/ | Entity types, protocol messages, tick constants |
| Client | client/ | Three.js WebGPU renderer, binary decoder, interpolation |
Always verify against the live AKS cluster — local testing is not representative.
# Get gateway IP (may change after redeploys)
GW_IP=$(kubectl get svc gateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
# Gateway metrics
curl -sf http://${GW_IP}:8200/metrics | jq .
# Sim-server metrics (port-forward)
kubectl port-forward sim-server-0 8101:8101 &
curl -sf http://localhost:8101/metrics | jq .
# View client locally against AKS
./deploy/client-local.sh
# Deploy changes
./deploy/update.sh # rebuild + restart all
./deploy/update.sh --client # also rebuild client for App Service
Understand what needs to change. Check CHANGELOG.md for prior work. Use EnterPlanMode for non-trivial features.
Key files by change type:
| Change | Files |
|---|---|
| New entity field | shared/entity.rs → auto-propagates via serde. Update client/world-view.ts RawEntity to match. |
| New coordinator→server message | shared/protocol.rs CoordServerMsg → handle in sim-server/coordinator_client.rs |
| New client→server message | shared/protocol.rs ClientMessage → handle in sim-server/simulation.rs:process_input(), update gateway/src/main.rs:route_input() |
| Tick rate change | shared/tick.rs — affects sim-server, gateway broadcast, client interpolation |
| Gateway binary protocol | gateway/aggregator.rs (encode) + client/binary-protocol.ts (decode) + tools/test-suite/runner.ts (test decode) |
| Rebalance behavior | coordinator/registry.rs:try_rebalance() |
| Crash recovery | coordinator/registry.rs:broadcast_recovery() + sim-server/world.rs:recover_from_dead_server() |
cargo build # All Rust crates
cd client && npx tsc --noEmit # Client TypeScript
cd tools && npx tsc --noEmit --strict --target ES2022 --module nodenext --moduleResolution nodenext --skipLibCheck test-suite/runner.ts # Test suite
./deploy/update.sh
sleep 60 # wait for rolling restart to settle
kubectl get pods # verify all Running
Run ALL of these before declaring success:
GW_IP=$(kubectl get svc gateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
# A) Browser test — MUST pass (0 jumps, 0 flicker)
cd tools && npx tsx browser-test.ts ws://${GW_IP}
# B) Gateway metrics — check entity count, server count, rebalance events
curl -sf http://${GW_IP}:8200/metrics | jq .
# C) Frame rate — should be ~20Hz
node -e "
const ws=require('ws'),w=new ws.WebSocket('ws://${GW_IP}');
let t=[],c=0;w.on('message',(d,b)=>{if(!b)return;t.push(Date.now());c++;
if(c>=50){let i=[];for(let j=1;j<t.length;j++)i.push(t[j]-t[j-1]);
console.log((1000/(i.reduce((a,b)=>a+b,0)/i.length)).toFixed(1)+' Hz');
w.close();process.exit(0)}});setTimeout(()=>process.exit(1),15000);
"
# D) Coordinator — no oscillating rebalances
kubectl logs deployment/coordinator --tail=10
CRITICAL: Do NOT tell the user a feature works until browser-test.ts PASSES. Never ask the user to manually verify.
Append to .claude/skills/mesh-dev/CHANGELOG.md.
authority_server. Entity count in metrics may differ from client-visible count.client/binary-protocol.ts, tools/test-suite/runner.ts decoder, and tools/browser-test.ts diagnostics.applySnapshot.FULL_SNAPSHOT_INTERVAL=1 in gateway/aggregator.rs. The infrastructure is built (entity_changed, mark_broadcast, delta frame type 0x02) but it caused interpolation bugs. Needs per-entity interpolation timers before re-enabling.cargo fmt, no unsafe. HashMap entity storage, not ECS.three/webgpu imports.Full development pipeline — architect a feature, get user approval, then implement, test, and audit it using the mesh agent team.
Optimize the server meshing system — benchmark, identify bottlenecks, implement fixes, verify, and deploy against the live AKS cluster.
Ship the current branch — commit, rename, push, create PR, merge to main, and create a new branch for the next piece of work.
Hunt down test coverage gaps in the server meshing system, write tests to fill them, and verify against AKS.