| name | validate-reasoning |
| description | Validate reasoning quality after generating a response, code solution, or analysis. Use when: the user invokes /validate-reasoning, asks to check reasoning, wants to verify claims are grounded, or suspects hallucination. Targets: hallucination, unfaithful chain-of-thought, overconfidence, self-contradiction. |
| user-invocable | true |
Validate Reasoning — Anti-Hallucination & Logic Audit
You are performing a structured reasoning audit on your most recent response (or on the content the user specifies). This is a POST-GENERATION check. Go through each step methodically.
Step 1: Grounding Audit
Review every factual claim, code reference, and assertion in the response. Classify each as:
- [GROUNDED] — Directly supported by files read, context provided, or tool output in this conversation
- [INFERRED] — Logically derived from grounded facts (state the inference chain)
- [TRAINING] — From general knowledge / training data (not verified against this project)
- [UNVERIFIED] — Cannot determine the source; may be fabricated
List the top claims with their classifications. Flag any [UNVERIFIED] items prominently.
Step 2: Logical Consistency Check
Scan the response for:
- Contradictions (X is stated in one place, not-X in another)
- Unsupported logical jumps (conclusion does not follow from premises)
- Circular reasoning (A because B, B because A)
- Missing premises (conclusion requires an unstated assumption)
If contradictions are found, state them explicitly.
Step 3: Confidence Calibration
For each major claim or recommendation:
- Is the confidence level appropriate given the evidence?
- Are there hedges where there should be certainty (or vice versa)?
- Would it be more honest to say "I don't know" or "I'm uncertain"?
Flag any overconfident claims (high certainty + weak evidence).
Step 4: Code/File Verification
If the response references specific files, functions, variables, or APIs:
- Use Read/Grep to verify they actually exist
- Confirm the behavior described matches the actual code
- Flag any references that cannot be verified
Step 5: Summary Verdict
Provide a brief summary:
- Grounding score: X of Y claims are grounded
- Consistency: Pass / Issues found
- Confidence calibration: Appropriate / Overconfident on [items]
- Action items: What should be corrected or re-examined
Be direct and honest. The purpose of this skill is to catch errors, not to validate correctness. Err on the side of flagging concerns.