# Stack Detection

Read `CLAUDE.md` at root, find `## Tech Stack` section, determine following variables for use in agent prompts and rule file lookups.

> **Run once per command.** The calling command resolves these variables a single time at entry, then passes them into agent prompts (`{lang_agent}`, `{db_agent}`, `{stack}`). Sub-agents must NOT re-read this file or re-detect — they receive resolved values. Re-detecting per agent multiplies the same read across a single review run.

## lang_agent — Backend

| Tech Stack contains | lang_agent |
|---|---|
| `.NET` / `C#` | `csharp-reviewer` |
| `Node.js` / `TypeScript` / `NestJS` / `Express` | `typescript-reviewer` |
| `Python` / `FastAPI` / `Django` / `Flask` | `python-reviewer` |

**Frontend addition:** if Tech Stack contains `React` → add `typescript-reviewer` to lang_agent (if not already).
**Frontend-only project** (React/web with no backend stack): `lang_agent = typescript-reviewer` — never leave `lang_agent` empty.

## infra_agent and db_agent — Optional

| Tech Stack contains | Variable | Value |
|---|---|---|
| `AWS` (Infrastructure) | `infra_agent` | `aws-reviewer` |
| `MySQL` / `PostgreSQL` / `MSSQL` / `SQL Server` / `SQLite` / `MariaDB` / `Oracle` / `MongoDB` / `DynamoDB` / `Cosmos` (any relational or document DB) | `db_agent` | `database-reviewer` |

## Rules directory by stack

| lang_agent | Rules directory |
|---|---|
| `csharp-reviewer` | `.tas/rules/csharp/` |
| `typescript-reviewer` | `.tas/rules/typescript/` |
| `python-reviewer` | `.tas/rules/python/` |
| Frontend / React | `.tas/rules/web/` |
