02-chunking-and-splitting-rules

02-chunking-and-splitting-rules is a cursor rule for Windsurf from hfredrick69/deep-research-mcp-server. It costs 29 tokens per session (275 once invoked), scanned A, original, MIT.

Rules for splitting research text into smaller, coherent pieces before sending it to an AI model. Text splitting helps fit long documents within model limits while keeping enough surrounding context for retrieval and summaries.

In plain words
What is it for?
Use them when changing the research text splitter, choosing recursive or semantic splitting, setting chunk overlap, or testing retrieval and summarisation input.
Why use it?
They reduce lost meaning at split boundaries and avoid chunks that are too large, too small, or wasteful when many are processed together.

Cursor rule for Windsurf

Written for Windsurf: installed under .windsurf/.

Good fit Use them when changing the research text splitter, choosing recursive or semantic splitting, setting chunk overlap, or testing retrieval and summarisation input.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/hfredrick69/deep-research-mcp-server/02-chunking-and-splitting-rules
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.

Clone the repo
git clone --depth 1 https://github.com/hfredrick69/deep-research-mcp-server

Made for: Windsurf.

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 02-chunking-and-splitting-rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/hfredrick69/deep-research-mcp-server/02-chunking-and-splitting-rules/github.svg)](https://agentmods.dev/rules/hfredrick69/deep-research-mcp-server/02-chunking-and-splitting-rules)
Your own site
<a href="https://agentmods.dev/rules/hfredrick69/deep-research-mcp-server/02-chunking-and-splitting-rules"><img src="https://agentmods.dev/badge/rules/hfredrick69/deep-research-mcp-server/02-chunking-and-splitting-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 02-chunking-and-splitting-rules

Your own site · 80×15
<a href="https://agentmods.dev/rules/hfredrick69/deep-research-mcp-server/02-chunking-and-splitting-rules"><img src="https://agentmods.dev/badge/rules/hfredrick69/deep-research-mcp-server/02-chunking-and-splitting-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 275 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00029 $0.00275
Opus 5.5 $0.00012 $0.00110
Sonnet 5.5 $0.00006 $0.00055
Haiku 4.5 $0.00003 $0.00028

Measured yesterday against content hash 8616d43f0550, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

02-chunking-and-splitting-rules 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.

.windsurf/rules/02-chunking-and-splitting-rules.md · 28 lines

What it actually says

Chunking and Text Splitting Rules

Last reviewed: 2025-08-11

Use chunking that preserves coherence while fitting model/token budgets.

Defaults

  • Recursive splitter with ordered separators (e.g., \n\n, \n, . then fallback) and overlap to reduce boundary loss.
  • Semantic splitter only when embeddings are available and budgeted; otherwise stick to recursive.
  • Chunk size/overlap: Tune per task; start with conservative sizes, validate with recall/precision in retrieval.

Project Guidance

  • Use createResearchSplitter() in src/ai/text-splitter.ts.
  • Avoid external calls in tests; mock generateTextEmbedding() when exercising semantic splitting.
  • Ensure each chunk carries sufficient context for summarization prompts; consider chunk expansion around headings.

Anti-Patterns

  • Overlapping too much (wastes tokens) or too little (context loss at boundaries).
  • Large chunks that exceed downstream prompt budgets when batched.

References

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 · 28 lines · 29 tokens per session scan A 8616d43f0550

Subscribe to this mod's changes

02-chunking-and-splitting-rules is a cursor rule published in the GitHub repository hfredrick69/deep-research-mcp-server (0 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 275 once invoked, about $0.0001 per session on Opus 5.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-10-30.