## Project Documentation **MUST READ** before working on this codebase: - `documentation/architecture.md` — system overview, components, directory structure - `documentation/commands.md` — WhatsApp slash commands reference - `documentation/configuration.md` — config schema, CLI mapping, save/load - `documentation/message-flow.md` — message pipeline, Claude queries, permissions **MUST UPDATE** documentation when making changes. Keep it terse, accurate, no fluff. ## Development Workflow **CRITICAL**: Before making ANY code changes, start the TypeScript watch process in the background: ```bash bun run tsc:watch & ``` This is MANDATORY. The watch process catches type errors immediately as you edit. Check the output after each edit to catch errors early. If you see TypeScript errors, fix them before moving on. Optionally, also run tests in watch mode: ```bash bun test --watch & ``` After editing code, always run the formatter and linter: ```bash bun run format bun run lint ``` Both commands are **MANDATORY** after code changes. Fix any lint errors before proceeding. ## CLI and Config Parity All CLI options MUST be configurable via the config file. After adding or modifying CLI options, always verify the corresponding config file property exists in `src/types.ts` (ConfigSchema) and is properly merged in `src/cli/config.ts`. ## Bun Runtime Default to using Bun instead of Node.js. - Use `bun ` instead of `node ` or `ts-node ` - Use `bun test` instead of `jest` or `vitest` - Use `bun build ` instead of `webpack` or `esbuild` - Use `bun install` instead of `npm install` or `yarn install` or `pnpm install` - Use `bun run ``` With the following `frontend.tsx`: ```tsx#frontend.tsx import React from "react"; import { createRoot } from "react-dom/client"; // import .css files directly and it works import './index.css'; const root = createRoot(document.body); export default function Frontend() { return

Hello, world!

; } root.render(); ``` Then, run index.ts ```sh bun --hot ./index.ts ``` For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.