Skip to content

fix(skills): push state before sub-PR merge; tear down only after CI green#1

Merged
sourcehawk merged 1 commit into
mainfrom
port-state-and-teardown-fixes
May 29, 2026
Merged

fix(skills): push state before sub-PR merge; tear down only after CI green#1
sourcehawk merged 1 commit into
mainfrom
port-state-and-teardown-fixes

Conversation

@sourcehawk
Copy link
Copy Markdown
Owner

Ports two process lessons learned running this workflow end to end on a real multi-PR feature (the triagent e2e golden-path epic), which the downstream .claude/skills/ copies received first.

fanning-out-with-worktrees — push state before the sub-PR merge (Step 5.3 + anti-pattern)

gh pr merge lands on origin's current tip, so an unpushed local state-file commit makes the orchestrator's post-merge git merge --ff-only origin/feature/<slug> fail ("Not possible to fast-forward"). Step 5.3 now requires pushing local state commits to origin before the merge, and the state-file anti-pattern says commit and push per transition.

developing-a-feature — tear down only after the integration PR's CI is green (Step 7 + red-flag)

Step 7 said to delete plan+state as the last commit before opening the integration PR. That removes the resume contract before CI has run, so a red CI run leaves you fixing forward with no state. Step 7 now gates teardown on the integration PR's CI passing — "local green" / "flipped ready" are explicitly not the gate — plus a red-flag row.

Both observed live: a sub-PR squash-merge diverged the local feature branch (fix 1), and a teardown-before-CI-green left a fix-forward stateless when the integration PR's CI flaked (fix 2).

…green

Two process lessons learned running this workflow on a real multi-PR
feature (triagent#13), ported from the downstream copies:

- fanning-out Step 5.3: push local state-file commits to origin before
  `gh pr merge`, else the post-merge ff fails once the squash lands on
  origin's tip; anti-pattern reinforced to commit AND push per transition.
- developing Step 7: gate plan/state teardown on the integration PR's CI
  being green (not "local green" / "ready" / before-opening), so a red CI
  run never leaves a fix-forward without the resume contract; + red-flag row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sourcehawk sourcehawk merged commit c8835f1 into main May 29, 2026
sourcehawk added a commit to sourcehawk/triagent that referenced this pull request May 29, 2026
…rkflow plugin (#41)

* chore: source feature-dev workflow skills from the feature-dev-workflow plugin

The seven workflow skills (planning/developing/fanning-out/reviewing/
opening-a-pull-request/writing-github-issues/testing) now ship as the
`feature-dev-workflow` plugin, enabled in .claude/settings.json. Remove the
in-repo .claude/skills/ copies and repoint CLAUDE.md's workflow section at
the plugin (skills referenced as feature-dev-workflow:<skill>).

The two recent local fixes (push-state-before-merge, teardown-after-CI-green)
are ported to the plugin in sourcehawk/feature-dev-workflow#1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: commit .claude/settings.json to enable the plugin repo-wide

Removing .claude/skills/ only works if the feature-dev-workflow plugin is
enabled for every checkout. Check in .claude/settings.json (enabledPlugins:
feature-dev-workflow + superpowers) and flip the .gitignore exception from
the now-removed .claude/skills/ to .claude/settings.json.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: drop the workflow diagram from CLAUDE.md (lives in the plugin repo)

The feature-dev workflow + its diagram are documented in
github.com/sourcehawk/feature-dev-workflow now; CLAUDE.md keeps only a
pointer + the editing note. Also retitle the section (the skills are no
longer 'local').

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sourcehawk sourcehawk deleted the port-state-and-teardown-fixes branch May 29, 2026 15:24
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.

1 participant