HN 展示:规范优先的智能体开发插件与证明
Show HN: Specification First Agentic Development Plugin and Prove

原始链接: https://spec-first.dev/

一个仅运行于浏览器的 TypeScript 待办应用,按规范优先工作流依据规范构建。它支持添加待办、标记完成,以及筛选未完成/已完成项,并通过 localStorage 持久化。规范 (2026-10-27-7b2d) 在独立分支上创建,经评审(拖拽排序被砍掉、新增空标题校验)后,以 store、列表组件和测试的形式落地。全部 9 个测试通过,一项决策(选用 localStorage 而非 IndexedDB)被记录,功能已提交并作为 PR #12 开启,应用运行于 localhost:5173。

Hacker News 上关于一个 Show HN“规范优先的智能体开发”工具的讨论帖。作者表示他们从1000多个规格说明生成了约50万行代码,未手写代码,并得出结论:编码已基本被解决,而架构、设计和测试仍然关键;他们使用1万个测试和提交钩子。一位评论者开玩笑说,足够精确的规格说明本质上就是代码。另一位评论者认为规范优先常常失败,因为需求会变化,更倾向用快速原型作为规格说明。作者回应说规格说明存放在git中,可以演进,而智能体可以检查先前的工作。另一位评论者警告规格说明必须可执行且不能由智能体编辑,以避免非确定性;作者说智能体在review、validation、delivery和quality gates下创建和维护规格说明。
相关文章

原文

I want a small todo app. Add todos, tick them off, filter open and done. Browser only, no backend.

Read .spec-first/memory/MEMORY.md

Read src/main.ts

It's an empty Vite starter, and I'll use TypeScript and Vitest as you prefer. Should todos survive a reload?

Yes, localStorage is fine.

/spec-first:create-spec

Write 2026-10-27-7b2d-todos-first-version.yaml

Here is the spec. Shall I put it on its own branch?

Looks right, go.

Bash git worktree add -b spec/2026-10-27-7b2d …

Spec 2026-10-27-7b2d is on its own branch: 3 steps, 3 done criteria.

/spec-first:review-spec

Bash check-evidence.py evidence resolves: 1 spec

Agent Review spec 2026-10-27-7b2d fresh context

Edit 2026-10-27-7b2d-todos-first-version.yaml

BUILD WITH CUTS. Drag to reorder is out, a check for empty titles is in. Both applied.

/spec-first:apply-spec

Plan: the store first, then the list, then the tests. Go?

Go.

Write src/todos.ts

Write src/TodoList.ts

Write src/todos.test.ts

Bash npm test 9 passed

Write .spec-first/decisions/2026-10-27-7b2d.yaml

Built and tested. One decision on record: localStorage over IndexedDB, because a few hundred todos fit easily.

/spec-first:deliver-spec

Bash git commit -m "feat: a first todo app (2026-10-27-7b2d)" gate: build, test passed

Bash gh pr create #12

Bash npm run dev localhost:5173

The gate passed and pull request #12 is open. The app runs on localhost:5173.

联系我们 contact @ memedata.com