Files
ai_agent/.claude/commands/review.md
T
furyhawk 8351e73d39 feat: add Zustand stores for conversation, file preview, sidebar, theme, and knowledge base selection
- Implemented `conversation-store` for managing conversations and messages.
- Created `file-preview-store` to handle file preview state.
- Added `sidebar-store` for sidebar visibility management.
- Developed `theme-store` for theme persistence and management.
- Introduced `kb-selection-store` for managing active knowledge base selections with persistence.

chore: define API and chat types

- Added types for API responses, authentication, chat messages, conversations, and projects.
- Defined interfaces for various entities including users, sessions, and message ratings.

build: configure TypeScript and testing setup

- Set up `tsconfig.json` for TypeScript configuration.
- Created `vitest.config.ts` for testing configuration with Vitest.
- Added `vitest.setup.ts` for global test setup including mocks for Next.js router and media queries.
- Configured Vercel deployment settings in `vercel.json`.
2026-06-11 16:54:43 +08:00

1.2 KiB

description
description
Review code changes against project conventions

Review all staged and unstaged changes in the current branch.

For each changed file, verify:

Architecture:

  • Routes only call services, never repositories
  • Services raise domain exceptions (NotFoundError, AlreadyExistsError, etc.), not HTTP exceptions
  • Repositories use db.flush() + db.refresh(), never db.commit()
  • DI uses Annotated aliases from deps.py (CurrentUser, *Svc), not raw Depends() in signatures

Schemas & Types:

  • Separate Create/Update/Read/List Pydantic models
  • Type hints on all function signatures (params + return)
  • Modern syntax: str | None not Optional[str]
  • Route return type is -> Any

Code Quality:

  • No debug code (print, commented-out code, TODO without issue reference)
  • No security issues (SQL injection, exposed secrets, missing auth)
  • Consistent naming (snake_case functions, PascalCase classes)
  • Imports ordered: stdlib → third-party → local

Validation:

  1. Run cd backend && uv run ruff check .
  2. Run cd backend && uv run pytest (if test files changed)

Provide findings with specific file:line references and suggest fixes.