Discovery Validate
Deprecated: Use
/rai-discoverinstead, which runs the full pipeline (detect → extract → describe → document → build) in one pass. This skill is kept for backward compatibility.
Purpose
Validate component descriptions using a confidence-tier workflow that reduces human decisions from O(components) to O(modules + exceptions).
Mastery Levels (ShuHaRi)
- Shu: Follow all steps, review each tier in order
- Ha: Trust high-confidence auto-validation; focus on medium/low
- Ri: Tune confidence thresholds for domain-specific projects
Context
When to use: After /rai-discover-scan has created work/discovery/analysis.json.
When to skip: All components already validated, or no analysis.json exists.
Inputs: work/discovery/analysis.json, work/discovery/components-draft.yaml.
Steps
Step 1: Load & Present Overview
## Validation Overview
**Components:** {total}
- High confidence (auto-validate): {N} ({%})
- Medium confidence (module batch): {N} ({%})
- Low confidence (individual review): {N} ({%})
**Estimated human decisions:** ~{medium_modules + low_count}
Step 2: Auto-Validate High Confidence (≥70)
Use auto_purpose and auto_category directly. Set validated: true, validated_by: auto.
Ask user: "Auto-validate {N} high-confidence components? [Approve all / Review individually]"
Step 3: Batch Review Medium Confidence (40-69)
For each module group from analysis.json:
| # | Name | Kind | Category | Purpose | Score |
|---|---|---|---|---|---|
| 1 | {name} | {kind} | {auto_category} | {purpose} | {score} |
Ask per module: "Approve batch? [Approve all / Edit specific / Skip module]"
For C#/large projects with single-file modules: group by namespace prefix instead.
Step 4: Handle Low Confidence (<40)
Scale gate: If all components are low AND count >50, offer alternative modes:
| Mode | Best for | Strategy |
|---|---|---|
| A: By layer | Clean Architecture / CQRS | Group by top-level namespace, approve per layer |
| B: Key components | Large infra-heavy codebases | User nominates 10-20 key components, bulk-skip rest |
| C: Naming pattern | Consistent suffix patterns | Auto-accept by pattern (*Handler, *Repository) |
Otherwise, review individually — present file, signature, signals, ask: Approve / Edit / Skip.
Step 5: Export & Save
- Update
components-draft.yamlwith validation states - Export validated components to
work/discovery/components-validated.json(graph node format) - Update
work/discovery/context.yamlstatus tocomplete
Graph node format:
{"id": "comp-scanner-symbol", "type": "component", "content": "purpose",
"source_file": "path", "metadata": {"name": "...", "kind": "...", "validated_by": "..."}}
Present summary: total, auto-validated, batch-reviewed, individual, skipped, decision reduction %.
Output
| Item | Destination |
|---|---|
| Updated draft | work/discovery/components-draft.yaml |
| Validated catalog | work/discovery/components-validated.json |
| Next | rai graph build or /rai-discover-document |
Quality Checklist
- High-confidence auto-validation approved by user before proceeding
- Medium batches presented with full context (module, category, purpose)
- Scale gate checked before attempting O(components) individual review
- Export uses graph node format (id, type, content, source_file, metadata)
- NEVER skip the scale gate for all-low scenarios (>50 components)
References
- Previous:
/rai-discover-scan - Next:
rai graph buildor/rai-discover-document - CLI:
rai discover analyze --help - Confidence tiers: high ≥70, medium 40-69, low <40