feat(steering): K-Ext-2 Attention-Registry, Gate/Intake-Proposals, generische UI
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 4m13s
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 19s
Test Suite / playwright-smoke (push) Successful in 12s
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 4m13s
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 19s
Test Suite / playwright-smoke (push) Successful in 12s
Methodenuebergreifende Provider auf Kernel v0.3; verbindliche Coding Rules fuer Agenten in ADP und .cursor/rules. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
1bbc5dbfce
commit
b747200f3a
29 files changed
+1364
-182
No files matched your search
@@ -0,0 +1,27 @@
|
||||
"""Execution graph read model — critical_path / gate_fulfillment."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from steering.eval_context import SteeringEvalContext
|
||||
from steering.graph.execution_engine import compute_execution_graph_state
|
||||
|
||||
|
||||
def compute_execution_graph_read_model(ctx: SteeringEvalContext) -> dict[str, Any]:
|
||||
from services.execution_plan import list_dependencies_for_initiative
|
||||
from steering.strategies.next_action.execution_ready import (
|
||||
gate_horizon_scope_for_method,
|
||||
)
|
||||
|
||||
gate_scope = gate_horizon_scope_for_method(
|
||||
ctx.binding.primary_method_key, ctx.tenant_ctx, ctx.initiative_id
|
||||
)
|
||||
dependencies = list_dependencies_for_initiative(
|
||||
tenant_id=ctx.tenant_ctx.tenant_id, initiative_id=ctx.initiative_id
|
||||
)
|
||||
return compute_execution_graph_state(
|
||||
actions=ctx.actions,
|
||||
dependencies=dependencies,
|
||||
scope_roadmap_item_id=gate_scope,
|
||||
)
|
||||
@@ -0,0 +1,36 @@
|
||||
"""Planning debt read model — gate_fulfillment."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from steering.eval_context import SteeringEvalContext
|
||||
from steering.graph.execution_engine import compute_planning_debt
|
||||
|
||||
|
||||
def compute_planning_debt_read_model(ctx: SteeringEvalContext) -> list[dict[str, Any]]:
|
||||
from services import roadmap as roadmap_service
|
||||
from steering.strategies.next_action.execution_ready import (
|
||||
gate_horizon_scope_for_method,
|
||||
)
|
||||
|
||||
gate_scope = gate_horizon_scope_for_method(
|
||||
ctx.binding.primary_method_key, ctx.tenant_ctx, ctx.initiative_id
|
||||
)
|
||||
roadmap_items = roadmap_service.list_roadmap_items_for_initiative(
|
||||
tenant_id=ctx.tenant_ctx.tenant_id, initiative_id=ctx.initiative_id
|
||||
)
|
||||
actions = ctx.actions
|
||||
|
||||
scoped_roadmap = roadmap_items
|
||||
scoped_actions = actions
|
||||
if gate_scope:
|
||||
scope = str(gate_scope)
|
||||
scoped_roadmap = [ri for ri in roadmap_items if str(ri.get("id")) == scope]
|
||||
scoped_actions = [
|
||||
a
|
||||
for a in actions
|
||||
if a.get("roadmap_item_id") and str(a["roadmap_item_id"]) == scope
|
||||
]
|
||||
|
||||
return compute_planning_debt(actions=scoped_actions, roadmap_items=scoped_roadmap)
|
||||
@@ -16,6 +16,7 @@ class ReadModelProvider:
|
||||
requires_elements: frozenset[str]
|
||||
requires_data_slices: frozenset[str]
|
||||
compute: ReadModelCompute
|
||||
requires_any_element: frozenset[str] = frozenset()
|
||||
|
||||
|
||||
_PROVIDERS: list[ReadModelProvider] = []
|
||||
@@ -34,6 +35,10 @@ def compute_read_models(ctx: SteeringEvalContext) -> dict[str, Any]:
|
||||
for provider in _PROVIDERS:
|
||||
if provider.requires_elements and not provider.requires_elements <= elements:
|
||||
continue
|
||||
if provider.requires_any_element and not (
|
||||
provider.requires_any_element & elements
|
||||
):
|
||||
continue
|
||||
if provider.requires_data_slices and not provider.requires_data_slices <= slices:
|
||||
continue
|
||||
result[provider.key] = provider.compute(ctx)
|
||||
@@ -43,6 +48,8 @@ def compute_read_models(ctx: SteeringEvalContext) -> dict[str, Any]:
|
||||
|
||||
def _register_builtin_read_models() -> None:
|
||||
from steering.read_models.epic_rollup import compute_epic_rollup
|
||||
from steering.read_models.execution_graph import compute_execution_graph_read_model
|
||||
from steering.read_models.planning_debt import compute_planning_debt_read_model
|
||||
|
||||
register_read_model(
|
||||
ReadModelProvider(
|
||||
@@ -55,6 +62,23 @@ def _register_builtin_read_models() -> None:
|
||||
),
|
||||
)
|
||||
)
|
||||
register_read_model(
|
||||
ReadModelProvider(
|
||||
key="planning_debt",
|
||||
requires_elements=frozenset({"gate_fulfillment"}),
|
||||
requires_data_slices=frozenset({"roadmap", "actions"}),
|
||||
compute=compute_planning_debt_read_model,
|
||||
)
|
||||
)
|
||||
register_read_model(
|
||||
ReadModelProvider(
|
||||
key="execution_graph",
|
||||
requires_elements=frozenset(),
|
||||
requires_any_element=frozenset({"critical_path", "gate_fulfillment"}),
|
||||
requires_data_slices=frozenset({"actions"}),
|
||||
compute=compute_execution_graph_read_model,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
_register_builtin_read_models()
|
||||
Reference in new issue
Block a user