| name | pi-autoreason |
| description | Run or design Autoreason-style refinement in Pi. Use when refining bounded artifacts, source-grounded PDF/book/manual extractions, PRDs, plans, prompts, or other documents where "do nothing" must remain a first-class option. Avoid for unbounded brainstorming or direct code edits unless a human explicitly accepts the cost and risk. |
| disable-model-invocation | true |
pi-autoreason
Use pi-autoreason for structured self-refinement based on the Autoreason paper.
Core loop
Each pass compares:
A: unchanged incumbent
B: adversarial revision from a critic's concrete problems
AB: synthesis of A and B
Fresh judges rank randomized versions. Borda count chooses the winner. Ties go to A. Stop when A wins k=2 consecutive passes.
When to use
Good fits:
- bounded plans, PRDs, specs, implementation prompts
- source-derived text where source faithfulness matters
- docs with real tradeoffs and enough constraints
- mid-tier model workflows where generation is decent but selection is weak
Bad fits:
- vague “make it better” requests with no constraints
- template-filling where conservative editing is enough
- direct code edits without tests or explicit acceptance
- source-derived educational content unless source-grounded mode is used
Source-grounded law
For source-derived content:
- Do not invent claims.
- Preserve, reorganize, format, lightly clarify, and repair structure issues only.
- Mark missing/unsupported content as
needs_source.
- Rank source faithfulness above polish.
Commands
/autoreason path/to/artifact.md --mode artifact --max-passes 5 --judges 3
/autoreason extracted-paper.md --mode source --source extracted.json --max-passes 3
Defaults from the paper
- 3 judges in-loop
- 7 judges for final comparisons when needed
- Borda scoring: 3/2/1
- conservative tie break: incumbent wins
- convergence:
k=2 consecutive A wins
- CoT/decomposed judge prompt by default
- record all pass artifacts
Operator guidance
Before running, constrain the task. If the user has not supplied constraints, ask for:
- target artifact type
- hard source/context boundaries
- max length or section shape
- acceptance criteria for judges
- whether cost is acceptable
For source mode, pass source context when available.