dsp-brownfield

dsp-brownfield is a cursor rule for Cursor from k-kolomeitsev/data-structure-protocol. It costs 10 tokens per session (920 once invoked), scanned A, original, Apache-2.0.

A workflow for documenting an existing project with DSP, apparently by mapping its entry points and code into structured objects. It divides the project into backend and frontend areas, or other defined scopes.

In plain words
What is it for?
Use it to initialize DSP in a brownfield project, identify application entry points, organize files into batches, and build documentation structures.
Why use it?
It gives a defined process for bringing an existing codebase into DSP without repeatedly scanning the same files.

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/k-kolomeitsev/data-structure-protocol/dsp-brownfield
Clone the repo
git clone --depth 1 https://github.com/k-kolomeitsev/data-structure-protocol

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dsp-brownfield

README.md
[![agentmods](https://agentmods.dev/badge/rules/k-kolomeitsev/data-structure-protocol/dsp-brownfield.svg)](https://agentmods.dev/rules/k-kolomeitsev/data-structure-protocol/dsp-brownfield)
Your own site
<a href="https://agentmods.dev/rules/k-kolomeitsev/data-structure-protocol/dsp-brownfield"><img src="https://agentmods.dev/badge/rules/k-kolomeitsev/data-structure-protocol/dsp-brownfield.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 920 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.00010 $0.00920
Opus 5 $0.00005 $0.00460
Sonnet 5 $0.00002 $0.00184
Haiku 4.5 $0.00001 $0.00092

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

Security

Grade A, and why

dsp-brownfield 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 4d 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.

integrations/cursor/.cursor/rules/dsp-brownfield.mdc · 75 lines

How it starts

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

DSP Brownfield Workflow

Use this workflow when integrating DSP into an existing codebase. Bootstrap runs as three flat waves over fixed file batches — no recursion, no graph traversal. Core economy rule: each file is read exactly once, by exactly one subagent; all three waves run on top of that single read.

Phase 0: Initialize and Discover Roots

dsp-cli init

Identify entrypoints and the directory zone (scope) each one covers:

dsp-cli create-object backend/src/main.ts "Backend entry — <brief project overview>" --new-root --scope backend
dsp-cli create-object frontend/src/main.tsx "Frontend entry" --new-root --scope frontend
# single-root project: one root with --scope .

Scopes make TOC assignment automatic: every entity created later lands in all TOCs whose root scope covers its path — no --toc needed in the waves below.

Inventory and Batching

Before reading any file content: list all files with sizes (git ls-files | xargs wc -c; skip vendored code, build output, lock files), group them by TOC, and split each group into batches of roughly equal total volume (not file count). One batch = one subagent; run batches in parallel. Each subagent executes Waves 1–3 over its own files. No subagents available → process batches sequentially, keeping per-file notes from the Wave 1 read — each file is still read only once.

Wave 1: Index All Files

Each subagent reads each file of its batch once — capturing purpose, inner entities, exports, and imports with usage sites — then registers it:

dsp-cli create-object src/auth/jwt.service.ts "JWT token generation and validation"
dsp-cli create-function "src/auth/jwt.service.ts#signToken" "Signs access tokens" --owner <jwt-uid>

Place @dsp <uid> markers before inner-entity declarations. Resume-safe: run dsp-cli find-by-source <path> first and skip files that already have entities. If the code already carries @dsp markers from a previous graph, keep identities with --uid <old-uid>.

Read the full file on GitHub · 75 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. 4d ago First seen · 75 lines · 10 tokens per session scan A d581e1f4c11b

Subscribe to this mod's changes

dsp-brownfield is a cursor rule published in the GitHub repository k-kolomeitsev/data-structure-protocol (65 stars, last pushed 24d ago), licensed Apache-2.0. It adds 10 tokens to every session and 920 once invoked, about $0.0001 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.

Related

Other cursor rules, from other repositories

language-agnostic-patterns

Language-agnostic programming patterns: SOLID, design patterns, clean code, and architecture. Load when refactoring, designing abstractions, or reviewing structure — not for everyday syntax.

madebyaris/advance-minimax-m3-cursor-rules · 37 tokens

cursor-tools-mastery

Cursor 3.7 runtime guide: choose the right tool, canvases, Design Mode, /worktree, /best-of-n, Await, and parallel execution where safe.

madebyaris/advance-minimax-m3-cursor-rules · 36 tokens

cursor-agent-orchestration

Cursor 3.7 orchestration guide: when to plan, when to delegate, nested subagents, multi-environment handoffs, /best-of-n, and Await for long-running branches.

madebyaris/advance-minimax-m3-cursor-rules · 39 tokens

fable5-reasoning

Fable 5 reasoning protocols: task interpretation, risk-first decomposition, approach selection, interleaved thinking, hypothesis ledgers, premortems, calibration, and the stuck-strategy ladder. Load for complex, ambiguous, or long-horizon tasks, for debugging strategy, or whenever progress stalls.

madebyaris/advance-minimax-m3-cursor-rules · 60 tokens

cursor-mcp-optimization

Cursor 3.7 MCP optimization: browser Design Mode, canvases, Figma, Cloudflare tools, MCP Apps structured content, and direct action patterns.

madebyaris/advance-minimax-m3-cursor-rules · 32 tokens

minimax-mcp-tools

MCP and web-tool guidance: current-doc retrieval, direct-tool preference, MCP Apps structured content, and version-aware external lookups.

madebyaris/advance-minimax-m3-cursor-rules · 27 tokens