再学 AI
第 53 课 / decision-mapping
历史对照阅读 → 对照 → 问答 → 场景

历史对照:把跨会话决策放进一张地图

这份历史规划技能将问题、状态、阻塞关系和答案存入一份紧凑 Markdown 地图。当前 wayfinder 采用更明确的索引与工单分离。

历史文件,不在当前目录

本课使用下方注明的历史提交原文,帮助理解旧文章和旧提示词。请勿据此认定当前版本仍能直接调用该名称。

还不清楚 Skill、Agent、安装和调用?先读 从零开始的6节入门课

在关系图中查看 decision-mapping 与其他技能的关联 →

先把必要的概念讲清楚

这是 wayfinder 之前的一种本地决策地图方法。它把跨会话的未知问题写进一个紧凑文件,按依赖逐个解决;本地共享编辑的限制也需要理解。

下面是老师补充的入门说明;原作者的要求保留在中英对照正文中。所有例子均为帮助理解而构造的教学情境。

frontier|当前可推进的事项集合

任务存在先后依赖时,前置条件已满足、现在能处理的那些事项。先决定是否登录,才能决定收藏记录如何归属用户;配色可能不受这个决定影响,可以先讨论。前沿不是所有未完成事项,更不是凭直觉挑一个开始做。

issue / ticket|问题或任务工单

跟踪一项需求、缺陷、调查或实施任务的记录,通常有标题、正文、状态和引用。issue 和 ticket 在这些文档里经常都指工单,具体含义由上下文决定。工单写着“已完成”只是状态声明,还需要相应证据支持。

prototype|用来回答问题的原型

成本低、范围小、可观察的试验产物,目的在于消除某个未知,例如比较逐段中英对照是否易读。它可以是界面、算法或粗稿。能运行不等于具备生产所需的权限、容错和维护条件;应带走试验所得的决定与证据。

context|Agent 当前可用的上下文

模型这一轮实际能使用的请求、对话、指令和已读文件内容。它不是电脑上所有资料,也不是永久记忆。文件存在但没被读到,就不一定参与推理。交接文档应指明当前目标、进度、关键证据位置和下一步,让新会话能够恢复必要背景。

context pointer|上下文资料指引

告诉 Agent 在什么条件下去读哪份材料的短指引。例如“新增或修改数据写入时,先读权限规则文档”。它同时承担地址与触发条件两项作用。只有“见文档”太模糊,可能找不到或不知道何时需要;一股脑放入所有内容又会占用上下文。

state machine|状态与允许的转换

列出对象可能处于哪些状态,以及什么事件允许它从一个状态变为另一个。例如工单从待澄清到可执行,再到实施中,最后验收完成。不能仅因为“写完代码”就跨过验收。状态机让进度含义明确,而不仅是漂亮的标签。

读原文,理解每一步为什么这样做

左右内容按小节对应;窄屏先中文、后英文。两种语言均完整展示,对应讲解紧接在小节之后。译文传达原文要求;老师讲解补充概念、原因、例子与适用边界。

译注

100K token 是原文的任务规模假设,不代表当前工具保证的上下文容量。

中文译文English · 英文原文
中文译文
name: decision-mapping
description: "把模糊想法转为有先后顺序的调查工单地图,再逐个推动解决。"
disable-model-invocation: true
English · 英文原文
name: decision-mapping
description: Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.
disable-model-invocation: true
中文译文

当一个模糊想法需要多个 Agent 会话才能形成计划时,使用本技能。它创建一份保存状态的 Markdown 决策地图,再逐张解决问题。解决方式可能是原型、研究或追问。该方法不限定软件工程,也可用于课程内容或具有相同结构的规划。

English · 英文原文

This skill is invoked when a loose idea requires more than one agent session to turn into a plan. It creates a stateful decision map in a markdown file, and drives the user through a sequence of tickets to resolve the open questions - which may require either prototyping, research or grilling. The map is domain-agnostic: it plans engineering work, course content, or anything else that fits the same shape.

中文译文

决策地图

每项规划对应一份紧凑 Markdown 文件,和项目一起用 Git 保存。每次会话都会载入整张地图,因此必须保持紧凑。工单产生的材料通过链接引用,不复制进地图。

English · 英文原文

The Decision Map

The decision map is a single compact Markdown file, one per planning effort, git-tracked alongside the project. It is the canonical artifact — the whole map is loaded as context into every session, so it must stay compact.

