AP1.0: Steering Foundation — Lifecycle, Context, Signal Engine
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 1m19s
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 18s
Test Suite / playwright-smoke (push) Successful in 11s
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 1m19s
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 18s
Test Suite / playwright-smoke (push) Successful in 11s
Persistierter Standard Lifecycle pro Initiative, backend/steering/ Skeleton, Attention-Refactor und Hook-Dispatch als Basis für Method Registry. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
451d62ed46
commit
95feba6204
36 files changed
+2006
-724
No files matched your search
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,19 @@
|
||||
"""Built-in method: generic_operating — AP1.0."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from steering.lifecycle.states import STANDARD_LIFECYCLE_STEPS
|
||||
from steering.methods.registry import MethodDefinition, get_method, register_method
|
||||
|
||||
|
||||
def register() -> None:
|
||||
if get_method("generic_operating"):
|
||||
return
|
||||
register_method(
|
||||
MethodDefinition(
|
||||
key="generic_operating",
|
||||
version="0.1.0",
|
||||
description="Standard-Lifecycle ohne methodenspezifische Spezialisierung",
|
||||
default_lifecycle_steps=STANDARD_LIFECYCLE_STEPS,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,33 @@
|
||||
"""Method Registry — built-in steering methods (AP1.0)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
_METHODS: dict[str, "MethodDefinition"] = {}
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class MethodDefinition:
|
||||
key: str
|
||||
version: str
|
||||
description: str
|
||||
default_lifecycle_steps: tuple[str, ...]
|
||||
|
||||
|
||||
def register_method(defn: MethodDefinition) -> None:
|
||||
if defn.key in _METHODS:
|
||||
raise ValueError(f"Method already registered: {defn.key}")
|
||||
_METHODS[defn.key] = defn
|
||||
|
||||
|
||||
def get_method(key: str) -> MethodDefinition | None:
|
||||
return _METHODS.get(key)
|
||||
|
||||
|
||||
def list_methods() -> tuple[MethodDefinition, ...]:
|
||||
return tuple(_METHODS.values())
|
||||
|
||||
|
||||
def clear_methods_for_tests() -> None:
|
||||
_METHODS.clear()
|
||||
Reference in new issue
Block a user