knowledge-management-rule

knowledge-management-rule is a cursor rule for Cursor from brunogama/ios-cursor-rules. It costs 2,695 tokens per session, scanned A, original, MIT.

A project rule for recording, organizing, refining, and reusing knowledge during software work. It includes structured notes about lessons learned and insights from tasks, code changes, and reviews.

In plain words
What is it for?
Saving learnings, reviewing insights after implementation or code review, and keeping project knowledge in organized Markdown files.
Why use it?
It reduces the chance that useful project decisions or lessons will be forgotten between tasks. It also gives those notes consistent places and triggers for capture.

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/brunogama/ios-cursor-rules/knowledge-management-rule
Clone the repo
git clone --depth 1 https://github.com/brunogama/ios-cursor-rules

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 knowledge-management-rule

README.md
[![agentmods](https://agentmods.dev/badge/rules/brunogama/ios-cursor-rules/knowledge-management-rule.svg)](https://agentmods.dev/rules/brunogama/ios-cursor-rules/knowledge-management-rule)
Your own site
<a href="https://agentmods.dev/rules/brunogama/ios-cursor-rules/knowledge-management-rule"><img src="https://agentmods.dev/badge/rules/brunogama/ios-cursor-rules/knowledge-management-rule.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,695 This file is loaded in full into every session.
When invoked 2,695 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.02695 $0.02695
Opus 5 $0.01347 $0.01347
Sonnet 5 $0.00539 $0.00539
Haiku 4.5 $0.00269 $0.00269

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

Security

Grade A, and why

knowledge-management-rule 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.

.cursor/rules/knowledge-management-rule.mdc · 347 lines

How it starts

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

Knowledge Management System

Rule for capturing, organizing, refining, and applying knowledge throughout the project lifecycle.

Learning refinement filters

  • type: event pattern: "learning_create"
  • type: event pattern: "learning_update"
  • type: file_change pattern: ".cursor/learnings/*.md"
  • type: command pattern: "knowledge"

Actionable insights filters

  • type: command pattern: "insight"
  • type: event pattern: "implementation_complete"
  • type: event pattern: "task_complete"
  • type: event pattern: "code_review"
  • type: file_change pattern: "src/*"

actions:

SECTION 1: KNOWLEDGE CAPTURE

  • type: react conditions:

    • pattern: "learn add|learning create" action: |

    Create a new learning entry

    I'll create a structured learning document with:

    • Unique ID (format: LEARN-YYYY-MM-DD-NN)
    • Title and short description
    • Detailed description of the learning (including context related to SOLID, TDD, SRP, Calisthenics, resilience if applicable)
    • Relevant code files (using Sources/, Tests/ paths), tasks (managed by development_workflow_system), specifications (managed by specification_management), and documents
    • Date of capture
    • Keywords for easy retrieval

    The learning will be stored in .cursor/learnings/ and indexed in .cursor/LEARNINGS.md

  • type: react conditions:

    • pattern: "document add|document create|document detect" action: |

    Register a document in the knowledge base

    I'll register the document by:

    • Storing a copy in .cursor/docs/ if it's not already there
    • Creating a learning entry about this document
    • Adding the document to the documents index
    • Extracting key information from the document
    • Creating cross-references to related content including specifications (managed by specification_management)

    This ensures all project documentation is centrally tracked and discoverable.

  • type: react event: "conversation_insight" action: |

    Automatically capture important insights from our conversations

    When I identify valuable insights in our conversation, I'll:

    • Create a learning entry with the insight
    • Generate a unique ID for the learning
    • Categorize and tag the insight appropriately
    • Add context and relevant connections to tasks (managed by development_workflow_system)
    • Index the insight for future reference

    This ensures important information isn't lost.

  • type: react event: "file_change" conditions:

    • pattern: ".cursor/docs/.*" action: |

    Automatically process new documents added to docs directory

    When a new document is added to .cursor/docs/, I'll:

    • Extract key information from the document
    • Create a learning entry linked to this document
    • Update the documents index
    • Identify related content including specifications (managed by specification_management)
    • Generate appropriate metadata

    This ensures all documentation is properly integrated into the knowledge base.

SECTION 2: KNOWLEDGE ORGANIZATION & REFINEMENT

  • type: react conditions:

    • pattern: "learn categorize|learning categorize" action: |

    Categorize and organize learnings

    I'll organize all learnings into meaningful categories:

    1. Analyze all learning content to identify topics and themes
    2. Categorize learnings into domains like:
      • Architecture, Performance, Security, DevOps
      • UX, API, Database, Testing
      • Frontend, Backend, Mobile, Tooling
      • Process, Bugs, Documentation
    3. Create category files in .cursor/learning_categories/
    4. Generate a categories index with links to all categorized learnings
    5. Identify uncategorized learnings for further review

Read the full file on GitHub · 347 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 · 347 lines · 2,695 tokens per session scan A 5ec9896c234c

Subscribe to this mod's changes

knowledge-management-rule is a cursor rule published in the GitHub repository brunogama/ios-cursor-rules (74 stars, last pushed 1y ago), licensed MIT. It adds 2,695 tokens to every session, about $0.0135 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.