VS Code extension for analyzing Salesforce debug logs with interactive visualizations (flame charts, call trees, SOQL/DML breakdowns).
Canonical agent instructions for all tools. Claude Code loads this via
CLAUDE.md. Area-specific rules live in.claude/rules/— see the Rules manifest below.
lana/— VS Code extension (TypeScript)log-viewer/— webview UI (TypeScript; lit / html / css)- The log parser is the
@apexdevtools/apex-log-parserpackage, released from apex-dev-tools/apex-log-parser. Bothlana/andlog-viewer/depend on it. Import everything from the root export. lana-docs/— Docusaurus documentationsample-app/— sample Salesforce app with test logs
Always use pnpm.
pnpm watch— dev build with hot reloadpnpm build— production buildpnpm test— run tests (before committing)pnpm lint— oxlint +prettier --check+tsc -b, run concurrently. The single pre-commit gate, sotypecheckon top of it is wasted.pnpm exec jest --selectProjects <log-viewer|lana|docs>— scoped tests, matching what CI runs per runner.pnpm format— auto-format
DEVELOPING.md covers the rest, including the *:fast rolldown variants and their caveats.
Dev host — launch with
code-insiders --profile lana-dev $PWD/sample-app $PWD/sample-app/debug-logs/sample-log.log --extensionDevelopmentPath=$PWD/lana, use the
CLI of the launched editor, code-insiders or code
- Type safety — strict TypeScript, no
any(useunknown+ justification if unavoidable). - Naming — not linted. camelCase by default; PascalCase types; variables may also be
UPPER_CASE or PascalCase (enum-like objects);
static readonlyclass constants may be UPPER_CASE. Object keys that mirror external data (Salesforce fields, log event names) keep their source form. - Modularity — keep
lana/andlog-viewer/independent; cross-package contracts only. - Performance — handle large logs (50MB+, 500k+ lines) without blocking the UI.
- UX — discoverable, accessible, actionable errors.
- Testing — features and bug fixes ship with tests; CI blocks failures.
- Comments — default to none. The bar: without this line a competent reader would make a wrong change. That means an outside constraint, or a deliberate choice that reads as a mistake. Not a why the code already shows, not a summary, not a signpost, never a test or a name restated. One line. JSDoc on exported API only. A comment you had to think up to justify is one to delete.
- Read the code beside yours first. Navigate with LSP,
ast-greporrg; read a whole file last, and only the range you need. - Most "new" helpers already exist. Look in
log-viewer/src/core/utility/,log-viewer/src/components/,log-viewer/src/tabulator/andlog-viewer/src/features/*/services/. - Where two modules share state, name one source of truth. Do not give each half the job.
- State a plan first for anything that crosses the
lana/tolog-viewer/boundary, or that changes the message contract.
- The smallest change that fully solves the goal. No abstraction until the second caller exists.
- CSS: no
!important, and no 1px nudges. Fix the structure instead. - A retired workaround is commented out with a note on when to re-add it, not left live behind a runtime check.
- Every changed line traces to the request. No drive-by reformatting or renaming, since
pnpm formatowns style. A bug seen in passing is mentioned, not fixed. - Never hand-edit the vendored
tabulator_esm.mjsbeyond the sanctioned documented patches. - The root
README.md,CHANGELOG.mdandLICENSE.txtare the sources of truth. Thelana/copies are build output.
- Restate the acceptance test before you start. Finish the whole scope, and say plainly what you left out and why.
- Prove it with the real command, not by reading the code. Report a failure with its own output, and never call something done unverified.
- In
log-viewer/, the performance budgets in.claude/rules/log-viewer.mdare part of the acceptance bar, measured onsample-app/logs.
log-viewer/ MUST NOT import vscode or anything from lana/. The two packages
communicate via message passing only.
- Conventional commits (
feat:,fix:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:). Don't auto-commit. - Branches:
feat-*for features,bug-*for defects. - Releases follow SemVer; breaking changes need a migration guide.
- A user-visible change updates CHANGELOG. A refactor, a test or the mechanism behind a fix
does not. See the
changelog-entryskill in.claude/skills/. - Never reference Anthropic or Claude in commit messages, PRs, etc.
Area-specific rules load on demand (Claude Code, scoped by path):
.claude/rules/log-viewer.md— webview/UI: boundary, performance budgets, lit component rules,--lana-*appearance tokens, key paths..claude/rules/lana.md— VS Code extension: UX, command paths.
Some modules also carry their own AGENTS.md. Read it before you change that module.