Token导航 LogoToken导航

Agent Skill · 研究检索

doc-sys-fixer(文档系统修复程序)

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

doc-sys-fixer 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 49,774。

总安装 636周安装 26GitHub Stars 14下载 204核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

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

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于修复系统需求文档中的问题,基于审计报告进行迭代优化。自动读取审核结果并修正 SYS 文档,提升内容准确性。应在 doc-sys-reviewer 发现问题后调用以闭环改进流程。依赖审计报告的命名规范,需确认文件路径和版本格式正确。doc-sys-fixer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/doc-sys-fixer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-sys…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

doc-sys-fixer 怎么安装?

在终端执行 npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-sys-fixer。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

doc-sys-fixer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

doc-sys-fixer 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

doc-sys-fixer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

doc-sys-fixer 用的人多吗?

公开数据是累计安装 636 次,近一周安装 26 次,下载 204 次,GitHub 14 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

doc-sys-fixer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
doc-sys-fixer

文档系统修复程序 · 本页

63614接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

doc-sys-fixer

Purpose

Automated fix skill that reads the latest audit/review report and applies fixes to SYS (System Design Specification) documents. This skill bridges the gap between doc-sys-reviewer/doc-sys-audit (which identify issues) and the corrected SYS, enabling iterative improvement cycles.

Layer: 6 (SYS Quality Improvement)

Upstream: SYS document, Audit/Review Report (SYS-NN.A_audit_report_vNNN.md preferred, SYS-NN.R_review_report_vNNN.md legacy), ADR (for architecture alignment)

Downstream: Fixed SYS, Fix Report (SYS-NN.F_fix_report_vNNN.md)


When to Use This Skill

Use doc-sys-fixer when:

  • After Review: Run after doc-sys-reviewer identifies issues
  • Iterative Improvement: Part of Review -> Fix -> Review cycle
  • Automated Pipeline: CI/CD integration for quality gates
  • Batch Fixes: Apply fixes to multiple SYS documents based on review reports

Do NOT use when:

  • No audit/review report exists (run doc-sys-audit or doc-sys-reviewer first)
  • Creating new SYS (use doc-sys or doc-sys-autopilot)
  • Only need validation (use doc-sys-validator)

Skill Dependencies

SkillPurposeWhen Used
doc-sys-auditPreferred source of normalized findingsInput (reads audit report)
doc-sys-reviewerLegacy/alternate source of issues to fixInput (reads review report)
doc-namingElement ID standardsFix element IDs
doc-sysSYS creation rulesCreate missing sections
doc-adrADR alignment referenceVerify architecture traceability

Workflow Overview

flowchart TD
    A[Input: SYS Path] --> B[Find Latest Review Report]
    B --> C{Review Found?}
  C -->|No| D[Run doc-sys-audit or doc-sys-reviewer First]
    C -->|Yes| E[Parse Review Report]

    E --> F[Categorize Issues]

    subgraph FixPhases["Fix Phases"]
        F --> F0[Phase 0: Fix Structure Violations]
        F0 --> G[Phase 1: Create Missing Files]
        G --> H[Phase 2: Fix Broken Links]
        H --> I[Phase 3: Fix Element IDs]
        I --> J[Phase 4: Fix Content Issues]
        J --> K[Phase 5: Update References]
        K --> K2[Phase 6: Handle Upstream Drift]
    end

    K2 --> L[Write Fixed SYS]
    L --> M[Generate Fix Report]
    M --> N{Re-run Review?}
    N -->|Yes| O[Invoke doc-sys-reviewer]
    O --> P{Score >= Threshold?}
    P -->|No, iterations < max| F
    P -->|Yes| Q[COMPLETE]
    N -->|No| Q

Fix Phases

Phase 0: Fix Structure Violations (CRITICAL)

Fixes SYS documents that are not in nested folders. This phase runs FIRST because all subsequent phases depend on correct folder structure.

Nested Folder Rule: ALL SYS documents MUST be in nested folders regardless of document size.

Required Structure:

SYS TypeRequired Location
Monolithicdocs/06_SYS/SYS-NN_{slug}/SYS-NN_{slug}.md

Fix Actions:

Issue CodeIssueFix Action
REV-STR001SYS not in nested folderCreate folder, move file, update all links
REV-STR002SYS folder name doesn't match SYS IDRename folder to match
REV-STR003Monolithic SYS >25KB should be sectionedFlag for manual review

Structure Fix Workflow:

def fix_sys_structure(sys_path: str) -> list[Fix]:
    """Fix SYS structure violations."""
    fixes = []

    filename = os.path.basename(sys_path)
    parent_folder = os.path.dirname(sys_path)

    # Extract SYS ID and slug from filename
    match = re.match(r'SYS-(\d+)_([^/]+)\.md', filename)
    if not match:
        return []  # Cannot auto-fix invalid filename

    sys_id = match.group(1)
    slug = match.group(2)
    expected_folder = f"SYS-{sys_id}_{slug}"

    # Check if already in nested folder
    if os.path.basename(parent_folder) != expected_folder:
        # Create nested folder
        new_folder = os.path.join(os.path.dirname(parent_folder), expected_folder)
        os.makedirs(new_folder, exist_ok=True)

        # Move file
        new_path = os.path.join(new_folder, filename)
        shutil.move(sys_path, new_path)
        fixes.append(f"Moved {sys_path} to {new_path}")

        # Update upstream links in moved file
        content = Path(new_path).read_text()
        updated_content = content.replace('../05_ADR/', '../../05_ADR/')
        updated_content = updated_content.replace('../04_BDD/', '../../04_BDD/')
        Path(new_path).write_text(updated_content)
        fixes.append(f"Updated relative links for nested folder structure")

    return fixes

Link Path Updates After Move:

Original PathUpdated Path
../05_ADR/ADR-01_slug/ADR-01.md../../05_ADR/ADR-01_slug/ADR-01.md

Phase 1: Create Missing Files

Creates files that are referenced but don't exist.

Scope:

Missing FileActionTemplate Used
SYS-00_INDEX.mdCreate SYS indexIndex template
COMP_*.mdCreate placeholder component docComponent template
INT_*.mdCreate placeholder interface docInterface template
Reference docs (*_REF_*.md)Create placeholderREF template

SYS Index Template:

---
title: "SYS-00: System Design Specifications Index"
tags:
  - sys
  - index
  - reference
custom_fields:
  document_type: index
  artifact_type: SYS-REFERENCE
  layer: 6
---

# SYS-00: System Design Specifications Index

Master index of all System Design Specifications for this project.

## System Components

| SYS ID | Component | Status | Last Updated | ADR Refs |
|--------|-----------|--------|--------------|----------|
| SYS-01 | [Name] | Draft/Final | YYYY-MM-DD | ADR-01, ADR-02 |

## Component Relationships

| Component | Depends On | Depended By |
|-----------|------------|-------------|
| SYS-01 | | |

## Interface Catalog

| Interface ID | Type | Provider | Consumer |
|--------------|------|----------|----------|
| INT-01 | API | SYS-01 | SYS-02 |

---

*Maintained by doc-sys-fixer. Update when adding new SYS documents.*

Component Placeholder Template:

---
title: "Component Specification: [Component Name]"
tags:
  - component
  - system-design
  - reference
custom_fields:
  document_type: component
  status: placeholder
  created_by: doc-sys-fixer
---

# Component Specification: [Component Name]

> **Status**: Placeholder - Requires completion

## 1. Overview

[TODO: Document component overview]

## 2. Responsibilities

| Responsibility | Description |
|----------------|-------------|
| [Name] | [What it handles] |

## 3. Interfaces

| Interface | Type | Direction | Connected To |
|-----------|------|-----------|--------------|
| [Name] | REST/gRPC/Event | In/Out | [Component] |

## 4. Data Structures

[TODO: Document key data structures]

## 5. Architecture Decisions

| ADR | Title | Impact |
|-----|-------|--------|
| ADR-NN | [Title] | [How it affects this component] |

---

*Created by doc-sys-fixer as placeholder. Complete this document to resolve broken link issues.*

Interface Placeholder Template:

---
title: "Interface Specification: [Interface Name]"
tags:
  - interface
  - system-design
  - reference
custom_fields:
  document_type: interface
  status: placeholder
  created_by: doc-sys-fixer
---

# Interface Specification: [Interface Name]

> **Status**: Placeholder - Requires completion

## 1. Overview

[TODO: Document interface purpose]

## 2. Protocol

| Attribute | Value |
|-----------|-------|
| Type | REST / gRPC / Event / Message |
| Format | JSON / Protobuf / Avro |
| Authentication | JWT / API Key / mTLS |

## 3. Operations

| Operation | Method | Path/Topic | Description |
|-----------|--------|------------|-------------|
| [Name] | GET/POST | /path | [Description] |

## 4. Data Models

[TODO: Document request/response models]

---

*Created by doc-sys-fixer as placeholder. Complete this document to resolve broken link issues.*

Phase 2: Fix Broken Links

Updates links to point to correct locations.

Fix Actions:

Issue CodeIssueFix Action
REV-L001Broken internal linkUpdate path or create target file
REV-L002External link unreachableAdd warning comment, keep link
REV-L003Absolute path usedConvert to relative path
REV-L004Missing ADR traceability linkAdd link to corresponding ADR

Path Resolution Logic:

def fix_link_path(sys_location: str, target_path: str) -> str:
    """Calculate correct relative path based on SYS location."""

    # Monolithic SYS: docs/06_SYS/SYS-01.md
    # Sectioned SYS: docs/06_SYS/SYS-01_slug/SYS-01.3_section.md

    if is_sectioned_sys(sys_location):
        # Need to go up one more level
        return "../" + calculate_relative_path(sys_location, target_path)
    else:
        return calculate_relative_path(sys_location, target_path)

Cross-Layer Link Fix:

SourceTargetLink Pattern
SYSADR../05_ADR/ADR-NN.md
SYSREQ../07_REQ/REQ-NN.md
SYSCTR../08_CTR/CTR-NN.md

Phase 3: Fix Element IDs

Converts invalid element IDs to correct format.

Conversion Rules:

PatternIssueConversion
SYS.NN.06.SSCode 06 invalid for SYSSYS.NN.17.SS (Component)
COMP-XXXLegacy patternSYS.NN.17.SS
INT-XXXLegacy patternSYS.NN.18.SS
MOD-XXXLegacy patternSYS.NN.19.SS
DEP-XXXLegacy patternSYS.NN.20.SS
FLOW-XXXLegacy patternSYS.NN.21.SS

Type Code Mapping (SYS-specific valid codes: 01, 05, 17, 18, 19, 20, 21):

CodeElement TypeDescription
01Functional RequirementSystem function specification
05Use CaseSystem use case
17ComponentSystem component
18InterfaceSystem interface
19ModuleSoftware module
20DependencyExternal dependency
21Data FlowData flow specification

Invalid Code Conversions:

Invalid CodeValid CodeElement Type
0601Functional Requirement (was Acceptance Criteria)
1317Component (was Decision Context)
1418Interface (was Decision Statement)
2219Module (was Feature Item)

Regex Patterns:

# Find element IDs with invalid type codes for SYS
invalid_sys_type_06 = r'SYS\.(\d{2})\.06\.(\d{2})'
replacement_06 = r'SYS.\1.01.\2'

invalid_sys_type_13 = r'SYS\.(\d{2})\.13\.(\d{2})'
replacement_13 = r'SYS.\1.17.\2'

# Find legacy patterns
legacy_comp = r'###\s+COMP-(\d+):'
legacy_int = r'###\s+INT-(\d+):'
legacy_mod = r'###\s+MOD-(\d+):'
legacy_dep = r'###\s+DEP-(\d+):'
legacy_flow = r'###\s+FLOW-(\d+):'

Phase 4: Fix Content Issues

Addresses placeholders and incomplete content.

Fix Actions:

Issue CodeIssueFix Action
REV-P001[TODO] placeholderFlag for manual completion (cannot auto-fix)
REV-P002[TBD] placeholderFlag for manual completion (cannot auto-fix)
REV-P003Template date YYYY-MM-DDReplace with current date
REV-P004Template name [Name]Replace with metadata author or flag
REV-P005Empty sectionAdd minimum template content
REV-P006Missing component statusAdd "Draft" as default status

Auto-Replacements:

replacements = {
    'YYYY-MM-DDTHH:MM:SS': datetime.now().strftime('%Y-%m-%dT%H:%M:%S'),
    'YYYY-MM-DD': datetime.now().strftime('%Y-%m-%d'),
    'MM/DD/YYYY': datetime.now().strftime('%m/%d/%Y'),
    '[Current date]': datetime.now().strftime('%Y-%m-%dT%H:%M:%S'),
    '[Status]': 'Draft',
    '[Version]': '0.1',
}

SYS-Specific Content Fixes:

SectionMissing ContentAuto-Fill
StatusEmpty"Draft"
VersionEmpty"0.1"
Last UpdatedEmptyCurrent date
Component TypeEmpty"[Specify type]"

Phase 5: Update References

Ensures traceability and cross-references are correct.

Fix Actions:

IssueFix Action
Missing @ref: for created filesAdd reference tag
Incorrect cross-SYS pathUpdate to correct relative path
Missing ADR traceabilityAdd @trace: ADR-NN.SS tag
Missing REQ forward referenceAdd @trace: REQ-NN.SS tag

Traceability Matrix Update:

## Traceability

| SYS Element | Traces From | Traces To | Type |
|-------------|-------------|-----------|------|
| SYS.01.1701 | ADR.01.1401 | REQ.01.0101 | Component->Requirement |
| SYS.01.1801 | ADR.01.1402 | CTR.01.0901 | Interface->Contract |

Phase 6: Handle Upstream Drift (Auto-Merge)

Addresses issues where upstream source documents (ADR) have changed since SYS creation. Uses a tiered auto-merge system based on change percentage.

6.0.1 Hash Validation Fixes

FIX-H001: Invalid Hash Placeholder

Trigger: Hash contains placeholder instead of SHA-256

Fix:

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

Update cache with: sha256:<64_hex_output>

FIX-H002: Missing Hash Prefix

Trigger: 64 hex chars but missing sha256: prefix

Fix: Prepend sha256: to value

FIX-H003: Upstream File Not Found

Trigger: Cannot compute hash (file missing)

Fix: Set drift_detected: true, add to manual review

CodeDescriptionAuto-FixSeverity
FIX-H001Replace placeholder hash with actual SHA-256YesError
FIX-H002Add missing sha256: prefixYesWarning
FIX-H003Upstream file not foundPartialError

Upstream: ADR (Architecture Decision Records) Downstream: REQ (Requirements Specifications) ID Pattern: SYS.NN.xxxx (Document.Type.Sequence)

Tiered Auto-Merge System
TierChange %ActionVersion Impact
Tier 1< 5%Auto-merge additionsPatch (+0.0.1)
Tier 25-15%Auto-merge with detailed changelogMinor (+0.1.0)
Tier 3> 15%Archive current, trigger regenerationMajor (+1.0.0)
Change Percentage Calculation
def calculate_change_percentage(upstream_diff: dict) -> float:
    """Calculate change percentage from upstream ADR modifications.

    Args:
        upstream_diff: Dict containing added, modified, deprecated counts

    Returns:
        Change percentage (0.0 to 100.0)
    """
    total_elements = upstream_diff.get('total_elements', 0)
    if total_elements == 0:
        return 0.0

    added = upstream_diff.get('added', 0)
    modified = upstream_diff.get('modified', 0)
    deprecated = upstream_diff.get('deprecated', 0)

    # Additions count less than modifications
    weighted_changes = (added * 0.5) + (modified * 1.0) + (deprecated * 0.3)

    return min(100.0, (weighted_changes / total_elements) * 100)
