エージェント運用
このブリッジは、調査してから小さく操作する都市運用を前提にしています。エージェントは大きな隠れた修復処理を避け、あとで説明できる小さな API 呼び出しを積み上げます。
推奨ループ
- ブリッジの health と都市サマリーを確認する。
- 問題、道路異常、建物異常、施設、ネットワークを読む。
- 1つの限定的な変更を選ぶ。
- 対応 API が dry run を持つ場合は、まず dry run で確認する。
- シミュレーションを少し進める。
- 状態を再取得して差分を見る。
- 都市を保存し、
/state/savesで保存を確認する。
調査コマンド
powershell
Invoke-RestMethod http://127.0.0.1:32123/health
Invoke-RestMethod http://127.0.0.1:32123/state/summary
Invoke-RestMethod http://127.0.0.1:32123/state/demand
Invoke-RestMethod "http://127.0.0.1:32123/state/problems?limit=200"
Invoke-RestMethod "http://127.0.0.1:32123/state/road-anomalies?limit=500&nearMissDistance=18&shortSegmentLength=32&includeDeadEnds=false"
Invoke-RestMethod "http://127.0.0.1:32123/state/building-anomalies?limit=200"
Invoke-RestMethod "http://127.0.0.1:32123/state/facilities?limit=500"
Invoke-RestMethod "http://127.0.0.1:32123/state/networks?limit=1000&service=Road"/state/facilities の includeMapObjects=true は、配管や暖房の内部ヘルパー建物が必要な場合だけ使います。
修復パターン
- 既知の悪い建物、ノード、セグメントは
/commands/bulldozeで削除します。 - 道路、配管、暖房管、電線は
/commands/build-networkで作ります。 - サービス施設は
/commands/place-buildingまたは/commands/move-buildingで配置します。 - 道路が zoning block を作ったあとに
/commands/set-zoneを使います。 - 結果を見る前に
/commands/set-simulation-speedで都市を少し進めます。 - 意味のある変更後は
/commands/saveまたはscripts/save-city.ps1で保存します。
プロンプト例
text
Use $cities-skylines1-agent-skill to resume my CS1 city, inspect current problems, repair road/infrastructure issues with separate API calls, save the city, and report what changed.