Initial commit
This commit is contained in:
71
commands/analyze-model.md
Normal file
71
commands/analyze-model.md
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
allowed-tools: Read, Bash(reqvire:*)
|
||||
description: Analyze the current Reqvire model structure, identify issues, coverage gaps, and provide improvement recommendations
|
||||
model: claude-sonnet-4-5-20250929
|
||||
---
|
||||
|
||||
# Analyze Reqvire Model
|
||||
|
||||
Perform comprehensive analysis of the current Reqvire model.
|
||||
|
||||
## Current Model State
|
||||
|
||||
- Validation status: !`reqvire validate 2>&1 | head -1`
|
||||
- Total elements: !`reqvire search --json | jq -r '.global_counters.total_elements'`
|
||||
- Verification coverage: !`reqvire coverage --json | jq -r '.summary.leaf_requirements_coverage_percentage'`%
|
||||
- Test satisfaction: !`reqvire coverage --json | jq -r '.summary.test_verifications_satisfaction_percentage'`%
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Remove diagrams to save tokens:**
|
||||
```bash
|
||||
reqvire remove-diagrams
|
||||
```
|
||||
|
||||
2. **Run validation:**
|
||||
```bash
|
||||
reqvire validate --json > /tmp/validation.json
|
||||
```
|
||||
|
||||
3. **Generate model search:**
|
||||
```bash
|
||||
reqvire search --short --json > /tmp/search.json
|
||||
```
|
||||
|
||||
Use `--short` to get model structure without full content.
|
||||
|
||||
4. **Check coverage:**
|
||||
```bash
|
||||
reqvire coverage --json > /tmp/coverage.json
|
||||
```
|
||||
|
||||
5. **Run lint checks:**
|
||||
```bash
|
||||
reqvire lint --json > /tmp/lint.json
|
||||
```
|
||||
|
||||
6. **Analyze the results:**
|
||||
- Review validation errors and warnings
|
||||
- Identify unverified requirements from coverage report
|
||||
- Check for model quality issues from lint report
|
||||
- Calculate coverage percentages and statistics
|
||||
|
||||
7. **Provide recommendations:**
|
||||
- List specific issues found with file locations
|
||||
- Suggest improvements prioritized by impact
|
||||
- Recommend commands to fix issues (e.g., `reqvire lint --fix`)
|
||||
- Identify requirements needing verifications
|
||||
|
||||
## Output Format
|
||||
|
||||
Present findings in clear sections:
|
||||
- **Validation Results**: Errors and warnings
|
||||
- **Coverage Analysis**: Verification coverage statistics
|
||||
- **Model Quality**: Lint findings (auto-fixable vs needs review)
|
||||
- **Recommendations**: Prioritized action items
|
||||
|
||||
## Notes
|
||||
|
||||
- Always run `remove-diagrams` first to save context tokens
|
||||
- Use `/tmp` for JSON outputs
|
||||
- Focus on actionable recommendations
|
||||
Reference in New Issue
Block a user