Skip to content
Development
Command

/summary

**Navigation**: [<- Issue Linkage](issue-linkage.md) | [Step 6 Hub](../6-complete.md) | [Next: Verification ->](verification.md)

From plugin
claude-night-market
325163 skills59 agents163 commands1 MCP
Install
$ npx -y skills add athola/claude-night-market --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/summary

Context preview

What this command does when you run it.

**Navigation**: [<- Issue Linkage](issue-linkage.md) | [Step 6 Hub](../6-complete.md) | [Next: Verification ->](verification.md)

Command definition

summary.md

Step 6.5: Post Summary Comment

> **Navigation**: [<- Issue Linkage](issue-linkage.md) | [Step 6 Hub](../6-complete.md) | [Next: Verification ->](verification.md)

**Purpose**: Post a summary comment to the PR documenting all actions taken.

---

6.5 Post Summary Comment (MANDATORY)

Issue Linkage Summary

Include this table in the summary:

### Issue Linkage Summary

| Issue | Title | Status | Action Taken |
|-------|-------|--------|--------------|
| #42 | Add user authentication | Fully Addressed | Commented + Closed |
| #43 | Fix validation bugs | Partially Addressed | Commented (3 items remaining) |
| #44 | Improve performance | Not Related | Skipped |

**Closed Issues:** 1
**Partially Addressed:** 1 (follow-up items documented)
**Not Related:** 1

---

Output hygiene (MANDATORY before posting)

The summary comment, thread replies, and any issue body posted in Step 6 are emitted text and MUST pass `../../shared/output-hygiene.md` (Contract A). Scrub each body before sending. Inline fallback if that module is absent: replace `"+"` used as a conjunction with `and` (keep `+` in versions and code), em-dash `—` with a colon or a rewrite, prose `--` with a colon or a rewrite, arrows `->` / `→` with `to` or `into`, and smart quotes `“ ” ‘ ’` with straight `"` and `'`.

# $BODY holds the summary/reply about to be posted.
printf '%s\n' "$BODY" | grep -nE '\w \+ \w' && echo "fix: '+' conjunction"
printf '%s\n' "$BODY" | grep -n '—'          && echo "fix: em-dash"
printf '%s\n' "$BODY" | grep -n ' -- '         && echo "fix: double-dash"
printf '%s\n' "$BODY" | grep -nE '[^`]( -> | → )[^`]' && echo "fix: arrow"

Correct any match in `$BODY` before the `gh pr comment` call below.

Post Summary Comment

After completing all fixes, thread resolutions, and issue linkage, post a detailed summary comment to the PR.

gh pr comment PR_NUMBER --body "$(cat <<'EOF'
## PR Review Feedback Addressed

All issues from the code review have been fixed in commit `COMMIT_SHA`.

### Blocking Issues (N) [FIXED]

| ID | Issue | Resolution |
|----|-------|------------|
| **B1** | [Description] | [How it was fixed] |

### In-Scope Issues (N) [FIXED]

| ID | Issue | Resolution |
|----|-------|------------|
| **S1** | [Description] | [How it was fixed] |

### Suggestions Created (N)

| Review Item | Issue Created | Description |
|-------------|---------------|-------------|
| S2 | #43 | [Description] |
| S3 | #44 | [Description] |

Or: **None** - All suggestions were addressed directly in this PR.

### Deferred Items Created (N)

| Review Item | Issue Created | Description |
|-------------|---------------|-------------|
| C2 | #41 | [Description] |

Or: **None** - No deferred/out-of-scope items identified.

---

Ready for re-review. All pre-commit hooks pass.
EOF
)"

**Summary Comment Requirements:**

  • Include commit SHA for reference
  • Group fixes by category (Blocking, In-Scope)
  • List suggestions that were fixed directly vs. suggestions that created issues
  • List deferred items that created issues
  • Use tables for clarity
  • End with clear status ("Ready for re-review")

---

