Skip to content

Wire workflow steps to specific Blender actions#74

Merged
Ker102 merged 1 commit into
mainfrom
feature/workflow-specific-blender-actions
May 18, 2026
Merged

Wire workflow steps to specific Blender actions#74
Ker102 merged 1 commit into
mainfrom
feature/workflow-specific-blender-actions

Conversation

@Ker102
Copy link
Copy Markdown
Owner

@Ker102 Ker102 commented May 18, 2026

Summary

  • Adds blenderAction to workflow-advisor LLM output so Blender-agent steps can choose a specific direct tool.
  • Validates requested Blender actions against TOOL_REGISTRY and falls back to category defaults when missing or unsafe.
  • Moves animation defaults from execute_code to inspect_animation_data so animation runs start with inspection before any fallback.

Validation

  • npx tsx scripts/test/test-workflow-direct-tool-recommendations.ts
  • npx tsx scripts/test/test-workflow-direct-tool-prompt.ts
  • npx tsx scripts/test/test-workflow-blender-action-bridge.ts
  • npx tsc --noEmit --incremental false
  • npm run lint (passes with existing baseline-browser-mapping freshness warning)

Summary by CodeRabbit

  • New Features

    • Enhanced Blender action validation and normalization in workflow recommendations.
  • Improvements

    • Improved animation task recommendations with category-specific defaults and fallback mechanisms.
    • Strengthened tool registry compliance validation to ensure safer recommendations.
  • Tests

    • Expanded tests for workflow recommendation validation and enforcement requirements.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b3bff312-8a1a-4417-964c-9887d801445f

📥 Commits

Reviewing files that changed from the base of the PR and between bd5dbc4 and 47c84c1.

📒 Files selected for processing (2)
  • lib/orchestration/workflow-advisor.ts
  • scripts/test/test-workflow-direct-tool-recommendations.ts

📝 Walkthrough

Walkthrough

Workflow advisor now validates and normalizes blenderAction field recommendations by importing TOOL_REGISTRY, updating category defaults with animation-specific actions, introducing a normalizeBlenderAction() function, extending the LLM prompt to require the field for blender_agent steps, applying normalization during fallback and main workflow generation, and adding test assertions to verify enforcement.

Changes

BlenderAction Validation and Normalization

Layer / File(s) Summary
BlenderAction infrastructure setup
lib/orchestration/workflow-advisor.ts
TOOL_REGISTRY is imported. Animation category default now includes blenderAction: "inspect_animation_data". New VALID_BLENDER_ACTIONS set and normalizeBlenderAction() function validate proposed actions against registry tools, remap unsafe execute_code to category defaults, and apply fallback defaults as needed.
LLM prompt and schema guidance
lib/orchestration/workflow-advisor.ts
WORKFLOW_SYSTEM_PROMPT now requires blenderAction for blender_agent steps and provides per-category preferred action examples with constraints on execute_code use for effects. LLM response JSON schema includes blenderAction as required for blender_agent steps.
Fallback and main workflow generation
lib/orchestration/workflow-advisor.ts
generateFallbackWorkflow() populates blenderAction from CATEGORY_DEFAULTS for blender_agent steps and leaves it undefined for neural steps. generateWorkflowProposal() applies normalizeBlenderAction() normalization to all steps instead of reading directly from category defaults.
Test validation
scripts/test/test-workflow-direct-tool-recommendations.ts
Test assertions inspect the workflow advisor source code to verify blenderAction enforcement for blender_agent steps, presence of VALID_BLENDER_ACTIONS, use of normalizeBlenderAction(), and animation-specific blenderAction handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Ker102/ViperMesh#62: Both PRs modify lib/orchestration/workflow-advisor.ts and the workflow-direct-tool recommendation tests to control and validate blenderAction for blender_agent steps—specifically around avoiding defaulting to execute_code and using deterministic tool-driven action selection.
  • Ker102/ViperMesh#48: Both PRs are tied to the same workflow-advisor and tooling infrastructure: this PR's blenderAction normalization and validation depends on TOOL_REGISTRY and animation-category defaults, and the retrieved PR adds the inspect_animation_data tool plus its animation metadata into that registry and prompt layer.
  • Ker102/ViperMesh#64: Both PRs modify lib/orchestration/workflow-advisor.ts to tighten "blender_agent" direct-tools versus execute_code fallback behavior in prompt and schema, so this PR's blenderAction enforcement and normalization changes build directly on the same prompt and tooling alignment.

Suggested labels

backend, scripts

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description includes a summary of changes and validation steps. However, it lacks the required template sections such as Type of Change, Related Issues, Motivation and Context, and Testing details. Complete the description using the template structure with Type of Change, Related Issues, Motivation and Context sections to improve clarity and traceability.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding blenderAction field to workflow steps for specific Blender tool selection.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/workflow-specific-blender-actions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Ker102 Ker102 merged commit 6f91523 into main May 18, 2026
6 checks passed
@Ker102 Ker102 deleted the feature/workflow-specific-blender-actions branch May 18, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant