codeforge-dev 1.14.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{.devcontainer/config/defaults → .codeforge/config}/ccstatusline-settings.json +44 -6
- package/{.devcontainer/config/defaults → .codeforge/config}/main-system-prompt.md +14 -6
- package/.codeforge/config/orchestrator-system-prompt.md +333 -0
- package/{.devcontainer/config/defaults → .codeforge/config}/settings.json +3 -1
- package/{.devcontainer/config → .codeforge}/file-manifest.json +15 -9
- package/{.devcontainer → .codeforge/scripts}/connect-external-terminal.sh +3 -1
- package/.devcontainer/.env.example +5 -5
- package/.devcontainer/.secrets.example +3 -0
- package/.devcontainer/CHANGELOG.md +251 -3
- package/.devcontainer/CLAUDE.md +129 -22
- package/.devcontainer/README.md +34 -19
- package/.devcontainer/devcontainer.json +28 -10
- package/.devcontainer/features/agent-browser/install.sh +2 -0
- package/.devcontainer/features/ast-grep/install.sh +2 -0
- package/.devcontainer/features/biome/install.sh +2 -0
- package/.devcontainer/features/ccburn/devcontainer-feature.json +0 -5
- package/.devcontainer/features/ccburn/install.sh +2 -0
- package/.devcontainer/features/ccms/install.sh +2 -0
- package/.devcontainer/features/ccstatusline/README.md +7 -6
- package/.devcontainer/features/ccstatusline/install.sh +9 -4
- package/.devcontainer/features/ccusage/devcontainer-feature.json +0 -5
- package/.devcontainer/features/ccusage/install.sh +2 -0
- package/.devcontainer/features/chromaterm/chromaterm.yml +2 -2
- package/.devcontainer/features/chromaterm/install.sh +2 -0
- package/.devcontainer/features/claude-code-native/README.md +47 -0
- package/.devcontainer/features/claude-code-native/devcontainer-feature.json +29 -0
- package/.devcontainer/features/claude-code-native/install.sh +131 -0
- package/.devcontainer/features/claude-monitor/devcontainer-feature.json +0 -5
- package/.devcontainer/features/claude-monitor/install.sh +2 -0
- package/.devcontainer/features/claude-session-dashboard/README.md +2 -2
- package/.devcontainer/features/claude-session-dashboard/devcontainer-feature.json +1 -2
- package/.devcontainer/features/claude-session-dashboard/install.sh +2 -0
- package/.devcontainer/features/dprint/install.sh +2 -0
- package/.devcontainer/features/hadolint/install.sh +2 -0
- package/.devcontainer/features/kitty-terminfo/README.md +3 -1
- package/.devcontainer/features/kitty-terminfo/install.sh +2 -0
- package/.devcontainer/features/lsp-servers/install.sh +2 -0
- package/.devcontainer/features/mcp-qdrant/CHANGES.md +3 -3
- package/.devcontainer/features/mcp-qdrant/README.md +1 -0
- package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +1 -7
- package/.devcontainer/features/mcp-qdrant/install.sh +9 -2
- package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +9 -2
- package/.devcontainer/features/notify-hook/devcontainer-feature.json +1 -1
- package/.devcontainer/features/notify-hook/install.sh +2 -0
- package/.devcontainer/features/ruff/install.sh +2 -0
- package/.devcontainer/features/shellcheck/install.sh +2 -0
- package/.devcontainer/features/shfmt/install.sh +2 -0
- package/.devcontainer/features/tmux/README.md +3 -3
- package/.devcontainer/features/tmux/install.sh +3 -1
- package/.devcontainer/features/tree-sitter/devcontainer-feature.json +0 -6
- package/.devcontainer/features/tree-sitter/install.sh +2 -0
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +27 -11
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/README.md +23 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/claude-guide.md +4 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/documenter.md +254 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/implementer.md +260 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/investigator.md +255 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/tester.md +304 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/README.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/scripts/advisory-test-runner.py +4 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/README.md +125 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/skills/pr-review/SKILL.md +325 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/skills/ship/SKILL.md +314 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/.claude-plugin/plugin.json +5 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/README.md +52 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/skills/ps/SKILL.md +37 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected-bash.py +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/README.md +30 -14
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/hooks/hooks.json +13 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/scripts/collect-session-edits.py +44 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/scripts/commit-reminder.py +89 -10
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/.claude-plugin/plugin.json +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/README.md +19 -11
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/scripts/skill-suggester.py +476 -282
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/SKILL.md +227 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/references/manual-worktree-commands.md +238 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/references/parallel-workflow-patterns.md +228 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/scripts/ticket-linker.py +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/README.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +3 -2
- package/.devcontainer/scripts/check-setup.sh +5 -3
- package/.devcontainer/scripts/preflight.sh +113 -0
- package/.devcontainer/scripts/setup-aliases.sh +13 -8
- package/.devcontainer/scripts/setup-auth.sh +46 -0
- package/.devcontainer/scripts/setup-config.sh +29 -10
- package/.devcontainer/scripts/setup-migrate-claude.sh +80 -0
- package/.devcontainer/scripts/setup-migrate-codeforge.sh +60 -0
- package/.devcontainer/scripts/setup-plugins.sh +3 -1
- package/.devcontainer/scripts/setup-projects.sh +3 -1
- package/.devcontainer/scripts/setup-terminal.sh +3 -1
- package/.devcontainer/scripts/setup-update-claude.sh +22 -27
- package/.devcontainer/scripts/setup.sh +57 -5
- package/LICENSE.txt +14 -0
- package/README.md +79 -5
- package/package.json +2 -1
- package/setup.js +392 -21
- package/.devcontainer/docs/configuration-reference.md +0 -93
- package/.devcontainer/docs/keybindings.md +0 -100
- package/.devcontainer/docs/optional-features.md +0 -64
- package/.devcontainer/docs/plugins.md +0 -176
- package/.devcontainer/docs/troubleshooting.md +0 -128
- package/.devcontainer/scripts/setup-symlink-claude.sh +0 -36
- /package/{.devcontainer/config/defaults → .codeforge/config}/keybindings.json +0 -0
- /package/{.devcontainer/config/defaults → .codeforge/config}/rules/session-search.md +0 -0
- /package/{.devcontainer/config/defaults → .codeforge/config}/rules/spec-workflow.md +0 -0
- /package/{.devcontainer/config/defaults → .codeforge/config}/rules/workspace-scope.md +0 -0
- /package/{.devcontainer/config/defaults → .codeforge/config}/writing-system-prompt.md +0 -0
- /package/{.devcontainer → .codeforge/scripts}/connect-external-terminal.ps1 +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# git-workflow
|
|
2
|
+
|
|
3
|
+
Claude Code plugin that provides standalone git workflow commands. Not tied to the EARS ticket lifecycle — works independently, but optionally links to tickets when context exists.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
Provides two slash commands for shipping code and reviewing pull requests.
|
|
8
|
+
|
|
9
|
+
### Slash Commands
|
|
10
|
+
|
|
11
|
+
| Command | Description |
|
|
12
|
+
|---------|-------------|
|
|
13
|
+
| `/ship` | Review all changes, commit with a detailed message, push, and optionally create a PR |
|
|
14
|
+
| `/pr:review` | Review an existing PR by number/URL or auto-detect from current branch (never merges) |
|
|
15
|
+
|
|
16
|
+
## How It Works
|
|
17
|
+
|
|
18
|
+
### `/ship` Workflow
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
/ship [optional commit message hint]
|
|
22
|
+
│
|
|
23
|
+
└─→ Gather context (git status, diff, branch, project rules)
|
|
24
|
+
│
|
|
25
|
+
└─→ Full review (security, rules, quality, architecture, tests)
|
|
26
|
+
│
|
|
27
|
+
└─→ Present findings → User decisions (fix/issue/ignore)
|
|
28
|
+
│
|
|
29
|
+
└─→ Draft commit message → User approval
|
|
30
|
+
│
|
|
31
|
+
└─→ Commit + Push
|
|
32
|
+
│
|
|
33
|
+
└─→ AskUserQuestion: "Create a PR?"
|
|
34
|
+
│
|
|
35
|
+
├─→ Yes: Create PR (+ link ticket if context exists)
|
|
36
|
+
└─→ No: Done
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### `/pr:review` Workflow
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
/pr:review [PR number, URL, or omit for auto-detect]
|
|
43
|
+
│
|
|
44
|
+
└─→ Identify target PR (argument, auto-detect, or ask)
|
|
45
|
+
│
|
|
46
|
+
└─→ Fetch PR details + diff + changed files
|
|
47
|
+
│
|
|
48
|
+
└─→ Aggressive analysis (attack surface, threats, deps, rules, architecture, quality, tests, breaking changes)
|
|
49
|
+
│
|
|
50
|
+
└─→ Present findings → User decisions (note/issue/ignore)
|
|
51
|
+
│
|
|
52
|
+
└─→ Post review comment (NEVER approve/merge)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Ticket Awareness
|
|
56
|
+
|
|
57
|
+
Both commands are **optionally ticket-aware**:
|
|
58
|
+
- If a ticket number exists in the session context (from a prior `/ticket:work` call), it is linked in commit messages, PRs, and issue comments
|
|
59
|
+
- If reviewing a PR that references a ticket in its body (`Closes #N`, `Refs #N`), requirements are verified against the diff
|
|
60
|
+
- Neither command prompts for a ticket — they work fully standalone
|
|
61
|
+
|
|
62
|
+
### Review Depth
|
|
63
|
+
|
|
64
|
+
| Command | Review Depth | Purpose |
|
|
65
|
+
|---------|-------------|---------|
|
|
66
|
+
| `/ship` | Full (same as `/ticket:review-commit`) | Pre-commit gate — catches issues before they enter history |
|
|
67
|
+
| `/pr:review` | Aggressive (same as `/ticket:create-pr`) | Final gate — deep security, threat modeling, and architecture review |
|
|
68
|
+
|
|
69
|
+
### Finding Severity Levels
|
|
70
|
+
|
|
71
|
+
| Level | Meaning |
|
|
72
|
+
|-------|---------|
|
|
73
|
+
| Critical | Active vulnerability, data exposure, auth bypass, breaking production |
|
|
74
|
+
| High | Security weakness, significant bug, major pattern violation |
|
|
75
|
+
| Medium | Code smell, minor vulnerability, missing validation |
|
|
76
|
+
| Low | Style, optimization, minor improvements |
|
|
77
|
+
| Info | Observations, questions, future considerations |
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
### CodeForge DevContainer
|
|
82
|
+
|
|
83
|
+
Pre-installed and activated automatically — no setup needed.
|
|
84
|
+
|
|
85
|
+
### From GitHub
|
|
86
|
+
|
|
87
|
+
Use this plugin in any Claude Code setup:
|
|
88
|
+
|
|
89
|
+
1. Clone the [CodeForge](https://github.com/AnExiledDev/CodeForge) repository:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
git clone https://github.com/AnExiledDev/CodeForge.git
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
2. Enable the plugin in your `.claude/settings.json`:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"enabledPlugins": {
|
|
100
|
+
"git-workflow@<clone-path>/.devcontainer/plugins/devs-marketplace": true
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Replace `<clone-path>` with the absolute path to your CodeForge clone.
|
|
106
|
+
|
|
107
|
+
## Plugin Structure
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
git-workflow/
|
|
111
|
+
├── .claude-plugin/
|
|
112
|
+
│ └── plugin.json # Plugin metadata
|
|
113
|
+
├── skills/
|
|
114
|
+
│ ├── ship/
|
|
115
|
+
│ │ └── SKILL.md # /ship command definition
|
|
116
|
+
│ └── pr-review/
|
|
117
|
+
│ └── SKILL.md # /pr:review command definition
|
|
118
|
+
└── README.md # This file
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Requirements
|
|
122
|
+
|
|
123
|
+
- Claude Code with plugin command support
|
|
124
|
+
- [GitHub CLI](https://cli.github.com/) (`gh`) installed and authenticated
|
|
125
|
+
- A GitHub repository as the working context
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review an existing pull request without merging — post findings as PR comment
|
|
3
|
+
argument-hint: [PR number, URL, or omit for current branch]
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
allowed-tools: Bash(gh:*), Bash(git:*), Read, Grep, Glob, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /pr:review - Review Existing PR
|
|
9
|
+
|
|
10
|
+
Review an existing pull request and post findings as a PR comment. NEVER approve or merge.
|
|
11
|
+
|
|
12
|
+
## Input
|
|
13
|
+
|
|
14
|
+
`$ARGUMENTS` - PR number (e.g., `42`), URL (e.g., `https://github.com/owner/repo/pull/42`), or empty to auto-detect from current branch.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### Phase 1: Identify Target PR
|
|
19
|
+
|
|
20
|
+
**With argument:**
|
|
21
|
+
```bash
|
|
22
|
+
gh pr view $1 --json number,title,body,baseRefName,headRefName,additions,deletions,commits,files
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Without argument (auto-detect):**
|
|
26
|
+
```bash
|
|
27
|
+
gh pr view --json number,title,body,baseRefName,headRefName,additions,deletions,commits,files
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**If both fail:** Use AskUserQuestion to prompt for PR number.
|
|
31
|
+
|
|
32
|
+
Capture PR number for subsequent operations.
|
|
33
|
+
|
|
34
|
+
Fetch the full diff:
|
|
35
|
+
```bash
|
|
36
|
+
gh pr diff $PR
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Phase 2: Gather Additional Context
|
|
40
|
+
|
|
41
|
+
- Read changed files in full (not just diff) for deeper understanding of surrounding code
|
|
42
|
+
- Discover project rules:
|
|
43
|
+
```bash
|
|
44
|
+
ls -la CLAUDE.md .claude/CLAUDE.md CLAUDE.local.md 2>/dev/null
|
|
45
|
+
ls -la .claude/rules/*.md 2>/dev/null
|
|
46
|
+
```
|
|
47
|
+
- Check if PR body references a ticket (parse for `#N`, `Closes #N`, `Refs #N`, `Fixes #N`)
|
|
48
|
+
- If ticket found, fetch it for requirements verification:
|
|
49
|
+
```bash
|
|
50
|
+
gh issue view $TICKET --json number,title,body
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Phase 3: Aggressive Analysis
|
|
54
|
+
|
|
55
|
+
This review is DEEPER than a commit review — it is the final gate before merge.
|
|
56
|
+
|
|
57
|
+
#### Attack Surface Analysis
|
|
58
|
+
|
|
59
|
+
| Check | Look For |
|
|
60
|
+
|-------|----------|
|
|
61
|
+
| New Endpoints | Every new route/handler exposed |
|
|
62
|
+
| New Inputs | Every new user input vector |
|
|
63
|
+
| Permission Changes | Any auth/authz modifications |
|
|
64
|
+
| Data Flow | How data moves through new code |
|
|
65
|
+
| External Integrations | New API calls, webhooks, services |
|
|
66
|
+
|
|
67
|
+
#### Threat Modeling (per feature)
|
|
68
|
+
|
|
69
|
+
For each significant feature in the PR:
|
|
70
|
+
- What could an attacker exploit?
|
|
71
|
+
- What data could be exfiltrated?
|
|
72
|
+
- What operations could be abused?
|
|
73
|
+
- What rate limiting is needed?
|
|
74
|
+
- What audit logging is needed?
|
|
75
|
+
|
|
76
|
+
#### Dependency Security
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Check for new dependencies (adapt patterns to project)
|
|
80
|
+
gh pr diff $PR | grep -E '^\+.*"(dependencies|devDependencies)"' -A 50
|
|
81
|
+
gh pr diff $PR | grep -E '^\+' | grep -E 'requirements.*\.txt|package.*\.json|Cargo\.toml|go\.mod|Gemfile'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
| Check | Look For |
|
|
85
|
+
|-------|----------|
|
|
86
|
+
| New Dependencies | List all new packages + versions |
|
|
87
|
+
| Known CVEs | Check against vulnerability databases |
|
|
88
|
+
| Supply Chain | Typosquatting, maintainer reputation |
|
|
89
|
+
| License Compliance | License compatibility issues |
|
|
90
|
+
|
|
91
|
+
#### Project Rules Adherence
|
|
92
|
+
|
|
93
|
+
Check compliance with project-specific rules (deeper than commit review):
|
|
94
|
+
|
|
95
|
+
1. **Discover rules**:
|
|
96
|
+
- Read `CLAUDE.md` or `.claude/CLAUDE.md` if present
|
|
97
|
+
- Read all files in `.claude/rules/*.md`
|
|
98
|
+
- Check `CLAUDE.local.md` for user-specific rules
|
|
99
|
+
|
|
100
|
+
2. **Full diff review for compliance**:
|
|
101
|
+
- Check EVERY change against stated rules
|
|
102
|
+
- Note architectural patterns that should be followed
|
|
103
|
+
- Flag ALL deviations from documented conventions
|
|
104
|
+
|
|
105
|
+
| Rule Source | Compliance | Notes |
|
|
106
|
+
|-------------|------------|-------|
|
|
107
|
+
| CLAUDE.md | OK / VIOLATION | [specifics] |
|
|
108
|
+
| rules/[name].md | OK / VIOLATION | [specifics] |
|
|
109
|
+
|
|
110
|
+
#### Architecture Deep Dive
|
|
111
|
+
|
|
112
|
+
| Check | Look For |
|
|
113
|
+
|-------|----------|
|
|
114
|
+
| Pattern Compliance | Full diff against established patterns |
|
|
115
|
+
| Coupling Analysis | New dependencies between modules |
|
|
116
|
+
| Scalability | O(n) analysis, potential bottlenecks |
|
|
117
|
+
| Error Propagation | How errors flow through new code |
|
|
118
|
+
| Recovery Strategies | Graceful degradation, retry logic |
|
|
119
|
+
| State Management | Race conditions, consistency issues |
|
|
120
|
+
|
|
121
|
+
#### Code Quality Review
|
|
122
|
+
|
|
123
|
+
| Check | Look For |
|
|
124
|
+
|-------|----------|
|
|
125
|
+
| Complexity | Nesting depth > 3, high cyclomatic complexity |
|
|
126
|
+
| Duplication | Copy-paste code, extractable shared logic |
|
|
127
|
+
| Naming | Unclear names, inconsistent conventions |
|
|
128
|
+
| Error Handling | Missing boundaries, generic catches, no recovery |
|
|
129
|
+
| SOLID Violations | God classes, tight coupling, leaky abstractions |
|
|
130
|
+
| Dead Code | Unreachable code, unused imports/variables |
|
|
131
|
+
|
|
132
|
+
#### Test Analysis
|
|
133
|
+
|
|
134
|
+
Evaluate against testing standards:
|
|
135
|
+
|
|
136
|
+
| Check | Assess |
|
|
137
|
+
|-------|--------|
|
|
138
|
+
| Behavior Coverage | Are key behaviors tested? (not line count) |
|
|
139
|
+
| Test Quality | Do tests verify outcomes, not implementation? |
|
|
140
|
+
| Brittleness | Any tests that will break on refactor? |
|
|
141
|
+
| Over-testing | Trivial code with unnecessary tests? |
|
|
142
|
+
| Under-testing | Critical paths without tests? |
|
|
143
|
+
| Manual Test Plan | What cannot be automated |
|
|
144
|
+
|
|
145
|
+
**AI testing pitfalls to flag**:
|
|
146
|
+
- Tests for trivial getters/setters
|
|
147
|
+
- Excessive edge cases (>5 per function)
|
|
148
|
+
- Tests asserting on implementation details
|
|
149
|
+
- Over-mocked tests that verify nothing
|
|
150
|
+
|
|
151
|
+
#### Breaking Changes
|
|
152
|
+
|
|
153
|
+
| Check | Look For |
|
|
154
|
+
|-------|----------|
|
|
155
|
+
| API Contracts | Changed request/response schemas |
|
|
156
|
+
| Database Schema | Migration requirements |
|
|
157
|
+
| Configuration | New env vars, changed defaults |
|
|
158
|
+
| Dependencies | Version bumps affecting consumers |
|
|
159
|
+
|
|
160
|
+
#### Requirements Verification (if ticket found)
|
|
161
|
+
|
|
162
|
+
Cross-reference each requirement from the linked ticket:
|
|
163
|
+
|
|
164
|
+
| Requirement | Status | Evidence |
|
|
165
|
+
|-------------|--------|----------|
|
|
166
|
+
| [REQ text] | SATISFIED / PARTIAL / NOT MET | [file:line or explanation] |
|
|
167
|
+
|
|
168
|
+
All acceptance criteria must be verified.
|
|
169
|
+
|
|
170
|
+
### Phase 4: Present Findings
|
|
171
|
+
|
|
172
|
+
Organize by severity:
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
## PR Review Findings
|
|
176
|
+
|
|
177
|
+
### Critical (Must Fix Before Merge)
|
|
178
|
+
- [Finding]: [file:line] - [Impact]
|
|
179
|
+
|
|
180
|
+
### High (Should Fix Before Merge)
|
|
181
|
+
- [Finding]: [file:line] - [Impact]
|
|
182
|
+
|
|
183
|
+
### Medium (Fix Soon)
|
|
184
|
+
- [Finding]: [file:line] - [Impact]
|
|
185
|
+
|
|
186
|
+
### Low (Nice to Have)
|
|
187
|
+
- [Finding]: [file:line] - [Impact]
|
|
188
|
+
|
|
189
|
+
### Info (Observations)
|
|
190
|
+
- [Observation]
|
|
191
|
+
|
|
192
|
+
### Project Rules Compliance
|
|
193
|
+
| Rule Source | Status | Details |
|
|
194
|
+
|-------------|--------|---------|
|
|
195
|
+
| ... | ... | ... |
|
|
196
|
+
|
|
197
|
+
### Requirements Status (if ticket linked)
|
|
198
|
+
| Requirement | Status | Evidence |
|
|
199
|
+
|-------------|--------|----------|
|
|
200
|
+
| ... | ... | ... |
|
|
201
|
+
|
|
202
|
+
### Threat Model Summary
|
|
203
|
+
| Feature | Primary Risks | Mitigations Present |
|
|
204
|
+
|---------|---------------|---------------------|
|
|
205
|
+
| ... | ... | ... |
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
If no findings in a severity level, omit that section.
|
|
209
|
+
|
|
210
|
+
### Phase 5: User Decisions
|
|
211
|
+
|
|
212
|
+
Use AskUserQuestion:
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
For each finding, select handling:
|
|
216
|
+
- NOTE: Include in PR review comment
|
|
217
|
+
- ISSUE: Create separate GitHub issue
|
|
218
|
+
- IGNORE: Don't include in review
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Phase 6: Create Issues (if selected)
|
|
222
|
+
|
|
223
|
+
Group by category, include:
|
|
224
|
+
- PR number
|
|
225
|
+
- Branch name
|
|
226
|
+
- Link to original ticket (if found)
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
gh issue create --title "[Category] findings from PR #[PR]" --body "$(cat <<'EOF'
|
|
230
|
+
## [Category] Findings from PR #[PR]
|
|
231
|
+
|
|
232
|
+
**PR**: #[PR_NUMBER]
|
|
233
|
+
**Branch**: [branch]
|
|
234
|
+
[**Related Ticket**: #[TICKET] — only if ticket found]
|
|
235
|
+
|
|
236
|
+
### Findings
|
|
237
|
+
|
|
238
|
+
- [ ] [Finding 1] - `file:line`
|
|
239
|
+
- [ ] [Finding 2] - `file:line`
|
|
240
|
+
|
|
241
|
+
### Context
|
|
242
|
+
|
|
243
|
+
[Brief context about the PR's purpose]
|
|
244
|
+
EOF
|
|
245
|
+
)"
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Phase 7: Post Review Comment (NEVER APPROVE)
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
gh pr review $PR --comment --body "$(cat <<'EOF'
|
|
252
|
+
## Automated Review
|
|
253
|
+
|
|
254
|
+
**Status**: Requires human approval
|
|
255
|
+
|
|
256
|
+
### Summary
|
|
257
|
+
|
|
258
|
+
[Overall assessment - 2-3 sentences]
|
|
259
|
+
|
|
260
|
+
### Critical Issues (Must Address)
|
|
261
|
+
- [Issue with file:line]
|
|
262
|
+
|
|
263
|
+
### Required Changes
|
|
264
|
+
- [Specific change needed]
|
|
265
|
+
|
|
266
|
+
### Suggestions
|
|
267
|
+
- [Nice-to-have improvements]
|
|
268
|
+
|
|
269
|
+
### Project Rules Compliance
|
|
270
|
+
- [Summary of rules adherence]
|
|
271
|
+
|
|
272
|
+
### Security Considerations
|
|
273
|
+
- [Key security points for human reviewer]
|
|
274
|
+
|
|
275
|
+
### Test Coverage
|
|
276
|
+
- [Coverage assessment]
|
|
277
|
+
- [Manual test recommendations if applicable]
|
|
278
|
+
|
|
279
|
+
### Requirements Status (if ticket linked)
|
|
280
|
+
| Requirement | Status |
|
|
281
|
+
|-------------|--------|
|
|
282
|
+
| ... | ... |
|
|
283
|
+
|
|
284
|
+
### Related Issues Created
|
|
285
|
+
- #[N]: [Description]
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
*Automated review by Claude. Human approval required before merge.*
|
|
289
|
+
EOF
|
|
290
|
+
)"
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Phase 8: Report
|
|
294
|
+
|
|
295
|
+
Output summary:
|
|
296
|
+
|
|
297
|
+
```markdown
|
|
298
|
+
## Review Summary
|
|
299
|
+
|
|
300
|
+
- **PR**: #[N] — [title]
|
|
301
|
+
- **Findings**: [Critical: N, High: N, Medium: N, Low: N, Info: N]
|
|
302
|
+
- **Review**: Posted as comment
|
|
303
|
+
- **Issues Created**: #[N]: [category] — or "None"
|
|
304
|
+
- **Ticket**: #[TICKET] requirements verified — or "No linked ticket"
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Rules
|
|
308
|
+
|
|
309
|
+
- **NEVER approve or merge** — post review as comment only
|
|
310
|
+
- **Deeper than commit review** — this is the final gate before merge
|
|
311
|
+
- **Active threat modeling** required for each significant feature
|
|
312
|
+
- **All findings** categorized by severity with `file:line` references
|
|
313
|
+
- **User decides** what goes in the review comment
|
|
314
|
+
- **Check project rules** (CLAUDE.md, .claude/rules/*.md) thoroughly
|
|
315
|
+
- **Auto-detect ticket** from PR body if possible — never prompt for one
|
|
316
|
+
- **Read full files** for changed code, not just the diff
|
|
317
|
+
- Batch all GitHub operations
|
|
318
|
+
|
|
319
|
+
## Severity Guide
|
|
320
|
+
|
|
321
|
+
**Critical**: Active vulnerability, data exposure, auth bypass, breaking production
|
|
322
|
+
**High**: Security weakness, significant bug, major pattern violation
|
|
323
|
+
**Medium**: Code smell, minor vulnerability, missing validation
|
|
324
|
+
**Low**: Style, optimization, minor improvements
|
|
325
|
+
**Info**: Observations, questions, future considerations
|