Using an AI coding agent? AGENTS.md is the single source of truth for agent instructions.
CLAUDE.mdand.github/copilot-instructions.mdare thin pointers to it — edit only AGENTS.md so the tools never drift.
git clone https://github.com/corespeed-io/lore.git
cd lore
npm install
npm run devThe app runs at http://localhost:3000. Environment variables are loaded from .env (or .env.local for local overrides).
npm run dev # Start dev server with hot reload
npm run lint # Check code style with Biome
npm run format # Auto-format code with Biome
npm run typecheck # Type-check with TypeScript
npm test # Run tests with Vitest
npm run build # Build for productionAll commands must pass before opening a pull request:
npm run typecheck && npm run lint && npm test && npm run build- Biome for formatting and linting. Run
npm run formatto fix most issues automatically. - TypeScript with strict mode enabled. No
anytypes without justification. - Functional components — use React hooks.
- Kebab-case for file names; PascalCase for React components.
This app reads from gbrain and renders graphs; it does not mutate user data. No write tools or database mutations are allowed—all MCP tool calls are read-only. When adding a feature:
- ✓ Query gbrain, search, call analysis tools
- ✗ No mutation tools, no database writes, no destructive operations
This is enforced by code review.
- Tests live in
tests/and follow the naming convention<feature>.test.ts. - Use
vitestfor unit and integration tests. - Aim for >80% coverage on new logic.
- Run
npm testbefore committing.
-
Create a new file
src/lib/viz/<name>.tswith amountfunction:import type { GraphData, VizOptions } from "@/lib/types"; export function mount<Name>( element: HTMLElement, data: GraphData, options: VizOptions, ): void { // Render visualization using d3, canvas, or DOM APIs }
-
Type your viz in the registry. Update
src/lib/types.tsif needed. -
Import and call
mountin the appropriate view component. -
Write tests for the viz logic in
tests/viz-<name>.test.ts. -
Update the README's "Adding a visualization module" section if the process differs.
- Use clear, concise commit messages.
- Reference issues or PRs when relevant.
- Squash work-in-progress commits before pushing.
Example:
feat: add timeline visualization module
- Render entity activity by date using d3-time-scale
- Add viz-timeline.test.ts with 3 scenarios
- Update README with module walkthrough
The following items are deferred post-v1:
- Timing-safe password comparison —
passwordauth mode compares with strict equality (===). A constant-time compare would mitigate timing attacks (seesrc/lib/auth.ts). Notepasswordmode isn't the recommended deployment posture — preferproxy(Cloudflare Access), whose JWT is fully verified.
Open an issue or start a discussion in the repo. We're here to help!