Assets created during tickets should be linked to from the map, not duplicated within it.

老师讲解 · 对应上方原文 · 含教学举例

地图存当前路线,研究产物通过链接保存

每项规划一张 Markdown 地图,每张工单用唯一 slug 标识,Blocked by 指向前置项,Status 表示开放、处理中或已解决。Type 决定用研究、原型、盘问还是实际操作。

例如先决定是否保存学习回答,再讨论保存多久,后者被前者阻塞。地图整体进入每次会话,因此应紧凑;研究全文放其他产物,用链接引用。

100K token 是作者当时对单任务规模的假设,不是当前工具对每次会话的保证,更不是要求必须把任务写到那么大。

中文译文
结构

每个条目是一张决策工单,用简短、唯一的小写连字符标识作为标题,例如 relational-db、auth-strategy、cache-layer。

## relational-db:关系型还是非关系型数据库?

Blocked by: <前置标识>, <前置标识>
Status: open | in-progress | resolved
Type: Research | Prototype | Grilling | Task

### Question

<需要回答的问题>

### Answer

<已得到的答案>

slug 是正式标识,依赖和正文引用都用它,冒号后的标题可省略。所有前置条目 resolved 时,当前条目解除阻塞。会话开始工作前,先将它标为 in-progress 并保存,表示已领取,让其他会话跳过。

作者要求每条规模适合一次 100K token 的 Agent 会话。

English · 英文原文
Structure

Entries ("tickets"), each its own section keyed by a short dash-case slug that reads as a mini-title (e.g. relational-db, auth-strategy, cache-layer) — terse enough to stay token-efficient, and unique within the map.

## relational-db: Relational Or Non-Relational Database?

Blocked by: <slug>, <slug>
Status: open | in-progress | resolved
Type: Research | Prototype | Grilling | Task

### Question

<question-here>

### Answer

<answer-here>

The slug is the canonical id, used in every Blocked by edge and prose reference; the title after the colon is optional. A ticket is unblocked when every ticket in its Blocked by list is resolved. A session claims its ticket by setting Status: in-progress and saving the map before any work, so concurrent sessions skip it.

Each ticket must be sized to one 100K token agent session.

中文译文

四类条目

  • Research:阅读外部文档、API 或本地知识库,生成 Markdown 摘要作为资料。需要当前目录之外的知识时使用。
  • Prototype:用粗略但具体的东西帮助判断,可以是提纲、粗稿、起始结构,也可以通过 prototype 技能制作界面或逻辑代码。关键问题是应该是什么样、怎样表现时使用。
  • Grilling:通过对话澄清,使用 grilling 和 domain-modeling。这篇历史规则写明一次问一个问题,也是默认选择。
  • Task:讨论继续之前必须做的实际操作,没有需要研究或决定的部分。例如搬数据、注册服务、开通访问。能自动做就由 Agent 做,否则给人准确清单。完成后记录做了什么,以及后续需要的事实,如凭据所在位置、新网址或数据行数。
English · 英文原文

Ticket Types

There are four types of tickets:

  • Research: Reading documentation, third-party API's, or local resources like knowledge bases. Creates a markdown summary as an asset. Use this when knowledge outside the current working directory is required.
  • Prototype: Raise the fidelity of the discussion by making a cheap, rough, concrete artifact to react to — an outline, a rough take, a stub, or UI/logic code via the /prototype skill. Creates the prototype as an asset. Use this when "how should it look" or "how should it behave" is the key question.
  • Grilling: Conversation with the agent. Uses the /grilling and /domain-modeling skills. Asks one question at a time. The default case.
  • Task: Literal manual work that must be done before the discussion can move forward — nothing to decide, prototype, or research. Moving data from one place to another, signing up for a third-party service, provisioning access. The agent automates it where it can; otherwise it hands the human a precise checklist to do by hand. Resolved when the work is done; the answer records what was done and any resulting facts (credentials location, new URLs, row counts) later tickets depend on.
老师讲解 · 对应上方原文 · 含教学举例

给问题选方法,而不是给方法找问题

Research 获取已有知识;Prototype 让模糊行为可观察;Grilling 澄清人的目标与决定;Task 完成现实前置动作。类型不同,完成证据也不同。

例如“界面左右并列是否好读”靠原型反馈;“某接口是否支持某字段”靠可靠资料;“是否公开个人笔记”由人决定;“取得服务访问权限”需要实际操作。

