project-brain

Session memory for AI agents — load context at the start, save sessions at the end, evolve knowledge across sessions. Like a professional's notebook: open before work, write a summary when done, persist between sessions. Trigger: When starting a session and need to recover context, or ending a session and want to save what happened.

5 stars

Best use case

project-brain is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Session memory for AI agents — load context at the start, save sessions at the end, evolve knowledge across sessions. Like a professional's notebook: open before work, write a summary when done, persist between sessions. Trigger: When starting a session and need to recover context, or ending a session and want to save what happened.

Teams using project-brain should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/project-brain/SKILL.md --create-dirs "https://raw.githubusercontent.com/SynapSync/skills-registry/main/cognitives/skills/workflow/project-brain/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/project-brain/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How project-brain Compares

Feature / Agentproject-brainStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Session memory for AI agents — load context at the start, save sessions at the end, evolve knowledge across sessions. Like a professional's notebook: open before work, write a summary when done, persist between sessions. Trigger: When starting a session and need to recover context, or ending a session and want to save what happened.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Project Brain

## Assets

This skill uses a modular assets architecture. Detailed workflows, helpers, and templates are in the [assets/](assets/) directory:

- **[assets/modes/](assets/modes/)** — LOAD and SAVE mode workflows
- **[assets/helpers/](assets/helpers/)** — Brain directory config resolution, incremental merge algorithm
- **[assets/templates/](assets/templates/)** — Standard brain document format

See [assets/README.md](assets/README.md) for full directory documentation.

---

## Purpose

Project Brain is **session memory for AI agents**. It bridges the gap between sessions so any agent can pick up exactly where the last one left off — and save what it learned before shutting down.

**Design principle**: Agents behave like professionals with a notebook. Open the notebook before work (LOAD), write a summary when done (SAVE), and the notebook persists between sessions. Memory is a natural part of the workflow, not an extra step.

**What it does:**
- **LOAD**: Reads a brain document, parses structured context, delivers a concise briefing
- **SAVE**: Captures session context, creates or incrementally updates a brain document

**What a brain document is:**
A markdown file that captures project state, session history, architecture decisions, and next steps. The standard format (v2.0) has defined sections, but the skill also reads v1.0 and free-form documents.

---

## Critical Rules

> **RULE 1 — NO FABRICATION**
>
> Only report information that exists in the brain document (LOAD) or was explicitly discussed in the session (SAVE). Never infer, guess, or complete missing data.

> **RULE 2 — USER CONFIRMS BEFORE WRITE**
>
> In SAVE mode, always present the gathered session data to the user for review before writing. Never write without confirmation.

> **RULE 3 — INCREMENTAL NOT DESTRUCTIVE**
>
> SAVE UPDATE merges new data into existing sections. It never overwrites the full document. Accumulated Context is append-only. Session Log is prepend-only.

> **RULE 4 — FORMAT BACKWARD-COMPATIBLE**
>
> LOAD parses three formats: v2.0 standard, v1.0 sections, and free-form markdown. SAVE UPDATE detects the format and offers migration if the document isn't v2.0.

> **RULE 5 — PATH RESOLUTION ONCE**
>
> Resolve `{brain_dir}` once per session (see Configuration Resolution). The resolved path is used for all operations. Don't re-ask unless the user wants to change the path.

> **RULE 6 — LANGUAGE SEPARATION**
>
> **Conversation** (briefings, confirmations, questions) → respond in the same language the user used.
> **Brain document content** (what gets written to file) → always in English, regardless of conversation language. Technical artifacts must be consistent across sessions.

> **RULE 7 — NO SILENT DEFAULTS**
>
> When `{brain_dir}` has not been resolved, you MUST ask the user via `AskUserQuestion` before proceeding. Never silently choose the default staging path. The user must actively confirm their preferred directory.

---

## Configuration Resolution

`{brain_dir}` is the directory where project-brain stores brain documents. Resolve it once per session:

1. **User message context** — If the user's message contains file paths, extract `{brain_dir}` from those paths
2. **Auto-discover** — Scan for `.agents/project-brain/` in `{cwd}`, or look for existing brain documents
3. **Ask the user** — If nothing found, ask where to store brain documents via `AskUserQuestion`. Default suggestion: `.agents/project-brain/{scope}/`

No AGENTS.md. No branded blocks. The brain directory is resolved at runtime.

Full resolution algorithm: see [assets/helpers/brain-resolve.md](assets/helpers/brain-resolve.md)

---

## Mode Detection

