Skip to content
Merged
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
102 changes: 102 additions & 0 deletions .agents/skills/delegate/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
name: delegate
description: Code Cannon: Generate a scoped prompt for delegating work to another agent
---

> **Codex CLI:** This skill is triggered by description matching. State any arguments in your message. Sub-agent spawning is not supported — perform any review steps inline.

---

## What `/delegate` does

`/delegate` generates a ready-to-paste prompt that gives another AI agent everything it needs to contribute code on the current branch. Run it during the planning gate of `/start` (Step 2), before saying `go`, to carve off part of the work for another agent.

Each `/delegate` invocation also tells the lead agent to skip that work when it proceeds.

---

## Prerequisites

`/delegate` relies on context already loaded by `/start`. If you are not in the middle of a `/start` planning gate (Case A Step 2 or Case B Step 2), say:

> "`/delegate` is meant to be run during the planning step of `/start`, before you type `go`. Run `/start` first to load the issue context, then use `/delegate` to carve off tasks."

Stop.

If `$ARGUMENTS` is empty, ask: **"What task should the prompt describe?"** and wait for a response.

---

## Step 1 — Gather branch and diff context

```bash
git branch --show-current
```

```bash
git diff --name-only dev...HEAD 2>/dev/null || git diff --name-only main...HEAD
```

---

## Step 2 — Build the prompt

Compose the following as a fenced markdown block (` ```markdown `) so the operator can copy it.

Use the issue title, body, and agent implementation notes from the current `/start` session — do not re-fetch them.

```markdown
## Your task

<$ARGUMENTS — the operator's description of the delegated work>

## Branch

You are on branch `<branch name>`. Stay on this branch.

## Context

**Issue #<number>: <title>**

<issue body — include the full body as-is>

<if there are agent implementation notes from the issue comments, include them under a "### Agent notes" subheading>

## What's already been done on this branch

<list of changed files from git diff, or "No changes yet — clean branch." if empty>

## Rules

- **Do not commit.** Leave all changes unstaged. The lead developer will handle commits.
- **Be surgical.** Only modify what is necessary for your task. Do not refactor adjacent code, reorganize imports, or "improve" files outside the scope of your task.
- **Do not start until the branch exists on the remote.** The lead developer will create and push the branch. Wait until `git checkout <branch name> && git pull origin <branch name>` succeeds before beginning work.
```

---

## Step 3 — Present to operator and update lead scope

Print the generated prompt preceded by:

> Here's a delegation prompt for: **$ARGUMENTS**
>
> Review and edit as needed, then paste into your agent of choice after the lead agent has created and pushed the branch.

Then print the fenced prompt block.

After presenting, record internally that `$ARGUMENTS` has been delegated. When the operator says `go` and the lead agent proceeds to write code, it must skip the delegated work. If multiple `/delegate` invocations occur before `go`, accumulate all of them.

After presenting, say:

> Noted — the lead agent will skip this part when you say `go`. Run `/delegate <another task>` to delegate more, or type `go` to proceed.

---

## Hard rules

- Never commit, push, or modify any files.
- Never post to GitHub (no comments, labels, or issue updates).
- Output only — the skill produces text for the operator to copy.
- Do not suggest or name a specific agent to paste into — that is the operator's choice.
<!-- generated by CodeCannon/sync.py | skill: delegate | adapter: codex | hash: 09337683 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
6 changes: 3 additions & 3 deletions .agents/skills/start/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Read the relevant code. Propose a concrete implementation approach. Be specific

Say exactly:

> **"Does this approach sound right? Type `go` to create a GitHub issue and branch, or share any questions/adjustments first."**
> **"Does this approach sound right? Type `go` to create a GitHub issue and branch, or share any questions/adjustments first. To delegate part of the work to another agent, run `/delegate <task description>` before typing `go`."**

Stop. Wait for the user to respond.

Expand Down Expand Up @@ -248,7 +248,7 @@ Tell the user:
- What was previously done (from agent notes if present)
- What appears to remain

Ask: **"Does this match your understanding? Type `go` to start coding, or share any questions/adjustments first."**
Ask: **"Does this match your understanding? Type `go` to start coding, or share any questions/adjustments first. To delegate part of the work to another agent, run `/delegate <task description>` before typing `go`."**

Proceed only on unconditional approval. If the user's response includes conditions, questions, or adjustments, treat it as discussion — address their input and re-ask. If the user wants a fresh start, restart as Case A. If the user abandons, stop — nothing to clean up.

Expand Down Expand Up @@ -324,4 +324,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test
- The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit <number> --remove-assignee @me`.
- Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit `--label` entirely. Never apply a label outside `bug, documentation, enhancement, chore`.
- Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation.
<!-- generated by CodeCannon/sync.py | skill: start | adapter: codex | hash: 13614291 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: start | adapter: codex | hash: 834fb83e | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
97 changes: 97 additions & 0 deletions .claude/commands/delegate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Code Cannon: Generate a scoped prompt for delegating work to another agent

---

## What `/delegate` does

`/delegate` generates a ready-to-paste prompt that gives another AI agent everything it needs to contribute code on the current branch. Run it during the planning gate of `/start` (Step 2), before saying `go`, to carve off part of the work for another agent.

Each `/delegate` invocation also tells the lead agent to skip that work when it proceeds.

---

## Prerequisites

`/delegate` relies on context already loaded by `/start`. If you are not in the middle of a `/start` planning gate (Case A Step 2 or Case B Step 2), say:

> "`/delegate` is meant to be run during the planning step of `/start`, before you type `go`. Run `/start` first to load the issue context, then use `/delegate` to carve off tasks."

Stop.

If `$ARGUMENTS` is empty, ask: **"What task should the prompt describe?"** and wait for a response.

---

## Step 1 — Gather branch and diff context

```bash
git branch --show-current
```

```bash
git diff --name-only dev...HEAD 2>/dev/null || git diff --name-only main...HEAD
```

---

## Step 2 — Build the prompt

Compose the following as a fenced markdown block (` ```markdown `) so the operator can copy it.

Use the issue title, body, and agent implementation notes from the current `/start` session — do not re-fetch them.

```markdown
## Your task

<$ARGUMENTS — the operator's description of the delegated work>

## Branch

You are on branch `<branch name>`. Stay on this branch.

## Context

**Issue #<number>: <title>**

<issue body — include the full body as-is>

<if there are agent implementation notes from the issue comments, include them under a "### Agent notes" subheading>

## What's already been done on this branch

<list of changed files from git diff, or "No changes yet — clean branch." if empty>

## Rules

- **Do not commit.** Leave all changes unstaged. The lead developer will handle commits.
- **Be surgical.** Only modify what is necessary for your task. Do not refactor adjacent code, reorganize imports, or "improve" files outside the scope of your task.
- **Do not start until the branch exists on the remote.** The lead developer will create and push the branch. Wait until `git checkout <branch name> && git pull origin <branch name>` succeeds before beginning work.
```

---

## Step 3 — Present to operator and update lead scope

Print the generated prompt preceded by:

> Here's a delegation prompt for: **$ARGUMENTS**
>
> Review and edit as needed, then paste into your agent of choice after the lead agent has created and pushed the branch.

Then print the fenced prompt block.

After presenting, record internally that `$ARGUMENTS` has been delegated. When the operator says `go` and the lead agent proceeds to write code, it must skip the delegated work. If multiple `/delegate` invocations occur before `go`, accumulate all of them.

After presenting, say:

> Noted — the lead agent will skip this part when you say `go`. Run `/delegate <another task>` to delegate more, or type `go` to proceed.

---

## Hard rules

- Never commit, push, or modify any files.
- Never post to GitHub (no comments, labels, or issue updates).
- Output only — the skill produces text for the operator to copy.
- Do not suggest or name a specific agent to paste into — that is the operator's choice.
<!-- generated by CodeCannon/sync.py | skill: delegate | adapter: claude | hash: 5f7a03dc | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
6 changes: 3 additions & 3 deletions .claude/commands/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Read the relevant code. Propose a concrete implementation approach. Be specific

Say exactly:

> **"Does this approach sound right? Type `go` to create a GitHub issue and branch, or share any questions/adjustments first."**
> **"Does this approach sound right? Type `go` to create a GitHub issue and branch, or share any questions/adjustments first. To delegate part of the work to another agent, run `/delegate <task description>` before typing `go`."**

Stop. Wait for the user to respond.

Expand Down Expand Up @@ -243,7 +243,7 @@ Tell the user:
- What was previously done (from agent notes if present)
- What appears to remain

Ask: **"Does this match your understanding? Type `go` to start coding, or share any questions/adjustments first."**
Ask: **"Does this match your understanding? Type `go` to start coding, or share any questions/adjustments first. To delegate part of the work to another agent, run `/delegate <task description>` before typing `go`."**

Proceed only on unconditional approval. If the user's response includes conditions, questions, or adjustments, treat it as discussion — address their input and re-ask. If the user wants a fresh start, restart as Case A. If the user abandons, stop — nothing to clean up.

Expand Down Expand Up @@ -319,4 +319,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test
- The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit <number> --remove-assignee @me`.
- Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit `--label` entirely. Never apply a label outside `bug, documentation, enhancement, chore`.
- Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation.
<!-- generated by CodeCannon/sync.py | skill: start | adapter: claude | hash: 1829879a | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: start | adapter: claude | hash: d7feebf1 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
103 changes: 103 additions & 0 deletions .cursor/rules/delegate.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
description: Code Cannon: Generate a scoped prompt for delegating work to another agent
globs:
alwaysApply: false
---

> **Cursor:** Trigger this skill via `@delegate` in Agent mode. State any arguments in your message. Sub-agent spawning is not supported — the automated review step in `/submit-for-review` must be done manually using the review-agent prompt.

---

## What `/delegate` does

`/delegate` generates a ready-to-paste prompt that gives another AI agent everything it needs to contribute code on the current branch. Run it during the planning gate of `/start` (Step 2), before saying `go`, to carve off part of the work for another agent.

Each `/delegate` invocation also tells the lead agent to skip that work when it proceeds.

---

## Prerequisites

`/delegate` relies on context already loaded by `/start`. If you are not in the middle of a `/start` planning gate (Case A Step 2 or Case B Step 2), say:

> "`/delegate` is meant to be run during the planning step of `/start`, before you type `go`. Run `/start` first to load the issue context, then use `/delegate` to carve off tasks."

Stop.

If `$ARGUMENTS` is empty, ask: **"What task should the prompt describe?"** and wait for a response.

---

## Step 1 — Gather branch and diff context

```bash
git branch --show-current
```

```bash
git diff --name-only dev...HEAD 2>/dev/null || git diff --name-only main...HEAD
```

---

## Step 2 — Build the prompt

Compose the following as a fenced markdown block (` ```markdown `) so the operator can copy it.

Use the issue title, body, and agent implementation notes from the current `/start` session — do not re-fetch them.

```markdown
## Your task

<$ARGUMENTS — the operator's description of the delegated work>

## Branch

You are on branch `<branch name>`. Stay on this branch.

## Context

**Issue #<number>: <title>**

<issue body — include the full body as-is>

<if there are agent implementation notes from the issue comments, include them under a "### Agent notes" subheading>

## What's already been done on this branch

<list of changed files from git diff, or "No changes yet — clean branch." if empty>

## Rules

- **Do not commit.** Leave all changes unstaged. The lead developer will handle commits.
- **Be surgical.** Only modify what is necessary for your task. Do not refactor adjacent code, reorganize imports, or "improve" files outside the scope of your task.
- **Do not start until the branch exists on the remote.** The lead developer will create and push the branch. Wait until `git checkout <branch name> && git pull origin <branch name>` succeeds before beginning work.
```

---

## Step 3 — Present to operator and update lead scope

Print the generated prompt preceded by:

> Here's a delegation prompt for: **$ARGUMENTS**
>
> Review and edit as needed, then paste into your agent of choice after the lead agent has created and pushed the branch.

Then print the fenced prompt block.

After presenting, record internally that `$ARGUMENTS` has been delegated. When the operator says `go` and the lead agent proceeds to write code, it must skip the delegated work. If multiple `/delegate` invocations occur before `go`, accumulate all of them.

After presenting, say:

> Noted — the lead agent will skip this part when you say `go`. Run `/delegate <another task>` to delegate more, or type `go` to proceed.

---

## Hard rules

- Never commit, push, or modify any files.
- Never post to GitHub (no comments, labels, or issue updates).
- Output only — the skill produces text for the operator to copy.
- Do not suggest or name a specific agent to paste into — that is the operator's choice.
<!-- generated by CodeCannon/sync.py | skill: delegate | adapter: cursor | hash: 30cddce6 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
6 changes: 3 additions & 3 deletions .cursor/rules/start.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Read the relevant code. Propose a concrete implementation approach. Be specific

Say exactly:

> **"Does this approach sound right? Type `go` to create a GitHub issue and branch, or share any questions/adjustments first."**
> **"Does this approach sound right? Type `go` to create a GitHub issue and branch, or share any questions/adjustments first. To delegate part of the work to another agent, run `/delegate <task description>` before typing `go`."**

Stop. Wait for the user to respond.

Expand Down Expand Up @@ -249,7 +249,7 @@ Tell the user:
- What was previously done (from agent notes if present)
- What appears to remain

Ask: **"Does this match your understanding? Type `go` to start coding, or share any questions/adjustments first."**
Ask: **"Does this match your understanding? Type `go` to start coding, or share any questions/adjustments first. To delegate part of the work to another agent, run `/delegate <task description>` before typing `go`."**

Proceed only on unconditional approval. If the user's response includes conditions, questions, or adjustments, treat it as discussion — address their input and re-ask. If the user wants a fresh start, restart as Case A. If the user abandons, stop — nothing to clean up.

Expand Down Expand Up @@ -325,4 +325,4 @@ When done, say: **"The code is ready for review. Please run `make dev` and test
- The issue is assigned to `@me` at creation. If you are creating a ticket on someone else's behalf, remove the assignee after creation with `gh issue edit <number> --remove-assignee @me`.
- Apply resolved labels and milestone to every new issue. Label resolution order: per-invocation flag → pool selection from `bug, documentation, enhancement, chore` → omit `--label` entirely. Never apply a label outside `bug, documentation, enhancement, chore`.
- Milestone resolution order: per-invocation flag → auto-detected from GitHub open milestones. Never prompt for a milestone more than once per invocation.
<!-- generated by CodeCannon/sync.py | skill: start | adapter: cursor | hash: 2ff02ba9 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
<!-- generated by CodeCannon/sync.py | skill: start | adapter: cursor | hash: c2521db6 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
Loading
Loading