src/contains the TypeScript CLI implementation, with tool handlers insrc/tools/, MCP integration insrc/mcp/, UI components insrc/ui/, and shared helpers insrc/common/.src/tests/contains Node test files named*.test.ts.templates/contains runtime prompt assets:templates/prompts/for EJS prompt templates andtemplates/tools/for tool instruction Markdown loaded into the system prompt.docs/is reserved for user-facing documentation such as configuration and MCP guides.resources/stores static images used by the documentation or UI.
npm testruns all test files withtsx --test.npm run test:single -- src/tests/<name>.test.tsruns one test file.npm run typecheckverifies TypeScript types without emitting files.npm run lintchecks ESLint rules forsrc/.npm run buildruns checks, bundlessrc/cli.tsxtodist/cli.js, and marks the bundle executable.
- Use TypeScript ES modules and keep imports explicit.
- Prefer small, focused functions; keep filesystem path construction centralized when a path is reused.
- Use two-space indentation and Prettier-compatible formatting.
- Respond in standard technical English. Avoid nonstandard phrasing and corporate jargon.
- Add or update tests in
src/tests/when changing command behavior, prompt rendering, session flow, tools, or settings. - Prefer Node's built-in
node:testandnode:assert/strictAPIs, matching the existing tests. - Keep tests deterministic by using temporary directories and mocked network calls where needed.
- Keep commits focused on a single change and use concise, imperative commit messages.
- In pull requests, describe the behavior change, list verification commands, and note any packaging or template path changes.