Skip to content

feat: org roles & departments with webview profile display - #284

Open
sakuramoon44 wants to merge 1 commit into
pixel-agents-hq:mainfrom
sakuramoon44:feat/org-roles-departments
Open

feat: org roles & departments with webview profile display#284
sakuramoon44 wants to merge 1 commit into
pixel-agents-hq:mainfrom
sakuramoon44:feat/org-roles-departments

Conversation

@sakuramoon44

Copy link
Copy Markdown

Adds an org-chart identity model for agents (name / role / department) and shows it above each character in the office.

What it does

  • Main session = the boss. The user's own detected session is assigned Sakura / 社長(CEO / Claude 4.7) / 役員室, with a fixed look: base sprite char_3 (long hair) + hueShift 320 (pink).
  • Teammates get a department. Spawned teammates / sub-sessions are randomly assigned to one of six departments, each with its model, role label, and duties:
    部署 モデル 役割 担当業務
    エンジニアリング部 Sonnet 4.6 開発担当 コード設計・実装・デバッグ
    マーケティング部 Sonnet 4.6 マーケ担当 戦略・コピーライティング・SNS
    デザイン部 Sonnet 4.6 デザイン担当 UI/UX・ブランディング・ビジュアル
    リサーチ部 Sonnet 4.6 リサーチ担当 市場調査・競合分析・トレンド
    人事部 Haiku 4.5 人事担当 採用・組織設計・人材育成
    財務部 Haiku 4.5 財務担当 予算・コスト分析・財務戦略

Changes

  • server/src/profiles.ts (new): profile + org-chart definitions and assignment helpers.
  • server/src/fileWatcher.ts: assign profiles at session-detection sites.
  • Plumb name/role/department (+palette/hueShift) through AgentState, PersistedAgent, persistence/restore, the agentCreated message, and the asyncapi schema (regenerated messages.ts).
  • webview: store fields on Character; render name・role + a department/duties line in ToolOverlay; apply the fixed palette/hueShift for the main session.
  • colorize.ts: adjustSprite gains a preserveSkin option; the character hue shift skips skin-tone pixels so a pink-haired persona keeps natural (fair) skin instead of turning fully pink.

Verification

npm run build passes (type regen + check-types + lint + esbuild + vite).

Add an org-chart identity model for agents (name / role / department)
and surface it in the office UI.

- server/src/profiles.ts: profile definitions. Main session = Sakura,
  社長(CEO / Claude 4.7), 役員室, fixed look (char_3 + hueShift 320 =
  pink long hair). Teammates are randomly assigned to one of six
  departments (Engineering / Marketing / Design / Research / HR /
  Finance) each with its model (Sonnet 4.6 or Haiku 4.5), role label,
  and duties.
- Assign profiles at session-detection sites in fileWatcher.ts
  (main session -> boss; teammates -> random department).
- Carry name/role/department (+palette/hueShift) through AgentState,
  PersistedAgent, persistence/restore, the agentCreated message, and
  the asyncapi schema (regenerated messages.ts).
- webview: store the fields on Character and render name・role + the
  department/duties line above the character in ToolOverlay; apply the
  fixed palette/hueShift for the main session.
- colorize.ts: adjustSprite gains a preserveSkin option; the character
  hue shift skips skin-tone pixels so a pink-haired persona keeps a
  natural (fair) skin color instead of turning fully pink.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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