project

A repository-wide rule set describing the product, technology stack, architecture boundaries, and process for different kinds of changes.

In plain words
What is it for?
Use it to classify feature work, bug fixes, refactors, dependency changes, documentation tasks, and problems that need product discovery first.
Why use it?
It helps developers choose the right workflow and source of truth instead of inventing business rules or applying unsuitable testing and documentation steps.

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/krivoox/agent-stack-template/project
Clone the repo
git clone --depth 1 https://github.com/krivoox/agent-stack-template

Made for: Cursor.

Per session 656 This file is loaded in full into every session.
When invoked 656 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.00656 $0.00656
Opus 5 $0.00328 $0.00328
Sonnet 5 $0.00131 $0.00131
Haiku 4.5 $0.00066 $0.00066

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

Security

Grade A, and why

project 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 2d ago.

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/project.mdc · 65 lines

How it starts

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

Project contract

Full guide: AGENTS.md. This rule is the always-loaded summary; do not duplicate detail here, point to the document that owns it.

Work type

Classify first (AGENTS.md → "Every turn"). Open that guide only.

  • New behaviour with a domain rule → spec Accepted or Shipped, then docs/guides/new-feature.md
  • New behaviour without a domain rule → same guide; skip tests and domain/. Do not invent a function to TDD
  • Wrong current behaviour → docs/guides/bugfix.md
  • Same behaviour, new shape → docs/guides/refactor.md
  • Tooling / deps / CI / docs-only → docs/guides/chore.md
  • Problem without a spec → product-manager, no product code

If a feature spec is Draft, do not write product code. TDD applies only when the change adds or breaks a domain rule — AGENTS.md → "Definition of Done".

Sources of truth

When they conflict, this order wins. Open a file only if this turn needs it.

  1. docs/specs/<feature>.md — business rules. Never invent one.
  2. docs/architecture.md — when a layer, auth, data or performance boundary moves
  3. docs/stack.md — when adding or substituting a dependency
  4. docs/adr/ — accepted decisions, when that decision is in play
  5. DESIGN.md — UI only

If a spec lacks the detail you need, update the spec before writing code.

Stack (do not substitute without an ADR)

Next.js App Router · React · TypeScript strict · Better Auth · Prisma + PostgreSQL · Zod + React Hook Form · TanStack Query · Zustand (UI state only) · Tailwind + shadcn/ui · Vitest.

Next.js in this repo may differ from your training data. Check node_modules/next/dist/docs/ before using an API you are unsure about.

Layers

New behaviour with a domain rule (not every turn): spec → domain tests → domain → services → actions → UI

  • src/domain/**, src/features/*/domain/** — pure. No Next, React, Prisma or ambient clock.
  • src/features/*/services/** — the only place Prisma is called.
  • src/features/*/actions/**defineAction / defineWorkspaceAction only.
  • src/app/** — thin routes: compose, do not compute.
  • src/lib/env.ts — the only reader of process.env.

Read the full file on GitHub · 65 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. 2d ago First seen · 65 lines · 656 tokens per session scan A ba52b5a97376

Subscribe to this mod's changes

project is a cursor rule published in the GitHub repository krivoox/agent-stack-template (30 stars, last pushed 12d ago), licensed MIT. It adds 656 tokens to every session, about $0.0033 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-30.