Before modifying code in a subdirectory, read its AGENTS.md first to understand local patterns and invariants.
- Source:
src/AGENTS.md- CLI entrypoint, commands, and shared lib modules.
- Do not edit
dist/by hand; it is generated bynpm run build. - Use
jjfor commits in this repo.
Every batch of changes must follow this verification-gated loop. Run gates in order (cheapest to most expensive), stop on first failure, fix, then restart from step 1.
For every new piece of software, layer of enablement, utility, routine, or sub-routine, design a verification harness that gives a clear, high-confidence signal that it works correctly and aligns with the intended scope. Treat this harness as scaffolding for intent and focus; do not proceed to subsequent work without establishing it.
| Step | Command | Purpose |
|---|---|---|
| 1. Format check | npm run format:check |
Prettier formatting compliance |
| 2. Lint | npm run lint |
ESLint static checks |
| 3. Typecheck | npm run typecheck |
TS type safety |
| 4. Test | npm run test |
Unit tests |
- Build:
npm run build - Commit (jj):
jj commit -m "<message>"
No shortcuts: Do not skip steps, do not reorder, and do not commit if any gate fails.
- Format:
npm run format - Lint autofix:
npm run lint:fix
Before implementing a multi-file change, declare:
Step: <description>
Scope:
- path/to/file.ts (what changes)
- path/to/new_file.ts (new file)
Tests:
- npm run test
Verification: npm run format:check -> npm run lint -> npm run typecheck -> npm run test -> npm run build -> jj commit