All checks were successful
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 3m56s
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 13s
backlog_epic_hierarchy als Steuerungselement, effektive steering_elements im Operating Context, Backend-Guards und UI ohne Slice-Ifs. Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
"""Effective method contract — primary + composition modifier (AP2.4)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from steering.methods.registry import get_method
|
|
|
|
PLAN_PHASE_MODIFIER_KEY = "agile_iteration"
|
|
|
|
|
|
def resolve_effective_steering_elements(
|
|
primary_method_key: str,
|
|
*,
|
|
data_slices: list[str],
|
|
active_composition_modifier: str | None,
|
|
) -> frozenset[str]:
|
|
"""
|
|
Primärmethode + aktiver Modifier; Plan-Phase: agile_iteration wenn work_cycles
|
|
Slice aktiv und Methode komponierbar (Epic-Planung vor aktivem Sprint).
|
|
"""
|
|
primary = get_method(primary_method_key)
|
|
elements: set[str] = set(primary.steering_elements if primary else [])
|
|
|
|
modifier_keys: list[str] = []
|
|
if active_composition_modifier:
|
|
modifier_keys.append(active_composition_modifier)
|
|
elif "work_cycles" in data_slices:
|
|
agile = get_method(PLAN_PHASE_MODIFIER_KEY)
|
|
if agile and primary_method_key in agile.composes_with:
|
|
modifier_keys.append(PLAN_PHASE_MODIFIER_KEY)
|
|
|
|
for modifier_key in modifier_keys:
|
|
modifier = get_method(modifier_key)
|
|
if modifier:
|
|
elements.update(modifier.steering_elements)
|
|
|
|
return frozenset(elements)
|