원클릭으로
validate-parser
Validate SpecVital parser accuracy by comparing with actual test framework CLI results
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Validate SpecVital parser accuracy by comparing with actual test framework CLI results
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Transform verbose natural language requests into structured bilingual documentation (Korean for review + English for AI prompts)
Review current git changes or latest commit using code-reviewer and architect-reviewer agents
Review comments and suggest cleanup (identify unnecessary comments, recommend improvements)
Generate Conventional Commits-compliant messages (feat/fix/docs/chore) in Korean and English
Identify and safely remove dead code, deprecated code, and unused exports from codebase
Generate business rule documentation from domain knowledge and requirements
| name | validate-parser |
| description | Validate SpecVital parser accuracy by comparing with actual test framework CLI results |
| allowed-tools | Bash(*), Read, Write, Grep, Glob |
Validate that SpecVital Core parser accurately detects tests by comparing:
vitest list → 379 tests)This is a quality assurance tool for the Core parser engine.
$ARGUMENTS
Interpretation:
Request Type Classification:
| Type | Pattern | repos.yaml Check |
|---|---|---|
| Explicit | URL, exact repo name (e.g., "axios") | ❌ Skip |
| Implicit | Vague (e.g., "Python project", "empty") | ✅ Exclude |
Examples:
| User Input | Type | Interpretation |
|---|---|---|
| (empty) | Implicit | Pick popular repo not in repos.yaml |
axios | Explicit | Test axios (even if in repos.yaml) |
https://github.com/lodash/lodash | Explicit | Test lodash (even if in repos.yaml) |
Python project with pytest | Implicit | Find Python repo NOT in repos.yaml |
Something with Vitest | Implicit | Find Vitest repo NOT in repos.yaml |
Before starting validation, read all ADR documents to understand current parser policies:
# List and read all core ADR documents
ls /workspaces/specvital-core/docs/en/adr/core/
# Read each .md file (excluding index.md)
Why: Parser behavior is defined by ADR policies. Discrepancies may be "working as designed" rather than bugs.
1.1 Classify request type:
1.2 Read repos.yaml (for implicit requests only):
# Skip this step for explicit requests
grep "url:" tests/integration/repos.yaml
1.3 Select repository:
1.4 Detect expected framework:
git clone --depth 1 {url} /tmp/specvital-validate-{repo-name}
cd /tmp/specvital-validate-{repo-name}
Two strategies (try in order):
Run the actual test framework CLI to get real test count.
Step 1: Identify framework and version
Check the repository's dependency file:
package.json → devDependencies (jest, vitest, playwright, mocha, etc.)pyproject.toml / setup.py → pytest versiongo.mod → Go versionStep 2: Query Context7 MCP for current CLI usage
Use Context7 MCP to get up-to-date CLI documentation for the specific framework version:
1. mcp__context7__resolve-library-id → Get library ID (e.g., "/vitest/vitest")
2. mcp__context7__get-library-docs → Query "list tests CLI" or "collect tests"
This ensures:
Step 3: Install dependencies and execute
# Install project dependencies first
npm install / pip install -e . / go mod download
# Run the CLI command from Context7 docs
{framework-specific-command}
Note: Always verify CLI output format before counting
When to use: CLI fails due to:
How to execute:
Glob test files: Find all test files using framework patterns
# Examples
**/*.test.{js,ts,jsx,tsx} # Jest/Vitest
**/*_test.py # pytest
**/*_test.go # Go
Read each file: Analyze test structure manually
Count tests: Identify test functions/blocks by pattern
it(), test(), it.each(), test.each()def test_*, @pytest.mark.parametrizefunc Test*, func Benchmark*Handle edge cases:
Important: Document which strategy was used in the report
cd /workspaces/specvital-core
just scan /tmp/specvital-validate-{repo-name}
Calculate accuracy:
Ground Truth: 379 tests (from vitest list)
Parser Result: 350 tests
Delta: -29 tests (7.7% under-detection)
Interpret delta:
| Delta | Status | Meaning |
|---|---|---|
| 0 | ✅ PASS | Parser is accurate |
| ≠ 0 | ❌ FAIL | Parser bug, needs fix |
Important: Even 1 test difference means a bug exists. No tolerance.
If delta ≠ 0:
Create comprehensive validation report:
/workspaces/specvital-core/realworld-test-report.md (single file, overwrite)rm -rf /tmp/specvital-validate-{repo-name}
# Parser Validation Report: {repo-name}
**Date**: {timestamp}
**Repository**: [{owner}/{repo}]({url})
**Framework**: {framework}
---
## 📊 Comparison Results
| Source | Test Count |
| -------------------------------- | -------------------- |
| **Ground Truth** ({cli-command}) | {n} |
| **SpecVital Parser** | {n} |
| **Delta** | {±n} ({percentage}%) |
**Status**: {PASS|FAIL}
---
## 🔍 Ground Truth Details
**Method**: {CLI Execution | AI Manual Analysis}
**Command/Approach used**:
\`\`\`bash
{command or "Manual file analysis via AI"}
\`\`\`
**Output sample**:
\`\`\`
{first 10 lines of output or file analysis summary}
\`\`\`
**Note** (if AI analysis):
> CLI failed because: {reason}
> Analyzed {n} test files manually
---
## 📈 Parser Results
| Metric | Value |
| -------------- | ------ |
| Files Scanned | {n} |
| Files Matched | {n} |
| Tests Detected | {n} |
| Duration | {time} |
### Framework Distribution
| Framework | Files | Tests |
| --------- | ----- | ----- |
| {name} | {n} | {n} |
---
## 🐛 Discrepancy Analysis
{IF delta ≠ 0}
### Missing Tests Investigation
**Sample comparison**:
| File | Ground Truth | Parser | Delta |
| -------- | ------------ | ------ | ----- |
| `{path}` | {n} | {n} | {±n} |
**Patterns identified**:
- {pattern 1}: {description}
- {pattern 2}: {description}
**Root cause hypothesis**:
{explanation of why tests are missing}
{ELSE}
No significant discrepancies found.
{ENDIF}
---
## 📋 Conclusion
{Based on status}
**If PASS**:
> Parser accurately detects tests in this repository (exact match).
> Ready to add to `tests/integration/repos.yaml`:
>
> \`\`\`yaml
>
> - name: {repo-name}
> url: {url}
> ref: {ref}
> framework: {framework}
> \`\`\`
**If FAIL**:
> Parser has accuracy issues. Do not add to repos.yaml until fixed.
>
> **Issues to fix**:
>
> - {issue 1}
> - {issue 2}
---
## 📝 Next Steps
- [ ] {action based on findings}
npm install, pip install, etc.) for CLI to workNote: Explicit user requests override repos.yaml exclusion
Now execute the parser validation according to the guidelines above.