deerflow2/src/prompts
Willem Jiang 4a71112fe1 fix: repair missing step_type fields in Plan validation (#653)
* fix: resolve issue #650 - repair missing step_type fields in Plan validation

- Add step_type repair logic to validate_and_fix_plan() to auto-infer missing step_type
- Infer as 'research' when need_search=true, 'processing' when need_search=false
- Add explicit CRITICAL REQUIREMENT section to planner.md emphasizing step_type mandatory for every step
- Include validation checklist and examples showing both research and processing steps
- Add 23 comprehensive unit tests for validate_and_fix_plan() covering all scenarios
- Add 4 integration tests specifically for Issue #650 with actual Plan validation
- Prevents Pydantic ValidationError: 'Field required' for missing step_type

* Update tests/unit/graph/test_plan_validation.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/unit/graph/test_plan_validation.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update the planner.zh_CN.md with recent changes of planner.md

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-24 21:26:48 +08:00
..
podcast feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
ppt feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
prompt_enhancer feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
prose feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
__init__.py chore: add license headers 2025-04-17 11:34:42 +08:00
coder.md feat: support multi-language 2025-04-21 19:50:34 +08:00
coder.zh_CN.md feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
coordinator.md Fix: clarification bugs - max rounds, locale passing, and over-clarification (#647) 2025-10-24 16:43:39 +08:00
coordinator.zh_CN.md feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
planner.md fix: repair missing step_type fields in Plan validation (#653) 2025-10-24 21:26:48 +08:00
planner.zh_CN.md fix: repair missing step_type fields in Plan validation (#653) 2025-10-24 21:26:48 +08:00
planner_model.py fix: support local models by making thought field optional in Plan model (#601) 2025-09-28 08:48:39 +08:00
reporter.md feat: add strategic_investment report style (#595) 2025-09-24 09:50:36 +08:00
reporter.zh_CN.md feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
researcher.md fix: tool name mismatch issue (#506) 2025-08-08 19:31:22 +08:00
researcher.zh_CN.md feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
template.py feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00