Detect gaps between specification and implementation, and identify undocumented features.
From siftcodernpx claudepluginhub ialameh/sift-coder --plugin siftcoderThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Detect gaps between specification and implementation, and identify undocumented features.
This skill is invoked by /siftcoder:gap-analysis or can be used standalone for gap detection tasks.
Extract structured requirements from specification files:
Input: Specification file (markdown, JSON, YAML)
Output:
{
"requirements": [
{
"id": "REQ-001",
"section": "Authentication",
"title": "User Login",
"description": "Users can authenticate with email and password",
"acceptance": [
"User can enter email and password",
"Invalid credentials show error message",
"Successful login redirects to dashboard",
"Session persists for 7 days"
],
"keywords": ["login", "auth", "email", "password", "session"],
"priority": "P0",
"dependencies": []
}
]
}
Process:
Create efficient exploration strategy:
Input:
/understandOutput:
{
"areas": [
{
"id": "area-001",
"path": "src/auth/",
"priority": 1,
"likelyRequirements": ["REQ-001", "REQ-002", "REQ-003"],
"fileCount": 12,
"keywords": ["login", "register", "session", "token"],
"confidence": 0.85
}
],
"unmappedRequirements": ["REQ-015"],
"suggestedSearchPaths": ["src/", "lib/", "app/"]
}
Mapping Strategies:
Keyword Matching:
auth/, login/, session/Semantic Similarity (with siftcoder-mcp):
Prior Knowledge:
/understand ran, use captured patternsFor each area, determine implementation status:
Input:
Output per Requirement:
{
"requirementId": "REQ-001",
"status": "implemented|partial|missing",
"confidence": 0.85,
"implementations": [
{
"file": "src/auth/login.ts",
"lines": "15-45",
"type": "function",
"name": "authenticateUser",
"matchedCriteria": [
"User can enter email and password",
"Successful login redirects to dashboard"
],
"missingCriteria": [
"Session persists for 7 days"
]
}
],
"evidence": "Found authenticateUser() with email/password params, returns token but no session persistence logic"
}
Detection Methods:
Direct Search:
Semantic Analysis:
Test Coverage:
Identify features in code not mentioned in spec:
Process:
Output:
{
"extras": [
{
"id": "EXTRA-001",
"title": "Admin Dashboard",
"location": "src/admin/",
"files": 12,
"linesOfCode": 2400,
"description": "Full admin panel with user management, analytics, system settings",
"entryPoints": ["src/admin/index.ts", "src/admin/routes.ts"],
"suggestedSpecSection": "Administration",
"importance": "high"
}
]
}
Discovery Heuristics:
Classify gaps by severity and type:
Gap Types:
| Type | Description | Example |
|---|---|---|
missing | No implementation found | Feature entirely absent |
partial | Some criteria met | Login works, but no session persistence |
incomplete | Stub or TODO | Function exists but not implemented |
outdated | Implemented differently | Spec says X, code does Y |
Severity Classification:
CRITICAL (P0):
- Security features (auth, encryption)
- Core business logic
- Blocking other features
HIGH (P1):
- Important user-facing features
- Performance requirements
- Integration points
MEDIUM (P2):
- Enhancement features
- Nice-to-have functionality
- Non-critical paths
LOW (P3):
- Documentation requirements
- Minor improvements
- Future considerations
Generate comprehensive analysis report:
Sections:
Executive Summary
Gap Details
Extras Details
Coverage Matrix
Recommendations
If siftcoder-mcp is available, use vector search:
Tools Used:
knowledge_add - Store requirement embeddingscode_embed - Generate code embeddingssimilarity_find - Match requirements to codeknowledge_search - Query existing knowledgeProcess:
1. For each requirement:
- Generate embedding from title + description + criteria
- Store in vector DB with metadata
2. For each code section discovered:
- Generate embedding from function/class + comments
- Store in vector DB
3. Cross-match:
- For each requirement embedding, find nearest code embeddings
- Threshold (0.7) determines match
- Return similarity scores
Fallback without MCP:
For large codebases, coordinate multiple subagents:
Area Exploration Subagent Prompt:
You are exploring [area path] for the gap-analysis command.
Requirements likely in this area:
[List of requirements with acceptance criteria]
Your task:
1. Read the files in this area
2. For each requirement, determine:
- Implementation status (implemented/partial/missing)
- File locations where implemented
- Which acceptance criteria are met/missing
- Confidence level (0-100)
3. Also identify any significant features NOT in the requirements list
- These are potential "extras" (undocumented features)
Output your findings as structured JSON.
Coordination Flow:
Main Agent
├── Generate crawl plan
├── Spawn Area Subagent 1 → src/auth/
├── Spawn Area Subagent 2 → src/api/
├── Spawn Area Subagent 3 → src/services/
├── Collect results
├── Cross-validate with semantic matching
└── Generate report
/siftcoder:understand - Better matching with prior knowledge/siftcoder:add-feature - Implement missing features/siftcoder:fix - Complete partial implementations/siftcoder:reverse-spec - Document extrasgap-analysis/history/Accuracy over Speed
Prioritize Critical Gaps
Actionable Output
Conservative Matching
Context Efficiency