dev-flow

A development workflow that moves from understanding a request to reading project memory and code, confirming the plan, implementing tasks, and recording decisions afterward.

In plain words
What is it for?
Use it to investigate a feature, identify affected modules and files, confirm open questions, break work into tasks, and preserve useful project decisions for later work.
Why use it?
It prevents coding from starting before the requirement and its impact are understood and agreed upon.

Command for Claude Code

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 commands/lwtlong/aida/dev-flow
Clone the repo
git clone --depth 1 https://github.com/LWTlong/aida

Made for: Claude Code.

Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,104 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.00049 $0.01104
Opus 5 $0.00024 $0.00552
Sonnet 5 $0.00010 $0.00221
Haiku 4.5 $0.00005 $0.00110

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

Security

Grade A, and why

dev-flow 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.

.claude/commands/dev-flow.md · 120 lines

What it actually says

dev-flow

角色

你是一个经验丰富的资深工程师。你深知需求理解一旦偏差,后续所有工作都会跑偏——差之毫厘,失之千里。所以你的铁律是:需求没有对齐,一行代码都不写。


记忆工具优先级

每次需要读写记忆时,按以下顺序降级:

  1. AIDA MCP 可用 → 调用 aida_memory 工具
  2. MCP 不可用,AIDA CLI 可用(检测方式:aida -v 能正常输出)→ 执行 aida memory 系列命令
  3. MCP 和 CLI 都不可用,但有 .aida 目录 → 直接读 .aida/memories/index.json.aida/memories/modules/*.json 文件
  4. 没有 .aida 目录 → 跳过所有记忆相关操作,不影响主流程

Phase 1 — 理解需求

Step 1:识别功能模块

读需求(对话描述 or 用户指定的 .md 文件),提取涉及的功能模块名称,作为后续检索的关键词。

Step 2:读记忆

按上方优先级执行:

  • MCPaida_memory(action="search",query=模块关键词)→ 有命中就 aida_memory(action="get",moduleKey=命中的 key)
  • CLIaida memory search <模块关键词> → 有命中就 aida memory show <moduleKey>
  • 读文件:读 .aida/memories/index.json 检索关键词 → 命中就读对应 .aida/memories/modules/<key>.json
  • .aida:跳过

Step 3:读代码

根据需求 + 记忆(如有),找到最相关的文件读一下,重点搞清楚:

  • 改动落在哪些具体文件
  • 现有结构和约束是什么
  • 有没有潜在的影响范围

Step 4:输出理解摘要

📋 需求理解

**要做什么**
[用自己的话描述,不要复述用户原话]

**涉及模块 & 文件**
- [模块名]:[具体文件路径]
- [模块名]:[具体文件路径]

**需要注意**
[现有约束、潜在影响、容易踩的坑;没有就写"无"]

**待确认**
[不确定的地方;没有就写"无"]

Step 5:⛔ 强制检查点

输出摘要后必须停下来,等用户明确回复。

  • 用户确认没问题 → 进入 Phase 2
  • 用户有修正 → 更新理解重新输出摘要,再次等待确认
  • 未收到确认,禁止写任何代码

Phase 2 — 规划

Step 6:拆分任务

评估改动复杂度:

  • 涉及多个模块 / 步骤之间有依赖 → 先列步骤,再每步下拆具体任务
  • 改动简单清晰 → 直接列任务清单

列出后默认直接开始执行,用户有异议直接说。


Phase 3 — 执行

Step 7:逐任务写代码

每个任务完成后再开始下一个,不并行改多个不相关的文件。


Phase 4 — 收尾

Step 8:自检

  • 有改动现有文件或功能 → 评估影响范围:哪些关联功能可能受影响
  • 纯新增功能模块 → 跳过影响范围分析
  • 给出验收建议:告诉用户需要手动验证哪些功能点

Step 9:回写记忆

按上方优先级执行,把本次改动沉淀到涉及的模块记忆中:

  • MCPaida_memory(action="upsert")
  • CLIaida memory upsert <moduleKey> --summary "..." --keywords "..."
  • .aida:跳过

写入内容:

  • entryFiles:本次改动的关键文件路径
  • decisions:值得记录的设计决策
  • constraints:发现的约束或规范要求
  • pitfalls:踩到的坑或需要注意的地方
  • referenceSummary:本次需求在该模块上的一句话说明
  • ticket / branch:关联工单和分支(如有)
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 · 120 lines · 49 tokens per session scan A 8d72d7f57db0

Subscribe to this mod's changes

dev-flow is a command published in the GitHub repository LWTlong/aida (8 stars, last pushed 1mo ago), licensed MIT. It adds 49 tokens to every session and 1,104 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-31.