一个工单应围绕一项可解决的问题。问题仍复杂得需要多次会话时,应进一步缩小范围,而不是让地图变成一个大任务的别名。

决策工单问“怎么选”,实现工单说“做出什么”

假设你准备做 AI 导师网站,但还不知道课程资料是否允许使用、学生是否需要登录、AI 讲解该怎样呈现。这时直接分派“写后端、做前端”,还没有解决真正的未知。

资料许可可能需要研究或询问知情人;讲解呈现可能需要原型;是否要求登录需要与你讨论;取得测试账号则可能是一项实际操作。四类条目选择不同方法获得答案。

每个答案会打开后续问题,所以不必一开始凭空画完整地图。地图提供当前状态和资料入口,详细研究另存并引用。

领取标记不等于可靠的并发锁。 原文先写 in-progress,让其他会话知道有人在做;但若两个进程同时读到旧状态,仍可能冲突。实际多人并行还需使用环境支持的协作机制。

这篇历史文档要求一次问一个问题、单会话一张条目,并给出 100K 规模。当前 grilling 的轮次规则和其他模型能力可能不同,学习时按版本看待,不把这些数字当成普遍上限。

中文译文

尚未清楚的部分

地图刻意不把未来都填满。先调查当前前提已满足的条目,解决后再看到下一层问题,直到通往目标的路径清楚,没有剩余问题。

English · 英文原文

Fog of war

The map is deliberately incomplete beyond the frontier. Your job is to investigate the frontier, and to resolve tickets in order to push the frontier forward. Push back the fog of war, one node at a time — until the path to the finish line is clear and no tickets remain.

中文译文

如何调用

分为创建地图与继续地图两种。每次都以交接结束,一次会话不解决超过一张工单。

English · 英文原文

Invocation

Two branches. Either way, every session ends with a Handoff — never resolve more than one ticket per session.

中文译文
创建地图

用户给出模糊想法后:使用 grilling 和 domain-modeling,一次一个问题,找出尚待决定的事项;写地图,标出当前可探索处,显而易见的小决定可以当场写明;然后交接。创建地图本身就是这一会话的工作,不再顺便解决条目。

English · 英文原文
Create the map

User invokes with a loose idea.

  1. Run a /grilling and /domain-modeling session to surface the open decisions. Ask one question at a time.
  2. Write a new decision map — mostly fog, frontier identified, trivially-decidable entries resolved inline.
  3. Handoff. Map-building is one session's work; do not also resolve tickets.
中文译文
继续已有地图

用户提供地图路径,可以另外指定条目标识;没指定时由 Agent 选择下一项,不把选择推给用户。

  1. 读取整张地图。
  2. 用户点名则采用该项;否则按文档顺序选择首个 open 且前提满足的条目。先标 in-progress 并保存。
  3. 调用所需技能解决,包括 Notes 中指定的技能;不确定采用 grilling 和 domain-modeling。
  4. 把答案写入条目,状态改 resolved。
  5. 补入新发现的问题和准确依赖;已无效的其他条目更新或删除。
  6. 交接。

用户可能并行运行互不阻塞的条目,应预期其他会话也在编辑地图。

English · 英文原文
Work through the map

User invokes with a path to an existing map. A ticket slug is optional — without one, you pick the next decision, not the user.

  1. Load the whole map as context.
  2. Choose the ticket. If the user named one, use it. Otherwise pick the first open ticket in document order that is unblocked. Claim it: set Status: in-progress and save before any work.
  3. Resolve it, invoking skills as needed — including any the ## Notes block names. If in doubt, use /grilling and /domain-modeling.
  4. Record the answer in the ticket's body and set Status: resolved.
  5. Add newly-discovered tickets with correct Blocked by edges. If the decisions made invalidate other parts of the map, update or delete those nodes.
  6. Handoff.

The user may run unblocked tickets in parallel, so expect other agents to be editing the map in their own sessions.

老师讲解 · 对应上方原文 · 含教学举例

领取状态有助于协作,但不等于可靠并发锁

原文要求开始前把工单设为 in-progress 并保存,让其他会话跳过。对于共享 Markdown,两个 Agent 仍可能同时读到旧状态;仅靠文字状态不自动具备数据库事务式的互斥能力。

教师补充建议是遵守实际项目的单写者或协调机制。不能看到“已领取”就假定并发覆盖已经不可能。

解决后记录答案、设 resolved、加入新发现的问题并修正依赖。某个答案使其他问题不再需要,应更新地图,而不是继续完成已失去意义的节点。

