Skip to content

feat: integrate workflow customization system#9

Merged
Gaubee merged 1 commit intomainfrom
feat/workflow-customization
Dec 19, 2025
Merged

feat: integrate workflow customization system#9
Gaubee merged 1 commit intomainfrom
feat/workflow-customization

Conversation

@Gaubee
Copy link
Copy Markdown
Collaborator

@Gaubee Gaubee commented Dec 19, 2025

Summary

Integrate the customization system into built-in workflows, enabling configuration without full replacement.

Changes

New: workflow-config.schema.ts

Zod schemas for all workflow configurations:

Schema Description
BaseWorkflowConfigSchema Shared: tools, permissionMode, prompts
CoderConfigSchema + openspec (enabled, autoArchive)
ResearchConfigSchema + output (format, saveHtml, maxSources), search
GitCommitterConfigSchema + commit (style, maxTitleLength), push
MemoryConfigSchema + defaultLimit, defaultUserRelated

Updated Workflows

coder.workflow.ts:

  • Uses prompt-loader for system prompt (user > builtin priority)
  • Uses tools-merger for tool configuration
  • Reads config from PreferencesContext

research.workflow.ts:

  • Same integrations as coder

git-committer.workflow.ts:

  • Uses tools-merger for tool configuration
  • Reads config from PreferencesContext

New Helper

// common/async-context.ts
export function getContextWorkflowConfig<T>(workflowName: string): T | undefined

Usage Example

// user/preferences.ts
export default definePreferences((ctx, p) =>
  p
    .workflow("coder", (w) => w
      .config({
        tools: { allow: ["CustomTool"], disallow: ["!Task"] },
        permissionMode: "bypassPermissions",
        prompts: { customInstructions: "Always use TypeScript strict mode" },
      })
    )
    .build()
);

Tests

98 tests passing

- Add workflow-config.schema.ts with Zod schemas for all workflows
- Integrate prompt-loader into coder, research workflows
- Integrate tools-merger into all workflows (coder, research, git-committer)
- Add getContextWorkflowConfig helper to async-context.ts
- Support tools override with ! prefix removal syntax
- Support permissionMode override
- Support custom instructions via prompts.customInstructions

Workflows now read configuration from PreferencesContext and merge
with their default settings, enabling user customization without
full workflow replacement.
@Gaubee Gaubee merged commit f28430f into main Dec 19, 2025
3 checks passed
@Gaubee Gaubee deleted the feat/workflow-customization branch December 19, 2025 13:18
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