mdmanager
Documentation · Context
docs/context.md · mdmanager docs context

Context

Context answers: "Which persistent Markdown instructions does this runtime get from this launch directory?"

mdmanager context --runtime claude
mdmanager context --runtime codex
mdmanager context --runtime cursor
mdmanager context --runtime grok
mdmanager context --runtime pi
mdmanager context --runtime claude --json

It reports files that load at startup, sources that load when relevant, candidates skipped because another filename won, empty or truncated sources, Claude and Grok exclusions, and duplicate instructions. It honors CODEX_HOME, CLAUDE_CONFIG_DIR, GROK_HOME, and PI_CODING_AGENT_DIR. Claude subfolder scanning finds CLAUDE.md, CLAUDE.local.md, AGENTS.md, and .claude/rules/**/*.md files without a fixed entry limit. It skips .git and non-rule symlinked directories; Claude rule symlinks are followed.

Duplicate instructions

Context warns when the same instructions reach a runtime twice at startup, with one warning per group of files. It names the files that have identical text, that contain the same Personal Sections from your Global catalog or Project Sections from the repository, or that share a paragraph of at least 40 bytes; shorter shared paragraphs, such as a one-line heading, do not count. It compares the text the runtime sends: rule frontmatter, which Claude, Cursor and Grok drop, does not count, and a truncated file counts only its included part. Two paths to one file, by symlink or hard link, load once and are not duplicates, except where the runtime reads both (a symlinked Claude user CLAUDE.md, and the Cursor editor). A Claude @ import counts as the imported file loading once on its own, not as a copy of the file that imports it. Files that load later, such as path-filtered rules and subfolder instructions, are not compared.

Each warning starts with Duplicate instructions: and names a fix that fits its files; the runtime guides list the fixes. The warnings appear in the Context summary, in --json output, and in the TUI warnings row. mdmanager status prints them for a launch in the current directory, for each runtime that loads one of your Global targets there.

Managed versus observed

mdmanager can create, adopt, compose, render, and apply only these families:

  • AGENTS.md and CLAUDE.md
  • AGENTS.override.md and CLAUDE.local.md
  • configured global AGENTS.md/CLAUDE.md targets

Context also observes Claude, Cursor, and Grok rules, subfolder instructions, @ imports, and exclusions because they change effective Markdown context. These remain read-only. Ask the user's coding agent to configure the runtime, then run Context again or watch the open TUI reload to verify the result.

Deliberate exclusions

mdmanager does not inspect or manage system prompts, generated memory, skills, hooks, slash commands, output styles, prompt arguments, tool/MCP output, explicit attachments, or conversation state. The one exception is Grok: Context reports the hook files Grok runs, read-only. A runtime configuration file is read only to explain selection of persistent instruction Markdown.

See mdmanager docs claude, mdmanager docs codex, mdmanager docs cursor, mdmanager docs grok, or mdmanager docs pi for runtime-specific loading and configuration recipes.