Skip to content

feat(specify): surface Claude Artifacts in specs for UX/UI projects (#431) - #432

Merged
kevinkod merged 1 commit into
mainfrom
431-artifacts-in-uxui-specs
Jul 18, 2026
Merged

feat(specify): surface Claude Artifacts in specs for UX/UI projects (#431)#432
kevinkod merged 1 commit into
mainfrom
431-artifacts-in-uxui-specs

Conversation

@kevinkod

@kevinkod kevinkod commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Closes #431.

Why

For front-end / UX-UI features, a static markdown spec under-serves the user. Claude Artifacts can render mockups, interactive prototypes, and flow diagrams that make a feature tangible and easy to validate before any code is written. The CLI already gates behaviour on FE-surface detection (the accessibility audit), so a "project has a UX/UI surface" signal is an established pattern to reuse.

What

When a spec is authored for a project with a front-end surface, the generated spec now carries an optional ## Visual Prototyping with Claude Artifacts section that points the reader at the public artifacts docs.

  • spec-template.md — new optional, clearly-marked conditional section. Carries the detail + two public docs links (support.claude.com "what are artifacts", code.claude.com "artifacts in Claude Code").
  • specify.md phase doc — terse reinforcement of the gate. Kept lean on purpose: specnaut-specify.md is the largest Windsurf Cascade workflow and sits near the 12k-char cap, so the bulk of the guidance lives in the template (not a Windsurf workflow).
  • Gate reuses the accessibility mechanism — the SAME front-end-surface signal list the a11y-auditor uses (.html/.jsx/.tsx/.vue/.svelte/.astro, an app/pages/routes markup dir, or a package.json FE-framework dep). No new heuristic.
  • No FE surface → section removed entirely. A back-end / CLI-only spec stays artifact-free (mirrors the "remove inapplicable sections" rule).

Boundary (§ I)

Only the public Claude Artifacts product and its public docs are referenced — nothing from the private Cloud half. The user's original "artefacts côté cloud" means Claude's hosted Artifacts (claude.ai), not specnaut-cloud.

Tests

  • tests/templates/artifacts_in_specs_test.ts (new) — locks the bundled spec-template + specify content: the section ships, both docs links are present, the gate defers to a11y-auditor, and the remove-if-no-FE instruction is present.
  • Plugin copy + local golden kept byte-identical; deno task bundle regenerated.
  • Full suite: 1137 passed. deno fmt --check + deno lint clean.

Agent adoption

/specnaut specify now adds an optional Visual Prototyping with Claude Artifacts section to generated specs when your project has a front-end / UX-UI surface (detected via the same signals the accessibility gate uses). Specs authored before this upgrade won't have it retroactively — run the prompt below to backfill any in-flight UX/UI specs, and to update any project-local spec-template override you maintain.

Check whether this project has a front-end surface (any of: .html/.htm,
.jsx/.tsx, .vue/.svelte/.astro files; a public/, src/app/, src/pages/,
src/routes/, or pages/ markup dir; or a package.json listing react, vue,
svelte, solid-js, preact, lit, astro, @angular/core, or qwik).

If it does:
  1. For each in-flight spec under .specnaut/specs/*/spec.md that lacks a
     "## Visual Prototyping with Claude Artifacts" section, add one after
     Assumptions that points the reader at Claude Artifacts for visualising
     the UX, with links to the public artifacts docs.
  2. If you keep a customised .specnaut/templates/spec-template.md override,
     mirror the same optional, FE-gated section into it.

If this project has NO front-end surface, do nothing — a back-end/CLI-only
spec must stay artifact-free.

🤖 Generated with Claude Code

…431)

When a spec is authored for a project with a front-end / UX-UI surface,
the generated spec now carries an optional "Visual Prototyping with Claude
Artifacts" section pointing at the public artifacts docs, so stakeholders
can visualise the UX (mockups, prototypes, flow diagrams) before any code.

The section is gated on the SAME front-end-surface signal list the
accessibility auditor uses (a11y-auditor) — not a new heuristic. Back-end /
CLI-only specs, which show none of those signals, drop the section entirely
and stay artifact-free (mirrors the "remove inapplicable sections" rule).

- spec-template.md: new optional, conditional section (carries the detail +
  the two public docs links).
- specify.md phase doc: terse reinforcement of the FE gate (kept lean to
  stay under the Windsurf Cascade 12k workflow cap).
- plugin copy + local golden kept byte-identical; bundle regenerated.
- tests/templates/artifacts_in_specs_test.ts locks the content + the gate.

Only the public Claude Artifacts product and its public docs are referenced
(constitution § I — no private-half identifiers in the public CLI).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DUdE2AAKFxPWMR9DGtAmtu
@kevinkod
kevinkod merged commit 4aa64e5 into main Jul 18, 2026
8 of 9 checks passed
@kevinkod
kevinkod deleted the 431-artifacts-in-uxui-specs branch July 18, 2026 18:38
kevinkod added a commit that referenced this pull request Aug 4, 2026
…431) (#432)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

Surface Claude artifacts in generated specs for UX/UI projects

1 participant