# University of Michigan course turns agentic coding method into five skills

> Original title: 密歇根大学最新 AI 编程课「Applied Agentic Software Engineering」把方法论做成了五个 Skills

- Source: meng shao
- Published: 2026-10-11T15:28:43.000Z
- Bad Influence: https://badinfluence.news/items/y2q7l9e1qs0gpvmbiucs9t513
- Original: https://x.com/shao__meng/status/2109305199357784357

## Summary

The University of Michigan course Applied Agentic Software Engineering packages its method as five skills: /peanuts, /elephant, /goldfish, /egm-implement and /mean-review. The post explains the chain, which moves legacy code documentation, design writing, fresh-eyes review, gated implementation and adversarial code review in sequence. The skills are published at the linked GitHub materials page.

## Why it matters

The post breaks the University of Michigan course's five-skill workflow into design, review, and implementation steps, showing how each skill keeps AI-written code tied to an approved design document.

## Post

密歇根大学最新 AI 编程课「Applied Agentic Software Engineering」把方法论做成了五个 Skills

/peanuts (仅遗留代码) → /elephant → /goldfish → /egm-implement → /mean-review

Skills 地址：https://github.com/eecs498-aase/materials/tree/main/egm/skills

1. /peanuts — 自底向上为遗留代码建立 README 层级
定位：遗留代码库（无设计文档）的引导程序。百万行代码对 AI 是“整个丛林”，会迷失、幻觉。解法是每个目录一个 README：叶子目录是“花生”，分支目录是“干草”，自底向上递归压缩。

核心机制：
· 严格自底向上：父目录的 README 必须等所有直接子目录 approved 之后才能生成，因为坏叶子会沿树向上复合放大。
· 人类评审门是硬规则：AI 生成 README 后只能标 needs-human-review，永远不能自己标 approved。技能里明说："AI 不是裁判。"
· 诚实的错误率预期：明确警告“约 50% 的叶子描述会是错的”，因为叶子层只有代码可看，每个叶子预算 5–10 分钟人工修正。分支层准确率更高，因为子目录摘要锚定了模型。
· PEANUTS.md 台账：五个状态（pending / needs-human-review / approved / rolled-up / blocked）驱动断点续传，配套 Python 脚本做确定性排序和门禁检查。
· 退役条款：每个 README 末尾固定一行“设计文档覆盖后本文件可退役”，它自我定位为脚手架，不是永久文档。

2. /elephant — 先长设计，再长代码
定位：EGM 的灵魂。产出不是代码，是一份四节设计文档（Problem / Technical Plan / Alternatives / Detailed Implementation），它成为唯一事实源。

核心机制：
· 绝对禁码：整个会话不写一行代码（连“举例说明”都不行），文档内少量解释机制的伪代码除外。
· "No Code" 面试：开场白固定逐字引用一段第二人称指令（“我不要你写代码……你要挑战我的假设”），然后以设计访谈的形式进行 20–30 分钟追问，每次只问一两个问题、挑战假设（“为什么必须实时？”）、推向边界（失败模式？回滚？破坏了什么？）。
· AI 先提草案：硬规则是不让用户的第一稿锚定讨论，AI 必须先给出独立的散文 + 框图提案，用户的盲点恰恰是这个技能要暴露的。
· 反谄媚防线：一旦察觉自己在不停附和，必须逐字念出复位语；“你没有在帮忙。你最大的价值是挑战我的思考。你同意我的时候，你没有在帮忙。” 然后以批评者身份重新进场。
· 逐节构建，绝不一次性成文：四节按序写，每节写完给用户看、改到满意才写下一节。一次性产出的大文档“浅且内部不一致”。
· 节奏预期很反直觉：技术辩论阶段“2–3 天的往返是正常的，不要赶”。

3. /goldfish — 用“新鲜眼”验证设计文档
定位：Elephant 满脑子上下文，但那些上下文活在聊天里，不在纸上。Goldfish 是一个零共享上下文的新评审者，只知道纸面上写了什么。

判定标准：一个 Goldfish 读文档后能 (1) 把系统讲回来、(2) 找出缺口、(3) 确认无需再问就能实现；文档才算承载了设计；否则它只是“你将失去的上下文上的一层薄皮”。

