f2s-flow2spec-unified-entry

A project rule that defines one entry point for reading Flow2Spec project knowledge stored in the .Knowledge folder. Flow2Spec is a system for organizing project knowledge and related development steps.

In plain words
What is it for?
Use it when initializing Flow2Spec or running its f2s-* skills, especially when deciding whether optional sub-agent work or agent verification should happen.
Why use it?
It prevents broad, unfocused searches through project documentation and explains which configuration and tool-specific entry point to use.

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

Made for: Cursor.

Per session 4,366 This file is loaded in full into every session.
When invoked 4,366 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.04366 $0.04366
Opus 5 $0.02183 $0.02183
Sonnet 5 $0.00873 $0.00873
Haiku 4.5 $0.00437 $0.00437

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

Security

Grade A, and why

f2s-flow2spec-unified-entry 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-flow2spec-unified-entry.mdc · 118 lines

How it starts

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

Flow2Spec 统一入口规则

本项目知识库已统一到 .Knowledge/,请按以下顺序读取,避免无范围检索。

项目根 CLI 开关(必须按需读取)

业务仓库项目根 flow2spec.config.jsonflow2spec init 在文件缺失时补齐)含布尔字段 subAgentswitchAgentVerification切换 agent 校验),默认 false。执行任意 f2s-* 技能或与 Flow2Spec 初始化相关的说明前,须读取该文件;技能或规则中凡写「仅当 subAgent / switchAgentVerification 为 true」的步骤,必须按文件实际值决定是否执行;缺失字段或文件不存在时均视为 false

init 与择路flow2spec init 会把统一入口写入当前仓库;Cursor / Claude 读取配置根 rules/f2s-flow2spec-unified-entry.*Codex 读取 .codex/topics/f2s-flow2spec-unified-entry.md。两处正文同源,按当前工具读取对应入口即可;技能引「统一入口」时,在 Codex.codex/topics/f2s-flow2spec-unified-entry.md 为准。

两字段语义(模板约定)

  • subAgentf2s-* 技能若规定某步骤「用子 agent 执行」,则 true 时按技能使用子 agent,false 时在主 agent 内完成。用户可在对话中要求「仅当本项为 true 时,由主 agent 动态判断哪些子任务适合交给子 agent」——仅当配置为 true 时该要求有效;配置为 false 时凡依赖拆子 agent 的该段说明不生效,全部在主 agent 完成。subAgent=true 时,主 agent 必须在技能正文前段显式判断本次是否拆子;即使判断不拆,也必须输出不拆原因。f2s-* 在工作哪一阶段必须或建议使用子 agent 由技能正文逐步约定;技能未写明时不默认拆子。
  • switchAgentVerification(切换 agent 校验):落盘或变更后的验证/复核(对照清单、diff、自检)不是「一律在主 agent」;默认以落盘侧所在 agent 为「当前 agent」,在该会话内完成校验(子 agent 落盘的就在子 agent 内验,主 agent 落盘的就在主 agent 内验)。仅当① 配置 switchAgentVerificationtrue当前 f2s-* 技能正文对该步骤明确写出「当 switchAgentVerificationtrue」时,才启用交叉校验子 agent 落盘的 → 由主 agent 校验主 agent 落盘的 → 由子 agent 校验已存在子 agent 会话,即 subAgenttrue 且实际拆出子任务;若 subAgentfalse,无子侧可承接,「主落盘→子验」不发生,校验全部在主 agent 内完成)。配置为 false、或技能未写依赖本项、或用户仅泛泛要求「给对方验」的:启用交叉,仍在落盘侧 agent内完成验证。

Git worktree 与子任务工作目录卫生(subAgent: true 或并行子任务时必读)

部分环境会为子 agent / 并行尝试创建 独立 git worktree 或等价隔离目录。规则如下:

  1. 谁创建谁收尾:子侧创建则子侧在返回前尽量清理;若子会话已结束无法清理,主 agent 合并结果后必须执行清理,禁止依赖「稍后自动回收」。
  2. 收尾动作(必须):对仅为本次子任务添加的 worktree,在合并或丢弃该子任务结果后执行 git worktree remove <path>(工作区干净仍失败时再用 git worktree remove --force <path>须确认该路径无他人未提交修改);随后 git worktree list 自检,禁止留下已知孤儿路径。
  3. 中断 / 用户换题前:若本会话曾添加 worktree,在结束前必须完成上述移除或在 task.md「## 备注」写明残留路径与删除命令,并视情况写入 user-todos.md 请用户本地执行(见 f2s-task)。
  4. 禁止:子任务已结束、主分支已继续开发,仍长期保留仅用于尝试的 worktree 目录(易造成混淆提交、磁盘堆积)。

Read the full file on GitHub · 118 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 · 118 lines · 4,366 tokens per session scan A 3738c4d9a6f0

Subscribe to this mod's changes

f2s-flow2spec-unified-entry is a cursor rule published in the GitHub repository double-coding-lab/Flow2Spec (47 stars, last pushed 5d ago), licensed MIT. It adds 4,366 tokens to every session, about $0.0218 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.