prr-kit 1.1.3 → 1.2.1
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
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
name: architecture-review
|
|
2
|
-
description: "Architecture-focused review: SOLID principles, layering, coupling, codebase consistency"
|
|
3
|
-
author: "PR Review Kit"
|
|
4
|
-
|
|
5
|
-
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
-
user_name: "{config_source}:user_name"
|
|
7
|
-
communication_language: "{config_source}:communication_language"
|
|
8
|
-
target_repo: "{config_source}:target_repo"
|
|
9
|
-
review_output: "{config_source}:review_output"
|
|
10
|
-
date: system-generated
|
|
11
|
-
|
|
12
|
-
installed_path: "{project-root}/_prr/prr/workflows/3-review/architecture-review"
|
|
13
|
-
instructions: "{installed_path}/instructions.xml"
|
|
14
|
-
validation: "{installed_path}/checklist.md"
|
|
15
|
-
|
|
16
|
-
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
-
|
|
18
|
-
output_file: "{review_output}/architecture-review-{date}.md"
|
|
1
|
+
name: architecture-review
|
|
2
|
+
description: "Architecture-focused review: SOLID principles, layering, coupling, codebase consistency"
|
|
3
|
+
author: "PR Review Kit"
|
|
4
|
+
|
|
5
|
+
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
+
user_name: "{config_source}:user_name"
|
|
7
|
+
communication_language: "{config_source}:communication_language"
|
|
8
|
+
target_repo: "{config_source}:target_repo"
|
|
9
|
+
review_output: "{config_source}:review_output"
|
|
10
|
+
date: system-generated
|
|
11
|
+
|
|
12
|
+
installed_path: "{project-root}/_prr/prr/workflows/3-review/architecture-review"
|
|
13
|
+
instructions: "{installed_path}/instructions.xml"
|
|
14
|
+
validation: "{installed_path}/checklist.md"
|
|
15
|
+
|
|
16
|
+
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
+
output_file: "{review_output}/architecture-review-{date}.md"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Business Review Completion Checklist"
|
|
3
|
+
validation-target: "Business review output file"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Business Review Checklist
|
|
7
|
+
|
|
8
|
+
## Coverage
|
|
9
|
+
- [ ] Feature completeness assessed (branch name, PR title, acceptance criteria if available)
|
|
10
|
+
- [ ] User impact traced (existing flows checked for regressions, new flows checked for clarity)
|
|
11
|
+
- [ ] Business risk evaluated for each 🔴 finding from prior reviews (SR, GR, PR, AR)
|
|
12
|
+
- [ ] Data and migration impact assessed (schema changes, storage migration, rollback plan)
|
|
13
|
+
- [ ] Observability gaps identified (analytics, error monitoring, logging, feature flags)
|
|
14
|
+
- [ ] Cross-cutting and deployment concerns reviewed (browser compat, API contracts, env parity)
|
|
15
|
+
|
|
16
|
+
## Finding Quality
|
|
17
|
+
- [ ] Every finding states: user impact (who is affected and what happens)
|
|
18
|
+
- [ ] Every finding states: severity level (🔴/🟡/🟢/❓)
|
|
19
|
+
- [ ] Technical findings from prior reviews translated into business language
|
|
20
|
+
- [ ] ❓ QUESTION findings include: specific concern + exact question to ask author
|
|
21
|
+
- [ ] Business Verdict section written: overall risk level (CRITICAL/HIGH/MEDIUM/LOW/MINIMAL)
|
|
22
|
+
- [ ] Deployment recommendation stated: ship now / ship with fixes / do not ship
|
|
23
|
+
- [ ] Post-ship monitoring noted: what to watch after deploy
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
- [ ] Findings written to `{review_output}/business-review-{date}.md`
|
|
27
|
+
- [ ] PR context updated with `business-review` in completed list
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<workflow>
|
|
2
|
+
<critical>Workflow engine rules: {project-root}/_prr/core/tasks/workflow.xml</critical>
|
|
3
|
+
<critical>Communicate all responses in {communication_language}</critical>
|
|
4
|
+
<critical>Think like a Product Manager and Tech Lead combined — bridge technical findings to business outcomes</critical>
|
|
5
|
+
<critical>Translate EVERY significant technical issue into its business consequence: who is affected, what is the impact, what is the risk magnitude</critical>
|
|
6
|
+
<critical>Run AFTER GR/SR/PR/AR so you can reference their findings and elevate them to business language</critical>
|
|
7
|
+
<critical>Finding severities: 🔴 BLOCKER | 🟡 WARNING | 🟢 SUGGESTION | ❓ QUESTION. Use ❓ when business intent or user impact cannot be determined from the diff alone — e.g., "Is this behavior change intentional from a product perspective?", "Were users informed of this breaking change?". A QUESTION that gets a bad answer becomes a BLOCKER or WARNING depending on the business consequence.</critical>
|
|
8
|
+
|
|
9
|
+
<step n="1" goal="Load PR context, prior findings, and prepare business analysis">
|
|
10
|
+
<check if="{pr_context} does not exist">
|
|
11
|
+
<output>❌ No PR selected. Please run [SP] Select PR first.</output>
|
|
12
|
+
<stop/>
|
|
13
|
+
</check>
|
|
14
|
+
|
|
15
|
+
<action>Read {pr_context} to get: target_branch, base_branch, pr_type, pr_knowledge_base, completed_reviews</action>
|
|
16
|
+
<action>Load PR-specific knowledge base from {pr_knowledge_base} — extract issue_context (acceptance criteria) if available from MCP tools</action>
|
|
17
|
+
<action>Load findings already collected from completed reviews (GR, SR, PR, AR) to translate them into business impact</action>
|
|
18
|
+
<action>Run: git diff {base_branch}...{target_branch} --stat in {target_repo} for file scope</action>
|
|
19
|
+
|
|
20
|
+
<output>💼 Starting Business Review
|
|
21
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
22
|
+
Focus: User Impact | Business Risk | Feature Completeness
|
|
23
|
+
Data Safety | Observability | Cross-cutting Concerns
|
|
24
|
+
PR type: {pr_type} | Prior reviews loaded: {completed_reviews}
|
|
25
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</output>
|
|
26
|
+
</step>
|
|
27
|
+
|
|
28
|
+
<step n="2" goal="Feature completeness and acceptance criteria">
|
|
29
|
+
<action>Determine what this PR is supposed to deliver based on: branch name, PR description, commit messages, issue context from MCP (if available)</action>
|
|
30
|
+
<check-list id="completeness">
|
|
31
|
+
<item>Does the implementation cover the full scope described in the branch name / PR title?</item>
|
|
32
|
+
<item>If acceptance criteria available (from Jira/Linear MCP): check each AC item against the diff — implemented or missing?</item>
|
|
33
|
+
<item>Are error states handled from the user's perspective? (not just technically caught, but communicated clearly)</item>
|
|
34
|
+
<item>Are loading states present for async operations that users will notice?</item>
|
|
35
|
+
<item>Are empty states handled? (empty list, no results, zero state)</item>
|
|
36
|
+
<item>Edge cases that affect real users: very long inputs, special characters, concurrent users, offline state</item>
|
|
37
|
+
<item>Demo / test data or hardcoded values that should not reach production</item>
|
|
38
|
+
</check-list>
|
|
39
|
+
<output-format>
|
|
40
|
+
🔴/🟡/🟢/❓ [COMPLETENESS] — **Description**
|
|
41
|
+
→ User impact: what happens to the user if this is shipped as-is
|
|
42
|
+
→ Suggested fix or question: what needs to be added/changed, or what to ask the author
|
|
43
|
+
</output-format>
|
|
44
|
+
</step>
|
|
45
|
+
|
|
46
|
+
<step n="3" goal="User impact analysis">
|
|
47
|
+
<action>Trace the user journey through the changed code: what flows are affected, what changes for the user</action>
|
|
48
|
+
<check-list id="user-impact">
|
|
49
|
+
<item>UX regressions: does any existing user flow break or degrade?</item>
|
|
50
|
+
<item>Behavior changes: is existing behavior changed in a way users rely on? (implicit contract broken)</item>
|
|
51
|
+
<item>New flows: are new features intuitive? Is the UI clear about what actions do?</item>
|
|
52
|
+
<item>Destructive actions: are irreversible actions (delete, clear, migrate) clearly communicated with confirmation?</item>
|
|
53
|
+
<item>Feedback loops: do users know when operations succeed or fail? Are there success/error messages?</item>
|
|
54
|
+
<item>Performance from user perspective: will users notice slowness? (N+1 queries → slow page load, missing debounce → laggy search)</item>
|
|
55
|
+
<item>Accessibility: keyboard navigation, screen reader labels (aria), color contrast, focus management</item>
|
|
56
|
+
<item>Mobile/responsive: does UI work on small screens if app is used on mobile?</item>
|
|
57
|
+
</check-list>
|
|
58
|
+
</step>
|
|
59
|
+
|
|
60
|
+
<step n="4" goal="Business risk assessment — translate technical findings">
|
|
61
|
+
<action>For each 🔴 finding from prior reviews (SR, GR, PR, AR), assess the business consequence</action>
|
|
62
|
+
<check-list id="business-risk">
|
|
63
|
+
<item>Security vulnerabilities → business risk:
|
|
64
|
+
- XSS: can lead to account takeover, data theft, GDPR breach, reputational damage
|
|
65
|
+
- Hardcoded credentials: instant unauthorized access if code is public
|
|
66
|
+
- Broken auth: unauthorized access to protected resources
|
|
67
|
+
- Token forgeable: privilege escalation, account impersonation
|
|
68
|
+
</item>
|
|
69
|
+
<item>Data loss risk: operations that silently lose user data (fire-and-forget DB writes, missing rollback)</item>
|
|
70
|
+
<item>Downtime risk: breaking changes that could cause failures in production (migration without fallback, schema change)</item>
|
|
71
|
+
<item>Compliance risk: GDPR (user data exposure), accessibility laws (WCAG), industry regulations</item>
|
|
72
|
+
<item>Revenue/retention risk: bugs that directly affect core user workflows → churn</item>
|
|
73
|
+
<item>Support burden: confusing UX or silent errors → high support ticket volume</item>
|
|
74
|
+
<item>Scale risk: patterns that work with test data but fail at production scale (N+1 with 10k records)</item>
|
|
75
|
+
</check-list>
|
|
76
|
+
<output-format>
|
|
77
|
+
🔴 [BUSINESS RISK: CRITICAL/HIGH] — **Risk title**
|
|
78
|
+
→ Technical root cause: {finding from prior review}
|
|
79
|
+
→ Business consequence: {what actually happens in production to real users}
|
|
80
|
+
→ Affected scope: {who / how many users / which workflows}
|
|
81
|
+
→ Mitigation: {what must change before shipping}
|
|
82
|
+
</output-format>
|
|
83
|
+
</step>
|
|
84
|
+
|
|
85
|
+
<step n="5" goal="Data and migration impact">
|
|
86
|
+
<action>Identify any changes that affect existing user data or storage mechanisms</action>
|
|
87
|
+
<check-list id="data-migration">
|
|
88
|
+
<item>Storage migration: if switching storage (e.g. localStorage → IndexedDB), what happens to existing user data?</item>
|
|
89
|
+
<item>Schema changes: are existing records compatible with new schema? Is there a migration script?</item>
|
|
90
|
+
<item>Data seeding: does seeding run every time? Could it overwrite user-created data?</item>
|
|
91
|
+
<item>Multi-user isolation: is data properly scoped per user? Can User A access User B's data?</item>
|
|
92
|
+
<item>Rollback plan: if this deploy fails or has a bug, can we roll back without data loss?</item>
|
|
93
|
+
<item>Backward compatibility: does old code still work if new schema is deployed (blue/green, canary)?</item>
|
|
94
|
+
</check-list>
|
|
95
|
+
</step>
|
|
96
|
+
|
|
97
|
+
<step n="6" goal="Observability and measurability">
|
|
98
|
+
<check-list id="observability">
|
|
99
|
+
<item>Analytics: are new features tracked so we can measure adoption and success?</item>
|
|
100
|
+
<item>Error monitoring: are errors surfaced to a monitoring system (not just console.error)?</item>
|
|
101
|
+
<item>Logging: are key business events logged for audit/debug? (login, data mutation, auth failure)</item>
|
|
102
|
+
<item>Feature flags: is this behind a flag so it can be disabled without a deploy if issues arise?</item>
|
|
103
|
+
<item>Success metrics: how will the team know this feature is working as intended post-deploy?</item>
|
|
104
|
+
<item>Internationalization: are there hardcoded strings that would need translation in a multi-language product?</item>
|
|
105
|
+
</check-list>
|
|
106
|
+
</step>
|
|
107
|
+
|
|
108
|
+
<step n="7" goal="Cross-cutting and deployment concerns">
|
|
109
|
+
<check-list id="cross-cutting">
|
|
110
|
+
<item>Browser compatibility: do new APIs (IndexedDB, btoa, CSS features) work across supported browsers?</item>
|
|
111
|
+
<item>Breaking API contracts: does this change any interfaces that other teams or services depend on?</item>
|
|
112
|
+
<item>Environment parity: are there dev-only artifacts that could leak to production? (demo hints, console logs, mock data)</item>
|
|
113
|
+
<item>Third-party dependencies: are new packages added? License compatible? Bundle size impact on users?</item>
|
|
114
|
+
<item>Deployment order: does this require coordinated deployment with backend or other services?</item>
|
|
115
|
+
</check-list>
|
|
116
|
+
</step>
|
|
117
|
+
|
|
118
|
+
<step n="8" goal="Compile business impact and write findings">
|
|
119
|
+
<action>Assign overall business risk level: CRITICAL | HIGH | MEDIUM | LOW | MINIMAL</action>
|
|
120
|
+
|
|
121
|
+
<risk-matrix>
|
|
122
|
+
CRITICAL = data breach risk, auth bypass, mass data loss, compliance violation
|
|
123
|
+
HIGH = significant UX regression, silent data loss for some users, performance cliff at scale
|
|
124
|
+
MEDIUM = missing features from AC, confusing UX, no observability, rollback concerns
|
|
125
|
+
LOW = minor UX gaps, no analytics, non-critical missing edge cases
|
|
126
|
+
MINIMAL = additive feature, no regressions, low risk changes
|
|
127
|
+
</risk-matrix>
|
|
128
|
+
|
|
129
|
+
<action>Structure the output by category, ordered by severity within each section:
|
|
130
|
+
- Feature Completeness gaps (🔴 first, then 🟡, 🟢, ❓)
|
|
131
|
+
- User Impact issues
|
|
132
|
+
- Business Risk items (translated from technical findings)
|
|
133
|
+
- Data/Migration concerns
|
|
134
|
+
- Observability gaps
|
|
135
|
+
- Cross-cutting issues
|
|
136
|
+
- ❓ Questions for Author (consolidated at the end)
|
|
137
|
+
</action>
|
|
138
|
+
|
|
139
|
+
<action>Write a "Business Verdict" section:
|
|
140
|
+
- Overall risk level
|
|
141
|
+
- Top 3 business concerns
|
|
142
|
+
- Deployment recommendation: ship now / ship with fixes / do not ship
|
|
143
|
+
- Post-ship monitoring: what to watch after deploy
|
|
144
|
+
</action>
|
|
145
|
+
|
|
146
|
+
<action>Update {pr_context}: add 'business-review' to completed reviews list</action>
|
|
147
|
+
|
|
148
|
+
<output>💼 Business review complete.
|
|
149
|
+
Business risk: {risk_level}
|
|
150
|
+
{blocker_count} blockers (🔴), {warning_count} warnings (🟡), {suggestion_count} suggestions (🟢), {question_count} questions (❓) for author.
|
|
151
|
+
Run [RR] Generate Report to compile all findings.</output>
|
|
152
|
+
</step>
|
|
153
|
+
</workflow>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: business-review
|
|
2
|
+
description: "Business impact review: user impact, business risk, feature completeness, data safety, observability"
|
|
3
|
+
author: "PR Review Kit"
|
|
4
|
+
|
|
5
|
+
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
+
user_name: "{config_source}:user_name"
|
|
7
|
+
communication_language: "{config_source}:communication_language"
|
|
8
|
+
target_repo: "{config_source}:target_repo"
|
|
9
|
+
review_output: "{config_source}:review_output"
|
|
10
|
+
date: system-generated
|
|
11
|
+
|
|
12
|
+
installed_path: "{project-root}/_prr/prr/workflows/3-review/business-review"
|
|
13
|
+
instructions: "{installed_path}/instructions.xml"
|
|
14
|
+
validation: "{installed_path}/checklist.md"
|
|
15
|
+
|
|
16
|
+
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
+
output_file: "{review_output}/business-review-{date}.md"
|
|
@@ -10,12 +10,16 @@ validation-target: "General review output file"
|
|
|
10
10
|
- [ ] Logic and correctness checked for each changed function
|
|
11
11
|
- [ ] Error handling reviewed
|
|
12
12
|
- [ ] Test coverage assessed
|
|
13
|
+
- [ ] Side effects reviewed (observer deps, resource cleanup, derived value purity, global state mutations)
|
|
14
|
+
- [ ] Cross-file impact assessed (shared modules, event/signal dispatch, API and contract changes)
|
|
13
15
|
|
|
14
16
|
## Finding Quality
|
|
15
17
|
- [ ] Every finding has: file path + line/function reference
|
|
16
|
-
- [ ] Every finding has: severity level (
|
|
18
|
+
- [ ] Every finding has: severity level (🔴/🟡/🟢/❓)
|
|
17
19
|
- [ ] Every finding has: suggested fix or improvement
|
|
18
20
|
- [ ] No vague findings ("this code is bad" — must specify why and what to do)
|
|
21
|
+
- [ ] ❓ QUESTION findings include: specific concern + which files may be affected + exact question to ask author
|
|
22
|
+
- [ ] Side effect findings include: the affected location OUTSIDE the diff (not just the changed file)
|
|
19
23
|
|
|
20
24
|
## Output
|
|
21
25
|
- [ ] Findings written to `{review_output}/general-review-{date}.md`
|
|
@@ -3,25 +3,32 @@
|
|
|
3
3
|
<critical>Communicate all responses in {communication_language}</critical>
|
|
4
4
|
<critical>Load PR context from {pr_context} before starting review</critical>
|
|
5
5
|
<critical>Every finding MUST include: file path + line/function reference + severity + suggested fix</critical>
|
|
6
|
+
<critical>Finding severities: 🔴 BLOCKER (must fix before merge) | 🟡 WARNING (should fix) | 🟢 SUGGESTION (nice to have) | ❓ QUESTION (uncertain — ask author before judging). Use ❓ when: (a) you cannot determine intent from the diff alone, (b) behavior depends on runtime context you can't see, (c) a side effect MAY exist but you need confirmation. A QUESTION that gets a bad answer becomes a BLOCKER or WARNING.</critical>
|
|
6
7
|
|
|
7
|
-
<step n="1" goal="Load PR context and diff">
|
|
8
|
+
<step n="1" goal="Load PR context, knowledge base, and diff">
|
|
8
9
|
<check if="{pr_context} does not exist">
|
|
9
10
|
<output>❌ No PR selected. Please run [SP] Select PR first.</output>
|
|
10
11
|
<stop/>
|
|
11
12
|
</check>
|
|
12
13
|
|
|
13
|
-
<action>Read {pr_context} to get: target_branch, base_branch, diff_strategy, files_changed</action>
|
|
14
|
+
<action>Read {pr_context} to get: target_branch, base_branch, diff_strategy, files_changed, pr_knowledge_base</action>
|
|
15
|
+
<action>Load PR-specific knowledge base from {pr_knowledge_base} (e.g., pr-123-context.yaml)</action>
|
|
16
|
+
<note>Knowledge base contains: relevant ESLint rules, guidelines from CLAUDE.md/CONTRIBUTING.md/ARCHITECTURE.md, inline annotations, external rules</note>
|
|
14
17
|
<action>Run: git diff {base_branch}...{target_branch} in {target_repo}</action>
|
|
15
18
|
<action>Note diff_strategy: if 'chunked', process file by file</action>
|
|
16
19
|
|
|
17
20
|
<output>🔍 Starting General Code Review
|
|
18
21
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
19
22
|
PR: {target_branch} → {base_branch}
|
|
23
|
+
Context: Loaded fresh PR-specific knowledge base
|
|
20
24
|
Strategy: {diff_strategy}
|
|
21
25
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</output>
|
|
22
26
|
</step>
|
|
23
27
|
|
|
24
|
-
<step n="2" goal="Review code logic and correctness">
|
|
28
|
+
<step n="2" goal="Review code logic and correctness with PR-specific context">
|
|
29
|
+
<action>Apply ESLint rules from knowledge_base.relevant_rules.eslint</action>
|
|
30
|
+
<action>Apply guidelines from knowledge_base.relevant_guidelines</action>
|
|
31
|
+
<action>Check inline annotations from knowledge_base.inline_context</action>
|
|
25
32
|
<action>For each changed file (or chunk if diff_strategy=chunked):</action>
|
|
26
33
|
<check-list id="logic">
|
|
27
34
|
<item>Logical errors: conditions, edge cases, off-by-one errors</item>
|
|
@@ -32,8 +39,8 @@ Strategy: {diff_strategy}
|
|
|
32
39
|
</check-list>
|
|
33
40
|
<output-format>
|
|
34
41
|
For each finding:
|
|
35
|
-
|
|
36
|
-
→ Suggested fix: `code example`
|
|
42
|
+
🔴/🟡/🟢/❓ [SEVERITY] `path/to/file:lineN` — **Description**
|
|
43
|
+
→ Suggested fix or question: `code example or specific question to ask author`
|
|
37
44
|
</output-format>
|
|
38
45
|
</step>
|
|
39
46
|
|
|
@@ -57,12 +64,36 @@ For each finding:
|
|
|
57
64
|
</check-list>
|
|
58
65
|
</step>
|
|
59
66
|
|
|
60
|
-
<step n="5" goal="
|
|
61
|
-
<
|
|
67
|
+
<step n="5" goal="Review side effects and cross-file technical impact">
|
|
68
|
+
<note>Reference the Impact Map from the describe-pr walkthrough if available. If not, perform the scan inline. This step applies to all stacks — frontend, backend, mobile, gaming, etc.</note>
|
|
69
|
+
<check-list id="side-effects">
|
|
70
|
+
<item>Observer / reactive subscriptions: are all dependencies or triggers for observers, watchers, and subscriptions declared correctly? Missing deps cause stale state; unnecessary triggers cause redundant work. Use ❓ if intent is unclear.</item>
|
|
71
|
+
<item>Resource cleanup: are resources acquired in lifecycle hooks (subscriptions, timers, handles, connections, threads, listeners) properly released on teardown/destruction? Missing cleanup causes leaks.</item>
|
|
72
|
+
<item>Derived / computed values: do any derived values or selectors have hidden side effects (mutations, I/O, network calls)? Derived values must be pure.</item>
|
|
73
|
+
<item>Shared / global state mutations: does this change mutate state visible outside the current module (singletons, global variables, shared memory, context, state managers)? Cross-reference Impact Map for who observes it.</item>
|
|
74
|
+
<item>Event / signal dispatch: new events, signals, notifications, or messages emitted — are all consumers/listeners accounted for? Is the payload shape backward compatible?</item>
|
|
75
|
+
<item>Public interface changes on shared modules: flag any breaking change (signature, return type, exported contract) here as ❓ QUESTION or 🔴 BLOCKER. Full blast radius analysis is covered in Architecture Review — cross-reference if AR has already run.</item>
|
|
76
|
+
<item>Unintended cascading reactions: does a state or data change trigger downstream observers, callbacks, or re-computations in unrelated parts of the system? Check for missing guards, debounce, or memoization.</item>
|
|
77
|
+
<item>Cross-boundary contract changes: changed API response, schema, binary format, serialization format, or protocol — are all consumers (other services, clients, upstream/downstream systems) updated in this PR or is a migration plan documented?</item>
|
|
78
|
+
</check-list>
|
|
79
|
+
<output-format>
|
|
80
|
+
For side effect findings, include the AFFECTED LOCATION (the file outside the diff that is impacted):
|
|
81
|
+
❓ QUESTION `src/core/SessionManager.cpp:42` — `activeUser` data structure changed. Are all observers updated?
|
|
82
|
+
Potentially affected: ProfileRenderer.cpp (callback on activeUser), PermissionGuard.ts (derived from activeUser)
|
|
83
|
+
→ Ask author: "Were ProfileRenderer and PermissionGuard tested with the new data shape?"
|
|
84
|
+
|
|
85
|
+
🔴 BLOCKER `src/common/InputHandler.h:15` — Required parameter `deviceId` added without default. Breaking change.
|
|
86
|
+
Affected consumers: ~12 files (see Impact Map)
|
|
87
|
+
→ Add default value or make optional; audit all call sites.
|
|
88
|
+
</output-format>
|
|
89
|
+
</step>
|
|
90
|
+
|
|
91
|
+
<step n="6" goal="Compile and write findings">
|
|
92
|
+
<action>Group all findings by severity: 🔴 Blockers first, then 🟡 Warnings, then 🟢 Suggestions, then ❓ Questions</action>
|
|
62
93
|
<action>Add positive observations: acknowledge good practices found</action>
|
|
63
94
|
<action>Write findings to {output_file} using the standard review report format</action>
|
|
64
95
|
<action>Update {pr_context}: add 'general-review' to completed reviews list</action>
|
|
65
|
-
<output>✅ General review complete. {blocker_count} blockers, {warning_count} warnings, {suggestion_count} suggestions.
|
|
96
|
+
<output>✅ General review complete. {blocker_count} blockers, {warning_count} warnings, {suggestion_count} suggestions, {question_count} questions for author.
|
|
66
97
|
Run [RR] Generate Report to compile all findings, or continue with another review type.</output>
|
|
67
98
|
</step>
|
|
68
99
|
</workflow>
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
name: general-review
|
|
2
|
-
description: "General code quality review: logic, naming, readability, error handling, DRY, test coverage"
|
|
3
|
-
author: "PR Review Kit"
|
|
4
|
-
|
|
5
|
-
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
-
user_name: "{config_source}:user_name"
|
|
7
|
-
communication_language: "{config_source}:communication_language"
|
|
8
|
-
target_repo: "{config_source}:target_repo"
|
|
9
|
-
review_output: "{config_source}:review_output"
|
|
10
|
-
date: system-generated
|
|
11
|
-
|
|
12
|
-
installed_path: "{project-root}/_prr/prr/workflows/3-review/general-review"
|
|
13
|
-
instructions: "{installed_path}/instructions.xml"
|
|
14
|
-
validation: "{installed_path}/checklist.md"
|
|
15
|
-
|
|
16
|
-
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
-
|
|
18
|
-
output_file: "{review_output}/general-review-{date}.md"
|
|
1
|
+
name: general-review
|
|
2
|
+
description: "General code quality review: logic, naming, readability, error handling, DRY, test coverage"
|
|
3
|
+
author: "PR Review Kit"
|
|
4
|
+
|
|
5
|
+
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
+
user_name: "{config_source}:user_name"
|
|
7
|
+
communication_language: "{config_source}:communication_language"
|
|
8
|
+
target_repo: "{config_source}:target_repo"
|
|
9
|
+
review_output: "{config_source}:review_output"
|
|
10
|
+
date: system-generated
|
|
11
|
+
|
|
12
|
+
installed_path: "{project-root}/_prr/prr/workflows/3-review/general-review"
|
|
13
|
+
instructions: "{installed_path}/instructions.xml"
|
|
14
|
+
validation: "{installed_path}/checklist.md"
|
|
15
|
+
|
|
16
|
+
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
+
output_file: "{review_output}/general-review-{date}.md"
|
|
@@ -13,9 +13,11 @@ validation-target: "Performance review output file"
|
|
|
13
13
|
|
|
14
14
|
## Finding Quality
|
|
15
15
|
- [ ] Every finding has: file path + line/function reference
|
|
16
|
+
- [ ] Every finding has: severity level (🔴/🟡/🟢/❓)
|
|
16
17
|
- [ ] Every finding has: estimated impact (high/medium/low) with brief rationale
|
|
17
18
|
- [ ] Micro-optimizations are NOT flagged (only impactful issues)
|
|
18
|
-
- [ ] Each finding includes suggested fix
|
|
19
|
+
- [ ] Each finding includes suggested fix or question
|
|
20
|
+
- [ ] ❓ QUESTION findings include: specific concern + context needed to assess severity (e.g., "Is this in a hot path?", "What is the expected data volume?")
|
|
19
21
|
|
|
20
22
|
## Output
|
|
21
23
|
- [ ] Findings written to `{review_output}/performance-review-{date}.md`
|
|
@@ -3,16 +3,20 @@
|
|
|
3
3
|
<critical>Communicate all responses in {communication_language}</critical>
|
|
4
4
|
<critical>Focus on IMPACTFUL performance issues — skip micro-optimizations that add complexity without measurable benefit</critical>
|
|
5
5
|
<critical>Quantify impact when possible: "this adds ~Xms per request" or "X MB memory per session"</critical>
|
|
6
|
+
<critical>Finding severities: 🔴 BLOCKER | 🟡 WARNING | 🟢 SUGGESTION | ❓ QUESTION. Use ❓ when impact depends on context you cannot determine from the diff — e.g., "Is this function called in a hot path?", "What is the expected data volume here?". A QUESTION that gets a bad answer becomes a BLOCKER or WARNING.</critical>
|
|
6
7
|
|
|
7
|
-
<step n="1" goal="Load PR context and diff">
|
|
8
|
+
<step n="1" goal="Load PR context, knowledge base, and diff">
|
|
8
9
|
<check if="{pr_context} does not exist">
|
|
9
10
|
<output>❌ No PR selected. Please run [SP] Select PR first.</output>
|
|
10
11
|
<stop/>
|
|
11
12
|
</check>
|
|
12
13
|
<action>Read {pr_context} and load git diff</action>
|
|
14
|
+
<action>Load PR-specific knowledge base from {pr_knowledge_base}</action>
|
|
15
|
+
<action>Extract performance guidelines from knowledge_base.relevant_guidelines</action>
|
|
13
16
|
<output>⚡ Starting Performance Review
|
|
14
17
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
15
18
|
Focus: N+1 queries | Memory | Async | Bundle size | Caching
|
|
19
|
+
Context: Loaded performance best practices from docs
|
|
16
20
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</output>
|
|
17
21
|
</step>
|
|
18
22
|
|
|
@@ -58,11 +62,14 @@ Focus: N+1 queries | Memory | Async | Bundle size | Caching
|
|
|
58
62
|
</step>
|
|
59
63
|
|
|
60
64
|
<step n="6" goal="Compile and write findings">
|
|
61
|
-
<action>
|
|
62
|
-
<action>
|
|
65
|
+
<action>Distinguish: impactful issues vs micro-optimizations — only include impactful ones</action>
|
|
66
|
+
<action>For each finding: assign severity based on impact scope — 🔴 if causes measurable regression or data integrity risk, 🟡 if significant but not blocking, 🟢 if low-impact optimization, ❓ if impact cannot be determined without author context</action>
|
|
67
|
+
<action>Include a one-line impact rationale per finding (e.g., "adds ~Xms per request", "O(n²) on unbounded input", "leaks ~X MB per session")</action>
|
|
68
|
+
<action>Group findings by severity: 🔴 Blockers → 🟡 Warnings → 🟢 Suggestions → ❓ Questions for Author</action>
|
|
63
69
|
<action>Write findings to {output_file}</action>
|
|
64
70
|
<action>Update {pr_context}: add 'performance-review' to completed list</action>
|
|
65
71
|
<output>⚡ Performance review complete.
|
|
72
|
+
{blocker_count} blockers (🔴), {warning_count} warnings (🟡), {suggestion_count} suggestions (🟢), {question_count} questions (❓) for author.
|
|
66
73
|
Run [RR] Generate Report to compile all findings.</output>
|
|
67
74
|
</step>
|
|
68
75
|
</workflow>
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
name: performance-review
|
|
2
|
-
description: "Performance-focused code review: N+1 queries, memory leaks, async patterns, bundle size, caching"
|
|
3
|
-
author: "PR Review Kit"
|
|
4
|
-
|
|
5
|
-
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
-
user_name: "{config_source}:user_name"
|
|
7
|
-
communication_language: "{config_source}:communication_language"
|
|
8
|
-
target_repo: "{config_source}:target_repo"
|
|
9
|
-
review_output: "{config_source}:review_output"
|
|
10
|
-
date: system-generated
|
|
11
|
-
|
|
12
|
-
installed_path: "{project-root}/_prr/prr/workflows/3-review/performance-review"
|
|
13
|
-
instructions: "{installed_path}/instructions.xml"
|
|
14
|
-
validation: "{installed_path}/checklist.md"
|
|
15
|
-
|
|
16
|
-
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
-
|
|
18
|
-
output_file: "{review_output}/performance-review-{date}.md"
|
|
1
|
+
name: performance-review
|
|
2
|
+
description: "Performance-focused code review: N+1 queries, memory leaks, async patterns, bundle size, caching"
|
|
3
|
+
author: "PR Review Kit"
|
|
4
|
+
|
|
5
|
+
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
+
user_name: "{config_source}:user_name"
|
|
7
|
+
communication_language: "{config_source}:communication_language"
|
|
8
|
+
target_repo: "{config_source}:target_repo"
|
|
9
|
+
review_output: "{config_source}:review_output"
|
|
10
|
+
date: system-generated
|
|
11
|
+
|
|
12
|
+
installed_path: "{project-root}/_prr/prr/workflows/3-review/performance-review"
|
|
13
|
+
instructions: "{installed_path}/instructions.xml"
|
|
14
|
+
validation: "{installed_path}/checklist.md"
|
|
15
|
+
|
|
16
|
+
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
+
output_file: "{review_output}/performance-review-{date}.md"
|
|
@@ -18,7 +18,8 @@ validation-target: "Security review output file"
|
|
|
18
18
|
- [ ] Every finding states: WHERE (file + line number)
|
|
19
19
|
- [ ] Every finding states: IMPACT (what could an attacker do)
|
|
20
20
|
- [ ] Every finding states: HOW TO FIX
|
|
21
|
-
- [ ] Severity: Critical/High
|
|
21
|
+
- [ ] Severity assigned: 🔴/🟡/🟢/❓ (Critical/High → 🔴, Medium → 🟡, Low/Info → 🟢)
|
|
22
|
+
- [ ] ❓ QUESTION findings include: specific concern + exact question to ask author (e.g., "Was this auth check intentionally removed?")
|
|
22
23
|
|
|
23
24
|
## Output
|
|
24
25
|
- [ ] Findings written to `{review_output}/security-review-{date}.md`
|
|
@@ -3,17 +3,22 @@
|
|
|
3
3
|
<critical>Communicate all responses in {communication_language}</critical>
|
|
4
4
|
<critical>For EVERY security finding: state WHAT, WHERE (file+line), HOW it could be exploited, and HOW to fix it</critical>
|
|
5
5
|
<critical>Think like an attacker — what could an adversary do with this vulnerability?</critical>
|
|
6
|
+
<critical>Finding severities: 🔴 BLOCKER | 🟡 WARNING | 🟢 SUGGESTION | ❓ QUESTION. Use ❓ when you cannot determine from the diff whether a behavior is intentional or a vulnerability — e.g., "Is this endpoint intentionally public?", "Was this auth check deliberately removed?". A QUESTION that gets a bad answer becomes a BLOCKER.</critical>
|
|
6
7
|
|
|
7
|
-
<step n="1" goal="Load PR context and prepare security analysis">
|
|
8
|
+
<step n="1" goal="Load PR context, knowledge base, and prepare security analysis">
|
|
8
9
|
<check if="{pr_context} does not exist">
|
|
9
10
|
<output>❌ No PR selected. Please run [SP] Select PR first.</output>
|
|
10
11
|
<stop/>
|
|
11
12
|
</check>
|
|
12
13
|
<action>Read {pr_context}</action>
|
|
14
|
+
<action>Load PR-specific knowledge base from {pr_knowledge_base}</action>
|
|
15
|
+
<action>Extract security guidelines from knowledge_base.relevant_guidelines</action>
|
|
16
|
+
<action>Check for security annotations from knowledge_base.inline_context (@security:)</action>
|
|
13
17
|
<action>Run: git diff {base_branch}...{target_branch} in {target_repo}</action>
|
|
14
18
|
<output>🔒 Starting Security Review — Thinking like an attacker
|
|
15
19
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
16
20
|
OWASP Top 10 scan + secrets detection + auth review
|
|
21
|
+
Context: Loaded security guidelines from CLAUDE.md/CONTRIBUTING.md
|
|
17
22
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</output>
|
|
18
23
|
</step>
|
|
19
24
|
|
|
@@ -59,12 +64,12 @@ OWASP Top 10 scan + secrets detection + auth review
|
|
|
59
64
|
</step>
|
|
60
65
|
|
|
61
66
|
<step n="6" goal="Compile and write security findings">
|
|
62
|
-
<action>Group findings by severity: Critical →
|
|
67
|
+
<action>Group findings by severity: 🔴 Critical/High → 🟡 Medium → 🟢 Low/Info → ❓ Questions for Author</action>
|
|
63
68
|
<action>For each finding include: WHAT, WHERE (file+line), IMPACT (how exploitable), HOW TO FIX</action>
|
|
64
69
|
<action>Write to {output_file}</action>
|
|
65
70
|
<action>Update {pr_context}: add 'security-review' to completed list</action>
|
|
66
71
|
<output>🔒 Security review complete.
|
|
67
|
-
{
|
|
72
|
+
{blocker_count} blockers (🔴), {warning_count} warnings (🟡), {suggestion_count} suggestions (🟢), {question_count} questions (❓) for author.
|
|
68
73
|
Run [RR] Generate Report to compile all findings.</output>
|
|
69
74
|
</step>
|
|
70
75
|
</workflow>
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
name: security-review
|
|
2
|
-
description: "Security-focused code review: OWASP top 10, injection, auth, secrets, dependencies"
|
|
3
|
-
author: "PR Review Kit"
|
|
4
|
-
|
|
5
|
-
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
-
user_name: "{config_source}:user_name"
|
|
7
|
-
communication_language: "{config_source}:communication_language"
|
|
8
|
-
target_repo: "{config_source}:target_repo"
|
|
9
|
-
review_output: "{config_source}:review_output"
|
|
10
|
-
date: system-generated
|
|
11
|
-
|
|
12
|
-
installed_path: "{project-root}/_prr/prr/workflows/3-review/security-review"
|
|
13
|
-
instructions: "{installed_path}/instructions.xml"
|
|
14
|
-
validation: "{installed_path}/checklist.md"
|
|
15
|
-
owasp_data: "{installed_path}/data/owasp-checklist.csv"
|
|
16
|
-
|
|
17
|
-
pr_context: "{review_output}/current-pr-context.yaml"
|
|
18
|
-
|
|
19
|
-
output_file: "{review_output}/security-review-{date}.md"
|
|
1
|
+
name: security-review
|
|
2
|
+
description: "Security-focused code review: OWASP top 10, injection, auth, secrets, dependencies"
|
|
3
|
+
author: "PR Review Kit"
|
|
4
|
+
|
|
5
|
+
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
+
user_name: "{config_source}:user_name"
|
|
7
|
+
communication_language: "{config_source}:communication_language"
|
|
8
|
+
target_repo: "{config_source}:target_repo"
|
|
9
|
+
review_output: "{config_source}:review_output"
|
|
10
|
+
date: system-generated
|
|
11
|
+
|
|
12
|
+
installed_path: "{project-root}/_prr/prr/workflows/3-review/security-review"
|
|
13
|
+
instructions: "{installed_path}/instructions.xml"
|
|
14
|
+
validation: "{installed_path}/checklist.md"
|
|
15
|
+
owasp_data: "{installed_path}/data/owasp-checklist.csv"
|
|
16
|
+
|
|
17
|
+
pr_context: "{review_output}/current-pr-context.yaml"
|
|
18
|
+
output_file: "{review_output}/security-review-{date}.md"
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
name: improve-code
|
|
2
|
-
description: "Generate concrete inline code suggestions with before/after diffs — focused on actionable improvements"
|
|
3
|
-
author: "PR Review Kit"
|
|
4
|
-
|
|
5
|
-
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
-
user_name: "{config_source}:user_name"
|
|
7
|
-
communication_language: "{config_source}:communication_language"
|
|
8
|
-
target_repo: "{config_source}:target_repo"
|
|
9
|
-
review_output: "{config_source}:review_output"
|
|
10
|
-
date: system-generated
|
|
11
|
-
|
|
12
|
-
installed_path: "{project-root}/_prr/prr/workflows/4-improve/improve-code"
|
|
13
|
-
instructions: "{installed_path}/instructions.xml"
|
|
14
|
-
validation: "{installed_path}/checklist.md"
|
|
15
|
-
|
|
16
|
-
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
-
|
|
18
|
-
output_file: "{review_output}/improve-code-{date}.md"
|
|
1
|
+
name: improve-code
|
|
2
|
+
description: "Generate concrete inline code suggestions with before/after diffs — focused on actionable improvements"
|
|
3
|
+
author: "PR Review Kit"
|
|
4
|
+
|
|
5
|
+
config_source: "{project-root}/_prr/prr/config.yaml"
|
|
6
|
+
user_name: "{config_source}:user_name"
|
|
7
|
+
communication_language: "{config_source}:communication_language"
|
|
8
|
+
target_repo: "{config_source}:target_repo"
|
|
9
|
+
review_output: "{config_source}:review_output"
|
|
10
|
+
date: system-generated
|
|
11
|
+
|
|
12
|
+
installed_path: "{project-root}/_prr/prr/workflows/4-improve/improve-code"
|
|
13
|
+
instructions: "{installed_path}/instructions.xml"
|
|
14
|
+
validation: "{installed_path}/checklist.md"
|
|
15
|
+
|
|
16
|
+
pr_context: "{review_output}/current-pr-context.yaml"
|
|
17
|
+
output_file: "{review_output}/improve-code-{date}.md"
|