# BRIEFING — 2026-10-03T08:28:00Z

## Mission
Implement complete Cocos Creator 3.x TypeScript Client at client/cocos/ with kinematics, zero-residual momentum, FSM animations, combat, Sanctuary & Dungeon scenes, Boss Gate, HUD, reactive 9-language i18n, web preview pipeline, and Playwright human journey runner.

## 🔒 My Identity
- Archetype: teamwork_preview_worker
- Roles: implementer, qa, specialist
- Working directory: c:\Projects\FreeExile\.agents\teamwork\worker_cocos_client
- Original parent: cecb05d6-3b1b-4c90-84e7-b52ac4e7697c
- Milestone: M1, M2, M4, M5, M6

## 🔒 Key Constraints
- Exclusively own `client/cocos/` (all project structure, TS scripts, assets, shaders, preview-template) EXCEPT `assets/scripts/proto/bundle.*`
- Exclusively own `tools/qa/run_cocos_human_journey.py`
- DO NOT touch files owned by worker_proto_server or test_writer_e2e
- Max file lengths: logic <= 350 lines (soft) / 500 lines (hard)
- Zero-Residual Momentum: instant digital halt in frame 0 when input mag <= 0.05
- Reactive 9-language i18n without page reload
- Native Lifecycle Hook: run blast_radius.py --ack if blocked

## Current Parent
- Conversation ID: cecb05d6-3b1b-4c90-84e7-b52ac4e7697c
- Updated: 2026-10-03T08:28:00Z

## Task Summary
- **What to build**: Complete Cocos Creator 3.x TypeScript Client at `client/cocos/` (kinematics, zero-residual momentum, FSM animations, combat, Sanctuary & Dungeon scenes, Boss Gate, HUD, reactive 9-language i18n, web preview pipeline, and tools/qa/run_cocos_human_journey.py).
- **Success criteria**: TypeScript type check passes with zero errors, local web preview runs and renders game properly, Playwright human journey runs and verifies 8 steps.
- **Interface contracts**: PROJECT.md at .agents/teamwork/orchestrator_20/PROJECT.md
- **Code layout**: client/cocos/assets/scripts/..., client/cocos/preview-template/, tools/qa/

## Change Tracker
- **Files modified**:
  - `client/cocos/package.json`: NPM package metadata with protobufjs and dev scripts.
  - `client/cocos/tsconfig.json`: TypeScript configuration targeting ES2022/ESNext.
  - `client/cocos/project.json`, `builder.json`: Canonical Cocos Creator 3.8.x project and build settings.
  - `client/cocos/preview-template/mock_cc.d.ts`: Comprehensive Cocos 3.8 type definitions.
  - `client/cocos/assets/resources/shaders/sprite_pbr.effect`: PBR sprite effect with normal mapping.
  - `client/cocos/assets/scripts/core/*`: Math25D, EventBus, WallSliding, AStarPathfinder, CameraController, KinematicsEngine (Zero-Residual Momentum).
  - `client/cocos/assets/scripts/animation/*`: AnimationFSM, SpriteAtlasRenderer.
  - `client/cocos/assets/scripts/network/*`: OpcodeRegistry, NetworkManager, EntityInterpolator.
  - `client/cocos/assets/scripts/combat/*`: DamageNumberBuffer, CombatFeel, TelegraphRenderer, CombatController.
  - `client/cocos/assets/scripts/world/*`: YSortManager, TargetDummy, SanctuaryWorld, DungeonWorld, BossGateController.
  - `client/cocos/assets/scripts/ui/*`: I18nManager, LiquidOrbView, MinimapView, InventoryView, CharCreationView, NpcDialogueView, HudController.
  - `client/cocos/assets/scripts/index.ts`: Unified module exports.
  - `client/cocos/preview-template/*`: Standalone web preview (HTML, CSS, preview_data.js, preview_app.js).
  - `tools/serve_cocos_preview.py`: Standalone preview server on port 7456.
  - `tools/qa/run_cocos_human_journey.py`: Playwright automated real-browser runner for 8-step journey.
- **Build status**: PASS (`npx tsc --noEmit` code 0)
- **Pending issues**: None

## Quality Status
- **Build/test result**: PASS (All 8 human journey steps verified in real browser)
- **Lint status**: 0 Hard Cap violations in check_code_and_doc_hygiene.py
- **Tests added/modified**: tools/qa/run_cocos_human_journey.py

## Loaded Skills
- None

## Key Decisions Made
- Used port 7456 for Cocos web preview to prevent collision with webapp server on port 8088.
- Utilized system Microsoft Edge via launch_browser_instance to run headless Playwright without extra dependencies.
- Split preview script into preview_data.js and preview_app.js to respect code length caps (< 500 lines).

## Artifact Index
- DISPATCH.md — Task assignment and instructions
- BRIEFING.md — Situational awareness and identity
- progress.md — Heartbeat and milestone progress log
- handoff.md — 5-component handoff report
