document-service

Installation
SKILL.md

Document Service

Analyze codebases to produce structured technical documentation and architecture diagrams with source-of-truth citations. Every finding links back to the exact file and line it was derived from. Optimized for AWS workloads but works with any codebase.

Core Principles

  • Explain WHY, not just WHAT. The reader inherited this codebase and has zero context. Listing components is not enough — explain why the architecture is shaped this way. Search for code comments, TODOs, and commit messages that reveal design rationale. When no rationale exists, mark it [RATIONALE UNKNOWN].
  • Trace end-to-end flows. For every API endpoint or message handler, trace the complete request path from entry to response. Note every intermediate step, transformation, timeout, and failure point. This is the "if it breaks at 3am, where do I look?" analysis.
  • Deep-dive complex logic. Identify the most complex or domain-specific code paths (ML pipelines, business rule engines, state machines, custom algorithms). Document HOW they work at the implementation level — the algorithm, key parameters, edge cases, and where production bugs will occur. Surface-level summaries of complex code provide no value over a naive AI prompt.
  • Surface implicit knowledge. Look for hardcoded values, magic numbers, environment-dependent behavior, and undocumented assumptions. These are the tribal knowledge items that disappear when teams leave.
  • Every claim must be traceable. Include file:line citations for every finding. See citation-format.md. Verify citations precisely — re-read the cited file and confirm the line number is within ±3 lines. Anchor with function/variable names.
  • Code is the source of truth. Document what actually exists in code, not what READMEs or wikis claim. Flag every discrepancy between documentation and reality.
  • Mark unknowns and risks explicitly. Use [UNKNOWN] for items not inferable from code, [RISK] for unhandled failure modes, [INFERRED] for educated guesses, [RATIONALE UNKNOWN] for unexplained architecture choices. Omitting markers undermines trust.
  • Verify quantitative claims. List directory entries programmatically and use exact counts.

Workflow

The workflow runs autonomously from Step 2 onward. Step 1 is the only interactive step.

Related skills

More from awslabs/agent-plugins

Installs
3
GitHub Stars
705
First Seen
3 days ago