add-code-review
Code review: IoC, RESTful, Contracts, Security (OWASP), Clean Architecture, SOLID.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Code review: IoC, RESTful, Contracts, Security (OWASP), Clean Architecture, SOLID.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Consolidated view of the add-pro ecosystem - commands, skills, relationships and dependencies. Loaded by /add as source of truth.
Source of truth for ADD doc rules, depth floors, IDs, refs, validation gate. Load before any doc write.
Use when running agent-judged QA validation (read-PNG by default; the playwright plugin adds live driving) — the Level C judge rubric, severity taxonomy, dual-judge (@ux-agent review ∥ @qa-agent) method, report schema/template, and the config.json/screens.json formats. Consumed by /add.qa and both judges.
Use when a state-materializing command starts or is asked to upgrade — reads the setup receipt, compares the recorded contract against the shipped one, executes the declared upgrade deltas sequentially, and rewrites the receipt even on a verified-current no-op. Consumed by /add.qa-setup STEP 1.5 and STEP 11.
Internal skill for developing ADD framework artefacts (commands, skills, agents, scripts). Use when add-framework--plan analyzes viability of new framework features, when add-framework--build implements framework artefacts, or when creating/modifying commands, skills, or agents. Always use this skill before proposing or implementing changes to the framework itself.
Use when building, styling, or theming UI components, pages, layouts, dashboards, charts, tables, or forms for SaaS products.
| name | add-code-review |
| description | Code review: IoC, RESTful, Contracts, Security (OWASP), Clean Architecture, SOLID. |
Skill for validating implemented code against project standards.
Use for: Validate code, identify violations, auto-fix (autopilot) Do not use for:
add-backend-development / add-frontend-development)add-planning / add-feature-specification)add-feature-discovery / add-architecture-discovery)Reference: Always consult CLAUDE.md for general project standards.
BEFORE starting any review, you MUST create a todo list using TodoWrite.
The code-review agent MUST create todos for each validation category and for each changed file. This ensures:
Load BEFORE reviewing:
{{skill:add-backend-development/SKILL.md}}{{skill:add-database-development/SKILL.md}}{{skill:add-frontend-development/SKILL.md}}{{skill:add-ux-design/SKILL.md}}{{skill:add-security-audit/SKILL.md}}Spec vs implementation gap = the root cause of features that "pass review" but diverge from what was planned.
Sources (lookup):
{"sources":{"contracts":"docs/features/${FEATURE_ID}/plan.md (prose: routes, services, DTOs, queues)","tick_state":"docs/features/${FEATURE_ID}/tasks.md → ## Acceptance Checklist"}}
Validation procedure:
plan.md prose (routes, services, DTOs, queues)tasks.md → ## Acceptance Checklist (each item ends with (RFNN/RNNN) reference)file:lineRF/RN from about.md?COMPLIANT | DIVERGENT (exists but differs) | MISSINGExamples:
| Type | Spec | Code | Fix |
|---|---|---|---|
| DIVERGENT | POST /billing/webhook/:provider | POST /webhook (fixed route) | Refactor route to accept :provider param |
| DIVERGENT | WebhookNormalizerService (generic) | StripeWebhookService (hardcoded) | Extract generic interface, rename service |
| MISSING | WebhookSignatureGuard | No guard found | Implement guard or document explicit scope exclusion |
Spec Compliance scoring:
COMPLIANT (all items match): full pointsDIVERGENT (functional but differs): -1 per itemMISSING (not implemented): -2 per item, blocks merge if RF-linkedArchitecture violation = CRITICAL BLOCKER. Fix BEFORE any other validation.
Source: CLAUDE.md → ## Architecture Contract.
Validation steps:
For EACH new/modified file:
@org/* (or project alias)Examples:
| Violation | Fix |
|---|---|
interfaces imports database | Move artefact or adjust import |
Service-contract DTO in database | Move DTO to interfaces |
domain imports anything | Remove import — domain has zero deps |
Code without correct IoC does NOT work at runtime.
{"iocChecklist":{"Service":{"decorator":"@Injectable()","providers":"feature module","exports":false,"controllers":false,"indexTs":false},"Repository":{"decorator":"@Injectable()","providers":"db module","exports":"db module","controllers":false,"indexTs":"libs/"},"Handler":{"decorator":"@Injectable()","providers":"feature module","exports":false,"controllers":false,"indexTs":"NEVER"},"Guard":{"decorator":"@Injectable()","providers":"feature/global","exports":false,"controllers":false,"indexTs":false},"Controller":{"decorator":"@Controller()","providers":false,"exports":false,"controllers":"feature module","indexTs":false}}}
| File | Check |
|---|---|
apps/backend/src/app.module.ts | imports[] contains module |
[feature].module.ts | providers[], controllers[], imports[] |
libs/app-database/src/app-database.module.ts | providers[], exports[] for repos |
libs/app-database/src/index.ts | public repo exports |
libs/app-database/src/types/Database.ts | new table types |
libs/domain/src/index.ts | new entity/enum exports |
| Error | Cause | Fix |
|---|---|---|
Nest can't resolve dependencies of X | X not in providers[] or X's dependency not registered | Add X and its dependencies to providers[] |
X is not a provider | Missing @Injectable() or not registered | Add decorator and register in providers[] |
Module X not found | Module not imported in AppModule | Add to AppModule.imports[] |
Repository not found | Repo not exported in db module exports[] | Add to AppDatabaseModule exports[] |
| 404 on endpoint | Controller not registered or module not imported | Check controllers[] and AppModule.imports[] |
| Rule | Correct | Wrong |
|---|---|---|
| HTTP method | GET read, POST create, DELETE remove | POST for read |
| URL | /users (noun) | /getUsers (verb) |
| Status | 201 POST, 204 DELETE | 200 for all |
Frontend ↔ Backend:
| Backend | Frontend |
|---|---|
Date | string |
Enum | union type |
Sync required / optional fields between backend and frontend.
JSONB rules:
| Category | Check |
|---|---|
| Injection | parametrized queries |
| Auth | guards applied |
| Data Exposure | no secrets in logs |
| Access Control | filter by account_id |
| XSS | outputs sanitized |
Multi-tenant:
account_idaccount_id from JWT, not bodyany typeconsole.log (use logger)up and down.env.exampleIConfigurationService, not process.envWeights and status (lookup):
{"weights":{"specCompliance":20,"archContract":20,"ioc":15,"restful":10,"contracts":15,"security":15,"solid":10,"quality":10,"database":5}} {"status":{"8-10":"APPROVED","6-7":"NEEDS ATTENTION","4-5":"NEEDS FIXES","0-3":"CRITICAL"}}
bash .codeadd/scripts/status.shCLAUDE.mdFor EACH changed file, validate in order, marking each todo in_progress → completed:
in_progresscompletedGenerate the review report at docs/features/${featureId}/review.md. The exact output template (score table, issue format, build status) is owned by the consuming command (add.review) — this skill validates; the command formats.
Do:
status.sh FIRSTDon't:
AppModule.imports[] or barrel exports in libs/