Story Statement
As a maintainer of the Pair knowledge base
I want the mirror-equality guard to assert every root skill artifact (not just each skill's SKILL.md)
So that a hand-edit to any root sub-doc or references/* that should be regenerated by pair update is caught in CI, not silently drifted.
Epic Context
Parent Epic: KB / mirror integrity (Integration & Process Standardization bounded context)
Status: Todo
Priority: P2 (Could-Have)
User Value
User Benefit: Complete drift protection for the root skills mirror — no artifact can silently diverge from its dataset source.
Business Impact: Extends the per-SKILL.md invariant delivered by #352 to full per-skill artifact coverage, closing the residual scope gap.
Context / Origin
Follow-up from PR #377 (#352) review. #352's guard (packages/knowledge-hub/src/tools/skill-md-mirror.ts) deliberately asserts mirror-equality only for each skill's SKILL.md. Other artifacts under a skill dir that flow through the same pair update transform — sub-docs (e.g. process-review's merge-and-cascade.md, degradation-levels.md, post-review-merge.md) and references/* — are copied and rewritten by the pipeline but are not asserted, so a hand-edit to a root sub-doc drifts undetected.
This is a broader, distinct guard: multiple files per skill and a different assertion surface (directory-tree equality rather than a single named file), large enough to warrant its own story rather than being folded into #352.
Rough Sizing
Story Points: M(3)
Confidence: Medium
Reasoning: Reuses the existing real-pipeline composition; new work is enumerating all transformed artifacts per skill and asserting tree-level equality.
Acceptance Criteria (draft)
Story Statement
As a maintainer of the Pair knowledge base
I want the mirror-equality guard to assert every root skill artifact (not just each skill's
SKILL.md)So that a hand-edit to any root sub-doc or
references/*that should be regenerated bypair updateis caught in CI, not silently drifted.Epic Context
Parent Epic: KB / mirror integrity (Integration & Process Standardization bounded context)
Status: Todo
Priority: P2 (Could-Have)
User Value
User Benefit: Complete drift protection for the root skills mirror — no artifact can silently diverge from its dataset source.
Business Impact: Extends the per-
SKILL.mdinvariant delivered by #352 to full per-skill artifact coverage, closing the residual scope gap.Context / Origin
Follow-up from PR #377 (#352) review. #352's guard (
packages/knowledge-hub/src/tools/skill-md-mirror.ts) deliberately asserts mirror-equality only for each skill'sSKILL.md. Other artifacts under a skill dir that flow through the samepair updatetransform — sub-docs (e.g. process-review'smerge-and-cascade.md,degradation-levels.md,post-review-merge.md) andreferences/*— are copied and rewritten by the pipeline but are not asserted, so a hand-edit to a root sub-doc drifts undetected.This is a broader, distinct guard: multiple files per skill and a different assertion surface (directory-tree equality rather than a single named file), large enough to warrant its own story rather than being folded into #352.
Rough Sizing
Story Points: M(3)
Confidence: Medium
Reasoning: Reuses the existing real-pipeline composition; new work is enumerating all transformed artifacts per skill and asserting tree-level equality.
Acceptance Criteria (draft)
SKILL.mdartifact a skill dir contributes through thepair updateskills-registry transform (sub-docs +references/*).