team-brain

team-brain is a cursor rule for Cursor from Hrithik-Gavankar/brainstack. It costs 1,131 tokens per session, scanned A, original, MIT.

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 for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Starting shared work, checking compliance, recalling or recording findings, notifying teammates, and coordinating research around Jira initiatives or shared spikes.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/hrithik-gavankar/brainstack/team-brain
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.

Clone the repo
git clone --depth 1 https://github.com/Hrithik-Gavankar/brainstack

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for team-brain

README.md
[![agentmods](https://agentmods.dev/badge/rules/hrithik-gavankar/brainstack/team-brain/github.svg)](https://agentmods.dev/rules/hrithik-gavankar/brainstack/team-brain)
Your own site
<a href="https://agentmods.dev/rules/hrithik-gavankar/brainstack/team-brain"><img src="https://agentmods.dev/badge/rules/hrithik-gavankar/brainstack/team-brain/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for team-brain

Your own site · 80×15
<a href="https://agentmods.dev/rules/hrithik-gavankar/brainstack/team-brain"><img src="https://agentmods.dev/badge/rules/hrithik-gavankar/brainstack/team-brain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,131 This file is loaded in full into every session.
When invoked 1,131 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01131 $0.01131
Opus 5.5 $0.00452 $0.00452
Sonnet 5.5 $0.00226 $0.00226
Haiku 4.5 $0.00113 $0.00113

Measured 1mo ago against content hash 456f71679e92, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 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 YOU_JIRA_TICKET_HERE — start Team Brain sync.
I'm starting on YOU_JIRA_TICKET_HERE — start Team Brain sync, summarize crew memory, then help me.
/team-brain start YOU_JIRA_TICKET_HERE
Wake Team Brain sync for YOU_JIRA_TICKET_HERE and continue.
Stop Team Brain sync for YOU_JIRA_TICKET_HERE.

…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
  → delete(source_ref) to tombstone poisoned context (member/admin only)
  → redundant_candidate on remember → recall + same source_ref, or queue for admin (pending approve <pending-id>)

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 · 113 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. 1mo ago Changed · +2 lines · +76 tokens per session 456f71679e92
  2. 1mo 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 (24 stars, last pushed 19d ago), licensed MIT. It adds 1,131 tokens to every session, about $0.0045 per session on Opus 5.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.