跳到正文
  1. 技能速查
  2. 汇报、复盘、越用越顺
  3. /pstack:show-me-your-work

/pstack:show-me-your-work

自动调用

一句话让 AI 每做一个决定就记一行:做了什么、为什么、证据和结果。

什么时候用
长任务,或者你要离开、让它自己跑的任务。
这样说
/pstack:show-me-your-work 把你昨晚做的事给我讲一遍

用它和不用它

同一件事,直接跟 AI 说,和点名用 /pstack:show-me-your-work,AI 的做法不一样:

直接说用 /pstack:show-me-your-work
用一大段话当证据每个决定记一行 TSV,证据写提交号、PR 或文件位置
自己检查自己做的事请另一家模型审记录,回复末尾列出 Attention
日志写了什么就信什么交差前对照对话记录逐行核对,漏记的补上新行

文档写了什么

原文分 8 节,约 1100 个英文单词,中文译文约 1550 字,读完约 5 分钟。点一节直接跳到全文。

开头开头只有一句:全程只留一份日志。

  1. 1格式一个 TSV 文件,每个决定一行,六列:时间、阶段、决定、原因、证据、结果,附一份示例。
  2. 2记一行用 scripts/log.sh 追加一行,用大白话写,只记分岔、完成、回退这类关键点,新一轮先记 start 行。
  3. 3放在哪日志默认放在工作目录的 decisions.tsv,不进 git,只有审阅者需要时才提交。
  4. 4规则只追加不改写,错的决定用新行盖过,证据优先用已提交脚本跑出来的结果。
  5. 5拿对话记录核对日志交差前读本次对话记录,逐行核对日志和证据,漏记的补上,错的加新行更正。
  6. 6换一个模型来审查这份记录找另一家模型的帮手 AI 审日志和对话记录,回复末尾写 Attention,先写审阅模型名。
  7. 7审查这份记录告诉读者怎么看:从上往下读,顺着证据点开抽查,用 column 在终端排成表格。
  8. 8和别的技能搭配其他技能要留记录时直接引用它,由它定格式,不再重写各列。

看写法亮点读全文

写法亮点

挑了几句原文:每句让 AI 做什么、为什么这样写管用、你写提示词时怎么借来用。

  1. 要证据的位置,不要描述

    Evidence is a pointer, not prose.

    证据是一个指向,不是一段文字。

    让 AI
    每条记录都附一个你能点开核对的提交、文件或截图,而不是一段「我检查过了」。
    为什么管用
    规定了证据长什么样,AI 就没法用一段漂亮话代替证明。
    借来用
    要 AI 交代结论时加一句:「每个结论后面附上文件名和行号,不用解释为什么对。」
  2. 禁止时给出替代做法

    A wrong call gets a new row that supersedes it.

    判断错了,就加一行新的取代它。

    让 AI
    发现之前记错了,它在下面补一行更正,旧的那行原样留着,你能看到它改过主意。
    为什么管用
    光说「不许改历史」,AI 会卡住或偷偷改;告诉它该怎么做,它就有路可走。
    借来用
    禁止一件事时,顺手说替代做法:「不要删旧条目;过时的就在下面加一条『作废,见第 5 条』。」
  3. 把规矩压成一句短对比

    Correct the log, not the story.

    改正日志,不改故事。

    让 AI
    核对时发现不对,它补一行说清实际发生了什么,而不是回头把经过改得好看。
    为什么管用
    「改这个,不改那个」短到一读就记住,长任务做到最后 AI 也不容易忘。
    借来用
    把最要紧的规矩写成一句短对比:「修 bug,不修报错信息。」
  4. 说明「没有」也算答案

    "No flags" is a valid value.

    「No flags」是可以写的值

    让 AI
    审查没发现问题时,它直接写「No flags」,不会为了显得有用硬凑几条。
    为什么管用
    先说清空答案也合格,AI 就不必为了交差去编问题。
    借来用
    让 AI 挑毛病时补一句:「没发现风险就写『没有』,不用凑。」

全文

AI 读到的就是这份 SKILL.md。可以看中文、看原文,或者一段一段对照着看。

descriptionKeep a reviewable decision trail for long-running or unattended work: a TSV log with one row per decision (what, why, evidence, result). Local by default; commit it when a reviewer needs the trail to trust the result. Use for /pstack:show-me-your-work, autonomous or multi-phase runs, or work a human reviews after stepping away.

