GraphStack / rules
Cursor rule8 starsChanged 6 months agoMITView on GitHub
GraphStack v4.7.1 — Orchestrated, graph-first, GNAP-tracked AI development (cross-platform)
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 4,263 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.
The file
Show its rules and text
We split this graphstack.mdc into the rules it gives an agent
13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Run one parallel read batch (never split across turns):
- Very specific: line 52
Write handoff/BRIEF.md (Status: Ready for Builder)
- Very specific: line 57
If doing/ has a task: read STATE.json role + BRIEF status → offer the matching cycle enter-* resume (see ORCHESTRATOR step 9c matrix) …
- Distinctive: line 62
When a graph exists, answer structural questions from the graph before opening raw sources:
- Very specific: line 66
When no graph exists, suggest /graphify ..
- Very specific: line 83
Before acting as a role, announce: [ARCHITECT MODE], [BUILDER MODE], etc.
- Distinctive: line 85
After every transition, run:
- Distinctive: line 109
If no brief exists, the Architect must write one first.
- Very specific: line 114
If something looks wrong but is out of scope, note it in handoff/REVIEW.md.
- Very specific: line 118
If graphify-out/GRAPH_REPORT.md is older than the files being discussed:
- Distinctive: line 131
Never compress Reviewer + QA + Ship into one turn.
- Distinctive: line 153
Never jump from graph exploration directly to implementation.
- Distinctive: line 157
When Builder finishes acceptance criteria:
≈ “Common” is an estimate: at least 1 in 5 of the 7,111 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: GraphStack v4.7.1 — Orchestrated, graph-first, GNAP-tracked AI development (cross-platform) alwaysApply: true --- # GraphStack Core Rules (v4.7.1) ## 🎯 Default Mode: Orchestrated Unless the user explicitly activates a single role, always run as the **Orchestrator**. **Frictionless startup (Cursor):** This project's `.cursor/rules/graphstack.mdc` is `alwaysApply: true`, so Composer/Agent already ships with GraphStack rules in every new chat. The user does **not** need to paste `Read orchestrator/ORCHESTRATOR.md …` every time. Your obligation is identical to **executing** `orchestrator/ORCHESTRATOR.md` → **Activation** on your first substantive turn, before acting on substantive work. **Optional shortcut:** The `/graphstack` Cursor command (project slash menu) expands explicit Orchestrator-bootstrap instructions. These rules are ALWAYS active in this project. Follow them in every response. ## 🚀 Activation (mandatory first turn — full checklist) Run **one parallel read batch** (never split across turns): ``` orchestrator/TOKEN_OPTIMIZER.md graphify-out/GRAPH_REPORT.md (if exists) handoff/BRIEF.md handoff/board/doing/*.json (note task ids if any) handoff/STATE.md (last ## block only) ``` Then greet per `orchestrator/ORCHESTRATOR.md` step 8. ## ⛔ First-turn contract (when user message includes a task goal) The user giving a goal in the same message does **NOT** mean “implement now”. It means: **start the GraphStack cycle** — Architect phase only. ``` ALLOWED turn 1: parallel Activation reads, graph query, cycle start, handoff/BRIEF.md FORBIDDEN turn 1: any Write/Edit on code paths, implementation, “quick fix” patches ``` Required sequence before any code file changes: 1. Announce `[ARCHITECT MODE]` 2. `python -m graphstack cycle start <task-id> "<title>"` 3. Write `handoff/BRIEF.md` (Status: Ready for Builder) 4. Orchestrator → `cycle enter-builder` → then `[BUILDER MODE]` **Never interpret “proceed”, “devam”, or “goal embedded” as permission to code.** **If doing/ has a task:** read `STATE.json` role + BRIEF status → offer the matching `cycle enter-*` resume (see ORCHESTRATOR step 9c matrix) before code edits. ## 🧠 Rule 1: Graph First (Most Important) When a graph exists, answer structural questions from the graph before opening raw sources: - `python -m graphstack graph query "…"` or `graphify-out/GRAPH_REPORT.md` (once per session) - Open implementation files only when the graph cannot answer When no graph exists, suggest `/graphify .`; if proceeding without confirmation, state risks explicitly. ## ⚡ Rule 2: Token Discipline The **full** decision tree lives in `orchestrator/TOKEN_OPTIMIZER.md` (loaded at activation). ``` Is the answer in the graph? → python -m graphstack graph query "…" Shell/git/test command needed? → python -m graphstack run -- <cmd> (not raw) Is this tool call speculative? → Cancel it, ask user first Can reads run in parallel? → Parallelize them Output > 15 lines user won't act on → Summarize instead ``` ## 🎭 Rule 3: Role Discipline (announce every transition) Before acting as a role, announce: `[ARCHITECT MODE]`, `[BUILDER MODE]`, etc. After every transition, run: ```bash python -m graphstack state set --role <role> [--task <task-id>] ``` **FORBIDDEN without active builder role:** - Editing or creating code files (anything outside `handoff/`, `graphify-out/`, `.cursor/`) - The process gate (v4.6) denies edits unless `handoff/STATE.json` has `role=builder` and a task is in `handoff/board/doing/` **Cycle start (new feature):** ```bash python -m graphstack cycle start <task-id> "<title>" ``` Architect writes BRIEF → then: ```bash python -m graphstack cycle enter-builder <task-id> ``` ## 📋 Rule 4: Brief-Driven Building The Builder NEVER builds without a brief from `handoff/BRIEF.md` with **Status: Ready for Builder**. The Reviewer NEVER approves without checking against the brief. If no brief exists, the Architect must write one first. ## 🚫 Rule 5: No Scope Creep Build exactly what the brief says. If something looks wrong but is out of scope, note it in `handoff/REVIEW.md`. ## 🔄 Rule 6: Graph Staleness Check If `graphify-out/GRAPH_REPORT.md` is older than the files being discussed: - Warn: "Graph may be stale. Consider running `/graphify --update`" ## 📁 Rule 7: Handoff Files - `handoff/BRIEF.md` — Architect → Builder - `handoff/REVIEW.md` — Reviewer findings (append-only) - `handoff/STATE.md` — human session log (append-only) - `handoff/STATE.json` — machine state for gate hooks ## 🔁 Rule 8: Full Cycle (do not skip — mechanical handoffs) For any feature or fix that touches code, run **every** phase in order. Never compress Reviewer + QA + Ship into one turn. ``` ARCHITECT → cycle start + BRIEF (Ready for Builder) BUILDER → cycle enter-builder → implement REVIEWER → cycle enter-reviewer → REVIEW.md Verdict: Approved QA → cycle enter-qa → REVIEW.md QA Report (Overall: PASS) SHIP → cycle enter-ship → checklist → cycle close ``` Mechanical commands (run each before acting as that role): ```bash python -m graphstack cycle enter-reviewer <task-id> python -m graphstack cycle enter-qa <task-id> python -m graphstack cycle enter-ship <task-id> python -m graphstack cycle close <task-id> ``` Gate blocks code **commits** and early **board complete** until `role=ship` and REVIEW has both Verdict: Approved and a shippable QA Report. Never jump from graph exploration directly to implementation. ## ⛔ Close-turn contract (implementation done ≠ cycle done) When Builder finishes acceptance criteria: ``` FORBIDDEN: stop with task in doing/, role=builder, or "I'm done" to the user FORBIDDEN: skip Reviewer, QA, or Ship — no "skip review" / "just ship" FORBIDDEN: git commit or board complete before cycle enter-ship REQUIRED: cycle enter-reviewer → enter-qa → enter-ship → cycle close ``` **"devam" / "bitir" after implementation** → `cycle enter-reviewer`, not idle. **"devam" after brief approval** (Architect) → `cycle enter-builder` only.
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.

