Review
Run a review of the current context (code, PR, or docs). Your reply must be a plan of suggested changes: concise, actionable, and structured-not only prose.
Invocation
Text after the slash command is additional scope/focus - narrow the review accordingly. If none given, use the default scope described below.
Best practices alignment
This command is designed to align with industry best practices for (AI-assisted) code and technical reviews:
- Explicit scope and dimensions - Clear categories (architecture, scalability, performance, security, maintainability, CI) so feedback is scoped and not generic.
- Context and conventions - Reference to AGENTS.md and key artifacts ensures context-aware, project-aligned suggestions.
- Actionable, explainable feedback - Every item requires what, where, and why; suggestions must be implementable.
- Structured output - Critical / Improvements / Optional with headings and bullets for scannable plans.
- Conduct and scope - Be constructive and specific. Stay in scope; call out out-of-scope concerns as separate follow-up items. For minor polish, prefix with Nit: so the author knows it's non-blocking.
- Trade-offs - When a suggestion involves trade-offs (e.g. performance vs readability), mention them briefly so the author can decide.
Deep technical review
When asked for a full or deep codebase review, conduct a deep, end-to-end technical review with the objective of bringing the codebase to state-of-the-art production standards. Your analysis should be critical, exhaustive, and opinionated where justified. Align with the root AGENTS.md and app-level apps/worker-api/AGENTS.md for conventions and architecture.
Key artifacts to consider: Root and app package.json / pnpm-workspace.yaml / turbo.json; root package.json scripts; apps/front-app/vite.config.ts (React, Tailwind, @cloudflare/vite-plugin); apps/front-app/wrangler.jsonc (SPA assets, env); apps/worker-api/wrangler.jsonc; apps/worker-api/src/index.ts (middleware order, routes); shared DTOs in packages/dtos-common/ and enums in packages/enums-common/; .github/workflows/ci.yml; .dev.vars usage and secrets handling.
Cover the following dimensions (if a dimension yields no findings, say so in one line in the plan):
- Architecture & configuration
- Monorepo: apps vs packages,
@repo/dtos-common / @repo/enums-common / @repo/typescript-config usage, Turborepo tasks and caching, root scripts and port allocation.
- Env and secrets:
.dev.vars vs wrangler.jsonc vars; Vite import.meta.env (client-exposed keys only, e.g. VITE_* if used); no secrets in client bundle or repo.
- Deployment: Cloudflare Workers + Vite build output for
front-app; worker-api as separate Worker; env-specific build modes (development/production).
- Scalability
- Worker limits: CPU/memory and request timeouts; edge-safe code (e.g. nodejs_compat, no Node-only APIs in worker code).
- Scaling story: static SPA assets for
front-app, worker-api as stateless API; shared packages and Turborepo build caching.
- Bottlenecks: API route design, large payloads or blocking work on the critical path; heavy client JS in React bundles.
- Performance optimization
- Frontend: static asset delivery, Cloudflare caching for assets; code-splitting (
React.lazy, route chunks), bundle size.
- Images: lazy loading and sizing; modern formats where used; avoid layout shift (CLS).
- worker-api: cold start impact, bundle size; timeouts on external calls if present.
- Network: payload size, duplicate requests; link prefetch or route preloading if added; avoid unnecessary heavy client JS.
- Security & robustness
- Frontend: no secrets or sensitive logic in client bundle; security headers and CSP as configured for the deployment.
- worker-api: CORS origins and preflight, CSRF and body limits per middleware; third-party verification (e.g. Turnstile) only when implemented; service secrets only in env (
.dev.vars / wrangler).
- Validation and errors: Zod schemas from
@repo/dtos-common at HTTP boundaries; consistent Hono error handling; safe logging and no sensitive data in responses or logs.
- Maintainability & code quality
- Conventions: naming (camelCase, CONSTANT_CASE, PascalCase enums and CONSTANT_CASE members per AGENTS.md); OXC and TypeScript strict; consistent patterns across apps.
- Structure: clear separation apps/packages; DTOs in
@repo/dtos-common, routes and handlers in worker-api; React components and utils in front-app/src/.
- Evolution: duplication, readability, testability; sustainability of shared DTOs and API surface.
- CI, reproducibility & observability
- CI:
.github/workflows/ci.yml - install, lint/format (pnpm check), typecheck (pnpm check-types), build; cache and lockfile handling; branch/trigger strategy.
- Reproducibility:
pnpm install and lockfile, env documented (e.g. .dev.vars.example), build modes and deploy pipeline.
- User experience
- Styling: Tailwind CSS, Vite plugin, dark mode, responsive design, mobile-first approach, consistent UI/UX patterns.
Apply these dimensions in addition to the review checklist below; structure all findings in the same plan output (Critical / Improvements / Optional).
Steps
- Gather context – Identify scope (full codebase, PR, or specific area). Request more context if insufficient. Stay within scope; note out-of-scope concerns as separate follow-up items.
- Read project conventions – Review root AGENTS.md and relevant app AGENTS.md for architecture, naming, and patterns.
- Inspect key artifacts – Open and skim the key artifacts listed above (package.json, turbo.json, wrangler.jsonc, vite.config.ts, front-app and worker-api source, CI workflow) to ground the review.
- Review by dimension – Go through each of the dimensions (Architecture & configuration, Scalability, Performance optimization, Security & robustness, Maintainability & code quality, CI, reproducibility & observability, User experience) and note findings or explicit "no issues."
- Apply review checklist – For each finding, confirm correctness, conventions, quality, and actionability.
- Compose the plan – Group findings into Critical, Improvements, and Optional; for each item state what, where, and why.
- Verify coverage – Ensure every dimension is addressed in the plan (with at least one finding or a one-line "no issues" note).
Checklist
Use this checklist to track that every dimension and step is covered before submitting the plan:
Context usage
Use the user's context effectively:
- Prefer
@code for specific functions or classes when only part of a file is relevant.
- Use
@file when the whole file or component matters.
- Use
@git when reviewing commits, PRs, or recent changes.
- Use
@docs for framework/library correctness; use @web only when up-to-date external info is needed.
If there isn't enough context to review meaningfully, say so and suggest which @ references to add (e.g. @file:path/to/module.ts, @git:commit-or-branch).
Review checklist
When reviewing, consider (for a full or deep codebase review, also apply the Deep technical review dimensions above):
- Correctness: logic, edge cases, possible bugs.
- Conventions: consistency with project standards (e.g. AGENTS.md, naming, patterns).
- Quality: security, performance, or maintainability where relevant.
- Actionability: every suggestion must be clear and implementable-no vague advice.
- Trade-offs: when a suggestion involves trade-offs (e.g. performance vs readability), state them briefly so the author can decide.
- Scope: limit findings to the review scope; call out out-of-scope concerns as separate follow-up tasks rather than blocking the current plan.
Output format
Respond with a plan only (no implementation unless the user explicitly asks):
- Critical – must-fix issues (bugs, security, broken behavior).
- Improvements – worthwhile changes (clarity, robustness, consistency).
- Optional – nice-to-haves (style, minor refactors). Prefix with Nit: when the item is pure polish so the author knows it's non-blocking.
For each item give: what to change, where (file and area), and why. Keep items short and scannable. For deep reviews, address every dimension above-if a dimension has no findings, say so in one line (e.g. "Scalability: no issues identified").
1---2name: review3description: Full multi-dimension code/PR/docs review → structured plan. USE WHEN: user runs /review or explicitly asks for this review. DO NOT USE WHEN: implementing features or fixing bugs unless the user asked for a review.4---56# Review7Run a review of the current context (code, PR, or docs). Your reply must be a **plan of suggested changes**: concise, actionable, and structured-not only prose.8910## Invocation1112Text after the slash command is additional scope/focus - narrow the review accordingly. If none given, use the default scope described below.131415## Best practices alignment1617This command is designed to align with industry best practices for (AI-assisted) code and technical reviews:1819- **Explicit scope and dimensions** - Clear categories (architecture, scalability, performance, security, maintainability, CI) so feedback is scoped and not generic.20- **Context and conventions** - Reference to AGENTS.md and key artifacts ensures context-aware, project-aligned suggestions.21- **Actionable, explainable feedback** - Every item requires **what**, **where**, and **why**; suggestions must be implementable.22- **Structured output** - Critical / Improvements / Optional with headings and bullets for scannable plans.23- **Conduct and scope** - Be constructive and specific. Stay in scope; call out out-of-scope concerns as separate follow-up items. For minor polish, prefix with **Nit:** so the author knows it's non-blocking.24- **Trade-offs** - When a suggestion involves trade-offs (e.g. performance vs readability), mention them briefly so the author can decide.2526## Deep technical review2728When asked for a full or deep codebase review, conduct a deep, end-to-end technical review with the objective of bringing the codebase to state-of-the-art production standards. Your analysis should be critical, exhaustive, and opinionated where justified. Align with the root [AGENTS.md](../../../AGENTS.md) and app-level [apps/worker-api/AGENTS.md](../../../apps/worker-api/AGENTS.md) for conventions and architecture.2930**Key artifacts to consider:** Root and app `package.json` / `pnpm-workspace.yaml` / `turbo.json`; root `package.json` scripts; [apps/front-app/vite.config.ts](../../../apps/front-app/vite.config.ts) (React, Tailwind, `@cloudflare/vite-plugin`); [apps/front-app/wrangler.jsonc](../../../apps/front-app/wrangler.jsonc) (SPA assets, env); [apps/worker-api/wrangler.jsonc](../../../apps/worker-api/wrangler.jsonc); `apps/worker-api/src/index.ts` (middleware order, routes); shared DTOs in `packages/dtos-common/` and enums in `packages/enums-common/`; `.github/workflows/ci.yml`; `.dev.vars` usage and secrets handling.3132Cover the following dimensions (if a dimension yields no findings, say so in one line in the plan):3334- **Architecture & configuration**35 - Monorepo: apps vs packages, `@repo/dtos-common` / `@repo/enums-common` / `@repo/typescript-config` usage, Turborepo tasks and caching, root scripts and port allocation.36 - Env and secrets: `.dev.vars` vs `wrangler.jsonc` vars; Vite `import.meta.env` (client-exposed keys only, e.g. `VITE_*` if used); no secrets in client bundle or repo.37 - Deployment: Cloudflare Workers + Vite build output for `front-app`; `worker-api` as separate Worker; env-specific build modes (development/production).38- **Scalability**39 - Worker limits: CPU/memory and request timeouts; edge-safe code (e.g. nodejs_compat, no Node-only APIs in worker code).40 - Scaling story: static SPA assets for `front-app`, `worker-api` as stateless API; shared packages and Turborepo build caching.41 - Bottlenecks: API route design, large payloads or blocking work on the critical path; heavy client JS in React bundles.42- **Performance optimization**43 - Frontend: static asset delivery, Cloudflare caching for assets; code-splitting (`React.lazy`, route chunks), bundle size.44 - Images: lazy loading and sizing; modern formats where used; avoid layout shift (CLS).45 - worker-api: cold start impact, bundle size; timeouts on external calls if present.46 - Network: payload size, duplicate requests; link prefetch or route preloading if added; avoid unnecessary heavy client JS.47- **Security & robustness**48 - Frontend: no secrets or sensitive logic in client bundle; security headers and CSP as configured for the deployment.49 - worker-api: CORS origins and preflight, CSRF and body limits per middleware; third-party verification (e.g. Turnstile) only when implemented; service secrets only in env (`.dev.vars` / wrangler).50 - Validation and errors: Zod schemas from `@repo/dtos-common` at HTTP boundaries; consistent Hono error handling; safe logging and no sensitive data in responses or logs.51- **Maintainability & code quality**52 - Conventions: naming (camelCase, CONSTANT_CASE, PascalCase enums and CONSTANT_CASE members per AGENTS.md); OXC and TypeScript strict; consistent patterns across apps.53 - Structure: clear separation apps/packages; DTOs in `@repo/dtos-common`, routes and handlers in `worker-api`; React components and utils in `front-app/src/`.54 - Evolution: duplication, readability, testability; sustainability of shared DTOs and API surface.55- **CI, reproducibility & observability**56 - CI: `.github/workflows/ci.yml` - install, lint/format (`pnpm check`), typecheck (`pnpm check-types`), build; cache and lockfile handling; branch/trigger strategy.57 - Reproducibility: `pnpm install` and lockfile, env documented (e.g. `.dev.vars.example`), build modes and deploy pipeline.58- **User experience**59 - Styling: Tailwind CSS, Vite plugin, dark mode, responsive design, mobile-first approach, consistent UI/UX patterns.6061Apply these dimensions in addition to the review checklist below; structure all findings in the same plan output (Critical / Improvements / Optional).6263## Steps64651. **Gather context** – Identify scope (full codebase, PR, or specific area). Request more context if insufficient. Stay within scope; note out-of-scope concerns as separate follow-up items.662. **Read project conventions** – Review root [AGENTS.md](../../../AGENTS.md) and relevant app AGENTS.md for architecture, naming, and patterns.673. **Inspect key artifacts** – Open and skim the key artifacts listed above (package.json, turbo.json, wrangler.jsonc, vite.config.ts, front-app and worker-api source, CI workflow) to ground the review.684. **Review by dimension** – Go through each of the dimensions (Architecture & configuration, Scalability, Performance optimization, Security & robustness, Maintainability & code quality, CI, reproducibility & observability, User experience) and note findings or explicit "no issues."695. **Apply review checklist** – For each finding, confirm correctness, conventions, quality, and actionability.706. **Compose the plan** – Group findings into Critical, Improvements, and Optional; for each item state **what**, **where**, and **why**.717. **Verify coverage** – Ensure every dimension is addressed in the plan (with at least one finding or a one-line "no issues" note).7273## Checklist7475Use this checklist to track that every dimension and step is covered before submitting the plan:7677- [ ] Context gathered and scope clear78- [ ] Root and app AGENTS.md consulted79- [ ] Key artifacts inspected80- [ ] **Architecture & configuration** - reviewed81- [ ] **Scalability** - reviewed82- [ ] **Performance optimization** - reviewed83- [ ] **Security & robustness** - reviewed84- [ ] **Maintainability & code quality** - reviewed85- [ ] **CI, reproducibility & observability** - reviewed86- [ ] **Styling** - reviewed87- [ ] Review checklist (correctness, conventions, quality, actionability) applied to findings88- [ ] Plan structured as Critical / Improvements / Optional with what/where/why89- [ ] Every dimension appears in the plan (finding or one-line "no issues")9091## Context usage9293Use the user's context effectively:9495- Prefer `@code` for specific functions or classes when only part of a file is relevant.96- Use `@file` when the whole file or component matters.97- Use `@git` when reviewing commits, PRs, or recent changes.98- Use `@docs` for framework/library correctness; use `@web` only when up-to-date external info is needed.99100If there isn't enough context to review meaningfully, say so and suggest which `@` references to add (e.g. `@file:path/to/module.ts`, `@git:commit-or-branch`).101102## Review checklist103104When reviewing, consider (for a full or deep codebase review, also apply the **Deep technical review** dimensions above):105106- **Correctness**: logic, edge cases, possible bugs.107- **Conventions**: consistency with project standards (e.g. AGENTS.md, naming, patterns).108- **Quality**: security, performance, or maintainability where relevant.109- **Actionability**: every suggestion must be clear and implementable-no vague advice.110- **Trade-offs**: when a suggestion involves trade-offs (e.g. performance vs readability), state them briefly so the author can decide.111- **Scope**: limit findings to the review scope; call out out-of-scope concerns as separate follow-up tasks rather than blocking the current plan.112113## Output format114115Respond with a **plan** only (no implementation unless the user explicitly asks):1161171. **Critical** – must-fix issues (bugs, security, broken behavior).1182. **Improvements** – worthwhile changes (clarity, robustness, consistency).1193. **Optional** – nice-to-haves (style, minor refactors). Prefix with **Nit:** when the item is pure polish so the author knows it's non-blocking.120121For each item give: **what** to change, **where** (file and area), and **why**. Keep items short and scannable. For deep reviews, address every dimension above-if a dimension has no findings, say so in one line (e.g. "Scalability: no issues identified").