Skip to content

Commit e1783a1

Browse files
committed
docs: Add CLAUDE.md to document build, test, code style, project conventions, and environment.
1 parent 52d020c commit e1783a1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

CLAUDE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# CLAUDE.md — apcore-cli-typescript
2+
3+
## Build & Test
4+
5+
- `pnpm test` (or `npx vitest run`) — run all tests. **Must pass before considering any task complete.**
6+
- `pnpm build` — compile TypeScript to `dist/`.
7+
- `npx tsc --noEmit` — type check without emitting.
8+
9+
## Code Style
10+
11+
- TypeScript strict mode with full type coverage.
12+
- All code must pass `tsc --noEmit` with zero errors.
13+
- Use `process.stderr.write()` for error output, `process.stdout.write()` or `console.log()` for normal output.
14+
- Prefer `process.exit(code)` with `EXIT_CODES` constants over throwing for CLI errors.
15+
- camelCase for functions/methods/variables, PascalCase for classes/interfaces/types.
16+
17+
## Project Conventions
18+
19+
- Spec repo (single source of truth): `../apcore-cli/docs/`
20+
- Python reference implementation: `../apcore-cli-python/`
21+
- ESM module (`"type": "module"` in package.json).
22+
- Public API exported from `src/index.ts`.
23+
- CLI framework: Commander.js (not Click or clap).
24+
- DEFAULTS keys use snake_case dot-notation to match spec (e.g., `cli.help_text_max_length`, not `cli.helpTextMaxLength`).
25+
- Security modules live in `src/security/` sub-directory.
26+
- Tests: vitest, files in `tests/*.test.ts`.
27+
28+
## Environment
29+
30+
- Node.js >= 18
31+
- Package manager: pnpm
32+
- Key dependencies: commander, js-yaml, ajv

0 commit comments

Comments
 (0)