Skip to main content

Document Code Template

**MODULE-LEVEL DOCUMENTATION**

- **Which modules require README documentation?** *Provide module name and filepath where README should be created (e.g., `/src/services/authentication/`).*
- **What information should each module README include?** *Specify which topics to cover: module purpose, key components, architecture fit, dependencies, use cases, configuration, data flows, design patterns, limitations.*
- **What format should module READMEs follow?** *Define structure, markdown conventions, code example format, diagram requirements, and level of detail.*
- **Are additional documents needed beyond module READMEs?** *List any architectural overviews, integration guides, deep-dives, data model docs, deployment guides, troubleshooting guides, or migration docs.*

**INLINE COMMENTS**

- **What is the scope for inline documentation?** *Specify if entire codebase or limited to specific modules/directories. List filepaths. Note any exclusions (test files, config, generated code).*
- **What should inline documentation consist of?** *Define if comments explain what/why/how, level of detail, whether to include parameter descriptions and examples, documentation standard to follow (JSDoc, docstrings, etc.).*
- **What formatting standards should inline comments follow?** *Specify documentation style guide, linting rules, template for function signatures, placement conventions, line length limits.*

**SYSTEM BOUNDARIES**

- **What boundaries should be set for this documentation work?** *Define focus areas and exclusions - which code to document, which legacy/generated/third-party code to skip.*

**MINIMAL CHANGE CLAUSE**

- **Make only the changes absolutely necessary to implement comprehensive code documentation.** *Add comments and documentation without modifying production code logic or behavior. Do not refactor, optimize, or change existing interfaces. Document existing code as-is.*