Closed-Loop Requirement Drift Review
Use this skill to review proposed requirements against an implemented closed-loop audit baseline. The goal is to prevent new requirements from polluting existing loops, and to identify how the requirement should preserve or repair audited loop debt instead of adding another parallel path.
This is a companion skill, not an independent review. First use legacy-system-archaeology to establish implemented facts, then implemented-closed-loop-audit to score the current closed-loop design. Use this skill only after that audit baseline exists.
If no implemented closed-loop audit exists, do not proceed as a standalone PRD review. First run implemented-closed-loop-audit or ask for its output.
Evidence Boundary
Allowed inputs:
implemented-closed-loop-audit output as the baseline, especially source fact ledger, four-principle scorecard, implemented loop trace, drift audit, cross-check audit, identity/permission/approval continuity, debt ledger, and unknowns
legacy-system-archaeology output only as supporting evidence for implemented facts, not as the direct drift baseline
- PRD, requirement note, user story, meeting notes, workflow proposal
- target-state diagrams, field lists, screenshots, acceptance criteria
- existing implementation facts only when explicitly labeled
Existing baseline
Do not claim a proposed behavior is implemented. Use these tags:
Requirement: stated by the PRD or user
Existing baseline: current-system fact imported from the implemented closed-loop audit output
Inferred risk: likely drift or failure mode from the proposed design
Unknown: unanswered question requiring product, data, security, or ops decision
Repair recommendation: design constraint or change needed to preserve or restore the closed loop
Required Outputs
Always produce:
Reader Summary
Implemented Closed-Loop Audit Imported
Requirement Boundary
Existing Loop Preservation / Repair Scorecard
Source-of-Truth Impact Map
Loop Pollution and Drift Ledger
Closed-Loop Before / After Flow
Repair Plan and Acceptance Gates
Blocking Questions
Compliance Checklist
Artifact Delivery
For full requirement drift reviews, write the complete output to a Markdown file in the target project's docs/report area. Do not paste the full report into chat unless the user explicitly asks for inline output.
The report must start with a localized Reader Summary before detailed drift tables. Use the user's current conversation language unless the user explicitly requests another language. Do not default to English just because the baseline, PRD, code, or template headings are English.
The final chat response should include only:
- the report file link
- a one-sentence decision: proceed, proceed with required repairs, redesign, or blocked by unknowns
- 3 to 5 reader-facing bullets covering the top closed-loop pollution risk, what the requirement can repair, release-blocking acceptance gates, and the most important blocking questions
- verification performed
- remaining blocking questions
Do not make the final response a count of sections, rows, or commands. Counts may appear only as supporting verification after the practical decision is clear.
Reader Summary Standard
For full reviews, put Reader Summary at the top of the report unless scope/evidence metadata must appear first.
The summary must be understandable without reading the detailed drift ledger. Include:
Decision: proceed, proceed with required repairs, redesign, or blocked by unknowns
Top pollution risk: the most likely way the requirement could create duplicate truth or break an existing loop
Repair opportunity: which existing broken or partial loop the requirement can improve
Non-negotiable gates: the few acceptance gates that must pass before release
Blocking questions: the unanswered decisions that materially affect source of truth, identity, permission, approval, reporting, workflow, or operations
Translate section labels into the user's language when helpful, but keep exact status values and evidence tags unchanged.
Depth Gate
A full drift review must be decision-grade, not a chat summary with section headings. Before finalizing the Markdown artifact, verify that it includes enough detail for another agent to implement or reject the requirement without rerunning the review.
Minimum content for non-trivial requirements:
- at least 5 imported audit baseline rows, or every relevant baseline row if fewer exist
- at least 6 requirement-boundary rows covering actors, surfaces, objects, fields, writes/imports/exports, approvals, notifications, and explicit out-of-scope items as applicable
- all four principles scored with a concrete baseline state, requirement effect, status, and required repair
- at least 8 source-of-truth impact rows for data-heavy/accounting/audit/reporting requirements, or every affected business fact if fewer exist
- at least 8 drift-ledger rows spanning data, identity, permission, approval, report, workflow, and ops risks as applicable
- at least one Mermaid before/after diagram with typed edges and visible pollution/repair points
- at least 6 acceptance gates with evidence/test expectations and release-blocking status
- blocking questions separated from recommendations; do not hide unknowns inside prose
If the available evidence cannot support these counts, state insufficient evidence in the compliance checklist, list exactly what evidence is missing, and keep the report in Markdown. Do not replace the report with a short chat answer.
Workflow
0. Import the implemented closed-loop audit baseline
Before reading the new requirement deeply, extract from the implemented-closed-loop-audit output:
- compliant, partial, broken, and Unknown loops
- canonical source facts and source row keys
- reused downstream modules
- duplicate-entry and drift risks already present
- current cross-check and reconciliation results
- identity anchors and migration risks
- permission, data-scope, approval, and workflow topology
- existing unknowns that must not be hidden by the new requirement
This baseline is the reference point. The requirement is judged by how it affects this baseline.
1. Fix the requirement boundary
State:
- requirement name and scope
- actors and surfaces
- objects affected
- data fields affected
- proposed writes, imports, exports, reports, approvals, and notifications
- what is explicitly out of scope
2. Score preservation or repair of the sixteen-character principle
Evaluate each principle against the existing baseline, not in isolation:
就源输入: does the requirement reuse the existing authoritative source, create a new canonical source, or introduce duplicate/manual entry?
多次应用: does it reuse existing facts and source row keys, or create copied facts that downstream modules will treat as truth?
环环相扣: does it connect into the existing state chain, or create a side path that skips governed inputs and outputs?
相互稽核: does it add reconciliation against existing independent surfaces, or weaken existing checks?
Use status values:
preserves
repairs
pollutes
fragile
Unknown
3. Build the source-of-truth impact map
For each proposed business fact, identify:
- existing canonical owner
- proposed first capture/import surface
- whether the proposed fact reuses, supersedes, shadows, or duplicates existing state
- stable key
- derived/copy targets
- who may edit it
- which reports, exports, workflow tasks, and approvals reuse it
- what checks reconcile it
If the proposal lacks a canonical owner or stable key, mark it as a requirement defect. If it duplicates an existing source fact, mark it as closed-loop pollution unless the requirement includes a repair/cutover plan.
4. Build the loop pollution and drift ledger
Classify likely drift:
data-drift: same fact can diverge across tables, files, reports, or spreadsheets
semantic-drift: same field name has different meanings across modules
identity-drift: stable id, runtime id, display code, and external id are mixed
permission-drift: visibility or edit rights follow the wrong object/container after movement
approval-drift: reviewer, task, signature, or approval history no longer follows the business object
report-drift: exported/report totals cannot be traced back to source rows
workflow-drift: state machine skips gates, allows stale actions, or loses rollback/retry semantics
ops-drift: timers, queues, notifications, remote actions, or audit logs are not governed
Each drift row must include severity, baseline loop affected, trigger condition, affected object, likely symptom, and required repair.
5. Draw before / after closed-loop flow
Use Mermaid when supported. Edges must be labeled:
existing
source-input
reuse
derive
mutate
approve
export
reconcile
lock
notify
manual-risk
pollutes
repairs
If the proposal does not define a link, use a dashed edge labeled Unknown or omit it and list the gap.
Show both:
- existing baseline path from archaeology
- proposed new path and where it preserves, pollutes, or repairs the baseline
6. Define repair plan and acceptance gates
Acceptance must prove the requirement will not create uncontrolled drift and will repair targeted broken loops. Include gates for:
- source capture
- duplicate-entry prevention
- source-row traceability
- permission/approval route
- report/export reconciliation
- stale data handling
- audit log
- rollback or supersede behavior
- operational notification/cooldown if the feature notifies users or changes remote state
7. Keep baseline and proposal separate
Do not rewrite the archaeology or implemented audit report inside this skill. Cite baseline facts as Existing baseline, then evaluate requirement impact. Keep proposed facts tagged Requirement.
Output Template
Reader Summary
- Decision:
- Top pollution risk:
- Repair opportunity:
- Non-negotiable gates:
- Blocking questions:
Implemented Closed-Loop Audit Imported
| Baseline item |
Current audit status |
Evidence from implemented audit |
Impact relevance |
Requirement Boundary
Existing Loop Preservation / Repair Scorecard
| Principle | Baseline state | Requirement effect | Status | Required repair | Evidence/tag |
|---|---|---|---|---|
Source-of-Truth Impact Map
| Business fact |
Existing canonical owner |
Proposed input/change |
Effect on source of truth |
Stable key |
Reused by |
Reconciliation check |
Required repair |
Loop Pollution and Drift Ledger
| Drift type |
Severity |
Baseline loop affected |
Trigger condition |
Symptom |
Required repair |
Tag |
Closed-Loop Before / After Flow
flowchart LR
OldSource["Existing source"] -->|existing| OldLoop["Existing loop"]
Requirement["New requirement"] -->|source-input| Proposed["Proposed state"]
Proposed -->|pollutes| OldLoop
Proposed -->|repairs| RepairGate["Repair / reconciliation gate"]
RepairGate -->|lock| Accepted["Accepted closed-loop state"]
Repair Plan and Acceptance Gates
| Gate |
Baseline risk repaired |
What must be proven |
Test/evidence |
Blocks release if failed? |
Blocking Questions
- Unknowns that must be answered before design or implementation.
Compliance Checklist
| Requirement |
Status |
Notes |
| Localized Reader Summary present and reflected in final chat response |
|
|
| Implemented closed-loop audit baseline imported |
|
|
| Requirement boundary defined |
|
|
| Four principles scored against baseline |
|
|
| Source-of-truth impact map complete |
|
|
| Drift ledger includes data/identity/permission/approval/report/workflow risks as applicable |
|
|
| Before/after Mermaid flow has typed edges |
|
|
| Repair gates preserve or restore closed-loop behavior |
|
|
| Current implementation facts are labeled Existing baseline |
|
|
| Depth gate satisfied or evidence gap explicitly stated |
|
|
1---2name: closed-loop-requirement-drift3description: Use after implemented-closed-loop-audit has produced an implemented closed-loop audit baseline, when reviewing a specific new requirement, PRD, feature proposal, workflow change, or product design for whether it will pollute, preserve, or repair the existing "就源输入、多次应用、环环相扣、相互稽核" design.4---56# Closed-Loop Requirement Drift Review78Use this skill to review proposed requirements against an implemented closed-loop audit baseline. The goal is to prevent new requirements from polluting existing loops, and to identify how the requirement should preserve or repair audited loop debt instead of adding another parallel path.910This is a companion skill, not an independent review. First use `legacy-system-archaeology` to establish implemented facts, then `implemented-closed-loop-audit` to score the current closed-loop design. Use this skill only after that audit baseline exists.1112If no implemented closed-loop audit exists, do not proceed as a standalone PRD review. First run `implemented-closed-loop-audit` or ask for its output.1314## Evidence Boundary1516Allowed inputs:1718- `implemented-closed-loop-audit` output as the baseline, especially source fact ledger, four-principle scorecard, implemented loop trace, drift audit, cross-check audit, identity/permission/approval continuity, debt ledger, and unknowns19- `legacy-system-archaeology` output only as supporting evidence for implemented facts, not as the direct drift baseline20- PRD, requirement note, user story, meeting notes, workflow proposal21- target-state diagrams, field lists, screenshots, acceptance criteria22- existing implementation facts only when explicitly labeled `Existing baseline`2324Do not claim a proposed behavior is implemented. Use these tags:2526- `Requirement`: stated by the PRD or user27- `Existing baseline`: current-system fact imported from the implemented closed-loop audit output28- `Inferred risk`: likely drift or failure mode from the proposed design29- `Unknown`: unanswered question requiring product, data, security, or ops decision30- `Repair recommendation`: design constraint or change needed to preserve or restore the closed loop3132## Required Outputs3334Always produce:35360. `Reader Summary`371. `Implemented Closed-Loop Audit Imported`382. `Requirement Boundary`393. `Existing Loop Preservation / Repair Scorecard`404. `Source-of-Truth Impact Map`415. `Loop Pollution and Drift Ledger`426. `Closed-Loop Before / After Flow`437. `Repair Plan and Acceptance Gates`448. `Blocking Questions`459. `Compliance Checklist`4647## Artifact Delivery4849For full requirement drift reviews, write the complete output to a Markdown file in the target project's docs/report area. Do not paste the full report into chat unless the user explicitly asks for inline output.5051The report must start with a localized `Reader Summary` before detailed drift tables. Use the user's current conversation language unless the user explicitly requests another language. Do not default to English just because the baseline, PRD, code, or template headings are English.5253The final chat response should include only:5455- the report file link56- a one-sentence decision: proceed, proceed with required repairs, redesign, or blocked by unknowns57- 3 to 5 reader-facing bullets covering the top closed-loop pollution risk, what the requirement can repair, release-blocking acceptance gates, and the most important blocking questions58- verification performed59- remaining blocking questions6061Do not make the final response a count of sections, rows, or commands. Counts may appear only as supporting verification after the practical decision is clear.6263## Reader Summary Standard6465For full reviews, put `Reader Summary` at the top of the report unless scope/evidence metadata must appear first.6667The summary must be understandable without reading the detailed drift ledger. Include:6869- `Decision`: proceed, proceed with required repairs, redesign, or blocked by unknowns70- `Top pollution risk`: the most likely way the requirement could create duplicate truth or break an existing loop71- `Repair opportunity`: which existing broken or partial loop the requirement can improve72- `Non-negotiable gates`: the few acceptance gates that must pass before release73- `Blocking questions`: the unanswered decisions that materially affect source of truth, identity, permission, approval, reporting, workflow, or operations7475Translate section labels into the user's language when helpful, but keep exact status values and evidence tags unchanged.7677## Depth Gate7879A full drift review must be decision-grade, not a chat summary with section headings. Before finalizing the Markdown artifact, verify that it includes enough detail for another agent to implement or reject the requirement without rerunning the review.8081Minimum content for non-trivial requirements:8283- at least 5 imported audit baseline rows, or every relevant baseline row if fewer exist84- at least 6 requirement-boundary rows covering actors, surfaces, objects, fields, writes/imports/exports, approvals, notifications, and explicit out-of-scope items as applicable85- all four principles scored with a concrete baseline state, requirement effect, status, and required repair86- at least 8 source-of-truth impact rows for data-heavy/accounting/audit/reporting requirements, or every affected business fact if fewer exist87- at least 8 drift-ledger rows spanning data, identity, permission, approval, report, workflow, and ops risks as applicable88- at least one Mermaid before/after diagram with typed edges and visible pollution/repair points89- at least 6 acceptance gates with evidence/test expectations and release-blocking status90- blocking questions separated from recommendations; do not hide unknowns inside prose9192If the available evidence cannot support these counts, state `insufficient evidence` in the compliance checklist, list exactly what evidence is missing, and keep the report in Markdown. Do not replace the report with a short chat answer.9394## Workflow9596### 0. Import the implemented closed-loop audit baseline9798Before reading the new requirement deeply, extract from the `implemented-closed-loop-audit` output:99100- compliant, partial, broken, and Unknown loops101- canonical source facts and source row keys102- reused downstream modules103- duplicate-entry and drift risks already present104- current cross-check and reconciliation results105- identity anchors and migration risks106- permission, data-scope, approval, and workflow topology107- existing unknowns that must not be hidden by the new requirement108109This baseline is the reference point. The requirement is judged by how it affects this baseline.110111### 1. Fix the requirement boundary112113State:114115- requirement name and scope116- actors and surfaces117- objects affected118- data fields affected119- proposed writes, imports, exports, reports, approvals, and notifications120- what is explicitly out of scope121122### 2. Score preservation or repair of the sixteen-character principle123124Evaluate each principle against the existing baseline, not in isolation:125126- `就源输入`: does the requirement reuse the existing authoritative source, create a new canonical source, or introduce duplicate/manual entry?127- `多次应用`: does it reuse existing facts and source row keys, or create copied facts that downstream modules will treat as truth?128- `环环相扣`: does it connect into the existing state chain, or create a side path that skips governed inputs and outputs?129- `相互稽核`: does it add reconciliation against existing independent surfaces, or weaken existing checks?130131Use status values:132133- `preserves`134- `repairs`135- `pollutes`136- `fragile`137- `Unknown`138139### 3. Build the source-of-truth impact map140141For each proposed business fact, identify:142143- existing canonical owner144- proposed first capture/import surface145- whether the proposed fact reuses, supersedes, shadows, or duplicates existing state146- stable key147- derived/copy targets148- who may edit it149- which reports, exports, workflow tasks, and approvals reuse it150- what checks reconcile it151152If the proposal lacks a canonical owner or stable key, mark it as a requirement defect. If it duplicates an existing source fact, mark it as closed-loop pollution unless the requirement includes a repair/cutover plan.153154### 4. Build the loop pollution and drift ledger155156Classify likely drift:157158- `data-drift`: same fact can diverge across tables, files, reports, or spreadsheets159- `semantic-drift`: same field name has different meanings across modules160- `identity-drift`: stable id, runtime id, display code, and external id are mixed161- `permission-drift`: visibility or edit rights follow the wrong object/container after movement162- `approval-drift`: reviewer, task, signature, or approval history no longer follows the business object163- `report-drift`: exported/report totals cannot be traced back to source rows164- `workflow-drift`: state machine skips gates, allows stale actions, or loses rollback/retry semantics165- `ops-drift`: timers, queues, notifications, remote actions, or audit logs are not governed166167Each drift row must include severity, baseline loop affected, trigger condition, affected object, likely symptom, and required repair.168169### 5. Draw before / after closed-loop flow170171Use Mermaid when supported. Edges must be labeled:172173- `existing`174- `source-input`175- `reuse`176- `derive`177- `mutate`178- `approve`179- `export`180- `reconcile`181- `lock`182- `notify`183- `manual-risk`184- `pollutes`185- `repairs`186187If the proposal does not define a link, use a dashed edge labeled `Unknown` or omit it and list the gap.188189Show both:190191- existing baseline path from archaeology192- proposed new path and where it preserves, pollutes, or repairs the baseline193194### 6. Define repair plan and acceptance gates195196Acceptance must prove the requirement will not create uncontrolled drift and will repair targeted broken loops. Include gates for:197198- source capture199- duplicate-entry prevention200- source-row traceability201- permission/approval route202- report/export reconciliation203- stale data handling204- audit log205- rollback or supersede behavior206- operational notification/cooldown if the feature notifies users or changes remote state207208### 7. Keep baseline and proposal separate209210Do not rewrite the archaeology or implemented audit report inside this skill. Cite baseline facts as `Existing baseline`, then evaluate requirement impact. Keep proposed facts tagged `Requirement`.211212## Output Template213214### Reader Summary215216- Decision:217- Top pollution risk:218- Repair opportunity:219- Non-negotiable gates:220- Blocking questions:221222### Implemented Closed-Loop Audit Imported223224| Baseline item | Current audit status | Evidence from implemented audit | Impact relevance |225|---|---|---|---|226227### Requirement Boundary228229| Item | Value | Tag |230|---|---|---|231232### Existing Loop Preservation / Repair Scorecard233234| Principle | Baseline state | Requirement effect | Status | Required repair | Evidence/tag |235|---|---|---|---|---|236237### Source-of-Truth Impact Map238239| Business fact | Existing canonical owner | Proposed input/change | Effect on source of truth | Stable key | Reused by | Reconciliation check | Required repair |240|---|---|---|---|---|---|---|---|241242### Loop Pollution and Drift Ledger243244| Drift type | Severity | Baseline loop affected | Trigger condition | Symptom | Required repair | Tag |245|---|---|---|---|---|---|---|246247### Closed-Loop Before / After Flow248249```mermaid250flowchart LR251 OldSource["Existing source"] -->|existing| OldLoop["Existing loop"]252 Requirement["New requirement"] -->|source-input| Proposed["Proposed state"]253 Proposed -->|pollutes| OldLoop254 Proposed -->|repairs| RepairGate["Repair / reconciliation gate"]255 RepairGate -->|lock| Accepted["Accepted closed-loop state"]256```257258### Repair Plan and Acceptance Gates259260| Gate | Baseline risk repaired | What must be proven | Test/evidence | Blocks release if failed? |261|---|---|---|---|---|262263### Blocking Questions264265- Unknowns that must be answered before design or implementation.266267### Compliance Checklist268269| Requirement | Status | Notes |270|---|---|---|271| Localized Reader Summary present and reflected in final chat response | | |272| Implemented closed-loop audit baseline imported | | |273| Requirement boundary defined | | |274| Four principles scored against baseline | | |275| Source-of-truth impact map complete | | |276| Drift ledger includes data/identity/permission/approval/report/workflow risks as applicable | | |277| Before/after Mermaid flow has typed edges | | |278| Repair gates preserve or restore closed-loop behavior | | |279| Current implementation facts are labeled Existing baseline | | |280| Depth gate satisfied or evidence gap explicitly stated | | |