Skip to content

Draft: Wizard canvas generation — testing only, not ready for review - #32

Draft
nicolehaugen wants to merge 14 commits into
mainfrom
nicolehaugen-dynamic-canvas-generation
Draft

nicolehaugen wants to merge 14 commits into
mainfrom
nicolehaugen-dynamic-canvas-generation

Conversation

@nicolehaugen

Copy link
Copy Markdown
Contributor

Status

Draft for installation and end-to-end testing. Not ready for review; please do not review or merge yet. No reviewer requests are intended. The branch provides a testable development version; the official release remains unchanged.

Changes

  • Wizard Generate/Regenerate canvas flow with configurable naming, workflow header, optional custom slug and installation approval.
  • Immutable workflow blueprints, request-local deterministic templates, protected-file validation, and declarative-only AI customization.
  • Self-contained generated project canvases with shared styling, workflow collections, phase execution/reruns, safe artifact viewing, folder access and confirmed deletion.
  • Portable Spec Kit setup, effective preset/extension composition, installed-component detection and optional complete-set installation approval, without bypassing host permissions.
  • Optional project-level Constitution card with View and Create / update. A Constitution selected anywhere in the source pipeline is excluded from the visual workflow; verified completion gates other phase execution.
  • Related scanner/composition fixes, documentation, regression coverage and Wizard 0.2.0 version metadata.

Validation

The full Wizard regression suite passed before the final button-label-only edit. A real template-10 generation in the detached test session selected Constitution LAST after the five Assess phases. Desktop1100/mobile360 checks verified five visual phases numbered1–5, exactly one top-level Constitution card, no Constitution below the pipeline, artifact viewing, empty Guidance dialog without slug, selection preservation and prerequisite gating. All125 source hashes matched; existing apps, artifacts, registries and dependency/SDK wiring were preserved.

The final Review overwrite to Regenerate copy change is included but intentionally untested at the user's request; overwrite confirmation behavior is unchanged. Recent live acceptance did not approve installations or execute phases.

Remaining before review

  • Formally install the branch version of the Wizard in an unrelated clean repository.
  • Exercise real setup/installation, Constitution creation, phase execution and reruns.
  • Verify rediscovery and artifact persistence in a new session.
  • Transfer a generated extension to a second clean repository and verify recipient onboarding without the Wizard.

Local tool caches, session mockups/evidence and generated acceptance applications are excluded.

Generate project-scoped workflows with portable setup, installation approval, artifact browsing, and a project-level Constitution prerequisite. Include shared UI, regression coverage, and Wizard 0.2.0 metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 17, 2026 19:58
nicolehaugen and others added 2 commits September 17, 2026 15:02
Replace hidden comments with a separator and cover malformed comments, reconstructed delimiters, and HTML escaping.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

Generation concurrency, recovery, source handling, Constitution detection, and modal accessibility have unresolved correctness and security issues.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced (auto)
Findings: 3 High severity · 4 Medium severity

Note

Copilot is running an experiment and ran this review at Balanced.

Open (7)
What changed in this PR

Adds Wizard 0.2.0’s workflow composer, generating self-contained project canvases from selected Spec Kit pipelines.

Changes:

  • Adds deterministic blueprint compilation, protected template materialization, and generation lifecycle APIs.
  • Adds generated canvas setup, approval, Constitution gating, workflow execution, artifact handling, and UI.
  • Expands documentation, fixtures, regression coverage, and release metadata.
