chore(ai): replace issue-workflow.sh shell script with an AI skill#31
Closed
dipto0321 wants to merge 1 commit into
Closed
chore(ai): replace issue-workflow.sh shell script with an AI skill#31dipto0321 wants to merge 1 commit into
dipto0321 wants to merge 1 commit into
Conversation
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>
|
✔️ 9dded91 - Conventional commits check succeeded. |
There was a problem hiding this comment.
Pull request overview
This PR refactors project-local “issue → branch → PR → merge” automation by deleting the imperative scripts/issue-workflow.sh bash orchestrator and replacing it with a repository-committed AI skill (.claude/skills/issue-workflow/SKILL.md), while updating contributor docs and make next-issue guidance accordingly.
Changes:
- Removed
scripts/issue-workflow.shand replaced the workflow definition with.claude/skills/issue-workflow/SKILL.md. - Updated contributor-facing documentation (
CONTRIBUTING.md,CLAUDE.md,scripts/README.md) to reference the new skill-based flow. - Adjusted
.gitignoreand themake next-issuetarget so skills are committed while.claude/session metadata remains ignored.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/README.md | Re-documents scripts/ as empty and points users to the new skill-based workflow. |
| scripts/issue-workflow.sh | Deletes the old bash orchestration script. |
| Makefile | Changes next-issue to print human instructions instead of running the removed script. |
| CONTRIBUTING.md | Replaces references to the script-generated PR body with references to the skill. |
| CLAUDE.md | Updates the “standing orders” to invoke the skill instead of the bash script. |
| .gitignore | Stops ignoring .claude/skills/ while continuing to ignore the rest of .claude/. |
| .claude/skills/issue-workflow/SKILL.md | Adds the new skill that encodes the end-to-end workflow as tracked tasks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| shell script: instead of imperative bash, it produces a tracked list of | ||
| tasks the assistant walks through one at a time. | ||
|
|
||
| The skill encodes the project conventions in [`CONTRIBUTING.md`](../../CONTRIBUTING.md): |
Comment on lines
+35
to
+37
| 1. **Issue number** — the only required input. If the user says "next | ||
| issue", find the lowest-numbered open issue via `gh issue list | ||
| --state open --limit 1 --json number,title`. |
Comment on lines
+159
to
+163
| `gh issue view <N> --json state,stateReason` | ||
|
|
||
| If `stateReason == COMPLETED` and the linked PR shows in | ||
| `closedByPullRequestReferences`, you're done. If the issue is still | ||
| open, the PR body is missing `Closes #N` — fix the PR description |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the imperative
scripts/issue-workflow.shbash script (265 linesof branch → PR → merge orchestration) with an AI-orchestrated skill at
.claude/skills/issue-workflow/SKILL.md. The skill encodes the sameworkflow as tracked
TaskCreatesteps, 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.
Why
The bash script:
ghauth on every contributor machinegh pr checks --watchin asleep 600; kill $watch_pidpattern that crashed the IDE when paged output interleaved with other
terminal tabs (see
.conversation-history-chunk4.mdsection 17)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.mdsection 17 and the workflowlessons 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 changeChecklist
chore(ai): subject)make cilocally and it passesdocs/, inline godoc) — updatedscripts/README.md,CONTRIBUTING.md,CLAUDE.mdScope notes / things reviewers may want to look at
.claude/skills/issue-workflow/SKILL.mdisproject-local. Any contributor/clone picks it up after a fresh checkout
because
.gitignorenow whitelists.claude/skills/while continuingto ignore the rest of
.claude/(session settings).make next-issuetarget: now a human-readable reminder of theCONTRIBUTING.md steps instead of calling the deleted script. The
Makefile no longer depends on
scripts/having any content.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.