Phase 4 of deep research - validates citations, scores source credibility, checks field coverage and cross-entity consistency.
Validate the research data collected in Phase 3.
state.json from the output directorydata/If validation.json exists in the output directory, skip this phase.
Scan all JSON files in data/ and extract every source entry (url, title, accessed date).
Write them to a temporary sources_temp.json file.
Run the citation verifier:
python3 ~/.claude/skills/research/scripts/verify_citations.py sources_temp.json
This checks for:
Note: URL reachability checking is optional (add --check-urls flag for thorough validation, but it's slow).
For each source, run the credibility evaluator:
python3 ~/.claude/skills/research/scripts/source_evaluator.py "<url>" "<title>" "<date>"
Record scores. Flag any source with score < 40 as verify — these need extra scrutiny.
If the research type is comparison, validate each entity JSON against fields.yaml:
python3 ~/.claude/skills/research/scripts/validate_json.py data/<entity>.json fields.yaml
Report coverage percentage per entity. If any entity has < 70% coverage, flag it for re-research.
Read all entity JSONs and check for contradictions:
Write validation.json to the output directory:
{
"citation_check": {"total": N, "suspicious": N, "pass": true/false},
"credibility_scores": [{"url": "...", "score": N, "recommendation": "..."}],
"field_coverage": {"entity_name": 0.85},
"contradictions": ["description of contradiction"],
"overall_pass": true/false
}
Tell the user: