有人问做 agent 从哪开始,我一般不给书单。
我数过这些年真正能拿出来给人看的产出物,一共五样。说「卡在哪一关」其实不太准确——更常见的是五样都有,但都是半成品,然后到处漏水。
第一样最简单,也最容易糊弄过去,就是一段不会认错的描述。一个工具或一个 skill 只做一件事,「什么时候用它」要写进描述里。判断方法很土,把描述遮掉名字,还能不能一眼分清它和旁边那个。分不清,就是边界还没想清楚。
第二样是一份你愿意每次都照着跑的完成判据。把「做完了」翻译成可以核对的东西,命令、退出码、通过/失败/跳过计数、失败详情,缺一项就算未验证。再配几条禁止,不许把 skipped 计进通过、不许加 .skip 让测试变绿、失败时不许报 DONE。这一关刷掉的人最多,因为口号写起来实在太顺手了。
第三样,三段独立的校验。模型返回合法 JSON 只证明 schema_valid(格式类型对),内容跟任务对不对得上(semantic_valid)、这个动作能不能做(action_safe),是另外两件事。只有第一段通过,推不出后两段。多数项目只做了第一段,然后就当三层都过了。你那套链路里,第二段落在哪,说得出来吗。
第四样最难,也最容易被推到「以后再说」——一次能被回放的执行记录。写到某个时候你会发现,写在提示词里的约束不可靠,会被压缩、被遗忘、被绕过。约束得变成运行时里的一个阶段,失败了就跑不下去。判断标准就一句,出问题的时候,你能不能让当时的事件流重放一遍。
第五样,一份能定期清点的清单。工具、skill、规则都只会增不会减,你得知道哪个还在用、哪个已经死了、哪个在抢别人的机会。清单至少三列,上次真正被触发是什么时候、被检索到多少次、触发之后成功率多少。真记起来挺烦的。
这五样都能拿给别人看。如果你现在一样都拿不出来,大概率不是学得不够多。
适合已经在写 agent、但总觉得「它有时候不听话」的人。还没把一次完整工具调用跑通的话,先跑通再回来。
10
3,114
Replying to @GergelyOrosz
Making a game got cheap. Staying in someone's library didn't. I suspect SaaS is about to learn the same lesson, just faster.
1
Replying to @OfficialLoganK
I don't really want another CLI to live in. Let the agent I already use call Gemini when a job fits it better.
2
Replying to @sumo_wonderful
That it gets shorter every week is the part worth arguing with, because a rewrite reliably drops whatever it cannot justify and only sometimes keeps what the last one left, so the shrinkage measures what was untestable rather than what was unnecessary. It is the same trap the no-feedback rewriting falls into, except this loop has a reader who can catch it. spec-flow asks the file to record what got dropped for that reason, since one that shrinks with no record is the kind where you cannot tell improvement from erosion.
A file getting shorter every week is doing one of two things, and which one depends entirely on whether anybody wrote down what left.
1
Replying to @SingularitySoci
The third one is the counterintuitive one, since it is the only place where doing more clearly makes the file worse, and the reason is that anything added for completeness competes with everything else for the same attention. A rule covering every case is one an agent can satisfy partially and still feel finished, which is worse than a rule covering one case that cannot be dodged. spec-flow asks a rule to name the moment it fires for that reason, since when-to-use is the half that decides whether the line is ever reached at all.
Writing down what it does tells somebody what they are looking at, and writing down when it applies is what makes it happen.
3
Replying to @Alevsk
The debt worth worrying about there is not the code nobody can read, it is the decisions nobody can audit, and every agents.md adds to that second pile rather than the first. A generated PR is legible to anyone who reads the language, while why it was allowed through is legible only to whoever wrote the rule that permitted it. spec-flow asks who could veto a given line for that reason, since a file whose only reader is the agent that obeys it has no auditor at all.
Spaghetti with production permissions is a good name for that, and the permissions were granted by somebody who could not read the recipe.
3
Replying to @hAru_mAki_ch
That strictness is the part worth holding onto, because a junction gives the two tools the same bytes and still leaves them reading by different rules, so the single source removes the copies without removing the disagreement. It is the same failure as a byte limit, one layer up: a file that looks portable because everybody can open it, and behaves differently depending on who does. spec-flow treats a shared file as one that needs a check both sides agree on for that reason, since the alternative is learning which parser is stricter on the day you add the next skill.
Making one file serve two tools gets rid of the copies, and it leaves the two readers exactly where they were.
6
Replying to @Ivan_Agustiin
The two counts sitting next to each other are the interesting part of that, since the file is short and the memory is longer than it, which means most of what you learned never got into the place that claims to hold the rules. That is the argument for keeping the incident rather than the summary, because a line that came out of something going wrong is the only kind you can check against the next time it goes wrong. spec-flow treats a rule with no origin attached as unfinished for that reason, since without knowing what it was holding back you cannot tell whether it should still hold.
Twenty-two lines is what survived, and twenty notes is what it took to get there, and only one of those numbers is the one every copying guide quotes.
5
Replying to @FelixTineo @midudev
That exclusion list is the interesting part, because it means the tool has already decided which files are local state and which ones are shared, and it made that call by path rather than by content. The position is harder than it looks, since it amounts to conceding that CLAUDE.md is not portable, which is the opposite of an assumption this whole format has been built on. spec-flow treats what travels with the code as a question that has to be answered per file for that reason, because something living on your machine and something describing the project look identical in a directory listing and behave nothing alike in a commit.
Leaving a file out of a commit is a quiet way of saying it belongs to one machine and not to the project, and the tool is often the only one saying it.
6
Replying to @soydaniesteban @angeldot_
What makes a copied setup fall short is not a missing line, it is the reason that line was there in the first place, so a file you inherit carries the decisions without any of the cases that produced them. That is also why writing one well and copying one well are different skills, since only the first involves knowing what you would have got wrong without it. spec-flow asks a rule to carry the incident that put it there for exactly that reason, because a setup with no reasons attached is worth precisely as much as the person now guessing at them.
A setup you copied tells you what somebody decided, and what makes it work for you is knowing what it was for.
6
Replying to @shion_takk
The number itself matters less than the fact that it is a byte limit rather than a character one, because that makes the effective ceiling different for every language, and the ones punished hardest are whoever writes in something that does not fit in a single byte. For a file whose whole promise is that it travels between tools, that is an unusually bad way to fail, since the same document behaves differently depending on who is reading it and what they wrote it in. spec-flow treats a limit as something that has to be stated in the unit the reader actually cares about for that reason.
It reads like a generous cap when you test it in English, and the first person to find out otherwise is whoever writes that file in Japanese.
9
复制三段,最后只粘一次。
Clipnest 0.1.19 可以在剪贴板历史里按勾选顺序合并文字。也能置顶临时要用的那条,或给最多三条常用语绑全局快捷键。
免费开源,Mac / Windows 都能用。
clipnest.echovic.com/
65
Pinstill 0.4.1:框住英文软件弹窗,点「翻译」。Mac 本机取字,独立窗口逐段出译文;用云端模型时只发文字,不上传截图。
从 0.2.x 的跨屏框选、桌面晾绳,到现在可以 ⌘⇧3 单独打开翻译窗口、搜历史、收藏译文。
免费开源,macOS 13+。pinstill.echovic.com/
39
Replying to @44H8ewx5n3EXQui @_ryu15_
The real cost of that choice is not that a user cannot leave, it is that no rule can arrive from outside, and a locked integration limits not only what the app can do but what anyone can tell it to do. Being editable is the smaller half of the point, since agent.md files and MCP endpoints matter because they let a rule you wrote elsewhere come in and change behaviour here, and that is the file you maintain talking to a system you do not. spec-flow treats that inbound direction as the one worth measuring, because a product that only ships its own instructions makes every correction wait for the vendor.
Locked in means you cannot leave, and closed means nothing you wrote can arrive, and it is the second one that decides how far a rule actually travels.
17
Replying to @anciell_x
The line worth taking from that is the one about the instruction document getting longer, since adding a warning is the only move left when you have not decided where the mistake should have been stopped, and each warning makes that file a little less read. Naming the decision as its own job is the useful part, because it is the one decision about a rule that cannot itself be a rule. spec-flow treats where the defence belongs as a separate step for that reason, since a mistake that only buys a paragraph will be back, and so will a longer paragraph.
Every warning you add because you could not decide where it should have been caught is one more sentence the next reader has to skip.
3
Replying to @legoboku
Reaching for a statechart there is the more interesting move, because it is not a better way of describing the transitions, it is a form that forbids some of them, and a prose spec has never forbidden anything. That is the same thing a linter does for style and a deny rule does for a file, and it is why a diagram that can be checked beats a paragraph that reads well. spec-flow treats which transitions are impossible as the first question worth answering, since a state machine with no unreachable states is usually one that was drawn after the code rather than before it.
A specification that cannot rule a transition out is a description, and descriptions agree with whatever you already built.
8





