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.
npx agentmods add rules/double-coding-lab/flow2spec/f2s-implement-tech-designgit clone --depth 1 https://github.com/double-coding-lab/Flow2SpecWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.02595 |
| Opus 5 | $0.00000 | $0.01298 |
| Sonnet 5 | $0.00000 | $0.00519 |
| Haiku 4.5 | $0.00000 | $0.00260 |
Grade A, and why
f2s-implement-tech-design 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.
How it starts
The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
任务路径:凡
.task/落盘与续作,**必须以rules/f2s-task解析的TASK_ROOT为准(.task或.task/<developerId>;config → git → legacy)。下文若仍出现.task/todo.json/.task/active/,均视为TASK_ROOT/...的简写。
唯一长文:本文件为 implement-tech-design 的完整执行条令。
.Knowledge/topics/f2s-implement-tech-design.md仅为路由摘要;Codex 读取.codex/topics/f2s-implement-tech-design.md(由flow2spec init从本文件自动镜像)作为等效条令。
执行口径:统一知识库路径为
/.Knowledge/。下文所有路径均按.Knowledge约定解释。
基于技术方案实现交付物(通用)
当用户要求根据技术方案文档实现可运行交付物时(用户会提供文档路径,如 .Knowledge/req-docs/xxx.md 或 PDF),按以下约定执行。
目录约定:.Knowledge/req-docs/ 放“用于实现”的技术方案;.Knowledge/stock-docs/ 放沉淀文档,不作为直接编码输入。
触发说明:本规则在打开 req-docs 下 .md 时自动加载(**/req-docs/**/*.md)。若对话前未打开技术方案,可在对话中 @ 本规则后再提供路径。
- 若用户提供的是 PDF:先执行
f2s-doc-pdf,将 PDF 转为.Knowledge/req-docs/下 MD,再继续。 - 若用户提供的是 MD/文本:直接读取并进入实现流程。
一、目标与原则
- 目标:基于技术方案实现可运行交付物,并与项目现有约定保持一致。交付物可以是前端页面/组件、后端接口/服务、数据处理逻辑、任务编排、脚本与配置等(按方案实际范围裁剪)。
- 原则:
- 先列任务再动手:先输出「实现任务列表」,再提问与实现。
- 先读后做:先完整理解方案、边界、依赖、验收标准,再编码。
- 对齐项目约定:目录、命名、依赖、封装方式、错误处理与项目既有风格一致。
- 缺项即问:文档未明确的关键决策先向用户确认;未回复项进入待完成列表。
- 实现后可执行:必须给出验证方式与外部待办,确保用户可落地验收。
二、方案要素与实现映射(通用)
| 技术方案内容 | 实现动作(按项目约定落地) |
|---|---|
| 需求目标 / 范围 / 非目标 | 明确本次实现边界,避免超范围开发。 |
| 关键流程 / 状态流转 / 时序 | 实现主流程与分支,关键判断处加简短注释。 |
| 数据结构 / 协议 / 字段约束 | 落地类型定义、模型、校验器或契约层。 |
| 接口 / 事件 / 消息 | 实现调用入口、事件处理、订阅或回调(按方案涉及项选择)。 |
| 页面 / 组件 / 交互 | 实现 UI 结构、状态管理、交互流程与容错提示(若方案涉及)。 |
| 配置 / 开关 / 环境差异 | 在项目约定位置注册并读取,补齐默认值和降级策略。 |
| 错误码 / 异常策略 / 重试 | 统一错误返回与日志策略,保持与现有封装一致。 |
| 发布 / 路由 / 权限 / 任务调度 | 实现对应代码并提醒用户完成平台侧配置(若方案涉及)。 |
流程图处理(重要)
- 若流程图是 PDF/图片且无文字步骤,先向用户索要文字版流程或补充文档;
- 若已有文字步骤,严格按顺序和分支实现;
- 无法确认分支时先提问,或按默认策略实现并写入待完成列表。
三、执行步骤
步骤 1:输入标准化
- PDF 输入:先执行
f2s-doc-pdf,得到.Knowledge/req-docs/*.md。 - MD/文本输入:直接读取。
步骤 2:理解方案与上下文
- 读取技术方案全文,提取:目标、范围、流程、接口/交互、数据、配置、依赖、验收条件。
- 读取项目约定(如 README、
.Knowledge/stock-docs/、架构说明、既有模块)以对齐实现风格。 - 若流程图缺文字说明,先记录缺口,进入步骤 3 一并向用户确认。
步骤 2.5:先输出实现任务列表(必做)
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.
- 2d ago First seen · 148 lines · 0 tokens per session scan A 29a41f40387f
f2s-implement-tech-design is a cursor rule published in the GitHub repository double-coding-lab/Flow2Spec (47 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,595 tokens. 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.