Skip to main content

Development

Setup

git clone https://github.com/telepat-io/lore.git
cd lore
npm install

Repository Map

PathPurpose
src/bin/CLI entrypoint
src/commands/command handlers
src/core/ingestion/compile/query/search/runtime modules
src/ui/Ink TUI views
src/utils/parsing and helper utilities
src/__tests__/unit tests
e2e/flows/end-to-end command behavior tests
docs-site/Docusaurus docs site

Scripts

ScriptDescription
npm run devRun CLI in dev mode
npm run buildBuild with tsup
npm run typecheckTypeScript type checking
npm run lintTypecheck + ESLint
npm testUnit tests
npm run test:e2eE2E tests
npm run test:allAll tests
npm run docs:startRun docs locally
npm run docs:buildBuild docs site

Mandatory Backpressure Checks

Run these before PR/release handoff:

npm run lint
npm run test:coverage
npm run build
npm run docs:build

When behavior changes in command/core/ui/integration paths, also run:

npm run test:e2e

Testing

  • Unit tests: src/__tests__/ -- fast, no network, mocked externals
  • E2E tests: e2e/ -- real .lore/ repos in tmpdir, HTTP intercepted via msw

Contributor Workflow

  1. Create focused branch
  2. Implement changes with minimal scope
  3. Add/update tests in relevant unit or e2e areas
  4. Update docs for user-visible behavior changes
  5. Run mandatory checks
  6. Open PR with behavior summary and validation notes

Documentation Contribution Rules

  • update root docs and docs-site pages for user-visible behavior changes
  • include practical examples for new command behavior
  • ensure new docs pages are linked from existing navigation surfaces

Troubleshooting Dev Environment

SymptomLikely causeFix
Typecheck passes locally but CI failsNode/version mismatchUse Node 22+ locally
Jest ESM errorsVM modules flag missingUse package scripts instead of raw jest invocation
Docs build breaks unexpectedlyBroken links/sidebar entriesRun npm run docs:build and fix path references