graphstack

A set of project rules that makes an AI coding assistant coordinate development work through a graph-based process. It includes startup instructions, shared project state, and handoffs between tasks.

In plain words
What is it for?
Use it to coordinate multi-step software work, track task handoffs, and preserve project context between sessions.
Why use it?
It reduces the need to repeat project instructions and helps keep work organized across chats and contributors.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/mertcapkin/graphstack/graphstack
Clone the repo
git clone --depth 1 https://github.com/MertCapkin/GraphStack

Made for: Cursor.

Per session 1,573 This file is loaded in full into every session.
When invoked 1,573 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01573 $0.01573
Opus 5 $0.00787 $0.00787
Sonnet 5 $0.00315 $0.00315
Haiku 4.5 $0.00157 $0.00157

Measured yesterday against content hash c41f018a88c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

graphstack scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/graphstack.mdc · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.mdActivation 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.

Read the full file on GitHub · 168 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 168 lines · 1,573 tokens per session scan A c41f018a88c1

Subscribe to this mod's changes

graphstack is a cursor rule published in the GitHub repository MertCapkin/GraphStack (8 stars, last pushed 2mo ago), licensed MIT. It adds 1,573 tokens to every session, about $0.0079 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.