thread-master/.grok/skills/spec-driven/references/templates/spec.md

86 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Spec: <名稱>
> Status: `draft` | `approved`
> Source: `docs/product/<slug>/requirements.md`
> Last updated: `YYYY-MM-DD`
## 1. 摘要
<24 對齊需求 P0>
## 2. 名詞與實體
| 名詞 | 定義 |
|------|------|
| | |
## 3. 狀態機(若有)
```text
stateA --> stateB : 觸發條件
```
## 4. 使用者流程(行為)
### 流程 A
1. 使用者…
2. 系統…
3. 失敗時…
## 5. 介面契約
### 5.1 HTTP / API若適用
- Auth
- Envelope`code/message/data/error`
- 列表:`page` / `pageSize``pagination` + `list`
- 時間unix nanoseconds UTC
| Method | Path | 用途 | 主要 request/response 欄位 |
|--------|------|------|---------------------------|
| | | | |
### 5.2 前端頁面 / 導覽(若適用)
| 路由 / hash | 目的 | 主要操作 |
|-------------|------|----------|
| | | |
### 5.3 Job / 背景任務(若適用)
| Template type | Worker | 觸發 | 成功結果 |
|---------------|--------|------|----------|
| | | | |
## 6. 與現況對照
| 能力 | Retain | Replace | Remove | 備註 |
|------|--------|---------|--------|------|
| | | | | |
## 7. 非功能
- 安全 / 權限:
- 錯誤碼 scope
- 可觀測性job 進度、錯誤訊息):
- 效能邊界(可接受延遲 / 筆數上限):
## 8. 資料保存(邏輯層,非 Mongo 細節亦可)
| 實體 | 關鍵欄位 | 生命週期 |
|------|----------|----------|
| | | |
## 9. 驗收場景Given / When / Then
1. **Given****When****Then**
## 10. 開放規格問題
1.
## 11. 批准
- [ ] Spec 已批准: