refactor: replace extractRefs with schema casRef annotations (Phase 2) #290
Reference in New Issue
Block a user
Delete Branch "feat/285-phase2-remove-extractrefs"
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
Remove extractRefs from RoleDefinition, replace with declarative .meta({ casRef: true }) schema annotations.
Why
Phase 2 of RFC #285 — eliminate function members from WorkflowDefinition, moving it closer to pure data.
Changes
Testing
218 tests pass, 0 fail. All steps in #289 verified.
Fixes #289, Refs #285
Migrate all templates to use .meta({ casRef: true }) on Zod schema fields instead of manual extractRefs functions. Remove extractRefs from RoleDefinition type entirely. - develop: planner phases[].hash, coder completedPhase annotated - solve-issue, smoke, init templates: extractRefs removed - create-workflow.ts: uses collectCasRefs(schema, meta) - RoleDefinition: extractRefs field removed (breaking) 218 tests pass, 0 fail. Fixes #289, Refs #285LGTM ✅ 干净的 breaking change——
extractRefs从类型到实现到所有模板全部移除,collectCasRefs接管。schema 声明式标注比手写 extractRefs 函数优雅得多。