From aidoc-flow
Applies fixes to a BRD from the latest audit report — structure, links, element IDs, content, references, and upstream drift. Use in the audit-fix loop after doc-brd-audit reports issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aidoc-flow:doc-brd-fixerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read the latest audit report and apply fixes to a BRD, bridging
Read the latest audit report and apply fixes to a BRD, bridging
../doc-brd-audit/SKILL.md and a passing BRD so the audit↔fix cycle can
converge.
Layer: 1 (BRD quality improvement).
Upstream: the BRD document + BRD-NN.A_audit_report_vNNN.md.
Downstream: the fixed BRD + BRD-NN.F_fix_report_vNNN.md.
After doc-brd-audit returns FAIL, as part of an Audit → Fix → Audit loop.
Do not use without an audit report (run the audit first) or to create a new
BRD (use ../doc-brd/SKILL.md / ../doc-brd-autopilot/SKILL.md).
Consume the latest BRD-NN.A_audit_report_vNNN.md. Back up the BRD before
editing (tmp/backup/BRD-NN_<ts>/); on error, restore. Element-ID standards
come from framework/governance/ID_NAMING_STANDARDS.md; structure rules from
framework/layers/01_BRD/BRD-TEMPLATE.yaml and README.md.
Run in order; later phases assume the earlier ones succeeded.
| Phase | Scope | Representative actions |
|---|---|---|
| 0 — Structure | nested-folder rule | move BRD into docs/01_BRD/BRD-NN_{slug}/; rename folder to match ID; fix relative links after the move |
| 1 — Missing files | referenced-but-absent | create glossary / GAP / reference placeholders from templates |
| 2 — Links | broken/abs paths | recompute relative paths; convert absolute → relative |
| 3 — Element IDs | legacy/invalid IDs | re-derive BRD.NN.SS.xxxx (section number + content hash); drop legacy BRD.NN.xxxx, numeric type-codes, FR-XXX/BO-XXX prefixes |
| 4 — Content | placeholders, missing subsections | fill template dates; normalize MVP subsection headings in place; safe sibling renumbering; flag [TODO]/[TBD] for manual completion |
| 5 — References | traceability | add missing @ref: tags; fix cross-BRD paths; update the traceability matrix |
| 6 — Upstream | metadata + drift | fix deliverable_type/document_type/upstream_mode; when upstream_mode: "ref", apply tiered drift merge (below) |
Element ID re-derivation: key = "{doc_id}:{section_id}:{title}:{description}";
ID = BRD.{doc_id}.{section_id}.<first 4 hex of SHA256(key)> (extend to 8 on
collision). Document-level refs (SPEC-NN, ADR-NN, IPLAN-NN) stay in dash
form.
Tiered upstream drift (only when upstream_mode: "ref"): <5% change →
Tier 1 auto-merge (patch bump); 5–15% → Tier 2 auto-merge + detailed changelog
(minor bump); >15% → Tier 3 archive current + regenerate via autopilot (major
bump). Never delete upstream-removed content — mark [DEPRECATED] and retain
for traceability. Record results in .drift_cache.json.
Tag every applied fix and surface counts in the report:
| Confidence | Meaning |
|---|---|
auto-safe | deterministic, low semantic risk (link/path, header normalize, ID conversion) |
auto-assisted | template insertion with partial assumptions (scaffolded tables/subsections) |
manual-required | domain content cannot be inferred (unresolved TODO/TBD, strategy rationale) |
Write BRD-NN.F_fix_report_vNNN.md with: Summary (issues in / fixed /
remaining; files created / modified) · Fixes Applied (code, issue, fix,
file, confidence) · Manual-Review Queue · Validation After Fix
(score/errors/warnings before→after) · Cleanup Summary (delete superseded
fix reports) · Next Steps (re-run doc-brd-audit). Loop until score ≥
threshold or max iterations reached.
Before applying fixes, read the project adaptation profile
(.aidoc/profile.yaml). Honor section_toggles: do not reintroduce an
optional section the project has toggled off. Ignore any unknown or
out-of-surface key.
Authority: framework/governance/ADAPTATION.md.
../doc-brd-audit/SKILL.md · Create: ../doc-brd/SKILL.md../doc-brd-autopilot/SKILL.md · IDs: ../doc-naming/SKILL.mdframework/layers/01_BRD/BRD-TEMPLATE.yaml,
framework/governance/ID_NAMING_STANDARDS.mdnpx claudepluginhub vladm3105/aidoc-flow-framework --plugin aidoc-flowAudits a BRD with structural checks and content review, producing a combined report for the fixer skill. Use as a quality gate before PRD generation.
Refines brainstorm and plan documents by assessing clarity, completeness, specificity, YAGNI, and scope issues, then auto-fixes minor problems or proposes substantive changes before next workflow steps.
Reviews and refines brainstorm or planning documents before implementation. Identifies gaps, clarifies assumptions, and ensures the approach is sound.