From sdd
Closes the SDD loop after a PR merges by consolidating review findings, post-review commits, and user-stated lessons into the repo-scoped wiki. Locates the preliminary wiki page by PR number, gathers post-merge context via gh CLI, then delegates to /sdd:wiki-ingest --final with cross-references back to the preliminary. Use when user says "close loop", "wiki close-loop", "post-merge ingest", "archive lessons", or after merging a PR that has a preliminary wiki entry. Do NOT use before the PR is merged — the lessons are not yet final. Do NOT use for spec/plan/tasks ingestion (that is /ship Step 9).
npx claudepluginhub robertraf/rob-agent-workflow --plugin sddThis skill is limited to using the following tools:
You are closing the SDD loop: **Consolidate what happened after `/ship` into the wiki.**
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
You are closing the SDD loop: Consolidate what happened after /ship into the wiki.
Between /ship and merge, a PR accumulates real information: review comments, CI failures, post-review commits, architectural changes the reviewer forced. This skill captures that signal as lessons-* and review-findings-* pages cross-linked to the preliminary entries.
If the user passed a PR number as argument, use it. Otherwise infer from the current branch:
gh pr view --json number,headRefName,state,mergedAt,url,title,body
If no PR is associated with the current branch, ask the user for the PR number or a branch name to inspect.
Validate the state:
lessons-* page about why the PR was abandoned.Search .wiki/ for a page with matching pr_number: in frontmatter:
grep -lE "^pr_number: <PR_NUMBER>$" .wiki/*.md 2>/dev/null
You may find 0-3 preliminary pages (spec, plan, tasks-summary). Record their filenames — they become related: targets for the final pages.
If no preliminary page exists, ask the user whether to continue with a standalone final ingest (no cross-links) or to abort.
If .wiki/ does not exist, run bash "${CLAUDE_PLUGIN_ROOT}/skills/wiki-ingest/scripts/wiki-init.sh" first.
Pull everything that tells the story of what changed between /ship and merge:
# Review comments and conversation
gh pr view <N> --json reviews,comments,reviewRequests
# Commits added after the PR was opened
gh pr view <N> --json commits
# Final merged diff summary
gh pr diff <N> --name-only 2>/dev/null || true
Summarize for the user before writing:
/ship (fixes, refactors triggered by review).Ask the user to state the lessons — 2-5 bullets about what to remember next time. Do not fabricate these. If the user has none, skip the lessons-* page and write only review-findings-*.
Preview what will be written:
review-findings-YYYY-MM-DD-<slug>.md — with summary of review + post-review changeslessons-YYYY-MM-DD-<slug>.md — only if the user provided lessonsrelated: to each preliminary page found in Step 2Ask: "Proceed with final ingestion?" Wait for explicit yes. Decline = clean exit, nothing written.
/sdd:wiki-ingest --finalHand off the gathered artifacts to /sdd:wiki-ingest --final, passing:
related:)wiki-ingest handles: frontmatter, collision checks, index update, log append.
If Step 1 found the PR was closed-not-merged and preliminary pages exist:
Ask the user:
"PR #N was closed without merging. Delete the preliminary wiki pages (), or keep them as historical record?"
Act only on explicit confirmation. Never auto-delete.
Report:
✓ Close-loop complete for PR #<N>
Final pages: <list>
Cross-linked to preliminary: <list>
Log entry appended.
Remind the user to commit the wiki changes when ready.
final page implies the change is done and the lessons are settled. If the PR is still open, the lessons may change. Warn the user and let them decide.lessons-* page must come from the user. Do not invent bullets to pad the page.pr_number. Silent standalone writes break the cross-reference graph.main and no PR number was passed, you cannot infer which PR to close. Ask the user./sdd:wiki-ingest. This skill does not edit .wiki/ files directly..claude/rules/git-conventions.md..wiki/ is not an error — init it via wiki-init.sh before delegating..claude/rules/wiki-conventions.md/sdd:wiki-ingest --final