agentleFS
itsHabibitsHabib/dossier/.cursor/rules/use-subagents.mdc

dossier / rules

Cursor rule1 starsChanged 5 months agoMITView on GitHub

Steers the parent agent to dispatch to the repo's registered subagents at natural points during ship.ship implementation runs.

  • 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 repository2 other files it gives its agents.

The file

We split this use-subagents.mdc into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If your Agent tool doesn't list one of these subagents (e.g.

    line 38

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
use-subagents.mdc
---
description: Steers the parent agent to dispatch to the repo's registered subagents at natural points during ship.ship implementation runs.
globs:
  - "src/**/*.rs"
  - "tests/**/*.rs"
  - "docs/**/*.md"
  - ".cursor/agents/**/*.md"
---

# Use the registered subagents during implementation

This repo ships a curated set of subagents under `.cursor/agents/`:

| Subagent | What it returns | When to invoke |
|---|---|---|
| `code-reviewer` | P0-P3 findings on the diff (bugs, security, conventions) | After writing code, before the final summary |
| `scope-tracker` | In-scope / adjacent / out-of-scope verdict per touched file | Before the final summary |
| `test-author` | Drafted vitest tests for new production code | After writing new exports without matching tests |
| `validator` | Green / red verdict from `make check` + e2e + diagnosis | Before the final summary |

## When you are implementing a task from a `ship.ship` run, dispatch at the natural points

1. **After writing new production code** → invoke `test-author` via your built-in `Agent` tool. Incorporate its drafted tests before continuing.
2. **Before producing the final structured summary** → invoke `code-reviewer`. Address P0/P1 findings inline; surface P2/P3 in the summary's risks section.
3. **Before producing the final structured summary** → invoke `scope-tracker`. If it flags out-of-scope edits, revert or justify inline.
4. **Before producing the final structured summary** → invoke `validator`. The run isn't done until the verdict is green (or the failures are documented as known/intentional).

## How to invoke

Each subagent has a `name:` in its frontmatter (e.g. `code-reviewer`). Use your built-in `Agent` tool with that name and a brief instruction such as:

- *"Review the current diff for P0/P1 findings against CLAUDE.md conventions."*
- *"Check whether the diff stays inside the Scope section of the task doc."*
- *"Run `make check` and the e2e suite; report green / red."*

## If a subagent isn't registered

If your `Agent` tool doesn't list one of these subagents (e.g. the repo predates PR #41 or the SDK didn't load `.cursor/agents/`), skip that step and note the gap in the structured summary's risks section. Do NOT fabricate the subagent's output.

## Background

These subagents were added in PR #41 to push inner-loop concerns (review, scope, tests, validation) INTO the implement phase instead of relying on the outer-loop bot reviewers (codex / claude bot / Copilot) to catch them in cycle 1. The hypothesis is that catching issues during impl reduces driver thrash across cycle-1 fixes. See `docs/features/ship-v2/phases/03-subagent-passthrough.md` for the full rationale.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.