← Back to feature database

CLAUDE.md Cowork Context File

FTR-21

What this is

A `CLAUDE.md` file at the project root that mirrors the agent instructions, prefixed with a short intro block. Cowork sessions and Claude Code read it automatically, so they stay aligned with the project's configuration without the user pasting anything. It is produced alongside AGENT_INSTRUCTIONS.md -- always both, never one without the other.
install claude-md-context-file
Optional: false · Depends on: none · Registry refs: [3.06, 5.31]

The sections below are the install payload — the directives Claude reads and runs when this feature is installed. Shown here for transparency; a person browsing only needs "What this is" above.

Assess first
- Check whether `CLAUDE.md` exists at the project root (NOT in `admin\`).
- Compare its content and "Last updated" line against `admin\AGENT_INSTRUCTIONS.md`. If it is missing or stale, it needs to be (re)generated.
Ask, only if needed
Nothing to ask -- proceed directly to Write. This file is a mechanical mirror of the current agent instructions plus a fixed intro block.
Write (payload written into admin\AGENT_INSTRUCTIONS.md)
Create/update `CLAUDE.md` at the project root (not in `admin\`). Its content is the intro block below, followed by a full, identical mirror of the current `admin\AGENT_INSTRUCTIONS.md` content. Then add this reference section to `admin\AGENT_INSTRUCTIONS.md`:

```
* CLAUDE.MD -- COWORK CONTEXT FILE

Location: [project_root]\CLAUDE.md
Mirrors: [path]\admin\AGENT_INSTRUCTIONS.md
Purpose: provides project context to Cowork sessions and any Claude tool
  (including Claude Code) that reads CLAUDE.md from the filesystem. Keeps
  Cowork sessions aligned with this project's configuration without the
  user pasting instructions manually.

PRODUCTION RULE
  Updated every time AGENT_INSTRUCTIONS.md is updated -- never one without
  the other. Lives at the project root, not in admin\. Content: intro block
  (below) + full mirror of the current agent instructions.

INTRO BLOCK -- prepend this at the top of CLAUDE.md when producing:

  # [Project Title] -- Project Context for Claude

  This file was created by the Kevin Framework and mirrors the agent
  instructions for this project. It lives at the project root so Cowork
  sessions and Claude Code read it automatically.

  If you are starting a Cowork or Claude Code session: you are reading the
  right file. Follow the instructions below to work consistently with this
  project. Use the same working directory, the same naming conventions, and
  the same document tracking approach described here.

  Mirrors: [path]\admin\AGENT_INSTRUCTIONS.md
  Last updated: [Date] -- bootstrap v[X.X]
  Project: [Project Title] [[ProjectCode]]
  Canonical repository: [path]

  ---

[Agent instructions content follows -- identical to AGENT_INSTRUCTIONS.md]
```

Also add to Ongoing Responsibilities (if that section exists): "When updating AGENT_INSTRUCTIONS.md: always update CLAUDE.md at the project root simultaneously -- never one without the other."
Confirm
Confirm: CLAUDE.md is at your project root and mirrors your agent instructions -- Cowork and Claude Code will now read your project context automatically. It stays in sync every time the instructions change. Want to install another, or is that everything for now?