universal-dev-standards 6.8.0 → 6.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/uds.js +12 -2
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +14 -2
- package/bundled/ai/standards/adr-standards.ai.yaml +14 -2
- package/bundled/ai/standards/code-review.ai.yaml +13 -3
- package/bundled/ai/standards/commit-message.ai.yaml +8 -4
- package/bundled/ai/standards/deferred-item-exit.ai.yaml +225 -0
- package/bundled/ai/standards/feature-discovery-standards.ai.yaml +14 -2
- package/bundled/ai/standards/governance-layer.ai.yaml +128 -2
- package/bundled/ai/standards/logging.ai.yaml +2 -2
- package/bundled/ai/standards/retrospective-standards.ai.yaml +14 -2
- package/bundled/ai/standards/reverse-engineering-standards.ai.yaml +73 -2
- package/bundled/ai/standards/security-standards.ai.yaml +2 -2
- package/bundled/ai/standards/spec-driven-development.ai.yaml +14 -2
- package/bundled/ai/standards/tech-debt-standards.ai.yaml +87 -3
- package/bundled/ai/standards/turn-completion-integrity.ai.yaml +131 -0
- package/bundled/core/acceptance-criteria-traceability.md +5 -2
- package/bundled/core/adr-standards.md +26 -2
- package/bundled/core/agent-communication-protocol.md +8 -0
- package/bundled/core/branch-completion.md +8 -0
- package/bundled/core/change-batching-standards.md +8 -0
- package/bundled/core/code-review-checklist.md +5 -2
- package/bundled/core/context-aware-loading.md +1 -1
- package/bundled/core/deferred-item-exit.md +254 -0
- package/bundled/core/execution-history.md +8 -0
- package/bundled/core/feature-discovery-standards.md +5 -1
- package/bundled/core/governance-layer.md +114 -2
- package/bundled/core/pipeline-integration-standards.md +8 -0
- package/bundled/core/retrospective-standards.md +4 -2
- package/bundled/core/reverse-engineering-standards.md +81 -2
- package/bundled/core/spec-driven-development.md +8 -2
- package/bundled/core/tech-debt-standards.md +67 -8
- package/bundled/core/turn-completion-integrity.md +196 -0
- package/bundled/core/workflow-enforcement.md +8 -0
- package/bundled/core/workflow-state-protocol.md +8 -0
- package/bundled/hooks/check-dangerous-cmd.mjs +60 -0
- package/bundled/hooks/check-logging-standard.mjs +59 -0
- package/bundled/hooks/check-turn-completion.mjs +233 -0
- package/bundled/hooks/inject-standards.mjs +183 -0
- package/bundled/hooks/telemetry-wrapper.mjs +77 -0
- package/bundled/hooks/turn-completion/detect.mjs +99 -0
- package/bundled/hooks/turn-completion/locales/en.mjs +159 -0
- package/bundled/hooks/turn-completion/locales/zh-TW.mjs +166 -0
- package/bundled/hooks/validate-commit-msg.mjs +104 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +73 -3
- package/bundled/locales/zh-CN/CLAUDE.md +1 -1
- package/bundled/locales/zh-CN/README.md +2 -2
- package/bundled/locales/zh-CN/SECURITY.md +1 -1
- package/bundled/locales/zh-CN/core/adr-standards.md +1 -1
- package/bundled/locales/zh-CN/core/agent-communication-protocol.md +7 -0
- package/bundled/locales/zh-CN/core/branch-completion.md +7 -0
- package/bundled/locales/zh-CN/core/change-batching-standards.md +7 -0
- package/bundled/locales/zh-CN/core/execution-history.md +7 -0
- package/bundled/locales/zh-CN/core/governance-layer.md +118 -6
- package/bundled/locales/zh-CN/core/pipeline-integration-standards.md +7 -0
- package/bundled/locales/zh-CN/core/retrospective-standards.md +1 -1
- package/bundled/locales/zh-CN/core/tech-debt-standards.md +71 -4
- package/bundled/locales/zh-CN/core/turn-completion-integrity.md +190 -0
- package/bundled/locales/zh-CN/core/workflow-enforcement.md +7 -0
- package/bundled/locales/zh-CN/core/workflow-state-protocol.md +7 -0
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +8 -1
- package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +29 -68
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +25 -15
- package/bundled/locales/zh-CN/docs/MIGRATION-v6.md +8 -4
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +1 -2
- package/bundled/locales/zh-CN/integrations/google-antigravity/{INSTRUCTIONS.md → AGENTS.md} +1 -1
- package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +3 -3
- package/bundled/locales/zh-CN/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +22 -12
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +12 -9
- package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/commands/brainstorm.md +17 -13
- package/bundled/locales/zh-CN/skills/commands/config.md +0 -1
- package/bundled/locales/zh-CN/skills/commands/init.md +1 -2
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/release-standards/SKILL.md +3 -0
- package/bundled/locales/zh-CN/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/locales/zh-CN/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/CHANGELOG.md +74 -3
- package/bundled/locales/zh-TW/CLAUDE.md +1 -1
- package/bundled/locales/zh-TW/README.md +2 -2
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +2 -0
- package/bundled/locales/zh-TW/core/adr-standards.md +26 -5
- package/bundled/locales/zh-TW/core/agent-communication-protocol.md +7 -0
- package/bundled/locales/zh-TW/core/branch-completion.md +7 -0
- package/bundled/locales/zh-TW/core/change-batching-standards.md +7 -0
- package/bundled/locales/zh-TW/core/code-review-checklist.md +2 -0
- package/bundled/locales/zh-TW/core/container-image-standards.md +2 -2
- package/bundled/locales/zh-TW/core/contract-testing-standards.md +2 -2
- package/bundled/locales/zh-TW/core/cross-flow-regression.md +8 -7
- package/bundled/locales/zh-TW/core/data-contract.md +2 -2
- package/bundled/locales/zh-TW/core/data-migration-testing.md +2 -2
- package/bundled/locales/zh-TW/core/data-pipeline.md +2 -2
- package/bundled/locales/zh-TW/core/deferred-item-exit.md +251 -0
- package/bundled/locales/zh-TW/core/documentation-writing-standards.md +228 -3
- package/bundled/locales/zh-TW/core/execution-history.md +7 -0
- package/bundled/locales/zh-TW/core/full-coverage-testing.md +15 -2
- package/bundled/locales/zh-TW/core/governance-layer.md +118 -5
- package/bundled/locales/zh-TW/core/iac-design-principles.md +2 -2
- package/bundled/locales/zh-TW/core/incident-response.md +2 -2
- package/bundled/locales/zh-TW/core/model-provenance.md +4 -2
- package/bundled/locales/zh-TW/core/pii-classification.md +42 -6
- package/bundled/locales/zh-TW/core/pipeline-integration-standards.md +7 -0
- package/bundled/locales/zh-TW/core/prd-standards.md +4 -2
- package/bundled/locales/zh-TW/core/product-metrics-standards.md +4 -2
- package/bundled/locales/zh-TW/core/release-readiness-gate.md +2 -2
- package/bundled/locales/zh-TW/core/resource-cost-boundary.md +2 -2
- package/bundled/locales/zh-TW/core/retrospective-standards.md +5 -3
- package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +83 -5
- package/bundled/locales/zh-TW/core/runbook.md +2 -2
- package/bundled/locales/zh-TW/core/schema-evolution.md +2 -2
- package/bundled/locales/zh-TW/core/secret-management-standards.md +2 -2
- package/bundled/locales/zh-TW/core/slo-sli.md +2 -2
- package/bundled/locales/zh-TW/core/spec-driven-development.md +2 -0
- package/bundled/locales/zh-TW/core/tech-debt-standards.md +71 -4
- package/bundled/locales/zh-TW/core/turn-completion-integrity.md +190 -0
- package/bundled/locales/zh-TW/core/user-journey-testing.md +2 -2
- package/bundled/locales/zh-TW/core/user-story-mapping.md +2 -2
- package/bundled/locales/zh-TW/core/verification-oracle.md +2 -2
- package/bundled/locales/zh-TW/core/workflow-enforcement.md +7 -0
- package/bundled/locales/zh-TW/core/workflow-state-protocol.md +7 -0
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +8 -1
- package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +29 -68
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +25 -15
- package/bundled/locales/zh-TW/docs/MIGRATION-v6.md +8 -4
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +1 -2
- package/bundled/locales/zh-TW/integrations/google-antigravity/{INSTRUCTIONS.md → AGENTS.md} +1 -1
- package/bundled/locales/zh-TW/integrations/google-antigravity/README.md +3 -3
- package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +22 -12
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +12 -9
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/commands/brainstorm.md +17 -13
- package/bundled/locales/zh-TW/skills/commands/config.md +0 -1
- package/bundled/locales/zh-TW/skills/commands/init.md +1 -2
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +2 -1
- package/bundled/locales/zh-TW/skills/dev-methodology/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/knowledge-graph/guide.md +2 -2
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +3 -0
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/locales/zh-TW/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/skills/brainstorm-assistant/SKILL.md +31 -13
- package/bundled/skills/brainstorm-assistant/guide.md +9 -6
- package/bundled/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/skills/commands/brainstorm.md +12 -9
- package/bundled/skills/commands/config.md +0 -1
- package/bundled/skills/commands/init.md +2 -3
- package/bundled/skills/commit-standards/SKILL.md +2 -0
- package/bundled/skills/contract-test-assistant/SKILL.md +1 -0
- package/bundled/skills/dev-methodology/SKILL.md +4 -0
- package/bundled/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/skills/project-discovery/SKILL.md +1 -0
- package/bundled/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/skills/release-standards/SKILL.md +3 -0
- package/bundled/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/templates/.ai-context.yaml.template +194 -0
- package/bundled/templates/CLAUDE.md.template +145 -0
- package/bundled/templates/DESIGN.md +237 -0
- package/bundled/templates/SKILL-BRIEF-TEMPLATE.md +57 -0
- package/bundled/templates/SKILL-CANDIDATES.md +39 -0
- package/bundled/templates/gates/check-error-exit.mjs +309 -0
- package/bundled/templates/mcp-config.json +10 -0
- package/bundled/templates/methodology-template.yaml +209 -0
- package/bundled/templates/migration-template.md +408 -0
- package/bundled/templates/requirement-checklist.md +410 -0
- package/bundled/templates/requirement-document-template.md +591 -0
- package/bundled/templates/requirement-template.md +881 -0
- package/bundled/templates/reverse-spec-template.md +409 -0
- package/bundled/templates/test-case-template.md +74 -0
- package/bundled/templates/test-plan-template.md +74 -0
- package/package.json +12 -9
- package/src/commands/audit.js +82 -0
- package/src/commands/check.js +227 -34
- package/src/commands/config.js +19 -19
- package/src/commands/init.js +174 -20
- package/src/commands/spec.js +2 -2
- package/src/commands/update.js +537 -43
- package/src/compilers/claude-code-compiler.js +4 -1
- package/src/config/ai-agent-paths.js +62 -17
- package/src/core/constants.js +42 -11
- package/src/core/manifest.js +201 -3
- package/src/core/paths.js +2 -2
- package/src/i18n/messages.js +42 -29
- package/src/installers/hooks-installer.js +167 -75
- package/src/installers/integration-installer.js +13 -9
- package/src/installers/skills-installer.js +4 -4
- package/src/installers/standards-installer.js +3 -3
- package/src/prompts/init.js +47 -18
- package/src/reconciler/diff-engine.js +57 -2
- package/src/reconciler/plan-executor.js +31 -11
- package/src/utils/detector.js +21 -1
- package/src/utils/effect-boundary.js +1093 -0
- package/src/utils/hasher.js +166 -1
- package/src/utils/hook-stats.js +1 -1
- package/src/utils/integration-generator.js +288 -82
- package/src/utils/reference-sync.js +107 -8
- package/src/utils/registry.js +57 -0
- package/src/utils/spinner.js +31 -0
- package/src/utils/yaml-generator.js +51 -9
- package/standards-registry.json +32 -9
|
@@ -0,0 +1,881 @@
|
|
|
1
|
+
# [功能名稱] - 需求確認書
|
|
2
|
+
|
|
3
|
+
**文件版本**: 1.0
|
|
4
|
+
**建立日期**: YYYY-MM-DD
|
|
5
|
+
**最後更新**: YYYY-MM-DD
|
|
6
|
+
**專案名稱**: [YourProject]
|
|
7
|
+
**功能名稱**: [English Feature Name]
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 一、功能概述
|
|
12
|
+
|
|
13
|
+
<!-- TODO: 1-2 段說明此功能的目的與價值 -->
|
|
14
|
+
|
|
15
|
+
[描述功能的核心價值主張,說明為什麼需要此功能]
|
|
16
|
+
|
|
17
|
+
[說明此功能與現有系統的關係]
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 二、核心需求確認
|
|
22
|
+
|
|
23
|
+
### 2.1 功能需求
|
|
24
|
+
|
|
25
|
+
<!-- TODO: 列出所有功能需求,使用編號 FR1, FR2, ... -->
|
|
26
|
+
|
|
27
|
+
#### FR1: [需求標題]
|
|
28
|
+
|
|
29
|
+
**需求描述**: [詳細描述]
|
|
30
|
+
|
|
31
|
+
**優先級**: 必須 / 應該 / 可以
|
|
32
|
+
|
|
33
|
+
**驗收標準**:
|
|
34
|
+
- [ ] [可驗證的標準 1]
|
|
35
|
+
- [ ] [可驗證的標準 2]
|
|
36
|
+
|
|
37
|
+
#### FR2: [需求標題]
|
|
38
|
+
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
### 2.2 非功能需求
|
|
42
|
+
|
|
43
|
+
<!-- TODO: 效能、安全、可用性等需求 -->
|
|
44
|
+
|
|
45
|
+
#### NFR1: 效能需求
|
|
46
|
+
|
|
47
|
+
- **目標**: [具體數字,如「< 5ms」]
|
|
48
|
+
- **測試方法**: [如何驗證]
|
|
49
|
+
|
|
50
|
+
#### NFR2: 安全需求
|
|
51
|
+
|
|
52
|
+
- **目標**: [安全要求]
|
|
53
|
+
- **實作方式**: [簡要說明]
|
|
54
|
+
|
|
55
|
+
### 2.3 資料流程
|
|
56
|
+
|
|
57
|
+
<!-- TODO: 繪製資料流程圖 -->
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
[資料來源]
|
|
61
|
+
↓
|
|
62
|
+
[處理步驟 1]
|
|
63
|
+
↓
|
|
64
|
+
[處理步驟 2]
|
|
65
|
+
↓
|
|
66
|
+
[最終輸出]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 2.4 流程規格(Flow Specification)
|
|
70
|
+
|
|
71
|
+
<!-- 🔴 含 3 個以上步驟的流程必填;純 CRUD / 單步驟操作可省略 -->
|
|
72
|
+
<!-- 目的:確保 PRD 在發行前就具備「測試可行性三要素」,消除 happy-path-only 的測試盲點 -->
|
|
73
|
+
|
|
74
|
+
#### 前置條件 (Preconditions)
|
|
75
|
+
- [ ] [前置條件 1]
|
|
76
|
+
- [ ] [前置條件 2]
|
|
77
|
+
|
|
78
|
+
#### 步驟順序 (Ordered Steps)
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Step 1: [動作] → Step 2: [動作] → Step 3: [動作] → ... → Step N: [動作]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### 決策點清單 (Decision Points)
|
|
85
|
+
|
|
86
|
+
| 決策點 | 可能條件值 |
|
|
87
|
+
|-------|-----------|
|
|
88
|
+
| [決策點名稱 1] | [值 A] / [值 B] / [值 C] |
|
|
89
|
+
| [決策點名稱 2] | [值 X] / [值 Y] |
|
|
90
|
+
|
|
91
|
+
#### 終止狀態清單 (Terminal States)
|
|
92
|
+
|
|
93
|
+
| 狀態代碼 | 說明 | 對應 HTTP / 系統碼 |
|
|
94
|
+
|---------|------|-----------------|
|
|
95
|
+
| `SUCCESS` | [成功路徑說明] | 200 |
|
|
96
|
+
| `FAIL_[CODE_1]` | [失敗原因說明] | 4xx |
|
|
97
|
+
| `FAIL_[CODE_2]` | [失敗原因說明] | 4xx / 5xx |
|
|
98
|
+
|
|
99
|
+
> **驗收門檻**:每個終止狀態必須在 9.4 流程測試矩陣中至少對應一個測試情境。
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 三、技術方案概要
|
|
104
|
+
|
|
105
|
+
### 3.1 資料庫設計
|
|
106
|
+
|
|
107
|
+
<!-- TODO: 列出新增或修改的資料表 -->
|
|
108
|
+
|
|
109
|
+
#### 新增資料表
|
|
110
|
+
|
|
111
|
+
| 資料表名稱 | 用途 | 關鍵欄位 |
|
|
112
|
+
|-----------|------|---------|
|
|
113
|
+
| [TableName] | [用途說明] | [欄位 1, 欄位 2, ...] |
|
|
114
|
+
|
|
115
|
+
### 3.2 核心技術選型
|
|
116
|
+
|
|
117
|
+
<!-- TODO: 說明使用的演算法、框架、套件 -->
|
|
118
|
+
|
|
119
|
+
- **演算法**: [演算法名稱與用途]
|
|
120
|
+
- **NuGet 套件**: [套件名稱] v[版本]
|
|
121
|
+
- **其他技術**: [說明]
|
|
122
|
+
|
|
123
|
+
### 3.3 架構設計
|
|
124
|
+
|
|
125
|
+
<!-- TODO: 說明分層架構與元件關係 -->
|
|
126
|
+
|
|
127
|
+
#### 元件清單
|
|
128
|
+
|
|
129
|
+
| 層級 | 元件名稱 | 用途 |
|
|
130
|
+
|-----|---------|------|
|
|
131
|
+
| **Domain** | [EntityName] | [說明] |
|
|
132
|
+
| **Infrastructure** | [RepositoryName] | [說明] |
|
|
133
|
+
| **Application** | [ServiceName] | [說明] |
|
|
134
|
+
| **API** | [ControllerName] | [說明] |
|
|
135
|
+
|
|
136
|
+
### 3.4 資料流程圖
|
|
137
|
+
|
|
138
|
+
<!-- TODO: 繪製完整的資料流程圖 -->
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
┌─────────────────┐
|
|
142
|
+
│ [Step 1] │
|
|
143
|
+
└────────┬────────┘
|
|
144
|
+
↓
|
|
145
|
+
┌─────────────────┐
|
|
146
|
+
│ [Step 2] │
|
|
147
|
+
└─────────────────┘
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 四、新舊架構比較
|
|
153
|
+
|
|
154
|
+
<!-- 🔴 如果是新功能,此章節必填 -->
|
|
155
|
+
<!-- 🟡 如果是獨立新模組,可簡化或省略 -->
|
|
156
|
+
|
|
157
|
+
### 4.1 現有架構 (舊版)
|
|
158
|
+
|
|
159
|
+
#### 架構圖
|
|
160
|
+
|
|
161
|
+
<!-- TODO: 繪製現有架構圖 -->
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
[舊版架構圖]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### 現有元件清單
|
|
168
|
+
|
|
169
|
+
| 層級 | 元件 | 說明 |
|
|
170
|
+
|-----|------|------|
|
|
171
|
+
| **Domain** | [ExistingEntity] | [說明] |
|
|
172
|
+
| **Application** | [ExistingService] | [說明] |
|
|
173
|
+
|
|
174
|
+
#### 現有邏輯
|
|
175
|
+
|
|
176
|
+
```csharp
|
|
177
|
+
// TODO: 引用現有程式碼片段
|
|
178
|
+
// File:LineNumber
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### 4.2 新架構 (新版)
|
|
184
|
+
|
|
185
|
+
#### 架構圖
|
|
186
|
+
|
|
187
|
+
<!-- TODO: 繪製新版架構圖 -->
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
[新版架構圖,標註 [NEW] 的部分]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
#### 新增元件清單
|
|
194
|
+
|
|
195
|
+
| 層級 | 元件 | 說明 |
|
|
196
|
+
|-----|------|------|
|
|
197
|
+
| **Domain** | [NewEntity] (NEW) | [說明] |
|
|
198
|
+
| **Application** | [NewService] (NEW) | [說明] |
|
|
199
|
+
|
|
200
|
+
#### 新增邏輯
|
|
201
|
+
|
|
202
|
+
```csharp
|
|
203
|
+
// TODO: 新增的程式碼片段
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### 4.3 新舊架構對比表
|
|
209
|
+
|
|
210
|
+
| 項目 | 舊版架構 | 新版架構 | 差異 |
|
|
211
|
+
|-----|---------|---------|------|
|
|
212
|
+
| **[比較項目 1]** | [舊版] | [新版] | ✅/❌/⚠️ [說明] |
|
|
213
|
+
| **[比較項目 2]** | [舊版] | [新版] | ✅/❌/⚠️ [說明] |
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
### 4.4 記憶體/效能影響對比
|
|
218
|
+
|
|
219
|
+
<!-- TODO: 量化新架構的資源影響 -->
|
|
220
|
+
|
|
221
|
+
| 資料量 | 舊版記憶體 | 新版記憶體 | 增加量 |
|
|
222
|
+
|-------|-----------|-----------|--------|
|
|
223
|
+
| [場景 1] | [數字] MB | [數字] MB | +[數字] MB |
|
|
224
|
+
| [場景 2] | [數字] MB | [數字] MB | +[數字] MB |
|
|
225
|
+
|
|
226
|
+
**結論**: [影響評估]
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## 五、新舊流程比較
|
|
231
|
+
|
|
232
|
+
<!-- 🔴 如果是新功能,此章節必填 -->
|
|
233
|
+
<!-- 🟡 如果流程無變更,可簡化說明 -->
|
|
234
|
+
|
|
235
|
+
### 5.1 現有流程 (舊版)
|
|
236
|
+
|
|
237
|
+
#### 完整流程圖
|
|
238
|
+
|
|
239
|
+
<!-- TODO: 繪製舊版流程圖 -->
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
┌────────────────┐
|
|
243
|
+
│ [舊版 Step 1] │
|
|
244
|
+
└───────┬────────┘
|
|
245
|
+
↓
|
|
246
|
+
┌────────────────┐
|
|
247
|
+
│ [舊版 Step 2] │
|
|
248
|
+
└────────────────┘
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
#### 關鍵時間點
|
|
252
|
+
|
|
253
|
+
| 時間點 | 動作 | 耗時 |
|
|
254
|
+
|-------|------|------|
|
|
255
|
+
| T0 | [動作] | - |
|
|
256
|
+
| T0 + [時間] | [動作] | [耗時] |
|
|
257
|
+
|
|
258
|
+
**總延遲**: [總計]
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
### 5.2 新流程 (新版)
|
|
263
|
+
|
|
264
|
+
#### 完整流程圖
|
|
265
|
+
|
|
266
|
+
<!-- TODO: 繪製新版流程圖,標註 [NEW] 的步驟 -->
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
┌────────────────┐
|
|
270
|
+
│ [新版 Step 1] │
|
|
271
|
+
└───────┬────────┘
|
|
272
|
+
↓
|
|
273
|
+
┌────────────────┐
|
|
274
|
+
│ [NEW Step 2] │
|
|
275
|
+
└────────────────┘
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
#### 關鍵時間點
|
|
279
|
+
|
|
280
|
+
| 時間點 | 動作 | 耗時 |
|
|
281
|
+
|-------|------|------|
|
|
282
|
+
| T0 | [動作] | - |
|
|
283
|
+
| T0 + [時間] | **[NEW] [動作]** | **[耗時]** |
|
|
284
|
+
|
|
285
|
+
**總延遲**: [總計]
|
|
286
|
+
**檢查耗時**: 新版 [X]ms vs 舊版 [Y]ms
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
### 5.3 流程對比表
|
|
291
|
+
|
|
292
|
+
| 流程階段 | 舊版流程 | 新版流程 | 差異 |
|
|
293
|
+
|---------|---------|---------|------|
|
|
294
|
+
| **Step 1** | [舊版] | [新版] | ✅/❌ [說明] |
|
|
295
|
+
| **Step 2** | [舊版] | [新版] | ✅ [說明] |
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
### 5.4 多種模式的流程比較 (可選)
|
|
300
|
+
|
|
301
|
+
<!-- TODO: 如果有多種執行模式,說明每種模式的流程 -->
|
|
302
|
+
|
|
303
|
+
#### 模式 A: [模式名稱]
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
[流程圖]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**適用場景**: [說明]
|
|
310
|
+
|
|
311
|
+
#### 模式 B: [模式名稱]
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
[流程圖]
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**適用場景**: [說明]
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
### 5.5 效能影響分析
|
|
322
|
+
|
|
323
|
+
#### 單則訊息處理耗時對比
|
|
324
|
+
|
|
325
|
+
| 場景 | 舊版耗時 | 新版耗時 | 差異 |
|
|
326
|
+
|-----|---------|---------|------|
|
|
327
|
+
| **[場景 1]** | [X] ms | [Y] ms | +/- [Z] ms |
|
|
328
|
+
| **[場景 2]** | [X] ms | [Y] ms | +/- [Z] ms |
|
|
329
|
+
|
|
330
|
+
**結論**: [影響說明]
|
|
331
|
+
|
|
332
|
+
#### 批次處理效能對比
|
|
333
|
+
|
|
334
|
+
| 場景 | 舊版總耗時 | 新版總耗時 | 差異 |
|
|
335
|
+
|-----|----------|----------|------|
|
|
336
|
+
| **[場景 1]** | [X] 秒 | [Y] 秒 | ↓/↑ [%] |
|
|
337
|
+
| **[場景 2]** | [X] 秒 | [Y] 秒 | ↓/↑ [%] |
|
|
338
|
+
|
|
339
|
+
**結論**: [影響說明]
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## 六、API 介面
|
|
344
|
+
|
|
345
|
+
<!-- 🟡 如果沒有 API 變更,可省略此章節 -->
|
|
346
|
+
|
|
347
|
+
### 6.1 [API 端點 1 名稱]
|
|
348
|
+
|
|
349
|
+
**端點**: `[METHOD] /[path]`
|
|
350
|
+
|
|
351
|
+
**查詢參數**:
|
|
352
|
+
- `param1` (required/optional): [說明]
|
|
353
|
+
|
|
354
|
+
**請求 Body**: (如適用)
|
|
355
|
+
```json
|
|
356
|
+
{
|
|
357
|
+
"key": "value"
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**回應**:
|
|
362
|
+
```json
|
|
363
|
+
{
|
|
364
|
+
"result": "success"
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
**錯誤代碼**:
|
|
369
|
+
- `400`: [錯誤說明]
|
|
370
|
+
- `404`: [錯誤說明]
|
|
371
|
+
|
|
372
|
+
**權限**: Admin / User / Public
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
### 6.2 [API 端點 2 名稱]
|
|
377
|
+
|
|
378
|
+
<!-- TODO: 重複上述格式 -->
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## 七、設定參數
|
|
383
|
+
|
|
384
|
+
### 7.1 appsettings.json 新增項目
|
|
385
|
+
|
|
386
|
+
```json
|
|
387
|
+
{
|
|
388
|
+
"AppSettings": {
|
|
389
|
+
// ... 現有設定
|
|
390
|
+
|
|
391
|
+
// 🆕 新增設定
|
|
392
|
+
"[NewSetting1]": "[預設值]",
|
|
393
|
+
"[NewSetting2]": "[預設值]"
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### 7.2 設定說明
|
|
399
|
+
|
|
400
|
+
| 參數 | 可選值 | 預設值 | 說明 |
|
|
401
|
+
|-----|-------|--------|------|
|
|
402
|
+
| [Setting1] | [值1]<br>[值2] | [預設] | [用途說明] |
|
|
403
|
+
| [Setting2] | [數字範圍] | [預設] | [用途說明] |
|
|
404
|
+
|
|
405
|
+
### 7.3 設定模式說明 (可選)
|
|
406
|
+
|
|
407
|
+
<!-- TODO: 如果有多種設定模式,詳細說明每種模式 -->
|
|
408
|
+
|
|
409
|
+
#### 模式 A: [模式名稱]
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
[流程或行為說明]
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
**適用場景**: [說明]
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## 八、實作範圍
|
|
420
|
+
|
|
421
|
+
### 8.1 新增檔案清單
|
|
422
|
+
|
|
423
|
+
#### Domain 層
|
|
424
|
+
- `[YourProject].Domain/Entities/[EntityName].cs` - [用途]
|
|
425
|
+
- `[YourProject].Domain/Interfaces/[InterfaceName].cs` - [用途]
|
|
426
|
+
|
|
427
|
+
#### Infrastructure 層
|
|
428
|
+
- `[YourProject].Infrastructure/Repositories/[RepositoryName].cs` - [用途]
|
|
429
|
+
|
|
430
|
+
#### Application 層
|
|
431
|
+
- `[YourProject].Application/[ServiceName].cs` - [用途]
|
|
432
|
+
|
|
433
|
+
#### API 層
|
|
434
|
+
- `[YourProject]/Controllers/[ControllerName].cs` - [用途]
|
|
435
|
+
|
|
436
|
+
#### Job 層
|
|
437
|
+
- `[YourProject]/Jobs/[JobName].cs` - [用途]
|
|
438
|
+
|
|
439
|
+
#### 資料庫
|
|
440
|
+
- 更新 `[YourProject]/assets/[database-file]` 模板(新增 [N] 個資料表)
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
### 8.2 修改檔案清單
|
|
445
|
+
|
|
446
|
+
- `[File1.cs]`
|
|
447
|
+
- [修改說明 1]
|
|
448
|
+
- [修改說明 2]
|
|
449
|
+
|
|
450
|
+
- `[File2.cs]`
|
|
451
|
+
- [修改說明]
|
|
452
|
+
|
|
453
|
+
- `appsettings.json`
|
|
454
|
+
- 新增設定參數
|
|
455
|
+
|
|
456
|
+
- `Program.cs`
|
|
457
|
+
- [修改說明]
|
|
458
|
+
|
|
459
|
+
- `CLAUDE.md`
|
|
460
|
+
- 新增功能說明章節
|
|
461
|
+
|
|
462
|
+
- `README.md`
|
|
463
|
+
- 更新功能清單與 API 文件
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
### 8.3 依賴套件
|
|
468
|
+
|
|
469
|
+
**新增 NuGet 套件**:
|
|
470
|
+
|
|
471
|
+
- **套件名稱**: `[PackageName]`
|
|
472
|
+
- **版本**: [版本號]
|
|
473
|
+
- **用途**: [說明]
|
|
474
|
+
- **授權**: [授權類型]
|
|
475
|
+
- **安裝指令**:
|
|
476
|
+
```bash
|
|
477
|
+
dotnet add [ProjectName] package [PackageName] --version [版本]
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## 九、測試計畫
|
|
483
|
+
|
|
484
|
+
### 9.1 單元測試
|
|
485
|
+
|
|
486
|
+
#### [測試類別 1] 測試
|
|
487
|
+
|
|
488
|
+
- ✅ [測試案例 1]
|
|
489
|
+
- ✅ [測試案例 2]
|
|
490
|
+
- ✅ [測試案例 3]
|
|
491
|
+
|
|
492
|
+
#### [測試類別 2] 測試
|
|
493
|
+
|
|
494
|
+
- ✅ [測試案例 1]
|
|
495
|
+
- ✅ [測試案例 2]
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
### 9.2 效能測試
|
|
500
|
+
|
|
501
|
+
| 測試項目 | 資料量 | 目標耗時 |
|
|
502
|
+
|---------|-------|---------|
|
|
503
|
+
| [項目 1] | [數量] | < [時間] |
|
|
504
|
+
| [項目 2] | [數量] | < [時間] |
|
|
505
|
+
|
|
506
|
+
**記憶體測試**:
|
|
507
|
+
- [場景 1]: 記憶體使用量 < [數字] MB
|
|
508
|
+
- [場景 2]: 記憶體使用量 < [數字] MB
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
### 9.3 整合測試
|
|
513
|
+
|
|
514
|
+
#### 端到端流程測試
|
|
515
|
+
|
|
516
|
+
1. **流程 A: [名稱]**
|
|
517
|
+
- [步驟 1] → [預期結果] ✓
|
|
518
|
+
- [步驟 2] → [預期結果] ✓
|
|
519
|
+
|
|
520
|
+
2. **流程 B: [名稱]**
|
|
521
|
+
- [步驟 1] → [預期結果] ✓
|
|
522
|
+
- [步驟 2] → [預期結果] ✓
|
|
523
|
+
|
|
524
|
+
#### API 端點測試
|
|
525
|
+
|
|
526
|
+
- [API 1] CRUD 操作 ✓
|
|
527
|
+
- [API 2] 權限控制測試 ✓
|
|
528
|
+
- [API 3] 錯誤處理測試 ✓
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
532
|
+
### 9.4 流程測試矩陣 (Flow Test Matrix)
|
|
533
|
+
|
|
534
|
+
<!-- 🔴 對應 2.4 流程規格,含 3 個以上步驟的流程必填 -->
|
|
535
|
+
<!-- 覆蓋策略:預設 Each-Choice;認證/安全/金流 → 升級為 All-Combinations -->
|
|
536
|
+
|
|
537
|
+
#### Decision Table(Each-Choice 最小覆蓋)
|
|
538
|
+
|
|
539
|
+
| 情境 | [決策點 1] | [決策點 2] | 預期終止狀態 |
|
|
540
|
+
|-----|-----------|-----------|------------|
|
|
541
|
+
| S1 | [值] | [值] | `SUCCESS` |
|
|
542
|
+
| S2 | [值] | [值] | `FAIL_[CODE_1]` |
|
|
543
|
+
| S3 | [值] | [值] | `FAIL_[CODE_2]` |
|
|
544
|
+
|
|
545
|
+
#### 最小場景數驗算
|
|
546
|
+
|
|
547
|
+
- 決策點唯一值總數(Each-Choice 公式):[數字]
|
|
548
|
+
- 目前場景數:[數字](≥ 上方數字 ✓)
|
|
549
|
+
- 認證 / 安全關鍵流程 → 升級 All-Combinations:✓ / ✗
|
|
550
|
+
|
|
551
|
+
#### UAT 驗收腳本(從 Decision Table 直接衍生)
|
|
552
|
+
|
|
553
|
+
<!-- 每個 Decision Table 情境對應一列,不另起爐灶;UAT 驗證「定義正確性」,CI 驗證「覆蓋完整性」 -->
|
|
554
|
+
|
|
555
|
+
| UAT 情境 | 操作步驟摘要 | 預期終止狀態 | 測試人員 | 業務確認人 | 簽核 |
|
|
556
|
+
|---------|------------|------------|---------|----------|------|
|
|
557
|
+
| S1 — [情境名稱] | [操作摘要] | `SUCCESS` | [QA] | [業務主管] | □ |
|
|
558
|
+
| S2 — [情境名稱] | [操作摘要] | `FAIL_[CODE_1]` | [QA] | [業務主管] | □ |
|
|
559
|
+
| S3 — [情境名稱] | [操作摘要] | `FAIL_[CODE_2]` | [QA] | [業務主管] | □ |
|
|
560
|
+
|
|
561
|
+
> 若 UAT 過程中發現**未列入**的新終止狀態,須補入 §2.4 + Decision Table + 自動化測試,重跑 Gate 3 後才能繼續 UAT。
|
|
562
|
+
|
|
563
|
+
#### Flow Gate 三階段檢查清單
|
|
564
|
+
|
|
565
|
+
**Gate 0 — PRD 發行前(開始實作前,由 PM / Tech Lead 簽核)**
|
|
566
|
+
|
|
567
|
+
- [ ] §2.4 前置條件已文件化
|
|
568
|
+
- [ ] §2.4 步驟順序已列出
|
|
569
|
+
- [ ] §2.4 所有決策點已萃取
|
|
570
|
+
- [ ] §2.4 所有終止狀態已定義
|
|
571
|
+
- [ ] Decision Table 完整(每個終止狀態 ≥ 1 個情境)
|
|
572
|
+
- [ ] 場景數符合 Each-Choice 最小公式
|
|
573
|
+
- [ ] 關鍵流程(認證/安全/金流)已標注 All-Combinations
|
|
574
|
+
- [ ] UAT 驗收腳本欄位已預填(測試人員 + 業務確認人)
|
|
575
|
+
|
|
576
|
+
**Gate 3 — Pre-UAT 部署前(由 CI 自動驗證 + QA Lead 簽核)**
|
|
577
|
+
|
|
578
|
+
- [ ] CI:Decision Table 所有情境均有對應自動化測試且全部 green
|
|
579
|
+
- [ ] CI:每個終止狀態至少一個測試覆蓋(零遺漏)
|
|
580
|
+
- [ ] CI:branch coverage ≥ 90%(或專案設定閾值)
|
|
581
|
+
- [ ] 關鍵流程(認證/安全):All-Combinations 全場景通過
|
|
582
|
+
- [ ] UAT 驗收腳本的「操作步驟摘要」已由 QA 補齊
|
|
583
|
+
|
|
584
|
+
**Gate 4 — UAT Sign-off(由業務確認人簽核,進入 Pre-Production)**
|
|
585
|
+
|
|
586
|
+
- [ ] 業務確認每個終止狀態的**定義正確**(與實際業務規則相符)
|
|
587
|
+
- [ ] UAT 驗收腳本簽核欄全部勾選
|
|
588
|
+
- [ ] 若 UAT 期間補入新終止狀態 → Gate 3 已重跑且通過
|
|
589
|
+
- [ ] 業務確認人簽核(見十四章)
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
### 9.5 壓力測試 (可選)
|
|
594
|
+
|
|
595
|
+
- 高併發請求 ([數量] requests/sec)
|
|
596
|
+
- 大量資料處理 ([數量] 筆資料)
|
|
597
|
+
- 記憶體洩漏測試 (長時間運行)
|
|
598
|
+
|
|
599
|
+
---
|
|
600
|
+
|
|
601
|
+
## 十、預期效益
|
|
602
|
+
|
|
603
|
+
### 10.1 業務效益
|
|
604
|
+
|
|
605
|
+
<!-- TODO: 質化描述業務價值 -->
|
|
606
|
+
|
|
607
|
+
1. **[效益 1]**: [說明]
|
|
608
|
+
2. **[效益 2]**: [說明]
|
|
609
|
+
3. **[效益 3]**: [說明]
|
|
610
|
+
|
|
611
|
+
### 10.2 技術效益
|
|
612
|
+
|
|
613
|
+
<!-- TODO: 質化描述技術改善 -->
|
|
614
|
+
|
|
615
|
+
1. **[效益 1]**: [說明]
|
|
616
|
+
2. **[效益 2]**: [說明]
|
|
617
|
+
3. **[效益 3]**: [說明]
|
|
618
|
+
|
|
619
|
+
### 10.3 可量化指標
|
|
620
|
+
|
|
621
|
+
假設 [使用情境說明]:
|
|
622
|
+
|
|
623
|
+
| 指標 | 現況 | 新功能上線後 | 改善幅度 |
|
|
624
|
+
|-----|------|------------|---------|
|
|
625
|
+
| [指標 1] | [數字] | [數字] | **↓/↑ [%]** |
|
|
626
|
+
| [指標 2] | [數字] | [數字] | **↓/↑ [%]** |
|
|
627
|
+
| [指標 3] | [數字] | [數字] | **↓/↑ [%]** |
|
|
628
|
+
|
|
629
|
+
*以上數據為預估值,實際效果依 [條件] 而定
|
|
630
|
+
|
|
631
|
+
---
|
|
632
|
+
|
|
633
|
+
## 十一、風險與限制
|
|
634
|
+
|
|
635
|
+
### 11.1 技術限制
|
|
636
|
+
|
|
637
|
+
<!-- TODO: 列出 3-5 個技術限制 -->
|
|
638
|
+
|
|
639
|
+
1. **[限制 1]**:
|
|
640
|
+
- [具體說明]
|
|
641
|
+
- [影響範圍]
|
|
642
|
+
|
|
643
|
+
2. **[限制 2]**:
|
|
644
|
+
- [具體說明]
|
|
645
|
+
- [影響範圍]
|
|
646
|
+
|
|
647
|
+
### 11.2 業務風險
|
|
648
|
+
|
|
649
|
+
<!-- TODO: 列出 2-3 個業務風險 -->
|
|
650
|
+
|
|
651
|
+
1. **[風險 1]**:
|
|
652
|
+
- [風險說明]
|
|
653
|
+
- [可能影響]
|
|
654
|
+
|
|
655
|
+
2. **[風險 2]**:
|
|
656
|
+
- [風險說明]
|
|
657
|
+
- [可能影響]
|
|
658
|
+
|
|
659
|
+
### 11.3 緩解措施
|
|
660
|
+
|
|
661
|
+
| 風險 | 緩解措施 |
|
|
662
|
+
|-----|---------|
|
|
663
|
+
| [風險 1] | [對策說明] |
|
|
664
|
+
| [風險 2] | [對策說明] |
|
|
665
|
+
| [風險 3] | [對策說明] |
|
|
666
|
+
|
|
667
|
+
---
|
|
668
|
+
|
|
669
|
+
## 十二、實作時程估算
|
|
670
|
+
|
|
671
|
+
### 12.1 分階段工時估算
|
|
672
|
+
|
|
673
|
+
| 階段 | 工作項目 | 詳細任務 | 預估工時 |
|
|
674
|
+
|-----|---------|---------|---------|
|
|
675
|
+
| **階段 1** | [項目 1] | - [任務 1]<br>- [任務 2] | **[X] 小時** |
|
|
676
|
+
| **階段 2** | [項目 2] | - [任務 1]<br>- [任務 2] | **[X] 小時** |
|
|
677
|
+
| **階段 3** | [項目 3] | - [任務 1]<br>- [任務 2] | **[X] 小時** |
|
|
678
|
+
| **總計** | | | **[總計] 小時** |
|
|
679
|
+
|
|
680
|
+
### 12.2 里程碑規劃
|
|
681
|
+
|
|
682
|
+
| 里程碑 | 完成標準 | 預計完成日 |
|
|
683
|
+
|-------|---------|-----------|
|
|
684
|
+
| M1: [名稱] | [完成標準] | D+[天數] |
|
|
685
|
+
| M2: [名稱] | [完成標準] | D+[天數] |
|
|
686
|
+
| M3: [名稱] | [完成標準] | D+[天數] |
|
|
687
|
+
| M4: 交付 | [完成標準] | D+[天數] |
|
|
688
|
+
|
|
689
|
+
*D = 開始日期
|
|
690
|
+
|
|
691
|
+
---
|
|
692
|
+
|
|
693
|
+
## 十三、待客戶確認事項
|
|
694
|
+
|
|
695
|
+
### ✅ 已確認需求(請勾選)
|
|
696
|
+
|
|
697
|
+
以下需求已在第二章詳細說明,請確認:
|
|
698
|
+
|
|
699
|
+
- [ ] [需求 1]
|
|
700
|
+
- [ ] [需求 2]
|
|
701
|
+
- [ ] [需求 3]
|
|
702
|
+
- [ ] [需求 4]
|
|
703
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
706
|
+
### ❓ 待決策問題
|
|
707
|
+
|
|
708
|
+
#### 問題 1: [問題描述]
|
|
709
|
+
|
|
710
|
+
**選項**:
|
|
711
|
+
- A. [選項 A 說明]
|
|
712
|
+
- B. [選項 B 說明]
|
|
713
|
+
- C. [選項 C 說明]
|
|
714
|
+
|
|
715
|
+
**建議**: [建議選項與理由]
|
|
716
|
+
|
|
717
|
+
**客戶回覆**: ___________________________
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
721
|
+
#### 問題 2: [問題描述]
|
|
722
|
+
|
|
723
|
+
**選項**:
|
|
724
|
+
- A. [選項 A 說明]
|
|
725
|
+
- B. [選項 B 說明]
|
|
726
|
+
|
|
727
|
+
**建議**: [建議選項與理由]
|
|
728
|
+
|
|
729
|
+
**客戶回覆**: ___________________________
|
|
730
|
+
|
|
731
|
+
---
|
|
732
|
+
|
|
733
|
+
#### 問題 3: [其他建議或疑慮]
|
|
734
|
+
|
|
735
|
+
**客戶回覆**: ___________________________
|
|
736
|
+
|
|
737
|
+
---
|
|
738
|
+
|
|
739
|
+
## 十四、客戶簽核
|
|
740
|
+
|
|
741
|
+
### 需求確認聲明
|
|
742
|
+
|
|
743
|
+
本人已詳閱本需求確認書,並確認以下事項:
|
|
744
|
+
|
|
745
|
+
- [ ] 我已詳閱「第二章:核心需求確認」,確認功能需求無誤
|
|
746
|
+
- [ ] 我已詳閱「第三章:技術方案概要」,確認技術方案可行
|
|
747
|
+
- [ ] 我已詳閱「第十章:預期效益」,確認符合業務需求
|
|
748
|
+
- [ ] 我已了解「第十一章:風險與限制」中的技術限制與業務風險
|
|
749
|
+
- [ ] 我已回覆「第十三章:待客戶確認事項」中的問題
|
|
750
|
+
- [ ] 我同意「第十二章:實作時程估算」中的開發時程([X] 小時)
|
|
751
|
+
|
|
752
|
+
### 變更管理
|
|
753
|
+
|
|
754
|
+
若需求有任何變更,雙方同意:
|
|
755
|
+
|
|
756
|
+
1. 需求變更需重新簽核需求確認書
|
|
757
|
+
2. 影響時程的變更需重新評估工時
|
|
758
|
+
3. 重大變更需重新進行技術評估
|
|
759
|
+
|
|
760
|
+
### 簽核資訊
|
|
761
|
+
|
|
762
|
+
**客戶簽核人**: ___________________________
|
|
763
|
+
|
|
764
|
+
**簽核日期**: ___________________________
|
|
765
|
+
|
|
766
|
+
**公司名稱**: ___________________________
|
|
767
|
+
|
|
768
|
+
**職稱**: ___________________________
|
|
769
|
+
|
|
770
|
+
---
|
|
771
|
+
|
|
772
|
+
## 附錄 A: 資料表結構
|
|
773
|
+
|
|
774
|
+
<!-- 🟡 如果有新增或修改資料表,此附錄必填 -->
|
|
775
|
+
|
|
776
|
+
### A.1 [資料表名稱]
|
|
777
|
+
|
|
778
|
+
```sql
|
|
779
|
+
CREATE TABLE [TableName] (
|
|
780
|
+
[Column1] [DataType] PRIMARY KEY,
|
|
781
|
+
[Column2] [DataType] NOT NULL,
|
|
782
|
+
[Column3] [DataType],
|
|
783
|
+
[CreateTime] TEXT NOT NULL,
|
|
784
|
+
[UpdateTime] TEXT NOT NULL
|
|
785
|
+
);
|
|
786
|
+
|
|
787
|
+
CREATE INDEX idx_[indexname] ON [TableName]([Column]);
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
**欄位說明**:
|
|
791
|
+
|
|
792
|
+
| 欄位名稱 | 資料類型 | 必填 | 說明 |
|
|
793
|
+
|---------|---------|-----|------|
|
|
794
|
+
| [Column1] | [Type] | ✓ | [說明] |
|
|
795
|
+
| [Column2] | [Type] | ✓ | [說明] |
|
|
796
|
+
| [Column3] | [Type] | | [說明] |
|
|
797
|
+
|
|
798
|
+
---
|
|
799
|
+
|
|
800
|
+
## 附錄 B: DTO 定義
|
|
801
|
+
|
|
802
|
+
<!-- 🟡 如果有新增 API 或資料傳輸物件,此附錄必填 -->
|
|
803
|
+
|
|
804
|
+
### B.1 [DTO 名稱]
|
|
805
|
+
|
|
806
|
+
```csharp
|
|
807
|
+
/// <summary>
|
|
808
|
+
/// [用途說明]
|
|
809
|
+
/// </summary>
|
|
810
|
+
public class [DtoName]
|
|
811
|
+
{
|
|
812
|
+
/// <summary>
|
|
813
|
+
/// [欄位說明]
|
|
814
|
+
/// </summary>
|
|
815
|
+
public int Id { get; set; }
|
|
816
|
+
|
|
817
|
+
/// <summary>
|
|
818
|
+
/// [欄位說明]
|
|
819
|
+
/// </summary>
|
|
820
|
+
public string Name { get; set; }
|
|
821
|
+
}
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
826
|
+
## 附錄 C: 列舉型別定義
|
|
827
|
+
|
|
828
|
+
<!-- 🟡 如果有新增 enum,此附錄必填 -->
|
|
829
|
+
|
|
830
|
+
### C.1 [列舉名稱]
|
|
831
|
+
|
|
832
|
+
```csharp
|
|
833
|
+
/// <summary>
|
|
834
|
+
/// [用途說明]
|
|
835
|
+
/// </summary>
|
|
836
|
+
public enum [EnumName]
|
|
837
|
+
{
|
|
838
|
+
/// <summary>
|
|
839
|
+
/// [值說明]
|
|
840
|
+
/// </summary>
|
|
841
|
+
[Value1] = 0,
|
|
842
|
+
|
|
843
|
+
/// <summary>
|
|
844
|
+
/// [值說明]
|
|
845
|
+
/// </summary>
|
|
846
|
+
[Value2] = 1
|
|
847
|
+
}
|
|
848
|
+
```
|
|
849
|
+
|
|
850
|
+
---
|
|
851
|
+
|
|
852
|
+
## 附錄 D: 演算法說明
|
|
853
|
+
|
|
854
|
+
<!-- 🟡 如果使用複雜演算法,此附錄必填 -->
|
|
855
|
+
|
|
856
|
+
### D.1 [演算法名稱]
|
|
857
|
+
|
|
858
|
+
**演算法原理**:
|
|
859
|
+
[說明演算法的核心概念]
|
|
860
|
+
|
|
861
|
+
**時間複雜度**: O([複雜度])
|
|
862
|
+
|
|
863
|
+
**空間複雜度**: O([複雜度])
|
|
864
|
+
|
|
865
|
+
**適用場景**:
|
|
866
|
+
- [場景 1]
|
|
867
|
+
- [場景 2]
|
|
868
|
+
|
|
869
|
+
**範例**:
|
|
870
|
+
```csharp
|
|
871
|
+
// 演算法實作範例
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
---
|
|
875
|
+
|
|
876
|
+
**文件結束**
|
|
877
|
+
|
|
878
|
+
---
|
|
879
|
+
|
|
880
|
+
**版本歷史**:
|
|
881
|
+
- v1.0 (YYYY-MM-DD): 初版發行
|