Implement Roadmap Review Features and Enhance Progression Path Management
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 47s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m13s
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 47s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m13s
- Added support for editable major steps in the roadmap, allowing users to modify phase, learning goals, and order before exercise matching. - Introduced a new `roadmap_override` feature to facilitate customized retrieval without re-invoking the roadmap AI. - Updated the `ExerciseProgressionPathBuilder` component to incorporate these new features, enhancing user interaction and flexibility. - Incremented application version to 0.8.207 to reflect these changes.
This commit is contained in:
1 parent
0677663268
commit
f074a8bef0
9 files changed
+514
-76
No files matched your search
@@ -109,6 +109,13 @@ class StageSpecArtifact(BaseModel):
|
||||
anti_patterns: List[str] = Field(default_factory=list)
|
||||
|
||||
|
||||
class RoadmapOverridePayload(BaseModel):
|
||||
"""Vom Trainer bearbeitete Major Steps — steuert Retrieval ohne erneute Roadmap-KI."""
|
||||
|
||||
major_steps: List[MajorStep] = Field(..., min_length=2, max_length=10)
|
||||
stage_specs: Optional[List[StageSpecArtifact]] = None
|
||||
|
||||
|
||||
class ProgressionRoadmapContext(BaseModel):
|
||||
goal_query: str
|
||||
max_steps: int = Field(ge=2, le=10, default=5)
|
||||
@@ -551,6 +558,80 @@ def build_stage_specs(
|
||||
return specs
|
||||
|
||||
|
||||
def normalize_major_steps_for_override(
|
||||
major_steps: Sequence[MajorStep],
|
||||
*,
|
||||
max_steps: int,
|
||||
) -> List[MajorStep]:
|
||||
"""Indizes 0…n-1, mindestens 2, höchstens max_steps Major Steps."""
|
||||
cleaned: List[MajorStep] = []
|
||||
for raw in list(major_steps)[:max_steps]:
|
||||
goal = (raw.learning_goal or "").strip()
|
||||
phase = (raw.phase or "vertiefung").strip().lower()
|
||||
if not goal:
|
||||
continue
|
||||
cleaned.append(
|
||||
MajorStep(
|
||||
index=len(cleaned),
|
||||
phase=phase,
|
||||
learning_goal=goal,
|
||||
consolidates=list(raw.consolidates or []),
|
||||
rationale=(raw.rationale or "").strip(),
|
||||
)
|
||||
)
|
||||
if len(cleaned) < 2:
|
||||
raise ValueError("Mindestens zwei Major Steps mit Lernziel nötig")
|
||||
for i, step in enumerate(cleaned):
|
||||
step.index = i
|
||||
return cleaned
|
||||
|
||||
|
||||
def roadmap_context_from_override(
|
||||
goal_query: str,
|
||||
*,
|
||||
max_steps: int,
|
||||
semantic_brief: PlanningSemanticBrief,
|
||||
override: RoadmapOverridePayload,
|
||||
) -> ProgressionRoadmapContext:
|
||||
"""Phase F4: bearbeitete Roadmap → stage_specs → Retrieval (ohne LLM-Roadmap)."""
|
||||
majors = normalize_major_steps_for_override(override.major_steps, max_steps=max_steps)
|
||||
effective_max = len(majors)
|
||||
goal_analysis = build_goal_analysis(goal_query, semantic_brief)
|
||||
stage_specs: List[StageSpecArtifact]
|
||||
if override.stage_specs and len(override.stage_specs) >= effective_max:
|
||||
stage_specs = []
|
||||
for i, spec in enumerate(override.stage_specs[:effective_max]):
|
||||
stage_specs.append(
|
||||
StageSpecArtifact(
|
||||
major_step_index=i,
|
||||
learning_goal=(spec.learning_goal or majors[i].learning_goal).strip(),
|
||||
load_profile=list(spec.load_profile or []),
|
||||
exercise_type=(spec.exercise_type or "").strip(),
|
||||
success_criteria=list(spec.success_criteria or []),
|
||||
anti_patterns=list(spec.anti_patterns or []),
|
||||
)
|
||||
)
|
||||
if not all(s.exercise_type for s in stage_specs):
|
||||
rebuilt = build_stage_specs(majors, goal_analysis=goal_analysis)
|
||||
for i, spec in enumerate(stage_specs):
|
||||
if not spec.exercise_type:
|
||||
spec.exercise_type = rebuilt[i].exercise_type
|
||||
if not spec.load_profile:
|
||||
spec.load_profile = list(rebuilt[i].load_profile)
|
||||
else:
|
||||
stage_specs = build_stage_specs(majors, goal_analysis=goal_analysis)
|
||||
|
||||
return ProgressionRoadmapContext(
|
||||
goal_query=goal_query.strip(),
|
||||
max_steps=effective_max,
|
||||
semantic_brief=brief_to_summary_dict(semantic_brief),
|
||||
goal_analysis=goal_analysis,
|
||||
roadmap=RoadmapArtifact(major_steps=majors),
|
||||
stage_specs=stage_specs,
|
||||
pipeline_phase="roadmap_v1_edited",
|
||||
)
|
||||
|
||||
|
||||
def run_progression_roadmap_pipeline(
|
||||
goal_query: str,
|
||||
*,
|
||||
@@ -652,6 +733,9 @@ __all__ = [
|
||||
"MicroObjective",
|
||||
"ProgressionRoadmapContext",
|
||||
"RoadmapArtifact",
|
||||
"RoadmapOverridePayload",
|
||||
"normalize_major_steps_for_override",
|
||||
"roadmap_context_from_override",
|
||||
"StageSpecArtifact",
|
||||
"build_goal_analysis",
|
||||
"build_roadmap_unfilled_gap_specs",
|
||||
|
||||
Reference in new issue
Block a user