Tier 1: Auto-Merge Additions (< 5%)

Trigger: Minor additions from ADR that do not affect existing SYS elements.

Actions:

  1. Parse new ADR decisions/constraints
  2. Generate new SYS element IDs (auto-increment sequence)
  3. Insert new elements in appropriate sections
  4. Increment patch version (e.g., 1.0.0 -> 1.0.1)

Auto-Generated ID Pattern:

def generate_sys_id(sys_doc_num: str, type_code: str, existing_ids: list) -> str:
    """Generate next available SYS element ID.

    Args:
        sys_doc_num: Document number (e.g., "01")
        type_code: Element type code (e.g., "17" for Component)
        existing_ids: List of existing IDs for this type

    Returns:
        Next available ID (e.g., "SYS.01.1713")
    """
    # Extract sequence numbers from existing IDs
    sequences = [int(id.split('.')[-1]) for id in existing_ids
                 if id.startswith(f'SYS.{sys_doc_num}.{type_code}.')]

    next_seq = max(sequences, default=0) + 1
    return f'SYS.{sys_doc_num}.{type_code}.{next_seq:02d}'

# Example: If SYS-01 has SYS.01.1701 through SYS.01.1712
# New ID: SYS.01.1713

Tier 1 Fix Report Entry:

## Tier 1 Auto-Merge Applied

| ADR Source | New SYS Element | Section | Description |
|------------|-----------------|---------|-------------|
| ADR-01.14.05 | SYS.01.1713 | Components | New auth cache component |
| ADR-01.14.06 | SYS.01.1808 | Interfaces | New event bus interface |

**Version**: 1.0.0 -> 1.0.1
**Change Percentage**: 3.2%
Tier 2: Auto-Merge with Changelog (5-15%)

Trigger: Moderate changes requiring documentation but not restructuring.

Actions:

  1. Apply all Tier 1 actions
  2. Generate detailed changelog section
  3. Update traceability matrix
  4. Add [MODIFIED] markers to affected elements
  5. Increment minor version (e.g., 1.0.1 -> 1.1.0)

Changelog Format:

## Changelog (Auto-Generated)

### Version 1.1.0 (2026-02-10)

**Upstream Trigger**: ADR-01.md v2.0 (modified 2026-02-09)

#### Added
- SYS.01.1713: Authentication cache component (from ADR-01.14.05)
- SYS.01.1714: Rate limiting component (from ADR-01.14.06)
- SYS.01.1808: Event bus interface (from ADR-01.14.07)

#### Modified
- SYS.01.1703: Updated auth flow to include cache [MODIFIED]
- SYS.01.1802: Added rate limit headers to API interface [MODIFIED]

#### Deprecated
- None

**Traceability Impact**: 5 REQ elements may need review

Modified Element Marker:

### SYS.01.1703: Authentication Service [MODIFIED]

<!-- MODIFIED: 2026-02-10 via auto-merge from ADR-01.14.05 -->
<!-- Previous version: 1.0.1 -->

**Component**: Authentication Service
**Status**: Active
**Modified Reason**: ADR-01 added caching requirement

[Component details...]
Tier 3: Archive and Regenerate (> 15%)

Trigger: Significant upstream changes requiring SYS restructuring.

Actions:

  1. Create archive of current SYS version
  2. Generate archive manifest
  3. Flag for regeneration via doc-sys-autopilot
  4. Increment major version (e.g., 1.1.0 -> 2.0.0)
  5. Preserve deprecated elements with [DEPRECATED] markers

Archive Manifest Format:

{
  "archive_id": "SYS-01_v1.1.0_20260210",
  "archive_date": "2026-02-10T16:30:00",
  "archived_version": "1.1.0",
  "new_version": "2.0.0",
  "archive_location": "tmp/archive/SYS-01_v1.1.0_20260210/",
  "trigger": {
    "upstream_document": "ADR-01.md",
    "upstream_version": "3.0",
    "change_percentage": 23.5,
    "tier": 3
  },
  "preserved_files": [
    "SYS-01.md",
    "SYS-01.1_components.md",
    "SYS-01.2_interfaces.md"
  ],
  "regeneration_required": true,
  "regeneration_command": "/doc-sys-autopilot ADR-01 --from-archive SYS-01_v1.1.0_20260210"
}

