Validate requirements quality and traceability
Validates requirements quality and traceability across all levels (vision, epics, stories, tasks). Use this after creating requirements to identify completeness gaps, broken parent-child links, and INVEST compliance issues before implementation.
/plugin marketplace add sjnims/requirements-expert/plugin install requirements-expert@requirements-expert-marketplaceValidate requirements at all levels (vision, epics, stories, tasks) for completeness, consistency, quality, and traceability. This command is read-only—it analyzes requirements without modifying them unless fixes are explicitly requested.
Load the validation skill for methodology, checklists, and thresholds. Load shared-patterns skill for error handling patterns if fixes are applied.
gh repo view --json nameWithOwner
Extract owner and repo name for subsequent commands.
Query projects:
gh project list --owner [owner] --format json
If multiple projects found: Ask Select Project: "Which project would you like to validate?" (options: one per project)
If no project found: Inform user to run /re:init first, then exit.
Get all project items:
gh project item-list [project-number] --format json
For each item, read full content:
gh issue view [number] --repo [repo] --json body,title,labels
Categorize by Type custom field: Vision, Epic, Story, Task.
Before proceeding, verify prerequisites:
/re:discover-vision first, then exit/re:discover-vision → /re:identify-epics → /re:create-stories → /re:create-tasks), then exitRead plugins/requirements-expert/skills/validation/references/quality-thresholds.md for pass/warning/fail thresholds.
Read plugins/requirements-expert/skills/validation/references/completeness-checks.md for per-level checklists.
For each requirement level, verify required elements:
| Level | Required Elements |
|---|---|
| Vision | Problem statement, target users, solution overview, success metrics, scope boundaries |
| Epic | Overview, value proposition, scope, success criteria, parent link to vision |
| Story | Story format ("As a..."), 3-5 acceptance criteria, parent link to epic, size (1-5 days) |
| Task | Action title, description, 3-5 acceptance criteria, parent link to story, size (2-8 hrs) |
Calculate: (elements present / elements required) × 100 = Completeness %
Read plugins/requirements-expert/skills/validation/references/consistency-checks.md for detailed checks.
Verify:
Calculate: (consistent items / total items) × 100 = Consistency %
Read plugins/requirements-expert/skills/validation/references/invest-criteria.md for INVEST details.
For each story, evaluate against INVEST criteria:
| Criterion | Question |
|---|---|
| Independent | Can complete without other stories? |
| Negotiable | Implementation details open? |
| Valuable | Clear user/business value stated? |
| Estimable | Team can estimate effort? |
| Small | Fits in 1-5 days? |
| Testable | Has specific, testable acceptance criteria? |
Score each story 0-6 based on criteria met.
Calculate: (stories scoring 5+ / total stories) × 100 = INVEST Compliance %
Verify complete parent/child chains exist:
Identify orphaned items and broken links.
Calculate: (complete chains / expected chains) × 100 = Traceability %
Read plugins/requirements-expert/skills/validation/references/report-template.md for full format.
Generate report with all 8 sections:
Determine overall verdict:
Display condensed summary first:
## Validation Summary
**Verdict**: [PASS / WARNING / FAIL]
| Dimension | Status | Score |
|-----------|--------|-------|
| Completeness | [Pass/Warning/Fail] | [N]% |
| Consistency | [Pass/Warning/Fail] | [N]% |
| Quality (INVEST) | [Pass/Warning/Fail] | [N]% |
| Traceability | [Pass/Warning/Fail] | [N]% |
**Critical Issues**: [N]
**Warnings**: [N]
Then display full report with all 8 sections.
If validation passes with no issues or warnings:
If issues or warnings found: Ask Fix Issues: "Would you like help fixing these issues?" (options: Auto-fix, Guided fix, Skip)
If "Auto-fix" selected:
Initialize batch tracking per shared-patterns skill: fixed[], skipped[], failed[]
For each critical issue, then each warning:
plugins/requirements-expert/skills/validation/references/fix-patterns.mdgh issue edit or gh project item-editDisplay batch summary per shared-patterns format:
## Fix Summary
**Fixed**: [N] issues
- #[number] - [Issue description] (fixed: [what was fixed])
**Skipped**: [N] issues (if > 0)
- [Issue description] (reason: [why skipped])
**Failed**: [N] issues (if > 0)
- [Issue description] (error: [error message])
Return to Step 2 to re-validate after fixes.
If "Guided fix" selected:
Initialize batch tracking per shared-patterns skill: fixed[], skipped[], failed[]
For each issue (critical first, then warnings):
Ask Fix Issue: "Issue: [description]. How would you like to proceed?" (options: Fix now, Skip, Dismiss)
If "Fix now": Apply fix per plugins/requirements-expert/skills/validation/references/fix-patterns.md, track in fixed[]. On failure: Apply shared-patterns Recovery Flow.
If "Skip": Track in skipped[], continue to next issue.
If "Dismiss": Track in skipped[] with reason "dismissed", continue to next issue.
Display batch summary after all issues processed. Return to Step 2 to re-validate.
If "Skip" selected:
Proceed to Step 5.
Display completion message:
## Validation Complete
**Status**: [PASS / WARNING / FAIL]
**Critical Issues**: [N] | **Warnings**: [N]
If critical issues remain:
Address critical issues before implementation:
- Vision missing or incomplete → Run `/re:discover-vision`
- Epics need work → Run `/re:identify-epics`
- Stories fail INVEST → Run `/re:create-stories` to refine
- Tasks missing or oversized → Run `/re:create-tasks`
- Priorities imbalanced → Run `/re:prioritize`
If only warnings:
Proceed with caution. Address warnings incrementally.
Consider re-running `/re:review` weekly during development.
If all pass:
Requirements are solid and ready for implementation!
Next steps (always show):
**Next steps:**
- Run `/re:prioritize` if priorities need adjustment
- Run `/re:status` for project overview
- Begin implementation with highest-priority Must Have stories
/re:init to create requirements project, then exit/re:discover-vision to create product vision, then exit/re:identify-epics after vision is complete/re:create-stories after epics are definedgh auth status, display authentication instructions, suggest gh auth login