CLI tool that syncs and materializes documentation repositories into a local, gitignored cache for deterministic agent consumption.
pnpm.
- Build:
pnpm build - Lint:
pnpm lint - Test:
pnpm test - Typecheck:
pnpm typecheck
IMPORTANT: AI agents should NEVER commit or push changes without explicit user permission.
- DO NOT run
git commitorgit pushautomatically - DO NOT create commits as part of completing a task
- ALWAYS ask the user before committing or pushing
- ONLY commit when the user explicitly requests it (e.g., "commit these changes", "push this to git")
- After making changes, inform the user what was changed and let them decide when to commit
The user maintains full control over git operations and commit history.
- Add or update tests for behavior changes and bug fixes.
- Prefer extending existing test coverage in
tests/before adding new files.
- Materialized sources live at
.docs/<id>/. - Lock file lives next to
docs.config.jsonasdocs-lock.json.
- Keep the CLI entrypoint in
src/cli/index.tswith amain()export and centralized error handling. - Parse arguments in
src/cli/parse-args.ts; keep parsing isolated from command execution. - Define exit codes in
src/cli/exit-code.tsand use them consistently. - Provide a minimal runner in
src/cli/run.tsthat just callsmain(). - Keep the bin wrapper minimal (dynamic import of
dist/cli.mjs, callmain).
- Use
node:specifiers for built-in modules. - Keep modules small and single-purpose; prefer focused helpers in
src/. - Prefer early returns to reduce nested control flow.
- Avoid
else ifbranches when early returns or separate conditionals are clearer. - Avoid type casts when a safe type guard or discriminated union can be used.
- Place shared types in
src/types/and import them viaimport type. - Use
index.tsbarrels for public entrypoints.
- Files use kebab-case (e.g.
parse-args.ts). - Types/interfaces use PascalCase; functions/variables use camelCase.
- Use
index.tsbarrels for public entrypoints.