Code Review
Review code changes for quality and correctness.
Steps
- •
If
$ARGUMENTSis provided, review the specified file or path. Otherwise, review staged or unstaged git changes viagit diff. - •
Check for:
Type Safety
- •Strict mode compliance
- •Proper use of
PromptResult,PromptParams,Variablestypes - •No
anytypes without justification
Naming Conventions
- •Template variables:
{snake_case}with curly braces (hyphens allowed) - •TypeScript code: camelCase for variables/functions, PascalCase for types/classes
- •Test files:
*_test.ts
Error Handling
- •Use project error classes:
ValidationError,TemplateError,FileSystemError - •Proper error propagation via
PromptResult.success
Path Validation
- •File-related parameters validated through
src/validation/path_validator.ts - •No absolute paths in implementation code (see
/absolute-path-checker)
Test Coverage
- •Corresponding tests exist in
tests/for new/changed functionality - •Tests follow the hierarchy:
01_unit/->02_integration/->03_system/
Import Policy (MUST)
- •MUST use import map aliases from
deno.json(e.g.,@std/assert,@std/path) - •NEVER use inline
jsr:,npm:, orhttps://deno.land/in import statements - •Violation causes
no-import-prefixlint failure in CI - •New dependencies: add to
deno.jsonimports first, then use the alias
Formatting
- •2-space indent, no tabs, 100 char line width
- •Double quotes, semicolons
- •Report findings with file paths and line numbers.