Skip to content

The context repo

Status: Shipped

Everything your team hands to agents lives in one git repo, the context repo. It isn’t a database or a hosted service: it’s folders and text files you can read, edit and review in any editor, and share with git. CodeSense reads it, resolves it per team, and writes the result into your code.

Orgs and teams

An org (a workspace, in the app) is one context repo. Inside it:

  • Teams each have their own folder, their own context, and their own list of source repos. Ledgerline has platform and billing.
  • A team can name a parent team and inherit its context. See Teams and inheritance.

You can create, archive and restore teams from the Manage teams tab.

What lives where

A shared org sits at ~/.codesense/users/<id>/orgs/<owner>/<repo>/ on your Mac. Here’s Ledgerline’s, trimmed:

ledgerline/codesense-context/
├── org.yml # the org's name and slug
├── teams.yml # teams, parents and source repos
├── people.yml
├── platform/
│ └── content/
│ ├── CLAUDE.md
│ └── .claude/skills/review-pr/SKILL.md
└── billing/
├── config/ # app-managed settings, hidden in the file tree
│ └── sprints.yaml
└── content/ # what agents draw their context from
├── CLAUDE.md
├── AGENTS.md
├── .claude/skills/ add-endpoint, review-pr, write-migration, …
├── planning/ epics and stories
└── dashboards/ HTML pages

teams.yml

One entry per team, with its parent and the repos it works in:

teams:
- name: billing
parent_team: platform
source_repos:
- {owner: ledgerline, repo: web}
- {owner: ledgerline, repo: api}
- name: platform
source_repos:
- {owner: ledgerline, repo: web}
- {owner: ledgerline, repo: api}

<team>/content/

The team’s context, laid out the way it should appear in a repo. A file lands at the same path at the root of a worktree: content/CLAUDE.md becomes CLAUDE.md, and content/.claude/skills/ becomes .claude/skills/. Which files land is up to each agent: its context (or its runtime’s default) is copied in when it launches, and nothing else moves until an agent asks. See Context in a worktree and reverse sync.

Anything you put here goes: instructions for any agent (CLAUDE.md, AGENTS.md, .codex/…), skills, docs, plans and dashboards.

<team>/config/

Settings the app manages for the team, kept out of content/ so they’re never written into your repos:

  • sprints.yaml: the team’s sprints.
  • merge-marked.yaml: the files you’ve marked to merge instead of replace.
  • projection-excludes.yml: glob patterns that are never copied into a workspace. A pattern matches any letter case (**/*.tfstate also hides Prod.TFSTATE). A pattern starting with ! brings a path back, but only in the exact case it’s written in.

<team>/repos/<owner>/<repo>/

Context for one repo only. The app shows it as billing · api in the context picker (“Everyone on billing, only in api”). Content here wins over the team-wide content for that repo.

Files in git

Because it’s a git repo, the usual things work: history, blame, branches and review. CodeSense adds its own views on top: a sync view of what you’ve changed, an incoming-changes count, and a history timeline. See Sharing through git.

How we know this is accurate 13 sources

Checked against the app at 1b3d5a69d73473db077dfb44f4390b42cded6bd4.

Feature inventory

  • A-1
  • A-2
  • A-3
  • A-4
  • A-9
  • A-10

Code

  • src-tauri/src/context_repo/path.rs
  • src-tauri/src/domain/raw_yaml.rs
  • src-tauri/src/install/projection_manifest.rs
  • src-tauri/src/install/story_linker.rs
  • src-tauri/src/install/merge_marks.rs
  • src/shared/lib/context-model.ts
  • src/features/shell/components/manage-teams-tab.tsx