refactor: replace extractRefs with schema casRef annotations (Phase 2) #290

Merged
xiaomo merged 1 commits from feat/285-phase2-remove-extractrefs into main 2026-05-16 11:50:48 +00:00
Owner

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

  • workflow-protocol: RoleDefinition no longer has extractRefs field (breaking)
  • workflow-runtime: create-workflow.ts uses collectCasRefs(schema, meta)
  • develop template: planner phases[].hash + coder completedPhase annotated with casRef
  • solve-issue/smoke/init: extractRefs removed from all role definitions
  • skill.ts docs updated, submitter test assertion removed

Testing

218 tests pass, 0 fail. All steps in #289 verified.

Fixes #289, Refs #285

## 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 - workflow-protocol: RoleDefinition no longer has extractRefs field (breaking) - workflow-runtime: create-workflow.ts uses collectCasRefs(schema, meta) - develop template: planner phases[].hash + coder completedPhase annotated with casRef - solve-issue/smoke/init: extractRefs removed from all role definitions - skill.ts docs updated, submitter test assertion removed ## Testing 218 tests pass, 0 fail. All steps in #289 verified. Fixes #289, Refs #285
xiaoju added 1 commit 2026-05-16 10:49:04 +00:00
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 #285
xiaomo approved these changes 2026-05-16 11:50:46 +00:00
xiaomo left a comment
Owner

LGTM 干净的 breaking change——extractRefs 从类型到实现到所有模板全部移除,collectCasRefs 接管。schema 声明式标注比手写 extractRefs 函数优雅得多。

LGTM ✅ 干净的 breaking change——`extractRefs` 从类型到实现到所有模板全部移除,`collectCasRefs` 接管。schema 声明式标注比手写 extractRefs 函数优雅得多。
xiaomo merged commit 2b707fb44e into main 2026-05-16 11:50:48 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#290