docflow
A set of Bash scripts that scaffolds a seven-folder documentation structure inside any code repository so AI coding agents like Claude, Cursor, and Codex start every session knowing what recently shipped and where everything lives.
docflow is a lightweight tool for setting up structured documentation in a code repository so that AI coding agents like Claude, Codex, Gemini, or Cursor have useful project context when starting a new session. The idea is that AI agents work better when they can read a clear map of what a project does, how it is built, why certain decisions were made, and what recently changed, rather than inferring all of this from code alone.
Running the scaffold script creates a seven-folder documentation structure inside your repository. Each folder covers a specific question: product-spec (what a feature does for users), specs (how it is built), decisions (why a choice was made), references (rules and conventions), plans (roadmap and current work), reviews (quality audits and known bugs), and changelog (what shipped each month). The tool also generates an INDEX.md that acts as a compact path-to-purpose map agents read first, and an AGENTS.md file that tells repo-aware agents where to find everything.
There is a read-only SessionStart hook for Claude Code that automatically prints the docs map and the most recent changelog entry at the start of each new session, so the agent begins each conversation already knowing what recently shipped and where documentation lives.
The tool can be installed as a plugin inside Claude Code or Codex, used via scaffold script with Gemini or Cursor, or run directly through the included Bash scripts with no agent integration at all. Before any setup it runs a doctor script that inspects the target repository and recommends whether to initialize from scratch, adopt around existing docs, or repair previously generated files.
Everything is plain Markdown and Bash scripts. There is no database, no hosted service, and no subscription. The README is explicit that this is not a document-approval or e-signature tool. The project is MIT-licensed, written primarily in Shell, and has 17 stars on GitHub. The README describes it as an early MVP developer tool.
Where it fits
- Set up a documentation structure in your repo so AI agents like Claude Code or Codex start every session knowing what recently shipped and where everything lives.
- Install the Claude Code SessionStart hook so every new conversation automatically prints the docs map and latest changelog entry.
- Run the doctor script to get advice on whether to initialize fresh docs, adopt around existing ones, or repair previously generated files.