From afyapowers
Use when executing implementation plans with independent tasks in the current session
npx claudepluginhub iclinic/devex-marketplace --plugin afyapowersThis skill uses the workspace's default tool permissions.
Execute plan by dispatching subagents per task. Tasks with no mutual dependencies run in parallel waves for faster execution.
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
Execute plan by dispatching subagents per task. Tasks with no mutual dependencies run in parallel waves for faster execution.
Core principle: Fresh subagent per task + self-review + concerns collection = fast iteration with deferred quality review
digraph process {
rankdir=TB;
"Read plan, parse tasks and dependencies" [shape=box];
"Check for circular dependencies" [shape=diamond];
"Report cycle, stop" [shape=box, style=filled, fillcolor=red, fontcolor=white];
"Compute ready set" [shape=box];
"Any tasks ready?" [shape=diamond];
"Validate file overlap in ready set" [shape=box];
"Apply Figma concurrency cap\nDispatch parallel Agent calls" [shape=box];
"Wait for all agents to return" [shape=box];
"Process results" [shape=box];
"All tasks done?" [shape=diamond];
"Write implementation-concerns.md" [shape=box];
"Complete" [shape=doublecircle];
"Read plan, parse tasks and dependencies" -> "Check for circular dependencies";
"Check for circular dependencies" -> "Report cycle, stop" [label="cycle found"];
"Check for circular dependencies" -> "Compute ready set" [label="no cycles"];
"Compute ready set" -> "Any tasks ready?";
"Any tasks ready?" -> "Write implementation-concerns.md" [label="all done"];
"Any tasks ready?" -> "Validate file overlap in ready set" [label="yes"];
"Validate file overlap in ready set" -> "Apply Figma concurrency cap\nDispatch parallel Agent calls";
"Apply Figma concurrency cap\nDispatch parallel Agent calls" -> "Wait for all agents to return";
"Wait for all agents to return" -> "Process results";
"Process results" -> "All tasks done?";
"All tasks done?" -> "Compute ready set" [label="more tasks"];
"All tasks done?" -> "Write implementation-concerns.md" [label="yes"];
"Write implementation-concerns.md" -> "Complete";
}
Each dispatched Agent implements the task, performs a self-review, and returns a status with any concerns. Multiple agents run concurrently.
Follow these steps exactly to resolve dependencies and dispatch tasks in parallel waves.
Read the plan and extract all tasks. For each task, record:
### Task N: heading)**Depends on:** line — parse as list of task numbers, or empty if none)**Files:** section — all file paths mentioned)Example:
Task 1: deps=[] files=[src/a.py, tests/test_a.py] status=pending
Task 2: deps=[] files=[src/b.py, tests/test_b.py] status=pending
Task 3: deps=[1,2] files=[src/c.py, tests/test_c.py] status=pending
Task 4: deps=[1,2] files=[src/d.py, tests/test_d.py] status=pending
Task 5: deps=[3,4] files=[src/e.py, tests/test_e.py] status=pending
Before executing anything, verify no circular dependencies exist. If task A depends on B and B depends on A (directly or transitively), report: "Circular dependency detected — the following tasks form a cycle: [list]. Please fix the plan." Do NOT proceed until cycles are resolved.
A task is ready if:
pending or needs-retrydeps list have status completedCompleted: [1, 2]
Ready: [3, 4] (deps [1,2] all completed)
Waiting: [5] (dep 3 not completed)
Check every pair of tasks in the ready set. If two tasks share any file path in their file lists, remove one from the ready set (move it back to waiting). It will be picked up in the next cycle.
Figma-aware concurrency: After file overlap validation, classify each task in the ready set:
**Figma:** section**Figma:** sectionApply concurrency caps:
Why 4? The Figma MCP rate-limits at 15 requests/minute. Each Figma task makes 3 mandatory MCP calls, so 4 concurrent tasks = 12 calls — safely under the limit.
Dispatch the combined set (all non-Figma + up to 4 Figma) as parallel Subagent calls in a single message.
Prompt routing: Select the correct implementer prompt based on the task type:
**Figma:** section → use skills/implementing/implement-figma-design.md prompt template. Include the Figma metadata (file key, node ID, breakpoints) in the agent context.**Figma:** section → use skills/implementing/implementer-prompt.md prompt template (standard TDD implementer).Each agent gets:
All Agent calls return together. For each result:
completed, update plan checkbox to - [x]completed. If the concern indicates the task is fundamentally broken, treat as BLOCKED instead.
needs-retry. Continue with other tasks — do NOT pause the entire executionneeds-retryGo back to Step 3. Recompute the ready set from scratch based on current task statuses. Continue until all tasks are completed.
If no tasks are ready and not all tasks are completed, there's a problem:
needs-retry: surface all blockers to the userPlan: 5 tasks. Task 1,2 have no deps. Task 3,4 depend on 1,2. Task 5 depends on 3,4.
--- Cycle 1 ---
Completed: []
Ready: [1, 2] → no file overlap → dispatch both
→ Agent(Task 1), Agent(Task 2) dispatched in parallel
→ Both return DONE
Completed: [1, 2]
--- Cycle 2 ---
Ready: [3, 4] (deps [1,2] all completed) → no file overlap → dispatch both
→ Agent(Task 3), Agent(Task 4) dispatched in parallel
→ Task 3 returns DONE_WITH_CONCERNS (concern noted)
→ Task 4 returns DONE
Completed: [1, 2, 3, 4]
Concerns collected: [Task 3: "..."]
--- Cycle 3 ---
Ready: [5] (deps [3,4] all completed) → dispatch
→ Agent(Task 5) dispatched
→ Returns DONE
Completed: [1, 2, 3, 4, 5] → Write implementation-concerns.md → Done
Ready: [1(std), 2(std), 3(figma), 4(figma), 5(std), 6(figma)]
→ Classify: non-Figma = [1, 2, 5], Figma = [3, 4, 6]
→ Apply caps: all non-Figma + first 4 Figma
→ Dispatch: [1, 2, 5] + [3, 4, 6] = 6 parallel agents (all 3 Figma tasks fit under the cap of 4)
If the plan has no **Depends on:** lines on any task, warn: "Plan is missing dependency declarations. Falling back to sequential execution." Then execute tasks one at a time in order, identical to pre-parallel SDD behavior.
If a plan has all tasks depending on the previous one (linear chain), the wave executor naturally dispatches one task at a time — no special case needed.
After each wave completes:
When dispatching implementer subagents (whether sequential or parallel), craft focused prompts:
Common mistakes:
Use the least powerful model that can handle each role to conserve cost and increase speed.
Mechanical implementation tasks (isolated functions, clear specs, 1-2 files): use a fast, cheap model.
Integration and judgment tasks (multi-file coordination, pattern matching, debugging): use a standard model.
Architecture, design, and review tasks: use the most capable available model.
Implementer subagents report one of four statuses:
DONE: Mark task completed, update plan checkbox. No review dispatch.
DONE_WITH_CONCERNS: Read concerns. Store in concerns list and mark completed. If the concern indicates the task is fundamentally broken (e.g., "I couldn't get tests to pass", "Core dependency is missing and I had to stub the entire integration"), treat as BLOCKED instead. Examples of store-and-continue concerns: "I'm not sure this edge case is handled correctly", "The API response format might differ in production", "This works but the approach feels fragile."
NEEDS_CONTEXT: Provide missing context and re-dispatch.
BLOCKED: Assess blocker:
Never ignore an escalation or force retry without changes.
skills/implementing/implementer-prompt.md - Dispatch standard implementer subagent (TDD workflow)skills/implementing/implement-figma-design.md - Dispatch Figma design implementer subagent (visual fidelity workflow)Never:
If subagent asks questions:
If subagent fails task:
Invoked by:
Subagent prompts:
skills/implementing/implementer-prompt.md — TDD rules are embedded directly in this prompt (used for standard tasks)skills/implementing/implement-figma-design.md — Figma implement-design workflow (used for tasks with **Figma:** section)Context: When invoked by implementing, the plan and design are already in the conversation context. Use them directly. If the plan is not in context (e.g., invoked standalone), read it from .afyapowers/features/<feature>/artifacts/plan.md.
After all tasks complete, if any DONE_WITH_CONCERNS notes were collected during execution, write them to .afyapowers/features/<feature>/artifacts/implementation-concerns.md:
# Implementation Concerns
Collected during implementation phase. Priority areas for the review phase.
## Task N: [task name verbatim from plan heading]
- [concern text from implementer report]
## Task M: [task name verbatim from plan heading]
- [concern text from implementer report]
If the implementation phase is re-run (e.g., after fixing a blocked task), overwrite implementation-concerns.md with fresh data from the current run — do not append to stale concerns from a previous run. If no concerns were collected, do not create the file.