Implement Roadmap-First Retrieval and Enhance Planning AI Features
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 43s
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 1m26s
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 43s
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 1m26s
- Introduced a roadmap-first approach for retrieval, allowing for structured exercise suggestions based on stage specifications and major steps. - Added functionality to generate gap-fill offers for unfilled roadmap stages, improving the relevance of exercise recommendations. - Updated the `ExerciseProgressionPathBuilder` to support the new roadmap-first feature, enhancing user experience with clearer exercise paths. - Incremented application version to 0.8.206 and updated the database schema version to reflect these changes.
This commit is contained in:
1 parent
7411543a97
commit
d4e9bded23
10 files changed
+431
-52
No files matched your search
@@ -3,11 +3,17 @@ from planning_progression_roadmap import (
|
||||
PROMPT_SLUG_GOAL_ANALYSIS,
|
||||
PROMPT_SLUG_ROADMAP,
|
||||
PROMPT_SLUG_STAGE_SPEC,
|
||||
MajorStep,
|
||||
StageSpecArtifact,
|
||||
build_goal_analysis,
|
||||
build_roadmap_unfilled_gap_specs,
|
||||
consolidate_micro_to_major,
|
||||
develop_micro_objectives,
|
||||
progression_roadmap_to_api_dict,
|
||||
resolve_step_exercise_kind_filter,
|
||||
run_progression_roadmap_pipeline,
|
||||
stage_spec_exercise_kind_filter,
|
||||
stage_spec_retrieval_query,
|
||||
)
|
||||
from planning_exercise_semantics import build_semantic_brief
|
||||
|
||||
@@ -43,6 +49,47 @@ def test_major_steps_have_learning_goals():
|
||||
assert step.consolidates
|
||||
|
||||
|
||||
def test_stage_spec_retrieval_query_includes_learning_goal():
|
||||
brief = build_semantic_brief("Mae Geri Perfektion")
|
||||
spec = StageSpecArtifact(
|
||||
major_step_index=1,
|
||||
learning_goal="Koordination und Präzision vertiefen",
|
||||
load_profile=["präzision"],
|
||||
exercise_type="kihon_einzel",
|
||||
)
|
||||
major = MajorStep(index=1, phase="vertiefung", learning_goal=spec.learning_goal, consolidates=["m3"])
|
||||
q = stage_spec_retrieval_query(
|
||||
semantic_brief=brief,
|
||||
goal_query="Mae Geri Perfektion",
|
||||
stage_spec=spec,
|
||||
major_step=major,
|
||||
)
|
||||
assert "vertiefung" in q.lower()
|
||||
assert "Koordination" in q or "Präzision" in q
|
||||
|
||||
|
||||
def test_stage_spec_exercise_kind_filter_maps_combination():
|
||||
spec = StageSpecArtifact(major_step_index=0, exercise_type="kombination")
|
||||
assert stage_spec_exercise_kind_filter(spec) == ["combination"]
|
||||
assert resolve_step_exercise_kind_filter(spec, ["simple"]) == ["simple"]
|
||||
|
||||
|
||||
def test_build_roadmap_unfilled_gap_specs():
|
||||
brief = build_semantic_brief("Mae Geri")
|
||||
spec = StageSpecArtifact(major_step_index=2, learning_goal="Anwendung im Partnerdrill")
|
||||
major = MajorStep(index=2, phase="anwendung", learning_goal=spec.learning_goal, consolidates=["m5"])
|
||||
specs = build_roadmap_unfilled_gap_specs(
|
||||
unfilled_specs=[(2, spec)],
|
||||
major_steps_by_index={2: major},
|
||||
steps=[{"exercise_id": 1, "title": "A"}, {"exercise_id": 2, "title": "B"}],
|
||||
brief=brief,
|
||||
goal_query="Mae Geri",
|
||||
)
|
||||
assert len(specs) == 1
|
||||
assert specs[0]["source"] == "roadmap_unfilled"
|
||||
assert specs[0]["phase"] == "anwendung"
|
||||
|
||||
|
||||
def test_api_dict_exposes_prompt_slug_catalog():
|
||||
ctx = run_progression_roadmap_pipeline("Mae Geri", max_steps=3, include_llm_roadmap=False)
|
||||
api = progression_roadmap_to_api_dict(ctx)
|
||||
|
||||
Reference in new issue
Block a user