aggregate-logs
Generate LEARNINGS.md from skill execution logs over a configurable time window.
**Navigation**: [<- Issue Linkage](issue-linkage.md) | [Step 6 Hub](../6-complete.md) | [Next: Verification ->](verification.md)
> /plugin marketplace add athola/claude-night-marketHow it fires
How this command gets triggered: by you, by Claude, or both.
/summaryContext 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)
> **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.
---
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
---
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.
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:**
---
> **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.
# 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
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# 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:** -
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.
Generate LEARNINGS.md from skill execution logs over a configurable time window.
Analyze skill file complexity metrics and generate modularization recommendations for splitting or progressive loading.
Scaffold new Claude Code skills with brainstorming, TDD methodology, and proper frontmatter and module structure.