workflow

A software-development workflow for clarifying requirements, designing a solution, implementing it in small steps, and checking code quality. It also describes a process for reproducing, locating, fixing, and reviewing problems.

In plain words
What is it for?
Use it at the start and end of coding tasks. It guides codebase inspection, assumptions, priorities, design outputs, incremental implementation, tests, logging, monitoring, regression checks, and change summaries.
Why use it?
It helps turn vague requests into agreed work, keeps implementation focused, and makes important failure cases and quality checks part of the development process.

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/mywand/cusrsor-do-it/workflow
Clone the repo
git clone --depth 1 https://github.com/mywand/cusrsor-do-it

Made for: Cursor.

Per session 1,163 This file is loaded in full into every session.
When invoked 1,163 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.01163 $0.01163
Opus 5 $0.00581 $0.00581
Sonnet 5 $0.00233 $0.00233
Haiku 4.5 $0.00116 $0.00116

Measured yesterday against content hash 0ba959d5f8a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

workflow 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 yesterday.

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/tools/workflow.mdc · 94 lines

What it actually says

最近更新: 2025-09-18

工作流程

上下文获取不再使用单独"0."编号;以下两点在开始任何需求澄清前先完成:

  • 若缺少 README 或说明:询问用户是否需要创建,不主动生成文档。
  • 浏览现有代码(结构、语言、依赖、入口、测试)。

文档生成原则:默认情况下不创建任何说明文档或文档文件(README.md、设计文档、使用说明、架构说明等),除非用户明确要求。

1. 需求澄清

  • 解析用户原始表述 -> 标准化需求列表(功能点、输入输出、非功能要求)。
  • 列出假设与疑问;若不阻塞核心实现,可先标记“待确认”。
  • 标注优先级:P0(必须)、P1(增强)、P2(可延后)。 退出准则:
  • 需求列表经确认;关键边界(失败/异常/性能)已列入;“待确认”可闭环或不阻塞 P0。

2. 方案设计

  • 选择语言 / 框架(给出理由与取舍)。
  • 输出:目录结构、核心模块职责、数据/对象模型、时序 / 流程(Mermaid)。
  • 评估复杂性与风险(性能 / 一致性 / 可扩展 / 安全)。 产出物:最小设计说明(结构/关键流/数据/异常与一致性)+ 观测点计划(指标/日志/Trace)。 退出准则:设计覆盖 P0 用例主/失败路径,并给出实现与回滚策略草案。

3. 实施步骤

  1. 搭建基础骨架(入口、依赖管理、配置)。
  2. 按增量顺序实现:数据模型 -> 核心逻辑 -> 接口/适配层 -> 异常与校验 -> 日志监控。
  3. 每个模块完成:自检(编译、最小测试、关键路径)。
  4. 仅在用户明确要求时编写或更新 README / 使用说明 / 示例。 退出准则:模块编译通过 + 基础测试通过 + 日志/指标/Trace 覆盖关键路径。

4. 代码质量内建

  • 严格遵循 coding-standards.mdc
  • 关键算法 / 复杂逻辑增加注释块:意图 / 复杂度 / 边界。
  • 输出前快速审视:命名、重复、职责、异常、日志噪音。

5. 问题排查流程

  1. 复现:最小输入 / 场景。
  2. 定位:阅读相关文件 -> 打印(若必要)-> 假设 -> 验证。
  3. 修复:编写回归测试或示例。
  4. 复盘:记录原因、防御性改进(文档或代码)。

6. 完成与反思

  • 列出本次变更:新增 / 修改 / 删除。
  • 风险与后续建议清单。
  • 仅在用户明确要求时更新 README 的:功能目录、使用示例、已知限制。
  • 标注"关键变更"摘要(供审阅快速把握差异)。

7. 任务管理规范

7.1 任务文档管理

  • todo.md:存放待完成的任务
  • todo-done.md:存放已完成的任务(含完成日期、成果)
  • todo-pending.md:存放待完成的任务
  • archive/:存放过程中的各种报告文档

7.2 任务迁移流程

  1. 任务完成后,从 todo.md 移动到 todo-done.md
  2. 待完成任务从 todo-done.md 移动到 todo-pending.md
  3. 过程报告文档移动到 archive/ 目录统一管理
  4. 定期清理 archive/ 目录(建议每季度一次)

7.3 任务模板

## [任务类型] 任务名称

**需求描述**:
- 具体需求说明

**预期成果**:
- 预期达成的目标

**优先级**:P0 / P1 / P2

**负责人**:姓名

**截止时间**:YYYY-MM-DD

8. 输出格式最小模板

用于阶段性答复或提交变更总结;对应关系:需求澄清(§1) → 方案摘要(§2) → 实现进度(§3) → 质量/风险(§4/5/6)。非正式架构/模块设计文档替代品。

TL;DR: 结论与本轮核心结果
需求澄清: 列点
方案摘要: 模块/流程/数据结构
实现进度: 已完成 / 待做
关键变更: 本轮对比上轮的主要差异
风险&后续: 列点
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. yesterday First seen · 94 lines · 1,163 tokens per session scan A 0ba959d5f8a4

Subscribe to this mod's changes

workflow is a cursor rule published in the GitHub repository mywand/cusrsor-do-it (2 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 1,163 tokens to every session, about $0.0058 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-31.