Kairo-Jinkendo/backend/method_profiles/registry.py
Lars 3bd983297b
Some checks failed
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Failing after 2m2s
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 3s
Test Suite / compose-smoke (push) Has been skipped
AP2.0: Archetyp-Katalog, Method-Stubs und sichtbare Steuerung in Kontrolle.
PO-Dokumente (ADP v0.2, MVP v0.3) und Minimal Complete Slice: Registry-Methoden, Initiative/Project-Spiegel, Default-Methode bei Anlage, Lagebild mit Archetyp und Guidance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 10:44:38 +02:00

64 lines
2.1 KiB
Python

"""Referenz-Ausprägungen (Method Profiles) — Code-Seeds AP2.0b."""
from __future__ import annotations
from typing import Any, Optional
METHOD_PROFILES: tuple[dict[str, Any], ...] = (
{
"key": "maturity.karate_kumite",
"label": "Karate Kumite",
"description": "Mehrere Fähigkeiten mit Stufen, Routinen und Voraussetzungs-Graph.",
"initiative_archetype_key": "initiative.maturity_journey",
"method_key": "maturity_progression",
"seed_hints": {
"skill_count": 8,
"stages_per_skill": "5-7",
"graph_prerequisites": True,
},
},
{
"key": "content.book_writing",
"label": "Buch schreiben",
"description": "Kapitelstruktur, Schreib-APs, Review-Gates.",
"initiative_archetype_key": "initiative.content_project",
"method_key": "chapter_based_progression",
"seed_hints": {
"roadmap_item_type": "chapter",
"review_gates": True,
},
},
{
"key": "product.kairo_dev",
"label": "Kairo Entwicklung",
"description": "Kontinuierliches Produkt mit Gate-Orientierung und optionaler Sprint-Zeitbox.",
"initiative_archetype_key": "initiative.product",
"method_key": "continuous_product",
"seed_hints": {
"agile_iteration_profile": True,
"default_actor_setup": "po_plus_vibe_coder",
},
},
)
_PROFILE_INDEX = {item["key"]: item for item in METHOD_PROFILES}
def get_method_profile(key: str) -> Optional[dict[str, Any]]:
item = _PROFILE_INDEX.get(key)
return dict(item) if item else None
def list_method_profiles(*, initiative_archetype_key: Optional[str] = None) -> list[dict[str, Any]]:
items = METHOD_PROFILES
if initiative_archetype_key:
items = tuple(
i for i in items if i["initiative_archetype_key"] == initiative_archetype_key
)
return [dict(item) for item in items]
def resolve_method_for_profile(profile_key: str) -> Optional[str]:
profile = get_method_profile(profile_key)
return profile["method_key"] if profile else None