| name | requirements-analyzer |
| type | automation |
| callable | true |
| version | 1.0.0 |
| description | Extract ACTUAL requirements from existing code and tests (evidence-based) |
| trigger | When PROJECT.md needs updates |
| auto_invoke | false |
Requirements Analyzer Skill
Purpose
Extract requirements by analyzing ACTUAL test assertions and code implementations.
Key Difference
This does NOT guess. It reads:
- Test assertions to understand what's verified
- Code implementations to understand what exists
- Dependencies to understand platform requirements
Output
Updates PROJECT.md with evidence-based requirements.
Usage
python .claude/skills/requirements-analyzer/extract_requirements.py
Evidence Sources
Test Files → Functional Requirements
- Parse test assertions
- Extract acceptance criteria
- Map to implementations
Code Documentation → Capabilities
- Parse docstrings
- Extract function signatures
- Identify public APIs
Implementation Patterns → Non-Functional Requirements
- Performance optimizations (caching, vectorization)
- Memory management (clear_cache, gc.collect)
- Platform dependencies (MLX, Python version)
Output Format
JSON file with:
{
"functional": [
{
"id": "FR-1",
"description": "...",
"acceptance_criteria": "...",
"test_file": "tests/...",
"test_function": "test_...",
"evidence": ["assertion1", "assertion2"],
"status": "✅ Implemented"
}
],
"non_functional": [...],
"traceability": [...]
}