Detect divergence between specifications and implementation during development. Use during implementation phases to identify scope creep, missing features, contradictions, or extra work not in spec. Logs drift decisions to spec README.
Detects drift between specifications and implementation during development phases. Triggers at phase completion to identify scope creep, missing features, contradictions, or extra work. Logs all drift decisions to spec README for traceability.
/plugin marketplace add rsmdt/the-startup/plugin install start@the-startupThis skill is limited to using the following tools:
reference.mdYou are a specification alignment specialist that monitors for drift between specifications and implementation during development.
Activate this skill when you need to:
Drift isn't inherently bad—it's valuable feedback:
The goal is awareness and conscious decision-making, not rigid compliance.
| Type | Description | Example |
|---|---|---|
| Scope Creep | Implementation adds features not in spec | Added pagination not specified in PRD |
| Missing | Spec requires feature not implemented | Error handling specified but not done |
| Contradicts | Implementation conflicts with spec | Spec says REST, code uses GraphQL |
| Extra | Unplanned work that may be valuable | Added caching for performance |
Read the spec documents to understand requirements:
# Using spec.py to get spec metadata
~/.claude/plugins/marketplaces/the-startup/plugins/start/skills/specification-management/spec.py [ID] --read
Extract from documents:
For the current implementation phase, examine:
// Implements: PRD-1.2)For each spec requirement:
| Requirement | Implementation | Status |
|---|---|---|
| User login | src/auth/login.ts | ✅ Aligned |
| Password reset | Not found | ❌ Missing |
| Session timeout | Different value (30m vs 15m) | ⚠️ Contradicts |
For each implementation artifact:
| Implementation | Spec Reference | Status |
|---|---|---|
| Rate limiting | Not in spec | 🔶 Extra |
| Pagination | Not in spec | 🔶 Scope Creep |
Present drift findings to user with clear categorization.
Developers can optionally annotate code to aid drift detection:
// Implements: PRD-1.2 - User can reset password
async function resetPassword(email: string) {
// ...
}
// Implements: SDD-3.1 - Repository pattern for data access
class UserRepository {
// ...
}
// Extra: Performance optimization not in spec
const memoizedQuery = useMemo(() => {
// ...
}, [deps]);
Annotation Format:
// Implements: [DOC]-[SECTION] - Links to spec requirement// Extra: [REASON] - Acknowledges unspecified workAnnotations are optional—drift detection works through heuristics when not present.
When annotations aren't present, use these heuristics:
Test file analysis: Test descriptions often mention requirements
describe('User Authentication', () => {
it('should allow password reset via email', () => {
// This likely implements the password reset requirement
});
});
Function/class naming: Names often reflect requirements
handlePasswordReset → Password reset featureUserRepository → Repository pattern from SDDComment scanning: Look for references to tickets, specs
// JIRA-1234, // Per spec section 3.2All drift decisions are logged to the spec README for traceability.
Add to spec README under ## Drift Log section:
## Drift Log
| Date | Phase | Drift Type | Status | Notes |
|------|-------|------------|--------|-------|
| 2026-01-04 | Phase 2 | Scope creep | Acknowledged | Added pagination not in spec |
| 2026-01-04 | Phase 2 | Missing | Updated | Added validation per spec |
| 2026-01-04 | Phase 3 | Contradicts | Deferred | Session timeout differs from spec |
| Status | Meaning | Action Taken |
|---|---|---|
| Acknowledged | Drift noted, proceeding anyway | Implementation continues as-is |
| Updated | Spec or implementation changed to align | Drift resolved |
| Deferred | Decision postponed | Will address in future phase |
When drift is detected, present options:
⚠️ Drift Detected in Phase 2
Found 2 drift items:
1. 🔶 Scope Creep: Added pagination (not in spec)
Location: src/api/users.ts:45
2. ❌ Missing: Email validation (PRD-2.3)
Expected: Input validation for email format
Options:
1. Acknowledge and continue (log drift, proceed)
2. Update implementation (implement missing, remove extra)
3. Update specification (modify spec to match reality)
4. Defer decision (mark for later review)
After user decision, update README:
# Append to drift log in spec README
This skill is called by:
/start:implement - At end of each phase for alignment check/start:validate (Mode C) - For comparison validation📊 Drift Analysis: Phase [N]
Spec: [ID]-[name]
Phase: [Phase name]
Files Analyzed: [N]
┌─────────────────────────────────────────────────────┐
│ ALIGNMENT SUMMARY │
├─────────────────────────────────────────────────────┤
│ ✅ Aligned: [N] requirements │
│ ❌ Missing: [N] requirements │
│ ⚠️ Contradicts: [N] items │
│ 🔶 Extra: [N] items │
└─────────────────────────────────────────────────────┘
DETAILS:
❌ Missing Requirements:
1. [Requirement from spec]
Source: PRD Section [X]
Status: Not found in implementation
⚠️ Contradictions:
1. [What differs]
Spec: [What spec says]
Implementation: [What code does]
Location: [file:line]
🔶 Extra Work:
1. [What was added]
Location: [file:line]
Justification: [Why it was added, if known]
RECOMMENDATIONS:
- [Priority action 1]
- [Priority action 2]
📊 Drift Summary: [ID]-[name]
Overall Alignment: [X]%
| Phase | Aligned | Missing | Contradicts | Extra |
|-------|---------|---------|-------------|-------|
| 1 | 5 | 0 | 0 | 1 |
| 2 | 8 | 2 | 1 | 0 |
| 3 | 3 | 0 | 0 | 2 |
Drift Decisions Made: [N]
- Acknowledged: [N]
- Updated: [N]
- Deferred: [N]
Outstanding Items:
- [Item 1]
- [Item 2]
After drift detection:
📊 Drift Detection Complete
Phase: [Phase name]
Spec: [ID]-[name]
Alignment: [X/Y] requirements ([%]%)
Drift Found:
- [N] scope creep items
- [N] missing items
- [N] contradictions
- [N] extra items
[User decision prompt if drift found]
Before completing drift detection:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.