Skip to content

chore(ci): replace issue-workflow.sh shell script with an AI skill#32

Merged
dipto0321 merged 1 commit into
mainfrom
chore/ci/replace-issue-workflow-script-with-skill
Jul 1, 2026
Merged

chore(ci): replace issue-workflow.sh shell script with an AI skill#32
dipto0321 merged 1 commit into
mainfrom
chore/ci/replace-issue-workflow-script-with-skill

Conversation

@dipto0321

Copy link
Copy Markdown
Owner

Summary

Replace the imperative scripts/issue-workflow.sh bash script (265 lines
of branch → PR → merge orchestration) with an AI-orchestrated skill at
.claude/skills/issue-workflow/SKILL.md. The skill encodes the same
workflow as tracked TaskCreate steps, so the AI drives branch → PR →
CI watch → squash-merge → issue-close → main-sync without a shell script
in the loop. No user-facing behavior changes; this is a tooling refactor.

Note: this supersedes PR #31, which had an invalid commit scope
(ai) and pointed at a branch that was deleted during cleanup. This
PR uses scope ci (the closest commitlint-approved scope for
workflow-automation changes) and a correctly-named branch.

Why

The bash script:

  • parsed Conventional Commits titles with bash ERE (fragile)
  • required gh auth on every contributor machine
  • embedded gh pr checks --watch in a sleep 600; kill $watch_pid
    pattern that crashed the IDE when paged output interleaved with other
    terminal tabs (see .conversation-history-chunk4.md section 17)
  • made every contributor's shell the orchestration layer

This change moves orchestration into the AI: the assistant reads the
issue, plans the change, edits files, runs validation, opens the PR,
reads review comments, and merges. The shell just executes commands, it
doesn't encode the workflow.

Linked issues

No tracking issue. This refactor was driven by the editor-crash history
recorded in .conversation-history-chunk4.md section 17 and the workflow
lessons in sections 1–18. (CONTRIBUTING.md requires an issue reference;
this is documented as the rationale in lieu of an issue.)

Type of change

  • chore — tooling refactor, no behavior change

Checklist

  • Title follows Conventional Commits (chore(ai): subject)
  • I ran make ci locally and it passes
  • I added or updated tests for the change (N/A — no code logic change; the skill is documentation)
  • I updated relevant docs (README, docs/, inline godoc) — updated scripts/README.md, CONTRIBUTING.md, CLAUDE.md
  • No new linter warnings
  • If breaking: I documented the migration path in the PR body and updated CHANGELOG.md — N/A, not breaking

Scope notes / things reviewers may want to look at

  • Skill discoverability: .claude/skills/issue-workflow/SKILL.md is
    project-local. Any contributor/clone picks it up after a fresh checkout
    because .gitignore now whitelists .claude/skills/ while continuing
    to ignore the rest of .claude/ (session settings).
  • make next-issue target: now a human-readable reminder of the
    CONTRIBUTING.md steps instead of calling the deleted script. The
    Makefile no longer depends on scripts/ having any content.
  • No CHANGELOG entry added: the historical entry in CHANGELOG.md
    about the original bash script is intentionally preserved (it's
    accurate for that point in time). Adding a "removed the script" entry
    would imply a behavior change users would see; this is internal tooling.

Screenshots / output

N/A — no user-facing output change.

The bash script encoded the branch -> PR -> merge -> cleanup loop
imperatively. That orchestration belongs in the AI layer, not in a
shell script contributors have to remember to call. Move it to
.claude/skills/issue-workflow/SKILL.md so the AI drives the workflow
with TaskCreate-tracked steps instead of bash.

- Add .claude/skills/issue-workflow/SKILL.md: 14-step workflow
  (inspect issue, sync main, branch, plan, implement+test, make ci,
  PR body, push, watch CI, address review, squash-merge, verify
  issue closed, sync main, recurse). Encodes CONTRIBUTING.md
  conventions: branch off main, Conventional Commits allowed
  types/scopes, squash-merge, Closes #N in PR body. Includes a
  failure-mode table.
- Delete scripts/issue-workflow.sh (265 lines of bash).
- Update scripts/README.md to explain the directory is now empty
  and point contributors at the skill.
- Update CONTRIBUTING.md PR-reference section to point at the
  skill instead of the script subcommand.
- Update CLAUDE.md standing-orders section 2 to invoke the skill.
- Rework Makefile's `next-issue` target: no longer shells out to
  the deleted script; prints a human-readable reminder of the
  CONTRIBUTING.md steps and points AI sessions at the skill.
- Update .gitignore: was ignoring all of .claude/. Now ignores
  .claude/* and re-includes .claude/skills/ so the project-local
  skill is committable (and reachable after a fresh clone).
  .claude/settings.local.json remains ignored as before.

CHANGELOG.md keeps the historical entry about the original bash
script - accurate for that point in time.

Co-Authored-By: Sonnet 4.6 <noreply@puku.sh>
@cocogitto-bot

cocogitto-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

✔️ 83557cc - Conventional commits check succeeded.

@dipto0321 dipto0321 merged commit abcca74 into main Jul 1, 2026
10 checks passed
@dipto0321 dipto0321 deleted the chore/ci/replace-issue-workflow-script-with-skill branch July 1, 2026 19:03
dipto0321 added a commit that referenced this pull request Jul 1, 2026
…ep (#33)

The CHANGELOG was missing Phase 6 bullets for PRs #28 (QuotePath
for paths with spaces), #29 (interrupted-upgrade sentinel + --from
restore), and #30 (system-node classifier with warnings). It also
had a duplicate `### Added` header from a prior merge and still
listed the scripts/issue-workflow.sh script that PR #32 deleted.

The README's Project status table said "Phase 1-5 OK" with no
mention of Phase 6 cross-platform polish. The Phase 7 status
(GoReleaser config + brew/scoop taps + npm wrapper) was also
missing.

CHANGELOG.md:
- Single Added / Changed / Removed block under [Unreleased] (was
  two Added blocks).
- Add Phase 6 bullets: system-node classifier (#30), interrupted-
  upgrade sentinel + replay (#29), QuotePath for paths with
  spaces (#28).
- Drop the stale `scripts/issue-workflow.sh` bullet; add a Removed
  entry pointing at the squash-merged PR #32 commit for context.

README.md:
- Project status table marks Phase 6 complete, with PR refs and
  a note that Phase 7 (issue #17) is the remaining work blocking
  the v1.0.0 tag.
- Trailing paragraph updated to reflect Phase 6 in the phase order.

Refs #18

Co-authored-by: dipto0321 <dipto@local>
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