refactor: remove per-role extractPrompt from RoleDefinition #174

Closed
opened 2026-05-11 07:25:20 +00:00 by xiaoju · 1 comment
Owner

What

Remove the extractPrompt field from RoleDefinition. Replace with a single hardcoded generic extraction prompt in the extract pipeline.

Why

Each role's extractPrompt is redundant:

  • The role's systemPrompt already dictates the agent's output format
  • The Zod schema (exposed as function tool parameters) already fully describes what to extract
  • The extract LLM system prompt already says 'call the tool with JSON arguments matching the schema'
  • All existing extractPrompt values are just paraphrasing the schema field names

A single generic prompt is sufficient for all roles.

Changes

  1. workflow-protocol — remove extractPrompt from RoleDefinition type
  2. workflow-runtime — update re-exported types
  3. workflow-execute/extract — use a hardcoded generic prompt instead of role.extractPrompt
  4. workflow-template-develop — remove extractPrompt from all 5 roles
  5. workflow-template-solve-issue — remove extractPrompt from preparer and submitter
  6. cli-workflow — update init templates and skill output
  7. Coder role — move 'use last finished phase hash' hint into z.string().describe()

Breaking change — bundle authors must remove extractPrompt from role definitions.

— xiaoju (NEKO Team)

## What Remove the extractPrompt field from RoleDefinition. Replace with a single hardcoded generic extraction prompt in the extract pipeline. ## Why Each role's extractPrompt is redundant: - The role's systemPrompt already dictates the agent's output format - The Zod schema (exposed as function tool parameters) already fully describes what to extract - The extract LLM system prompt already says 'call the tool with JSON arguments matching the schema' - All existing extractPrompt values are just paraphrasing the schema field names A single generic prompt is sufficient for all roles. ## Changes 1. workflow-protocol — remove extractPrompt from RoleDefinition type 2. workflow-runtime — update re-exported types 3. workflow-execute/extract — use a hardcoded generic prompt instead of role.extractPrompt 4. workflow-template-develop — remove extractPrompt from all 5 roles 5. workflow-template-solve-issue — remove extractPrompt from preparer and submitter 6. cli-workflow — update init templates and skill output 7. Coder role — move 'use last finished phase hash' hint into z.string().describe() Breaking change — bundle authors must remove extractPrompt from role definitions. — xiaoju (NEKO Team)
Author
Owner

Phase 拆分

Phase 1: 类型定义 + extract 管线

  • RoleDefinition 删除 extractPrompt
  • extract 管线改用硬编码通用 prompt
  • coder role 的提示迁移到 schema .describe()
  • Testing issue: 待创建

Phase 2: 模板 + CLI + skill

  • 两个 workflow template 删除所有 extractPrompt
  • CLI init 模板更新
  • skill 输出更新
  • Testing issue: 待创建

— 小橘 🍊(NEKO Team)

## Phase 拆分 ### Phase 1: 类型定义 + extract 管线 - 从 `RoleDefinition` 删除 `extractPrompt` - extract 管线改用硬编码通用 prompt - coder role 的提示迁移到 schema `.describe()` - Testing issue: 待创建 ### Phase 2: 模板 + CLI + skill - 两个 workflow template 删除所有 `extractPrompt` - CLI init 模板更新 - skill 输出更新 - Testing issue: 待创建 — 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#174