From e4d9efbb320e9ffa660648d21e112b6353ad2da6 Mon Sep 17 00:00:00 2001 From: alexsoyes Date: Fri, 9 Oct 2026 10:53:38 +0700 Subject: [PATCH] feat(aidd-dev): rename todo to batch and report each agent's outcome Make parallel task execution discoverable and retain blocked or failed agents in the final recap. --- aidd_docs/README.md | 2 +- docs/CATALOG.md | 2 +- plugins/aidd-dev/.claude-plugin/plugin.json | 2 +- plugins/aidd-dev/CATALOG.md | 8 ++--- plugins/aidd-dev/README.md | 4 +-- plugins/aidd-dev/skills/10-batch/SKILL.md | 17 +++++++++ .../skills/10-batch/actions/01-batch.md | 36 +++++++++++++++++++ plugins/aidd-dev/skills/10-todo/SKILL.md | 17 --------- .../skills/10-todo/actions/01-todo.md | 31 ---------------- .../skills/01-sdlc/references/03-check.md | 10 +++--- .../architecture-rules.property.test.js | 4 +-- scripts/__tests__/architecture-rules.test.js | 2 +- scripts/lib/architecture-rules.js | 2 +- 13 files changed, 71 insertions(+), 66 deletions(-) create mode 100644 plugins/aidd-dev/skills/10-batch/SKILL.md create mode 100644 plugins/aidd-dev/skills/10-batch/actions/01-batch.md delete mode 100644 plugins/aidd-dev/skills/10-todo/SKILL.md delete mode 100644 plugins/aidd-dev/skills/10-todo/actions/01-todo.md diff --git a/aidd_docs/README.md b/aidd_docs/README.md index 0d6bb246a..70cc74c18 100644 --- a/aidd_docs/README.md +++ b/aidd_docs/README.md @@ -104,7 +104,7 @@ AIDD is delivered as a plugin marketplace. Pick what you need; do not install ev | ------------ | ------------------------------------------------------------------------------------------------------------------- | | aidd-context | 00-onboard, 01-bootstrap, 02-project-memory, 03-context-generate, 09-mermaid, 10-learn, 11-explore | | aidd-refine | 01-brainstorm, 02-challenge, 03-shadow-areas, 04-fact-check | -| aidd-dev | 01-plan, 02-implement, 03-assert, 04-audit, 05-review, 06-test, 07-refactor, 08-debug, 09-for-sure, 10-todo | +| aidd-dev | 01-plan, 02-implement, 03-assert, 04-audit, 05-review, 06-test, 07-refactor, 08-debug, 09-for-sure, 10-batch | | aidd-orchestrator | 00-async-dev, 01-sdlc | | aidd-vcs | 01-commit, 02-pull-request, 03-release-tag, 04-issue-create | | aidd-pm | 01-ticket-info, 02-user-stories, 03-prd, 04-spec, 05-spike, 06-product-brief, 07-epic, 08-three-amigos, 09-defect, 10-task | diff --git a/docs/CATALOG.md b/docs/CATALOG.md index c169c926b..8dc5cc78c 100644 --- a/docs/CATALOG.md +++ b/docs/CATALOG.md @@ -49,7 +49,7 @@ Code transformation: plan, implement, assert, audit, review, test, refactor, deb | `07-refactor` | Improve code without changing behavior across four axes | `01-performance`, `02-security`, `03-cleanup`, `04-architecture` | | `08-debug` | Reproduce and fix bugs with a test-driven workflow | `01-reproduce`, `02-debug`, `03-reflect-issue` | | `09-for-sure` | Iterative loop that retries until a success condition is met | `01-init-tracking`, `02-auto-accept`, `03-autonomous-loop` | -| `10-todo` | Split the prompt into independent todos, run one implementer agent per todo in parallel | `01-todo` | +| `10-batch` | Execute independent tasks in parallel and summarize each agent's status and result | `01-batch` | ## 📋 aidd-pm diff --git a/plugins/aidd-dev/.claude-plugin/plugin.json b/plugins/aidd-dev/.claude-plugin/plugin.json index 766e5b871..dad390abb 100644 --- a/plugins/aidd-dev/.claude-plugin/plugin.json +++ b/plugins/aidd-dev/.claude-plugin/plugin.json @@ -17,7 +17,7 @@ "./skills/07-refactor", "./skills/08-debug", "./skills/09-for-sure", - "./skills/10-todo" + "./skills/10-batch" ], "agents": [ "./agents/executor.md", diff --git a/plugins/aidd-dev/CATALOG.md b/plugins/aidd-dev/CATALOG.md index c54c4de54..c6c679f63 100644 --- a/plugins/aidd-dev/CATALOG.md +++ b/plugins/aidd-dev/CATALOG.md @@ -18,7 +18,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai - [`skills/07-refactor`](#skills07-refactor) - [`skills/08-debug`](#skills08-debug) - [`skills/09-for-sure`](#skills09-for-sure) - - [`skills/10-todo`](#skills10-todo) + - [`skills/10-batch`](#skills10-batch) --- @@ -137,10 +137,10 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `references` | [autonomous-loop-log-format.md](skills/09-for-sure/references/autonomous-loop-log-format.md) | - | | `-` | [SKILL.md](skills/09-for-sure/SKILL.md) | `Run an iterative agent loop that retries until a runnable success condition passes. Use when the user says "for sure", "keep trying until", or wants guaranteed completion against a success command. Not for one-shot tasks or uncheckable goals.` | -#### `skills/10-todo` +#### `skills/10-batch` | Group | File | Description | |-------|------|---| -| `actions` | [01-todo.md](skills/10-todo/actions/01-todo.md) | - | -| `-` | [SKILL.md](skills/10-todo/SKILL.md) | `Split the user prompt into independent todos and run one executor agent per todo in parallel, then report a minimal table. Use when the user says "todo" or asks to fan out a multi-part request into parallel implementations.` | +| `actions` | [01-batch.md](skills/10-batch/actions/01-batch.md) | - | +| `-` | [SKILL.md](skills/10-batch/SKILL.md) | `Split a request into independent tasks, execute them in parallel, and summarize each agent's task, status, and result. Use when the user says "batch" or asks to execute a multi-part request in parallel.` | diff --git a/plugins/aidd-dev/README.md b/plugins/aidd-dev/README.md index 4e0ddb2cf..30e1d7250 100644 --- a/plugins/aidd-dev/README.md +++ b/plugins/aidd-dev/README.md @@ -8,7 +8,7 @@ Code transformation plugin for the AI-Driven Development framework. First time? Install with `/plugin install aidd-dev@aidd-framework`, then run `aidd-dev:01-plan`. -Covers code transformation: planning, implementation, assertions, audits, code review, testing, refactoring, debugging, for-sure, and parallel todo fan-out. Also hosts AI agents. +Covers code transformation: planning, implementation, assertions, audits, code review, testing, refactoring, debugging, for-sure, and parallel batch execution. Also hosts AI agents. ## Skills @@ -23,7 +23,7 @@ Covers code transformation: planning, implementation, assertions, audits, code r | [2.7] | [refactor](skills/07-refactor/SKILL.md) | Optimize code for performance and fix security vulnerabilities following OWASP guidelines. | | [2.8] | [debug](skills/08-debug/SKILL.md) | Reproduce and fix bugs systematically using test-driven workflow, root cause analysis, and hypothesis validation. | | [2.9] | [for-sure](skills/09-for-sure/SKILL.md) | Iterative agent loop that tracks attempts and retries until a success condition is met. | -| [2.10] | [todo](skills/10-todo/SKILL.md) | Split the prompt into independent todos, run one executor agent per todo in parallel, then report a minimal table. | +| [2.10] | [batch](skills/10-batch/SKILL.md) | Split a request into independent tasks, execute them in parallel, and summarize each agent's task, status, and result. | ## Agents diff --git a/plugins/aidd-dev/skills/10-batch/SKILL.md b/plugins/aidd-dev/skills/10-batch/SKILL.md new file mode 100644 index 000000000..042b64dd8 --- /dev/null +++ b/plugins/aidd-dev/skills/10-batch/SKILL.md @@ -0,0 +1,17 @@ +--- +name: 10-batch +description: Split a request into independent tasks, execute them in parallel, and summarize each agent's task, status, and result. Use when the user says "batch" or asks to execute a multi-part request in parallel. +argument-hint: requirement +--- + +# Batch + +Turn one prompt into independent tasks, implement them in parallel, report each agent's outcome. + +## Actions + +```markdown +actions/01-batch.md +``` + +Before running an action, read its file in `actions/`, not only the table or assets. diff --git a/plugins/aidd-dev/skills/10-batch/actions/01-batch.md b/plugins/aidd-dev/skills/10-batch/actions/01-batch.md new file mode 100644 index 000000000..825f87026 --- /dev/null +++ b/plugins/aidd-dev/skills/10-batch/actions/01-batch.md @@ -0,0 +1,36 @@ +# 01 - Batch + +Split the user prompt into independent tasks, implement each in parallel, report. + +## Input +User's requirement. + +## Output +```markdown +| Agent | Task | Status | Result | +| ----- | ---- | ------ | ------ | +``` + +One row per dispatched agent, identified by its name or ID. Status is `Done` (task completed with validation evidence), `Blocked` (an unmet prerequisite prevents completion), or `Failed` (execution failed). Result summarizes the outcome and changed files, or the reason and remaining work for a blocked or failed task. + +## Process + +1. **Read.** Take `prompt` from the arguments; if empty, ask the user. +2. **Split.** Divide the prompt into distinct, independent tasks. Inline, no agent. +3. **Launch.** Spawn one `executor` agent per task, all in parallel (one message, multiple Task calls). Track each agent's name or ID and assigned task. Each agent prompt mandates, in order: + ```markdown + 1. Refine the task first: run a non-interactive refine capability if one is available (discovered at runtime, never a hardcoded plugin name); otherwise restate the task clearly and resolve obvious ambiguity inline. Never block on the user. + 2. Implement the refined task. + 3. Return a one-line summary with status, outcome, changed files, and validation evidence; if blocked or failed, include the reason and remaining work. + ``` +4. **Collect.** Wait for every dispatched agent to finish or report a blocker. Preserve blocked and failed outcomes; mark an agent that exits with an error as `Failed` even if it returns no summary. +5. **Report.** Print exactly one final table using the output columns, nothing else. Base each status and result on the collected evidence. + +## Test + +- Every dispatched agent is one row in the table, including blocked or failed agents. +- Each row identifies the agent and its assigned task, status, and result. +- Agents were spawned in a single parallel batch. +- Each agent ran a refine step before implementing. +- The final table follows collection of all agents' outcomes; `Done` requires completion and validation evidence. +- No output besides the table. diff --git a/plugins/aidd-dev/skills/10-todo/SKILL.md b/plugins/aidd-dev/skills/10-todo/SKILL.md deleted file mode 100644 index a2083c643..000000000 --- a/plugins/aidd-dev/skills/10-todo/SKILL.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: 10-todo -description: Split the user prompt into independent todos and run one executor agent per todo in parallel, then report a minimal table. Use when the user says "todo" or asks to fan out a multi-part request into parallel implementations. -argument-hint: requirement ---- - -# Todo - -Turn one prompt into N independent todos, implement them in parallel, report a table. - -## Actions - -```markdown -actions/01-todo.md -``` - -Before running an action, read its file in `actions/`, not only the table or assets. diff --git a/plugins/aidd-dev/skills/10-todo/actions/01-todo.md b/plugins/aidd-dev/skills/10-todo/actions/01-todo.md deleted file mode 100644 index 222401dc4..000000000 --- a/plugins/aidd-dev/skills/10-todo/actions/01-todo.md +++ /dev/null @@ -1,31 +0,0 @@ -# 01 - Todo - -Categorize the user prompt into independent todos, implement each in parallel, report. - -## Input -User's requirement. - -## Output -```markdown -| Category | Launched | Output | -| -------- | -------- | ------ | -``` - -## Process - -1. **Read.** Take `prompt` from the arguments; if empty, ask the user. -2. **Categorize.** Split the prompt into distinct, independent todos (category + task). Inline, no agent. -3. **Launch.** Spawn one `executor` agent per todo, all in parallel (one message, multiple Task calls). Each agent prompt mandates, in order: - ```markdown - 1. Refine the todo first: run a non-interactive refine capability if one is available (discovered at runtime, never a hardcoded plugin name); otherwise restate the todo clearly and resolve obvious ambiguity inline. Never block on the user. - 2. Implement the refined todo. - 3. Return a one-line output summary. - ``` -4. **Report.** Print exactly one table, nothing else. - -## Test - -- Every todo is one row in the table. -- Agents were spawned in a single parallel batch. -- Each agent ran a refine step before implementing. -- No output besides the table. diff --git a/plugins/aidd-orchestrator/skills/01-sdlc/references/03-check.md b/plugins/aidd-orchestrator/skills/01-sdlc/references/03-check.md index ca5657884..9603ab221 100644 --- a/plugins/aidd-orchestrator/skills/01-sdlc/references/03-check.md +++ b/plugins/aidd-orchestrator/skills/01-sdlc/references/03-check.md @@ -10,7 +10,7 @@ A checker's finding is routed by what it is about. A refusal the user gives at a pause is not one of these: `mode.md` routes that by artifact. - Product or contract findings are the next Frame source. -- Independent implementation findings go through Todo; dependent repairs stay together in Deliver. +- Independent implementation findings go through Batch; dependent repairs stay together in Deliver. - Re-enter Check after every new candidate. - Once the review has cleared, only a finding that contradicts the contract reopens a zone: carry any other onto the request as a note. - A finding already acted on is never routed twice. Repaired or not, it is a decision that requires user authority, and no request opens until that arrives. @@ -43,7 +43,7 @@ flowchart TD direction TB Findings["$findings"] Frame["01 Frame"] - Todo["/aidd-dev:10-todo"] + Batch["/aidd-dev:10-batch"] Deliver["02 Deliver"] end @@ -63,9 +63,9 @@ flowchart TD Challenge -- "Return actionable challenge findings." --> Findings Challenge -- "When the outcome is trustworthy, open the draft pull request." --> PullRequest Findings -- "Use product findings as the next Frame source." --> Frame - Findings -- "Repair independent implementation findings in parallel." --> Todo + Findings -- "Repair independent implementation findings in parallel." --> Batch Findings -- "Repair dependent implementation findings together." --> Deliver - Todo --> Deliver + Batch --> Deliver PullRequest --> PullRequestUrl classDef skill fill:#DBEAFE,stroke:#2563EB,color:#1E3A8A,stroke-width:2px @@ -73,7 +73,7 @@ flowchart TD classDef artifact fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:2px classDef zone fill:#F1F5F9,stroke:#64748B,color:#0F172A,stroke-width:2px - class Review,Challenge,Todo,PullRequest skill + class Review,Challenge,Batch,PullRequest skill class Checker agent class Contract,Plan,CommittedCandidate,ValidationReports,Findings,PullRequestUrl artifact class Frame,Deliver zone diff --git a/scripts/__tests__/architecture-rules.property.test.js b/scripts/__tests__/architecture-rules.property.test.js index ec8434428..7c3001976 100644 --- a/scripts/__tests__/architecture-rules.property.test.js +++ b/scripts/__tests__/architecture-rules.property.test.js @@ -226,9 +226,9 @@ test("every router in the tree cites every action it provides", () => { }); test("removing a real router's citation is caught, for every action in the tree", () => { - // `aidd-dev:10-todo` names its one action as a fenced path rather than a table row, so there + // `aidd-dev:10-batch` names its one action as a fenced path rather than a table row, so there // is no row to remove and nothing to catch. It is the one documented exception. - const FENCED_PATH_SKILL = "plugins/aidd-dev/skills/10-todo/SKILL.md"; + const FENCED_PATH_SKILL = "plugins/aidd-dev/skills/10-batch/SKILL.md"; const missed = []; let checked = 0; diff --git a/scripts/__tests__/architecture-rules.test.js b/scripts/__tests__/architecture-rules.test.js index 9eb7df1b8..1ca8d3528 100644 --- a/scripts/__tests__/architecture-rules.test.js +++ b/scripts/__tests__/architecture-rules.test.js @@ -424,7 +424,7 @@ test("a fenced example table inside the Actions section cites nothing", () => { assert.match(violations[0].message, /never names action file "02-second\.md"/); }); -test("a fenced actions/.md path still cites, the way 10-todo does", () => { +test("a fenced actions/.md path still cites, the way 10-batch does", () => { const content = [ "# Fenced path skill", "", diff --git a/scripts/lib/architecture-rules.js b/scripts/lib/architecture-rules.js index 3ea9ade7a..2c3bd95db 100644 --- a/scripts/lib/architecture-rules.js +++ b/scripts/lib/architecture-rules.js @@ -230,7 +230,7 @@ function matchesOf(pattern, text) { /** * The three citation shapes. Only the `actions/.md` path is read through a fence, because - * `aidd-dev:10-todo` cites its one action that way; a backticked file name inside a fence is an + * `aidd-dev:10-batch` cites its one action that way; a backticked file name inside a fence is an * example. A word loose in prose is never a citation. */ function citationsIn(blankedLines, rawLines) {