feat(steering): Kernel v0.4 Agent-Slots, Tech Debt und Review-Attention
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Failing after 4m15s
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 47s
Test Suite / pytest-backend (push) Failing after 4m15s
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
K-Ext-4/P8 deklarative Agent-Slots; P7 tech_debt Read Model und Vokabular; Review-Attention in den Kernel verlagert. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b747200f3a
commit
a5154cbd3b
31 files changed
+954
-98
No files matched your search
@@ -29,7 +29,7 @@ _ACTION_COLUMNS = """
|
||||
status, priority, due_at, sort_order, action_kind, parent_action_id, created_at, updated_at
|
||||
"""
|
||||
|
||||
ACTION_KINDS = frozenset({"delivery", "planning", "review", "bug", "issue"})
|
||||
ACTION_KINDS = frozenset({"delivery", "planning", "review", "bug", "issue", "tech_debt"})
|
||||
UNPLAN_ALLOWED_STATUSES = frozenset({"open", "ready"})
|
||||
CARRYOVER_UNPLAN_STATUSES = frozenset(
|
||||
{"open", "ready", "in_progress", "blocked", "review_required"}
|
||||
@@ -83,8 +83,8 @@ def _validate_parent_action_in_initiative(
|
||||
if not row:
|
||||
raise ValueError("Referenz-Arbeitspaket (Feature) nicht gefunden")
|
||||
action_kind = row["action_kind"] if isinstance(row, dict) else row[0]
|
||||
if action_kind in ("bug", "issue"):
|
||||
raise ValueError("Referenz muss ein Feature-Arbeitspaket sein, kein Bug/Issue")
|
||||
if action_kind in ("bug", "issue", "tech_debt"):
|
||||
raise ValueError("Referenz muss ein Feature-Arbeitspaket sein, kein Bug/Issue/Schuld")
|
||||
|
||||
|
||||
def _action_kind_to_item_kind(action_kind: str) -> str:
|
||||
@@ -92,6 +92,8 @@ def _action_kind_to_item_kind(action_kind: str) -> str:
|
||||
return "bug"
|
||||
if action_kind == "issue":
|
||||
return "issue"
|
||||
if action_kind == "tech_debt":
|
||||
return "tech_debt"
|
||||
return "story"
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ from services.operating_context import get_operating_context
|
||||
from services.plan_ist import validate_roadmap_item_in_initiative
|
||||
|
||||
BacklogStatus = Literal["new", "triaged", "accepted", "rejected", "converted"]
|
||||
BacklogItemKind = Literal["story", "bug", "issue", "epic"]
|
||||
BacklogItemKind = Literal["story", "bug", "issue", "epic", "tech_debt"]
|
||||
|
||||
BACKLOG_STATUSES = frozenset({"new", "triaged", "accepted", "rejected", "converted"})
|
||||
BACKLOG_ITEM_KINDS = frozenset({"story", "bug", "issue", "epic"})
|
||||
CONVERTIBLE_ITEM_KINDS = frozenset({"story", "bug", "issue"})
|
||||
BACKLOG_ITEM_KINDS = frozenset({"story", "bug", "issue", "epic", "tech_debt"})
|
||||
CONVERTIBLE_ITEM_KINDS = frozenset({"story", "bug", "issue", "tech_debt"})
|
||||
|
||||
_BACKLOG_COLUMNS = """
|
||||
id, tenant_id, initiative_id, title, description, status,
|
||||
@@ -89,6 +89,8 @@ def _item_kind_to_action_kind(item_kind: str) -> str:
|
||||
return "bug"
|
||||
if item_kind == "issue":
|
||||
return "issue"
|
||||
if item_kind == "tech_debt":
|
||||
return "tech_debt"
|
||||
return "delivery"
|
||||
|
||||
|
||||
|
||||
@@ -145,6 +145,19 @@ def _compatible_methods_payload(
|
||||
]
|
||||
|
||||
|
||||
def _resolve_agent_slot_config(metadata: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Governance-Konfiguration für Agent-Slots — keine Prompts."""
|
||||
defaults: dict[str, Any] = {
|
||||
"enabled_slots": ["review.due", "recurring.due", "review.guardrail"],
|
||||
"guardrail_pack": "default_v0",
|
||||
"stale_debt_days": 30,
|
||||
}
|
||||
custom = metadata.get("agent_slots") or metadata.get("agent_slot_config") or {}
|
||||
if isinstance(custom, dict):
|
||||
return {**defaults, **custom}
|
||||
return defaults
|
||||
|
||||
|
||||
def get_operating_context(
|
||||
*, tenant_id: str, initiative_id: str
|
||||
) -> Optional[dict[str, Any]]:
|
||||
@@ -190,6 +203,7 @@ def get_operating_context(
|
||||
method_key=method_key,
|
||||
steering_elements=effective_steering_elements,
|
||||
)
|
||||
agent_slot_config = _resolve_agent_slot_config(metadata)
|
||||
|
||||
return {
|
||||
"initiative_id": initiative_id,
|
||||
@@ -215,6 +229,7 @@ def get_operating_context(
|
||||
],
|
||||
"active_composition_modifier": active_composition_modifier,
|
||||
"backlog_vocabulary": backlog_vocabulary,
|
||||
"agent_slot_config": agent_slot_config,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user