This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
docs-coderef is a tool for validating and auto-fixing code references in markdown documentation. It ensures code snippets in documentation stay synchronized with actual source code through CODE_REF comments and AST-based symbol searching.
- Architecture: See docs/architecture/overview.md
- Development Setup: See docs/development/getting-started.md
- Coding Standards: See docs/development/coding-standards.md
- Git Conventions: See docs/development/git-conventions.md
- Testing: See docs/development/testing-guide.md
- Indentation: 2 spaces
- Semicolons: Enabled
- Quotes: Single quotes
- Print width: 100 characters
- Line endings: LF (Unix)
- Trailing commas: ES5 style
- Type imports: Prefer
import typefor type-only imports
npm run build # Build for production (CJS + ESM + types)
npm test # Run all tests
npm run lint:fix # Auto-fix linting issues
npm run format # Format code with Prettier
npm run type-check # Run TypeScript compiler checks
npm run docs:validate # Validate documentation updates
npm run demo:validate # Test with demo environmentThe demo/ directory provides a local testing environment:
npm run demo:validate:valid # Validate correct CODE_REF usage
npm run demo:validate:invalid # See error detection examples
npm run demo:fix:dry # Preview auto-fix changes
npm run demo:reset # Reset demo to original stateSee demo/README.md for detailed usage.
Follow Conventional Commits:
<type>: <description>
Types: feat, fix, docs, style, refactor, test, chore, ci, perf, build, revert
See docs/development/git-conventions.md for the complete type table and semantic versioning impact.
For comprehensive documentation, see docs/README.md.