openbriefing
Skill4 starsChanged 6 months agoMITView on GitHub
Provides project memory, agent sessions, briefings, and code understanding for AI agents via the OpenBriefing MCP server. Use at the start of every conversation to get a briefing on recent decisions, open items, and actionable plan steps. Use during work sessions to record decisions and progress for the next agent. Includes a catalog of MCP tools (grouped) and local npm commands for the openbriefing source repo. Triggers when working on any project with OpenBriefing configured.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/00-openbriefing-repo.mdcCursor rule
- .cursor/rules/openbriefing.mdcCursor rule
- llms.txtllms.txt
- openbriefingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 2 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Every call to get_agent_briefing, get_session_history, and the session/memory tools needs a project parameter.
- Very specific: line 16
Run git remote get-url origin in the workspace and parse owner/repo from the URL
- Very specific: line 17
If there is no git remote, use the workspace folder name (e.g., my-project)
- Very specific: line 18
Always pass the result as the project argument
- Distinctive: line 22
Always do this before responding to the user:
- Very specific: line 25
Call get_agent_briefing from the user-openbriefing MCP server (or whatever your Cursor MCP entry is named) with project
- Very specific: line 28
Call get_session_history with limit: 3 and project to see recent sessions
- Very specific: line 29
Optional (semantic memory): Call search_memory with a short query and project, and get_recent_memories with limit: 5 and project.
- Very specific: line 30
Use the briefing to understand: recent decisions, open items, actionable[] plan steps, codebase notes, and relatedInsights[]
- Very specific: line 31
If a previous session has open_items, proactively mention them
- Very specific: line 32
Resume active plans: If the last session has planSteps with incomplete steps (pending/in_progress/blocked), show the plan status to the …
- Distinctive: line 37
When doing meaningful work (not just answering questions):
- Very specific: line 39
Call start_agent_session with the scope of work and project
- Very specific: line 41
Call update_agent_session immediately after each meaningful step (see auto-save rules below)
- Very specific: line 42
Call end_agent_session when done, recording:
- Very specific: line 53
After an architectural decision, you can call save_memory with project, the reasoning, and tags (e.g.
- Very specific: line 59
When you create a plan (in Plan mode, or outline implementation steps), you must persist it via plan_steps so the next agent can continue:
- Very specific: line 62
As you complete steps: Update the step's status to "completed" (or "blocked" with a notes explaining why).
- Very specific: line 92
Tell the user immediately: ask them to start Ollama (open the Ollama app or run ollama serve).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenBriefing
OpenBriefing gives you persistent memory across sessions. It distills your past agent sessions, saved memories, and indexed code into a structured briefing so you never start blind.
OpenBriefing is the memory + code half of a two-server setup. For outside-world signals — Discord, GitHub issues/PRs, X/Twitter, Linear/PM export — use the companion unMute MCP server alongside it. Both key off the same
project(owner/repo).
Detecting the Project
Every call to get_agent_briefing, get_session_history, and the session/memory tools needs a project parameter. The MCP server runs separately and cannot detect your workspace, so you must detect it yourself:
- Run
git remote get-url originin the workspace and parseowner/repofrom the URL - If there is no git remote, use the workspace folder name (e.g.,
my-project) - Always pass the result as the
projectargument
At Session Start
Always do this before responding to the user:
- Detect the project identifier (see above)
- Call
get_agent_briefingfrom theuser-openbriefingMCP server (or whatever your Cursor MCP entry is named) withproject- Optionally pass
scopeif you know what area the user is working on - Optionally pass
sincewith the last session timestamp
- Optionally pass
- Call
get_session_historywithlimit: 3andprojectto see recent sessions - Optional (semantic memory): Call
search_memorywith a short query andproject, andget_recent_memorieswithlimit: 5andproject. Always passproject— these tools fall back to the MCP server's CWD-detected project if omitted, which leaks memories across projects sharing the same DB. - Use the briefing to understand: recent decisions, open items,
actionable[]plan steps, codebase notes, andrelatedInsights[] - If a previous session has
open_items, proactively mention them - Resume active plans: If the last session has
planStepswith incomplete steps (pending/in_progress/blocked), show the plan status to the user and offer to continue from where the previous agent left off. - Recover auto-closed sessions: If the most recent session's summary indicates it was auto-closed (e.g., "Auto-closed: session was never properly ended") and its
filesEdited,decisionsMade, oropenItemsare empty, check if thelastSessionfrom the briefing has ascope. If it does, mention that the previous session (scope:<scope>) was lost without saving progress and ask if there is anything to record before moving on. This prevents silent data loss across agent handoffs.
During Work Sessions
When doing meaningful work (not just answering questions):
- Call
start_agent_sessionwith the scope of work andproject- Example:
scope: ["agent-auth", "mcp-tools"], project: "owner/repo"
- Example:
- Call
update_agent_sessionimmediately after each meaningful step (see auto-save rules below) - Call
end_agent_sessionwhen done, recording:decisions_made: key decisions with brief reasoningfiles_edited: files that were changedopen_items: unfinished work the next agent should pick upplan_steps: structured plan with step statuses (see below)summary: 1-2 sentence description of what was accomplishedrelated_insights: free-form debrief content that doesn't fit decisions/openItems but should be retrievable later by meaning (e.g., "spec is the source of truth", "gotcha: X is null when Y is true", principles that emerged). Each entry becomes a session-linked memory and surfaces in future briefings viarelatedInsights[]automatically — use this instead of callingsave_memoryseparately.
- The
end_agent_sessionresponse includestokenSavings+tokenSavingsNote— relay it to the user (e.g. "Session saved — future agents get ~12k tokens of context compressed into a ~1.9k-token briefing (6:1), saving ~10k tokens every session start").
Saving memories (ad-hoc)
- After an architectural decision, you can call
save_memorywithproject, the reasoning, andtags(e.g.["area", "decision"]). - Non-obvious codebase facts are good candidates to save.
- Always pass
projecttosave_memory/search_memory/get_recent_memories. They acceptproject(preferred) or the legacyproject_idalias. If both are omitted, the tools fall back to the MCP server's CWD-detected project — which produces silent cross-project leaks when one DB is shared across multiple repos.
Saving Plans (mandatory when plans exist)
When you create a plan (in Plan mode, or outline implementation steps), you must persist it via plan_steps so the next agent can continue:
- When creating a plan: Convert each step into a
plan_stepsentry withid,description, andstatus: "pending". Save immediately viaupdate_agent_session. - As you complete steps: Update the step's status to
"completed"(or"blocked"with anotesexplaining why). Include the fullplan_stepsarray with updated statuses in yourupdate_agent_sessioncall. - Plan step statuses:
pending,in_progress,completed,blocked - At session end: The final
plan_stepsstate should reflect what was done and what remains. Incomplete steps are automatically visible to the next agent via the briefing.
Example plan_steps:
[
{ "id": "1", "description": "Add planSteps field to schema", "status": "completed" },
{ "id": "2", "description": "Update session CRUD", "status": "completed" },
{ "id": "3", "description": "Update MCP handlers", "status": "in_progress" },
{ "id": "4", "description": "Write tests", "status": "pending" }
]The next agent's briefing will include these steps via actionable[], so they know exactly where to pick up.
Auto-Save on Every Turn (mandatory)
Sessions can be lost at any time (chat disconnects, crashes, timeouts). Since you cannot detect when a chat is about to end, you must save at the end of every turn:
- At the end of each response, after all tool calls and edits are done, call
update_agent_sessionwith the current cumulative state:files_edited,decisions_made,open_items,plan_steps(if a plan exists), and asummaryof progress so far. - This is the only required save point – do not call
update_agent_sessionafter every individual action. end_agent_sessionis still preferred when you know the work is done, but the per-turn save ensures nothing is lost if the chat drops unexpectedly.- First turn rule: Even if your first response is just a greeting or briefing summary, call
update_agent_sessionwith at least asummary(e.g., "Session started, briefing reviewed. Waiting for user direction."). An empty session that gets auto-closed is useless to the next agent.
If a tool response contains embeddingProviderWarning (mandatory)
get_agent_briefing, save_memory, search_memory, and end_agent_session include an embeddingProviderWarning field when the embedding provider (Ollama by default) is unreachable. When you see it:
- Tell the user immediately: ask them to start Ollama (open the Ollama app or run
ollama serve). Until then, semantic memory search degrades to keyword matching,relatedInsights[]comes back empty, and new memories are saved without embeddings. - Keep working — nothing is lost. Memory/session text is always persisted; only the vectors are missing.
- No manual recovery needed: once Ollama is back, the server automatically backfills the missing embeddings on the next briefing/memory call (
npm run backfill:memory-embeddingsstill exists for manual/bulk runs).
What Makes a Good Session Record
- Decisions should include the "why", not just the "what"
- Open items should be specific and actionable
- Summaries should be useful to a future agent with no prior context
How to use this catalog
- MCP tools run through your OpenBriefing MCP server. Full JSON schemas and descriptions live in the tool picker; the tables below are a map of names and purpose.
npmscripts apply when you are working in the openbriefing source repository and need to build, test, or manage the database without the MCP.
Local CLI (openbriefing source repo only)
| Command | Purpose |
npm run build | prisma generate + migrate deploy + tsc |
npm test | Run Vitest unit tests |
npm run briefing | Local preview of get_agent_briefing output in the terminal (-- --json, -- --scope <area>) |
npm run db:migrate | prisma migrate deploy (respects OFFLINE_DB) |
npm run db:setup-local | Create the local Postgres DB + apply schema |
npm run db:sync | Non-destructive, row-level merge between local and cloud |
npm run backfill:memory-embeddings | Re-embed memories saved while the embedding provider was down |
npm run reembed:all | Recompute stored embeddings |
npm run dev | Start dev entry; MCP server is usually started by Cursor, not this |
npm run sync:skill | After editing this skill in skills/openbriefing/, copy it to .cursor/skills/openbriefing/SKILL.md so both stay in sync |
Agent memory & project context (MCP)
| Tool | When to use |
get_agent_briefing | Every session start – distilled context (decisions, open items, codebase notes). Pass project. Also exposes actionable[] (top incomplete plan steps ranked by status × recency × scope) and relatedInsights[] (memories semantically related to your current focus). |
get_session_history | Recent sessions; default is compact. Use verbose: true only if you need full detail. |
get_session_delta | Compact diff since a reference point (a session ID or ISO timestamp). Use when resuming after a break — returns only what's new (decisions, completed steps, external refs) at ~200-400 tokens vs get_session_history's ~1k. Pass project and since. Optional scope filter. |
start_agent_session | When beginning substantive work. |
update_agent_session | After each turn / meaningful step (per skill rules). Soft-end: also works on already-ended sessions for 24h after endedAt (configurable via OPENBRIEFING_SESSION_AMEND_WINDOW_MS), so a forgotten debrief can land on the right session instead of in save_memory. |
end_agent_session | When the work block is done. Pass related_insights: string[] for free-form debrief content — each entry becomes a session-linked memory (tagged session:<id>, embedded for semantic retrieval) and surfaces in future briefings' relatedInsights[] with sessionId set so the next agent can navigate back. Use this instead of calling save_memory after end_agent_session. |
link_external_event | Bind a typed pointer to an artifact on another surface (Slack thread, Notion page, GitHub PR, Linear issue, file, Discord thread) to the active session — instead of stuffing "Dan ratified X in Slack <url>" into open_items as a string. The reference is structured and the next agent can navigate it. Resolves the active session as the most-recent amendable session for project, or pass session_id explicitly. |
import_claude_plans | Import plans from ~/.claude/plans/. |
save_memory / search_memory / get_recent_memories / delete_memory | Ad-hoc memory not tied to a session. Always pass project — project is the primary param, project_id is a deprecated alias. |
Code understanding (MCP)
| Tool | When to use |
index_codebase | Index code from LOCAL_REPO_PATH / GITHUB_REPO_URL for a search query, so feature/code notes appear in briefings. |
index_code_for_features | Index code mapped to product features. |
analyze_code_ownership / view_feature_ownership | Who owns code / which code backs a feature. |
investigate_issue | Investigate a specific issue against the indexed code (on-demand GitHub read of your own repo). |
learn_from_pr / seed_pr_learnings | Learn patterns from merged PRs in your own repo. |
Need channel signals?
Discord, GitHub issue/PR sync, X/Twitter, and Linear/PM export are not part of OpenBriefing. Run the companion unMute MCP server for those — it shares the same project key, so an agent can combine a unMute channel view with an OpenBriefing briefing in the same conversation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

