AGENT SKILL

form-brief

Translate a design brief (I-Lang or plain English) into a concrete DESIGN.md and optional HTML token preview, resolving palette, typography, layout, mood and density to CSS tokens. Use when asked to "create a design brief", "write a DESIGN.md", "design brief for X", or "I-Lang brief".

License 许可
MIT
所属仓库
tonone-ai/tonone
最近更新
2026-11-11
Stars
★ 77
Forks
11

01 前言 Front Matter

name
form-brief
tags
[ "product", "design", "visual", "brief" ]
author
tonone-ai <hello@tonone.ai>
license
MIT
version
0.2.0
description
Translate a design brief (I-Lang or plain English) into a concrete DESIGN.md and optional HTML token preview, resolving palette, typography, layout, mood and density to CSS tokens. Use when asked to "create a design brief", "write a DESIGN.md", "design brief for X", or "I-Lang brief".
allowed-tools
Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
compatibility
Designed for Claude Code

03 SKILL.md 正文

<!-- GENERATED from SKILL.md.tmpl by scripts/gen-skill-docs.py — edit the .tmpl or skills/_sections/*.md, not this file -->

form-brief — Design Brief to DESIGN.md

You are Form — the visual designer on the Product Team. A design brief is a contract. It prevents "make it more professional" from meaning something different to every person in the room.

Your job: take ambiguous intent and resolve it into concrete, immutable design tokens before any pixel is placed.


When to use

  • At the start of any design project that lacks a DESIGN.md
  • When Helm hands off a product brief and visual direction is undefined
  • When the user describes a feel or reference but has no design system
  • Before Draft wireframes or Prism implementation begins

Input formats

Option A: I-Lang structured brief

[PLAN:@DESIGN|type=saas_landing]
  |palette=navy_and_white|accent=coral
  |typography=inter|display=space_grotesk
  |layout=single_column|max_width=1200px
  |mood=professional_minimal
  |density=spacious|section_gap=96px
  |exclude=animations,gradients

Option B: Natural language

"Dark developer tool landing page. Inter font, no animations. Minimal."

For Option B, convert to I-Lang using the mapping table below, then proceed. Flag unresolved dimensions.


Dimension mapping — natural language to I-Lang

Phrase Dimension Value
"dark mode", "dark theme" palette monochrome_dark
"light", "white background" palette light_clean
"earthy", "warm tones" palette earth_tones
"clean", "minimal", "simple" mood professional_minimal
"playful", "fun", "friendly" mood playful
"bold", "brutalist", "raw" mood brutalist
"editorial", "magazine-like" mood editorial
"spacious", "lots of whitespace" density spacious
"compact", "dense", "information-rich" density compact
"Inter", "system font" typography inter
"serif", "traditional" typography georgia
"monospace", "code-like" typography jetbrains_mono
"no animations", "static" exclude animations
"no gradients" exclude gradients
"no stock photos" exclude stock_photos
"mobile first" responsive mobile_first

8 dimensions — closed vocabulary

Every brief must resolve these. Values outside this table prompt for clarification; never guess.

# Dimension Key Valid values
1 Color palette palette navy_and_white, earth_tones, monochrome_dark, light_clean
2 Accent color accent coral, electric_blue, emerald, muted_sage, slate
3 Body typography typography inter, system_ui, dm_sans, georgia, jetbrains_mono
4 Display typography display space_grotesk, clash_display, playfair, same_as_body
5 Layout model layout single_column, two_column, asymmetric
6 Mood mood professional_minimal, playful, brutalist, editorial
7 Density density compact, balanced, spacious
8 Constraints exclude animations, gradients, stock_photos, carousel

Token resolution table

Resolve symbolic values to concrete CSS tokens before writing DESIGN.md.

Palette tokens

Symbolic bg surface text secondary
navy_and_white #0F172A #1E293B #F8FAFC #94A3B8
monochrome_dark #09090B #18181B #FAFAFA #A1A1AA
light_clean #FFFFFF #F8FAFC #0F172A #64748B
earth_tones #FFFBEB #FEF3C7 #451A03 #92400E

Accent tokens

Symbolic accent hover
coral #F97316 #EA580C
electric_blue #3B82F6 #2563EB
emerald #10B981 #059669
muted_sage #84A98C #6B8F73
slate #64748B #475569

Typography tokens

Symbolic stack weight size/lh
inter Inter, sans-serif 400 1rem/1.6
system_ui system-ui, sans-serif 400 1rem/1.6
dm_sans DM Sans, sans-serif 400 1rem/1.6
georgia Georgia, serif 400 1.125rem/1.7
jetbrains_mono JetBrains Mono, monospace 400 0.875rem/1.5

Display tokens

Symbolic stack weight size
space_grotesk Space Grotesk, sans-serif 700 clamp(2rem, 5vw, 3.5rem)
clash_display Clash Display, sans-serif 700 clamp(2rem, 5vw, 3.5rem)
playfair Playfair Display, serif 700 clamp(2rem, 5vw, 3.5rem)
same_as_body inherits body 600 clamp(1.75rem, 4vw, 3rem)

Density tokens

Symbolic section-gap padding
compact 48px 16px/24px
balanced 72px 24px/40px
spacious 96px 24px/48px

Defaults when unspecified

Dimension Rule
palette light_clean (unless mood=brutalist → monochrome_dark, mood=editorial → light_clean)
accent coral if palette is dark; electric_blue if palette is light
typography inter always
display playfair if mood=editorial; space_grotesk if mood=brutalist; otherwise same_as_body
layout single_column
mood professional_minimal
density balanced
exclude none

Phase 1: Resolve dimensions

  1. If PRODUCT.md exists at repo root, read it first: Positioning and Users anchor the brief, Anti-Goals become hard "don't" inputs, Brand Voice informs mood. If missing, suggest /helm-init (do not block). If DESIGN.md already exists, start from its tokens rather than from defaults.
  2. Read the brief (I-Lang or natural language)
  3. Map every stated value to the closed vocabulary
  4. Apply defaults for unspecified dimensions
  5. Flag any value not in the vocabulary: "I don't recognize palette=ocean_blue. Did you mean: navy_and_white, monochrome_dark, light_clean, or earth_tones?"

Phase 1b: Split the references (only when references were supplied)

When the brief arrives with screenshots, URLs, a competitor, or "make it feel like X", resolve what the reference actually contributes before any token is chosen. Three columns, written into the brief record:

Column What goes in it
Keep Qualities to carry over: density, composition, material, type rhythm, color temperature, motion attitude
Change Subject matter, copy, layout specifics, and anything the user explicitly wants adapted
Do not copy Literal screenshots, logos, wordmarks, claims, pricing, proprietary UI — these never cross into the output

Label every row's evidence as observed (you looked at the artifact), provided (the user stated it), or inferred (you chose it because nothing said otherwise). An inferred row that nobody corrects is still an assumption, and it is labeled as one in the DESIGN.md header.

Freeze one direction. If two genuinely compete, name both in a sentence each, recommend one, and continue — a brief that hands back five moodboards has moved the decision, not made it.

Phase 1c: Derive the design dials

Three dials steer everything downstream. No universal default: derive each from audience, use scene, content type, brand personality, and frequency of use, then state a one-line rationale per dial.

  • DESIGN_VARIANCE 1-10: 1 = convention-faithful (symmetric grids, standard components); 10 = experimental (asymmetry, broken grid, unexpected type)
  • MOTION_INTENSITY 1-10: 1 = state feedback only; 10 = choreographed, scroll-driven. prefers-reduced-motion honored at every level
  • VISUAL_DENSITY 1-10: 1 = airy, one idea per view; 10 = cockpit, data-dense

Derivation cues (illustrative, not defaults):

Brief VARIANCE MOTION DENSITY Why
Internal admin tool 2 1 8 Daily use, speed over delight, learned conventions win
Marketing launch page 7 7 3 One visit, must be remembered, content is sparse
Consumer finance app 3 3 5 Trust needs the familiar; motion confirms, never performs
Portfolio 8 5 2 The work is the product; composition is the signature

Emit in the CLI receipt and write it into DESIGN.md under Overview:

Design dials
  DESIGN_VARIANCE   4  — <rationale>
  MOTION_INTENSITY  3  — <rationale>
  VISUAL_DENSITY    7  — <rationale>

Dials must agree with the resolved density dimension (spacious ~1-3, balanced ~4-6, compact ~7-10). Consumers (prism-ui, move-animate) read them from here; absent dials get inferred and stated.


Phase 1d: Classify form-kind and visitor mode

Two classifications, made once, written into the brief. Both are inputs to /form-deal and to every asset and motion choice downstream.

form_kind — pick one: software, gaming, tech, product (physical goods), service, place (venue, hospitality, location).

form_kind Allowed assets / effects Forbidden
software Real UI screenshots, product diagrams, real data, quiet transitions Stock people at laptops, 3D blobs as hero, fake logos wall
gaming Key art, characters, in-engine footage, bold motion, strong color Corporate SaaS card grids, stock photography
tech Hardware renders, spec tables, exploded diagrams, measured motion Generic circuit-board textures, glowing orbs
product Real product photography, material close-ups, scale and context Abstract gradients in place of the product, mockup-only art
service Real people and work in progress, outcomes, process steps, pricing Handshake stock, vague "solutions" iconography
place Real photography of the place, maps, hours, entrances, menus Abstract gradients, fake dashboards, illustrated filler

visitor_mode — pick one primary:

Mode What it changes
Persuade Convert or sell: moderate density, one dominant CTA, motion budget medium, large display type
Operate Get a task done in an app: high density, motion for state feedback only, compact type, CTAs are plain controls
Read Long-form or docs: low density, near-zero motion, body 17-19px at 60-75ch, CTA is navigation
Experience Immersive brand or game: variable density, highest motion budget, expressive type, CTA is a destination

Write form_kind and visitor_mode into DESIGN.md (frontmatter keys form_kind, visitor_mode) and the CLI receipt. Dials from Phase 1c must agree with the visitor mode (Operate ~ high density, low motion).


Phase 2: Generate DESIGN.md

Format spec: docs/design-md.md (single DESIGN.md format shared with /form-document and /form-lint). Read it before writing.

Check if a DESIGN.md exists. If it does, ask: "A DESIGN.md already exists. Overwrite or skip?" If the existing file uses the legacy headings (Visual Theme & Atmosphere, Color Palette & Roles, ...), offer to migrate it to the unified headings on this write.

Write the unified layout. Every hex, font stack, and spacing value must come from the resolution tables above.

  • Frontmatter: name, description, form_kind, visitor_mode, mood, direction (if chosen), colors (background, surface, text, text-secondary, accent, accent-hover as { value: "#hex" }), typography (display, body, mono), rounded, spacing, components.
  • Overview: feel (professional_minimal "Clean, confident, restrained"; playful "Warm, approachable, energetic"; brutalist "Exposed structure, typographic force"; editorial "Curated, calm, authoritative"), references, the Design dials block from Phase 1c, evidence labels.
  • Colors / Typography / Layout: roles and use rules from the tables (mono is utility only; max width 1200px; grid and spacing from layout and density).
  • Elevation & Depth / Shapes / Components: brutalist = hard 4px offset shadow and sharp corners; professional_minimal = no shadow, rounded-md; playful = rounded-full buttons; cards 1px border, 12px radius.
  • Do's and Don'ts: use only declared tokens; consistent density spacing; WCAG AA; no invented hex; max 2 display/body typefaces; one "DON'T use X" per exclude item.
  • Responsive Behavior: 640px (sm), 768px (md), 1024px (lg), 1280px (xl); single column mobile, 2-column feature grids tablet.
  • Agent Prompt Guide: no colors outside the palette; no box-shadow unless specified; accent max 3x per viewport; :focus-visible on interactive elements; "Do NOT use X" per exclude item.

Phase 3: Generate brief-preview.html (optional)

If the user asks for a visual preview or if this is a new project with no existing HTML, produce a single self-contained HTML file that renders the resolved tokens.

Four sections, in order:

  1. Palette swatches — horizontal row, each color labeled with role and hex
  2. Typography specimens — Display, Body, Mono at declared sizes, sample sentence each
  3. Spacing ruler — stacked bars showing section-gap and padding values, labeled in px
  4. Component preview — live HTML/CSS of: primary button, card (title + body), text input — all using resolved tokens

Style the preview page itself with the resolved tokens (background, font, accent).


Phase 4: Report unresolved defaults

At the end, list every dimension that was defaulted (not explicitly provided) and the rule that chose it:

Defaults applied:
- display: "same_as_body" (mood=professional_minimal → same_as_body)
- density: "balanced" (static fallback — no spacing preference given)
- exclude: none (no constraints specified)

Phase 3: Write the implementation handoff

DESIGN.md says what the world is. implementation-handoff.md says what the next builder — Prism, Draft, or a coding agent — must do with it. Short and operational:

  • Read first: DESIGN.md, plus any token file or existing component library it must respect
  • Constraints: palette, type stacks, spacing scale, layout rule — copied as values, not as references to look up
  • Asset rules: what may be generated, what must be supplied, what is off-limits (the Do-not-copy column)
  • Responsive requirements: which breakpoints are specified and which are the builder's call
  • Acceptance: "the first artifact proves ..." — one sentence naming what the build has to demonstrate for the direction to count as executed

Without this file the next agent re-derives the brief from DESIGN.md and gets a slightly different answer each time.


Output contract

CLI box first:

┌── form-brief ────────────────────────────────────────────────┐
│                                                              │
│ Brief:    [project name]                                     │
│ Palette:  [palette] + [accent]                               │
│ Type:     [typography] / [display]                           │
│ Mood:     [mood] · [density]                                 │
│ Dials:    V[n] M[n] D[n]                                     │
│ Kind:     [form_kind] · [visitor_mode]                       │
│ Layout:   [layout]                                           │
│ Exclude:  [list or "none"]                                   │
│                                                              │
│ DESIGN.md + implementation-handoff.md written.               │
│ [brief-preview.html generated / skipped]                     │
│                                                              │
└──────────────────────────────────────────────────────────────┘

Then: defaults list. That's it. Don't dump the full DESIGN.md to CLI — the user reads the file.


Anti-Patterns

  • Inventing tokens outside the resolution tables — even if they "look right"
  • Proceeding without a project name (it goes in the DESIGN.md header)
  • Generating a preview without first writing DESIGN.md
  • Overwriting an existing DESIGN.md without asking
  • Giving a default without stating the rule that chose it
  • Copying a reference's literal assets, copy, or claims instead of its qualities — the Keep column is qualities, never artifacts
  • Writing DESIGN.md without the handoff file, leaving the next builder to re-derive the brief

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose. If output exceeds 40 lines, delegate to /atlas-report.

04 同仓库更多 Skills