pm-implement
Skill2 starsChanged 8 months agoMITView on GitHub
Implement a task, phase, or entire work package. Reads context, analyzes target files, implements code changes, runs tests, and updates task states. Auto-transitions linked entities on start and completion. Use when the user says "implement", "start working on", "execute", "build this", or references a task/phase/WP ID and wants code changes made.
In this repository15 other files it gives its agents.
- pm-auditSkill
- pm-brainstormSkill
- pm-cleanupSkill
- pm-codesmellsSkill
- pm-doneSkill
- pm-exploreSkill
- pm-housekeepingSkill
- pm-nextSkill
- pm-planSkill
- pm-refine-frSkill
- pm-scaffoldSkill
- pm-statusSkill
- pm-triageSkill
- pm-troubleshootSkill
- pm-verifySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
48 rules. About 0 are common, 31 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈31
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
--dry-runflag: If present, perform Steps 1-3 only — show the execution plan without implementing. - Very specific: line 34
If the ID format doesn't match any pattern, report: "Invalid ID format.
- Very specific: line 39
Call mcp__pinkrooster__get_work_package_details with the extracted WP ID.
- Distinctive: line 84
Before executing any tasks, automatically transition parent and linked entities to active states.
- Distinctive: line 98
Auto-activate WP: If the WP state is inactive (NotStarted or Blocked):
- Very specific: line 99
Call mcp__pinkrooster__create_or_update_work_package with projectId, workPackageId, and state: "Implementing"
- Very specific: line 103
Call mcp__pinkrooster__get_issue_details to check state
- Distinctive: line 104
If the issue is NotStarted or Blocked (not already active or terminal):
- Very specific: line 109
Call mcp__pinkrooster__get_feature_request_details to check status
- Distinctive: line 110
If the FR is in an inactive state (Proposed or Deferred):
- Very specific: line 122
If task.blockedBy is non-empty:
- Distinctive: line 123
Check each blocker's state (use the WP context already loaded, or re-fetch if a previous task in the queue was a blocker that was just …
- Distinctive: line 124
If ANY blocker is in a non-terminal state AND is NOT in the execution queue ahead of this task:
- Distinctive: line 126
Add to skipped list and continue to next task
- Distinctive: line 127
If blockers are all terminal or were completed earlier in this queue: proceed
- Very specific: line 129
If task.state is already terminal (Completed/Cancelled/Replaced):
- Distinctive: line 134
Before reading target code, check if the task involves patterns or technologies not already established in the codebase.
- Very specific: line 147
Use WebSearch with targeted queries (e.g., "ASP.NET Core background service IHostedService pattern")
- Very specific: line 148
Use WebFetch for specific library documentation
- Distinctive: line 149
Keep it brief — 1-2 searches, extract the key pattern, move on.
- Distinctive: line 154
Read each file using the Read tool
- Distinctive: line 156
If a file doesn't exist yet (new file to create), note it
- Distinctive: line 160
Use Grep/Glob to find related files in the codebase
- Distinctive: line 161
Read the most relevant files
- Very specific: line 163
Always: Use Serena's mcp__serena__find_symbol or mcp__serena__find_referencing_symbols to understand how existing code connects to what …
- Distinctive: line 195
Follow the project's coding conventions (see CLAUDE.md):
- Distinctive: line 198
Follow existing patterns in the codebase
- Distinctive: line 199
Do NOT over-engineer — implement exactly what the task requires
- Distinctive: line 203
After implementation, run tests in two tiers to balance speed and confidence:
- Distinctive: line 218
If targeted tests pass, proceed to Tier 2.
- Very specific: line 222
After every task in task mode: run the full relevant suite (dotnet test or npm test)
- Distinctive: line 223
In phase/WP mode: run targeted tests after each task, full suite only at phase boundaries (after the last task in a phase completes).
- Distinctive: line 229
If fix attempts exceed 3 rounds, trigger the rollback procedure (see Step 5g-rollback)
- Distinctive: line 233
If a task's implementation breaks the build or tests and 3 fix attempts haven't resolved it:
- Distinctive: line 257
In phase/WP mode: Stop processing the queue.
- Very specific: line 266
Report cascade results: If stateChanges are returned (phase auto-complete, WP auto-complete, auto-unblock), display them:
- Very specific: line 274
Auto-complete linked entities on WP completion: If stateChanges contains a WP auto-complete:
- Very specific: line 276
Call mcp__pinkrooster__create_or_update_issue with state: "Completed"
- Very specific: line 286
When stateChanges from Step 5h contains a phase auto-complete, run verification before proceeding to the next phase's tasks:
- Very specific: line 288
Check stateChanges for any entry where entityType is Phase and newState is Completed
- Distinctive: line 291
If all criteria pass: report "Phase {phaseId} verified — proceeding to next phase" and continue
- Distinctive: line 292
If any criteria fail: pause execution and report:
- Distinctive: line 301
If the auto-completed phase has no acceptance criteria, skip verification and continue.
- Distinctive: line 309
After all tasks in the queue have been processed:
- Distinctive: line 353
If a task is blocked by something outside the queue, SKIP it — do not bypass blockers
- Distinctive: line 354
Follow existing code patterns — read before writing
- Distinctive: line 355
Run targeted tests after every task, full suite at phase boundaries (phase/WP mode) or after every task (task mode)
- Distinctive: line 356
Keep changes focused on exactly what each task describes
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Implement Task, Phase, or Work Package
Given a task ID, phase ID, or work package ID, load full context from PinkRooster, understand requirements, implement code changes, run tests, and update state. For phases and WPs, tasks are executed sequentially in dependency order.
Step 1: Parse Input & Detect Mode
Parse $ARGUMENTS to determine execution mode:
Task mode — format proj-{N}-wp-{N}-task-{N}:
- Extract WP ID: strip
-task-{N}suffix - Single task execution
Phase mode — format proj-{N}-wp-{N}-phase-{N}:
- Extract WP ID: strip
-phase-{N}suffix - Execute all non-terminal tasks in the specified phase
WP mode — format proj-{N}-wp-{N}:
- Execute all non-terminal tasks across all phases in order
--dry-run flag: If present, perform Steps 1-3 only — show the execution plan without implementing. Remove the flag before ID parsing.
If the ID format doesn't match any pattern, report:
"Invalid ID format. Expected one of: proj-N-wp-N-task-N, proj-N-wp-N-phase-N, or proj-N-wp-N"
Step 2: Load Full WP Context
Call mcp__pinkrooster__get_work_package_details with the extracted WP ID.
From the response, extract:
- Work Package:
name,description,plan,type,priority,state,linkedIssueIds,linkedFeatureRequestIds - All Phases:
phases[]with their tasks, ordered by phase number - Phase Details: each phase's
name,description,acceptanceCriteria - Task Details: each task's
name,description,implementationNotes,targetFiles,attachments,blockedBy,state
Step 3: Build Execution Queue
Task Mode
- Find the single target task in
phases[].tasks[] - Queue =
[targetTask]
Phase Mode
- Find the target phase by matching the phase ID
- Collect all tasks in that phase where
stateis NOT terminal (Completed/Cancelled/Replaced) - Sort by dependency order: tasks with no
blockedByfirst, then tasks whose blockers appear earlier in the queue - Queue = sorted non-terminal tasks from that phase
WP Mode
- Iterate phases in order (Phase 1, 2, 3, ...)
- Within each phase, collect non-terminal tasks sorted by dependency order (same as phase mode)
- Queue = all non-terminal tasks across all phases, phases in order, dependency-sorted within each phase
Present the execution plan:
## Execution Plan: {mode} mode
**WP**: {wpId} "{wpName}"
**Tasks to execute**: {count} of {totalTasks}
**Skipping**: {skippedCount} already terminal
| # | Task ID | Task Name | Phase | Blocked By |
|---|---------|-----------|-------|------------|
| 1 | {id} | {name} | {phase} | — |
| 2 | {id} | {name} | {phase} | {blocker} |
| ... |If --dry-run: Display the plan and STOP. Report: "Dry run complete. Remove --dry-run to execute."
Step 4: Auto-Activate Parent Entities
Before executing any tasks, automatically transition parent and linked entities to active states. No user confirmation needed — the user opted into implementation by invoking this skill.
Also create a rollback point so we can revert if things go wrong:
git stash push -m "pm-implement-checkpoint-{wpId}" --include-untracked 2>/dev/null; git stash pop 2>/dev/nullThis ensures any unstaged user work is safe. Then note the current commit hash as the rollback target:
git rev-parse HEAD- Auto-activate WP: If the WP state is inactive (NotStarted or Blocked):
- Call
mcp__pinkrooster__create_or_update_work_packagewithprojectId,workPackageId, andstate: "Implementing" - Report: "Auto-activated WP {wpId} → Implementing"
- Call
- Auto-activate linked Issues: For each issue ID in
linkedIssueIds:- Call
mcp__pinkrooster__get_issue_detailsto check state - If the issue is NotStarted or Blocked (not already active or terminal):
- Call
mcp__pinkrooster__create_or_update_issuewithprojectId,issueId, andstate: "Implementing" - Report: "Auto-activated linked issue {issueId} → Implementing"
- Call
- Call
- Auto-activate linked FRs: For each FR ID in
linkedFeatureRequestIds:- Call
mcp__pinkrooster__get_feature_request_detailsto check status - If the FR is in an inactive state (Proposed or Deferred):
- Call
mcp__pinkrooster__create_or_update_feature_requestwithprojectId,featureRequestId, andstatus: "InProgress" - Report: "Auto-activated linked FR {frId} → InProgress"
- Call
- Call
Step 5: Execute Task Queue
For each task in the queue, run the Task Execution Loop (Steps 5a–5h):
Step 5a: Check Dependencies
If task.blockedBy is non-empty:
- Check each blocker's state (use the WP context already loaded, or re-fetch if a previous task in the queue was a blocker that was just completed)
- If ANY blocker is in a non-terminal state AND is NOT in the execution queue ahead of this task:
- Report: "Skipping {taskId} — blocked by {blockerId} ({blockerName}, state: {state}) which is not in the execution queue"
- Add to skipped list and continue to next task
- If blockers are all terminal or were completed earlier in this queue: proceed
If task.state is already terminal (Completed/Cancelled/Replaced):
- Skip silently — already done
Step 5b: Research Before Implementation (when warranted)
Before reading target code, check if the task involves patterns or technologies not already established in the codebase. This step prevents wasted implementation time — getting the approach right upfront is cheaper than debugging a wrong approach.
When to research:
- The task's
implementationNotesmention a library, pattern, or API you haven't seen in the codebase (e.g., "use HMAC-SHA256 signing", "implement exponential backoff", "add RFC 7807 ProblemDetails") - The task creates a new type of infrastructure the codebase hasn't used before (e.g., background services, WebSocket handlers, middleware)
- The task references external standards or specifications
When to skip (most tasks):
- The task follows an existing pattern (another controller, another dashboard page, another test file)
- The
implementationNotesreference specific existing files to follow - The task is a simple modification (add a field, fix a guard, update a route)
How to research:
- Use
WebSearchwith targeted queries (e.g., "ASP.NET Core background service IHostedService pattern") - Use
WebFetchfor specific library documentation - Keep it brief — 1-2 searches, extract the key pattern, move on. Research should take seconds, not minutes.
Step 5c: Read Target Code
If targetFiles is provided:
- Read each file using the Read tool
- For each file, use Serena's
mcp__serena__get_symbols_overviewto understand structure - If a file doesn't exist yet (new file to create), note it
If targetFiles is empty:
- Analyze the task description and implementation notes
- Use Grep/Glob to find related files in the codebase
- Read the most relevant files
Always: Use Serena's mcp__serena__find_symbol or mcp__serena__find_referencing_symbols to understand how existing code connects to what needs changing.
Step 5d: Transition to Implementing
Call mcp__pinkrooster__create_or_update_task with:
taskId: the current task IDstate:Implementing
Report: "Task {taskId} → Implementing ({currentIndex}/{totalInQueue})"
Step 5e: Present Implementation Plan
## [{currentIndex}/{totalInQueue}] Implementing: {taskId} "{taskName}"
### Context
- **WP**: {wpName}
- **Phase**: {phaseName}
- **Description**: {taskDescription}
- **Implementation Notes**: {implementationNotes}
- **Target Files**: {list of files}
- **Research**: {key finding, if research was performed}
### Implementation Plan
1. {Step-by-step plan based on task details and code analysis}
2. ...Step 5f: Implement
Execute the implementation plan:
- Make code changes using Edit/Write tools
- Follow the project's coding conventions (see CLAUDE.md):
- C#: 4-space indent, nullable enabled
- TypeScript: 2-space indent
- Follow existing patterns in the codebase
- Do NOT over-engineer — implement exactly what the task requires
Step 5g: Run Tests (targeted, then broad)
After implementation, run tests in two tiers to balance speed and confidence:
Tier 1: Targeted tests (run first — fast feedback):
For .NET changes, identify the most relevant test file:
# If the task touches a specific service/controller, run its test class
dotnet test --filter "FullyQualifiedName~{RelevantTestClass}" PinkRooster.slnxFor Dashboard changes:
cd src/dashboard && npx vitest run {relevant-test-file} --reporter=verboseIf targeted tests pass, proceed to Tier 2. If they fail, fix and re-run targeted tests first.
Tier 2: Broad tests (run at phase boundaries or after Tier 1 passes):
- After every task in task mode: run the full relevant suite (
dotnet testornpm test) - In phase/WP mode: run targeted tests after each task, full suite only at phase boundaries (after the last task in a phase completes). This keeps the feedback loop fast for individual tasks while still catching cross-cutting regressions before moving to the next phase.
If tests fail:
- Analyze the failure output
- Fix the issue
- Re-run the failing tests
- If fix attempts exceed 3 rounds, trigger the rollback procedure (see Step 5g-rollback)
Step 5g-rollback: Rollback on Persistent Failure
If a task's implementation breaks the build or tests and 3 fix attempts haven't resolved it:
- Stash the broken changes:
git stash push -m "pm-implement-failed-{taskId}" - Report clearly:
## Implementation Failed: {taskId} "{taskName}" Failed after 3 fix attempts. Changes stashed as `pm-implement-failed-{taskId}`. ### Error {last test/build error output} ### What was attempted 1. {fix attempt 1 summary} 2. {fix attempt 2 summary} 3. {fix attempt 3 summary} ### Recovery options - Review stashed changes: `git stash show -p "stash@{0}"` - Apply and fix manually: `git stash pop` - Discard and retry: `git stash drop` - Skip this task and continue: `/pm-implement {next-task-or-phase-id}` - Do NOT mark the task as Completed — leave it in Implementing state
- In phase/WP mode: Stop processing the queue. The user needs to intervene.
- In task mode: Report and stop.
Step 5h: Mark Task Complete & Report Cascades
Call mcp__pinkrooster__create_or_update_task with:
taskId: the current task IDstate:Completed
Report cascade results: If stateChanges are returned (phase auto-complete, WP auto-complete, auto-unblock), display them:
{taskId} "{taskName}" → Completed
Cascades:
- {entityType} {entityId}: {oldState} → {newState} ({reason})Auto-complete linked entities on WP completion: If stateChanges contains a WP auto-complete:
- For each issue ID in the WP's
linkedIssueIds— if the issue is not terminal:- Call
mcp__pinkrooster__create_or_update_issuewithstate: "Completed" - Report: "Auto-completed linked issue {issueId}"
- Call
- For each FR ID in the WP's
linkedFeatureRequestIds— if the FR is not terminal:- Call
mcp__pinkrooster__create_or_update_feature_requestwithstatus: "Completed" - Report: "Auto-completed linked FR {frId}"
- Call
Update local state: Mark this task as completed in the in-memory queue so subsequent dependency checks reflect the new state.
Step 5i: Phase Verification Gate (Phase/WP Mode Only)
When stateChanges from Step 5h contains a phase auto-complete, run verification before proceeding to the next phase's tasks:
- Check
stateChangesfor any entry whereentityTypeisPhaseandnewStateisCompleted - For each auto-completed phase that has acceptance criteria:
- Invoke
/pm-verify {phaseId}to verify all criteria - If all criteria pass: report "Phase {phaseId} verified — proceeding to next phase" and continue
- If any criteria fail: pause execution and report:
Stop processing the queue — do not proceed to subsequent phases.Phase {phaseId} verification failed: - {criterionName}: {failureReason} Fix the issues and re-run: `/pm-implement {remaining-phase-or-wp-id}` Or skip verification and complete: `/pm-done {phaseId}`
- Invoke
- If the auto-completed phase has no acceptance criteria, skip verification and continue.
This gate ensures each phase's acceptance criteria are met before moving on. In task mode, this step is skipped entirely (single-task execution doesn't trigger phase completion).
Step 6: Final Summary
After all tasks in the queue have been processed:
## Execution Complete: {wpId or phaseId}
### Results
| Task ID | Task Name | Result |
|---------|-----------|--------|
| {id} | {name} | Completed |
| {id} | {name} | Skipped (blocked) |
| {id} | {name} | Already complete |
| {id} | {name} | Failed (stashed) |
### Stats
- **Implemented**: {count}
- **Skipped (blocked)**: {count}
- **Already terminal**: {count}
- **Failed**: {count}
### State Transitions
- WP {wpId}: {oldState} → {newState} (if changed)
- Issue {issueId}: {oldState} → {newState} (if auto-activated or auto-completed)
- FR {frId}: {oldStatus} → {newStatus} (if auto-activated or auto-completed)
- {All task/phase/WP cascades accumulated during execution}
### Changes Made
- {file}: {summary}
- ...
### Tests
- {test results summary}
### Next Steps
- **Task mode only**: Mark complete: `/pm-done {taskId}`
- **Phase/WP mode**: Verify criteria: `/pm-verify {wpId}` → then `/pm-done {wpId}`
- **Standalone WP completion**: If WP auto-completed, finalize linked entities: `/pm-done {wpId}`
- Continue with next priority: `/pm-next`
- Check overall progress: `/pm-status`Constraints
- In task mode, NEVER auto-complete the task — always let the user confirm via
/pm-done - In phase/WP mode, tasks ARE auto-completed as part of the execution loop (the user opted into batch execution by providing a phase/WP ID)
- If a task is blocked by something outside the queue, SKIP it — do not bypass blockers
- Follow existing code patterns — read before writing
- Run targeted tests after every task, full suite at phase boundaries (phase/WP mode) or after every task (task mode)
- Keep changes focused on exactly what each task describes
- Re-fetch WP details if needed to get updated state after cascades
- Auto-activate parent entities (WP, linked Issue/FR) at the START without asking
- Auto-complete linked entities (Issue/FR) on WP completion without asking
- Rollback on persistent failure — stash broken changes after 3 fix attempts rather than leaving a broken codebase
- Research is proportional — most tasks follow existing patterns and need no research. Only look things up when the task involves genuinely unfamiliar technology.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

