<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rulesets/finish-branch/SKILL.md, branch main</title>
<subtitle>Claude Code skills, rules, and language bundles
</subtitle>
<id>https://git.cjennings.net/rulesets/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/rulesets/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/'/>
<updated>2026-04-19T22:23:37+00:00</updated>
<entry>
<title>feat(rules): add subagents.md — when, how, and when not to delegate</title>
<updated>2026-04-19T22:23:37+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-19T22:23:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/commit/?id=c96296a30e3f712561b5f05f3f1e9d95588f643e'/>
<id>urn:sha1:c96296a30e3f712561b5f05f3f1e9d95588f643e</id>
<content type='text'>
Cross-cutting rule covering subagent hygiene:

- Decision table: parallel-safe (read-only investigation, independent
  test failures, multi-domain research) vs sequential-with-review
  (plan execution, coupled edits) vs never-parallel (concurrent writes)
  vs don't-subagent-at-all (target known, work fits in ~10 tool calls).
- Prompt contract: scope / pasted context / explicit 'do NOT' list /
  required output format. Missing any field yields shallow work.
- Context-pollution rule: subagents absorb noise the main thread
  shouldn't carry. When one fails, dispatch a fix-agent with the
  failure report — do not retry in the orchestrator.
- Review-gate cadence: after each sequential task, or every ~3 in
  parallel batches.
- Anti-patterns including parallel implementation on overlapping
  files, broad 'fix all the tests' prompts, timeout-tuning to mask
  flakes, and letting the agent decide scope.

Added one-line cross-references to subagents.md from debug/,
review-code/, and finish-branch/ SKILL.md — the skills that most
rely on delegation.

Clean-room synthesis from NeoLabHQ/context-engineering-kit's
subagent-driven-development pattern (MIT).
</content>
</entry>
<entry>
<title>feat: add finish-branch skill (clean-room synthesis from obra/superpowers pattern)</title>
<updated>2026-04-19T21:41:58+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-19T21:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/commit/?id=8127307278160a2a7a744169180d2eea7c3bf731'/>
<id>urn:sha1:8127307278160a2a7a744169180d2eea7c3bf731</id>
<content type='text'>
Clean-room synthesis of the 'finishing a development branch' pattern from
obra/superpowers (MIT) — adopted as the forced-choice workflow scaffold,
not the substantive rules. Substantive rules defer to existing ones:
- Verification → verification.md
- Commit conventions + no AI attribution → commits.md
- Review discipline → review-code

Core patterns implemented:
- Phase 1 verify-before-options (hard-stop on failing tests)
- Phase 2 base branch + commit range + worktree detection
- Phase 3 forced-choice menu (exactly 4 options, no editorializing, stop+wait)
- Phase 4 execution per-option with:
  - Option 1 (merge locally): re-verify after merge, delete branch, prompt
    about remote-branch cleanup separately
  - Option 2 (push + PR): gh pr create with inline template (no AI
    attribution in the body); do NOT remove worktree
  - Option 3 (keep): no git state changes; preserve worktree
  - Option 4 (discard): typed-word "discard" confirmation gate required;
    lists what will be permanently lost; force-delete + remote cleanup
- Phase 5 worktree cleanup matrix (cleanup for 1 and 4; preserve for 2 and 3)

Notable over the upstream superpowers skill:
- Explicit delegation to verification.md / commits.md / review-code rather
  than re-teaching those standards inline
- Cross-references to /review-code (pre) and /arch-evaluate (if architectural)
- Handles remote-branch cleanup question separately from local branch
  (upstream conflates them)
- "Common Mistakes" section names the specific failure modes this skill
  prevents (open-ended "what now", accidental deletes, merge-then-oops,
  worktree amnesia, trailing AI attribution in PRs)

Rubric coverage vs upstream: M (verify → options → execute → cleanup);
M (forced-choice menu pattern); M (typed-discard confirmation gate);
M (worktree cleanup matrix); M (hard-stop on failing tests);
+ (explicit deferral to existing rules vs upstream's inline rules);
+ (remote-branch cleanup as separate prompt); + (skill integration notes
for /review-code and /arch-evaluate); no dropped capabilities.

Makefile SKILLS extended; make install symlinks globally at
~/.claude/skills/finish-branch.
</content>
</entry>
</feed>
