docs-requirement-sync
Drive implementation from requirement docs (REQ) and enforce compact change records (CR) for every implementation/commit. Use when developing a new requirement and keeping REQ, Backlog, Product, Roadm
SKILL.mdskills/docs-requirement-sync/SKILL.md
GitHubDocs Requirement Sync
Use this skill when implementing a requirement from docs/product/requirements/REQ-*.md.
Run commands from repository root:
E:\coding\TermLink
Workflow
- Validate the REQ before coding:
powershell -ExecutionPolicy Bypass -File ./skills/docs-requirement-sync/scripts/validate-req.ps1 -ReqPath ./docs/product/requirements/REQ-YYYYMMDD-slug.md -Strict
- Locate the linked implementation plan before coding when the REQ points to a
docs/product/plans/PLAN-*.mddocument.
- If a plan exists, lock the exact phase / checklist slice for the current batch before coding.
- If no plan exists, state that explicitly in the working notes and fall back to
REQ + CRsync only.
- Create a draft change record (CR) before or during implementation:
powershell -ExecutionPolicy Bypass -File ./skills/docs-requirement-sync/scripts/new-change-record.ps1 -ReqId REQ-YYYYMMDD-slug -Slug short-topic
Implement the selected batch.
After implementation, update documentation in the same turn:
PLAN: mark which exact phase / checklist / task items are nowdone,in_progress, or stillpending.CR: record the same implementation slice and add an explicit statement such as本批覆盖计划项:....REQ / Backlog / Product / Roadmap / Changelog: update only when the batch changes requirement status, mainline scope, or project-level summary.
- If a plan exists, prefer writing progress back to an existing status/progress section.
- If no suitable section exists, add a compact progress block near the top or near the implementation checklist.
- Only mark items completed by the current batch. Do not silently reclassify unrelated work.
After implementation, update the CR to
activeand setcommit_refwhen there is a real commit. Draft status is allowed before commit.Validate CR format:
powershell -ExecutionPolicy Bypass -File ./skills/docs-requirement-sync/scripts/validate-change-record.ps1 -RecordPath ./docs/changes/records/CR-YYYYMMDD-HHMM-short-topic.md -Strict
- Check full doc sync before marking requirement done:
powershell -ExecutionPolicy Bypass -File ./skills/docs-requirement-sync/scripts/check-doc-sync.ps1 -ReqId REQ-YYYYMMDD-slug
- In the final user-facing closeout, explicitly state:
- which part of the plan was implemented in this batch,
- which docs were updated in the same turn.
Mandatory Rules
- One implementation/commit must have one CR file.
- CR must include
req_id + commit_reffor traceability. - Requirement status cannot move to
doneunless there is at least oneactiveCR. - Every implementation batch must update documentation in the same turn.
- Minimum doc sync for a batch with a linked plan is
PLAN + CR; broader mainline docs are required when status or summary scope changes. CHANGELOG_PROJECT.mdis summary only. Detailed rollback/restore info lives in CR files.- If a plan exists, the
PLANdocument, theCR, and the final assistant response must agree on which plan items were implemented. - If no plan exists, say so explicitly and fall back to
REQ + CRsync without pretending plan coverage was recorded.
Closeout Format
Use two short lines or one short paragraph covering both points:
Implemented plan coverage: ...Updated docs: ...
References
docs/changes/records/TEMPLATE_CHANGE_RECORD.mddocs/changes/records/INDEX.mddocs/product/requirements/REQ-TEMPLATE.md