omp packages

pi-team-mode0.1.11

Efficiency-first teams for Pi with background workers and a foreground Team Lead

spencerhsu Published 18 hours ago MIT ~1.9K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

Pi Team Mode

Team Mode puts a Team Lead in the foreground and runs useful work in background Pi workers. Engineer is on by default in the interactive TUI. Its stock Lead coordinates workers individually—no meetings. This is profile behavior, not an Engineer-specific permission rule. Lead can handle routine local work with its normal Pi tools or delegate it; larger jobs use dependencies and parallel workers as needed.

See the 0.1.11 npm changelog for the combined changes since 0.1.9. 0.1.8 adds the SDK-only Team Agents tree and session-scoped Backend and Concurrency controls. 0.1.7 adds optional skill indexes to worker roles without changing dispatch backends or the native Agents display. 0.1.6 adds live worker models to Status, remembers the selected profile per Pi session, and shows live scheduler counts in the footer. 0.1.5 introduced padded role badges and removed the duplicate queue acknowledgement. 0.1.4 was not published to npm.

0.1.3 adds personal profiles, template-based creation, and a Team Mode menu. As in 0.1.2, compatible stock subagents show Team role badges and task briefs in the native Agents rows. Team generates definitions on first dispatch; SDK-only installs still work without stock subagents.

Install

The extension targets Pi 1.7.0. Install the npm release with pi install npm:pi-team-mode; uninstall it with pi remove npm:pi-team-mode.

Alternatively, install the GitHub default branch with pi install git:github.com/flaminigo/pi-team-mode and remove it with pi remove git:github.com/flaminigo/pi-team-mode. For a local checkout use pi install "$PWD" and pi remove "$PWD" from the repository root. The root Pi package loads tracked TypeScript; Git and local root installs do not require dist/ or a manual build. See the user manual for examples.

This nested directory is the npm packaging target. If installing it directly from a checkout instead of the root, run npm ci && npm run build here first, then pi install "$PWD". Use --local on both Pi install and remove for a project-scoped registration. Restart Pi or use /reload after changing the installation.

On fresh TUI startup, an unpinned, Pi-managed install from the official GitHub repository checks whether main is ahead of the installed commit. The read-only check runs in the background, times out after two seconds, and stays silent offline, on failure, and for local, pinned, or npm sources. PI_TEAM_NO_UPDATE_CHECK=1 disables this check, not Pi’s own package notice; pi --offline disables both.

Use pi update npm:pi-team-mode for npm installs or pi update git:github.com/flaminigo/pi-team-mode for GitHub installs to update just Team Mode, then /reload or restart Pi. Run it from the trusted project for project-scoped installs (--approve if trust isn’t saved). On Pi 1.7, pi update --extensions updates all packages and pi update updates Pi itself; pi upgrade --extensions is not valid. For this nested local checkout, rebuild after changing source, then reload. If pi list already shows the repository root, /reload or a restart reads the working-tree TypeScript without a build or reinstall. To switch sources, remove the old source in its original scope before installing the checkout.

Open /team → Status or run /team status for the same read-only view. It keeps the selected profile, on/off or blocked state, effective concurrency, and task IDs and states (including settled tasks). The Live workers section lists queued, starting, and running Team jobs on either backend, showing the configured role, task ID, brief preview, and the exact provider/model-id once the worker starts. Before then it shows pending (with the pin if explicit), or inherits foreground at start when the queued job is set to inherit. Use ↑/↓ or j/k to scroll and Esc to close. Opening the view does not make model requests. The dispatch transcript still shows only the padded role badge, brief and background for each task. Lead receives an acceptance snapshot with starting, waiting and its reason (dependencies, Team concurrency, or the separate stock queue), or backend-confirmed running.

Open /team → Backend (or /team backend) to see the effective preference and its source. Native (default) uses the built-in Pi SDK and does not require pi-subagents. pi-subagents is strict: if its RPC v2 peer is unavailable or cannot honor the worker policy, the task fails without a Native launch. An unconfirmed spawn is never repeated. Jobs waiting in Team's scheduler use the preference when they start; workers already starting, running, or queued by stock keep their route. The picker is usable even without the peer, does not launch or cancel anything, and leaves the stock extension, its Agents widget, and non-Team jobs alone.

Use config clears the session override and records that choice, so an older override on the same branch does not come back. The picker and Status show the effective preference and its source. The latest choice on the active branch survives profile changes, Team on/off, /team config reload, Pi /reload, and resume of the same session. /tree restores the choice at the selected point; a new session, including a fork or clone, uses current config. The picker writes only Pi session metadata, not global or project settings, and no jobs are replayed. Before Pi saves a conversation, or with --no-session, choices are held in memory. For a lasting default, set top-level "backend": "native" or "backend": "pi-subagents" in user or trusted project team-mode.json. /team backend native|pi-subagents|default sets or clears the session override directly. Precedence is session override > trusted project value > user value > Native. Legacy sdk and auto resolve to Native without rewriting config; auto shows a migration notice.

On the stock route (@tintinweb/pi-subagents 0.26.3 tested), Team creates real Markdown definitions on first dispatch, including for configured profiles and roles. The native Agents row shows the role badge (red Validator) and the brief. The worker receives the current role prompt instead of inheriting Lead's. Team keeps the definitions in <Pi agent directory>/team-mode-workers/ with flat namespaced links agents/pi-team-mode-worker-<profile>-<role>-<unique-id>.md. Stock 0.26.3 reads only direct *.md children in personal agents/, workspace .agents/agents/ and project .pi/agents/, and in package manifest-declared directories. Manifest-declared individual nested files are supported, not recursive discovery. Team keeps its existing flat registrations and does not create package manifests or change stock discovery settings. It reuses matching Team-owned definitions without rewriting them. Changed content or a name collision gets a new identity; existing definitions are left intact. Team does not change stock settings or clean up generated definitions on uninstall.

Extension-registered models: Stock 0.26.3 inherits the foreground Pi model runtime. Except for Cursor (below), SDK workers replay only the selected provider's Pi registration (including its stream/auth callbacks) in their own runtime; they use Pi's normal auth configuration without copying session-only credentials or reloading the foreground provider extension for replay. This supports providers whose registrations work without child extension lifecycle hooks. Team reports an unregistered provider, an unlisted model, or an unavailable model without choosing a substitute.

Use Native for explicit worker tool allowlists, worker extension lists, retained SDK continuations, and Cursor. Strict pi-subagents never launches a Native worker when it cannot honor a task. Native does not inherit foreground extensions. /team doctor reports the preference and compatible RPC readiness, not exact definition resolution. Stock RPC cannot verify definition ownership or disable its own type fallback per call. Team checks for existing claims before dispatch and reports a mismatched run type, but stock cannot guarantee safety against a concurrent file change.

The separate ● Team Agents tree above the editor shows only jobs routed to the SDK. A magenta heading tops aligned rows with a status indicator, a bold padded role badge, the exact confirmed model (pending during startup, not started if it settles before start), and a task preview. The status column is one cell wide: a spinner for running jobs, a green ✓ for successful jobs, and a distinct glyph for other states. Labels such as failed, cancelled, and queued follow the task preview when there’s room. A compact strip also indicates live Team jobs outside the Native tree (such as scheduler waiters or jobs on the stock route). Use Status for the complete list. Stock's own Agents widget is unchanged.

The Braille spinner indicates an in-progress job, not model thinking. When there’s room, a child line shows thinking… only during an observed thinking stream, responding… during a text stream, or a tool action such as running command… during execution. It shows working… when Pi reports no specific activity. The line never displays streamed content, tool arguments, or tool results. It clears when the job settles or is cancelled; a cancelled job keeps its slot and says stopping until it unwinds. One visual-only timer redraws while SDK jobs are running; it does not poll workers or run inference. The tree keeps up to five recent outcomes, fits a bounded viewport, and clears on reset, profile change, config reload, disable, or runtime replacement. Status remains the combined view.

Worker follow-ups

Lead dispatches fresh by default. If the follow-up needs context a short brief can’t carry, Lead sets resume to the completed same-role task ID. For example, to have Coder use the investigation from trace-startup to diagnose a retry failure, Lead dispatches a new check-retry Coder task with resume: "trace-startup". Lead decides when to request it; Team Mode checks compatibility, routes the job, and handles fallback.

