Add issue-work skill for end-to-end ticket workflow #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/tender-jepsen-a86af3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a Claude Code skill (
dot-claude/skills/issue-work/) plus two supporting sub-agents (dot-claude/agents/ticket-analyst.md,dot-claude/agents/impl-reviewer.md) that codify a consistent multi-repo ticket workflow.State lives under
~/.claude/issue-work/{owner}-{repo}-{N}/so resume works even after worktree teardown.Standalone — no Athena Notes dependency.
Files
dot-claude/skills/issue-work/SKILL.md— orchestratordot-claude/skills/issue-work/references/fetch-ticket.md— long-form gh/tea fetch recipesdot-claude/skills/issue-work/references/repo-resolution.md— local clone discoverydot-claude/agents/ticket-analyst.md— haiku, fetch + digestdot-claude/agents/impl-reviewer.md— sonnet, lens-scoped reviewerAfter merge
These files were created first at the real paths
~/.claude/skills/issue-work/...and~/.claude/agents/.... To switch to stow-managed symlinks:Test plan
ticket-analystproduces a cleancontext.mdon a real issue with comments + linked refsreview-{lens}.mdprogress.mdstatus correctlyAdds a Claude Code skill (dot-claude/skills/issue-work/) plus two supporting sub-agents (dot-claude/agents/ticket-analyst.md, dot-claude/agents/impl-reviewer.md) that codify a consistent multi-repo ticket workflow: intake → plan → implement → self-review, with a human approval checkpoint before implementation and three parallel review lenses (correctness / security / simplicity) before returning for human review. ticket-analyst (haiku) fetches + digests the ticket via gh or Forgejo REST API. impl-reviewer (sonnet) runs three parallel instances, each loading engineering:code-review, security-review, or simplify. State lives under ~/.claude/issue-work/{owner}-{repo}-{N}/ and survives worktree teardown for resumability.- fetch-ticket: use mktemp for linked-ref scratch file; /tmp/txt was vulnerable to parallel-run collision and symlink-clobber on shared hosts - SKILL: split progress.md status "implementing" into "implementing" (in-flight, code may be half-written) vs "implemented" (tests green, Phase 4 not yet run) so resume picks the right phase - repo-resolution: verify remote URL against the ticket's forge host (FORGE_HOST), not just "github.com" — Forgejo/Gitea/Codeberg clones were previously never recognized - SKILL: add Forgejo default-branch snippet (was a pointer to a section that didn't exist); branch pre-flight auth check by FORGE so GitHub and Forgejo tickets don't cross-run each other's checks - SKILL: read gh pr create title from context.md frontmatter via awk, avoiding shell-metachar mangling on titles with quotes/backticks/\$ - fetch-ticket: align Forgejo auth form with ticket-analyst.md (\${X:-\${Y:-}} is safe under set -u; \${X:=Y} isn't) - repo-resolution: drop redundant git@github.com: grep alternative — [:/] already covers HTTPS and SSH remotes in one class - SKILL: promote Plan Mode / ExitPlanMode aside out of a parenthetical- Close SSRF allowlist bypass: `${host%%:*}` alone was stripped at the first colon, so a URL like `https://github.com:anything@evil.internal/x` resolved to host=`github.com` (allowlisted) even though WebFetch would actually hit `evil.internal`. Strip userinfo (`${host##*@}`) BEFORE port so the real host is what the case-statement checks. - Broaden dirty-tree porcelain match to include `T` (type change) and `U` (unmerged / mid-conflict), plus the `^ [MD]` case where the change is only in the working tree. Prevents resuming into a merge conflict being classified as a clean tree. - Make the Forgejo comments paginator robust: capture HTTP status alongside the body so a mid-loop 401/403 (non-array error object) fails loudly instead of never-matching the `[]` break and blowing up `jq -s 'add'` on a non-array. - Trim trailing sentence punctuation (`.,;:!?`) from extracted URLs so prose like "see https://example.com." does not 404 every linked-ref title fetch. Applied in both fetch-ticket.md and ticket-analyst.md.- ticket-analyst: use array form AUTH=(-H ...) for Forgejo curl calls, matching the hardened pattern in fetch-ticket.md. Protects against tokens containing shell metacharacters or spaces. - issue-work SKILL: each parallel Explore agent writes its own explore-{area-slug}.md file instead of appending to a shared explore.md. Eliminates the concurrent-write race when two Explores run in parallel. Phase 2.3 now reads every explore-*.md and merges them. - impl-reviewer: reword the Write-tool constraint so it's not self-contradictory ('No Write' followed by an implicit exception). Now states explicitly that Write is restricted to the review-{lens}.md output file.