Skip to content

feat(world): Zone system improvements with visual distinction#80

Merged
ComBba merged 13 commits intomainfrom
feat/zone-system-improvements
Feb 12, 2026
Merged

feat(world): Zone system improvements with visual distinction#80
ComBba merged 13 commits intomainfrom
feat/zone-system-improvements

Conversation

@ComBba
Copy link
Copy Markdown
Contributor

@ComBba ComBba commented Feb 12, 2026

Summary

Improves the zone system with better visual distinction and navigation support:

  • Zone-specific floor tiles - Each zone now has unique floor tiles for visual identification:

    • Lobby: Wood Floor
    • Office: Light gray floor
    • Arcade: Carpet
    • Meeting: Wood Floor
    • Lounge-cafe: Wood Floor
    • Plaza: Sand
  • Clear wall distinction - All building walls consistently use Stone Wall (tile 4) making collision boundaries obvious

  • Always-visible zone labels - Zone names now appear on the map with styled backgrounds, not just in debug mode

  • Building entrances - Added building entrance markers to the objects layer for AI navigation

  • Documentation - Added comprehensive map sync documentation and updated specs

Changes

Commit Description
fix(shared) Update ZoneIdSchema to match new 8-zone system
feat(world) Add building entrances and fix zone door positions
docs Add map sync documentation and update map specs
chore Archive outdated zone map files and old map spec
feat(world) Improve zone visual distinction with unique floor tiles and labels

Zone Floor Tile Distribution (After)

Zone Floor Tile Wall Tile
Lobby Wood (5) Stone Wall (4)
Office Light Gray (9) Stone Wall (4)
Arcade Carpet (13) Stone Wall (4)
Meeting Wood (5) Stone Wall (4)
Lounge-cafe Wood (5) Stone Wall (4)
Plaza Sand (7) Stone Wall (4)
Central Park Grass (1) -
Lake Water (3) -

Testing

  • ✅ TypeScript type check passes
  • ✅ Build succeeds
  • ✅ All 970 tests pass

Screenshots

Zone labels and floor tiles are visible on the game map. Use F3 to toggle full debug mode.

Summary by CodeRabbit

릴리스 노트

  • 신규 기능

    • 공간 기반 새로운 영역 구조 도입: 로비, 사무실, 중앙공원, 아케이드, 회의실, 라운지 카페, 광장, 호수
    • 향상된 존 디스플레이 라벨 및 시각적 구분
    • 새로운 NPC 추가 및 위치 조정
  • 문서

    • 공간 OS 프레임워크 기반 전체 README 재작성
    • 맵 동기화 프로세스 상세 가이드 추가
    • 세계 구조 및 인터랙티브 시설 명세 업데이트
  • 기타

    • 레거시 존 구조 및 설정 아카이브

- Replace generic block zones with functional areas:
  plaza, north-block, west-block, east-block, south-block, lake
  → lobby, office, central-park, arcade, meeting, lounge-cafe, plaza, lake

- Update zone bounds, colors, and type definitions
- Change entry zone from 'plaza' to 'lobby'
- Add 3 new NPCs: security (lobby), it-help (office), fountain-keeper (plaza)
- Update client debug panel zone list
- Update all NPC zone mappings and spawn positions
- Fix all tests to use new zone names and coordinates

Total: 9 NPCs across 8 zones, all tests passing (970)
- Change zone IDs from old names (north-block, west-block, etc.)
  to new names (lobby, office, central-park, arcade, meeting,
  lounge-cafe, plaza, lake)
- Aligns with ZoneId type in types.ts
Add building_entrance objects to map for AI agent navigation:
- lobby.entrance (south) → central-park
- office.entrance (west) → lobby/road
- arcade.entrance (west) → central-park
- meeting.entrance (east) → central-park
- meeting.entrance_south (south) → lounge-cafe
- lounge-cafe.entrance (north) → central-park
- lounge-cafe.entrance_west (west) → meeting
- plaza.entrance (north) → central-park

Fix door positions:
- Plaza door moved from west to north
- Meeting-Lounge direct connection via south/west doors
- All doors now face accessible road/path areas

Update facility objects with correct zone names
- Add comprehensive map-sync-process.md guide
- Update map_spec_grid_town.md with building entrances table
- Update README.md with map synchronization section
- Move individual zone maps to world/packs/base/maps/_archive/
- Move old 64x52 map_spec.md to docs/reference/_archive/
- Add README files explaining archive status
…and labels

- Use zone-specific floor tiles for visual distinction:
  - Lobby: Wood Floor (tile 5)
  - Office: Light Wall (tile 9)
  - Arcade: Carpet (tile 13)
  - Meeting: Wood Floor (tile 5)
  - Lounge-cafe: Wood Floor (tile 5)
  - Plaza: Sand (tile 7)
- Ensure all walls use Stone Wall (tile 4) for consistent collision visual
- Add always-visible zone name labels on the map with styled backgrounds
- Sync map changes to server and client
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 12, 2026

Warning

Rate limit exceeded

@ComBba has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 32 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

개요

코드베이스를 게임 중심 아키텍처에서 공간 AI 협업 운영 체제 프레임워크로 재구성합니다. 6개의 기존 존을 로비, 사무실, 중앙공원, 아케이드, 회의실, 라운지카페, 광장, 호수의 8개 새로운 존으로 재구성하고, 모든 존 데이터, NPC, 시설, 설명서를 새로운 공간 존재 패러다임에 맞게 업데이트합니다.

변경 사항

