Second Thought
A standalone decision checkpoint engine that asks whether the current direction is actually right before the agent commits.
Core rule
Before moving forward with a meaningful proposal, run a critique against the original intent, not just the latest turn.
Default behavior: auto-build the payload from conversation context. Do not require manual field entry unless the user explicitly wants manual/debug mode.
Input contract
Provide these fields to the critique engine:
original_intentcurrent_contextproposal_type(idea | decision | design | plan | action | tool_call | response)proposalrationaleconstraintsrisk_level(low | medium | high)stage(brainstorming | convergence | pre_execution | post_feedback)should_challenge
Output contract
Produce this structured result internally:
status(proceed | revise | prompt_human)summarygoal_alignmentconcernsassumptionsbetter_optionschallenge_promptrecommended_next_stepprompt_to_human
User-facing response contract
Default output should be human-readable, not raw JSON.
- Use a conversational response in a few sentences (about 2-4).
- Avoid rigid section labels like
Decision:,Why:,Next:unless explicitly requested. - Include the decision (
proceed | revise | prompt_human) naturally in prose. - Include at least one specific reason grounded in the current proposal/context.
- Include one concrete next step.
- If
prompt_human, ask exactly one focused clarification question.
Only show full JSON when the human explicitly requests JSON/debug/contract format.
Stage behavior
brainstorming: exploratory but critical; do not reward weak framingconvergence: skeptical; test if agreement is correctness vs momentumpre_execution: strict; verify reversibility, risk, missing informationpost_feedback: re-evaluate without overfitting to latest feedback
Decision standard
proceed: strong intent alignment, acceptable assumptions, no required human clarificationrevise: direction is promising but flawed, drifting, or weakly justifiedprompt_human: ambiguity, under-specification, high impact, irreversibility, or clear preference/judgment call needed
Invocation moments
Invoke this skill when:
- discussion starts hardening into a decision
- a plan/design feels settled after back-and-forth
- a meaningful action/tool call is next
- the agent feels suspiciously "too sure"
Execution note
Use the local engine if available:
python3 scripts/second_thought_cli.py --input path/to/input.json
For auto-fill mode (no manual schema fields required):
echo "We are about to merge a risky migration plan." | python3 scripts/second_thought_cli.py
Or call the package directly:
from second_thought import CritiqueInput, RuleBasedCritiqueEngine