description为长时间运行或没人看着的工作,留下一份可以审查的决定记录:一个 TSV 日志,每个决定一行(做了什么、为什么、证据、结果)。默认只放在本地;审查的人需要靠这份记录才能信任结果时,就把它提交。用于 /pstack:show-me-your-work、自主运行或分好几个阶段的运行,或者有人离开、回来再审查的工作。

Show me your work

Show me your work(把你做的事摆出来)

Keep one canonical log.

只记一份日志,以它为准。

The format

格式

A single TSV file, one row per decision. Cells stay single-line. Evidence is a pointer, not prose.

一个 TSV 文件,每个决定一行。每一格都只占一行。证据是一个指向,不是一段文字。

Copy references/decision-log-template.tsv (the header row) to start a clean log. Columns:

复制 references/decision-log-template.tsv(就是表头那一行),开始一份干净的日志。各列是:

  • ts. ISO8601 timestamp.
  • phase. The phase or workstream.
  • decision. What was chosen or done, one line.
  • why. The reason in plain words. If a principle drove it, say it plainly, not as a jargon tag.
  • evidence. A link or path that proves it: commit SHA, PR number, file:line, or an artifact, trace, or screenshot path. Never a paragraph.
  • result. The outcome or predicate state: tests green, reverted, pixel-diff 0, INCONCLUSIVE, open.
  • ts. ISO8601 时间戳。
  • phase. 所在的阶段或工作线。
  • decision. 选了什么、做了什么,一行写完。
  • why. 用大白话写的理由。如果是某条原则促成的,就直白地说出来,不要贴一个行话标签。
  • evidence. 能证明它的链接或路径:提交 SHA、PR 编号、file:line,或者一个产出文件、追踪记录或截图的路径。绝不是一段话。
  • result. 结果,或判断条件的状态:tests green、reverted、pixel-diff 0、INCONCLUSIVE、open。

An example, plain-spoken so a reviewer reads it at a glance.

下面是一个例子,写得很口语,审查的人扫一眼就能读懂。

ts	phase	decision	why	evidence	result
2026-05-24T09:02:00Z	frame	counted the work first, about 100 components and roughly 75 hours	wanted to know the size before starting a long run	commit 3a9f1c2	found 5 things to sort out before starting
2026-05-24T09:40:00Z	harness	took screenshots of the old version before changing anything	so we can compare old against new and catch any visual change	scripts/snapshot.sh, baseline/	saved 120 reference screenshots
2026-05-24T11:15:00Z	widget	moved the widget styles over without changing how it looks	keep the change small and the result identical	commit 7c21e0a, pixel-diff 0	looks identical, tests pass
2026-05-24T12:30:00Z	widget	threw out a helper's work because its screenshots were blank	checked the real files instead of trusting its summary	worktree reset	reverted, tightened the instructions for next time
ts	phase	decision	why	evidence	result
2026-05-24T09:02:00Z	frame	counted the work first, about 100 components and roughly 75 hours	wanted to know the size before starting a long run	commit 3a9f1c2	found 5 things to sort out before starting
2026-05-24T09:40:00Z	harness	took screenshots of the old version before changing anything	so we can compare old against new and catch any visual change	scripts/snapshot.sh, baseline/	saved 120 reference screenshots
2026-05-24T11:15:00Z	widget	moved the widget styles over without changing how it looks	keep the change small and the result identical	commit 7c21e0a, pixel-diff 0	looks identical, tests pass
2026-05-24T12:30:00Z	widget	threw out a helper's work because its screenshots were blank	checked the real files instead of trusting its summary	worktree reset	reverted, tightened the instructions for next time

Logging a row

记一行

Write each entry the way you'd tell a teammate what you did. Plain words, concrete actions, no AI speak or abstract jargon (the unslop skill applies to log text too).

每一条都照你跟队友讲自己做了什么的样子来写。大白话,具体的动作,不要 AI 腔,不要抽象的行话(unslop 技能对日志文字同样适用)。

Use the helper scripts/log.sh <logfile> <phase> <decision> <why> <evidence> <result>. It stamps ts, writes the header on first use, strips stray tabs/newlines, and prefixes any cell starting with =, +, -, or @ with a single quote. A bare printf appending a row works too, but mind those same bytes if cells come from generated or user-supplied text.

用辅助脚本 scripts/log.sh <logfile> <phase> <decision> <why> <evidence> <result>。它会自动填上 ts,第一次用时写表头,去掉零散的制表符和换行,并给任何以 =、+、- 或 @ 开头的格子前面加一个单引号。直接用 printf 追加一行也行,但如果格子内容来自生成的文本或用户提供的文本,也要留意这几个字符。

Log decision points and checkpoints, not every action: a fork chosen, a unit completed with its verification result, a pivot or revert with its trigger, a blocker surfaced, a gate fixed. For loop runs, one row per iteration. Skip the trivial and self-evident.

记决定点和检查点,不是每个动作都记:选了哪条岔路,完成了一个单元并附上它的验证结果,转向或回退并附上起因,发现了一个卡住的地方,修好了一道关卡。循环运行时,每一轮一行。琐碎的、不言自明的不记。

A run is one agent conversation, including its later turns and any summary of it. A pickup, a replacement agent, or a new chat starts a new run. When a run adds to a log that already has rows, its first row has phase start, and so does its first row after another run's start row. So a run that comes back to a log in a later turn first reads the log's last rows to see whether another run wrote since. A start row names the ts range of the rows before it that this run did not write, and its evidence names this run, such as its agent id. Use phase start for nothing else.

一次运行,就是一个 AI 的一次对话,包括它后面的轮次,以及对它的任何总结。一次接手、换上来的另一个 AI,或者一个新对话,都开始一次新的运行。一次运行往一份已经有行的日志里追加时,它的第一行的 phase 是 start;在另一次运行的 start 行之后,它的第一行也是这样。所以一次运行在后面的轮次回到日志时,要先读日志的最后几行,看在这期间有没有别的运行写过。start 行写出它前面那些不是本次运行写的行的 ts 范围,它的 evidence 写明本次运行是谁,比如它的 agent id。phase start 不用在别的地方。

Where it lives

放在哪

By default the log is a working artifact, not committed. Keep it at decisions.tsv in the work dir, or .audit/<task-slug>.tsv when several efforts run at once, and leave it out of git.

默认情况下,日志是一个干活时用的文件,不提交。放在工作目录的 decisions.tsv;几项工作同时进行时,放在 .audit/<task-slug>.tsv。不要放进 git。

Commit it only when the work is ambitious enough that a reviewer needs the trail to trust the result.

只有当工作大到审查的人需要这份记录才能信任结果时,才提交它。

Rules

规则

  • Append-only. A wrong call gets a new row that supersedes it. Never edit or delete history.
  • Prefer evidence produced by committed scripts over hand-made one-offs (the encode-lessons-in-structure principle skill).
  • 只追加。判断错了,就加一行新的取代它。绝不编辑或删除历史。
  • 证据优先用已提交的脚本产出的,不用手工做的一次性东西(encode-lessons-in-structure 原则技能)。

Audit the log against the transcript

拿对话记录核对日志

