feat(steering): Backlog-Vokabular aus Methoden-Vertrag (ADP P3)
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
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>
This commit is contained in:
1 parent
f33135b87f
commit
a3b14d9c00
18 files changed
+489
-35
No files matched your search
@@ -0,0 +1,95 @@
|
||||
"""Profilgebundenes Backlog-Vokabular — ADP P3 / AP2.4 Methoden-Vertrag."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
_EMPTY: dict[str, Any] = {
|
||||
"profile_key": "none",
|
||||
"kinds": [],
|
||||
"labels": {},
|
||||
"default_kind": "story",
|
||||
"epic_hierarchy": False,
|
||||
"convertible_kinds": [],
|
||||
"capabilities": {
|
||||
"sprint_commit": False,
|
||||
"epic_hierarchy": False,
|
||||
},
|
||||
}
|
||||
|
||||
_AGILE_INTAKE: dict[str, Any] = {
|
||||
"profile_key": "agile_intake",
|
||||
"kinds": ["epic", "story", "bug", "issue"],
|
||||
"labels": {
|
||||
"epic": "Epic",
|
||||
"story": "Story",
|
||||
"bug": "Bug",
|
||||
"issue": "Issue",
|
||||
},
|
||||
"default_kind": "story",
|
||||
"epic_hierarchy": True,
|
||||
"convertible_kinds": ["story", "bug", "issue"],
|
||||
}
|
||||
|
||||
_CONTINUOUS_INTAKE: dict[str, Any] = {
|
||||
"profile_key": "continuous_intake",
|
||||
"kinds": ["story", "bug", "issue"],
|
||||
"labels": {
|
||||
"story": "Idee",
|
||||
"bug": "Bug",
|
||||
"issue": "Störung",
|
||||
},
|
||||
"default_kind": "story",
|
||||
"epic_hierarchy": False,
|
||||
"convertible_kinds": ["story", "bug", "issue"],
|
||||
}
|
||||
|
||||
_STANDARD_INTAKE: dict[str, Any] = {
|
||||
"profile_key": "standard_intake",
|
||||
"kinds": ["story", "bug", "issue"],
|
||||
"labels": {
|
||||
"story": "Story",
|
||||
"bug": "Bug",
|
||||
"issue": "Issue",
|
||||
},
|
||||
"default_kind": "story",
|
||||
"epic_hierarchy": False,
|
||||
"convertible_kinds": ["story", "bug", "issue"],
|
||||
}
|
||||
|
||||
|
||||
def _with_capabilities(
|
||||
vocabulary: dict[str, Any],
|
||||
*,
|
||||
steering_elements: frozenset[str],
|
||||
) -> dict[str, Any]:
|
||||
result = dict(vocabulary)
|
||||
sprint_commit = "work_cycle_scope" in steering_elements
|
||||
epic_hierarchy = "backlog_epic_hierarchy" in steering_elements
|
||||
result["epic_hierarchy"] = epic_hierarchy
|
||||
result["capabilities"] = {
|
||||
"sprint_commit": sprint_commit,
|
||||
"epic_hierarchy": epic_hierarchy,
|
||||
}
|
||||
return result
|
||||
|
||||
|
||||
def resolve_backlog_vocabulary(
|
||||
*,
|
||||
data_slices: list[str],
|
||||
method_key: str,
|
||||
steering_elements: frozenset[str],
|
||||
) -> dict[str, Any]:
|
||||
"""Backlog-Typen/Labels aus effektivem Methoden-Vertrag — nicht aus Page-Ifs."""
|
||||
if "backlog" not in data_slices:
|
||||
return dict(_EMPTY)
|
||||
|
||||
if "backlog_epic_hierarchy" in steering_elements:
|
||||
return _with_capabilities(dict(_AGILE_INTAKE), steering_elements=steering_elements)
|
||||
|
||||
if method_key == "continuous_product":
|
||||
return _with_capabilities(
|
||||
dict(_CONTINUOUS_INTAKE), steering_elements=steering_elements
|
||||
)
|
||||
|
||||
return _with_capabilities(dict(_STANDARD_INTAKE), steering_elements=steering_elements)
|
||||
@@ -0,0 +1,36 @@
|
||||
"""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)
|
||||
@@ -41,6 +41,12 @@ STEERING_ELEMENTS: dict[str, SteeringElementDefinition] = {
|
||||
description="Aktive work_cycle und Sprint-Backlog",
|
||||
modes=("work", "plan"),
|
||||
),
|
||||
"backlog_epic_hierarchy": SteeringElementDefinition(
|
||||
key="backlog_epic_hierarchy",
|
||||
label="Epic-Hierarchie",
|
||||
description="Epic-Container und Story-Baum im Plan-Eingang (Agile-Modifier)",
|
||||
modes=("plan",),
|
||||
),
|
||||
"recurring_rhythm": SteeringElementDefinition(
|
||||
key="recurring_rhythm",
|
||||
label="Rhythmen",
|
||||
|
||||
@@ -76,7 +76,8 @@ def register() -> None:
|
||||
"initiative.recurring_program",
|
||||
}
|
||||
),
|
||||
steering_elements=ELEM_NEXT | frozenset({"work_cycle_scope"}),
|
||||
steering_elements=ELEM_NEXT
|
||||
| frozenset({"work_cycle_scope", "backlog_epic_hierarchy"}),
|
||||
ui_features=frozenset({"steeringSnapshotOnWorkSprint"}),
|
||||
graph_profile=STRICT,
|
||||
method_role="modifier",
|
||||
|
||||
Reference in new issue
Block a user