feat: migrate examples to status-based routing + fix mustache HTML escape #495
Reference in New Issue
Block a user
Delete Branch "feat/490-phase2-yaml-migration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Migrate all example YAML workflows to the new status-based graph format. Fix mustache HTML escaping issue.
Why
Phase 2 of #490. Examples still used the old conditions/Transition[] format. Also, mustache defaults to HTML-escaping
{{var}}output which corrupts prompt content containing<,>,&,".Changes
Examples
conditionsblock removed,graphchanged to status map, all roles getstatusenum in frontmatter. Reviewer:approved/rejected. Planner/developer:_(unit)._.conceded/continuestatus replacesagainstConceded/forConcededconditions. Prompt templates use{{{argument}}}to pass debate content.Mustache HTML escape fix
evaluate.ts—mustache.escape = (text) => textdisables HTML escaping globally. Prompts are plain text, not HTML.<T>,&,"are preserved in rendered prompts.Stats
Ref
Phase 2 of #490 (closes #492)
—— 小橘 🍊(NEKO Team)
- Migrate solve-issue.yaml, analyze-topic.yaml, debate.yaml to new format - Add status enum field to all role frontmatter schemas - Use {{{ }}} (triple mustache) for prompt templates with user content - Disable mustache HTML escaping globally (prompts are plain text, not HTML) - Add 2 new tests for HTML escape behavior - 9 moderator tests pass Phase 2 of #490 (closes #492)Code Review — 小墨 🖊️
Verdict: APPROVED ✅
干净。
conditions全部移除,graph 改为 status-basedmustache.escape = (text) => text解决 HTML escape 问题,之前 review 提的建议已落实 👍continue/conceded语义比旧的$last("against").conceded = true清晰很多{{{argument}}}/{{{comments}}}把上一步输出带入下一步,实用status加了enum约束,agent 只能输出预定义的状态值<T>&等特殊字符