feat(steering): Kernel Spine v0.1.1 als zentraler Initiative-Einstieg
Deploy Development / deploy (push) Successful in 48s
Test Suite / pytest-backend (push) Failing after 3m33s
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
Deploy Development / deploy (push) Successful in 48s
Test Suite / pytest-backend (push) Failing after 3m33s
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
evaluate_steering() vereinheitlicht Horizon, Next Work und Attention; Snapshot und Signal Engine delegieren dorthin; slot_map deklarativ fuer sequential_dependency und generic_operating. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
753f178b0c
commit
75a6a63665
20 files changed
+923
-51
No files matched your search
@@ -10,10 +10,10 @@ from typing import Any, Optional
|
||||
from psycopg2.extras import RealDictCursor
|
||||
|
||||
from db import get_connection
|
||||
from data_layer.attention import get_next_action_candidates_for_initiative
|
||||
from entity_archetypes.registry import archetype_label
|
||||
from method_profiles.registry import get_method_profile
|
||||
from steering.context import get_steering_context_dto
|
||||
from steering.kernel import evaluate_steering
|
||||
from steering.signals.snapshot_signals import derive_initiative_signals
|
||||
from services.initiatives import get_initiative
|
||||
from tenant_context import TenantContext
|
||||
@@ -293,9 +293,9 @@ def get_initiative_steering_snapshot(
|
||||
key=lambda m: (m["target_date"] is None, m["target_date"] or ""),
|
||||
)[:5]
|
||||
|
||||
next_actions = get_next_action_candidates_for_initiative(
|
||||
ctx, initiative_id=initiative_id, limit=5
|
||||
)
|
||||
evaluation = evaluate_steering(ctx, initiative_id=initiative_id, next_work_limit=5)
|
||||
next_actions = evaluation.next_work
|
||||
kernel_attention = evaluation.attention
|
||||
|
||||
steering = get_steering_context_dto(ctx, initiative_id=initiative_id)
|
||||
metadata = steering.get("lifecycle_metadata") or {}
|
||||
@@ -335,8 +335,22 @@ def get_initiative_steering_snapshot(
|
||||
signals=signals,
|
||||
method_key=steering["method_key"],
|
||||
),
|
||||
"attention_items": _attention_items(signals),
|
||||
"attention_items": _attention_items(signals)
|
||||
+ [
|
||||
{
|
||||
"code": item.get("reason_code") or item.get("kind", "attention"),
|
||||
"label": item.get("summary") or item.get("title") or "Attention",
|
||||
}
|
||||
for item in kernel_attention[:5]
|
||||
],
|
||||
"signals": signals,
|
||||
"steering_kernel": {
|
||||
"horizon": evaluation.horizon.to_dict(),
|
||||
"lifecycle": evaluation.lifecycle.to_dict(),
|
||||
"primary_method_key": evaluation.binding.primary_method_key,
|
||||
"composition_modifier": evaluation.binding.composition_modifier,
|
||||
"data_source": evaluation.data_source,
|
||||
},
|
||||
"upcoming_milestones": upcoming_milestones,
|
||||
"upcoming_roadmap_items": upcoming_milestones,
|
||||
"next_actions": next_actions,
|
||||
|
||||
Reference in new issue
Block a user