File Description
.github/​plugin/​marketplace.json Updates Wizard and marketplace metadata.
README.md Documents Wizard 0.2.0 capabilities.
plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​README.md Documents generation and generated-canvas behavior.
.../​canvas-runtime/​instances.mjs Tracks generation state per instance.
.../​canvas-runtime/​snapshot-builder.mjs Includes generation data in snapshots.
.../​canvas-runtime/​snapshot.mjs Extends snapshot generation state.
.../​catalog/​extensions.mjs Preserves extension composition metadata.
.../​catalog/​presets.mjs Preserves preset composition metadata.
.../​catalog/​shared.mjs Extends shared catalog normalization.
.../​composition/​preset-order.mjs Handles effective preset ordering.
.../​generation/​applicability.mjs Evaluates pipeline visualization support.
.../​generation/​compiler.mjs Compiles validated immutable blueprints.
.../​generation/​generated-canvas-template/​README.md Documents generated canvas operation.
.../​generation/​generated-canvas-template/​approval-runtime.mjs Implements installation approval persistence.
.../​generation/​generated-canvas-template/​extension.mjs Implements generated canvas runtime and server.
.../​generation/​generated-canvas-template/​project-artifacts.mjs Inspects and gates on Constitution readiness.
.../​generation/​generated-canvas-template/​setup-runtime.mjs Detects and dispatches project setup.
.../​generation/​generated-canvas-template/​ui/​app.js Implements generated workflow UI behavior.
.../​generation/​generated-canvas-template/​ui/​command-views.mjs Derives workflow and Constitution views.
.../​generation/​generated-canvas-template/​ui/​index.html Defines generated canvas structure.
.../​generation/​generated-canvas-template/​ui/​markdown.mjs Safely renders artifact Markdown.
.../​generation/​generated-canvas-template/​workflow-adapter.mjs Adapts declarative workflow configuration.
.../​generation/​generated-canvas-template/​workflow-config.json Seeds generated workflow customization.
.../​generation/​generated-canvas-template/​workspace-files.mjs Enforces workspace artifact access boundaries.
.../​generation/​materialize-template.mjs Materializes and validates generated files.
.../​generation/​naming.mjs Validates generated extension metadata.
.../​generation/​prompt.mjs Builds constrained generation instructions.
.../​generation/​storage.mjs Persists requests, results, and templates.
.../​pipeline/​canonical.mjs Centralizes canonical phase guidance.
.../​project-scanner/​extension-artifacts.mjs Improves extension artifact discovery.
.../​server.mjs Registers generation endpoints and recovery.
.../​server/​handlers-generation.mjs Handles preflight, generation, and reports.
.../​test/​catalog.test.mjs Covers catalog metadata changes.
.../​test/​fixtures/​generation/​assess.json Adds Assess generation fixture.
.../​test/​fixtures/​generation/​bugfix.json Adds bugfix generation fixture.
.../​test/​fixtures/​generation/​sdd.json Adds SDD generation fixture.
.../​test/​generated-approval-runtime.test.mjs Tests installation approval behavior.
.../​test/​generated-constitution.test.mjs Tests Constitution readiness and gating.
.../​test/​generated-extension-lifecycle.test.mjs Tests generated runtime lifecycle.
.../​test/​generated-markdown.test.mjs Tests safe Markdown rendering.
.../​test/​generated-renderer.test.mjs Tests generated UI rendering.
.../​test/​generated-setup-runtime.test.mjs Tests setup detection and dispatch.
.../​test/​generated-workflow-policy.test.mjs Tests generated workflow constraints.
.../​test/​generation-compiler.test.mjs Tests blueprint compilation.
.../​test/​generation-server.test.mjs Tests generation endpoints and reporting.
.../​test/​generation-ui.test.mjs Tests generation dialog helpers.
.../​test/​state-and-scanner.test.mjs Tests scanner and state changes.
.../​ui/​app.js Connects generation UI dependencies.
.../​ui/​client.js Handles generation transport updates.
.../​ui/​generation.js Implements generation configuration UI.
.../​ui/​index.html Adds shared workflow styling and modal root.
.../​ui/​phase-card.js Reuses canonical guidance and step classes.
.../​ui/​phase-runtime.js Adds the pipeline generation action.
.../​ui/​state.js Stores current generation status.
.../​ui/​styles/​overlays.css Styles generation controls and messages.
.../​ui/​styles/​pipeline.css Styles the generation action.
.../​workflow-ui/​stepper.mjs Centralizes workflow step classes.
.../​workflow-ui/​workflow-theme.css Adds shared generated workflow styling.
plugins/​spec-kit-copilot-wizard/​plugin.json Updates Wizard metadata to 0.2.0.

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

Comment on lines +108 to +116
if (downloadUrl) {
try {
const parsed = new URL(downloadUrl);
if (!parsed.hostname || parsed.username || parsed.password || /[\r\n]/.test(downloadUrl)) return null;
} catch {
return null;
}
return { name: sourceName ?? "default", url: downloadUrl, direct: true };
}
Comment on lines +267 to +272
: {
requestId: request.requestId,
state: "generating",
target: request.target?.relativeDirectory ?? null,
startedAt: request.createdAt,
};
Comment on lines +107 to +110
if (inst?.generation?.state === "queued" || inst?.generation?.state === "generating") {
return jsonError(res, 409, "a canvas generation request is already active");
}
const preflight = await preflightGeneration(body, deps);
Comment on lines +10 to +11
const content = await readWorkflowArtifact(cwd, path, blueprint);
const state = !content.trim() ? "empty" : /\[[A-Z0-9_]+\]/.test(content) ? "template" : "ready";
providers.set(key, candidate);
});
return [...providers.values()].sort((left, right) => (
right.priority - left.priority
Comment on lines +64 to +69
return String(value ?? "")
.toLowerCase()
.replace(/[^a-z0-9]+/g, "-")
.replace(/-+/g, "-")
.replace(/^-|-$/g, "")
.slice(0, 63);
Comment on lines +219 to +224
root.innerHTML = `
<div class="wizard-modal-backdrop" role="presentation">
<section class="wizard-modal generation-modal" role="dialog" aria-modal="true" aria-labelledby="generation-title">
<header class="wizard-modal-head">
<h3 id="generation-title">Generate canvas</h3>
<button class="wizard-modal-close" type="button" aria-label="Close">✕</button>
Copilot AI review requested due to automatic review settings September 17, 2026 20:07

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

Security-sensitive generation, concurrency, recovery, and accessibility issues remain, alongside the draft’s outstanding end-to-end validation.

Review effort: Balanced (auto)
Findings: 4 High severity · 4 Medium severity

Note

Copilot is running an experiment and ran this review at Balanced.

Open (8)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Add keyboard handling to the rerun confirmation

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​generation/​generated-canvas-template/​ui/​app.js:406

This modal never moves focus into the dialog, handles Escape, traps Tab, or restores focus after closing. Keyboard users can interact with controls behind the modal. Reuse the complete focus lifecycle already implemented by the Constitution dialog in this file.

This issue also appears on line 413 of the same file.

Low severity Describe the fields that the generation dialog actually shows

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​README.md:101

The dialog intentionally omits the ordered-command and inferred-artifact review (the new UI test explicitly asserts those elements are absent), so these instructions send users looking for controls that do not exist. Describe the target and editable generation options instead.

Comment on lines +169 to +173
let request;
try {
request = await readGenerationRequest(inst?.workspacePath, requestId, deps.generationFs ?? generationFs);
} catch (err) {
return jsonError(res, 400, err?.message ?? String(err));
Retain static integrity checks while leaving first open, setup, and phase execution to the user.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 17, 2026 22: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

Request-integrity, concurrency, recovery, styling, and accessibility issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced (auto)
Findings: 5 High severity · 4 Medium severity

Note

Copilot is running an experiment and ran this review at Balanced.

Open (9)
Previously missed (3)

In code that hasn't changed since last review

Medium severity Do not reject legitimate uses of the word token

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​generation/​storage.mjs:225

This scans every serialized value, so valid metadata or skill-derived text such as “Token rotation workflow” makes an otherwise valid generated canvas fail its success callback. The blueprint schema does not contain callback credentials; validate prohibited fields structurally and keep the workspace-path check instead of rejecting an ordinary word in user content.

Medium severity Scope the shared theme before loading it in the Wizard

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​ui/​index.html:16

workflow-theme.css contains unscoped rules for body, .app-header, .app-body, .btn, .stepper, and .phase-card, and this link loads after every existing Wizard stylesheet. The cascade therefore restyles the header and controls across all tabs (for example, replacing the existing grid header with flex), not just the intended workflow surface. Scope the shared rules under .workflow-surface and apply that class to the Phases surface, or split global generated-app rules from reusable component rules.

Low severity Describe the options the generation dialog actually shows

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​README.md:101

The dialog intentionally does not display the ordered commands or inferred artifact targets (generation-ui.test.mjs:121-152 asserts their absence), so this instruction tells users to review information they cannot see. Update these steps to mention the actual target, naming, workflow-header, slug, and approval controls instead.

Comment on lines +176 to +182
if (
inst?.generation?.requestId
&& inst.generation.requestId !== requestId
&& (inst.generation.state === "queued" || inst.generation.state === "generating")
) {
return jsonError(res, 409, "generation report does not match the active request");
}
Report success, open the new canvas once, and stop without runtime testing or phase execution.

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

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

Request-integrity, recovery, completion-state, styling, and accessibility defects remain unresolved.

Review effort: Balanced (auto)
Findings: 5 High severity · 4 Medium severity

Note

Copilot is running an experiment and ran this review at Balanced.

Open (9)
Previously missed (5)

In code that hasn't changed since last review

Medium severity Treat Clarify as an in-place phase

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​generation/​compiler.mjs:257

Clarify updates the existing spec.md, so using artifact existence as its completion signal makes it appear completed as soon as Specify creates that file—even if Clarify never ran. Include clarify in the transient/no-artifact completion set so it remains runnable and is not falsely reported complete.

Medium severity Remove the unimplemented stale-state promise

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​generation/​generated-canvas-template/​ui/​app.js:402

The generated runtime records only artifact existence/mtime and never marks downstream phases stale after a rerun, so this confirmation promises behavior that does not occur. Either implement downstream invalidation in the runtime and render that state, or change the message to describe the actual rerun behavior.

Medium severity Scope the generated workflow theme to avoid breaking the Wizard

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​ui/​index.html:16

This stylesheet is loaded last into the existing Wizard, but it contains global selectors (:root, body, .app-header, .btn, and .stepper) intended for generated canvases. For example, it changes .app-header from the Wizard's three-column grid in ui/styles/foundation.css:84-94 to flex, affecting navigation and status layout on every tab. Scope the shared rules under .workflow-surface or split generated-app globals from reusable workflow component styles.

Low severity Align the generation-dialog documentation with the UI

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​README.md:101

The dialog no longer displays the ordered commands or inferred artifact targets—generation-ui.test.mjs:123-127 explicitly asserts those summaries are absent. Document that the current pipeline is captured during generation rather than telling users they can review these details in the dialog.

Low severity Correct the documented test-suite size

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​README.md:504

The test directory now contains 20 *.test.mjs files, not five, so this validation guidance materially understates the suite. Avoid a brittle count or update it to reflect the current suite.

Carry Wizard-style clarification answers into template 11 with scoped drafts, explicit submission, and regression coverage.

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

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

The draft has unresolved integrity, recovery, and precedence issues and still requires end-to-end validation.

Review effort: Balanced (auto)
Findings: 5 High severity · 4 Medium severity

Note

Copilot is running an experiment and ran this review at Balanced.

Open (9)
Previously missed (3)

In code that hasn't changed since last review

Medium severity Preserve negative extension priorities

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​catalog/​extensions.mjs:53

This drops the sign from the supported CLI priority domain: Priority: -3 does not match and becomes null. The generated setup contract then loses the exact extension priority, even though its runtime parser supports signed integers.

Medium severity Preserve negative preset priorities

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​composition/​preset-order.mjs:112

The generated setup runtime accepts signed integer priorities, but this parser only captures digits. An installed preset with priority -1 is hydrated with priority: null, so generated setup contracts omit its actual priority and cannot reproduce the source composition.

Low severity Describe review as occurring before the dialog

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​README.md:101

The generation dialog intentionally contains no pipeline or artifact-target review (the UI test asserts those elements are absent), so these steps tell users to look for controls that do not exist after clicking Generate canvas. Move the review step to the Phases page and describe the dialog as metadata/options only.

Keep configuration guidance, static safeguards, and final canvas handoff while removing redundant template descriptions.

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

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.

Comment on lines +98 to +102
export async function writeGenerationRequest(workspacePath, request, fs = realFs) {
const dir = requestDirectory(workspacePath, request.requestId);
await fs.mkdir(dir, { recursive: true });
request.template = await snapshotTemplate(dir, fs);
await atomicJson(join(dir, "request.json"), request, fs);
Comment on lines +163 to +165
// Generated-canvas requests are durable. Re-read the latest request/result
// pair so extension reloads and fresh SSE subscriptions recover progress.
inst.generation = await recoverGenerationStatus(inst.workspacePath).catch(() => inst.generation ?? null);
Comment on lines +187 to +191
if (!records.has(id)) {
records.set(id, {
kind,
id,
enabled: item.enabled !== false,
Comment thread plugins/spec-kit-copilot-wizard/extensions/speckit-wizard-canvas/ui/generation.js Outdated
Comment on lines +98 to +101
Complete Setup, install the presets/extensions you want, and shape the
pipeline on the **Phases** page. Click **Generate canvas**, review the
ordered commands and inferred artifact targets, then choose the generated
extension id and canvas name.
Share client and server validation, reject invalid runs before queueing, and add Windows/macOS source coverage in template v12.

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

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

Precedence inversion, stale asynchronous state, unsafe storage roots, global CSS collisions, and incomplete CI coverage remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced (auto)
Findings: 6 High severity · 8 Medium severity · 1 Low severity

Note

Copilot is running an experiment and ran this review at Balanced.

Open (15)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Avoid loading generated-canvas globals into the Wizard

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​ui/​index.html:16

This stylesheet is loaded after the Wizard's existing styles but its first ~430 lines are global, not scoped to .workflow-surface. For example, it changes .app-header from the Wizard's three-column grid (ui/styles/foundation.css:84-94) to flex and overrides global .stepper, .btn, modal, body, and theme rules. Split out/scoped shared component rules before importing them here so enabling the shared phase styles does not restyle the entire Wizard.

Comment thread .github/workflows/generated-canvas-tests.yml Outdated
…lace

Ship template v13 with shared viewer presentation, guarded artifact amendments, and answer retention until fresh artifact observation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 18, 2026 03:47
if (variant === "generated") body = await readFile(join(target, ...path.split("/")), "utf8");
else body = variant === "baseline" && (path.endsWith(".css") || path === "ui/index.html" || path === "ui/modals.js")
? baseline(path) : await readFile(join(root, ...path.split("/")), "utf8");
if (path === "ui/index.html" && variant !== "generated") body = body.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g, "");
if (variant === "generated") body = await readFile(join(target, ...path.split("/")), "utf8");
else body = variant === "baseline" && (path.endsWith(".css") || path === "ui/index.html" || path === "ui/modals.js")
? baseline(path) : await readFile(join(root, ...path.split("/")), "utf8");
if (path === "ui/index.html" && variant !== "generated") body = body.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g, "");

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.

Comment thread .github/workflows/generated-canvas-tests.yml Outdated
Share draft controls and guarded amendment-only edits across Wizard and generated canvases. Reuse ready setup, document standalone installation, widen artifact viewers, defer generated-canvas CI, and ignore the Impeccable cache. Advance generated template to version 16.

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

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.

Comment on lines +223 to +226
const requestDir = requestDirectory(request.workspacePath, request.requestId);
const generatedPipeline = await verifyMaterializedFiles({
requestFile: join(requestDir, "request.json"), targetDirectory: target, request,
}, fs);
Comment on lines +129 to +132
const priority = kind === "preset"
? header[4].match(/\s+[—-]\s+priority\s+(-?\d+)\s*$/i)?.[1]
: block.slice(1).map((line) => line.match(/^\s*(?:Commands:\s*\d+\s*\|\s*Hooks:\s*\d+\s*\|\s*)?Priority:\s*(-?\d+)(?:\s*\|\s*Status:\s*(?:Enabled|Disabled))?\s*$/i)?.[1])
.find((value) => value !== undefined);
Comment on lines +239 to +242
const pipelineText = JSON.stringify(generatedPipeline);
if (pipelineText.includes(request.workspacePath) || /token/i.test(pipelineText)) {
throw new Error("generated pipeline.json contains workspace or token data");
}
Release amendment locks after submission instead of waiting for marker removal. Remove manual artifact refresh, rename shared-workflow-ui, add purpose headers, and advance the generated template to v17.

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

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.

Comment on lines +56 to +65
if (Object.hasOwn(config, "phaseInputs")) {
record(config.phaseInputs, "phaseInputs");
for (const [phase, input] of Object.entries(config.phaseInputs)) {
if (!phases.has(phase)) throw new Error(`phaseInputs references unknown phase: ${phase}`);
validatePhaseInput(input, phase);
}
for (const phase of phases) {
if (!Object.hasOwn(config.phaseInputs, phase)) throw new Error(`phaseInputs is missing phase: ${phase}`);
}
}
… guidance

Preserve artifact clarification indicators and quiet pipeline controls; derive shared final-phase labels only from complete workflow examples with a standard fallback.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Keep pipeline utilities enabled with confirmation, always expose artifact viewing, and add collection counts and per-workflow status pills. Share format-independent outcome guidance between generation and runtime reviews in template v23.

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

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

The protected-template boundary is bypassable, and generation lifecycle races and recovery failures can corrupt or permanently block generation state.

Get a fresh assessment by requesting another Copilot review.

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

Open (19)
Previously missed (4)

In code that hasn't changed since last review

Medium severity Do not recover unfinished requests as active forever

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​canvas-runtime/​snapshot.mjs:166

A request without result.json is recovered as generating indefinitely, and /api/generation/start rejects while that state is active. If the host or agent session exits before reporting, reopening the Wizard permanently prevents any future generation. Recovery needs a stale-request policy or an explicit retry/cancel path before restoring this blocking state.

Medium severity Do not infer extension priority from descriptions

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​catalog/​extensions.mjs:53

The block scan applies an unanchored priority match to the ID and description lines. For entries where the CLI omits a structured Priority row, prose mentioning a number becomes authoritative installed metadata and is later captured in generated setup contracts. Match only the CLI's structured Priority/Status row, as setup-runtime.mjs:129-132 does.

Medium severity Parse priority only from structured preset metadata

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​composition/​preset-order.mjs:112

This unanchored match scans every line in a preset block, so description text such as “uses priority 1 for triage” can be mistaken for the installed priority (and can win before the real wrapped field). Restrict matching to the CLI metadata suffix; also retain the signed integer handling used by the generated setup parser.

Medium severity Reject Windows-reserved extension directory names

plugins/​spec-kit-copilot-wizard/​extensions/​speckit-wizard-canvas/​generation/​naming.mjs:20

IDs such as con, aux, or com1 pass this validation but cannot be used as directory names on Windows, so preflight succeeds and scaffolding later fails. Apply the same portable reserved-name check already used for generated workflow slugs.

Comment on lines +43 to +50
for (const file of request.template.protectedFiles) {
const path = resolve(target, file.path);
if (!inside(target, path)) throw new Error("protected file escapes target");
const entry = await fs.lstat(path);
if (!entry.isFile() || entry.isSymbolicLink()) throw new Error(`generated template file is not regular: ${file.path}`);
const bytes = await fs.readFile(path);
if (createHash("sha256").update(bytes).digest("hex") !== file.sha256) {
throw new Error(`generated template file was modified: ${file.path}`);
Comment on lines +111 to +115
const inst = deps.getInstance();
if (inst?.generation?.state === "queued" || inst?.generation?.state === "generating") {
return jsonError(res, 409, "a canvas generation request is already active");
}
const preflight = await preflightGeneration(body, deps, { captureExample: true });
Replace generation-time artifact inference with an optional list of up to five labels. Preserve independent result counts, clarification-only defaults, and actionable reserved-label validation. Consolidate captured pre-load checks and keep completion reporting nonblocking.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 18, 2026 20:14
assert.equal(url.origin, "http://127.0.0.1:43221");
const path = url.pathname === "/" ? "ui/index.html" : url.pathname.slice(1);
let body = await readFile(join(root, ...path.split("/")), "utf8");
if (path === "ui/index.html") body = body.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g, "");
assert.equal(url.origin, "http://127.0.0.1:43221");
const path = url.pathname === "/" ? "ui/index.html" : url.pathname.slice(1);
let body = await readFile(join(root, ...path.split("/")), "utf8");
if (path === "ui/index.html") body = body.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g, "");

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.

["../shared-workflow-ui/workflow-theme.css", "template/ui/workflow-theme.css"],
["../shared-workflow-ui/artifact-viewer.css", "template/ui/artifact-viewer.css"],
["../shared-workflow-ui/stepper.mjs", "template/ui/stepper.mjs"],
["materialize-template.mjs", "materialize-template.mjs"],
Comment on lines +118 to +122
const inst = deps.getInstance();
if (inst?.generation?.state === "queued" || inst?.generation?.state === "generating") {
return jsonError(res, 409, "a canvas generation request is already active");
}
const preflight = await preflightGeneration(body, deps);
Comment on lines +29 to +33
if (!EXTENSION_ID_RE.test(extensionId)) {
errors.push({ code: "extension_id_invalid", field: "extensionId", message: "Extension ID must be 1-63 lowercase letters, numbers, or hyphens, and cannot start or end with a hyphen." });
} else if (PROTECTED_EXTENSION_IDS.has(extensionId)) {
errors.push({ code: "extension_id_protected", field: "extensionId", message: "Choose a different extension ID; the Spec Kit Wizard extension is protected." });
}
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.

3 participants