Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ea39f4c
feat(aidd-pr): add /aidd-pr skill for PR review and fix delegation
cursoragent Mar 24, 2026
dc55c7a
feat(aidd-please): add /aidd-pr to Commands discovery block
cursoragent Mar 25, 2026
919f68e
fix(aidd-pr): replace elaborated SudoLang workflow with verbatim prompt
cursoragent Mar 25, 2026
9120afb
feat(aidd-pr): add delegation constraint to prevent direct execution
cursoragent Mar 25, 2026
1a0e5e7
fix(aidd-pr): move delegation constraint to orchestrator scope
cursoragent Mar 25, 2026
9d70a46
fix(aidd-pr): soften delegation constraint to prefer over always
cursoragent Mar 25, 2026
f4cebbe
fix(aidd-pr): use original wording for delegation constraint
cursoragent Mar 25, 2026
802105a
docs(aidd-pr): rewrite README as man-page, tighten skill description
cursoragent Mar 25, 2026
c9dc3bf
test(aidd-pr): add Riteway unit tests for skill structure and content
cursoragent Mar 25, 2026
0d801c1
test(aidd-pr): add riteway ai prompt eval
cursoragent Mar 25, 2026
2b8b04a
test(aidd-pr): remove vitest structural tests replaced by ai eval
cursoragent Mar 25, 2026
c6a248c
test(aidd-pr): rewrite ai eval with fixture files and focused assertions
cursoragent Mar 25, 2026
fed13e9
test(aidd-pr): supply mock gh and GraphQL tools in eval user prompt
cursoragent Mar 25, 2026
dd93f96
test(aidd-pr): split eval into two focused step prompts
cursoragent Mar 25, 2026
f5918ff
test(aidd-pr): step 1 should test tool calls, not pre-supply answers
cursoragent Mar 25, 2026
135589b
plan(aidd-riteway-ai): add epic for riteway ai skill and requirements…
cursoragent Mar 25, 2026
9244de7
feat(aidd-requirements): rename aidd-functional-requirements to aidd-…
cursoragent Mar 25, 2026
0d821c5
plan(aidd-riteway-ai): update epic - drop rename task, sharpen requir…
cursoragent Mar 25, 2026
4c8e427
plan(aidd-riteway-ai): note e2e infrastructure cost, prefer unit eval…
cursoragent Mar 25, 2026
1fdf942
revert(aidd-riteway-ai): undo premature e2e note, decision not yet made
cursoragent Mar 25, 2026
b5ba856
plan(aidd-parallel): add epic for shared parallel prompt generation s…
cursoragent Mar 25, 2026
a7891d3
feat(commands): add aidd-requirements command file
cursoragent Mar 30, 2026
e29b134
feat(aidd-parallel): add /aidd-parallel skill for parallel sub-agent …
cursoragent Mar 30, 2026
71b1c4f
feat(aidd-riteway-ai): add skill, command, tests, and aidd-please int…
cursoragent Mar 30, 2026
6581489
chore: merge main into branch, resolve conflicts
cursoragent Mar 30, 2026
7ab2735
plan(ci): add epic for ai eval wiring, non-blocking job, and daily sc…
cursoragent Mar 30, 2026
757ed7c
fix(aidd-pr): clarify dangling branch reference in Constraints block
cursoragent Mar 30, 2026
4bd5039
docs(aidd-riteway-ai): add man-page style README
cursoragent Mar 30, 2026
9c7ba85
test: add failing test for aidd-requirements README link
cursoragent Mar 31, 2026
c3b7eda
feat(agents-md): add Task Index to requiredDirectives, template, and …
cursoragent Apr 6, 2026
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
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ import aidd-custom/AGENTS.md // settings from this import should override the ro
## Task Index

fix bug => /aidd-fix
review pull request => /aidd-pr
1 change: 1 addition & 0 deletions ai-evals/aidd-parallel/fixtures/add.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const add = (a, b) => a - b;
1 change: 1 addition & 0 deletions ai-evals/aidd-parallel/fixtures/greet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const greet = (name) => `Hello, ${name}`;
21 changes: 21 additions & 0 deletions ai-evals/aidd-parallel/prompt-generation-test.sudo
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import 'ai/skills/aidd-parallel/SKILL.md'

userPrompt = """
Run /aidd-parallel --branch feature/utils with the following two tasks:

Task 1:
File: ai-evals/aidd-parallel/fixtures/add.js, line 1
"add() subtracts instead of adding — should use + not -"

Task 2:
File: ai-evals/aidd-parallel/fixtures/greet.js, line 1
"greet() should include an exclamation mark at the end of the greeting"

Generate delegation prompts for both tasks.
"""

- Given two tasks and a branch, should generate a separate delegation prompt for each task
- Given a generated prompt, should start with /aidd-fix
- Given a generated prompt, should reference the correct branch feature/utils
- Given a generated prompt, should instruct the sub-agent to commit and push to origin/feature/utils
- Given a generated prompt, should be wrapped in a markdown codeblock
1 change: 1 addition & 0 deletions ai-evals/aidd-pr/fixtures/add.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const add = (a, b) => a - b;
1 change: 1 addition & 0 deletions ai-evals/aidd-pr/fixtures/greet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const greet = (name) => `Hello, ${name}!`;
Comment thread
cursor[bot] marked this conversation as resolved.
25 changes: 25 additions & 0 deletions ai-evals/aidd-pr/step-1-triage-test.sudo
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import 'ai/skills/aidd-pr/SKILL.md'

userPrompt = """
You have the following mock tools available. Use them instead of real gh or GraphQL calls:

mock gh pr view => returns:
title: Fix utility functions
branch: feature/utils
base: main

mock gh api (list review threads) => returns:
[
{ id: "T_01", resolved: false, file: "ai-evals/aidd-pr/fixtures/add.js", line: 1, body: "add() subtracts instead of adding — should use + not -" },
{ id: "T_02", resolved: false, file: "ai-evals/aidd-pr/fixtures/greet.js", line: 1, body: "greet() should include an exclamation mark at the end of the greeting" }
]

mock GraphQL resolveReviewThread => returns: { thread: { isResolved: true } }

Run step 1 of /aidd-pr: triage the review threads.
"""

- Given the mock gh api returns two threads, should list both threads before taking any action
- Given a thread whose concern is already fixed in the current source, should classify it as addressed
- Given a thread whose concern is not present in the current source, should classify it as remaining
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
- Given the addressed list is presented, should require approval before resolving
30 changes: 30 additions & 0 deletions ai-evals/aidd-pr/step-2-delegation-test.sudo
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'ai/skills/aidd-pr/SKILL.md'

userPrompt = """
You have the following mock tools available. Use them instead of real gh or GraphQL calls:

mock gh pr view => returns:
title: Fix utility functions
branch: feature/utils
base: main

mock GraphQL resolveReviewThread => returns: { thread: { isResolved: true } }

Triage is complete. The following issues remain unresolved:

Issue 1 (thread ID: T_01):
File: ai-evals/aidd-pr/fixtures/add.js, line 1
"add() subtracts instead of adding — should use + not -"

Issue 2 (thread ID: T_02):
File: ai-evals/aidd-pr/fixtures/greet.js, line 1
"greet() should include an exclamation mark at the end of the greeting"
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated

Generate delegation prompts for the remaining issues.
"""

- Given two remaining issues, should generate a separate delegation prompt for each
- Given a delegation prompt, should start with /aidd-fix
- Given a delegation prompt, should reference the specific file from the review comment
- Given a delegation prompt, should instruct the agent to commit directly to the PR branch feature/utils and not create a new branch
- Given a delegation prompt, should be wrapped in a markdown codeblock
10 changes: 10 additions & 0 deletions ai/commands/aidd-parallel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: Generate /aidd-fix delegation prompts for a list of tasks and optionally dispatch them to sub-agents in dependency order
---
# 🔀 /aidd-parallel

Load and execute the skill at `ai/skills/aidd-parallel/SKILL.md`.

Constraints {
Before beginning, read and respect the constraints in /aidd-please.
}
10 changes: 10 additions & 0 deletions ai/commands/aidd-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: Review a PR, resolve addressed comments, and generate /aidd-fix delegation prompts for remaining issues
---
# 🔍 /aidd-pr

Load and execute the skill at `ai/skills/aidd-pr/SKILL.md`.

Constraints {
Before beginning, read and respect the constraints in /aidd-please.
}
10 changes: 10 additions & 0 deletions ai/commands/aidd-requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: Write functional requirements for a user story. Use when drafting requirements, specifying user stories, or when the user asks for functional specs.
---
# 📋 /aidd-requirements

Load and execute the skill at `ai/skills/aidd-requirements/SKILL.md`.

Constraints {
Before beginning, read and respect the constraints in /aidd-please.
}
10 changes: 10 additions & 0 deletions ai/commands/aidd-riteway-ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: Write correct riteway ai prompt evals for multi-step tool-calling flows. Use when creating .sudo eval files or testing agent skills that use tools.
---
# 🧪 /aidd-riteway-ai

Load and execute the skill at `ai/skills/aidd-riteway-ai/SKILL.md`.

Constraints {
Before beginning, read and respect the constraints in /aidd-please.
}
24 changes: 24 additions & 0 deletions ai/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,30 @@ Rank files by hotspot score to identify prime candidates for refactoring before

*No description available*

### 🔀 /aidd-parallel

**File:** `aidd-parallel.md`

Generate /aidd-fix delegation prompts for a list of tasks and optionally dispatch them to sub-agents in dependency order

### 🔍 /aidd-pr

**File:** `aidd-pr.md`

Review a PR, resolve addressed comments, and generate /aidd-fix delegation prompts for remaining issues

### 📋 /aidd-requirements

**File:** `aidd-requirements.md`

Write functional requirements for a user story. Use when drafting requirements, specifying user stories, or when the user asks for functional specs.

### 🧪 /aidd-riteway-ai

**File:** `aidd-riteway-ai.md`

Write correct riteway ai prompt evals for multi-step tool-calling flows. Use when creating .sudo eval files or testing agent skills that use tools.

### Commit

**File:** `commit.md`
Expand Down
64 changes: 64 additions & 0 deletions ai/skills/aidd-parallel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# aidd-parallel — Parallel Sub-Agent Delegation

`/aidd-parallel` generates focused `/aidd-fix` delegation prompts for a list
of tasks and can dispatch them to sub-agents in dependency order.

## Usage

```
/aidd-parallel [--branch <branch>] <tasks> — generate one /aidd-fix delegation prompt per task
/aidd-parallel delegate — build file list + dep graph, sequence, and dispatch
```

## Why parallel delegation matters

When a PR review or task breakdown produces multiple independent issues, fixing
them sequentially in a single agent thread wastes time and dilutes attention.
`/aidd-parallel` extracts the delegation pattern into a reusable skill so any
workflow — PR review, task execution, epic delivery — can fan work out to
focused sub-agents without reimplementing prompt generation logic.

## How it works

### Step 1 — Resolve the branch

If `--branch <branch>` is supplied, use that branch. If omitted, the current
branch is detected automatically via `git rev-parse --abbrev-ref HEAD`.

### Step 2 — Generate delegation prompts

For each task, one `/aidd-fix` delegation prompt is produced. Every prompt:

- Starts with `/aidd-fix`
- Contains only the context needed for that single task
- Instructs the sub-agent to work directly on the target branch and commit and
push to `origin/<branch>` — never to `main`, never to a new branch
- Is wrapped in a fenced markdown codeblock; any nested codeblocks are indented
one level to prevent them from breaking the outer fence

### Step 3 (delegate only) — Build the dependency graph

`/aidd-parallel delegate` first builds a list of files each task will change,
then produces a Mermaid change dependency graph. The graph is used for
sequencing only — it is not saved or committed.

### Step 4 (delegate only) — Dispatch in dependency order

Prompts are dispatched to sub-agent workers in the order determined by the
dependency graph: tasks with no dependencies first, dependents after their
prerequisites are complete.

Post-dispatch callbacks (e.g. resolving PR conversation threads) are the
caller's responsibility.

## When to use `/aidd-parallel`

- A PR review has multiple independent issues that should be fixed in parallel
- A task epic has been broken into independent sub-tasks suitable for parallel execution
- Any workflow that needs to fan work out to multiple `/aidd-fix` sub-agents

## Constraints

- Each prompt must be wrapped in a markdown codeblock
- Nested codeblocks inside a prompt must be indented to prevent breaking the outer fence
- Sub-agents are always directed to the supplied branch — never to `main` or a new branch
60 changes: 60 additions & 0 deletions ai/skills/aidd-parallel/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: aidd-parallel
description: >
Generate /aidd-fix delegation prompts for a list of tasks and optionally dispatch
them to sub-agents in dependency order.
Use when fanning work out to parallel sub-agents, generating fix delegation prompts
for multiple tasks, or coordinating multi-task execution across a shared branch.
compatibility: Requires git available in the project.
---

# 🔀 aidd-parallel

Act as a top-tier software engineering lead to generate focused `/aidd-fix`
delegation prompts and coordinate parallel sub-agent execution.

Competencies {
parallel task decomposition
dependency graph analysis
sub-agent delegation via /aidd-fix
branch-targeted prompt generation
}

Constraints {
Put each delegation prompt in a markdown codeblock, indenting any nested codeblocks to prevent breaking the outer block
Instruct each sub-agent to work directly on the supplied branch and commit and push to origin on that branch (not to main, not to their own branch)
If --branch is omitted, use the current branch (git rev-parse --abbrev-ref HEAD)
}

## Command: /aidd-parallel [--branch <branch>] <tasks>

generateDelegationPrompts(tasks, branch) => prompts {
1. Resolve the branch: if --branch is supplied use it; otherwise run `git rev-parse --abbrev-ref HEAD`
2. For each task, generate a focused `/aidd-fix` delegation prompt:
- Start the prompt with `/aidd-fix`
- Include only the context needed to address that single task
- Instruct the sub-agent to work directly on `<branch>`, commit, and push to `origin/<branch>`
- Do NOT instruct the sub-agent to create a new branch
3. Wrap each prompt in a fenced markdown codeblock; indent any nested codeblocks by one level to prevent them from breaking the outer fence
4. Output one codeblock per task
}

## Command: /aidd-parallel delegate

delegate(tasks, branch) {
1. Call generateDelegationPrompts to produce one prompt per task
2. Build a list of files that each task will need to change
Comment thread
cursor[bot] marked this conversation as resolved.
3. Build a Mermaid change dependency graph from the file list
- Nodes are files; edges represent "must be complete before" relationships
- This graph is for sequencing reference only — do not save or commit it
4. Use the dependency graph to determine dispatch order:
- Tasks with no dependencies first
- Dependent tasks after their prerequisites are complete
5. Spawn one sub-agent worker per prompt in dependency order
6. Post-dispatch callbacks (e.g. resolving PR threads) are the caller's responsibility
}

Commands {
/aidd-parallel [--branch <branch>] <tasks> - generate one /aidd-fix delegation prompt per task
/aidd-parallel delegate - build file list + mermaid dep graph, sequence, and dispatch to sub-agents
}
3 changes: 3 additions & 0 deletions ai/skills/aidd-please/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ 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-pr - review a pull request, triage comments, and generate /aidd-fix delegation prompts for remaining issues
🔀 /aidd-parallel - generate /aidd-fix delegation prompts for a list of tasks and optionally dispatch them to sub-agents in dependency order
🧪 /aidd-riteway-ai - write correct riteway ai prompt evals for multi-step tool-calling flows
}

Constraints {
Expand Down
17 changes: 17 additions & 0 deletions ai/skills/aidd-pr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# aidd-pr

`/aidd-pr` triages pull request review comments, resolves already-addressed threads, and delegates targeted fix prompts to sub-agents via `/aidd-fix`.

## Usage

```
/aidd-pr [PR URL] — triage comments, resolve addressed threads, and generate /aidd-fix delegation prompts
/aidd-pr delegate — dispatch the generated prompts to sub-agents and resolve related PR conversations via the GitHub GraphQL API
```

## How it works

1. Uses `gh` to list all open review threads and identify which have already been addressed in code
2. Presents the addressed list for manual approval, then resolves those threads via the GitHub GraphQL API
3. Validates remaining issues against the current source
4. For each confirmed issue, generates a focused `/aidd-fix` delegation prompt — one issue per prompt, targeting the PR branch directly
40 changes: 40 additions & 0 deletions ai/skills/aidd-pr/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: aidd-pr
description: >
Triage PR review comments, resolve already-addressed threads, and delegate /aidd-fix prompts for remaining issues.
Use when a PR has open review comments that need to be triaged, resolved, or delegated to sub-agents.
compatibility: Requires gh CLI authenticated and git available in the project.
---

# 🔍 aidd-pr

Act as a top-tier software engineering lead to triage pull request review comments,
resolve already-addressed issues, and coordinate targeted fixes using the AIDD fix process.

Competencies {
pull request triage
review comment analysis
fix delegation via /aidd-fix
GitHub GraphQL API for resolving conversations
}

Constraints {
Always delegate fixes to sub-agents to avoid attention dilution when sub-agents are available
}

Given the following PR:

1. Use `gh` to identify comments that have already been addressed, list them for manual approval and resolve them after we have approved
2. Validate remaining issues, and:

For each issue, use `/aidd-parallel --branch <PR branch>` to generate the delegation prompts.

Constraints {
Do not close any other PRs
Do not touch anything but the branch below
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
}

Commands {
/aidd-pr [PR URL] - take a PR URL, identify issues, and delegate prompts to fix the issues
/aidd-pr delegate - call /aidd-parallel delegate to dispatch prompts, then resolve related PR conversation threads via the GitHub GraphQL API
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# aidd-functional-requirements
# aidd-requirements

Writes functional requirements for user stories using a standardized
"Given X, should Y" format focused on user outcomes.
Expand All @@ -11,7 +11,7 @@ requirements testable and unambiguous.

## Usage

Invoke `/aidd-functional-requirements` with the user story. Each requirement
Invoke `/aidd-requirements` with the user story. Each requirement
follows this template:

```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: aidd-functional-requirements
name: aidd-requirements
Comment thread
cursor[bot] marked this conversation as resolved.
description: Write functional requirements for a user story. Use when drafting requirements, specifying user stories, or when the user asks for functional specs.
---

Expand Down
Loading
Loading