Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

doc-adr-fixer文档地址修复程序

Agent Skill

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

总安装

612

周安装

25

GitHub Stars

14

下载量

196
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

根据审计或审阅报告自动修复 ADR 文档中的问题。

  • 适用于 ADR 质量提升循环,衔接审计与修正环节。
  • 读取最新报告并应用针对性修改,支持行为对齐与主题一致性检查。
  • 需配合 doc-adr-audit 或 doc-adr-reviewer 使用,仅限指定宿主运行。
  • doc-adr-fixer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-adr-fixer

Purpose

Automated fix skill that reads the latest audit/review report and applies fixes to ADR (Architecture Decision Record) documents. This skill bridges the gap between doc-adr-reviewer/doc-adr-audit (which identify issues) and the corrected ADR, enabling iterative improvement cycles.

Layer: 5 (ADR Quality Improvement)

Upstream: ADR document, Audit/Review Report (ADR-NN.A_audit_report_vNNN.md preferred, ADR-NN.R_review_report_vNNN.md legacy), BDD (for behavior alignment), BRD (for topic alignment)

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


When to Use This Skill

Use doc-adr-fixer when:

  • After Review: Run after doc-adr-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 ADRs based on review reports

Do NOT use when:

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

Skill Dependencies

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

Workflow Overview

flowchart TD
  A[Input: ADR Path] --> B[Find Latest Audit/Review Report]
  B --> C{Report Found?}
  C -->|No| D[Run doc-adr-audit or doc-adr-reviewer First]
  C -->|Yes| E[Parse 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 ADR]
    L --> M[Generate Fix Report]
    M --> N{Re-run Review?}
    N -->|Yes| O[Invoke doc-adr-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 ADR documents that are not in nested folders. This phase runs FIRST because all subsequent phases depend on correct folder structure.

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

Required Structure:

ADR TypeRequired Location
Monolithicdocs/05_ADR/ADR-NN_{slug}/ADR-NN_{slug}.md

Fix Actions:

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

Structure Fix Workflow:

def fix_adr_structure(adr_path: str) -> list[Fix]:
    """Fix ADR structure violations."""
    fixes = []

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

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

    adr_id = match.group(1)
    slug = match.group(2)
    expected_folder = f"ADR-{adr_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(adr_path, new_path)
        fixes.append(f"Moved {adr_path} to {new_path}")

        # Update upstream links in moved file
        content = Path(new_path).read_text()
        updated_content = content.replace('../04_BDD/', '../../04_BDD/')
        updated_content = updated_content.replace('../03_EARS/', '../../03_EARS/')
        updated_content = updated_content.replace('../01_BRD/', '../../01_BRD/')
        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
../04_BDD/BDD-01_slug/BDD-01.md../../04_BDD/BDD-01_slug/BDD-01.md
../01_BRD/BRD-01_slug/BRD-01.md../../01_BRD/BRD-01_slug/BRD-01.md

Phase 1: Create Missing Files

Creates files that are referenced but don't exist.

Scope:

Missing FileActionTemplate Used
ADR-00_INDEX.mdCreate ADR indexIndex template
ARCH_*.mdCreate placeholder architecture docARCH template
Reference docs (*_REF_*.md)Create placeholderREF template

ADR Index Template:

---
title: "ADR-00: Architecture Decision Records Index"
tags:
  - adr
  - index
  - reference
custom_fields:
  document_type: index
  artifact_type: ADR-REFERENCE
  layer: 5
---

# ADR-00: Architecture Decision Records Index

Master index of all Architecture Decision Records for this project.

## Active Decisions

| ADR ID | Title | Status | Date | Impact |
|--------|-------|--------|------|--------|
| ADR-01 | [Title] | Accepted | YYYY-MM-DD | High/Medium/Low |

## Superseded Decisions

| ADR ID | Title | Superseded By | Date |
|--------|-------|---------------|------|
| [None] | | | |

## Decision Categories

| Category | ADR IDs | Description |
|----------|---------|-------------|
| Infrastructure | | Infrastructure-related decisions |
| Security | | Security architecture decisions |
| Integration | | External integration decisions |
| Data | | Data management decisions |

---

*Maintained by doc-adr-fixer. Update when adding new ADRs.*

Architecture Placeholder Template:

---
title: "Architecture Document: [Component Name]"
tags:
  - architecture
  - reference
custom_fields:
  document_type: architecture
  status: placeholder
  created_by: doc-adr-fixer
---

# Architecture Document: [Component Name]

> **Status**: Placeholder - Requires completion

## 1. Overview

[TODO: Document architecture overview]

## 2. Components

| Component | Description | Responsibility |
|-----------|-------------|----------------|
| [Name] | [Description] | [What it does] |

## 3. Interfaces

[TODO: Document component interfaces]

## 4. Design Decisions

[TODO: Link to relevant ADRs]

---

*Created by doc-adr-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 BDD traceability linkAdd link to corresponding BDD scenario

Path Resolution Logic:

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

    # Monolithic ADR: docs/05_ADR/ADR-01.md
    # Sectioned ADR: docs/05_ADR/ADR-01_slug/ADR-01.3_section.md

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

Cross-Layer Link Fix:

SourceTargetLink Pattern
ADRBDD../04_BDD/BDD-NN.feature
ADRBRD../01_BRD/BRD-NN.md
ADRSYS../06_SYS/SYS-NN.md

Phase 3: Fix Element IDs

Converts invalid element IDs to correct format.

Conversion Rules:

PatternIssueConversion
ADR.NN.01.SSCode 01 invalid for ADRADR.NN.13.SS (Decision Context)
DEC-XXXLegacy patternADR.NN.14.SS
OPT-XXXLegacy patternADR.NN.15.SS
CON-XXXLegacy patternADR.NN.16.SS

Type Code Mapping (ADR-specific valid codes: 13, 14, 15, 16):

CodeElement TypeDescription
13Decision ContextBackground and problem statement
14Decision StatementThe actual decision made
15Option ConsideredAlternative options evaluated
16ConsequenceImplications of the decision

Invalid Code Conversions:

Invalid CodeValid CodeElement Type
0113Decision Context (was Functional Requirement)
0514Decision Statement (was Use Case)
0616Consequence (was Acceptance Criteria)

Regex Patterns:

# Find element IDs with invalid type codes for ADR
invalid_adr_type_01 = r'ADR\.(\d{2})\.01\.(\d{2})'
replacement_01 = r'ADR.\1.13.\2'

invalid_adr_type_05 = r'ADR\.(\d{2})\.05\.(\d{2})'
replacement_05 = r'ADR.\1.14.\2'

# Find legacy patterns
legacy_dec = r'###\s+DEC-(\d+):'
legacy_opt = r'###\s+OPT-(\d+):'
legacy_con = r'###\s+CON-(\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 decision statusAdd "Proposed" 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]': 'Proposed',
}

ADR-Specific Content Fixes:

SectionMissing ContentAuto-Fill
StatusEmpty"Proposed"
Decision DateEmptyCurrent date
DecidersEmpty"[Pending assignment]"

Phase 5: Update References

Ensures traceability and cross-references are correct.

Fix Actions:

IssueFix Action
Missing @ref: for created filesAdd reference tag
Incorrect cross-ADR pathUpdate to correct relative path
Missing BDD traceabilityAdd @trace: BDD-NN.SS tag
Missing BRD alignmentAdd @trace: BRD-NN.SS tag

Traceability Matrix Update:

## Traceability

| ADR Element | Traces To | Type |
|-------------|-----------|------|
| ADR.01.1401 | BDD.01.0903 | Behavior Implementation |
| ADR.01.1301 | BRD.01.2205 | Business Context |

Phase 6: Handle Upstream Drift (Auto-Merge)

Addresses issues where upstream source documents (BDD) have changed since ADR creation. Implements tiered auto-merge with version management.

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/Downstream Context:

DirectionLayerArtifactRelationship
Upstream4BDDProvides behavior specifications that drive decisions
Current5ADRArchitecture Decision Records
Downstream6SYSSystem design implementing decisions

ADR ID Pattern: ADR-NN-SS where:

  • NN = Module number (01-99)
  • SS = Sequence number within module (01-99)
  • Example: ADR-01-15 = Module 01, Decision 15

Tiered Auto-Merge System

Change Percentage Calculation:

def calculate_drift_percentage(current_hash: str, upstream_hash: str,
                                current_content: str, upstream_content: str) -> float:
    """Calculate percentage of content change between versions."""
    if current_hash == upstream_hash:
        return 0.0

    # Line-based diff calculation
    current_lines = set(current_content.strip().split('\n'))
    upstream_lines = set(upstream_content.strip().split('\n'))

    added = upstream_lines - current_lines
    removed = current_lines - upstream_lines
    total_changes = len(added) + len(removed)
    total_lines = max(len(current_lines), len(upstream_lines), 1)

    return (total_changes / total_lines) * 100

Tier Definitions:

TierChange %ActionVersion IncrementHuman Review
Tier 1< 5%Auto-merge decision updatesPatch (x.x.+1)No
Tier 25-15%Auto-merge with changelogMinor (x.+1.0)No
Tier 3> 15%Archive + regenerateMajor (+1.0.0)Yes

Tier 1: Minor Updates (< 5% change)

Trigger: Small upstream modifications (typos, clarifications, minor additions)

Auto-Merge Actions:

  1. Update affected @ref: tags with new upstream version
  2. Refresh decision context if wording changed
  3. Increment ADR patch version (e.g., 1.0.0 -> 1.0.1)
  4. Log change in drift cache

Example Tier 1 Fix:

<!-- Before -->
@ref: BDD-01.09.03 (v1.2.0)

<!-- After (auto-merged) -->
@ref: BDD-01.09.03 (v1.2.1)
<!-- Tier 1 auto-merge: Minor upstream update (2.3% change) - 2026-02-10 -->

Tier 2: Moderate Updates (5-15% change)

Trigger: Meaningful upstream changes (new scenarios, modified behaviors)

Auto-Merge Actions:

  1. Apply all Tier 1 actions
  2. Generate detailed changelog section
  3. Update decision rationale if affected
  4. Mark decisions as needing review with [REVIEW-SUGGESTED]
  5. Increment ADR minor version (e.g., 1.0.1 -> 1.1.0)
  6. Add changelog block to ADR

Changelog Block Format:

## Upstream Change Log

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

**Source**: BDD-01.feature (v1.3.0)
**Change Percentage**: 8.7%
**Auto-Merge Tier**: 2

| Change Type | Description | ADR Impact |
|-------------|-------------|------------|
| Added | Scenario: Error handling for timeout | Decision ADR-01-03 context updated |
| Modified | Scenario: Authentication flow steps | Decision ADR-01-01 rationale refreshed |
| Removed | None | N/A |

**Decisions Flagged for Review**:
- ADR-01-03 [REVIEW-SUGGESTED]: New error handling scenario may affect retry strategy

Tier 3: Major Updates (> 15% change)

Trigger: Substantial upstream restructuring or new requirements

Actions (Requires Human Review):

  1. Archive current ADR version (no deletion)
  2. Create archive manifest
  3. Mark all decisions as [SUPERSEDED] (not deleted)
  4. Trigger regeneration workflow
  5. Increment major version (e.g., 1.1.0 -> 2.0.0)
  6. Generate new ADR with fresh decision IDs

No Deletion Policy:

Decisions are NEVER deleted. Instead, they are marked as superseded:

### ADR-01-05: Authentication Token Strategy [SUPERSEDED]

> **Superseded by**: ADR-01-15 (v2.0.0)
> **Superseded date**: 2026-02-10
> **Reason**: Upstream BDD restructured authentication flow

**Original Decision** (preserved for audit):
...

Archive Manifest Format (ADR-NN_archive_manifest.json):

{
  "archive_version": "1.0",
  "archive_date": "2026-02-10T16:00:00",
  "archived_adr": "ADR-01",
  "archived_version": "1.1.0",
  "new_version": "2.0.0",
  "trigger": {
    "type": "tier_3_drift",
    "upstream_document": "BDD-01.feature",
    "change_percentage": 23.5,
    "upstream_version_before": "1.2.0",
    "upstream_version_after": "2.0.0"
  },
  "superseded_decisions": [
    {
      "id": "ADR-01-05",
      "title": "Authentication Token Strategy",
      "superseded_by": "ADR-01-15",
      "reason": "Upstream BDD restructured authentication flow"
    },
    {
      "id": "ADR-01-07",
      "title": "Session Management Approach",
      "superseded_by": "ADR-01-16",
      "reason": "New session requirements in BDD"
    }
  ],
  "preserved_decisions": [
    {
      "id": "ADR-01-01",
      "title": "Database Selection",
      "status": "unchanged",
      "carried_forward_as": "ADR-01-01"
    }
  ],
  "archive_location": "docs/05_ADR/archive/ADR-01_v1.1.0/"
}

Enhanced Drift Cache

Updated .drift_cache.json Structure:

{
  "cache_version": "2.0",
  "adr_id": "ADR-01",
  "adr_version": "1.1.0",
  "adr_updated": "2026-02-10T16:00:00",
  "drift_reviewed": "2026-02-10T16:00:00",
  "upstream_tracking": {
    "BDD": {
      "document": "../../04_BDD/BDD-01.feature",
      "tracked_version": "1.3.0",
      "content_hash": "a1b2c3d4e5f6...",
      "last_sync": "2026-02-10T16:00:00"
    }
  },
  "downstream_tracking": {
    "SYS": {
      "document": "../../06_SYS/SYS-01.md",
      "notified_version": "1.1.0",
      "notification_date": "2026-02-10T16:00:00"
    }
  },
  "merge_history": [
    {
      "date": "2026-02-10T16:00:00",
      "tier": 2,
      "change_percentage": 8.7,
      "upstream_document": "BDD-01.feature",
      "version_before": "1.0.1",
      "version_after": "1.1.0",
      "decisions_updated": ["ADR-01-01", "ADR-01-03"],
      "decisions_flagged": ["ADR-01-03"],
      "auto_merged": true
    },
    {
      "date": "2026-02-08T10:00:00",
      "tier": 1,
      "change_percentage": 2.3,
      "upstream_document": "BDD-01.feature",
      "version_before": "1.0.0",
      "version_after": "1.0.1",
      "decisions_updated": ["ADR-01-02"],
      "decisions_flagged": [],
      "auto_merged": true
    }
  ],
  "acknowledged_drift": [
    {
      "document": "BDD-01.feature",
      "acknowledged_date": "2026-02-07",
      "acknowledged_version": "1.1.5",
      "reason": "Reviewed - documentation-only changes, no ADR impact"
    }
  ]
}

Auto-Merge Decision Flow

flowchart TD
    A[Detect Upstream Drift] --> B[Calculate Change %]
    B --> C{Change < 5%?}

    C -->|Yes| D[Tier 1: Auto-Merge]
    D --> D1[Update @ref tags]
    D1 --> D2[Increment patch version]
    D2 --> D3[Log to drift cache]
    D3 --> Z[Complete]

    C -->|No| E{Change 5-15%?}

    E -->|Yes| F[Tier 2: Auto-Merge + Changelog]
    F --> F1[Apply Tier 1 actions]
    F1 --> F2[Generate changelog block]
    F2 --> F3[Mark REVIEW-SUGGESTED]
    F3 --> F4[Increment minor version]
    F4 --> F5[Log to merge history]
    F5 --> Z

    E -->|No| G[Tier 3: Archive + Regenerate]
    G --> G1[Create archive manifest]
    G1 --> G2[Archive current version]
    G2 --> G3[Mark decisions SUPERSEDED]
    G3 --> G4[Increment major version]
    G4 --> G5[Trigger regeneration]
    G5 --> G6[Notify downstream SYS]
    G6 --> H[Human Review Required]

Downstream Notification

When ADR changes (any tier), notify downstream SYS documents:

<!-- Downstream notification added to SYS-01.md -->
<!-- ADR-DRIFT-NOTIFICATION: ADR-01 updated to v1.1.0 (2026-02-10) -->
<!-- Tier 2 merge: 8.7% upstream change from BDD-01.feature -->
<!-- Decisions potentially affecting this SYS: ADR-01-01, ADR-01-03 -->
<!-- Review recommended for: Section 4 (Authentication Design) -->

Command Options for Phase 6

OptionDefaultDescription
--auto-mergetrueEnable tiered auto-merge system
--merge-tier-overridenoneForce specific tier (1, 2, or 3)
--skip-archivefalseSkip archiving for Tier 3 (not recommended)
--notify-downstreamtrueSend notifications to SYS documents
--generate-changelogtrueGenerate changelog for Tier 2+
--preserve-supersededtrueKeep superseded decisions (required)

Command Usage

Basic Usage

# Fix ADR based on latest review
/doc-adr-fixer ADR-01

# Fix with explicit review report (legacy)
/doc-adr-fixer ADR-01 --review-report ADR-01.R_review_report_v001.md

# Fix with explicit audit report (preferred)
/doc-adr-fixer ADR-01 --review-report ADR-01.A_audit_report_v001.md

# Fix and re-run review
/doc-adr-fixer ADR-01 --revalidate

# Fix with iteration limit
/doc-adr-fixer ADR-01 --revalidate --max-iterations 3

Options

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

Report Selection Precedence:

  1. Select latest report by timestamp.
  2. If timestamps are equal, prefer ADR-NN.A_audit_report_vNNN.md over ADR-NN.R_review_report_vNNN.md.

Fix Types

TypeDescription
missing_filesCreate missing index, architecture 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 ADRs use nested folders (ADR-NN_{slug}/) regardless of size. Fix reports are stored alongside the ADR document in the nested folder.