6.5b Ensure PR Description Has Test Plan (MANDATORY)

> **Module**: [test-plan-injection](../../../shared/test-plan-injection.md)

After posting the summary comment, check whether the PR description body contains a detailed test plan section. If missing, generate one from the triage data and inject it into the body.

Detection

# Fetch current PR body
CURRENT_BODY=$(gh pr view $PR_NUMBER --json body \
  --jq '.body // empty')

# Check for recognized test plan headings
TEST_PLAN_HEADING='##+ (Test [Pp]lan|Manual Test|Verification Steps)'
HAS_HEADING=$(echo "$CURRENT_BODY" | \
  grep -ciE "$TEST_PLAN_HEADING" || true)
CHECKBOX_COUNT=$(echo "$CURRENT_BODY" | \
  grep -c '- \[[ x]\]' || true)

if [[ "$HAS_HEADING" -gt 0 ]] && \
   [[ "$CHECKBOX_COUNT" -ge 3 ]]; then
  echo "Test plan already present in PR description"
  # Skip injection
else
  echo "No detailed test plan found, generating..."
  # Proceed to generation
fi

Generation

Build a test plan from the fix-pr triage data (fixed items, changed files, quality gate commands):

# Collect changed files grouped by area
CHANGED_FILES=$(git diff --name-only \
  origin/$BASE_BRANCH...HEAD)

# Build test plan from fixed items
TEST_PLAN="## Test Plan

### Prerequisites
- [ ] Branch is up to date with base branch
- [ ] Dependencies installed (\`uv sync\` or \`npm install\`)

### Verification Steps
"

# For each fixed blocking/in-scope item from triage
AREA_NUM=1
for ITEM in "${FIXED_ITEMS[@]}"; do
  ITEM_ID=$(echo "$ITEM" | cut -d'|' -f1)
  ITEM_FILE=$(echo "$ITEM" | cut -d'|' -f2)
  ITEM_DESC=$(echo "$ITEM" | cut -d'|' -f3)

  TEST_PLAN+="
#### $AREA_NUM. $ITEM_ID: $ITEM_DESC
**Files:** \`$ITEM_FILE\`

1. [ ] Review the fix at \`$ITEM_FILE\`
2. [ ] Run relevant tests for this area
3. [ ] Expected: issue resolved, no regression
"
  AREA_NUM=$((AREA_NUM + 1))
done

TEST_PLAN+="
### Build & Quality Gates
\`\`\`bash
make test && make lint
\`\`\`

### Summary
| Area | Steps | Verified |
|------|-------|----------|"

for ITEM in "${FIXED_ITEMS[@]}"; do
  ITEM_ID=$(echo "$ITEM" | cut -d'|' -f1)
  TEST_PLAN+="
| $ITEM_ID | 3 | [ ] |"
done

Injection

# Insert before Code Review Summary if present
if echo "$CURRENT_BODY" | \
  grep -q '### Code Review Summary'; then
  NEW_BODY=$(echo "$CURRENT_BODY" | \
    sed "/### Code Review Summary/i\\
\\
${TEST_PLAN}\\
\\
---\\
")
else
  # Append at end
  NEW_BODY="${CURRENT_BODY}

---

${TEST_PLAN}"
fi

# Update PR body via API
if gh api "repos/{owner}/{repo}/pulls/$PR_NUMBER" \
  -X PATCH -f body="$NEW_BODY" 2>/dev/null; then
  echo "✅ Test plan injected into PR #$PR_NUMBER description"
else
  # Fallback: post as comment
  gh pr comment $PR_NUMBER --body "$TEST_PLAN"
  echo "⚠️ Posted test plan as comment (body update failed)"
fi

**Test plan sources for fix-pr:** -

Read more
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

Get the whole plugin, auto-invoked
Stats
325
Stars
0
Views
35
Forks
Active
Maintenance
Python
Language
MIT
License
1d ago
Last commit
8mo ago
Created

Repo: athola/claude-night-market