# PR Dojo — Agent Guide ## Project **Code Review Hunter** ("PR Dojo") — an Astro site where users practice finding bugs in rejected PR code, earn XP, and submit fixes. Currently a static Astro frontend; backend (Quarkus or Node.js+SQLite) is planned per `full_plan.md`. ## Developer Commands ``` bun install # install deps bun dev # start dev server at localhost:4321 bun build # static build → dist/ bun preview # preview the build locally bun astro ... # run Astro CLI (add, check, etc.) ``` **Use `bun`, not npm or npx.** ## Tech Stack - **Astro 6** with **Tailwind CSS v4** via `@tailwindcss/vite` plugin (not the PostCSS pipeline) - **TypeScript** strict mode via `astro/tsconfigs/strict` - **Node >= 22.12.0** (enforced in `package.json` engines) - No test framework, linter, or formatter configured yet ## Architecture ``` src/ data/challenges.json # static challenge data (id, code, hints, expectedLines, expectedPatch) pages/ index.astro # challenge listing + hero profile.astro # user profile / XP dashboard challenges/[slug].astro # single challenge view with DiffViewer components/ DiffViewer.astro # side-by-side code diff UI Welcome.astro # legacy starter component layouts/Layout.astro # root layout wrapping header/nav/footer styles/global.css # global styles ``` ## Challenge Data Schema Each entry in `src/data/challenges.json`: - `id`, `title`, `repository`, `baseSha`, `difficulty` (1-5), `xpValue`, `bugType` - `file`, `code` (buggy source), `hints` (array of "Line N: description") - `expectedLines` (array of line numbers), `expectedPatch` (unified diff string) ## Key Constraints - Tailwind v4 uses the Vite plugin, not PostCSS. Do not add `tailwind.config.js` or `@layer` directives — they won't work. - Astro SSR renders everything client-side by default. Add `client:*` directives only when interactivity is needed. - `full_plan.md` documents the planned backend architecture and MVP roadmap. It is a reference, not a spec to implement blindly. - No CI, no pre-commit hooks, no test runner. If you add tests, document the command in this file.