Archive Directory Structure:

tmp/archive/SYS-01_v1.1.0_20260210/
├── MANIFEST.json
├── SYS-01.md
├── SYS-01.1_components.md
├── SYS-01.2_interfaces.md
├── .drift_cache.json
└── CHANGELOG.md
No-Deletion Policy

Elements are NEVER deleted during auto-merge. Instead, mark as deprecated:

Deprecated Element Format:

### SYS.01.1705: Legacy Cache Service [DEPRECATED]

<!-- DEPRECATED: 2026-02-10 -->
<!-- Deprecation Reason: Superseded by SYS.01.1713 per ADR-01.14.05 -->
<!-- Replaced By: SYS.01.1713 -->
<!-- Original Version: 1.0.0 -->

> **Status**: DEPRECATED - Do not use in new implementations
> **Superseded By**: [SYS.01.1713](#sys011713-authentication-cache)
> **Deprecation Date**: 2026-02-10

[Original content preserved for reference...]

Deprecation Tracking:

## Deprecated Elements

| Element ID | Deprecated | Reason | Replaced By |
|------------|------------|--------|-------------|
| SYS.01.1705 | 2026-02-10 | ADR-01.14.05 supersedes | SYS.01.1713 |
| SYS.01.1803 | 2026-02-10 | Interface redesign | SYS.01.1808 |
Enhanced Drift Cache

After processing drift issues, update .drift_cache.json with merge history:

{
  "sys_version": "1.1.0",
  "sys_updated": "2026-02-10T16:30:00",
  "drift_reviewed": "2026-02-10T16:30:00",
  "upstream_type": "ADR",
  "downstream_type": "REQ",
  "upstream_hashes": {
    "../../05_ADR/ADR-01.md": "a1b2c3d4e5f6...",
    "../../05_ADR/ADR-01.md#decision-3": "g7h8i9j0k1l2...",
    "../../05_ADR/ADR-03.md": "m3n4o5p6q7r8..."
  },
  "merge_history": [
    {
      "merge_date": "2026-02-10T16:30:00",
      "tier": 2,
      "change_percentage": 8.5,
      "version_before": "1.0.1",
      "version_after": "1.1.0",
      "elements_added": ["SYS.01.1713", "SYS.01.1808"],
      "elements_modified": ["SYS.01.1703", "SYS.01.1802"],
      "elements_deprecated": [],
      "upstream_trigger": "ADR-01.md v2.0"
    }
  ],
  "acknowledged_drift": [
    {
      "document": "ADR-03.md",
      "acknowledged_date": "2026-02-08",
      "reason": "Informational only - no SYS impact"
    }
  ],
  "pending_regeneration": null
}
Drift Detection Issue Codes
CodeSeverityDescriptionTierAuto-Fix
REV-D001InfoMinor ADR addition (< 5% impact)1Yes
REV-D002WarningModerate ADR changes (5-15% impact)2Yes
REV-D003ErrorMajor ADR restructure (> 15% impact)3Partial
REV-D004InfoNew ADR added to project1Yes
REV-D005WarningADR version incremented1-3Depends
Drift Fix Workflow
flowchart TD
    A[Detect ADR Changes] --> B[Calculate Change %]
    B --> C{Change < 5%?}
    C -->|Yes| D[Tier 1: Auto-Merge]
    C -->|No| E{Change < 15%?}
    E -->|Yes| F[Tier 2: Merge + Changelog]
    E -->|No| G[Tier 3: Archive + Regenerate]

    D --> H[Generate New IDs]
    H --> I[Insert Elements]
    I --> J[Patch Version ++]

    F --> K[Apply Tier 1 Actions]
    K --> L[Generate Changelog]
    L --> M[Add MODIFIED Markers]
    M --> N[Minor Version ++]

    G --> O[Create Archive]
    O --> P[Generate Manifest]
    P --> Q[Mark for Regeneration]
    Q --> R[Major Version ++]

    J --> S[Update Drift Cache]
    N --> S
    R --> S
    S --> T[Generate Fix Report]
Command Options for Drift Handling
OptionDefaultDescription
--auto-mergetrueEnable tiered auto-merge system
--merge-tierautoForce specific tier (1, 2, 3, or auto)
--acknowledge-driftfalseInteractive drift acknowledgment mode
--archive-pathtmp/archive/Location for Tier 3 archives
--preserve-deprecatedtrueKeep deprecated elements (no-deletion policy)
--changelog-detailstandardChangelog verbosity (minimal, standard, verbose)
--notify-downstreamtrueFlag REQ documents for review after merge

Command Usage

Basic Usage

# Fix SYS based on latest review
/doc-sys-fixer SYS-01

# Fix with explicit review report
/doc-sys-fixer SYS-01 --review-report SYS-01.R_review_report_v001.md

# Fix and re-run review
/doc-sys-fixer SYS-01 --revalidate

# Fix with iteration limit
/doc-sys-fixer SYS-01 --revalidate --max-iterations 3

Options

OptionDefaultDescription
--review-reportlatestSpecific review report to use
--revalidatefalseRun reviewer after fixes
--max-iterations3Max fix-review cycles
--fix-typesallSpecific fix types (comma-separated)
--create-missingtrueCreate missing reference files
--backuptrueBackup SYS before fixing
--dry-runfalsePreview fixes without applying
--acknowledge-driftfalseInteractive drift acknowledgment mode
--update-drift-cachetrueUpdate.drift_cache.json after fixes

Fix Types

TypeDescription
missing_filesCreate missing index, component, interface docs
broken_linksFix link paths
element_idsConvert invalid/legacy element IDs
contentFix placeholders, dates, status
referencesUpdate traceability and cross-references
driftHandle upstream drift detection issues
allAll fix types (default)

Output Artifacts

Fix Report

Nested Folder Rule: ALL SYS use nested folders (SYS-NN_{slug}/) regardless of size. Fix reports are stored alongside the SYS document in the nested folder.

File Naming: SYS-NN.F_fix_report_vNNN.md

Location: Inside the SYS nested folder: docs/06_SYS/SYS-NN_{slug}/

Structure:

---
title: "SYS-NN.F: Fix Report v001"
tags:
  - sys
  - fix-report
  - quality-assurance
custom_fields:
  document_type: fix-report
  artifact_type: SYS-FIX
  layer: 6
  parent_doc: SYS-NN
  source_review: SYS-NN.R_review_report_v001.md
  fix_date: "YYYY-MM-DDTHH:MM:SS"
  fix_tool: doc-sys-fixer
  fix_version: "1.0"
---

# SYS-NN Fix Report v001

## Summary

| Metric | Value |
|--------|-------|
| Source Review | SYS-NN.R_review_report_v001.md |
| Issues in Review | 15 |
| Issues Fixed | 12 |
| Issues Remaining | 3 (manual review required) |
| Files Created | 3 |
| Files Modified | 4 |

## Files Created

| File | Type | Location |
|------|------|----------|
| SYS-00_INDEX.md | SYS Index | docs/06_SYS/ |
| COMP_AuthService.md | Component Placeholder | docs/00_REF/components/ |
| INT_UserAPI.md | Interface Placeholder | docs/00_REF/interfaces/ |

## Fixes Applied

| # | Issue Code | Issue | Fix Applied | File |
|---|------------|-------|-------------|------|
| 1 | REV-L001 | Broken index link | Created SYS-00_INDEX.md | SYS-01.md |
| 2 | REV-L001 | Broken component link | Created placeholder COMP file | SYS-01.md |
| 3 | REV-N004 | Element type 06 invalid | Converted to type 01 | SYS-01.md |
| 4 | REV-L003 | Absolute path used | Converted to relative | SYS-02.md |
| 5 | REV-N004 | Legacy COMP-XXX pattern | Converted to SYS.NN.17.SS | SYS-01.md |

## Issues Requiring Manual Review

| # | Issue Code | Issue | Location | Reason |
|---|------------|-------|----------|--------|
| 1 | REV-P001 | [TODO] placeholder | SYS-01:L67 | System expertise needed |
| 2 | REV-D001 | ADR drift detected | SYS-01:L145 | Review architecture changes |
| 3 | REV-R001 | Missing interface contract | SYS-01:L200 | Define API contract |

## Validation After Fix

| Metric | Before | After | Delta |
|--------|--------|-------|-------|
| Review Score | 85 | 94 | +9 |
| Errors | 4 | 0 | -4 |
| Warnings | 6 | 3 | -3 |

## Next Steps

1. Complete COMP_AuthService.md placeholder
2. Complete INT_UserAPI.md placeholder
3. Address remaining [TODO] placeholders
4. Review ADR drift and update system design if needed
5. Run `/doc-sys-reviewer SYS-01` to verify fixes

Integration with Autopilot

This skill is invoked by doc-sys-autopilot in the Review -> Fix cycle:

flowchart LR
    subgraph Phase5["Phase 5: Review & Fix Cycle"]
        A[doc-sys-reviewer] --> B{Score >= 90?}
        B -->|No| C[doc-sys-fixer]
        C --> D{Iteration < Max?}
        D -->|Yes| A
        D -->|No| E[Flag for Manual Review]
        B -->|Yes| F[PASS]
    end

Autopilot Integration Points:

PhaseActionSkill
Phase 5aRun initial reviewdoc-sys-reviewer
Phase 5bApply fixes if issues founddoc-sys-fixer
Phase 5cRe-run reviewdoc-sys-reviewer
Phase 5dRepeat until pass or max iterationsLoop

Error Handling

Recovery Actions

ErrorAction
Review report not foundPrompt to run doc-sys-reviewer first
Cannot create file (permissions)Log error, continue with other fixes
Cannot parse review reportAbort with clear error message
Max iterations exceededGenerate report, flag for manual review

Backup Strategy

Before applying any fixes:

  1. Create backup in tmp/backup/SYS-NN_YYYYMMDD_HHMMSS/
  2. Copy all SYS files to backup location
  3. Apply fixes to original files
  4. If error during fix, restore from backup

Related Skills

SkillRelationship
doc-sys-auditProvides preferred combined audit report input
doc-sys-reviewerProvides review report (input)
doc-sys-autopilotOrchestrates Review -> Fix cycle
doc-sys-validatorStructural validation
doc-namingElement ID standards
doc-sysSYS creation rules
doc-adrUpstream architecture decisions
doc-reqDownstream requirements reference

Version History

VersionDateChanges
2.22026-02-27Migrated frontmatter to metadata; corrected upstream report contract to use audit/review reports (.A_ preferred, .R_ legacy); normalized report location path to docs/06_SYS
2.12026-02-11Structure Compliance: Added Phase 0 for nested folder rule enforcement (REV-STR001-STR003); Runs FIRST before other fix phases
2.02026-02-10Enhanced Phase 6 with tiered auto-merge system (Tier 1: <5% auto-merge, Tier 2: 5-15% with changelog, Tier 3: >15% archive and regenerate); Added change percentage calculation; Auto-generated IDs for new elements (SYS.NN.xxxx pattern); No-deletion policy with [DEPRECATED] markers; Archive manifest creation; Enhanced drift cache with merge history; ADR upstream / REQ downstream integration
1.02026-02-10Initial skill creation; 6-phase fix workflow; SYS Index, Component, and Interface file creation; Element ID conversion (types 01, 05, 17, 18, 19, 20, 21); Broken link fixes; ADR upstream drift handling; Integration with autopilot Review->Fix cycle

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.

平台分布

Codex

38.65%
按下载量换算79

Claude

30.98%
按下载量换算63

Cursor

17.91%
按下载量换算37

Gemini CLI

8.69%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills