Skip to content
Back to skills

Rule Ui Teams

ASecurity

Teams page — the builder, versions, project overrides, the project chat, member sheets. A repository rule for apps/ui/src/renderer/teams/**, apps/ui/src/renderer/components/instruction-*, apps/ui/src/renderer/components/member-*, apps/ui/src/renderer/components/avatar-*, apps/ui/src/renderer/projects/project-team-*, apps/ui/src/renderer/projects/project-detail*, apps/ui/src/renderer/projects/project-page-slots*, apps/ui/src/renderer/components/stage-graph*, apps/ui/src/renderer/chats/pool-slo...

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 17, 2026
ai-agentsgoreactnodeawsperformance

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add geniro-io/geniro-app --skill rule-ui-teams --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rule Ui Teams?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rule Ui Teams
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/geniro-io-rule-ui-teams/badge)](https://www.skillsdirectory.com/skills/geniro-io-rule-ui-teams)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rule-ui-teams
description: "Teams page — the builder, versions, project overrides, the project chat, member sheets. A repository rule for apps/ui/src/renderer/teams/**, apps/ui/src/renderer/components/instruction-*, apps/ui/src/renderer/components/member-*, apps/ui/src/renderer/components/avatar-*, apps/ui/src/renderer/projects/project-team-*, apps/ui/src/renderer/projects/project-detail*, apps/ui/src/renderer/projects/project-page-slots*, apps/ui/src/renderer/components/stage-graph*, apps/ui/src/renderer/chats/pool-slot-control*; read it before editing a file there."
---
<!-- GENERATED by scripts/sync-agent-rules.mjs from .claude/rules/ui-teams.md. DO NOT EDIT: edit the source, then run `pnpm sync:agent-rules`. -->

# Teams

- "Team" is the thing; the noun rule is in the root `AGENTS.md`. The renderer screen is `teams/`, never a canvas: `Teams.tsx` holds the state (load, autosave, the followed builder chat and analysis, dialogs) and draws `teams-library.tsx` (a three-column grid of `components/library-card.tsx` cards, `team-card.tsx`: the portrait, the needs-setup pill, name, two lines of description, members · stages, the project whose default it is, the time, ⋯ on hover; the help line and the only New team in the empty state) or `team-page.tsx` (the 46px `PageHeader` "Teams › name" with the save state beside it — `SaveState`: Saved / Saving… / "The builder chat is changing this team" with Open chat / "Changed elsewhere — your edits are not saved" with Reload — Change with chat and ⋯; then the summary strip `team-summary.tsx` in place of a hero: the portrait, the figures in one line and the needs-setup pill; then Team / Memory / Statistics over `components/tab-strip.tsx`). There is no status bar. The Team tab is Members (rows of `components/member-row.tsx` in one block, "Add member" and the team's instruction-size total in the section header, opening `member-sheet.tsx` — a 420px `SideSheet` beside the page, the page narrowing — with Role / Model / Tools / Results tabs, its problem pinned as a banner with its fix and Change picture… / Remove member in its ⋯; full screen on a phone; the last member cannot be removed), Stages (`stage-journey.tsx` as a chain of rows — "First message → member", then a row per stage, then Add stage, each on one line with its badge on one rail, a fork's alternatives branching off it — and `stages-dialog.tsx`) and Team instructions (`instructions-card.tsx` over `components/instruction-blocks.tsx`: blocks as collapsed rows, one opened in place; an audience through `member-pick.tsx` `AudiencePick`). Every reading is the daemon's: the summary strip's figures (`team-summary.tsx`), the Statistics tab (four leading figures on `components/kpi-tile.tsx`, a line of secondary figures, its **How each member works** table included) and the member sheet's **Results** tab (`member-performance.tsx`: the member's figures and their spread per run, every change that touched it with the effect the daemon measured, and every analysis's marks of it, newest first, with the judge; marks and verdicts drawn by `components/member-marks.tsx` everywhere) are `GET /v1/stats/teams/:slug` (`use-team-stats.ts`; like the versions table, re-read after `usage_recorded` only while the screen is on view, and once on return when a turn was missed — the read is heavy and the hidden screen stays mounted), the Memory tab is two groups — Team memory (what team memory is in one line, New memory, a search once there are entries, the team's entries from `use-team-memories.ts`, scope `team`; New memory and Edit open `memory-form.tsx` in a dialog that says the scope in words) and the team's lessons setting (`components/lessons-group.tsx`, the project page's group, inheriting from the project), and the warning pill, status dots and the member sheet's pinned problems merge the editor's own refusals with `GET /v1/teams/:slug/health` (`use-team-health.ts`, read again after every save) and Electron main's sign-in reading (`use-sign-in-health.ts`, `detectClis({maxAgeMs})`, never a probe per page open; asked afresh after a sign-in settles). Only the open team's page asks `probe=true` (it lists each profile's MCP servers once, which starts the user's stdio servers, and re-reads while a member's `checking` is set). The library's **⚠ N** is the daemon's cheap reading (`probe=false`, at most four teams at once) plus each member seat's sign-in from the same cached `detectClis({maxAgeMs})` (`MemberHealth.seats`), labelled with the age of the MCP reading; it does not count the editor's refusals, which need the team open. Deleting a team asks what happens to its memories when it keeps any (`team-memory-fate.tsx`, `DELETE /v1/teams/:slug?memories=forget|keep|global`). A fix button per problem kind is `use-member-fixes.tsx`; only a red problem stops a run (the daemon's `TEAM_NOT_READY`).
- The page's **⚠ N need setup** pill (`warning-pill.tsx`) lists distinct problems, not member findings: `groupMemberFindings` (`team-problems.ts`) folds a finding about one CLI account (agent + profile) into one row naming every member it reaches, MCP servers counted and listed on request (`details`), with one fix — so a profile's servers across five members are one row, not a row per server per member. Errors come first.
- A member row's setup problem is one mark in the row (a `WarnPill` naming its fix); the fix itself is in the member sheet's pinned banner and in the summary pill's list, whose press lists every problem with the button that fixes it. On a phone the summary shows the first problem as a banner (`ProblemBanner`). A member's face is `components/member-avatar.tsx` (`MemberAvatar`, `AvatarStack`), everywhere: picture, emoji or initials on `bg-avatar-*`, falling back to initials when a picture cannot be read. A picture is uploaded by `components/avatar-picker.tsx` (square-cropped on a canvas, PNG) to `POST /v1/teams/avatars` and read back as a `data:` URI through `AvatarImageLoaderContext` (provided by `App`), since the CSP allows no other image source. Transcript identity reads the run's snapshot (`TranscriptNodeMeta.avatar`), never the library, and never shows the character.
- The team document's edits are pure functions in `teams/team-doc.ts` (`withMember`, `withoutMember`, `withTriggerMember`, `teamFromMeta`). Removing a member also drops it from every block audience and stage `responsible` list, and hands the trigger to the first member left. A new team starts with one member that handles the first message, so it saves at once.
- `teams/team-validate.ts` (twin of the daemon's `validateTeam`), `member-validate.ts` (field limits and NUL rules, twin of `teams.types.ts`) and `stage-validate.ts` (twin of `validateStages`) mirror every daemon refusal; while any refusal stands, autosave holds, the header's save state reads Not saved and the problem list names the refusal, since one refused field would stop every later save. A warning (an audience or `responsible` id naming no member) never holds a save.
- Member and block derivations over the generated types live in `teams/member-schema.ts` (`runsUnasked`, `audienceOf`, `audienceReaches`, `modelChangePatch`); `audienceOf` exists because the generator renders the audience union as an empty interface.
- **Versions…** (the open team's overflow menu, only with a saved team): `teams/team-versions-dialog.tsx` over `use-team-versions.ts`, read only while open and again after `usage_recorded`. Every figure is the daemon's (`GET /v1/stats/team-versions`); the dialog never folds or sums one. It is one dialog split in two: a summary (runs, versions, average cost per run), the version list at the left, newest first, not sortable (`#n` and hash with its badges, dates used and runs, average cost per run, `DiffFigures` `+N −M`), and at the right what the selected version changed from the one numbered before it IN WORDS — the daemon's `changes.teamDiff` (`diffTeams` over the two recorded graphs) drawn by `teams/version-changes.ts` through the propose-team card's `diffRows`; there is no run list (user decision). An unmeasured figure or a missing change says why as visible text, never hover-only. The right side also restores the version (`ConfirmActionButton`, never for the current one): the Teams screen flushes autosave, posts the restore quoting `loadedHashRef`, then re-opens the team from disk (`openTeam`) and names the backup in the status bar; a version recorded before members is labelled "before teams"; a `TEAM_CHANGED` refusal raises the stale-copy banner. It is held back, with the reason shown, while the builder chat's agent works or the editor's copy is stale. The `current` mark is the library team's; a team not run since its last edit is its own first card ("New version", "not run yet"), and it opens to its diff but offers no restore.
- Library cards and member rows take activation from `NavListItem`. Never use a `div role="button"` with a nested delete or fix button. A library card counts members and stages, never nodes or edges.
- `Teams.openRequest` (a chat card's "Open team") leaves an open team the way Back does: flushed first, and the "Leave without saving?" prompt when that fails, opening the request on Discard.
- Never pair `line-clamp-*` with a `display` utility.
- A block runs nothing and has no `node_state`.
- Member fields that reach argv, and a stage's text, refuse NUL only, because the same schema reads saved YAML.
- Switching a member's CLI starts from that CLI's defaults; the editor remembers the last CLI picked for a new member (`rememberMemberAgent`).
- `useAgentVocabulary` resolves during render off its cache, never from effect-set state.
- Free-text model mode waits for a non-empty list.
- There is no model adopt and no effort adopt, because unset is a real answer.
- The member sheet uses the composer's chips, never builder-only copies. Approval modes come from `approvals[]` with `plan` filtered out.
- The builder's MCP read is not gated on a press: its 4xx is the only signal of a bad config path.
- A member's MCP switches are its own `mcpDisabled` and write nothing the CLI keeps. Its allow list (`mcpAllowed`, offered only where `mcpAllowLists` gives the member's CLI no reason) is the same kind of member field; account connectors are the listing's names under that CLI's `accountConnectorPrefix`, never a name the renderer spells. The team page lists a member's servers without a folder (`useNodeMcp`); a project's page lists them in the project's folder (`ProjectTeamOverrides` `projectFolder`, pool members included), so the project's own servers can be picked only there (user decision).
  - A switched-off name the profile does not list shows as an `off` row.
  - Switching CLI clears the list.
  - Pool members fetch under their own CLI and profile.
- Instruction sizes (`useInstructionSizes`) are measured while the Team tab or a selected member is on view, never on the Memory or Statistics tab with no one selected. The Team tab draws each block's own size on its card (`InstructionSizesWire.blocks`: its trimmed text and how many members carry it) and every member's total under the blocks (`team-instruction-sizes.tsx`); the member sheet keeps that member's breakdown. Under them, **Fresh session** (`team-fresh-session-bases.tsx` over `use-fresh-session-bases.ts`, `POST /v1/teams/:slug/fresh-session-bases`, read only while the Team tab is on view, debounced, and again on a settings write) draws each member's fresh-session base per project as the daemon measured it, labelled approximate, with every part it could not measure said in words, never drawn as zero.

- **Project overrides** live on the project's page, never the team's (user decision): the team page shows only **Used by** (`team-used-by.tsx`, the projects whose default it is, each opening its page) and, in the delete confirm, whose overrides go with it. The project page's Team section (`projects/project-team-overrides.tsx` over `use-team-overlay.ts` and `team-overlay-doc.ts` — twin of the daemon's `applyTeamOverlay` for the Model group) draws the team as that project runs it and writes only the overlay, autosaved quoting its hash (`TEAM_OVERLAY_CHANGED` keeps the edits and offers Reload): member rows with "N changed for <project>", the member sheet in project mode (no name or character field; the team's role and instructions as `ReadOnlyText` under a Team tag; extra instructions under the project's tag, `teams/project-mark.tsx` `ProjectTag` — the project's colour dot and name, the one mark of what belongs to a project; Model rows `MemberModelGroup` — shared with the team page — with `scopeOf`, i.e. `OverridableRow`s whose controls stay live: changing one overrides it for the project, which marks the row with a tag of the project's colour dot and name and a reset arrow back to the team's value, a quiet Team tag otherwise (never a coloured edge); the pool the same way, overridden whole by its first change; extra instructions), and no copy of the team's instruction blocks: **Manage team** opens the team's page. **Team blocks only in <project>** (`project-scope-instructions.tsx`) adds, edits and removes the overlay's own blocks, each with an audience; it is not a twin of the project's instructions, which reach every member and name no audience (user decision). Stages are the team's and take no project addendum (user decision), and the sheet in project mode shows the Tools & MCP group as the member runs in the project (`MemberMcpRow`, shared with the team page: the listing of its effective agent and config directory, sign-in and Add/Edit JSON writing that profile); its switches are an override like the pool, overridden whole by the first switch (`members.<id>.mcpDisabled`, `[]` = none off) with the same tag and reset. The sheet's footer holds **Restore team settings** (`withTeamSettings`: every Model setting, the pool and the MCP switches back to the team's, the extra instructions kept; behind a confirm). An overlay's `allMembers` (one default per CLI) has no editor (user decision: the panel was unclear); the project's chat sets it, and every reading applies it. The sheet is portalled into the page's side slot (`project-page-slots.ts`).
- **The project's chat** is opened from **Change with chat** in the project page's header (`project-detail.tsx`), for a project whatever its default, on the Chats screen, in its System section (`.claude/rules/ui-chats-calls.md` → System chats). It is one chat per project (`GET|POST|DELETE /v1/projects/:projectId/chat`), and proposes the project's instruction blocks and its default team's overlay on cards — and, like the team's builder chat (opened from the team's page only and bound to no project) and an analysis, any other project's or team's when asked (user decision). The page follows it while shown (`useFollowedChat` over `GET`): before every turn the Chats screen starts in it the page writes what is typed and not yet saved (the instructions form's and the overlay's `flushRef`, its `project:<id>` guard); while a turn works the overlay is not autosaved (`chatWorking`); after each turn the page re-reads the project list and the Team section reads the team and overlay back (`reloadKey`). Leaving the page flushes a pending save (`useDebouncedPersist`).

**What the builder must never lose** (pinned in `Teams.spec.tsx`):

- **Change with chat** opens the team's builder chat on the Chats screen (`openChangeChat` over `POST /v1/teams/:slug/chat`, unarchived first). The page follows it and the team's analysis (`useFollowedChat` over `GET /v1/teams/:slug/chat` and `/analysis`; read again when the page is back on view). Autosave is paused while the builder chat's agent works, and the header's save state says so with **Open chat**. Either chat's turn ending starts the builder's re-read; before every turn the Chats screen starts in the builder chat its `team:<slug>` guard (`beforeChatSend`) waits for that re-read, reads again, and only then writes the editor: a queued message leaves as the turn before it ends. A send with no agent edit behind it re-reads an unchanged file, so a file changed elsewhere still meets `TEAM_CHANGED`.
- The post-turn re-read compares against the last load or save (`teamSnapshot`), never against the editor.
- Leaving waits for `flush`. A late save or re-read answer for another team is dropped.
- Every save quotes the `hash` the team was loaded or last saved at. A `TEAM_CHANGED` refusal (an analysis changed the file) holds autosave and offers Reload, which replaces the unsaved edits; nothing is written over the newer file.
- `RunDto.awaiting` follows the three-state rule: absent asserts nothing, and `null` clears.
- Every save writes `normalizedTeam` (`team-doc.ts`): `maxActiveTurns` and the description ride it like every other field, and an empty stage list is written as ABSENT, never `[]`; a save that dropped a field would lose it or loop autosave.
- `maxActiveTurns` is the "Edit team" dialog's agents-at-once row: a switch (off is no limit of its own, the machine ceiling) and a `Stepper` from 1 to the ceiling, so no value outside the range can be entered.
- `stages` (the team's stage graph) is drawn as `StageJourney` on the Team tab and edited in `stages-dialog.tsx`, whose "Responsible" pick is ordered (`ResponsiblePick`; the members who usually move the stage). A stage whose `responsible` names a removed member is a warning, never a refusal. A stage row and the Add stage row open the dialog, saved by autosave; there is no Edit stages button (user decision). With no stages the section is the one row naming the first-message member and a line saying who runs every job. The whole team, stages included, is changed by talking through the header's one **Change with chat**; the builder agent edits stages through its ordinary `propose_team` card, which draws the proposed stages as a read-only `StagePath` and names each stage change in words (`TeamDiff` `addedStages` / `removedStages` / `changedStages`; a removed stage quoted with what it held; a reorder alone is the `stages` team field, quoting each side's order). `components/stage-graph.tsx` (React Flow + ELK) stays the chat surfaces' stage graph only.
- A pooled member's card in the inspector's Agents tab shows the slot its own conversation runs on and moves it (`chats/pool-slot-control.tsx`, from the nodes route's `poolMember` / `poolMemberPinned` / `poolMemberNext` through `ownPoolOf`; Chats re-reads the nodes after a pick).
- Agent pools are capped at the twin `MAX_AGENT_POOL_EXTRA_MEMBERS`. Call instances name their pool member (`CallBlockEntry.member`). Hand-offs above the page arrive as anchors. A hand-off row is a card row like any other: drawn where it happened when the card's read pages reach it, else as one note under the pager (`CallBlockEntry.poolHandOff`). Never route it out of the card by `anchorIds`: a team run's call rows all reach the fold as anchors (`structure`).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.