| name | review-configuration |
| description | Config, env, wrangler review. USE WHEN: user runs /review-configuration or explicitly asks for this review. DO NOT USE WHEN: implementing features or fixing bugs unless the user asked for a review.
|
| disable-model-invocation | true |
Review configuration
Run a configuration-focused review: environment and secrets handling, Cloudflare/wrangler setup, TypeScript and OXC configs, Vite and Wrangler configuration, build modes, and dev/staging/prod parity. 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
- Secrets - Never in repo or client bundle; use
.dev.vars (workers) and wrangler env; document required vars in .dev.vars.example.
- Environment - Clear split: client-exposed keys via Vite (
import.meta.env, e.g. VITE_* if used); server-only secrets and config in Workers; build modes (development/production) consistent across tools.
- TypeScript - Strict mode everywhere; shared configs from
@repo/typescript-config (strict.json core → runtime presets); per-package tsc --noEmit via Turborepo transit (no root solution / project references); no conflicting compiler options between packages.
- OXC (oxfmt / oxlint) - Single source of truth for format and lint; consistent rules; no conflicting formatters (e.g. Prettier).
- Cloudflare - Wrangler and Vite build aligned; compatibility date and flags documented; bindings and env match usage;
front-app assets (SPA) and worker-api worker entry configured correctly.
Align with root AGENTS.md and app AGENTS.md for stated config and port allocation.
Deep technical review
Conduct a configuration-only review. Inspect the following and call out violations or improvements.
Environment and secrets
Cloudflare Workers and wrangler
Vite (React frontend)
TypeScript configuration
- Artifacts: packages/typescript-config/ (
strict.json, library.json, workers.json, vite-react.json, vite-node.json), apps/front-app/tsconfig.json + tsconfig.app.json / tsconfig.node.json, apps/worker-api/tsconfig.json, packages/dtos-common/tsconfig.json, packages/enums-common/tsconfig.json.
- Checks: All extend from
@repo/typescript-config where appropriate. strict enabled via strict.json inheritance. No root solution tsconfig.json and no TypeScript Project References - check-types is tsc --noEmit with Turborepo transit. Worker apps set compilerOptions.types for worker-configuration.d.ts. React apps use split layout: vite-react.json for src/**, vite-node.json for vite.config.ts. Presets keep isolatedDeclarations off (schema-first z.infer in @repo/dtos-common). erasableSyntaxOnly on - no export enum; use as const objects in @repo/enums-common. Each package running check-types declares typescript in devDependencies.
OXC (oxfmt / oxlint)
- Artifacts: .oxfmtrc.json, .oxlintrc.json.
- Checks: Single OXC config at root; apps/packages don't override unless necessary (and documented). Format: spaces, double quotes, line width 80 per AGENTS.md. Lint: rules in
.oxlintrc.json; no disabled rules that hide real issues without a reason. Ignore patterns exclude build outputs and generated files. No Prettier (or other formatter) in use to avoid conflicts.
Build modes and reproducibility
- Artifacts: Root and app package.json scripts, turbo.json.
- Checks:
build uses production mode (e.g. NODE_ENV=production or equivalent). Dev and build use same Node version (engines field). Lockfile is committed; CI uses --frozen-lockfile. packageManager in package.json matches pnpm version. pnpm policy in pnpm-workspace.yaml is intentional and documented.
Anti-patterns to flag
- Secrets in repo, in client bundle, or in wrangler.jsonc as plain text.
- Missing or outdated
.dev.vars.example; required env vars not documented.
- TypeScript strict disabled or
any encouraged by config.
- Multiple formatters or conflicting lint configs.
- Wrangler compatibility_date very old; or flags that are deprecated/removed.
- Vite build output path and wrangler
assets / SPA settings mismatch.
Steps
- Gather scope - All config or specific area (env, wrangler, TS, OXC, Vite). Default to full configuration review.
- Read conventions - Root and app AGENTS.md for env, ports, and tooling.
- Inspect env and secrets - .dev.vars.example, wrangler vars, codebase for env usage; confirm no secrets in client or repo.
- Inspect wrangler and Vite - Both wrangler.jsonc files; front-app vite.config.ts; alignment between build output and deployment.
- Inspect TypeScript - All tsconfig files and typescript-config package; strict and extends chain.
- Inspect OXC -
.oxfmtrc.json and .oxlintrc.json; format/lint rules and ignore patterns.
- Inspect build and lockfile - package.json scripts, turbo.json, pnpm-workspace.yaml, engines; reproducibility and build mode.
- Compose plan - Critical / Improvements / Optional; each item: what, where, why. One-line "no issues" per sub-area if none.
Checklist
Context usage
- Use
@file for config files (wrangler.jsonc, vite.config.ts, tsconfig.json, .oxfmtrc.json, .oxlintrc.json).
- Use
@code for env or config snippets when suggesting changes.
- Use
@docs for Cloudflare/OXC/TypeScript when checking correct options.
If context is insufficient, suggest which config files or @ references to add.
Review checklist
- Correctness: Config options are valid and consistent; no secrets exposed.
- Conventions: Matches AGENTS.md (ports, env, TypeScript strict, OXC).
- Quality: Reproducible builds; clear env contract; strict typing.
- Actionability: Every suggestion is implementable (e.g. "add X to .dev.vars.example", "set strict: true in Y").
- Trade-offs: Note any (e.g. nodejs_compat vs bundle size).
- Scope: Configuration only; defer security or performance to their reviews.
Output format
Respond with a plan only (no implementation unless the user asks):
- Critical – Must-fix (secrets in repo/client, broken build, strict disabled, wrangler/Vite mismatch).
- Improvements – Worthwhile (documentation of env, clearer TS/OXC rules, compatibility date update).
- Optional – Nice-to-haves (comments in config, minor tidy). Prefix with Nit: for non-blocking polish.
For each item: what to change, where (file/area), and why. If a sub-area has no findings, state it in one line.