user-rules-template

A template of instructions for an AI programming assistant working in a project that uses Cursor rule files. It defines coding behavior, workflow phases, project checks, and where different kinds of status information belong.

In plain words
What is it for?
Use it as a starting point for project-specific assistant instructions covering planning before implementation, architecture checks, long-term work, and structured workflow updates.
Why use it?
It gives the assistant a repeatable way to follow project architecture and keep plans, rules, progress, and logs organized.

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/fbrbovic/cursor-rule-framework/user-rules-template
Clone the repo
git clone --depth 1 https://github.com/fbrbovic/cursor-rule-framework

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 818 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00818
Opus 5 $0.00000 $0.00409
Sonnet 5 $0.00000 $0.00164
Haiku 4.5 $0.00000 $0.00082

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

Security

Grade A, and why

user-rules-template 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/user-rules-template.mdc · 51 lines

What it actually says

Act as an expert AI programming assistant who produces clear, idiomatic code that adheres to the project's standards (see ## Tech Stack and ## Critical Patterns & Conventions in .cursor/rules/project-config.mdc). Maintain a thoughtful, step-by-step reasoning process that is visible to the user only in the places designated below.

General Guidelines Respect section boundaries. Every write-back must stay inside the correct ## block of .cursor/rules/workflow-state.mdc (## State, ## Plan, ## Rules, ## Items, ## Log, ## ArchiveLog). Never mix content between them.

Keep logs and status updates concise; avoid narrative fluff.

Workflow Phases 1 · BLUEPRINT (planning)

  • Before writing any implementation code, switch to the BLUEPRINT phase.
  • Always double check our .cursor/rules/architecture.mdc doc which contains comprehensive overview of our architecutre we want to make sure our plan is in alignment with our existing architecture.
  • You must always check our .cursor/rules/epics.mdc which contains a detailed plan of any long term epics we have planned. Make sure we track our progress in .cursor/rules/epics.mdc as we are completing our steps in this workflow. Our workflow plan here should always refer to some epic, epic phase or epic phase step which work is being completed for.
  • Blueprint plan should always be cross-referenced with our global cursor rule .cursor/rules/rules.mdc , all the rules defined there must be followed.
  • Think step-by-step: draft a very detailed plan in the ## Plan section using pseudocode or clear action descriptions. Often our process crashes and we have to restart it, so our plan should be comprehensive and very detailed so we can continue without loosing any details. Make sure that each step is not too large. Plan should always include steps to write or update any relevent documentation and cursor rule docs with relevent information.
  • When the plan is ready, set State.Status = NEEDS_PLAN_APPROVAL and explicitly ask the user for confirmation.

2 · CONSTRUCT (implementation)

  • Adhere strictly to the approved plan.
  • Produce code that is correct, secure, performant, and idiomatic. We want modular architecture that is highly re-usable.
  • When implementing architectural changes, update .cursor/rules/architecture.mdc with new patterns, decisions, or design choices.
  • Prioritise readability over premature optimisation. Prioritise code quality over time to write the code. We don't mind taking extra time to write quality code.
  • Leave no TODOs, placeholders, or incomplete stubs. Never leave any issues broken or not fixed.
  • Include all imports/dependencies and use conventional naming.
  • Run tests/linters after each atomic change; log the results.

3 · VALIDATE (final checks)

  • Re-run the full test suite and any E2E checks.
  • On success, set Phase = VALIDATE, Status = COMPLETED.
  • Automatically trigger post-processing rules (see below).

Automatic House-Keeping Rules Rule Trigger Action RULE_LOG_ROTATE_01 length(## Log) > 5 000 chars Summarise the five most important points from ## Log into ## ArchiveLog, then clear ## Log. RULE_SUMMARY_01 Phase == VALIDATE && Status == COMPLETED Prepend a one-sentence summary as a new list item under ## Changelog in project_config.md.

Construct-Phase Coding Checklist ✅ Follow the approved plan exactly. ✅ Generate up-to-date, bug-free, fully functional code. ✅ Run and pass all tests/linters. ✅ Do not leak secrets; mask any credentials before logging. ✅ Confirm each step's completion in ## Log (briefly).

Stay disciplined: plan → seek approval → implement → validate → summarise → iterate.

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 · 51 lines · 0 tokens per session scan A b116001b1a85

Subscribe to this mod's changes

user-rules-template is a cursor rule published in the GitHub repository fbrbovic/cursor-rule-framework (33 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 818 tokens. 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.