Update Workflow
Update workflow files to align with the latest standard template and apply specified changes using intelligent delegation to subagents. Handles both single workflow updates and bulk updates of all workflows in parallel.
Purpose & Scope
What this skill does NOT do:
- •Create new workflows (use create-workflow)
- •Modify non-workflow files
- •Update templates themselves
- •Override constitutional requirements
When to REJECT:
- •Invalid workflow file paths
- •Malformed change specifications
- •Attempting to violate constitutional standards
- •Template file is missing or corrupted
Workflow
ultrathink: you'd perform the following steps
Step 1: Extract Input
- •Parse $ARGUMENTS to extract workflow name and change specifications
- •Workflow: First argument (optional - if empty, update all workflows)
- •--change[N]: Extract all change parameters (change1, change2, etc.)
- •Validate workflow file exists if specified
- •Count total workflows if updating all
Step 2: Execution with Parallel Subagents
- •
Template Validation
- •Verify template:workflow exists and is readable
- •Load template structure for reference
- •Identify mandatory sections that must be preserved
- •
Discover Workflows
- •Locate all workflow files in [plugin]/constitution/workflows/
- •Filter by specifier if provided
- •Build list of workflows to update
- •
Delegation
- •Create parallel specialized subagents (one per workflow file) with:
- •Workflow file path
- •All change specifications
- •Detailed instructions
- •Request to ultrathink
- •Create parallel specialized subagents (one per workflow file) with:
- •
Subagent Task Specification
ultrathink: adopt the Workflow Update Specialist mindset
- •You're a Workflow Update Specialist with deep expertise in process documentation who follows these principles:
- •Template-First Approach: Always compare against template before modification
- •Process Preservation: Maintain existing workflow logic and steps
- •Structural Integrity: Align with template structure while preserving content
- •Professional Polish: Deliver clean, consistent workflow documentation
Assignment You're assigned to update workflow: [workflow name]
Workflow Specifications:
- •Workflow File: [workflow file path]
- •Template: template:workflow
- •Changes to Apply: [change specifications from inputs]
Steps
- •
Read Current Workflow:
- •Read the workflow file completely
- •Identify existing steps, phases, and subagent instructions
- •Note any custom sections or unique process logic
- •
Compare with Template:
- •Read template:workflow for current structure
- •Identify missing sections from template
- •Identify sections that need structural updates
- •Map changes to specific template sections
- •
Apply Updates:
- •Task 1: Align workflow with template:workflow structure
- •Task 2a, 2b, 2c...: Apply each change specification as subtask
- •Task 3: Review workflow integrity and consistency throughout
- •Preserve all existing process logic and steps
- •Add any missing required sections from template
- •Update ASCII diagrams if structure changed
- •
Clean & Finalize:
- •Remove any outdated or deprecated content
- •Ensure consistent formatting throughout
- •Verify subagent instruction blocks follow >>> <<< format
- •Ensure all placeholder content has been replaced
Report [IMPORTANT] You MUST return the following execution report (<500 tokens):
yamlstatus: success|failure|partial workflow: '[workflow-name]' summary: 'Brief description of changes applied' modifications: - section: '[section name]' change: '[what was changed]' template_compliance: true|false process_preserved: true|false issues: ['issue1', 'issue2', ...] # only if problems encountered<<<
- •You're a Workflow Update Specialist with deep expertise in process documentation who follows these principles:
- •
Progress Monitoring
- •Track completion status of each delegated workflow
- •Handle any subagent failures or escalations
- •Ensure constitutional compliance in all updates
Step 3: Verification
- •
Template Compliance Verification
- •Verify each updated workflow follows template:workflow structure
- •Check all mandatory sections are present and properly formatted
- •Validate ASCII diagrams are properly formatted
- •
Change Application Verification
- •Confirm all specified changes were applied correctly
- •Verify changes are reflected throughout the workflow file
- •Check for any conflicting or contradictory specifications
- •
Process Logic Validation
- •Ensure workflow steps remain logically sound
- •Verify subagent instruction blocks are complete
- •Confirm input/output specifications are accurate
- •
Consistency Validation
- •Run integrity checks on workflow structure
- •Verify internal consistency and logical flow
- •Confirm no broken references or missing dependencies
Step 4: Reporting
Output Format:
[✅/❌] Command: $ARGUMENTS ## Summary - Workflows updated: [count] - Changes applied: [change specifications] - Template alignment: [COMPLETE/PARTIAL/FAILED] ## Actions Taken 1. [Workflow file]: [Status] - [Changes applied] 2. [Workflow file]: [Status] - [Changes applied] ## Subagent Results - Total agents deployed: [count] - Successful updates: [count] - Failed updates: [count] (if any) ## Template Alignment Applied - Structure updates: [list] - Section additions: [list] - Format corrections: [list] ## Changes Applied - --change1: [Status and details] - --change2: [Status and details] ## Issues Found (if any) - **Issue**: [Description] **Resolution**: [Applied fix or escalation] ## Next Steps (if applicable) - Review updated workflows for accuracy - Test workflow execution with sample scenarios - Commit changes if satisfied with results
Examples
Update Single Workflow
/update-workflow "write-code.md" # Updates specified workflow to match latest template # Uses one ultrathink subagent for comprehensive analysis
Update Single Workflow with Changes
/update-workflow "build-service.md" --change1="add Docker deployment step" --change2="include security scanning phase" # Applies template alignment plus specified modifications # Each change becomes a subtask (2a, 2b) in the workflow
Update All Workflows
/update-workflow # Discovers all workflow files in [plugin]/constitution/workflows/ # Spawns parallel subagents to update each workflow # Maintains consistency across entire workflow system
Complex Multi-Change Update
/update-workflow "review-code.md" --change1="integrate AI-assisted review" --change2="add performance criteria" --change3="update approval requirements" # Applies template + three specific changes # Subagent creates tasks 1, 2a, 2b, 2c, 3 for comprehensive update
Error Case Handling
/update-workflow "nonexistent-workflow.md" # Error: Workflow file not found # Suggestion: Check available workflows with 'find [plugin]/constitution/workflows -name "*.md"' # Alternative: Use '/update-workflow' without arguments to update all workflows
Template Missing Error
/update-workflow "some-workflow.md" # Error: Template template:workflow not found # Suggestion: Ensure template exists before updating workflows # Action: Command aborts to prevent inconsistent updates