Skip to content

feat(phase-23): Council Persona Foundation#11

Merged
moyunzero merged 26 commits into
mainfrom
phase/23-council-persona-foundation
Jun 25, 2026
Merged

feat(phase-23): Council Persona Foundation#11
moyunzero merged 26 commits into
mainfrom
phase/23-council-persona-foundation

Conversation

@moyunzero

@moyunzero moyunzero commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add 12-seat council persona registry (packages/shared/src/council/) with LOCKED dossiers, voting leanings (4/3/5 split), and formatPersonaPromptBlock (≤800 chars) for speak injection
  • Wire __council__ memory scope: async idempotent LTM seed on room create, speak isolation (buildMemoryContext rejects council playerId), worker fetch_council_memory_context stub — documented in CONTRACTS C-07
  • Extend ambient schedules to npc-1..12; align worker ambient intent display names with registry (莫玄虚 / 阿斯托利亚 / 诸葛知危)
  • Ship read-only「星际议会」drawer panel (12-member roster, expandable dossiers, Chinese relationship labels, parchment styling)
  • UAT follow-ups: 始源区 localization, height rebalance, onboarding coach, legacy panel cleanup, personalTimeline type reservation for Phase 27

Test plan

  • pnpm agent:verify (pre-push hook)
  • pnpm --filter @aetherlife/shared test — 200 passed
  • pnpm --filter @aetherlife/game-server test — 193 passed
  • pnpm --filter @aetherlife/web test — 101 passed
  • cd workers/agent-worker && LLM_MOCK=1 uv run pytest -q — 258 passed
  • Phase 23 UAT 7/7 pass (registry names, council drawer, speak persona differentiation)
  • Merge前建议:pnpm dev:stack + pnpm agent:verify --e2e(GF-01/02/03)

Out of scope (Phase 25+)

  • NPC vote-time __council__ memory consumer (world_vote.py)
  • 12 NPC on-map / Colyseus schema (Phase 26)
  • Dynamic npc_relationships runtime table (Phase 25 REL slice)

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Added a council roster view with richer character details and a new council tab in the in-app drawer.
    • Introduced an onboarding coach for new players.
    • Dialogue now can surface a short memory quote from the last NPC message.
  • Bug Fixes

    • Improved NPC naming consistency across chat, room state, and ambient interactions.
    • Expanded NPC schedules and related behavior coverage for a fuller in-game experience.
  • Documentation

    • Expanded the README and project docs with bilingual overviews, setup guidance, testing notes, and release history.

moyunzero and others added 25 commits June 25, 2026 13:45
- CouncilPersona schema with 12 archetypes and voting leanings
- COUNCIL_NPC_IDS, isCouncilNpcId, getPersona stub
- AETHER_NEXUS_LORE locked world seed export
- Vitest RED scaffold for speakable trio display names

Co-authored-by: Cursor <cursoragent@cursor.com>
- Verbatim council personas from 23-CONTEXT registry_locked
- COUNCIL_PERSONAS partial map and getPersona lookup
- npcPersonas.ts backward-compat barrel

Co-authored-by: Cursor <cursoragent@cursor.com>
- formatPersonaPromptBlock ≤800 chars for speak injection
- mainNpcDisplayName derives from getPersona registry
- createDefaultRoom uses council display names
- Export council API and aetherNexusLore from index.ts

Co-authored-by: Cursor <cursoragent@cursor.com>
- Mechanical copy from registry_locked per D-ARCH-02
- Candy, 白星烬, 瓦伦丁, 纳兰温言, 克里斯 with 11 relationships each

Co-authored-by: Cursor <cursoragent@cursor.com>
- LOCKED dossiers for 楚浅歌, 斯卡蒂, 叶秋水, 海莲娜
- index.ts exports all 12 seats as Record<CouncilNpcId, CouncilPersona>

Co-authored-by: Cursor <cursoragent@cursor.com>
- PERSONA-01: zod parse, 11 relationships, debateStyle on all 12
- PERSONA-05: 4/3/5 leaning distribution + non-unanimous gate
- Core key snapshots per npc; getPersona for npc-1..12

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add personalitySeed.ts with LEANING_BASE + ARCHETYPE_DELTA formula
- Replace hardcoded 3-entry NPC_PERSONALITY_SEED in collectiveMemory.ts
- Expand collectiveMemory.test.ts for 12-way non-uniform spread (D-COLLECTIVE-01/02)

Co-authored-by: Cursor <cursoragent@cursor.com>
- Hand-sync 12 npc-1..npc-12 seeds matching TS personalitySeed.ts
- Update header comment to reference council/personalitySeed.ts

Co-authored-by: Cursor <cursoragent@cursor.com>
- Assert len==12, all values distinct, npc-1 < npc-2 (D-COLLECTIVE-02)
- Replace legacy 3-entry default assertions

Co-authored-by: Cursor <cursoragent@cursor.com>
- seedCouncilMemoriesIfNeeded gates per-npc via getMemoryCount
- Seeds stanceManifestoShort + ltmSeeds at importance 9
- getOrCreate fire-and-forget seed on first record only

Co-authored-by: Cursor <cursoragent@cursor.com>
- buildMemoryContext rejects __council__ for speak paths
- buildCouncilMemoryContext + HTTP route council branch
- fetch_council_memory_context with X-Player-Id __council__

Co-authored-by: Cursor <cursoragent@cursor.com>
- Documents __council__ seed, speak isolation, reset, Phase 25 consumer

Co-authored-by: Cursor <cursoragent@cursor.com>
- Assert npc-1..3 blocks ≤800 chars with council names
- Gate npc-4..12 to empty string per D-SPEAK-02

Co-authored-by: Cursor <cursoragent@cursor.com>
- Mirror TS formatPersonaPromptBlock field selection
- COMPACT_PERSONA inline dict for npc-1..3 only

Co-authored-by: Cursor <cursoragent@cursor.com>
- schema npcId pattern accepts npc-1..npc-12
- persona fields use registry archetype slugs (order_keeper, expansionist, logician)

Co-authored-by: Cursor <cursoragent@cursor.com>
- nine new schedule JSON files with archetype persona slugs
- zones limited to orchard/plaza/pond per D-SCHED-03

Co-authored-by: Cursor <cursoragent@cursor.com>
- loadedScheduleCount expects 12 council seats
- each schedule persona must match getPersona(npcId).archetype

Co-authored-by: Cursor <cursoragent@cursor.com>
- Append build_persona_block after system prompt in social and tool turns
- Gate npc-4..12; preserve memory_summary order after persona block

Co-authored-by: Cursor <cursoragent@cursor.com>
- Replace legacy 路昂/费雪/南宫婉 with 莫玄虚/阿斯托利亚/诸葛知危
- Sync comment references packages/shared/src/npcDisplayNames.ts

Co-authored-by: Cursor <cursoragent@cursor.com>
- readdir filter accepts npc-1 through npc-12 JSON files
- validateNpcSchedulesAgainstRegistry checks persona archetype slug

Co-authored-by: Cursor <cursoragent@cursor.com>
- TDD RED: 12-seat roster assertions for 莫玄虚/海莲娜
- Implement static registry panel from @aetherlife/shared
- Reserve D-UI-03 biography slot (Phase 27)

Co-authored-by: Cursor <cursoragent@cursor.com>
- Extend DrawerTab with council; ShellDrawer renders CouncilRosterPanel
- DialogueBar quick-open button for 议会
- ShellDrawer vitest covers council tab wiring

Co-authored-by: Cursor <cursoragent@cursor.com>
- Mirror discovered-lore / collective-browse shell tokens
- Mobile-friendly details/summary tap targets

Co-authored-by: Cursor <cursoragent@cursor.com>
…eeds

Expect reputation from personalitySeedForNpc + delta instead of hardcoded
pre-registry values after Phase 23-03 council seed derivation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ship Phase 23 follow-ups from council UAT: Chinese relationship labels,
始源区 localization, roster UI improvements, onboarding coach, and
personal timeline type reservation for Phase 27.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch phase/23-council-persona-foundation

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.

Phase 23 changes npc-1 personality seed from -5 to -52; assert
personalitySeedForNpc + delta instead of hardcoded -13.

Co-authored-by: Cursor <cursoragent@cursor.com>
@moyunzero moyunzero merged commit 1b2fa20 into main Jun 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant