All implementation and review decisions must strictly adhere to AGENTS.md.
When implementing features or reviewing code:
- First, confirm alignment with README.md design principles
- Then, apply AGENTS.md technical constraints
- If a change makes the parser smarter/more convenient, it likely violates the boundary → reject it
The boundary-validator skill (skills/boundary-validator/) validates code changes against AGENTS.md design rules.
See AGENTS.md for trigger conditions and usage across agents.
Usage in Claude Code:
Review this code against boundary-validator rules
The examples/ directory contains usage examples:
00-basic.ts- Basic parsing and type narrowing01-file-upload.ts- File handling with type guards02-field-presence.ts- Field presence checks03-error-handling.ts- Validation issue handling04-integration-fetch.ts- Integration with Request/Fetch API
Run type checking for examples:
bun run check:type:example| Tool | Role |
|---|---|
| bun | Package manager / script runner |
TypeScript (tsc) |
Type checking |
| tsup | Build (bundler) |
| vitest | Test runner |
| oxlint | Linter |
| oxfmt | Formatter (TS/JS/JSON) |
| publint / attw | Package export validation |
| npm-run-all2 | Script orchestration |
bun installbun run dev # Watch mode for building
bun run test:watch # Watch mode for testingbun run lint # oxlint (deny-warnings)
bun run lint:fix # oxlint --fix-suggestions
bun run format # oxfmt (write)
bun run fix # lint:fix + format (all-in-one auto-fix)bun run check # lint + format check (read-only)
bun run check:type # TypeScript check (source + examples)
bun run check:type:source # TypeScript check (source only)
bun run check:type:example # TypeScript check (examples only)
bun run check:package # publint + attw export validationbun run test # Run all tests
bun run test:coverage # Run tests with coverage reportbun run build # Build for production (tsup)bun run prepare:publish # Full pre-publish pipeline: type check → test:coverage → build → check:package- Workflows:
.github/workflows/ci.yml- Main CI pipelinepublish.yml- npm publishprepare-release-pr.yml- Release PR automationwc-*.yml- Reusable workflow components (type-check, lint-format, test, etc.)
- PR template:
.github/PULL_REQUEST_TEMPLATE.md - Renovate:
.github/renovate.json
ParseResult does not have a .ok property. Use data !== null to narrow the type:
// Correct
if (result.data !== null) {
}
// Wrong - .ok does not exist
if (result.ok) {
}