Skip to content

T079: Add workflow engine as first-class feature#66

Merged
grobomo merged 1 commit intomainfrom
079-T079-add-workflows
Apr 4, 2026
Merged

T079: Add workflow engine as first-class feature#66
grobomo merged 1 commit intomainfrom
079-T079-add-workflows

Conversation

@grobomo
Copy link
Copy Markdown
Owner

@grobomo grobomo commented Apr 4, 2026

Summary

  • workflow.js — zero-dep YAML workflow engine with step state machine and gate validation
  • workflow-gate.js — PreToolUse module that enforces step order for active workflows
  • --workflow CLI — 5 subcommands: list, start, status, complete, reset
  • Built-in templates: enforce-shtd.yml (spec→test→branch→PR pipeline), cross-project-reset.yml (safe context switching)
  • Discovery order: project workflows/ → ~/.claude/hooks/workflows/ → built-in

Ported from spec-hook's SHTD workflow engine, generalized for all projects.
Tested via spec-hook PR series #9-#16 (8 PRs, 44+ test assertions).

Test plan

  • 7/7 engine tests (parseYaml, state machine, gate checking)
  • 8/8 gate module tests (block/allow/skip logic)
  • 5/5 CLI tests (list, start, status, complete, reset)
  • 9/9 e2e lifecycle tests
  • 5/5 enforce-shtd meta-workflow tests
  • 4/4 delegation tests
  • 14/14 final cross-project verification

- workflow.js: zero-dep YAML workflow engine (state machine, gate validation)
- workflow-gate.js: PreToolUse module enforcing step order
- --workflow CLI: list, start, status, complete, reset subcommands
- Built-in templates: enforce-shtd.yml, cross-project-reset.yml
- Discovery: project → ~/.claude/hooks/workflows/ → built-in
@grobomo grobomo force-pushed the 079-T079-add-workflows branch from 1976867 to ef52561 Compare April 4, 2026 20:04
@grobomo grobomo merged commit 62c0819 into main Apr 4, 2026
2 checks passed
@grobomo grobomo deleted the 079-T079-add-workflows branch April 4, 2026 21:38
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