documentation-organization

Project rules for HTTP controllers, which are code components that receive web requests and register routes such as API paths. They define required includes, route registration, and delayed service setup.

In plain words
What is it for?
Use them when adding or changing API controllers, registering GET or POST routes, or connecting controllers to storage and other services.
Why use it?
They prevent routing from breaking and avoid initialization-order problems that can occur when services are created too early. They also keep controller files consistent.

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/hatefsystems/search-engine-core/documentation-organization
Clone the repo
git clone --depth 1 https://github.com/hatefsystems/search-engine-core

Made for: Cursor.

Per session 2,795 This file is loaded in full into every session.
When invoked 2,795 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.02795 $0.02795
Opus 5 $0.01398 $0.01398
Sonnet 5 $0.00559 $0.00559
Haiku 4.5 $0.00280 $0.00280

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

Security

Grade A, and why

documentation-organization 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.

.cursor/rules/documentation-organization.mdc · 460 lines

How it starts

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

Documentation Organization Standards

Documentation Location Rules

Rule: NO Markdown Files in Project Root (Except README.md)

CRITICAL: Only README.md should exist in the project root directory. All other markdown files MUST be organized in the docs/ directory structure.

✅ ALLOWED in root:
- README.md (main project documentation)

❌ FORBIDDEN in root:
- Any other .md files
- Implementation summaries
- Test results
- Feature documentation
- Architecture docs

Documentation Directory Structure

docs/
├── api/                  # API endpoint documentation
├── features/            # Feature guides and overviews
├── implementation/      # Implementation summaries for major features
├── testing/             # Test results and verification reports
├── architecture/        # System architecture and design documents
├── privacy/             # Privacy architecture and compliance
├── guides/              # User guides and tutorials
├── development/         # Development setup and guidelines
├── troubleshooting/     # Common issues and solutions
└── archive/             # Historical/deprecated documentation

File Placement Guidelines

API Documentation → docs/api/

When: Documenting API endpoints, request/response formats, authentication

Files:

  • {feature}_endpoint.md - API reference for endpoints
  • {FEATURE}_QUICK_START.md - Getting started guides
  • README.md - API documentation index

Example:

docs/api/profile_endpoint.md
docs/api/link_blocks_endpoint.md
docs/api/LINK_BLOCKS_QUICK_START.md

Feature Overviews → docs/features/

When: High-level feature documentation for users and developers

Content:

  • Feature overview and purpose
  • User-facing capabilities
  • Use cases and examples
  • Configuration options
  • Future enhancements

Example:

docs/features/LINK_BLOCKS.md
docs/features/SEARCH_FILTERS.md

Implementation Summaries → docs/implementation/

When: Completing major features (3+ days of work), architectural changes

Read the full file on GitHub · 460 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. yesterday First seen · 460 lines · 2,795 tokens per session scan A a94dc80eb56b

Subscribe to this mod's changes

documentation-organization is a cursor rule published in the GitHub repository hatefsystems/search-engine-core (5 stars, last pushed 28d ago), licensed Apache-2.0. It adds 2,795 tokens to every session, about $0.0140 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-31.