Thanks for the reply.
I had some chats with AI about how this might fit into the codebase, to sanity-check that this could be added without redesigning anything.
Conceptually, with your discussion, I’m thinking of goal/context as a soft bias field over inference and action trajectories (i.e. shaping which hypotheses and next actions are dynamically preferred over time). From a code point of view, that seems like it could be represented pretty cleanly as a small top-down prior applied during hypothesis scoring, without touching CMP or the voting logic.
So the idea would be to add a typed ‘apical’ side-channel (parallel to CMP), and initially use it in one place: as a bias term during evidence-matching hypothesis scoring.
Just an explicit way to represent and apply top-down feedback (goal states, predicted states, causal/timing influences). The biological differentiation of these categories is obviously fuzzy, but for code it probably helps to have a small enum for clarity.
1) Minimal types (one new file)
Add apical_signals.py containing something like:
ApicalSignal(
kind=GOAL_STATE | PREDICTED_STATE | CAUSAL_HINT | TIMING_HINT | POLICY_BIAS | ATTENTION_HINT,
ref=<typed ref>,
confidence,
horizon,
priority,
ttl,
source_id,
target_scope/ids
)
ApicalBundle(step_index).merge(incoming) with deterministic merge rules, e.g.:
-
GOAL_STATE
At most one active per (target_scope, target_ids).
If multiple arrive, keep the highest (priority, confidence) and log which were suppressed.
-
PREDICTED_STATE
Keep top-k by (confidence * priority) for a given target scope.
-
POLICY_BIAS / ATTENTION_HINT
Combine as normalized weights (e.g. weighted average), so multiple weak hints can sum to a meaningful bias.
-
CAUSAL_HINT / TIMING_HINT
Accumulate as annotations on the bundle (don’t replace payload identity), mainly for conditioning downstream logic or debugging.
Payload refs for MVP would just be typed handles:
HypothesisRef, SymbolRef, FeatureRef, ActionRef
2) Minimal plumbing (backward compatible)
Optional no-op hooks on modules/policy:
produce_apical_signals() -> list[ApicalSignal]
consume_apical_bundle(bundle) -> None
In the MontyBase step loop:
collect signals → merge bundle → dispatch bundle
If the bundle is empty or the feature flag is off, behavior is standard Monty.
3) MVP: one choke point, no CMP/voting changes
Implement Option A (MVP): apical priors in hypothesis scoring inside the evidence-matching LM:
Add one function:
apply_apical_bias(scores, apical_bundle)
Conceptually:
-
For each hypothesis h with base score S(h)
-
If there is an apical signal targeting h (or its feature/action ref), adjust:
S'(h) = S(h) * (1 + w * confidence * priority)
or equivalently add a small log-prior / offset term.
This keeps the effect soft:
-
no hypothesis is forced on/off
-
apical signals only tilt rankings
-
if signals are wrong or absent, the system falls back to pure evidence
No changes to CMP, voting, or hypothesis structures.
4) Debugging / introspection
Log signals received and their effect:
So it’s obvious when top-down signals actually mattered vs when they were inert.
I haven’t looked at the roadmap yet and this is just a general idea, but I can try a small PR if it’s useful. It might take me a bit of time though. If the team is already working on this area, we can just leave it as discussion.