team-brain

A shared memory and coordination mode for a development team working on an initiative or Jira ticket. It keeps team findings separate from an individual engineer's private BRAIN.md.

In plain words
What is it for?
Starting shared work, checking compliance, recalling or recording findings, notifying teammates, and coordinating research around Jira initiatives or shared spikes.
Why use it?
It helps agents use the same crew context and follow the team's research and memory-sharing checks without exposing personal notes.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/hrithik-gavankar/brainstack/team-brain
Clone the repo
git clone --depth 1 https://github.com/Hrithik-Gavankar/brainstack
Per session 1,055 This file is loaded in full into every session.
When invoked 1,055 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01055 $0.01055
Opus 5 $0.00528 $0.00528
Sonnet 5 $0.00211 $0.00211
Haiku 4.5 $0.00105 $0.00105

Measured 2d ago against content hash de412cc7d061, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

team-brain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

platforms/cursor/rules/team-brain.mdc · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Team Brain — sync mode (mandatory)

If this workspace has .team-brain/ or the user is working on a shared Jira initiative / spike / epic, treat Team Brain as the crew’s shared memory.

Personal BRAIN.md / engineer-brain stay private — never upload those.

Compliance check (MCP-first, soft gate)

Policy: stronger_prompts (not a hard CLI block). Agents must follow it; humans may still use the CLI offline.

EACH TURN on a known Jira key
 → prefer MCP: sync_status / compliance / prepare_research
 → if compliance.agent_action is set → do that BEFORE deep research or ending the turn
 → research_ok must be true before digging into the codebase
     (start loads context; else prepare_research / recall)
 → after durable findings → remember(source_ref) in the same turn

CLI mirror:

bash <brainstack>/core/scripts/team-brain-api.sh compliance <JIRA-KEY>
bash <brainstack>/core/scripts/team-brain-api.sh sync-status <JIRA-KEY>

Human entry (one manual step)

When the user starts team work on a ticket — including phrases like:

I'm starting on AAP-81423 — start Team Brain sync.
I'm starting on AAP-81423 — start Team Brain sync, summarize crew memory, then help me.
/team-brain start AAP-81423
Wake Team Brain sync for AAP-81423 and continue.
Stop Team Brain sync for AAP-81423.

…run the matching command (start / wake / stop):

bash <brainstack>/core/scripts/team-brain-api.sh start <JIRA-KEY>

That loads crew memory into .team-brain/cache/<KEY>.json and starts background pull.

Then you MUST:

  1. Read the cache / sync-status (check compliance.research_ok)
  2. Summarize crew knowledge (2–5 bullets)
  3. Only then dig into the codebase

While sync mode is active

EACH TURN on this key
  → touch <KEY>   (keeps sync awake)
  → prefer cache; recall / prepare_research if topic-specific search needed

AFTER durable finding
  → remember with stable source_ref (KEY#slug)
  → identical body = no-op; same source_ref + new body = UPDATE (merge)
  → never invent a second row for the same topic slug
  → body style: natural prefer/avoid guidance — never TODO/NO-TODO dumps

ON HUMAN CORRECTION (bad research / wrong sync summary)
  → treat as ground truth; do not argue
  → correct(source_ref, corrected_body) or re-remember same source_ref → UPDATE
  → optional learning at source_ref/learning (was wrong → prefer …)
  → prior body archived; history/restore for soft rollback if needed

LONG SESSION (do not spam every turn)
  → after a long research block, OR about every 8–10 turns on this key
  → quiet recall / prepare_research (or summarize notify/<KEY>.json if updated)
  → optional once-per-spike: suggest background `watch <KEY> &` (poll or --push)
  → at most one soft nudge per stretch — never nag every turn

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 111 lines · 1,055 tokens per session scan A de412cc7d061

Subscribe to this mod's changes

team-brain is a cursor rule published in the GitHub repository Hrithik-Gavankar/brainstack (5 stars, last pushed 12d ago), licensed MIT. It adds 1,055 tokens to every session, about $0.0053 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.