npx skills add https://github.com/danhvb/my-ba-skills --skill 'FRS Creation'创建全面的功能需求规格说明书,为开发团队提供详细的技术需求,以便实施业务解决方案。
| 方面 | BRD | FRS |
|---|---|---|
| 受众 | 业务利益相关者、高管 | 技术团队、开发人员、质量保证人员 |
| 重点 | 是什么和为什么 | 怎么做 |
| 详细程度 | 高层次业务需求 | 详细的功能规格 |
| 语言 | 业务语言 | 包含业务背景的技术语言 |
| 范围 | 整个项目/计划 | 特定模块或功能 |
每个需求的格式:
FR-[MODULE]-[NUMBER]: [需求标题]
描述:[系统应执行功能的详细描述]
业务规则:[任何业务逻辑或规则]
输入:[触发此功能的数据/事件]
处理:[系统执行的步骤]
输出:[系统产生/显示的内容]
验收标准:
- [具体、可测试的标准 1]
- [具体、可测试的标准 2]
UI/UX 说明:[任何 UI 规范、线框图引用]
依赖项:[此需求依赖的其他需求]
优先级:必须拥有 | 应该拥有 | 可以拥有
复杂度:低 | 中 | 高
示例 - 电子商务结账:
FR-CHK-001: 访客结账
描述:系统应允许用户在不创建账户的情况下完成购买
业务规则:
- 访客用户必须提供电子邮件以接收订单确认
- 购买后,系统应提供账户创建选项
- 订单金额 > $5000 时不可使用访客结账
输入:用户点击"以访客身份结账"按钮
处理:
1. 系统验证购物车不为空
2. 系统检查订单总额 < $5000
3. 系统显示收货地址表单
4. 系统使用地址验证 API 验证地址
5. 系统显示带有实时定价的配送选项
6. 系统显示支付表单
7. 系统通过 Stripe 处理支付
8. 系统创建带有访客标志的订单记录
9. 系统发送确认电子邮件
10. 系统显示订单确认页面并提供创建账户的选项
输出:
- 订单确认号
- 已发送确认电子邮件
- 数据库中创建的订单记录
验收标准:
- 访客可在 < 2 分钟内完成结账
- 所有表单字段都有适当的验证
- 地址验证能捕获无效地址
- 支付处理在 < 5 秒内完成
- 确认电子邮件在 1 分钟内发送
- 订单立即出现在管理系统中
UI/UX 说明:参见 Figma 线框图
- 单页结账设计
- 顶部进度指示器
- 右侧粘性订单摘要
- 移动端响应式布局
依赖项:FR-PAY-001、FR-ORD-001
优先级:必须拥有
复杂度:高
实体定义:
示例:
实体:订单
属性:
- order_id
- customer_id
- order_number
- order_date
- status
- subtotal
- tax
- shipping_cost
- total
- shipping_address
- billing_address
- payment_method
- payment_status
- created_at
- updated_at
关系:
- 一个订单拥有多个订单项
- 一个订单属于一个客户
- 一个订单有一个支付
业务规则:
- 订单号必须唯一
- 总额必须等于小计 + 税费 + 运费
- 状态转换:待处理 → 处理中 → 已发货 → 已送达
- 已取消的订单无法修改
针对每个集成:
示例:
INT-001: Stripe 支付网关集成
目的:安全处理信用卡支付
类型:REST API,实时
方向:双向
- 出站:创建支付意向,捕获费用
- 入站:支付确认,Webhook 通知
身份验证:API 密钥
使用的端点:
- POST /v1/payment_intents
- POST /v1/payment_intents/{id}/confirm
- POST /v1/refunds
数据映射:
- Order.total → PaymentIntent.amount
- Order.currency → PaymentIntent.currency
- Customer.email → PaymentIntent.receipt_email
错误处理:
- 网络超时:重试最多 3 次,采用指数退避策略
- 支付被拒:显示用户友好的错误信息,记录详细信息
- API 错误:回退到手动支付处理,通知管理员
Webhooks:
- payment_intent.succeeded → 将订单状态更新为"处理中"
- payment_intent.payment_failed → 将订单状态更新为"失败",通知客户
- charge.refunded → 将订单状态更新为"已退款"
SLA:99.9% 正常运行时间,< 2 秒响应时间
测试:使用 Stripe 测试模式和测试卡号
记录所有业务逻辑和规则:
示例:
BR-001: 运费计算
- 订单 < $50:标准运费 $5.99,加急运费 $12.99
- 订单 $50-$99:标准运费 $3.99,加急运费 $9.99
- 订单 ≥ $100:免标准运费,加急运费 $7.99
- 国际订单:按重量和目的地计算
- 阿拉斯加/夏威夷:标准运费加收 $10
BR-002: 折扣应用
- 每个订单只能使用一个促销码
- 促销码不能与特价商品叠加使用
- 员工折扣可与促销码叠加使用
- 折扣在税费计算前应用
- 每个促销码可能有最低订单金额要求
BR-003: 库存预留
- 商品加入购物车后预留 15 分钟
- 每次更新购物车时,预留时间延长 15 分钟
- 不活动 15 分钟后释放预留
- 缺货商品无法加入购物车
- 若商品启用了预购,则可以加入购物车
示例:
屏幕:结账页面
布局:单页设计,包含 3 个部分
1. 配送信息
2. 支付信息
3. 订单摘要
配送信息字段:
- 电子邮件
- 全名
- 地址行 1
- 地址行 2
- 城市
- 州/省
- 邮政编码
- 国家
- 电话
验证:
- 失去焦点时实时验证
- 错误信息以红色显示在字段下方
- 提交按钮在所有必填字段有效前禁用
错误信息:
- 电子邮件:"请输入有效的电子邮件地址"
- 姓名:"姓名至少需要 2 个字符"
- 邮政编码:"请输入有效的邮政编码"
响应式:
- 桌面端:2 列布局
- 平板端:2 列布局,较窄
- 移动端:单列,订单摘要可折叠
无障碍访问:
- 所有表单字段都有标签
- 错误信息与字段关联
- 支持键盘导航
- 兼容屏幕阅读器
- 颜色对比度 ≥ 4.5:1
与 BRD 相同,但包含技术细节
重点:产品目录、购物车、结账、支付、订单管理 关键细节:支付网关规格、库存逻辑、定价规则、运费计算
重点:模块工作流、审批流程、数据迁移、集成 关键细节:复杂业务规则、多公司逻辑、报告规格
重点:潜在客户/机会管理、销售管道、营销自动化 关键细节:评分算法、工作流自动化、集成规格
重点:数据收集、身份识别、细分、激活 关键细节:数据映射、匹配逻辑、API 规范
重点:UI/UX、离线同步、性能、平台特定功能 关键细节:API 契约、缓存策略、推送通知
✅ 应该做:
❌ 不应该做:
FRS 完成后:
每周安装数
0
仓库
首次出现
1970年1月1日
安全审计
Create comprehensive Functional Requirements Specifications (FRS) that provide detailed, technical requirements for development teams to implement business solutions.
| Aspect | BRD | FRS |
|---|---|---|
| Audience | Business stakeholders, executives | Technical team, developers, QA |
| Focus | WHAT and WHY | HOW |
| Detail Level | High-level business requirements | Detailed functional specifications |
| Language | Business language | Technical language with business context |
| Scope |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| Entire project/initiative |
| Specific module or feature |
Format for Each Requirement :
FR-[MODULE]-[NUMBER]: [Requirement Title]
Description: [Detailed description of what the system shall do]
Business Rule: [Any business logic or rules]
Input: [What data/triggers initiate this function]
Process: [Step-by-step what the system does]
Output: [What the system produces/displays]
Acceptance Criteria:
- [Specific, testable criterion 1]
- [Specific, testable criterion 2]
UI/UX Notes: [Any UI specifications, wireframe references]
Dependencies: [Other requirements this depends on]
Priority: Must Have | Should Have | Could Have
Complexity: Low | Medium | High
Example - E-commerce Checkout :
FR-CHK-001: Guest Checkout
Description: System shall allow users to complete purchase without creating an account
Business Rule:
- Guest users must provide email for order confirmation
- After purchase, system shall offer account creation
- Guest checkout not available for orders > $5000
Input: User clicks "Checkout as Guest" button
Process:
1. System validates cart is not empty
2. System checks order total < $5000
3. System displays shipping address form
4. System validates address using address verification API
5. System displays shipping options with real-time pricing
6. System displays payment form
7. System processes payment via Stripe
8. System creates order record with guest flag
9. System sends confirmation email
10. System displays order confirmation page with option to create account
Output:
- Order confirmation number
- Email confirmation sent
- Order record created in database
Acceptance Criteria:
- Guest can complete checkout in < 2 minutes
- All form fields have proper validation
- Address verification catches invalid addresses
- Payment processing completes in < 5 seconds
- Confirmation email sent within 1 minute
- Order appears in admin system immediately
UI/UX Notes: See Figma wireframes (link)
- Single-page checkout design
- Progress indicator at top
- Order summary sticky on right side
- Mobile-responsive layout
Dependencies: FR-PAY-001 (Payment Processing), FR-ORD-001 (Order Creation)
Priority: Must Have
Complexity: High
Entity Definitions :
Example :
Entity: Order
Attributes:
- order_id (UUID, Primary Key, Required, Auto-generated)
- customer_id (UUID, Foreign Key to Customer, Optional for guest)
- order_number (String, Unique, Format: ORD-YYYYMMDD-XXXX)
- order_date (DateTime, Required, Default: Current timestamp)
- status (Enum, Required, Values: pending|processing|shipped|delivered|cancelled)
- subtotal (Decimal(10,2), Required, Min: 0.01)
- tax (Decimal(10,2), Required, Min: 0)
- shipping_cost (Decimal(10,2), Required, Min: 0)
- total (Decimal(10,2), Required, Calculated: subtotal + tax + shipping_cost)
- shipping_address (JSON, Required)
- billing_address (JSON, Required)
- payment_method (String, Required)
- payment_status (Enum, Required, Values: pending|authorized|captured|failed|refunded)
- created_at (DateTime, Required, Auto-generated)
- updated_at (DateTime, Required, Auto-updated)
Relationships:
- One Order has many OrderItems
- One Order belongs to one Customer (optional)
- One Order has one Payment
Business Rules:
- Order number must be unique
- Total must equal subtotal + tax + shipping_cost
- Status transitions: pending → processing → shipped → delivered
- Cancelled orders cannot be modified
For Each Integration :
Example :
INT-001: Stripe Payment Gateway Integration
Purpose: Process credit card payments securely
Type: REST API, Real-time
Direction: Bidirectional
- Outbound: Payment intent creation, charge capture
- Inbound: Payment confirmation, webhook notifications
Authentication: API Key (Secret key for server, Publishable key for client)
Endpoints Used:
- POST /v1/payment_intents (Create payment intent)
- POST /v1/payment_intents/{id}/confirm (Confirm payment)
- POST /v1/refunds (Process refund)
Data Mapping:
- Order.total → PaymentIntent.amount
- Order.currency → PaymentIntent.currency
- Customer.email → PaymentIntent.receipt_email
Error Handling:
- Network timeout (30 seconds): Retry up to 3 times with exponential backoff
- Payment declined: Display user-friendly error, log details
- API error: Fallback to manual payment processing, alert admin
Webhooks:
- payment_intent.succeeded → Update order status to "processing"
- payment_intent.payment_failed → Update order status to "failed", notify customer
- charge.refunded → Update order status to "refunded"
SLA: 99.9% uptime, < 2 second response time
Testing: Use Stripe test mode with test card numbers
Document all business logic and rules:
Example :
BR-001: Shipping Cost Calculation
- Orders < $50: Standard shipping $5.99, Express $12.99
- Orders $50-$99: Standard shipping $3.99, Express $9.99
- Orders ≥ $100: Free standard shipping, Express $7.99
- International orders: Calculated by weight and destination
- Alaska/Hawaii: Add $10 to standard rates
BR-002: Discount Application
- Only one promo code per order
- Promo codes cannot be combined with sale items
- Employee discount (20%) can be combined with promo codes
- Discounts applied before tax calculation
- Minimum order value may apply per promo code
BR-003: Inventory Reservation
- Items reserved for 15 minutes when added to cart
- Reservation extended by 15 minutes on each cart update
- Reservation released after 15 minutes of inactivity
- Out-of-stock items cannot be added to cart
- Backorder items can be added if enabled for product
Example :
Screen: Checkout Page
Layout: Single-page design with 3 sections
1. Shipping Information (left column)
2. Payment Information (left column, below shipping)
3. Order Summary (right column, sticky)
Shipping Information Fields:
- Email (required, email validation, max 100 chars)
- Full Name (required, min 2 chars, max 100 chars)
- Address Line 1 (required, max 100 chars)
- Address Line 2 (optional, max 100 chars)
- City (required, max 50 chars)
- State/Province (required, dropdown)
- ZIP/Postal Code (required, format validation based on country)
- Country (required, dropdown, default: US)
- Phone (required, phone format validation)
Validation:
- Real-time validation on blur
- Error messages displayed below field in red
- Submit button disabled until all required fields valid
Error Messages:
- Email: "Please enter a valid email address"
- Name: "Name must be at least 2 characters"
- ZIP: "Please enter a valid ZIP code"
Responsive:
- Desktop: 2-column layout
- Tablet: 2-column layout, narrower
- Mobile: Single column, order summary collapsible
Accessibility:
- All form fields have labels
- Error messages associated with fields (aria-describedby)
- Keyboard navigation support
- Screen reader compatible
- Color contrast ratio ≥ 4.5:1
Same as BRD but with technical details
Focus : Product catalog, cart, checkout, payment, order management Key Details : Payment gateway specs, inventory logic, pricing rules, shipping calculations
Focus : Module workflows, approval processes, data migration, integrations Key Details : Complex business rules, multi-company logic, reporting specs
Focus : Lead/opportunity management, sales pipeline, marketing automation Key Details : Scoring algorithms, workflow automation, integration specs
Focus : Data collection, identity resolution, segmentation, activation Key Details : Data mapping, matching logic, API specifications
Focus : UI/UX, offline sync, performance, platform-specific features Key Details : API contracts, caching strategy, push notifications
✅ Do :
❌ Don't :
After FRS completion:
use-case-documentation skill)user-story-writing skill)acceptance-criteria skill)uat-planning skill)Weekly Installs
0
Repository
First Seen
Jan 1, 1970
Security Audits
注册流程转化率优化指南:减少摩擦、提高完成率的专家技巧
27,200 周安装