document-project

A workflow for documenting an existing software project for AI development agents. It examines the project and creates reference material about its structure, conventions, and patterns, while focusing on areas named in an available requirements document.

In plain words
What is it for?
For documenting a project’s relevant modules, services, architecture, and development conventions. The resulting material helps agents contribute with better knowledge of the codebase.
Why use it?
It reduces the time an agent needs to understand an unfamiliar codebase before making changes. If no requirements document exists, it asks whether to create one first so the documentation can stay focused.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/gonewx/tasksentinel/document-project
Clone the repo
git clone --depth 1 https://github.com/gonewx/TaskSentinel

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,930 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02930
Opus 5 $0.00000 $0.01465
Sonnet 5 $0.00000 $0.00586
Haiku 4.5 $0.00000 $0.00293

Measured 2d ago against content hash bb8831a55d77, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

document-project scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

.claude/commands/BMad/tasks/document-project.md · 348 lines

How it starts

The opening of the file, as written. The whole thing — 348 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/document-project Task

When this command is used, execute the following task:

Document an Existing Project

Purpose

Generate comprehensive documentation for existing projects optimized for AI development agents. This task creates structured reference materials that enable AI agents to understand project context, conventions, and patterns for effective contribution to any codebase.

Task Instructions

1. Initial Project Analysis

CRITICAL: First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.

IF PRD EXISTS:

  • Review the PRD to understand what enhancement/feature is planned
  • Identify which modules, services, or areas will be affected
  • Focus documentation ONLY on these relevant areas
  • Skip unrelated parts of the codebase to keep docs lean

IF NO PRD EXISTS: Ask the user:

"I notice you haven't provided a PRD or requirements document. To create more focused and useful documentation, I recommend one of these options:

  1. Create a PRD first - Would you like me to help create a brownfield PRD before documenting? This helps focus documentation on relevant areas.

  2. Provide existing requirements - Do you have a requirements document, epic, or feature description you can share?

  3. Describe the focus - Can you briefly describe what enhancement or feature you're planning? For example:

    • 'Adding payment processing to the user service'
    • 'Refactoring the authentication module'
    • 'Integrating with a new third-party API'
  4. Document everything - Or should I proceed with comprehensive documentation of the entire codebase? (Note: This may create excessive documentation for large projects)

Please let me know your preference, or I can proceed with full documentation if you prefer."

Based on their response:

  • If they choose option 1-3: Use that context to focus documentation
  • If they choose option 4 or decline: Proceed with comprehensive analysis below

Read the full file on GitHub · 348 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 348 lines · 0 tokens per session scan A bb8831a55d77

Subscribe to this mod's changes

document-project is a command published in the GitHub repository gonewx/TaskSentinel (18 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,930 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.