File Naming: ADR-NN.F_fix_report_vNNN.md

Location: Inside the ADR nested folder: docs/05_ADR/ADR-NN_{slug}/

Structure:

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

# ADR-NN Fix Report v001

## Summary

| Metric | Value |
|--------|-------|
| Source Review | ADR-NN.A_audit_report_v001.md (or legacy `ADR-NN.R_review_report_v001.md`) |
| Issues in Review | 12 |
| Issues Fixed | 10 |
| Issues Remaining | 2 (manual review required) |
| Files Created | 2 |
| Files Modified | 3 |

## Files Created

| File | Type | Location |
|------|------|----------|
| ADR-00_INDEX.md | ADR Index | docs/05_ADR/ |
| ARCH_Authentication.md | Arch Placeholder | docs/00_REF/architecture/ |

## Fixes Applied

| # | Issue Code | Issue | Fix Applied | File |
|---|------------|-------|-------------|------|
| 1 | REV-L001 | Broken index link | Created ADR-00_INDEX.md | ADR-01.md |
| 2 | REV-L001 | Broken arch link | Created placeholder ARCH file | ADR-01.md |
| 3 | REV-N004 | Element type 01 invalid | Converted to type 13 | ADR-01.md |
| 4 | REV-L003 | Absolute path used | Converted to relative | ADR-02.md |

## Issues Requiring Manual Review

| # | Issue Code | Issue | Location | Reason |
|---|------------|-------|----------|--------|
| 1 | REV-P001 | [TODO] placeholder | ADR-01:L45 | Architecture expertise needed |
| 2 | REV-D001 | BDD drift detected | ADR-01:L120 | Review behavior changes |

## Validation After Fix

| Metric | Before | After | Delta |
|--------|--------|-------|-------|
| Review Score | 88 | 95 | +7 |
| Errors | 3 | 0 | -3 |
| Warnings | 5 | 2 | -3 |

## Next Steps

1. Complete ARCH_Authentication.md placeholder
2. Address remaining [TODO] placeholders
3. Review BDD drift and update decision if needed
4. Run `/doc-adr-reviewer ADR-01` to verify fixes

Integration with Autopilot

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

flowchart LR
    subgraph Phase5["Phase 5: Review & Fix Cycle"]
        A[doc-adr-reviewer] --> B{Score >= 90?}
        B -->|No| C[doc-adr-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-adr-reviewer
Phase 5bApply fixes if issues founddoc-adr-fixer
Phase 5cRe-run reviewdoc-adr-reviewer
Phase 5dRepeat until pass or max iterationsLoop

Error Handling

Recovery Actions

ErrorAction
Audit/review report not foundPrompt to run doc-adr-audit or doc-adr-reviewer first
Cannot create file (permissions)Log error, continue with other fixes
Cannot parse audit/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/ADR-NN_YYYYMMDD_HHMMSS/
  2. Copy all ADR files to backup location
  3. Apply fixes to original files
  4. If error during fix, restore from backup

Related Skills

SkillRelationship
doc-adr-auditPreferred combined audit source (input)
doc-adr-reviewerProvides review report (input)
doc-adr-autopilotOrchestrates Review -> Fix cycle
doc-adr-validatorStructural validation
doc-namingElement ID standards
doc-adrADR creation rules
doc-bddUpstream behavior reference
doc-brdUpstream business context

Version History

VersionDateChanges
2.32026-02-27Migrated frontmatter to metadata; added compatibility for ADR-NN.A_audit_report_vNNN.md (preferred) with legacy ADR-NN.R_review_report_vNNN.md; defined deterministic precedence (latest timestamp, then .A_ over .R_ on ties); corrected nested-folder report path examples to docs/05_ADR
2.22026-02-26Aligned with ADR-MVP-TEMPLATE.md v1.1 (11-section MVP structure)
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; Three-tier thresholds (Tier 1 <5%, Tier 2 5-15%, Tier 3 >15%); No deletion policy - superseded decisions preserved; Archive manifest for Tier 3; Enhanced drift cache with merge history; Auto-generated ADR IDs (ADR-NN-SS pattern); Downstream SYS notification; Change percentage calculation
1.02026-02-10Initial skill creation; 6-phase fix workflow; ADR Index and Architecture file creation; Element ID conversion (types 13, 14, 15, 16); Broken link fixes; BDD/BRD 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.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.89%
按下载量换算72

Claude

27.33%
按下载量换算54

Cursor

18.41%
按下载量换算36

Gemini CLI

8.45%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills