diff --git a/CHANGELOG.md b/CHANGELOG.md index b772e90..00744f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Content Versions +- **v52**: Generalize `/delegate` to support any task type + - Documentation clarified: works for coding, research, analysis, information gathering, documentation + - Examples updated to include non-development tasks (sports analysis, competitor pricing, academic research) - **v51**: `/claude-code-setup` offers Agent Teams configuration - Agent Teams status check and enable option added to `/claude-code-setup` command - Fixes: `/claude-code-setup` used `install.sh --update --yes` which silently skipped Agent Teams diff --git a/README.md b/README.md index dac73e0..b220200 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ [![macOS](https://img.shields.io/badge/platform-macOS-blue.svg)](https://www.apple.com/macos/) [![Linux](https://img.shields.io/badge/platform-Linux-blue.svg)](https://www.linux.org/) [![WSL](https://img.shields.io/badge/platform-WSL-blue.svg)](https://docs.microsoft.com/en-us/windows/wsl/) -[![Content v51](https://img.shields.io/badge/content-v51-blue.svg)](CHANGELOG.md) +[![Content v52](https://img.shields.io/badge/content-v52-blue.svg)](CHANGELOG.md) **Persistent memory for Claude Code via Markdown files.** diff --git a/commands/delegate.md b/commands/delegate.md index 1c99018..915b2f7 100644 --- a/commands/delegate.md +++ b/commands/delegate.md @@ -2,12 +2,16 @@ Spawn a teammate to work on a separate task independently. You continue your own work and get notified when the teammate finishes. +Works for any independent task: coding, research, data analysis, information gathering, documentation, etc. + ## Usage ``` /delegate "write unit tests for the auth module" /delegate "research how other CLIs handle plugin systems, summarize findings" -/delegate "refactor the database layer to use connection pooling" +/delegate "analyze the last 10 Milan matches and summarize their performance" +/delegate "summarize key findings from the 5 most cited papers on topic X" +/delegate "compare pricing models of top 5 SaaS competitors" ``` ## Tasks @@ -37,12 +41,13 @@ Stop here. Do not proceed. Otherwise, continue. ### 3. Classify task type -Determine whether the delegate needs to modify repo files or only read/research: +Determine whether the delegate needs to modify repo files or only read/research. +This applies to all tasks: development work, research, analysis, documentation, etc. | Task type | Where delegate works | Examples | |-----------|---------------------|----------| -| **Write** (code, tests, refactoring) | `git worktree` on separate branch | "write tests", "refactor module", "add feature" | -| **Read-only** (research, analysis) | Scratchpad in `/tmp` | "research how X works", "analyze performance", "summarize findings" | +| **Write** (code, docs, config) | `git worktree` on separate branch | "write tests", "refactor module", "add feature", "add documentation to repo" | +| **Read-only** (research, analysis, information gathering) | Scratchpad in `/tmp` | "research how X works", "analyze Milan's last games", "compare competitor pricing", "summarize key findings from papers" | ### 4. Create team and spawn delegate @@ -221,6 +226,25 @@ Continue your work. The delegate will: [Delegate sends research summary] ``` +### Read-only task (non-development) + +``` +User: /delegate "analyze Milan's last 10 matches and summarize their performance" + +Claude: Analyzing task... Research only — no repo changes needed. + +Delegate active for: analyze Milan's last 10 matches + + sports-analyst: researching in background + +Continue your work. The delegate will: +- Ask you if it needs clarification +- Notify you when done with findings + +[User continues working] +[Delegate sends analysis summary with match results, stats, and performance trends] +``` + ### Task better suited for /with-advisor ``` diff --git a/docs/records/038-pair-programming-with-agent-teams.md b/docs/records/038-pair-programming-with-agent-teams.md index 912815d..facb269 100644 --- a/docs/records/038-pair-programming-with-agent-teams.md +++ b/docs/records/038-pair-programming-with-agent-teams.md @@ -211,10 +211,13 @@ This should be reflected in the documentation — `/with-advisor` is not just re An on-demand command that spawns a teammate to work on a separate task independently. The user continues their own work and gets notified when the teammate finishes. +Works for any independent task: coding, research, data analysis, information gathering, documentation, etc. + ``` /delegate "write unit tests for the auth module" /delegate "research how other CLIs handle plugin systems, summarize findings" -/delegate "refactor the database layer to use connection pooling" +/delegate "analyze Milan's last 10 matches and summarize their performance" +/delegate "compare pricing models of top 5 SaaS competitors" ``` ### How it works @@ -240,8 +243,8 @@ Delegates that need to modify files in the repo work in a **git worktree** — a | Task type | Where delegate works | Why | |-----------|---------------------|-----| -| Read-only (research, analysis) | Scratchpad / `/tmp` | No repo changes needed | -| Write (code, tests, refactoring) | `git worktree` on separate branch | Isolated from Main, no conflicts | +| Read-only (research, analysis, information gathering) | Scratchpad / `/tmp` | No repo changes needed | +| Write (code, docs, config) | `git worktree` on separate branch | Isolated from Main, no conflicts | The delegate creates a worktree, works on its branch, and when done the user decides whether to merge. diff --git a/templates/VERSION b/templates/VERSION index 82cced2..0691f67 100644 --- a/templates/VERSION +++ b/templates/VERSION @@ -1 +1 @@ -51 +52 diff --git a/templates/base/global-CLAUDE.md b/templates/base/global-CLAUDE.md index f2b9877..45a33d0 100644 --- a/templates/base/global-CLAUDE.md +++ b/templates/base/global-CLAUDE.md @@ -86,7 +86,7 @@ Use `/with-advisor` and `/delegate` during implementation when the task benefits | Command | When | What happens | |---------|------|-------------| | `/with-advisor "task"` | Unfamiliar domain, multiple approaches, quality matters | Expert advisor(s) monitor your work and send findings | -| `/delegate "task"` | Independent parallel work (tests, research, refactoring) | Teammate works on separate task, notifies when done | +| `/delegate "task"` | Independent parallel work (coding, research, analysis, documentation) | Teammate works on separate task, notifies when done | Both commands use `/catchup` for onboarding — teammates learn the project automatically. diff --git a/website/pages/commands/delegate.mdx b/website/pages/commands/delegate.mdx index bcb5be1..ca239c3 100644 --- a/website/pages/commands/delegate.mdx +++ b/website/pages/commands/delegate.mdx @@ -4,6 +4,8 @@ import { Callout } from 'nextra/components' Spawn a teammate to work on a separate task independently. You keep working on your own thing and get notified when the teammate finishes. +Works for any independent task: coding, research, data analysis, information gathering, documentation, etc. + Requires [Agent Teams](/guides/agent-teams) (experimental) to be enabled. @@ -13,7 +15,9 @@ Requires [Agent Teams](/guides/agent-teams) (experimental) to be enabled. ``` /delegate "write unit tests for the auth module" /delegate "research how other CLIs handle plugin systems" -/delegate "refactor the database layer to use connection pooling" +/delegate "analyze Milan's last 10 matches and summarize their performance" +/delegate "summarize key findings from the 5 most cited papers on topic X" +/delegate "compare pricing models of top 5 SaaS competitors" ``` ## When to Use @@ -47,8 +51,8 @@ Claude classifies the task automatically: | Task type | Where delegate works | Examples | |-----------|---------------------|----------| -| **Write** | `git worktree` on separate branch | "write tests", "refactor module", "add feature" | -| **Read-only** | Scratchpad in `/tmp` | "research how X works", "analyze logs", "summarize findings" | +| **Write** | `git worktree` on separate branch | "write tests", "refactor module", "add feature", "add documentation to repo" | +| **Read-only** | Scratchpad in `/tmp` | "research how X works", "analyze Milan's last games", "compare competitor pricing", "summarize key findings from papers" | **Write tasks use git worktree** — the delegate works on an isolated branch, so there are no conflicts with your work. When they're done, you review and decide whether to merge. diff --git a/website/pages/guides/agent-teams.mdx b/website/pages/guides/agent-teams.mdx index 81028c7..8f7ea83 100644 --- a/website/pages/guides/agent-teams.mdx +++ b/website/pages/guides/agent-teams.mdx @@ -55,12 +55,17 @@ Add to `~/.claude/settings.json`: ### Quick comparison +Both commands work for software development AND general research tasks: + ``` /with-advisor "implement OAuth login" → Advisor challenges your approach, then advises at decision points while you implement /delegate "write tests for the auth module" → Teammate writes tests, you keep coding, get notified when done + +/delegate "analyze Milan's last 10 matches and summarize performance" + → Teammate researches and summarizes, you keep working, get notified when done ``` ## How Onboarding Works