Repository navigation
feat(personal-mcp): add trigger, authoring and diagnostic tools - #52
Merged
Merged
Conversation
A user built four workflows entirely through the personal MCP server and could not connect a single one to anything: no tool spoke to TriggerBinding or ColumnWorkflowBinding, so every trigger had to be wired by hand in the UI. Three smaller gaps forced the same fallback — a workflow could not be renamed, a step's instructions could only be blind-overwritten because get_workflow truncates them, and a failed step run reported nothing beyond its state. list_project_tools returning [] was a real bug, not a missing feature: `visible_for_project` yields platform tools OR the project's custom ones, and the chained `ui_visible` (db_source) ANDed the platform half back out, so tool_ids had to be copied between steps sight unseen. Adds: the four workflow-trigger tools over both binding kinds, update_workflow, get_workflow_step, duplicate_workflow, get_agent, get_skill, archive_board_task, list_gates, delete_gate, get_step_run. create_workflow_step now takes the whole wiring in one call; create_board_column inserts with a shift instead of failing on a taken position. Gates get list/delete but no create/resolve: the three gate types are CI gates that GitHub/GitLab webhooks own, and a manual resolve is an override of that path, not a tool. Steps get bmad_enabled but not bmad_modules, which is not a step column at all — it lives in terminal_sessions.session_config. The agent-facing reference documented only column bindings, and the build_workflow prompt stopped at trigger_workflow; both now cover event triggers, the all-steps-auto-run rule, and the UTC/DST timezone trap. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
alex-astafyev
pushed a commit
to alex-astafyev/flow
that referenced
this pull request
Aug 19, 2026
* origin/develop: feat(resources): unify Agents/Wrappers/Repositories/Integrations tables (AixleHQ#51) feat(personal-mcp): add trigger, authoring and diagnostic tools (AixleHQ#52) ci: stop cancelling develop runs when merges land back to back (AixleHQ#50) fix(container-runtime): honor the timeout option on Docker exec fix(container-runtime): honor the timeout option on Docker exec (AixleHQ#48) ci: publish coverage badges from develop runs (AixleHQ#49) # Conflicts: # .github/workflows/ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A user built four workflows end-to-end through the personal MCP server and could not connect a single one to anything: no tool spoke to
TriggerBindingorColumnWorkflowBinding, so every trigger — a board column, a cron report, a Slack intake — had to be wired by hand in the UI. Three smaller gaps forced the same fallback: a workflow could not be renamed, a step's instructions could only be blind-overwritten becauseget_workflowtruncates them at 500 chars, and a step run that died in ten seconds reported nothing beyond its state.list_project_toolsreturning[]turned out to be a real bug rather than a missing feature.Tool.visible_for_projectyields attachable platform tools or the project's custom ones; the chained.ui_visible(db_source) ANDed the platform half straight back out, so any project without custom tools got an empty list andtool_idshad to be copied between steps sight unseen.What
Triggers (
list/create/update/delete_workflow_trigger) — one surface over both binding kinds, mirroringApi::V1::Projects::Workflows::TriggersController.kindiscolumn | slack | schedule | webhook | event;kind=webhookalso provisions aWebhookEndpointand returns its URL and secret. Model validation messages reach the caller verbatim, so the auto-run rejection names the steps still waiting on a human, andTemporalio::Errorreports "saved, but scheduling failed — re-save to retry".Workflow authoring —
update_workflow(name, description, base resources),get_workflow_step(full untruncated instructions plus every wiring field),duplicate_workflow(wrapsWorkflowDuplicator, returns itsneeds_setupsummary).Introspection —
get_agent(full persona),get_skill(full content), and thelist_project_toolsfix, which now also carries description, tags andrequires_integrationso ids stop being opaque.Board and runs —
archive_board_task,list_gates,delete_gate,get_step_run(error category/message/history, skip reason, retries, plus the terminal session'scontext_metadata, wherebmad_install_statuslands).Existing tools —
create_workflow_steptakes the whole wiring in one call;update_workflow_stepgainsbmad_enabledandallow_non_interactive;get_workflowreports base resources and flags each truncated instruction;create_board_columninserts at a taken position by shifting instead of failing.Every param that replaces a list wholesale now says so and names the tool to read the current value with.
Deliberately not included
create_gate/resolve_gate—Gatesupports exactly three CI gate types, created and resolved by GitHub/GitLab webhooks. A manual resolve is an override of that path, which is a product decision rather than a tool.list_gatessays so in its description.bmad_moduleson a step — not a step column at all; it lives interminal_sessions.session_config. Exposing it needs a migration.bmad_enabledis included.Notes
create_board_columnshifts the tail in descending order inside a transaction: there is a DB unique index on(board_id, position)on top of the model validation, and the association's defaultorder(:position)means a chained.order(position: :desc)would silently stay ascending — hence.reorder.duplicate_workflowauthorizesduplicate?on the target project as well when it differs from the source; membership alone does not imply write access there.WebhookEndpointper retry. That leak still exists intriggers_controller.rband is worth a separate fix.references/aixle-system-reference.mddocumented only column bindings and still called gatesTaskWaits; §6 now covers event triggers, the all-steps-auto-run rule and the UTC/DST timezone trap. Thebuild_workflow/author_stepMCP prompts and the in-app MCP docs page were updated to match.Verification
docker compose exec -T web make check_all— green across all eight checks (rails-test, system-test, rubocop, brakeman, eslint, typescript, fe-test, vite-build). Coverage: backend 90.76%, frontend 78.34%.New/extended integration tests:
personal_mcp_triggers_test.rb(new),personal_mcp_step_runs_test.rb(new), plus additions topersonal_mcp_workflows_test.rb,personal_mcp_resources_test.rbandpersonal_mcp_board_test.rb. Each new tool is covered for its happy path and for cross-tenant isolation.🤖 Generated with Claude Code