com um clique
capp-do-work
Implement a Jira ticket by iteratively completing subtasks using TDD. Creates a feature branch, one commit per subtask, and a draft PR. Also handles small well-defined bugs without subtasks. Use when ready to start coding.
Menu
Implement a Jira ticket by iteratively completing subtasks using TDD. Creates a feature branch, one commit per subtask, and a draft PR. Also handles small well-defined bugs without subtasks. Use when ready to start coding.
Import a skill from exactly one GitHub file URL, raw GitHub URL, or single-file gist URL into ~/.agents/skills/. Use when the user wants to add a skill from GitHub content.
Address all review comments on a GitHub pull request. Fixes code, pushes back with evidence, resolves threads after completion, and updates AGENTS.md only when specifically requested. Use after receiving PR review feedback.
Tidy up CaPP git worktrees whose PRs are merged or closed without merging. Scans for directories matching the `<repo>_<TICKET-ID>` worktree convention (e.g. `twinkl-sanity-cms_CAPP-1234`), looks up each worktree's PR via `gh`, classifies by state, flags closed-unmerged PRs, and removes worktrees only after explicit user confirmation. Use when the user asks to clean up worktrees, prune CAPP worktrees, or tidy `~/Development`.
Create well-structured Jira tickets through adaptive interview. Captures goals, constraints, and acceptance criteria without prescribing implementation. Use when creating new work items for the CaPP team.
Diagnose and fix GitHub Actions CI failures on a pull request. Fixes code issues, validates locally using identified check tiers, and pushes focused fixes. Use when CI is failing on a PR.
Centralised CAPP Jira metadata — cloud ID, field IDs, transition IDs, issue type IDs, link types. Invoke before any Jira MCP call to skip redundant discovery API calls and ensure consistent field references.
| name | capp-do-work |
| description | Implement a Jira ticket by iteratively completing subtasks using TDD. Creates a feature branch, one commit per subtask, and a draft PR. Also handles small well-defined bugs without subtasks. Use when ready to start coding. |
You are implementing a Jira ticket by working through its subtasks one at a time. Each subtask gets a commit, and the whole ticket results in one draft PR.
This is the fourth step in the CaPP development workflow, after capp-prd-to-subtasks. It can also be used directly for small, well-defined bugs or tasks after capp-create-a-ticket.
Expect:
capp-prd-to-subtasks, or a small well-defined bug/task with clear acceptance criteriacapp-identify-repo-checks via capp-run-preflight-checksProduce:
capp-get-jira-info to load hardcoded CAPP Jira metadata — in particular, transition IDs (Begin Work 2, Done 6), Dev Notes field ID (customfield_26991), and Subtask issue type ID (21352)capp-run-preflight-checks for the ticket and target repocustomfield_26991) or Technical PRD comment. Use responseContentFormat: "markdown" when reading fieldscapp-prd-to-subtasks first — do not proceedcapp-identify-repo-checks output from preflight as the validation plan_<TICKET-ID> suffix using the parent task ID (not a subtask ID) — e.g. if the repo is at ~/Development/twinkl-sanity-cms and the parent ticket is CAPP-1234, suggest ~/Development/twinkl-sanity-cms_CAPP-1234. If the developer declines, continue in the current working tree.<type>/<TICKET-ID>-<description>
feat/CAPP-1234-add-seo-tagsSchema/content/UI changes should ideally be separate tickets and PRs. If the work is a schema-only ticket, or a small bug/task where the developer confirms schema and UI changes must stay together:
sanity typegen --pr <pr-num>For each subtask (or the single bug), in dependency order:
2 (Begin Work) from capp-get-jira-info. Confirm the subtask is in To Do before using this transition — if it's in a different status, consult the transition map in capp-get-jira-infoFollow red-green-refactor where practical:
When TDD isn't practical (config changes, structural moves, generated code):
Run the targeted checks identified by capp-identify-repo-checks before each commit:
Fix any failures before proceeding. If a check fails:
Use a separate agent for review where available, especially for substantial, risky, security, data-fetching, Sanity, or cross-package changes. If sub-agents are not available, perform an equivalent separate-pass review yourself. This is a private, local review — do NOT post comments to GitHub.
Review focus:
If the review finds issues, fix them, re-run checks, and re-review.
Make a focused commit for this subtask:
feat(resource): add review filtering logic [CAPP-1234]6 from capp-get-jira-info once its commit is complete and targeted checks pass. Confirm the subtask is in In Progress before using this transitionMove to the next unblocked subtask in dependency order. Repeat until all subtasks are complete.
If a subtask fails after 3 attempts:
Debugging strategies:
--pr <pr-num> for unreleased schemas. Never manually edit generated typesAfter all subtasks are complete:
Goal: CI should pass on the first push. Run every check from capp-identify-repo-checks that can run locally before pushing:
If any check fails, fix it and re-run before pushing. Do not push hoping CI will catch what you skipped.
If a CONTEXT.md file exists in the repo or affected packages, update it with any new domain terms, patterns, or architectural decisions introduced by this work.
If not already created (for Sanity typegen):
PR description should follow the repo's PR template and repo docs. Discover templates in:
.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE.md.github/PULL_REQUEST_TEMPLATE/Include the Jira ticket, summary of changes, testing/validation approach, acceptance criteria coverage, and noteworthy decisions or trade-offs where the template asks for them.
Push the branch and confirm the PR is created/updated.