@scayver/specshot-mcp-server 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -139,7 +139,7 @@ Any connected LLM can build the whole site itself and save it back. Nothing call
139
139
 
140
140
  1. `list_projects({})` and pick a project.
141
141
  2. `get_wireframe_context({ projectId })`. You get the brief, every page, the brand tokens, the captured section references, and a build instruction.
142
- 3. Build one FULL-FIDELITY design per page as a self-contained HTML document, following the instruction: real brand tokens, real SVG icons, real copy, fluid responsive, light and dark. Never a grey skeleton.
142
+ 3. Build one FULL-FIDELITY design per page as a self-contained HTML document, following the instruction: real brand tokens, real SVG icons, real copy, fluid responsive, light and dark. Never a gray skeleton.
143
143
  4. `publish_page_version({ projectId, name: "Home", html, sections, pageSlug, ... })` for each page. SpecShot stores your HTML exactly as given, versions it, files it under the page, syncs its sections, and puts it on the owner's canvas.
144
144
  5. Open the project in SpecShot to review the wireframes, iterate, or promote them.
145
145
 
@@ -1,54 +1,18 @@
1
1
  // The SpecShot build standard, concise form, for the stdio MCP package.
2
2
  //
3
- // This package publishes standalone to npm, so it cannot import the canonical
4
- // text from @specshot/shared. It carries a SHORT standard: enough to reverse the
5
- // grey-placeholder failure at connection time, and a pointer to the authoritative,
6
- // always-current, per-project instruction that get_wireframe_context returns
7
- // (that text is assembled from the shared BUILD_STANDARD on the server, so it is
8
- // the copy that never drifts). Delivered as the server's `instructions` and as
9
- // the body of the build_a_page prompt.
10
- export const BUILD_STANDARD_SHORT = `# SpecShot build standard
11
-
12
- You are connected to build real, approvable website designs. SpecShot never calls a
13
- model on the server, so the quality is entirely yours.
14
-
15
- - Build FULL FIDELITY, never grey placeholder boxes, dashed "image here" holes, or a
16
- bare skeleton. If a human cannot approve or reject it as a real website, it is not done.
17
- - Read the project FIRST with get_wireframe_context and use every input: the real
18
- brand tokens, the approved copy (verbatim), the captured references, and the pages.
19
- If an input is missing, say so and ask. Do not ship generic filler.
20
- - STUDY the inspiration before you build. Open every inspiration and capture image
21
- (each has a signed imageUrl; use visualSummary if you cannot see images) and design
22
- at that level. If your environment has a frontend-design or web-design skill,
23
- invoke it and build with it. Skipping the references is the core failure mode.
24
- - Real SVG icons (never emoji). Every color and size from the project's tokens.
25
- Light and dark. Responsive at 390, 768, and 1440. WCAG AA contrast, labels, focus.
26
- - One self-contained HTML per page, CSS inline in a <style> block. No external
27
- scripts, fonts, or images: the preview strips script/iframe/object/embed/link/meta/
28
- base and drops @import, so inline everything (SVG, gradients, data: URIs).
29
- - Embedded fonts load: an @font-face with a data: URI src (or local()) registers and
30
- renders in the preview. One with an external url is dropped whole. Do not strip
31
- embedded fonts to work around the preview, and do not depend on locally installed
32
- fonts (a client reviewing in the portal does not have them).
33
- - Publish each new page with publish_page_version, which saves AND places it on the
34
- owner's canvas. ALWAYS pass its pageSlug, so it files under the page, and pass
35
- sections (names in document order) so they become selectable for client feedback.
36
- save_wireframe saves the same way but places nothing, so an agent that only saves
37
- reports success on work nobody can see. Revise in place with revise_wireframe when
38
- feedback arrives: send baseVersion and the revised sections. Every revision is
39
- stored as a design version you can read back with get_design_versions.
40
-
41
- ANTI-SLOP DESIGN LAW (craft floor, non-negotiable). Slop is the model's default, so these are
42
- hard constraints. No Inter/Roboto/Geist/Fraunces by default, pair a display and body face,
43
- headline at most 3 lines, body 14px or larger, measure 65-75ch, no kicker above a heading. One
44
- accent under 80 percent saturation, no purple-to-cyan AI gradient, never pure black or white,
45
- never gray text on color, no gradient text. A border or a shadow, never both, no nested cards,
46
- no side-tab accent border. Break the center, no three equal cards. Exponential ease-out or
47
- spring only, never bounce, animate transform and opacity only. Every value is a token, shared
48
- UI is a component, repeated content is a loop, fluid with clamp and dvh from 360px to ultrawide.
49
- Ship hover, focus, loading, empty, and error states. Organic content, no John Doe or Lorem. The
50
- committed brand tokens win over any generic instinct.
51
- Full law: "AIOS/00 Core/Core - Anti-Slop Design Law.md".
52
-
53
- get_wireframe_context returns the full, current, per-project build instruction. Read
54
- it before you build, and follow it as the authoritative standard.`;
3
+ // This package publishes standalone to npm, so it cannot IMPORT the canonical text from
4
+ // @specshot/shared — but it must not DRIFT from it either, which is exactly what happened:
5
+ // this file sat at a pre-2026-08 revision while the shared standard gained the whole-page
6
+ // scope rule, the checkable craft numbers, and the placeholder-comment ban. Every agent
7
+ // connecting through the published package got a first impression missing all three, and
8
+ // the connect-time instructions are the strongest text an agent ever sees.
9
+ //
10
+ // So the body below is a VERBATIM copy of BUILD_STANDARD_SHORT from
11
+ // packages/shared/src/build-standard.ts, and a guard test in apps/web
12
+ // (npm-standard-sync.test.ts) fails the build when the two stop carrying the same
13
+ // load-bearing clauses. Update the shared text first, then mirror it here.
14
+ //
15
+ // The per-project instruction from get_wireframe_context is still the authoritative,
16
+ // always-current text — assembled server-side from the shared BUILD_STANDARD, so it can
17
+ // never drift. This file only has to get the agent safely to that call.
18
+ export const BUILD_STANDARD_SHORT = `Build full-fidelity, approvable website designs, never gray placeholders or bare skeletons. SAVE WHOLE PAGES, never a lone section or component: header, every section in order, footer. A hero, a pricing block or a card saved on its own becomes a separate top-level design beside the owner's real pages. Assemble the page, then save it once; every save REPLACES the page, so saving only the part you changed deletes the rest. Read the project first (get_wireframe_context): use its real brand tokens, approved copy, and references. STUDY every inspiration image before you build, and invoke your frontend-design skill if your environment has one. Real SVG icons, light and dark, WCAG AA. FLUID RESPONSIVE IS THE LAW: correct at EVERY width, not three. clamp() for type and space, repeat(auto-fit, minmax()) for grids, min-width:0 on flex/grid children, container queries for components. EVERY value a token with a literal fallback, never a raw px. A layout that only holds at 390/768/1440 breaks the moment the owner scrubs between them and comes back to you. NO AI TELLS: no Inter-default font, no purple-to-cyan gradient, never pure #000/#fff, no gray-on-color, no gradient text, no side-tab accent border, no cards nested in cards, no kicker above a heading, no bounce easing, no emoji icons. Ship all states (hover, focus, loading, empty, error). Inline all CSS and fonts (no external scripts or fonts, the preview strips them). REAL IMAGES ARE ALLOWED NOW, from one source only: a placeableUrl in get_wireframe_context. Put that value straight in a src or url() and it renders, for the owner and for the client in their review link. It is present ONLY on the client's own assets — files they uploaded, and captures of their own site. A reference captured from somebody else's page has placeableUrl null on purpose: study it through imageUrl and BUILD the section, never ship a picture of another company's page. Any other image URL is still stripped to a gray box. NUMBERS, not adjectives: body text at least 1rem, UI text never under 0.6875rem, line-height 1.5-1.7, 65-75 characters per line, at least a 1.25 type scale, headlines 2-3 lines, dvh never vh, animate only transform and opacity, touch targets at least 2.75rem. NEVER emit a placeholder comment in place of markup: a page with "rest of sections here" where its footer belongs is a broken page. Call the build_a_page prompt for the full standard.`;
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ const client = new SpecShotClient(baseUrl, token);
47
47
  // instructions travel with the connection: a client surfaces them to the model
48
48
  // as system context, so the agent knows to build full fidelity before it reads a
49
49
  // single tool description. Without this the build standard lived only inside one
50
- // tool's payload and grey-placeholder output was the result.
50
+ // tool's payload and gray-placeholder output was the result.
51
51
  const server = new McpServer({ name: "specshot", version: VERSION }, { instructions: BUILD_STANDARD_SHORT });
52
52
  // A callable prompt whose body IS the standard, for clients that surface prompts
53
53
  // in a picker. Registered before the tools so it lists first.
@@ -67,7 +67,7 @@ export function registerWireframeTools(server, client) {
67
67
  return fail(e instanceof Error ? e.message : "Failed to create the page.");
68
68
  }
69
69
  });
70
- server.tool("get_wireframe_context", "START HERE. Get everything needed to build a FULL multi-page website design for a project: the brief, the list of pages, the real brand tokens, the captured section references with their real copy, the inspiration, and the full build instruction that defines what done looks like (full fidelity, real tokens, real SVG icons, never grey placeholders). Build one full-fidelity page per page from this, then publish each with publish_page_version (which saves AND puts it on the owner's canvas). No AI runs on the SpecShot server, you do the building.", { projectId: z.string() }, async ({ projectId }) => {
70
+ server.tool("get_wireframe_context", "START HERE. Get everything needed to build a FULL multi-page website design for a project: the brief, the list of pages, the real brand tokens, the captured section references with their real copy, the inspiration, and the full build instruction that defines what done looks like (full fidelity, real tokens, real SVG icons, never gray placeholders). Build one full-fidelity page per page from this, then publish each with publish_page_version (which saves AND puts it on the owner's canvas). No AI runs on the SpecShot server, you do the building.", { projectId: z.string() }, async ({ projectId }) => {
71
71
  try {
72
72
  return ok(await client.get(`/api/mcp/projects/${projectId}/wireframe-context`));
73
73
  }
@@ -75,7 +75,7 @@ export function registerWireframeTools(server, client) {
75
75
  return fail(e instanceof Error ? e.message : "Failed to get wireframe context.");
76
76
  }
77
77
  });
78
- server.tool("save_wireframe", "Save a full design you built back into SpecShot as a design concept. PREFER publish_page_version, which does this AND places the design on the owner's canvas: saving alone leaves it invisible there. Call this once per page after building that page from get_wireframe_context at FULL FIDELITY (real brand tokens, real SVG icons, real content, never grey placeholder boxes). Pass the project id, a name (for example \"Home\"), and the self-contained html (put css inline in a <style> block, or pass css separately). File it under the page it realizes by passing pageSlug (from get_wireframe_context), so the owner sees every version side by side and the design's sections become selectable for client feedback. STUDY the inspiration images first, and use your frontend-design skill if you have one. The response may include qualityWarnings (placeholder copy, grey-only palette, missing SVG): fix them with revise_wireframe before telling the user the design is done. SpecShot stores your html exactly as given and does not modify or regenerate it. Requires a read/write API token.", {
78
+ server.tool("save_wireframe", "Save a full design you built back into SpecShot as a design concept. PREFER publish_page_version, which does this AND places the design on the owner's canvas: saving alone leaves it invisible there. Call this once per page after building that page from get_wireframe_context at FULL FIDELITY (real brand tokens, real SVG icons, real content, never gray placeholder boxes). Pass the project id, a name (for example \"Home\"), and the self-contained html (put css inline in a <style> block, or pass css separately). File it under the page it realizes by passing pageSlug (from get_wireframe_context), so the owner sees every version side by side and the design's sections become selectable for client feedback. STUDY the inspiration images first, and use your frontend-design skill if you have one. The response may include qualityWarnings (placeholder copy, gray-only palette, missing SVG): fix them with revise_wireframe before telling the user the design is done. SpecShot stores your html exactly as given and does not modify or regenerate it. Requires a read/write API token.", {
79
79
  projectId: z.string(),
80
80
  name: z.string(),
81
81
  html: z.string(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayver/specshot-mcp-server",
3
- "version": "0.10.0",
4
- "description": "MCP server for SpecShot — lets Claude Code, Claude Desktop, and Cursor fetch approved design concepts with brand tokens and a ready-to-build prompt.",
3
+ "version": "0.11.0",
4
+ "description": "MCP server for SpecShot \u2014 lets Claude Code, Claude Desktop, and Cursor fetch approved design concepts with brand tokens and a ready-to-build prompt.",
5
5
  "keywords": [
6
6
  "mcp",
7
7
  "model-context-protocol",