Lead uses team_results({batch: "first-task-id"}) for a compact JSON snapshot of one dispatch, named by its first task ID. It returns {batch, scope, tasks}. Each task has id, role, state, a short status, observed activity when available, up to three recent milestones (at, source, text, oldest first), and a short outcome when settled. The default scope is live (queued, starting, running or stopping); use scope: "all" for the whole batch, including outcomes for siblings that settle while other workers are still running. The user command /team results --batch first-task-id [live|all] keeps its readable text view with the latest milestone per task. Use team_results({id: "task-id"}) or /team results task-id for the longer per-task timeline. No arguments still lists task statuses and links without bringing other batches’ evidence into Lead’s context.

SDK workers can report useful facts about what’s done, next, or blocked on an already-needed tool turn. These notes are silent: they don’t schedule a model turn, notify Lead or interrupt work. Batch results distinguish observed SDK activity and elapsed time from what a worker reported. Stock pi-subagents 0.26.3 does not publicly expose worker milestone text or tool events to Team; batch results show elapsed time from confirmed start instead. Providers that don’t expose text alongside tool calls may also yield no milestones. Lead can still record notes with team_milestone(taskId, note) on either backend.

Actionable results wake Lead at the next safe idle boundary, without waiting for independent tasks. Results pending at the same boundary are batched; a successful prerequisite already feeding planned work does not wake Lead on its own. Batch inspection does not consume these notifications. See coordination design and offline trial.

Use team_steer(taskId, message) for a material update to a confirmed active worker. It sends a real instruction into the existing conversation after the current tool work, without cancelling or launching another worker. SDK reports queued; stock requires the public steer capability and acknowledges acceptance, not receipt. A worker that settles in the meantime may not see the update. team_cancel(taskId) or /team cancel <task-id> stops just that task; unsuccessful prerequisites block dependents, not independent work. A stopping worker holds its slot until the backend settles. Cancellation does not undo side effects.

A retained Native session can be reused with the same role, exact model, and tool list. The SDK keeps up to six sessions in memory, evicts the earliest-retained one on overflow, and expires sessions after 24 hours idle. Reuse consumes the old resume reference. If check-retry completes and retains the session, use check-retry, not trace-startup, for the next continuation. Live continuation does not survive /reload or reopening Pi. For persistent foreground sessions, non-Cursor SDK worker conversations are saved privately under <Pi agent directory>/team-mode-sdk-conversations-v1/; in --no-session mode and for Cursor workers the SDK conversation stays in memory. /reload prunes only inactive, ownership-verified conversations from that directory unused for more than 24 hours. The task ledger is separate from those files. Team does not scan or change foreground or standalone sessions or manage stock’s transcript files or native resume. A file’s presence in the SDK store does not imply Team can reopen it.

If the prior task is still known but its SDK session is evicted, otherwise unavailable, or incompatible, or the prior task ran on stock RPC, the follow-up starts fresh with a compact Earlier result summary instead of transcript history. Status and team_results do not label the continuation outcome. Keeping history for a follow-up does not guarantee token savings.

Cursor workers

To use a Cursor model for an unrestricted role, select its exact cursor/<model-id> in /team model or in that role’s model pool. Team requires npm:pi-cursor-sdk to be enabled, installed, and configured in Pi’s user settings or in a project Pi has trusted. Team does not install it, accept a task-supplied extension path, or reload unrelated extensions. The selected model must be in the worker’s own Cursor catalog and usable with Pi’s configured Cursor authentication. Team does not fall back to another model.

Cursor workers require the Native backend, even with stock subagents available. Each worker owns its Cursor extension binding and model runtime; cancellation and recent-task continuation work through Team. These workers appear in Team Agents, Team’s dispatch and results, not in the native Agents hierarchy. Compatibility with pi-cursor-sdk 0.5.32 was verified offline without real auth or Cursor requests.

Cursor’s native tools and ambient MCP configuration are separate from Pi’s tool list. Team fails closed for roles with an explicit access.tools allowlist rather than running a Cursor worker that could exceed it. In a project Pi does not trust, start Pi with PI_CURSOR_SETTING_SOURCES=none to prevent Cursor from loading ambient settings. Team does not change Cursor settings or process environment for you.

Use

  • /team opens the Team Mode picker. Type to fuzzy-filter actions (for example bcknd for Backend), use ↑/↓ and Enter, or Esc to close. /team profile opens the profile-ID picker directly. /team help lists all commands.
  • When the live-worker strip is visible, press Left on an empty prompt to select a worker. Use arrows to select, Enter to inspect, ↑/↓ or PgUp/PgDn to scroll, Home to jump to the top, End to follow new messages, and Esc to go back. The picker and detail header show the configured role name as a colored badge. Use /team → Inspect workers or /team workers [task-id] if a custom editor or stock FleetView owns Left.
  • Inspection is read-only and includes only live jobs: queued, starting, running, or stopping while the backend drains. Native shows finalized input, assistant text, and tool calls/results when its live session is available, omitting reasoning and provider/system internals. Until then, it shows the task timeline. Stock RPC 0.26.3 has no supported read-only transcript for Team, so it shows a notice and the live task timeline; stock's /agents viewer is separate. A worker disappears when it settles. If it was open, the viewer returns to the picker, which shows No live Team workers when empty. For settled tasks or work recovered as interrupted, use Status or /team results <task-id>; the viewer never opens stored sessions or starts model turns.
  • Team tool cards are compact and keep errors visible. Use Pi’s tool expand key for result detail or /team debug on for the full existing Team arguments and results in the current TUI. /team debug off, turning Team off, /reload, or leaving the session returns to compact mode. Debug does not add logging or change model payloads. It cannot remove text already copied or retained by your terminal. Pi’s explicit session exports include the original conversation; turn debug off before exporting if you want compact cards.
  • /team profile <id> switches directly and turns Team Mode on. /team profile status only switches if a custom profile has that ID; for status use /team status.
  • /team on, /team off, /team status, /team results [task-id], /team results --batch <first-task-id> [live|all], /team cancel [task-id], /team reset, /team doctor.
  • /team profile create <id> --from <template> saves a personal copy without switching or changing the default. The Create profile from template menu item prompts for the template and new ID, saves, then asks Switch to the new profile?. No or Esc at that final question leaves the copy saved but does not switch.
  • Concurrency or /team concurrency 10 sets a session ceiling override; enter default in the picker or run /team concurrency default to use config.
  • /team config edit [project], /team config validate, /team config reload.
  • Configure role model or /team model opens a role picker, then an available-model picker; /team model <role> opens just the latter. /team model <role> <provider/model-id> (or configured alias) adds an available model to the role's pool and selects it for the next worker run (or switches the foreground Lead now, if Team Mode is on). Usage is tracked locally for five-entry pool eviction. Menus, pickers, and config editing do not prompt outside the TUI.

The last explicitly selected profile is remembered in the current Pi session and restored on /reload or resume against the latest configuration. A new session, or one whose selected profile is no longer available, uses the configured default. Pi does not create a session file until there is a user or assistant message; --no-session choices stay in memory. An explicit on/off choice survives /reload and resume; config supplies the default for new sessions. A compact task ledger in Pi session metadata restores the task tree, timelines, milestone notes, and prior outcomes on /reload or reopen in the same session. Unsettled jobs become interrupted; check for side effects before retrying. No worker is reattached or replayed and no historical wake is sent. The ledger is session-wide, not rolled back by /tree, and is not inherited by a new, forked, or cloned session.

The footer shows the active profile and live counts: queued, starting, confirmed running, stopping, and outcomes. /team off hides Team UI and restores foreground tools, model, thinking, and ordinary instructions. With active workers, choose Wait, then turn off, Cancel workers, then turn off, or Keep Team Mode on. New dispatches are blocked while draining; cancellation waits for workers to stop and does not undo changes. /team on cancels an outstanding turn-off request or re-enables Team Mode. The session retains the explicit on/off state and outcomes; /team results can still inspect them while off. Resetting tasks, changing profiles, and reloading Team config clear task history. Only SDK-reported Pi tools contribute to the optional using tools count. Stock RPC reports its lifecycle without guessing at tool use or thinking; neither backend infers thinking from model settings.

Team Mode ships a read-only catalog: engineer_template, research_template, audit_template. These IDs are for copying, not switching. On interactive activation (including /reload), Team saves only missing personal engineer, research, and audit profiles as JSON in <Pi agent directory>/team-mode-profiles/. Saved profiles are full copies; inline personal entries (including sparse ones) count as existing profiles and are never rewritten by seeding. The effective order is built-in fallback → full personal files by ID → inline team-mode.json → trusted .pi/team-mode.json. Personal files do not inherit later template changes. If a starter file is removed and no inline entry exists, the next interactive activation backfills it again. Built-in defaults and new copies ask Lead to own recovery and replanning, without changing existing saved scopes or explicit overrides.

Seed and create require valid personal settings on their own and as merged in the current workspace. Create refuses existing runnable IDs, including trusted project IDs, and never copies merged project settings. IDs for new files are 1–64 lowercase letters, digits, underscores or hyphens, starting with a letter or digit. Writes use a complete temporary file and atomic no-replace publication; if the filesystem cannot publish it, Team reports the problem and does not replace existing files. Read-only loading and validation do not seed. To customize a saved profile, edit its full <id>.json or overlay its fields inline, then use /team config validate and /team config reload.

For example, run /team profile create my-engineering --from engineer_template, then /team profile my-engineering as a separate command. The footer says Team: Engineer until you change name to My Engineering in <Pi agent directory>/team-mode-profiles/my-engineering.json. In that same file, try setting roles.validator.workScope to Verify the personal My Engineering profile. Run /team config validate and /team config reload to apply the edit and see Team: My Engineering. Team restores this selection after /reload or resume using the latest profile file. Creating it again with the same ID leaves the edited file untouched.

User settings live in <Pi agent directory>/team-mode.json; trusted project overrides live in .pi/team-mode.json. To add a profile, define a new ID under profiles with a name and roles containing an enabled lead. To add a role, define a new ID under that profile’s roles with name and workScope. Use /team profile <id> to switch the session; use Set default profile or /team default-profile <id> to write your user defaultProfile for new sessions. A trusted project can override that default, and an existing session retains its selected profile. If its profile is missing, Team warns and temporarily uses the effective configured default; see the custom profile example. Example override for built-in roles:

{
  "schemaVersion": 1,
  "backend": "native",
  "concurrency": 5,
  "profiles": {
    "engineer": {
      "roles": {
        "coder": { "modelPool": [{ "model": "provider/model-id", "thinkingLevel": "high" }, "provider/alternate-id"], "access": null },
        "scout": { "access": { "tools": ["read", "grep", "find", "ls"] } }
      }
    }
  }
}

concurrency is an integer from 1 to 20 and defaults to 5. It's a ceiling on simultaneous worker jobs per Team session, not a target: Lead dispatches only useful work, and the scheduler starts only ready jobs. Precedence is session override > trusted project value > personal value > built-in 5. Like Backend, the choice is saved in Pi session metadata on the active branch. It survives profile changes, Team on/off, /team config reload, Pi /reload, and resume or switching back to that session. /tree restores the choice at the selected point; new sessions, including forks and clones, use current config. default records an explicit clear so an older override on the branch doesn't return. Before Pi saves a conversation, or with --no-session, choices are held in memory. No global or project settings are written, and no jobs are replayed.

Raising the ceiling immediately schedules ready jobs; lowering it never cancels or evicts active jobs. See the effective value and source in Status and the Concurrency picker. The separate limit of 16 tasks per dispatch is unchanged; the concurrency ceiling applies across dispatches. Stock subagents and model providers may allow fewer workers to run at once. The legacy writes field no longer affects scheduling. Lead and workers can edit concurrently in the shared workspace; assign non-overlapping files or use dependsOn for ordered access.

Each role’s modelPool accepts "inherit" (legacy [] also inherits), an ordered list, or a reference such as { "pool": "local" } to a named system list under top-level modelPools, for example "modelPools": { "local": ["provider/first", "provider/second"] }. Named lists must be nonempty. Built-in role pools inherit. An inheriting Lead keeps Pi’s current model and thinking; an inheriting worker reads both at start, including queued dependents. A configured Lead uses the first available choice on activation, profile switch, or Team config reload and reports unavailable candidates. /team off restores the pre-Team model and thinking without changing Pi defaults. Pi has no extension API to clear a model selection if the foreground originally had none.

Each entry is a model string or an object with model and optional thinkingLevel. Both accept exact provider/model-id values or aliases from aliases. Use off, minimal, low, medium, high, xhigh, or max; Pi clamps to model capabilities. An entry without a level keeps the normal Pi/backend behavior. An explicit or inherited level is passed through compatible RPC v2 or applied by Native. Native continuations also apply the current requested level before prompting. Team-managed choices require exact physical model IDs, not Pi virtual routers.

Trusted project settings replace role model sources and named lists as units. For workers, an explicit task model wins over the one-shot /team model selection, which wins over the configured list or inheritance. Both explicit choices are pins: if unavailable, Team does not substitute. Task pins must belong to the configured or learned pool (or match the inherited default); non-default choices need a reason unless selected by /team model. Learned alternatives and usage live in <Pi agent directory>/team-mode-models.json and never rewrite the configured candidate order. Inherited models are not added automatically.

For an unpinned list, Team checks availability in order. Native can also advance after a proven pre-work rejection (e.g. HTTP 402/429 before any accepted response) or an explicit pre-connect failure. Generic connection errors, timeouts, an accepted response, tool activity, or an ambiguous launch do not qualify. Cursor and resumed Native conversations do not use response-based failover; neither does pi-subagents, whose public RPC does not provide that evidence. Team reports exhausted candidates and the model confirmed at start.

access: null keeps the normal loadout. Lead retains Pi’s active tools (normally read, edit, write, bash) plus Team tools; Team does not undo Pi flags or defaultTools. An optional access.tools list narrows Lead’s active Pi tools without disabling Team controls; for SDK workers it selects explicit built-in and opted-in extension tools and is not supported by strict pi-subagents. Optional extension tools remain subject to the Lead allowlist. Stock’s default Team role definitions include read, edit, write, bash, grep, find, and ls. Cursor cannot honor an explicit allowlist and is rejected for those roles. This is not OS isolation. Workers report to Lead; peer references are profile metadata, not a team-chat feature. Automatic worktrees and durable worker reattachment are not supported.

Optional worker extensions

In a saved profile, set roles.<worker>.extensions, or use an inline override in team-mode.json. For example, if npm:my-pi-notes@1.0.0 is the exact source of an enabled package you already use in Pi:

{
  "profiles": {
    "engineer": {
      "roles": {
        "coder": {
          "extensions": ["npm:my-pi-notes@1.0.0"],
          "access": { "tools": ["read", "notes_read"] }
        }
      }
    }
  }
}

Use /team config validate, /team config reload, and /team backend native for the trial. Validation checks syntax; package eligibility and tool availability are checked when a worker starts. Omit the list or set [] for no additions. A project can replace the list only when Pi has trusted it. Use exact sources from Pi packages (including a pin if configured). Team resolves only enabled entries from installed npm packages in user or trusted project settings. Paths, URLs, temporary -e sources and Team Mode itself are not eligible. Team never installs packages for the role, and a missing, disabled or incompatible selection fails the task rather than loading something else. Lead continues using its registered tools; roles.lead.extensions is not a worker list.

Native on Pi 1.7+ binds the selected entries to the worker’s own session and model runtime. If access.tools is set, use exact names, including any desired extension tools. Strict pi-subagents rejects a nonempty extension list: its selective loading has not been verified to avoid evaluating unrelated factories or sharing state with Lead. Cursor still loads its one required pi-cursor-sdk entry even when the list is empty; explicitly listing the same source does not bind it twice. Cursor still rejects roles with an explicit tool allowlist.

Use only reviewed packages that support headless, concurrent sessions. A private Pi runtime is not an OS sandbox or a separate process: extensions can share module state, access files, and perform their own startup or shutdown work. In particular, worker memory extensions may read and write the same store as Lead and other workers. pi-memory 0.4.2 is rejected for workers: its headless startup can remove Lead’s terminal handler because the subscription is stored at module scope. This does not change pi-memory in the foreground.

Offline trial from the repository root: npm run build && PI_OFFLINE=1 node --test --test-name-pattern='role extension|Native worker extensions' pi-team-mode/test/native.test.mjs. This uses two disposable tool packages, an incompatible package placeholder, and a loopback model. It checks a real allowed tool call and verifies the unrelated package is never imported or evaluated. See below for the Cursor check.

