Lib Module
Overview
Document each src/lib module with a concise context dump next to it. Use a consistent format that explains purpose, exports, data flow, dependencies, notes, and tests.
Directory structure per module:
src/lib/<Module>.tssrc/lib/<Module>.test.tssrc/lib/<Module>.context.md
Workflow
- Identify the
src/libmodule file(s) that need documentation. - Create
src/lib/<Module>.context.mdnext to each module file. - Use the standard format and keep it short and technical.
- Do not create any
.context.mdfiles for tests.
Standard Format
# <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
Converted and distributed by TomeVault — claim your Tome and manage your conversions.