1---2name: aacode3description: Write code like Ahmad Awais.4license: Apache-2.05---67## Stack89- TypeScript with strict mode (`strict: true`, `noUncheckedIndexedAccess: true`)10- Zod for runtime validation at system boundaries11- Biome for linting and formatting12- Vitest for tests13- pnpm as package manager1415## TypeScript1617- Every function gets an explicit return type18- Never use `any` — use `unknown` with type guards19- Define interfaces for all objects20- Use branded types for IDs21- Default to `readonly` for arrays and objects2223## Functional Only2425- Don't use classes or OOP patterns use pure functions26- No `class`, `this`, or `new` (except `Map`/`Set`/`Error`)27- No prototypes, inheritance, instance methods, or stateful objects with methods28- Pure functions that take data and return data29- Plain objects or/and arrays for data30- Compose functions instead of inheriting31- Pass state explicitly as parameters32- Keep data transforms immutable3334## Code Style3536- Errors first, happy path last37- If guard clauses up top, main logic at the bottom38- Never nest deeper than 2-3 levels (ideally 1 level max)39- Flatten with early `return`, `continue`, `break`40- Avoid switch/case and else — use if guards almost always41- Never use single-letter or non-descriptive variable names (e.g., i, j, k, n) in loops or nested structures; in all iterators and otherwise too. always use descriptive names that convey the meaning of the value.424344## CLI Development4546- Always use pnpm — never npm or yarn47- tsup for bundling48- Commander.js for commands49- clack for interactive input50- picocolors for colors51- ora for spinners52- Ink + ink-spinner for interactive UIs53- One file per command inside `commands/`54- Pull version from `package.json` — never hardcode55- Always start at `0.0.1`56- Lowercase flags only: `-v`/`--version`, `-h`/`--help`57- `-v` prints version number and nothing else58- Hide internal flags: `.addOption(new Option('--local').hideHelp())`59- 150px ASCII art banner with CLI name60- ANSI Shadow font on wide terminals, ANSI Compact on narrow61- White, gray, black colors only62- Check for name conflicts before `pnpm link`6364## Dev Loop6566- Write tests for new functionality67- `pnpm test`68- `pnpm lint`69- `pnpm typecheck` (`tsc --noEmit`)70- `pnpm build` — catches circular deps and export issues other checks miss71- Commit7273## Commits7475- Format: `<type>: <description>` with optional body76- Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`7778## npm Package Publishing7980- Use npx npm-name-cli to check for name availability before `npm publish` (also check common - variations like tdot is not taken but can't publish coz of t-do-t or t-dot)