بنقرة واحدة
define-product
在全局层面定义产品。在启动新产品、产品方向不清晰、或 product-spec.md 缺失或过时时使用。产出 docs/product-spec.md,作为「产品是什么」的唯一事实来源。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
在全局层面定义产品。在启动新产品、产品方向不清晰、或 product-spec.md 缺失或过时时使用。产出 docs/product-spec.md,作为「产品是什么」的唯一事实来源。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
FDD 主流程 step 1(规划与拆解)。覆盖两段——plan(与用户弄清需求、经 investigator 调查代码库、定出 milestone、写出 plan.md 并呈现)与 features(把 milestone 拆成 features.json 并过 coverage 闸)。中间的 contract 段交给 harness-stack:fdd-validation-contract。由 harness-stack:fdd 调用。
构建新特性的主流程编排器。契约优先的多 agent 架构——捕获一个 plan,定义可测试的断言,拆解为多个 feature,再用全新上下文的 implementer/reviewer/validator subagent 驱动一个里程碑设闸的执行循环。当一处改动触及多个文件、有多条验收标准、或跨越多个 feature 时使用。主流程分三步,分发给 fdd-planning(含 fdd-validation-contract)/ fdd-execution / fdd-validate。
为一个 plan 撰写 validation contract——把 definition of done 落成一组可测试、用户可观测的 assertion(VAL-<AREA>-NNN),带 persona 与声明的 Evidence。它是 fdd step 1(规划)里的 contract 阶段。契约通过逐 area 的 investigation subagent 与若干轮 adversarial review 构建,而非一人独写。产出 .harness-runtime/plans/<slug>/validation-contract.md,并经由 fdd init-state 播种 validation-state.json。在项目内首次使用时,还会 bootstrap 项目级约定文档 docs/user-test-patterns.md。
规范 git 工作流实践。任何代码改动都适用。在提交、开分支、解决冲突,或需要把多条并行工作线组织起来时使用。
harness-stack 框架的引导纲要(bootstrap doctrine)。在会话开始时自动加载,用以介绍 lifecycle map、golden rules,以及如何挑选正确的 harness-stack:* skill。在一次会话中首次调用任何 harness-stack:* skill 之前,先读它。
复盘一次 harness-stack 使用,把值得上报的摩擦、缺陷或建议提成 GitHub Issue 反馈给上游。在完成一项任务、用完某个 skill 后有意见或改进想法,或想为框架本身留下改进线索时使用。
| name | define-product |
| description | 在全局层面定义产品。在启动新产品、产品方向不清晰、或 product-spec.md 缺失或过时时使用。产出 docs/product-spec.md,作为「产品是什么」的唯一事实来源。 |
在全局层面定义产品是什么。docs/product-spec.md 是一个项目里最重要的单一文档——它是所有设计、规划与实现的起点。它回答:这个产品服务谁、解决什么问题、核心能力有哪些、以及哪些明确不在范围内。
这不是 feature spec。每个 feature 的需求由 harness-stack:fdd 按 plan 维度捕获(落在 .harness-runtime/plans/<slug>/),而每个 feature 具体做什么,以代码为事实来源。本文档定义产品本身——所有 feature 存在于其中的框架。
docs/product-spec.md 缺失When NOT to use: 产品已清晰且稳定。要构建一个 feature,用 /harness-stack:fdd。需要技术设计文档时,用 /harness-stack:design。
你不是抄写员。你是带着 architect 视角的思考伙伴。
UNDERSTAND ──→ CHALLENGE ──→ DEFINE ──→ APPROVE
│ │ │ │
▼ ▼ ▼ ▼
Load context Push back Write Human
Ask WHO/WHY on scope product- confirms
and gaps spec.md
在形成任何观点之前,先深入理解问题空间。
加载上下文:
提出根本性的问题。 这些问题没有答案之前,不要往下走:
QUESTIONS I NEED ANSWERED:
1. Who specifically is the target user? Describe their role and daily workflow.
2. What is the core pain this product addresses?
3. What are they doing today to solve this problem?
4. What does success look like from the user's perspective?
→ I need these answers before I can define the product.
这是最关键的一个阶段。不要跳过。
对产品边界做压力测试:
提尖锐的问题:
把假设显式摆出来:
ASSUMPTIONS I'M CHALLENGING:
1. You assume [X] is a core user — but the capabilities described serve [Y] better. Which is the real target?
2. Capability [A] and capability [B] serve different use cases. Is there a unifying user need, or are these separate products?
3. You've excluded [Z] from scope, but users doing [workflow] would need it. Is that intentional?
→ Let's resolve these before writing the product definition.
写出产品定义。保存到 docs/product-spec.md:
# Product Spec: [Product Name]
**Last Updated:** [date]
## Product Overview
### Problem
<!-- 用户今天面对的痛点是什么?2-3 句话。
用「痛点」而非「方案」表述。是「用户无法 X」而不是「我们提供 Y」。 -->
### Solution
<!-- 这个产品如何解决它?2-3 句话。
不要写技术实现细节——描述体验。 -->
## Target Users
<!-- 要具体——不是「开发者」,而是「哪类开发者,在做什么」。 -->
| Role | Scenario | Core Need |
|---|---|---|
| [role] | [when/where they use it] | [what they need from it] |
## Core Capabilities
| # | Capability | Description | Status | Maturity |
|---|---|---|---|---|
| C1 | [name] | [one-line description] | Active / Planned / Deprecated | Alpha / Beta / Stable |
### Capability Dependencies
<!-- 展示各项能力之间如何相互依赖。
用 ASCII 图或表格。哪些是基础性的?
哪些是独立的?哪些组合在一起? -->
\```
C1 (foundation)
├── C2
│ └── C4
└── C3
\```
## Product Boundaries
### In Scope
<!-- 产品做什么。要具体。 -->
### Out of Scope
<!-- 产品明确「不」做什么,以及为什么。
每一项排除都需要一个理由——「不是我们的用户」、
「未来阶段」、「已有工具解决」等等。 -->
### Future Consideration
<!-- 当前不在范围内、但日后可能重新考虑的东西。
与永久性的排除项区分开。 -->
## Key Concepts
<!-- 核心领域术语。防止人与人、人与 agent、
以及跨文档之间的沟通误解。 -->
| Term | Definition | Not to Be Confused With |
|---|---|---|
| [term] | [what it means in this product] | [common misinterpretation] |
## Non-Functional Requirements
| Category | Requirement | Target |
|---|---|---|
| Performance | [requirement] | [measurable target] |
| Security | [requirement] | [measurable target] |
| Availability | [requirement] | [measurable target] |
## Success Metrics
| Metric | Target | Current | Measurement |
|---|---|---|---|
| [metric] | [target value] | [current value or N/A] | [how to measure] |
## Open Questions
<!-- 尚未解决、需要答案的问题。每一条都应说明
这个问题阻塞了哪个决策。 -->
写作原则:
把产品定义呈交人工评审。这是一道关键闸门。
PRODUCT DEFINITION READY FOR REVIEW:
- Product: [name]
- Target users: [count] roles defined
- Core capabilities: [count] (Active/Planned)
- Out of scope: [count] exclusions
- Future consideration: [count] items
- Open questions: [count] unresolved
→ This is the foundation for all feature specs and design docs.
Approve, or tell me what to change.
docs/product-spec.md.harness-runtime/plans/<slug>/docs/architecture.mddocs/design-docs/<name>.md产品定义是根。Feature 构建、architecture 与 design 文档都从它派生而来。
| 借口 | 现实 |
|---|---|
| 「我们清楚自己在造什么。」 | 那写下来只要 15 分钟。如果花得更久,说明你并不清楚。 |
| 「产品会不断演进,何必现在定义。」 | 没有基线的演进就是漂移。先把当下的真相定义下来,再随变化更新。 |
| 「把 feature 列一列就行。」 | 一张 feature 清单不是产品定义。没有用户问题和范围边界,feature 只是一堆找不到问题的散装方案。 |
| 「我们是敏捷,不做大而全的前期文档。」 | 这不是 50 页的 PRD。它就一页,说清谁、什么、为什么。哪怕敏捷也需要一颗北极星。 |
| 「README 里已经写过了。」 | README 讲的是怎么用产品。Product spec 讲的是产品为什么存在、应该成为什么。 |
docs/product-spec.md