evizi-kit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +506 -0
- package/kits/agent/.agent/skills/claude-code-subagent-creator/SKILL.md +292 -0
- package/kits/agent/.agent/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
- package/kits/agent/.agent/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
- package/kits/agent/.agent/skills/skill-creator/LICENSE.txt +202 -0
- package/kits/agent/.agent/skills/skill-creator/SKILL.md +485 -0
- package/kits/agent/.agent/skills/skill-creator/agents/analyzer.md +274 -0
- package/kits/agent/.agent/skills/skill-creator/agents/comparator.md +202 -0
- package/kits/agent/.agent/skills/skill-creator/agents/grader.md +223 -0
- package/kits/agent/.agent/skills/skill-creator/assets/eval_review.html +146 -0
- package/kits/agent/.agent/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/kits/agent/.agent/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/kits/agent/.agent/skills/skill-creator/references/schemas.md +430 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/__init__.py +0 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/generate_report.py +326 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/improve_description.py +247 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/package_skill.py +136 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/run_eval.py +310 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/run_loop.py +328 -0
- package/kits/agent/.agent/skills/skill-creator/scripts/utils.py +47 -0
- package/kits/agent/manifest.json +10 -0
- package/kits/claude/.claude/agents/code-pusher.md +46 -0
- package/kits/claude/.claude/agents/feature-document-updater.md +37 -0
- package/kits/claude/.claude/agents/self-reviewer.md +32 -0
- package/kits/claude/.claude/agents/web-auto-agentic-workflow-initializer.md +42 -0
- package/kits/claude/.claude/agents/web-auto-assisted-fix-and-runner.md +36 -0
- package/kits/claude/.claude/agents/web-auto-chrome-devtools-selector-extractor.md +36 -0
- package/kits/claude/.claude/agents/web-auto-coder.md +33 -0
- package/kits/claude/.claude/agents/web-auto-fe-selector-extractor.md +31 -0
- package/kits/claude/.claude/agents/web-auto-fix-and-runner.md +35 -0
- package/kits/claude/.claude/agents/web-auto-lessons-learned-extractor.md +34 -0
- package/kits/claude/.claude/agents/web-auto-playwright-mcp-selector-extractor.md +37 -0
- package/kits/claude/.claude/agents/web-auto-source-instructions-updater.md +43 -0
- package/kits/claude/.claude/agents/web-auto-test-cases-generator.md +29 -0
- package/kits/claude/.claude/agents/web-auto-ticket-designer.md +35 -0
- package/kits/claude/.claude/agents/web-auto-ticket-playbook-planner.md +36 -0
- package/kits/claude/.claude/agents/web-auto.md +382 -0
- package/kits/claude/.claude/skills/claude-code-subagent-creator/SKILL.md +292 -0
- package/kits/claude/.claude/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
- package/kits/claude/.claude/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
- package/kits/claude/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/kits/claude/.claude/skills/skill-creator/SKILL.md +485 -0
- package/kits/claude/.claude/skills/skill-creator/agents/analyzer.md +274 -0
- package/kits/claude/.claude/skills/skill-creator/agents/comparator.md +202 -0
- package/kits/claude/.claude/skills/skill-creator/agents/grader.md +223 -0
- package/kits/claude/.claude/skills/skill-creator/assets/eval_review.html +146 -0
- package/kits/claude/.claude/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/kits/claude/.claude/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/kits/claude/.claude/skills/skill-creator/references/schemas.md +430 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/__init__.py +0 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/generate_report.py +326 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/improve_description.py +247 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/package_skill.py +136 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/run_eval.py +310 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/run_loop.py +328 -0
- package/kits/claude/.claude/skills/skill-creator/scripts/utils.py +47 -0
- package/kits/claude/manifest.json +10 -0
- package/kits/cursor/.cursor/agents/code-pusher.agent.md +43 -0
- package/kits/cursor/.cursor/agents/feature-document-updater.agent.md +34 -0
- package/kits/cursor/.cursor/agents/self-reviewer.agent.md +29 -0
- package/kits/cursor/.cursor/agents/web-auto-agentic-workflow-initializer.agent.md +37 -0
- package/kits/cursor/.cursor/agents/web-auto-assisted-fix-and-runner.agent.md +33 -0
- package/kits/cursor/.cursor/agents/web-auto-chrome-devtools-selector-extractor.agent.md +31 -0
- package/kits/cursor/.cursor/agents/web-auto-coder.agent.md +30 -0
- package/kits/cursor/.cursor/agents/web-auto-fe-selector-extractor.agent.md +28 -0
- package/kits/cursor/.cursor/agents/web-auto-fix-and-runner.agent.md +32 -0
- package/kits/cursor/.cursor/agents/web-auto-lessons-learned-extractor.agent.md +31 -0
- package/kits/cursor/.cursor/agents/web-auto-playwright-mcp-selector-extractor.agent.md +32 -0
- package/kits/cursor/.cursor/agents/web-auto-source-instructions-updater.agent.md +40 -0
- package/kits/cursor/.cursor/agents/web-auto-test-cases-generator.agent.md +26 -0
- package/kits/cursor/.cursor/agents/web-auto-ticket-designer.agent.md +32 -0
- package/kits/cursor/.cursor/agents/web-auto-ticket-playbook-planner.agent.md +33 -0
- package/kits/cursor/.cursor/agents/web-auto.agent.md +379 -0
- package/kits/cursor/.cursor/skills/claude-code-subagent-creator/SKILL.md +292 -0
- package/kits/cursor/.cursor/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
- package/kits/cursor/.cursor/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
- package/kits/cursor/.cursor/skills/skill-creator/LICENSE.txt +202 -0
- package/kits/cursor/.cursor/skills/skill-creator/SKILL.md +485 -0
- package/kits/cursor/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
- package/kits/cursor/.cursor/skills/skill-creator/agents/comparator.md +202 -0
- package/kits/cursor/.cursor/skills/skill-creator/agents/grader.md +223 -0
- package/kits/cursor/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
- package/kits/cursor/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/kits/cursor/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/kits/cursor/.cursor/skills/skill-creator/references/schemas.md +430 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/improve_description.py +247 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/run_loop.py +328 -0
- package/kits/cursor/.cursor/skills/skill-creator/scripts/utils.py +47 -0
- package/kits/cursor/manifest.json +10 -0
- package/kits/github/.github/agents/code-pusher.agent.md +45 -0
- package/kits/github/.github/agents/feature-document-updater.agent.md +36 -0
- package/kits/github/.github/agents/self-reviewer.agent.md +31 -0
- package/kits/github/.github/agents/web-auto-agentic-workflow-initializer.agent.md +39 -0
- package/kits/github/.github/agents/web-auto-assisted-fix-and-runner.agent.md +35 -0
- package/kits/github/.github/agents/web-auto-chrome-devtools-selector-extractor.agent.md +33 -0
- package/kits/github/.github/agents/web-auto-coder.agent.md +32 -0
- package/kits/github/.github/agents/web-auto-fe-selector-extractor.agent.md +30 -0
- package/kits/github/.github/agents/web-auto-fix-and-runner.agent.md +34 -0
- package/kits/github/.github/agents/web-auto-lessons-learned-extractor.agent.md +33 -0
- package/kits/github/.github/agents/web-auto-playwright-mcp-selector-extractor.agent.md +34 -0
- package/kits/github/.github/agents/web-auto-source-instructions-updater.agent.md +42 -0
- package/kits/github/.github/agents/web-auto-test-cases-generator.agent.md +28 -0
- package/kits/github/.github/agents/web-auto-ticket-designer.agent.md +34 -0
- package/kits/github/.github/agents/web-auto-ticket-playbook-creator.agent.md +35 -0
- package/kits/github/.github/agents/web-auto.agent.md +382 -0
- package/kits/github/.github/skills/claude-code-subagent-creator/SKILL.md +310 -0
- package/kits/github/.github/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
- package/kits/github/.github/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +37 -0
- package/kits/github/.github/skills/skill-creator/LICENSE.txt +202 -0
- package/kits/github/.github/skills/skill-creator/SKILL.md +485 -0
- package/kits/github/.github/skills/skill-creator/agents/analyzer.md +274 -0
- package/kits/github/.github/skills/skill-creator/agents/comparator.md +202 -0
- package/kits/github/.github/skills/skill-creator/agents/grader.md +223 -0
- package/kits/github/.github/skills/skill-creator/assets/eval_review.html +146 -0
- package/kits/github/.github/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/kits/github/.github/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/kits/github/.github/skills/skill-creator/references/schemas.md +430 -0
- package/kits/github/.github/skills/skill-creator/scripts/__init__.py +0 -0
- package/kits/github/.github/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/kits/github/.github/skills/skill-creator/scripts/generate_report.py +326 -0
- package/kits/github/.github/skills/skill-creator/scripts/improve_description.py +247 -0
- package/kits/github/.github/skills/skill-creator/scripts/package_skill.py +136 -0
- package/kits/github/.github/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/kits/github/.github/skills/skill-creator/scripts/run_eval.py +310 -0
- package/kits/github/.github/skills/skill-creator/scripts/run_loop.py +328 -0
- package/kits/github/.github/skills/skill-creator/scripts/utils.py +47 -0
- package/kits/github/manifest.json +10 -0
- package/kits/shared/docs/ai-code-review.md +440 -0
- package/kits/shared/docs/increase-unit-test-coverage.md +77 -0
- package/kits/shared/docs/pr-review-agent.md +501 -0
- package/kits/shared/docs/self-review-agent.md +246 -0
- package/kits/shared/docs/web-auto-agentic-workflow.md +506 -0
- package/kits/shared/manifest.json +11 -0
- package/kits/shared/skills/fix-automation-tests/SKILL.md +280 -0
- package/kits/shared/skills/fix-automation-tests/scripts/fetch_pr_changes.py +300 -0
- package/kits/shared/skills/fix-automation-tests/templates/impact-report.template.md +42 -0
- package/kits/shared/skills/increase-unit-test-coverage/SKILL.md +117 -0
- package/kits/shared/skills/increase-unit-test-coverage/scripts/filter_low_coverage.py +447 -0
- package/kits/shared/skills/pr-review/SKILL.md +200 -0
- package/kits/shared/skills/pr-review/references/automation.md +62 -0
- package/kits/shared/skills/pr-review/references/backend.md +95 -0
- package/kits/shared/skills/pr-review/references/frontend.md +103 -0
- package/kits/shared/skills/pr-review/references/mobile.md +108 -0
- package/kits/shared/skills/pr-review/references/output-schema.md +130 -0
- package/kits/shared/skills/pr-review/scripts/post-review.py +1395 -0
- package/kits/shared/skills/push-code/SKILL.md +176 -0
- package/kits/shared/skills/self-review/SKILL.md +234 -0
- package/kits/shared/skills/self-review/evals/evals.json +23 -0
- package/kits/shared/skills/self-review/references/automation.md +62 -0
- package/kits/shared/skills/self-review/references/backend.md +95 -0
- package/kits/shared/skills/self-review/references/frontend.md +103 -0
- package/kits/shared/skills/self-review/references/mobile.md +108 -0
- package/kits/shared/skills/self-review/templates/issues.template.md +72 -0
- package/kits/shared/skills/update-feature-document/SKILL.md +156 -0
- package/kits/shared/skills/update-feature-document/templates/delta.template.yaml +58 -0
- package/kits/shared/skills/update-feature-document/templates/feature.template.md +25 -0
- package/kits/shared/skills/web-auto-assisted-fix-and-run/SKILL.md +130 -0
- package/kits/shared/skills/web-auto-assisted-fix-and-run/references/resolve-api-error.md +108 -0
- package/kits/shared/skills/web-auto-assisted-fix-and-run/references/resolve-selector.md +60 -0
- package/kits/shared/skills/web-auto-assisted-fix-and-run/templates/issues-resolution-report-append.template.md +54 -0
- package/kits/shared/skills/web-auto-chrome-devtools-mcp-extract-selectors/SKILL.md +284 -0
- package/kits/shared/skills/web-auto-coding/SKILL.md +152 -0
- package/kits/shared/skills/web-auto-extract-lessons-learned/SKILL.md +168 -0
- package/kits/shared/skills/web-auto-extract-lessons-learned/templates/lessons-learned.template.md +115 -0
- package/kits/shared/skills/web-auto-fe-extract-selectors/SKILL.md +282 -0
- package/kits/shared/skills/web-auto-fe-extract-selectors/evals/evals.json +23 -0
- package/kits/shared/skills/web-auto-fix-and-run-test/SKILL.md +183 -0
- package/kits/shared/skills/web-auto-fix-and-run-test/templates/issues-resolution-report.template.md +77 -0
- package/kits/shared/skills/web-auto-generate-best-practices/SKILL.md +123 -0
- package/kits/shared/skills/web-auto-generate-instructions/SKILL.md +200 -0
- package/kits/shared/skills/web-auto-generate-instructions/evals/evals.json +23 -0
- package/kits/shared/skills/web-auto-generate-instructions/references/analysis-guide.md +145 -0
- package/kits/shared/skills/web-auto-generate-instructions/templates/web-auto-instructions.template.md +184 -0
- package/kits/shared/skills/web-auto-generate-project-blueprint/SKILL.md +181 -0
- package/kits/shared/skills/web-auto-generate-project-blueprint/evals/evals.json +57 -0
- package/kits/shared/skills/web-auto-generate-project-blueprint/templates/web-auto-project-blueprint.template.md +161 -0
- package/kits/shared/skills/web-auto-playwright-mcp-extract-selectors/SKILL.md +293 -0
- package/kits/shared/skills/web-auto-test-cases/SKILL.md +138 -0
- package/kits/shared/skills/web-auto-test-cases/evals/evals.json +129 -0
- package/kits/shared/skills/web-auto-test-cases/templates/test-cases.template.md +53 -0
- package/kits/shared/skills/web-auto-ticket-design/SKILL.md +199 -0
- package/kits/shared/skills/web-auto-ticket-design/templates/ticket-design.template.md +138 -0
- package/kits/shared/skills/web-auto-ticket-playbook/SKILL.md +218 -0
- package/kits/shared/skills/web-auto-ticket-playbook/evals/evals.json +23 -0
- package/kits/shared/skills/web-auto-ticket-playbook/templates/ticket-playbook.template.md +148 -0
- package/kits/shared/skills/web-auto-update-source-instructions/SKILL.md +156 -0
- package/kits/shared/skills/web-auto-update-source-instructions/evals/evals.json +22 -0
- package/kits/shared/skills/workspace-ai-nav-creator/SKILL.md +168 -0
- package/kits/shared/skills/workspace-ai-nav-creator/templates/agents-md.template.md +112 -0
- package/kits/shared/skills/workspace-ai-nav-creator/templates/claude-md.template.md +86 -0
- package/package.json +16 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr-review
|
|
3
|
+
description: Review pull request code changes, analyze for bugs/security/quality issues, and post inline comments to Git platforms. Use this skill whenever the user mentions reviewing a PR, checking code changes, doing a code review, looking at a pull request or merge request, or giving feedback on submitted code. Triggers on requests like "Review PR #42", "Check the changes in PR 123", "Can you review my pull request?", "Look at this MR", "Code review for PR 15", "What do you think about this PR?", "Review the latest changes", or any variation involving PR/MR numbers or code review requests — even casual ones like "take a look at the PR" or "check my code".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PR Review Skill
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This skill reviews pull request code by fetching the diff, analyzing it against domain-specific checklists and project standards, and posting structured inline comments to the Git platform. It supports GitHub, GitLab, Gitea, and Bitbucket.
|
|
11
|
+
|
|
12
|
+
The goal is to catch real problems — bugs, security holes, logic errors — and surface them in a way that helps the author improve the code. A good automated review feels like feedback from a thoughtful colleague, not a linting tool.
|
|
13
|
+
|
|
14
|
+
## Review Philosophy
|
|
15
|
+
|
|
16
|
+
A PR review is a conversation, not an audit. The best reviews help the author ship better code faster. Keep these principles in mind throughout the review:
|
|
17
|
+
|
|
18
|
+
### Signal over noise
|
|
19
|
+
Every comment should earn its place. A review with 3 high-value comments is better than one with 15 comments where half are style nitpicks. Before adding a comment, ask: "Would a senior engineer on this team bother mentioning this?" If the answer is no, skip it.
|
|
20
|
+
|
|
21
|
+
### Understand the change first
|
|
22
|
+
Before diving into line-by-line analysis, read the commit messages and the full diff to understand *what* the author is trying to accomplish. This context prevents misguided comments like suggesting a refactor when the author is intentionally making a minimal hotfix.
|
|
23
|
+
|
|
24
|
+
### Severity honesty
|
|
25
|
+
Be honest about severity. If something is a genuine bug or security vulnerability, say so clearly. If something is a preference or stylistic suggestion, label it that way. Mislabeling suggestions as critical issues erodes trust in the review.
|
|
26
|
+
|
|
27
|
+
### Constructive tone
|
|
28
|
+
Write comments the way you'd want to receive them. Instead of "This is wrong", explain what the issue is and why it matters. Include a recommendation or code snippet when possible — showing the fix is more helpful than just pointing out the problem.
|
|
29
|
+
|
|
30
|
+
**Example of a good comment:**
|
|
31
|
+
> The `userId` from the request body is used directly in the SQL query, which opens this endpoint to SQL injection. Since this project uses Sequelize, you can use parameterized queries instead:
|
|
32
|
+
> ```ts
|
|
33
|
+
> const user = await User.findByPk(userId);
|
|
34
|
+
> ```
|
|
35
|
+
|
|
36
|
+
**Example of a bad comment:**
|
|
37
|
+
> SQL injection vulnerability on this line.
|
|
38
|
+
|
|
39
|
+
### What NOT to comment on
|
|
40
|
+
- Pure formatting issues (that's what linters and formatters are for)
|
|
41
|
+
- Personal style preferences that don't affect correctness or readability
|
|
42
|
+
- Things already caught by CI (type errors, lint failures, failing tests) — this includes checklist items like console log removal, magic numbers, and naming conventions if the project has linters covering them
|
|
43
|
+
- Obvious patterns that the author clearly chose intentionally
|
|
44
|
+
|
|
45
|
+
## Input
|
|
46
|
+
|
|
47
|
+
| Parameter | Type | Required | Description |
|
|
48
|
+
|-----------|------|----------|-------------|
|
|
49
|
+
| `prNumber` | number | Yes | The pull request number to review |
|
|
50
|
+
|
|
51
|
+
## Execution Steps
|
|
52
|
+
|
|
53
|
+
### Step 1: Read Configuration
|
|
54
|
+
|
|
55
|
+
Read `.documents-design/project.config.json` and extract `baseBranch` and `platform`. See `references/output-schema.md` for the full configuration format.
|
|
56
|
+
|
|
57
|
+
### Step 2: Fetch and Checkout PR Code
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git fetch origin pull/${PR_NUMBER}/head:pr-${PR_NUMBER}
|
|
61
|
+
git checkout pr-${PR_NUMBER}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Platform-Specific Fetch Commands:**
|
|
65
|
+
|
|
66
|
+
| Platform | Fetch Command |
|
|
67
|
+
|----------|--------------|
|
|
68
|
+
| GitHub | `git fetch origin pull/${PR_NUMBER}/head:pr-${PR_NUMBER}` |
|
|
69
|
+
| Gitea | `git fetch origin pull/${PR_NUMBER}/head:pr-${PR_NUMBER}` |
|
|
70
|
+
| GitLab | `git fetch origin merge-requests/${MR_NUMBER}/head:mr-${MR_NUMBER}` |
|
|
71
|
+
| Bitbucket | `git fetch origin pull-requests/${PR_NUMBER}/from:pr-${PR_NUMBER}` |
|
|
72
|
+
|
|
73
|
+
### Step 3: Get Changed Files
|
|
74
|
+
|
|
75
|
+
Use three-dot diff (`...`) to scope the review to only the PR's own commits. This matters because two-dot diff (`git diff A B`) shows the full tree difference including unrelated changes from other branches, while three-dot (`git diff A...B`) uses the merge-base to isolate only changes introduced by this PR.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git fetch origin ${BASE_BRANCH}
|
|
79
|
+
git log origin/${BASE_BRANCH}..HEAD --oneline
|
|
80
|
+
git diff origin/${BASE_BRANCH}...HEAD --name-only
|
|
81
|
+
git diff origin/${BASE_BRANCH}...HEAD --unified=3
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 4: Detect Tech Stack and Load Checklist
|
|
85
|
+
|
|
86
|
+
Determine the tech stack from changed file extensions and read the corresponding reference:
|
|
87
|
+
|
|
88
|
+
| Tech Stack | Indicators | Reference |
|
|
89
|
+
|------------|-----------|-----------|
|
|
90
|
+
| **Frontend** | `.tsx`, `.jsx`, `.vue`, `.css`, `package.json` | `references/frontend.md` |
|
|
91
|
+
| **Backend** | `.java`, `.go`, `.py` (API), `.sql` | `references/backend.md` |
|
|
92
|
+
| **Mobile** | `.swift`, `.kt`, `Podfile`, `AndroidManifest.xml` | `references/mobile.md` |
|
|
93
|
+
| **Automation** | `.spec.ts`, `Selenium`, `Test.java` | `references/automation.md` |
|
|
94
|
+
|
|
95
|
+
The checklists are comprehensive, but treat them as a lens, not a scorecard. Don't force-apply every item — focus on checks relevant to the actual changes. A PR that modifies a single API endpoint doesn't need every database optimization check applied.
|
|
96
|
+
|
|
97
|
+
### Step 5: Analyze Code Changes
|
|
98
|
+
|
|
99
|
+
This is the core of the review. Work through the diff in two passes:
|
|
100
|
+
|
|
101
|
+
**First pass — Understand intent and architecture:**
|
|
102
|
+
- Read the full diff to understand what the PR accomplishes
|
|
103
|
+
- Check if the overall approach is sound
|
|
104
|
+
- Look for missing pieces (e.g., new API endpoint with no error handling, new feature with no tests)
|
|
105
|
+
- Verify consistency with existing patterns in the codebase
|
|
106
|
+
|
|
107
|
+
**Second pass — Line-by-line analysis:**
|
|
108
|
+
Apply the domain checklist and general review criteria:
|
|
109
|
+
|
|
110
|
+
1. **Bugs** — Runtime errors, null/undefined access, off-by-one errors, race conditions, logic flaws → category: `Bug`
|
|
111
|
+
2. **Security** — Hardcoded secrets, injection risks (SQL, XSS, command), broken auth/authz, sensitive data exposure → category: `Security`
|
|
112
|
+
3. **Breaking changes** — API contract changes, removed fields, changed behavior → category: `BreakingChange`
|
|
113
|
+
4. **Performance** — N+1 queries, unbounded loops, missing pagination, expensive operations in hot paths → category: `Performance`
|
|
114
|
+
5. **Code quality** — Type safety, error handling, naming clarity, unnecessary complexity → category: `Pattern`, `Type`, `Readability`, or `Naming`
|
|
115
|
+
|
|
116
|
+
**Classify issues by severity:**
|
|
117
|
+
- **critical** — Bugs, security vulnerabilities, breaking changes, data loss risks. These block the PR.
|
|
118
|
+
- **warning** — Performance issues, missing error handling, maintainability concerns. Important but not blocking.
|
|
119
|
+
- **suggestion** — Better patterns, minor optimizations, readability improvements. Take-it-or-leave-it.
|
|
120
|
+
|
|
121
|
+
### Handling Large PRs
|
|
122
|
+
|
|
123
|
+
For PRs with many changed files (20+), prioritize rather than trying to review everything equally:
|
|
124
|
+
1. Focus depth on high-risk files: authentication, authorization, data access, payment, configuration
|
|
125
|
+
2. Give lighter review to test files, documentation, generated code, and simple refactors
|
|
126
|
+
3. Note in the summary that the PR is large and recommend splitting if the changes aren't cohesive
|
|
127
|
+
|
|
128
|
+
### Avoiding False Positives
|
|
129
|
+
|
|
130
|
+
A false positive is worse than a missed issue — it wastes the author's time and trains them to ignore future comments. Common false positive traps:
|
|
131
|
+
|
|
132
|
+
- **Intentional patterns**: If the author clearly chose an approach deliberately (e.g., using `any` type with a `// TODO` comment), don't flag it unless it's a security risk
|
|
133
|
+
- **Framework conventions**: Don't flag patterns that are idiomatic for the framework (e.g., React's `useEffect` dependency arrays, Angular's decorator patterns)
|
|
134
|
+
- **Test code**: Test files have different standards — assertions that look like magic numbers, hardcoded values, and verbose setup are normal
|
|
135
|
+
- **Generated code**: Don't review auto-generated files
|
|
136
|
+
|
|
137
|
+
### Step 6: Generate Review Output
|
|
138
|
+
|
|
139
|
+
Create `review.json` in the project root following the standard schema. See `references/output-schema.md` for the full schema definition and examples.
|
|
140
|
+
|
|
141
|
+
Keep comments focused and actionable. Each comment should have:
|
|
142
|
+
- A clear **title** that summarizes the issue in a few words
|
|
143
|
+
- A **body** that explains the problem and why it matters
|
|
144
|
+
- A **recommendation** with the suggested fix (when possible)
|
|
145
|
+
- A **codeSnippet** showing the corrected code (when applicable)
|
|
146
|
+
|
|
147
|
+
### Step 7: Show Preview and Get Confirmation
|
|
148
|
+
|
|
149
|
+
Display review summary to the user:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
PR #42 Review Summary
|
|
153
|
+
|
|
154
|
+
Found:
|
|
155
|
+
- 2 Critical Issues
|
|
156
|
+
- 1 Warning
|
|
157
|
+
- 0 Suggestions
|
|
158
|
+
|
|
159
|
+
Review saved to: review.json
|
|
160
|
+
Review Status: REQUEST_CHANGES (due to critical issues)
|
|
161
|
+
Platform: GitHub | Files: 5 | Total Comments: 3
|
|
162
|
+
|
|
163
|
+
Do you want to post these 3 comments to GitHub? (yes/no)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
If the user declines, inform them the review is saved and can be posted later with:
|
|
167
|
+
```bash
|
|
168
|
+
python {PR_REVIEW_SKILL_PATH}/scripts/post-review.py
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Step 8: Post Review
|
|
172
|
+
|
|
173
|
+
Run the dispatcher script which handles platform-specific API formatting and posting:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Default repo
|
|
177
|
+
python {PR_REVIEW_SKILL_PATH}/scripts/post-review.py
|
|
178
|
+
|
|
179
|
+
# Target a specific repo
|
|
180
|
+
python {PR_REVIEW_SKILL_PATH}/scripts/post-review.py --repo webApp
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
> `{PR_REVIEW_SKILL_PATH}` is the absolute path to the pr-review skill folder (e.g., `.cursor/skills/pr-review`, `.github/skills/pr-review`).
|
|
184
|
+
|
|
185
|
+
The script reads `review.json` and `.documents-design/project.config.json`, transforms comments to the platform's API format, posts them, and optionally sends a Google Chat notification.
|
|
186
|
+
|
|
187
|
+
### Step 9: Cleanup
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
git checkout -
|
|
191
|
+
git branch -D pr-${PR_NUMBER}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Reference Files
|
|
195
|
+
|
|
196
|
+
- `references/output-schema.md` — Review JSON schema, configuration format, operation modes, and dependencies
|
|
197
|
+
- `references/frontend.md` — Frontend review checklist (React, Vue, Angular, CSS)
|
|
198
|
+
- `references/backend.md` — Backend review checklist (API, database, security)
|
|
199
|
+
- `references/mobile.md` — Mobile review checklist (iOS, Android)
|
|
200
|
+
- `references/automation.md` — Automation test review checklist (Selenium, Cypress, Playwright)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Automation Test Review Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when reviewing E2E or integration tests (Playwright, Cypress, Selenium, WebdriverIO, etc.).
|
|
4
|
+
|
|
5
|
+
> **Severity guide**: Each item is tagged with a default severity. Adjust based on context — a hard-coded wait in a quick smoke test is a suggestion, but in a CI-gating test suite it's a warning.
|
|
6
|
+
> - ❌ = Critical
|
|
7
|
+
> - ⚠️ = Warning
|
|
8
|
+
> - 💡 = Suggestion
|
|
9
|
+
|
|
10
|
+
## ⏱️ Stability & Waits (review first — #1 cause of flaky tests)
|
|
11
|
+
- ❌ **No Hard Waits**: Avoid `sleep()`, `page.waitForTimeout()`, or fixed delays. Use dynamic waits (`waitForSelector`, `waitForResponse`, `expect().toBeVisible()`). Hard waits are the leading cause of flaky tests — they're either too short (test fails) or too long (suite is slow).
|
|
12
|
+
- ⚠️ **Race Conditions**: Are async operations properly awaited? Missing `await` before Playwright/Cypress commands causes non-deterministic failures.
|
|
13
|
+
- ⚠️ **Timeout Configuration**: Are explicit timeouts set on actions and assertions? Relying on framework defaults (30s/60s) masks slow tests.
|
|
14
|
+
- ⚠️ **Network Waits**: Are tests waiting for API responses to complete before asserting on rendered data? (`waitForResponse`, `cy.intercept`)
|
|
15
|
+
- 💡 **Retry on Assertion**: Are auto-retrying assertions used (`expect(locator).toHaveText()` in Playwright, `.should()` in Cypress) instead of manual retry loops?
|
|
16
|
+
|
|
17
|
+
## 🎯 Selectors & Locators
|
|
18
|
+
- ❌ **Stable Selectors**: Are selectors resilient to UI changes? Using CSS classes tied to styling (`.btn-primary`) or fragile XPath (`/div[3]/span[2]`) breaks when the UI is refactored.
|
|
19
|
+
- ⚠️ **Selector Priority**: Follow: `data-testid` > `role` / ARIA > `id` > CSS > XPath (last resort)
|
|
20
|
+
- ⚠️ **Unique Selectors**: Are selectors specific enough to match exactly one element? Ambiguous selectors cause tests to interact with the wrong element.
|
|
21
|
+
- 💡 **Playwright Locators**: Prefer Playwright's built-in locators (`getByRole`, `getByText`, `getByTestId`) over raw CSS selectors — they auto-wait and provide better error messages.
|
|
22
|
+
|
|
23
|
+
## 🧹 Isolation & Cleanup
|
|
24
|
+
- ❌ **Test Independence**: Can each test run in isolation, in any order? Tests that depend on prior test state are fragile and impossible to parallelize.
|
|
25
|
+
- ⚠️ **Teardown**: Does `afterEach`/`afterAll` clean up created data (even on failure)? Leaked test data poisons later runs.
|
|
26
|
+
- ⚠️ **Own Test Data**: Does each test create its own seed data via API or fixtures? Shared data causes inter-test interference.
|
|
27
|
+
- 💡 **Parallel Safe**: Can tests run in parallel without conflicts? (No shared mutable state, no port collisions)
|
|
28
|
+
|
|
29
|
+
## 🔒 Security & Data
|
|
30
|
+
- ❌ **No Hardcoded Secrets**: Are credentials, tokens, and API keys in environment variables or config, not in test code?
|
|
31
|
+
- ⚠️ **Test Data Privacy**: Is PII/sensitive data anonymized or mocked?
|
|
32
|
+
- 💡 **API Keys Separation**: Are test API keys separate from production?
|
|
33
|
+
|
|
34
|
+
## 🐛 Error Handling & Debugging
|
|
35
|
+
- ⚠️ **Screenshots on Failure**: Are screenshots/videos/traces captured automatically on test failure?
|
|
36
|
+
- ⚠️ **Meaningful Assertions**: Do assertion messages explain WHAT failed and WHY? (`expect(count).toBe(5, 'Cart should have 5 items after adding')` not just `expect(count).toBe(5)`)
|
|
37
|
+
- ⚠️ **Trace / Debug Logs**: Are critical user actions logged for troubleshooting? (`console.log('Clicked checkout button')`)
|
|
38
|
+
- 💡 **Error Recovery**: Are expected transient failures (e.g., toast auto-dismiss) handled gracefully with retry or conditional logic?
|
|
39
|
+
|
|
40
|
+
## 🧱 Code Quality & Patterns
|
|
41
|
+
- ⚠️ **Page Object Pattern**: Is test logic separated from locators/selectors? Page Object Model (or equivalent abstraction) keeps tests readable and locators maintainable.
|
|
42
|
+
- ⚠️ **Explicit Assertions**: Does every test action have a corresponding assertion? Actions without assertions pass even when the feature is broken.
|
|
43
|
+
- ⚠️ **Descriptive Names**: Does the test name describe the behavior being verified? (`should show error when login with expired token` — not `test1` or `loginTest`)
|
|
44
|
+
- ⚠️ **Given-When-Then / AAA**: Is test structure clear? (Arrange preconditions → Act on the system → Assert expected outcome)
|
|
45
|
+
- 💡 **Positive & Negative Tests**: Does the test verify both success and error scenarios?
|
|
46
|
+
- 💡 **DRY Helpers**: Are repeated setup sequences (login, navigate, seed data) extracted to reusable helpers?
|
|
47
|
+
|
|
48
|
+
## 🌐 Environment & CI
|
|
49
|
+
- ❌ **CI Ready**: Will the test run in headless mode without display dependencies? (No `headless: false` left in CI config)
|
|
50
|
+
- ⚠️ **Environment Agnostic**: Does the test work across environments (dev/staging/prod) using config — not hardcoded URLs or ports?
|
|
51
|
+
- ⚠️ **Test Duration**: Does each test complete in a reasonable time? (< 2 min per E2E test, < 10 min total suite for CI gating)
|
|
52
|
+
- 💡 **External Dependencies**: Are external APIs/services mocked or stubbed to avoid flakiness from third-party outages?
|
|
53
|
+
- 💡 **Test Reporting**: Are results reported in a format CI can parse (JUnit XML, HTML report)?
|
|
54
|
+
|
|
55
|
+
## 📊 Test Data Management
|
|
56
|
+
- ⚠️ **Data Setup via API**: Are test preconditions set up via API calls rather than through the UI? API setup is faster and more reliable.
|
|
57
|
+
- 💡 **Fixtures / Factories**: Are reusable data factories or fixture files used for test data generation?
|
|
58
|
+
- 💡 **Database Seeding**: For complex scenarios, is the database seeded directly rather than clicking through UI flows?
|
|
59
|
+
|
|
60
|
+
## ♿ Accessibility (Optional)
|
|
61
|
+
- 💡 **A11y Validation**: Are basic accessibility rules checked during E2E flows (e.g., axe-core integration)?
|
|
62
|
+
- 💡 **Keyboard Navigation**: Can critical flows complete using keyboard only?
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Backend Code Review Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when reviewing Backend, API, or Database code.
|
|
4
|
+
|
|
5
|
+
> **Severity guide**: Each item is tagged with a default severity. Adjust based on context — a missing index on a rarely-queried column is a suggestion, but on a high-traffic endpoint it's a warning.
|
|
6
|
+
> - ❌ = Critical
|
|
7
|
+
> - ⚠️ = Warning
|
|
8
|
+
> - 💡 = Suggestion
|
|
9
|
+
|
|
10
|
+
## 🔒 Security — OWASP (review first)
|
|
11
|
+
- ❌ **SQL Injection**: Are parameterized queries / prepared statements used? Raw SQL with string-concatenated user input is the most exploited web vulnerability.
|
|
12
|
+
- ❌ **Authentication**: Are endpoints requiring auth properly protected?
|
|
13
|
+
- ❌ **Authorization**: Does the user have permission to access this specific resource? (Check for IDOR — can user A access user B's data by changing an ID?)
|
|
14
|
+
- ❌ **No Hardcoded Secrets**: Are credentials, API keys, and tokens in env vars or secret managers (not committed in code)?
|
|
15
|
+
- ❌ **Password Hashing**: Are passwords hashed with bcrypt/Argon2? (MD5/SHA1 are broken for passwords)
|
|
16
|
+
- ⚠️ **JWT/Token Validation**: Are tokens verified, checked for expiry, and scoped correctly?
|
|
17
|
+
- ⚠️ **XSS Prevention**: Is user input sanitized before rendering in responses?
|
|
18
|
+
- ⚠️ **Safe Error Messages**: Do error responses hide internal details? (No stack traces, SQL errors, or file paths to the client)
|
|
19
|
+
- ⚠️ **Sensitive Data in Logs**: Is PII redacted from logs and error messages?
|
|
20
|
+
- ⚠️ **CORS Configuration**: Are CORS headers restrictive? (`Access-Control-Allow-Origin: *` in production is almost always wrong)
|
|
21
|
+
- ⚠️ **CSRF Protection**: Are state-changing endpoints protected from cross-site request forgery?
|
|
22
|
+
- ⚠️ **File Upload Security**: Are uploaded files validated for type, size, and content? Are they stored outside the web root?
|
|
23
|
+
- 💡 **Rate Limiting Headers**: Do rate-limited endpoints return `Retry-After` and `X-RateLimit-*` headers?
|
|
24
|
+
|
|
25
|
+
## ✅ Input Validation & Data
|
|
26
|
+
- ❌ **Input Validation**: Are all API inputs validated at the boundary? Unvalidated input is the root cause of injection attacks.
|
|
27
|
+
- ⚠️ **Type Checking**: Are input types validated (string, int, email format, UUID)?
|
|
28
|
+
- ⚠️ **Boundary Checks**: Are ranges validated (min/max length, value ranges, array sizes)?
|
|
29
|
+
- ⚠️ **Required Fields**: Are required fields enforced?
|
|
30
|
+
- 💡 **Business Rules**: Are domain-specific rules validated (e.g., quantity > 0, date in future)?
|
|
31
|
+
|
|
32
|
+
## 🌐 API Design & HTTP
|
|
33
|
+
- ⚠️ **HTTP Status Codes**: Are correct codes used? (200, 201, 400, 401, 403, 404, 409, 500)
|
|
34
|
+
- ⚠️ **REST Principles**: Do endpoints follow REST conventions (GET reads, POST creates, PUT/PATCH updates, DELETE removes)?
|
|
35
|
+
- ⚠️ **Response Format**: Is JSON structure consistent across endpoints (same envelope, error format)?
|
|
36
|
+
- 💡 **API Versioning**: Is the API versioned (e.g., `/v1/users`) for breaking changes?
|
|
37
|
+
- 💡 **Content-Type**: Are proper content-type headers set on requests and responses?
|
|
38
|
+
|
|
39
|
+
## 💾 Database & Queries
|
|
40
|
+
- ❌ **Transactions**: Are multi-step updates wrapped in transactions? Partial writes corrupt data.
|
|
41
|
+
- ⚠️ **N+1 Queries**: Are loops triggering individual DB calls? (Use `JOIN`, batch loading, or `IN` clause)
|
|
42
|
+
- ⚠️ **Connection Management**: Are DB connections properly closed/returned to pool?
|
|
43
|
+
- ⚠️ **Pagination**: Do list endpoints paginate large datasets? Unbounded queries can OOM.
|
|
44
|
+
- 💡 **Indexing**: Are foreign keys and frequently-queried/filtered columns indexed?
|
|
45
|
+
- 💡 **Query Optimization**: Are slow queries analyzed (EXPLAIN) for missing indexes or full scans?
|
|
46
|
+
- 💡 **Query Limits**: Are queries limited with a ceiling (e.g., `LIMIT 1000`) as a safety net?
|
|
47
|
+
|
|
48
|
+
## ⚡ Performance & Scalability
|
|
49
|
+
- ⚠️ **Timeouts**: Are external API calls wrapped with timeouts? A hanging dependency can cascade.
|
|
50
|
+
- ⚠️ **Rate Limiting**: Are public endpoints protected from abuse/DDoS?
|
|
51
|
+
- 💡 **Caching**: Are expensive or frequently-read queries/responses cached appropriately?
|
|
52
|
+
- 💡 **Lazy Loading**: Are large objects (files, blobs) loaded only when requested?
|
|
53
|
+
- 💡 **Async Processing**: Are long-running tasks offloaded to queues/workers instead of blocking the request?
|
|
54
|
+
|
|
55
|
+
## 🧱 Error Handling & Resilience
|
|
56
|
+
- ⚠️ **Error Handling**: Are errors caught, logged with context, and returned with appropriate HTTP status?
|
|
57
|
+
- ⚠️ **Idempotency**: Can create/update operations be safely retried without side effects? (Important for payment flows, webhooks)
|
|
58
|
+
- 💡 **Graceful Degradation**: Does the service handle dependency failures without cascading?
|
|
59
|
+
- 💡 **Circuit Breakers**: Are failing external services circuit-broken?
|
|
60
|
+
- 💡 **Retry Logic**: Are transient failures retried with exponential backoff and jitter?
|
|
61
|
+
|
|
62
|
+
## 📊 Observability & Monitoring
|
|
63
|
+
- ⚠️ **Logging**: Are errors logged with enough context (`request_id`, `user_id`, `timestamp`)?
|
|
64
|
+
- ⚠️ **Structured Logs**: Are logs in structured format (JSON) for parsing by log aggregators?
|
|
65
|
+
- 💡 **Tracing**: Can requests be traced across services (trace_id/span_id)?
|
|
66
|
+
- 💡 **Health Checks**: Does the service expose `/health` and `/ready` endpoints?
|
|
67
|
+
- 💡 **Metrics**: Are key metrics exposed (latency, error rate, throughput)?
|
|
68
|
+
|
|
69
|
+
## 🔄 Concurrency & State
|
|
70
|
+
- ❌ **Race Conditions**: Are concurrent updates handled? (e.g., optimistic locking, `SELECT ... FOR UPDATE`)
|
|
71
|
+
- ⚠️ **Concurrency Safety**: Is shared state protected (locks/mutex) in async or multi-threaded code?
|
|
72
|
+
- 💡 **Stateless Design**: Is the service stateless for horizontal scaling?
|
|
73
|
+
|
|
74
|
+
## 🧪 Testing
|
|
75
|
+
- ⚠️ **Unit Tests**: Are business logic and edge cases tested?
|
|
76
|
+
- ⚠️ **Error Scenarios**: Are error paths tested (not just happy path)?
|
|
77
|
+
- 💡 **Integration Tests**: Are database and API interactions tested end-to-end?
|
|
78
|
+
- 💡 **Test Isolation**: Do tests use isolated data and clean up after themselves?
|
|
79
|
+
|
|
80
|
+
## 🔄 Migrations & Deployments
|
|
81
|
+
- ❌ **Backward Compatible**: Can old code run with new schema during rolling deployment? Dropping a column that old code still reads causes outages.
|
|
82
|
+
- ⚠️ **Migration Rollback**: Can database migrations be safely rolled back?
|
|
83
|
+
- 💡 **Zero Downtime**: Does the change support rolling deployments?
|
|
84
|
+
- ⚠️ **Breaking API Changes**: Are breaking changes properly versioned with deprecation notices?
|
|
85
|
+
|
|
86
|
+
## 🏗️ Code Structure & Maintainability
|
|
87
|
+
- ⚠️ **Separation of Concerns**: Is business logic separated from routing/controllers?
|
|
88
|
+
- ⚠️ **DRY Principle**: Is duplicated code refactored?
|
|
89
|
+
- 💡 **Magic Numbers**: Are hardcoded values extracted to constants/config?
|
|
90
|
+
- 💡 **Naming Conventions**: Are variables, functions, and classes clearly named?
|
|
91
|
+
|
|
92
|
+
## 📦 Dependencies
|
|
93
|
+
- ⚠️ **Vulnerable Packages**: Are dependencies scanned for known CVEs?
|
|
94
|
+
- 💡 **Version Pinning**: Are dependency versions locked/pinned?
|
|
95
|
+
- 💡 **Unused Dependencies**: Are unused packages removed?
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Frontend Code Review Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when reviewing Web Frontend code (React, Vue, Angular, Svelte, HTML/CSS).
|
|
4
|
+
|
|
5
|
+
> **Severity guide**: Each item is tagged with a default severity. Adjust based on context — a missing error boundary in a settings page is a warning, but in a payment flow it's critical.
|
|
6
|
+
> - ❌ = Critical
|
|
7
|
+
> - ⚠️ = Warning
|
|
8
|
+
> - 💡 = Suggestion
|
|
9
|
+
|
|
10
|
+
## 🛡️ Security (review first)
|
|
11
|
+
- ❌ **XSS Prevention**: Is `dangerouslySetInnerHTML` avoided or input sanitized? Unsanitized user content renders directly into the DOM.
|
|
12
|
+
- ❌ **Sensitive Data Exposure**: Are tokens/passwords stored securely? (not in localStorage for auth tokens — use httpOnly cookies or secure session management)
|
|
13
|
+
- ⚠️ **CSRF Protection**: Are CSRF tokens included in state-changing forms?
|
|
14
|
+
- ⚠️ **Cookie Flags**: Are cookies set with `Secure`, `HttpOnly`, and `SameSite` flags?
|
|
15
|
+
- ⚠️ **Third-Party Scripts**: Are CDN scripts verified with Subresource Integrity (SRI)?
|
|
16
|
+
- 💡 **Content Security Policy**: Is CSP configured to limit script sources?
|
|
17
|
+
|
|
18
|
+
## 🚨 Error Handling
|
|
19
|
+
- ❌ **Error Boundaries**: Are error boundaries in place to catch component crashes? An uncaught error in a child component can take down the entire app.
|
|
20
|
+
- ⚠️ **Fallback UI**: Is there graceful fallback for error states?
|
|
21
|
+
- ⚠️ **Network Errors**: Are API failures handled with user-facing feedback and retry/fallback?
|
|
22
|
+
- ⚠️ **Form Validation**: Are validation errors clearly displayed near the relevant fields?
|
|
23
|
+
- 💡 **Error Messages**: Are messages user-friendly (not raw error objects or stack traces)?
|
|
24
|
+
|
|
25
|
+
## 🧩 Component Architecture
|
|
26
|
+
- ⚠️ **Component Size**: Are components too large (>200 lines)? Should they be split?
|
|
27
|
+
- ⚠️ **Single Responsibility**: Does each component do one thing well?
|
|
28
|
+
- ⚠️ **Prop Drilling**: Are props passed through many levels? (Consider context/state management)
|
|
29
|
+
- 💡 **Reusability**: Are common patterns extracted to shared components?
|
|
30
|
+
|
|
31
|
+
## 🗄️ State Management
|
|
32
|
+
- ❌ **Effect Cleanups**: Do `useEffect` hooks clean up listeners/timers/subscriptions? Missing cleanups cause memory leaks and stale state bugs.
|
|
33
|
+
- ⚠️ **State Location**: Is state at the right level (not too high, not too low)?
|
|
34
|
+
- ⚠️ **Derived State**: Is redundant state avoided (computed from existing state)?
|
|
35
|
+
- ⚠️ **State Updates**: Are state updates immutable?
|
|
36
|
+
- 💡 **Global State**: Is global state (Redux/Zustand/Context) used only when needed?
|
|
37
|
+
|
|
38
|
+
## ⚡ Performance & Rendering
|
|
39
|
+
- ⚠️ **Re-renders**: Are components re-rendering unnecessarily? (Check `useCallback`/`useMemo` in React, `computed` in Vue)
|
|
40
|
+
- ⚠️ **Bundle Size**: Are large libraries imported efficiently? (`import map from 'lodash/map'` vs `import _ from 'lodash'`)
|
|
41
|
+
- ⚠️ **Race Conditions**: Are stale requests cancelled (AbortController) to prevent rendering outdated data?
|
|
42
|
+
- 💡 **Image Optimization**: Are images lazy-loaded with explicit dimensions (prevent CLS)?
|
|
43
|
+
- 💡 **List Virtualization**: Are long lists (>100 items) virtualized?
|
|
44
|
+
- 💡 **Code Splitting**: Are routes and large components code-split?
|
|
45
|
+
- 💡 **Memoization**: Are expensive computations memoized?
|
|
46
|
+
|
|
47
|
+
## ⏳ Loading & Async States
|
|
48
|
+
- ⚠️ **Loading Indicators**: Are loading states shown for async operations?
|
|
49
|
+
- ⚠️ **Optimistic Updates**: Are UI updates optimistic where appropriate?
|
|
50
|
+
- 💡 **Skeleton Screens**: Are skeleton loaders used instead of spinners for better UX?
|
|
51
|
+
- 💡 **Suspense / Streaming**: Is React Suspense, Vue async components, or framework streaming used appropriately?
|
|
52
|
+
|
|
53
|
+
## 📝 Forms & User Input
|
|
54
|
+
- ⚠️ **Controlled Components**: Are form inputs properly controlled?
|
|
55
|
+
- ⚠️ **Validation**: Is client-side validation implemented for required fields and formats?
|
|
56
|
+
- ⚠️ **Submit Protection**: Are submit buttons disabled during API calls to prevent double submission?
|
|
57
|
+
- 💡 **Debouncing**: Are expensive operations (search, API calls) debounced/throttled?
|
|
58
|
+
- 💡 **Success Feedback**: Is user notified of successful actions?
|
|
59
|
+
|
|
60
|
+
## 🔄 Data & API Integration
|
|
61
|
+
- ⚠️ **Error States**: Are API errors caught and displayed to user?
|
|
62
|
+
- ⚠️ **Request Cancellation**: Are pending requests cancelled on unmount?
|
|
63
|
+
- 💡 **Caching**: Are API responses cached (React Query, SWR, Apollo) to avoid redundant requests?
|
|
64
|
+
- 💡 **Retry Logic**: Are failed requests retried with backoff?
|
|
65
|
+
|
|
66
|
+
## 📱 Responsiveness & CSS
|
|
67
|
+
- ⚠️ **Mobile Support**: Does the layout work on small screens (320px+)?
|
|
68
|
+
- ⚠️ **Design Tokens**: Are CSS variables/design tokens used instead of hardcoded values?
|
|
69
|
+
- 💡 **Touch Targets**: Are interactive elements at least 44x44px?
|
|
70
|
+
- 💡 **Animations**: Are animations performant (use `transform`/`opacity`, avoid layout thrashing)?
|
|
71
|
+
- 💡 **Dark Mode**: Is dark mode support considered?
|
|
72
|
+
|
|
73
|
+
## ♿ Accessibility (a11y)
|
|
74
|
+
- ⚠️ **Semantic HTML**: Are proper elements used (`<button>`, `<nav>`, `<main>`, not `<div>` for everything)?
|
|
75
|
+
- ⚠️ **Alt Text**: Do all images have meaningful `alt` attributes?
|
|
76
|
+
- ⚠️ **Keyboard Navigation**: Are interactive elements reachable via Tab?
|
|
77
|
+
- ⚠️ **Focus Indicators**: Are focus styles visible (not `outline: none` without replacement)?
|
|
78
|
+
- 💡 **Color Contrast**: Does text meet WCAG contrast ratios (4.5:1 for normal text)?
|
|
79
|
+
- 💡 **ARIA Labels**: Are ARIA labels used where native semantics are insufficient?
|
|
80
|
+
- 💡 **Heading Hierarchy**: Are headings (h1-h6) used in logical order?
|
|
81
|
+
|
|
82
|
+
## 🔒 Type Safety
|
|
83
|
+
- ⚠️ **TypeScript**: Are types defined for props, state, and functions?
|
|
84
|
+
- ⚠️ **Any Types**: Is `any` avoided? (use `unknown` or proper types)
|
|
85
|
+
- ⚠️ **Null Checks**: Are nullable values properly handled?
|
|
86
|
+
- 💡 **Type Inference**: Are types inferred where possible (avoid redundant annotations)?
|
|
87
|
+
|
|
88
|
+
## 🧪 Testing & Quality
|
|
89
|
+
- ⚠️ **Unit Tests**: Are components tested for key behaviors?
|
|
90
|
+
- ⚠️ **Test IDs**: Are `data-testid` attributes added for E2E testing?
|
|
91
|
+
- 💡 **Accessibility Tests**: Are a11y rules tested (jest-axe, testing-library)?
|
|
92
|
+
- 💡 **Edge Cases**: Are loading/error states tested?
|
|
93
|
+
|
|
94
|
+
## 🏗️ Code Quality
|
|
95
|
+
- ⚠️ **Console Logs**: Are debug `console.log` statements removed?
|
|
96
|
+
- ⚠️ **DRY Principle**: Is duplicated code refactored?
|
|
97
|
+
- 💡 **Magic Numbers**: Are hardcoded values extracted to constants?
|
|
98
|
+
- 💡 **Naming Conventions**: Are variables, functions, and components clearly named?
|
|
99
|
+
|
|
100
|
+
## 🔍 SEO & Meta (if applicable)
|
|
101
|
+
- 💡 **Meta Tags**: Are title, description, and Open Graph tags set?
|
|
102
|
+
- 💡 **Semantic HTML**: Are heading tags used hierarchically?
|
|
103
|
+
- 💡 **Canonical URLs**: Are canonical tags set for duplicate content?
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Mobile Code Review Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when reviewing iOS (Swift/SwiftUI) or Android (Kotlin/Jetpack Compose) code.
|
|
4
|
+
|
|
5
|
+
> **Severity guide**: Each item is tagged with a default severity. Adjust based on context — a missing loading indicator on a debug screen is a suggestion, but on a checkout flow it's a warning.
|
|
6
|
+
> - ❌ = Critical
|
|
7
|
+
> - ⚠️ = Warning
|
|
8
|
+
> - 💡 = Suggestion
|
|
9
|
+
|
|
10
|
+
## 🔒 Security (review first)
|
|
11
|
+
- ❌ **No Hardcoded Secrets**: Are API keys, tokens, and credentials stored in config/env — not committed in source code?
|
|
12
|
+
- ❌ **Secure Storage**: Are sensitive credentials stored in Keychain (iOS) or Android Keystore — not SharedPreferences/UserDefaults?
|
|
13
|
+
- ❌ **Deep Link Validation**: Are deep link parameters validated and sanitized to prevent injection attacks?
|
|
14
|
+
- ⚠️ **Certificate Pinning**: Is SSL pinning implemented for sensitive API calls?
|
|
15
|
+
- ⚠️ **Biometric Auth**: Is biometric authentication implemented with proper fallback (passcode)?
|
|
16
|
+
- 💡 **Root/Jailbreak Detection**: Is rooted/jailbroken device detection implemented for sensitive flows?
|
|
17
|
+
- 💡 **Screenshot Protection**: Is sensitive data hidden when app enters background (recent apps view)?
|
|
18
|
+
- 💡 **Code Obfuscation**: Is ProGuard/R8 (Android) enabled for release builds?
|
|
19
|
+
|
|
20
|
+
## 📱 Threading & Lifecycle
|
|
21
|
+
- ❌ **Main Thread Safety**: Is heavy work (DB, network, computation, image processing) off the UI thread? Main-thread blocking causes ANRs (Android) and UI freezes (iOS).
|
|
22
|
+
- ❌ **Lifecycle Cleanup**: Are observers, listeners, and subscriptions removed in `onDestroy`/`onDisappear`/`deinit`? Leaking these causes crashes and ghost updates.
|
|
23
|
+
- ⚠️ **Memory Management**: Are strong reference cycles avoided in closures/listeners? (Use `[weak self]` in Swift, `WeakReference` in Kotlin)
|
|
24
|
+
- ⚠️ **Configuration Changes**: Are configuration changes (rotation, dark mode, locale) handled without data loss?
|
|
25
|
+
- ⚠️ **State Restoration**: Is state saved/restored correctly on process death?
|
|
26
|
+
- 💡 **Permissions**: Are runtime permissions requested at appropriate times with clear explanation?
|
|
27
|
+
|
|
28
|
+
## 🌐 Networking
|
|
29
|
+
- ⚠️ **Timeout Configuration**: Are network requests configured with explicit timeouts?
|
|
30
|
+
- ⚠️ **Error Handling**: Are network errors handled gracefully with user-friendly messages?
|
|
31
|
+
- ⚠️ **Offline Mode**: Does the app handle "No Internet" states without crashing?
|
|
32
|
+
- ⚠️ **Request Cancellation**: Are pending requests cancelled when leaving the screen?
|
|
33
|
+
- 💡 **Retry Logic**: Are failed requests retried with exponential backoff?
|
|
34
|
+
- 💡 **Response Validation**: Are API responses validated before use (null checks, type validation)?
|
|
35
|
+
- 💡 **Network Reachability**: Is network status checked before making API calls?
|
|
36
|
+
|
|
37
|
+
## 💾 Memory & Resources
|
|
38
|
+
- ❌ **Memory Leaks**: Are retain cycles (iOS closures) and context leaks (Android activities in singletons) avoided?
|
|
39
|
+
- ⚠️ **Image Handling**: Are bitmaps scaled/compressed before loading into memory? Full-resolution images in lists cause OOM.
|
|
40
|
+
- ⚠️ **Image Caching**: Are images cached appropriately (Glide/Coil for Android, SDWebImage/Kingfisher for iOS)?
|
|
41
|
+
- 💡 **Resource Files**: Are strings, colors, and dimensions in resource files (not hardcoded)?
|
|
42
|
+
- 💡 **Memory Warnings**: Are memory warnings handled (iOS `didReceiveMemoryWarning`)?
|
|
43
|
+
|
|
44
|
+
## ⚡ Performance
|
|
45
|
+
- ⚠️ **List Recycling**: Are RecyclerView (Android) / LazyColumn (Compose) / List (SwiftUI) used for scrollable lists?
|
|
46
|
+
- ⚠️ **Lazy Loading**: Are heavy resources loaded only when needed?
|
|
47
|
+
- 💡 **App Launch Time**: Is cold start optimized? (Defer non-essential initialization)
|
|
48
|
+
- 💡 **Smooth Animations**: Are animations smooth (avoid layout passes during animation)?
|
|
49
|
+
- 💡 **Background Work**: Is WorkManager (Android) or BGTaskScheduler (iOS) used for background tasks?
|
|
50
|
+
- 💡 **App Size**: Are unused resources and large assets optimized?
|
|
51
|
+
|
|
52
|
+
## 🧭 Navigation & Architecture
|
|
53
|
+
- ⚠️ **Navigation Patterns**: Is navigation consistent? (Navigation Component / Compose Navigation on Android, NavigationStack / Coordinator on iOS)
|
|
54
|
+
- ⚠️ **Back Stack**: Is back navigation handled properly without stack corruption?
|
|
55
|
+
- ⚠️ **Architecture Pattern**: Is MVVM / MVI followed consistently? Business logic should not live in Views.
|
|
56
|
+
- 💡 **Dependency Injection**: Are dependencies injected (Hilt/Koin for Android, manual DI or Swinject for iOS)?
|
|
57
|
+
- 💡 **Deep Linking**: Do deep links route to the correct screens?
|
|
58
|
+
|
|
59
|
+
## 📱 UI/UX
|
|
60
|
+
- ⚠️ **Safe Areas**: Does content respect notches, dynamic islands, and status bars?
|
|
61
|
+
- ⚠️ **Loading States**: Are loading indicators shown for async operations?
|
|
62
|
+
- ⚠️ **Error States**: Are error messages user-friendly with retry options?
|
|
63
|
+
- ⚠️ **Keyboard Handling**: Does the keyboard not cover input fields? (Insets, scroll adjustment)
|
|
64
|
+
- 💡 **Touch Feedback**: Do interactive elements show visual feedback when pressed?
|
|
65
|
+
- 💡 **Empty States**: Are empty states designed with helpful messages?
|
|
66
|
+
- 💡 **Pull to Refresh**: Is pull-to-refresh implemented where appropriate?
|
|
67
|
+
|
|
68
|
+
## ♿ Accessibility
|
|
69
|
+
- ⚠️ **Screen Reader**: Is content accessible to VoiceOver (iOS) / TalkBack (Android)?
|
|
70
|
+
- ⚠️ **Content Descriptions**: Do images/icons have content descriptions?
|
|
71
|
+
- ⚠️ **Touch Targets**: Are touch targets at least 44x44 points?
|
|
72
|
+
- 💡 **Font Scaling**: Does UI support dynamic font sizes?
|
|
73
|
+
- 💡 **Color Contrast**: Does text meet WCAG contrast requirements?
|
|
74
|
+
|
|
75
|
+
## 🌍 Localization
|
|
76
|
+
- ⚠️ **Hardcoded Strings**: Are all user-facing strings in resource files (Localizable.strings / strings.xml)?
|
|
77
|
+
- 💡 **RTL Support**: Does layout support right-to-left languages?
|
|
78
|
+
- 💡 **Date/Number Formatting**: Are dates/numbers formatted for locale?
|
|
79
|
+
- 💡 **Plurals**: Are plural strings handled correctly?
|
|
80
|
+
|
|
81
|
+
## 💾 Data Persistence
|
|
82
|
+
- ⚠️ **Database**: Is Room (Android) or Core Data / SwiftData (iOS) used correctly?
|
|
83
|
+
- ⚠️ **Migrations**: Are database migrations handled safely without data loss?
|
|
84
|
+
- 💡 **Cache Management**: Is cached data invalidated when stale?
|
|
85
|
+
- 💡 **Preferences**: Are SharedPreferences/UserDefaults used only for simple key-value data?
|
|
86
|
+
|
|
87
|
+
## 🧪 Testing
|
|
88
|
+
- ⚠️ **Unit Tests**: Are business logic and ViewModels tested?
|
|
89
|
+
- 💡 **UI Tests**: Are critical user flows tested (Espresso/Compose Testing / XCUITest)?
|
|
90
|
+
- 💡 **Mock Data**: Are network calls mocked for testing?
|
|
91
|
+
- 💡 **Edge Cases**: Are error states and edge cases tested?
|
|
92
|
+
|
|
93
|
+
## 📊 Analytics & Monitoring
|
|
94
|
+
- ⚠️ **Crash Reporting**: Is crash reporting configured (Firebase Crashlytics / Sentry)?
|
|
95
|
+
- 💡 **Analytics Events**: Are key user actions tracked?
|
|
96
|
+
- 💡 **Performance Monitoring**: Is app performance monitored (launch time, screen load)?
|
|
97
|
+
- 💡 **ANR Detection**: Are ANRs monitored (Android)?
|
|
98
|
+
|
|
99
|
+
## 🏗️ Code Quality
|
|
100
|
+
- ⚠️ **Naming Conventions**: Are classes, functions, and variables clearly named per platform conventions?
|
|
101
|
+
- ⚠️ **DRY Principle**: Is duplicated code refactored?
|
|
102
|
+
- ⚠️ **Deprecated APIs**: Are deprecated APIs replaced with modern alternatives?
|
|
103
|
+
- 💡 **Magic Numbers**: Are hardcoded values extracted to constants?
|
|
104
|
+
|
|
105
|
+
## 🛠️ Build & CI/CD
|
|
106
|
+
- ⚠️ **Signing**: Are signing configs secure (not committed to repo)?
|
|
107
|
+
- 💡 **Build Variants**: Are debug/release builds configured properly?
|
|
108
|
+
- 💡 **Version Code/Number**: Are version codes incremented?
|