patterns

A work-analysis command that identifies recurring patterns across projects and sessions, such as stalled work, repeated blockers, or reopened decisions.

In plain words
What is it for?
Use it for current, weekly, deep, project-specific, or theme-specific pattern reports.
Why use it?
It makes repeated problems and scattered effort easier to notice than reviewing work one item at a time.

Command

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 commands/brainos-hq/brain-os/patterns
Clone the repo
git clone --depth 1 https://github.com/brainOS-HQ/brain-os
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 803 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00000 $0.00803
Opus 5 $0.00000 $0.00402
Sonnet 5 $0.00000 $0.00161
Haiku 4.5 $0.00000 $0.00080

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

Security

Grade B, and why

patterns scanned grade B with 1 finding 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- Do not moralize. State the pattern, the risk, and the action. No lectures.
templates/commands/patterns.md · 112 lines

How it starts

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

Brain OS : Pattern Engine

"What patterns are showing up across my work?"

Not analytics. Recognition.

REQUIRED FIRST READ

Before any tool call, read ~/.claude/brain-os/PROTOCOL.md. Tool routing is non-negotiable.

Input

Arguments: $ARGUMENTS (optional : entity/project name, "weekly" for recent patterns, "deep" for full analysis, or a specific theme). If a project name is given, focus on that project's patterns first.

Primary tool sequence

  1. mcp__brain-os__pattern_detect() : current pattern report
  2. If empty: mcp__brain-os__semantic_recall("recent patterns", source_kind="pattern")
  3. Supporting evidence: mcp__brain-os__entity_read() for relevant entities

What to look for

1. Momentum patterns

  • Which entities are moving? Which are stalled?
  • Is momentum concentrated or scattered?
  • Anything losing momentum that was recently high?

2. Blocker recurrence

  • Same blocker across multiple entities
  • Same blocker in the same entity across sessions
  • Blockers noted but never resolved

3. Decision repetition

  • Strategic questions that keep being reopened
  • Decisions marked active but not acted on
  • Similar decisions made independently across entities

4. Theme emergence

  • Concepts appearing across multiple entities
  • What kind of work the user keeps gravitating toward
  • Shared architectural needs

5. Execution vs discussion gap

  • Entities with lots of decisions but little evidence of progress
  • High-status descriptions that don't match actual output
  • next_move fields unchanged across updates

6. Avoidance signals

  • "Active" entities not updated in 3+ weeks
  • Entities where next_move keeps changing without anything shipping
  • Open questions piling up without answers

7. Convergence opportunities

  • Entities that could share architecture, components, or patterns
  • Work in one entity that directly benefits another

Output

========================================
  PATTERN REPORT
========================================

## Pattern 1: [name]

  Evidence:
  - [specific data point from entity_read or pattern_detect]
  - [specific data point]

  Interpretation:
  [one paragraph max]

  Risk:
  [what happens if this pattern continues]

  Recommendation:
  [one concrete action]

  Entities affected:
  [list]

----------------------------------------

## Pattern 2: [name]
  ...

========================================
  EXISTING PATTERNS : STATUS CHECK
========================================
  [for each pattern already logged]
  [still active? resolved? false positive?]
========================================

Read the full file on GitHub · 112 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 · 112 lines · 0 tokens per session scan B 9a2ac24131e8

Subscribe to this mod's changes

patterns is a command published in the GitHub repository brainOS-HQ/brain-os (6 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 803 tokens. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.