Skip to content

feat(mcp): add sub-step update, delete and reorder tools - #54

Merged
artempartos merged 1 commit into
developfrom
feat/mcp-sub-step-authoring
Aug 7, 2026
Merged

artempartos merged 1 commit into
developfrom
feat/mcp-sub-step-authoring

Conversation

@artempartos

Copy link
Copy Markdown
Contributor

Why

Both tool surfaces could create sub-steps but never change them. An agent that named a sub-step wrong, or laid a checklist out in the wrong order, had to delete the whole step and rebuild it.

What

Personal MCP (PersonalTools)

  • update_sub_step — name / instructions / position / required. Empty field set is an error, matching update_workflow_step.
  • delete_sub_step — reports soft_deleted so the caller knows whether history was kept.
  • reorder_sub_steps — takes every sub-step id of the step; a partial list is rejected and names the missing ids, because a partial reorder would leave positions the caller never chose. No two-phase position parking here: sub_steps has no unique index on (step_id, position), unlike steps.
  • find_sub_step! in PersonalTools::Base scopes the lookup to the step and to .active, so a sub_step_id from another step returns not found instead of silently editing it.

Aixle Builder (InternalTools)

  • meta_update_sub_step, meta_delete_sub_step, both broadcasting builder activity; the two new action labels are added to the session timeline in SessionPage.tsx.
  • db/seeds/aixle_builder.rb attaches them to the Builder workflow.

Deletion goes through SubStep#destroy, which soft-deletes once the sub-step has runs, so past run history stays readable.

Guides updated so the agents actually reach for the new tools: the personal-MCP workflow guide + author_step prompt, and docs/design/meta-workflow.md.

Deploy note

Existing environments need rails db:seed — the Builder workflow's tool_ids are seeded, not resolved per run, so without it the Builder won't see the two new meta tools.

Tests

  • personal_mcp_workflows_test.rb: create → update → read-back → delete round-trip, reorder incl. the partial-list rejection, soft-delete with an existing run, foreign sub_step_id rejection, empty update.
  • meta_workflow_tools_test.rb: update (only named fields change), empty update, missing sub-step, hard vs soft delete.
  • Hardcoded builder-tool counts bumped 28 → 30 (registry_test.rb, meta_tools_seed_test.rb, aixle_builder_controller_test.rb).

make check_all green on this branch (backend 90.82%, frontend 78.31%).

🤖 Generated with Claude Code

Both tool surfaces could create sub-steps but never change them: an agent
that named one wrong, or ordered a checklist badly, had to delete the whole
step and rebuild it. Personal MCP gains update/delete/reorder_sub_step, the
Aixle Builder gains meta_update_sub_step / meta_delete_sub_step.

Deletion goes through SubStep#destroy, which soft-deletes once the sub-step
has runs, so past run history stays readable. Reordering takes every
sub-step id of the step and rejects a partial list — a silent partial
reorder would leave positions the caller never chose.

Existing environments need `rails db:seed` for the Builder workflow to pick
up the two new meta tools; its tool_ids are seeded, not resolved per run.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit 2cd9b8e into develop Aug 7, 2026
7 checks passed
alex-astafyev pushed a commit to alex-astafyev/flow that referenced this pull request Aug 19, 2026
* origin/develop:
  feat(personal-mcp): add connector catalog and registry-read tools (AixleHQ#55)
  fix(workflows): offer company assets in the workflow asset pickers (AixleHQ#56)
  feat(mcp): add sub-step update, delete and reorder tools (AixleHQ#54)
  feat(workflows): pick repositories and assets on a workflow step (AixleHQ#53)
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