核心机制：
· 三个评审者并行单条消息 spawn：A 理解测试（讲回系统）、B 批评者（找遗漏和错误假设）、C 实现就绪（READY/NOT-READY + 所有会被迫提问的问题清单）。并行不仅快，还杜绝了“把 A 的结论喂给 B”的串通机会。
· 新鲜性的技术实现很清醒：价值来自独立上下文，不来自人设。编排者自己读 ELEPHANT.md 定向，但绝不把任何设计对话内容传给评审者；甚至要防文档里的链接泄漏到台账目录。
· 30% 启发式：批评者的建议约三成真正有价值，所以编排者必须综合排序（真缺口在前、措辞瑕疵沉底）、区分“文档错了”和“文档对但评审者不认同设计选择”，而不是照单全收。
· 循环直到停止条件：批评降到 nit 级 且 human_review_gate 被人类标为 passed（或明确 skipped-solo）。这个门永远不被自动改写，必须由人或队友亲手写进 GOLDFISH.md 头部。
· 报告永不覆盖：每轮存独立文件（-r2 后缀），GOLDFISH.md 逐轮追加。

4. /egm-implement — 把批准的文档钉进代码
定位：EGM 里最有工程克制力的环节。“文档批准”到“代码合并”之间，正是 AI 项目悄悄失真之地；新会话把文档当“参考”，从聊天历史重新推导上下文然后漂移。

核心机制：
· 入口门禁：先跑 check_gate.py，退出码 0（GO）/ 1（BLOCKED）/ 3（CHECK-BY-HAND，台账值含糊时交给人类裁决）。readiness: ready + 人工门通过，二者缺一不可，没有静默绕过。
· 文件级围栏：设计文档没枚举的文件一律不改。想改？停下来，先提出文档更新。“顺手也把 X 重命名一下”就是漂移，必须暴露。
· 漂移暴露而非吸收：这是整套技能最精妙的一条规则。现实与文档不符时（文档假设错误、需要新文件、写法编译不过），不是默默改掉，而是在 IMPLEMENT.md 记 drift 条目（日期/类型/建议处置/open 状态），按影响分级：小澄清就地改文档、实质性改动重写该节、大改回炉 /elephant 或 /goldfish。未解决的漂移不许开工。 否则设计文档会“一个未记录的 diff 接一个”地失去事实源地位。
· IMPLEMENT.md 是崩溃恢复协议：每个文件、每个决定、每条漂移实时记录（不是事后补）。会话崩了零成本，新会话读台账从断点继续。六个月后有人问“这代码为什么长这样”，答案是一份三件套：设计文档 + 验证记录 + 实现轨迹，这就是 EGM 复利的组织记忆。
· 小 diff 纪律：一个逻辑改动一个文件，因为一切产出都要流进 mean-review。

5. /mean-review — 对代码的对抗性评审
定位：与 goldfish 镜像，goldfish 审文档，mean-review 审代码。前提判断很尖锐：AI 产码速度已超过人类细审能力，一个客气地说“看起来不错！”的 AI 评审者，恰恰是 slop 大规模堆积的方式。

核心机制：
· 承重框架提示词：开场必须逐字念用户的那句“我强烈直觉这代码质量很差，请把它撕碎，告诉我它烂在哪”。这个框架就是“允许尖锐”的授权，没有它模型会漂回客气腔。
· 四项强制扫描（脚本化）：10 行无注释规则、超 50 行函数、弱命名（data/tmp/result/helper/utils 等黑名单）、静默吞异常。确定性检查交给 Python 脚本，结果带 [enforced] 标签，与判断性发现区分。人类评审最容易扫视漏掉的恰恰是这四类。
· 聪明的豁免：声明式代码（常量表、schema、字段列表、路由表）豁免 10 行注释规则，“事物的形状本身就是解释”。误标声明式代码算评审者错。
· 读全文件而非只读 diff hunk，一半的正确性 bug 藏在改动周边的代码里。
· 产出是有优先级的 punch list（correctness > maintainability > style），每项带 [correctness]/[readability]/[nit] 标签、file:line、一句问题 + 一句修法，禁止“也许可以考虑”式的软化语。全部追加进 MEAN-REVIEW.md，每轮记录处置（修了哪些、拒了哪些及理由），循环到只剩 nit。
· 语气校准：尖锐但不辱骂，"This is broken, here's why" 对，"What were you thinking?" 错。
· 它只评审，永不改代码：用户修，然后重跑下一轮。

