Skip to content

feat(debate): confidence-gated multi-agent iterative debate for hard sorries - #119

Open
romirthedev wants to merge 2 commits into
cameronfreer:mainfrom
romirthedev:romir
Open

feat(debate): confidence-gated multi-agent iterative debate for hard sorries#119
romirthedev wants to merge 2 commits into
cameronfreer:mainfrom
romirthedev:romir

Conversation

@romirthedev

Copy link
Copy Markdown
Contributor

Summary

  • Adds a confidence gate: before attempting a hard sorry, the agent self-assesses whether it is 100% confident. If not, it escalates to a multi-agent debate.
  • Introduces 4 independent debate agents (Mathematician, Tactician, Skeptic, Judge) that argue iteratively with full shared history until they converge on a strategy.
  • Wires the debate loop as imperative steps in cycle-engine.md so it runs automatically during /lean4:prove and /lean4:autoprove — no manual chaining needed.
  • Difficulty rubric (1–10) gates the confidence check at score ≥ 7.
  • Adds --debate and --debate-max-rounds flags to prove and autoprove.

Test plan

  • Load plugin with claude --plugin-dir ./plugins/lean4
  • Run /lean4:prove --debate=ask on a hard sorry (e.g. measure-theoretic goal with ℝ≥0∞) and verify debate triggers automatically
  • Verify each agent can be invoked in isolation with synthetic JSON input
  • Verify --debate=off disables agent spawning while still logging difficulty score
  • Verify debate resolves in ≤ 5 rounds and Judge produces a concrete execution_plan

🤖 Generated with Claude Code

romirthedev and others added 2 commits March 12, 2026 21:52
Before each reply in the /learn iterate loop, the skill now reasons
from three advisor perspectives (Pace, Method, Depth) to select the
best response strategy for the learner at that moment, rather than
immediately continuing.

The chosen strategy is surfaced as a brief *Pedagogy: ...* note before
the actual reply. The debate is mandatory in game and socratic modes,
optional in tour and exercise modes.

New behaviors:
- Hint escalation ladder in game mode: directional hint → specific
  hint → full answer, triggered after 2 consecutive failures on the
  same exercise
- Stuck detection: if the learner shows the same misunderstanding
  twice, the strategy must switch framing — never repeat the same
  explanation
- Mid-session profile updates: debate can raise/lower --level or
  switch --style based on observed learner signals, announced inline

Updated files:
- commands/learn.md: new step 4.5 between Depth Check and Iterate;
  updated step 5 to reference it
- references/learn-pathways.md: new ## Pedagogical Self-Debate section
  with full advisor table, hint escalation protocol, stuck detection
  spec, and profile update rules
…ard sorries

- Add 4 independent debate agents: Mathematician, Tactician, Skeptic, Judge
- Agents debate iteratively with full shared history until convergence
- Confidence gate: single agent self-assesses 100% confidence before spawning debate
- Judge detects convergence each round; hard stop at max_rounds (default 5)
- Wire debate loop as imperative steps in cycle-engine.md so it runs automatically
- Add --debate and --debate-max-rounds flags to prove and autoprove
- Difficulty rubric (1-10) gates the confidence check at score >= 7

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant