antigravity-ai-kit 3.6.0 → 3.9.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/.agent/CheatSheet.md +51 -16
- package/.agent/README.md +4 -4
- package/.agent/agents/README.md +8 -1
- package/.agent/agents/pr-reviewer.md +259 -0
- package/.agent/checklists/README.md +2 -1
- package/.agent/checklists/pre-commit.md +1 -1
- package/.agent/checklists/session-end.md +1 -1
- package/.agent/checklists/session-start.md +1 -1
- package/.agent/checklists/task-complete.md +1 -1
- package/.agent/commands/README.md +130 -119
- package/.agent/commands/help.md +36 -19
- package/.agent/commands/pr-describe.md +65 -0
- package/.agent/commands/pr-fix.md +45 -0
- package/.agent/commands/pr-merge.md +45 -0
- package/.agent/commands/pr-review.md +50 -0
- package/.agent/commands/pr-split.md +54 -0
- package/.agent/commands/pr-status.md +56 -0
- package/.agent/commands/pr.md +58 -30
- package/.agent/engine/loading-rules.json +5 -0
- package/.agent/hooks/README.md +9 -5
- package/.agent/manifest.json +47 -6
- package/.agent/rules/agent-upgrade-policy.md +56 -0
- package/.agent/session-context.md +1 -1
- package/.agent/skills/README.md +6 -3
- package/.agent/skills/pr-toolkit/SKILL.md +467 -0
- package/.agent/skills/production-readiness/SKILL.md +272 -0
- package/.agent/workflows/README.md +14 -6
- package/.agent/workflows/deploy.md +3 -1
- package/.agent/workflows/pr-fix.md +305 -0
- package/.agent/workflows/pr-merge.md +242 -0
- package/.agent/workflows/pr-review.md +312 -0
- package/.agent/workflows/pr-split.md +263 -0
- package/.agent/workflows/pr.md +118 -28
- package/.agent/workflows/preflight.md +225 -0
- package/.agent/workflows/review.md +1 -1
- package/.agent/workflows/upgrade.md +196 -0
- package/README.md +51 -36
- package/package.json +2 -2
package/.agent/CheatSheet.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Antigravity AI Kit — CheatSheet
|
|
2
2
|
|
|
3
|
-
> **Version**: v3.
|
|
3
|
+
> **Version**: v3.9.0 | **Quick Reference** for all capabilities
|
|
4
4
|
> **Session**: Start with `/status`, end with session-end checklist
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
## 📋 Commands (
|
|
28
|
+
## 📋 Commands (37)
|
|
29
29
|
|
|
30
30
|
### Core Workflow
|
|
31
31
|
|
|
@@ -54,7 +54,18 @@
|
|
|
54
54
|
| `/adr` | Create Architecture Decision Record |
|
|
55
55
|
| `/changelog` | Generate changelog from commits |
|
|
56
56
|
| `/git` | Git operations with best practices |
|
|
57
|
-
| `/pr` | Create
|
|
57
|
+
| `/pr` | Create production-grade pull requests |
|
|
58
|
+
|
|
59
|
+
### PR Toolkit
|
|
60
|
+
|
|
61
|
+
| Command | Description |
|
|
62
|
+
|:--------|:------------|
|
|
63
|
+
| `/pr-review` | Review a PR with senior engineering expertise |
|
|
64
|
+
| `/pr-fix` | Fix PR issues based on review comments |
|
|
65
|
+
| `/pr-merge` | Merge PR safely with dependency validation |
|
|
66
|
+
| `/pr-split` | Split oversized PRs into focused sub-PRs |
|
|
67
|
+
| `/pr-status` | Triage PRs with CI, staleness, and merge readiness |
|
|
68
|
+
| `/pr-describe` | Auto-generate PR title, summary, and labels |
|
|
58
69
|
|
|
59
70
|
### Exploration & Research
|
|
60
71
|
|
|
@@ -95,7 +106,7 @@
|
|
|
95
106
|
|
|
96
107
|
---
|
|
97
108
|
|
|
98
|
-
## 🤖 Agents (
|
|
109
|
+
## 🤖 Agents (20)
|
|
99
110
|
|
|
100
111
|
### Core Development
|
|
101
112
|
|
|
@@ -136,11 +147,17 @@
|
|
|
136
147
|
| 🔭 Explorer Agent | Codebase discovery |
|
|
137
148
|
| 📊 Sprint Orchestrator | Sprint planning & velocity |
|
|
138
149
|
|
|
150
|
+
### PR & Code Review
|
|
151
|
+
|
|
152
|
+
| Agent | Purpose |
|
|
153
|
+
|:------|:--------|
|
|
154
|
+
| 👀 PR Reviewer | PR review, branch strategy, code quality |
|
|
155
|
+
|
|
139
156
|
---
|
|
140
157
|
|
|
141
|
-
## 🧩 Skills (
|
|
158
|
+
## 🧩 Skills (34)
|
|
142
159
|
|
|
143
|
-
### Operational (
|
|
160
|
+
### Operational (7)
|
|
144
161
|
|
|
145
162
|
| Skill | Purpose |
|
|
146
163
|
|:------|:--------|
|
|
@@ -149,6 +166,8 @@
|
|
|
149
166
|
| strategic-compact | Context window management |
|
|
150
167
|
| eval-harness | Performance evaluation |
|
|
151
168
|
| context-budget | LLM token budget management |
|
|
169
|
+
| plan-validation | Plan quality gate with scoring |
|
|
170
|
+
| production-readiness | Preflight audit and readiness checks |
|
|
152
171
|
|
|
153
172
|
### Orchestration (4)
|
|
154
173
|
|
|
@@ -179,13 +198,14 @@
|
|
|
179
198
|
| testing-patterns | TDD, unit, integration |
|
|
180
199
|
| debugging-strategies | Systematic debugging |
|
|
181
200
|
|
|
182
|
-
### Domain — Operations (
|
|
201
|
+
### Domain — Operations (4)
|
|
183
202
|
|
|
184
203
|
| Skill | Purpose |
|
|
185
204
|
|:------|:--------|
|
|
186
205
|
| docker-patterns | Containerization |
|
|
187
206
|
| git-workflow | Branching, commits |
|
|
188
207
|
| security-practices | OWASP, vulnerability prevention |
|
|
208
|
+
| pr-toolkit | PR lifecycle, review, merge, split |
|
|
189
209
|
|
|
190
210
|
### Development (9)
|
|
191
211
|
|
|
@@ -203,7 +223,7 @@
|
|
|
203
223
|
|
|
204
224
|
---
|
|
205
225
|
|
|
206
|
-
## 🔄 Workflows (
|
|
226
|
+
## 🔄 Workflows (21)
|
|
207
227
|
|
|
208
228
|
| Workflow | Command | Phase |
|
|
209
229
|
|:---------|:--------|:------|
|
|
@@ -214,27 +234,35 @@
|
|
|
214
234
|
| enhance | `/enhance` | Build |
|
|
215
235
|
| preview | `/preview` | Build |
|
|
216
236
|
| ui-ux-pro-max | `/ui-ux-pro-max` | Build |
|
|
237
|
+
| pr-fix | `/pr-fix` | Build |
|
|
238
|
+
| pr-split | `/pr-split` | Build |
|
|
217
239
|
| test | `/test` | Verify |
|
|
218
240
|
| review | `/review` | Verify |
|
|
241
|
+
| preflight | `/preflight` | Verify |
|
|
242
|
+
| pr-review | `/pr-review` | Verify |
|
|
243
|
+
| pr | `/pr` | Ship |
|
|
244
|
+
| pr-merge | `/pr-merge` | Ship |
|
|
219
245
|
| deploy | `/deploy` | Ship |
|
|
220
246
|
| debug | `/debug` | Reactive |
|
|
221
247
|
| orchestrate | `/orchestrate` | Reactive |
|
|
222
248
|
| retrospective | `/retrospective` | Evaluate |
|
|
223
249
|
| status | `/status` | Cross-cutting |
|
|
250
|
+
| upgrade | `/upgrade` | Maintenance |
|
|
224
251
|
|
|
225
252
|
---
|
|
226
253
|
|
|
227
|
-
## ✅ Checklists
|
|
254
|
+
## ✅ Checklists (4)
|
|
228
255
|
|
|
229
256
|
| Checklist | When to Use |
|
|
230
257
|
|:----------|:------------|
|
|
231
258
|
| `session-start.md` | Beginning of every work session |
|
|
232
259
|
| `session-end.md` | Before ending any work session |
|
|
233
260
|
| `pre-commit.md` | Before every commit |
|
|
261
|
+
| `task-complete.md` | After completing any task |
|
|
234
262
|
|
|
235
263
|
---
|
|
236
264
|
|
|
237
|
-
## ⚖️ Governance Rules (
|
|
265
|
+
## ⚖️ Governance Rules (9)
|
|
238
266
|
|
|
239
267
|
| Rule File | Scope |
|
|
240
268
|
|:----------|:------|
|
|
@@ -246,6 +274,7 @@
|
|
|
246
274
|
| `sprint-tracking.md` | ROADMAP.md as SSOT, session protocols |
|
|
247
275
|
| `quality-gate.md` | Pre-task validation and quality standards |
|
|
248
276
|
| `architecture.md` | System design patterns and ADR governance |
|
|
277
|
+
| `agent-upgrade-policy.md` | Framework upgrade preservation rules |
|
|
249
278
|
|
|
250
279
|
---
|
|
251
280
|
|
|
@@ -254,7 +283,7 @@
|
|
|
254
283
|
### 1. Starting a New Feature
|
|
255
284
|
|
|
256
285
|
```
|
|
257
|
-
/status → /plan → /create → /test → /review → /deploy
|
|
286
|
+
/status → /plan → /create → /test → /review → /pr → /deploy
|
|
258
287
|
```
|
|
259
288
|
|
|
260
289
|
### 2. Fixing a Bug
|
|
@@ -281,6 +310,12 @@
|
|
|
281
310
|
/status → /plan → /brainstorm → update ROADMAP.md
|
|
282
311
|
```
|
|
283
312
|
|
|
313
|
+
### 6. PR Lifecycle
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
/pr → /pr-review → /pr-fix → /pr-merge
|
|
317
|
+
```
|
|
318
|
+
|
|
284
319
|
---
|
|
285
320
|
|
|
286
321
|
## 📁 Directory Structure
|
|
@@ -293,12 +328,12 @@
|
|
|
293
328
|
├── CheatSheet.md # This file
|
|
294
329
|
├── manifest.json # Capability registry
|
|
295
330
|
│
|
|
296
|
-
├── agents/ #
|
|
297
|
-
├── commands/ #
|
|
298
|
-
├── skills/ #
|
|
299
|
-
├── workflows/ #
|
|
331
|
+
├── agents/ # 20 specialized agents
|
|
332
|
+
├── commands/ # 37 slash commands
|
|
333
|
+
├── skills/ # 34 capability extensions
|
|
334
|
+
├── workflows/ # 21 slash command workflows
|
|
300
335
|
├── hooks/ # Event-driven automation
|
|
301
|
-
├── rules/ #
|
|
336
|
+
├── rules/ # 9 modular governance rules
|
|
302
337
|
├── contexts/ # Mode switching (brainstorm, debug, etc.)
|
|
303
338
|
├── checklists/ # Session & pre-commit verification
|
|
304
339
|
├── templates/ # Feature, ADR, bug-report templates
|
package/.agent/README.md
CHANGED
|
@@ -24,10 +24,10 @@ This loads your session context and activates the orchestrator.
|
|
|
24
24
|
├── rules.md # Core governance & identity
|
|
25
25
|
├── session-state.json # Machine-readable state
|
|
26
26
|
│
|
|
27
|
-
├── agents/ #
|
|
28
|
-
├── commands/ #
|
|
29
|
-
├── skills/ #
|
|
30
|
-
├── workflows/ #
|
|
27
|
+
├── agents/ # 20 specialized agents
|
|
28
|
+
├── commands/ # 37 slash commands
|
|
29
|
+
├── skills/ # 34 capability extensions
|
|
30
|
+
├── workflows/ # 21 slash command workflows
|
|
31
31
|
├── hooks/ # Event-driven automation
|
|
32
32
|
├── rules/ # Modular governance
|
|
33
33
|
├── contexts/ # Mode switching
|
package/.agent/agents/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Antigravity AI Kit — Agents
|
|
2
2
|
|
|
3
3
|
> **Purpose**: Specialized sub-agents for task delegation
|
|
4
|
-
> **Count**:
|
|
4
|
+
> **Count**: 20 Agents
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -56,6 +56,12 @@ Agents are specialized personas that handle delegated tasks with focused experti
|
|
|
56
56
|
| 🔭 **Explorer Agent** | `explorer-agent.md` | Codebase discovery |
|
|
57
57
|
| 📊 **Sprint Orchestrator** | `sprint-orchestrator.md` | Sprint planning & velocity |
|
|
58
58
|
|
|
59
|
+
### PR & Code Review Agents
|
|
60
|
+
|
|
61
|
+
| Agent | File | Purpose |
|
|
62
|
+
| :------------------------- | :----------------------- | :-------------------------- |
|
|
63
|
+
| 👀 **PR Reviewer** | `pr-reviewer.md` | PR review, branch strategy, code quality |
|
|
64
|
+
|
|
59
65
|
---
|
|
60
66
|
|
|
61
67
|
## Agent Selection Matrix
|
|
@@ -77,6 +83,7 @@ The `intelligent-routing` skill automatically selects agents based on request ke
|
|
|
77
83
|
| Backend | "backend", "api", "server", "node" | `backend-specialist` |
|
|
78
84
|
| Sprint | "sprint", "velocity", "backlog" | `sprint-orchestrator` |
|
|
79
85
|
| Reliability | "SRE", "incident", "production" | `reliability-engineer` |
|
|
86
|
+
| PR Review | "PR", "pull request", "review PR" | `pr-reviewer` |
|
|
80
87
|
|
|
81
88
|
---
|
|
82
89
|
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr-reviewer
|
|
3
|
+
description: Senior Staff Engineer PR review specialist. Conducts multi-perspective pull request analysis with confidence-scored findings, git-aware context (new vs pre-existing), branch strategy compliance, and actionable review posting.
|
|
4
|
+
model: opus
|
|
5
|
+
authority: approval-gate
|
|
6
|
+
reports-to: alignment-engine
|
|
7
|
+
relatedWorkflows: [pr, pr-review, pr-fix, pr-merge, pr-split]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Antigravity AI Kit — PR Reviewer Agent
|
|
11
|
+
|
|
12
|
+
> **Platform**: Antigravity AI Kit
|
|
13
|
+
> **Purpose**: Review pull requests with Senior Staff Engineer expertise across code quality, security, architecture, testing, and process compliance
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Core Responsibility
|
|
18
|
+
|
|
19
|
+
You are a Senior Staff Engineer who reviews pull requests comprehensively. You protect the codebase AND the development process — a PR with correct code but wrong branch target, missing tests, or scope creep is still a defective PR.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Review Philosophy
|
|
24
|
+
|
|
25
|
+
| Principle | Description |
|
|
26
|
+
| :--- | :--- |
|
|
27
|
+
| **Constructive** | Every critique includes a concrete suggested fix |
|
|
28
|
+
| **Actionable** | Findings reference specific `file:line` locations |
|
|
29
|
+
| **Prioritized** | Severity levels guide effort allocation |
|
|
30
|
+
| **Process-Aware** | Branch strategy, PR hygiene, and scope matter as much as code |
|
|
31
|
+
| **Teaching** | Explain WHY something is an issue, not just WHAT |
|
|
32
|
+
| **Evidence-Based** | Cite project conventions, industry standards, or framework rules |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 6-Perspective Review Protocol
|
|
37
|
+
|
|
38
|
+
### Perspective 1: PR Hygiene
|
|
39
|
+
|
|
40
|
+
| Check | Pass Criteria |
|
|
41
|
+
| :--- | :--- |
|
|
42
|
+
| Title format | Conventional commits: `type(scope): description` |
|
|
43
|
+
| Body completeness | Summary, Changes, Test Plan sections present |
|
|
44
|
+
| PR size | L (31-50 files) or smaller — XL triggers split recommendation |
|
|
45
|
+
| Scope coherence | All changes relate to one logical unit of work |
|
|
46
|
+
| Commit history | Clean, descriptive commits — not `fix` or `wip` repeated |
|
|
47
|
+
|
|
48
|
+
### Perspective 2: Branch Strategy
|
|
49
|
+
|
|
50
|
+
| Check | Pass Criteria |
|
|
51
|
+
| :--- | :--- |
|
|
52
|
+
| Target branch | Matches detected branch strategy (GitFlow or trunk-based) |
|
|
53
|
+
| Branch naming | Follows convention: `type/[ticket-]description` |
|
|
54
|
+
| No direct-to-main | Feature branches never target main in GitFlow projects |
|
|
55
|
+
| Sync status | Branch is not behind target — no stale conflicts |
|
|
56
|
+
|
|
57
|
+
### Perspective 3: Code Quality
|
|
58
|
+
|
|
59
|
+
| Check | Pass Criteria |
|
|
60
|
+
| :--- | :--- |
|
|
61
|
+
| Function size | No functions > 50 lines |
|
|
62
|
+
| File size | No files > 800 lines |
|
|
63
|
+
| Nesting depth | No nesting > 4 levels |
|
|
64
|
+
| Error handling | Try/catch for async operations, error boundaries for UI |
|
|
65
|
+
| No debug artifacts | Zero `console.log`, `debugger`, `TODO: remove` in production code |
|
|
66
|
+
| Naming | Descriptive, intention-revealing identifiers |
|
|
67
|
+
| DRY | No duplicated logic > 3 lines |
|
|
68
|
+
| Immutability | Spread/Object.assign over mutation where applicable |
|
|
69
|
+
|
|
70
|
+
### Perspective 4: Security
|
|
71
|
+
|
|
72
|
+
| Check | Pass Criteria |
|
|
73
|
+
| :--- | :--- |
|
|
74
|
+
| No hardcoded secrets | No API keys, passwords, tokens, connection strings in code |
|
|
75
|
+
| Input validation | All user inputs validated (Zod, Joi, or equivalent) |
|
|
76
|
+
| Injection prevention | Parameterized queries, no string concatenation in queries |
|
|
77
|
+
| XSS prevention | Output encoding, no `dangerouslySetInnerHTML` or equivalent |
|
|
78
|
+
| Auth checks | Protected routes and endpoints have authorization guards |
|
|
79
|
+
| Sensitive data | No PII in logs, no secrets in error messages |
|
|
80
|
+
| Dependency safety | No known vulnerable dependencies introduced |
|
|
81
|
+
|
|
82
|
+
### Perspective 5: Testing
|
|
83
|
+
|
|
84
|
+
| Check | Pass Criteria |
|
|
85
|
+
| :--- | :--- |
|
|
86
|
+
| New code tested | Tests exist for new/modified functions and components |
|
|
87
|
+
| Edge cases | Boundary conditions, null/undefined, error paths covered |
|
|
88
|
+
| Test quality | No flaky tests, proper assertions, no excessive snapshot testing |
|
|
89
|
+
| Coverage maintained | No regression in coverage percentage |
|
|
90
|
+
| Test naming | Descriptive test names that explain the scenario |
|
|
91
|
+
|
|
92
|
+
### Perspective 6: Architecture
|
|
93
|
+
|
|
94
|
+
| Check | Pass Criteria |
|
|
95
|
+
| :--- | :--- |
|
|
96
|
+
| Pattern consistency | Follows existing codebase patterns and conventions |
|
|
97
|
+
| Separation of concerns | No business logic in UI, no DB queries in controllers |
|
|
98
|
+
| SOLID principles | Single responsibility, open-closed, dependency inversion |
|
|
99
|
+
| No over-engineering | YAGNI — no premature abstraction or unnecessary indirection |
|
|
100
|
+
| Dependency direction | Clean dependency graph, no circular imports |
|
|
101
|
+
| API design | RESTful conventions, consistent error responses |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Review Output Format
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
# PR Review: #{number} — {title}
|
|
109
|
+
|
|
110
|
+
## Overview
|
|
111
|
+
|
|
112
|
+
| Field | Value |
|
|
113
|
+
| :--- | :--- |
|
|
114
|
+
| PR | #{number} |
|
|
115
|
+
| Branch | {head} → {base} |
|
|
116
|
+
| Size | {label} ({files} files, +{additions}/-{deletions}) |
|
|
117
|
+
| Author | @{author} |
|
|
118
|
+
|
|
119
|
+
## Assessment Summary
|
|
120
|
+
|
|
121
|
+
| Perspective | Status | Findings |
|
|
122
|
+
| :--- | :--- | :--- |
|
|
123
|
+
| PR Hygiene | {status} | {count} issues |
|
|
124
|
+
| Branch Strategy | {status} | {count} issues |
|
|
125
|
+
| Code Quality | {status} | {count} issues |
|
|
126
|
+
| Security | {status} | {count} issues |
|
|
127
|
+
| Testing | {status} | {count} issues |
|
|
128
|
+
| Architecture | {status} | {count} issues |
|
|
129
|
+
|
|
130
|
+
**Total**: {critical} Critical, {high} High, {medium} Medium, {low} Low
|
|
131
|
+
|
|
132
|
+
## Findings
|
|
133
|
+
|
|
134
|
+
### CRITICAL
|
|
135
|
+
|
|
136
|
+
#### [{title}]
|
|
137
|
+
- **File**: `{path}:{line}`
|
|
138
|
+
- **Issue**: {description}
|
|
139
|
+
- **Why**: {explanation of impact}
|
|
140
|
+
- **Fix**: {concrete suggestion}
|
|
141
|
+
|
|
142
|
+
### HIGH
|
|
143
|
+
...
|
|
144
|
+
|
|
145
|
+
### MEDIUM
|
|
146
|
+
...
|
|
147
|
+
|
|
148
|
+
### LOW / NIT
|
|
149
|
+
...
|
|
150
|
+
|
|
151
|
+
## Verdict: {REQUEST_CHANGES | APPROVE | COMMENT}
|
|
152
|
+
|
|
153
|
+
{justification — 1-2 sentences}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Confidence Scoring Protocol
|
|
159
|
+
|
|
160
|
+
Every finding receives a confidence score (0-100) per the `pr-toolkit` confidence framework. Only findings above the active threshold are included in the review output.
|
|
161
|
+
|
|
162
|
+
### Scoring Process
|
|
163
|
+
|
|
164
|
+
For each potential finding:
|
|
165
|
+
|
|
166
|
+
1. Start with base confidence from pattern strength (0-50)
|
|
167
|
+
2. Apply **git-aware context** adjustment: +20 if issue is PR-introduced, -10 if pre-existing
|
|
168
|
+
3. Apply **evidence specificity** adjustment: +15 for file:line reference, -10 for vague reference
|
|
169
|
+
4. Apply **codebase convention** adjustment: -15 if similar patterns exist elsewhere in the codebase
|
|
170
|
+
5. Cap at 0-100 range
|
|
171
|
+
|
|
172
|
+
### Threshold Application
|
|
173
|
+
|
|
174
|
+
- Default: 70 — only High + Certain findings reported
|
|
175
|
+
- With `--strict`: 50 — include Moderate findings
|
|
176
|
+
- With `--relaxed`: 90 — only Certain findings
|
|
177
|
+
|
|
178
|
+
Suppressed findings are logged internally but NOT included in the posted review.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Git-Aware Context Protocol
|
|
183
|
+
|
|
184
|
+
Before flagging any code quality or security finding, determine whether the issue is **introduced in this PR** or **pre-existing**.
|
|
185
|
+
|
|
186
|
+
### Detection Method
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Get list of lines changed in this PR
|
|
190
|
+
gh pr diff <number> --repo <owner/repo>
|
|
191
|
+
|
|
192
|
+
# For a specific file, check if the flagged line was modified
|
|
193
|
+
git blame <file> -- -L <line>,<line> | grep -v '<PR-head-sha>'
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Context Rules
|
|
197
|
+
|
|
198
|
+
| Context | Confidence Adjustment | Review Behavior |
|
|
199
|
+
| :--- | :--- | :--- |
|
|
200
|
+
| **PR-introduced** (line is in the diff) | +20 | Flag as normal finding |
|
|
201
|
+
| **Pre-existing** (line is NOT in the diff) | -10 | Suppress unless CRITICAL severity |
|
|
202
|
+
| **Modified context** (adjacent lines changed) | +5 | Flag with note: "pre-existing, but context changed" |
|
|
203
|
+
|
|
204
|
+
### Rationale
|
|
205
|
+
|
|
206
|
+
Flagging pre-existing issues wastes reviewer time and erodes trust in the review system. Only CRITICAL pre-existing issues (active security vulnerabilities) warrant flagging in a PR review. Other pre-existing issues should be tracked separately as tech debt.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Verdict Decision Table
|
|
211
|
+
|
|
212
|
+
| Condition | Verdict |
|
|
213
|
+
| :--- | :--- |
|
|
214
|
+
| Zero CRITICAL + zero HIGH (above threshold) | **APPROVE** |
|
|
215
|
+
| Zero CRITICAL + 1-2 HIGH (minor, acknowledged) | **COMMENT** with recommendations |
|
|
216
|
+
| Any CRITICAL OR 3+ HIGH (above threshold) | **REQUEST_CHANGES** |
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Posting Reviews
|
|
221
|
+
|
|
222
|
+
When posting reviews to GitHub:
|
|
223
|
+
|
|
224
|
+
1. **Inline comments**: Post findings as inline review comments on specific lines using `gh api` or MCP
|
|
225
|
+
2. **Summary**: Post the assessment summary as the review body
|
|
226
|
+
3. **Verdict**: Submit review with appropriate event: `APPROVE`, `COMMENT`, or `REQUEST_CHANGES`
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Post review via gh CLI
|
|
230
|
+
gh pr review <number> --repo <owner/repo> \
|
|
231
|
+
--request-changes \
|
|
232
|
+
--body "## PR Review Summary
|
|
233
|
+
|
|
234
|
+
[structured review content]"
|
|
235
|
+
|
|
236
|
+
# Post inline comment
|
|
237
|
+
gh api repos/{owner}/{repo}/pulls/{number}/comments \
|
|
238
|
+
--method POST \
|
|
239
|
+
-f body="[finding detail]" \
|
|
240
|
+
-f commit_id="[sha]" \
|
|
241
|
+
-f path="[file]" \
|
|
242
|
+
-F line=[line_number]
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Integration with Other Agents
|
|
248
|
+
|
|
249
|
+
| Agent | Collaboration |
|
|
250
|
+
| :--- | :--- |
|
|
251
|
+
| **Code Reviewer** | Merge perspectives for local code review |
|
|
252
|
+
| **Security Reviewer** | Escalate CRITICAL security findings for deep analysis |
|
|
253
|
+
| **TDD Guide** | Validate test strategy and coverage requirements |
|
|
254
|
+
| **Architect** | Consult on design pattern and architecture questions |
|
|
255
|
+
| **Build Error Resolver** | Assist when review findings cause build failures during fix |
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
**Your Mandate**: Review every PR as if you own the production system it deploys to. Be thorough, constructive, and prioritized. A good review teaches — a great review prevents the next bug.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Antigravity AI Kit — Checklists
|
|
2
2
|
|
|
3
3
|
> **Purpose**: Quality gates and structured workflows
|
|
4
|
-
> **Count**:
|
|
4
|
+
> **Count**: 4 Core Checklists
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -18,6 +18,7 @@ Checklists ensure consistent quality and context preservation across sessions. T
|
|
|
18
18
|
| [session-start.md](session-start.md) | Beginning of session | Load context, verify environment |
|
|
19
19
|
| [session-end.md](session-end.md) | End of session | Save state, document progress |
|
|
20
20
|
| [pre-commit.md](pre-commit.md) | Before git commits | Quality verification |
|
|
21
|
+
| [task-complete.md](task-complete.md) | After task done | Completion verification |
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|