Skip to content

Build an inspectable trigger dispatcher #17

Description

@galligan

Why

Triggers are where dispatch becomes a real control plane instead of a manual message router. They need to be powerful enough for cron/event-driven nudges and externalizer hooks, but inspectable enough that operators can understand what fired, what it did, and why.

Scope

Evolve triggers into an explicit when -> action -> lane dispatcher with clear command grammar, durable auditability, and safe failure behavior.

Acceptance criteria

  • Move toward an ergonomic command family:
    • dispatch trigger add
    • dispatch trigger list
    • dispatch trigger rm
    • dispatch trigger pause
    • dispatch trigger resume
    • Keep/alias existing hyphenated forms if needed.
  • Support time-based triggers:
    • cron-style schedules.
    • one-shot reminders if practical.
    • timezone behavior documented and tested.
  • Support event-based triggers from App Server / lane events where feasible:
    • turn completed/failed/idle.
    • goal changed/completed/blocked.
    • approval needed or other useful lane state.
  • Support action targets deliberately:
    • send / brief / context injection to a lane.
    • log-only/audit actions.
    • shell command or webhook/externalizer hook only with explicit safety rules.
  • Add inspection and safety UX:
    • trigger list shows enabled/paused, next run, target lane, action summary, last result.
    • A dry-run or explain mode shows what would fire and why.
    • Every fire records an audit event with result/error.
    • Failed actions have bounded retry or dead-letter behavior, not silent loss.
    • Authority checks reuse the normal op handlers; triggers should not bypass lane permissions.
  • Add tests for schedule parsing, event matching, action dispatch, audit records, pause/resume/remove, and failure behavior.
  • Update docs/skills with examples for common operator loops.

Notes

Be conservative with automation. The dispatcher should be explainable first, clever second.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions