explaingit

kerbelp/context-md

Analysis updated 2026-05-18

5HTMLAudience · developerComplexity · 1/5Setup · easy

TLDR

A proposed standard for a context.md file that AI coding agents read before planning and append to after working, storing project intent, hard constraints, and a dated learning log in git.

Mindmap

mindmap
  root((context-md))
    What it is
      Markdown standard file
      Versioned with code in git
      Agent reads before planning
      Agent appends after work
    Three sections
      Intent
      Constraints with reasons
      Evolved Context log
    Contract
      Consult before planning
      Constraints are binding
      Append learnings
      Commit with code
    Why not alternatives
      READMEs are usage docs
      ADRs are write-once
      RAG misses constraints
      IDE memory not in review
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Give an AI coding agent persistent knowledge of your project's design rules and past decisions so it does not repeat rejected approaches.

USE CASE 2

Create a shared, reviewable log of things learned during AI-assisted development that travels with the codebase in git.

USE CASE 3

Establish a lightweight standard for what a coding agent must read before planning changes in any repository.

What is it built with?

MarkdownGit

How does it compare?

kerbelp/context-mdsanzarrehman/html2pdfabderazak-py/retro-homepage
Stars556
LanguageHTMLHTMLHTML
Setup difficultyeasymoderateeasy
Complexity1/53/52/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

No tools or dependencies required, adoption is a single Markdown file added to the repository root.

Freely available per the README notice, no formal license file is specified.

In plain English

Context.md is a proposal for a standard file format that AI coding agents should read before they start working on a codebase and append to after they finish. The idea is simple: a single Markdown file, stored alongside the code in git, that captures what the project is trying to do, the hard rules that cannot be broken (and crucially, why those rules exist), and a running log of things that agents and humans have learned while working on it. The file has three sections. Intent states what the project is and what design philosophy it follows. Constraints list the non-negotiable rules with reasons: the rejected ORM because query opacity broke an offline repair path, the pinned package version because the newer one breaks ARM64 builds. The Evolved Context section is an append-only dated log where agents record what they discovered during their work. When a log entry proves reliable over time, a human can promote it into the Constraints section through a normal code review. The proposal describes a four-step contract: read the context before planning, treat constraints as binding, append what the work taught, and commit the context update alongside the code change in the same pull request so a human reviews both together. Because the file lives in git, it automatically branches, merges, and rolls back with the code. Conflicting things learned on two different branches become a merge conflict that a human resolves during review. The README explains why existing tools do not fill this role. README files describe how to use a project, not how to change it. Architecture decision records are write-once documents that agents are not required to read. RAG-based retrieval fails for constraints because a rule matters most when nothing in the current prompt resembles it. IDE memory files are private to one tool and invisible to code review. Context.md is meant to fill that gap: versioned with the code, required reading by contract, and updated by the agent under human oversight. Adoption requires no SDK, no server, and no vendor. Any agent that can read a file can participate. The repository includes a full example file and a whitepaper.

Copy-paste prompts

Prompt 1
I want to add context.md to my repository. Write the initial file with an Intent section describing a local-first CLI tool and a Constraints section with one example rule and its reason.
Prompt 2
I'm using an AI coding agent and want it to follow the context.md standard. What instructions should I give it about when to read the file and what to append before committing?
Prompt 3
How should I decide when to promote an entry from the Evolved Context log into the Constraints section of context.md?

Frequently asked questions

What is context-md?

A proposed standard for a context.md file that AI coding agents read before planning and append to after working, storing project intent, hard constraints, and a dated learning log in git.

What language is context-md written in?

Mainly HTML. The stack also includes Markdown, Git.

What license does context-md use?

Freely available per the README notice, no formal license file is specified.

How hard is context-md to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is context-md for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub kerbelp on gitmyhub

Verify against the repo before relying on details.