Lib Module
Overview
Document each src/lib module with a concise Markdown file next to it. Use a consistent format that explains purpose, exports, data flow, dependencies, notes, and tests.
Directory structure per module:
- •
src/lib/<Module>.ts - •
src/lib/<Module>.test.ts - •
src/lib/<Module>.md
Workflow
- •Identify the
src/libmodule file(s) that need documentation. - •Create
src/lib/<Module>.mdnext to each module file. - •Use the standard format and keep it short and technical.
- •Do not create any
.mdfiles for tests.
Standard Format
markdown
# <ModuleName> ## Overview Short summary of the module's responsibilities. ## Exports - List exported functions/types with a brief purpose. ## Data Flow - Key steps and side effects (storage, network, etc.). ## Dependencies - Internal modules or external APIs used. ## Notes - Gotchas, constraints, or design choices. ## Tests - Provide a bullet for each test in `<Module>.test.ts`, explaining what it validates and how.
Verification Script
Run the repository check script to ensure every lib module has the required files:
python3 .agents/skills/lib-module/scripts/verify_modules.py