agentharness / rules
Cursor rule1 starsChanged 2 months agoMITView on GitHub
Use when starting a complex multi-step task, a research project, or any task requiring more than 5 tool calls — creates and maintains task_plan.md, findings.md, and progress.md to preserve state across context resets.
We split this planning-with-files.mdc into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Use this pattern for any task where you can't complete everything in one pass: long refactors, migrations, multi-feature buildouts, …
- Very specific: line 12
Place planning files in docs/operational/ if the harness is linked, or in a .planning/ directory at the project root — whichever exists.
- Very specific: line 100
One plan per task: If a task_plan.md already exists, read it and continue — don't overwrite a plan in progress.
- Distinctive: line 104
Keep progress.md truthful: Only mark a step complete when its commit is on the branch.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 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: "Use when starting a complex multi-step task, a research project, or any task requiring more than 5 tool calls — creates and maintains task_plan.md, findings.md, and progress.md to preserve state across context resets."
---
## Planning with Files
Use this pattern for any task where you can't complete everything in one
pass: long refactors, migrations, multi-feature buildouts, research tasks,
or anything with more than ~5 tool calls. File-based state survives context
resets and gives you (and the user) a running record of what's been done.
Place planning files in `docs/operational/` if the harness is linked, or
in a `.planning/` directory at the project root — whichever exists.
### Files to create at the start
#### `task_plan.md`
Written **before** any implementation. Contains:
```markdown
# Task: <short title>
## Goal
One sentence: what does "done" look like?
## Scope
What's in and what's explicitly out.
## Steps
1. Step one (estimate: small/medium/large)
2. Step two
3. ...
## Open questions
- Question 1 (unblocks: step 3)
## Success criteria
- [ ] Criterion A
- [ ] Criterion B
```
#### `findings.md`
Appended to **as you work**. Never edited retroactively.
```markdown
# Findings
## <ISO timestamp>
**Context:** What you were investigating.
**Finding:** What you learned.
**Impact:** Does it change the plan? If yes, add a note to task_plan.md.
```
#### `progress.md`
Updated **after each step completes**:
```markdown
# Progress
## Completed
- [x] Step 1 — <one-line summary> (commit: <sha>)
## In progress
- [ ] Step 2 — started <timestamp>
## Blocked
- Step 3 — waiting on: <reason>
## Next action
<Exact next thing to do when resuming>
```
### Workflow
```
1. Read existing task_plan.md (if present) — don't start a second plan
for the same task.
2. Write task_plan.md → get user approval on scope before doing anything.
3. For each step:
a. Write findings to findings.md before and after each discovery.
b. Do the work (code, commands, searches).
c. Mark step complete in progress.md; record the commit SHA.
d. If blocked, record the blocker in progress.md and surface it.
4. When context resets: read progress.md first. Resume from "Next action".
5. When all steps are complete:
- Verify all success criteria in task_plan.md.
- Archive or delete the planning files (they're operational docs, not
permanent — see docs/operational/README.md for the lifecycle).
```
### Rules
- **One plan per task.** If a `task_plan.md` already exists, read it and
continue — don't overwrite a plan in progress.
- **Write findings before you forget them.** Append to `findings.md`
immediately after each discovery; don't reconstruct from memory later.
- **Keep progress.md truthful.** Only mark a step complete when its
commit is on the branch. "In progress" is not the same as "done."
- **Surface blockers immediately.** A step that's blocked doesn't become
"in progress" — it goes to the Blocked section with the reason.
- **Never truncate.** Append to `findings.md`; don't trim old entries to
save space — they're the audit trail.
### When NOT to use this pattern
- Single-function edits or quick fixes (< 5 tool calls).
- Well-scoped tasks the agent can complete in one continuous context window.
- Tasks where the user is present and can provide all context interactively.
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 3,978 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 repository77 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/accessibility.mdcCursor rule
- .cursor/rules/agentharness-router.mdcCursor rule
- .cursor/rules/agentic-loops.mdcCursor rule
- .cursor/rules/api-design.mdcCursor rule
- .cursor/rules/audit-review-followup.mdcCursor rule
- .cursor/rules/big-work-plan-review.mdcCursor rule
- .cursor/rules/branching.mdcCursor rule
- .cursor/rules/clean-architecture.mdcCursor rule
- .cursor/rules/code-review-api.mdcCursor rule
- .cursor/rules/code-review-db.mdcCursor rule
- .cursor/rules/code-review.mdcCursor rule
- .cursor/rules/code-review-ui.mdcCursor rule
- .cursor/rules/committing.mdcCursor rule
- .cursor/rules/database-conventions.mdcCursor rule
- .cursor/rules/dependency-audit.mdcCursor rule
- .cursor/rules/dependency-injection.mdcCursor rule
- .cursor/rules/design-patterns.mdcCursor rule
- .cursor/rules/docker-conventions.mdcCursor rule
- .cursor/rules/error-handling.mdcCursor rule
- .cursor/rules/file-placement-policy.mdcCursor rule
- .cursor/rules/github-issue-triage.mdcCursor rule
- .cursor/rules/go-conventions.mdcCursor rule
- .cursor/rules/harness-feedback.mdcCursor rule
- .cursor/rules/logging.mdcCursor rule
- .cursor/rules/multi-agent-coordination.mdcCursor rule
- .cursor/rules/mutation-testing.mdcCursor rule
- .cursor/rules/performance-profiling.mdcCursor rule
- .cursor/rules/port-agent-config.mdcCursor rule
- .cursor/rules/project-bootstrap.mdcCursor rule
- .cursor/rules/python-conventions.mdcCursor rule
- .cursor/rules/react-best-practices.mdcCursor rule
- .cursor/rules/refactoring.mdcCursor rule
- .cursor/rules/requirements-clarification.mdcCursor rule
- .cursor/rules/security-review.mdcCursor rule
- .cursor/rules/solid-principles.mdcCursor rule
- .cursor/rules/testing.mdcCursor rule
- .cursor/rules/typescript-conventions.mdcCursor rule
- accessibilitySkill
- agentic-loopsSkill
- api-designSkill
- audit-review-followupSkill
- big-work-plan-reviewSkill
- branchingSkill
- clean-architectureSkill
- code-review-apiSkill
- code-review-dbSkill
- code-reviewSkill
- code-review-uiSkill
- committingSkill
- database-conventionsSkill
- dependency-auditSkill
- dependency-injectionSkill
- design-patternsSkill
- docker-conventionsSkill
- error-handlingSkill
- file-placement-policySkill
- github-issue-triageSkill
- The first 60 shown.
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.