Optional pi-memory for Lead

Team does not require pi-memory. /team doctor lists recognized foreground memory tools and whether they’re active without calling them; use pi-memory’s memory_status to check qmd and its index. Team preserves active tools unless Lead’s access.tools narrows the loadout. When the relevant tools are active, Lead gets a short reminder to consult prior decisions or save user-approved durable facts, preferences, and decisions—not secrets, transcripts, or task progress. The Team task ledger is separate. The Lead integration does not send memory to workers or add inference or memory calls.

pi-memory 0.4.2 owns its snapshot injection, optional qmd work, and quit summary. Its default quit summary can make an LLM call independently of Team. Start Pi with PI_MEMORY_EXIT_SUMMARY=0 to disable that call, and PI_MEMORY_QMD_UPDATE=off to disable automatic indexing/embeddings. Team does not set these options for you.

Optional worker skill index

  1. Edit the saved profile JSON at $PI_CODING_AGENT_DIR/team-mode-profiles/<id>.json (default: ~/.pi/agent/team-mode-profiles/<id>.json). Add "skills": ["team-demo-summary"] under roles.scout, keeping the other fields. To create a copy first, use /team profile create scout-skills-demo --from engineer_template. An existing demo profile does not need to be recreated or edited if it already has the list.
  2. Run /team config validate, then /team config reload with no active workers, then /team profile scout-skills-demo (or use the ID you edited). /team config edit edits team-mode.json, not the saved profile file. To use an inline override instead, put the field under profiles.<id>.roles.scout in team-mode.json.

Entries must be distinct, exact, case-sensitive Pi skill names, not paths or globs. Overrides replace the list as a whole; [] clears it. The effective role with an omitted or empty list gets no prompt changes. Lead is unaffected.

When a worker starts, Team checks Pi’s local settings catalog, including enabled skills from already-installed packages. It honors Pi’s resource filters and excludes untrusted project resources. It does not install packages, import extensions for discovery, or use temporary CLI/extension-supplied skill paths for this index. Missing, disabled, ambiguous, or disable-model-invocation: true names fail the task before starting a worker, with the role and name in the error. /team config validate checks the list’s shape, not name availability.

In list order, the worker gets only the name, description, and absolute SKILL.md path (or the standalone Markdown path Pi recognizes). The stock worker gets the index in its role definition; the SDK worker, including Cursor, gets it in the task prompt. No full skill bodies are injected, and the worker chooses whether a file is useful. This is not a file-access allowlist: unlisted files can still be read if existing tools and permissions allow it. The tools, isolation, and stock Agents row stay as they were. Changing the stock role’s index creates a new definition identity without rewriting the old one.

Try the existing Scout demo

If your Pi home already has team-mode-profiles/scout-skills-demo.json and the enabled team-demo-summary skill (normally skills/team-demo-summary/SKILL.md), don’t edit either file:

  1. Start the Pi TUI with this checkout as its Team Mode source, or use /reload if it is already registered. Run /team profile scout-skills-demo and check for Team: Scout Skills Demo.
  2. Ask Lead: “Dispatch Scout only. Ask Scout for the demo summary, using its optional formatting recipe if relevant. Do not give Scout a skill path or the expected marker. Report Scout’s result verbatim.”
  3. With compatible stock subagents and a non-Cursor Scout model, look for the ordinary Scout badge and task brief in Agents. Check Scout’s result for TEAM_DEMO_SUMMARY_APRICOT. If you can inspect the worker transcript, check for the separate read of SKILL.md; the row alone proves neither delivery nor a read. An SDK worker has no native Agents row. If the result lacks the marker, inspect whether the worker opted to read or whether its tools could access the file.

The live demo uses your selected model. For offline testing from the repository root, run PI_TEAM_TEST_SUBAGENTS=/absolute/path/to/stock/pi-subagents python3 pi-team-mode/test/role-skills-pilot.py . pi-team-mode after building the nested package. It checks both entry points with stock 0.26.3 and SDK fallback, using a fake loopback model and disposable settings. From pi-team-mode after building, the optional Cursor check is PI_TEAM_TEST_CURSOR=/absolute/path/to/pi-cursor-sdk-0.5.32 node --test test/cursor-role-skills.test.mjs. It verifies index delivery to a stub transport, not live Cursor auth or file access.

Serious actions

The Lead can request one approval covering a GitHub push, opening a PR, and requesting review. It operates on a committed revision, verifies the remote and revision, never force-pushes, and does not automatically retry a partial publication. git and (for PRs/review) gh are needed. Local edits and checks do not ask for approval. Lead is instructed to get explicit approval for other remote writes or destructive operations. Only the brokered operations enforce the approval in code: normal shell tools are not a sandbox and ambient account credentials can bypass a broker. Advanced isolation and custom checkpoint handlers are not part of this release.

Test without model credits

npm ci                  # from this nested directory
npm test                # fake workers, mocked remote actions, loopback-only fake model
npm run test:pi         # real Pi worker and package lifecycle, using the nested build
npm pack --dry-run      # preview release contents; does not publish

Pack releases from this nested directory with npm pack (without --ignore-scripts). The prepack hook builds the extension and copies the repository-root LICENSE verbatim into the npm package; the root file is the source of truth.

Before publication, run python3 test/npm-tarball-smoke.py /path/to/pi-team-mode-<version>.tgz (substitute the candidate version) to serve the exact MIT tarball from a loopback npm registry. After publication, run python3 test/pi-smoke.py npm:pi-team-mode <version> to check the actual npm install and version in a disposable Pi home. The package install uses the npm registry, but the TUI and worker use only the loopback fake model.

To exercise the native Agents rows, set PI_TEAM_TEST_SUBAGENTS to the absolute path of an unmodified local @tintinweb/pi-subagents 0.26.3 package before running npm run test:pi. The PTY uses fake loopback models and checks both Status entry points, no extra inference, live model and settled summary updates, profile seeding, the /team menu (template copy and switch, role-model picker, toggle, concurrency, and Backend override/reset), CLI help and input errors, the my-engineering CLI create, edit, reload and no-clobber workflow, first-dispatch definition creation, reuse after /reload, Engineer, Research and My Engineering Validator rows (red, no suffix, plain brief), exact profile prompt/model/thinking/tools, and an ordinary Agent (twin) launched with the stock Agent tool. From the repository root, run python3 pi-team-mode/test/pi-smoke.py --git-mirror . to test the committed main via a private temporary Git mirror and a mocked GitHub response. Local-source smoke runs check that the Research worker uses an extension-only loopback provider without reloading the provider extension. Local and npm smoke runs (npm 0.1.8 and later) also check that Concurrency survives /reload and reopening, /new starts at 5, /resume restores each of two saved sessions' own ceiling, and default survives reload and reopening without replaying work. These checks run with or without stock subagents. All smoke paths use a disposable Pi config and fake credentials. Run the stock smoke again with PI_TEAM_TEST_BACKEND=sdk to select SDK through the picker, dispatch through the SDK after /reload with stock installed, and check the picker, Status and Doctor on resume. That run also checks /new isolation, switching back with /resume, and Use config surviving reload and a subsequent reopen without replaying work. The same stock and forced-SDK flags work with the loopback tarball smoke. To check pi-memory coexistence, run the local-source smoke with PI_TEAM_TEST_MEMORY=/absolute/path/to/pi-memory (0.4.2 tested); repeat with PI_TEAM_TEST_MEMORY_ORDER=after to reverse the install order. The fixture uses disposable memory and fake credentials and disables the memory quit summary and automatic indexing.

To check Cursor ownership offline with Node 24, build and run PI_TEAM_TEST_CURSOR=/absolute/path/to/installed/pi-cursor-sdk node --test test/cursor-worker.test.mjs. The fixture expects 0.5.32, uses a disposable Pi home and fake credential, and stubs the Cursor SDK and network transport. It leaves the real Cursor extension registration, ownership guard, and session hooks in place.

To check discovery itself, run python3 test/stock-agent-probe.py "$PI_TEAM_TEST_SUBAGENTS" and repeat with --strict-fallback. Stock discovers a late flat file and an explicitly manifest-declared nested file, but does not discover nested files just because their parent’s parent was scanned.