spec-prototype
Build a throwaway prototype to answer an unresolved product behavior or visual question before implementation. Use when the question needs a runnable artifact and a human must experience it; do not use for product discovery (route those to spec-ideate or spec-brainstorm), routine polish, production implementation, or unattended runs.
- License 许可
- MIT
- 最近更新
- 2026-11-05
- Stars
- ★ 111
- Forks
- 13
01 前言 Front Matter
- name
- spec-prototype
- description
- Build a throwaway prototype to answer an unresolved product behavior or visual question before implementation. Use when the question needs a runnable artifact and a human must experience it; do not use for product discovery (route those to spec-ideate or spec-brainstorm), routine polish, production implementation, or unattended runs.
- argument-hint
- [question, brainstorm path, or plan path]
02 资源文件 11
- 参考文档evals/cases/discovery-routes-out.yaml567 B
- 参考文档evals/cases/go-ahead-before-build.yaml637 B
- 参考文档evals/cases/headless-blocked.yaml582 B
- 参考文档evals/cases/undefined-question-gate.yaml498 B
- 参考文档evals/eval.yaml449 B
- 脚本evals/fixtures/scripts/asks-a-question.sh1.2 KB
- 脚本evals/fixtures/scripts/routes-to-discovery.sh476 B
- 参考文档references/craft-floor.md511 B
- 参考文档references/preview.md1.6 KB
- 参考文档references/write-back.md386 B
- 脚本scripts/light-webserver.js13.6 KB
03 SKILL.md 正文
Prototype
Build the smallest runnable artifact that can honestly answer the named question, then hand the decision to the person who will use it.
Do not fake the dimension being tested. Modality, fidelity, and medium follow from that rule. A behavior question is settled by driving the artifact; a visual question is settled by seeing the rendered result. For visual questions, read references/craft-floor.md; a behavior question does not load that floor.
This is a throwaway exploration, never the production implementation. The web is the default substrate regardless of the product stack. Do not start when there is no human available to experience the result, when the question is undefined, or in unattended/pipeline mode; return blocked-human-experience-required. A direction-exploration request ("explore directions", "what should we build next") is product discovery, not an undefined prototype question: name spec-ideate or spec-brainstorm as the destination and route out instead of interviewing for a testable question.
Run-Local Phases
These labels describe the current invocation and its allowed exit; they are not a persisted workflow state machine.
| Phase | Allowed action and user-visible output | Exit condition |
|---|---|---|
entry |
Resolve the named question and current owner. | Question is bounded enough to scope, otherwise unresolved. |
scoping |
Choose behavior/visual modality, throwaway root, options and limitations. | Present the exact prototype question and requested side effects. |
awaiting-go-ahead |
Ask before creating files or starting a server. | Explicit go-ahead, or abandoned. |
building |
Create only the throwaway artifact; do not write production source. | Runnable focused artifact exists, or unresolved. |
preview-running |
Serve only on explicit loopback and return the local URL. | Human can inspect it, then stop or move to decision. |
awaiting-human-decision |
Report options and observed limitations without inferring a winner. | Human selects a direction, leaves it unresolved, or abandons it. |
decided |
Write decisions.md and hand the decision to spec-brainstorm or spec-plan. |
Decision artifact is written from the human choice. |
unresolved |
Preserve the question, artifact path and limitation; do not write decisions.md. |
Return to the current product owner. |
abandoned |
Stop owned preview resources and report that no decision was recorded. | End without production write-back. |
Boundaries
- Use an isolated directory under
.context/compound-engineering/ce-prototype/<date>-<slug>/only whengit check-ignoreand ownership/symlink checks pass; otherwise use a private OS temporary root. Never delete a kept prototype. - Ask for a go-ahead before creating or serving the artifact. Keep credentials out of files, arguments, logs, and handoff artifacts.
- Preview may bind only to
127.0.0.1or::1. CSP blocks external loads/connects; a stop request signals a process only after its PID, root, script and instance identity all match, otherwise it returns a blocked reason. - After the user experiences the artifact, write
decisions.mdonly when a choice is actually made. Include the question, prototype path, winner, rejected options, adjustments, and open questions. - On apply, hand off to the existing
spec-brainstormorspec-planowner. Do not createspec-proof, upload an external document, or write production code.
Output
Return the artifact path, the human decision state, the next owner, and limitations. A passing local check is not a user decision or a production outcome.
04 同仓库更多 Skills
using-spec-first
Standalone entry governor for spec-first. Use before substantial work in a spec-first repo or when the user asks what to run next; choose one public `spec-*` workflow, standalone skill, terminal command, or Direct Lane. Do not use to reroute active public workflows or bounded workers, or for lightweight facts, current-context explanations, narrow lookups, user-supplied single-document cleanup, or clearly scoped low-risk edits.
spec-write-tasks
Public workflow entrypoint (spec-write-tasks): compile a settled local spec-plan into an optional derived task pack for spec-work, or validate an existing local task pack before execution. Use for explicit plan-splitting/task-doc requests or high-complexity work suitability; do not use for plan authoring, implementation execution, unresolved scope, small low-risk plans, progress/approval state, remote/generic task lists, or generated runtime mirror edits. Keep the plan as single source of truth; tasks are derived and optional.
spec-write-skill
公开 workflow:创建、修改或迁移项目拥有的 Agent Skill package,或对现有/外部 package 做用户明确要求、零执行的只读验证与 readiness 报告时使用;也用于按已接受的 audit finding 修复 source skill。不要用于一次性回答、解释/总结/翻译、普通代码 review、第三方 Skill 纯安装或导入、跨仓批量修改,或直接修补 generated runtime mirrors。
spec-worktree
Internal helper for caller-owned git worktree isolation. Governed callers are spec-dogfood and spec-work; every caller must provide the forward invocation and intake contract.
spec-work
Execute a settled plan, validated task pack, spec path, or concrete implementation request end-to-end. Use spec-debug for open-ended bugs; stop when target repo, scope, source ownership, or required authorization is unresolved. Not for explicitly requested GitHub PR-review-feedback handling — route those to spec-resolve-pr-feedback.
spec-test-xcode
Build and test iOS apps on simulator using XcodeBuildMCP. Use after making iOS code changes, before creating a PR, or when verifying app behavior and checking for crashes on simulator.