Skip to content

Fix Wizard pipeline hooks and support additive phases - #33

Merged
nicolehaugen merged 8 commits into
mainfrom
nicolehaugen-fix-wizard-hook-targets
Sep 24, 2026
Merged

nicolehaugen merged 8 commits into
mainfrom
nicolehaugen-fix-wizard-hook-targets

Conversation

@nicolehaugen

Copy link
Copy Markdown
Contributor

Summary

  • Normalize extension hook targets and render a single connector between pipeline steps, with hook tooltips listing the dispatched commands.
  • Add an agent-facing addPipelinePhases canvas action that inserts installed, manually runnable commands without removing or reordering existing phases; persist and broadcast changes.
  • Ignore generated specs/ artifacts so sample Wizard runs do not enter repository changes.

Validation

  • Wizard suite passed 287/287 tests after the pipeline changes.
  • Rebasing onto the latest origin/main completed cleanly; git diff --check passed.

Generated specifications and Wizard session state are not included.

nicolehaugen and others added 4 commits September 24, 2026 11:29
Preserve declared hook commands for multi-command extensions and repair only unambiguous legacy targets. Add composition persistence regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 24, 2026 16:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Mixed-anchor additions can be ordered incorrectly, and concurrent state updates may be overwritten.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds reliable hook visualization and agent-driven additive pipeline phases while preserving Wizard state.

Changes:

  • Groups hook commands by lifecycle phase with simplified connectors.
  • Adds, persists, and tests addPipelinePhases.
  • Normalizes hook targets and ignores generated specifications.
File Description
.gitignore Ignores generated specifications.
README.md Documents the new action.
extension.mjs Registers pipeline actions.
composition-apply.mjs Normalizes hook targets.
actions/​pipeline.mjs Implements additive phases.
phase-card.js Groups and renders hook steps.
stepper.css Removes obsolete hook separators.
composition.test.mjs Tests hook normalization/rendering.
pipeline-action.test.mjs Tests pipeline additions and persistence.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 24, 2026 18:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The additive pipeline and hook behavior is coherently implemented and covered by focused tests.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 24, 2026 18:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Partial retries can place new phases before an already-present transitive anchor chain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 24, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Hook normalization retains a stale top-level target that can override the corrected binding target.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Normalize artifact targetCommand to the selected binding target

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​canvas-runtime/​composition-apply.mjs:152

This keeps a stale top-level artifact.targetCommand when the binding-derived target wins. resolveHooksForCommand prefers a.targetCommand over each binding's targetCommand (pipeline/active-artifacts.mjs:229), so the conflicting legacy case exercised below still resolves and displays the old command despite the normalized ID/bindings. Normalize the top-level field to the selected target as well.

@nicolehaugen

Copy link
Copy Markdown
Contributor Author

Won't fix (hook target normalization edge case). The reported mismatch requires a hook artifact whose top-level targetCommand conflicts with its binding's targetCommand. The current deterministic composition assembler creates hook artifacts with matching ID/binding targets and does not set a competing top-level target, so ordinary extension installation and refresh do not produce this shape. We have not identified a normal Wizard workflow that generates the conflict; it is covered only by a synthetic inconsistent/legacy input in the test.

If such a record is supplied from stale or externally constructed metadata, the Wizard could display the old hook command because resolveHooksForCommand prefers the top-level field. This is a display/attribution issue, not evidence that the actual hook executor runs a different command or that artifacts are deleted. Given the narrow trigger, we are deferring the defensive normalization change for this PR. Revisit if a real producer or user report demonstrates the conflicting shape.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 24, 2026 18:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The implementation is consistent, release metadata is synchronized, and the changed behavior has focused regression coverage.

Review effort: Balanced
Findings: None

@nicolehaugen
nicolehaugen merged commit 0e79995 into main Sep 24, 2026
5 checks passed
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.

2 participants