Requirements: [Project Name]
【免费下载链接】get-shit-doneA light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.项目地址: https://gitcode.com/GitHub_Trending/getshi/get-shit-done
Defined:[date]Core Value:[from PROJECT.md]
v1 Requirements
Requirements for initial release. Each maps to roadmap phases.
Authentication
- AUTH-01: User can sign up with email and password
- AUTH-02: User receives email verification after signup
- AUTH-03: User can reset password via email link
- AUTH-04: User session persists across browser refresh
[Category 2]
- [CAT]-01: [Requirement description]
- [CAT]-02: [Requirement description]
- [CAT]-03: [Requirement description]
[Category 3]
- [CAT]-01: [Requirement description]
- [CAT]-02: [Requirement description]
v2 Requirements
Deferred to future release. Tracked but not in current roadmap.
[Category]
- [CAT]-01: [Requirement description]
- [CAT]-02: [Requirement description]
Out of Scope
Explicitly excluded. Documented to prevent scope creep.
| Feature | Reason |
|---|---|
| [Feature] | [Why excluded] |
| [Feature] | [Why excluded] |
Traceability
Which phases cover which requirements. Updated during roadmap creation.
| Requirement | Phase | Status |
|---|---|---|
| AUTH-01 | Phase 1 | Pending |
| AUTH-02 | Phase 1 | Pending |
| AUTH-03 | Phase 1 | Pending |
| AUTH-04 | Phase 1 | Pending |
| [REQ-ID] | Phase [N] | Pending |
Coverage:
- v1 requirements: [X] total
- Mapped to phases: [Y]
- Unmapped: [Z] ⚠️
Requirements defined: [date]Last updated: [date] after [trigger]
各区块的语义要点: - **头部**:`Defined` 记录需求定义日期;`Core Value` 必须取自 `PROJECT.md` 的核心价值声明,确保需求始终对齐产品初衷。 - **v1 Requirements**:承诺交付的范围,每条需求都将映射进 roadmap 的阶段,使用 `- [ ]` 复选框标记未完成状态。 - **v2 Requirements**:已确认但延期到未来版本的需求,**不带复选框**(尚未进入可执行状态),也不出现在当前 roadmap 中。 - **Out of Scope**:显式排除清单,用"特性 + 理由"表格记录,防止日后出现"为什么没做 X"的追问;研究阶段识别出的 anti-features(刻意不做的事)也应带警告归入此处。 - **Traceability**:需求 ↔ 阶段映射表,初始为空,在 roadmap 创建时填充;每条 v1 需求映射到恰好一个阶段。 - **Coverage**:覆盖率小结,`Unmapped` 项带 ⚠️ 提示,是"需求孤儿"的显式告警。 - **页脚**:记录定义日期与最近一次更新(含触发原因),让文档变更可审计。 ## 三、编写规则(guidelines)逐条详解 模板的 `<guidelines>` 区段给出了一套必须遵守的编写纪律: ### 3.1 需求格式:ID 化、用户中心、可测试、原子化 - **ID**:采用 `[CATEGORY]-[NUMBER]` 格式,如 `AUTH-01`、`CONTENT-02`、`SOCIAL-03`。类别用大写缩写,序号从 01 起连续编号。 - **描述**:必须以用户为中心、可测试、原子化——一条需求只描述一个可观察行为,而不是一坨功能描述。 - **复选框**:仅 v1 需求使用 `- [ ]`;v2 需求不勾选,因为它们尚不可执行。 这条格式约定不是软性建议,而是被源码硬性解析的。在 [get-shit-done/bin/lib/gap-checker.cjs](https://link.gitcode.com/i/3cd34ed6ccfc0e9b73b72c4965f14706) 的 `parseRequirements` 中,REQ-ID 用以下模式提取: ```javascript // Prefix-agnostic ID format: REQ-01, TST-01, BACK-07, INSP-04, etc. const ID_PATTERN = '[A-Z][A-Z0-9]*-[A-Za-z0-9_-]+';解析器同时支持两种书写格式:
- 复选框格式:
- [ ] **REQ-NN** description - 可追溯表格格式:
| REQ-NN | ... |(表格首列)
注意分隔行(|-----|)会被跳过,且解析按"前缀无关"进行——这意味着REQ-1与REQ-10这类编号能被正确区分,不会因前缀相同而产生误匹配。
3.2 分类:从研究产出继承
需求类别应从研究阶段的FEATURES.md分类推导(参见 sdk/prompts/templates/research-project/FEATURES.md),并与领域惯例保持一致。典型类别:Authentication(认证)、Content(内容)、Social(社交)、Notifications(通知)、Moderation(审核)、Payments(支付)、Admin(管理)。
3.3 v1 与 v2 的边界纪律
- v1:承诺范围,会进入 roadmap 阶段。
- v2:承认但延期,不进入当前 roadmap。
- 把 v2 提升为 v1必须伴随 roadmap 更新(新增阶段或扩展现有阶段),不能悄悄"顺手做了"。
3.4 Out of Scope:显式排除即保护
记录被排除的特性并写明理由,能从根本上杜绝范围蔓延。研究阶段发现的 anti-features(如"刻意不做实时聊天")也应带警告列在这里,让后续的规划者和执行者不会在边界上反复试探。
3.5 Traceability:一个需求只能映射一个阶段
- 初始为空,在 roadmap 创建时由 roadmapper 填充。
- 每条需求恰好映射到一个阶段:既能交付它又能满足它的阶段中,通常取最早可交付的那个。
- 未映射的需求 = roadmap 缺口(gap),必须在规划阶段解决。
在 agents/gsd-roadmapper.md 的<coverage_validation>区段中,这一纪律被表述为硬性门槛:覆盖率必须达到 100% 才能继续。出现孤儿需求(无阶段映射)时的处理选项包括:新建阶段、并入现有阶段、或降级到 v2(需同步更新REQUIREMENTS.md)。
3.6 状态取值
Traceability 表格中 Status 列只有四种取值:
| 取值 | 含义 |
|---|---|
Pending | 未开始 |
In Progress | 阶段进行中 |
Complete | 需求已验证 |
Blocked | 等待外部因素 |
In Progress与Complete由执行阶段工具自动维护(详见第五节),Blocked则需要人工介入记录阻塞原因。
四、完整示例:CommunityApp
模板<example>区段给出了一个可直接参照的完整范例。它演示了如何把 18 条 v1 需求组织成 4 个类别、映射到 4 个阶段,并给出 Out of Scope 与覆盖率统计:
# Requirements: CommunityApp **Defined:** 2025-01-14 **Core Value:** Users can share and discuss content with people who share their interests ## v1 Requirements ### Authentication - [ ] **AUTH-01**: User can sign up with email and password - [ ] **AUTH-02**: User receives email verification after signup - [ ] **AUTH-03**: User can reset password via email link - [ ] **AUTH-04**: User session persists across browser refresh ### Profiles - [ ] **PROF-01**: User can create profile with display name - [ ] **PROF-02**: User can upload avatar image - [ ] **PROF-03**: User can write bio (max 500 chars) - [ ] **PROF-04**: User can view other users' profiles ### Content - [ ] **CONT-01**: User can create text post - [ ] **CONT-02**: User can upload image with post - [ ] **CONT-03**: User can edit own posts - [ ] **CONT-04**: User can delete own posts - [ ] **CONT-05**: User can view feed of posts ### Social - [ ] **SOCL-01**: User can follow other users - [ ] **SOCL-02**: User can unfollow users - [ ] **SOCL-03**: User can like posts - [ ] **SOCL-04**: User can comment on posts - [ ] **SOCL-05**: User can view activity feed (followed users' posts) ## v2 Requirements ### Notifications - **NOTF-01**: User receives in-app notifications - **NOTF-02**: User receives email for new followers - **NOTF-03**: User receives email for comments on own posts - **NOTF-04**: User can configure notification preferences ### Moderation - **MODR-01**: User can report content - **MODR-02**: User can block other users - **MODR-03**: Admin can view reported content - **MODR-04**: Admin can remove content - **MODR-05**: Admin can ban users ## Out of Scope | Feature | Reason | |---------|--------| | Real-time chat | High complexity, not core to community value | | Video posts | Storage/bandwidth costs, defer to v2+ | | OAuth login | Email/password sufficient for v1 | | Mobile app | Web-first, mobile later | ## Traceability | Requirement | Phase | Status | |-------------|-------|--------| | AUTH-01 | Phase 1 | Pending | | AUTH-02 | Phase 1 | Pending | | AUTH-03 | Phase 1 | Pending | | AUTH-04 | Phase 1 | Pending | | PROF-01 | Phase 2 | Pending | | PROF-02 | Phase 2 | Pending | | PROF-03 | Phase 2 | Pending | | PROF-04 | Phase 2 | Pending | | CONT-01 | Phase 3 | Pending | | CONT-02 | Phase 3 | Pending | | CONT-03 | Phase 3 | Pending | | CONT-04 | Phase 3 | Pending | | CONT-05 | Phase 3 | Pending | | SOCL-01 | Phase 4 | Pending | | SOCL-02 | Phase 4 | Pending | | SOCL-03 | Phase 4 | Pending | | SOCL-04 | Phase 4 | Pending | | SOCL-05 | Phase 4 | Pending | **Coverage:** - v1 requirements: 18 total - Mapped to phases: 18 - Unmapped: 0 ✓ --- *Requirements defined: 2025-01-14* *Last updated: 2025-01-14 after initial definition*【免费下载链接】get-shit-doneA light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.项目地址: https://gitcode.com/GitHub_Trending/getshi/get-shit-done
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考