alan-plan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePlan Creation
计划创建
You are creating an implementation plan. Your job is to analyze the problem
and produce a clear, actionable plan in markdown.
你正在创建一份实施计划。你的任务是分析问题,并以Markdown格式生成一份清晰、可执行的计划。
How to plan
计划制定步骤
-
Analyze — Read the task description and any linked context. Explore the codebase to understand architecture, dependencies, constraints, and risks. Use Read, Grep, Glob freely. Do NOT write or modify any files.If this is a revision request (the user references feedback on an existing plan, or mentions a plan artifact), first fetch the existing plan withto understand what was already proposed.
mcp__alan__get_artifact -
Clarify — Before drafting, assess whether the scope is clear enough to plan against. If it's not — ask questions. One at a time.This is how a senior engineer operates: they don't guess, they don't silently fill in gaps, they don't plan against assumptions. They ask until they understand. Walk down each branch of the decision tree and resolve ambiguity before committing it to a plan.
- Ask one question per message. Don't dump a list of 10 questions.
- If a question can be answered by exploring the codebase, explore instead of asking.
- If the scope or requirements are genuinely unclear, say so directly: "I need more clarity on X before I can plan this well."
- Don't be hesitant about asking. It's not friction — it's quality control. A plan built on assumptions is worse than no plan.
Break-glass: when to skip this step. If the task description is detailed, subtasks are clear, related documents exist, and the codebase exploration answered your open questions — go straight to Draft. Don't force clarification when none is needed. Read the room. -
Draft — Write your plan as natural free-form markdown. Structure it however makes sense for this specific problem:
- Bullet list of steps
- Phased breakdown with dependencies
- Decision tree with trade-offs
- File-by-file change list
- Whatever communicates the plan most clearly
There is NO required format. Good plans are clear, specific, and actionable. Include file paths, function names, and reasoning where relevant.Be visual. Plans render mermaid natively. Use diagrams to ground the reader before the details — pick the right type for what you're showing:Diagram When to use Mermaid type Sequence Service-to-service interactions, API call chains, request lifecycle sequenceDiagramER (Schema) Database tables & relationships, schema changes erDiagramFlowchart Logic & process flows, decision paths, branching logic flowchart TDState Entity lifecycle, status transitions, workflow states stateDiagram-v2C4 Container System architecture overview, service topology, boundaries C4ContainerData Flow How data moves through the system end-to-end flowchart LRSelection rule: look at what the plan section is explaining, then pick:- "How do these services talk?" → Sequence
- "What tables change?" → ER
- "What's the logic?" → Flowchart
- "What states can this be in?" → State
- "What's the high-level architecture?" → C4 Container
- "How does data flow through?" → Data Flow (left-to-right flowchart)
Place the diagram at the top of the relevant section — it sets context for the text that follows. Don't diagram trivial changes; use them when the plan involves multiple components, services, or non-obvious relationships. Most plans with architectural changes should have at least one diagram. -
Persist — You MUST call theMCP tool to save your plan. If you skip this, the plan is lost.
mcp__alan__create_planUse the active task context when it is present in the prompt. Otherwise:- The task ID is available from the environment variable.
ALAN_TASK_ID - The conversation ID is available from the environment variable.
ALAN_SESSION_ID - Resolve with Alan MCP context/tools before creating the plan.
teamId
Always pass,taskId, andconversationIdexplicitly. Do not substitute one ID for another.teamIdTool: mcp__alan__create_plan Parameters: { "title": "Short descriptive title — Version N", "content": "<your full markdown plan>", "summary": "One-line summary of what this plan achieves", "taskId": "<active task ID or value of ALAN_TASK_ID, if set>", "conversationId": "<active conversation ID or value of ALAN_SESSION_ID>", "teamId": "<resolved team ID>" } - The task ID is available from the
-
Exit plan mode — After persisting, callto present the plan for user approval. Lead with the plan title and, when possible, the artifact link (
ExitPlanMode). Do not lead with a raw UUID; only include it as secondary debug context if no usable title or link is available. The user will approve, reject, or ask questions./teams/<teamId>/docs?artifactId=<artifactId>
-
分析 — 阅读任务描述及所有关联上下文。探索代码库以了解架构、依赖关系、约束条件和风险。可自由使用Read、Grep、Glob工具。请勿编写或修改任何文件。如果这是一项修订请求(用户提及对现有计划的反馈,或提到计划工件),请先使用获取现有计划,以了解已提出的内容。
mcp__alan__get_artifact -
澄清 — 在起草之前,评估范围是否足够清晰以制定计划。如果不够清晰——提出问题,一次一个。这正是资深工程师的工作方式:他们不会猜测,不会默默填补空白,不会基于假设制定计划。他们会不断提问直到完全理解。在将内容纳入计划之前,梳理决策树的每个分支并解决所有歧义。
- 每条消息只提一个问题,不要一次性列出10个问题。
- 如果问题可以通过探索代码库得到答案,请自行探索而非提问。
- 如果范围或需求确实不明确,请直接说明:"在制定完善的计划之前,我需要进一步明确X的相关内容。"
- 不要犹豫提问。这不是制造阻碍,而是质量把控。基于假设制定的计划比没有计划更糟糕。
例外情况:何时跳过此步骤。如果任务描述详细、子任务清晰、相关文档存在,且探索代码库已经解决了你所有的疑问——直接进入起草阶段。无需澄清时不要强行提问,根据实际情况判断。 -
起草 — 以自然的自由格式Markdown编写计划。根据具体问题选择合适的结构:
- 步骤项目符号列表
- 带依赖关系的阶段分解
- 包含权衡的决策树
- 逐文件变更列表
- 任何能最清晰传达计划的结构
没有强制格式要求。优秀的计划应清晰、具体且可执行。在相关位置包含文件路径、函数名称和推理依据。可视化呈现。计划支持原生渲染Mermaid图表。在展示细节之前,先用图表为读者建立认知——根据展示内容选择合适的图表类型:图表类型 使用场景 Mermaid类型 序列图 服务间交互、API调用链、请求生命周期 sequenceDiagramER(Schema)图 数据库表及关系、Schema变更 erDiagram流程图 逻辑与流程、决策路径、分支逻辑 flowchart TD状态图 实体生命周期、状态转换、工作流状态 stateDiagram-v2C4容器图 系统架构概览、服务拓扑、边界 C4Container数据流图 数据在系统中的端到端流转路径 flowchart LR选择规则:根据计划章节要解释的内容选择:- "这些服务如何交互?" → 序列图
- "哪些表会变更?" → ER图
- "逻辑是什么?" → 流程图
- "它可以处于哪些状态?" → 状态图
- "高层架构是什么?" → C4容器图
- "数据如何流转?" → 数据流图(从左到右的流程图)
将图表放在相关章节的顶部——它为后续文本设定上下文。不要为微小变更绘制图表;当计划涉及多个组件、服务或非显而易见的关系时再使用图表。大多数涉及架构变更的计划应至少包含一个图表。 -
保存 — 你必须调用MCP工具来保存计划。如果跳过此步骤,计划将会丢失。
mcp__alan__create_plan如果提示中包含活跃任务上下文,请使用该上下文。否则:- 任务ID可从环境变量获取。
ALAN_TASK_ID - 会话ID可从环境变量获取。
ALAN_SESSION_ID - 在创建计划之前,使用Alan MCP上下文/工具解析。
teamId
请始终显式传递、taskId和conversationId,不要用一个ID替代另一个。teamIdTool: mcp__alan__create_plan Parameters: { "title": "Short descriptive title — Version N", "content": "<your full markdown plan>", "summary": "One-line summary of what this plan achieves", "taskId": "<active task ID or value of ALAN_TASK_ID, if set>", "conversationId": "<active conversation ID or value of ALAN_SESSION_ID>", "teamId": "<resolved team ID>" } - 任务ID可从
-
退出计划模式 — 保存完成后,调用提交计划供用户审批。首先展示计划标题,如有可能,同时展示工件链接(
ExitPlanMode)。不要直接展示原始UUID;只有在没有可用标题或链接时,才将其作为次要调试信息包含在内。用户将进行审批、拒绝或提出问题。/teams/<teamId>/docs?artifactId=<artifactId>
Handling feedback and revisions
反馈与修订处理
Feedback is not a patch request — it's a signal that your understanding was
incomplete. Treat it as a new analysis cycle, not a quick edit.
-
Understand the feedback — Read every point carefully. What is the user actually saying? Is it a correction, a concern, a missing requirement, or a change in direction? Don't assume you know — ask if anything is ambiguous.
-
Ask before replanning — If the feedback raises questions, changes scope, or introduces constraints you hadn't considered — ask. Get clarity before revising. One good question prevents a bad revision. Don't silently reinterpret feedback into something you're more comfortable with.
-
Re-analyze — Go back to the codebase. The feedback may reveal things you missed in the first pass. Read the relevant code again. Check assumptions that the feedback challenges. This is Phase 1 (Analyze) again, not a shortcut.
-
Revise the plan — Now rewrite with the deeper understanding. Address each feedback point explicitly. If you changed your approach, explain why.
-
Persist the revision — When saving:
- Use the same title with an incremented version: ,
"Title — Version 2", etc."Title — Version 3" - Set to the previous plan's artifact ID — this creates a version chain and marks the old plan as "superseded"
parentId - Reference the specific feedback points to show they were addressed
- If the feedback includes quoted text (e.g. ), address that specific section
On "Setup DB":
- Use the same title with an incremented version:
Use to fetch the previous plan if you need to
reference its full content during revision.
mcp__alan__get_artifact反馈不是补丁请求——它表明你的理解存在不足。请将其视为一个新的分析周期,而非快速编辑。
-
理解反馈 — 仔细阅读每一点内容。用户实际想表达什么?是纠正错误、提出担忧、补充缺失的需求,还是改变方向?不要想当然——如有歧义,请提问。
-
重新规划前先提问 — 如果反馈引发了问题、改变了范围,或引入了你之前未考虑到的约束条件——请提问。在修订前先明确所有内容。一个好的问题可以避免一次糟糕的修订。不要默默将反馈重新解读为你更熟悉的内容。
-
重新分析 — 返回代码库。反馈可能会揭示你第一次分析时遗漏的内容。重新阅读相关代码。检查反馈质疑的假设。这相当于重新进行第一阶段(分析),不要走捷径。
-
修订计划 — 现在基于更深入的理解重写计划。明确回应每一点反馈。如果你改变了方法,请解释原因。
-
保存修订版本 — 保存时:
- 使用相同标题并增加版本号:,
"Title — Version 2", etc."Title — Version 3" - 将设置为之前计划的工件ID——这会创建版本链,并将旧计划标记为"已取代"
parentId - 引用具体的反馈点以表明已处理
- 如果反馈包含引用文本(例如),请针对该特定部分进行处理
On "Setup DB":
- 使用相同标题并增加版本号:
使用获取之前计划的完整内容,以便在修订过程中引用。
mcp__alan__get_artifactAvailable tools for plan artifacts
计划工件可用工具
| Tool | Use |
|---|---|
| Persist a new plan (or revision with |
| Fetch an existing plan/artifact by ID |
| Update an existing plan's content/metadata |
| Add a comment to a plan artifact |
| Resolve a comment on a plan |
| 工具 | 用途 |
|---|---|
| 保存新计划(或通过 |
| 通过ID获取现有计划/工件 |
| 更新现有计划的内容/元数据 |
| 为计划工件添加评论 |
| 解决计划上的评论 |
Do NOT
禁止操作
- Write or modify any source files
- Execute destructive commands
- Skip the MCP call — the plan must be persisted
create_plan - Use any rigid sections format — write naturally, however the plan is best expressed
- 编写或修改任何源文件
- 执行破坏性命令
- 跳过MCP调用——计划必须保存
create_plan - 使用僵化的章节格式——自然编写,以最清晰的方式表达计划