Some checks failed
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Failing after 4m15s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
K-Ext-4/P8 deklarative Agent-Slots; P7 tech_debt Read Model und Vokabular; Review-Attention in den Kernel verlagert. Co-authored-by: Cursor <cursoragent@cursor.com>
92 lines
2.6 KiB
Python
92 lines
2.6 KiB
Python
"""Steering Kernel Spine — single entry point v0.4."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from steering.kernel.attention import evaluate_attention
|
|
from steering.kernel.binding import resolve_steering_binding
|
|
from steering.eval_context import build_steering_eval_context
|
|
from steering.kernel.horizon import resolve_horizon
|
|
from steering.kernel.lifecycle import resolve_lifecycle_context
|
|
from steering.kernel.models import SteeringEvaluation
|
|
from steering.kernel.next_work import evaluate_next_work
|
|
from steering.agent_slots.registry import compute_agent_slots
|
|
from steering.proposals.registry import compute_proposals
|
|
from steering.read_models.registry import compute_read_models
|
|
from tenant_context import TenantContext
|
|
|
|
|
|
def evaluate_steering(
|
|
ctx: TenantContext,
|
|
*,
|
|
initiative_id: str,
|
|
next_work_limit: int = 10,
|
|
attention_limit: int = 20,
|
|
) -> SteeringEvaluation:
|
|
"""
|
|
Herzmaschine — ein Wahrheitsmodell pro Vorhaben.
|
|
|
|
Alle Initiative-Steuerung (Snapshot, Cockpit, API) muss hier durch.
|
|
"""
|
|
if next_work_limit < 1:
|
|
next_work_limit = 1
|
|
if attention_limit < 1:
|
|
attention_limit = 1
|
|
|
|
binding = resolve_steering_binding(ctx, initiative_id)
|
|
lifecycle = resolve_lifecycle_context(
|
|
ctx, initiative_id=initiative_id, binding=binding
|
|
)
|
|
horizon = resolve_horizon(
|
|
ctx,
|
|
initiative_id=initiative_id,
|
|
primary_method_key=binding.primary_method_key,
|
|
composition_modifier=binding.composition_modifier,
|
|
)
|
|
|
|
eval_ctx = build_steering_eval_context(
|
|
ctx,
|
|
initiative_id=initiative_id,
|
|
binding=binding,
|
|
horizon=horizon,
|
|
lifecycle=lifecycle,
|
|
)
|
|
|
|
next_work = evaluate_next_work(
|
|
ctx,
|
|
initiative_id=initiative_id,
|
|
binding=binding,
|
|
horizon=horizon,
|
|
limit=next_work_limit,
|
|
)
|
|
|
|
read_models = compute_read_models(eval_ctx)
|
|
proposals = compute_proposals(eval_ctx, read_models=read_models)
|
|
|
|
attention = evaluate_attention(
|
|
ctx,
|
|
initiative_id=initiative_id,
|
|
binding=binding,
|
|
horizon=horizon,
|
|
next_work=next_work,
|
|
read_models=read_models,
|
|
proposals=proposals,
|
|
eval_ctx=eval_ctx,
|
|
limit=attention_limit,
|
|
)
|
|
|
|
agent_slots = compute_agent_slots(
|
|
eval_ctx, read_models=read_models, proposals=proposals
|
|
)
|
|
|
|
return SteeringEvaluation(
|
|
initiative_id=initiative_id,
|
|
binding=binding,
|
|
horizon=horizon,
|
|
lifecycle=lifecycle,
|
|
next_work=next_work,
|
|
attention=attention,
|
|
read_models=read_models,
|
|
proposals=proposals,
|
|
agent_slots=agent_slots,
|
|
)
|