Skip to content

ref: Migrate next-steps to manifest-driven templates#216

Merged
cameroncooke merged 10 commits intomainfrom
refactor/manifest-driven-next-steps
Feb 17, 2026
Merged

ref: Migrate next-steps to manifest-driven templates#216
cameroncooke merged 10 commits intomainfrom
refactor/manifest-driven-next-steps

Conversation

@cameroncooke
Copy link
Collaborator

Move next-step definitions out of individual tool handlers and into YAML
manifests, introducing a declarative nextSteps array on each tool
manifest entry.

Previously every tool handler constructed its own nextSteps array
inline, duplicating structure and coupling presentation logic to tool
business logic. This made it hard to audit which tools suggest which
follow-up actions and required code changes to adjust next-step wording
or ordering.

The new system works in three layers:

  1. Manifest templates (manifests/tools/*.yaml) declare static
    next-step entries with a label, optional toolId, optional
    params (supporting ${arg} substitution from the invocation
    args), and optional priority.

  2. Template builder (buildTemplateNextSteps) resolves templates
    at invocation time, looking up target tools in the catalog and
    substituting params.

  3. Merge layer (mergeTemplateAndResponseNextSteps) combines
    template-driven steps with any dynamic nextStepParams the tool
    handler returns at runtime, so tools can still provide
    context-dependent param values without owning the full next-step
    structure.

Tool handlers now return only nextStepParams (a map of toolId to
param values) when they need dynamic data, rather than constructing
entire NextStep objects. Most tools no longer touch next-steps at all.

Includes a NEXT_STEPS_MIGRATION_TODO.md tracking remaining tools to
migrate and shared test helpers in src/test-utils/next-step-assertions.ts.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 11, 2026

Open in StackBlitz

npm i https://pkg.pr.new/getsentry/XcodeBuildMCP/xcodebuildmcp@216

commit: 4e5f4af

cameroncooke and others added 3 commits February 16, 2026 22:14
Move next-step definitions from inline tool logic into YAML manifests
using a new nextStepTemplates system. Templates support static params,
${arg} substitution, and runtime merging with dynamic response params.
Removes hardcoded next-step construction from individual tool handlers.
Move list_schemes back to manifest-driven next steps while preserving\nmainline guidance improvements for run intent and compile-only flows.\n\nUpdate the manifest ordering/labels, return dynamic nextStepParams from\nthe tool, align tests, and regenerate tool docs so rendered guidance\nmatches runtime behavior.

Co-Authored-By: Claude <noreply@anthropic.com>
@cameroncooke cameroncooke force-pushed the refactor/manifest-driven-next-steps branch from 7c062ae to a4c15cc Compare February 16, 2026 22:34
cameroncooke and others added 2 commits February 17, 2026 08:49
Apply dynamic next-step params even when manifest templates already define\nparams so scaffold follow-up actions resolve placeholders correctly.\n\nAlign testing docs and pattern checks with the canonical policy:\nuse executor/filesystem DI for external boundaries and allow Vitest\nmocking for internal collaborators.

Co-Authored-By: Claude <noreply@anthropic.com>
Route simulator destination string creation through constructDestinationString in\nget_sim_app_path and build_run_sim to keep formatting and behavior\nconsistent across tools and reduce drift risk.

Co-Authored-By: Claude <noreply@anthropic.com>
Run MCP tool responses through the same template/nextStepParams post-processing used by CLI so migrated tools continue emitting next-step suggestions for LLM clients. Also remove the dead arch parameter from get_sim_app_path now that the schema is simulator-only.

Co-Authored-By: Claude <noreply@anthropic.com>
cameroncooke and others added 2 commits February 17, 2026 14:34
Stop resolving manifest next-step params from raw invocation args and rely on tool-provided nextStepParams for canonical runtime values. Replace YAML arg placeholders with static defaults and update snapshot_ui to return dynamic params for all templated follow-up actions.

Co-Authored-By: Claude <noreply@anthropic.com>
Always render manifest-defined next steps when templates exist. Remove\ntool-level nextSteps fallback behavior and keep dynamic injection\nlimited to nextStepParams overlays on manifest params.

Refs #216

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@cameroncooke cameroncooke merged commit a01a1f1 into main Feb 17, 2026
10 checks passed
@cameroncooke cameroncooke deleted the refactor/manifest-driven-next-steps branch February 17, 2026 16:19
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