doc-sys-autopilot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

doc-sys-autopilot

doc-sys-autopilot

Purpose

目的

Automated System Requirements (SYS) generation pipeline that processes ADR architecture decisions to generate comprehensive system requirements documents with functional requirements, quality attributes, and REQ-Ready scoring.
Layer: 6 (System Requirements)
Upstream: BRD (Layer 1), PRD (Layer 2), EARS (Layer 3), BDD (Layer 4), ADR (Layer 5)
Downstream Artifacts: REQ (Layer 7)

自动化 系统需求(SYS) 生成流水线:处理 ADR 架构决策,生成包含功能需求、质量属性和 REQ-Ready 评分的综合系统需求文档。
层级:6(系统需求)
上游:BRD(第 1 层)、PRD(第 2 层)、EARS(第 3 层)、BDD(第 4 层)、ADR(第 5 层)
下游产物:REQ(第 7 层)

Input Contract (IPLAN-004 Standard)

输入契约(IPLAN-004 标准)

  • Supported modes:
    • --ref <path>
    • --prompt "<text>"
    • --iplan <path|IPLAN-NNN>
  • Precedence:
    --iplan > --ref > --prompt
  • IPLAN resolution order:
    1. Use explicit file path when it exists
    2. Resolve
      work_plans/IPLAN-NNN*.md
    3. Resolve
      governance/plans/IPLAN-NNN*.md
    4. If multiple matches exist, fail with disambiguation request
  • Merge conflict rule:
    • Objective/scope conflicts between primary and supplemental sources are blocking and require user clarification.

  • 支持的模式:
    • --ref <path>
    • --prompt "<text>"
    • --iplan <path|IPLAN-NNN>
  • 优先级:
    --iplan > --ref > --prompt
  • IPLAN 解析顺序:
    1. 当显式文件路径存在时使用该路径
    2. 解析
      work_plans/IPLAN-NNN*.md
    3. 解析
      governance/plans/IPLAN-NNN*.md
    4. 如果存在多个匹配项,则失败并请求消除歧义
  • 合并冲突规则:
    • 主来源与补充来源之间的目标/范围冲突属于阻断性问题,需要用户澄清。

Input Contract (IPLAN-004 Standard)

输入契约(IPLAN-004 标准)

  • Supported modes:
    • --ref <path>
    • --prompt "<text>"
    • --iplan <path|IPLAN-NNN>
  • Precedence:
    --iplan > --ref > --prompt
  • IPLAN resolution order:
    1. Use explicit file path when it exists
    2. Resolve
      work_plans/IPLAN-NNN*.md
    3. Resolve
      governance/plans/IPLAN-NNN*.md
    4. If multiple matches exist, fail with disambiguation request
  • Merge conflict rule:
    • Objective/scope conflicts between primary and supplemental sources are blocking and require user clarification.

  • 支持的模式:
    • --ref <path>
    • --prompt "<text>"
    • --iplan <path|IPLAN-NNN>
  • 优先级:
    --iplan > --ref > --prompt
  • IPLAN 解析顺序:
    1. 当显式文件路径存在时使用该路径
    2. 解析
      work_plans/IPLAN-NNN*.md
    3. 解析
      governance/plans/IPLAN-NNN*.md
    4. 如果存在多个匹配项,则失败并请求消除歧义
  • 合并冲突规则:
    • 主来源与补充来源之间的目标/范围冲突属于阻断性问题,需要用户澄清。

Skill Dependencies

Skill 依赖

This autopilot orchestrates the following skills:
SkillPurposePhase
doc-naming
Element ID format (SYS.NN.TT.SS), threshold tags, legacy pattern detectionAll Phases
doc-sys
SYS creation rules, 5-part structure, quality attribute categoriesPhase 3: SYS Generation
quality-advisor
Real-time quality feedback during SYS generationPhase 3: SYS Generation
doc-sys-validator
Validate SYS structure, content, REQ-Ready scorePhase 4: SYS Validation
doc-sys-reviewer
Content review, link validation, quality scoringPhase 5: Review
doc-sys-fixer
Apply fixes from review report, create missing filesPhase 5: Fix
Delegation Principle: The autopilot orchestrates workflow but delegates:
  • SYS structure/content rules ->
    doc-sys
    skill
  • Real-time quality feedback ->
    quality-advisor
    skill
  • SYS validation logic ->
    doc-sys-validator
    skill
  • Content review and scoring ->
    doc-sys-reviewer
    skill
  • Issue resolution and fixes ->
    doc-sys-fixer
    skill
  • Element ID standards ->
    doc-naming
    skill

此 autopilot 编排以下 skills:
Skill用途阶段
doc-naming
元素 ID 格式(SYS.NN.TT.SS)、阈值标签、旧版模式检测所有阶段
doc-sys
SYS 创建规则、5 部分结构、质量属性类别阶段 3:SYS 生成
quality-advisor
SYS 生成期间的实时质量反馈阶段 3:SYS 生成
doc-sys-validator
验证 SYS 结构、内容和 REQ-Ready 分数阶段 4:SYS 验证
doc-sys-reviewer
内容审查、链接验证、质量评分阶段 5:审查
doc-sys-fixer
应用审查报告中的修复、创建缺失文件阶段 5:修复
委派原则:autopilot 负责编排工作流,但将具体职责委托给各 skill:
  • SYS 结构/内容规则 ->
    doc-sys
    skill
  • 实时质量反馈 ->
    quality-advisor
    skill
  • SYS 验证逻辑 ->
    doc-sys-validator
    skill
  • 内容审查和评分 ->
    doc-sys-reviewer
    skill
  • 问题解决和修复 ->
    doc-sys-fixer
    skill
  • 元素 ID 标准 ->
    doc-naming
    skill

Document Type Contract (MANDATORY)

文档类型契约(强制)

When generating SYS document instances, the autopilot MUST:
  1. Read
    instance_document_type
    from template:
    • Source:
      ai_dev_ssd_flow/06_SYS/SYS-MVP-TEMPLATE.yaml
    • Field:
      metadata.instance_document_type: "sys-document"
  2. Set
    document_type
    in generated document frontmatter:
    yaml
    custom_fields:
      document_type: sys-document    # NOT "template"
      artifact_type: SYS
      layer: 6
  3. Validation: Generated documents MUST have
    document_type: sys-document
    • Templates have
      document_type: template
    • Instances have
      document_type: sys-document
    • Schema validates both values
Error Handling: If
instance_document_type
is missing from template, default to
sys-document
.

生成 SYS 文档实例时,autopilot 必须:
  1. 从模板中读取
    instance_document_type
    :
    • 来源:
      ai_dev_ssd_flow/06_SYS/SYS-MVP-TEMPLATE.yaml
    • 字段:
      metadata.instance_document_type: "sys-document"
  2. 在生成文档的 frontmatter 中设置
    document_type
    :
    yaml
    custom_fields:
      document_type: sys-document    # NOT "template"
      artifact_type: SYS
      layer: 6
  3. 验证:生成的文档必须具有
    document_type: sys-document
    • 模板的
      document_type
      为
      template
    • 实例的
      document_type
      为
      sys-document
    • Schema 验证这两个值
错误处理:如果模板缺少
instance_document_type
,则默认为
sys-document
。

Smart Document Detection

智能文档检测

The autopilot automatically determines the action based on the input document type.
autopilot 根据输入文档类型自动确定要执行的操作。

Input Type Recognition

输入类型识别

InputDetected AsAction
SYS-NN
Self typeReview existing SYS document
ADR-NN
Upstream typeGenerate if missing, review if exists
输入识别结果操作
SYS-NN
自身类型审查现有 SYS 文档
ADR-NN
上游类型缺失时生成,存在时审查

Detection Algorithm

检测算法

1. Parse input: Extract TYPE and NN from "{TYPE}-{NN}"
2. Determine action:
   - IF TYPE == "SYS": Review Mode
   - ELSE IF TYPE == "ADR": Generate/Find Mode
   - ELSE: Error (invalid type for this autopilot)
3. For Generate/Find Mode:
   - Check: Does SYS-{NN} exist in docs/06_SYS/?
   - IF exists: Switch to Review Mode for SYS-{NN}
   - ELSE: Proceed with Generation from ADR-{NN}
1. Parse input: Extract TYPE and NN from "{TYPE}-{NN}"
2. Determine action:
   - IF TYPE == "SYS": Review Mode
   - ELSE IF TYPE == "ADR": Generate/Find Mode
   - ELSE: Error (invalid type for this autopilot)
3. For Generate/Find Mode:
   - Check: Does SYS-{NN} exist in docs/06_SYS/?
   - IF exists: Switch to Review Mode for SYS-{NN}
   - ELSE: Proceed with Generation from ADR-{NN}

File Existence Check

文件存在性检查

bash
undefined
bash
undefined

Check for nested folder structure (mandatory)

Check for nested folder structure (mandatory)

ls docs/06_SYS/SYS-{NN}_*/
undefined
ls docs/06_SYS/SYS-{NN}_*/
undefined

Examples

示例

bash
undefined
bash
undefined

Review mode (same type - SYS input)

Review mode (same type - SYS input)

/doc-sys-autopilot SYS-01 # Reviews existing SYS-01
/doc-sys-autopilot SYS-01 # Reviews existing SYS-01

Generate/Find mode (upstream type - ADR input)

Generate/Find mode (upstream type - ADR input)

/doc-sys-autopilot ADR-01 # Generates SYS-01 if missing, or reviews existing SYS-01
/doc-sys-autopilot ADR-01 # Generates SYS-01 if missing, or reviews existing SYS-01

Multiple inputs

Multiple inputs

/doc-sys-autopilot ADR-01,ADR-02 # Generates/reviews SYS-01 and SYS-02 /doc-sys-autopilot SYS-01,SYS-02 # Reviews SYS-01 and SYS-02
undefined
/doc-sys-autopilot ADR-01,ADR-02 # Generates/reviews SYS-01 and SYS-02 /doc-sys-autopilot SYS-01,SYS-02 # Reviews SYS-01 and SYS-02
undefined

Action Determination Output

操作判定输出

Input: ADR-01
├── Detected Type: ADR (upstream)
├── Expected SYS: SYS-01
├── SYS Exists: Yes → docs/06_SYS/SYS-01_f1_iam/
└── Action: REVIEW MODE - Running doc-sys-reviewer on SYS-01

Input: ADR-05
├── Detected Type: ADR (upstream)
├── Expected SYS: SYS-05
├── SYS Exists: No
└── Action: GENERATE MODE - Creating SYS-05 from ADR-05

Input: SYS-03
├── Detected Type: SYS (self)
└── Action: REVIEW MODE - Running doc-sys-reviewer on SYS-03

Input: ADR-01
├── Detected Type: ADR (upstream)
├── Expected SYS: SYS-01
├── SYS Exists: Yes → docs/06_SYS/SYS-01_f1_iam/
└── Action: REVIEW MODE - Running doc-sys-reviewer on SYS-01

Input: ADR-05
├── Detected Type: ADR (upstream)
├── Expected SYS: SYS-05
├── SYS Exists: No
└── Action: GENERATE MODE - Creating SYS-05 from ADR-05

Input: SYS-03
├── Detected Type: SYS (self)
└── Action: REVIEW MODE - Running doc-sys-reviewer on SYS-03

When to Use This Skill

何时使用此 Skill

Use
doc-sys-autopilot
when
:
  • ADR documents are complete with SYS-Ready score >= 90%
  • Need to generate system requirements from architecture decisions
  • Want automated functional requirement and quality attribute generation
  • Ensuring consistent SYS quality across the project
  • Automating SYS generation in CI/CD pipelines
Do NOT use when:
  • Manually creating a single SYS with extensive customization (use
    doc-sys
    directly)
  • ADR documents are incomplete or have SYS-Ready score < 90%
  • Editing specific SYS sections (use
    doc-sys
    for guidance)
  • Validating existing SYS only (use
    doc-sys-validator
    )

在以下情况下使用
doc-sys-autopilot
:
  • ADR 文档已完成,且 SYS-Ready 分数 >= 90%
  • 需要根据架构决策生成系统需求
  • 希望自动生成功能需求和质量属性
  • 需要确保项目中的 SYS 质量保持一致
  • 需要在 CI/CD 流水线中自动化 SYS 生成
以下情况不要使用:
  • 需要大量自定义并手动创建单个 SYS(直接使用
    doc-sys
    )
  • ADR 文档不完整或 SYS-Ready 分数 < 90%
  • 需要编辑 SYS 的特定章节(使用
    doc-sys
    获取指导)
  • 只需验证现有 SYS(使用
    doc-sys-validator
    )

Workflow Overview

工作流概览

