Detect specification drift between PROJECT.md and implementation
Analyzes codebase against PROJECT.md to detect specification drift and alignment issues.
/plugin marketplace add cyberbloke9/pmp-gywd/plugin install pmp-gywd@pmp-gywdgywd/Drift types:
Helps keep implementation aligned with original vision. </objective>
<process> 1. Load project specification: - Read `.planning/PROJECT.md` - Extract all requirements (look for checkboxes, bullet points, "must", "should", "shall") - Build requirements list with IDsLoad implementation state:
Cross-reference analysis:
For each requirement:
For each implemented feature:
Generate drift report:
## Specification Drift Analysis
**Project:** {name}
**Spec Date:** {PROJECT.md last modified}
**Analysis Date:** {today}
---
### Alignment Score: 78%
[████████░░] 78% of requirements implemented
---
### Requirement Status
| # | Requirement | Status | Notes |
|---|-------------|--------|-------|
| R1 | User authentication | ✅ Complete | Phase 1 |
| R2 | OAuth integration | 🟡 Partial | Google done, GitHub pending |
| R3 | Admin dashboard | ❌ Missing | Not started |
| R4 | API rate limiting | ✅ Complete | Phase 2 |
| R5 | Email notifications | ❌ Missing | Deferred |
---
### Potential Drift
⚠️ **Divergent Implementation:**
- R2 (OAuth): Spec says "all major providers", only Google implemented
⚠️ **Undocumented Features:**
- WebSocket real-time updates (not in PROJECT.md)
- Redis caching layer (not in PROJECT.md)
---
### Recommendations
1. **Update PROJECT.md** to include:
- WebSocket feature (if intentional)
- Redis caching decision
2. **Plan missing requirements:**
- R3: Admin dashboard - add to next phase?
- R5: Email notifications - still needed?
3. **Clarify partial:**
- R2: Define which OAuth providers are MVP vs future
---
### Quick Actions
- `/gywd:add-phase "Admin dashboard"` - Add missing requirement
- `/gywd:consider-issues` - Review deferred items
- Edit PROJECT.md to update requirements
Provide actionable recommendations based on drift severity:
<detection_patterns> Requirement extraction from PROJECT.md:
- [ ] or - [x]Implementation detection:
<output_format> Structured report with:
Status indicators:
<success_criteria>