.claude/skills/pm-next/SKILL.md
Pick up the next highest-priority work item and start implementing it. Finds WPs, unscaffolded Issues, and FRs by priority. Auto-scaffolds Issues/FRs without work packages, then implements. Use --auto for fully autonomous execution until all work is done. Use when the user says "what's next", "pick up work", "start implementing", "work on the next thing", or just "next".
npx skillsauth add pinkroosterai/PinkRoosterMcp pm-nextInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find the highest-priority actionable item, prepare it for implementation (scaffolding if needed), and execute it.
Parse $ARGUMENTS:
--auto: Fully autonomous mode — no prompts, auto-select, auto-scaffold, auto-commit per WP. Remove the flag before further parsing.Wp, Issue, or FeatureRequest. Default: omit (returns all types mixed by priority).Resolve project:
pwdmcp__pinkrooster__get_project_status with projectPath → extract projectIdInitialize: completedItems = [], skippedItems = [], iterationCount = 0
Call mcp__pinkrooster__get_next_actions with:
projectId from Step 1limit: 10 (fetch more candidates for smarter selection)entityType: the specified filter, or omit entirely to get all actionable WPs, Issues (without linked WPs), and FRs (without linked WPs), sorted by priorityThis returns a queue of candidates.
Don't blindly take the #1 item. Evaluate the queue to find the most impactful item to work on:
Blockers first: If any item in the queue is blocking other items (check blocking field on WP details), prefer it over higher-priority leaf items. Completing a blocker unblocks downstream work, which has a multiplier effect on project progress.
Ready WPs over unscaffolded entities: A WP with phases and tasks is ready to implement immediately. An Issue or FR without a linked WP needs scaffolding first (extra overhead). When priorities are equal, prefer the ready WP.
Priority as tiebreaker: When impact is equal, use the API's priority ordering (Critical > High > Medium > Low).
In practice, this means: scan the top 5 candidates, check if any are blockers (call mcp__pinkrooster__get_work_package_details on WP candidates to check their blocking field), and select accordingly. If no blockers, fall through to priority ordering.
If empty queue:
/pm-status for overview."AskUserQuestion tool:
[{label: "#1 {entityId}", description: "[{priority}] \"{name}\" ({state}) — {type} ⭐ Recommended: {reason}"}, {label: "#2 {entityId}", description: "[{priority}] \"{name}\" ({state}) — {type}"}, ...]Every item must become a WP before implementation. This step resolves the selected item to a concrete WP with phases and tasks.
proj-N-wp-N)mcp__pinkrooster__get_work_package_details with the WP ID (if not already loaded from smart selection)blockedBy contains any non-terminal WP:
skippedItems with reason "blocked by {blockerId}", try next candidate from Step 2 queueAskUserQuestion tool:
[{label: "Work on blocker", description: "Switch to implementing {blockerId} first"}, {label: "Pick different", description: "Go back and choose a different item from the queue"}]linkedIssueIds is non-empty): call mcp__pinkrooster__get_issue_details for eachlinkedFeatureRequestIds is non-empty): call mcp__pinkrooster__get_feature_request_details for each — note user stories for contextproj-N-issue-N)mcp__pinkrooster__get_issue_details/pm-scaffold {issueId}skippedItems with reason "scaffold failed", try next candidate. Interactive → report error.proj-N-fr-N)mcp__pinkrooster__get_feature_request_details — note user stories/pm-scaffold {frId}skippedItems with reason "scaffold failed", try next candidate. Interactive → report error.Note: If all candidates in the queue are exhausted (all blocked or failed), auto mode re-fetches in Step 2. If re-fetch also returns nothing actionable → Step 7 (Exit).
We now have a resolved WP. Activate all inactive entities without prompting, then show the user what they're about to implement.
mcp__pinkrooster__create_or_update_work_package with state: "Implementing" → report "{wpId} → Implementing"linkedIssueIds, if NotStarted or Blocked): call mcp__pinkrooster__create_or_update_issue with state: "Implementing" → report "Auto-activated {issueId} → Implementing"linkedFeatureRequestIds, if Proposed or Deferred): call mcp__pinkrooster__create_or_update_feature_request with status: "InProgress" → report "Auto-activated {frId} → InProgress"Present enough detail for the user to understand what's about to happen:
## Implementing: {wpId} "{wpName}"
### Overview
- Priority: {priority} | Complexity: {estimatedComplexity}/10 | Type: {wpType}
- Tasks: {nonTerminalCount} remaining across {phaseCount} phases
- Linked: {issueId and/or frId if any}
### Phase Breakdown
**Phase 1: {phaseName}** — {taskCount} tasks
{task1Name} → {task2Name} → ... (dependency chain)
**Phase 2: {phaseName}** — {taskCount} tasks
...
### User Stories (if FR linked)
- As a {role}, I want {goal}, so that {benefit}
- ...
### Selection Rationale
- {why this item was chosen: "Highest priority", "Unblocks proj-1-wp-4 and proj-1-wp-5", etc.}
Invoke /pm-implement {wpId} to execute all tasks across all phases.
/pm-implement autonomously handles:
/pm-implement returnsCheck the WP's final state by calling mcp__pinkrooster__get_work_package_details:
WP is Completed (normal case — all tasks done, cascades fired):
completedItemsWP is NOT Completed (some tasks were blocked by external deps, or a phase verification gate failed):
skippedItems with reason "incomplete: {details}", proceed to Step 6 then loop back to Step 2/pm-implement {wpId}, or /pm-next for different work."Build/test failures that /pm-implement could not resolve:
After each WP (completed or partial), commit all changes:
<type>(<scope>): <summary of what was implemented>
Implements {wpId} "{wpName}".
{Linked: issueId "issueName" (if any)}
{Linked: frId "frName" (if any)}
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Commit type by WP type: feat (Feature), fix (BugFix), refactor (Refactor), chore (Chore/Spike).
If no files were changed (e.g., all tasks were skipped), skip the commit.
If the WP completed or was skipped (not a hard failure): loop back to Step 2.
Increment iterationCount. Report progress between iterations:
---
## Auto-loop iteration {iterationCount}: {completedItems.length} completed, {skippedItems.length} skipped. Checking for more...
---
Exit conditions (any of these ends the loop):
| Condition | Output | |-----------|--------| | No actionable items from Step 2 | "No more actionable items." | | All candidates blocked/failed | "All remaining items are blocked or failed to scaffold." | | Hard build/test failure | "Stopping: unresolvable build/test failure in {wpId}." |
On exit, print the session summary:
## Auto-loop Complete
### Completed ({completedItems.length})
| # | WP | Name | Type | Commit |
|---|-----|------|------|--------|
| 1 | {wpId} | {wpName} | feat/fix/refactor | {short commit hash} |
| ... |
### Skipped ({skippedItems.length})
| # | Entity | Name | Reason |
|---|--------|------|--------|
| 1 | {entityId} | {name} | {reason} |
| ... |
### Session Stats
- Iterations: {iterationCount}
- Items completed: {completedItems.length}
- Items skipped: {skippedItems.length}
### Next Steps
- `/pm-status` — full project overview
- `/pm-triage` — review priorities and blocked items
- `/pm-next --auto` — resume autonomous work (after fixing any blockers)
Use the AskUserQuestion tool:
[{label: "Next item", description: "Pick up the next priority item: /pm-next (Recommended)"}, {label: "Status", description: "Check project progress: /pm-status"}, {label: "Done", description: "Stop here for now"}]--auto guarantees a hands-off experience. The agent follows these rules:
get_next_actions reflects this./pm-scaffold or /pm-implement, suppress all interactive prompts (quality warnings, confirmations, "proceed?" questions). Proceed with available data./pm-verify separately — /pm-implement handles phase verification gates internally/pm-done separately — task/phase/WP completion happens via cascades inside /pm-implement, including auto-completion of linked Issues and FRs/pm-implement {taskId} directly for single-task work/pm-scaffold in auto mode, skip all quality checks and user promptstools
Verify acceptance criteria for a phase or entire work package. Runs verification based on each criterion's method (AutomatedTest, Manual, AgentReview) and records results via the MCP tool.
development
Diagnose the root cause of a bug, error, crash, or unexpected behavior. Traces through code, logs, services, database state, and git history to find why something is broken. Researches error messages online for known issues. Produces a diagnosis with evidence and suggested fix. Use when the user reports a problem, error message, stack trace, test failure, or says things like "why is this happening", "this is broken", "I'm getting an error", "something's wrong with...", "debug this", or "figure out why...".
development
Review and prioritize open issues and feature requests. Analyzes severity, age, and codebase impact to recommend priority adjustments and next steps.
tools
Show project status dashboard with issue/FR/WP counts, active items, blocked items, and priority next actions. Use when the user asks about project status, progress, what's happening, what needs attention, or what to work on.