convez.ai
MCP Server
luislozanogmia

pre-reasoning

luislozanogmia/pre-reasoning

Ver no GitHub
BomPluginScore · de 0 a 100

Deterministic pre-reasoning traces for LLMs, with optional neural perception.

Instalação

$npx convez-ai luislozanogmia/pre-reasoning

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
19
Forks
2
Acompanhando
2
Saúde
42%
Último commit
há 1 mês
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

Pre-Reasoning

Pre-Reasoning is a Mia Labs structural analysis engine that grounds an LLM before it answers. It uses a 3M-parameter neural perception model plus a bundled tiny derive expert to surface dependencies, derived assumptions, root blockers, unlock order, parallel work, cycles, and conflicts from problem text.

The engine ships with bundled weights and declares its torch dependency; install and run, no model download needed.

What It Does

Given natural-language problem text, the engine returns:

  • ROOT BLOCKERS: what must be resolved first
  • UNLOCK SEQUENCE: a dependency-aware resolution order
  • PARALLEL WORK: independent items that can proceed now
  • CYCLES: circular dependencies that cannot be solved sequentially
  • CONFLICTS: competing positions or incompatible entities
  • REQUIREMENTS: numeric or threshold requirements
  • DERIVED ASSUMPTIONS: transitive dependency assumptions inferred by the tiny derive expert
  • BLOCK OUTPUT: direct and derived structural blocks used by the graph reasoner

Install

pip install pre-reasoning

For local development from this repo:

pip install -e .

Python Usage

from pre_reasoning import analyze, pulse

result = analyze("Frontend depends on API. API depends on Auth.")
print(result["trace"])
print(result["derived_assumptions"])

check = pulse(
    "Frontend depends on API. API depends on Auth.",
    "Fix Auth first, then verify the API before frontend work."
)
print(check["status"])

CLI Usage

pre-reasoning "A depends on B. B depends on C."
pre-reasoning --json "CTO conflicts with senior dev."
pre-reasoning --info

To use a different weights file, set PRE_REASONING_CHECKPOINT=/path/to/weights.safetensors or pass --checkpoint.

Results

Early comparison table, illustrative, n=5 architectural decision problems:

ComparisonIllustrative result, n=5
9B + trace vs 32B baseline3W 2T 0L
9B + trace vs 120B baseline4W 1T 0L
120B + trace vs 120B baseline3W 2T 0L

These are product-research notes, not benchmark claims.

Architecture

User text
  -> neural perception (3M params, safetensors)
  -> neural findings converted to structural blocks
  -> tiny derive expert infers transitive assumptions
  -> derived assumptions appended as dependency blocks
  -> graph reasoning
  -> structural trace

File Map

PathPurpose
pre_reasoning/Installable Python package and CLI entry point
pre_reasoning/inference.py3M-parameter neural perception layer
pre_reasoning/heuristic.pyGraph-reasoning core
pre_reasoning/pre_reasoning_v2_5_2.pyDefault v2.5.4 engine: neural perception + derive expert + graph reasoning
pre_reasoning/pre_reasoning_v2_5.pyLegacy v2.5 engine: neural perception + graph reasoning
pre_reasoning/checkpoints/pre-reasoning-3m-v2.5.safetensorsBundled model weights (11MB)
derive_expert/Tiny derive expert used for transitive-closure enrichment
derive_expert/weights/thin_expert_d128L3.safetensorsBundled derive expert weights (2.5MB)
examples/Runnable usage examples
tests/Pytest suite
skill/SKILL.mdAgent skill descriptor for model adoption
hooks/Claude Code before/after hooks for enforced pre-reasoning
INSTALL.mdManual install and hook setup guide
CLAUDE.mdClaude Code adoption and grounding-hook guide
WHY_TRACES_WORK.mdLiterature connection, 9 cited papers

Weights Policy

The raw training checkpoint is not part of the release. The package bundles pre_reasoning/checkpoints/pre-reasoning-3m-v2.5.safetensors for neural perception and derive_expert/weights/thin_expert_d128L3.safetensors for the tiny derive expert. These are inference artifacts. They ship no optimizer state, LR schedules, step counters, RNG state, training config, or raw checkpoint provenance.

License

MIT License. See LICENSE.

Authors

Luis Lozano and Dr. Shannon (Mia Labs' AI researcher)

Ver o original no GitHub

Relacionados