Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

improvement: add node name constraint to AI refinement prompts#394

Merged
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
improvement/add-node-name-constraint-to-ai-promptbreaking-brake/cc-wf-studio:improvement/add-node-name-constraint-to-ai-promptCopy head branch name to clipboard
Jan 6, 2026
Merged

improvement: add node name constraint to AI refinement prompts#394
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
improvement/add-node-name-constraint-to-ai-promptbreaking-brake/cc-wf-studio:improvement/add-node-name-constraint-to-ai-promptCopy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

@breaking-brake breaking-brake commented Jan 6, 2026

Problem

AI-generated workflows sometimes produce node names with full-width characters (Japanese, Chinese, Korean, etc.), which causes validation errors.

  • NODE.NAME_PATTERN = /^[a-zA-Z0-9_-]+$/ rejects non-ASCII characters (workflow-definition.ts:454)

Solution

Add explicit node name constraints to AI prompts to prevent non-ASCII characters at generation time.

Changes

src/extension/services/refinement-prompt-builder.ts

  • Added constraint to refinementGuidelines array

src/extension/services/refinement-service.ts

  • Added constraint to SubAgentFlow refinement prompt

resources/workflow-schema.json

  • Added namePatternDescription field for clearer documentation

Impact

  • AI will be instructed to use ASCII-only node names during workflow generation/refinement
  • No breaking changes
  • Reduces validation errors from AI-generated workflows

Testing

  • Code quality checks passed (npm run format && npm run lint && npm run check)
  • Build successful (npm run build)

🤖 Generated with Claude Code

- Added ASCII-only pattern rule to refinementGuidelines
- Added constraint to SubAgentFlow refinement prompt
- Enhanced workflow-schema.json with namePatternDescription
@breaking-brake breaking-brake merged commit 055d254 into main Jan 6, 2026
3 checks passed
@breaking-brake breaking-brake deleted the improvement/add-node-name-constraint-to-ai-prompt branch January 6, 2026 12:54
@breaking-brake breaking-brake mentioned this pull request Jan 6, 2026
braking-brake-semantic-release Bot pushed a commit that referenced this pull request Jan 6, 2026
## [3.12.8](v3.12.7...v3.12.8) (2026-01-06)

### Bug Fixes

* handle multiple JSON blocks in AI response parsing ([#393](#393)) ([29c01bf](29c01bf))

### Improvements

* add node name constraint to AI refinement prompts ([#394](#394)) ([055d254](055d254))
* auto-focus canvas on newly added nodes ([#392](#392)) ([7c1856c](7c1856c))
@braking-brake-semantic-release
Copy link
Copy Markdown

🎉 This PR is included in version 3.12.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.