| Mode | EN Signals | ES Signals | What It Does |
|------|-----------|-----------|-------------|
| **LOAD** | "load brain", "restore context", "brief me", "pick up where we left off" | "carga el brain", "recupera el contexto", "ponme al dia" | Auto-discovers brain, reads it, delivers context briefing |
| **SAVE** | "save brain", "save session", "update brain", "persist session" | "guarda el brain", "guarda la sesion", "actualiza el brain" | Gathers session data, creates or updates brain document |

**Disambiguation**: If the user's intent is unclear, ask:

> "Do you want me to **load** a brain document (restore context) or **save** the current session (capture what we did)?"

---

## Asset Loading (Mode-Gated)

After detecting the mode, read ONLY the assets listed for that mode. Do NOT read assets for other modes — they waste context tokens.

| Mode | Read These Assets | Do NOT Read |
|------|-------------------|-------------|
| **LOAD** | `assets/modes/LOAD.md`, `assets/helpers/brain-resolve.md` | SAVE.md, brain-config.md, incremental-merge.md, BRAIN-DOCUMENT.md |
| **SAVE INIT** | `assets/modes/SAVE.md`, `assets/helpers/brain-config.md`, `assets/templates/BRAIN-DOCUMENT.md` | LOAD.md, brain-resolve.md, incremental-merge.md |
| **SAVE UPDATE** | `assets/modes/SAVE.md`, `assets/helpers/brain-config.md`, `assets/helpers/incremental-merge.md` | LOAD.md, brain-resolve.md, BRAIN-DOCUMENT.md |

Read the mode asset first, then follow its internal references to helpers/templates as needed.

---

## Quick Start

### LOAD Mode

Use at the start of a session to restore context:

> Load the project brain.

This will: resolve `{brain_dir}`, scan for existing documents, read the brain, parse sections, and deliver a context briefing.

**Assets to read now:** [assets/modes/LOAD.md](assets/modes/LOAD.md) + [brain-resolve.md](assets/helpers/brain-resolve.md)

### SAVE Mode

Use at the end of a session to persist what happened:

> Save the session to the brain.

This will: detect if a brain exists (UPDATE) or not (INIT), gather session data, confirm with you, and write or merge the brain document.

**Assets to read now:** [assets/modes/SAVE.md](assets/modes/SAVE.md) + [brain-config.md](assets/helpers/brain-config.md) (SAVE.md references additional helpers per sub-mode)

---

## Capabilities Matrix

| Capability | LOAD | SAVE (INIT) | SAVE (UPDATE) |
|-----------|:----:|:-----------:|:-------------:|
| Resolve `{brain_dir}` | Yes | Yes | Yes |
| Auto-discover brain documents | Yes | No | Yes |
| Read brain from Obsidian vault | Yes | No | No |
| Read brain from filesystem | Yes | No | No |
| Parse v2.0, v1.0, free-form | Yes | No | Yes |
| Deliver context briefing | Yes | No | No |
| Create new brain document | No | Yes | No |
| Incremental merge | No | No | Yes |
| Gather session context | No | Yes | Yes |
| Offer format migration | No | No | Yes |

---

## Integration with Other Skills

| Skill | Integration |
|-------|------------|
| `sprint-forge` | LOAD reads sprint-forge re-entry prompts. SAVE captures sprint progress as session entries. |
| `obsidian` | LOAD can read brain documents from vault via obsidian READ mode. Invoke via `Skill("obsidian")` or say "read from obsidian". Subagent fallback: read obsidian SKILL.md directly. |
| `universal-planner` | LOAD reads planning documents. SAVE captures planning decisions. |

**Composition patterns:**
```
session start  → project-brain LOAD  → agent is briefed → work happens
session end    → project-brain SAVE  → session persisted → next agent can LOAD
```

```
sprint-forge INIT  → generates findings + roadmap
project-brain SAVE → captures sprint-forge session → brain document created
new session        → project-brain LOAD → full context restored
```

---

## Limitations

1. **Markdown only**: Handles `.md` files; does not parse `.yaml`, `.json`, or other formats
2. **Single file**: One brain document per project — not a recursive folder reader
3. **No synthesis**: If the brain document is outdated, the briefing reflects that
4. **Obsidian integration in LOAD only**: SAVE always writes to filesystem. To sync to Obsidian, use the `obsidian` skill after SAVE.
5. **Session Log size**: Compacted at 15+ entries — older sessions are archived to `{brain_dir}/archive/` and replaced with a summary paragraph
6. **No auto-save**: SAVE must be explicitly invoked — the agent doesn't auto-save on exit

Related Skills

cognitive-register

5
from SynapSync/skills-registry

Registers new cognitives (skills, agents, prompts, workflows, tools) into the SynapSync Registry with proper structure, manifest, and registry index. Trigger: When the user says "GUARDA", "REGISTRA", "AGREGA" followed by a cognitive type and name, or asks to save/register/add a cognitive to the registry.

