f2s-task

A rule for tracking code changes in .task files when the project's flow2spec configuration enables tracking for a relevant type of work.

In plain words
What is it for?
Use it during tracked feature, fix, or implementation changes to resolve the task folder, maintain the task index, and continue unfinished work safely.
Why use it?
It keeps implementation tasks organized across sessions and developers, while preventing work from being mixed between task owners.

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

Made for: Cursor.

Per session 5,259 This file is loaded in full into every session.
When invoked 5,259 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.05259 $0.05259
Opus 5 $0.02629 $0.02629
Sonnet 5 $0.01052 $0.01052
Haiku 4.5 $0.00526 $0.00526

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

Security

Grade A, and why

f2s-task 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-task.mdc · 308 lines

How it starts

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

f2s-task(变更追踪规则)

生效条件

各技能按自身子项判断:

  • f2s-kb-feat:读 changeTracking.feat
  • f2s-kb-fix:读 changeTracking.fix
  • f2s-implement-tech-design:读 changeTracking.implement

若对应子项为 false 或字段不存在,该技能内的变更追踪步骤不执行,直接跳过。

f2s-req-plan 命令不受此条件约束,始终执行(见 skills/f2s-req-plan/SKILL.md)。

多人协作与任务根 TASK_ROOT(必须先解析)

进入本规则任何「读/写 .task」步骤前,必须 Read("flow2spec.config.json"),并解析 TASK_ROOT(本会话内固定,禁止中途改 id):

条件 TASK_ROOT developerId 来源
collaboration.enabled === false .task legacy(强制单人根)
collaboration.developerId 非空(trim 后) .task/<sanitize(id)> config
否则能读到 git config user.email .task/<sanitize(email@前)> git-email
否则能读到 git config user.name .task/<sanitize(name)> git-name
仍无 .task legacy(单人旧布局;须在回复中提示:建议配置 collaboration.developerId

sanitize:小写;若含 @ 只取本地部分;非 [a-z0-9] 收成 -;去首尾 -;长度 1–64,否则视为无 id。

路径一律用 TASK_ROOT 前缀(下面凡写 TASK_ROOT/... 均指解析结果):

  • 索引:TASK_ROOT/todo.json
  • 进行中:TASK_ROOT/active/<task-name>/
  • 已完成:TASK_ROOT/completed/<YYYYMMDD>-<task-name>/

防串戏(硬约束)

  1. 读写当前会话的 TASK_ROOT禁止为续作/匹配去遍历 .task/*/todo.json 或其他 developer 目录。
  2. keywords 匹配范围 当前 TASK_ROOT/todo.json 内条目。
  3. 创建任务时 todo.jsonfolder 必须写成当前 TASK_ROOT/active/<task-name>/(posix 相对路径)。
  4. 可选在任务开始时向用户回显一行:[task] developerId=<id|legacy> TASK_ROOT=<path>
  5. .Knowledge/ 仍为全员共享;本规则不按人拆分知识库。

实现参考(CLI/工具):包内 lib/developerId.jsresolveDeveloperContext / taskRootFor(与上表同口径)。

f2s-req-plan 调用时的绑定

执行 f2s-req-plan(或续作命中 linkedSkill: "f2s-req-plan")时:

  • 不受 changeTracking.feat / fix / implement 限制,但 必须 按本规则「任务开始 / 执行中 / 中断与会话结束 / 任务完成 / 新会话续作」维护 TASK_ROOT 下任务树;
  • 技能 步骤 0Read 本规则全文(Cursor/Clauderules/f2s-task.*Codex.codex/topics/f2s-task.md);
  • 落盘、打钩、归档、user-todos.md / acceptance.md 格式 以本规则为准;技能正文不得省略 todo.json / user-todos.md / acceptance.md,不得改写归档目录命名(<YYYYMMDD>-<task-name>)。

Read the full file on GitHub · 308 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 · 308 lines · 5,259 tokens per session scan A 7757f5031874

Subscribe to this mod's changes

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