READMESource: main@51197351
workflow-enforcer — DSH plugin
Hard-gate reminders for the ask-matt workflow (and any agent preset that wants them): external/destructive actions must be reported and confirmed, human corrections must be written down. Reminder-only — nothing is intercepted.
Install
dsh plugin --profile web add /path/to/dsh-workflow-enforcer
or mount as a preset row (relative to the preset directory, or absolute):
- id: workflow-enforcer
name: /path/to/dsh-workflow-enforcer/workflow-enforcer.mjs
config:
baseline: true
What it injects
- Every prompt assembly gets a short baseline reminder (external/destructive actions → report + wait for confirmation; corrections → acknowledge + write down).
- A tool call matching the gate list gets a one-shot ⚠ High-risk action line on the next assembly (consumed after firing).
Gate list
Default (see DEFAULT_GATES in workflow-enforcer.mjs):
| Group | Matches (substring over the tool call) |
|---|---|
| external | git push, gh pr/issue/release create, gh repo create, npm publish, cargo publish |
| destructive | git reset --hard, git clean -f, rm -rf, docker compose down -v, docker volume rm, docker system prune, drop database, truncate table, delete from, git push --force |
Per-project override: workflow-gates.yml
Place it in the session's working directory (root of the project):
# workflow-gates.yml — replaces the default list entirely.
# Set includeDefault: true in the plugin config to merge instead.
external:
- "git push"
- "my-publish-script.sh"
destructive:
- "docker-dev.sh reset" # project-specific reset/cold-start
- "rm -rf"
Per-row config
config:
baseline: true # baseline reminder on every assembly (default true)
gatesFile: workflow-gates.yml # project file name/path (default)
includeDefault: false # merge project file with the default list
extraExternal: ["./release.sh"]
extraDestructive: ["npm run reset"]
dropExternal: ["npm publish"]
dropDestructive: ["truncate table"]
Notes
- Depends on the
yamlpackage resolvable from the plugin (user-owned dir, e.g.~/.dsh/node_modules):npm install --prefix ~/.dsh yaml. - Hooks:
session/event(tool/call) +system-prompt/assemble(prepend). A filter bug degrades to no-reminder, never breaks a request.
No comments yet. Be the first to write one.