docs: add active work item for /merged post-PR cleanup skill#14
Conversation
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
trev-gulls
left a comment
There was a problem hiding this comment.
I'm considering changing the name to /merge since I want this to work when a user is getting ready to merge, wants to merge or has merged. In the first case getting ready claude should verify task tracking / work items are completed (acceptance criteria met or deferred to after merge and tasks marked completed or pending release as appropriate). Then present user with options to have claude merge or merge manually (provide https link) and if claude merging ask which merge method to use (from available methods in repo). Then once merged cleanup local state (delete branch and remove worktree). Basically always go through all three stages to verify or complete actions in each step.
Renames from /merged to /merge and expands scope to cover pre-merge task verification, the merge itself (with repo-aware method selection), and post-merge local cleanup as a single always-sequential workflow. Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
tg-agent
left a comment
There was a problem hiding this comment.
Updated. Work item revised to reflect the 3-stage sequential workflow:
- Pre-merge — verify task tracking (AC met, or defer as pending-release/completed-with-notes)
- Merge — detect available merge methods from repo settings, offer Claude-merge or manual-with-link, wait for merge before continuing
- Post-merge — pull latest, delete branch, remove worktree
Renamed to /merge and updated the skill path to skills/merge/SKILL.md.
One open question captured in the notes: task-track only has pending/active/completed — no pending-release. Leaning toward treating it as a frontmatter convention only (no changes to task-track needed), but flagged for a decision during implementation.
Stage 1 now detects the project's tracking convention (file-based docs/work/, Linear, Jira, GitHub Projects, Asana, or custom) rather than assuming task-track. Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
- Explicit detection source priority order (env > mcp > cli > fs > cfg) - Clarify Stage 1 panel layout for multiple work items Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Broader framing (UX not just formatting), covers piped commands, structured AC with explicit evaluation step and model-generation reliability dimension. Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Replace fragile &&/|| bool idiom with explicit if/else statement for uncommitted changes detection. Add clarifying comments to awk branch guard (detached-HEAD worktree filtering) and has_cmd function. Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
trev-gulls
left a comment
There was a problem hiding this comment.
post-impl revisions to the plan
|
|
||
| **Files:** | ||
| - Create: `skills/merge/scripts/merge-context.sh` (stub only) | ||
| - Create: `skills/merge/scripts/merge_context_test.py` |
There was a problem hiding this comment.
Why did you pick python for the test suite? I'm not saying no, just would like to understand the decision.
There was a problem hiding this comment.
Python was chosen for three reasons: (1) the existing hook tests are already Python/pytest — keeping the same language means one toolchain, one test command; (2) Python's subprocess module is the natural fit for invoking shell scripts and inspecting their stdout/stderr/exit code; (3) pytest's fixture system (tmp_path, monkeypatch) handles the env and filesystem isolation the detection tests need. The alternative would have been bats or a plain sh test script, but those don't integrate with the existing test suite or give the same assertion clarity.
| mkdir -p skills/merge/scripts | ||
| ``` | ||
|
|
||
| Create `skills/merge/scripts/merge-context.sh`: |
There was a problem hiding this comment.
Renamed to merge_context.sh (underscore) for consistency with merge_context_test.py. Updated all references in SKILL.md, the test file, plan docs, and the file's own header comment. Commit: 3313fb1.
There was a problem hiding this comment.
The testing methedology for the script is great.
Since this skill has some complex logic, I'd like to explore possible ways to run evals in addition to tests.
Evals generally test model behavior by detecting side effects like expected tools calls, environment changes (ex. filesystem) and grading natural language content like agent output and written prose dcouments.
There was a problem hiding this comment.
Added a backlog item at docs/work/backlog/2026-03-27-merge-skill-evals.md covering 8 scenarios (stage 1 task tracking, stage 2 all 4 paths, stage 3 safe vs force delete). The approach is a pytest harness that mocks merge_context.sh output, invokes the skill, and asserts on tool calls made, filesystem state, and graded model output. Left the CI vs manual question open — added it as a note in the backlog item since cost/latency of model evals in CI is worth discussing separately.
Consistent underscore naming to match merge_context_test.py. Update all references in SKILL.md, tests, and plan docs. Also add evals backlog item for model behavior testing. Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
All AC met at the skill level. Force-delete hook gate and model behavior evals tracked as separate backlog items. Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
- Move evals work item backlog → active - Add 4 new eval scenarios from live PR #14 test (bugs 2–5) - Clear blocked-by now that merge skill is complete - Reference docs/ops/igit-merge-test-and-debug.md from work item Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
- Move evals work item backlog → active - Add 4 new eval scenarios from live PR #14 test (bugs 2–5) - Clear blocked-by now that merge skill is complete - Reference docs/ops/igit-merge-test-and-debug.md from work item Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
Summary
/mergedskillsuperpowers:finishing-a-development-branchTest Plan
docs/work/active/2026-03-27-merged-skill.md— goal and acceptance criteria are clear and actionable/mergedas post-merge only (not overlapping withfinishing-a-development-branch)🤖 Generated with Claude Code