中文译文

交接方式

每次结束后清理上下文,用一个或多个新会话继续。提供可复制的下一步说明。

还有 open 条目时,列出当前解除阻塞的项目。提供两种命令:一个不指定条目的命令,由 Agent 选择;以及逐项固定条目的命令,供用户在不同窗口并行运行。

例如 auth-strategy、cache-layer、rate-limits 三项已可开始:

调用 /decision-mapping,地图在 <path>。

或在不同新窗口分别使用:

调用 /decision-mapping,地图在 <path>,处理 auth-strategy。
调用 /decision-mapping,地图在 <path>,处理 cache-layer。
调用 /decision-mapping,地图在 <path>,处理 rate-limits。

没有 open 条目时,说明路径已经清楚,地图完成。初次讨论也可能没有未知,因而根本不必建图。建议直接实现小工作,或使用 to-prd 安排多会话实现。

English · 英文原文

Handoff

End every session by clearing the context and opening one or more fresh sessions. Close with a Next steps block the user can copy-paste. Two cases:

Open tickets remain. List the currently-unblocked tickets, then give two copy-paste options: a bare command for one session (you pick the next ticket), and one pinned command per unblocked ticket for running them in parallel. Paste one line per fresh window — opening one, some, or all of them.

Next steps — 3 tickets unblocked: auth-strategy, cache-layer, rate-limits. Clear the context, then open fresh sessions.

One session — resolves the next unblocked ticket:

Invoke /decision-mapping with the map at <path>.

Parallel — paste one line per window, up to all 3:

Invoke /decision-mapping with the map at <path>, ticket auth-strategy.
Invoke /decision-mapping with the map at <path>, ticket cache-layer.
Invoke /decision-mapping with the map at <path>, ticket rate-limits.

No open tickets remain. The fog is pushed back far enough that the path to the finish line is clear — the map is done. (The initial grilling may also surface no fog at all, in which case there was never a map to build.) Recommend implementing directly, or using /to-prd to schedule a multi-session implementation.

老师讲解 · 对应上方原文 · 含教学举例

每会话一个问题,是作者为控制上下文设计的节奏

本版本明确每会话最多解决一个工单,结束后给新会话可复制的接续命令。这样可以让一次调查聚焦,并让新会话只带必要地图与资料。

但它也带来交接成本;小而清楚的任务不一定值得这样拆。学习时区分作者策略与普遍法则,不能把“总要清空上下文”当作所有任务的最优选择。

没有开放问题时,地图结束,下一步是综合实施依据或直接处理确实很小的任务。决策全部解决不代表产品已经开发完成。

中文译文

Notes 区块

可选记录所属领域、每次会话应查阅的技能,以及讨论中形成的长期偏好。

English · 英文原文

Notes

An optional block declaring the domain, any skills every session should consult, and freeform standing preferences the planning surfaces.

原作者:Matt Pocock · 中文翻译为非官方译本

来源:skills/in-progress/decision-mapping/SKILL.md ↗

固定版本:64d9f3d49ec04c30d60e57df39225808c2dbfae3

先作答,再看参考思路

Q1 · 理解

用自己的话说明:它解决什么问题,完成后会留下什么?

请各用一句话回答。若它只做规划或解释,不要把“已开发”“已部署”写成产物。

Q2 · 判断

为什么新版把地图做索引、把答案留在各工单?

我已思考,查看参考思路

这样可按需读取详细内容,减少每次载入全部答案的负担,也减少重复维护;代价是需要可靠链接和检索。

Q3 · 追问

原文中哪条要求在你的环境下可能不成立?

说出具体一句及其前提,例如工具不可用、资料缺失、已有项目约定冲突,或它只是作者偏好。把你的答案带回课堂,我们据此继续讨论。

课堂回传格式:第 53 课 / 我的理解 / Q2 回答 / 仍不理解的原句。这里是阅读教材;实时问答在我们的对话中进行。

把方法放进一个具体情境

教学案例:设计课程时先决定先讲后练,再决定讲义深度,之后才选择实践项目。若每项都塞进同一个长文件,后续会话可能读取大量无关历史。

边界与容易误读的地方

本地标记 in-progress 不是强并发锁。多个会话同时改地图仍可能冲突;“地图已解决”不等于产品已实现。

讨论后再实践:先判断上述情境是否适用,再选择真实任务。现在无需安装、运行命令或修改现有项目。

关联阅读