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.
npx agentmods add rules/k-kolomeitsev/data-structure-protocol/dsp-brownfieldgit clone --depth 1 https://github.com/k-kolomeitsev/data-structure-protocolWrote 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.
[](https://agentmods.dev/rules/k-kolomeitsev/data-structure-protocol/dsp-brownfield)<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>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.
| Model | Per session | Once 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 |
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.
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>.
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.
- 4d ago First seen · 75 lines · 10 tokens per session scan A d581e1f4c11b
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.
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.
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.
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.
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.
cursor-mcp-optimization
Cursor 3.7 MCP optimization: browser Design Mode, canvases, Figma, Cloudflare tools, MCP Apps structured content, and direct action patterns.
minimax-mcp-tools
MCP and web-tool guidance: current-doc retrieval, direct-tool preference, MCP Apps structured content, and version-aware external lookups.