prr-kit 1.1.3 → 1.2.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 +1 -1
- package/README.md +260 -235
- package/docs/assets/banner.svg +30 -248
- package/docs/assets/how-it-works.svg +87 -0
- package/package.json +60 -60
- package/src/core/agents/prr-master.agent.yaml +18 -7
- package/src/core/tasks/clear.md +140 -0
- package/src/core/tasks/help.md +15 -13
- package/src/core/workflows/clear/workflow.md +6 -0
- package/src/core/workflows/help/workflow.md +6 -0
- package/src/core/workflows/party-mode/steps/step-01-load-reviewers.md +35 -24
- package/src/core/workflows/party-mode/steps/step-02-discussion.md +45 -25
- package/src/core/workflows/party-mode/workflow.md +2 -2
- package/src/prr/agents/architecture-reviewer.agent.yaml +65 -45
- package/src/prr/agents/business-reviewer.agent.yaml +66 -0
- package/src/prr/agents/general-reviewer.agent.yaml +64 -48
- package/src/prr/agents/performance-reviewer.agent.yaml +65 -45
- package/src/prr/agents/security-reviewer.agent.yaml +67 -43
- package/src/prr/config-template.yaml +97 -0
- package/src/prr/data/stacks/actix.md +55 -0
- package/src/prr/data/stacks/alpine.md +47 -0
- package/src/prr/data/stacks/android.md +53 -0
- package/src/prr/data/stacks/angular.md +96 -0
- package/src/prr/data/stacks/ansible.md +55 -0
- package/src/prr/data/stacks/apollo.md +54 -0
- package/src/prr/data/stacks/astro.md +48 -0
- package/src/prr/data/stacks/aws-cdk.md +55 -0
- package/src/prr/data/stacks/axum.md +56 -0
- package/src/prr/data/stacks/babylonjs.md +55 -0
- package/src/prr/data/stacks/bash.md +53 -0
- package/src/prr/data/stacks/bevy.md +53 -0
- package/src/prr/data/stacks/bootstrap.md +52 -0
- package/src/prr/data/stacks/bun.md +55 -0
- package/src/prr/data/stacks/cpp.md +57 -0
- package/src/prr/data/stacks/csharp.md +95 -0
- package/src/prr/data/stacks/css.md +55 -0
- package/src/prr/data/stacks/cypress.md +53 -0
- package/src/prr/data/stacks/d3.md +53 -0
- package/src/prr/data/stacks/deno.md +49 -0
- package/src/prr/data/stacks/django.md +92 -0
- package/src/prr/data/stacks/docker.md +79 -0
- package/src/prr/data/stacks/drizzle.md +54 -0
- package/src/prr/data/stacks/dynamodb.md +55 -0
- package/src/prr/data/stacks/electron.md +44 -0
- package/src/prr/data/stacks/elixir.md +53 -0
- package/src/prr/data/stacks/expo.md +53 -0
- package/src/prr/data/stacks/expressjs.md +82 -0
- package/src/prr/data/stacks/fastapi.md +88 -0
- package/src/prr/data/stacks/fastify.md +60 -0
- package/src/prr/data/stacks/fiber.md +55 -0
- package/src/prr/data/stacks/firebase.md +43 -0
- package/src/prr/data/stacks/flask.md +46 -0
- package/src/prr/data/stacks/flutter.md +75 -0
- package/src/prr/data/stacks/gin.md +57 -0
- package/src/prr/data/stacks/github-actions.md +71 -0
- package/src/prr/data/stacks/go.md +88 -0
- package/src/prr/data/stacks/godot.md +56 -0
- package/src/prr/data/stacks/graphql.md +76 -0
- package/src/prr/data/stacks/grpc.md +56 -0
- package/src/prr/data/stacks/haskell.md +48 -0
- package/src/prr/data/stacks/helm.md +54 -0
- package/src/prr/data/stacks/hono.md +54 -0
- package/src/prr/data/stacks/htmx.md +38 -0
- package/src/prr/data/stacks/java.md +87 -0
- package/src/prr/data/stacks/jest-vitest.md +87 -0
- package/src/prr/data/stacks/jquery.md +50 -0
- package/src/prr/data/stacks/junit.md +53 -0
- package/src/prr/data/stacks/kotlin.md +89 -0
- package/src/prr/data/stacks/kubernetes.md +148 -0
- package/src/prr/data/stacks/langchain.md +56 -0
- package/src/prr/data/stacks/laravel.md +56 -0
- package/src/prr/data/stacks/libgdx.md +46 -0
- package/src/prr/data/stacks/lit.md +49 -0
- package/src/prr/data/stacks/love2d.md +51 -0
- package/src/prr/data/stacks/lua.md +51 -0
- package/src/prr/data/stacks/mobx.md +54 -0
- package/src/prr/data/stacks/mongodb.md +85 -0
- package/src/prr/data/stacks/monogame.md +51 -0
- package/src/prr/data/stacks/mysql.md +57 -0
- package/src/prr/data/stacks/nestjs.md +95 -0
- package/src/prr/data/stacks/nextjs.md +88 -0
- package/src/prr/data/stacks/nginx.md +55 -0
- package/src/prr/data/stacks/node.md +56 -0
- package/src/prr/data/stacks/nuxtjs.md +91 -0
- package/src/prr/data/stacks/openai-api.md +54 -0
- package/src/prr/data/stacks/opengl.md +54 -0
- package/src/prr/data/stacks/phaser.md +54 -0
- package/src/prr/data/stacks/phoenix.md +55 -0
- package/src/prr/data/stacks/php.md +56 -0
- package/src/prr/data/stacks/playwright.md +86 -0
- package/src/prr/data/stacks/postgresql.md +60 -0
- package/src/prr/data/stacks/prisma.md +81 -0
- package/src/prr/data/stacks/pygame.md +52 -0
- package/src/prr/data/stacks/pytest.md +53 -0
- package/src/prr/data/stacks/python.md +94 -0
- package/src/prr/data/stacks/pytorch.md +54 -0
- package/src/prr/data/stacks/qwik.md +50 -0
- package/src/prr/data/stacks/rails.md +48 -0
- package/src/prr/data/stacks/react-native.md +77 -0
- package/src/prr/data/stacks/react.md +104 -0
- package/src/prr/data/stacks/redis.md +76 -0
- package/src/prr/data/stacks/redux.md +107 -0
- package/src/prr/data/stacks/remix.md +51 -0
- package/src/prr/data/stacks/rust.md +88 -0
- package/src/prr/data/stacks/sass.md +51 -0
- package/src/prr/data/stacks/scala.md +50 -0
- package/src/prr/data/stacks/scikit-learn.md +53 -0
- package/src/prr/data/stacks/sequelize.md +54 -0
- package/src/prr/data/stacks/socket-io.md +54 -0
- package/src/prr/data/stacks/solidity.md +53 -0
- package/src/prr/data/stacks/solidjs.md +45 -0
- package/src/prr/data/stacks/spring-boot.md +92 -0
- package/src/prr/data/stacks/sql.md +85 -0
- package/src/prr/data/stacks/sqlite.md +55 -0
- package/src/prr/data/stacks/styled-components.md +51 -0
- package/src/prr/data/stacks/supabase.md +57 -0
- package/src/prr/data/stacks/svelte.md +77 -0
- package/src/prr/data/stacks/sveltekit.md +54 -0
- package/src/prr/data/stacks/swift.md +61 -0
- package/src/prr/data/stacks/tailwindcss.md +10 -0
- package/src/prr/data/stacks/tanstack-query.md +48 -0
- package/src/prr/data/stacks/tauri.md +52 -0
- package/src/prr/data/stacks/terraform.md +53 -0
- package/src/prr/data/stacks/three.md +53 -0
- package/src/prr/data/stacks/trpc.md +49 -0
- package/src/prr/data/stacks/typeorm.md +40 -0
- package/src/prr/data/stacks/typescript.md +83 -0
- package/src/prr/data/stacks/unity.md +61 -0
- package/src/prr/data/stacks/unreal.md +58 -0
- package/src/prr/data/stacks/vite.md +48 -0
- package/src/prr/data/stacks/vue3.md +95 -0
- package/src/prr/data/stacks/vulkan.md +53 -0
- package/src/prr/data/stacks/wasm.md +49 -0
- package/src/prr/data/stacks/webpack.md +48 -0
- package/src/prr/data/stacks/zig.md +51 -0
- package/src/prr/data/stacks/zustand.md +56 -0
- package/src/prr/workflows/1-discover/select-pr/steps/step-05-confirm.md +1 -0
- package/src/prr/workflows/1-discover/select-pr/workflow.md +1 -1
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-01-analyze-files.md +334 -0
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-02-collect-sources.md +451 -0
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-03-build-knowledge-base.md +337 -0
- package/src/prr/workflows/2-analyze/collect-pr-context/workflow.md +123 -0
- package/src/prr/workflows/2-analyze/describe-pr/steps/step-02-classify.md +12 -6
- package/src/prr/workflows/2-analyze/describe-pr/steps/step-03-walkthrough.md +59 -1
- package/src/prr/workflows/3-review/architecture-review/checklist.md +4 -0
- package/src/prr/workflows/3-review/architecture-review/instructions.xml +32 -4
- package/src/prr/workflows/3-review/architecture-review/workflow.yaml +17 -18
- package/src/prr/workflows/3-review/business-review/checklist.md +27 -0
- package/src/prr/workflows/3-review/business-review/instructions.xml +153 -0
- package/src/prr/workflows/3-review/business-review/workflow.yaml +17 -0
- package/src/prr/workflows/3-review/general-review/checklist.md +5 -1
- package/src/prr/workflows/3-review/general-review/instructions.xml +39 -8
- package/src/prr/workflows/3-review/general-review/workflow.yaml +17 -18
- package/src/prr/workflows/3-review/performance-review/checklist.md +3 -1
- package/src/prr/workflows/3-review/performance-review/instructions.xml +10 -3
- package/src/prr/workflows/3-review/performance-review/workflow.yaml +17 -18
- package/src/prr/workflows/3-review/security-review/checklist.md +2 -1
- package/src/prr/workflows/3-review/security-review/instructions.xml +8 -3
- package/src/prr/workflows/3-review/security-review/workflow.yaml +18 -19
- package/src/prr/workflows/4-improve/improve-code/workflow.yaml +17 -18
- package/src/prr/workflows/6-report/generate-report/steps/step-01-collect.md +9 -2
- package/src/prr/workflows/6-report/generate-report/steps/step-02-organize.md +28 -7
- package/src/prr/workflows/6-report/generate-report/steps/step-03-write.md +6 -4
- package/src/prr/workflows/6-report/generate-report/templates/review-report.template.md +124 -78
- package/src/prr/workflows/6-report/post-comments/steps/step-01-format.md +104 -13
- package/src/prr/workflows/6-report/post-comments/steps/step-02-post.md +92 -21
- package/src/prr/workflows/6-report/post-comments/workflow.md +6 -0
- package/src/prr/workflows/quick/workflow.md +138 -32
- package/src/prr/workflows/0-setup/collect-project-context/steps/step-01-scan-configs.md +0 -106
- package/src/prr/workflows/0-setup/collect-project-context/steps/step-02-extract-rules.md +0 -131
- package/src/prr/workflows/0-setup/collect-project-context/steps/step-03-ask-context.md +0 -194
- package/src/prr/workflows/0-setup/collect-project-context/steps/step-04-save-context.md +0 -161
- package/src/prr/workflows/0-setup/collect-project-context/workflow.md +0 -58
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "step-02-collect-sources"
|
|
3
|
+
description: "Collect context from all identified sources"
|
|
4
|
+
nextStepFile: "./step-03-build-knowledge-base.md"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 2: Collect Context from Sources
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
Gather context from all relevant sources identified in Step 1.
|
|
11
|
+
|
|
12
|
+
## Sequence of Instructions
|
|
13
|
+
|
|
14
|
+
### 1. Announce Collection
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
📚 Collecting context from sources...
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 2. Collect from Primary Documentation
|
|
21
|
+
|
|
22
|
+
Check and read these files (if they exist):
|
|
23
|
+
|
|
24
|
+
**Priority 1:**
|
|
25
|
+
```bash
|
|
26
|
+
CLAUDE.md
|
|
27
|
+
AGENTS.md
|
|
28
|
+
.github/CLAUDE_CODE_RULES.md
|
|
29
|
+
.clauderules
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**What to extract:**
|
|
33
|
+
- Project-wide coding standards
|
|
34
|
+
- Agent-specific instructions
|
|
35
|
+
- Domain-specific guidelines (if PR touches that domain)
|
|
36
|
+
- Security requirements
|
|
37
|
+
- Architecture patterns
|
|
38
|
+
|
|
39
|
+
**Example extraction:**
|
|
40
|
+
```markdown
|
|
41
|
+
# From CLAUDE.md
|
|
42
|
+
|
|
43
|
+
## State Management
|
|
44
|
+
Use Pinia stores with setup function style...
|
|
45
|
+
→ Extract this section if PR touches stores/
|
|
46
|
+
|
|
47
|
+
## Security
|
|
48
|
+
Never use v-html with user input...
|
|
49
|
+
→ Extract this if PR touches Vue components
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 3. Collect from Config Files
|
|
53
|
+
|
|
54
|
+
Based on file types from Step 1, read relevant configs:
|
|
55
|
+
|
|
56
|
+
#### For .vue or .js files:
|
|
57
|
+
|
|
58
|
+
**Read .eslintrc* files:**
|
|
59
|
+
```javascript
|
|
60
|
+
// Extract ALL rules, especially enforced ones (error/2)
|
|
61
|
+
{
|
|
62
|
+
"vue/multi-word-component-names": "error",
|
|
63
|
+
"vue/require-prop-types": "error",
|
|
64
|
+
"prefer-const": "error",
|
|
65
|
+
"no-var": "error"
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Read .prettierrc* files:**
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"semi": false,
|
|
73
|
+
"singleQuote": true,
|
|
74
|
+
"tabWidth": 2
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Read vite.config.* or webpack.config.*:**
|
|
79
|
+
- Extract alias configurations
|
|
80
|
+
- Extract plugin settings
|
|
81
|
+
- Note build optimizations
|
|
82
|
+
|
|
83
|
+
#### For .ts files:
|
|
84
|
+
|
|
85
|
+
**Read tsconfig.json:**
|
|
86
|
+
- Extract compiler options
|
|
87
|
+
- Note strict mode settings
|
|
88
|
+
- Extract path mappings
|
|
89
|
+
|
|
90
|
+
### 4. Collect from Standards Documents
|
|
91
|
+
|
|
92
|
+
**Read CONTRIBUTING.md:**
|
|
93
|
+
- If exists, extract sections relevant to domains from Step 1
|
|
94
|
+
- Example: If PR touches components → extract "Component Standards" section
|
|
95
|
+
- Example: If PR touches security code → extract "Security Guidelines"
|
|
96
|
+
|
|
97
|
+
**Read ARCHITECTURE.md:**
|
|
98
|
+
- Extract architectural patterns relevant to changed files
|
|
99
|
+
- Example: If PR touches stores → extract "State Management" section
|
|
100
|
+
- Extract ADR (Architecture Decision Records) if mentioned
|
|
101
|
+
|
|
102
|
+
**Read domain-specific docs:**
|
|
103
|
+
```bash
|
|
104
|
+
docs/components.md # if PR touches components
|
|
105
|
+
docs/state-management.md # if PR touches stores
|
|
106
|
+
docs/api-guidelines.md # if PR touches API code
|
|
107
|
+
docs/security.md # if PR touches auth/security
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 5. Extract Inline Annotations
|
|
111
|
+
|
|
112
|
+
From changed files (identified in Step 1), extract annotations:
|
|
113
|
+
|
|
114
|
+
```javascript
|
|
115
|
+
// Scan changed lines for these patterns:
|
|
116
|
+
|
|
117
|
+
// @context: {...}
|
|
118
|
+
// @security: {...}
|
|
119
|
+
// @pattern: {...}
|
|
120
|
+
// @rule: {...}
|
|
121
|
+
// @important: {...}
|
|
122
|
+
|
|
123
|
+
// Also extract JSDoc if present:
|
|
124
|
+
/**
|
|
125
|
+
* @pattern Use repository pattern for all data access
|
|
126
|
+
* @security Input validation required
|
|
127
|
+
*/
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Store with context:**
|
|
131
|
+
```javascript
|
|
132
|
+
{
|
|
133
|
+
"file": "src/stores/todoStore.js",
|
|
134
|
+
"line": 10,
|
|
135
|
+
"type": "@pattern",
|
|
136
|
+
"content": "Use composition API only"
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 5b. Load Stack-Specific Rules
|
|
141
|
+
|
|
142
|
+
**Run only if `detected_stacks` from Step 1 is non-empty. Skip silently otherwise.**
|
|
143
|
+
|
|
144
|
+
For each stack key in `detected_stacks`:
|
|
145
|
+
|
|
146
|
+
1. Check if `_prr/prr/data/stacks/{stack-key}.md` exists in the project's PRR installation.
|
|
147
|
+
2. If the file exists → read its full content and extract all rules, organized by category (Security, Performance, Architecture, Code Quality, Common Bugs).
|
|
148
|
+
3. If the file does not exist → skip silently.
|
|
149
|
+
|
|
150
|
+
**Build `stack_rules` structure:**
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
stack_rules:
|
|
154
|
+
vue3:
|
|
155
|
+
security:
|
|
156
|
+
- severity: critical
|
|
157
|
+
rule: "v-html with user-controlled data → XSS. Use {{ }} or DOMPurify."
|
|
158
|
+
- severity: high
|
|
159
|
+
rule: "Dynamic :is binding with user string → arbitrary component injection."
|
|
160
|
+
performance:
|
|
161
|
+
- severity: high
|
|
162
|
+
rule: "watchEffect/watch with async ops without onCleanup → memory leak."
|
|
163
|
+
architecture:
|
|
164
|
+
- severity: high
|
|
165
|
+
rule: "Direct store state mutation outside action → bypasses Pinia devtools."
|
|
166
|
+
code_quality:
|
|
167
|
+
- severity: high
|
|
168
|
+
rule: "defineProps without TypeScript types → silent prop misuse."
|
|
169
|
+
common_bugs:
|
|
170
|
+
- severity: high
|
|
171
|
+
rule: "reactive() destructuring loses reactivity — use toRefs()."
|
|
172
|
+
typescript:
|
|
173
|
+
architecture:
|
|
174
|
+
- severity: high
|
|
175
|
+
rule: "'any' type defeats TypeScript — use unknown + type narrowing."
|
|
176
|
+
# ... other detected stacks
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
This `stack_rules` block is passed directly to Step 3 for inclusion in the knowledge base, where all reviewers (GR, SR, PR, AR, BR) will read and apply the rules.
|
|
180
|
+
|
|
181
|
+
**Announce:**
|
|
182
|
+
```
|
|
183
|
+
🧩 Stack rules loaded: {stack_list} ({total_rule_count} rules)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
If no stack rule files found → skip announcement, continue normally.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
### 6. Collect from External Tools (MCP + RAG)
|
|
191
|
+
|
|
192
|
+
**Only run if `external_sources.enabled: true` in config.**
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
#### 6a. Tool Discovery
|
|
197
|
+
|
|
198
|
+
Inspect what tools you currently have available in this session.
|
|
199
|
+
Categorize discovered tools by capability:
|
|
200
|
+
|
|
201
|
+
| Category | Examples |
|
|
202
|
+
|---|---|
|
|
203
|
+
| `knowledge_base` | Confluence MCP, Notion MCP, Obsidian MCP |
|
|
204
|
+
| `project_management` | Jira MCP, Linear MCP, GitHub Issues MCP |
|
|
205
|
+
| `design` | Figma MCP, Zeplin MCP |
|
|
206
|
+
| `code_intelligence` | Sourcegraph MCP, GitHub MCP |
|
|
207
|
+
| `rag` | AWS Bedrock, GitHub Graph RAG, custom vector DBs |
|
|
208
|
+
|
|
209
|
+
Announce discovery:
|
|
210
|
+
```
|
|
211
|
+
🔌 External tools discovered: {list or "none"}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
If no tools found → skip to Section 7.
|
|
215
|
+
|
|
216
|
+
Compare discovered tools against `external_sources.mcp.intents` in config.
|
|
217
|
+
Only use tools whose category matches a declared intent.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
#### 6b. Knowledge Base Tools (Confluence, Notion, etc.)
|
|
222
|
+
|
|
223
|
+
**If a knowledge base MCP is available AND `knowledge_base` in configured intents:**
|
|
224
|
+
|
|
225
|
+
Query for content relevant to the PR's domains (identified in Step 1).
|
|
226
|
+
Use the tool's own search — do NOT hardcode page IDs.
|
|
227
|
+
|
|
228
|
+
Suggested queries by domain:
|
|
229
|
+
- `authentication` / `security` → "authentication standards", "security guidelines", "JWT policy"
|
|
230
|
+
- `ui-components` → "component standards", "design system rules", "frontend conventions"
|
|
231
|
+
- `state-management` → "state management patterns", "store conventions"
|
|
232
|
+
- `api` → "API design guidelines", "REST conventions", "endpoint standards"
|
|
233
|
+
- `database` → "database patterns", "query optimization", "migration guidelines"
|
|
234
|
+
|
|
235
|
+
Extract: coding standards, ADRs, security policies, team conventions not in local docs.
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
✓ Knowledge base: {n} relevant pages found → {page titles}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
#### 6c. Project Management Tools (Jira, Linear, GitHub Issues)
|
|
244
|
+
|
|
245
|
+
**If a PM MCP is available AND `project_management` in configured intents:**
|
|
246
|
+
|
|
247
|
+
**Step 1 — Extract issue key from branch name:**
|
|
248
|
+
```
|
|
249
|
+
Branch: feature/ENG-123-user-authentication
|
|
250
|
+
Pattern (from config hints.branch_issue_pattern): ([A-Z]+-\d+)
|
|
251
|
+
→ Issue key: ENG-123
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
If no pattern configured, try common formats: `[A-Z]+-\d+`, `#\d+`.
|
|
255
|
+
|
|
256
|
+
**Step 2 — Fetch issue context:**
|
|
257
|
+
Use the MCP tool to retrieve:
|
|
258
|
+
- Issue title + description → understand WHAT was supposed to be built
|
|
259
|
+
- Acceptance criteria → use as review checklist (compare against implementation)
|
|
260
|
+
- Issue type (story, bug, task) → informs review focus
|
|
261
|
+
- Linked design/spec documents
|
|
262
|
+
|
|
263
|
+
**This is high-value context**: reviewers can verify if implementation matches requirements.
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
✓ Issue: {issue_key} — {title}
|
|
267
|
+
Acceptance criteria: {n} items extracted
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
If no issue key found in branch name → skip silently.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
#### 6d. Design Tools (Figma, Zeplin)
|
|
275
|
+
|
|
276
|
+
**If a design MCP is available AND `design` in configured intents:**
|
|
277
|
+
**Only run if PR changes UI files** (`.vue`, `.tsx`, `.jsx`, `.css`, `.scss`).
|
|
278
|
+
|
|
279
|
+
Use the tool to:
|
|
280
|
+
- Search for designs matching changed component names
|
|
281
|
+
- Get design tokens, spacing, color specs
|
|
282
|
+
- Get design annotations or open comments
|
|
283
|
+
|
|
284
|
+
Helps architecture/general review catch design-vs-implementation drift.
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
✓ Design context: {component names matched}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
#### 6e. RAG Systems (AWS Bedrock, GitHub Graph RAG, custom)
|
|
293
|
+
|
|
294
|
+
**If a RAG tool is available AND `rag.enabled: true` in config:**
|
|
295
|
+
|
|
296
|
+
Query with PR context:
|
|
297
|
+
- "Similar {domain} implementations in this codebase"
|
|
298
|
+
- "Previous review decisions for {category} code"
|
|
299
|
+
- "Established patterns for {file_category} in this project"
|
|
300
|
+
|
|
301
|
+
Extract:
|
|
302
|
+
- Approved patterns to compare against PR code
|
|
303
|
+
- Past review decisions → avoid repeating same findings on well-known patterns
|
|
304
|
+
- Architecture examples the team has already accepted
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
✓ RAG: {n} relevant patterns retrieved
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
#### 6f. Plain URL Sources
|
|
313
|
+
|
|
314
|
+
**If `url` type sources configured under `external_sources.sources`:**
|
|
315
|
+
|
|
316
|
+
```yaml
|
|
317
|
+
external_sources:
|
|
318
|
+
sources:
|
|
319
|
+
- type: url
|
|
320
|
+
name: Shared ESLint config
|
|
321
|
+
url: https://raw.githubusercontent.com/org/standards/main/eslint.md
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Use WebFetch to retrieve content. Extract relevant rules/guidelines.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
#### 6g. Graceful Degradation
|
|
329
|
+
|
|
330
|
+
For EVERY external tool (6b–6f):
|
|
331
|
+
- Tool not available in session → skip silently
|
|
332
|
+
- Tool call fails or times out → skip silently, do not retry
|
|
333
|
+
- Tool returns empty results → skip silently
|
|
334
|
+
- Tool returns irrelevant content → discard, do not force-include
|
|
335
|
+
|
|
336
|
+
**The review workflow must never fail because an external tool is unavailable.**
|
|
337
|
+
Internal context (Steps 1–5) is always sufficient on its own.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
#### 6h. Report Collection Summary
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
✓ External tools:
|
|
345
|
+
🔌 MCP tools used: {list or "none available"}
|
|
346
|
+
📄 Knowledge base pages: {n}
|
|
347
|
+
🎫 Issue context: {key — title} or "not found"
|
|
348
|
+
🎨 Design context: {matched} or "n/a"
|
|
349
|
+
🧠 RAG patterns: {n}
|
|
350
|
+
🌐 URL sources: {n}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### 7. Build Collected Data Structure
|
|
354
|
+
|
|
355
|
+
Aggregate all collected context:
|
|
356
|
+
|
|
357
|
+
```yaml
|
|
358
|
+
collected_data:
|
|
359
|
+
primary_docs:
|
|
360
|
+
claude_md:
|
|
361
|
+
state_management: |
|
|
362
|
+
Use Pinia stores with setup function style.
|
|
363
|
+
No Options API allowed.
|
|
364
|
+
|
|
365
|
+
security: |
|
|
366
|
+
Never use v-html with user input.
|
|
367
|
+
All inputs must be sanitized.
|
|
368
|
+
|
|
369
|
+
config_rules:
|
|
370
|
+
eslint:
|
|
371
|
+
vue/multi-word-component-names: error
|
|
372
|
+
vue/require-prop-types: error
|
|
373
|
+
vue/require-default-prop: error
|
|
374
|
+
prefer-const: error
|
|
375
|
+
no-var: error
|
|
376
|
+
eqeqeq: [error, always]
|
|
377
|
+
|
|
378
|
+
prettier:
|
|
379
|
+
semi: false
|
|
380
|
+
singleQuote: true
|
|
381
|
+
tabWidth: 2
|
|
382
|
+
printWidth: 100
|
|
383
|
+
|
|
384
|
+
standards_docs:
|
|
385
|
+
contributing:
|
|
386
|
+
component_standards: |
|
|
387
|
+
- Use PascalCase for component names
|
|
388
|
+
- Multi-word names required
|
|
389
|
+
- Props must have types and defaults
|
|
390
|
+
|
|
391
|
+
security_guidelines: |
|
|
392
|
+
- No v-html with user input
|
|
393
|
+
- Sanitize all user inputs
|
|
394
|
+
|
|
395
|
+
architecture:
|
|
396
|
+
state_management_pattern: |
|
|
397
|
+
Container/Presentational pattern.
|
|
398
|
+
Stores use setup function style.
|
|
399
|
+
|
|
400
|
+
adr_002: |
|
|
401
|
+
Decision: Use Pinia over Vuex
|
|
402
|
+
Rationale: Simpler API, better TypeScript support
|
|
403
|
+
|
|
404
|
+
inline_annotations:
|
|
405
|
+
- file: src/stores/todoStore.js
|
|
406
|
+
line: 10
|
|
407
|
+
type: "@pattern"
|
|
408
|
+
content: "Use composition API only"
|
|
409
|
+
|
|
410
|
+
- file: src/stores/todoStore.js
|
|
411
|
+
line: 15
|
|
412
|
+
type: "@security"
|
|
413
|
+
content: "Validate all inputs before storage"
|
|
414
|
+
|
|
415
|
+
# External tools context (populated if tools were available)
|
|
416
|
+
external_tools:
|
|
417
|
+
mcp_used: [] # list of MCP tool names actually used
|
|
418
|
+
knowledge_base:
|
|
419
|
+
pages_found: 0
|
|
420
|
+
content: [] # extracted relevant content
|
|
421
|
+
issue_context:
|
|
422
|
+
key: null # e.g. ENG-123
|
|
423
|
+
title: null
|
|
424
|
+
acceptance_criteria: []
|
|
425
|
+
design_context:
|
|
426
|
+
matched_components: []
|
|
427
|
+
specs: []
|
|
428
|
+
rag_patterns:
|
|
429
|
+
count: 0
|
|
430
|
+
patterns: []
|
|
431
|
+
url_sources: [] # content from plain URL fetches
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### 8. Report Collection Summary
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
✓ Context collection complete:
|
|
438
|
+
📘 CLAUDE.md: {n} sections
|
|
439
|
+
⚙️ ESLint: {m} rules
|
|
440
|
+
🎨 Prettier: {k} rules
|
|
441
|
+
📚 CONTRIBUTING.md: {x} sections
|
|
442
|
+
🏗️ ARCHITECTURE.md: {y} sections
|
|
443
|
+
💬 Inline annotations: {z}
|
|
444
|
+
🧩 Stack rules: {stack_list} ({rule_count} rules) or "none detected"
|
|
445
|
+
🔌 MCP tools: {list or "none"}
|
|
446
|
+
🧠 RAG patterns: {w}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### 9. Load Next Step
|
|
450
|
+
|
|
451
|
+
Add `step-02-collect-sources` to `stepsCompleted`. Load: `{nextStepFile}`
|