Document As You Go
A drop-in system prompt and slash command that make coding agents capture what they discover — undocumented APIs, auth flows, dead ends — instead of losing it when the session ends.
About This Project
Document-As-You-Go is a set of plain-text prompts and a Claude Code slash command that instruct coding agents to record what they learn during a session. It targets two kinds of documentation debt: ordinary code decisions and constraints that are forgotten once a task ends, and discovery debt, such as reverse-engineered internal APIs or non-obvious authentication requirements that would otherwise have to be rediscovered later. The prompt establishes habits for capturing findings, documenting changes and fixes, and treating the repository as a workspace for examples, scripts, and redacted fixtures, while explicitly discouraging restated diffs, summary files, and duplicate documents. Findings are routed by reach, to a dedicated knowledge repository, to the project's docs folder, or only to the reply. The project is written in Shell, ships an install script, and is distributed under the MIT licence.
The repository includes a full prompt and a compact variant for tight token budgets, a slash command for retroactive sweeps with options for findings only or a check-only mode, a template for knowledge repositories, per-tool adaptation notes covering Cursor, Codex, Copilot, Aider, and raw API use, and a rationale document explaining each rule. Its design emphasises cold-readable notes that include absolute verification dates, redacted identifiers, and referenced rather than pasted credentials, and it requires proposing before writing new repositories.
The project is aimed at developers and teams who use agentic coding tools such as Claude Code, Codex, or Cursor on work involving undocumented systems, integrations, or recurring debugging, and who want that accumulated knowledge to persist across sessions. It may be of particular interest to those maintaining internal tooling or repeatedly scraping or integrating with third-party platforms that offer limited documentation.