memforge-topology-trigger

memforge-topology-trigger is a cursor rule for Cursor from zql0805/memforge. It costs 870 tokens per session, scanned A, original, MIT.

A set of rules for creating and querying a visual map of how services and repositories in a product relate to one another. The map is shown in Memforge WebUI, a browser interface for viewing this information.

In plain words
What is it for?
Use it to initialize or refresh a product architecture map, view upstream and downstream service calls, inspect a complete system overview, and assess the impact of changing an interface.
Why use it?
It gives teams a consistent way to inspect service connections, call paths, and the possible effects of a change across repositories. It also tells the assistant when to scan or refresh the map.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to initialize or refresh a product architecture map, view upstream and downstream service calls, inspect a complete system overview, and assess the impact of changing an interface.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/zql0805/memforge/memforge-topology-trigger
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/zql0805/memforge

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 memforge-topology-trigger

README.md
[![agentmods](https://agentmods.dev/badge/rules/zql0805/memforge/memforge-topology-trigger/github.svg)](https://agentmods.dev/rules/zql0805/memforge/memforge-topology-trigger)
Your own site
<a href="https://agentmods.dev/rules/zql0805/memforge/memforge-topology-trigger"><img src="https://agentmods.dev/badge/rules/zql0805/memforge/memforge-topology-trigger/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 memforge-topology-trigger

Your own site · 80×15
<a href="https://agentmods.dev/rules/zql0805/memforge/memforge-topology-trigger"><img src="https://agentmods.dev/badge/rules/zql0805/memforge/memforge-topology-trigger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 870 This file is loaded in full into every session.
When invoked 870 The same file — it is already loaded in full.
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.00870 $0.00870
Opus 5.5 $0.00348 $0.00348
Sonnet 5.5 $0.00174 $0.00174
Haiku 4.5 $0.00087 $0.00087

Measured 1mo ago against content hash fcd92357a487, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memforge-topology-trigger 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 1mo 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.

packages/memory-service/src/rules-templates/memforge-topology-trigger.mdc · 80 lines

What it actually says

产品线拓扑图 — 全局触发与自动检测

触发词识别

当用户消息包含以下关键词时,执行对应的内置拓扑操作:

分类 触发词
打开/显示 打开拓扑图、显示拓扑、拓扑图、看看拓扑、show topology、open topology
初始化 初始化拓扑、初始化拓扑图、帮我初始化产品线、初始化跨仓库分析
生成/刷新 生成拓扑图、刷新拓扑、更新拓扑、重新扫描、rescan
架构相关 架构图、服务关系图、调用链路图、全链路分析、产品线可视化、产品线拓扑、topology
跨仓库 跨仓库分析、关联代码库、仓库扫描
快速打开 topo、拓扑

快速打开拓扑图

当用户说「打开拓扑图」「看看拓扑」时,告知用户通过 Memforge WebUI 查看:

请在 Memforge WebUI 中打开「产品线拓扑」页面查看可视化拓扑图。 如果拓扑数据尚未生成,可以点击页面上的「一键扫描」按钮,或我帮你调用 scan_topology 扫描。

扫描/刷新拓扑

当用户说「刷新拓扑」「重新扫描」「生成拓扑图」时:

  1. 识别产品线:从工作区路径或用户输入推断
  2. 展示扫描配置并等待确认(强制):列出将扫描的目录、Git 过滤模式
  3. 用户确认后调用:
    scan_topology({
      product_line: "<产品线>",
      force: true,
      scan_roots: ["用户确认的目录列表"],
      git_patterns: ["用户确认的过滤模式"]
    })
    
  4. 告知用户:汇报扫描结果(仓库数、调用链数),建议去 WebUI 查看

首次初始化

当 AI 检测到当前产品线从未扫描过拓扑数据时:

  1. 从工作区路径或 MCP product_line 参数自动识别
  2. 调用 scan_topology({ product_line: "<产品线>" }) 零配置扫描
  3. 未知产品线时询问用户提供扫描根目录和名称

新仓库自动检测

当前工作区是 git 仓库且该产品线已有拓扑数据时,首次提问自动检查该仓库是否已收录。 未收录时提示用户是否刷新拓扑。

拓扑查询工具(优先于 recall_memory)

查询服务间关系、发布顺序、变更影响时,优先使用结构化查询工具:

场景 工具
查看上下游调用链 query_topology
全量架构概览 query_topology (include: ["all"])
修改接口后影响范围 get_topology_change_impact
确定发布顺序 get_topology_release_order
定位模糊服务名 resolve_service_path

重要约束

  1. 所有拓扑操作仅使用 Memforge 内置 MCP 工具,不使用外部脚本
  2. 拓扑可视化通过 Memforge WebUI「产品线拓扑」页面呈现
  3. 扫描前必须展示配置并等待用户确认
  4. 不将拓扑数据提交到 git
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. 1mo ago First seen · 80 lines · 870 tokens per session scan A fcd92357a487

Subscribe to this mod's changes

memforge-topology-trigger is a cursor rule published in the GitHub repository zql0805/memforge (2 stars, last pushed 3mo ago), licensed MIT. It adds 870 tokens to every session, about $0.0035 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-08-31.

Related

Other cursor rules, from other repositories

compression-safety

Cursor rule "compression-safety" from yvgude/lean-ctx, covering compression safety — prevent lean-ctx marker corruption, the problem, rules for all agents, never write compressed content to files and file restoration commands.

yvgude/lean-ctx · 399 tokens

honcho_rules

Honcho persistent memory — capture every conversation, recall past context, and build a growing model of the user. Activates on every conversation.

matthewdcage/llm-swarm-router · 1,412 tokens

nauro-adopt

Seeds Nauro's project store from an existing repo. Use after nauro adopt has run locally. On filesystem-capable surfaces, reads docs (README, manifests, ADRs, Memory-Bank) for rationale and inspects code, config, tests, lockfiles, and recent git history for evidence, then surfaces targeted probes that turn evidence…

Nauro-AI/nauro · 89 tokens

nauro-context

Writes durable shared context into Nauro's project store so other agents (a later session or a parallel one) can discover and pull it, finds and reads context another agent left, or captures a resumable brief so your own next session in this environment picks up cleanly. Three modes. Author writes a shared brief for…

Nauro-AI/nauro · 272 tokens

graphmind-memory

A set of rules connects the coding agent to GraphMind, a shared memory system that stores project knowledge between sessions. It uses an MCP service to restore context, record actions, and save decisions.

kostya-pakhomov/graphmind · 298 tokens

compendium

Prefer the Compendium MCP gateway to shrink noisy/large context before pasting it into the conversation.

hocestnonsatis/Compendium · 564 tokens