Loading...
Loading...
Compare original and translation side by side
doc-tasks-autopilotdoc-tasksdoc-tasks-autopilotdoc-tasksdoc-tasks-reviewerdoc-tasks-autopilotdoc-tasksdoc-tasks-autopilotdoc-tasks-validatordoc-tasksdoc-tasks-reviewerdoc-tasks-autopilotdoc-tasksdoc-tasks-autopilotdoc-tasks-validatordoc-tasks| Aspect | | |
|---|---|---|
| Focus | Schema compliance, CODE-Ready score | Content quality, implementation readiness |
| Checks | Required sections, format | Task atomicity, dependency accuracy |
| Auto-Fix | Structural issues only | Content issues (formatting) |
| Output | CODE-Ready score (numeric) | Review score + issue list |
| Phase | Phase 4 (Validation) | Phase 5 (Final Review) |
| Blocking | CODE-Ready < threshold blocks | Review score < threshold flags |
| 维度 | | |
|---|---|---|
| 核心关注点 | Schema合规性、CODE-Ready分数 | 内容质量、实现就绪度 |
| 检查内容 | 必填章节、格式 | 任务原子性、依赖准确性 |
| 自动修复 | 仅修复结构问题 | 修复内容问题(格式类) |
| 输出结果 | CODE-Ready分数(数值型) | 审核分数+问题列表 |
| 所处阶段 | 第4阶段(验证) | 第5阶段(最终审核) |
| 阻塞规则 | CODE-Ready分数低于阈值则阻塞 | 审核分数低于阈值则标记 |
flowchart TD
A[Input: TASKS Path] --> B[Load TASKS File]
B --> C{Valid Format?}
C -->|Yes| D[Parse TASKS Structure]
C -->|No| E[Report Format Error]
D --> F0[0. Structure Compliance]
E --> F0
F0 --> F0C{BLOCKING Check}
F0C -->|FAIL| BLOCK[STOP - Fix Structure First]
F0C -->|PASS| F[Run Review Checks]
subgraph Review["Review Checks"]
F --> G[1. Task Completeness]
G --> H[2. SPEC Alignment]
H --> I[3. Implementation Contracts]
I --> J[4. Dependency Accuracy]
J --> K[5. Task Atomicity]
K --> L[6. AI Implementation Hints]
L --> M[7. Placeholder Detection]
M --> M2[8. Naming Compliance]
M2 --> M3[9. Upstream Drift Detection]
end
M3 --> N{Issues Found?}
N -->|Yes| O[Categorize Issues]
O --> P{Auto-Fixable?}
P -->|Yes| Q[Apply Auto-Fixes]
Q --> R[Re-run Affected Checks]
P -->|No| S[Flag for Manual Review]
R --> N
S --> T[Generate Report]
N -->|No| T
T --> U[Calculate Review Score]
U --> V{Score >= Threshold?}
V -->|Yes| W[PASS]
V -->|No| X[FAIL with Details]flowchart TD
A[Input: TASKS Path] --> B[Load TASKS File]
B --> C{Valid Format?}
C -->|Yes| D[Parse TASKS Structure]
C -->|No| E[Report Format Error]
D --> F0[0. Structure Compliance]
E --> F0
F0 --> F0C{BLOCKING Check}
F0C -->|FAIL| BLOCK[STOP - Fix Structure First]
F0C -->|PASS| F[Run Review Checks]
subgraph Review["Review Checks"]
F --> G[1. Task Completeness]
G --> H[2. SPEC Alignment]
H --> I[3. Implementation Contracts]
I --> J[4. Dependency Accuracy]
J --> K[5. Task Atomicity]
K --> L[6. AI Implementation Hints]
L --> M[7. Placeholder Detection]
M --> M2[8. Naming Compliance]
M2 --> M3[9. Upstream Drift Detection]
end
M3 --> N{Issues Found?}
N -->|Yes| O[Categorize Issues]
O --> P{Auto-Fixable?}
P -->|Yes| Q[Apply Auto-Fixes]
Q --> R[Re-run Affected Checks]
P -->|No| S[Flag for Manual Review]
R --> N
S --> T[Generate Report]
N -->|No| T
T --> U[Calculate Review Score]
U --> V{Score >= Threshold?}
V -->|Yes| W[PASS]
V -->|No| X[FAIL with Details]| TASKS Type | Required Location |
|---|---|
| Monolithic | |
| Code | Severity | Description |
|---|---|---|
| REV-STR001 | Error | TASKS not in nested folder (BLOCKING) |
| REV-STR002 | Error | Folder name doesn't match TASKS ID |
| REV-STR003 | Warning | File name doesn't match folder name |
| TASKS类型 | 必填存放位置 |
|---|---|
| 单体式 | |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-STR001 | 错误 | TASKS未存放在嵌套文件夹中(阻塞性错误) |
| REV-STR002 | 错误 | 文件夹名称与TASKS ID不匹配 |
| REV-STR003 | 警告 | 文件名称与文件夹名称不匹配 |
| Code | Severity | Description |
|---|---|---|
| REV-TC001 | Error | Task missing required element |
| REV-TC002 | Warning | Acceptance criteria insufficient |
| REV-TC003 | Warning | Priority not assigned |
| REV-TC004 | Info | Complexity estimate missing |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-TC001 | 错误 | 任务缺失必填元素 |
| REV-TC002 | 警告 | 验收标准不充分 |
| REV-TC003 | 警告 | 未分配优先级 |
| REV-TC004 | 信息 | 缺失复杂度预估 |
| Code | Severity | Description |
|---|---|---|
| REV-SA001 | Error | Task without SPEC source |
| REV-SA002 | Warning | SPEC component not covered |
| REV-SA003 | Warning | Orphaned task detected |
| REV-SA004 | Info | Implementation order may need adjustment |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-SA001 | 错误 | 任务无SPEC来源 |
| REV-SA002 | 警告 | SPEC组件未被覆盖 |
| REV-SA003 | 警告 | 检测到孤立任务 |
| REV-SA004 | 信息 | 实现顺序可能需要调整 |
| Code | Severity | Description |
|---|---|---|
| REV-IC001 | Warning | Protocol interface missing |
| REV-IC002 | Warning | Exception hierarchy not documented |
| REV-IC003 | Info | State machine contract missing |
| REV-IC004 | Info | DI interface not defined |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-IC001 | 警告 | 缺失协议接口 |
| REV-IC002 | 警告 | 未记录异常层级 |
| REV-IC003 | 信息 | 缺失状态机契约 |
| REV-IC004 | 信息 | 未定义DI接口 |
| Code | Severity | Description |
|---|---|---|
| REV-DA001 | Error | Dependency does not exist |
| REV-DA002 | Error | Circular dependency detected |
| REV-DA003 | Warning | Blocking dependency not marked |
| REV-DA004 | Info | External dependency not documented |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-DA001 | 错误 | 依赖项不存在 |
| REV-DA002 | 错误 | 检测到循环依赖 |
| REV-DA003 | 警告 | 阻塞性依赖未标记 |
| REV-DA004 | 信息 | 未记录外部依赖 |
| Code | Severity | Description |
|---|---|---|
| REV-TA001 | Warning | Task too large (should be split) |
| REV-TA002 | Warning | Task has multiple responsibilities |
| REV-TA003 | Info | Completion criteria unclear |
| REV-TA004 | Info | Task scope may be too narrow |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-TA001 | 警告 | 任务过大(应拆分) |
| REV-TA002 | 警告 | 任务包含多个职责 |
| REV-TA003 | 信息 | 完成标准不清晰 |
| REV-TA004 | 信息 | 任务范围可能过窄 |
| Code | Severity | Description |
|---|---|---|
| REV-AI001 | Warning | File path not specified |
| REV-AI002 | Info | Method signature not suggested |
| REV-AI003 | Info | Import statements not provided |
| REV-AI004 | Info | Test patterns not documented |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-AI001 | 警告 | 未指定文件路径 |
| REV-AI002 | 信息 | 未建议方法签名 |
| REV-AI003 | 信息 | 未提供导入语句 |
| REV-AI004 | 信息 | 未记录测试模式 |
| Code | Severity | Description |
|---|---|---|
| REV-P001 | Error | [TODO] placeholder found |
| REV-P002 | Error | [TBD] placeholder found |
| REV-P003 | Warning | Template value not replaced |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-P001 | 错误 | 发现[TODO]占位符 |
| REV-P002 | 错误 | 发现[TBD]占位符 |
| REV-P003 | 警告 | 模板值未替换 |
doc-namingTASKS.NN.TT.SS| Code | Severity | Description |
|---|---|---|
| REV-N001 | Error | Invalid element ID format |
| REV-N002 | Error | Element type code not valid for TASKS |
| REV-N003 | Error | Legacy pattern detected |
doc-namingTASKS.NN.TT.SS| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-N001 | 错误 | 无效的元素ID格式 |
| REV-N002 | 错误 | 元素类型代码不适用于TASKS |
| REV-N003 | 错误 | 检测到旧版格式 |
@spec:@tspec:../09_SPEC/../10_TSPEC/@spec:@tspec:../09_SPEC/../10_TSPEC/docs/11_TASKS/.drift_cache.json{
"schema_version": "1.0",
"cache_created": "2026-02-10T17:00:00Z",
"cache_updated": "2026-02-10T17:00:00Z",
"tasks_files": {
"TASKS-03_f3_observability.md": {
"tasks_version": "1.0",
"tasks_updated": "2026-02-10T14:30:00",
"last_review": "2026-02-10T17:00:00",
"upstream_hashes": {
"../../09_SPEC/SPEC-03.yaml": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"../../09_SPEC/SPEC-03.yaml#methods": "b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1",
"../../09_SPEC/SPEC-03.yaml#components": "c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2",
"../../10_TSPEC/TSPEC-03.md": "d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3",
"../../10_TSPEC/TSPEC-03.md#test_cases": "e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4"
},
"upstream_mtimes": {
"../../09_SPEC/SPEC-03.yaml": "2026-02-08T10:15:00",
"../../10_TSPEC/TSPEC-03.md": "2026-02-09T16:45:00"
}
}
}
}docs/11_TASKS/.drift_cache.json{
"schema_version": "1.0",
"cache_created": "2026-02-10T17:00:00Z",
"cache_updated": "2026-02-10T17:00:00Z",
"tasks_files": {
"TASKS-03_f3_observability.md": {
"tasks_version": "1.0",
"tasks_updated": "2026-02-10T14:30:00",
"last_review": "2026-02-10T17:00:00",
"upstream_hashes": {
"../../09_SPEC/SPEC-03.yaml": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"../../09_SPEC/SPEC-03.yaml#methods": "b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1",
"../../09_SPEC/SPEC-03.yaml#components": "c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2",
"../../10_TSPEC/TSPEC-03.md": "d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3",
"../../10_TSPEC/TSPEC-03.md#test_cases": "e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4"
},
"upstream_mtimes": {
"../../09_SPEC/SPEC-03.yaml": "2026-02-08T10:15:00",
"../../10_TSPEC/TSPEC-03.md": "2026-02-09T16:45:00"
}
}
}
}1. Check if .drift_cache.json exists
- If missing → ERROR REV-D006: "Drift cache not initialized"
- If corrupted → Rebuild cache, emit WARNING
2. Validate cache schema version
- If outdated → Migrate cache to current schema
3. Load TASKS entry from cache
- If TASKS not in cache → Initialize entry1. Extract all upstream references from TASKS:
- @spec: tags → [path, section anchor]
- @tspec: tags → [path, section anchor]
- Links to ../09_SPEC/ → [path]
- Links to ../10_TSPEC/ → [path]
- Traceability table upstream artifacts → [path]
2. For each upstream reference:
a. Resolve path to absolute file path
b. Check file exists (already covered by Check #2)
c. Get file modification time (mtime)1. For each upstream reference:
a. Compare mtime > cached mtime
- If newer → flag as TIMESTAMP_DRIFT
b. Compute SHA-256 hash of content
c. Compare to cached hash
- If differs → flag as CONTENT_DRIFT
d. Calculate change percentage
- If > 20% → flag as SUBSTANTIAL_DRIFT
2. Update cache with current values after comparison1. 检查.drift_cache.json是否存在
- 若缺失 → 错误REV-D006:"漂移缓存未初始化"
- 若损坏 → 重建缓存,发出警告
2. 验证缓存Schema版本
- 若过时 → 将缓存迁移至当前Schema
3. 从缓存中加载TASKS条目
- 若TASKS不在缓存中 → 初始化条目1. 从TASKS中提取所有上游引用:
- @spec:标签 → [路径, 章节锚点]
- @tspec:标签 → [路径, 章节锚点]
- 指向../09_SPEC/的链接 → [路径]
- 指向../10_TSPEC/的链接 → [路径]
- 可追溯性表格中的上游工件 → [路径]
2. 针对每个上游引用:
a. 将路径解析为绝对文件路径
b. 检查文件是否存在(已在检查项#2中覆盖)
c. 获取文件修改时间(mtime)1. 针对每个上游引用:
a. 对比mtime > 缓存中的mtime
- 若更新 → 标记为TIMESTAMP_DRIFT
b. 计算内容的SHA-256哈希值
c. 与缓存中的哈希值对比
- 若不同 → 标记为CONTENT_DRIFT
d. 计算变更百分比
- 若>20% → 标记为SUBSTANTIAL_DRIFT
2. 对比完成后,用当前值更新缓存import hashlib
def compute_file_hash(file_path: str) -> str:
"""Compute SHA-256 hash of entire file."""
with open(file_path, 'rb') as f:
return hashlib.sha256(f.read()).hexdigest()def compute_section_hash(file_path: str, anchor: str) -> str:
"""Compute SHA-256 hash of specific section."""
content = extract_section(file_path, anchor)
return hashlib.sha256(content.encode('utf-8')).hexdigest()
def extract_section(file_path: str, anchor: str) -> str:
"""Extract section content from markdown/yaml by anchor."""
# For markdown: Find ## {anchor} heading to next ## heading
# For yaml: Find {anchor}: key to next top-level key
...import hashlib
def compute_file_hash(file_path: str) -> str:
"""Compute SHA-256 hash of entire file."""
with open(file_path, 'rb') as f:
return hashlib.sha256(f.read()).hexdigest()def compute_section_hash(file_path: str, anchor: str) -> str:
"""Compute SHA-256 hash of specific section."""
content = extract_section(file_path, anchor)
return hashlib.sha256(content.encode('utf-8')).hexdigest()
def extract_section(file_path: str, anchor: str) -> str:
"""Extract section content from markdown/yaml by anchor."""
# For markdown: Find ## {anchor} heading to next ## heading
# For yaml: Find {anchor}: key to next top-level key
...| Code | Severity | Description |
|---|---|---|
| REV-D001 | Warning | Upstream SPEC/TSPEC document modified after TASKS creation |
| REV-D002 | Warning | Referenced section content has changed (hash mismatch) |
| REV-D003 | Info | Upstream document version incremented |
| REV-D004 | Info | New content added to upstream document |
| REV-D005 | Error | Critical upstream document substantially modified (>20% change) |
| REV-D006 | Error | Drift cache not initialized or missing |
| 代码 | 严重程度 | 描述 |
|---|---|---|
| REV-D001 | 警告 | 上游SPEC/TSPEC文档在TASKS创建后被修改 |
| REV-D002 | 警告 | 引用的章节内容已变更(哈希不匹配) |
| REV-D003 | 信息 | 上游文档版本已递增 |
| REV-D004 | 信息 | 上游文档新增内容 |
| REV-D005 | 错误 | 关键上游文档发生重大变更(变更>20%) |
| REV-D006 | 错误 | 漂移缓存未初始化或缺失 |
undefinedundefined| Upstream Document | TASKS Reference | Last Modified | Cached Modified | Hash Match | Days Stale | Severity |
|---|---|---|---|---|---|---|
| SPEC-03.yaml | @spec Section methods | 2026-02-08T10:15:00 | 2026-02-05T09:00:00 | No | 3 | Warning |
| SPEC-03.yaml | @spec components | 2026-02-10T14:30:00 | 2026-02-05T09:00:00 | No | 5 | Warning |
| TSPEC-03.md | @tspec test_cases | 2026-02-09T16:45:00 | 2026-02-05T09:00:00 | Yes | 4 | Info |
---| 上游文档 | TASKS引用 | 最后修改时间 | 缓存中的修改时间 | 哈希匹配 | 过期天数 | 严重程度 |
|---|---|---|---|---|---|---|
| SPEC-03.yaml | @spec Section methods | 2026-02-08T10:15:00 | 2026-02-05T09:00:00 | 否 | 3 | 警告 |
| SPEC-03.yaml | @spec components | 2026-02-10T14:30:00 | 2026-02-05T09:00:00 | 否 | 5 | 警告 |
| TSPEC-03.md | @tspec test_cases | 2026-02-09T16:45:00 | 2026-02-05T09:00:00 | 是 | 4 | 信息 |
---.drift_cache.json[DRIFT].drift_cache.json[DRIFT]| Setting | Default | Description |
|---|---|---|
| true | Mandatory - Cache is always enabled |
| 7 | Days before drift becomes Warning |
| 30 | Days before drift becomes Error |
| | Patterns to track for drift |
| 设置项 | 默认值 | 描述 |
|---|---|---|
| true | 强制要求 - 缓存始终启用 |
| 7 | 漂移变为警告状态的天数阈值 |
| 30 | 漂移变为错误状态的天数阈值 |
| | 用于跟踪漂移的模式 |
| Category | Weight | Calculation |
|---|---|---|
| Task Completeness | 19% | (complete_tasks / total) × 19 |
| SPEC Alignment | 19% | (aligned_tasks / total) × 19 |
| Implementation Contracts | 14% | (contracts_present / required) × 14 |
| Dependency Accuracy | 14% | (valid_deps / total_deps) × 14 |
| Task Atomicity | 10% | (atomic_tasks / total) × 10 |
| AI Implementation Hints | 5% | (hints_present / total) × 5 |
| Placeholder Detection | 5% | (no_placeholders ? 5 : 5 - count) |
| Naming Compliance | 9% | (valid_ids / total_ids) × 9 |
| Upstream Drift | 5% | (fresh_refs / total_refs) × 5 |
| 类别 | 权重 | 计算方式 |
|---|---|---|
| 任务完整性 | 19% | (完成的任务数 / 总任务数) × 19 |
| 与SPEC的一致性 | 19% | (一致的任务数 / 总任务数) × 19 |
| 实现契约 | 14% | (已存在的契约数 / 所需契约数) × 14 |
| 依赖准确性 | 14% | (有效的依赖项 / 总依赖项) × 14 |
| 任务原子性 | 10% | (原子化任务数 / 总任务数) × 10 |
| AI实现提示 | 5% | (已存在的提示数 / 总提示数) × 5 |
| 占位符检测 | 5% | (无占位符则得5分,否则5 - 占位符数量) |
| 命名合规性 | 9% | (有效的ID数 / 总ID数) × 9 |
| 上游漂移 | 5% | (最新引用数 / 总引用数) × 5 |
undefinedundefined
---
---TASKS-NN_{slug}/TASKS-NN.R_review_report_vNNN.mddocs/11_TASKS/TASKS-NN_{slug}/TASKS-NN_{slug}/TASKS-NN.R_review_report_vNNN.mddocs/11_TASKS/TASKS-NN_{slug}/TASKS-NN.R_review_report_v001.mdTASKS-NN.R_review_report_v*.mddocs/11_TASKS/TASKS-03_f3_observability/
├── TASKS-03_f3_observability.md
├── TASKS-03.R_review_report_v001.md # First review
├── TASKS-03.R_review_report_v002.md # After fixes
└── .drift_cache.jsonTASKS-NN.R_review_report_v001.mdTASKS-NN.R_review_report_v*.mddocs/11_TASKS/TASKS-03_f3_observability/
├── TASKS-03_f3_observability.md
├── TASKS-03.R_review_report_v001.md # 首次审核
├── TASKS-03.R_review_report_v002.md # 修复后审核
└── .drift_cache.jsonREVIEW_DOCUMENT_STANDARDS.mdREVIEW_DOCUMENT_STANDARDS.mddoc-tasks-autopilotflowchart LR
A[Phase 4: Validation] --> B[Phase 5: Final Review]
B --> C{doc-tasks-reviewer}
C --> D[Phase 6: Continue]doc-tasks-autopilotflowchart LR
A[Phase 4: Validation] --> B[Phase 5: Final Review]
B --> C{doc-tasks-reviewer}
C --> D[Phase 6: Continue]| Skill | Relationship |
|---|---|
| Naming standards for Check #8 |
| Invokes this skill in Phase 5 |
| Structural validation (Phase 4) |
| Applies fixes based on review findings |
| TASKS creation rules |
| Upstream QA |
| Upstream QA (for test specifications) |
| 技能 | 关系 |
|---|---|
| 为检查项#8提供命名标准 |
| 在第5阶段调用本技能 |
| 结构验证(第4阶段) |
| 根据审核结果应用修复 |
| TASKS创建规则 |
| 上游QA |
| 上游QA(针对测试规范) |
| Version | Date | Changes |
|---|---|---|
| 1.4 | 2026-02-11 | Added Check #0: Structure Compliance as BLOCKING check; REV-STR001-STR003 error codes; Enforces nested folder rule before other checks proceed |
| 1.3 | 2026-02-10 | Made drift cache mandatory; Added REV-D006 error code for missing cache; Defined cache schema with schema_version; Added Three-Phase Detection Algorithm; Added hash calculation examples; Cache location at docs/11_TASKS/.drift_cache.json; Added cache status to report output |
| 1.2 | 2026-02-10 | Added Check #9: Upstream Drift Detection - detects when SPEC/TSPEC documents modified after TASKS creation; REV-D001-D005 error codes; drift cache support; configurable thresholds; added doc-tasks-fixer to related skills |
| 1.1 | 2026-02-10 | Added review versioning support (_vNNN pattern); Delta reporting for score comparison |
| 1.0 | 2026-02-10 | Initial skill creation with 8 review checks; Task completeness; SPEC alignment; Implementation contracts; Dependency accuracy; Task atomicity |
| 版本 | 日期 | 变更内容 |
|---|---|---|
| 1.4 | 2026-02-11 | 添加检查项#0:结构合规性作为阻塞性检查;新增REV-STR001-STR003错误代码;在其他检查前强制实施嵌套文件夹规则 |
| 1.3 | 2026-02-10 | 将漂移缓存设为强制要求;新增缺失缓存的REV-D006错误代码;定义包含schema_version的缓存Schema;添加三阶段检测算法;添加哈希计算示例;缓存位置设为docs/11_TASKS/.drift_cache.json;在报告输出中添加缓存状态 |
| 1.2 | 2026-02-10 | 添加检查项#9:上游漂移检测——检测SPEC/TSPEC文档在TASKS创建后是否被修改;新增REV-D001-D005错误代码;支持漂移缓存;可配置阈值;在相关技能中添加doc-tasks-fixer |
| 1.1 | 2026-02-10 | 添加审核版本支持(_vNNN格式);添加分数对比的差异报告 |
| 1.0 | 2026-02-10 | 初始技能创建,包含8项审核检查;任务完整性;与SPEC的一致性;实现契约;依赖准确性;任务原子性 |