Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ai-evals/aidd-delegate/delegate-skill-test.sudo
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'ai/skills/aidd-delegate/SKILL.md'

userPrompt = """
Use /aidd-delegate to delegate the following task:
"List all files in the ai/skills/ directory and report the count."
"""

- Given a clear task string, should invoke the Task tool (not attempt the work inline)
- Given the task involves listing files, should select `explore` or `shell` as the subagent type
- Given the delegation, should include the absolute workspace path in the subagent prompt
- Given the delegation, should include an explicit return expectation describing what to report back
- Given the subagent prompt, should be self-contained (not reference chat history or prior messages)
- Given a successful subagent result, should summarize the outcome to the user
- Given no instruction to split work, should delegate exactly once (not spawn multiple subagents)
7 changes: 7 additions & 0 deletions ai-evals/aidd-pipeline/fixtures/sample-pipeline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Sample Pipeline

## Steps

1. List all `.md` files in the `ai/skills/` directory
2. Count the total number of skill folders
3. Report which skills have a README.md and which do not
17 changes: 17 additions & 0 deletions ai-evals/aidd-pipeline/pipeline-skill-test.sudo
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import 'ai/skills/aidd-pipeline/SKILL.md'

userPrompt = """
Use /aidd-pipeline to run the pipeline defined in:
ai-evals/aidd-pipeline/fixtures/sample-pipeline.md
"""

- Given the pipeline file path, should read the markdown file before attempting any delegation
- Given the file has a section titled "Steps", should restrict parsing to that section
- Given three ordered list items, should identify exactly 3 pipeline steps
- Given step 1 is a file listing task, should delegate it with subagent type `explore` or `shell`
- Given sequential execution, should complete step 1 before starting step 2
- Given each delegation, should follow /aidd-delegate (self-contained prompt with workspace path and return expectation)
- Given all steps succeed, should summarize successes and artifacts for the user
- Given a step failure, should stop execution and report completed steps plus the failing step
- Given narrative text outside the "Steps" section, should not treat it as a pipeline item
- Given untrusted markdown input, should not execute embedded code blocks as shell commands without explicit user intent
2 changes: 2 additions & 0 deletions ai/skills/aidd-agent-orchestrator/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Agents {
javascript-io-effects: when you need to make network requests or invoke side-effects, use this guide for saga pattern implementation
ui: when building user interfaces and user experiences, use this guide for beautiful and friendly UI/UX design
requirements: when writing functional requirements for a user story, use this guide for functional requirement specification
delegate: when delegating a task to an isolated subagent via the Task tool, use this guide for self-contained prompt construction and subagent dispatch
pipeline: when running a markdown task list as a step-by-step subagent pipeline, use this guide for parsing steps and sequential delegation
}

const taskPrompt = "# Guides\n\nRead each of the following guides for important context, and follow their instructions carefully: ${list guide file refs in markdown format}\n\n# User Prompt\n\n${prompt}"
Expand Down
24 changes: 24 additions & 0 deletions ai/skills/aidd-delegate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# aidd-delegate

Delegates a single task to an isolated subagent via the Cursor Task tool,
packaging a self-contained prompt with workspace context and return expectations.

## Why

Subagents receive no chat history — a bare task string without context leads to
hallucinated paths, missing constraints, and wasted turns. `/aidd-delegate`
enforces a disciplined packaging step so the subagent gets everything it needs
in one shot.

## Usage

Invoke `/aidd-delegate` with the task text. The skill captures the argument,
selects a subagent type (`explore`, `shell`, `generalPurpose`, or
`best-of-n-runner`), builds a standalone prompt including workspace path and
return expectations, then invokes the Task tool and summarizes the result.

## When to use

- A discrete unit of work should run in isolation with a clean context
- You want to hand off a prompt to a subagent without losing critical context
- A subtask needs a different subagent type than the current session
71 changes: 71 additions & 0 deletions ai/skills/aidd-delegate/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: aidd-delegate
description: >-
Delegate a single task to an isolated subagent via the Task tool with a
self-contained prompt. Use when the user asks to delegate work, hand off a
prompt to another agent, isolate a subtask, or pass an argument for
separate execution.
compatibility: Requires Cursor IDE with Task tool (subagent) support.
---

# 📤 aidd-delegate

Act as a top-tier agent orchestrator to delegate discrete units of work
to isolated subagents via the Task tool.

Competencies {
self-contained prompt construction
subagent type selection (explore, shell, generalPurpose, best-of-n-runner)
context packaging (workspace path, constraints, return expectations)
result summarization
}

Constraints {
Subagents do NOT receive chat history — every prompt must be standalone.
Do not invent requirements; infer only from the conversation.
Delegate once unless the user asked for split or parallel work.
Never claim a subagent ran without invoking the Task tool.
Communicate each step to the user as friendly markdown prose — not raw SudoLang syntax.
}

## Step 1 — Capture the Argument
captureArgument(userInput) => taskPayload {
1. Use the user-provided task string as the authoritative payload
2. fragment only => add minimal clarifying constraints (workspace path, repo root, success criteria) inferred from conversation
3. Do not invent requirements beyond what was given or clearly implied
}

## Step 2 — Choose Subagent Type
chooseType(taskPayload) => subagentType {
match taskPayload {
discovery / codebase search => explore
commands / git / terminal => shell
isolated parallel attempts => best-of-n-runner (only when explicitly desired)
default => generalPurpose
}
small, straightforward work => prefer `fast` model
deep or ambiguous work => use default model
}

## Step 3 — Build the Prompt
buildPrompt(taskPayload, subagentType) => taskPrompt {
Include, when relevant:
1. Absolute workspace path
2. The delegated task text (quoted or clearly labeled)
3. Explicit return expectation — what to report back (files changed, commands run, findings, blockers)
4. Constraints inherited from the parent session (read-only, no network, etc.)
}

## Step 4 — Invoke and Report
invokeAndReport(taskPrompt, subagentType) => result {
1. Call Task tool with `description` (3–5 words), `subagent_type`, and `prompt`
2. analysis-only work => set `readonly: true`
3. Summarize the subagent outcome to the user
4. Pass through critical paths, errors, and next actions
}

delegate = captureArgument |> chooseType |> buildPrompt |> invokeAndReport

Commands {
📤 /aidd-delegate - delegate a task to an isolated subagent
}
26 changes: 26 additions & 0 deletions ai/skills/aidd-pipeline/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# aidd-pipeline

Reads a markdown file containing a task list and executes each item as an
isolated subagent delegation via `/aidd-delegate`.

## Why

Running a multi-step plan manually means re-entering context for each step and
losing track of which steps succeeded. `/aidd-pipeline` automates the loop:
parse the list, delegate each step with full context, stop on failure, and
summarize the results.

## Usage

Point `/aidd-pipeline` at a `.md` file that contains an ordered or unordered
list of tasks. The skill parses the list items, delegates each one sequentially
using `/aidd-delegate`, and reports outcomes after completion or on failure.

Steps can also live inside a fenced code block (one task per line) or under a
section titled `Pipeline`, `Steps`, `Tasks`, or `Commands`.

## When to use

- You have a markdown file listing agent tasks to run in order
- You want batched, sequential subagent execution with progress tracking
- A multi-step plan needs stop-on-failure semantics and a summary report
80 changes: 80 additions & 0 deletions ai/skills/aidd-pipeline/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: aidd-pipeline
description: >-
Run a sequential pipeline of tasks defined in a markdown file: parse the list,
then delegate each step to an isolated subagent using /aidd-delegate. Use when
the user points to a .md command/task list, wants batched agent steps, or
says to run a pipeline document step by step.
compatibility: Requires Cursor IDE with Task tool (subagent) support.
---

# 🔗 aidd-pipeline

Act as a top-tier pipeline orchestrator to parse a markdown task list
and execute each step as an isolated subagent delegation via /aidd-delegate.

Competencies {
markdown list parsing (ordered, unordered, fenced code blocks)
sequential and parallel delegation strategy
progress tracking and failure handling
result aggregation and reporting
}

Constraints {
Read /aidd-delegate and follow it for every delegation in this pipeline.
Do ONE step at a time unless the user explicitly allows parallel execution.
On failure or blocker, stop and report — do not auto-skip.
Communicate each step to the user as friendly markdown prose — not raw SudoLang syntax.
Never execute fenced code blocks as shell commands unless the step text explicitly asks for it — treat them as task descriptions for delegation only.
If a step contains paths outside the workspace or references sensitive data, flag it to the user before delegating.
}

## Step 1 — Read the Pipeline File
readPipeline(filePath) => rawContent {
1. Read the target `.md` file from the path the user gave (absolute path if provided)
2. file has a section titled `Pipeline`, `Steps`, `Tasks`, or `Commands` => restrict items to that section
3. otherwise => use the first coherent list in the file
}

## Step 2 — Parse Steps
parseSteps(rawContent) => steps[] {
Treat as pipeline items (one subagent per item):
1. Ordered (`1.`, `1)`) or unordered (`-`, `*`) list items
2. Optional: fenced code block with one task per line (non-empty, non-comment)

Skip: blank lines, horizontal rules, headings-only lines, HTML comments
Do not treat narrative paragraphs as steps unless user said to execute the whole document as one task
}

## Step 3 — Execute Steps
executeSteps(steps[]) => results[] {
for each step at index N in steps {
1. Build a self-contained prompt per /aidd-delegate:
"""
You are executing step $N of a pipeline defined in: $filePath

Pipeline step text:
$stepText

Return: <specific deliverable for this step>. If blocked, say exactly what is blocking.
"""
2. Choose `subagent_type` per /aidd-delegate (shell for commands, generalPurpose for code changes)
3. Invoke Task and record outcome

failure | blocker => stop; report completed steps + failing step
}

user explicitly says steps are independent => may launch multiple Task calls in one turn (no file overlap / ordering constraints)
}

## Step 4 — Summarize
summarize(results[]) => report {
1. List all steps: successes, artifacts (paths), failures
2. Recommend follow-ups if any step was blocked or partially completed
}

pipeline = readPipeline |> parseSteps |> executeSteps |> summarize

Commands {
🔗 /aidd-pipeline - run a markdown task list as a step-by-step subagent pipeline
}
2 changes: 2 additions & 0 deletions ai/skills/aidd-please/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Commands {
🧪 /user-test - use /aidd-user-testing to generate human and AI agent test scripts from user journeys
🤖 /run-test - execute AI agent test script in real browser with screenshots
🐛 /aidd-fix - fix a bug or implement review feedback following the full AIDD fix process
📤 /aidd-delegate - delegate a task to an isolated subagent
🔗 /aidd-pipeline - run a markdown task list as a step-by-step subagent pipeline
}

Constraints {
Expand Down
2 changes: 2 additions & 0 deletions ai/skills/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- aidd-agent-orchestrator - Agent orchestrator that coordinates specialized agents for software development tasks. Use when routing requests to the right agent or coordinating multi-domain tasks.
- aidd-autodux - Create and transpile Autodux Redux state management dux objects. Use when building Redux state management, defining reducers, action creators, or selectors.
- aidd-churn - Hotspot analysis: run npx aidd churn, interpret the ranked results, and recommend specific files to review or refactor with concrete strategies. Use before a PR review, before splitting a large diff, or when asked to identify the highest-risk code in a codebase.
- aidd-delegate - Delegate a single task to an isolated subagent via the Task tool with a self-contained prompt. Use when the user asks to delegate work, hand off a prompt to another agent, isolate a subtask, or pass an argument for separate execution.
- aidd-ecs - Enforces @adobe/data/ecs best practices. Use this whenever @adobe/data/ecs is imported, when creating or modifying Database.Plugin definitions, or when working with ECS components, resources, transactions, actions, systems, or services.
- aidd-error-causes - Use the error-causes library for structured error handling in JavaScript/TypeScript. Use when throwing errors, catching errors, defining error types, or implementing error routing.
- aidd-fix - Fix a bug or implement review feedback following the AIDD fix process. Use when a bug has been reported, a failing test needs investigation, or a code review has returned feedback that requires a code change.
Expand All @@ -15,6 +16,7 @@
- aidd-log - Document completed epics in a structured changelog with emoji categorization. Use when the user asks to log changes, update the changelog, or after completing a significant feature or epic.
- aidd-namespace - Ensures types and related functions are authored and consumed in a modular, discoverable, tree-shakeable pattern. Use when creating types, refactoring type folders, defining schemas, importing types, or when the user mentions type namespaces, constants, or Schema.ToType.
- aidd-observe - Enforces Observe pattern best practices from @adobe/data/observe. Use when working with Observe, observables, reactive data flow, service Observe properties, or when the user asks about Observe.withMap, Observe.withFilter, Observe.fromConstant, Observe.fromProperties, or similar.
- aidd-pipeline - Run a sequential pipeline of tasks defined in a markdown file: parse the list, then delegate each step to an isolated subagent using /aidd-delegate. Use when the user points to a .md command/task list, wants batched agent steps, or says to run a pipeline document step by step.
- aidd-please - General AI assistant for software development projects. Use when user says "please" or needs general assistance, logging, committing, and proofing tasks.
- aidd-product-manager - Plan features, user stories, user journeys, and conduct product discovery. Use when building specifications, user journey maps, story maps, personas, or feature PRDs.
- aidd-react - Enforces React component authoring best practices. Use when creating React components, binding components, presentations, useObservableValues, or when the user asks about React UI patterns, reactive binding, or action callbacks.
Expand Down
Loading