adding-new-features

A set of checklists for adding API endpoints, software agents, database fields, and career-related tools to an application.

In plain words
What is it for?
Use it when creating backend routes, connecting frontend tests, adding database columns, integrating agents, or extending career tools.
Why use it?
It helps developers remember related security, ownership, error-handling, registration, logging, and test changes when introducing a feature. It reduces the risk of a feature working in one layer but failing elsewhere.

Cursor rule for Claude Code

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/eliornl/rolemule/adding-new-features
Clone the repo
git clone --depth 1 https://github.com/eliornl/rolemule

Made for: Claude Code.

Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,499 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.00016 $0.03499
Opus 5 $0.00008 $0.01750
Sonnet 5 $0.00003 $0.00700
Haiku 4.5 $0.00002 $0.00350

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

Security

Grade A, and why

adding-new-features 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.

.claude/rules/adding-new-features.mdc · 197 lines

How it starts

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

Adding New Features — Checklists

New API Endpoint

  1. Add Pydantic request/response models
  2. Add route handler with Depends(get_current_user) + Depends(get_database)
  3. Check ownership — verify the resource belongs to current_user
  4. Apply rate limiting for sensitive or expensive operations
  5. Log operations with logger.info(), errors with logger.error()
  6. Use APIError / create_error_response for all errors — never bare HTTPException
  7. Register router in main.py under /api/v1/ prefix
  8. If the endpoint is also in the legacy /api/ prefix, add include_in_schema=False
  9. Add API integration tests in tests/test_api/ using authed_client (mocked user) or authed_client_with_user (real DB user) as appropriate
  10. Add E2E mocked coverage in api-validation.spec.ts — add a test that mocks the endpoint and verifies the frontend renders its response without JS errors
  11. If the endpoint returns 429, add a matching test in rate-limit.spec.ts

Workflow start — duplicate detection (POST /api/v1/workflow/start)

Before changing how jobs are keyed or deduplicated:

  1. api/workflow.py_find_duplicate_active_application / _fingerprint_job_content / _canonical_job_url; normalize_title_company_key is utils/application_dedupe.py (imported where needed). Duplicate responses use RES_3002 (409) and must release workflow_creating:{user_id} on that path.
  2. Fingerprint — stored on WorkflowSession.job_input_data["content_fingerprint"] only when normalized text length ≥ 80 (constant _MIN_JOB_CONTENT_FINGERPRINT_CHARS). Do not weaken NFKC / zero-width stripping without re-checking extension vs paste dedupe.
  3. Post-start duplicate handling — see rolemule-core.mdc § Duplicate job after start (find_conflicting_job_application in utils/application_dedupe.py, _maybe_fail_duplicate_job_after_analyzer in workflows/job_application_workflow.py, integrity handling in api/workflow.py _update_job_application_with_final_state).
  4. Tests — extend tests/test_api/test_workflow.py and tests/test_application_dedupe.py as appropriate; frontend must handle RES_3002 in ui/src/pages/dashboard-new-application.ts, ui/src/shared/api.ts, and the Chrome extension (popup.js, service-worker.js).
  5. Docsrolemule-core.mdc § RES_3002 and § Duplicate job after start; dashboard-home.mdc § Toast Deduplication — notifyReady (c: / f: keys vs legacy bare sessionId).

Read the full file on GitHub · 197 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 · 197 lines · 16 tokens per session scan A 0f9071c17696

Subscribe to this mod's changes

adding-new-features is a cursor rule published in the GitHub repository eliornl/rolemule (37 stars, last pushed 2d ago), licensed MIT. It adds 16 tokens to every session and 3,499 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

cursorrules

Agent2 is a framework for building production AI agents with typed HTTP APIs. PydanticAI handles the agent loop. Agent2 handles everything else: API, auth, pause/resume, approvals, provider routing, knowledge search.

Artesiana/agent2 · 399 tokens

product-manager

Holistic product leader who owns the full product lifecycle — from discovery and strategy through roadmap, stakeholder alignment, go-to-market, and outcome measurement. Bridges business goals, user needs, and technical reality to ship the right thing at the right time.

Treevu-ai/cli-market-world · 5,350 tokens

api-tester

Expert API testing specialist focused on comprehensive API validation, performance testing, and quality assurance across all systems and third-party integrations.

Treevu-ai/cli-market-world · 23 tokens

developer-advocate

Expert developer advocate specializing in building developer communities, creating compelling technical content, optimizing developer experience (DX), and driving platform adoption through authentic engineering engagement. Bridges product and engineering teams with external developers.

Treevu-ai/cli-market-world · 38 tokens

architectural-and-structural-rules

The project follows a layered architecture with clear separation of concerns.

mrharishkumar/fastapi-cursor-boilerplate · 559 tokens

angular-20

This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.

angular/angular · 0 tokens