Port slash commands (/hold, /ready, /no-ready, /unassign, /ready-stack) to YAML flows #1094
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#1094
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an operator, I want issue-comment slash commands to be driven by YAML flows, so that the orphaned
handleSlashCommandOtherhandler can be deleted and operators can audit command behaviour fromflows/defaults/.Context
apps/server/src/domain/workflow/event-handlers.ts:773 handleSlashCommandOtheris orphaned — no production caller. Slash commands (/hold,/ready,/no-ready,/unassign,/ready-stack) are silently broken unless invoked via a legacy code path I haven't identified./breakdownis already ported viaflows/defaults/breakdown-comment.yml.Acceptance criteria
Expression-eval helper
comment_matches(regex)predicate to the YAML expression-eval surface (matches againstevent.comment.body)event.comment.bodywith astartsWithhelper — pick whichever is cheaper to add to the parserOps
is_trusted_userop — wrapsisTrustedUser; inputslogin, repo; outputs{trusted: bool}apply_hold_commandop — wrapsapplyHoldCommand(set: true); inputsrepo, issue_number, authorclear_hold_commandop — wrapsapplyHoldCommand(set: false); inputsrepo, issue_numberapply_unassign_commandop — wrapsapplyUnassignCommand; inputsrepo, issue_number, authorapply_ready_stack_commandop — wrapsapplyReadyStackCommand; inputsrepo, issue_number, authorFlows
flows/defaults/slash-hold.yml— matches^/holdor^/no-ready→is_trusted_usergate →apply_hold_commandflows/defaults/slash-ready.yml— matches^/ready\b(not/ready-stack) → trust gate →clear_hold_commandflows/defaults/slash-unassign.yml— matches^/unassign→ trust gate →apply_unassign_commandflows/defaults/slash-ready-stack.yml— matches^/ready-stack→ trust gate →apply_ready_stack_commandTests
is_trusted_userpredicatecomment_matches/breakdownflow still works (no regression on the one already-ported command)Cleanup
handleSlashCommandOtherandapplyReadyStackCommandhandler exports fromevent-handlers.ts(keepapplyHoldCommand/applyUnassignCommand/applyReadyStackCommandas op implementations)Out of scope
legacy*executor hooks — separate ticketReferences
apps/server/src/domain/workflow/event-handlers.ts:754-820(handler impl + command regexes)apps/server/src/domain/workflow/deps.ts(applyHoldCommand,applyUnassignCommand)flows/defaults/breakdown-comment.yml(template for issue_comment trigger usage)