f2s-topic-authoring

Chinese-language writing rules for Flow2Spec topics, which are structured knowledge entries used to guide an agent. They define topic names, content structure, dependencies, routing metadata, and file ownership.

In plain words
What is it for?
Use them when authoring topic files, updating topic metadata or dependencies, changing task-to-topic rules, or deleting and migrating topics.
Why use it?
They provide one shared standard for adding, changing, removing, or moving these knowledge topics. This reduces inconsistent names, misplaced details, and broken routing references.

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/double-coding-lab/flow2spec/f2s-topic-authoring
Clone the repo
git clone --depth 1 https://github.com/double-coding-lab/Flow2Spec

Made for: Cursor.

Per session 40 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,275 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.00040 $0.03275
Opus 5 $0.00020 $0.01638
Sonnet 5 $0.00008 $0.00655
Haiku 4.5 $0.00004 $0.00328

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

Security

Grade A, and why

f2s-topic-authoring 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 2d 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/f2s-topic-authoring.mdc · 127 lines

How it starts

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

Flow2Spec 主题创作准则(Topic Authoring)

本条为 创作侧 单一事实源;凡 f2s-* 技能在新增或修改 .Knowledge/topics/<topic>.md、调整 manifest-routing.topicMetadata / manifest-routing.topicDependencies、删除 / 迁移 topic 时,必须先 Read 本条全文,再按对应 SKILL 的步骤继续。与 f2s-flow2spec-unified-entry(消费侧)并存;硬冲突时以统一入口为准。

适用范围

满足下列任一即「触达本条」:

  • 新增或重写 .Knowledge/topics/<topic>.md
  • 修改既有 topic 的标题 / 适用场景 / 关键流程边界;
  • 新增、删除或调整 manifest-routing.topicMetadata
  • manifest-routing.topicDependencies 中新增、删除或调整依赖边;
  • taskToTopicRules[].topics 中新增引用某个 topic id;
  • 删除或迁移 topic(f2s-kb-rm / f2s-kb-upgrade)。

1. topic 命名

  • idkebab-case,与 manifest-routing.topicPaths 的 key 一致。
  • 文件名.Knowledge/topics/<topic-id>.md;若该 topic 与同名 f2s-* 技能 / 规则强绑定(如 f2s-task / f2s-req-plan),文件名可加 f2s- 前缀以示同源。
  • 不要:版本后缀(-v2 / -new)、个人花名、与 index.md 行级标题冲突的同义词。

2. topic 定位与正文骨架

topic 的定位:可执行路由摘要 + 关键边界。topic 可以包含必要的边界说明、关键流程步骤、禁止项、配置摘要——Agent 读完即可执行或判断是否需要继续下钻;不应承载完整实现细节、长文背景或可在 stock-doc 里查的原始内容。stock-doc 承载完整背景与长文细节,topic 指向它。

长文背景引用的目录边界(硬约束):topic 中「详细背景 / 相关资料 / 长文来源 / 参考文档」等指向长文源的引用槽位,只允许指向 .Knowledge/stock-docs/*_终稿.md 或已被归档为长文事实的 stock-docs/*禁止把这类槽位挂到 .Knowledge/req-docs/*(含澄清 / 技术方案 / SQL / PRD 等)——req-docs 是本次交付的临时输入,用完会随任务归档或迁移,作为 topic 的长文事实源是悬空引用。若同步 / 新建 topic 时相应 stock-docs/*_终稿.md 尚未生成,必须先触发 f2s-doc-final 沉淀终稿(或与用户确认由手写补齐),再让 topic 指向终稿;不得跳过终稿直接把 topic 挂在 req-docs 上。允许:topic 正文可短引方案里的一句结论或一个字段名作为佐证(如「见 .Knowledge/req-docs/xxx_技术方案.md」的偶发点引),但长文背景槽位("详细背景 / 相关资料"整节)仍须指向 stock-doc。

每个 topic 至少包含:

  1. 标题与一句话意图(一行写清"该 topic 解决什么");
  2. 适用场景 / 触发词(与对应 matchers/<id>.json includeAny 语义一致);
  3. 核心规则 / 流程(可执行知识;步骤须可由 Agent 复现);
  4. 依赖声明(若 topicDependencies 中存在依赖项,正文须显式写一句「执行前须先读依赖主题 <dep>」,参考 topics/f2s-req-plan.md 首段写法);
  5. 边界与禁止项(避免膨胀到隔壁 topic);
  6. 长文背景 / 详细资料引用(如需承载业务背景):只列 .Knowledge/stock-docs/*_终稿.md 的可点击 Markdown 链接(1–3 条即可);禁止直接列 .Knowledge/req-docs/* 作为长文背景来源;无对应终稿时先生成终稿再回填此小节。

Read the full file on GitHub · 127 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. 2d ago First seen · 127 lines · 40 tokens per session scan A 879350a6e4a6

Subscribe to this mod's changes

f2s-topic-authoring is a cursor rule published in the GitHub repository double-coding-lab/Flow2Spec (47 stars, last pushed 4d ago), licensed MIT. It adds 40 tokens to every session and 3,275 once invoked, about $0.0002 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.