# Challenge Inference

> Adversarially tests ProcedureDraft hypotheses before compilation — tries to disprove patterns using counterevidence and context checks. Use during Soulcatcher validation phase or when the user asks to verify a learned workflow is real.

- Skill: `justtyashh/challenge-inference` (Agent Skill)
- Install (CLI): `npx skillmds@latest add justtyashh/challenge-inference`
- Raw SKILL.md: https://api.skillmd.com/api/skills/justtyashh/challenge-inference/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: JusttYashh (https://skillmd.com/u/justtyashh)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/justtyashh/challenge-inference

---


# Challenge Inference

Try to disprove the pattern before accepting it.

Read schemas in [../soulcatcher/reference.md](../soulcatcher/reference.md).

**Worked example verdict:** see challenge section in [learned-skills/examples/pipeline-output/procedure-draft.md](../../learned-skills/examples/pipeline-output/procedure-draft.md)

## Input

- ProcedureDraft from infer-procedure
- BehavioralTraces and PatternReport for counterevidence

## Adversarial Checks

Run each check. Record pass/fail and reasoning.

| Check | Fail action |
|-------|-------------|
| Appears in only one context subtype? | weaken confidence or **reject** |
| Explained by task type, not user habit? | **reject** |
| Only 2 occurrences? | **reject** — not a workflow |
| Core step skipped in multiple sessions? | mark optional vs core, or **refine** |
| Simpler explanation fits? | prefer simpler, **refine** |
| Counterexamples outweigh matches? | **reject** |

## Minimum Evidence Rule

**Two occurrences is not a workflow.** Require 3+ relevant sessions with core sequence unless user overrides.

## Output Format

```markdown
# Challenge Verdict: {procedure_title}

**Verdict:** accept | refine | reject

## Checks

| Check | Result | Notes |
|-------|--------|-------|
| Cross-context evidence | pass | 5 distinct decision contexts |
| Task-type explanation | pass | Counterexample search not required by task |
| Minimum occurrences | pass | 12/15 sessions |
| Step optionality | pass | Core steps stable; 3 sessions skipped counterexamples |
| Simpler explanation | pass | No shorter sequence fits |

## Counterevidence

- decision-analysis-13: decided on pros/cons alone (deviation noted, not dominant)
- decision-analysis-14: committed before downside surfaced (single instance)

## Recommendation

**accept** — Pattern is cross-context, frequent, and not explained by task structure alone.
Adjust confidence to 87% after 2 counterexamples.
```

## Verdict Actions

- **accept** → proceed to user approval, then compile-skill
- **refine** → return to infer-procedure with constraints (e.g. mark counterexample search as optional)
- **reject** → try next PatternReport or report no durable workflow found

## Demo Bundle Note

When running on `learned-skills/examples/sample-traces/`, the expected verdict for adversarial-decision-analysis is **accept** with confidence 87%.

When demonstrating rejection, use a hypothetical 2-session pattern or reference sessions 13–14 as insufficient alone.

