Cosmos brings your people, agents and context together — context that compounds, one coding style for every AI, an architecture map that cannot go stale, and a gate for the review checklist. Committed to git; nothing to run.
python3 -m pip install cosmos-dev
cosmos initgit clone <repo> && claudeEach one is a symptom of the same cause: knowledge, rules and structure live in individual sessions instead of in the repository.
What one person's AI learns is captured, checked and handed to the next person's session before they ask.
One working agreement, committed and changed in pull requests, injected into every AI session on every machine.
Facts, findings and diagrams are filed by feature lane; two people active in one lane this month is shown before it becomes a merge conflict.
Strengths become team property: the person who knows Redis writes the constraint once; every AI inherits it. Thinking stays personal, decisions get a recorded reason.
A feature enters with its lanes, the decisions it collides with, the open findings in the way and the people already there — before code is written.
Diagrams generated from the repository itself — manifests, compose, Kubernetes, Terraform, OpenAPI — and drift-checked every time those files change.
The ledger, the index and CLAUDE.md are grouped by lane, the way the team actually talks about the product.
A hook holds the AI's turn until the tests for touched files ran, each change cites file:line, open findings on those files are addressed, and the diff is reviewed against the Charter.
The same folder, read from five seats.
remember: keeps what you found in ten seconds.Green steps run by themselves. The gold one is where a person decides.
remember: lines at once, and write one journal line per turn: the ask, the files, the commits. Transcripts are read in place, never copied.file:line, flares addressed, and the agent records what it learned while it still has the context. A commit naming a flare closes it..cosmos/ is ordinary committed files in the branch where you ran cosmos init: every branch made from it carries the team memory, and merging shares it. cosmos commits .cosmos/ every 10 minutes while you work and after each dream, in its own commit; it never pushes, the memory goes out with your branch. Append-only files merge by union. No server, no account, no cloud, nothing beyond your repository and the open-source cosmos.
What it is, what you do, what you get, and the command. Nothing here needs a server or an account.
remember: … when something must be kept for sure.cosmos why redis to see the evidence for anything.cosmos capture · cosmos why · cosmos search · cosmos remember.cosmos/charter.md: how we write code, how we test, how we point at things, how we review our own work, our architecture rules. Owned by the team, changed in pull requests.remember: in a session.cosmos charter · cosmos charter add "…" · cosmos charter edit.env.example, README. Every source file is fingerprinted.cosmos atlas once; type /atlas in Claude Code for the deeper pass (data flows, dependency index).cosmos atlas · cosmos atlas --check · /atlasconfig.json, and fold near-duplicates with lane_aliases (cosmos lanes --propose suggests them). Otherwise nothing.cosmos lanes · cosmos review --repoint for facts whose files movedcosmos horizon "bulk invite with partial success", or type it on the Horizon page.cosmos horizon "…" [-f file]file:line references, ignored an open finding on a file it touched, or made a large change without a dead-code scan (vulture for Python, knip for JavaScript), the AI is handed the exact list and keeps going.file:line and open flares. A turn is held at most once; documentation edits are never held.cosmos gate · cosmos gate --transcript FILEDEV, QA (qa/* branches), UAT, RC (release/*), PROD (main after a version tag), HOTFIX — with nothing to run.flare: … in a session, or record bugs found by hand: + Record bugs on the Flares page, cosmos flares add "…", or a list (--from bugs.csv, .xlsx, .txt). Move cards on the board or with one command.cosmos flares add|import|list|fix|edit|stage|slack|report · cosmos flares export -o flares.xlsx · /flare, /flares, /qa in your agentcosmos dream · cosmos review · the Verdicts pageArchitecture, decisions and their reasons, conventions, constraints, bug root causes, dependency limits, workflows, domain rules — each with its evidence files, dates and observers. cosmos why redis.
How we write, test, point and review, in one file. Injected first into every session. Add a rule from the UI, the CLI, or by typing remember: ….
Inventory, containers, deployment and API diagrams from what the repo declares, on one navigable page (atlas.html: pan, zoom, full screen) as well as in Markdown. Hash-checked for drift. Dreams let the model follow the Atlas prompt and add system context, data flows and a dependency index.
Every fact under the feature a product manager would name — assigned by the model, refined from paths. Who is active where, where people overlap, which lanes carry open findings.
Map a feature before coding: lanes touched, colliding decisions, flares in the way, suggested owner. Saved beside the code it will change. cosmos horizon "…" or /horizon in your agent.
Tests run, file:line cited, findings addressed, self-review done — or the turn is not over. Held at most once, never loops, never gates docs.
QA findings with a lifecycle — open, claimed, PR open, fixed, needs a human, won't fix, withdrawn, regressed. Board, Slack cards, no double posting.
The model curates every new observation — keep or drop, rewrite, category, lane — then dedupe, contradictions, staleness, evidence-based supersession. Uses your Claude Code login by default; no key to paste.
The last thing said on a branch is kept as its handoff, automatically; cosmos_handoff when stopping mid-work. The next session on that branch, on any machine, opens with it.
Git history and pull-request review comments feed the ledger with nobody installing anything: every commit becomes a journal line; commit bodies and review remarks are offered to the model as candidate rules and facts.
The ledger is a conformant OKF v0.2 bundle — Google's open spec for knowledge as markdown with frontmatter — so the format is not invented here. Provenance, trust and freshness on every note; relationships as OKF links: each lane is a concept page linking its facts, flares, horizon notes, the services whose code it touches, and the people active there. Any OKF consumer or graph viewer traverses it. Retrieval is BM25 with an evidence-path boost; no vectors.
Every dream that changed the memory measures two things on the repository's own facts and code: how often the fact about the code being edited is shown before the edit, and recall@5 for questions and file lookups (only files with five facts or fewer, where one fact can rank first). A fall of five points or more is named on the Dreams page and in cosmos doctor; numbers are only compared with runs measured the same way. On two real repositories, choosing pre-edit facts by the edit raised the first number from 39% to 81% and from 52% to 85%. cosmos eval runs both now.
cosmos watch: one local process that tails every agent's session files for this repo — all worktrees, subagents — captures what is new, shows who is working on what right now, and starts dreams. No hooks needed, so it also covers sessions opened before cosmos existed.
The moment the agent opens a file to change it, it sees the open flares on that file, its explicit rules, and the facts that match the code being changed: a file can carry a hundred facts, and the one about the function being edited is the one that matters. Each fact is shown once per session, so a later edit elsewhere in the file brings what is relevant there. Knowledge arrives at the decision, not in a report afterwards.
What the team did, not only what it learned: one line per agent turn — ask, files, commits, branch — filed by lane and person. Five commits and no new fact is still on record.
cosmos ui: overview, ledger, lanes, atlas, charter, horizon, flares, dreams, verdicts, activity, docs. Localhost only. Near-black and gold over a drifting night-storm sky behind glass panels, readable on a phone. The sidebar folds to icons; a fact or flare opens in a dialog; long lists page in the browser, so thousands of facts need no server.
/recall, /flare, /qa, /horizon and seven more, the same in Claude Code, Gemini CLI, Cursor, Copilot, Windsurf and Codex, written by cosmos connect.
cosmos's work as Claude Routines, in the cloud on a schedule or a GitHub trigger, with no laptop open: pr-review against the Charter and open flares, a daily pulse, a nightly dream, a weekly scan, merge-memory, flare-triage, digest. One line to set each up; the steps come with cosmos's upgrades. cosmos routines
A team's master QA protocol, runbook or SEO playbook becomes a command in every agent, found by itself (in Claude Code it also appears in the skill list; Codex gets it as a project skill in .agents/skills/; every agent finds it listed in AGENTS.md). cosmos playbooks add ../other/docs/qa/PROTOCOL.md shares one; cosmos playbooks add qa starts from a generic QA protocol.
cosmos export: flares, facts, rules, lanes, endpoints and playbooks, one sheet each; the ⬇ Excel button in the console does the same. Standard library only; text never runs as a formula.
lane_aliases folds near-duplicate lanes (deploy-config → deploy) everywhere; cosmos lanes --propose suggests them. cosmos review --repoint follows moved evidence through git's renames.
The same block is written to AGENTS.md, so Codex, Cursor, Gemini CLI and Copilot read the Charter and the facts too, and get the same slash commands.
API keys, tokens, passwords, private keys and credentials in URLs are redacted before anything is written. Sensitive folders can be excluded, and any word listed in ~/.config/cosmos/private_terms.txt (names, companies, anything) is redacted from every capture in every repository; the list lives in your home, so it is never committed.
Hooks finish in milliseconds and exit clean. The Gate is the one deliberate hold, and it explains itself.
Teams do not use one AI tool. cosmos meets each of them three ways, and everything lives in the repository, so sharing it is a git push.
The Charter and the key facts are written to every tool's own instruction file, kept in sync automatically. In Claude Code you see each recall as one line: cosm◎s · recalled 3: …. cosmos updates itself: a newer release, checked against PyPI's checksum, is committed into the repository, and each version repairs what older ones wrote (cosmos upgrade --check, cosmos repair). The session briefing stays under Claude Code's 10,000-character hook limit, so the model reads all of it. A session opened in a folder above several repositories gets one line per repository, and Claude Desktop is warned when an MCP entry named cosmos serves another repository. A session in another project gets "not this project" from every cosmos tool and records nothing. The Gate also checks every turn for credentials, hidden Unicode and agent-steering text in instruction files, and for unaudited dependency changes; cosmos scan checks the whole repository.
CLAUDE.md — Claude Code, CoworkAGENTS.md — Codex, Cursor, Copilot CLI, GeminiGEMINI.md, .cursor/rules/, .github/copilot-instructions.md, .clinerules, .windsurfrulescosmos mcp is a Model Context Protocol server every one of these agents can connect to. cosmos init writes the configs.
cosmos_recall — facts and findings for the files you are about to touchcosmos_remember, cosmos_flare — write back from any toolcosmos_charter, cosmos_atlas, cosmos_lanes, cosmos_horizon, cosmos_whyClaude Code captures through hooks, in every worktree. cosmos watch follows Claude Code, Codex and Gemini session files on the machine whether hooks fired or not, and keeps a live picture of who is doing what. Web and cloud sessions are covered by the committed hooks and MCP tools. Cowork gets the tools from the cosmos plugin (this repository is its marketplace), with the next message; a session that was open before cosmos init is briefed on its next prompt.
cosmos initgit push: every teammate on every tool has itNothing to run after cosmos init. cosmos connect all, cosmos watch and cosmos hooks --user are there to repair a setup or to add a tool you install later.
One catalogue, written by cosmos init / cosmos connect into every agent that reads project commands, so /qa means the same thing in Claude Code and in Cursor. Each command uses the cosmos tools and falls back to the committed wrapper.
/cosmos /recall /remember /flare /flares /qa /reconcile /lanes /horizon /handoff /atlas.claude/commands/ · Gemini CLI .gemini/commands/ · Cursor .cursor/commands/ · Copilot .github/prompts/ · Windsurf .windsurf/workflows/ · Codex ~/.codex/prompts (cosmos connect codex --write-user, as /prompts:cosmos-qa) · the plugin as /cosmos:qa/master-qa-protocol), and /qa follows the QA oneClick any part to see what happens inside it: the steps, the numbers measured on a live repository, and the files that do it.
Two people working with Claude Code, Codex and Cowork. Every number below is read from that repository's own .cosmos/ records or from running its hooks, by cosmos pulse --bench on 2026-10-01.
Run it on yours: cosmos pulse --bench. A dream saves one report a day to .cosmos/ledger/metrics/.
One person runs one command once. Everyone else clones. Capture, reading, dreams, the watcher and hook refreshes happen by themselves.
cosmos init, onceCreates .cosmos/ with the Charter, the Ledger, the first Atlas and the /atlas prompt; wires hooks at repo and user level (every worktree is covered), MCP configs and the instruction files of every agent; reads the sessions this repo already had, writes their journal, marks the recent ones for the model, and starts the first dream and the watcher in the background.
python3 -m pip install cosmos-dev cd <your-repo> cosmos init cosmos flares import <findings.json> # only if you have an audit document
Edit .cosmos/charter.md in a pull request — that is the team agreeing on one style. Commit and the memory becomes the team's.
cosmos charter edit git push # cosmos init already committed .cosmos/ and the agent wiring to this branch
No install, no setup — Claude Code, Codex, Cursor, Gemini CLI, Copilot, Cline or Cowork all read the same Charter, facts and tools. A committed wrapper runs cosmos from the repository. Sessions that were already open pick cosmos up on their next turn; Cowork gets the tools from the cosmos plugin.
git clone <repo> && cd <repo> # open your agent: claude · codex · cursor . · gemini · …
cosmos ui shows the live sessions, the ledger, the lanes, the flares and what waits for a human on Verdicts. Dreams run by themselves; commit .cosmos with your normal work and everyone gets it on the next git pull. Map a feature before coding with cosmos horizon "…" or on the Horizon page.
remember: never modify production schemas by hand or flare: /transitions has no role gate in any agent, or call cosmos_remember over MCP. Explicit rules always outrank inferred ones.Most projects already have months of history: AI sessions on several machines, an audit document, branches nobody has drawn. cosmos init brings the sessions in by itself; the rest is agreeing the Charter and committing.
Reads every past session (all worktrees, subagents), writes their journal, marks recent history for the model, starts the first dream and the watcher.
cd <your-repo> && cosmos init
If the file does not exist yet, cosmos asks before creating an empty one to fill in (--yes creates it without asking).
cosmos flares import <findings.json> --source <report-name> cosmos flares add --from bugs.xlsx # a list the team kept by hand: .csv .xlsx .txt
cosmos ui
cosmos charter edit git push # init committed .cosmos/ and the wiring to this branch; run it on a branch off your base branch to review it in a PR
Nothing to restart in Claude Code: the next prompt carries the briefing the session missed. Cowork runs no hooks and reads no local MCP config, so it gets cosmos from the plugin: add this repository as a plugin marketplace and install cosmos. The tools appear with your next message. A project's own playbooks (a master QA protocol, a runbook) become commands for every agent by themselves; cosmos playbooks add qa starts one. /plugin is a command of the Claude Code CLI only: in the Claude desktop app use its Plugins screen, or run the two claude plugin lines below in any terminal.
# Cowork / Claude desktop app: Plugins → add marketplace → BiswajitBiswa/cosmos → install cosmos # any terminal (same as /plugin … inside the Claude Code CLI): claude plugin marketplace add BiswajitBiswa/cosmos claude plugin install cosmos@cosmos # Codex app: Plugins → add marketplace → BiswajitBiswa/cosmos → install cosmos (nothing else to run) codex plugin marketplace add BiswajitBiswa/cosmos # the same from a terminal # a repository with cosmos lists the plugin itself (.agents/plugins/marketplace.json): Codex → Plugins → Install
git pull # then open your agent
Transcripts live in ~/.claude/projects/<repo path, slashes → dashes>/ (Claude Code), ~/.codex/sessions/ (Codex), ~/.gemini/ (Gemini). They are read, never stored; secrets are redacted. .claude/settings.local.json is personal and untouched; .cosmos/state/ is gitignored.
AGENTS.md, not only Claude Code.Nobody files a ticket for “rediscovered the same constraint as last week”, “the AI used a different style again”, or “the diagram was wrong”. It shows up as slower onboarding, repeated mistakes, review calls that repeat themselves, and a quiet erosion of trust in the AI tools. cosmos makes the knowledge, rules and structure that already exist in your team stay put — for the price of one init.
And it is safe to try. It writes one folder and a few lines into files you already have. Remove the hooks with one command and nothing else changes.
We were building a product across several repositories with Claude Code. People overlapped on features, each told the AI a different style, product added features faster than the picture could hold, there was no architecture diagram anyone trusted, and every call repeated the same asks. A QA audit produced twenty-nine findings that lived in a document nobody reopened.
The tools we looked at either wanted a hosted service or solved one slice. We wanted the minimal whole: memory, rules, structure and a gate — versioned with the code, with nothing to operate.
The killer feature is not that the AI remembers. It is that the team stops repeating itself.
cosmos doctor checks a setup · cosmos ui opens the control room