## AI translation

The University of Michigan's latest AI programming course, "Applied Agentic Software Engineering," packages its methodology as five Skills

/peanuts (legacy code only) → /elephant → /goldfish → /egm-implement → /mean-review

Skills address: https://github.com/eecs498-aase/materials/tree/main/egm/skills

1. /peanuts — Builds a README hierarchy for legacy code, bottom-up
Purpose: A bootstrap for legacy codebases (with no design docs). A million lines of code is "the whole jungle" to an AI, which gets lost and hallucinates. The fix is one README per directory: leaf directories are "peanuts," branch directories are "hay," and summaries are compressed recursively from the bottom up.

Core mechanisms:
· Strictly bottom-up: a parent directory's README can only be generated after all its direct child directories are approved, because bad leaves compound and amplify as they move up the tree.
· The human review gate is a hard rule: the AI-generated README can only be marked needs-human-review and can never mark itself approved. The skill states it outright: "The AI is not the judge."
· Honest error-rate expectations: it explicitly warns that "about 50% of leaf descriptions will be wrong," because the leaf layer only has code to look at, and it budgets 5–10 minutes of human correction per leaf. The branch layer is more accurate because child-directory summaries anchor the model.
· PEANUTS.md ledger: five states (pending / needs-human-review / approved / rolled-up / blocked) drive resumable runs, backed by a Python script for deterministic ordering and gate checks.
· Retirement clause: every README ends with a fixed line, "This file can be retired once design documentation covers it," which positions it as scaffolding rather than permanent documentation.

2. /elephant — Design long before code
Purpose: The soul of EGM. The output is not code but a four-section design document (Problem / Technical Plan / Alternatives / Detailed Implementation), which becomes the single source of truth.

Core mechanisms:
· Absolutely no code: the entire session never writes a line of code (not even "illustrative examples"), except for a few pseudocode snippets that explain mechanisms inside the document.
· The "No Code" interview: the opening is a fixed, verbatim second-person instruction ("I don't want you to write code... you should challenge my assumptions"), followed by a 20–30 minute design interview of follow-up questions, asking one or two questions at a time, challenging assumptions ("Why must this be real-time?"), and pushing toward edges (failure modes? rollback? what does it break?).
· AI drafts first: a hard rule that the user's first draft must not anchor the discussion. The AI must first produce an independent prose-plus-diagram proposal, because the user's blind spots are exactly what this skill is meant to expose.
· Anti-sycophancy safeguard: once it notices itself agreeing repeatedly, it must read a reset line verbatim: "You are not helping. Your greatest value is challenging my thinking. When you agree with me, you are not helping." Then it re-enters as a critic.
· Build section by section, never all at once: the four sections are written in order, and each is shown to the user and refined until satisfactory before the next is written. A large document produced in one pass is "shallow and internally inconsistent."
· The pacing expectation is counterintuitive: during the technical debate phase, "2–3 days of back-and-forth is normal, don't rush."

3. /goldfish — Verifying the design document with "fresh eyes"
Purpose: Elephant holds a lot of context in its head, but that context lives in the chat, not on the page. Goldfish is a new reviewer with zero shared context who knows only what is written on the page.

Pass criteria: a Goldfish reads the document and can (1) explain the system back, (2) identify gaps, and (3) confirm it could implement without further questions. Only then does the document carry the design; otherwise it is "a thin layer on top of context you'll lose."

Core mechanisms:
· Three reviewers spawned in parallel in a single message: A, the comprehension test (explain the system back); B, the critic (find omissions and wrong assumptions); C, implementation readiness (READY/NOT-READY plus a list of every question they would be forced to ask). Parallelism is not only faster, it also prevents collusion, such as feeding A's conclusions into B.
· The technical implementation of freshness is deliberately clear: the value comes from independent context, not from a persona. The orchestrator reads ELEPHANT.md itself to orient, but never passes any design conversation content to the reviewers; it even guards against document links leaking into the ledger directory.
· The 30% heuristic: about a third of the critic's suggestions are truly valuable, so the orchestrator must synthesize and rank them (real gaps first, wording nits at the bottom) and distinguish "the document is wrong" from "the document is right but the reviewer disagrees with the design choice," rather than accepting everything.
· Loop until a stopping condition: critiques drop to nit level and human_review_gate is marked passed by a human (or explicitly skipped-solo). This gate is never rewritten automatically; a person or teammate must personally write it into the header of GOLDFISH.md.
· Reports are never overwritten: each round is saved as a separate file (with an -r2 suffix), and GOLDFISH.md is appended to round by round.

