AP1.16d + AP1.9c: Planning Debt in Attention und Cockpit-Signale.
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 2m18s
Test Suite / lint-backend (push) Successful in 2s
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 2m18s
Test Suite / lint-backend (push) Successful in 2s
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
Attention-Regeln planning_debt/execution_waiting; Portfolio-Kacheln zeigen Steuerungssignale. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8546c7021b
commit
b9bfa9e5bd
13 files changed
+352
-12
No files matched your search
@@ -111,6 +111,77 @@ def compute_planning_debt(
|
||||
return debts
|
||||
|
||||
|
||||
def planning_debt_to_attention_items(
|
||||
*,
|
||||
initiative_id: str,
|
||||
debts: list[dict[str, Any]],
|
||||
) -> list[dict[str, Any]]:
|
||||
"""Map Planning Debt read model → Attention Items (AP1.16d)."""
|
||||
items: list[dict[str, Any]] = []
|
||||
for debt in debts:
|
||||
gate_id = str(debt["roadmap_item_id"])
|
||||
items.append(
|
||||
{
|
||||
"kind": "planning_debt",
|
||||
"severity": "warning",
|
||||
"title": debt.get("title") or "Zielzustand",
|
||||
"summary": debt.get("message") or "Durchführungsplan fehlt",
|
||||
"scope_type": "milestone",
|
||||
"scope_id": gate_id,
|
||||
"initiative_id": initiative_id,
|
||||
"action_id": None,
|
||||
"blocker_id": None,
|
||||
"milestone_id": gate_id,
|
||||
"reason_code": "planning_debt",
|
||||
"data_source": "execution_graph",
|
||||
}
|
||||
)
|
||||
return items
|
||||
|
||||
|
||||
def execution_waiting_to_attention_items(
|
||||
*,
|
||||
initiative_id: str,
|
||||
actions: list[dict[str, Any]],
|
||||
graph_state: dict[str, Any],
|
||||
) -> list[dict[str, Any]]:
|
||||
"""Actions blocked by Execution-Graph (nicht Status=blocked) → Attention."""
|
||||
action_by_id = {str(action["id"]): action for action in actions}
|
||||
items: list[dict[str, Any]] = []
|
||||
for action_id in graph_state.get("blocked_actions", []):
|
||||
action = action_by_id.get(str(action_id))
|
||||
if not action:
|
||||
continue
|
||||
if action.get("status") in ("done", "discarded", "blocked"):
|
||||
continue
|
||||
meta = graph_state.get("items", {}).get(str(action_id), {})
|
||||
blocked_by = meta.get("blocked_by") or []
|
||||
summary = (
|
||||
"Wartet auf Vorgänger-Arbeitspaket"
|
||||
if len(blocked_by) == 1
|
||||
else f"Wartet auf {len(blocked_by)} Vorgänger"
|
||||
)
|
||||
items.append(
|
||||
{
|
||||
"kind": "execution_waiting",
|
||||
"severity": "info",
|
||||
"title": action.get("title") or "Arbeitspaket",
|
||||
"summary": summary,
|
||||
"scope_type": "action",
|
||||
"scope_id": str(action_id),
|
||||
"initiative_id": initiative_id,
|
||||
"action_id": str(action_id),
|
||||
"blocker_id": None,
|
||||
"milestone_id": (
|
||||
str(action["roadmap_item_id"]) if action.get("roadmap_item_id") else None
|
||||
),
|
||||
"reason_code": "execution_waiting",
|
||||
"data_source": "execution_graph",
|
||||
}
|
||||
)
|
||||
return items
|
||||
|
||||
|
||||
def compute_execution_graph_state(
|
||||
*,
|
||||
actions: list[dict[str, Any]],
|
||||
|
||||
Reference in new issue
Block a user