ai-dev-starter 0.0.0-stage → 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/LICENSE +35 -0
- package/README.md +383 -2
- package/adapters/antigravity/AGENTS.md +59 -0
- package/adapters/antigravity/skills/architecture-review/SKILL.md +33 -0
- package/adapters/antigravity/skills/bug-fix/SKILL.md +36 -0
- package/adapters/antigravity/skills/code-review/SKILL.md +34 -0
- package/adapters/antigravity/skills/feature-development/SKILL.md +37 -0
- package/adapters/antigravity/skills/performance-audit/SKILL.md +34 -0
- package/adapters/antigravity/skills/refactor/SKILL.md +35 -0
- package/adapters/antigravity/skills/security-audit/SKILL.md +35 -0
- package/adapters/antigravity/skills/test-generation/SKILL.md +34 -0
- package/adapters/cursor/bug-fix.mdc +38 -0
- package/adapters/cursor/code-review.mdc +56 -0
- package/adapters/cursor/core-rules.mdc +49 -0
- package/adapters/cursor/feature-development.mdc +31 -0
- package/adapters/cursor/performance-arch-tests.mdc +57 -0
- package/adapters/cursor/refactor-and-security.mdc +50 -0
- package/bin/ai-dev-starter.js +2 -0
- package/core/agent-principles.md +96 -0
- package/core/git-analysis.md +150 -0
- package/core/review-methodology.md +154 -0
- package/core/safety-policy.md +70 -0
- package/core/severity-levels.md +104 -0
- package/package.json +40 -4
- package/scripts/ai-dev-starter.js +709 -0
- package/scripts/detector.js +405 -0
- package/standards/backend.md +84 -0
- package/standards/database.md +100 -0
- package/standards/frontend.md +81 -0
- package/standards/security.md +84 -0
- package/standards/testing.md +132 -0
- package/templates/architecture-decision.md +92 -0
- package/templates/project-context.md +144 -0
- package/templates/review-report.md +102 -0
- package/workflows/architecture-review.md +186 -0
- package/workflows/bug-fix.md +149 -0
- package/workflows/code-review.md +189 -0
- package/workflows/feature-development.md +154 -0
- package/workflows/performance-audit.md +169 -0
- package/workflows/refactor.md +128 -0
- package/workflows/security-audit.md +164 -0
- package/workflows/test-generation.md +168 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Code Review Methodology
|
|
2
|
+
|
|
3
|
+
> **Scope:** Core reference — loaded by the Code Review workflow.
|
|
4
|
+
> **Source:** Adapted from PR-Agent (Qodo / The-PR-Agent, MIT License) for IDE-native use.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Philosophy
|
|
9
|
+
|
|
10
|
+
Effective code review is:
|
|
11
|
+
- **Diff-centric:** Focus on what changed, not the entire codebase.
|
|
12
|
+
- **Evidence-based:** Every finding must cite specific code.
|
|
13
|
+
- **Prioritized:** Not all issues are equal. Distinguish critical from cosmetic.
|
|
14
|
+
- **Actionable:** Every finding must suggest a concrete fix.
|
|
15
|
+
- **Conservative:** When uncertain, ask rather than fabricate.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Review Dimensions
|
|
20
|
+
|
|
21
|
+
Inspect each changed file along these dimensions, in priority order:
|
|
22
|
+
|
|
23
|
+
### Dimension 1 — Correctness and Business Logic
|
|
24
|
+
- Does the code do what the commit message, PR description, or task requires?
|
|
25
|
+
- Are there off-by-one errors, wrong operators, or inverted conditions?
|
|
26
|
+
- Are null / undefined / empty values handled?
|
|
27
|
+
- Are error paths handled correctly?
|
|
28
|
+
- Are return values checked?
|
|
29
|
+
|
|
30
|
+
### Dimension 2 — Security
|
|
31
|
+
- Injection vulnerabilities (SQL, command, XSS, SSTI).
|
|
32
|
+
- Authentication and authorization gaps (missing checks, privilege escalation).
|
|
33
|
+
- Sensitive data exposure (logs, error messages, API responses).
|
|
34
|
+
- Insecure deserialization or file handling.
|
|
35
|
+
- Unsafe use of `eval`, `exec`, `shell_exec`, `system`.
|
|
36
|
+
- Missing CSRF protection on state-changing endpoints.
|
|
37
|
+
- Hardcoded credentials or secrets.
|
|
38
|
+
|
|
39
|
+
### Dimension 3 — Data Integrity
|
|
40
|
+
- Database transactions wrapping multi-step operations.
|
|
41
|
+
- Race conditions and concurrency issues.
|
|
42
|
+
- Missing foreign key constraints or on-delete behavior.
|
|
43
|
+
- Unsafe mass assignment.
|
|
44
|
+
- Migration reversibility.
|
|
45
|
+
|
|
46
|
+
### Dimension 4 — Performance
|
|
47
|
+
- N+1 queries (loop containing a database call).
|
|
48
|
+
- Missing indexes for new query patterns.
|
|
49
|
+
- Unbounded queries (missing LIMIT on user-controlled input).
|
|
50
|
+
- Synchronous blocking operations in async contexts.
|
|
51
|
+
- Large payload responses without pagination.
|
|
52
|
+
|
|
53
|
+
### Dimension 5 — Architecture
|
|
54
|
+
- Does the change respect existing layer boundaries?
|
|
55
|
+
- Is business logic leaking into controllers, views, or routes?
|
|
56
|
+
- Are dependencies introduced cleanly (not bypassing interfaces)?
|
|
57
|
+
- Is coupling increased unnecessarily?
|
|
58
|
+
|
|
59
|
+
### Dimension 6 — Testability and Coverage
|
|
60
|
+
- Does the change have unit or integration tests?
|
|
61
|
+
- Are critical branches covered?
|
|
62
|
+
- Are edge cases tested?
|
|
63
|
+
- Do existing tests still pass with the change?
|
|
64
|
+
|
|
65
|
+
### Dimension 7 — Code Quality
|
|
66
|
+
- Is the code readable and self-documenting?
|
|
67
|
+
- Are magic numbers or strings explained?
|
|
68
|
+
- Is complexity appropriate?
|
|
69
|
+
- Note: Flag quality issues as P3 (Low). Do not spend significant review effort on style.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Verification Before Reporting
|
|
74
|
+
|
|
75
|
+
For every candidate finding:
|
|
76
|
+
|
|
77
|
+
1. **Re-read** the relevant code section.
|
|
78
|
+
2. **Check** whether the issue is in the new code (diff) or pre-existing.
|
|
79
|
+
3. **Trace** the execution path that produces the problem.
|
|
80
|
+
4. **Search** for mitigating factors (middleware, validators, tests).
|
|
81
|
+
5. **Confirm** the finding is realistic, not theoretical.
|
|
82
|
+
|
|
83
|
+
If you cannot complete steps 3–5 with concrete evidence, downgrade the finding or discard it.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Finding Format
|
|
88
|
+
|
|
89
|
+
Each finding must follow this structure:
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
### [SEVERITY] Short description
|
|
93
|
+
|
|
94
|
+
**File:** `path/to/file.ext`
|
|
95
|
+
**Line:** 42 (or range 42–55)
|
|
96
|
+
|
|
97
|
+
**Problem:**
|
|
98
|
+
One or two sentences describing the specific defect.
|
|
99
|
+
|
|
100
|
+
**Evidence:**
|
|
101
|
+
```language
|
|
102
|
+
// The specific code that is problematic
|
|
103
|
+
relevant_code_here
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Impact:**
|
|
107
|
+
Realistic description of what could happen if this is not fixed.
|
|
108
|
+
Avoid "could potentially maybe" language. If impact is uncertain, say so.
|
|
109
|
+
|
|
110
|
+
**Fix:**
|
|
111
|
+
Concrete suggestion. Code snippet if helpful.
|
|
112
|
+
|
|
113
|
+
**Verification:**
|
|
114
|
+
How to confirm the fix works (test command, manual step, etc.).
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Summary Report Structure
|
|
120
|
+
|
|
121
|
+
```markdown
|
|
122
|
+
## Review Summary
|
|
123
|
+
|
|
124
|
+
**Branch:** feature/xyz → main
|
|
125
|
+
**Files changed:** N
|
|
126
|
+
**Commits reviewed:** M
|
|
127
|
+
|
|
128
|
+
### Findings by Severity
|
|
129
|
+
| Severity | Count |
|
|
130
|
+
|----------|-------|
|
|
131
|
+
| P0 Critical | 0 |
|
|
132
|
+
| P1 High | 2 |
|
|
133
|
+
| P2 Medium | 3 |
|
|
134
|
+
| P3 Low | 4 |
|
|
135
|
+
|
|
136
|
+
### Walkthrough
|
|
137
|
+
<2–4 sentence summary of what this change does>
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Findings
|
|
142
|
+
|
|
143
|
+
<findings ordered P0 → P3>
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Observations
|
|
148
|
+
<pre-existing issues noticed but outside diff scope>
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Positive Notes
|
|
153
|
+
<what was done well — optional but encouraged>
|
|
154
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Safety Policy
|
|
2
|
+
|
|
3
|
+
> **Scope:** Universal — applies to every workflow and IDE.
|
|
4
|
+
> **Trigger:** Always loaded alongside agent-principles.md.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Destructive Action Protocol
|
|
9
|
+
|
|
10
|
+
Before executing any action that is **irreversible or high-risk**, you must:
|
|
11
|
+
|
|
12
|
+
1. **Identify** the action as destructive (see classification below).
|
|
13
|
+
2. **State** clearly what you are about to do, what files or data will be affected.
|
|
14
|
+
3. **Request explicit approval** using language such as:
|
|
15
|
+
> "This action will delete X. Please confirm by typing 'yes, proceed'."
|
|
16
|
+
4. **Wait** for the user's written confirmation before proceeding.
|
|
17
|
+
5. **Abort** if confirmation is ambiguous or absent.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Destructive Action Classification
|
|
22
|
+
|
|
23
|
+
### Always Requires Confirmation
|
|
24
|
+
- Deleting files or directories.
|
|
25
|
+
- Dropping database tables, collections, or indexes.
|
|
26
|
+
- Running `git reset --hard`, `git clean -fd`, or similar destructive Git commands.
|
|
27
|
+
- Overwriting a file that the user may have modified manually.
|
|
28
|
+
- Running `rm`, `rmdir`, `del`, or equivalent destructive shell commands.
|
|
29
|
+
- Disabling or removing authentication or authorization checks.
|
|
30
|
+
- Modifying production environment variables or secrets.
|
|
31
|
+
|
|
32
|
+
### Requires Scope Confirmation
|
|
33
|
+
- Making changes to more than 5 files in a single operation.
|
|
34
|
+
- Modifying CI/CD pipeline definitions.
|
|
35
|
+
- Changing database migration files after they have been applied.
|
|
36
|
+
- Altering shared library code that affects multiple services.
|
|
37
|
+
|
|
38
|
+
### Never Permitted (No Override)
|
|
39
|
+
- Automatically pushing to `main`, `master`, `production`, or `release` branches.
|
|
40
|
+
- Automatically merging pull requests.
|
|
41
|
+
- Executing deployment commands.
|
|
42
|
+
- Accessing or logging credentials, tokens, or private keys.
|
|
43
|
+
- Making HTTP requests to external services without user awareness.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Credential Safety
|
|
48
|
+
|
|
49
|
+
- Never read `.env`, `*.key`, `*.pem`, `secrets.yaml`, or similar files for any reason other than confirming their existence.
|
|
50
|
+
- Never print, log, or include credential values in reports or responses.
|
|
51
|
+
- When referencing configuration that contains credentials, refer only to the key name, not the value.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Conflict Detection
|
|
56
|
+
|
|
57
|
+
When the installation CLI detects that a target file already exists and may have been user-modified:
|
|
58
|
+
1. Show a diff between the existing file and the new version.
|
|
59
|
+
2. Ask the user to choose: `keep`, `overwrite`, `merge`, or `skip`.
|
|
60
|
+
3. Never silently overwrite.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Audit Trail
|
|
65
|
+
|
|
66
|
+
For every file modified during an implementation workflow, the agent must:
|
|
67
|
+
- State the file path.
|
|
68
|
+
- State the nature of the change (added / modified / deleted).
|
|
69
|
+
- State the reason for the change.
|
|
70
|
+
- Not proceed to the next file until the current change is confirmed or the user has acknowledged the plan.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Severity Classification
|
|
2
|
+
|
|
3
|
+
> **Scope:** Universal — used by all review and audit workflows.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Severity Levels
|
|
8
|
+
|
|
9
|
+
### P0 — Critical
|
|
10
|
+
|
|
11
|
+
**Definition:** The issue will cause data loss, security breach, service outage, or financial loss in production under normal or near-normal usage. Requires immediate attention before merge.
|
|
12
|
+
|
|
13
|
+
**Characteristics:**
|
|
14
|
+
- Exploitable without special access or knowledge.
|
|
15
|
+
- Data corruption or exposure of sensitive user information.
|
|
16
|
+
- Authentication bypass or privilege escalation.
|
|
17
|
+
- Production crash under expected load.
|
|
18
|
+
- Irreversible data deletion triggered by common operations.
|
|
19
|
+
|
|
20
|
+
**Examples:**
|
|
21
|
+
- SQL injection in a user-facing query.
|
|
22
|
+
- Password stored in plaintext.
|
|
23
|
+
- Missing authorization check on an admin endpoint.
|
|
24
|
+
- Division by zero in payment calculation.
|
|
25
|
+
- Database write without transaction in a critical multi-step operation.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### P1 — High
|
|
30
|
+
|
|
31
|
+
**Definition:** The issue causes incorrect behavior, significant security weakness, or degraded reliability. Likely to impact users or data correctness. Must be fixed before merge unless risk is explicitly accepted.
|
|
32
|
+
|
|
33
|
+
**Characteristics:**
|
|
34
|
+
- Incorrect business logic that affects real users.
|
|
35
|
+
- Security weakness requiring non-trivial exploitation.
|
|
36
|
+
- Data integrity risk under moderate load or concurrency.
|
|
37
|
+
- Unhandled error that causes visible failure to users.
|
|
38
|
+
|
|
39
|
+
**Examples:**
|
|
40
|
+
- N+1 query that will cause timeout at production scale.
|
|
41
|
+
- Missing CSRF protection on a state-changing form.
|
|
42
|
+
- Race condition in inventory or booking logic.
|
|
43
|
+
- Sensitive data included in API response unnecessarily.
|
|
44
|
+
- Exception swallowed silently, hiding errors.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### P2 — Medium
|
|
49
|
+
|
|
50
|
+
**Definition:** The issue degrades quality, maintainability, or reliability without immediate user impact. Should be fixed in this PR or tracked in a follow-up task.
|
|
51
|
+
|
|
52
|
+
**Characteristics:**
|
|
53
|
+
- Logic that works now but is fragile or will fail under edge cases.
|
|
54
|
+
- Missing error handling that may surface under unusual conditions.
|
|
55
|
+
- Performance issue that is not yet bottlenecking but will under growth.
|
|
56
|
+
- Code that violates architectural patterns in a way that creates technical debt.
|
|
57
|
+
|
|
58
|
+
**Examples:**
|
|
59
|
+
- Missing input validation on a non-critical field.
|
|
60
|
+
- Hardcoded configuration value that should be an environment variable.
|
|
61
|
+
- Missing index for a new query pattern on a small-but-growing table.
|
|
62
|
+
- Function exceeding 60 lines doing multiple things.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### P3 — Low
|
|
67
|
+
|
|
68
|
+
**Definition:** Minor quality, style, or documentation issue. No functional impact. Consider fixing as a habit.
|
|
69
|
+
|
|
70
|
+
**Characteristics:**
|
|
71
|
+
- Code style inconsistency.
|
|
72
|
+
- Unhelpful variable names.
|
|
73
|
+
- Missing docblock on a public method.
|
|
74
|
+
- Redundant code with no behavioral effect.
|
|
75
|
+
- Typos in comments or strings.
|
|
76
|
+
|
|
77
|
+
**Examples:**
|
|
78
|
+
- Variable named `$temp` or `$data` without context.
|
|
79
|
+
- Missing return type declaration.
|
|
80
|
+
- Commented-out code left in without explanation.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Severity Assignment Rules
|
|
85
|
+
|
|
86
|
+
1. **Default to lower severity** when evidence is incomplete.
|
|
87
|
+
2. **Upgrade to higher severity** only when you can demonstrate a concrete exploit or failure path.
|
|
88
|
+
3. **Security issues start at P1** unless they are trivially unexploitable, in which case P2.
|
|
89
|
+
4. **Data loss issues are always P0.**
|
|
90
|
+
5. **Style and naming issues are always P3.**
|
|
91
|
+
6. **Never report a P0 or P1 without code-level evidence.**
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Effort Estimates (Optional in Reports)
|
|
96
|
+
|
|
97
|
+
Optionally classify fixes by implementation effort:
|
|
98
|
+
|
|
99
|
+
| Label | Meaning |
|
|
100
|
+
|-------|---------|
|
|
101
|
+
| `XS` | 1–5 minutes, one-liner fix |
|
|
102
|
+
| `S` | 15–30 minutes, small change |
|
|
103
|
+
| `M` | 1–4 hours, moderate refactor |
|
|
104
|
+
| `L` | Half a day or more, requires planning |
|
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-dev-starter",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Universal AI Development Starter Kit for Google Antigravity, Cursor, and modern AI coding IDEs. Production-quality workflows for code review, bug fixing, refactoring, and security auditing without separate LLM API keys.",
|
|
5
|
+
"main": "scripts/ai-dev-starter.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ai-dev-starter": "bin/ai-dev-starter.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"core",
|
|
11
|
+
"workflows",
|
|
12
|
+
"standards",
|
|
13
|
+
"adapters",
|
|
14
|
+
"templates",
|
|
15
|
+
"scripts",
|
|
16
|
+
"bin",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18.0.0"
|
|
22
|
+
},
|
|
23
|
+
"preferGlobal": true,
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "node tests/test-installer.js"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"antigravity",
|
|
29
|
+
"cursor",
|
|
30
|
+
"ai-agent",
|
|
31
|
+
"agent-skills",
|
|
32
|
+
"skills",
|
|
33
|
+
"code-review",
|
|
34
|
+
"pr-agent",
|
|
35
|
+
"vibe-coding",
|
|
36
|
+
"workflows",
|
|
37
|
+
"security-audit",
|
|
38
|
+
"developer-experience"
|
|
39
|
+
],
|
|
40
|
+
"author": "AI Dev Starter Contributors",
|
|
41
|
+
"license": "MIT"
|
|
42
|
+
}
|