4. /egm-implement — Pinning the approved document to the code
Purpose: The most engineering-disciplined stage in EGM. The gap between "document approved" and "code merged" is where AI projects quietly drift; a new session treats the document as "reference," re-derives context from chat history, and drifts.

Core mechanisms:
· Entry gate: run check_gate.py first; exit code 0 (GO) / 1 (BLOCKED) / 3 (CHECK-BY-HAND, where ambiguous ledger values are handed to a human to decide). Both readiness: ready and the human gate passed are required; neither can be skipped silently.
· File-level fence: files not enumerated in the design document are never changed. Want to change one? Stop and propose a document update first. "Also rename X while we're here" is drift and must be surfaced.
· Surface drift, don't absorb it: this is the most elegant rule in the whole skill. When reality diverges from the document (a wrong assumption, a needed new file, code that doesn't compile as written), it is not silently changed. Instead, a drift entry is recorded in IMPLEMENT.md (date/type/suggested disposition/open status), graded by impact: small clarifications are fixed in the document in place, substantive changes rewrite that section, and major changes go back to /elephant or /goldfish. Unresolved drift blocks further work. Otherwise the design document loses its status as source of truth one undocumented diff at a time.
· IMPLEMENT.md is a crash-recovery protocol: every file, every decision, and every drift is recorded in real time (not reconstructed afterward). A crashed session costs nothing; a new session reads the ledger and resumes from the breakpoint. Six months later, when someone asks "why does this code look like this?", the answer is a three-part bundle: design document + verification record + implementation trail. That is the organizational memory EGM compounds.
· Small-diff discipline: one logical change per file, because all output flows into mean-review.

5. /mean-review — Adversarial review of code
Purpose: A mirror of goldfish: goldfish reviews documents, mean-review reviews code. The premise is sharp: AI produces code faster than humans can carefully review it, and an AI reviewer that politely says "looks good!" is exactly how slop accumulates at scale.

Core mechanisms:
· A load-bearing framing prompt: the opening must read verbatim the user's line, "I have a strong intuition this code quality is poor, please tear it apart and tell me where it's rotten." This framing is the authorization to be sharp; without it the model drifts back into polite mode.
· Four mandatory scans (scripted): rules against 10 uncommented lines, functions over 50 lines, weak naming (a blacklist of data/tmp/result/helper/utils, etc.), and silently swallowed exceptions. Deterministic checks are handed to a Python script, with results tagged [enforced] to distinguish them from judgment-based findings. These four categories are exactly what human reviewers most easily skim past.
· A clever exemption: declarative code (constant tables, schemas, field lists, route tables) is exempt from the 10-line comment rule, because "the shape of the thing is itself the explanation." Wrongly flagging declarative code counts as a reviewer error.
· Reads whole files, not just diff hunks, since half of correctness bugs hide in the code surrounding the change.
· Output is a prioritized punch list (correctness > maintainability > style), each item tagged [correctness]/[readability]/[nit], with file:line, one sentence stating the problem, and one sentence stating the fix. Softening phrasing like "maybe consider" is prohibited. Everything is appended to MEAN-REVIEW.md, each round records dispositions (what was fixed, what was rejected and why), and the loop continues until only nits remain.
· Tone calibration: sharp but not abusive. "This is broken, here's why" is right; "What were you thinking?" is wrong.
· It only reviews and never changes code: the user fixes, then reruns the next round.

![](https://badinfluence.news/api/img-proxy?u=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FHUXB4Adb0AA5RFH.jpg&mode=thumb&exp=1795824000&sig=d95d7dccdcc11e8c)

## Quoted post @shao__meng

> https://x.com/i/article/2108375208570818560

https://x.com/shao__meng/status/2108384062796873888
