doc-tspec-autopilot
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesedoc-tspec-autopilot
doc-tspec-autopilot
Purpose
用途
Automated Test Specifications (TSPEC) generation pipeline that processes SPEC documents to generate comprehensive test specifications for UTEST, ITEST, STEST, and FTEST with TASKS-Ready scoring.
Layer: 10
Upstream: SPEC (Layer 9)
Downstream: TASKS (Layer 11)
自动**测试规格(TSPEC)**生成流水线,可处理SPEC文档,生成适用于UTEST、ITEST、STEST和FTEST的全面测试规格,并支持TASKS-Ready评分。
层级: 10
上游: SPEC(层级9)
下游: TASKS(层级11)
Skill Dependencies
技能依赖
| Skill | Purpose | Phase |
|---|---|---|
| Element ID format (TSPEC.NN.TT.SS, codes 40-43) | All Phases |
| Validate SPEC TASKS-Ready score | Phase 2 |
| TSPEC creation rules, test type structure | Phase 3 |
| Real-time quality feedback | Phase 3 |
| Validation with TASKS-Ready scoring | Phase 4 |
| Content review, link validation, quality scoring | Phase 5: Review |
| Apply fixes from review report, create missing files | Phase 5: Fix |
| 技能 | 用途 | 阶段 |
|---|---|---|
| 元素ID格式(TSPEC.NN.TT.SS,编码40-43) | 所有阶段 |
| 验证SPEC的TASKS-Ready评分 | 阶段2 |
| TSPEC创建规则、测试类型结构 | 阶段3 |
| 实时质量反馈 | 阶段3 |
| 结合TASKS-Ready评分进行验证 | 阶段4 |
| 内容审核、链接验证、质量评分 | 阶段5:审核 |
| 应用审核报告中的修复建议,创建缺失文件 | 阶段5:修复 |
Smart Document Detection
智能文档检测
The autopilot automatically determines the action based on the input document type.
该自动化工具可根据输入文档类型自动确定操作。
Input Type Recognition
输入类型识别
| Input | Detected As | Action |
|---|---|---|
| Self type | Review existing TSPEC document |
| Upstream type | Generate if missing, review if exists |
| 输入 | 识别类型 | 操作 |
|---|---|---|
| 自身类型 | 审核现有TSPEC文档 |
| 上游类型 | 若缺失则生成,若存在则审核 |
Detection Algorithm
检测算法
1. Parse input: Extract TYPE and NN from "{TYPE}-{NN}"
2. Determine action:
- IF TYPE == "TSPEC": Review Mode
- ELSE IF TYPE == "SPEC": Generate/Find Mode
- ELSE: Error (invalid type for this autopilot)
3. For Generate/Find Mode:
- Check: Does TSPEC-{NN} exist in docs/10_TSPEC/?
- IF exists: Switch to Review Mode for TSPEC-{NN}
- ELSE: Proceed with Generation from SPEC-{NN}1. 解析输入:从"{TYPE}-{NN}"中提取TYPE和NN
2. 确定操作:
- 若TYPE == "TSPEC":审核模式
- 若TYPE == "SPEC":生成/查找模式
- 其他:报错(该自动化工具不支持此类型)
3. 对于生成/查找模式:
- 检查:docs/10_TSPEC/中是否存在TSPEC-{NN}?
- 若存在:切换至TSPEC-{NN}的审核模式
- 若不存在:从SPEC-{NN}生成TSPECFile Existence Check
文件存在性检查
bash
undefinedbash
undefinedCheck for nested folder structure (mandatory)
检查嵌套文件夹结构(必填)
ls docs/10_TSPEC/TSPEC-{NN}_*/
undefinedls docs/10_TSPEC/TSPEC-{NN}_*/
undefinedExamples
示例
bash
undefinedbash
undefinedReview mode (same type - TSPEC input)
审核模式(输入为自身类型TSPEC)
/doc-tspec-autopilot TSPEC-01 # Reviews existing TSPEC-01
/doc-tspec-autopilot TSPEC-01 # 审核现有TSPEC-01
Generate/Find mode (upstream type - SPEC input)
生成/查找模式(输入为上游类型SPEC)
/doc-tspec-autopilot SPEC-01 # Generates TSPEC-01 if missing, or reviews existing TSPEC-01
/doc-tspec-autopilot SPEC-01 # 若TSPEC-01缺失则生成,若存在则审核
Multiple inputs
多输入处理
/doc-tspec-autopilot SPEC-01,SPEC-02 # Generates/reviews TSPEC-01 and TSPEC-02
/doc-tspec-autopilot TSPEC-01,TSPEC-02 # Reviews TSPEC-01 and TSPEC-02
undefined/doc-tspec-autopilot SPEC-01,SPEC-02 # 生成/审核TSPEC-01和TSPEC-02
/doc-tspec-autopilot TSPEC-01,TSPEC-02 # 审核TSPEC-01和TSPEC-02
undefinedAction Determination Output
操作判定输出
Input: SPEC-01
├── Detected Type: SPEC (upstream)
├── Expected TSPEC: TSPEC-01
├── TSPEC Exists: Yes → docs/10_TSPEC/TSPEC-01_f1_iam/
└── Action: REVIEW MODE - Running doc-tspec-reviewer on TSPEC-01
Input: SPEC-05
├── Detected Type: SPEC (upstream)
├── Expected TSPEC: TSPEC-05
├── TSPEC Exists: No
└── Action: GENERATE MODE - Creating TSPEC-05 from SPEC-05
Input: TSPEC-03
├── Detected Type: TSPEC (self)
└── Action: REVIEW MODE - Running doc-tspec-reviewer on TSPEC-03输入: SPEC-01
├── 识别类型: SPEC(上游)
├── 预期TSPEC: TSPEC-01
├── TSPEC是否存在: 是 → docs/10_TSPEC/TSPEC-01_f1_iam/
└── 操作: 审核模式 - 对TSPEC-01运行doc-tspec-reviewer
输入: SPEC-05
├── 识别类型: SPEC(上游)
├── 预期TSPEC: TSPEC-05
├── TSPEC是否存在: 否
└── 操作: 生成模式 - 从SPEC-05创建TSPEC-05
输入: TSPEC-03
├── 识别类型: TSPEC(自身)
└── 操作: 审核模式 - 对TSPEC-03运行doc-tspec-reviewerWorkflow Overview
工作流概述
mermaid
flowchart TD
subgraph Phase1["Phase 1: SPEC Analysis"]
A[Start] --> B[Read SPEC Documents]
B --> C[Extract Methods]
C --> D[Extract Interfaces]
D --> E[Extract Data Models]
E --> F[Catalog Test Targets]
end
subgraph Phase2["Phase 2: Test Coverage Planning"]
F --> G[Check SPEC TASKS-Ready Score]
G --> H{Score >= 90%?}
H -->|No| I[Flag SPEC Issues]
I --> J{Auto-Fixable?}
J -->|Yes| K[Fix SPEC Issues]
K --> G
J -->|No| L[Abort - Manual Fix Required]
H -->|Yes| M[Plan Test Coverage]
M --> N[Allocate Test Types]
end
subgraph Phase3["Phase 3: TSPEC Generation"]
N --> O[Generate UTEST Specs]
O --> P[Generate ITEST Specs]
P --> Q[Generate STEST Specs]
Q --> R[Generate FTEST Specs]
R --> S[quality-advisor: Real-time Feedback]
S --> T[Build Coverage Matrix]
T --> U[Add Traceability Tags]
U --> V[Write TSPEC Files]
end
subgraph Phase4["Phase 4: TSPEC Validation"]
V --> W[Run doc-tspec-validator]
W --> X{TASKS-Ready >= 90%?}
X -->|No| Y[Auto-Fix TSPEC Issues]
Y --> Z[Re-validate TSPEC]
Z --> X
X -->|Yes| AA[Mark TSPEC Validated]
end
subgraph Phase5["Phase 5: Review & Fix Cycle"]
AA --> AB[Run doc-tspec-reviewer]
AB --> AB2{Score >= 90?}
AB2 -->|No| AB3[Run doc-tspec-fixer]
AB3 --> AB4{Iteration < Max?}
AB4 -->|Yes| AB
AB4 -->|No| AB5[Flag Manual Review]
AB2 -->|Yes| AC[Verify Quality Checks]
AB5 --> AC
AC --> AD[Update Traceability Matrix]
AD --> AE[Generate Summary Report]
end
AE --> AF[Complete]
L --> AG[Exit with Error]mermaid
flowchart TD
subgraph Phase1["阶段1: SPEC分析"]
A[开始] --> B[读取SPEC文档]
B --> C[提取方法]
C --> D[提取接口]
D --> E[提取数据模型]
E --> F[分类测试目标]
end
subgraph Phase2["阶段2: 测试覆盖规划"]
F --> G[检查SPEC的TASKS-Ready评分]
G --> H{评分 >= 90%?}
H -->|否| I[标记SPEC问题]
I --> J{可自动修复?}
J -->|是| K[修复SPEC问题]
K --> G
J -->|否| L[终止 - 需要手动修复]
H -->|是| M[规划测试覆盖]
M --> N[分配测试类型]
end
subgraph Phase3["阶段3: TSPEC生成"]
N --> O[生成UTEST规格]
O --> P[生成ITEST规格]
P --> Q[生成STEST规格]
Q --> R[生成FTEST规格]
R --> S[quality-advisor: 实时反馈]
S --> T[构建覆盖矩阵]
T --> U[添加可追溯性标签]
U --> V[写入TSPEC文件]
end
subgraph Phase4["阶段4: TSPEC验证"]
V --> W[运行doc-tspec-validator]
W --> X{TASKS-Ready >= 90%?}
X -->|否| Y[自动修复TSPEC问题]
Y --> Z[重新验证TSPEC]
Z --> X
X -->|是| AA[标记TSPEC已验证]
end
subgraph Phase5["阶段5: 审核与修复循环"]
AA --> AB[运行doc-tspec-reviewer]
AB --> AB2{评分 >= 90?}
AB2 -->|否| AB3[运行doc-tspec-fixer]
AB3 --> AB4{迭代次数 < 最大值?}
AB4 -->|是| AB
AB4 -->|否| AB5[标记为需要手动审核]
AB2 -->|是| AC[验证质量检查项]
AB5 --> AC
AC --> AD[更新可追溯性矩阵]
AD --> AE[生成汇总报告]
end
AE --> AF[完成]
L --> AG[报错退出]Test Types
测试类型
| Type | Code | Purpose | Target |
|---|---|---|---|
| UTEST | 40 | Unit tests | Individual functions/methods |
| ITEST | 41 | Integration tests | Component interactions |
| STEST | 42 | Smoke tests | Critical path verification |
| FTEST | 43 | Functional tests | End-to-end workflows |
| 类型 | 编码 | 用途 | 目标 |
|---|---|---|---|
| UTEST | 40 | 单元测试 | 独立函数/方法 |
| ITEST | 41 | 集成测试 | 组件交互 |
| STEST | 42 | 冒烟测试 | 关键路径验证 |
| FTEST | 43 | 功能测试 | 端到端工作流 |
TSPEC Structure
TSPEC结构
All TSPEC use nested folders (). This keeps test specification files and companion files organized together.
TSPEC-NN_{slug}/docs/10_TSPEC/
├── TSPEC-01_authentication/
│ ├── TSPEC-01.0_index.md # Suite index
│ ├── TSPEC-01.1_utest.md # Unit tests
│ ├── TSPEC-01.2_itest.md # Integration tests
│ ├── TSPEC-01.3_stest.md # Smoke tests
│ ├── TSPEC-01.4_ftest.md # Functional tests
│ ├── TSPEC-01.R_review_report_v001.md # Review report
│ ├── TSPEC-01.F_fix_report_v001.md # Fix report
│ └── .drift_cache.json # Drift cache
└── TSPEC-01_authentication.md # Redirect stub (optional)所有TSPEC均使用嵌套文件夹()。这样可将测试规格文件和配套文件统一管理。
TSPEC-NN_{slug}/docs/10_TSPEC/
├── TSPEC-01_authentication/
│ ├── TSPEC-01.0_index.md # 套件索引
│ ├── TSPEC-01.1_utest.md # 单元测试
│ ├── TSPEC-01.2_itest.md # 集成测试
│ ├── TSPEC-01.3_stest.md # 冒烟测试
│ ├── TSPEC-01.4_ftest.md # 功能测试
│ ├── TSPEC-01.R_review_report_v001.md # 审核报告
│ ├── TSPEC-01.F_fix_report_v001.md # 修复报告
│ └── .drift_cache.json # 漂移缓存
└── TSPEC-01_authentication.md # 重定向存根(可选)Coverage Matrix Format
覆盖矩阵格式
| SPEC Element | UTEST | ITEST | STEST | FTEST | Coverage |
|---|---|---|---|---|---|
| SPEC.01.28.01 | TSPEC.01.40.01 | TSPEC.01.41.01 | TSPEC.01.42.01 | - | 75% |
| SPEC.01.28.02 | TSPEC.01.40.02 | TSPEC.01.41.02 | - | TSPEC.01.43.01 | 75% |
| SPEC元素 | UTEST | ITEST | STEST | FTEST | 覆盖率 |
|---|---|---|---|---|---|
| SPEC.01.28.01 | TSPEC.01.40.01 | TSPEC.01.41.01 | TSPEC.01.42.01 | - | 75% |
| SPEC.01.28.02 | TSPEC.01.40.02 | TSPEC.01.41.02 | - | TSPEC.01.43.01 | 75% |
Element ID Format
元素ID格式
| Test Type | Code | Pattern | Example |
|---|---|---|---|
| UTEST | 40 | TSPEC.NN.40.SS | TSPEC.01.40.01 |
| ITEST | 41 | TSPEC.NN.41.SS | TSPEC.01.41.01 |
| STEST | 42 | TSPEC.NN.42.SS | TSPEC.01.42.01 |
| FTEST | 43 | TSPEC.NN.43.SS | TSPEC.01.43.01 |
| 测试类型 | 编码 | 格式 | 示例 |
|---|---|---|---|
| UTEST | 40 | TSPEC.NN.40.SS | TSPEC.01.40.01 |
| ITEST | 41 | TSPEC.NN.41.SS | TSPEC.01.41.01 |
| STEST | 42 | TSPEC.NN.42.SS | TSPEC.01.42.01 |
| FTEST | 43 | TSPEC.NN.43.SS | TSPEC.01.43.01 |
Phase 5: Review & Fix Cycle (v2.3)
阶段5: 审核与修复循环(v2.3)
Iterative review and fix cycle to ensure TSPEC quality before completion.
mermaid
flowchart TD
A[Phase 5 Start] --> B[Run doc-tspec-reviewer]
B --> C[Generate Review Report]
C --> D{Review Score >= 90?}
D -->|Yes| E[PASS - Proceed to Phase 6]
D -->|No| F{Iteration < Max?}
F -->|Yes| G[Run doc-tspec-fixer]
G --> H[Apply Fixes]
H --> I[Generate Fix Report]
I --> J[Increment Iteration]
J --> B
F -->|No| K[Flag for Manual Review]
K --> L[Generate Final Report with Remaining Issues]
L --> E在完成前通过迭代式审核与修复循环确保TSPEC质量。
mermaid
flowchart TD
A[阶段5开始] --> B[运行doc-tspec-reviewer]
B --> C[生成审核报告]
C --> D{审核评分 >= 90?}
D -->|是| E[通过 - 进入阶段6]
D -->|否| F{迭代次数 < 最大值?}
F -->|是| G[运行doc-tspec-fixer]
G --> H[应用修复]
H --> I[生成修复报告]
I --> J[增加迭代次数]
J --> B
F -->|否| K[标记为需要手动审核]
K --> L[生成包含剩余问题的最终报告]
L --> E5.1 Initial Review
5.1 初始审核
Run to identify issues.
doc-tspec-reviewerbash
/doc-tspec-reviewer TSPEC-NNOutput:
TSPEC-NN.R_review_report_v001.md运行识别问题。
doc-tspec-reviewerbash
/doc-tspec-reviewer TSPEC-NN输出:
TSPEC-NN.R_review_report_v001.md5.2 Fix Cycle
5.2 修复循环
If review score < 90%, invoke .
doc-tspec-fixerbash
/doc-tspec-fixer TSPEC-NN --revalidateFix Categories:
| Category | Fixes Applied |
|---|---|
| Missing Test Types | Create missing UTEST/ITEST/STEST/FTEST files |
| Broken Links | Update SPEC references |
| Element IDs | Convert legacy patterns (UT-XXX, IT-XXX, etc.) |
| Coverage Matrix | Regenerate from test specifications |
| Test Structure | Add missing sections per test type template |
| Traceability | Update cumulative tags (8 layers) |
Output:
TSPEC-NN.F_fix_report_v001.md若审核评分 < 90%,调用。
doc-tspec-fixerbash
/doc-tspec-fixer TSPEC-NN --revalidate修复类别:
| 类别 | 应用的修复 |
|---|---|
| 缺失测试类型 | 创建缺失的UTEST/ITEST/STEST/FTEST文件 |
| 链接损坏 | 更新SPEC引用 |
| 元素ID | 转换旧格式(UT-XXX、IT-XXX等) |
| 覆盖矩阵 | 从测试规格重新生成 |
| 测试结构 | 按测试类型模板添加缺失章节 |
| 可追溯性 | 更新累计标签(8层) |
输出:
TSPEC-NN.F_fix_report_v001.md5.3 Re-Review
5.3 重新审核
After fixes, automatically re-run reviewer.
bash
/doc-tspec-reviewer TSPEC-NNOutput:
TSPEC-NN.R_review_report_v002.md修复后自动重新运行审核工具。
bash
/doc-tspec-reviewer TSPEC-NN输出:
TSPEC-NN.R_review_report_v002.md5.4 Iteration Control
5.4 迭代控制
| Parameter | Default | Description |
|---|---|---|
| 3 | Maximum fix-review cycles |
| 90 | Minimum passing score |
| false | Stop if only manual issues remain |
Iteration Example:
Iteration 1:
Review v001: Score 78 (2 errors, 6 warnings)
Fix v001: Fixed 5 issues, created 1 test file
Iteration 2:
Review v002: Score 91 (0 errors, 2 warnings)
Status: PASS (score >= 90)| 参数 | 默认值 | 描述 |
|---|---|---|
| 3 | 最大修复-审核循环次数 |
| 90 | 最低合格分数 |
| false | 若仅剩余手动问题则终止 |
迭代示例:
迭代1:
审核v001: 评分78(2个错误,6个警告)
修复v001: 修复5个问题,创建1个测试文件
迭代2:
审核v002: 评分91(0个错误,2个警告)
状态: 通过(评分 >= 90)5.5 Quality Checks (Post-Fix)
5.5 质量检查(修复后)
After passing the fix cycle:
-
Test Type Completeness:
- All 4 test types present (UTEST, ITEST, STEST, FTEST)
- Each test type file has required sections
- No placeholder text remaining
-
Coverage Matrix Accuracy:
- All SPEC elements have test coverage
- Coverage percentages calculated correctly
- Target coverage met per test type
-
Element ID Compliance (perskill):
doc-naming- All IDs use TSPEC.NN.TT.SS format
- Element type codes valid for TSPEC (40, 41, 42, 43)
- No legacy patterns (UT-XXX, IT-XXX, ST-XXX, FT-XXX)
-
TASKS-Ready Report:
TASKS-Ready Score Breakdown =========================== Test Type Completeness: 25/25 (all 4 types present) Coverage Matrix: 18/20 (coverage targets met) SPEC Alignment: 20/20 (tests trace to SPEC) Element ID Format: 15/15 (valid format) Traceability Tags: 10/10 (8 required tags) Test Assertions: 8/10 (assertions present) ---------------------------- Total TASKS-Ready Score: 96/100 (Target: >= 90) Status: READY FOR TASKS GENERATION -
Traceability Matrix Update:bash
# Update TSPEC traceability python ai_dev_flow/scripts/update_traceability_matrix.py \ --tspec docs/10_TSPEC/TSPEC-NN_{slug}/ \ --matrix docs/10_TSPEC/TSPEC-00_TRACEABILITY_MATRIX.md
通过修复循环后:
-
测试类型完整性:
- 包含全部4种测试类型(UTEST、ITEST、STEST、FTEST)
- 每个测试类型文件包含必填章节
- 无占位文本残留
-
覆盖矩阵准确性:
- 所有SPEC元素均有测试覆盖
- 覆盖率计算正确
- 达到各测试类型的覆盖率目标
-
元素ID合规性(符合技能要求):
doc-naming- 所有ID均使用TSPEC.NN.TT.SS格式
- 元素类型编码符合TSPEC要求(40、41、42、43)
- 无旧格式(UT-XXX、IT-XXX、ST-XXX、FT-XXX)
-
TASKS-Ready报告:
TASKS-Ready评分明细 =========================== 测试类型完整性: 25/25(包含全部4种类型) 覆盖矩阵: 18/20(达到覆盖率目标) SPEC对齐: 20/20(测试可追溯至SPEC) 元素ID格式: 15/15(格式有效) 可追溯性标签: 10/10(包含8个必填标签) 测试断言: 8/10(存在断言) ---------------------------- 总TASKS-Ready评分: 96/100(目标: >= 90) 状态: 已准备好生成TASKS -
可追溯性矩阵更新:bash
# 更新TSPEC可追溯性 python ai_dev_flow/scripts/update_traceability_matrix.py \ --tspec docs/10_TSPEC/TSPEC-NN_{slug}/ \ --matrix docs/10_TSPEC/TSPEC-00_TRACEABILITY_MATRIX.md
Cumulative Tags (8 Required)
累计标签(8个必填)
markdown
@brd: BRD.NN.TT.SS
@prd: PRD.NN.TT.SS
@ears: EARS.NN.TT.SS
@bdd: BDD.NN.TT.SS
@adr: ADR-NN
@sys: SYS.NN.TT.SS
@req: REQ.NN.TT.SS
@spec: SPEC.NN.TT.SS
@ctr: CTR.NN.TT.SS # Optionalmarkdown
@brd: BRD.NN.TT.SS
@prd: PRD.NN.TT.SS
@ears: EARS.NN.TT.SS
@bdd: BDD.NN.TT.SS
@adr: ADR-NN
@sys: SYS.NN.TT.SS
@req: REQ.NN.TT.SS
@spec: SPEC.NN.TT.SS
@ctr: CTR.NN.TT.SS # 可选Configuration
配置
Default Configuration
默认配置
yaml
tspec_autopilot:
version: "1.0"
scoring:
tasks_ready_min: 90
strict_mode: false
execution:
max_parallel: 3 # HARD LIMIT - do not exceed
chunk_size: 3 # Documents per chunk
pause_between_chunks: true
auto_fix: true
continue_on_error: false
timeout_per_spec: 180 # seconds
output:
structure: sectioned # 4 test type files per TSPEC
report_format: markdown
validation:
skip_validation: false
fix_iterations_max: 3
test_types:
utest: true
itest: true
stest: true
ftest: trueyaml
tspec_autopilot:
version: "1.0"
scoring:
tasks_ready_min: 90
strict_mode: false
execution:
max_parallel: 3 # 硬限制 - 请勿超过
chunk_size: 3 # 每个批次的文档数
pause_between_chunks: true
auto_fix: true
continue_on_error: false
timeout_per_spec: 180 # 秒
output:
structure: sectioned # 每个TSPEC对应4个测试类型文件
report_format: markdown
validation:
skip_validation: false
fix_iterations_max: 3
test_types:
utest: true
itest: true
stest: true
ftest: trueExecution Modes
执行模式
Mode 1: Generate Mode (Default)
模式1: 生成模式(默认)
Standard TSPEC generation from SPEC documents (see Workflow Overview above).
从SPEC文档生成TSPEC的标准模式(见上方工作流概述)。
Mode 2: Review Mode (v2.1)
模式2: 审核模式(v2.1)
Validate existing TSPEC documents without modification. Generates quality report with actionable recommendations.
Command:
bash
undefined验证现有TSPEC文档但不修改。生成包含可操作建议的质量报告。
命令:
bash
undefinedReview single TSPEC
审核单个TSPEC
/doc-tspec-autopilot TSPEC-01 --review
/doc-tspec-autopilot TSPEC-01 --review
Review all TSPEC in directory
审核目录下所有TSPEC
/doc-tspec-autopilot docs/10_TSPEC/ --review --all
/doc-tspec-autopilot docs/10_TSPEC/ --review --all
Review with detailed report
生成详细审核报告
/doc-tspec-autopilot TSPEC-01 --review --verbose
**Review Process**:
```mermaid
flowchart TD
A[Input: TSPEC Document] --> B[Load TSPEC Content]
B --> C[Validate Test Structure]
C --> D[Check TASKS-Ready Score]
D --> E[Verify All 4 Test Types]
E --> F[Validate Coverage Matrix]
F --> G[Check Element IDs]
G --> H[Verify Cumulative Tags]
H --> I[Generate Review Report]
I --> J{Issues Found?}
J -->|Yes| K[Categorize Issues]
K --> L[Generate Fix Recommendations]
L --> M[Output Review Report]
J -->|No| MReview Report Template:
markdown
undefined/doc-tspec-autopilot TSPEC-01 --review --verbose
**审核流程**:
```mermaid
flowchart TD
A[输入: TSPEC文档] --> B[加载TSPEC内容]
B --> C[验证测试结构]
C --> D[检查TASKS-Ready评分]
D --> E[验证全部4种测试类型]
E --> F[验证覆盖矩阵]
F --> G[检查元素ID]
G --> H[验证累计标签]
H --> I[生成审核报告]
I --> J{发现问题?}
J -->|是| K[分类问题]
K --> L[生成修复建议]
L --> M[输出审核报告]
J -->|否| M审核报告模板:
markdown
undefinedTSPEC Review Report: TSPEC-NN_{slug}
TSPEC审核报告: TSPEC-NN_{slug}
Summary
摘要
- TASKS-Ready Score: NN% (✅/🟡/❌)
- Total Issues: N (E errors, W warnings)
- Auto-Fixable: N issues
- Manual Review: N issues
- TASKS-Ready评分: NN% (✅/🟡/❌)
- 总问题数: N(E个错误,W个警告)
- 可自动修复: N个问题
- 需手动审核: N个问题
Test Type Coverage
测试类型覆盖
| Type | File | Tests | Coverage | Status |
|---|---|---|---|---|
| UTEST | TSPEC-NN.1_utest.md | N | NN% | ✅/🟡/❌ |
| ITEST | TSPEC-NN.2_itest.md | N | NN% | ✅/🟡/❌ |
| STEST | TSPEC-NN.3_stest.md | N | NN% | ✅/🟡/❌ |
| FTEST | TSPEC-NN.4_ftest.md | N | NN% | ✅/🟡/❌ |
| 类型 | 文件 | 测试数 | 覆盖率 | 状态 |
|---|---|---|---|---|
| UTEST | TSPEC-NN.1_utest.md | N | NN% | ✅/🟡/❌ |
| ITEST | TSPEC-NN.2_itest.md | N | NN% | ✅/🟡/❌ |
| STEST | TSPEC-NN.3_stest.md | N | NN% | ✅/🟡/❌ |
| FTEST | TSPEC-NN.4_ftest.md | N | NN% | ✅/🟡/❌ |
Score Breakdown
评分明细
| Category | Score | Max | Status |
|---|---|---|---|
| Test Type Completeness | NN | 25 | ✅/🟡/❌ |
| Coverage Matrix | NN | 20 | ✅/🟡/❌ |
| SPEC Alignment | NN | 20 | ✅/🟡/❌ |
| Element ID Format | NN | 15 | ✅/🟡/❌ |
| Traceability Tags | NN | 10 | ✅/🟡/❌ |
| Test Assertions | NN | 10 | ✅/🟡/❌ |
| 类别 | 得分 | 满分 | 状态 |
|---|---|---|---|
| 测试类型完整性 | NN | 25 | ✅/🟡/❌ |
| 覆盖矩阵 | NN | 20 | ✅/🟡/❌ |
| SPEC对齐 | NN | 20 | ✅/🟡/❌ |
| 元素ID格式 | NN | 15 | ✅/🟡/❌ |
| 可追溯性标签 | NN | 10 | ✅/🟡/❌ |
| 测试断言 | NN | 10 | ✅/🟡/❌ |
Issues by Category
问题分类
Auto-Fixable Issues
可自动修复问题
| Issue | Location | Fix Action |
|---|---|---|
| Legacy ID pattern | Line 45 | Convert UT-001 → TSPEC.01.40.01 |
| Missing cumulative tag | Traceability | Add @req: REQ.01.01.01 |
| 问题 | 位置 | 修复操作 |
|---|---|---|
| 旧ID格式 | 第45行 | 转换UT-001 → TSPEC.01.40.01 |
| 缺失累计标签 | 可追溯性部分 | 添加@req: REQ.01.01.01 |
Manual Review Required
需手动审核
| Issue | Location | Recommendation |
|---|---|---|
| Missing STEST file | TSPEC-01.3 | Create smoke test specifications |
| Low coverage | SPEC.01.28.05 | Add unit tests for method |
**Score Indicators**:
- ✅ Green (>=90%): TASKS-Ready
- 🟡 Yellow (70-89%): Needs improvement
- ❌ Red (<70%): Significant issues
**Review Configuration**:
```yaml
review_mode:
enabled: true
checks:
- test_structure # All 4 test type files present
- coverage_matrix # Coverage >= target per SPEC element
- spec_alignment # Tests trace to SPEC methods
- element_ids # TSPEC.NN.40-43.SS format
- cumulative_tags # 8 required tags present
- test_assertions # Each test has clear assertions
output:
format: markdown # markdown, json, html
include_recommendations: true
include_fix_commands: true
coverage_targets:
utest: 95 # Unit test coverage target %
itest: 85 # Integration test coverage target %
stest: 100 # Smoke test must cover critical path
ftest: 75 # Functional test coverage target %| 问题 | 位置 | 建议 |
|---|---|---|
| 缺失STEST文件 | TSPEC-01.3 | 创建冒烟测试规格 |
| 覆盖率低 | SPEC.01.28.05 | 为方法添加单元测试 |
**评分指示器**:
- ✅ 绿色 (>=90%): 已准备好TASKS
- 🟡 黄色 (70-89%): 需要改进
- ❌ 红色 (<70%): 存在严重问题
**审核配置**:
```yaml
review_mode:
enabled: true
checks:
- test_structure # 包含全部4种测试类型文件
- coverage_matrix # 每个SPEC元素覆盖率 >= 目标
- spec_alignment # 测试可追溯至SPEC方法
- element_ids # 符合TSPEC.NN.40-43.SS格式
- cumulative_tags # 包含8个必填标签
- test_assertions # 每个测试有明确断言
output:
format: markdown # markdown, json, html
include_recommendations: true
include_fix_commands: true
coverage_targets:
utest: 95 # 单元测试覆盖率目标 %
itest: 85 # 集成测试覆盖率目标 %
stest: 100 # 冒烟测试必须覆盖关键路径
ftest: 75 # 功能测试覆盖率目标 %Mode 3: Fix Mode (v2.1)
模式3: 修复模式(v2.1)
Auto-repair existing TSPEC documents with backup and content preservation.
Command:
bash
undefined自动修复现有TSPEC文档,同时备份并保留内容。
命令:
bash
undefinedFix single TSPEC
修复单个TSPEC
/doc-tspec-autopilot TSPEC-01 --fix
/doc-tspec-autopilot TSPEC-01 --fix
Fix with backup
修复并备份
/doc-tspec-autopilot TSPEC-01 --fix --backup
/doc-tspec-autopilot TSPEC-01 --fix --backup
Fix all TSPEC
修复所有TSPEC
/doc-tspec-autopilot docs/10_TSPEC/ --fix --all
/doc-tspec-autopilot docs/10_TSPEC/ --fix --all
Fix specific categories only
仅修复特定类别
/doc-tspec-autopilot TSPEC-01 --fix --only element_ids,tags
/doc-tspec-autopilot TSPEC-01 --fix --only element_ids,tags
Dry-run fix (preview changes)
试运行修复(预览更改)
/doc-tspec-autopilot TSPEC-01 --fix --dry-run
**Fix Process**:
```mermaid
flowchart TD
A[Input: TSPEC Document] --> B[Create Backup]
B --> C[Load TSPEC Content]
C --> D[Run Review Analysis]
D --> E{Auto-Fixable Issues?}
E -->|No| F[Report: No Fixes Needed]
E -->|Yes| G[Apply Fixes by Category]
subgraph FixCategories["Fix Categories"]
G --> H[Fix Element IDs]
H --> I[Fix Test Type Structure]
I --> J[Regenerate Coverage Matrix]
J --> K[Add Missing Tags]
K --> L[Fix Section Structure]
L --> M[Add Missing Test Stubs]
end
M --> N[Validate Fixed Document]
N --> O{Validation Passed?}
O -->|No| P[Rollback to Backup]
P --> Q[Report: Fix Failed]
O -->|Yes| R[Save Fixed Document]
R --> S[Generate Fix Report]TSPEC-Specific Fix Categories:
| Category | Description | Auto-Fix Actions |
|---|---|---|
| Element ID format | Convert legacy patterns to TSPEC.NN.TT.SS |
| Test type files | Create missing UTEST/ITEST/STEST/FTEST files |
| Coverage tracking | Regenerate matrix from test specifications |
| Traceability tags | Add missing 8 upstream tags |
| Section structure | Add missing sections per test type template |
| Missing tests | Generate test stubs for uncovered SPEC elements |
| Test assertions | Flag tests without assertions (manual fix) |
Element ID Migration (Layer 10):
| Legacy Pattern | New Format | Example |
|---|---|---|
| UT-NNN | TSPEC.NN.40.SS | UT-001 → TSPEC.01.40.01 |
| IT-NNN | TSPEC.NN.41.SS | IT-001 → TSPEC.01.41.01 |
| ST-NNN | TSPEC.NN.42.SS | ST-001 → TSPEC.01.42.01 |
| FT-NNN | TSPEC.NN.43.SS | FT-001 → TSPEC.01.43.01 |
| TC-NNN | TSPEC.NN.40.SS | TC-001 → TSPEC.01.40.01 (assume UTEST) |
| TEST-NNN | TSPEC.NN.43.SS | TEST-001 → TSPEC.01.43.01 (assume FTEST) |
Content Preservation Rules:
| Content Type | Preservation Rule |
|---|---|
| Custom test descriptions | Never delete, only enhance metadata |
| Test assertions | Preserve all test logic |
| Test data/fixtures | Preserve all test data definitions |
| SPEC references | Validate and update format only |
| Coverage percentages | Recalculate after fixes |
| Test prerequisites | Preserve setup/teardown logic |
Fix Configuration:
yaml
fix_mode:
enabled: true
backup:
enabled: true
location: "tmp/backups/"
timestamp: true
fix_categories:
element_ids: true # Convert legacy ID patterns
test_types: true # Create missing test type files
coverage_matrix: true # Regenerate coverage tracking
cumulative_tags: true # Add 8 required tags
sections: true # Add missing sections
test_stubs: true # Generate stubs for uncovered SPEC
assertions: false # Manual only (flag but don't auto-fix)
validation:
post_fix: true # Validate after fixes
rollback_on_fail: true # Restore backup if validation fails
preserve:
test_descriptions: true
test_assertions: true
test_data: true
spec_references: trueFix Report Template:
markdown
undefined/doc-tspec-autopilot TSPEC-01 --fix --dry-run
**修复流程**:
```mermaid
flowchart TD
A[输入: TSPEC文档] --> B[创建备份]
B --> C[加载TSPEC内容]
C --> D[运行审核分析]
D --> E{存在可自动修复问题?}
E -->|否| F[报告: 无需修复]
E -->|是| G[按类别应用修复]
subgraph FixCategories["修复类别"]
G --> H[修复元素ID]
H --> I[修复测试类型结构]
I --> J[重新生成覆盖矩阵]
J --> K[添加缺失标签]
K --> L[修复章节结构]
L --> M[添加缺失测试存根]
end
M --> N[验证修复后的文档]
N --> O{验证通过?}
O -->|否| P[回滚至备份]
P --> Q[报告: 修复失败]
O -->|是| R[保存修复后的文档]
R --> S[生成修复报告]TSPEC专属修复类别:
| 类别 | 描述 | 自动修复操作 |
|---|---|---|
| 元素ID格式 | 将旧格式转换为TSPEC.NN.TT.SS |
| 测试类型文件 | 创建缺失的UTEST/ITEST/STEST/FTEST文件 |
| 覆盖追踪 | 从测试规格重新生成矩阵 |
| 可追溯性标签 | 添加缺失的8个上游标签 |
| 章节结构 | 按测试类型模板添加缺失章节 |
| 缺失测试 | 为未覆盖的SPEC元素生成测试存根 |
| 测试断言 | 标记无断言的测试(需手动修复) |
元素ID迁移(层级10):
| 旧格式 | 新格式 | 示例 |
|---|---|---|
| UT-NNN | TSPEC.NN.40.SS | UT-001 → TSPEC.01.40.01 |
| IT-NNN | TSPEC.NN.41.SS | IT-001 → TSPEC.01.41.01 |
| ST-NNN | TSPEC.NN.42.SS | ST-001 → TSPEC.01.42.01 |
| FT-NNN | TSPEC.NN.43.SS | FT-001 → TSPEC.01.43.01 |
| TC-NNN | TSPEC.NN.40.SS | TC-001 → TSPEC.01.40.01(默认视为UTEST) |
| TEST-NNN | TSPEC.NN.43.SS | TEST-001 → TSPEC.01.43.01(默认视为FTEST) |
内容保留规则:
| 内容类型 | 保留规则 |
|---|---|
| 自定义测试描述 | 绝不删除,仅增强元数据 |
| 测试断言 | 保留所有测试逻辑 |
| 测试数据/夹具 | 保留所有测试数据定义 |
| SPEC引用 | 仅验证并更新格式 |
| 覆盖率百分比 | 修复后重新计算 |
| 测试前置条件 | 保留设置/清理逻辑 |
修复配置:
yaml
fix_mode:
enabled: true
backup:
enabled: true
location: "tmp/backups/"
timestamp: true
fix_categories:
element_ids: true # 转换旧ID格式
test_types: true # 创建缺失的测试类型文件
coverage_matrix: true # 重新生成覆盖追踪
cumulative_tags: true # 添加8个必填标签
sections: true # 添加缺失章节
test_stubs: true # 为未覆盖的SPEC生成存根
assertions: false # 仅手动修复(标记但不自动修复)
validation:
post_fix: true # 修复后验证
rollback_on_fail: true # 若验证失败则恢复备份
preserve:
test_descriptions: true
test_assertions: true
test_data: true
spec_references: true修复报告模板:
markdown
undefinedTSPEC Fix Report: TSPEC-NN_{slug}
TSPEC修复报告: TSPEC-NN_{slug}
Summary
摘要
- Backup Created: tmp/backups/TSPEC-NN_{slug}_20260209_143022/
- Issues Fixed: N of M auto-fixable issues
- Manual Review: N issues flagged
- 已创建备份: tmp/backups/TSPEC-NN_{slug}_20260209_143022/
- 已修复问题: M个可自动修复问题中的N个
- 需手动审核: N个已标记问题
Fixes Applied
应用的修复
Element ID Migration
元素ID迁移
| Original | Fixed | File | Location |
|---|---|---|---|
| UT-001 | TSPEC.01.40.01 | TSPEC-01.1_utest.md | Line 45 |
| IT-001 | TSPEC.01.41.01 | TSPEC-01.2_itest.md | Line 23 |
| ST-001 | TSPEC.01.42.01 | TSPEC-01.3_stest.md | Line 12 |
| 原ID | 修复后ID | 文件 | 位置 |
|---|---|---|---|
| UT-001 | TSPEC.01.40.01 | TSPEC-01.1_utest.md | 第45行 |
| IT-001 | TSPEC.01.41.01 | TSPEC-01.2_itest.md | 第23行 |
| ST-001 | TSPEC.01.42.01 | TSPEC-01.3_stest.md | 第12行 |
Test Type Files Created
创建的测试类型文件
| File | Tests Generated | Status |
|---|---|---|
| TSPEC-01.3_stest.md | 5 smoke tests | Created from template |
| 文件 | 生成的测试数 | 状态 |
|---|---|---|
| TSPEC-01.3_stest.md | 5个冒烟测试 | 从模板创建 |
Coverage Matrix Regenerated
重新生成的覆盖矩阵
| SPEC Element | Before | After |
|---|---|---|
| SPEC.01.28.01 | 50% | 75% |
| SPEC.01.28.02 | 25% | 75% |
| Overall | 45% | 78% |
| SPEC元素 | 修复前 | 修复后 |
|---|---|---|
| SPEC.01.28.01 | 50% | 75% |
| SPEC.01.28.02 | 25% | 75% |
| 整体 | 45% | 78% |
Cumulative Tags Added
添加的累计标签
- @ears: EARS.01.25.001 (added)
- @sys: SYS.01.01.01 (added)
- @req: REQ.01.01.01 (added)
- @ears: EARS.01.25.001(已添加)
- @sys: SYS.01.01.01(已添加)
- @req: REQ.01.01.01(已添加)
Test Stubs Generated
生成的测试存根
| SPEC Element | Test Type | Stub ID |
|---|---|---|
| SPEC.01.28.05 | UTEST | TSPEC.01.40.12 |
| SPEC.01.28.05 | ITEST | TSPEC.01.41.08 |
| SPEC元素 | 测试类型 | 存根ID |
|---|---|---|
| SPEC.01.28.05 | UTEST | TSPEC.01.40.12 |
| SPEC.01.28.05 | ITEST | TSPEC.01.41.08 |
Manual Review Required
需手动审核
Tests Without Assertions
无断言的测试
| Test ID | File | Issue |
|---|---|---|
| TSPEC.01.40.03 | TSPEC-01.1_utest.md | No assert statements |
| TSPEC.01.41.02 | TSPEC-01.2_itest.md | Missing expected outcome |
| 测试ID | 文件 | 问题 |
|---|---|---|
| TSPEC.01.40.03 | TSPEC-01.1_utest.md | 无断言语句 |
| TSPEC.01.41.02 | TSPEC-01.2_itest.md | 缺失预期结果 |
Low Coverage Areas
覆盖率低的区域
| SPEC Element | Current | Target | Action Needed |
|---|---|---|---|
| SPEC.01.28.07 | 25% | 75% | Add 3+ UTEST, 1+ ITEST |
| SPEC元素 | 当前覆盖率 | 目标 | 需执行操作 |
|---|---|---|---|
| SPEC.01.28.07 | 25% | 75% | 添加3+个UTEST、1+个ITEST |
Validation Results
验证结果
- TASKS-Ready Score: Before: 68% → After: 92%
- Validation Errors: Before: 12 → After: 0
- Status: ✅ All auto-fixes validated
**Command Line Options** (Review/Fix Modes):
| Option | Default | Description |
|--------|---------|-------------|
| `--review` | false | Run review mode only |
| `--fix` | false | Run fix mode |
| `--backup` | true | Create backup before fixing |
| `--dry-run` | false | Preview fixes without applying |
| `--only` | all | Comma-separated fix categories |
| `--verbose` | false | Detailed output |
| `--all` | false | Process all TSPEC in directory |
| `--output-format` | markdown | Report format (markdown, json) |
| `--generate-stubs` | true | Generate test stubs for uncovered SPEC |
| `--test-types` | all | Comma-separated test types to fix |
---- TASKS-Ready评分: 修复前: 68% → 修复后: 92%
- 验证错误数: 修复前: 12 → 修复后: 0
- 状态: ✅ 所有自动修复已通过验证
**命令行选项**(审核/修复模式):
| 选项 | 默认值 | 描述 |
|--------|---------|-------------|
| `--review` | false | 仅运行审核模式 |
| `--fix` | false | 运行修复模式 |
| `--backup` | true | 修复前创建备份 |
| `--dry-run` | false | 预览修复但不应用 |
| `--only` | all | 逗号分隔的修复类别 |
| `--verbose` | false | 详细输出 |
| `--all` | false | 处理目录下所有TSPEC |
| `--output-format` | markdown | 报告格式(markdown, json) |
| `--generate-stubs` | true | 为未覆盖的SPEC生成测试存根 |
| `--test-types` | all | 逗号分隔的需修复测试类型 |
---Context Management
上下文管理
Chunked Parallel Execution (MANDATORY)
分批并行执行(必填)
CRITICAL: To prevent conversation context overflow errors ("Prompt is too long", "Conversation too long"), all autopilot operations MUST follow chunked execution rules:
Chunk Size Limit: Maximum 3 documents per chunk
Chunking Rules:
- Chunk Formation: Group SPEC-derived TSPEC documents into chunks of maximum 3 at a time
- Sequential Chunk Processing: Process one chunk at a time, completing all documents in a chunk before starting the next
- Context Pause: After completing each chunk, provide a summary and pause for user acknowledgment
- Progress Tracking: Display chunk progress (e.g., "Chunk 2/4: Processing TSPEC-04, TSPEC-05, TSPEC-06...")
Why Chunking is Required:
- Prevents "Conversation too long" errors during batch processing
- Allows context compaction between chunks
- Enables recovery from failures without losing all progress
- Provides natural checkpoints for user review
Chunk Completion Template:
markdown
undefined关键: 为防止对话上下文溢出错误("提示过长"、"对话过长"),所有自动化工具操作必须遵循分批执行规则:
批次大小限制: 每批最多3个文档
分批规则:
- 批次组成: 将由SPEC生成的TSPEC文档分组,每批最多3个
- 按批次顺序处理: 一次处理一个批次,完成当前批次的所有文档后再开始下一批次
- 上下文暂停: 完成每个批次后,提供摘要并等待用户确认
- 进度追踪: 显示批次进度(例如:"批次2/4: 处理TSPEC-04、TSPEC-05、TSPEC-06...")
分批的必要性:
- 批量处理时防止"对话过长"错误
- 允许批次间压缩上下文
- 故障时可恢复而不丢失全部进度
- 为用户提供自然的检查点
批次完成模板:
markdown
undefinedChunk N/M Complete
批次N/M完成
Generated:
- TSPEC-XX: TASKS-Ready Score 94% (UTEST + ITEST + STEST + FTEST)
- TSPEC-YY: TASKS-Ready Score 92% (UTEST + ITEST + STEST + FTEST)
- TSPEC-ZZ: TASKS-Ready Score 95% (UTEST + ITEST + STEST + FTEST)
Proceeding to next chunk...
---已生成:
- TSPEC-XX: TASKS-Ready评分94%(包含UTEST + ITEST + STEST + FTEST)
- TSPEC-YY: TASKS-Ready评分92%(包含UTEST + ITEST + STEST + FTEST)
- TSPEC-ZZ: TASKS-Ready评分95%(包含UTEST + ITEST + STEST + FTEST)
正在进入下一批次...
---Related Resources
相关资源
- TSPEC Skill:
.claude/skills/doc-tspec/SKILL.md - TSPEC Validator:
.claude/skills/doc-tspec-validator/SKILL.md - Naming Standards:
.claude/skills/doc-naming/SKILL.md - Quality Advisor:
.claude/skills/quality-advisor/SKILL.md - TSPEC Template:
ai_dev_flow/10_TSPEC/TSPEC-TEMPLATE.md
- TSPEC技能:
.claude/skills/doc-tspec/SKILL.md - TSPEC验证器:
.claude/skills/doc-tspec-validator/SKILL.md - 命名标准:
.claude/skills/doc-naming/SKILL.md - 质量顾问:
.claude/skills/quality-advisor/SKILL.md - TSPEC模板:
ai_dev_flow/10_TSPEC/TSPEC-TEMPLATE.md
Review Document Standards (v2.2)
审核文档标准(v2.2)
Review reports generated by this skill are formal project documents and MUST comply with shared standards.
Reference: See in the skills directory for complete requirements.
REVIEW_DOCUMENT_STANDARDS.mdKey Requirements:
- Storage Location: Same folder as the reviewed TSPEC document
- File Naming:
TSPEC-NN.R_review_report.md - YAML Frontmatter: Required with ,
artifact_type: TSPEC-REVIEWlayer: 10 - Score Field: /
impl_ready_score_claimedimpl_ready_score_validated - Parent Reference: Must link to parent TSPEC document
Example Location (ALWAYS use nested folders):
docs/10_TSPEC/TSPEC-03_f3_observability/
├── TSPEC-03_f3_observability.md # ← Main document
├── TSPEC-03.R_review_report_v001.md # ← Review report
├── TSPEC-03.F_fix_report_v001.md # ← Fix report
└── .drift_cache.json # ← Drift cacheNested Folder Rule: ALL TSPEC use nested folders () regardless of size. This keeps companion files (review reports, fix reports, drift cache) organized with their parent document.
TSPEC-NN_{slug}/本技能生成的审核报告属于正式项目文档,必须符合共享标准。
参考: 技能目录中的包含完整要求。
REVIEW_DOCUMENT_STANDARDS.md关键要求:
- 存储位置: 与被审核的TSPEC文档同一文件夹
- 文件命名:
TSPEC-NN.R_review_report.md - YAML前置元数据: 必填,包含、
artifact_type: TSPEC-REVIEWlayer: 10 - 评分字段: /
impl_ready_score_claimedimpl_ready_score_validated - 父文档引用: 必须链接至父TSPEC文档
示例位置(必须使用嵌套文件夹):
docs/10_TSPEC/TSPEC-03_f3_observability/
├── TSPEC-03_f3_observability.md # ← 主文档
├── TSPEC-03.R_review_report_v001.md # ← 审核报告
├── TSPEC-03.F_fix_report_v001.md # ← 修复报告
└── .drift_cache.json # ← 漂移缓存嵌套文件夹规则: 所有TSPEC无论大小均使用嵌套文件夹()。这样可将配套文件(审核报告、修复报告、漂移缓存)与父文档统一管理。
TSPEC-NN_{slug}/Version History
版本历史
| Version | Date | Changes |
|---|---|---|
| 2.4 | 2026-02-11 | Smart Document Detection: Added automatic document type recognition; Self-type input (TSPEC-NN) triggers review mode; Upstream-type input (SPEC-NN) triggers generate-if-missing or find-and-review; Updated input patterns table with type-based actions |
| 2.3 | 2026-02-10 | Review & Fix Cycle: Replaced Phase 5 with iterative Review -> Fix cycle using |
| 2.2 | 2026-02-10 | Added Review Document Standards section; Review reports now stored alongside reviewed documents with proper YAML frontmatter and parent references |
| 2.1 | 2026-02-09 | Added Mode 2: Review Mode for validation-only analysis with visual score indicators and coverage targets; Added Mode 3: Fix Mode for auto-repair with backup, content preservation, and test stub generation; Element ID migration (UT-NNN→TSPEC.NN.40.SS, IT-NNN→TSPEC.NN.41.SS, ST-NNN→TSPEC.NN.42.SS, FT-NNN→TSPEC.NN.43.SS) |
| 1.0 | 2026-02-08 | Initial skill creation with 5-phase workflow; Integrated doc-naming, doc-tspec, quality-advisor, doc-tspec-validator; Support for all 4 test types |
| 版本 | 日期 | 变更 |
|---|---|---|
| 2.4 | 2026-02-11 | 智能文档检测: 添加自动文档类型识别;输入自身类型(TSPEC-NN)触发审核模式;输入上游类型(SPEC-NN)触发缺失则生成或查找并审核;更新输入模式表格,添加基于类型的操作 |
| 2.3 | 2026-02-10 | 审核与修复循环: 用基于 |
| 2.2 | 2026-02-10 | 添加审核文档标准章节;审核报告现在与被审核文档存储在一起,包含正确的YAML前置元数据和父文档引用 |
| 2.1 | 2026-02-09 | 添加模式2:审核模式,仅进行验证分析,包含可视化评分指示器和覆盖率目标;添加模式3:修复模式,支持自动修复、备份、内容保留和测试存根生成;元素ID迁移(UT-NNN→TSPEC.NN.40.SS、IT-NNN→TSPEC.NN.41.SS、ST-NNN→TSPEC.NN.42.SS、FT-NNN→TSPEC.NN.43.SS) |
| 1.0 | 2026-02-08 | 初始技能创建,包含5阶段工作流;集成doc-naming、doc-tspec、quality-advisor、doc-tspec-validator;支持全部4种测试类型 |