Source: /insights session analysis (122 hours · 160 commits · 43 sessions)
Triage
| Priority |
Item |
Effort |
Section |
| P0 |
Squash-merge branch cleanup |
Low |
Friction |
| P0 |
mkdocs --strict PostToolUse hook template |
Low |
New Ways |
| P1 |
/release Skill |
Medium |
New Ways |
| P1 |
Headless mode docs + recipes |
Low |
New Ways |
| P2 |
Autonomous release pipeline agent |
High |
On the Horizon |
| P2 |
Docs-drift reconciliation agent |
High |
On the Horizon |
| P3 |
TDD swarm pattern |
High |
On the Horizon |
Friction Fixes
Fix: squash-merge-aware branch cleanup
Branch cleanup deadlocks: squash-merged branches refuse git branch -d (not in ancestry) while branch-guard blocks force delete.
Solution: use git cherry <base> <branch> — if all commits are prefixed -, content is in base regardless of ancestry. Safe to force-delete.
# Confirm squash-merge before force-delete
git cherry dev <branch> | grep -v '^-' | grep -q '.' && echo "NOT merged" || echo "SAFE to delete"
New Ways to Use Claude Code
1. Custom Skills — codify /release as a Skill
The release workflow is the #1 repeated pipeline (14 sessions). Recurring friction: version/count/schema drift across files, Homebrew auto-bump firing with wrong version.
Proposed skills/release/SKILL.md:
- Verify clean working tree
- Reconcile versions across ALL surfaces: README badge · CHANGELOG · plugin.json · hub.md counts · mkdocs.yml
extra.version · lockfiles · footers
- Open release PR (multi-branch:
dev → main; single-integration: feature → main)
- Merge after CI green
- Tag + publish
- Patch Homebrew formula if auto-bump fires wrong version
- Update
.STATUS, push
2. Hooks — mkdocs --strict PostToolUse hook template
CI has no mkdocs build --strict gate — macros/Jinja errors and dead links stay invisible until a manual build. A PostToolUse hook surfaces failures immediately.
{
"hooks": {
"PostToolUse": [{
"matcher": "Edit|Write",
"command": "[ -f mkdocs.yml ] && mkdocs build --strict 2>&1 | tail -8 || true"
}]
}
}
3. Headless Mode — batch docs audits and release tasks from scripts/CI
Many release/doc tasks (version reconcile, count audit, doc sweep) don't need interactive sessions.
Example recipes:
# Reconcile version references after a bump
claude -p "grep for old version X.Y.Z across all docs and config files, update to A.B.C" \
--allowedTools "Edit,Read,Bash"
# Audit docs for count/schema drift
claude -p "audit docs/ for skill count drift vs tests/fixtures/expected-counts.js" \
--allowedTools "Read,Bash"
# Post-release doc sweep
claude -p "verify all doc version references match package.json version" \
--allowedTools "Read,Edit,Bash"
On the Horizon
Autonomous release pipeline agent
Sessions repeatedly cut off mid-pipeline (Homebrew check, CI polling, pak conflicts). A background agent that owns the full lifecycle without babysitting:
Phase 1 — Pre-release: version bump + full surface reconcile + open PR
Phase 2 — CI watch (background agent): poll CI every ~60s · on green: merge + tag + publish · self-correct known failures: Homebrew wrong-version → patch formula; pak/Remotes conflict → suggest pin; stale pathspec → re-stage
Phase 3 — Cleanup: update .STATUS · verify squash-merged branches via git cherry before delete
Docs-drift reconciliation agent
Docs reconciliation (count drift, phantom refs, broken examples) recurs every release. A standing agent that diffs shipped features against docs and files targeted PRs:
Audit pass: crawl docs/** · compare against exported functions + expected-counts · detect phantom refs · spot-check code examples · flag jargon forward-refs · check hub.md Gate 2/3
PR generation: one focused PR per confirmed gap · group related fixes · dedup against open PRs by file+line
TDD swarm — parallel per-layer agents with coordinator
Multi-layer features (data/core/CLI/MCP/zsh) run sequentially today. Fan-out pattern: one agent per layer, TDD until green, coordinator reconciles interfaces and catches schema drift.
Coordinator: define interface contract → write cross-layer e2e tests → fan out per-layer agents
Per-layer agents (parallel): red → green → report test count + coverage to coordinator
Reconcile: run e2e suite · flag count/schema drift (e.g. plugin.json vs expected-counts) · merge only when all layers + e2e pass
Closes #221 #222 #223 #224 #225 #226 #227
Triage
--strictPostToolUse hook template/releaseSkillFriction Fixes
Fix: squash-merge-aware branch cleanup
Branch cleanup deadlocks: squash-merged branches refuse
git branch -d(not in ancestry) while branch-guard blocks force delete.Solution: use
git cherry <base> <branch>— if all commits are prefixed-, content is in base regardless of ancestry. Safe to force-delete.lib/git-utils.shNew Ways to Use Claude Code
1. Custom Skills — codify
/releaseas a SkillThe release workflow is the #1 repeated pipeline (14 sessions). Recurring friction: version/count/schema drift across files, Homebrew auto-bump firing with wrong version.
Proposed
skills/release/SKILL.md:extra.version· lockfiles · footersdev → main; single-integration:feature → main).STATUS, pushskills/release/SKILL.md2. Hooks — mkdocs
--strictPostToolUse hook templateCI has no
mkdocs build --strictgate — macros/Jinja errors and dead links stay invisible until a manual build. A PostToolUse hook surfaces failures immediately.{ "hooks": { "PostToolUse": [{ "matcher": "Edit|Write", "command": "[ -f mkdocs.yml ] && mkdocs build --strict 2>&1 | tail -8 || true" }] } }[ -f mkdocs.yml ]guard makes it a no-op in non-MkDocs repos3. Headless Mode — batch docs audits and release tasks from scripts/CI
Many release/doc tasks (version reconcile, count audit, doc sweep) don't need interactive sessions.
Example recipes:
On the Horizon
Autonomous release pipeline agent
Sessions repeatedly cut off mid-pipeline (Homebrew check, CI polling, pak conflicts). A background agent that owns the full lifecycle without babysitting:
Phase 1 — Pre-release: version bump + full surface reconcile + open PR
Phase 2 — CI watch (background agent): poll CI every ~60s · on green: merge + tag + publish · self-correct known failures: Homebrew wrong-version → patch formula; pak/Remotes conflict → suggest pin; stale pathspec → re-stage
Phase 3 — Cleanup: update
.STATUS· verify squash-merged branches viagit cherrybefore delete/release --autonomousflag triggers background mode/releaseSkill aboveDocs-drift reconciliation agent
Docs reconciliation (count drift, phantom refs, broken examples) recurs every release. A standing agent that diffs shipped features against docs and files targeted PRs:
Audit pass: crawl
docs/**· compare against exported functions + expected-counts · detect phantom refs · spot-check code examples · flag jargon forward-refs · check hub.md Gate 2/3PR generation: one focused PR per confirmed gap · group related fixes · dedup against open PRs by file+line
/craft:docs:reconcileTDD swarm — parallel per-layer agents with coordinator
Multi-layer features (data/core/CLI/MCP/zsh) run sequentially today. Fan-out pattern: one agent per layer, TDD until green, coordinator reconciles interfaces and catches schema drift.
Coordinator: define interface contract → write cross-layer e2e tests → fan out per-layer agents
Per-layer agents (parallel): red → green → report test count + coverage to coordinator
Reconcile: run e2e suite · flag count/schema drift (e.g. plugin.json vs expected-counts) · merge only when all layers + e2e pass
/craft:tdd:swarmcommand or workflow templateisolation: "worktree"Closes #221 #222 #223 #224 #225 #226 #227