sprint-forge

5
from SynapSync/skills-registry

Adaptive sprint workflow: deep analysis, evolving roadmap, one-at-a-time sprints, formal debt tracking, and re-entry prompts for context persistence. Trigger: When the user wants to analyze a project, create a roadmap, generate/execute sprints iteratively, or check project status and technical debt.

universal-planner

5
from SynapSync/skills-registry

Unified planning and execution skill for any software scenario. PLAN mode produces structured documentation; EXECUTE mode implements sprints from plan output. Trigger: When planning or executing any software work that requires structured analysis and actionable task plans.

growth-ceo

5
from SynapSync/skills-registry

Elite tech CEO strategist that thinks like Musk, Bezos, Altman, Huang, and Thiel combined. Generates billion-dollar-scale strategic initiatives, product visions, and growth plays using first principles, 7 Powers, flywheels, and exponential thinking. Use this skill whenever the user discusses product strategy, business decisions, growth challenges, competitive positioning, or asks "what should we build" — even if they don't explicitly ask for "strategy". This includes: scaling from N to 10N users, what to build vs NOT build, MVP decisions, feature prioritization, competitive differentiation, enterprise vs self-serve, go-to-market, pivoting, revenue strategy, reducing churn, positioning against competitors, fundraising strategy, team building, platform plays, or any question where the user needs a founder/CEO-level perspective. If the user describes their product and asks "what should I do" — use this skill. Think big. Resources can be acquired. The vision comes first.

growth-architect

5
from SynapSync/skills-registry

AI Co-Founder & Growth Architect: strategic clarity, product vision, MVP design, and architecture decisions (ADRs) before execution begins. Trigger: When user needs strategic advice, MVP validation, market analysis, product vision, or architecture decisions — before generating any execution plan.

obsidian

5
from SynapSync/skills-registry

Unified Obsidian vault operations: sync documents to vault, read notes for context, search knowledge, and validate markdown standards. Filesystem-based, no MCP required. Trigger: When user wants to read from or write to Obsidian vault.

skill-creator

5
from SynapSync/skills-registry

Creates new AI agent skills following the SynapSync spec with enhanced templates and guidelines. Trigger: When user asks to create a new skill, add agent instructions, or document patterns for AI.

prompt-improver

5
from SynapSync/skills-registry

Analyze and improve prompts using Claude's official prompting best practices. Use this skill whenever the user wants to improve, refine, review, or optimize a prompt — whether it's a system prompt, a user prompt, an API prompt, or instructions for an AI agent. Also trigger when the user shares a raw prompt and asks for feedback, says 'make this prompt better', 'optimize my prompt', 'review this prompt', or pastes a prompt and asks what's wrong with it. Even if the user just says 'improve this' while sharing text that looks like a prompt or instruction set, use this skill.

dead-code-auditor

5
from SynapSync/skills-registry

Rigorous dead code audit for any module, folder, or file in any programming language. Detects orphan files never imported anywhere, classes/functions/ methods declared but never called, constructor parameters received but never consumed, unused imports/requires, private fields with no references, and commented-out code blocks. Use this skill whenever the user asks to: review unused code, clean up a feature after a refactor, find dead code, detect orphan files or classes, audit what can be deleted, find what's left over after a big change, or any variation of "what's not being used / what can I remove". Also triggers when the user says they made large changes and wants to know what became obsolete. IMPORTANT: This skill only reports — it never deletes anything. At the end it always offers to generate a removal plan with /plan.

plan-creating-project-plans

9
from wahidyankf/open-sharia-enterprise

Comprehensive project planning standards for plans/ directory including folder structure (ideas.md, backlog/, in-progress/, done/), stage-aware naming convention (backlog/done use YYYY-MM-DD__identifier/, in-progress uses identifier/ with no date prefix), five-document file organization (README.md, brd.md, prd.md, tech-docs.md, delivery.md for multi-file default; single README.md for trivially-small single-file exception), BRD/PRD content-placement rules, Gherkin acceptance criteria, and the mandatory structured multiple-choice grilling gates (pre-write and post-write) for resolving design decisions with the user. Essential for creating structured, executable project plans.

LinkedIn Auto-Commenter — Project Standards

9
from JienWeng/yappy

## Comment Quality

~aod-project-plan

9
from davidmatousek/tachi

Validates architecture documentation completeness by checking for technology stack, API specifications, database schema, security architecture, and alignment with feature specification. Use this skill when you need to check if plan.md is complete before implementation, validate architecture documentation, or review technical plans for completeness.