Enhance Planning Context with Progression Gap Snapshot and Start/Target Analysis
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 42s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Successful in 1m13s

- Introduced `build_progression_gap_snapshot` function to create a compact roadmap context for gap exercises, integrating start situation, target state, and stage specifications.
- Updated `build_gap_fill_goal_text` to include roadmap snapshot details, enhancing the context for AI-generated exercises.
- Enhanced `ProgressionPathSuggestRequest` and related components to support new structured inputs for start/target analysis, improving user experience and AI suggestions.
- Incremented application version to 0.8.212 to reflect these changes.
This commit is contained in:
Lars committed 2026-06-09 16:22:16 +02:00
1 parent fad1058d54
commit f2650dac57
11 files changed
+505 -25

No files matched your search

+55
View File
@@ -794,6 +794,8 @@ def build_roadmap_unfilled_gap_specs(
steps: Sequence[Mapping[str, Any]],
brief: PlanningSemanticBrief,
goal_query: str,
goal_analysis: Optional[GoalAnalysisArtifact] = None,
resolved_structured: Optional[RoadmapStructuredInput] = None,
) -> List[Dict[str, Any]]:
"""Gap-Fill-Angebote für Roadmap-Stufen ohne Bibliothekstreffer."""
topic = (brief.primary_topic or "Technik").strip()
@@ -807,8 +809,18 @@ def build_roadmap_unfilled_gap_specs(
f"Planungsziel: {goal_query}",
f"Roadmap-Stufe {stage_spec.major_step_index + 1} ({phase}): {stage_spec.learning_goal}",
]
if resolved_structured and (resolved_structured.start_situation or "").strip():
sketch_parts.append(f"Ausgangslage (Pfad): {resolved_structured.start_situation.strip()}")
elif goal_analysis and (goal_analysis.start_assumption or "").strip():
sketch_parts.append(f"Ausgangslage (Pfad): {goal_analysis.start_assumption.strip()}")
if resolved_structured and (resolved_structured.target_state or "").strip():
sketch_parts.append(f"Gesamtziel (Pfad): {resolved_structured.target_state.strip()}")
elif goal_analysis and (goal_analysis.target_state or "").strip():
sketch_parts.append(f"Gesamtziel (Pfad): {goal_analysis.target_state.strip()}")
if stage_spec.success_criteria:
sketch_parts.append(f"Erfolgskriterien: {', '.join(stage_spec.success_criteria[:3])}")
if stage_spec.load_profile:
sketch_parts.append(f"Belastung: {', '.join(stage_spec.load_profile[:4])}")
specs.append(
{
"source": "roadmap_unfilled",
@@ -960,6 +972,48 @@ def _merge_structured_into_goal_analysis(
)
def run_start_target_resolve_only(
goal_query: str,
*,
semantic_brief: Optional[PlanningSemanticBrief] = None,
cur=None,
include_llm_start_target: bool = True,
structured: Optional[RoadmapStructuredInput] = None,
) -> ProgressionRoadmapContext:
"""Nur Start/Ziel/Ergänzungen auflösen — ohne Roadmap-Stufen (Review vor Major Steps)."""
brief = semantic_brief or build_semantic_brief(goal_query)
resolved, resolve_meta, llm_extract = resolve_roadmap_structured_input(
goal_query,
structured,
brief=brief,
cur=cur,
include_llm=include_llm_start_target,
)
topic_override = None
if llm_extract and (llm_extract.primary_topic or "").strip():
topic_override = llm_extract.primary_topic.strip()
goal_analysis = build_goal_analysis(
goal_query,
brief,
structured=resolved,
topic_override=topic_override,
)
ctx = ProgressionRoadmapContext(
goal_query=goal_query.strip(),
max_steps=2,
semantic_brief=brief_to_summary_dict(brief),
resolved_structured=resolved,
start_target_extract=llm_extract,
start_target_resolve=resolve_meta,
goal_analysis=goal_analysis,
llm_start_target_applied=resolve_meta.llm_start_target_applied,
pipeline_phase="start_target_only",
)
if resolve_meta.llm_start_target_applied:
ctx.prompt_slugs.append(PROMPT_SLUG_START_TARGET)
return ctx
def run_progression_roadmap_pipeline(
goal_query: str,
*,
@@ -1135,6 +1189,7 @@ __all__ = [
"consolidate_micro_to_major",
"develop_micro_objectives",
"progression_roadmap_to_api_dict",
"run_start_target_resolve_only",
"run_progression_roadmap_pipeline",
"try_llm_start_target_extract",
"try_llm_goal_analysis",