audit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Audit Specification Quality

审核规范质量

Perform a comprehensive quality audit of specifications with formal scoring.
对规范进行全面的质量审核并给出正式评分。

Workflow

工作流程

  1. Load Specifications
    • If path provided, audit single specification
    • If
      --all
      flag, audit all specifications in
      .specs/
  2. Execute Audit
    • Spawn
      spec-reviewer audit
      agent
    • Evaluate against quality rubric
    • Score each category
  3. Generate Report
    • Overall grade (A-F scale)
    • Category scores
    • Issue details by severity
    • Remediation guidance
  1. 加载规范
    • 若提供路径,则审核单个规范
    • 若使用
      --all
      标志,则审核
      .specs/
      目录下的所有规范
  2. 执行审核
    • 启动
      spec-reviewer audit
      agent
    • 根据质量评估标准进行评估
    • 为每个类别打分
  3. 生成报告
    • 总体等级(A-F评分制)
    • 类别得分
    • 按严重程度划分的问题详情
    • 整改指导建议

Arguments

参数

  • $ARGUMENTS
    - Path to specification file
  • --all
    - Audit all specifications
  • --format
    - Output format: markdown (default), json
  • $ARGUMENTS
    - 规范文件的路径
  • --all
    - 审核所有规范
  • --format
    - 输出格式:markdown(默认)、json

Examples

示例

bash
undefined
bash
undefined

Audit single specification

审核单个规范

/spec-driven-development:audit .specs/user-auth/spec.md
/spec-driven-development:audit .specs/user-auth/spec.md

Audit all specifications

审核所有规范

/spec-driven-development:audit --all
/spec-driven-development:audit --all

JSON output for tooling

为工具输出JSON格式结果

/spec-driven-development:audit .specs/user-auth/spec.md --format json
undefined
/spec-driven-development:audit .specs/user-auth/spec.md --format json
undefined

Scoring Rubric

评分标准

CategoryWeightCriteria
Structure20%Required sections, frontmatter, organization
Requirements25%EARS format, completeness, clarity
Acceptance Criteria25%Given/When/Then, coverage, testability
Traceability15%IDs, cross-references, dependencies
Quality15%INVEST scores, no ambiguity, specificity
类别权重评估标准
结构20%必需章节、前置内容、组织架构
需求25%EARS格式、完整性、清晰度
验收标准25%Given/When/Then格式、覆盖范围、可测试性
可追溯性15%ID、交叉引用、依赖关系
质量15%INVEST评分、无歧义、明确性

Grade Thresholds

等级阈值

GradeScoreStatus
A+95-100Exceptional
A90-94Excellent
B80-89Good
C70-79Acceptable
D60-69Needs Work
F<60Failing
等级分数状态
A+95-100优秀
A90-94极佳
B80-89良好
C70-79合格
D60-69需要改进
F<60不合格

Audit Report

审核报告

markdown
undefined
markdown
undefined

Specification Audit Report

规范审核报告

Specification: user-auth Audited: 2024-01-15T10:30:00Z Grade: B (84/100)
规范名称: user-auth 审核时间: 2024-01-15T10:30:00Z 等级: B (84/100)

Category Scores

类别得分

CategoryScoreMax%
Structure182090%
Requirements212584%
Acceptance Criteria202580%
Traceability131587%
Quality121580%
TOTAL8410084%
类别得分满分占比
结构182090%
需求212584%
验收标准202580%
可追溯性131587%
质量121580%
总计8410084%

Issues Found

发现的问题

Critical (0)

严重问题 (0)

None

Major (2)

主要问题 (2)

  1. FR-3: Missing acceptance criteria for error case
  2. NFR-1: Performance threshold not testable
  1. FR-3: 缺少错误场景的验收标准
  2. NFR-1: 性能阈值不可测试

Minor (3)

次要问题 (3)

  1. FR-1.AC-2: Could be more specific
  2. FR-2: Consider splitting into smaller requirements
  3. Dependencies: Missing link to FR-1
  1. FR-1.AC-2: 可更具体化
  2. FR-2: 考虑拆分为更小的需求
  3. 依赖关系: 缺少与FR-1的链接

Recommendations

建议

  1. Add acceptance criteria for FR-3 error handling
  2. Specify measurable threshold for NFR-1
  3. Consider refining FR-2 for better INVEST score
  1. 为FR-3的错误处理添加验收标准
  2. 为NFR-1指定可衡量的阈值
  3. 考虑优化FR-2以提升INVEST评分

Comparison (if previous audit exists)

对比(若存在历史审核记录)

MetricPreviousCurrentChange
GradeC (75)B (84)+9
Issues85-3
undefined
指标历史当前变化
等级C (75)B (84)+9
问题数量85-3
undefined

Related Commands

相关命令

  • /spec-driven-development:validate
    - Quick validation check
  • /spec-driven-development:refine
    - AI-assisted improvements
  • /spec-driven-development:status
    - View specification status
  • /spec-driven-development:validate
    - 快速验证检查
  • /spec-driven-development:refine
    - AI辅助改进
  • /spec-driven-development:status
    - 查看规范状态