Enhance Planning AI Context with Catalog Exercise Hints
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Successful in 1m15s

- Introduced support for catalog exercise hints in various functions, including `_build_stage_ai_context`, `try_suggest_ai_stage_step`, and `build_gap_fill_goal_text`, improving the contextual information available for AI suggestions.
- Added a new function `catalog_exercise_hints_block` to consolidate hints retrieval from the catalog context.
- Updated the `PlanningIntentContext` to include catalog exercise hints, ensuring they are part of the API output.
- Implemented tests to verify the inclusion of catalog exercise hints in goal text generation and rematch logic.
- Incremented version numbers and updated changelog to reflect these enhancements.
This commit is contained in:
Lars committed 2026-06-19 12:35:30 +02:00
1 parent 35fe31774b
commit 3181cc126d
11 files changed
+166 -14

No files matched your search

@@ -83,6 +83,20 @@ def test_strip_off_topic_steps_from_path():
assert [s["exercise_id"] for s in out] == [1, 2, 4]
def test_build_gap_fill_goal_text_includes_catalog_exercise_hints():
from planning_exercise_semantics import build_semantic_brief
brief = build_semantic_brief("Mae Geri")
text = build_gap_fill_goal_text(
goal_query="Mae Geri lernen",
brief=brief,
spec={"source": "roadmap_unfilled", "phase": "grundlage", "title_hint": "Stand"},
catalog_exercise_hints="Primärfokus: Kihon und Partnerübungen mit Technikbezug.",
)
assert "Katalog-Hinweise Übungsanlage" in text
assert "Kihon" in text
def test_build_gap_fill_goal_text_includes_topic():
brief = build_semantic_brief("Mae Geri Perfektion")
text = build_gap_fill_goal_text(