Skip to content

Switch plan generation from JSON to XML format#21

Open
JMRussas wants to merge 2 commits intomainfrom
feature/xml-plan-format
Open

Switch plan generation from JSON to XML format#21
JMRussas wants to merge 2 commits intomainfrom
feature/xml-plan-format

Conversation

@JMRussas
Copy link
Owner

@JMRussas JMRussas commented Mar 7, 2026

Summary

  • Claude now produces XML plans stored in new plan_xml column alongside plan_json for backward compatibility
  • Planner prompts rewritten from JSON to XML format (L1/L2/L3/C# strategies)
  • Decomposer and routes prefer plan_xml with automatic fallback to plan_json for old plans
  • New xml_utils.py with extract_xml_plan() and parse_plan_xml() for robust XML extraction and parsing

Test plan

  • 18 new XML parsing tests covering L1/L2/L3/C# schemas, edge cases, and entity handling
  • Updated planner test mocks to return XML instead of JSON (exercises XML parse path)
  • JSON fallback path still tested (existing plans without plan_xml continue working)
  • Full suite: 797 tests pass, ruff clean

Generated by Claude Code · Claude Opus 4.6

JMRussas and others added 2 commits March 6, 2026 22:12
Claude now produces XML plans which are stored as source of truth in
the new plan_xml column. The decomposer and routes prefer plan_xml
with automatic fallback to plan_json for backward compatibility.

- Add xml_utils.py with extract_xml_plan() and parse_plan_xml()
- Rewrite planner prompt suffixes (L1/L2/L3/C#) to request XML output
- Add plan_xml TEXT column (migration 015, inline schema, models_metadata)
- Update decomposer to parse plan_xml when available
- Update routes to prefer plan_xml in read/clone/export paths
- Add plan_xml field to PlanOut schema
- 18 new XML parsing tests, updated planner test mocks to return XML

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant