-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
Overview
The current template system (BEFORE_STARTING_TEMPLATE, PROGRESS_REPORTING_TEMPLATE, ERROR_RECOVERY_TEMPLATE) uses text inclusion patterns. This issue proposes refactoring to an event-driven architecture with workflow lifecycle hooks.
This issue only needs to:
- change the the static text inclusion to be removed
- convert the TEMPLATES to workflow assignments
- attach the new workflow-assignments to the correct event-handlers:
a. BEFORE_STARTING_TEMPLATE --> preSciptBegins
b. PROGRESS_REPORTING_TEMPLATE --> postAssignemtnComplete
c. ERROR_RECOVERY_TEMPLATE --> onAssignmentFailure
Current State
Templates are included via static text references:
- BEFORE_STARTING_TEMPLATE - Pre-execution checklist
- PROGRESS_REPORTING_TEMPLATE - Status update format
- ERROR_RECOVERY_TEMPLATE - Error handling protocol
Included in 4 assignments:
- orchestrate-dynamic-workflow.md
- orchestrate-new-project.md
- create-app-plan.md
- create-application-foundation.md
Proposed Architecture
Replace templates with event hooks:
Event Lifecycle
- preScriptBegins - Before workflow execution starts
- postStepComplete - After each step completes
- on-assignment-failure -assignment failure or error
- preCreateAssignment - Before creating sub-assignments
- postAssignmentComplete - After sub-assignment finishes
Dynamic-workflow event system already exists.
- documented in dynamic0workflow-syntax.
Benefits
- Separation of Concerns - Workflow logic separate from procedural checks
- Reusability - Event handlers can be shared across workflows
- Flexibility - Add/modify hooks without changing core workflow
- Traceability - Clear audit trail of lifecycle events
- Testability - Event handlers can be tested independently
Implementation Plan
- Migrate existing 4 assignments to new pattern
- Document migration guide for custom workflows
Acceptance Criteria
- All 4 existing assignments migrated
- No regression in workflow execution
Related
- Follows completion of FB-010 (template integration)
- Builds on FB-012 (workflow documentation)
- Part of architectural evolution toward more modular system
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request