CodeCannon / rules
Cursor rule1 starsChanged 9 months agoMITView on GitHub
Code Cannon: Generate a scoped prompt for delegating work to another agent
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/checkpoint.mdcCursor rule
- .cursor/rules/deploy.mdcCursor rule
- .cursor/rules/qa.mdcCursor rule
- .cursor/rules/review.mdcCursor rule
- .cursor/rules/setup.mdcCursor rule
- .cursor/rules/start.mdcCursor rule
- .cursor/rules/status.mdcCursor rule
- .cursor/rules/story.mdcCursor rule
- .cursor/rules/submit-for-review.mdcCursor rule
- checkpointSkill
- delegateSkill
- deploySkill
- qaSkill
- reviewSkill
- setupSkill
- startSkill
- statusSkill
- storySkill
- submit-for-reviewSkill
The file
We split this delegate.mdc into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
If $ARGUMENTS is empty, ask: "What task should the prompt describe?" and wait for a response.
- Very specific: line 40
If that errors because the dev ref isn't present locally, diff against main...HEAD instead.
- Very specific: line 48
Use the issue title, body, and agent implementation notes from the current /start session — do not re-fetch them.
- Very specific: line 90
After presenting, record internally that $ARGUMENTS has been delegated.
- Distinctive: line 100
Never commit, push, or modify any files.
- Distinctive: line 101
Never post to GitHub (no comments, labels, or issue updates).
- Very specific: line 103
Do not suggest or name a specific agent to paste into — that is the operator's choice.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- 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 ``` If that errors because the `dev` ref isn't present locally, diff against `main...HEAD` instead. --- ## 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>` followed by `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: 7611f48e | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