At the end of the run, before handing back, check the log told the truth. Read this run's transcript from the active workspace's session directory: in Cursor, the agent-transcripts/ directory the system prompt names. In Claude Code, ~/.claude/projects/<slug>/ (the workspace path with every character that isn't a letter or digit turned into "-"). In Pi, ~/.pi/agent/sessions/--<slug>--/. In Codex, the ~/.codex/sessions/ file whose first line has payload.cwd equal to the workspace path. Don't glob across every project's directory. That reads unrelated private chats. Walk this run's rows against what actually happened. Each stretch of them begins at one of this run's start rows, or at the first row if this run created the log, and ends at the next start row of another run:

运行结束、交回之前,检查日志有没有说实话。从当前工作区的会话目录里读这次运行的对话记录:在 Cursor 里,是系统提示里写的 agent-transcripts/ 目录。在 Claude Code 里,是 ~/.claude/projects/<slug>/(工作区路径里每个不是字母或数字的字符都换成「-」)。在 Pi 里,是 ~/.pi/agent/sessions/--<slug>--/。在 Codex 里,是 ~/.codex/sessions/ 下第一行的 payload.cwd 等于工作区路径的那个文件。不要用通配符扫遍所有项目的目录。那会读到无关的私人聊天。把这次运行写的各行和实际发生的事逐条对照。每一段从这次运行的某个 start 行开始(如果日志是这次运行创建的,就从第一行开始),到另一次运行的下一个 start 行结束:

  • Check that every row maps to a real decision or action.
  • Check that each row's evidence resolves and shows what the row claims.
  • A fork, pivot, or abandoned approach that shaped the work but isn't logged is a gap. Add it.
  • 检查每一行都对应一个真实的决定或动作。
  • 检查每一行的证据都能打开,并且确实显示了这一行说的内容。
  • 影响了工作走向、却没记下来的岔路、转向或放弃的做法,就是一个缺口。把它补上。

Correct the log, not the story. The audit never edits or removes a row, even an invented one. When a row records neither a real decision nor a real action, or its claim or evidence is wrong, add a row that supersedes it with what actually happened and a pointer that resolves. This audit does not check rows outside this run's stretches. If this run's own work shows one of them is wrong, supersede it like any wrong call.

改正日志,不改故事。核对时绝不编辑或删除任何一行,哪怕是编出来的一行。如果某一行记的既不是真实的决定,也不是真实的动作,或者它说的内容或证据是错的,就加一行新的取代它,写上实际发生了什么,再附一个能打开的指向。这次核对不检查这次运行那几段以外的行。如果这次运行自己的工作表明其中某一行是错的,就像对待任何判断错误一样,加一行取代它。

Cross-model review of the trail

换一个模型来审查这份记录

Before handing back, spawn a subagent on a different model family from the one that did the work. Self-review is not a substitute. The subagent reads the audit trail and the run's transcript, then flags what the user should pay attention to. Not a redo of the work, a scan for what's suboptimal or risky. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the poteto-mode skill.

交回之前,派一个帮手 AI,用和干活的那个模型不同的模型家族。自己审自己代替不了它。这个帮手 AI 读审查记录和这次运行的对话记录,然后标出用户应该注意的地方。不是把活重做一遍,而是扫一遍有什么不够好或有风险。每个帮手 AI 的推理强度、用快速还是标准速度,按任务来选,参照 poteto-mode 技能的 Subagents 一节。

  • Decisions logged with weak or absent evidence.
  • Verification steps skipped or claimed without proof in the transcript.
  • Choices that look risky in hindsight (premature, scope-creeping, papering over a symptom).
  • Gaps the user would otherwise miss on a casual skim.
  • 证据薄弱或没有证据的决定。
  • 跳过了的验证步骤,或者声称做了、但对话记录里找不到证明的验证。
  • 事后看有风险的选择(太早、范围越扩越大、只掩盖了表面症状)。
  • 用户随便扫一眼就会漏掉的缺口。

Every reply for a run that produced a trail ends with an "Attention" section. Lead with the reviewer's model on its own line (reviewed by <model>), then list each flag pointing to specific rows or moments. "No flags" is a valid value. The model name is not.

凡是留下了记录的运行,每条回复都以一个「Attention」小节结尾。先单独一行写审查者的模型(reviewed by <model>),再列出每一处标记,指向具体的行或时刻。「No flags」是可以写的值,模型名却不能这样省掉。

Reviewing the trail

审查这份记录

Read top to bottom, follow the evidence pointers, spot-check. GitHub renders a committed TSV as a table. column -s$'\t' -t decisions.tsv renders it in a terminal.

从上读到下,顺着证据的指向去看,抽查。GitHub 会把提交的 TSV 显示成表格。column -s$'\t' -t decisions.tsv 能在终端里把它显示成表格。

Composing this skill

和别的技能搭配

Other skills route their audit trail here instead of inventing one. Reference it by name and let it own the format. Don't restate the columns.

别的技能把它们的审查记录交给这里,不自己另搞一套。按名字引用它,让它来管格式。不要把各列再写一遍。

原文作者 Lauren Tan(poteto),MIT 许可。译文由本站翻译,核对到 pstack 镜像 97de40d。 在 GitHub 上看

本站是 pstack 的非官方入门教程,不是官方文档;pstack 由 poteto 开发,命令和行为以官方仓库为准。教程原始源码见 GitHub。

由 airali部署,基于小小东的 MIT 授权教程改编。