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
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:
1 parent
35fe31774b
commit
3181cc126d
11 files changed
+166
-14
No files matched your search
@@ -7,6 +7,8 @@ from typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Tuple
|
||||
|
||||
from planning_progression_roadmap import ProgressionRoadmapContext, StageSpecArtifact
|
||||
|
||||
_UNFILLED_REMATCH_REASON = "Keine passende Übung für Roadmap-Stufe"
|
||||
|
||||
|
||||
def _slot_priority_for_rematch(
|
||||
body,
|
||||
@@ -103,7 +105,7 @@ def collect_rematch_slot_indices(
|
||||
if isinstance(item, (list, tuple)) and len(item) >= 2:
|
||||
idx, spec = item[0], item[1]
|
||||
midx = getattr(spec, "major_step_index", idx)
|
||||
_register(int(midx), "Keine passende Übung für Roadmap-Stufe")
|
||||
_register(int(midx), _UNFILLED_REMATCH_REASON)
|
||||
elif isinstance(item, dict):
|
||||
midx = _resolve_major(item)
|
||||
if midx is not None:
|
||||
@@ -114,6 +116,25 @@ def collect_rematch_slot_indices(
|
||||
return indices, reasons
|
||||
|
||||
|
||||
def apply_rematch_catalog_guard(
|
||||
slot_indices: Set[int],
|
||||
rematch_reasons: Mapping[int, str],
|
||||
*,
|
||||
rematch_guard: Optional[str],
|
||||
) -> Set[int]:
|
||||
"""
|
||||
Bei gesetztem rematch_guard (Katalog-Slot): kein Auto-Rematch nur wegen leerer Roadmap-Stufe.
|
||||
Off-Topic, explizite QS-Hinweise und Stufen-Verfeinerung bleiben aktiv.
|
||||
"""
|
||||
if not (rematch_guard or "").strip():
|
||||
return set(slot_indices)
|
||||
return {
|
||||
idx
|
||||
for idx in slot_indices
|
||||
if str(rematch_reasons.get(idx) or "").strip() != _UNFILLED_REMATCH_REASON
|
||||
}
|
||||
|
||||
|
||||
def filter_rematch_slot_indices(
|
||||
steps: Sequence[Mapping[str, Any]],
|
||||
slot_indices: Set[int],
|
||||
@@ -372,6 +393,7 @@ def prune_stripped_after_rematch(
|
||||
|
||||
|
||||
__all__ = [
|
||||
"apply_rematch_catalog_guard",
|
||||
"collect_rematch_slot_indices",
|
||||
"filter_rematch_slot_indices",
|
||||
"prune_stripped_after_rematch",
|
||||
|
||||
Reference in new issue
Block a user