코호트 / 파일 요약
문서 아키텍처 재정의
README.md, docs/PRD-INDEX.md, docs/reference/map_spec_grid_town.md, docs/demo-runbook.md
게임 중심에서 공간 AI 협업 OS 서술로 전환합니다. 비전, 핵심 개념(공간 권한, 존재 인식, 동작 트리거), 4단계 로드맵을 도입합니다. 버전 1.0→2.0 업데이트, 맵 동기화 프로세스 및 AIC API 용어 정립.
맵 동기화 및 아카이브 문서
docs/reference/_archive/README.md, docs/reference/map-sync-process.md, world/packs/base/maps/_archive/README.md
새로운 맵 동기화 프로세스 문서 추가(496줄), 아카이브된 맵 파일의 탈각(deprecation) 현황 설명서 추가. 단일 소스 진실, 동기화 워크플로우, 타일 인덱싱, 건물/문 배치 규칙 상세 기록.
존 시스템 재구성
packages/shared/src/world.ts
ZONE_BOUNDS, ZONE_COLORS, ZONE_IDS를 6개 존(plaza, north-block, west-block, east-block, south-block, lake)에서 8개 존(lobby, office, central-park, arcade, meeting, lounge-cafe, plaza, lake)으로 변경합니다. 새로운 공개 내보내기 ZONE_DISPLAY_NAMES 추가.
타일 및 시설 매핑
packages/client/src/world/TileInterpreter.ts, packages/server/src/world/WorldPackLoader.ts
floor_north를 lobby→office로 재매핑합니다. WorldPackLoader의 getFacilityZone를 하이픈 기반 식별자(reception-desk, desk-cluster, bench-1/2, arcade-cabinet-1/2/3 등)로 업데이트하고 8개 존에 맞게 조정합니다.
클라이언트 UI 존 표시
packages/client/src/game/scenes/GameScene.ts
createZoneNameLabels() 메서드 추가로 모든 존에 대해 표시 이름과 색상 배경이 있는 라벨을 렌더링합니다. 디버그 범례를 North/West/East/South 블록에서 새로운 8개 존으로 확장합니다.
맵 데이터 구조 재편
packages/client/public/assets/maps/village.json, packages/server/assets/maps/village.json, world/packs/base/maps/grid_town_outdoor.json
타일 데이터, 객체 계층, 존 경계, 건물 입구, 시설 객체를 광범위하게 재작성합니다. 새로운 존 레이아웃에 맞게 좌표, 크기, zone/direction/connectsTo 속성 추가.
아카이브된 맵 파일 업데이트
world/packs/base/maps/_archive/*.json (arcade, central-park, lobby, lounge-cafe, meeting, office, plaza)
각 존에 대해 bounds, spawnPoints, NPCs, facilities를 새 존 시스템에 맞게 업데이트합니다. 중앙공원 맵 추가, 기타 맵들의 좌표 및 시설 ID 현대화.
NPC 데이터 마이그레이션
world/packs/base/npcs/*.json (greeter, office-pm, meeting-host, barista, arcade-host, ranger, security, it-help, fountain-keeper)
모든 NPC의 zone을 기존 블록 구조에서 새로운 8개 존으로 이동합니다. defaultPosition과 schedule 위치를 새 존 좌표계에 맞게 업데이트합니다. 새로운 NPC 3개(security, it-help, fountain-keeper) 추가 및 대사 콘텐츠 조정.
NPC 색인 업데이트
world/packs/base/npcs/index.json
npcs 배열을 6개에서 9개 항목으로 확장(security, it-help, fountain-keeper 추가).

예상 코드 검토 노력

🎯 4 (복잡) | ⏱️ ~75분

관련 이슈

관련 PR

제안된 레이블

tests

🐰 공간이 이제 상태머신이 되고,
존들이 여덟 개로 춤추며,
로비에서 아케이드까지 이어지고,
NPC들은 새 좌표로 인사하네—
협업의 미로, 아름답게 재탄생! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Pull request title accurately summarizes the main change: zone system improvements with visual distinction through zone-specific floor tiles, styled labels, and building entrances.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/zone-system-improvements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @ComBba, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly overhauls the game world's zone system to provide a more visually distinct and functionally robust environment. By expanding the number of zones, introducing unique visual cues, and enhancing AI navigation support, the changes aim to create a more immersive and navigable experience for players and a more structured foundation for AI agents. The update also includes crucial documentation to ensure maintainability and clarity for future map development.

Highlights

  • Expanded Zone System: The game world's zone system has been expanded from 6 to 8 distinct zones, introducing 'Lobby', 'Office', 'Central Park', 'Arcade', 'Meeting', and 'Lounge Cafe' while refining existing 'Plaza' and 'Lake' zones. This update includes comprehensive changes to zone boundaries, spawn points, and associated NPCs and facilities.
  • Enhanced Visual Distinction: Each zone now features unique floor tiles for immediate visual identification, and all building walls consistently use a 'Stone Wall' tile to clearly delineate collision boundaries. Zone names are also now always visible on the map with styled backgrounds, improving navigation and player orientation.
  • Improved AI Navigation and World Structure: Building entrance markers have been added to the objects layer to support AI navigation, ensuring agents can correctly identify and utilize entry points. The underlying data structures and schemas have been updated to reflect the new 8-zone system, ensuring consistency across client, server, and shared packages.
  • Comprehensive Map Synchronization Documentation: New, detailed documentation has been added for the map synchronization process, outlining how map files, tile data, and zones are managed and synchronized across the codebase. This includes step-by-step guides for making map changes and a verification checklist.
  • Archived Outdated Map Data: Outdated individual zone map files and previous map specifications have been moved to an archive, streamlining the map system to use a single unified source of truth for easier maintenance and consistency.
Changelog
  • README.md
    • Updated the zone system description to reflect 8 distinct zones.
    • Revised the zone table with new zone names, descriptions, locations, and NPCs.
    • Added a 'Map Synchronization' section with instructions and a link to new documentation.
  • docs/reference/_archive/README.md
    • Added a new file to archive deprecated documentation, providing context for moved files.
  • docs/reference/_archive/map_spec.md
    • Renamed and moved the old map specification to the archive directory.
  • docs/reference/map-sync-process.md
    • Added a new comprehensive document detailing the map synchronization process, including file locations, usage, JSON structure, and troubleshooting.
  • docs/reference/map_spec_grid_town.md
    • Updated zone boundaries, layout, interactive objects, NPC positions, and building entrances to reflect the new 8-zone system.
    • Added a visual layout diagram and zone connectivity diagram.
    • Updated collision rules and added zone colors for debug display.
  • packages/client/src/game/scenes/GameScene.ts
    • Added a new property zoneNameLabels to manage zone name display.
    • Integrated createZoneNameLabels into the scene creation process to render zone names.
    • Implemented createZoneNameLabels method to display zone names with styled backgrounds.
    • Updated debug legend zone items to reflect the new 8-zone system.
  • packages/client/src/ui/ZoneBanner.ts
    • Updated ZONE_DISPLAY_NAMES to reflect the new 8-zone system and their display names.
  • packages/client/src/world/TileInterpreter.ts
    • Updated ZONE_FLOOR_TYPES mapping to align with the new zone IDs.
  • packages/server/src/world/WorldPackLoader.ts
    • Updated getNpcZone and getFacilityZone mappings to reflect the new 8-zone system and associated NPCs/facilities.
    • Updated getDefaultZoneBounds to use the new 8-zone pixel bounds.
  • packages/shared/src/schemas.ts
    • Updated ZoneIdSchema enum to include the new 8 zone IDs.
  • packages/shared/src/types.ts
    • Updated ZoneId type definition to include the new 8 zone IDs and their descriptions.
  • packages/shared/src/world.ts
    • Updated ZONE_BOUNDS with new pixel coordinates for the 8 zones.
    • Updated ZONE_COLORS with new color mappings for the 8 zones.
    • Updated ZONE_IDS array to list the new 8 zone IDs.
  • tests/unit/facility-handlers-coverage.test.ts
    • Updated zone IDs in facility schema instantiations to match the new zone system.
  • tests/unit/facility.test.ts
    • Updated zone IDs in facility schema instantiations and test assertions to match the new zone system.
  • tests/unit/world-pack.test.ts
    • Updated default zones and entry zone in createTestPack and assertions to reflect the new 'lobby' entry zone and 8-zone system.
  • tests/unit/world.test.ts
    • Updated test positions and expected zone IDs to align with the new 8-zone layout for zone entry/exit and bot movement tests.
  • tests/unit/zone-system-64x64.test.ts
    • Updated test descriptions and assertions to reflect the new 8-zone layout, including bounds, detection, transitions, and population tracking.
  • tests/unit/zone-system-plaza.test.ts
    • Updated test descriptions and assertions to reflect the new 8-zone layout, specifically for the 'plaza' zone.
  • tests/unit/zone-transition.test.ts
    • Updated test descriptions and assertions to reflect the new 8-zone layout, including zone detection, transitions, and population tracking.
  • world/packs/base/manifest.json
    • Updated the zones array and entryZone to reflect the new 8-zone system and 'lobby' as the entry zone.
  • world/packs/base/maps/_archive/arcade.json
    • Renamed world/packs/base/maps/arcade.json to world/packs/base/maps/_archive/arcade.json.
    • Updated bounds, spawn points, NPCs, and facilities to reflect the new arcade zone configuration.
  • world/packs/base/maps/_archive/central-park.json
    • Added a new archived map file for central-park.
  • world/packs/base/maps/_archive/lobby.json
    • Renamed world/packs/base/maps/lobby.json to world/packs/base/maps/_archive/lobby.json.
    • Updated bounds, spawn points, NPCs, and facilities to reflect the new lobby zone configuration.
  • world/packs/base/maps/_archive/lounge-cafe.json
    • Renamed world/packs/base/maps/lounge-cafe.json to world/packs/base/maps/_archive/lounge-cafe.json.
    • Updated bounds, spawn points, NPCs, and facilities to reflect the new lounge-cafe zone configuration.
  • world/packs/base/maps/_archive/meeting.json
    • Renamed world/packs/base/maps/meeting-center.json to world/packs/base/maps/_archive/meeting.json.
    • Updated zone ID, name, bounds, spawn points, NPCs, and facilities to reflect the new meeting zone configuration.
  • world/packs/base/maps/_archive/office.json
    • Renamed world/packs/base/maps/office.json to world/packs/base/maps/_archive/office.json.
    • Updated bounds, spawn points, NPCs, and facilities to reflect the new office zone configuration.
  • world/packs/base/maps/_archive/plaza.json
    • Renamed world/packs/base/maps/plaza.json to world/packs/base/maps/_archive/plaza.json.
    • Updated bounds, spawn points, NPCs, and facilities to reflect the new plaza zone configuration.
  • world/packs/base/maps/_archive/village_outdoor.json
    • Renamed world/packs/base/maps/village_outdoor.json to world/packs/base/maps/_archive/village_outdoor.json.
  • world/packs/base/npcs/arcade-host.json
    • Updated the zone and default position for the arcade-host NPC.
  • world/packs/base/npcs/barista.json
    • Updated the zone and default position for the barista NPC.
  • world/packs/base/npcs/fountain-keeper.json
    • Added a new NPC definition for the fountain-keeper.
  • world/packs/base/npcs/greeter.json
    • Updated the zone and default position for the greeter NPC.
  • world/packs/base/npcs/index.json
    • Updated the NPC list to include new security, it-help, and fountain-keeper NPCs.
  • world/packs/base/npcs/it-help.json
    • Added a new NPC definition for it-help.
  • world/packs/base/npcs/meeting-host.json
    • Updated the zone and default position for the meeting-host NPC.
  • world/packs/base/npcs/office-pm.json
    • Updated the zone and default position for the office-pm NPC.
  • world/packs/base/npcs/ranger.json
    • Updated the zone and default position for the ranger NPC.
  • world/packs/base/npcs/security.json
    • Added a new NPC definition for security.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions bot added documentation Improvements or additions to documentation client server shared tests world labels Feb 12, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant and well-executed improvement to the world's zone system, expanding it from 6 to 8 zones with better visual distinction and updated navigation logic. The changes are comprehensive, covering documentation, shared code, client and server logic, and tests. The new map synchronization documentation is particularly valuable.

I've found a few areas with inconsistencies in the documentation and a potential issue with facility mapping that could lead to bugs. Specifically, there are conflicting details about collision values and object layer usage, a broken link, and an ambiguous mapping for the whiteboard facility. I've also noted some minor code duplication and placeholder dates that should be addressed.

Overall, this is a great enhancement to the project's world-building capabilities. Addressing the feedback will improve consistency and prevent potential issues for future development.


### 3. Objects Layer (`objects`)

Spawn points and markers (currently unused, reserved for future use).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There's a contradiction in the documentation regarding the objects layer. This line states it's "currently unused, reserved for future use", but later sections (e.g., "Building Entrances" starting at line 219) describe its current usage for building_entrance objects. This could confuse developers. Please update this line to reflect the actual usage of the objects layer.

## Related Documentation

- [Grid-Town Map Spec](./map_spec_grid_town.md) - Zone layout and facilities
- [Map Spec](./map_spec.md) - General map format
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This link to [Map Spec](./map_spec.md) is broken. The file map_spec.md was moved to the _archive directory as part of this pull request. Please update the link to point to the correct, current map specification document, which appears to be map_spec_grid_town.md.

Suggested change
- [Map Spec](./map_spec.md) - General map format
- [Map Spec](./map_spec_grid_town.md) - General map format


1. **ground** - Base terrain (grass tiles, ID 1)
2. **collision** - Collision grid (0=passable, 1=blocked)
2. **collision** - Collision grid (0=passable, 2=blocked)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There is an inconsistency in the collision value for blocked tiles. This file states 2=blocked, while docs/reference/map-sync-process.md (lines 70-73) and its code examples use 1 for blocked tiles. To avoid confusion, please ensure the collision values are consistent across all documentation. Based on the sync script documentation, 1 seems to be the correct value for "blocked".

Suggested change
2. **collision** - Collision grid (0=passable, 2=blocked)
2. **collision** - Collision grid (0=passable, 1=blocked)

Comment on lines 391 to 417
private getFacilityZone(facilityId: string, zoneId: ZoneId): boolean {
const facilityZoneMap: Record<string, ZoneId> = {
notice_board: 'plaza',
signpost: 'plaza',
kanban_terminal: 'north-block',
whiteboard: 'north-block',
schedule_kiosk: 'east-block',
room_door_a: 'east-block',
cafe_counter: 'west-block',
vending_machine: 'west-block',
arcade_cabinets: 'south-block',
game_table: 'south-block',
pond_edge: 'lake',
'reception-desk': 'lobby',
'info-board': 'lobby',
'desk-cluster': 'office',
'kanban-board': 'office',
whiteboard: 'office',
signpost: 'central-park',
'bench-park-1': 'central-park',
'bench-park-2': 'central-park',
'arcade-cabinet-1': 'arcade',
'arcade-cabinet-2': 'arcade',
'arcade-cabinet-3': 'arcade',
'prize-counter': 'arcade',
'meeting-room-a': 'meeting',
'meeting-room-c': 'meeting',
'schedule-board': 'meeting',
'cafe-counter': 'lounge-cafe',
'vending-machine': 'lounge-cafe',
'seating-area': 'lounge-cafe',
fountain: 'plaza',
'bench-1': 'plaza',
'bench-2': 'plaza',
'pond-edge': 'lake',
};
return facilityZoneMap[facilityId] === zoneId;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The facilityZoneMap has an entry for whiteboard that maps it only to the office zone (line 397). However, the updated map_spec_grid_town.md documentation shows a whiteboard facility in both the Office and Meeting zones. This discrepancy could lead to bugs where facilities in the Meeting zone are not correctly processed or found. Please ensure the facilityZoneMap accurately reflects all facility locations as defined in the map specification. You might need to handle facilities that can exist in multiple zones or have unique IDs per zone.


## Archive Date

February 2026
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The archive date is set to a future date (February 2026). This appears to be a placeholder and should be updated to the current date to accurately reflect when these documents were archived.

Comment on lines +343 to +352
const ZONE_DISPLAY_NAMES: Record<ZoneId, string> = {
lobby: 'LOBBY',
office: 'OFFICE',
'central-park': 'CENTRAL PARK',
arcade: 'ARCADE',
meeting: 'MEETING',
'lounge-cafe': 'LOUNGE CAFÉ',
plaza: 'PLAZA',
lake: 'LAKE',
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The ZONE_DISPLAY_NAMES constant is duplicated here. It's also defined in packages/client/src/ui/ZoneBanner.ts. To improve maintainability and ensure consistency, this constant should be defined in a single shared location and imported where needed. For example, you could export it from ZoneBanner.ts or move it to a shared constants file.


## Archive Date

February 2026
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The archive date is set to a future date (February 2026). This appears to be a placeholder and should likely be updated to reflect the actual date of archival.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
world/packs/base/npcs/greeter.json (1)

20-29: ⚠️ Potential issue | 🟡 Minor

대화 텍스트의 방향 안내가 새 존 레이아웃과 불일치

about-towndirections 대화에서 "North has the office", "West has the cafe", "East has meeting rooms", "South has the arcade"라고 안내하고 있지만, 새 존 레이아웃 다이어그램을 보면:

  • Office는 우상단 (north-east)
  • Lounge-cafe는 하단 중앙
  • Meeting은 좌측
  • Arcade는 우측 중앙

방향 설명이 실제 레이아웃과 맞지 않아 플레이어에게 혼동을 줄 수 있습니다. 대화 텍스트를 새 레이아웃에 맞게 업데이트하는 것을 권장합니다.

world/packs/base/maps/_archive/plaza.json (1)

22-58: ⚠️ Potential issue | 🟡 Minor

floorcollision 레이어의 타일 데이터 개수가 선언된 크기와 일치하지 않음

width: 30, height: 40 (총 1200개)로 선언되었지만:

  • floor 레이어: 실제 데이터 1110개 (90개 부족)
  • collision 레이어: 실제 데이터 1170개 (30개 부족)

런타임에서 이 데이터를 파싱할 때 인덱스 오류나 예기치 않은 동작이 발생할 수 있습니다. 아카이브 파일이므로 우선순위는 낮지만, 데이터 누락을 수정하거나 실제 크기에 맞게 선언을 조정해야 합니다.

world/packs/base/npcs/office-pm.json (1)

29-29: ⚠️ Potential issue | 🟡 Minor

대화 텍스트에 이전 존 이름 "north block"이 남아있습니다.

존 이름이 "north-block"에서 "office"로 변경되었으나, 대화 텍스트에서 여전히 "right here in the north block"이라고 참조하고 있습니다. 사용자에게 노출되는 텍스트이므로 수정이 필요합니다.

🔧 수정 제안
-      "text": "The kanban terminal is right here in the north block! You can view tasks, create new ones, or update existing work items. It's our command center!",
+      "text": "The kanban terminal is right here in the office! You can view tasks, create new ones, or update existing work items. It's our command center!",
🤖 Fix all issues with AI agents
In `@docs/reference/map-sync-process.md`:
- Around line 57-65: 문서에 있는 "| Tile ID | Meaning | Visual |" 테이블(타일 ID 표)이 1–6번만
나열되어 실제 맵에 사용되는 타일들을 반영하지 못합니다; 테이블에 누락된 타일 ID(예: 5=Wood Floor, 7=Sand, 9=Light
gray, 13=Carpet 등 PR 설명에 언급된 모든 새 타일 ID와 그 의미/시각 설명)를 추가해서 표를 완전하게 업데이트하세요, 각 행은
기존 형식("| ID | Meaning | Visual |")을 그대로 따르되 누락된 모든 타일 ID를 포함하도록 보충하면 됩니다.
- Around line 75-77: The "Objects Layer (`objects`)" blurb currently says "Spawn
points and markers (currently unused, reserved for future use)" which
contradicts this PR that adds a building_entrance object; update the sentence to
reflect that the layer is used and now includes the building_entrance object
(referenced later in the doc), e.g. replace the "currently unused..." phrase
with a short note that the layer contains spawn points, markers, and the
building_entrance object (see the building_entrance format described later) so
readers aren't misled; locate the `objects` section and the `building_entrance`
mention to make the change.

In `@packages/client/src/world/TileInterpreter.ts`:
- Around line 26-33: ZONE_FLOOR_TYPES is missing mappings for the lobby and
central-park zones; update the Map in TileInterpreter.ts to include appropriate
tile-type → zone-id entries (e.g., add 'floor_lobby' -> 'lobby' and
'floor_central_park' -> 'central-park' or whatever naming convention your
TileType uses) so ZONE_FLOOR_TYPES covers lobby and central-park; ensure these
keys match existing TileType enums/usages and that TileInterpreter.getZoneAt
remains consistent with the added entries.

In `@world/packs/base/maps/_archive/meeting.json`:
- Around line 5-7: 상위 JSON의 spawnPoints(현재 { "x": 288, "y": 1120 })와 objects
레이어의 spawn 오브젝트 좌표(현재 { "x": 160, "y": 160 })가 불일치하므로 둘 중 하나를 선택해 동일한 좌표로 맞추고,
facilities 배열에 있는 "meeting-room-a" 및 "meeting-room-c" 명칭을 objects 레이어의 실제 오브젝트
id인 "meeting-room-1" 및 "meeting-room-2"로 변경해 네이밍을 일치시키세요; 변경 대상 키: spawnPoints,
objects 레이어의 spawn 오브젝트, facilities 배열의 항목("meeting-room-a"/"meeting-room-c" →
"meeting-room-1"/"meeting-room-2").

In `@world/packs/base/maps/_archive/plaza.json`:
- Around line 4-7: spawnPoints 값이 (1440, 1440)으로 변경되었는데 objects 레이어의 spawn 오브젝트는
여전히 (480, 640)으로 불일치합니다; plaza.json 내 "spawnPoints"와 objects 레이어의 spawn 오브젝트
좌표(현재 480,640)를 동일하게 맞추도록 objects 레이어의 해당 spawn 오브젝트의 x와 y 값을 1440,1440으로 수정하거나
두 위치가 의도적으로 다르다면 주석/설명 필드로 이유를 명확히 남겨 일관성을 유지하세요.

In `@world/packs/base/npcs/it-help.json`:
- Around line 7-10: The schedule entries in world/packs/base/npcs/it-help.json
use startHour/endHour but the loader expects a time field ("HH:MM") so entries
default to '00:00'; either convert the JSON schedule objects to use "time"
(e.g., "09:00") and rename position→location if needed, or update
WorldPackLoader to accept startHour/endHour by parsing those integers into a
"time" string (or mapping to start/end time ranges) before validation; locate
references to the "schedule" array in the NPC JSON and the WorldPackLoader
parsing/validation logic (function/method names referencing WorldPackLoader,
schedule parsing, or time normalization) and implement the chosen conversion so
all schedule items produce the expected "time" field for downstream code.

In `@world/packs/base/npcs/ranger.json`:
- Around line 5-6: ranger NPC's "zone" was changed to "central-park" but the
dialogue still refers to lake-specific phrases; update the dialogue entries in
ranger.json (the ranger NPC object—look for keys like "dialogue", "lines", or
any text fields that include "lake", "by the water", "Can I swim here?", "fish
in the lake?") to reflect central-park context (e.g., park ranger, trails,
benches, trees, wildlife) so the text matches the "zone": "central-park" and the
"defaultPosition" coordinates.
🧹 Nitpick comments (7)
docs/reference/map_spec_grid_town.md (1)

29-46: 펜스 코드 블록에 언어 지정 누락 (markdownlint MD040)

Line 29와 Line 149의 펜스 코드 블록에 언어가 지정되어 있지 않습니다. ASCII 다이어그램이라도 text를 지정하면 lint 경고를 해소할 수 있습니다.

🔧 수정 제안

Line 29:

-```
+```text

Line 149:

-```
+```text
tests/unit/facility-handlers-coverage.test.ts (1)

58-63: reception_desk의 존이 plaza로 유지됨 — lobby가 더 적절해 보입니다.

다른 시설들은 새 존 ID로 업데이트되었지만, reception_desk는 여전히 'plaza'를 사용하고 있습니다. 맵 스펙에 따르면 reception-desk는 lobby 존에 위치합니다. 테스트 동작에는 영향이 없지만, 일관성을 위해 'lobby'로 변경을 고려해 보세요.

docs/reference/map-sync-process.md (1)

9-9: 코드 블록에 언어 지정자가 누락되었습니다.

markdownlint MD040 경고에 해당합니다. 여러 펜스드 코드 블록에 언어가 지정되지 않았습니다 (Lines 9, 85, 164, 169, 175, 257, 283, 323). text, plaintext, 또는 적절한 언어 식별자를 추가하면 렌더링과 린트 준수가 개선됩니다.

Also applies to: 85-88, 164-164, 169-169, 175-175, 257-257, 283-283, 323-323

packages/client/src/game/scenes/GameScene.ts (2)

380-394: 배경 그래픽 객체(bg)가 추적되지 않아 정리할 수 없습니다.

labelzoneNameLabels 배열에 저장되지만, 각 존에 대해 생성되는 bg Graphics 객체는 어디에도 저장되지 않습니다. 씬이 재시작되거나 라벨을 제거해야 할 때 이 그래픽 객체들은 메모리에 남게 됩니다.

라벨과 배경을 함께 컨테이너로 묶거나, 별도 배열에 bg도 추적하는 것을 권장합니다.

♻️ 컨테이너 사용 예시
-      const bgWidth = label.width + 16;
-      const bgHeight = label.height + 8;
-      const bg = this.add.graphics();
-      bg.fillStyle(color, 0.3);
-      bg.fillRoundedRect(
-        bounds.x + bounds.width / 2 - bgWidth / 2,
-        bounds.y + 16,
-        bgWidth,
-        bgHeight,
-        4
-      );
-      bg.setDepth(49);
-
-      this.zoneNameLabels.push(label);
+      const bgWidth = label.width + 16;
+      const bgHeight = label.height + 8;
+      const bg = this.add.graphics();
+      bg.fillStyle(color, 0.3);
+      bg.fillRoundedRect(
+        bounds.x + bounds.width / 2 - bgWidth / 2,
+        bounds.y + 16,
+        bgWidth,
+        bgHeight,
+        4
+      );
+      bg.setDepth(49);
+
+      // label과 bg를 모두 추적
+      this.zoneNameLabels.push(label);
+      this.zoneNameLabels.push(bg as unknown as Phaser.GameObjects.Text);

또는 더 깔끔하게, Phaser.GameObjects.GameObject[] 타입의 별도 배열을 사용하세요.


342-352: ZONE_DISPLAY_NAMES는 두 파일에서 중복 정의되고 있습니다.

ZoneBanner.tsGameScene.ts에서 동일한 구조의 ZONE_DISPLAY_NAMES 상수가 각각 정의되어 있습니다. 다만 값이 다릅니다:

  • ZoneBanner.ts: 제목 형식 ('Lobby', 'Office' 등)
  • GameScene.ts: 대문자 형식 ('LOBBY', 'OFFICE' 등)

서로 다른 UI 맥락에서 사용되고 있으므로, 단순한 공유 상수 추출보다는 각 파일의 용도에 맞게 명확한 상수명으로 분리하거나, 공유 상수로 통합하려면 포매팅 로직을 별도로 관리할 필요가 있습니다.

packages/server/src/world/WorldPackLoader.ts (2)

643-643: NPC의 기본 존이 'plaza'로 설정되어 있으나, entryZone이 'lobby'로 변경되었습니다.

parseNpcDefinition에서 존 정보가 없는 NPC의 기본값이 'plaza'입니다. 매니페스트의 entryZone'lobby'로 변경된 점을 고려하면 기본값도 'lobby'로 맞추는 것이 더 일관성 있습니다. 다만 이는 malformed 데이터에 대한 폴백이므로 영향은 제한적입니다.

♻️ 기본 존 변경 제안
-      zone: (raw.zone as ZoneId) ?? 'plaza',
+      zone: (raw.zone as ZoneId) ?? 'lobby',

549-562: ZONE_BOUNDS 상수를 공유 패키지에서 임포트하여 중복을 제거하세요.

8개 존의 경계값이 올바르게 정의되어 있으며 기존 테스트와 타입정의와 일치합니다. 다만 packages/shared/src/world.tsZONE_BOUNDS 상수와 완전히 동일한 값이 중복 정의되어 있습니다. @openclawworld/shared에서 ZONE_BOUNDS를 임포트하여 사용하면 단일 소스에서 관리할 수 있으며, 향후 값 변경 시 불일치를 방지할 수 있습니다. ZoneSystem.ts에서 getZoneBoundsMap()을 임포트하는 패턴을 참고하세요.

Comment on lines 26 to 33
const ZONE_FLOOR_TYPES: Map<TileType, ZoneId> = new Map([
['floor_plaza', 'plaza'],
['floor_north', 'north-block'],
['floor_west', 'west-block'],
['floor_east', 'east-block'],
['floor_south', 'south-block'],
['floor_north', 'office'],
['floor_west', 'meeting'],
['floor_east', 'arcade'],
['floor_south', 'lounge-cafe'],
['floor_lake', 'lake'],
]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check zone detection logic and ZONE_BOUNDS fallback
echo "=== getZoneAt usages ==="
rg -n 'getZoneAt' --type=ts -C3

echo ""
echo "=== ZONE_BOUNDS definition and usage ==="
rg -n 'ZONE_BOUNDS' --type=ts -C3

echo ""
echo "=== Zone detection logic ==="
rg -nP 'zoneId|currentZone|detectZone|findZone' --type=ts -C2 -g '!*test*' -g '!*.d.ts' | head -100

Repository: Two-Weeks-Team/openClawWorld

Length of output: 27553


🏁 Script executed:

#!/bin/bash
# Check ZONE_FLOOR_TYPES definition in TileInterpreter.ts
echo "=== ZONE_FLOOR_TYPES definition ==="
rg -n 'ZONE_FLOOR_TYPES' --type=ts -B2 -A15

echo ""
echo "=== getTileAt implementation ==="
rg -n 'getTileAt' --type=ts -B2 -A20 -g '!*test*'

Repository: Two-Weeks-Team/openClawWorld

Length of output: 6842


🏁 Script executed:

#!/bin/bash
# Find COLOR_RANGES definition to see what tile types exist for lobby/central-park
echo "=== COLOR_RANGES definition ==="
rg -n 'COLOR_RANGES' --type=ts -B5 -A30

echo ""
echo "=== Check if there are any other tile types or zone detection ==="
rg -n "floor_|grass|wood" --type=ts | head -50

echo ""
echo "=== Check how getZoneAt is actually used in the codebase ==="
rg -n 'getZoneAt\|\.zoneId' --type=ts -B2 -A2 -g '!*test*'

Repository: Two-Weeks-Team/openClawWorld

Length of output: 8583


🏁 Script executed:

#!/bin/bash
# Check how zones are tracked on client side and server side
echo "=== Check ZoneSystem detectZone implementation ==="
rg -n 'detectZone' --type=ts -B5 -A30

echo ""
echo "=== Check if there's a client-side zone system or alternative detection ==="
rg -n 'currentZone|zoneId.*=' --type=ts -g '!*test*' -B2 -A2 | head -80

echo ""
echo "=== Check EntityData zoneId tracking ==="
rg -n 'EntityData|currentZone' --type=ts -g '!*test*' -A3 | head -100

Repository: Two-Weeks-Team/openClawWorld

Length of output: 39286


🏁 Script executed:

#!/bin/bash
# Check if getZoneAt is used for actual gameplay logic or just display
echo "=== Usages of getZoneAt in codebase ==="
rg -n 'getZoneAt\(' --type=ts -B3 -A3 -g '!*test*'

echo ""
echo "=== How zones are determined on client side ==="
rg -n 'currentZone.*=' --type=ts -g '!*test*' -B2 -A2 | head -60

Repository: Two-Weeks-Team/openClawWorld

Length of output: 4581


ZONE_FLOOR_TYPES 맵이 불완전함 - lobby와 central-park 존 누락

ZONE_FLOOR_TYPES에서 lobby와 central-park가 빠져 있습니다. 다만 이는 실제 존 판별 시스템에 영향을 주지 않습니다. 서버의 ZoneSystem.detectZone()이 좌표 기반 ZONE_BOUNDS를 사용하여 존을 판별하고, 클라이언트는 동기화된 entity.currentZone으로 존 정보를 받기 때문입니다. TileInterpreter.getZoneAt()은 정의되었으나 실제 게임플레이에서 사용되지 않습니다.

ZONE_FLOOR_TYPES 맵을 완성하여 일관성을 개선하세요:

const ZONE_FLOOR_TYPES: Map<TileType, ZoneId> = new Map([
  ['floor_plaza', 'plaza'],
  ['floor_north', 'office'],
  ['floor_west', 'meeting'],
  ['floor_east', 'arcade'],
  ['floor_south', 'lounge-cafe'],
  ['floor_lake', 'lake'],
  // lobby과 central-park을 위한 타일 타입 추가 필요
]);
🤖 Prompt for AI Agents
In `@packages/client/src/world/TileInterpreter.ts` around lines 26 - 33,
ZONE_FLOOR_TYPES is missing mappings for the lobby and central-park zones;
update the Map in TileInterpreter.ts to include appropriate tile-type → zone-id
entries (e.g., add 'floor_lobby' -> 'lobby' and 'floor_central_park' ->
'central-park' or whatever naming convention your TileType uses) so
ZONE_FLOOR_TYPES covers lobby and central-park; ensure these keys match existing
TileType enums/usages and that TileInterpreter.getZoneAt remains consistent with
the added entries.

Comment on lines +5 to +7
"spawnPoints": [{ "x": 288, "y": 1120 }],
"npcs": ["meeting-host"],
"facilities": ["meeting-room-a", "meeting-room-c", "schedule-board", "whiteboard"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n world/packs/base/maps/_archive/meeting.json

Repository: Two-Weeks-Team/openClawWorld

Length of output: 4684


🏁 Script executed:

rg "meeting-room-b" --type json

Repository: Two-Weeks-Team/openClawWorld

Length of output: 54


🏁 Script executed:

rg "meeting-room-" --type json | head -30

Repository: Two-Weeks-Team/openClawWorld

Length of output: 679


spawnPoints와 objects 레이어의 spawn 위치가 불일치하고, 시설 이름이 맞지 않습니다.

상위 spawnPoints(288, 1120)이지만 objects 레이어의 spawn 오브젝트(라인 73-74)는 (160, 160)입니다. 맵 데이터를 참조하는 로직에 따라 어느 값이 사용될지 달라질 수 있으므로 두 값을 일치시켜야 합니다.

또한 facilities 목록에는 "meeting-room-a", "meeting-room-c"가 있지만, 실제 objects 레이어의 room 오브젝트는 "meeting-room-1""meeting-room-2" (라인 80, 90)입니다. 이름 체계가 일치하지 않습니다.

🤖 Prompt for AI Agents
In `@world/packs/base/maps/_archive/meeting.json` around lines 5 - 7, 상위 JSON의
spawnPoints(현재 { "x": 288, "y": 1120 })와 objects 레이어의 spawn 오브젝트 좌표(현재 { "x":
160, "y": 160 })가 불일치하므로 둘 중 하나를 선택해 동일한 좌표로 맞추고, facilities 배열에 있는
"meeting-room-a" 및 "meeting-room-c" 명칭을 objects 레이어의 실제 오브젝트 id인
"meeting-room-1" 및 "meeting-room-2"로 변경해 네이밍을 일치시키세요; 변경 대상 키: spawnPoints,
objects 레이어의 spawn 오브젝트, facilities 배열의 항목("meeting-room-a"/"meeting-room-c" →
"meeting-room-1"/"meeting-room-2").

Comment on lines +4 to +7
"bounds": { "x": 1216, "y": 1216, "width": 512, "height": 512 },
"spawnPoints": [{ "x": 1440, "y": 1440 }],
"npcs": ["fountain-keeper"],
"facilities": ["fountain", "bench-1", "bench-2"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

spawnPoints와 objects 레이어의 spawn 좌표 불일치

spawnPoints(1440, 1440)으로 업데이트되었지만, objects 레이어(Line 125-126)의 spawn 오브젝트는 여전히 (480, 640)입니다. 아카이브 파일이므로 즉각적인 영향은 제한적이지만, 이 파일을 향후 참조용으로 사용한다면 혼동을 야기할 수 있습니다.

🤖 Prompt for AI Agents
In `@world/packs/base/maps/_archive/plaza.json` around lines 4 - 7, spawnPoints 값이
(1440, 1440)으로 변경되었는데 objects 레이어의 spawn 오브젝트는 여전히 (480, 640)으로 불일치합니다;
plaza.json 내 "spawnPoints"와 objects 레이어의 spawn 오브젝트 좌표(현재 480,640)를 동일하게 맞추도록
objects 레이어의 해당 spawn 오브젝트의 x와 y 값을 1440,1440으로 수정하거나 두 위치가 의도적으로 다르다면 주석/설명 필드로
이유를 명확히 남겨 일관성을 유지하세요.

Comment on lines +7 to +10
"schedule": [
{ "startHour": 9, "endHour": 18, "state": "working", "position": { "x": 1728, "y": 256 } },
{ "startHour": 12, "endHour": 13, "state": "break", "position": { "x": 800, "y": 1440 } }
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's find TypeScript/JavaScript files that handle schedule logic
fd -t f -e ts -e js | grep -E "(schedule|npc)" | head -20

Repository: Two-Weeks-Team/openClawWorld

Length of output: 54


🏁 Script executed:

# Search for schedule-related code in the codebase
rg -n "schedule|startHour|endHour" --type ts --type js -A 3 | head -100

Repository: Two-Weeks-Team/openClawWorld

Length of output: 5984


🏁 Script executed:

# Look for the it-help.json file to confirm its location
fd -t f -name "it-help.json"

Repository: Two-Weeks-Team/openClawWorld

Length of output: 302


🏁 Script executed:

# Find it-help.json file
find . -name "it-help.json" -o -name "*it-help*"

Repository: Two-Weeks-Team/openClawWorld

Length of output: 108


🏁 Script executed:

# Search for schedule resolution/processing logic
rg -A 20 "schedule: Array.isArray" --type ts packages/server/src/world/WorldPackLoader.ts

Repository: Two-Weeks-Team/openClawWorld

Length of output: 798


🏁 Script executed:

# Search for NPC state handling or schedule conflict resolution
rg -n "state.*working|state.*break" --type ts --type json

Repository: Two-Weeks-Team/openClawWorld

Length of output: 2369


🏁 Script executed:

# Look for all NPC-related json files to understand the structure
fd -t f -name "*.json" -path "*/npcs/*"

Repository: Two-Weeks-Team/openClawWorld

Length of output: 302


🏁 Script executed:

cat ./world/packs/base/npcs/it-help.json

Repository: Two-Weeks-Team/openClawWorld

Length of output: 1482


🏁 Script executed:

# Search for schedule state resolution logic - look for how the system determines which state to use
rg -B 5 -A 10 "schedule.*filter|schedule.*find|schedule.*reduce" --type ts

Repository: Two-Weeks-Team/openClawWorld

Length of output: 54


🏁 Script executed:

# Search for NPC state determination logic
rg -B 3 -A 10 "getCurrentState|getState|state.*schedule" --type ts packages/server/src

Repository: Two-Weeks-Team/openClawWorld

Length of output: 7551


🏁 Script executed:

# Search for where NPC schedules are used/applied at runtime
rg -B 3 -A 10 "\.schedule|currentSchedule|getSchedule" --type ts packages/server/src

Repository: Two-Weeks-Team/openClawWorld

Length of output: 7264


🏁 Script executed:

# Look for NPC movement or position determination logic
rg -B 3 -A 10 "getNpcPosition|NpcBot|position.*schedule" --type ts packages/server/src

Repository: Two-Weeks-Team/openClawWorld

Length of output: 54


🏁 Script executed:

# Check if there's any filtering or matching of schedule items
rg -B 5 -A 10 "filter.*schedule|find.*schedule|schedule.*find|schedule.*filter" --type ts

Repository: Two-Weeks-Team/openClawWorld

Length of output: 54


🏁 Script executed:

# Read the complete WorldPackLoader schedule mapping section
sed -n '640,680p' packages/server/src/world/WorldPackLoader.ts

Repository: Two-Weeks-Team/openClawWorld

Length of output: 1456


🏁 Script executed:

# Check if startHour/endHour is handled anywhere
rg -B 5 -A 15 "startHour|endHour" --type ts packages/server/src

Repository: Two-Weeks-Team/openClawWorld

Length of output: 54


🏁 Script executed:

# Check the NPC type definition to see what format is expected
rg -B 5 -A 20 "type.*NpcDefinition|interface.*NpcDefinition" packages/

Repository: Two-Weeks-Team/openClawWorld

Length of output: 4908


🏁 Script executed:

# Check if there's any code that handles startHour/endHour format transformation
rg -B 10 -A 10 "startHour|endHour" --type ts packages/server/src

Repository: Two-Weeks-Team/openClawWorld

Length of output: 54


🏁 Script executed:

# Check if there are other schedule formats or if this has been recently changed
git log --oneline --all --grep="schedule\|npc" | head -20

Repository: Two-Weeks-Team/openClawWorld

Length of output: 289


🏁 Script executed:

# Look at the complete NPC loading flow
sed -n '620,700p' packages/server/src/world/WorldPackLoader.ts

Repository: Two-Weeks-Team/openClawWorld

Length of output: 2634


스케줄 형식이 시스템과 호환되지 않습니다.

JSON 파일의 스케줄은 startHour/endHour 형식을 사용하지만, 코드는 time 필드(HH:MM 형식)를 기대합니다. WorldPackLoader가 time 필드를 찾지 못하면 '00:00'으로 기본값을 지정하므로, 모든 스케줄 항목이 자정에 실행됩니다.

스케줄 형식을 통일해야 합니다:

  • JSON 파일을 { "time": "09:00", "state": "working", "location": {...} } 형식으로 변경하거나
  • WorldPackLoader를 startHour/endHour 형식을 파싱하도록 수정하세요
🤖 Prompt for AI Agents
In `@world/packs/base/npcs/it-help.json` around lines 7 - 10, The schedule entries
in world/packs/base/npcs/it-help.json use startHour/endHour but the loader
expects a time field ("HH:MM") so entries default to '00:00'; either convert the
JSON schedule objects to use "time" (e.g., "09:00") and rename position→location
if needed, or update WorldPackLoader to accept startHour/endHour by parsing
those integers into a "time" string (or mapping to start/end time ranges) before
validation; locate references to the "schedule" array in the NPC JSON and the
WorldPackLoader parsing/validation logic (function/method names referencing
WorldPackLoader, schedule parsing, or time normalization) and implement the
chosen conversion so all schedule items produce the expected "time" field for
downstream code.

- Format JSON map files with Prettier
- Fix docs: update objects layer description to reflect actual usage
- Fix docs: remove broken link to archived map_spec.md
- Fix docs: correct collision value from 2 to 1 for blocked tiles
- Move ZONE_DISPLAY_NAMES to shared package for reusability
- Update tile ID table in docs to include all zone-specific tiles (7, 9, 13)
- Update ranger NPC dialogue to match central-park zone context
- Update greeter.json directions to match new zone layout
- Fix office-pm.json dialogue ('north block' → 'office')
- Track zone label backgrounds to prevent memory leak
- README.md: Complete rewrite with true vision
  - 'Space = State Machine' as core principle
  - Spatial Permission, Presence Awareness, Behavior Triggers, Persistence
  - 4-phase roadmap (World Exists -> Social Space -> AI Coexistence -> Work World)
  - Clear differentiation: not a game, not metaverse, but Spatial OS for AI

- PRD-INDEX.md: Update Executive Summary and Vision
  - Version bump to 2.0
  - Add product roadmap phases
  - Define core concepts (Spatial Permission, Presence Awareness, etc.)
  - Phase 4 vision: Slack + Discord + Notion + Office + AI Agent

- Minor updates to demo-runbook.md and map_spec_grid_town.md
Resolve conflicts:
- ZoneBanner.ts: Use 'Meeting Room' display name
- TileInterpreter.ts: Use office zone mapping for floor_north
- WorldPackLoader.ts: Keep extractBuildingEntrances with Zod validation,
  use ZONE_BOUNDS from shared, keep PR #80's facility zone mappings
- Test files: Accept main version (already verified)
- types.ts/schemas.ts: Accept main version with type safety improvements
@github-actions github-actions bot removed the tests label Feb 12, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/PRD-INDEX.md (1)

1093-1097: ⚠️ Potential issue | 🟡 Minor

문서 버전 이력 누락

문서 헤더(라인 3)에는 Version: 2.0으로 표시되어 있지만, Document History 섹션에는 버전 1.0만 기록되어 있습니다. 버전 2.0의 변경 내역이 누락되었습니다.

버전 관리 모범 사례에 따라, 주요 버전 업데이트(1.0 → 2.0)에는 변경 사항 요약이 포함되어야 합니다. 특히 Executive Summary, Vision, Roadmap 등 문서의 핵심 섹션이 대폭 재작성되었으므로 이를 이력에 기록해야 합니다.

제안: 버전 2.0 이력 추가
 ## Document History
 
 | Version | Date | Changes |
 |---------|------|---------|
 | 1.0 | 2026-02-10 | Initial PRD created |
+| 2.0 | 2026-02-12 | Major reframe: Positioned as Spatial AI Collaboration OS; Added phase-based roadmap (Phase 1-4); Rewrote Executive Summary and Vision with "Space = State Machine" principle; Status updated to Active Development |
packages/client/src/game/scenes/GameScene.ts (1)

724-727: ⚠️ Potential issue | 🟡 Minor

디버그 범례 배경 높이가 8개 존 콘텐츠를 수용하기에 부족합니다.

디버그 항목 4개(64px) + 구분자(18px) + 존 8개(128px) + 제목/패딩(~24px) = 약 234px의 콘텐츠가 렌더링되지만, 배경 높이는 200px로 고정되어 있어 하단 존 항목(Plaza, Lake 등)이 배경 밖으로 넘칩니다.

🐛 수정 제안
     const bg = this.add.graphics();
     bg.fillStyle(0x000000, 0.85);
-    bg.fillRoundedRect(0, 0, 180, 200, 6);
+    bg.fillRoundedRect(0, 0, 180, 250, 6);
     this.debugLegend.add(bg);
🤖 Fix all issues with AI agents
In `@docs/reference/map-sync-process.md`:
- Around line 245-254: The lounge-cafe west entrance row in the table currently
lists pixel coordinates as (576, 1408) but the map JSON (village.json) and tile
calc (tile 18,46 → 46×32=1472) show it should be (576, 1472); update the table
entry for the "lounge-cafe" west direction (the row with "lounge-cafe | west")
to use (576, 1472) and verify the value matches village.json tile coordinates.
- Around line 122-130: The Ground Tile vs Collision table entry labels are
incorrect: update the row that currently reads "5 (lounge)" to "5 (wood floor)"
(or "5 (Wood Floor) - used in Lobby/Meeting/Lounge") and change the row that
reads "6 (plaza)" to "6 (forest)"; if you intended a Plaza/Sand entry add or
replace with "7 (sand)" instead of using 6. Locate the table with header "Ground
Tile | Collision | Result" and the rows containing "4 (building)", "5 (lounge)",
"6 (plaza)", etc., and correct the tile names and any resulting descriptive text
(e.g., replace plaza → sand/plaza with tile ID 7 and ensure Forest is described
for tile 6).

In `@packages/client/public/assets/maps/village.json`:
- Line 11: nextobjectid is incorrectly set to 1 causing ID collisions when Tiled
adds new objects; update the "nextobjectid" value in the JSON to a value >= 25
(one greater than the current max object id 24) so future auto-assigned object
IDs won't clash with existing objects — change the JSON property "nextobjectid"
to 25 (or higher) in the map data where "nextobjectid" is defined.

In `@packages/server/assets/maps/village.json`:
- Around line 10-11: The nextobjectid in this map is set to 1 but object IDs in
the object layer go up to 24; open the source map (grid_town_outdoor.json) in
Tiled, update the map's "nextobjectid" (symbol: nextobjectid) to a value greater
than the highest existing object ID (e.g., 25 or maxID+1), save the source map,
and run the sync script so the change is propagated to
packages/server/assets/maps/village.json to avoid ID collisions when adding new
objects.

In `@world/packs/base/maps/grid_town_outdoor.json`:
- Around line 10-11: 소스 맵 파일의 nextobjectid 값이 실제 사용된 오브젝트 ID(최대 24)보다 낮아 Tiled
편집 시 ID 충돌을 유발합니다; grid_town_outdoor.json 내의 "nextobjectid" 키 값을 현재 사용된 최대 ID
24보다 큰 정수(예: 25 이상)로 업데이트하여 다음 생성되는 오브젝트에 대해 고유한 ID가 할당되도록 수정하세요.

In `@world/packs/base/npcs/greeter.json`:
- Around line 22-27: The greeter's "about-town" and "directions" dialog entries
are missing any mention of the lake zone; update the "text" for the "about-town"
entry and the "text" for the "directions" entry in greeter.json (IDs
"about-town" and "directions") to include a short mention of the lake (e.g.,
location relative to Central Park and a one‑line note about activities or a
landmark) so the greeter references all eight zones including "lake".
🧹 Nitpick comments (5)
docs/PRD-INDEX.md (2)

65-65: Phase 4 Vision의 과도한 비교 표현

"Slack + Discord + Notion + Office + AI Agent = OpenClawWorld"라는 비교는 매우 야심찬 주장입니다. 이는 5개의 성숙한 프로덕션 시스템과 동등한 기능을 제공하겠다는 의미로 해석될 수 있습니다.

현재 Phase 1 범위와 이러한 비전 간의 격차가 매우 크므로, 이 표현이 외부 이해관계자나 투자자에게 오해를 불러일으킬 수 있습니다. 더 현실적인 표현으로 수정하거나, "inspired by" 또는 "combining elements of" 같은 한정어를 추가하는 것을 고려하세요.


67-67: 용어 일관성 개선 필요

섹션 제목이 "MVP Goals (Phase 1)"로 변경되었지만, 문서 전체에서 "MVP"와 "Phase 1"이 혼용되고 있습니다 (예: 라인 76 "Non-Goals (MVP)", 라인 82 "Success Metrics (MVP)").

프로젝트에서 "MVP"와 "Phase 1"을 동일한 개념으로 사용하는지, 아니면 구별되는 개념인지 명확히 하고, 문서 전체에서 일관된 용어를 사용하는 것이 좋습니다.

제안: 용어 통일 방안

옵션 1: Phase 1으로 통일

-### MVP Goals (Phase 1)
+### Phase 1 Goals

-### Non-Goals (MVP)
+### Non-Goals (Phase 1)

-### Success Metrics (MVP)
+### Success Metrics (Phase 1)

옵션 2: 관계 명시

-### MVP Goals (Phase 1)
+### Phase 1 Goals (MVP Milestone)

그리고 문서 시작 부분에 "Phase 1 delivers the MVP"라는 설명 추가

docs/reference/map_spec_grid_town.md (1)

31-48: 펜스드 코드 블록에 언어 지정이 없습니다.

정적 분석 도구(markdownlint MD040)에서 Line 31과 Line 151의 코드 블록에 언어가 지정되지 않았다고 경고합니다. ASCII 다이어그램에 text를 지정하면 해결됩니다.

📝 수정 제안

Line 31:

-```
+```text

Line 151:

-```
+```text
packages/client/public/assets/maps/village.json (2)

669-688: arcade.game_cabinet의 name과 type이 불일치합니다.

namearcade.game_cabinet이지만 typegame_table로 되어 있습니다. 이름과 타입의 불일치로 인해, 타입 기반으로 시설을 조회하는 코드에서 혼동이 발생할 수 있습니다. typegame_cabinet으로 변경하거나, 의도적인 차이라면 name을 arcade.game_table로 맞추는 것을 고려해 주세요.


322-478: building_entrance 객체 추가 — 구역 연결 구조가 잘 정의되어 있습니다.

8개 구역 중 건물형 구역(lobby, office, arcade, meeting, lounge-cafe, plaza)의 입구와 connectsTo 속성이 명확하게 설정되어 있어 AI 내비게이션에 유용합니다. 일부 구역에는 양방향 입구도 있습니다(lounge-cafe.entrance_west, meeting.entrance_south).

다만, lake 구역에는 entrance 객체가 없습니다. 호수가 자연 지형이라 의도적으로 생략한 것이라면 괜찮지만, AI 에이전트가 lake 구역으로 진입하는 경로가 필요하다면 entrance 추가를 검토해 주세요. (참고: central-park는 공개 허브 구역으로 entrance 없이 설계된 것으로 보입니다.)

Comment on lines +122 to +130
| Ground Tile | Collision | Result |
|-------------|-----------|--------|
| 4 (building) | 1 | Wall - blocked, dark gray |
| 5 (lounge) | 1 | Interior - blocked, brown |
| 6 (plaza) | 0 | Floor - walkable, gray stone |
| 1 (grass) | 0 | Grass - walkable, green |
| 2 (road) | 0 | Road - walkable, light gray |
| 3 (water) | 1 | Lake - blocked, blue |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Ground + Collision 관계 테이블에 타일 ID 오류가 있습니다.

Line 126에서 타일 6을 6 (plaza)로 표기했지만, 위의 타일 ID 테이블(Line 64)에 따르면 타일 6은 **Forest(Dark green trees)**입니다. Plaza는 타일 **7(Sand)**을 사용합니다. 또한 Line 125의 5 (lounge) 라벨도 부정확합니다—타일 5(Wood Floor)는 Lobby, Meeting, Lounge 세 존에서 사용됩니다.

📝 수정 제안
-| 5 (lounge) | 1 | Interior - blocked, brown |
-| 6 (plaza) | 0 | Floor - walkable, gray stone |
+| 5 (wood floor) | 1 | Interior - blocked, brown |
+| 6 (forest) | 0 | Forest - walkable, dark green |
+| 7 (sand) | 0 | Plaza floor - walkable, beige |
🤖 Prompt for AI Agents
In `@docs/reference/map-sync-process.md` around lines 122 - 130, The Ground Tile
vs Collision table entry labels are incorrect: update the row that currently
reads "5 (lounge)" to "5 (wood floor)" (or "5 (Wood Floor) - used in
Lobby/Meeting/Lounge") and change the row that reads "6 (plaza)" to "6
(forest)"; if you intended a Plaza/Sand entry add or replace with "7 (sand)"
instead of using 6. Locate the table with header "Ground Tile | Collision |
Result" and the rows containing "4 (building)", "5 (lounge)", "6 (plaza)", etc.,
and correct the tile names and any resulting descriptive text (e.g., replace
plaza → sand/plaza with tile ID 7 and ensure Forest is described for tile 6).

Comment on lines +245 to +254
| Zone | Direction | Pixel Position | Connects To |
|------|-----------|----------------|-------------|
| lobby | south | (352, 416) | central-park |
| office | west | (1344, 256) | lobby/road |
| arcade | west | (1408, 736) | central-park |
| meeting | east | (544, 1152) | central-park |
| meeting | south | (320, 1440) | lounge-cafe |
| lounge-cafe | north | (864, 1216) | central-park |
| lounge-cafe | west | (576, 1408) | meeting |
| plaza | north | (1440, 1216) | central-park |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

lounge-cafe 서쪽 입구의 픽셀 좌표가 실제 맵 데이터와 불일치합니다.

Line 253에서 lounge-cafe 서쪽 입구 위치를 (576, 1408)로 기재했지만, 실제 맵 JSON(village.json)에서는 x: 576, y: 1472입니다. 타일 좌표 (18, 46)으로 계산해도 46 × 32 = 1472이므로 올바른 값은 **(576, 1472)**입니다.

📝 수정 제안
-| lounge-cafe | west | (576, 1408) | meeting |
+| lounge-cafe | west | (576, 1472) | meeting |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Zone | Direction | Pixel Position | Connects To |
|------|-----------|----------------|-------------|
| lobby | south | (352, 416) | central-park |
| office | west | (1344, 256) | lobby/road |
| arcade | west | (1408, 736) | central-park |
| meeting | east | (544, 1152) | central-park |
| meeting | south | (320, 1440) | lounge-cafe |
| lounge-cafe | north | (864, 1216) | central-park |
| lounge-cafe | west | (576, 1408) | meeting |
| plaza | north | (1440, 1216) | central-park |
| Zone | Direction | Pixel Position | Connects To |
|------|-----------|----------------|-------------|
| lobby | south | (352, 416) | central-park |
| office | west | (1344, 256) | lobby/road |
| arcade | west | (1408, 736) | central-park |
| meeting | east | (544, 1152) | central-park |
| meeting | south | (320, 1440) | lounge-cafe |
| lounge-cafe | north | (864, 1216) | central-park |
| lounge-cafe | west | (576, 1472) | meeting |
| plaza | north | (1440, 1216) | central-park |
🤖 Prompt for AI Agents
In `@docs/reference/map-sync-process.md` around lines 245 - 254, The lounge-cafe
west entrance row in the table currently lists pixel coordinates as (576, 1408)
but the map JSON (village.json) and tile calc (tile 18,46 → 46×32=1472) show it
should be (576, 1472); update the table entry for the "lounge-cafe" west
direction (the row with "lounge-cafe | west") to use (576, 1472) and verify the
value matches village.json tile coordinates.

Comment on lines +22 to +27
"text": "Grid-Town is a vibrant community hub! Central Park is our heart, surrounded by the office and arcade to the east, meeting rooms to the left, the lounge cafe below, and the plaza for gatherings!",
"options": [{ "text": "Sounds great!", "next": null }]
},
"directions": {
"id": "directions",
"text": "North has the office block with workstations. West has the cafe - Jamie makes great coffee! East has meeting rooms. South has the arcade for fun. And the lake is perfect for a peaceful walk!",
"text": "Head through Central Park to reach everywhere! The office and arcade are to the east. Meeting rooms are on the left side. The lounge cafe is down south - Jamie makes great coffee! And don't miss the plaza fountain!",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Lake 존이 NPC 대사에서 누락되어 있습니다.

PR에서 8개 존 시스템(lobby, office, central-park, arcade, meeting, lounge-cafe, plaza, lake)을 정의하고 있으나, about-towndirections 대사 모두에서 lake 존에 대한 안내가 빠져 있습니다. Greeter가 마을 안내 역할이므로, lake도 언급해주는 것이 좋을 것 같습니다.

💬 대사 수정 제안
-      "text": "Grid-Town is a vibrant community hub! Central Park is our heart, surrounded by the office and arcade to the east, meeting rooms to the left, the lounge cafe below, and the plaza for gatherings!",
+      "text": "Grid-Town is a vibrant community hub! Central Park is our heart, surrounded by the office and arcade to the east, meeting rooms to the left, the lounge cafe below, the plaza for gatherings, and a beautiful lake to relax by!",
-      "text": "Head through Central Park to reach everywhere! The office and arcade are to the east. Meeting rooms are on the left side. The lounge cafe is down south - Jamie makes great coffee! And don't miss the plaza fountain!",
+      "text": "Head through Central Park to reach everywhere! The office and arcade are to the east. Meeting rooms are on the left side. The lounge cafe is down south - Jamie makes great coffee! Don't miss the plaza fountain, and take a stroll by the lake!",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"text": "Grid-Town is a vibrant community hub! Central Park is our heart, surrounded by the office and arcade to the east, meeting rooms to the left, the lounge cafe below, and the plaza for gatherings!",
"options": [{ "text": "Sounds great!", "next": null }]
},
"directions": {
"id": "directions",
"text": "North has the office block with workstations. West has the cafe - Jamie makes great coffee! East has meeting rooms. South has the arcade for fun. And the lake is perfect for a peaceful walk!",
"text": "Head through Central Park to reach everywhere! The office and arcade are to the east. Meeting rooms are on the left side. The lounge cafe is down south - Jamie makes great coffee! And don't miss the plaza fountain!",
"text": "Grid-Town is a vibrant community hub! Central Park is our heart, surrounded by the office and arcade to the east, meeting rooms to the left, the lounge cafe below, the plaza for gatherings, and a beautiful lake to relax by!",
"options": [{ "text": "Sounds great!", "next": null }]
},
"directions": {
"id": "directions",
"text": "Head through Central Park to reach everywhere! The office and arcade are to the east. Meeting rooms are on the left side. The lounge cafe is down south - Jamie makes great coffee! Don't miss the plaza fountain, and take a stroll by the lake!",
🤖 Prompt for AI Agents
In `@world/packs/base/npcs/greeter.json` around lines 22 - 27, The greeter's
"about-town" and "directions" dialog entries are missing any mention of the lake
zone; update the "text" for the "about-town" entry and the "text" for the
"directions" entry in greeter.json (IDs "about-town" and "directions") to
include a short mention of the lake (e.g., location relative to Central Park and
a one‑line note about activities or a landmark) so the greeter references all
eight zones including "lake".

- WorldPackLoader: Add facility ID normalization (underscore to hyphen)
  and add missing game-table arcade mapping
- GameScene: Fix memory leak by destroying zoneNameLabels and
  zoneNameBackgrounds in shutdown()
- it-help.json: Fix schedule time overlap by splitting working hours
  around break period
- Map files: Fix nextobjectid to 25 to prevent ID collisions
@ComBba ComBba merged commit bbce4d2 into main Feb 12, 2026
11 checks passed
@ComBba ComBba deleted the feat/zone-system-improvements branch February 12, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client documentation Improvements or additions to documentation server shared size/XL world

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant