agentleFS
putervisionputervision/agent-reasoning-mcp/.cursor/rules/state-memory-mcp.mdc

agent-reasoning-mcp / rules

Cursor rule22 starsChanged 47 days agoMITView on GitHub

This project tracks workflow state, tasks, design decisions, and blockers using state-memory-mcp with project slug "agent-reasoning-mcp".

The file

We split this state-memory-mcp.mdc into the rules it gives an agent

12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before doing any coding or investigation:

    line 6
  2. Very specific:

    Starting a session: Always call manage_sessions(action: "start", agent_id: "my-agent") to track all mutations under a unique session.

    line 16
  3. Very specific:

    Starting a new task: Create a node with manage_nodes(action: "create", type: "task", title: "...", session_id: session_id).

    line 17
  4. Very specific:

    Making a design or implementation decision: Document it with manage_nodes(action: "create", type: "decision", title: "...", metadata: { …

    line 18
  5. Very specific:

    Completing a task: Update status to done using manage_tasks(action: "complete", task_id: task_id) or manage_nodes(action: "update", id: …

    line 22
  6. Very specific:

    Creating/generating a new file: Create an artifact node with manage_nodes(action: "create", type: "artifact", title: "...", session_id: …

    line 23
  7. Very specific:

    Start of session: Call manage_sessions(action: "start") to align and track work, then run get_analytics(action: "summary"), …

    line 26
  8. Very specific:

    Validation & Resolution: Run run_diagnostics(action: "validate") to ensure no cycles/orphans/contradictions, mark tasks as "done", document …

    line 29
  9. Distinctive:

    If the project was just initialized or is missing high-level structure (Plans, Milestones, Decisions):

    line 32
  10. Distinctive:

    Inspect the Codebase: Read the README and core files to understand the roadmap and architecture.

    line 33
  11. Very specific:

    Scaffold the Roadmap: Create a plan node (e.g., "Project Roadmap") and add milestone nodes representing key target phases, connecting them …

    line 34
  12. Very specific:

    Scaffold Architecture: Create decision nodes representing core technical choices (e.g., choice of databases, frameworks) and link them to …

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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
state-memory-mcp.mdc
## State Memory (state-memory-mcp)

This project tracks workflow state, tasks, design decisions, and blockers using `state-memory-mcp` with project slug `"agent-reasoning-mcp"`.

### 1. Priority Order
Before doing any coding or investigation:
1. `manage_sessions(action: "start")` — Start a tracking session for full change attribution.
2. `get_analytics(action: "summary")` — Run to understand current project state, active branches, and overall progress.
3. `manage_tasks(action: "next")` — Query prioritized runnable tasks.
4. `manage_tasks(action: "find_blockers")` — Identify any active blockers preventing progress.
5. `manage_nodes(action: "list")` — Find pending tasks, past decisions, or milestones.
6. `query_graph(action: "trace")` — Trace what depends on or blocks a task.

### 2. When to Write to the Graph
You MUST update the graph as you work:
- **Starting a session**: Always call `manage_sessions(action: "start", agent_id: "my-agent")` to track all mutations under a unique session.
- **Starting a new task**: Create a node with `manage_nodes(action: "create", type: "task", title: "...", session_id: session_id)`.
- **Making a design or implementation decision**: Document it with `manage_nodes(action: "create", type: "decision", title: "...", metadata: { "rationale": "..." }, session_id: session_id)`.
- **Encountering a blocker**: Record the blocker with `manage_nodes(action: "create", type: "blocker", title: "...", session_id: session_id)` and connect it using `manage_edges(action: "add", type: "blocks", source_id: blocker_id, target_id: task_id, session_id: session_id)`.
- **Adding observation notes**: Atomically log notes using `manage_nodes(action: "add_note", text: "...", attach_to: node_id)`.
- **Batch updates**: Bulk update tasks/nodes using `manage_nodes(action: "batch_update", ids: ["..."], status: "done")`.
- **Completing a task**: Update status to done using `manage_tasks(action: "complete", task_id: task_id)` or `manage_nodes(action: "update", id: task_id, status: "done")`.
- **Creating/generating a new file**: Create an artifact node with `manage_nodes(action: "create", type: "artifact", title: "...", session_id: session_id)` and connect it using `manage_edges(action: "add", type: "produces", source_id: task_id, target_id: artifact_id)`.

### 3. Workflow Pattern
1. **Start of session**: Call `manage_sessions(action: "start")` to align and track work, then run `get_analytics(action: "summary")`, `manage_tasks(action: "next")`, and `manage_tasks(action: "find_blockers")`.
2. **Task decomposition**: Decompose user requests into tasks and add them to the graph.
3. **Execution**: Mark tasks as "in_progress", document design decisions as they occur, and log blockers if you hit any obstacles.
4. **Validation & Resolution**: Run `run_diagnostics(action: "validate")` to ensure no cycles/orphans/contradictions, mark tasks as "done", document completed artifacts, and resolve blockers. Call `manage_sessions(action: "end")` to finalize.

### 4. Codebase Seeding on Initialization
If the project was just initialized or is missing high-level structure (Plans, Milestones, Decisions):
1. **Inspect the Codebase**: Read the README and core files to understand the roadmap and architecture.
2. **Scaffold the Roadmap**: Create a `plan` node (e.g., "Project Roadmap") and add `milestone` nodes representing key target phases, connecting them using `part_of` edges.
3. **Scaffold Architecture**: Create `decision` nodes representing core technical choices (e.g., choice of databases, frameworks) and link them to the milestones/tasks using `decided_in` edges.

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.