HARD GATE before PR creation - verifies review artifact exists in issue comments, all findings addressed or tracked, blocks PR creation if requirements not met
Blocks PR creation until review requirements are satisfied. Triggers on `gh pr create` to verify review artifact exists in issue comments with all findings addressed or tracked.
/plugin marketplace add troykelly/claude-skills/plugin install issue-driven-development@troykelly-skillsThis skill is limited to using the following tools:
Hard compliance gate that BLOCKS PR creation until review requirements are satisfied.
Core principle: No PR without proof of review. No exceptions.
This is enforced by hooks. Even if you attempt to skip this skill, the PreToolUse hook on gh pr create will block the action.
ALL must be satisfied to create a PR:
┌──────────────────────────────────────────────────────────────────────────┐
│ REVIEW GATE │
├──────────────────────────────────────────────────────────────────────────┤
│ [ ] Review artifact posted to issue (<!-- REVIEW:START --> format) │
│ [ ] Review status is COMPLETE (not BLOCKED or IN_PROGRESS) │
│ [ ] Unaddressed findings = 0 │
│ [ ] All deferred findings have tracking issues (linked in artifact) │
│ [ ] Security review complete (if security-sensitive code changed) │
├──────────────────────────────────────────────────────────────────────────┤
│ ALL SATISFIED → PR CREATION ALLOWED │
│ ANY MISSING → PR CREATION BLOCKED │
└──────────────────────────────────────────────────────────────────────────┘
# Query issue comments for review artifact
ISSUE_NUMBER=123
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
REVIEW_EXISTS=$(gh api "/repos/$REPO/issues/$ISSUE_NUMBER/comments" \
--jq '[.[] | select(.body | contains("<!-- REVIEW:START -->"))] | length')
if [ "$REVIEW_EXISTS" -eq 0 ]; then
echo "BLOCKED: No review artifact found"
fi
Extract from the latest review artifact:
# Get latest review comment
REVIEW_BODY=$(gh api "/repos/$REPO/issues/$ISSUE_NUMBER/comments" \
--jq '[.[] | select(.body | contains("<!-- REVIEW:START -->"))] | last | .body')
# Check status
if echo "$REVIEW_BODY" | grep -q "Review Status.*COMPLETE"; then
echo "Review status: COMPLETE"
elif echo "$REVIEW_BODY" | grep -q "Review Status.*BLOCKED"; then
echo "BLOCKED: Review status is BLOCKED_ON_DEPENDENCIES"
fi
# Extract unaddressed count
UNADDRESSED=$(echo "$REVIEW_BODY" | grep -oP 'Unaddressed[:\s|]+\K\d+' | head -1)
if [ "$UNADDRESSED" != "0" ]; then
echo "BLOCKED: $UNADDRESSED unaddressed findings"
fi
For each deferred finding, verify a tracking issue exists and is linked:
# Each deferred finding must have format: | Finding | ... | #NNN | ...
DEFERRED_WITHOUT_ISSUE=$(echo "$REVIEW_BODY" | grep -i "DEFERRED" | grep -cv "#[0-9]" || echo "0")
if [ "$DEFERRED_WITHOUT_ISSUE" -gt 0 ]; then
echo "BLOCKED: $DEFERRED_WITHOUT_ISSUE deferred findings without tracking issues"
fi
If files matching security-sensitive patterns were changed:
# Check if security-sensitive files changed
SECURITY_FILES=$(git diff --name-only HEAD~1 | grep -E '(auth|security|middleware|api|password|token|secret)')
if [ -n "$SECURITY_FILES" ]; then
# Verify security review section exists in artifact
if ! echo "$REVIEW_BODY" | grep -q "Security-Sensitive.*YES"; then
echo "BLOCKED: Security-sensitive files changed but no security review"
fi
fi
The review artifact MUST follow this exact format for machine parsing:
<!-- REVIEW:START -->
## Code Review Complete
| Property | Value |
|----------|-------|
| Worker | `[WORKER_ID]` |
| Issue | #[ISSUE_NUMBER] |
| Scope | [MINOR|MAJOR] |
| Security-Sensitive | [YES|NO] |
| Reviewed | [ISO_TIMESTAMP] |
### Criteria Results
| # | Criterion | Status | Findings |
|---|-----------|--------|----------|
| 1 | Blindspots | [✅ PASS|✅ FIXED|⚠️ DEFERRED] | [N] |
| 2 | Clarity | [✅ PASS|✅ FIXED|⚠️ DEFERRED] | [N] |
| 3 | Maintainability | [✅ PASS|✅ FIXED|⚠️ DEFERRED] | [N] |
| 4 | Security | [✅ PASS|✅ FIXED|⚠️ DEFERRED|N/A] | [N] |
| 5 | Performance | [✅ PASS|✅ FIXED|⚠️ DEFERRED] | [N] |
| 6 | Documentation | [✅ PASS|✅ FIXED|⚠️ DEFERRED] | [N] |
| 7 | Style | [✅ PASS|✅ FIXED|⚠️ DEFERRED] | [N] |
### Findings Fixed in This PR
| # | Severity | Finding | Resolution |
|---|----------|---------|------------|
| 1 | [SEVERITY] | [DESCRIPTION] | [HOW_FIXED] |
### Findings Deferred (With Tracking Issues)
| # | Severity | Finding | Tracking Issue | Justification |
|---|----------|---------|----------------|---------------|
| 1 | [SEVERITY] | [DESCRIPTION] | #[ISSUE] | [WHY] |
### Summary
| Category | Count |
|----------|-------|
| Fixed in PR | [N] |
| Deferred (with tracking) | [N] |
| Unaddressed | 0 |
**Review Status:** [✅ COMPLETE|⏸️ BLOCKED_ON_DEPENDENCIES]
<!-- REVIEW:END -->
REVIEW GATE BLOCKED
Reason: No review artifact found in issue #123
Required Action:
1. Perform comprehensive-review
2. Post review artifact to issue #123 using standard format
3. Address all findings or create tracking issues
4. Retry PR creation
Hint: Use the code-reviewer subagent to perform review.
REVIEW GATE BLOCKED
Reason: 3 unaddressed findings in review artifact
Required Action:
1. Fix the unaddressed findings, OR
2. Create tracking issues and update artifact with links
3. Ensure "Unaddressed: 0" in artifact summary
4. Retry PR creation
REVIEW GATE BLOCKED
Reason: Security-sensitive files changed without security review
Files detected:
- src/auth/login.ts
- src/middleware/authenticate.ts
Required Action:
1. Invoke security-reviewer subagent
2. Update review artifact with "Security-Sensitive: YES"
3. Document security review findings
4. Retry PR creation
Before attempting PR creation:
comprehensive-review skill completedThis skill is enforced by:
PreToolUse hook on Bash (filters gh pr create)This skill is called after:
comprehensive-reviewapply-all-findingssecurity-review (if applicable)This skill precedes:
pr-creationThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.