From auto-claude-skills
Spec drift detection, assumption surfacing, and coverage gap identification against Intent Truth
npx claudepluginhub damianpapadopoulos/auto-claude-skillsThis skill uses the workspace's default tool permissions.
Detect spec drift, surface unvalidated assumptions, and identify coverage gaps by comparing the current implementation against its Intent Truth (specs, plans, eval packs).
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Detect spec drift, surface unvalidated assumptions, and identify coverage gaps by comparing the current implementation against its Intent Truth (specs, plans, eval packs).
openspec/changes/<feature>/specs/ (active OpenSpec change)docs/plans/*-design.md, docs/plans/*-plan.md, docs/plans/*-spec.md (canonical live intent)openspec/specs/<capability>/spec.md (post-ship canonical)docs/superpowers/specs/*-design.md, docs/superpowers/plans/*.md (legacy fallback)tests/fixtures/evals/*.json (eval pack scenarios)The hook enforces an artifact-presence gate mechanically before this skill is emitted into the composition chain. This is a cheap filesystem glob check (~5ms) in the post-jq Bash filter. If no artifacts match, the composition entry is suppressed -- the LLM never sees it.
Glob patterns checked (canonical first, legacy fallback):
openspec/changes/*/ (any active OpenSpec change)docs/plans/*-design.md (canonical design artifact)docs/plans/*-plan.md (canonical plan artifact)docs/plans/*-spec.md (canonical spec artifact)openspec/specs/*/spec.md (any canonical spec)docs/superpowers/specs/*-design.md (legacy design spec)docs/superpowers/plans/*.md (legacy plan)tests/fixtures/evals/*.json (any eval pack)Mode selection is LLM-evaluated. When the hook emits the entry (artifacts exist), this SKILL.md guides mode selection:
Read in priority order using canonical retrieval precedence. Stop reading duplicates -- if a source was already consumed at a higher priority level, skip it.
openspec/changes/<feature>/specs/
Active work-in-progress specs from OpenSpec. These represent the most current intent and override all other sources when present.
docs/plans/*-design.md
docs/plans/*-plan.md
docs/plans/*-spec.md
The canonical location for live design documents, implementation plans, and specifications. These are the primary Intent Truth for features that have not yet shipped.
openspec/specs/<capability>/spec.md
Post-ship authoritative specifications. These represent the as-built state of shipped capabilities and serve as the baseline for incremental work.
docs/plans/archive/
Shipped intent history. Not required for drift analysis, but useful for understanding the evolution of a feature when the current implementation diverges from original intent.
docs/superpowers/specs/*-design.md
docs/superpowers/plans/*.md
Legacy location for design specs and plans. These paths are deprecated in favor of docs/plans/ but are checked as a fallback for older features that have not been migrated.
tests/fixtures/evals/*.json
Behavioral eval packs committed as test fixtures. These define example-based behavioral expectations and are cross-referenced for coverage gaps in both modes.
After gathering, select mode:
When comparison material exists, run git diff against the relevant base (main branch or last reviewed commit) and cross-reference against gathered material across three drift dimensions.
For each requirement or acceptance scenario found in specs, check whether the implementation addresses it.
| Flag | Meaning |
|---|---|
implemented-as-specified | Implementation matches the spec requirement |
modified-from-spec | Implementation addresses the requirement but differs from spec (include evidence of what changed and why) |
added-without-spec | Implementation includes behavior not described in any spec |
specified-not-implemented | Spec requirement has no corresponding implementation in the diff |
For each task in the implementation plan, check whether the git diff includes changes to the expected files and scope.
| Flag | Meaning |
|---|---|
completed-as-planned | Task completed with expected files and scope |
modified-from-plan | Task completed but files or scope differ from plan |
added-without-plan | Changes exist that correspond to no planned task |
planned-not-implemented | Planned task has no corresponding changes in the diff |
If code review findings were addressed (check for review-round commits or explicit review feedback in conversation), identify whether fixes changed the behavioral contract -- not just code quality improvements.
Flag any scope changes introduced by review feedback. This dimension catches drift that is invisible to spec/plan alignment because it was introduced after the original implementation.
This step runs in both full drift mode and assumptions-only mode.
What does the implementation assume about inputs, environment, dependencies, or user behavior that is not validated by tests? List each assumption with the file and line range where it appears.
What code paths in the diff have no test exercise? Cross-reference test files against implementation files. Flag:
What boundary conditions does the implementation handle that are not explicitly specified? These represent implicit assumptions that may or may not be correct.
If eval packs exist in tests/fixtures/evals/*.json, identify:
expected values conflict with the actual implementationTerminal output always. Two report shapes depending on mode.
Title: ## Implementation Drift Check
Six sections:
## Implementation Drift Check
### Spec Alignment
| Requirement | Status | Evidence |
|-------------|--------|----------|
| [requirement from spec] | [flag] | [file:line or diff reference] |
### Plan Alignment
| Task | Status | Notes |
|------|--------|-------|
| [task from plan] | [flag] | [file changes or scope note] |
### Review-Induced Changes
- [behavioral contract changes introduced by review feedback, if any]
### Assumptions
- [unvalidated assumption] (file:line)
### Untested Paths
- [code path without test coverage] (file:line)
### Recommended Actions
- [ ] [actionable item to resolve drift or close gaps]
Title: ## Assumptions & Gaps
Three sections:
## Assumptions & Gaps
### Assumptions
- [unvalidated assumption] (file:line)
### Untested Paths
- [code path without test coverage] (file:line)
### Recommended Actions
- [ ] [actionable item to close gaps]
Always emit the report to terminal. This is the primary output channel.
When drift is found (any modified-from-spec, added-without-spec, specified-not-implemented, modified-from-plan, added-without-plan, planned-not-implemented flag, or Review-Induced changes), append a concise "Post-Implementation Notes" section to the relevant spec or design document:
## Post-Implementation Notes
_Added by implementation-drift-check on YYYY-MM-DD_
- [concise summary of each drift finding]
- [recommended follow-up actions]
Append to the first matching document in priority order:
docs/plans/*-design.md (canonical)openspec/changes/<feature>/specs/ (active OpenSpec)docs/superpowers/specs/*-design.md (legacy)If the document already has a "Post-Implementation Notes" section, append to it rather than creating a duplicate.
After completing (regardless of mode or findings), write the session marker to prevent duplicate execution during SHIP fallback:
touch ~/.claude/.skill-drift-check-ran-$(cat ~/.claude/.skill-session-token 2>/dev/null || echo default)
This marker is checked by the SHIP phase session-marker gate. If the marker exists, the SHIP fallback entry is suppressed.