mermaid
flowchart TD
    subgraph Phase1["Phase 1: ADR Analysis"]
        A[Start] --> B[Read ADR Documents]
        B --> C[Extract Architecture Decisions]
        C --> D[Identify System Constraints]
        D --> E[Catalog Technical Requirements]
    end

    subgraph Phase2["Phase 2: SYS Readiness Check"]
        E --> F[Check ADR SYS-Ready Scores]
        F --> G{All ADRs >= 90%?}
        G -->|No| H[Flag ADRs Below Threshold]
        H --> I[Report Missing Elements]
        I --> J[Abort or Continue with Warnings]
        G -->|Yes| K[Mark ADRs Ready for SYS]
    end

    subgraph Phase3["Phase 3: SYS Generation"]
        K --> L{Next ADR Topic}
        L --> M[Load SYS Template]
        M --> N[Generate Document Control]
        N --> O[Generate Functional Requirements]
        O --> P[Generate Quality Attributes]
        P --> Q[Generate Interface Specifications]
        Q --> R[quality-advisor: Real-time Feedback]
        R --> S[Generate Remaining Sections]
        S --> T[Add Cumulative Tags]
        T --> U[Write SYS Files]
    end

    subgraph Phase4["Phase 4: SYS Validation"]
        U --> V[Run doc-sys-validator]
        V --> W{REQ-Ready >= 90%?}
        W -->|No| X[Auto-Fix SYS Issues]
        X --> Y[Re-validate SYS]
        Y --> W
        W -->|Yes| Z[Mark SYS Validated]
    end

    subgraph Phase5["Phase 5: Review & Fix Cycle"]
        Z --> ZA[Run doc-sys-reviewer]
        ZA --> ZB{Score >= 90?}
        ZB -->|No| ZC[Run doc-sys-fixer]
        ZC --> ZD{Iteration < Max?}
        ZD -->|Yes| ZA
        ZD -->|No| ZE[Flag Manual Review]
        ZB -->|Yes| ZF[Verify Quality Checks]
        ZE --> ZF
        ZF --> AA{More ADR Topics?}
        AA -->|Yes| L
        AA -->|No| AB[Check All SYS Complete]
        AB --> AC[Verify Cross-SYS Consistency]
        AC --> AD[Update Traceability Matrix]
        AD --> AE[Generate Summary Report]
    end

    AE --> AF[Complete]

mermaid
flowchart TD
    subgraph Phase1["Phase 1: ADR Analysis"]
        A[Start] --> B[Read ADR Documents]
        B --> C[Extract Architecture Decisions]
        C --> D[Identify System Constraints]
        D --> E[Catalog Technical Requirements]
    end

    subgraph Phase2["Phase 2: SYS Readiness Check"]
        E --> F[Check ADR SYS-Ready Scores]
        F --> G{All ADRs >= 90%?}
        G -->|No| H[Flag ADRs Below Threshold]
        H --> I[Report Missing Elements]
        I --> J[Abort or Continue with Warnings]
        G -->|Yes| K[Mark ADRs Ready for SYS]
    end

    subgraph Phase3["Phase 3: SYS Generation"]
        K --> L{Next ADR Topic}
        L --> M[Load SYS Template]
        M --> N[Generate Document Control]
        N --> O[Generate Functional Requirements]
        O --> P[Generate Quality Attributes]
        P --> Q[Generate Interface Specifications]
        Q --> R[quality-advisor: Real-time Feedback]
        R --> S[Generate Remaining Sections]
        S --> T[Add Cumulative Tags]
        T --> U[Write SYS Files]
    end

    subgraph Phase4["Phase 4: SYS Validation"]
        U --> V[Run doc-sys-validator]
        V --> W{REQ-Ready >= 90%?}
        W -->|No| X[Auto-Fix SYS Issues]
        X --> Y[Re-validate SYS]
        Y --> W
        W -->|Yes| Z[Mark SYS Validated]
    end

    subgraph Phase5["Phase 5: Review & Fix Cycle"]
        Z --> ZA[Run doc-sys-reviewer]
        ZA --> ZB{Score >= 90?}
        ZB -->|No| ZC[Run doc-sys-fixer]
        ZC --> ZD{Iteration < Max?}
        ZD -->|Yes| ZA
        ZD -->|No| ZE[Flag Manual Review]
        ZB -->|Yes| ZF[Verify Quality Checks]
        ZE --> ZF
        ZF --> AA{More ADR Topics?}
        AA -->|Yes| L
        AA -->|No| AB[Check All SYS Complete]
        AB --> AC[Verify Cross-SYS Consistency]
        AC --> AD[Update Traceability Matrix]
        AD --> AE[Generate Summary Report]
    end

    AE --> AF[Complete]

Detailed Workflow

详细工作流

Phase 1: ADR Analysis

阶段 1:ADR 分析

Analyze ADR documents to extract architecture decisions and system constraints.
Input Sources:
PrioritySourceLocationContent Type
1ADR Documents
docs/05_ADR/ADR-NN_{slug}.md
Architecture Decisions
2ADR-00 Technology Stack
docs/05_ADR/ADR-00_technology_stack.md
Approved Technologies
3BRD Section 7.2
docs/01_BRD/BRD-NN_{slug}/
Architecture Decision Requirements
4PRD Section 18
docs/02_PRD/PRD-NN_{slug}/
Architecture Decision Requirements
Analysis Process:
bash
undefined
分析 ADR 文档,提取架构决策和系统约束。
输入来源:
优先级来源位置内容类型
1ADR 文档
docs/05_ADR/ADR-NN_{slug}.md
架构决策
2ADR-00 技术栈
docs/05_ADR/ADR-00_technology_stack.md
已批准的技术
3BRD 第 7.2 节
docs/01_BRD/BRD-NN_{slug}/
架构决策需求
4PRD 第 18 节
docs/02_PRD/PRD-NN_{slug}/
架构决策需求
分析过程:
bash
undefined

Locate ADR documents

Locate ADR documents

find docs/05_ADR/ -name "ADR-*.md" -type f | sort
find docs/05_ADR/ -name "ADR-*.md" -type f | sort

Check for SYS-Ready scores in ADRs

Check for SYS-Ready scores in ADRs

grep -E "SYS-Ready.Score" docs/05_ADR/ADR-.md

**Required ADR Content per Topic**:

| ADR | Topic Category | Key Content for SYS |
|-----|----------------|---------------------|
| ADR-01 | Infrastructure | Compute, networking, scaling constraints |
| ADR-02 | Data Architecture | Storage, data flow, persistence requirements |
| ADR-03 | Integration | API patterns, messaging, protocol requirements |
| ADR-04 | Security | Authentication, authorization, encryption requirements |
| ADR-05 | Observability | Logging, monitoring, alerting requirements |
| ADR-06 | AI/ML | Model requirements, inference constraints |
| ADR-07 | Technology Selection | Framework, language, tool constraints |

**Output**: System requirements catalog with ADR-derived constraints and technical requirements.
grep -E "SYS-Ready.Score" docs/05_ADR/ADR-.md

**各主题的 ADR 必需内容**:

| ADR | 主题类别 | 用于 SYS 的关键内容 |
|-----|----------------|---------------------|
| ADR-01 | 基础设施 | 计算、网络、扩缩容约束 |
| ADR-02 | 数据架构 | 存储、数据流、持久化需求 |
| ADR-03 | 集成 | API 模式、消息传递、协议需求 |
| ADR-04 | 安全 | 身份认证、授权、加密需求 |
| ADR-05 | 可观测性 | 日志、监控、告警需求 |
| ADR-06 | AI/ML | 模型需求、推理约束 |
| ADR-07 | 技术选型 | 框架、语言、工具约束 |

**输出**:包含 ADR 衍生约束和技术需求的系统需求目录。

Phase 2: SYS Readiness Check

阶段 2:SYS 就绪检查

Validate that all ADR documents meet the SYS-Ready threshold before proceeding.
Skill Delegation: Element ID validation follows rules in
doc-naming
skill. See:
.claude/skills/doc-naming/SKILL.md
for element type codes.
SYS-Ready Score Requirements:
CriteriaWeightDescription
Decision Completeness30%Context/Decision/Consequences/Alternatives documented
Architecture Clarity35%Mermaid diagrams, component responsibilities
Implementation Readiness20%Complexity assessment, dependencies, rollback strategies
Verification Approach15%Testing strategy, success metrics, operational readiness
Minimum Score: 90%
ADR to SYS Mapping:
ADR DocumentSYS DocumentSystem Domain
ADR-01SYS-01Infrastructure System
ADR-02SYS-02Data Management System
ADR-03SYS-03Integration System
ADR-04SYS-04Security System
ADR-05SYS-05Observability System
ADR-06SYS-06AI/ML System
ADR-07SYS-07Technology Platform
Readiness Check Process:
python
def check_adr_readiness(adr_list: list) -> dict:
    """
    Check SYS-Ready scores for all ADR documents.

    Returns:
        dict with 'ready' (list of ADRs >= 90%)
        and 'not_ready' (list of ADRs < 90% with issues)
    """
    ready = []
    not_ready = []

    for adr in adr_list:
        score = extract_sys_ready_score(adr)
        if score >= 90:
            ready.append(adr)
        else:
            not_ready.append({
                'adr': adr,
                'score': score,
                'issues': identify_missing_elements(adr)
            })

    return {'ready': ready, 'not_ready': not_ready}
在继续之前,验证所有 ADR 文档是否达到 SYS-Ready 阈值。
Skill 委派:元素 ID 验证遵循
doc-naming
skill 中的规则。 参见:
.claude/skills/doc-naming/SKILL.md
中的元素类型代码。
SYS-Ready 分数要求:
标准权重说明
决策完整性30%已记录上下文/决策/后果/备选方案
架构清晰度35%Mermaid 图、组件职责
实现就绪度20%复杂度评估、依赖关系、回滚策略
验证方法15%测试策略、成功指标、运行就绪度
最低分数:90%
ADR 到 SYS 的映射:
ADR 文档SYS 文档系统领域
ADR-01SYS-01基础设施系统
ADR-02SYS-02数据管理系统
ADR-03SYS-03集成系统
ADR-04SYS-04安全系统
ADR-05SYS-05可观测性系统
ADR-06SYS-06AI/ML 系统
ADR-07SYS-07技术平台
就绪检查流程:
python
def check_adr_readiness(adr_list: list) -> dict:
    """
    Check SYS-Ready scores for all ADR documents.

    Returns:
        dict with 'ready' (list of ADRs >= 90%)
        and 'not_ready' (list of ADRs < 90% with issues)
    """
    ready = []
    not_ready = []

    for adr in adr_list:
        score = extract_sys_ready_score(adr)
        if score >= 90:
            ready.append(adr)
        else:
            not_ready.append({
                'adr': adr,
                'score': score,
                'issues': identify_missing_elements(adr)
            })

    return {'ready': ready, 'not_ready': not_ready}

Phase 3: SYS Generation

阶段 3:SYS 生成

Generate SYS documents with functional requirements and quality attributes.
Skill Delegation: This phase follows rules defined in
doc-sys
skill. See:
.claude/skills/doc-sys/SKILL.md
for complete SYS creation guidance.
Quality Guidance: Uses
quality-advisor
skill for real-time feedback during generation. See:
.claude/skills/quality-advisor/SKILL.md
for quality monitoring.
Generation Process:
  1. Reserve SYS ID:
    bash
    # Check for next available ID
    ls docs/06_SYS/SYS-*.md 2>/dev/null | \
      grep -oP 'SYS-\K\d+' | sort -n | tail -1
    # Increment for new SYS
  2. Load SYS Template:
  • Primary:
    ai_dev_ssd_flow/06_SYS/SYS-MVP-TEMPLATE.md
  • Rules:
    ai_dev_ssd_flow/06_SYS/SYS_MVP_CREATION_RULES.md
  1. Generate Document Control Section:
    FieldValue
    Project NameFrom BRD
    Document Version0.1.0
    Date CreatedCurrent date (YYYY-MM-DD)
    Last UpdatedCurrent date (YYYY-MM-DD)
    Document OwnerFrom ADR stakeholder analysis
    Prepared ByAI Assistant
    StatusDraft (or In Review if ADR Accepted)
    EARS-Ready ScoreFrom upstream EARS
    REQ-Ready ScoreCalculated after generation
  2. Generate Functional Requirements (Part 2 - Section 4):
    From ADR Decision and Implementation sections:
    Element IDRequirementPrioritySourceVerification
    SYS.01.01.01The system shall...Must HaveADR-01.DecisionIntegration Test
    SYS.01.01.02The system shall...Should HaveADR-01.ImplUnit Test
    Element Type Codes (per
    doc-naming
    skill):
    Element TypeCodeExample
    Functional Requirement01SYS.02.01.01
    Quality Attribute02SYS.02.02.01
    Use Case11SYS.02.11.01
    System Requirement26SYS.02.26.01
  3. Generate Quality Attributes (Part 2 - Section 5):
    From ADR Consequences and Implementation sections:
    Required Categories:
    CategorySourceMetrics
    PerformanceADR latency/throughput targetsp50/p95/p99, TPS
    ReliabilityADR availability/recoveryUptime %, MTBF, MTTR
    ScalabilityADR scaling decisionsConcurrent users, data volume
    SecurityADR-04 Security ADRAuth latency, encryption
    ObservabilityADR-05 Observability ADRLog retention, alert thresholds
    MaintainabilityADR deployment decisionsDeploy frequency, coverage
    Quality Attribute Format:
    markdown
    | ID | Category | Attribute | Target | Measurement | Source |
    |----|----------|-----------|--------|-------------|--------|
    | SYS.01.02.01 | Performance | API Response Time | p95 < 100ms | APM Monitoring | @threshold: PRD.01.perf.api.p95_latency |
    | SYS.01.02.02 | Reliability | Availability | 99.9% | Uptime Monitoring | @threshold: PRD.01.sla.uptime.target |
  4. Generate Interface Specifications (Part 3 - Section 6):
    From ADR Integration decisions:
    • External APIs (CTR-ready)
    • Internal interfaces
    • Data exchange protocols
    • Message formats
  5. Real-Time Quality Feedback (via
    quality-advisor
    skill):
    • Monitor section completion as content is generated
    • Detect anti-patterns (AP-001 to AP-017) during creation
    • Validate element ID format compliance (SYS.NN.TT.SS)
    • Check for placeholder text ([TBD], TODO, XXX)
    • Verify Mermaid diagram presence (recommended for SYS)
    • Validate @threshold tag usage for quantitative values
    • Flag issues early to reduce post-generation rework
  6. Generate Remaining Sections:
    • Section 7: Data Management Requirements
    • Section 8: Testing and Validation Requirements
    • Section 9: Deployment and Operations Requirements
    • Section 10: Compliance and Regulatory Requirements
    • Section 11: Acceptance Criteria
    • Section 12: Risk Assessment
    • Section 13: Traceability
    • Section 14: Implementation Notes
  7. Add Cumulative Tags (Section 13):
    Layer 6 Required Tags (5 tags):
    markdown
    ## Traceability
    
    **Required Tags** (Cumulative Tagging Hierarchy - Layer 6):
    
    @brd: BRD.01.01.03
    @prd: PRD.01.07.02, PRD.01.07.15
    @ears: EARS.01.25.01, EARS.01.25.02
    @bdd: BDD.01.14.01
    @adr: ADR-01, ADR-04
  8. File Output (ALWAYS use nested folder):
    • Monolithic (<20k tokens):
      docs/06_SYS/SYS-NN_{slug}/SYS-NN_{slug}.md
    • Sectioned (≥20k tokens):
      docs/06_SYS/SYS-NN_{slug}/SYS-NN.0_index.md
      ,
      SYS-NN.1_core.md
      , etc.
    • Modular (v2.0):
      docs/06_SYS/SYS-NN_{slug}/SYS-NN.MM_{capability}.md
    • Master Index (always):
      docs/06_SYS/SYS-00_index.md
      (create or update)
    Nested Folder Rule: ALL SYS use nested folders (
    SYS-NN_{slug}/
    ) regardless of size. This keeps companion files (review reports, fix reports, drift cache) organized with their parent document.

生成包含功能需求和质量属性的 SYS 文档。
Skill 委派:此阶段遵循
doc-sys
skill 中定义的规则。 参见:
.claude/skills/doc-sys/SKILL.md
,了解完整的 SYS 创建指导。
质量指导:生成期间使用
quality-advisor
skill 提供实时反馈。 参见:
.claude/skills/quality-advisor/SKILL.md
,了解质量监控机制。
生成过程:
  1. 预留 SYS ID:
    bash
    # Check for next available ID
    ls docs/06_SYS/SYS-*.md 2>/dev/null | \
      grep -oP 'SYS-\K\d+' | sort -n | tail -1
    # Increment for new SYS
  2. 加载 SYS 模板:
  • 主要模板:
    ai_dev_ssd_flow/06_SYS/SYS-MVP-TEMPLATE.md
  • 规则:
    ai_dev_ssd_flow/06_SYS/SYS_MVP_CREATION_RULES.md
  1. 生成文档控制部分:
    字段值
    项目名称来自 BRD
    文档版本0.1.0
    创建日期当前日期(YYYY-MM-DD)
    最后更新当前日期(YYYY-MM-DD)
    文档负责人来自 ADR 利益相关者分析
    编制人AI Assistant
    状态草稿(如果 ADR 已接受,则为审查中)
    EARS-Ready 分数来自上游 EARS
    REQ-Ready 分数生成后计算
  2. 生成功能需求(第 2 部分 - 第 4 节):
    根据 ADR 的 Decision 和 Implementation 部分生成:
    元素 ID需求优先级来源验证方式
    SYS.01.01.01系统应...必须具备ADR-01.Decision集成测试
    SYS.01.01.02系统应...应当具备ADR-01.Impl单元测试
    元素类型代码(依据
    doc-naming
    skill):
    元素类型代码示例
    功能需求01SYS.02.01.01
    质量属性02SYS.02.02.01
    用例11SYS.02.11.01
    系统需求26SYS.02.26.01
  3. 生成质量属性(第 2 部分 - 第 5 节):
    根据 ADR 的 Consequences 和 Implementation 部分生成:
    必需类别:
    类别来源指标
    性能ADR 延迟/吞吐量目标p50/p95/p99、TPS
    可靠性ADR 可用性/恢复正常运行时间百分比、MTBF、MTTR
    可扩展性ADR 扩缩容决策并发用户数、数据量
    安全ADR-04 安全 ADR身份认证延迟、加密
    可观测性ADR-05 可观测性 ADR日志保留期、告警阈值
    可维护性ADR 部署决策部署频率、覆盖率
    质量属性格式:
    markdown
    | ID | Category | Attribute | Target | Measurement | Source |
    |----|----------|-----------|--------|-------------|--------|
    | SYS.01.02.01 | Performance | API Response Time | p95 < 100ms | APM Monitoring | @threshold: PRD.01.perf.api.p95_latency |
    | SYS.01.02.02 | Reliability | Availability | 99.9% | Uptime Monitoring | @threshold: PRD.01.sla.uptime.target |
  4. 生成接口规范(第 3 部分 - 第 6 节):
    根据 ADR 集成决策生成:
    • 外部 API(CTR-ready)
    • 内部接口
    • 数据交换协议
    • 消息格式
  5. 实时质量反馈(通过
    quality-advisor
    skill):
    • 在生成内容时监控各章节的完成情况
    • 在创建过程中检测反模式(AP-001 至 AP-017)
    • 验证元素 ID 格式是否符合规范(SYS.NN.TT.SS)
    • 检查占位文本([TBD]、TODO、XXX)
    • 验证是否存在 Mermaid 图(建议 SYS 包含)
    • 验证量化值的 @threshold 标签使用情况
    • 尽早标记问题,减少生成后的返工
  6. 生成其余章节:
    • 第 7 节:数据管理需求
    • 第 8 节:测试与验证需求
    • 第 9 节:部署与运维需求
    • 第 10 节:合规与监管需求
    • 第 11 节:验收标准
    • 第 12 节:风险评估
    • 第 13 节:可追踪性
    • 第 14 节:实施说明
  7. 添加累计标签(第 13 节):
    第 6 层必需标签(累计标签层级 - 第 6 层):
    markdown
    ## Traceability
    
    **Required Tags** (Cumulative Tagging Hierarchy - Layer 6):
    
    @brd: BRD.01.01.03
    @prd: PRD.01.07.02, PRD.01.07.15
    @ears: EARS.01.25.01, EARS.01.25.02
    @bdd: BDD.01.14.01
    @adr: ADR-01, ADR-04
  8. 文件输出(始终使用嵌套文件夹):
    • 单体式(<20k tokens):
      docs/06_SYS/SYS-NN_{slug}/SYS-NN_{slug}.md
    • 分节式(≥20k tokens):
      docs/06_SYS/SYS-NN_{slug}/SYS-NN.0_index.md
      、
      SYS-NN.1_core.md
      等
    • 模块化(v2.0):
      docs/06_SYS/SYS-NN_{slug}/SYS-NN.MM_{capability}.md
    • 主索引(始终生成):
      docs/06_SYS/SYS-00_index.md
      (创建或更新)
    嵌套文件夹规则:无论大小,所有 SYS 都使用嵌套文件夹(
    SYS-NN_{slug}/
    )。这样可以将配套文件(审查报告、修复报告、漂移缓存)与其父文档集中组织在一起。

Modular Splitting Pattern (v2.0)

模块化拆分模式(v2.0)

Per-Capability Decomposition

按能力分解

For complex SYS documents, split into atomic files per functional capability:
docs/06_SYS/SYS-01_f1_iam/
├── SYS-01.00_index.md                    # Index with REQ-Ready score
├── SYS-01.01_authentication.md           # Auth capabilities
├── SYS-01.02_authorization.md            # Authz capabilities
├── SYS-01.03_session_management.md       # Session handling
├── SYS-01.04_audit_logging.md            # Audit requirements
└── SYS-01.05_mfa_integration.md          # MFA requirements
对于复杂的 SYS 文档,按功能能力拆分为原子文件:
docs/06_SYS/SYS-01_f1_iam/
├── SYS-01.00_index.md                    # Index with REQ-Ready score
├── SYS-01.01_authentication.md           # Auth capabilities
├── SYS-01.02_authorization.md            # Authz capabilities
├── SYS-01.03_session_management.md       # Session handling
├── SYS-01.04_audit_logging.md            # Audit requirements
└── SYS-01.05_mfa_integration.md          # MFA requirements

Modular File Structure

模块化文件结构

Each modular SYS file contains:
SectionContent
HeaderYAML frontmatter with parent reference
Functional RequirementsCapability-specific FRs (SYS.NN.01.SS)
Quality AttributesCapability-specific QAs (SYS.NN.02.SS)
Interface SpecificationsAPIs for this capability
External DependenciesCapability-specific dependencies
TraceabilityCapability-level tags
每个模块化 SYS 文件包含:
章节内容
头部带父级引用的 YAML frontmatter
功能需求特定能力的 FR(SYS.NN.01.SS)
质量属性特定能力的 QA(SYS.NN.02.SS)
接口规范此能力的 API
外部依赖特定能力的依赖项
可追踪性能力级标签

Modular SYS Template

模块化 SYS 模板

markdown
---
parent_doc: SYS-01
capability_id: SYS-01.01
capability_name: Authentication
version: 1.0.0
status: Draft
---
markdown
---
parent_doc: SYS-01
capability_id: SYS-01.01
capability_name: Authentication
version: 1.0.0
status: Draft
---

SYS-01.01: Authentication

SYS-01.01: Authentication

Functional Requirements

Functional Requirements

IDRequirementPrioritySourceVerification
SYS.01.01.01The system SHALL authenticate users via JWTMust HaveADR-01Integration Test
SYS.01.01.02The system SHALL validate tokens within @threshold:PRD.01.perf.auth.p95_latencyMust HaveADR-01Performance Test
IDRequirementPrioritySourceVerification
SYS.01.01.01The system SHALL authenticate users via JWTMust HaveADR-01Integration Test
SYS.01.01.02The system SHALL validate tokens within @threshold:PRD.01.perf.auth.p95_latencyMust HaveADR-01Performance Test

Quality Attributes

Quality Attributes

IDCategoryAttributeTargetMeasurement
SYS.01.02.01PerformanceAuth latencyp95 < @threshold:PRD.01.perf.auth.p95_latencyAPM
SYS.01.02.02ReliabilityAuth availability@threshold:PRD.01.sla.auth.uptimeUptime Monitor
IDCategoryAttributeTargetMeasurement
SYS.01.02.01PerformanceAuth latencyp95 < @threshold:PRD.01.perf.auth.p95_latencyAPM
SYS.01.02.02ReliabilityAuth availability@threshold:PRD.01.sla.auth.uptimeUptime Monitor

External Dependencies

External Dependencies

DependencyTypeFallback StrategyTimeout
GCP Identity PlatformInfrastructureLocal JWT validation cache@threshold:PRD.01.timeout.idp.max
Redis Session StoreDataIn-memory session cache@threshold:PRD.01.timeout.redis.max
DependencyTypeFallback StrategyTimeout
GCP Identity PlatformInfrastructureLocal JWT validation cache@threshold:PRD.01.timeout.idp.max
Redis Session StoreDataIn-memory session cache@threshold:PRD.01.timeout.redis.max

Traceability

Traceability

@brd: BRD.01.02.01 @prd: PRD.01.07.01 @ears: EARS.01.25.01 @bdd: BDD.01.14.01 @adr: ADR-01

---
@brd: BRD.01.02.01 @prd: PRD.01.07.01 @ears: EARS.01.25.01 @bdd: BDD.01.14.01 @adr: ADR-01

---

External Dependencies Table (v2.0)

外部依赖表(v2.0)

Required Format

必需格式

