Token导航 LogoToken导航TokenDH.com
前端设计权限需确认github未标认证来源可访问许可证需确认审计提醒

doc-tspec-reviewer文档 tspec 审阅者

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

654

周安装

27

GitHub Stars

14

下载量

214
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:doc-tspec-reviewer(文档 tspec 审阅者)
来源仓库:https://github.com/vladm3105/aidoc-flow-framework
仓库路径:skills/doc-tspec-reviewer
安装命令:
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-tspec-reviewer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-tspec-reviewer

简介

用于对 Test Specification (TSPEC) 文档进行综合内容审核与质量校验。

  • 适用于测试覆盖分析、用例完整性检查、规范对齐和人工复核建议。
  • 调用时需提供 TSPEC 文档路径,输出包含问题清单和改进建议。
  • 需确认文档来源可靠性,避免将假设写入结论,涉及生产环境时需二次核对。
  • doc-tspec-reviewer 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-tspec-reviewer

Purpose

Comprehensive content review and quality assurance for Test Specification (TSPEC) documents. This skill performs deep content analysis beyond structural validation, checking test coverage across all 6 types (UTEST, ITEST, STEST, FTEST, PTEST, SECTEST), SPEC alignment, test case completeness, and identifying issues that require manual review.

Layer: 10 (TSPEC Quality Assurance)

Upstream: TSPEC (from doc-tspec-autopilot or doc-tspec)

Downstream: None (final QA gate before implementation)


When to Use This Skill

Use doc-tspec-reviewer when:

  • After TSPEC Generation: Run immediately after doc-tspec-autopilot completes
  • Manual TSPEC Edits: After making manual changes to TSPEC
  • Pre-Implementation: Before starting test implementation
  • Coverage Review: When assessing test coverage completeness
  • Periodic Review: Regular quality checks on existing TSPECs

Do NOT use when:

  • TSPEC does not exist yet (use doc-tspec or doc-tspec-autopilot first)
  • Need structural/schema validation only (use doc-tspec-validator)
  • Generating new TSPEC content (use doc-tspec)

Skill vs Validator: Key Differences

Aspectdoc-tspec-validatordoc-tspec-reviewer
FocusSchema compliance, IMPL-Ready scoreContent quality, test completeness
ChecksRequired sections, formatCoverage targets, SPEC alignment
Auto-FixStructural issues onlyContent issues (formatting)
OutputIMPL-Ready score (numeric)Review score + issue list
PhasePhase 4 (Validation)Phase 5 (Final Review)
BlockingIMPL-Ready < threshold blocksReview score < threshold flags

Review Workflow

flowchart TD
    A[Input: TSPEC Path] --> B[Load TSPEC File]
    B --> C{Valid Format?}

    C -->|Yes| D[Parse TSPEC Structure]
    C -->|No| E[Report Format Error]

    D --> F[Run Review Checks]
    E --> F

    subgraph Review["Review Checks"]
        F --> G[1. Test Coverage Targets]
        G --> H[2. SPEC Alignment]
        H --> I[3. Test Case Completeness]
        I --> J[4. Test Data Definition]
        J --> K[5. Test Environment Requirements]
        K --> L[6. Edge Case Coverage]
        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 (MVP) - BLOCKING

Validates TSPEC follows the mandatory nested folder rule.

Nested Folder Rule: ALL TSPEC documents MUST be in nested folders.

Required Structure:

TSPEC TypeRequired Location
UTESTdocs/10_TSPEC/UTEST/UTEST-NN_{slug}/UTEST-NN_{slug}.md
ITESTdocs/10_TSPEC/ITEST/ITEST-NN_{slug}/ITEST-NN_{slug}.md
STESTdocs/10_TSPEC/STEST/STEST-NN_{slug}/STEST-NN_{slug}.md
FTESTdocs/10_TSPEC/FTEST/FTEST-NN_{slug}/FTEST-NN_{slug}.md
PTESTdocs/10_TSPEC/PTEST/PTEST-NN_{slug}/PTEST-NN_{slug}.md
SECTESTdocs/10_TSPEC/SECTEST/SECTEST-NN_{slug}/SECTEST-NN_{slug}.md

Error Codes:

CodeSeverityDescription
REV-STR001ErrorTSPEC not in nested folder (BLOCKING)
REV-STR002ErrorFolder name doesn't match TSPEC ID
REV-STR003WarningFile name doesn't match folder name
REV-STR004ErrorTSPEC not in correct type subdirectory

This check is BLOCKING - TSPEC must pass structure validation before other checks proceed.


1. Test Coverage Targets

Validates coverage targets are met.

Coverage Targets:

  • Unit Tests (UTEST): >= 80%
  • Integration Tests (ITEST): >= 70%
  • Smoke Tests (STEST): Critical paths
  • Functional Tests (FTEST): >= 85%

Error Codes:

CodeSeverityDescription
REV-TC001ErrorUTEST coverage below 80%
REV-TC002ErrorITEST coverage below 70%
REV-TC003WarningSTEST missing critical paths
REV-TC004WarningFTEST coverage below 85%

2. SPEC Alignment

Validates tests trace to SPEC requirements.

Scope:

  • Every SPEC method has corresponding tests
  • All interfaces tested
  • Error scenarios covered
  • Thresholds validated in tests

Error Codes:

CodeSeverityDescription
REV-SA001ErrorSPEC method without test
REV-SA002ErrorInterface not tested
REV-SA003WarningError scenario not covered
REV-SA004WarningThreshold not validated in test

3. Test Case Completeness

Validates test cases have all required elements.

Required Elements:

  • Test ID
  • Description
  • Preconditions
  • Test steps
  • Expected results
  • Postconditions

Error Codes:

CodeSeverityDescription
REV-TCC001ErrorTest case missing required element
REV-TCC002WarningTest steps incomplete
REV-TCC003WarningExpected results vague
REV-TCC004InfoPostconditions not defined

4. Test Data Definition

Validates test data is properly defined.

Scope:

  • Test data sets documented
  • Boundary values included
  • Invalid data sets present
  • Data setup/teardown defined

Error Codes:

CodeSeverityDescription
REV-TD001ErrorNo test data defined
REV-TD002WarningBoundary values not included
REV-TD003WarningInvalid data not tested
REV-TD004InfoData setup not documented

5. Test Environment Requirements

Validates environment specifications present.

Scope:

  • Environment requirements documented
  • Dependencies listed
  • Configuration specified
  • Resource requirements defined

Error Codes:

CodeSeverityDescription
REV-TE001WarningEnvironment requirements missing
REV-TE002WarningDependencies not listed
REV-TE003InfoConfiguration not specified
REV-TE004InfoResource requirements not defined

6. Edge Case Coverage

Validates edge cases and error conditions tested.

Scope:

  • Boundary conditions tested
  • Null/empty input handling
  • Timeout scenarios
  • Concurrent access cases

Error Codes:

CodeSeverityDescription
REV-EC001WarningBoundary condition not tested
REV-EC002WarningNull/empty input not tested
REV-EC003InfoTimeout scenario not covered
REV-EC004InfoConcurrent access not tested

7. Placeholder Detection

Identifies incomplete content requiring replacement.

Error Codes:

CodeSeverityDescription
REV-P001Error[TODO] placeholder found
REV-P002Error[TBD] placeholder found
REV-P003WarningTemplate value not replaced

8. Naming Compliance

Validates element IDs follow doc-naming standards.

Scope:

  • Element IDs use TSPEC.NN.xxxx format
  • Element type codes valid for TSPEC (40, 41, 42, 43, 44, 45)
  • Test case naming convention

Error Codes:

CodeSeverityDescription
REV-N001ErrorInvalid element ID format
REV-N002ErrorElement type code not valid for TSPEC
REV-N003ErrorLegacy pattern detected

9. Upstream Drift Detection (Mandatory Cache)

Detects when upstream SPEC documents have been modified after the TSPEC was created or last updated.

The drift cache is mandatory. All TSPEC reviews must maintain and validate against the drift cache to ensure test specifications remain synchronized with SPEC changes.

Purpose: Identifies stale TSPEC content that may not reflect current SPEC documentation. When SPEC documents (methods, interfaces, data models) change, the TSPEC may need updates to maintain test coverage alignment.

Scope:

  • @spec: tag targets (SPEC documents)
  • Traceability section upstream artifact links
  • Any markdown links to ../09_SPEC/ source documents

Drift Cache File (MANDATORY)

Location: docs/10_TSPEC/.drift_cache.json

Schema:

{
  "cache_version": "2.0",
  "created": "2026-02-10T17:00:00Z",
  "last_validated": "2026-02-10T17:00:00Z",
  "documents": {
    "TSPEC-03": {
      "tspec_path": "docs/10_TSPEC/TSPEC-03_f3_observability.md",
      "tspec_hash": "sha256:abc123...",
      "last_updated": "2026-02-10T14:30:00Z",
      "upstream_refs": {
        "SPEC-03.yaml": {
          "path": "docs/09_SPEC/SPEC-03_f3_observability.yaml",
          "content_hash": "sha256:def456...",
          "section_hashes": {
            "methods": "sha256:ghi789...",
            "interfaces": "sha256:jkl012...",
            "data_models": "sha256:mno345..."
          },
          "last_validated": "2026-02-10T14:30:00Z"
        }
      }
    }
  }
}

Three-Phase Detection Algorithm

Phase 1: Cache Initialization

IF .drift_cache.json does not exist:
    1. Create cache file with schema version 2.0
    2. Scan all TSPEC documents in docs/10_TSPEC/
    3. For each TSPEC:
       a. Extract upstream SPEC references
       b. Compute content hashes for TSPEC
       c. Compute content hashes for each upstream SPEC
       d. Store in cache
    4. Report: "Cache initialized with N TSPEC documents"

Phase 2: Drift Detection

FOR each TSPEC being reviewed:
    1. Load cached hashes for this TSPEC
    2. For each upstream SPEC reference:
       a. Compute current hash of SPEC document
       b. Compare to cached hash
       c. IF hashes differ:
          - Flag as DRIFT
          - Compute section-level hashes to identify changed sections
          - Calculate change percentage
    3. Check timestamp: SPEC mtime > TSPEC last_updated
    4. Aggregate drift findings by severity

Phase 3: Cache Update

AFTER successful review (score >= threshold):
    1. Update content hashes for reviewed TSPEC
    2. Update upstream SPEC hashes
    3. Set last_validated timestamp
    4. Write updated cache to disk
    5. Report: "Cache updated for TSPEC-NN"

Hash Calculation (MANDATORY BASH EXECUTION)

CRITICAL: Execute actual bash commands. DO NOT write placeholder values.

Full File Hash:

sha256sum <file_path> | cut -d' ' -f1

Store as: "hash": "sha256:<64_hex_characters>"

Section Hash (for YAML sections):

yq '.<section_name>' <file_path> | sha256sum | cut -d' ' -f1

REJECTED VALUES (re-compute immediately):

  • sha256:verified_no_drift
  • sha256:pending_verification
  • Any value where hex portion!= 64 characters

Verification:

grep -oP '"hash":\s*"sha256:[0-9a-f]{64}"' .drift_cache.json

Error Codes:

CodeSeverityDescription
REV-D001WarningUpstream SPEC document modified after TSPEC 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 missing or corrupted - must initialize before review
REV-D009ErrorInvalid hash placeholder detected (verified_no_drift, pending_verification)

Report Output:

## Upstream Drift Analysis

**Cache Status**: Valid | Last validated: 2026-02-10T14:30:00Z

| Upstream Document | TSPEC Reference | Cached Hash | Current Hash | Change % | Severity |
|-------------------|-----------------|-------------|--------------|----------|----------|
| SPEC-03.yaml | @spec methods | sha256:abc1... | sha256:xyz9... | 15% | Warning |
| SPEC-03.yaml | @spec interfaces | sha256:def4... | sha256:def4... | 0% | OK |

### Changed Sections Detail

**SPEC-03.yaml#methods** (15% change):
- Lines 45-67: Method signature changed
- Lines 120-135: New parameter added

**Recommendation**: Review upstream SPEC changes and update TSPEC test cases for modified methods.

Auto-Actions:

  • Initialize .drift_cache.json if missing (Phase 1)
  • Update cache with current hashes after successful review (Phase 3)
  • Add [DRIFT] marker to affected @spec tags in review report
  • Generate drift summary with section-level detail

Configuration:

SettingDefaultDescription
cache_enabledtrueMandatory - cache is always enabled
drift_threshold_days7Days before drift becomes Warning
critical_threshold_days30Days before drift becomes Error
change_threshold_percent20Change percentage triggering Error severity
tracked_patterns@spec:Patterns to track for drift

Review Score Calculation

Scoring Formula:

CategoryWeightCalculation
Test Coverage Targets19%(coverage_met / 4) × 19
SPEC Alignment19%(aligned_tests / total) × 19
Test Case Completeness19%(complete / total_cases) × 19
Test Data Definition9%(data_score) × 9
Test Environment Requirements5%(requirements_met / total) × 5
Edge Case Coverage9%(covered / identified) × 9
Placeholder Detection5%(no_placeholders? 5: 5 - count)
Naming Compliance10%(valid_ids / total_ids) × 10
Upstream Drift5%(fresh_refs / total_refs) × 5

Total: Sum of all categories (max 100)

Thresholds:

  • PASS: >= 90
  • WARNING: 80-89
  • FAIL: < 80

Command Usage

# Review specific TSPEC
/doc-tspec-reviewer TSPEC-03

# Review TSPEC by path
/doc-tspec-reviewer docs/10_TSPEC/TSPEC-03_f3_observability.md

# Review all TSPECs
/doc-tspec-reviewer all

Output Report

Review reports are stored alongside the reviewed document per project standards.

Nested Folder Rule: ALL TSPEC use nested folders (TSPEC-NN_{slug}/) regardless of size. This ensures review reports, fix reports, and drift cache files are organized with their parent document.

File Naming: TSPEC-NN.R_review_report_vNNN.md

Audit Wrapper Compatibility: doc-tspec-audit can emit TSPEC-NN.A_audit_report_vNNN.md as preferred fixer input while reviewer-native .R_review_report_vNNN.md remains supported.

Location: Inside the TSPEC nested folder: docs/10_TSPEC/TSPEC-NN_{slug}/

Versioning Rules

  1. First Review: Creates TSPEC-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 TSPEC-NN.R_review_report_v*.md files and increments.

Example:

docs/10_TSPEC/TSPEC-03_f3_observability/
├── TSPEC-03_f3_observability.md
├── TSPEC-03.R_review_report_v001.md    # First review
├── TSPEC-03.R_review_report_v002.md    # After fixes
└── .drift_cache.json

Delta Reporting

When previous reviews exist, include score comparison in the report.

See REVIEW_DOCUMENT_STANDARDS.md for complete versioning requirements.


Integration with doc-tspec-autopilot

This skill is invoked during Phase 5 of doc-tspec-autopilot:

flowchart LR
    A[Phase 4: Validation] --> B[Phase 5: Final Review]
    B --> C{doc-tspec-reviewer}
    C --> D[Phase 6: Continue]

Related Skills

SkillRelationship
doc-namingNaming standards for Check #8
doc-tspec-autopilotInvokes this skill in Phase 5
doc-tspec-auditWraps validator+reviewer into combined audit output
doc-tspec-validatorStructural validation (Phase 4)
doc-tspec-fixerApplies fixes based on review findings
doc-tspecTSPEC creation rules
doc-spec-reviewerUpstream QA

Version History

VersionDateChanges
1.62026-02-27Normalized frontmatter to metadata schema with versioning_policy; changed structure gate heading from fixed 12/12 wording to MVP; added explicit audit-wrapper compatibility guidance (.A_ preferred, .R_ reviewer-native)
1.52026-02-26Added PTEST (code 44) and SECTEST (code 45) support; Updated test type count from 4 to 6; Added PTEST/SECTEST to nested folder table; Updated element type codes to 40-45
1.42026-02-11BLOCKING Structure Compliance check: Added Check #0 as BLOCKING gate; Validates nested folder rule for all TSPEC types (UTEST/ITEST/STEST/FTEST); REV-STR001-STR004 error codes; TSPEC must pass structure validation before other checks proceed
1.32026-02-10Mandatory drift cache: Cache is now required for all reviews; Three-phase detection algorithm; SHA-256 hash calculation with Python example; REV-D006 error code for missing cache; Cache schema v2.0 with section-level hashes; Report output with cache status and change percentages
1.22026-02-10Added Check #9: Upstream Drift Detection - detects when SPEC documents modified after TSPEC creation; REV-D001-D005 error codes; drift cache support; configurable thresholds; added doc-tspec-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; Coverage target validation; SPEC alignment; Test case completeness; Edge case coverage

Implementation Plan Consistency (IPLAN-004)

  • Treat plan-derived outputs as valid source mode and verify intent preservation from implementation plan scope/objectives.
  • Validate upstream autopilot precedence assumption: --iplan > --ref > --prompt.
  • Flag objective/scope conflicts between plan context and artifact output as blocking issues requiring clarification.
  • Do not introduce legacy fallback paths such as docs-v2.0/00_REF.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.55%
按下载量换算76

Claude

31.45%
按下载量换算67

Cursor

18.5%
按下载量换算40

Gemini CLI

8.73%
按下载量换算19

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills