Skip to content

docs: add active work item for /merged post-PR cleanup skill#14

Merged
trev-gulls merged 20 commits into
mainfrom
feature/merged-skill
Mar 27, 2026
Merged

docs: add active work item for /merged post-PR cleanup skill#14
trev-gulls merged 20 commits into
mainfrom
feature/merged-skill

Conversation

@tg-agent
Copy link
Copy Markdown
Collaborator

Summary

  • Adds active task tracking entry for the new /merged skill
  • Scopes the skill as a post-merge complement to superpowers:finishing-a-development-branch
  • Defines acceptance criteria covering branch detection, PR verification, local cleanup, worktree removal, and task tracking integration

Test Plan

  • Review docs/work/active/2026-03-27-merged-skill.md — goal and acceptance criteria are clear and actionable
  • Confirm the scope correctly positions /merged as post-merge only (not overlapping with finishing-a-development-branch)

🤖 Generated with Claude Code

Co-Authored-By: Trevor Gullstad <tech.gulls@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@trev-gulls trev-gulls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/work/active/2026-03-27-merged-skill.md Outdated
Comment thread docs/work/active/2026-03-27-merged-skill.md Outdated
Comment thread docs/work/active/2026-03-27-merged-skill.md Outdated
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>
Copy link
Copy Markdown
Collaborator Author

@tg-agent tg-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Work item revised to reflect the 3-stage sequential workflow:

  1. Pre-merge — verify task tracking (AC met, or defer as pending-release/completed-with-notes)
  2. Merge — detect available merge methods from repo settings, offer Claude-merge or manual-with-link, wait for merge before continuing
  3. 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>
Comment thread docs/work/active/2026-03-27-merge-skill.md Outdated
tg-agent and others added 14 commits March 27, 2026 08:48
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>
Copy link
Copy Markdown
Collaborator

@trev-gulls trev-gulls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

post-impl revisions to the plan


**Files:**
- Create: `skills/merge/scripts/merge-context.sh` (stub only)
- Create: `skills/merge/scripts/merge_context_test.py`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you pick python for the test suite? I'm not saying no, just would like to understand the decision.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge_context.sh

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

tg-agent and others added 3 commits March 27, 2026 11:48
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>
@trev-gulls trev-gulls merged commit 9fef368 into main Mar 27, 2026
trev-gulls added a commit that referenced this pull request Mar 27, 2026
- 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>
trev-gulls added a commit that referenced this pull request Mar 30, 2026
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants