clayers-review-artifacts
Review and improve artifact mappings for end-to-end coverage between specification and code. Analyzes both directions (spec-to-code and code-to-spec), identifies gaps, improves mapping granularity, re
SKILL.md.claude/skills/clayers-review-artifacts/SKILL.md
GitHubClayers Review Artifacts
Review and improve the quality of main's specification.
Establish Baseline
Before starting, record current metrics:
clayers artifact --coverage clayers/main/
clayers artifact --drift clayers/main/
clayers connectivity clayers/main/
clayers validate clayers/main/
Record: total nodes, mapped, exempt, unmapped, drifted, isolated.
Discover Review and Catch-Up Modes
Query the spec for layers with review modes:
clayers query '//lyr:mode[@name="review"]' clayers/main/
And for catch-up modes (needed if drift was detected):
clayers query '//lyr:mode[@name="catch-up"]' clayers/main/
Execute Catch-Up Modes First
If the baseline detected drift, execute catch-up modes for the relevant layers. Each catch-up mode body contains detailed guidance for handling its specific drift type (ARTIFACT DRIFTED, SPEC DRIFTED, UNAVAILABLE).
For each drifted layer:
- Read the catch-up mode guidance (the
pr:sectionbody) - Follow the drift-resolution steps
- Run
clayers artifact --fix-node-hashand--fix-artifact-hashas directed - Verify:
clayers artifact --drift clayers/main/
Execute Review Modes
For each layer with a review mode:
- Read the mode body (
pr:sectionwith detailed guidance) - Follow the review steps (coverage checks, quality audits, etc.)
- Verify
lyr:acceptancecriteria are met
The artifact layer's review mode covers: spec-to-code coverage, code-to-spec coverage, exemption audit, and mapping quality. The relation layer's review mode covers connectivity.
Final Verification
Re-run all quality checks and report improvement:
clayers artifact --coverage clayers/main/
clayers artifact --drift clayers/main/
clayers connectivity clayers/main/
clayers validate clayers/main/
Report deltas:
- Coverage: unmapped before vs. after
- Drift: drifted before vs. after
- Connectivity: isolated before vs. after