Skip to content

Step-Based Launch Workflows (Hooks) Engine - #1

Merged
falbany merged 23 commits into
mainfrom
feat/hooks-workflow-engine
Aug 6, 2026
Merged

falbany merged 23 commits into
mainfrom
feat/hooks-workflow-engine

Conversation

@falbany

@falbany falbany commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Step-Based Launch Workflows (Hooks) Engine

🎯 Overview

This merge request introduces the new step-based YAML workflow engine for ProFiles launch hooks, completely replacing the legacy [HOOKS] INI pipeline. It allows configuring fine-grained actions (e.g., notify, run, replace, check, run_after), Markdown styling, variable token expansion, and yes/skip/no user prompts before allowing or replacing file launches.

✨ Key Features & Additions

  • Step-Based Workflows: Defined sequentially in .profiles configuration under hooks.entries. File launches seamlessly intercept with pre-defined or custom actions.
  • Specific Glob Pattern Matching: Replaces plain extension matching with highly exact Glob ranking (Exact match > ? > * > extension).
  • Five Available Action Steps:
    • notify: Markdown-styled interactive alerts/prompts (supports **, *, #, and ```) with auto-close or blocking windows.
    • run: Blocking OS Shell commands.
    • run_after: Async / background shell commands.
    • check: Validates shell return codes and strictly handles fail conditions.
    • replace: Completely bypasses the native OS opener allowing custom launchers.
  • Tokens: Expanded {path}, {filename}, {dir}, {ext}, {stem}, and crucially {content} directly into execution steps and ask: user alerts.
  • Three-Way User Confirmation: Introduce an ask prompt feature supporting yes/skip/no logical branches preventing accidents cleanly.
  • Dynamic Logging: Integrated extensive logger tracing emitting outputs and user decisions step-by-step to the INFO/DEBUG/ERROR telemetry layers.

🛠️ Internal Rebuilds (Architecture)

  • New WorkflowStep & WorkflowStepSchema Pydantic models.
  • New matcher.py for glob priority extraction logic.
  • New message_dialog.py encapsulating the rich Tkinter rendering text widget UI dialogs mapping pure headless print modes.
  • workflow.py natively orchestrates the lifecycle bypassing the older generic hooking functions located in execution.py.
  • Hooked run_workflow effectively back to launch_selected_file() in actions.py.

📚 Documentation

  • Updated README.md to reference the Launch Workflows (Hooks) mechanism.
  • Rewrote the documentation files hooks-guide.en.md and hooks-guide.fr.md converting legacy documentation to represent configuring the new YAML setup accurately.
  • docs/column-library.md rewritten successfully showing dynamic column YAML.
  • Re-generated the STARTER_CONFIG_TEMPLATE.

🧪 Testing State

  • Handled all Pydantic mappings and syntax edge cases correctly.
  • Added comprehensive unit testing evaluating pure functions handling tokens, exact Glob priorities, interactions blocking/headless capabilities.
  • Deployed integration tests simulating mocked sequential workflows across action categories.
  • Total core test suite passes robustly with 0 failures out of 100+ items run cleanly via pytest framework coverage checks over all domain abstractions before completion.

💡 Notes for Reviewer

The codebase migration effectively removes and cleans up older legacy pipeline INI hooks implementation patterns and moves entirely onto highly scalable data-driven execution.

All subagent and design plans have been cleaned out post-implementation.

f.albany and others added 23 commits August 6, 2026 17:40
@falbany

falbany commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Merge Request: Step-Based Launch Workflows (Hooks) Engine

🎯 Overview

This merge request introduces the new step-based YAML workflow engine for ProFiles launch hooks, completely replacing the legacy [HOOKS] INI pipeline. It allows configuring fine-grained actions (e.g., notify, run, replace, check, run_after), Markdown styling, variable token expansion, and yes/skip/no user prompts before allowing or replacing file launches.

✨ Key Features & Additions

  • Step-Based Workflows: Defined sequentially in .profiles configuration under hooks.entries. File launches seamlessly intercept with pre-defined or custom actions.
  • Specific Glob Pattern Matching: Replaces plain extension matching with highly exact Glob ranking (Exact match > ? > * > extension).
  • Five Available Action Steps:
    • notify: Markdown-styled interactive alerts/prompts (supports **, *, #, and ```) with auto-close or blocking windows.
    • run: Blocking OS Shell commands.
    • run_after: Async / background shell commands.
    • check: Validates shell return codes and strictly handles fail conditions.
    • replace: Completely bypasses the native OS opener allowing custom launchers.
  • Tokens: Expanded {path}, {filename}, {dir}, {ext}, {stem}, and crucially {content} directly into execution steps and ask: user alerts.
  • Three-Way User Confirmation: Introduce an ask prompt feature supporting yes/skip/no logical branches preventing accidents cleanly.
  • Dynamic Logging: Integrated extensive logger tracing emitting outputs and user decisions step-by-step to the INFO/DEBUG/ERROR telemetry layers.

🛠️ Internal Rebuilds (Architecture)

  • New WorkflowStep & WorkflowStepSchema Pydantic models.
  • New matcher.py for glob priority extraction logic.
  • New message_dialog.py encapsulating the rich Tkinter rendering text widget UI dialogs mapping pure headless print modes.
  • workflow.py natively orchestrates the lifecycle bypassing the older generic hooking functions located in execution.py.
  • Hooked run_workflow effectively back to launch_selected_file() in actions.py.

📚 Documentation

  • Updated README.md to reference the Launch Workflows (Hooks) mechanism.
  • Rewrote the documentation files hooks-guide.en.md and hooks-guide.fr.md converting legacy documentation to represent configuring the new YAML setup accurately.
  • docs/column-library.md rewritten successfully showing dynamic column YAML.
  • Re-generated the STARTER_CONFIG_TEMPLATE.

🧪 Testing State

  • Handled all Pydantic mappings and syntax edge cases correctly.
  • Added comprehensive unit testing evaluating pure functions handling tokens, exact Glob priorities, interactions blocking/headless capabilities.
  • Deployed integration tests simulating mocked sequential workflows across action categories.
  • Total core test suite passes robustly with 0 failures out of 100+ items run cleanly via pytest framework coverage checks over all domain abstractions before completion.

💡 Notes for Reviewer

The codebase migration effectively removes and cleans up older legacy pipeline INI hooks implementation patterns and moves entirely onto highly scalable data-driven execution.

All subagent and design plans have been cleaned out post-implementation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant