feat: implement granular step-file workflow architecture with multi-menu support

## Major Features Added
- **Step-file workflow architecture**: Transform monolithic workflows into granular step files for improved LLM adherence and consistency
- **Multi-menu handler system**: New `handler-multi.xml` enables grouped menu items with fuzzy matching
- **Workflow compliance checker**: Added automated compliance validation for all workflows
- **Create/edit agent workflows**: New structured workflows for agent creation and editing

## Workflow Enhancements
- **Create-workflow**: Expanded from 6 to 14 detailed steps covering tools, design, compliance
- **Granular step execution**: Each workflow step now has dedicated files for focused execution
- **New documentation**: Added CSV data standards, intent vs prescriptive spectrum, and common tools reference

## Complete Migration Status
- **4 workflows fully migrated**: `create-agent`, `edit-agent`, `create-workflow`, and `edit-workflow` now use the new granular step-file architecture
- **Legacy transformation**: `edit-workflow` includes built-in capability to transform legacy single-file workflows into the new improved granular format
- **Future cleanup**: Legacy versions will be removed in a future commit after validation

## Schema Updates
- **Multi-menu support**: Updated agent schema to support `triggers` array for grouped menu items
- **Legacy compatibility**: Maintains backward compatibility with single `trigger` field
- **Discussion enhancements**: Added conversational_knowledge recommendation for discussion agents

## File Structure Changes
- Added: `create-agent/`, `edit-agent/`, `edit-workflow/`, `workflow-compliance-check/` workflows
- Added: Documentation standards and CSV reference files
- Refactored: `create-workflow/steps/` with detailed granular step files

## Handler Improvements
- Enhanced `handler-exec.xml` with clearer execution instructions
- Improved data passing context for executed files
- Better error handling and user guidance

This architectural change significantly improves workflow execution consistency across all LLM models by breaking complex processes into manageable, focused steps. The edit-workflow transformation tool ensures smooth migration of existing workflows to the new format.
This commit is contained in:
Brian Madison
2025-11-30 15:09:23 -06:00
parent 829d051c91
commit 4539ca7436
107 changed files with 12704 additions and 683 deletions

View File

@@ -1,9 +1,7 @@
<rules>
- ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
<r>ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style.</r>
<!-- TTS_INJECTION:agent-tts -->
- Stay in character until exit selected
- Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
- Number all lists, use letters for sub-options
- Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
- CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
<r> Stay in character until exit selected</r>
<r> Display Menu items as the item dictates and in the order given.</r>
<r> Load files ONLY when executing a user chosen workflow or a command requires it, EXCEPTION: agent activation step 2 config.yaml</r>
</rules>

View File

@@ -1,6 +1,6 @@
<handler type="exec">
When menu item has: exec="path/to/file.md"
Actually LOAD and EXECUTE the file at that path - do not improvise
Read the complete file and follow all instructions within it
If there is data="some/path/data-foo.md", pass that data to the executed file as context.
When menu item or handler has: exec="path/to/file.md":
1. Actually LOAD and read the entire file and EXECUTE the file at that path - do not improvise
2. Read the complete file and follow all instructions within it
3. If there is data="some/path/data-foo.md" with the same item, pass that data path to the executed file as context.
</handler>

View File

@@ -0,0 +1,14 @@
<handler type="multi">
When menu item has: type="multi" with nested handlers
1. Display the multi item text as a single menu option
2. Parse all nested handlers within the multi item
3. For each nested handler:
- Use the 'match' attribute for fuzzy matching user input (or Exact Match of character code in brackets [])
- Execute based on handler attributes (exec, workflow, action)
4. When user input matches a handler's 'match' pattern:
- For exec="path/to/file.md": follow the `handler type="exec"` instructions
- For workflow="path/to/workflow.yaml": follow the `handler type="workflow"` instructions
- For action="...": Perform the specified action directly
5. Support both exact matches and fuzzy matching based on the match attribute
6. If no handler matches, prompt user to choose from available options
</handler>