Claude-skill-registry issue-implementation-orchestration
Orchestrates issue implementation with automatic review and commits. Use when asked to "implement feature", "implement epic", "implement project", "execute feature", "execute epic", "execute project", or when you want implementations automatically reviewed and committed.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/issue-implementation-orchestration" ~/.claude/skills/majiayu000-claude-skill-registry-issue-implementation-orchestration && rm -rf "$T"
skills/data/issue-implementation-orchestration/SKILL.mdOrchestrate Issue Implementation
Orchestrate the implementation of a parent issue (project, epic, or feature) by executing its child issues sequentially, reviewing each implementation, and committing approved changes.
Goal
Complete all planned child issues within a parent by:
- Spawning task implementations via the
skillissue-implementation - Reviewing completed work via the
skillissue-implementation-review - Committing approved changes
- Updating documentation when all children are complete
Issue Hierarchy
| Parent Type | Child Type | Child's Children |
|---|---|---|
| Project | Epics | Features → Tasks |
| Epic | Features | Tasks |
| Feature | Tasks | (none) |
Process
1. Identify Parent Issue
Input
$ARGUMENTS - Can specify:
- Issue ID: Specific issue to implement (e.g., "P-xxx", "E-xxx", or "F-xxx")
- Scope: Limit search to issues within a parent scope
Use
get_issue to retrieve the issue details. If no ID is specified, use get_next_available_issue with the appropriate issueType to find the next available issue.
2. Create Feature Branch
Before starting implementation, ensure work is on a feature branch.
Check Current Branch
Use Bash to check the current branch:
git branch --show-current
Branch Logic
-
If on
: Create and checkout a feature branch:maingit checkout -b feature/{ISSUE_ID}Example:
orfeature/F-add-user-authfeature/E-auth-system -
If already on a non-main branch: Continue without branching
Log Branch Status
Use
append_issue_log to record:
- Branch created: "Created feature branch feature/{ISSUE_ID}"
- Existing branch: "Continuing on existing branch {BRANCH_NAME}"
3. Verify Planned Work Exists
CRITICAL: Before starting, verify all work is planned.
- Use
to get all direct children of this issuelist_issues - For each child, recursively verify its children exist (down to tasks)
- Review the complete work breakdown for completeness
Verification depth by parent type:
- Feature: Verify tasks exist
- Epic: Verify features exist, and each feature has tasks
- Project: Verify epics exist, each epic has features, and each feature has tasks
If children are missing:
- STOP immediately
- Inform the user that the issue has unplanned work
- List what appears to be missing:
- Children that have no sub-children
- Functionality from the description not covered
- Ask the user to complete the planning before proceeding
- Do NOT create issues yourself - implementation does not include planning
4. Evaluate Complexity and Plan (Optional)
Before executing children, evaluate whether the work would benefit from upfront planning.
Complexity Signals
Consider spawning a planner for issues with:
- Multiple tasks (more than 3-4 tasks)
- Refactoring or migration language in task descriptions
- Architectural changes mentioned
- Multiple integration points or subsystems involved
- Cross-cutting concerns that affect multiple areas
This is a judgment call—no hard threshold required.
Spawn Implementation Planner
If judged sufficiently complex:
-
Use the
tool to spawnTask
as an async subagent:issue-implementation-plannerTask tool parameters: - subagent_type: "general-purpose" - description: "Plan implementation for {ISSUE_ID}" - run_in_background: true - prompt: | Use the /issue-implementation-planner skill to create an implementation plan for {ISSUE_ID}. Issue: {ISSUE_ID} - {ISSUE_TITLE} Description: {ISSUE_DESCRIPTION} Children to implement: {LIST_OF_CHILDREN_WITH_DESCRIPTIONS} Create a comprehensive plan that identifies key files, patterns, and implementation approach. -
Use
to wait for the planner to completeTaskOutput -
Store the planner's output as context for implementation agents
-
Include relevant plan context when spawning child implementations
5. Determine Execution Order
Analyze the direct children to determine the correct execution order:
- Check prerequisites: Each child may have
listing IDs that must complete firstprerequisites - Check status: Skip children that are already
ordonewont-do - Build execution queue: Order children so all prerequisites are satisfied before each runs
Execution Rules:
- A child can only start when ALL its prerequisite issues are
done - If a child has no prerequisites, it can start immediately (after any currently running child)
- Execute children sequentially - wait for each to complete before starting the next
6. Execute Children
For each child in the execution queue:
6.1 Verify Child is Ready
- Check all prerequisites are
done - Check child status is
oropen
(not alreadydraft
orin-progress
)done - If not ready, skip and check next child
6.2 Launch Child Implementation
Use the
Task tool to spawn a subagent that implements the child:
For Tasks - spawn the
issue-implementation skill:
Task tool parameters: - subagent_type: "general-purpose" - description: "Implement task [TASK_ID]" - prompt: | Use the /issue-implementation skill to implement task [TASK_ID]. Context: - Parent: [PARENT_ID] - [PARENT_TITLE] - Task: [TASK_ID] - [TASK_TITLE] [INCLUDE_PLAN_CONTEXT_IF_AVAILABLE] Implement this task following the task implementation workflow. Do NOT commit your changes - leave them uncommitted for review. If you encounter any errors or blockers, STOP and report back.
For Features/Epics/Projects - spawn the
issue-implementation-orchestration skill (recursive):
Task tool parameters: - subagent_type: "general-purpose" - description: "Orchestrate [CHILD_TYPE] [CHILD_ID]" - prompt: | Use the /issue-implementation-orchestration skill to implement [CHILD_TYPE] [CHILD_ID]. Context: - Parent: [PARENT_ID] - [PARENT_TITLE] - [CHILD_TYPE]: [CHILD_ID] - [CHILD_TITLE] [INCLUDE_PLAN_CONTEXT_IF_AVAILABLE] Orchestrate the implementation of this issue and its children. If you encounter any errors or blockers, STOP and report back.
Wait for the subagent to complete before proceeding.
6.3 Verify Child Completion
After the subagent returns:
- Use
to check the child's statusget_issue - If status is
: Continue to review step (for tasks) or next child (for orchestrated children)done - If status is NOT
: STOP and handle the error (see Section 7)done
6.4 Review Task Implementation
After a task completes successfully, evaluate if a review is warranted.
Skip review for trivial tasks (judgment call):
- Single configuration change
- One-line fix
- Simple rename or move
For non-trivial tasks, spawn
issue-implementation-review:
Task tool parameters: - subagent_type: "general-purpose" - description: "Review implementation of [TASK_ID]" - run_in_background: true - prompt: | Use the /issue-implementation-review skill to review task [TASK_ID]. Task: [TASK_ID] - [TASK_TITLE] Parent Feature: [PARENT_ID] - [PARENT_TITLE] Review the implementation for correctness, completeness, and simplicity.
Use
TaskOutput to wait for the review to complete.
Handle review outcomes:
- No findings / empty output: Proceed to commit
- Findings identified: You MUST address ALL findings before proceeding:
- Review each finding - Evaluate whether it's valid
- Fix valid findings - Make the necessary changes, including minor ones (documentation, style, small improvements)
- Challenge incorrect findings - If you believe a finding is wrong, explain your reasoning in the issue log. You are not required to blindly follow incorrect recommendations, but you must justify skipping any finding.
- Re-run review after making fixes to verify they were addressed
- Proceed to commit only when all valid findings are resolved
- Questions requiring answers:
- STOP orchestration
- Use
to get answers from the userAskUserQuestion - Re-run review with the answers provided
CRITICAL: Do not categorize findings as "minor" and skip them. Every finding from a review must be either fixed or explicitly challenged with reasoning. Ignoring feedback is not acceptable.
6.5 Commit Task Changes
After implementation and review pass, commit the changes.
CRITICAL - Update Trellis BEFORE committing:
The
.trellis/ directory contains issue state that must be included in commits. Always update Trellis issues first, then commit.
-
Update Trellis state (if not already done):
- Ensure task is marked complete via
complete_task - Append any final log entries via
append_issue_log
- Ensure task is marked complete via
-
Commit the changes using the
skill (if available) or manually:/git:commitUsing the skill (preferred):
/git:commit [TASK_ID] Summary of changesManual fallback (if skill unavailable):
git add . git commit -m "[TASK_ID] Summary of changes"Example:
[T-add-user-validation] Add email validation to user registration -
Verify commit succeeded and no
changes remain uncommitted.trellis/ -
Log the commit using
on the parent issueappend_issue_log
7. Handle Errors
<rules> <critical>If you encounter a permission error, STOP IMMEDIATELY and report to the user. Do NOT attempt workarounds.</critical> <critical>If a hook returns any unexpected errors or fails, STOP IMMEDIATELY and report to the user. Hook errors indicate important validation failures.</critical> <critical>NEVER work around errors by skipping steps, using alternative approaches, or ignoring validation failures.</critical> <critical>When blocked by any unexpected error - even if you think it doesn't apply to you - your only options are: (1) ask the user for help, or (2) stop completely.</critical> <critical>Do NOT assume an error is irrelevant or a false positive. Report any unexpected errors to the user and let them decide.</critical> </rules>If a child fails or the subagent reports an error:
- Stop execution - Do not proceed to other children
- Log the failure - Use
on the parent to record what happenedappend_issue_log - Ask the user - Use AskUserQuestion to report the failure and ask how to proceed:
- Retry the failed child
- Skip the failed child and continue
- Stop orchestration entirely
- Follow user direction - Do what the user decides
Common error scenarios that require stopping:
- Permission denied when running commands
- Unexpected hook failures (pre-commit, post-edit, quality checks)
- Subagent returning errors or incomplete results
- Git commit failures
Why this matters: Hooks are configured to enforce quality checks and validation rules. When they fail, it usually means something is misconfigured or you lack necessary permissions. Working around these errors masks important problems and can lead to broken code being committed.
8. Update Documentation
When all children are done (before marking the parent as complete):
Spawn Documentation Updater
Use the
Task tool to spawn docs-updater:
Task tool parameters: - subagent_type: "general-purpose" - description: "Update documentation for [ISSUE_ID]" - run_in_background: true - prompt: | Use the /docs-updater skill to review and update documentation. Issue: [ISSUE_ID] - [ISSUE_TITLE] Review the changes made during this implementation and update any relevant documentation files (CLAUDE.md, README.md, docs/**).
Use
TaskOutput to wait for the docs-updater to complete.
Commit Documentation Changes
If the docs-updater made changes:
CRITICAL - Update Trellis BEFORE committing:
-
Update Trellis first:
- Log the documentation update using
append_issue_log - Make any other Trellis updates needed
- Log the documentation update using
-
Commit the changes using the
skill (if available) or manually:/git:commitUsing the skill (preferred):
/git:commit docs: update documentation for [ISSUE_ID]Manual fallback (if skill unavailable):
git add . git commit -m "docs: update documentation for [ISSUE_ID]" -
Verify no
changes remain uncommitted.trellis/
9. Complete Parent Issue
When all children are done and documentation is updated:
-
Verify all children have status
(ordone
if skipped by user direction)wont-do -
Update the parent status to
usingdoneupdate_issue -
Log completion using
append_issue_log -
If any uncommitted changes exist (including
), commit them using the.trellis/
skill (if available) or manually:/git:commitUsing the skill (preferred):
/git:commit chore: complete [ISSUE_ID]Manual fallback (if skill unavailable):
git add . git commit -m "chore: complete [ISSUE_ID]" -
Verify no uncommitted changes remain - especially in
.trellis/ -
Report summary to user:
- Total direct children completed
- Total descendants completed (all levels)
- Any issues skipped
- Commits created
- Documentation updates made
- Overall outcome
Progress Tracking
Throughout orchestration:
- Use
on the parent to record progressappend_issue_log - Report status to user after each child completes
- Keep user informed of which child is currently running
Important Constraints
- No parallel execution: Run only one child at a time
- No creating work: Do not create new issues; only execute planned work
- Respect dependencies: Never start a child before its prerequisites are done
- Stop on failure: Always stop and ask user when something goes wrong
- Ask questions: Use AskUserQuestion when uncertain about anything
- Trellis before commits: Always update Trellis issues BEFORE making git commits
- Commit after each task: Ensure changes are committed before moving to the next task
- Update docs before completing: Always run docs-updater before marking parent as done
- No uncommitted Trellis state: Never finish with uncommitted
changes.trellis/