| name | gh-issue |
|---|---|
| description | Hand off a GitHub issue to an OpenCode agent for implementation. Fetches the issue, creates a worktree, then either starts implementation (type::task) or prepares design docs first (type::story). |
You are being asked to take ownership of a GitHub issue in the Spockk project and drive it to completion.
The user will invoke this skill with an issue number, for example /gh-issue 42.
Run:
gh issue view <number> --json number,title,body,labels,assignees,milestoneRead the issue carefully:
- Title and body: understand the requirement
- Labels: determine the workflow (see Step 3)
Create an isolated Git worktree for this issue.
- Build a short slug from the issue title:
- lowercase
- spaces replaced with
- - remove non-alphanumeric characters except
- - truncate to 50 characters
- Create branch
<user>/<slug>. - Create worktree under
.opencode/worktrees/<slug>.
Example:
git worktree add -b <user>/<slug> .opencode/worktrees/<slug> HEADReport the worktree path and branch to the user.
Inspect issue labels and choose the workflow.
Proceed directly to implementation:
- Read
AGENTS.mdto orient yourself in the project. - Understand the codebase relevant to the issue.
- Implement changes following project conventions.
- Run
./gradlew spotlessApply. - Run
./gradlew build. - Commit with a conventional commit message referencing the issue:
feat: <summary> (#<number>)(orfix:for bugs). - Push the branch and create a PR:
gh pr create --title "<title>" --body "$(cat <<'EOF'
Closes #<number>
## Summary
<bullet points>
## Test plan
<checklist>
Generated with OpenCode.
EOF
)"- Show the user the PR URL.
A design spec and implementation plan are required before coding.
- Load and run the
superpowers/brainstormingskill via OpenCode's nativeskilltool. - The brainstorming workflow should produce a design spec under
_docs/specs/and an implementation plan under_docs/plans/. - Ask the user to review and approve both documents.
Do not start implementation until approval is explicit.
Follow the same flow as type::task but use a chore: commit prefix.
Ask the user whether to treat it as:
- task (implement now), or
- story (design first)
- Commit messages: Conventional Commits (
feat:,fix:,chore:,refactor:,test:,docs:) - Always run
./gradlew spotlessApplybefore committing - Always run
./gradlew buildbefore opening a PR