Use pnpm: pnpm install, pnpm build, pnpm test
AI commits MUST include:
Co-Authored-By: <model name> <noreply@anthropic.com>
Example: Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
src/
├── index.ts # Entry: routes to CLI or MCP
├── types.ts # Zod schemas
├── core/ # Storage + TaskService
├── tools/ # MCP tool handlers
├── mcp/server.ts # MCP server
└── cli/commands.ts # CLI handlers
JSONL format: .dex/tasks.jsonl (one task per line, auto-migrates from old formats)
Use dex skill for task coordination. See plugins/dex/skills/dex/SKILL.md
Use dex-plan skill for creating tasks from planning docs. See plugins/dex/skills/dex-plan/SKILL.md
pnpm install && pnpm build && pnpm link # Setup
pnpm build # Rebuild after changes
pnpm dev # Watch mode
pnpm unlink # CleanupWhen adding or modifying CLI commands, update:
src/cli/help.ts— Built-in help textdocs/src/pages/cli.astro— CLI reference documentation
Use export type for type-only exports (interfaces, type aliases). Bun requires explicit type exports:
// Good
export type { GitHubRepo } from "./remote.js";
export { getGitHubRepo } from "./remote.js";
// Bad - fails in Bun
export { GitHubRepo, getGitHubRepo } from "./remote.js";When adding new behavior or modifying existing functionality, review TESTING.md to determine if tests are needed. Key points:
- Test error cases users will actually hit
- Add regression tests for bugs
- Co-locate tests with source (
foo.ts→foo.test.ts)