doc-tasks-reviewer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

doc-tasks-reviewer

doc-tasks-reviewer

Purpose

用途

Comprehensive content review and quality assurance for Task Breakdown (TASKS) documents. This skill performs deep content analysis beyond structural validation, checking task completeness, SPEC alignment, implementation contracts, dependency accuracy, and identifying issues that require manual review.
Layer: 11 (TASKS Quality Assurance)
Upstream: TASKS (from
doc-tasks-autopilot
or
doc-tasks
)
Downstream: None (final QA gate before code implementation)

针对任务分解(TASKS)文档的全面内容审核与质量保证。该技能会进行超越结构验证的深度内容分析,检查任务完整性、与SPEC的一致性、实现契约、依赖准确性,并识别需要人工审核的问题。
层级:11(TASKS质量保证)
上游依赖:TASKS(来自
doc-tasks-autopilot
doc-tasks
下游输出:无(代码实现前的最终QA关卡)

When to Use This Skill

何时使用该技能

Use
doc-tasks-reviewer
when:
  • After TASKS Generation: Run immediately after
    doc-tasks-autopilot
    completes
  • Manual TASKS Edits: After making manual changes to TASKS
  • Pre-Implementation: Before starting code implementation
  • Sprint Planning: When assessing task readiness for development
  • Periodic Review: Regular quality checks on existing TASKS
Do NOT use when:
  • TASKS does not exist yet (use
    doc-tasks
    or
    doc-tasks-autopilot
    first)
  • Need structural/schema validation only (use
    doc-tasks-validator
    )
  • Generating new TASKS content (use
    doc-tasks
    )

使用
doc-tasks-reviewer
的场景:
  • TASKS生成后:在
    doc-tasks-autopilot
    完成后立即运行
  • TASKS人工编辑后:对TASKS进行手动修改后
  • 实现前:开始代码实现之前
  • 迭代规划时:评估任务是否已准备好进入开发阶段
  • 定期审核:对现有TASKS进行常规质量检查
请勿使用的场景
  • TASKS尚未生成(请先使用
    doc-tasks
    doc-tasks-autopilot
  • 仅需结构/Schema验证(请使用
    doc-tasks-validator
  • 生成新的TASKS内容(请使用
    doc-tasks

Skill vs Validator: Key Differences

技能与验证工具的核心差异

Aspect
doc-tasks-validator
doc-tasks-reviewer
FocusSchema compliance, CODE-Ready scoreContent quality, implementation readiness
ChecksRequired sections, formatTask atomicity, dependency accuracy
Auto-FixStructural issues onlyContent issues (formatting)
OutputCODE-Ready score (numeric)Review score + issue list
PhasePhase 4 (Validation)Phase 5 (Final Review)
BlockingCODE-Ready < threshold blocksReview score < threshold flags

维度
doc-tasks-validator
doc-tasks-reviewer
核心关注点Schema合规性、CODE-Ready分数内容质量、实现就绪度
检查内容必填章节、格式任务原子性、依赖准确性
自动修复仅修复结构问题修复内容问题(格式类)
输出结果CODE-Ready分数(数值型)审核分数+问题列表
所处阶段第4阶段(验证)第5阶段(最终审核)
阻塞规则CODE-Ready分数低于阈值则阻塞审核分数低于阈值则标记

Review Workflow

审核工作流

mermaid
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]

mermaid
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]

Review Checks

审核检查项

0. Structure Compliance (12/12) - BLOCKING

0. 结构合规性(12/12)- 阻塞性检查

Validates TASKS follows the mandatory nested folder rule.
Nested Folder Rule: ALL TASKS documents MUST be in nested folders.
Required Structure:
TASKS TypeRequired Location
Monolithic
docs/11_TASKS/TASKS-NN_{slug}/TASKS-NN_{slug}.md
Error Codes:
CodeSeverityDescription
REV-STR001ErrorTASKS not in nested folder (BLOCKING)
REV-STR002ErrorFolder name doesn't match TASKS ID
REV-STR003WarningFile name doesn't match folder name
This check is BLOCKING - TASKS must pass structure validation before other checks proceed.

验证TASKS是否遵循强制嵌套文件夹规则。
嵌套文件夹规则:所有TASKS文档必须存放在嵌套文件夹中。
必填结构
TASKS类型必填存放位置
单体式
docs/11_TASKS/TASKS-NN_{slug}/TASKS-NN_{slug}.md
错误代码
代码严重程度描述
REV-STR001错误TASKS未存放在嵌套文件夹中(阻塞性错误)
REV-STR002错误文件夹名称与TASKS ID不匹配
REV-STR003警告文件名称与文件夹名称不匹配
本检查为阻塞性检查——TASKS必须先通过结构验证,才能进行其他检查。

1. Task Completeness

1. 任务完整性

Validates all tasks have required elements.
Required Elements:
  • Task ID
  • Description
  • Acceptance criteria
  • Priority
  • Estimated complexity
  • Dependencies
Error Codes:
CodeSeverityDescription
REV-TC001ErrorTask missing required element
REV-TC002WarningAcceptance criteria insufficient
REV-TC003WarningPriority not assigned
REV-TC004InfoComplexity estimate missing

验证所有任务是否包含必填元素。
必填元素
  • 任务ID
  • 描述
  • 验收标准
  • 优先级
  • 预估复杂度
  • 依赖项
错误代码
代码严重程度描述
REV-TC001错误任务缺失必填元素
REV-TC002警告验收标准不充分
REV-TC003警告未分配优先级
REV-TC004信息缺失复杂度预估

2. SPEC Alignment

2. 与SPEC的一致性

Validates tasks trace to SPEC requirements.
Scope:
  • Every task maps to SPEC component/method
  • Full SPEC coverage achieved
  • No orphaned tasks
  • Implementation order logical
Error Codes:
CodeSeverityDescription
REV-SA001ErrorTask without SPEC source
REV-SA002WarningSPEC component not covered
REV-SA003WarningOrphaned task detected
REV-SA004InfoImplementation order may need adjustment

验证任务是否可追溯到SPEC需求。
检查范围
  • 每个任务都映射到SPEC的组件/方法
  • 实现SPEC的全面覆盖
  • 无孤立任务
  • 实现顺序符合逻辑
错误代码
代码严重程度描述
REV-SA001错误任务无SPEC来源
REV-SA002警告SPEC组件未被覆盖
REV-SA003警告检测到孤立任务
REV-SA004信息实现顺序可能需要调整

3. Implementation Contracts

3. 实现契约

Validates Section 7-8 implementation contracts.
Scope:
  • Protocol interfaces defined
  • Exception hierarchies documented
  • State machine contracts present
  • Data models specified
  • DI interfaces defined
Error Codes:
CodeSeverityDescription
REV-IC001WarningProtocol interface missing
REV-IC002WarningException hierarchy not documented
REV-IC003InfoState machine contract missing
REV-IC004InfoDI interface not defined

验证第7-8节的实现契约。
检查范围
  • 已定义协议接口
  • 已记录异常层级
  • 存在状态机契约
  • 已指定数据模型
  • 已定义DI接口
错误代码
代码严重程度描述
REV-IC001警告缺失协议接口
REV-IC002警告未记录异常层级
REV-IC003信息缺失状态机契约
REV-IC004信息未定义DI接口

4. Dependency Accuracy

4. 依赖准确性

Validates task dependencies are correct.
Scope:
  • Dependencies exist
  • No circular dependencies
  • Blocking dependencies identified
  • External dependencies documented
Error Codes:
CodeSeverityDescription
REV-DA001ErrorDependency does not exist
REV-DA002ErrorCircular dependency detected
REV-DA003WarningBlocking dependency not marked
REV-DA004InfoExternal dependency not documented

验证任务依赖项是否正确。
检查范围
  • 依赖项存在
  • 无循环依赖
  • 已识别阻塞性依赖
  • 已记录外部依赖
错误代码
代码严重程度描述
REV-DA001错误依赖项不存在
REV-DA002错误检测到循环依赖
REV-DA003警告阻塞性依赖未标记
REV-DA004信息未记录外部依赖

5. Task Atomicity

5. 任务原子性

Validates tasks are appropriately sized.
Scope:
  • Single responsibility
  • Independently implementable
  • Clear completion criteria
  • Reasonable scope
Error Codes:
CodeSeverityDescription
REV-TA001WarningTask too large (should be split)
REV-TA002WarningTask has multiple responsibilities
REV-TA003InfoCompletion criteria unclear
REV-TA004InfoTask scope may be too narrow

验证任务的粒度是否合适。
检查范围
  • 单一职责
  • 可独立实现
  • 完成标准清晰
  • 范围合理
错误代码
代码严重程度描述
REV-TA001警告任务过大(应拆分)
REV-TA002警告任务包含多个职责
REV-TA003信息完成标准不清晰
REV-TA004信息任务范围可能过窄

6. AI Implementation Hints

6. AI实现提示

Validates AI-friendly implementation guidance.
Scope:
  • File paths specified
  • Method signatures suggested
  • Import statements provided
  • Test patterns documented
Error Codes:
CodeSeverityDescription
REV-AI001WarningFile path not specified
REV-AI002InfoMethod signature not suggested
REV-AI003InfoImport statements not provided
REV-AI004InfoTest patterns not documented

验证是否包含AI友好的实现指导。
检查范围
  • 已指定文件路径
  • 已建议方法签名
  • 已提供导入语句
  • 已记录测试模式
错误代码
代码严重程度描述
REV-AI001警告未指定文件路径
REV-AI002信息未建议方法签名
REV-AI003信息未提供导入语句
REV-AI004信息未记录测试模式

7. Placeholder Detection

7. 占位符检测

Identifies incomplete content requiring replacement.
Error Codes:
CodeSeverityDescription
REV-P001Error[TODO] placeholder found
REV-P002Error[TBD] placeholder found
REV-P003WarningTemplate value not replaced

识别需要替换的未完成内容。
错误代码
代码严重程度描述
REV-P001错误发现[TODO]占位符
REV-P002错误发现[TBD]占位符
REV-P003警告模板值未替换

8. Naming Compliance

8. 命名合规性

Validates element IDs follow
doc-naming
standards.
Scope:
  • Element IDs use
    TASKS.NN.TT.SS
    format
  • Element type codes valid for TASKS (18, 30)
  • Task naming convention
Error Codes:
CodeSeverityDescription
REV-N001ErrorInvalid element ID format
REV-N002ErrorElement type code not valid for TASKS
REV-N003ErrorLegacy pattern detected

验证元素ID是否遵循
doc-naming
标准。
检查范围
  • 元素ID使用
    TASKS.NN.TT.SS
    格式
  • 元素类型代码适用于TASKS(18、30)
  • 任务命名符合约定
错误代码
代码严重程度描述
REV-N001错误无效的元素ID格式
REV-N002错误元素类型代码不适用于TASKS
REV-N003错误检测到旧版格式

9. Upstream Drift Detection (Mandatory Cache)

9. 上游漂移检测(强制缓存)

Detects when upstream SPEC and TSPEC documents have been modified after the TASKS was created or last updated.
The drift cache is mandatory. All drift detection operations require cache initialization and maintenance.
Purpose: Identifies stale TASKS content that may not reflect current SPEC and TSPEC documentation. When SPEC documents (methods, interfaces, components) or TSPEC documents (test cases, coverage requirements) change, the TASKS may need updates to maintain implementation alignment.
Scope:
  • @spec:
    tag targets (SPEC documents)
  • @tspec:
    tag targets (TSPEC documents)
  • Traceability section upstream artifact links
  • Any markdown links to
    ../09_SPEC/
    or
    ../10_TSPEC/
    source documents

检测上游SPEC和TSPEC文档在TASKS创建或最后更新后是否被修改。
漂移缓存为强制要求:所有漂移检测操作都需要初始化并维护缓存。
用途:识别可能未反映当前SPEC和TSPEC文档的过期TASKS内容。当SPEC文档(方法、接口、组件)或TSPEC文档(测试用例、覆盖率要求)发生变化时,TASKS可能需要更新以保持与实现的一致性。
检查范围
  • @spec:
    标签指向的目标(SPEC文档)
  • @tspec:
    标签指向的目标(TSPEC文档)
  • 可追溯性章节中的上游工件链接
  • 任何指向
    ../09_SPEC/
    ../10_TSPEC/
    源文档的Markdown链接

Drift Cache File (MANDATORY)

漂移缓存文件(强制要求)

Location:
docs/11_TASKS/.drift_cache.json
Schema:
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"
      }
    }
  }
}
Cache Management:
  • Cache file is created on first review if not present
  • Cache is updated after each successful review
  • Missing cache triggers REV-D006 error
  • Corrupted cache triggers cache rebuild with warning

存放位置
docs/11_TASKS/.drift_cache.json
Schema
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"
      }
    }
  }
}
缓存管理
  • 首次审核时若缓存不存在则创建
  • 每次成功审核后更新缓存
  • 缺失缓存会触发REV-D006错误
  • 缓存损坏会触发缓存重建并发出警告

Three-Phase Detection Algorithm

三阶段检测算法

Phase 1: Cache Validation
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 entry
Phase 2: Reference Extraction
1. 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)
Phase 3: Drift Comparison
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 comparison

阶段1:缓存验证
1. 检查.drift_cache.json是否存在
   - 若缺失 → 错误REV-D006:"漂移缓存未初始化"
   - 若损坏 → 重建缓存,发出警告

2. 验证缓存Schema版本
   - 若过时 → 将缓存迁移至当前Schema

3. 从缓存中加载TASKS条目
   - 若TASKS不在缓存中 → 初始化条目
阶段2:引用提取
1. 从TASKS中提取所有上游引用:
   - @spec:标签 → [路径, 章节锚点]
   - @tspec:标签 → [路径, 章节锚点]
   - 指向../09_SPEC/的链接 → [路径]
   - 指向../10_TSPEC/的链接 → [路径]
   - 可追溯性表格中的上游工件 → [路径]

2. 针对每个上游引用:
   a. 将路径解析为绝对文件路径
   b. 检查文件是否存在(已在检查项#2中覆盖)
   c. 获取文件修改时间(mtime)
阶段3:漂移对比
1. 针对每个上游引用:
   a. 对比mtime > 缓存中的mtime
      - 若更新 → 标记为TIMESTAMP_DRIFT
   b. 计算内容的SHA-256哈希值
   c. 与缓存中的哈希值对比
      - 若不同 → 标记为CONTENT_DRIFT
   d. 计算变更百分比
      - 若>20% → 标记为SUBSTANTIAL_DRIFT

2. 对比完成后,用当前值更新缓存

Hash Calculation

哈希计算

Full File Hash:
python
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()
Section Hash (for anchor references):
python
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
    ...

全文件哈希
python
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()
章节哈希(针对锚点引用):
python
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
    ...

Error Codes

错误代码

CodeSeverityDescription
REV-D001WarningUpstream SPEC/TSPEC document modified after TASKS creation
REV-D002WarningReferenced section content has changed (hash mismatch)
REV-D003InfoUpstream document version incremented
REV-D004InfoNew content added to upstream document
REV-D005ErrorCritical upstream document substantially modified (>20% change)
REV-D006ErrorDrift cache not initialized or missing

代码严重程度描述
REV-D001警告上游SPEC/TSPEC文档在TASKS创建后被修改
REV-D002警告引用的章节内容已变更(哈希不匹配)
REV-D003信息上游文档版本已递增
REV-D004信息上游文档新增内容
REV-D005错误关键上游文档发生重大变更(变更>20%)
REV-D006错误漂移缓存未初始化或缺失

Report Output

报告输出示例

markdown
undefined
markdown
undefined

Upstream Drift Analysis

上游漂移分析

Cache Status: Valid (last updated: 2026-02-10T17:00:00Z)
Upstream DocumentTASKS ReferenceLast ModifiedCached ModifiedHash MatchDays StaleSeverity
SPEC-03.yaml@spec Section methods2026-02-08T10:15:002026-02-05T09:00:00No3Warning
SPEC-03.yaml@spec components2026-02-10T14:30:002026-02-05T09:00:00No5Warning
TSPEC-03.md@tspec test_cases2026-02-09T16:45:002026-02-05T09:00:00Yes4Info
Recommendation: Review upstream SPEC/TSPEC changes and update TASKS if methods, components, or test cases have changed.
Cache Updated: 2026-02-10T17:00:00Z (3 entries refreshed)

---
缓存状态:有效(最后更新时间:2026-02-10T17:00:00Z)
上游文档TASKS引用最后修改时间缓存中的修改时间哈希匹配过期天数严重程度
SPEC-03.yaml@spec Section methods2026-02-08T10:15:002026-02-05T09:00:003警告
SPEC-03.yaml@spec components2026-02-10T14:30:002026-02-05T09:00:005警告
TSPEC-03.md@tspec test_cases2026-02-09T16:45:002026-02-05T09:00:004信息
建议:审核上游SPEC/TSPEC的变更,若方法、组件或测试用例发生变更,请更新TASKS。
缓存已更新:2026-02-10T17:00:00Z(已刷新3条条目)

---

Auto-Actions

自动操作

  • Create
    .drift_cache.json
    if not present (first review)
  • Update cache with current hashes and mtimes after review
  • Add
    [DRIFT]
    marker to affected @spec/@tspec tags (optional)
  • Generate drift summary in review report

  • 若缓存不存在则创建
    .drift_cache.json
    (首次审核时)
  • 审核完成后,用当前哈希值和修改时间更新缓存
  • 可选:在受影响的@spec/@tspec标签上添加
    [DRIFT]
    标记
  • 在审核报告中生成漂移摘要

Configuration

配置项

SettingDefaultDescription
cache_enabled
trueMandatory - Cache is always enabled
drift_threshold_days
7Days before drift becomes Warning
critical_threshold_days
30Days before drift becomes Error
tracked_patterns
@spec:
,
@tspec:
Patterns to track for drift

设置项默认值描述
cache_enabled
true强制要求 - 缓存始终启用
drift_threshold_days
7漂移变为警告状态的天数阈值
critical_threshold_days
30漂移变为错误状态的天数阈值
tracked_patterns
@spec:
,
@tspec:
用于跟踪漂移的模式

Review Score Calculation

审核分数计算

Scoring Formula:
CategoryWeightCalculation
Task Completeness19%(complete_tasks / total) × 19
SPEC Alignment19%(aligned_tasks / total) × 19
Implementation Contracts14%(contracts_present / required) × 14
Dependency Accuracy14%(valid_deps / total_deps) × 14
Task Atomicity10%(atomic_tasks / total) × 10
AI Implementation Hints5%(hints_present / total) × 5
Placeholder Detection5%(no_placeholders ? 5 : 5 - count)
Naming Compliance9%(valid_ids / total_ids) × 9
Upstream Drift5%(fresh_refs / total_refs) × 5
Total: Sum of all categories (max 100)
Thresholds:
  • PASS: >= 90
  • WARNING: 80-89
  • FAIL: < 80

评分公式
类别权重计算方式
任务完整性19%(完成的任务数 / 总任务数) × 19
与SPEC的一致性19%(一致的任务数 / 总任务数) × 19
实现契约14%(已存在的契约数 / 所需契约数) × 14
依赖准确性14%(有效的依赖项 / 总依赖项) × 14
任务原子性10%(原子化任务数 / 总任务数) × 10
AI实现提示5%(已存在的提示数 / 总提示数) × 5
占位符检测5%(无占位符则得5分,否则5 - 占位符数量)
命名合规性9%(有效的ID数 / 总ID数) × 9
上游漂移5%(最新引用数 / 总引用数) × 5
总分:所有类别得分之和(最高100分)
阈值
  • 通过:>= 90分
  • 警告:80-89分
  • 失败:< 80分

Command Usage

命令用法

bash
undefined
bash
undefined

Review specific TASKS

审核指定的TASKS

/doc-tasks-reviewer TASKS-03
/doc-tasks-reviewer TASKS-03

Review TASKS by path

通过路径审核TASKS

/doc-tasks-reviewer docs/11_TASKS/TASKS-03_f3_observability.md
/doc-tasks-reviewer docs/11_TASKS/TASKS-03_f3_observability.md

Review all TASKS

审核所有TASKS

/doc-tasks-reviewer all

---
/doc-tasks-reviewer all

---

Output Report

输出报告

Review reports are stored alongside the reviewed document per project standards.
Nested Folder Rule: ALL TASKS use nested folders (
TASKS-NN_{slug}/
) regardless of size. This ensures review reports, fix reports, and drift cache files are organized with their parent document.
File Naming:
TASKS-NN.R_review_report_vNNN.md
Location: Inside the TASKS nested folder:
docs/11_TASKS/TASKS-NN_{slug}/
审核报告将按照项目标准存储在对应文档的同级目录中。
嵌套文件夹规则:所有TASKS无论大小都使用嵌套文件夹(
TASKS-NN_{slug}/
),确保审核报告、修复报告和漂移缓存文件与父文档统一管理。
文件命名
TASKS-NN.R_review_report_vNNN.md
存放位置:TASKS嵌套文件夹内:
docs/11_TASKS/TASKS-NN_{slug}/

Versioning Rules

版本规则

  1. First Review: Creates
    TASKS-NN.R_review_report_v001.md
  2. Subsequent Reviews: Auto-increments version (v002, v003, etc.)
  3. Same-Day Reviews: Each review gets unique version number
Version Detection: Scans folder for existing
TASKS-NN.R_review_report_v*.md
files and increments.
Example:
docs/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.json
  1. 首次审核:创建
    TASKS-NN.R_review_report_v001.md
  2. 后续审核:自动递增版本号(v002、v003等)
  3. 当日多次审核:每次审核使用唯一版本号
版本检测:扫描文件夹中已有的
TASKS-NN.R_review_report_v*.md
文件并递增版本号。
示例
docs/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.json

Delta Reporting

差异报告

When previous reviews exist, include score comparison in the report.
See
REVIEW_DOCUMENT_STANDARDS.md
for complete versioning requirements.

若存在历史审核记录,报告中会包含分数对比内容。
完整版本要求请参考
REVIEW_DOCUMENT_STANDARDS.md

Integration with doc-tasks-autopilot

与doc-tasks-autopilot的集成

This skill is invoked during Phase 5 of
doc-tasks-autopilot
:
mermaid
flowchart LR
    A[Phase 4: Validation] --> B[Phase 5: Final Review]
    B --> C{doc-tasks-reviewer}
    C --> D[Phase 6: Continue]

该技能会在
doc-tasks-autopilot
的第5阶段被调用:
mermaid
flowchart LR
    A[Phase 4: Validation] --> B[Phase 5: Final Review]
    B --> C{doc-tasks-reviewer}
    C --> D[Phase 6: Continue]

Related Skills

相关技能

SkillRelationship
doc-naming
Naming standards for Check #8
doc-tasks-autopilot
Invokes this skill in Phase 5
doc-tasks-validator
Structural validation (Phase 4)
doc-tasks-fixer
Applies fixes based on review findings
doc-tasks
TASKS creation rules
doc-spec-reviewer
Upstream QA
doc-tspec-reviewer
Upstream QA (for test specifications)

技能关系
doc-naming
为检查项#8提供命名标准
doc-tasks-autopilot
在第5阶段调用本技能
doc-tasks-validator
结构验证(第4阶段)
doc-tasks-fixer
根据审核结果应用修复
doc-tasks
TASKS创建规则
doc-spec-reviewer
上游QA
doc-tspec-reviewer
上游QA(针对测试规范)

Version History

版本历史

VersionDateChanges
1.42026-02-11Added Check #0: Structure Compliance as BLOCKING check; REV-STR001-STR003 error codes; Enforces nested folder rule before other checks proceed
1.32026-02-10Made 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.22026-02-10Added 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.12026-02-10Added review versioning support (_vNNN pattern); Delta reporting for score comparison
1.02026-02-10Initial skill creation with 8 review checks; Task completeness; SPEC alignment; Implementation contracts; Dependency accuracy; Task atomicity
版本日期变更内容
1.42026-02-11添加检查项#0:结构合规性作为阻塞性检查;新增REV-STR001-STR003错误代码;在其他检查前强制实施嵌套文件夹规则
1.32026-02-10将漂移缓存设为强制要求;新增缺失缓存的REV-D006错误代码;定义包含schema_version的缓存Schema;添加三阶段检测算法;添加哈希计算示例;缓存位置设为docs/11_TASKS/.drift_cache.json;在报告输出中添加缓存状态
1.22026-02-10添加检查项#9:上游漂移检测——检测SPEC/TSPEC文档在TASKS创建后是否被修改;新增REV-D001-D005错误代码;支持漂移缓存;可配置阈值;在相关技能中添加doc-tasks-fixer
1.12026-02-10添加审核版本支持(_vNNN格式);添加分数对比的差异报告
1.02026-02-10初始技能创建,包含8项审核检查;任务完整性;与SPEC的一致性;实现契约;依赖准确性;任务原子性