All SYS documents MUST include an External Dependencies table with fallback strategy:
ColumnRequiredDescription
DependencyYesService/system name
TypeYesinfrastructure/data/integration/security/observability
Fallback StrategyYesWhat happens when dependency fails
TimeoutYes@threshold reference for timeout value
Health CheckNoHealth check endpoint/method
Circuit BreakerNoCircuit breaker configuration
所有 SYS 文档都必须包含带有回退策略的外部依赖表:
列是否必需说明
Dependency是服务/系统名称
Type是infrastructure/data/integration/security/observability
Fallback Strategy是依赖项发生故障时的处理方式
Timeout是超时值的 @threshold 引用
Health Check否健康检查端点/方法
Circuit Breaker否熔断器配置

Example External Dependencies Table

外部依赖表示例

markdown
undefined
markdown
undefined

External Dependencies

External Dependencies

DependencyTypeFallback StrategyTimeoutHealth Check
GCP Identity PlatforminfrastructureJWT validation cache; fallback to local auth@threshold:PRD.01.timeout.idp.max/health/ready
Cloud SQL (PostgreSQL)dataRead replica; local cache@threshold:PRD.01.timeout.db.maxTCP check
Redis CachedataIn-memory cache; proceed without@threshold:PRD.01.timeout.cache.maxPING
Cloud Pub/SubintegrationRetry with backoff; local queue@threshold:PRD.01.timeout.pubsub.maxList topics
Cloud Secret ManagersecurityCached secrets; fail-safe defaults@threshold:PRD.01.timeout.secrets.maxAccess check
Cloud MonitoringobservabilityLocal metrics buffer; log to stdout@threshold:PRD.01.timeout.monitoring.maxWrite test
undefined
DependencyTypeFallback StrategyTimeoutHealth Check
GCP Identity PlatforminfrastructureJWT validation cache; fallback to local auth@threshold:PRD.01.timeout.idp.max/health/ready
Cloud SQL (PostgreSQL)dataRead replica; local cache@threshold:PRD.01.timeout.db.maxTCP check
Redis CachedataIn-memory cache; proceed without@threshold:PRD.01.timeout.cache.maxPING
Cloud Pub/SubintegrationRetry with backoff; local queue@threshold:PRD.01.timeout.pubsub.maxList topics
Cloud Secret ManagersecurityCached secrets; fail-safe defaults@threshold:PRD.01.timeout.secrets.maxAccess check
Cloud MonitoringobservabilityLocal metrics buffer; log to stdout@threshold:PRD.01.timeout.monitoring.maxWrite test
undefined

Fallback Strategy Guidelines

回退策略指导原则

Dependency TypeRecommended Fallback Patterns
Authentication ProviderJWT cache, local validation, graceful degradation
DatabaseRead replica, cache, retry with backoff
CacheIn-memory cache, proceed without cache
Message QueueLocal queue, retry with backoff, dead letter
Secrets ManagerCached secrets, environment variables
MonitoringLocal buffer, stdout logging, fire-and-forget

依赖类型推荐回退模式
身份认证提供商JWT 缓存、本地验证、优雅降级
数据库只读副本、缓存、带退避的重试
缓存内存缓存、无缓存时继续运行
消息队列本地队列、带退避的重试、死信队列
Secrets Manager缓存的密钥、环境变量
监控本地缓冲区、stdout 日志、fire-and-forget

6-Category REQ-Ready Scoring (v2.0)

6 类 REQ-Ready 评分(v2.0)

Scoring Breakdown

评分明细

CategoryWeightCriteria
Functional Decomposition25%System boundaries, FR categories, dependencies
Quality Attributes20%All 6 QA categories with @threshold references
Interface Specifications20%External APIs, internal interfaces, protocols
Data Management15%Data schemas, storage requirements, migrations
Testing Requirements10%Test categories, coverage targets, test data
Traceability10%All 5 cumulative tags, ADR alignment
类别权重标准
功能分解25%系统边界、FR 类别、依赖项
质量属性20%全部 6 类 QA 及 @threshold 引用
接口规范20%外部 API、内部接口、协议
数据管理15%数据 Schema、存储需求、迁移
测试需求10%测试类别、覆盖率目标、测试数据
可追踪性10%全部 5 个累计标签、ADR 对齐情况

Score Display Format

分数显示格式

REQ-Ready Score: ✅ 94% (Target: ≥90%)

Category Breakdown:
├── Functional Decomposition:  24/25 ✅
├── Quality Attributes:        20/20 ✅
├── Interface Specifications:  18/20 🟡
├── Data Management:           14/15 ✅
├── Testing Requirements:       9/10 ✅
└── Traceability:              10/10 ✅

External Dependencies:
├── Dependencies Documented:   ✅ 6/6
├── Fallback Strategies:       ✅ 6/6
└── Threshold References:      ✅ 12/12
REQ-Ready Score: ✅ 94% (Target: ≥90%)

Category Breakdown:
├── Functional Decomposition:  24/25 ✅
├── Quality Attributes:        20/20 ✅
├── Interface Specifications:  18/20 🟡
├── Data Management:           14/15 ✅
├── Testing Requirements:       9/10 ✅
└── Traceability:              10/10 ✅

External Dependencies:
├── Dependencies Documented:   ✅ 6/6
├── Fallback Strategies:       ✅ 6/6
└── Threshold References:      ✅ 12/12

Visual Indicators

可视化指示符

IconScore RangeMeaning
✅>= 90%Target met
🟡85-89%Near threshold, review recommended
❌< 85%Below threshold, must improve
图标分数范围含义
✅>= 90%已达到目标
🟡85-89%接近阈值,建议审查
❌< 85%低于阈值,必须改进

Phase 4: SYS Validation

阶段 4:SYS 验证

After SYS generation, validate structure and REQ-Ready score.
Skill Delegation: This phase uses validation rules from
doc-sys-validator
skill. See:
.claude/skills/doc-sys-validator/SKILL.md
for complete validation rules.
Validation Command:
bash
python ai_dev_ssd_flow/06_SYS/scripts/validate_sys.py docs/06_SYS/SYS-NN_{slug}/SYS-NN_{slug}.md --verbose
Validation Checks (14 Total for v2.0):
CheckTypeDescription
CHECK 1ErrorRequired Document Control Fields (9 fields)
CHECK 2ErrorADR Compliance Validation
CHECK 3ErrorREQ-Ready Score Validation (format, threshold)
CHECK 4ErrorQuality Attribute Quantification
CHECK 5WarningSystem Boundaries
CHECK 6WarningInterface Specifications (CTR-ready)
CHECK 7WarningUpstream Traceability
CHECK 8ErrorElement ID Format Compliance (unified 4-segment)
SYS-E040ErrorExternal Dependencies table present
SYS-E041ErrorFallback Strategy column in dependencies
SYS-E042Error6-Category REQ-Ready scoring breakdown
SYS-E043WarningModular file structure (if >25KB)
SYS-E044Error@threshold references for all numeric values
SYS-E045WarningHealth Check endpoints documented
REQ-Ready Scoring Criteria (100%):
CategoryWeightCriteria
Requirements Decomposition Clarity35%System boundaries, functional decomposition, dependencies, ADR alignment
Quality Attributes Quantification30%Performance percentiles, reliability SLAs, security compliance, scalability metrics
Interface Specifications20%External APIs (CTR-ready), internal interfaces, data exchange protocols
Implementation Readiness15%Testing requirements, deployment/ops, monitoring/observability
Minimum Score: 90%
Auto-Fix Actions:
IssueAuto-Fix Action
Invalid element ID formatConvert to SYS.NN.TT.SS format
Missing traceability sectionInsert from template
Missing Document Control fieldsAdd placeholder fields
Legacy patterns (FR-XXX, QA-XXX, SR-XXX)Convert to unified format
Missing REQ-Ready ScoreCalculate and insert
Missing @threshold tagsAdd template references
Hardcoded numeric valuesReplace with @threshold references
Validation Loop:
LOOP (max 3 iterations):
  1. Run doc-sys-validator
  2. IF errors found: Apply auto-fixes
  3. IF warnings found: Review and address if critical
  4. IF REQ-Ready Score < 90%: Enhance sections
  5. IF clean: Mark VALIDATED, proceed
  6. IF max iterations: Log issues, flag for manual review
SYS 生成后,验证其结构和 REQ-Ready 分数。
Skill 委派:此阶段使用
doc-sys-validator
skill 中的验证规则。 参见:
.claude/skills/doc-sys-validator/SKILL.md
,了解完整的验证规则。
验证命令:
bash
python ai_dev_ssd_flow/06_SYS/scripts/validate_sys.py docs/06_SYS/SYS-NN_{slug}/SYS-NN_{slug}.md --verbose
验证检查(v2.0 共 14 项):
检查类型说明
CHECK 1错误必需文档控制字段(9 个字段)
CHECK 2错误ADR 符合性验证
CHECK 3错误REQ-Ready 分数验证(格式、阈值)
CHECK 4错误质量属性量化
CHECK 5警告系统边界
CHECK 6警告接口规范(CTR-ready)
CHECK 7警告上游可追踪性
CHECK 8错误元素 ID 格式符合性(统一的 4 段格式)
SYS-E040错误存在外部依赖表
SYS-E041错误依赖项中包含回退策略列
SYS-E042错误6 类 REQ-Ready 评分明细
SYS-E043警告模块化文件结构(如果 >25KB)
SYS-E044错误所有数值均使用 @threshold 引用
SYS-E045警告已记录健康检查端点
REQ-Ready 评分标准(100%):
类别权重标准
需求分解清晰度35%系统边界、功能分解、依赖项、ADR 对齐情况
质量属性量化30%性能百分位数、可靠性 SLA、安全合规性、可扩展性指标
接口规范20%外部 API(CTR-ready)、内部接口、数据交换协议
实现就绪度15%测试需求、部署/运维、监控/可观测性
最低分数:90%
自动修复操作:
问题自动修复操作
无效的元素 ID 格式转换为 SYS.NN.TT.SS 格式
缺少可追踪性章节从模板插入
缺少文档控制字段添加占位字段
旧版模式(FR-XXX、QA-XXX、SR-XXX)转换为统一格式
缺少 REQ-Ready 分数计算并插入
缺少 @threshold 标签添加模板引用
硬编码数值替换为 @threshold 引用
验证循环:
LOOP (max 3 iterations):
  1. Run doc-sys-validator
  2. IF errors found: Apply auto-fixes
  3. IF warnings found: Review and address if critical
  4. IF REQ-Ready Score < 90%: Enhance sections
  5. IF clean: Mark VALIDATED, proceed
  6. IF max iterations: Log issues, flag for manual review

Phase 5: Audit & Fix Cycle (v2.1)

阶段 5:审查与修复循环(v2.1)

Iterative review and fix cycle to ensure SYS quality before completion.
mermaid
flowchart TD
  A[Phase 5 Start] --> B[Run doc-sys-audit]
  B --> C[Generate Combined Audit Report]
    C --> D{Review Score >= 90?}

    D -->|Yes| E[PASS - Proceed to Final Checks]
    D -->|No| F{Iteration < Max?}

    F -->|Yes| G[Run doc-sys-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
通过迭代式审查和修复循环,确保完成前 SYS 质量达标。
mermaid
flowchart TD
  A[Phase 5 Start] --> B[Run doc-sys-audit]
  B --> C[Generate Combined Audit Report]
    C --> D{Review Score >= 90?}

    D -->|Yes| E[PASS - Proceed to Final Checks]
    D -->|No| F{Iteration < Max?}

    F -->|Yes| G[Run doc-sys-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

5.1 Initial Audit

5.1 初始审查

Run
doc-sys-audit
to identify issues.
bash
/doc-sys-audit SYS-NN
Output:
SYS-NN.A_audit_report_v001.md
(legacy-compatible reviewer report may still exist)
运行
doc-sys-audit
识别问题。
bash
/doc-sys-audit SYS-NN
输出:
SYS-NN.A_audit_report_v001.md
(仍可能存在兼容旧版的 reviewer 报告)

5.2 Fix Cycle

5.2 修复周期

If review score < 90%, invoke
doc-sys-fixer
.
bash
/doc-sys-fixer SYS-NN --revalidate
Fix Categories:
CategoryFixes Applied
Missing FilesCreate glossary, reference docs
Broken LinksUpdate paths, create targets
Element IDsConvert legacy patterns (FR-XXX, QA-XXX, SR-XXX), fix invalid type codes
ContentReplace template placeholders, update dates
ReferencesUpdate traceability tags, @threshold references
DependenciesAdd missing fallback strategies, timeout values
Output:
SYS-NN.F_fix_report_v001.md
如果审查分数 < 90%,调用
doc-sys-fixer
。
bash
/doc-sys-fixer SYS-NN --revalidate
修复类别:
类别已应用的修复
缺失文件创建术语表、参考文档
损坏链接更新路径、创建目标
元素 ID转换旧版模式(FR-XXX、QA-XXX、SR-XXX)、修复无效类型代码
内容替换模板占位符、更新日期
引用更新可追踪性标签、@threshold 引用
依赖项添加缺失的回退策略、超时值
输出:
SYS-NN.F_fix_report_v001.md

5.3 Re-Audit

5.3 重新审查

After fixes, automatically re-run audit.
bash
/doc-sys-audit SYS-NN
Output:
SYS-NN.A_audit_report_v002.md
修复后,自动重新运行审查。
bash
/doc-sys-audit SYS-NN
输出:
SYS-NN.A_audit_report_v002.md

5.4 Iteration Control

5.4 迭代控制

ParameterDefaultDescription
max_iterations
3Maximum fix-review cycles
target_score
90Minimum passing score
stop_on_manual
falseStop if only manual issues remain
Iteration Example:
Iteration 1:
  Review v001: Score 86 (3 errors, 5 warnings)
  Fix v001: Fixed 6 issues, updated 2 tables

Iteration 2:
  Review v002: Score 93 (0 errors, 3 warnings)
  Status: PASS (score >= 90)
参数默认值说明
max_iterations
3最大修复-审查循环次数
target_score
90最低通过分数
stop_on_manual
false如果仅剩手动问题则停止
迭代示例:
Iteration 1:
  Review v001: Score 86 (3 errors, 5 warnings)
  Fix v001: Fixed 6 issues, updated 2 tables

Iteration 2:
  Review v002: Score 93 (0 errors, 3 warnings)
  Status: PASS (score >= 90)

5.5 Quality Checks (Post-Fix)

5.5 质量检查(修复后)

After passing the fix cycle:
  1. All SYS Complete:
    • All ADR-derived system domains addressed
    • Each SYS has REQ-Ready score >= 90%
    • No placeholder text remaining
    • All @threshold tags reference valid registry entries
  2. Cross-SYS Consistency:
    • No conflicting requirements between SYS documents
    • Quality attribute targets align across systems
    • Interface specifications are compatible
    • Dependencies between SYS documented
  3. Traceability Matrix Update:
    bash
    # Update SYS-00_TRACEABILITY_MATRIX.md
python ai_dev_ssd_flow/scripts/update_traceability_matrix.py
--type SYS
--matrix docs/06_SYS/SYS-00_TRACEABILITY_MATRIX.md

4. **REQ-Ready Report**:

REQ-Ready Score Breakdown

Functional Decomposition: 24/25 (System boundaries clear) Quality Attributes: 20/20 (All 6 categories present) Interface Specifications: 19/20 (CTR-ready) Data Management: 14/15 (Schemas documented) Testing Requirements: 9/10 (Coverage targets) Traceability: 10/10 (All 5 tags present)

Total REQ-Ready Score: 96/100 (Target: >= 90) Status: READY FOR REQ GENERATION

5. **Summary Report Generation**:

SYS Generation Summary

Total SYS Generated: 7
Status Distribution: Approved: 5 In Review: 2 Draft: 0
REQ-Ready Scores: SYS-01 (Infrastructure): 95% SYS-02 (Data Architecture): 92% SYS-03 (Integration): 94% SYS-04 (Security): 96% SYS-05 (Observability): 91% SYS-06 (AI/ML): 90% SYS-07 (Technology): 93%
Average REQ-Ready Score: 93%
Next Steps: 1. Review In Review SYS documents for stakeholder approval 2. Run doc-req-autopilot to decompose SYS into atomic REQ

---
通过修复循环后:
  1. 所有 SYS 均已完成:
    • 已涵盖所有 ADR 衍生的系统领域
    • 每个 SYS 的 REQ-Ready 分数均 >= 90%
    • 不存在占位文本
    • 所有 @threshold 标签均引用有效的注册表条目
  2. 跨 SYS 一致性:
    • SYS 文档之间不存在冲突需求
    • 质量属性目标在各系统间保持一致
    • 接口规范彼此兼容
    • 已记录 SYS 之间的依赖关系
  3. 更新可追踪性矩阵:
    bash
    # Update SYS-00_TRACEABILITY_MATRIX.md
python ai_dev_ssd_flow/scripts/update_traceability_matrix.py
--type SYS
--matrix docs/06_SYS/SYS-00_TRACEABILITY_MATRIX.md

4. **REQ-Ready 报告**:

REQ-Ready Score Breakdown

Functional Decomposition: 24/25 (System boundaries clear) Quality Attributes: 20/20 (All 6 categories present) Interface Specifications: 19/20 (CTR-ready) Data Management: 14/15 (Schemas documented) Testing Requirements: 9/10 (Coverage targets) Traceability: 10/10 (All 5 tags present)

Total REQ-Ready Score: 96/100 (Target: >= 90) Status: READY FOR REQ GENERATION

5. **生成汇总报告**:

SYS Generation Summary

Total SYS Generated: 7
Status Distribution: Approved: 5 In Review: 2 Draft: 0
REQ-Ready Scores: SYS-01 (Infrastructure): 95% SYS-02 (Data Architecture): 92% SYS-03 (Integration): 94% SYS-04 (Security): 96% SYS-05 (Observability): 91% SYS-06 (AI/ML): 90% SYS-07 (Technology): 93%
Average REQ-Ready Score: 93%
Next Steps: 1. Review In Review SYS documents for stakeholder approval 2. Run doc-req-autopilot to decompose SYS into atomic REQ

---

Execution Modes

执行模式

Single SYS Mode

单个 SYS 模式

Generate one SYS from a specific ADR.
bash
undefined
根据特定 ADR 生成一个 SYS。
bash
undefined

Example: Generate SYS-01 from ADR-01

Example: Generate SYS-01 from ADR-01

/doc-sys-autopilot ADR-01
/doc-sys-autopilot ADR-01

Output:

Output:

Analyzing ADR-01 (Infrastructure)...

Analyzing ADR-01 (Infrastructure)...

SYS-Ready Score: 94% (PASS)

SYS-Ready Score: 94% (PASS)

Generating SYS-01_infrastructure.md...

Generating SYS-01_infrastructure.md...

REQ-Ready Score: 92%

REQ-Ready Score: 92%

Complete.

Complete.

undefined
undefined

Batch Mode (All ADRs)

批处理模式(全部 ADR)

Generate all SYS from ADR documents.
bash
undefined
根据 ADR 文档生成所有 SYS。
bash
undefined

Example: Generate all SYS from ADR directory

Example: Generate all SYS from ADR directory

/doc-sys-autopilot all
/doc-sys-autopilot all

Output:

Output:

Scanning ADR directory...

Scanning ADR directory...

Found 7 ADR documents:

Found 7 ADR documents:

ADR-01 (Infrastructure) - SYS-Ready: 94%

ADR-01 (Infrastructure) - SYS-Ready: 94%

ADR-02 (Data Architecture) - SYS-Ready: 92%

ADR-02 (Data Architecture) - SYS-Ready: 92%

ADR-03 (Integration) - SYS-Ready: 91%

ADR-03 (Integration) - SYS-Ready: 91%

ADR-04 (Security) - SYS-Ready: 95%

ADR-04 (Security) - SYS-Ready: 95%

ADR-05 (Observability) - SYS-Ready: 90%

ADR-05 (Observability) - SYS-Ready: 90%

ADR-06 (AI/ML) - SYS-Ready: 91%

ADR-06 (AI/ML) - SYS-Ready: 91%

ADR-07 (Technology) - SYS-Ready: 93%

ADR-07 (Technology) - SYS-Ready: 93%

Generating SYS documents...

Generating SYS documents...

[================> ] 5/7 Complete

[================> ] 5/7 Complete

undefined
undefined

Dry Run Mode

试运行模式

Preview SYS generation plan without creating files.
bash
/doc-sys-autopilot all --dry-run
在不创建文件的情况下预览 SYS 生成计划。
bash
/doc-sys-autopilot all --dry-run

Output:

Output:

SYS Generation Plan (Dry Run)

SYS Generation Plan (Dry Run)

============================

============================

Source: ADR documents

Source: ADR documents

Planned SYS:

Planned SYS:

1. SYS-01 (Infrastructure) - Full generation

1. SYS-01 (Infrastructure) - Full generation

2. SYS-02 (Data Architecture) - Full generation

2. SYS-02 (Data Architecture) - Full generation

3. SYS-03 (Integration) - Full generation

3. SYS-03 (Integration) - Full generation

4. SYS-04 (Security) - Full generation

4. SYS-04 (Security) - Full generation

5. SYS-05 (Observability) - Full generation

5. SYS-05 (Observability) - Full generation

6. SYS-06 (AI/ML) - Full generation

6. SYS-06 (AI/ML) - Full generation

7. SYS-07 (Technology) - Full generation

7. SYS-07 (Technology) - Full generation

No files will be created in dry-run mode.

No files will be created in dry-run mode.

undefined
undefined

Review Mode (v2.1)

审查模式(v2.1)

Validate existing SYS documents and generate a quality report without modification.
Purpose: Audit existing SYS documents for compliance, quality scores, and identify issues.
Command:
bash
undefined
验证现有 SYS 文档并生成质量报告,不修改文档。
目的:审查现有 SYS 文档的合规性、质量分数并识别问题。
命令:
bash
undefined

Review single SYS document

Review single SYS document

/doc-sys-audit SYS-01
/doc-sys-audit SYS-01

Review all SYS documents (run per document in docs/06_SYS/)

Review all SYS documents (run per document in docs/06_SYS/)

/doc-sys-audit SYS-NN

**Review Process**:

```mermaid
flowchart TD
    A[Input: Existing SYS] --> B[Load SYS Documents]
    B --> C[Run Validation Checks]
    C --> D[Calculate REQ-Ready Score]
    D --> E[Check 6-Category Breakdown]
    E --> F[Validate External Dependencies]
    F --> G[Identify Issues]
    G --> H{Generate Report}
    H --> I[Fixable Issues List]
    H --> J[Manual Review Items]
    H --> K[Score Breakdown]
    I --> L[Output: Review Report]
    J --> L
    K --> L
Review Report Structure:
markdown
undefined
/doc-sys-audit SYS-NN

**审查过程**:

```mermaid
flowchart TD
    A[Input: Existing SYS] --> B[Load SYS Documents]
    B --> C[Run Validation Checks]
    C --> D[Calculate REQ-Ready Score]
    D --> E[Check 6-Category Breakdown]
    E --> F[Validate External Dependencies]
    F --> G[Identify Issues]
    G --> H{Generate Report}
    H --> I[Fixable Issues List]
    H --> J[Manual Review Items]
    H --> K[Score Breakdown]
    I --> L[Output: Review Report]
    J --> L
    K --> L
审查报告结构:
markdown
undefined

SYS Review Report: SYS-01_f1_iam

SYS Review Report: SYS-01_f1_iam

Summary

Summary

  • REQ-Ready Score: 87% 🟡
  • Total Issues: 14
  • Auto-Fixable: 10
  • Manual Review: 4
  • REQ-Ready Score: 87% 🟡
  • Total Issues: 14
  • Auto-Fixable: 10
  • Manual Review: 4

6-Category Score Breakdown

6-Category Score Breakdown

CategoryScoreStatus
Functional Decomposition23/25🟡
Quality Attributes18/20🟡
Interface Specifications18/20🟡
Data Management14/15✅
Testing Requirements8/10🟡
Traceability10/10✅
CategoryScoreStatus
Functional Decomposition23/25🟡
Quality Attributes18/20🟡
Interface Specifications18/20🟡
Data Management14/15✅
Testing Requirements8/10🟡
Traceability10/10✅

External Dependencies Check

External Dependencies Check

CheckStatusDetails
Dependencies Table Present✅6 dependencies documented
Fallback Strategies❌2 dependencies missing fallback
Timeout Thresholds🟡4 hardcoded values found
Health Check Endpoints❌3 dependencies missing health check
CheckStatusDetails
Dependencies Table Present✅6 dependencies documented
Fallback Strategies❌2 dependencies missing fallback
Timeout Thresholds🟡4 hardcoded values found
Health Check Endpoints❌3 dependencies missing health check

v2.0 Compliance

v2.0 Compliance

CheckStatusDetails
Modular Structure✅Per-capability split (5 files)
6-Category Scoring🟡Missing testing requirements detail
@threshold References❌8 hardcoded numeric values
Fallback Strategy Column❌Missing in 2 dependencies
Visual Score Indicators✅Present in index
CheckStatusDetails
Modular Structure✅Per-capability split (5 files)
6-Category Scoring🟡Missing testing requirements detail
@threshold References❌8 hardcoded numeric values
Fallback Strategy Column❌Missing in 2 dependencies
Visual Score Indicators✅Present in index

Auto-Fixable Issues

Auto-Fixable Issues

#IssueLocationFix Action
1Hardcoded timeout valueSYS-01.01:L45Replace with @threshold:PRD.01.timeout.auth
2Missing fallback strategySYS-01.03:L78Add fallback column
3Legacy element IDSYS-01.02:L23Convert FR-001 to SYS.01.01.01
............
#IssueLocationFix Action
1Hardcoded timeout valueSYS-01.01:L45Replace with @threshold:PRD.01.timeout.auth
2Missing fallback strategySYS-01.03:L78Add fallback column
3Legacy element IDSYS-01.02:L23Convert FR-001 to SYS.01.01.01
............

Manual Review Required

Manual Review Required

#IssueLocationReason
1Incomplete quality attributeSYS-01.02:L102Domain knowledge needed
2Missing interface specificationSYS-01.03API design decision required
............
#IssueLocationReason
1Incomplete quality attributeSYS-01.02:L102Domain knowledge needed
2Missing interface specificationSYS-01.03API design decision required
............

Recommendations

Recommendations

  1. Run fix mode to address 10 auto-fixable issues
  2. Review 4 items requiring manual attention
  3. Add missing external dependency fallback strategies

**Review Configuration**:

```yaml
review_mode:
  enabled: true
  checks:
    - structure_validation      # Document control, sections
    - element_id_compliance     # SYS.NN.TT.SS format
    - threshold_references      # @threshold format and validity
    - external_dependencies     # Table, fallback, timeouts
    - quality_attributes        # 6 categories present
    - cumulative_tags           # 5 upstream tags
    - score_calculation         # REQ-Ready score
    - modular_structure         # If >25KB
  output:
    format: markdown           # markdown, json, html
    include_line_numbers: true
    include_fix_suggestions: true
  thresholds:
    pass: 90
    warning: 85
    fail: 0
  1. Run fix mode to address 10 auto-fixable issues
  2. Review 4 items requiring manual attention
  3. Add missing external dependency fallback strategies

**审查配置**:

```yaml
review_mode:
  enabled: true
  checks:
    - structure_validation      # Document control, sections
    - element_id_compliance     # SYS.NN.TT.SS format
    - threshold_references      # @threshold format and validity
    - external_dependencies     # Table, fallback, timeouts
    - quality_attributes        # 6 categories present
    - cumulative_tags           # 5 upstream tags
    - score_calculation         # REQ-Ready score
    - modular_structure         # If >25KB
  output:
    format: markdown           # markdown, json, html
    include_line_numbers: true
    include_fix_suggestions: true
  thresholds:
    pass: 90
    warning: 85
    fail: 0

Fix Mode (v2.1)

修复模式(v2.1)

Auto-repair existing SYS documents while preserving manual content.
Purpose: Apply automated fixes to SYS documents to improve quality scores and compliance.
Command:
bash
undefined
在保留手动内容的同时自动修复现有 SYS 文档。
目的:应用自动化修复,提高 SYS 文档的质量分数和合规性。
命令:
bash
undefined

Fix single SYS document

Fix single SYS document

/doc-sys-fixer SYS-01
/doc-sys-fixer SYS-01

Fix with revalidation

Fix with revalidation

/doc-sys-fixer SYS-01 --revalidate
/doc-sys-fixer SYS-01 --revalidate

Fix specific issue types only

Fix specific issue types only

/doc-sys-fixer SYS-01 --fix-types "element_ids,references,content"
/doc-sys-fixer SYS-01 --fix-types "element_ids,references,content"

Dry-run fix (preview changes)

Dry-run fix (preview changes)

/doc-sys-fixer SYS-01 --dry-run

**Fix Process**:

```mermaid
flowchart TD
    A[Input: Existing SYS] --> B[Run Review Mode]
    B --> C[Identify Fixable Issues]
    C --> D{Backup Enabled?}
    D -->|Yes| E[Create Backup]
    D -->|No| F[Skip Backup]
    E --> G[Apply Fixes by Category]
    F --> G

    subgraph FixCategories["Fix Categories"]
        G --> H[Element ID Fixes]
        G --> I[Threshold Fixes]
        G --> J[Dependencies Fixes]
        G --> K[Structure Fixes]
        G --> L[Traceability Fixes]
    end

    H --> M[Preserve Manual Content]
    I --> M
    J --> M
    K --> M
    L --> M

    M --> N[Re-validate]
    N --> O{Score Improved?}
    O -->|Yes| P[Generate Fix Report]
    O -->|No| Q[Log Warnings]
    Q --> P
    P --> R[Output: Fixed SYS + Report]
Fix Categories and Actions:
CategoryIssueAuto-Fix ActionPreserves Content
Element IDsLegacy FR-XXX formatConvert to SYS.NN.01.SS✅
Element IDsLegacy QA-XXX formatConvert to SYS.NN.02.SS✅
Element IDsInvalid segment countRestructure to 4-segment✅
ThresholdsHardcoded numeric valuesReplace with @threshold:PRD.NN.xxx✅
ThresholdsInvalid threshold formatConvert to @threshold:PRD.NN.category.field✅
DependenciesMissing fallback columnAdd Fallback Strategy column✅
DependenciesMissing timeout @thresholdAdd @threshold reference✅
DependenciesMissing health checkAdd placeholder health check✅
StructureMissing REQ-Ready scoreCalculate and insert✅
StructureMissing 6-category breakdownAdd breakdown table✅
StructureMissing traceability sectionInsert from template✅
TraceabilityMissing cumulative tagsAdd with placeholder references✅
TraceabilityIncomplete @adr referenceLink to source ADR✅
Content Preservation Rules:
  1. Never delete existing functional requirements
  2. Never modify quality attribute targets
  3. Never change interface specification content
  4. Only add missing columns and metadata
  5. Only replace hardcoded values with threshold references
  6. Backup first if
    --backup
    flag is set
Fix Report Structure:
markdown
undefined
/doc-sys-fixer SYS-01 --dry-run

**修复过程**:

```mermaid
flowchart TD
    A[Input: Existing SYS] --> B[Run Review Mode]
    B --> C[Identify Fixable Issues]
    C --> D{Backup Enabled?}
    D -->|Yes| E[Create Backup]
    D -->|No| F[Skip Backup]
    E --> G[Apply Fixes by Category]
    F --> G

    subgraph FixCategories["Fix Categories"]
        G --> H[Element ID Fixes]
        G --> I[Threshold Fixes]
        G --> J[Dependencies Fixes]
        G --> K[Structure Fixes]
        G --> L[Traceability Fixes]
    end

    H --> M[Preserve Manual Content]
    I --> M
    J --> M
    K --> M
    L --> M

    M --> N[Re-validate]
    N --> O{Score Improved?}
    O -->|Yes| P[Generate Fix Report]
    O -->|No| Q[Log Warnings]
    Q --> P
    P --> R[Output: Fixed SYS + Report]
修复类别和操作:
类别问题自动修复操作保留内容
元素 ID旧版 FR-XXX 格式转换为 SYS.NN.01.SS✅
元素 ID旧版 QA-XXX 格式转换为 SYS.NN.02.SS✅
元素 ID段数无效重构为 4 段格式✅
阈值硬编码数值替换为 @threshold:PRD.NN.xxx✅
阈值阈值格式无效转换为 @threshold:PRD.NN.category.field✅
依赖项缺少回退策略列添加 Fallback Strategy 列✅
依赖项缺少超时 @threshold添加 @threshold 引用✅
依赖项缺少健康检查添加健康检查占位符✅
结构缺少 REQ-Ready 分数计算并插入✅
结构缺少 6 类评分明细添加明细表✅
结构缺少可追踪性章节从模板插入✅
可追踪性缺少累计标签使用占位引用添加✅
可追踪性@adr 引用不完整链接到源 ADR✅
内容保留规则:
  1. 绝不删除现有功能需求
  2. 绝不修改质量属性目标
  3. 绝不更改接口规范内容
  4. 仅添加缺失的列和元数据
  5. 仅将硬编码值替换为阈值引用
  6. 如果设置了
    --backup
    标志,则先执行备份
修复报告结构:
markdown
undefined

SYS Fix Report: SYS-01_f1_iam

SYS Fix Report: SYS-01_f1_iam

Summary

Summary

  • Before REQ-Ready Score: 87% 🟡
  • After REQ-Ready Score: 94% ✅
  • Issues Fixed: 10
  • Issues Remaining: 4 (manual review required)
  • Before REQ-Ready Score: 87% 🟡
  • After REQ-Ready Score: 94% ✅
  • Issues Fixed: 10
  • Issues Remaining: 4 (manual review required)

Fixes Applied

Fixes Applied

#IssueLocationFix Applied
1Legacy element IDSYS-01.01:L23Converted FR-001 → SYS.01.01.01
2Hardcoded timeoutSYS-01.02:L45Replaced with @threshold:PRD.01.timeout.auth
3Missing fallbackSYS-01.03:L78Added "JWT cache; local validation"
............
#IssueLocationFix Applied
1Legacy element IDSYS-01.01:L23Converted FR-001 → SYS.01.01.01
2Hardcoded timeoutSYS-01.02:L45Replaced with @threshold:PRD.01.timeout.auth
3Missing fallbackSYS-01.03:L78Added "JWT cache; local validation"
............

Files Modified

Files Modified

  • docs/06_SYS/SYS-01_f1_iam/SYS-01.00_index.md
  • docs/06_SYS/SYS-01_f1_iam/SYS-01.01_authentication.md
  • docs/06_SYS/SYS-01_f1_iam/SYS-01.02_authorization.md
  • docs/06_SYS/SYS-01_f1_iam/SYS-01.03_session_management.md
  • docs/06_SYS/SYS-01_f1_iam/SYS-01.00_index.md
  • docs/06_SYS/SYS-01_f1_iam/SYS-01.01_authentication.md
  • docs/06_SYS/SYS-01_f1_iam/SYS-01.02_authorization.md
  • docs/06_SYS/SYS-01_f1_iam/SYS-01.03_session_management.md

Backup Location

Backup Location

  • tmp/backup/SYS-01_f1_iam_20260209_143022/
  • tmp/backup/SYS-01_f1_iam_20260209_143022/

Remaining Issues (Manual Review)

Remaining Issues (Manual Review)

#IssueLocationReason
1Incomplete QA targetSYS-01.02:L102Domain expertise needed
2Missing interface specSYS-01.03API design decision
............
#IssueLocationReason
1Incomplete QA targetSYS-01.02:L102Domain expertise needed
2Missing interface specSYS-01.03API design decision
............

6-Category Score Impact

6-Category Score Impact

CategoryBeforeAfterDelta
Functional Decomposition23/2525/25+2
Quality Attributes18/2019/20+1
Interface Specifications18/2019/20+1
Data Management14/1514/150
Testing Requirements8/109/10+1
Traceability10/1010/100
CategoryBeforeAfterDelta
Functional Decomposition23/2525/25+2
Quality Attributes18/2019/20+1
Interface Specifications18/2019/20+1
Data Management14/1514/150
Testing Requirements8/109/10+1
Traceability10/1010/100

Next Steps

Next Steps

  1. Review manually flagged items
  2. Re-run validation to confirm score
  3. Commit changes if satisfied

**Fix Configuration**:

```yaml
fix_mode:
  enabled: true
  backup:
    enabled: true
    location: "tmp/backup/"
    retention_days: 7

  fix_categories:
    element_ids: true        # Legacy ID conversion
    thresholds: true         # @threshold references
    dependencies: true       # External dependencies table
    structure: true          # Document sections
    traceability: true       # Cumulative tags

  preservation:
    functional_requirements: true   # Never modify FR content
    quality_attributes: true        # Never modify QA targets
    interface_specs: true           # Never modify interface content
    comments: true                  # Preserve user comments

  validation:
    re_validate_after_fix: true
    require_score_improvement: false
    max_fix_iterations: 3

  element_id_migration:
    FR_XXX_to_SYS_NN_01_SS: true   # FR-001 → SYS.01.01.01
    QA_XXX_to_SYS_NN_02_SS: true   # QA-001 → SYS.01.02.01
    SR_XXX_to_SYS_NN_26_SS: true   # SR-001 → SYS.01.26.01
Command Line Options (Review/Fix):
OptionModeDefaultDescription
--mode review
Review-Run review mode only
--mode fix
Fix-Run fix mode
--output-report
BothautoReport output path
--backup
FixtrueCreate backup before fixing
--fix-types
FixallComma-separated fix categories
--dry-run
FixfalsePreview fixes without applying
--preserve-all
FixfalseExtra cautious preservation
--min-score-gain
Fix0Minimum score improvement required

  1. Review manually flagged items
  2. Re-run validation to confirm score
  3. Commit changes if satisfied

**修复配置**:

```yaml
fix_mode:
  enabled: true
  backup:
    enabled: true
    location: "tmp/backup/"
    retention_days: 7

  fix_categories:
    element_ids: true        # Legacy ID conversion
    thresholds: true         # @threshold references
    dependencies: true       # External dependencies table
    structure: true          # Document sections
    traceability: true       # Cumulative tags

  preservation:
    functional_requirements: true   # Never modify FR content
    quality_attributes: true        # Never modify QA targets
    interface_specs: true           # Never modify interface content
    comments: true                  # Preserve user comments

  validation:
    re_validate_after_fix: true
    require_score_improvement: false
    max_fix_iterations: 3

  element_id_migration:
    FR_XXX_to_SYS_NN_01_SS: true   # FR-001 → SYS.01.01.01
    QA_XXX_to_SYS_NN_02_SS: true   # QA-001 → SYS.01.02.01
    SR_XXX_to_SYS_NN_26_SS: true   # SR-001 → SYS.01.26.01
命令行选项(审查/修复):
选项模式默认值说明
--mode review
审查-仅运行审查模式
--mode fix
修复-运行修复模式
--output-report
两者auto报告输出路径
--backup
修复true修复前创建备份
--fix-types
修复all以逗号分隔的修复类别
--dry-run
修复false预览修复但不应用
--preserve-all
修复false额外谨慎地保留内容
--min-score-gain
修复0最低分数提升要求

Output Artifacts

输出产物

Generated Files

生成的文件

All SYS use nested folders (
SYS-NN_{slug}/
) regardless of size. Document sectioning (monolithic vs sectioned) depends only on document size (>20k tokens = sectioned).
FilePurposeLocation
SYS-NN_{slug}/SYS folder (ALWAYS created)
docs/06_SYS/
SYS-NN_{slug}.mdMain SYS document (monolithic <20k tokens)
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.0_index.mdSection index (sectioned ≥20k tokens)
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.S_{section}.mdSection files (sectioned ≥20k tokens)
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.A_audit_report_v{VVV}.mdCombined audit report (preferred)
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.R_review_report_v{VVV}.mdReview report
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.F_fix_report_v{VVV}.mdFix report
docs/06_SYS/SYS-NN_{slug}/
.drift_cache.jsonDrift detection cache
docs/06_SYS/SYS-NN_{slug}/
无论大小,所有 SYS 都使用嵌套文件夹(
SYS-NN_{slug}/
)。文档分节方式(单体式或分节式)仅取决于文档大小(>20k tokens 时使用分节式)。
文件用途位置
SYS-NN_{slug}/SYS 文件夹(始终创建)
docs/06_SYS/
SYS-NN_{slug}.md主 SYS 文档(单体式 <20k tokens)
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.0_index.md章节索引(分节式 ≥20k tokens)
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.S_{section}.md章节文件(分节式 ≥20k tokens)
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.A_audit_report_v{VVV}.md综合审查报告(首选)
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.R_review_report_v{VVV}.md审查报告
docs/06_SYS/SYS-NN_{slug}/
SYS-NN.F_fix_report_v{VVV}.md修复报告
docs/06_SYS/SYS-NN_{slug}/
.drift_cache.json漂移检测缓存
docs/06_SYS/SYS-NN_{slug}/

Validation Reports

验证报告

ReportPurposeLocation
sys_validation_report.jsonValidation results
tmp/
req_ready_scores.jsonREQ-Ready breakdown
tmp/
sys_autopilot_log.mdExecution log
tmp/

报告用途位置
sys_validation_report.json验证结果
tmp/
req_ready_scores.jsonREQ-Ready 明细
tmp/
sys_autopilot_log.md执行日志
tmp/

Error Handling

错误处理

Error Categories

错误类别

CategoryHandlingExample
ADR SYS-Ready < 90%Abort with messageADR-01 score at 85%
ADR Not FoundSkip or abortADR-08 does not exist
Validation FailureAuto-fix, retryMissing required section
REQ-Ready Below 90%Enhance sections, retryScore at 88%
Max Retries ExceededFlag for manual reviewPersistent validation errors
类别处理方式示例
ADR SYS-Ready < 90%中止并显示消息ADR-01 分数为 85%
未找到 ADR跳过或中止ADR-08 不存在
验证失败自动修复后重试缺少必需章节
REQ-Ready < 90%增强章节后重试分数为 88%
超过最大重试次数标记为需要手动审查持续出现验证错误

Recovery Actions

恢复操作

python
def handle_error(error_type: str, context: dict) -> Action:
    match error_type:
        case "ADR_SYS_READY_LOW":
            return Action.ABORT_WITH_MESSAGE
        case "ADR_NOT_FOUND":
            return Action.SKIP_OR_ABORT
        case "VALIDATION_FAILURE":
            if context["retry_count"] < 3:
                return Action.AUTO_FIX_RETRY
            return Action.FLAG_MANUAL_REVIEW
        case "REQ_READY_LOW":
            return Action.ENHANCE_SECTIONS
        case _:
            return Action.FLAG_MANUAL_REVIEW

python
def handle_error(error_type: str, context: dict) -> Action:
    match error_type:
        case "ADR_SYS_READY_LOW":
            return Action.ABORT_WITH_MESSAGE
        case "ADR_NOT_FOUND":
            return Action.SKIP_OR_ABORT
        case "VALIDATION_FAILURE":
            if context["retry_count"] < 3:
                return Action.AUTO_FIX_RETRY
            return Action.FLAG_MANUAL_REVIEW
        case "REQ_READY_LOW":
            return Action.ENHANCE_SECTIONS
        case _:
            return Action.FLAG_MANUAL_REVIEW

Configuration

配置

Default Configuration

默认配置

yaml
undefined
yaml
undefined

config/sys_autopilot.yaml

config/sys_autopilot.yaml

sys_autopilot: version: "2.0"
scoring: sys_ready_min: 90 # ADR threshold req_ready_min: 90 # SYS output threshold strict_mode: false # NEW: Visual score indicators score_display: pass_icon: "✅" # >= 90% warning_icon: "🟡" # 85-89% fail_icon: "❌" # < 85% # NEW: 6-category scoring weights scoring_weights: functional_decomposition: 25 quality_attributes: 20 interface_specifications: 20 data_management: 15 testing_requirements: 10 traceability: 10
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_adr: 180 # seconds
output: structure: auto # auto, monolithic, sectioned, modular size_threshold_kb: 25 report_format: markdown # NEW: Modular splitting options modular_splitting: enabled: true strategy: per_capability # per_capability, per_section max_file_size_kb: 50
validation: skip_validation: false fix_iterations_max: 3 require_threshold_tags: true # NEW: Enhanced validation checks require_external_dependencies: true require_fallback_strategy: true require_6_category_coverage: true
quality_attributes: require_performance: true require_reliability: true require_security: true require_scalability: false require_observability: true require_maintainability: false

NEW: External Dependencies Configuration

external_dependencies: require_table: true require_fallback: true categories: - infrastructure # GCP, AWS, Azure - data # Databases, caches - integration # APIs, message queues - security # Identity providers - observability # Monitoring, logging
undefined
sys_autopilot: version: "2.0"
scoring: sys_ready_min: 90 # ADR threshold req_ready_min: 90 # SYS output threshold strict_mode: false # NEW: Visual score indicators score_display: pass_icon: "✅" # >= 90% warning_icon: "🟡" # 85-89% fail_icon: "❌" # < 85% # NEW: 6-category scoring weights scoring_weights: functional_decomposition: 25 quality_attributes: 20 interface_specifications: 20 data_management: 15 testing_requirements: 10 traceability: 10
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_adr: 180 # seconds
output: structure: auto # auto, monolithic, sectioned, modular size_threshold_kb: 25 report_format: markdown # NEW: Modular splitting options modular_splitting: enabled: true strategy: per_capability # per_capability, per_section max_file_size_kb: 50
validation: skip_validation: false fix_iterations_max: 3 require_threshold_tags: true # NEW: Enhanced validation checks require_external_dependencies: true require_fallback_strategy: true require_6_category_coverage: true
quality_attributes: require_performance: true require_reliability: true require_security: true require_scalability: false require_observability: true require_maintainability: false

NEW: External Dependencies Configuration

external_dependencies: require_table: true require_fallback: true categories: - infrastructure # GCP, AWS, Azure - data # Databases, caches - integration # APIs, message queues - security # Identity providers - observability # Monitoring, logging
undefined

Command Line Options

命令行选项

OptionDefaultDescription
--min-sys-ready
90Minimum ADR SYS-Ready score
--min-req-ready
90Minimum SYS REQ-Ready score
--no-auto-fix
falseDisable auto-fix (manual only)
--continue-on-error
falseContinue if one ADR fails
--dry-run
falsePreview execution plan only
--output-format
autoForce monolithic or sectioned output
--skip-validation
falseSkip validation phase

选项默认值说明
--min-sys-ready
90最低 ADR SYS-Ready 分数
--min-req-ready
90最低 SYS REQ-Ready 分数
--no-auto-fix
false禁用自动修复(仅手动处理)
--continue-on-error
false某个 ADR 失败后继续执行
--dry-run
false仅预览执行计划
--output-format
auto强制使用单体式或分节式输出
--skip-validation
false跳过验证阶段

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:
  1. Chunk Formation: Group ADR-derived SYS documents into chunks of maximum 3 at a time
  2. Sequential Chunk Processing: Process one chunk at a time, completing all documents in a chunk before starting the next
  3. Context Pause: After completing each chunk, provide a summary and pause for user acknowledgment
  4. Progress Tracking: Display chunk progress (e.g., "Chunk 2/3: Processing SYS-04, SYS-05, SYS-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
Execution Pattern:
For SYS batch of 7 ADR-derived documents:
  Chunk 1: SYS-01, SYS-02, SYS-03 → Complete → Summary
  [Context compaction opportunity]
  Chunk 2: SYS-04, SYS-05, SYS-06 → Complete → Summary
  [Context compaction opportunity]
  Chunk 3: SYS-07 → Complete → Summary
Chunk Completion Template:
markdown
undefined
关键要求:为防止上下文溢出错误(“Prompt is too long”、“Conversation too long”),所有 autopilot 操作都必须遵循分块执行规则:
分块大小限制:每个块最多处理 3 个文档
分块规则:
  1. 分块形成:将 ADR 衍生的 SYS 文档分组,每组最多 3 个
  2. 顺序处理分块:一次处理一个块,完成该块中的所有文档后再开始下一个块
  3. 上下文暂停:每完成一个块,提供摘要并等待用户确认
  4. 进度跟踪:显示分块进度(例如“Chunk 2/3: Processing SYS-04, SYS-05, SYS-06...”)
必须分块的原因:
  • 防止批处理期间出现“Conversation too long”错误
  • 支持在块之间压缩上下文
  • 发生故障时能够恢复,而不会丢失全部进度
  • 为用户提供自然的审查检查点
执行模式:
For SYS batch of 7 ADR-derived documents:
  Chunk 1: SYS-01, SYS-02, SYS-03 → Complete → Summary
  [Context compaction opportunity]
  Chunk 2: SYS-04, SYS-05, SYS-06 → Complete → Summary
  [Context compaction opportunity]
  Chunk 3: SYS-07 → Complete → Summary
分块完成模板:
markdown
undefined

Chunk N/M Complete

Chunk N/M Complete

Generated:
  • SYS-XX (Infrastructure): REQ-Ready Score 94%
  • SYS-YY (Data Architecture): REQ-Ready Score 92%
  • SYS-ZZ (Integration): REQ-Ready Score 95%
Proceeding to next chunk...

---
Generated:
  • SYS-XX (Infrastructure): REQ-Ready Score 94%
  • SYS-YY (Data Architecture): REQ-Ready Score 92%
  • SYS-ZZ (Integration): REQ-Ready Score 95%
Proceeding to next chunk...

---

Integration Points

集成点

Pre-Execution Hooks

执行前 Hooks

bash
undefined
bash
undefined

Hook: pre_sys_generation

Hook: pre_sys_generation

Runs before SYS generation starts

Runs before SYS generation starts

./hooks/pre_sys_generation.sh
./hooks/pre_sys_generation.sh

Example: Verify ADR SYS-Ready scores

Example: Verify ADR SYS-Ready scores

for adr in docs/05_ADR/ADR-.md; do score=$(grep -oP 'SYS-Ready.\K\d+' "$adr") if [ "$score" -lt 90 ]; then echo "ERROR: $adr SYS-Ready score below 90%" exit 1 fi done
undefined
for adr in docs/05_ADR/ADR-.md; do score=$(grep -oP 'SYS-Ready.\K\d+' "$adr") if [ "$score" -lt 90 ]; then echo "ERROR: $adr SYS-Ready score below 90%" exit 1 fi done
undefined

Post-Execution Hooks

执行后 Hooks

bash
undefined
bash
undefined

Hook: post_sys_generation

Hook: post_sys_generation

Runs after SYS generation completes

Runs after SYS generation completes

./hooks/post_sys_generation.sh
./hooks/post_sys_generation.sh

Example: Trigger REQ autopilot for validated SYS

Example: Trigger REQ autopilot for validated SYS

if [ "$ALL_SYS_VALIDATED" = "true" ]; then /doc-req-autopilot all fi
undefined
if [ "$ALL_SYS_VALIDATED" = "true" ]; then /doc-req-autopilot all fi
undefined

CI/CD Integration

CI/CD 集成

yaml
undefined
yaml
undefined

.github/workflows/sys_autopilot.yml

.github/workflows/sys_autopilot.yml

name: SYS Autopilot
on: push: paths: - 'docs/05_ADR/**/ADR-*.md'
jobs: generate-sys: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
  - name: Run SYS Autopilot
    run: |
      /doc-sys-autopilot all

  - name: Upload Validation Report
    uses: actions/upload-artifact@v4
    with:
      name: sys-validation
      path: tmp/sys_validation_report.json

---
name: SYS Autopilot
on: push: paths: - 'docs/05_ADR/**/ADR-*.md'
jobs: generate-sys: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
  - name: Run SYS Autopilot
    run: |
      /doc-sys-autopilot all

  - name: Upload Validation Report
    uses: actions/upload-artifact@v4
    with:
      name: sys-validation
      path: tmp/sys_validation_report.json

---

Quality Gates

质量门禁

Phase Gates

阶段门禁

PhaseGateCriteria
Phase 1ADR GateADR documents exist with architecture decisions
Phase 2Readiness GateAll ADRs have SYS-Ready score >= 90%
Phase 3Generation GateAll 5 parts generated per system
Phase 4Validation GateREQ-Ready Score >= 90%
Phase 5Review GateNo blocking issues remaining
阶段门禁标准
阶段 1ADR 门禁ADR 文档存在且包含架构决策
阶段 2就绪门禁所有 ADR 的 SYS-Ready 分数均 >= 90%
阶段 3生成门禁每个系统均已生成 5 个部分
阶段 4验证门禁REQ-Ready 分数 >= 90%
阶段 5审查门禁不存在尚未解决的阻断性问题

Blocking vs Non-Blocking

阻断性与非阻断性问题

Issue TypeBlockingAction
Missing Functional RequirementsYesMust fix before proceeding
Missing Quality AttributesYesMust fix before proceeding
REQ-Ready Score < 90%YesMust enhance sections
Invalid element ID formatYesMust convert to unified format
Missing @threshold tagsYesMust add registry references
Hardcoded numeric valuesYesMust replace with @threshold
Missing optional sectionNoLog warning, continue
Style/formatting issuesNoAuto-fix, continue

问题类型是否阻断操作
缺少功能需求是继续前必须修复
缺少质量属性是继续前必须修复
REQ-Ready 分数 < 90%是必须增强章节
元素 ID 格式无效是必须转换为统一格式
缺少 @threshold 标签是必须添加注册表引用
硬编码数值是必须替换为 @threshold
缺少可选章节否记录警告并继续
样式/格式问题否自动修复并继续

Related Resources

相关资源

  • SYS Creation Skill:
    .claude/skills/doc-sys/SKILL.md
  • SYS Validator Skill:
    .claude/skills/doc-sys-validator/SKILL.md
  • Quality Advisor Skill:
    .claude/skills/quality-advisor/SKILL.md
  • Naming Standards Skill:
    .claude/skills/doc-naming/SKILL.md
  • SYS Audit Skill:
    .claude/skills/doc-sys-audit/SKILL.md
  • SYS Template:
    ai_dev_ssd_flow/06_SYS/SYS-MVP-TEMPLATE.md
  • SYS Creation Rules:
    ai_dev_ssd_flow/06_SYS/SYS_MVP_CREATION_RULES.md
  • SYS Validation Rules:
    ai_dev_ssd_flow/06_SYS/SYS_MVP_VALIDATION_RULES.md
  • ADR Autopilot Skill:
    .claude/skills/doc-adr-autopilot/SKILL.md

  • SYS 创建 skill:
    .claude/skills/doc-sys/SKILL.md
  • SYS 验证器 skill:
    .claude/skills/doc-sys-validator/SKILL.md
  • 质量顾问 skill:
    .claude/skills/quality-advisor/SKILL.md
  • 命名标准 skill:
    .claude/skills/doc-naming/SKILL.md
  • SYS 审查 skill:
    .claude/skills/doc-sys-audit/SKILL.md
  • SYS 模板:
    ai_dev_ssd_flow/06_SYS/SYS-MVP-TEMPLATE.md
  • SYS 创建规则:
    ai_dev_ssd_flow/06_SYS/SYS_MVP_CREATION_RULES.md
  • SYS 验证规则:
    ai_dev_ssd_flow/06_SYS/SYS_MVP_VALIDATION_RULES.md
  • ADR Autopilot skill:
    .claude/skills/doc-adr-autopilot/SKILL.md

Quick Reference

快速参考

InputOutputKey Metric
ADR DocumentsSYS-01 to SYS-07REQ-Ready >= 90%
Usage:
/doc-sys-autopilot <ADR-ID|all> [OPTIONS]
Common Commands:
bash
undefined
输入输出关键指标
ADR 文档SYS-01 至 SYS-07REQ-Ready >= 90%
用法:
/doc-sys-autopilot <ADR-ID|all> [OPTIONS]
常用命令:
bash
undefined

Generate all SYS from ADRs

Generate all SYS from ADRs

/doc-sys-autopilot all
/doc-sys-autopilot all

Generate single SYS from specific ADR

Generate single SYS from specific ADR

/doc-sys-autopilot ADR-01
/doc-sys-autopilot ADR-01

Preview only

Preview only

/doc-sys-autopilot all --dry-run
/doc-sys-autopilot all --dry-run

Resume after failure

Resume after failure

/doc-sys-autopilot resume

**ADR to SYS Mapping**:

| ADR | SYS | System Domain |
|-----|-----|---------------|
| ADR-01 | SYS-01 | Infrastructure |
| ADR-02 | SYS-02 | Data Architecture |
| ADR-03 | SYS-03 | Integration |
| ADR-04 | SYS-04 | Security |
| ADR-05 | SYS-05 | Observability |
| ADR-06 | SYS-06 | AI/ML |
| ADR-07 | SYS-07 | Technology Selection |

**Element ID Codes (SYS.NN.TT.SS)**:

| Type | Code | Example |
|------|------|---------|
| Functional Requirement | 01 | SYS.02.01.01 |
| Quality Attribute | 02 | SYS.02.02.01 |
| Use Case | 11 | SYS.02.11.01 |
| System Requirement | 26 | SYS.02.26.01 |

**Cumulative Tags Required** (Layer 6 - 5 tags):
```markdown
@brd: BRD.NN.TT.SS
@prd: PRD.NN.TT.SS
@ears: EARS.NN.TT.SS
@bdd: BDD.NN.TT.SS
@adr: ADR-NN

/doc-sys-autopilot resume

**ADR 到 SYS 的映射**:

| ADR | SYS | 系统领域 |
|-----|-----|---------------|
| ADR-01 | SYS-01 | 基础设施 |
| ADR-02 | SYS-02 | 数据架构 |
| ADR-03 | SYS-03 | 集成 |
| ADR-04 | SYS-04 | 安全 |
| ADR-05 | SYS-05 | 可观测性 |
| ADR-06 | SYS-06 | AI/ML |
| ADR-07 | SYS-07 | 技术选型 |

**元素 ID 代码(SYS.NN.TT.SS)**:

| 类型 | 代码 | 示例 |
|------|------|---------|
| 功能需求 | 01 | SYS.02.01.01 |
| 质量属性 | 02 | SYS.02.02.01 |
| 用例 | 11 | SYS.02.11.01 |
| 系统需求 | 26 | SYS.02.26.01 |

**必需累计标签**(第 6 层 - 5 个标签):
```markdown
@brd: BRD.NN.TT.SS
@prd: PRD.NN.TT.SS
@ears: EARS.NN.TT.SS
@bdd: BDD.NN.TT.SS
@adr: ADR-NN

Review Document Standards (v2.2)

审查文档标准(v2.2)

IMPORTANT: Review reports generated by this autopilot are formal project documents.
See:
.claude/skills/REVIEW_DOCUMENT_STANDARDS.md
for complete standards.
重要说明:此 autopilot 生成的审查报告属于正式项目文档。
完整标准参见:
.claude/skills/REVIEW_DOCUMENT_STANDARDS.md
。

Quick Reference

快速参考

RequirementValue
Storage LocationSame folder as reviewed SYS
File Name
SYS-NN.A_audit_report_vNNN.md
(preferred),
SYS-NN.R_review_report_vNNN.md
(legacy)
YAML FrontmatterMANDATORY - see shared standards
Parent ReferenceMANDATORY - link to SYS document
Example Location:
docs/06_SYS/
├── SYS-03_f3_observability/
│   ├── SYS-03_f3_observability.md
│   ├── SYS-03.A_audit_report_v001.md    # ← Preferred report stored here
│   └── SYS-03.R_review_report_v001.md   # ← Legacy-compatible reviewer report

要求值
存储位置与被审查的 SYS 位于同一文件夹
文件名
SYS-NN.A_audit_report_vNNN.md
(首选)、
SYS-NN.R_review_report_vNNN.md
(旧版兼容)
YAML Frontmatter强制要求 - 参见共享标准
父级引用强制要求 - 链接到 SYS 文档
位置示例:
docs/06_SYS/
├── SYS-03_f3_observability/
│   ├── SYS-03_f3_observability.md
│   ├── SYS-03.A_audit_report_v001.md    # ← Preferred report stored here
│   └── SYS-03.R_review_report_v001.md   # ← Legacy-compatible reviewer report

Version History

版本历史

VersionDateChanges
2.52026-02-27Migrated frontmatter to
metadata
; normalized SYS MVP references to
ai_dev_ssd_flow
; replaced non-existent direct script examples with skill invocation flow; aligned report contracts to prefer
SYS-NN.A_audit_report_vNNN.md
with legacy reviewer compatibility
2.42026-02-11Smart Document Detection: Added automatic document type recognition; Self-type input (SYS-NN) triggers review mode; Upstream-type input (ADR-NN) triggers generate-if-missing or find-and-review; Updated input patterns table with type-based actions
2.32026-02-10Review & Fix Cycle: Replaced Phase 5 with iterative Review -> Fix cycle using
doc-sys-reviewer
and
doc-sys-fixer
; Added
doc-sys-fixer
skill dependency; Phase 5 now includes flowchart, iteration control, and quality checks sections (5.1-5.5)
2.22026-02-10Added Review Document Standards: review reports stored alongside reviewed documents with YAML frontmatter and parent references
2.12026-02-09Added Review Mode for validating existing SYS documents without modification; Added Fix Mode for auto-repairing SYS documents while preserving manual content; Added fix categories (element_ids, thresholds, dependencies, structure, traceability); Added content preservation rules; Added backup functionality for fix operations; Added review/fix report generation with 6-category score impact; Added element ID migration support (FR_XXX, QA_XXX, SR_XXX to unified format)
2.02026-02-09Added modular splitting pattern with per-capability decomposition; Added External Dependencies table with fallback strategy requirement; Added 6-category REQ-Ready scoring with weighted breakdown; Added visual score indicators (✅/🟡/❌); Added validation rules SYS-E040 to SYS-E045 for new features; Added modular SYS template for atomic files; Added fallback strategy guidelines by dependency type
1.02026-02-08Initial skill creation with 5-phase workflow; Integrated doc-naming, doc-sys, doc-sys-validator, quality-advisor skills; Added ADR to SYS mapping; Functional requirements and quality attributes generation; REQ-Ready scoring
版本日期变更
2.52026-02-27将 frontmatter 迁移到
metadata
;将 SYS MVP 引用规范化为
ai_dev_ssd_flow
;用 skill 调用流程替换不存在的直接脚本示例;将报告契约调整为优先使用
SYS-NN.A_audit_report_vNNN.md
,同时兼容旧版 reviewer 报告
2.42026-02-11智能文档检测:增加自动文档类型识别;自身类型输入(SYS-NN)触发审查模式;上游类型输入(ADR-NN)触发缺失时生成或查找后审查;更新基于类型的操作表
2.32026-02-10审查与修复循环:使用
doc-sys-reviewer
和
doc-sys-fixer
将阶段 5 替换为迭代式 Review -> Fix 循环;增加
doc-sys-fixer
skill 依赖;阶段 5 现包含流程图、迭代控制和质量检查章节(5.1-5.5)
2.22026-02-10增加审查文档标准:审查报告与被审查文档一同存储,并包含 YAML frontmatter 和父级引用
2.12026-02-09增加审查模式,用于在不修改文档的情况下验证现有 SYS 文档;增加修复模式,用于在保留手动内容的同时自动修复 SYS 文档;增加修复类别(element_ids、thresholds、dependencies、structure、traceability);增加内容保留规则;增加备份功能;增加审查/修复报告生成及 6 类分数变化;增加元素 ID 迁移支持(FR_XXX、QA_XXX、SR_XXX 转换为统一格式)
2.02026-02-09增加按能力分解的模块化拆分模式;增加包含回退策略要求的外部依赖表;增加带加权明细的 6 类 REQ-Ready 评分;增加可视分数指示符(✅/🟡/❌);为新功能增加 SYS-E040 至 SYS-E045 验证规则;增加模块化 SYS 模板以支持原子文件;增加按依赖类型划分的回退策略指导原则
1.02026-02-08初始创建 skill,包含 5 阶段工作流;集成 doc-naming、doc-sys、doc-sys-validator、quality-advisor skills;增加 ADR 到 SYS 映射;增加功能需求和质量属性生成;增加 REQ-Ready 评分