|
| 1 | +# aidd-parallel Skill Epic |
| 2 | + |
| 3 | +**Status**: 📋 PLANNED |
| 4 | +**Goal**: Extract parallel prompt generation and sub-agent dispatch into a shared `/aidd-parallel` skill, fix the constraint conflation in `/aidd-pr`, and make prompt generation independently unit-testable. |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +The prompt generation and sub-agent dispatch logic in `/aidd-pr` is reusable across any skill that needs to fan work out to sub-agents (PR review, task execution, etc). Extracting it into `/aidd-parallel` gives us a clean unit-testable boundary, fixes the constraint conflation problem in `/aidd-pr` (orchestrator constraints mixed with sub-agent constraints), and makes `/aidd-pr` simpler. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Create the aidd-parallel skill |
| 13 | + |
| 14 | +Add `ai/skills/aidd-parallel/SKILL.md` following the AgentSkills specification. |
| 15 | + |
| 16 | +**Requirements**: |
| 17 | +- Given the agent needs to discover the skill, its name and description should be in the frontmatter |
| 18 | +- Given the agent needs to discover what a skill does, the description should include a very brief description of functionality without delving into implementation details |
| 19 | +- Given the agent needs to discover when to use a skill, the description should include a very brief "Use when..." clause |
| 20 | +- Given a list of tasks, should generate one `/aidd-fix` delegation prompt per task |
| 21 | +- Given a delegation prompt, should start with `/aidd-fix` |
| 22 | +- Given a delegation prompt, should be wrapped in a markdown codeblock, with any nested codeblocks indented to prevent breaking the outer block |
| 23 | +- Given `--branch <branch>` is supplied, should instruct each sub-agent to work directly on `<branch>` and commit and push to origin on `<branch>` |
| 24 | +- Given `--branch` is omitted, should assume the current branch |
| 25 | +- Given `/aidd-parallel delegate`, should first create a list of files that will need to change and a mermaid change dependency graph (for sequencing reference only — do not save or commit) |
| 26 | +- Given `/aidd-parallel delegate`, should use the dependency graph to sequence the prompts before dispatching |
| 27 | +- Given `/aidd-parallel delegate`, should spawn one sub-agent worker per prompt in dependency order |
| 28 | +- Given post-dispatch callbacks are needed (e.g. resolving PR threads), should be the caller's responsibility |
| 29 | + |
| 30 | +Constraints { |
| 31 | + put the prompt in a markdown codeblock, indenting any nested codeblocks to prevent breaking the outer block |
| 32 | + instruct the agent to work directly from the supplied branch and commit directly to the supplied branch (not from/to main, not to their own fix branch) |
| 33 | +} |
| 34 | + |
| 35 | +Commands { |
| 36 | + /aidd-parallel [--branch <branch>] <tasks> - generate one /aidd-fix delegation prompt per task |
| 37 | + /aidd-parallel delegate - build file list + mermaid dep graph, sequence, and dispatch to sub-agents |
| 38 | +} |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## Add the aidd-parallel command |
| 43 | + |
| 44 | +Add `ai/commands/aidd-parallel.md` so the skill is invokable and discoverable. |
| 45 | + |
| 46 | +**Requirements**: |
| 47 | +- Given the command file, should load and execute `ai/skills/aidd-parallel/SKILL.md` |
| 48 | +- Given the command file, should respect constraints from `/aidd-please` |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## Update aidd-pr to use aidd-parallel |
| 53 | + |
| 54 | +Remove the prompt generation and constraint logic from `/aidd-pr` that now belongs in `/aidd-parallel`. |
| 55 | + |
| 56 | +**Requirements**: |
| 57 | +- Given remaining issues after triage, `/aidd-pr` should call `/aidd-parallel` to generate delegation prompts rather than generating them inline |
| 58 | +- Given the inner `Constraints` block in `/aidd-pr` (codeblock format, branch targeting), should be removed from `/aidd-pr` — it belongs in `/aidd-parallel` |
| 59 | +- Given `/aidd-pr delegate`, should call `/aidd-parallel delegate` and then resolve related PR conversation threads via the GitHub GraphQL API |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## Add aidd-parallel eval |
| 64 | + |
| 65 | +Add `ai-evals/aidd-parallel/` with a unit eval for prompt generation. |
| 66 | + |
| 67 | +**Requirements**: |
| 68 | +- Given a list of tasks and a branch, the eval should assert one prompt is generated per task |
| 69 | +- Given a generated prompt, should assert it starts with `/aidd-fix` |
| 70 | +- Given a generated prompt, should assert it references the correct branch |
| 71 | +- Given a generated prompt, should assert it is wrapped in a markdown codeblock |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +## Update aidd-please discovery |
| 76 | + |
| 77 | +Add `/aidd-parallel` to the Commands block in `ai/skills/aidd-please/SKILL.md`. |
| 78 | + |
| 79 | +**Requirements**: |
| 80 | +- Given the aidd-please Commands block, should list `/aidd-parallel` so agents can discover it |
0 commit comments