AP2.2a: Archetyp-Starter-Kits und MVP Execution Plan v0.2.
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 2m40s
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 18s
Test Suite / playwright-smoke (push) Successful in 13s

Referenz-Vorhaben A1/A2/B2b/B2a per UI anlegbar mit gefuehrter Starter-Struktur; Dogfooding-Seed deprecated. Plan-Korrektur: Execution Plan v0.2 statt Seed-Spiegel als Prioritaet.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-12 16:02:09 +02:00
1 parent a097a82e17
commit 2b0d5dd3d9
18 files changed
+1050 -87

No files matched your search

+19 -1
View File
@@ -5,7 +5,8 @@ from __future__ import annotations
from typing import Optional
from capabilities import require_capability
from entity_archetypes import list_archetypes
from entity_archetypes import list_archetypes, validate_archetype_key
from services.archetype_starter_kit import get_starter_preview
from entity_fields.service import list_field_definitions
from fastapi import APIRouter, Depends, HTTPException, Query
from tenant_context import TenantContext
@@ -33,3 +34,20 @@ def get_archetype_field_definitions(
if not any(item["key"] == archetype_key for item in archetypes):
raise HTTPException(status_code=404, detail="Archetyp nicht gefunden")
return list_field_definitions(archetype_key=archetype_key)
@router.get("/{archetype_key}/starter-preview")
def get_archetype_starter_preview(
archetype_key: str,
method_profile_key: Optional[str] = Query(default=None),
ctx: TenantContext = Depends(require_capability("kairo.initiative.read")),
):
_ = ctx
try:
validate_archetype_key(entity_type="initiative", archetype_key=archetype_key)
except ValueError as exc:
raise HTTPException(status_code=404, detail=str(exc)) from exc
return get_starter_preview(
archetype_key=archetype_key,
method_profile_key=method_profile_key,
)
+2
View File
@@ -39,6 +39,7 @@ class InitiativeCreateRequest(BaseModel):
priority: Literal["low", "normal", "high"] = "normal"
owner_actor_id: Optional[str] = None
method_profile_key: Optional[str] = Field(default=None, min_length=1)
apply_starter_kit: bool = True
class InitiativeUpdateRequest(BaseModel):
@@ -165,6 +166,7 @@ def create_initiative(
owner_actor_id=owner_actor_id,
user_id=ctx.user_id,
method_profile_key=body.method_profile_key,
apply_starter_kit=body.apply_starter_kit,
)
except ValueError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc