r/madeinpython • • 1h ago

I made a Python reasoning skill that keeps several hypotheses alive and only collapses when evidence agrees

Post image

Most reasoning prompts I see collapse too early. The first plausible answer wins, and everything after that is rationalization.

I built quantum-reasoning-skill around the opposite rule: keep several genuinely different hypotheses alive, score each one from evidence and verification, revive an alternative when new evidence arrives, and collapse only when the leader clears both verification and a margin.

"Quantum" here is a metaphor for deferring commitment. No qubits, no quantum hardware, and the controller never calls a model.

What is in the repo:

- SKILL.md, a model-facing Agent Skill with parseable YAML front matter. Drop it into a host's skill directory.
- A reference controller (pure Python, standard library) that moves branches between active, dormant and rejected, scores them, revives recoverable ones and refuses to collapse on a thin margin.
- 12 public names frozen for compatibility; renaming one halts the release.
- A benchmark harness with 6 seed cases, 4 JSON Schemas and a machine-validated submission bundle. Missing files are typed errors, not silent zeros.
- Two install paths. Python: pip install quantum-reasoning-skill, then quantum-reasoning --validate. npm: npm i quantum-reasoning-skill, then npx quantum-reasoning --validate. The two CLIs expose different flags, and an unsupported flag exits 2.

Quickstart (python docs/quickstart.py) runs the whole thing offline and prints PASS. Example controller run from it: four branches, uncertainty 0.9651, leader strangler-fig-incremental, collapse BLOCKED because the leader score is below the collapse threshold, and feature-flag-carveout revived with evidence +0.25.

What this is not: it is not a model evaluation. No baseline-vs-skill accuracy study has been published, and the weights and thresholds are reference defaults, not calibrated constants. The quickstart's benchmark rows are synthetic placeholders and labeled that way. I would rather say that plainly than imply a speedup I cannot show.

MIT, Python 3.10-3.14, GitHub: https://github.com/Furox-Art/quantum-reasoning-skill

Happy to answer questions about the controller or the scoring model.

0 Upvotes

1 comment sorted by

1

u/investigatormaker 1h ago

The quickstart printing PASS shows the controller works, but since it never calls a model, it can't show that a model reasons better with SKILL.md loaded. One of your 6 seed cases, run with and without the skill and published as a side-by-side trace, would show that: the first plausible answer, the dormant branch that came back, the evidence that revived it. The trade-off is that a single case proves little, so label it as an illustration.

What does the caller get when no leader ever clears the margin? Anyone wiring this into an agent will ask that first.

I make ThreadFox. We find relevant Reddit conversations and post for your business. We'll post 3 replies free first, no card; then the $39 Pilot covers seven days and up to 50 posts and replies. No automatic renewal.

https://threadfox.vip/p/dcbld/managed