mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 14:16:28 +03:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5881a0843b | ||
|
|
27af49f190 | ||
|
|
bf2bc55aa1 | ||
|
|
a923346bcc | ||
|
|
5f5e2b013d | ||
|
|
54f6ccf6f0 | ||
|
|
62ce35ac8e |
@@ -7,7 +7,26 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .agents/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `$impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `$impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `$impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `$impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -28,7 +47,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`$impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `$impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `$impeccable teach`, then resume the user's original task with the fresh context. If the original task was `$impeccable craft`, resume into `$impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `$impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -141,6 +160,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `$impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `$<command>` invokes `$impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -29,7 +29,7 @@ Analyze where motion would improve the experience:
|
||||
- Who's the audience? (Motion-sensitive users? Power users who want speed?)
|
||||
- What matters most? (One hero animation vs many micro-interactions?)
|
||||
|
||||
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
|
||||
If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
|
||||
|
||||
**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -28,7 +28,7 @@ Analyze what makes the design feel too safe or boring:
|
||||
- Who's the audience? (What will resonate?)
|
||||
- What are the constraints? (Brand guidelines, accessibility, performance)
|
||||
|
||||
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
|
||||
If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
|
||||
|
||||
**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos.
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Analyze the current state and identify opportunities:
|
||||
- **Wayfinding**: Helping users navigate and understand structure
|
||||
- **Delight**: Moments of visual interest and personality
|
||||
|
||||
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
|
||||
If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
|
||||
|
||||
**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose.
|
||||
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
$impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run $impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run $impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -166,7 +166,7 @@ Provocative questions that might unlock better solutions:
|
||||
|
||||
### Ask the User
|
||||
|
||||
**After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan.
|
||||
**After presenting findings**, use targeted questions based on what was actually found. STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. These answers will shape the action plan.
|
||||
|
||||
Ask questions along these lines (adapt to the specific findings; do NOT ask generic questions):
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Identify where delight would enhance (not distract from) the experience:
|
||||
- **Helpful surprises**: Anticipating needs before users ask (productivity tools)
|
||||
- **Sensory richness**: Satisfying sounds, smooth animations (creative tools)
|
||||
|
||||
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
|
||||
If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
|
||||
|
||||
**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far.
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Analyze what makes the design feel complex or cluttered:
|
||||
- What can be removed, hidden, or combined?
|
||||
- What's the 20% that delivers 80% of value?
|
||||
|
||||
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
|
||||
If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
|
||||
|
||||
**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence.
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ Optional evocative subtitles are allowed in the form `## 2. Colors: The [Name] P
|
||||
- An existing `DESIGN.md` is stale (the design has drifted).
|
||||
- Before a large redesign, to capture the current state as a reference.
|
||||
|
||||
If a `DESIGN.md` already exists, **do not silently overwrite it**. Show the user the existing file and ask the user directly to clarify what you cannot infer. whether to refresh, overwrite, or merge.
|
||||
If a `DESIGN.md` already exists, **do not silently overwrite it**. Show the user the existing file and STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. whether to refresh, overwrite, or merge.
|
||||
|
||||
## Two paths
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Identify reusable patterns, components, and design tokens, then extract and cons
|
||||
|
||||
Find the design system, component library, or shared UI directory. Understand its structure: component organization, naming conventions, design token structure, import/export conventions.
|
||||
|
||||
**CRITICAL**: If no design system exists, ask the user directly to clarify what you cannot infer. before creating one. Understand the preferred location and structure first.
|
||||
**CRITICAL**: If no design system exists, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. before creating one. Understand the preferred location and structure first.
|
||||
|
||||
## Step 2: Identify Patterns
|
||||
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Push an interface past conventional limits. This isn't just about visual effects
|
||||
This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST:
|
||||
|
||||
1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like.
|
||||
2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity).
|
||||
2. **STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity).
|
||||
3. Only proceed with the direction the user confirms.
|
||||
|
||||
Skipping this step risks building something embarrassing that needs to be thrown away.
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Analyze what makes the design feel too intense:
|
||||
- What's working? (Don't throw away good ideas)
|
||||
- What's the core message? (Preserve what matters)
|
||||
|
||||
If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
|
||||
If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
|
||||
|
||||
**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness.
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to $impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use $impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `$impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `$impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase.
|
||||
STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `$impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally ask the user directly to clarify what you cannot infer. whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. Ask whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"craft": {
|
||||
"description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.",
|
||||
"description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
|
||||
"argumentHint": "[feature description]"
|
||||
},
|
||||
"teach": {
|
||||
"description": "Gathers design context for a project. Runs a short discovery interview and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"description": "Gathers design context for a project. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"argumentHint": ""
|
||||
},
|
||||
"document": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"argumentHint": "[target]"
|
||||
},
|
||||
"shape": {
|
||||
"description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.",
|
||||
"description": "Plan UX and UI before code. Runs a required multi-round discovery interview, uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
||||
"argumentHint": "[feature to shape]"
|
||||
},
|
||||
"typeset": {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{
|
||||
"name": "impeccable",
|
||||
"description": "Design fluency for frontend development. 1 skill with 23 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.",
|
||||
"version": "3.0.2",
|
||||
"version": "3.0.4",
|
||||
"author": {
|
||||
"name": "Paul Bakaus",
|
||||
"email": "paul@paulbakaus.com"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "impeccable",
|
||||
"description": "Design fluency for frontend development. 1 skill with 23 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.",
|
||||
"version": "3.0.2",
|
||||
"version": "3.0.4",
|
||||
"author": {
|
||||
"name": "Paul Bakaus",
|
||||
"email": "paul@paulbakaus.com"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 3.0.2
|
||||
version: 3.0.4
|
||||
user-invocable: true
|
||||
argument-hint: "[craft|shape · audit|critique · animate|bolder|colorize|delight|layout|overdrive|quieter|typeset · adapt|clarify|distill · harden|onboard|optimize|polish · teach|document|extract|live] [target]"
|
||||
license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
|
||||
@@ -13,7 +13,26 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .claude/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `/impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `/impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `/impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `/impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -34,7 +53,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`/impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context. If the original task was `/impeccable craft`, resume into `/impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `/impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -147,6 +166,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `/impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `/<command>` invokes `/impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
/impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run /impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. STOP and call the AskUserQuestion tool to clarify.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. STOP and call the AskUserQuestion tool to clarify.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
STOP and call the AskUserQuestion tool to clarify. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
STOP and call the AskUserQuestion tool to clarify. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `/impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: STOP and call the AskUserQuestion tool to clarify. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: STOP and call the AskUserQuestion tool to clarify. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
STOP and call the AskUserQuestion tool to clarify. Focus only on what you couldn't infer from the codebase.
|
||||
STOP and call the AskUserQuestion tool to clarify. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), STOP and call the AskUserQuestion tool to clarify. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), STOP and call the AskUserQuestion tool to clarify. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally STOP and call the AskUserQuestion tool to clarify. whether they'd like a brief summary of PRODUCT.md appended to CLAUDE.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally STOP and call the AskUserQuestion tool to clarify. Ask whether they'd like a brief summary of PRODUCT.md appended to CLAUDE.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"craft": {
|
||||
"description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.",
|
||||
"description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
|
||||
"argumentHint": "[feature description]"
|
||||
},
|
||||
"teach": {
|
||||
"description": "Gathers design context for a project. Runs a short discovery interview and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"description": "Gathers design context for a project. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"argumentHint": ""
|
||||
},
|
||||
"document": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"argumentHint": "[target]"
|
||||
},
|
||||
"shape": {
|
||||
"description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.",
|
||||
"description": "Plan UX and UI before code. Runs a required multi-round discovery interview, uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
||||
"argumentHint": "[feature to shape]"
|
||||
},
|
||||
"typeset": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 3.0.2
|
||||
version: 3.0.4
|
||||
license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
|
||||
---
|
||||
|
||||
@@ -9,7 +9,26 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .cursor/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `/impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `/impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `/impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `/impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -30,7 +49,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`/impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context. If the original task was `/impeccable craft`, resume into `/impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `/impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -143,6 +162,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `/impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `/<command>` invokes `/impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
/impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run /impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
ask the user directly to clarify what you cannot infer. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `/impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase.
|
||||
ask the user directly to clarify what you cannot infer. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally ask the user directly to clarify what you cannot infer. whether they'd like a brief summary of PRODUCT.md appended to .cursorrules for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally ask the user directly to clarify what you cannot infer. Ask whether they'd like a brief summary of PRODUCT.md appended to .cursorrules for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"craft": {
|
||||
"description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.",
|
||||
"description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
|
||||
"argumentHint": "[feature description]"
|
||||
},
|
||||
"teach": {
|
||||
"description": "Gathers design context for a project. Runs a short discovery interview and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"description": "Gathers design context for a project. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"argumentHint": ""
|
||||
},
|
||||
"document": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"argumentHint": "[target]"
|
||||
},
|
||||
"shape": {
|
||||
"description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.",
|
||||
"description": "Plan UX and UI before code. Runs a required multi-round discovery interview, uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
||||
"argumentHint": "[feature to shape]"
|
||||
},
|
||||
"typeset": {
|
||||
|
||||
@@ -1,14 +1,33 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 3.0.2
|
||||
version: 3.0.4
|
||||
---
|
||||
|
||||
Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft.
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .gemini/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `/impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `/impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `/impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `/impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -29,7 +48,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`/impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context. If the original task was `/impeccable craft`, resume into `/impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `/impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -142,6 +161,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `/impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `/<command>` invokes `/impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
/impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run /impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
ask the user directly to clarify what you cannot infer. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `/impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase.
|
||||
ask the user directly to clarify what you cannot infer. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally ask the user directly to clarify what you cannot infer. whether they'd like a brief summary of PRODUCT.md appended to GEMINI.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally ask the user directly to clarify what you cannot infer. Ask whether they'd like a brief summary of PRODUCT.md appended to GEMINI.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"craft": {
|
||||
"description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.",
|
||||
"description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
|
||||
"argumentHint": "[feature description]"
|
||||
},
|
||||
"teach": {
|
||||
"description": "Gathers design context for a project. Runs a short discovery interview and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"description": "Gathers design context for a project. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"argumentHint": ""
|
||||
},
|
||||
"document": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"argumentHint": "[target]"
|
||||
},
|
||||
"shape": {
|
||||
"description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.",
|
||||
"description": "Plan UX and UI before code. Runs a required multi-round discovery interview, uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
||||
"argumentHint": "[feature to shape]"
|
||||
},
|
||||
"typeset": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 3.0.2
|
||||
version: 3.0.4
|
||||
user-invocable: true
|
||||
argument-hint: "[craft|shape · audit|critique · animate|bolder|colorize|delight|layout|overdrive|quieter|typeset · adapt|clarify|distill · harden|onboard|optimize|polish · teach|document|extract|live] [target]"
|
||||
license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
|
||||
@@ -11,7 +11,26 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .github/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `/impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `/impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `/impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `/impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -32,7 +51,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`/impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context. If the original task was `/impeccable craft`, resume into `/impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `/impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -145,6 +164,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `/impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `/<command>` invokes `/impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
/impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run /impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
ask the user directly to clarify what you cannot infer. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `/impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase.
|
||||
ask the user directly to clarify what you cannot infer. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally ask the user directly to clarify what you cannot infer. whether they'd like a brief summary of PRODUCT.md appended to .github/copilot-instructions.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally ask the user directly to clarify what you cannot infer. Ask whether they'd like a brief summary of PRODUCT.md appended to .github/copilot-instructions.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"craft": {
|
||||
"description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.",
|
||||
"description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
|
||||
"argumentHint": "[feature description]"
|
||||
},
|
||||
"teach": {
|
||||
"description": "Gathers design context for a project. Runs a short discovery interview and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"description": "Gathers design context for a project. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"argumentHint": ""
|
||||
},
|
||||
"document": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"argumentHint": "[target]"
|
||||
},
|
||||
"shape": {
|
||||
"description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.",
|
||||
"description": "Plan UX and UI before code. Runs a required multi-round discovery interview, uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
||||
"argumentHint": "[feature to shape]"
|
||||
},
|
||||
"typeset": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 3.0.2
|
||||
version: 3.0.4
|
||||
license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
|
||||
---
|
||||
|
||||
@@ -9,7 +9,26 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .kiro/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `/impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `/impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `/impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `/impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -30,7 +49,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`/impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context. If the original task was `/impeccable craft`, resume into `/impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `/impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -143,6 +162,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `/impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `/<command>` invokes `/impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
/impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run /impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
ask the user directly to clarify what you cannot infer. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `/impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase.
|
||||
ask the user directly to clarify what you cannot infer. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally ask the user directly to clarify what you cannot infer. whether they'd like a brief summary of PRODUCT.md appended to .kiro/settings.json for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally ask the user directly to clarify what you cannot infer. Ask whether they'd like a brief summary of PRODUCT.md appended to .kiro/settings.json for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"craft": {
|
||||
"description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.",
|
||||
"description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
|
||||
"argumentHint": "[feature description]"
|
||||
},
|
||||
"teach": {
|
||||
"description": "Gathers design context for a project. Runs a short discovery interview and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"description": "Gathers design context for a project. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"argumentHint": ""
|
||||
},
|
||||
"document": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"argumentHint": "[target]"
|
||||
},
|
||||
"shape": {
|
||||
"description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.",
|
||||
"description": "Plan UX and UI before code. Runs a required multi-round discovery interview, uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
||||
"argumentHint": "[feature to shape]"
|
||||
},
|
||||
"typeset": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 3.0.2
|
||||
version: 3.0.4
|
||||
user-invocable: true
|
||||
argument-hint: "[craft|shape · audit|critique · animate|bolder|colorize|delight|layout|overdrive|quieter|typeset · adapt|clarify|distill · harden|onboard|optimize|polish · teach|document|extract|live] [target]"
|
||||
license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
|
||||
@@ -13,7 +13,26 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .opencode/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `/impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `/impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `/impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `/impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -34,7 +53,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`/impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context. If the original task was `/impeccable craft`, resume into `/impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `/impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -147,6 +166,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `/impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `/<command>` invokes `/impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
/impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run /impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. STOP and call the `question` tool to clarify.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. STOP and call the `question` tool to clarify.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
STOP and call the `question` tool to clarify. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
STOP and call the `question` tool to clarify. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `/impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: STOP and call the `question` tool to clarify. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: STOP and call the `question` tool to clarify. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
STOP and call the `question` tool to clarify. Focus only on what you couldn't infer from the codebase.
|
||||
STOP and call the `question` tool to clarify. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), STOP and call the `question` tool to clarify. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), STOP and call the `question` tool to clarify. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally STOP and call the `question` tool to clarify. whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally STOP and call the `question` tool to clarify. Ask whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"craft": {
|
||||
"description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.",
|
||||
"description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
|
||||
"argumentHint": "[feature description]"
|
||||
},
|
||||
"teach": {
|
||||
"description": "Gathers design context for a project. Runs a short discovery interview and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"description": "Gathers design context for a project. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"argumentHint": ""
|
||||
},
|
||||
"document": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"argumentHint": "[target]"
|
||||
},
|
||||
"shape": {
|
||||
"description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.",
|
||||
"description": "Plan UX and UI before code. Runs a required multi-round discovery interview, uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
||||
"argumentHint": "[feature to shape]"
|
||||
},
|
||||
"typeset": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 3.0.2
|
||||
version: 3.0.4
|
||||
license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
|
||||
allowed-tools:
|
||||
- Bash(npx impeccable *)
|
||||
@@ -11,7 +11,26 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .pi/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `/impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `/impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `/impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `/impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -32,7 +51,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`/impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context. If the original task was `/impeccable craft`, resume into `/impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `/impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -145,6 +164,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `/impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `/<command>` invokes `/impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
/impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run /impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
ask the user directly to clarify what you cannot infer. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `/impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase.
|
||||
ask the user directly to clarify what you cannot infer. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally ask the user directly to clarify what you cannot infer. whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally ask the user directly to clarify what you cannot infer. Ask whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"craft": {
|
||||
"description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.",
|
||||
"description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
|
||||
"argumentHint": "[feature description]"
|
||||
},
|
||||
"teach": {
|
||||
"description": "Gathers design context for a project. Runs a short discovery interview and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"description": "Gathers design context for a project. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles) and, when code exists to analyze, DESIGN.md (visual: colors, typography, components). Every other command reads these files before doing work. Use once per project.",
|
||||
"argumentHint": ""
|
||||
},
|
||||
"document": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"argumentHint": "[target]"
|
||||
},
|
||||
"shape": {
|
||||
"description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.",
|
||||
"description": "Plan UX and UI before code. Runs a required multi-round discovery interview, uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
||||
"argumentHint": "[feature to shape]"
|
||||
},
|
||||
"typeset": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: impeccable
|
||||
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
||||
version: 3.0.2
|
||||
version: 3.0.4
|
||||
user-invocable: true
|
||||
argument-hint: "[craft|shape · audit|critique · animate|bolder|colorize|delight|layout|overdrive|quieter|typeset · adapt|clarify|distill · harden|onboard|optimize|polish · teach|document|extract|live] [target]"
|
||||
license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
|
||||
@@ -13,7 +13,26 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores the project.
|
||||
|
||||
| Gate | Required check | If fail |
|
||||
|---|---|---|
|
||||
| Context | The PRODUCT.md / DESIGN.md loader result is known from `node .rovodev/skills/impeccable/scripts/load-context.mjs`. | Run the loader before continuing. |
|
||||
| Product | PRODUCT.md exists and is not empty or placeholder (`[TODO]` markers, <200 chars). | Run `/impeccable teach`, refresh context, then resume. Never synthesize PRODUCT.md from the user's original prompt alone. |
|
||||
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
|
||||
| Craft | `/impeccable craft` has a user-confirmed shape brief for this task. `teach` / PRODUCT.md never counts as shape. | Run `/impeccable shape` and wait for explicit brief confirmation. |
|
||||
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in `shape.md` or `craft.md` before code. |
|
||||
| Mutation | All active gates above pass. | Do not edit project files yet. |
|
||||
|
||||
Codex-style agents must state this before editing files:
|
||||
|
||||
```text
|
||||
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open
|
||||
```
|
||||
|
||||
For `/impeccable craft`, `shape=pass` is only valid after a separate user response approving the shape design brief, or when the user provided an already-confirmed brief in the request. Do not mark `shape=pass` after writing PRODUCT.md, summarizing assumptions, or drafting an unconfirmed brief yourself.
|
||||
|
||||
Other harnesses should follow the same checklist when they can expose this state.
|
||||
|
||||
### 1. Context gathering
|
||||
|
||||
@@ -34,7 +53,7 @@ If the output is already in this session's conversation history, don't re-run. E
|
||||
|
||||
`/impeccable live` already warms context via `live.mjs` — if you've run `live.mjs`, don't also run `load-context.mjs` this session.
|
||||
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context.
|
||||
If PRODUCT.md is missing, empty, or placeholder (`[TODO]` markers, <200 chars): run `/impeccable teach`, then resume the user's original task with the fresh context. If the original task was `/impeccable craft`, resume into `/impeccable shape` before any implementation work.
|
||||
|
||||
If DESIGN.md is missing: nudge once per session (*"Run `/impeccable document` for more on-brand output"*), then proceed.
|
||||
|
||||
@@ -147,6 +166,8 @@ Plus two management commands — `pin <command>` and `unpin <command>`, detailed
|
||||
|
||||
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `/impeccable`.
|
||||
|
||||
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow. If setup invokes `teach` as a blocker, finish teach, refresh context, then resume the original command and target.
|
||||
|
||||
## Pin / Unpin
|
||||
|
||||
**Pin** creates a standalone shortcut so `/<command>` invokes `/impeccable <command>` directly. **Unpin** removes it. The script writes to every harness directory present in the project.
|
||||
|
||||
@@ -122,7 +122,8 @@ Use appropriate techniques for each animation:
|
||||
/* Prefer for simple, declarative animations */
|
||||
- transitions for state changes
|
||||
- @keyframes for complex sequences
|
||||
- transform + opacity only (GPU-accelerated)
|
||||
- transform and opacity for reliable movement
|
||||
- blur, filters, masks, clip paths, shadows, and color shifts for premium atmospheric effects when verified smooth
|
||||
```
|
||||
|
||||
### JavaScript Animation
|
||||
@@ -134,9 +135,10 @@ Use appropriate techniques for each animation:
|
||||
```
|
||||
|
||||
### Performance
|
||||
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
||||
- **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
|
||||
- **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- **will-change**: Add sparingly for known expensive animations
|
||||
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
||||
- **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
|
||||
- **Monitor FPS**: Ensure 60fps on target devices
|
||||
|
||||
### Accessibility
|
||||
@@ -152,7 +154,7 @@ Use appropriate techniques for each animation:
|
||||
|
||||
**NEVER**:
|
||||
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
||||
- Animate layout properties (width, height, top, left)—use transform instead
|
||||
- Animate layout properties casually (`width`, `height`, `top`, `left`, margins) when transform, FLIP, or grid-based techniques would work
|
||||
- Use durations over 500ms for feedback—it feels laggy
|
||||
- Animate without purpose—every animation needs a reason
|
||||
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
||||
|
||||
@@ -22,7 +22,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the
|
||||
|
||||
**Check for**:
|
||||
- **Layout thrashing**: Reading/writing layout properties in loops
|
||||
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
||||
- **Expensive animations**: Casual layout-property animation, unbounded blur/filter/shadow effects, or effects that visibly drop frames
|
||||
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
||||
- **Bundle size**: Unnecessary imports, unused dependencies
|
||||
- **Render performance**: Unnecessary re-renders, missing memoization
|
||||
|
||||
@@ -1,24 +1,41 @@
|
||||
# Craft Flow
|
||||
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
|
||||
Build a feature with impeccable UX and UI quality through a structured process: shape the design, land the visual direction, build real production code, then inspect and improve in-browser until the result meets a high-end studio bar.
|
||||
|
||||
## Real Example: Neo Mirai
|
||||
## Build Gate
|
||||
|
||||
Neo Mirai is the full craft loop in public. A retro-futurist AI design conference started with generated brand and hi-fi reference images, then shipped as a responsive static site in `public/neo-mirai`.
|
||||
Craft cannot build until all of these are true:
|
||||
|
||||
Repro command:
|
||||
1. PRODUCT context is valid and current.
|
||||
2. The shape design brief is explicitly confirmed by the user for this task, unless the user already provided a confirmed brief.
|
||||
3. Implementation references from the brief are loaded.
|
||||
4. The shape visual probe decision is recorded: generated, skipped with reason, or already resolved.
|
||||
5. The north-star mock decision is recorded: generated, skipped with reason, or not applicable.
|
||||
|
||||
```bash
|
||||
/impeccable craft retro-futurist AI design conference website
|
||||
```
|
||||
PRODUCT.md and `teach` answers do **not** satisfy the shape gate. They are project context only. A compact self-authored brief does not satisfy the shape gate either. `shape=pass` requires a separate user response approving the shape brief or an already-confirmed brief supplied by the user.
|
||||
|
||||
The important detail is the artifact chain: brand toolkit, north-star mock, semantic implementation, regenerated assets, browser iteration, responsive fixes. The mock was not treated as a screenshot to trace. It was used as direction for a real page.
|
||||
Invalid image-skip reasons include: "the final implementation will be semantic HTML/CSS/SVG", "the diagram should stay editable", "a raster mock would not be used directly", or "the product is fictional." Generated probes and mocks are direction artifacts; they are not implementation assets.
|
||||
|
||||
## Craft Contract
|
||||
|
||||
Craft is not a first pass. It is a loop with these required artifacts:
|
||||
|
||||
1. Confirmed design brief from `shape`.
|
||||
2. Approved visual direction, from generated probes / mocks when image generation is available.
|
||||
3. Mock fidelity inventory: the visible ingredients from the approved direction that must survive into code.
|
||||
4. Semantic, functional implementation using the project's real stack and conventions.
|
||||
5. Browser evidence across relevant viewports.
|
||||
6. At least one critique-and-fix pass after the first browser inspection, unless the first pass has no material defects.
|
||||
|
||||
Do not let generated mockups replace interface structure, copy, accessibility, responsive behavior, or state design. But do treat the approved mock as a concrete visual contract for composition, hierarchy, density, atmosphere, signature motifs, image needs, and distinctive visual moves. "North star" means "preserve the important visible ingredients in semantic code," not "use it as loose mood."
|
||||
|
||||
## Step 1: Shape the Design
|
||||
|
||||
Run /impeccable shape, passing along whatever feature description the user provided.
|
||||
|
||||
Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
Wait for the design brief to be fully confirmed by the user before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
|
||||
|
||||
If this craft run resumed after `teach` created PRODUCT.md, run shape now. Do not treat the teach interview, PRODUCT.md, or a summary of project context as a substitute for shape. Shape is task-specific and must cover scope, content/states, visual direction, constraints, anti-goals, probes when applicable, and explicit brief confirmation.
|
||||
|
||||
If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief.
|
||||
|
||||
@@ -36,15 +53,17 @@ Then add references based on the brief's needs:
|
||||
- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
|
||||
- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
|
||||
|
||||
## Step 3: North Star Mock (Capability-Gated)
|
||||
## Step 3: Land the Visual Direction (Capability-Gated)
|
||||
|
||||
Before implementation, generate a small set of high-fidelity visual comps when all of these are true:
|
||||
Before implementation, generate high-fidelity visual comps when all of these are true:
|
||||
|
||||
- The work is **net-new** or visually open-ended enough that composition exploration will improve the build.
|
||||
- The brief's scope is **mid-fi, high-fi, or production-ready**.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default for **both brand and product work**.
|
||||
When those conditions are met, this step is mandatory for **both brand and product work** in Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Do not skip this step because the eventual UI should be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### Purpose
|
||||
|
||||
@@ -52,25 +71,43 @@ Use the mock step to find a stronger visual lane than code-first generation woul
|
||||
|
||||
### What to generate
|
||||
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief.
|
||||
Generate **1 to 3** high-fidelity north-star comps based on the confirmed brief. If shape already produced direction probes, use those results as input and generate a more resolved mock from the winning lane, not another unrelated exploration.
|
||||
|
||||
- For brand work, push visual identity, composition, and mood aggressively.
|
||||
- For product work, still push hierarchy, topology, density, and tone, but keep the comps grounded in realistic product structure and states.
|
||||
- For landing pages and long-form brand surfaces, show enough of the next section or second fold to establish the system beyond the hero.
|
||||
|
||||
The comps must be genuinely different in primary visual direction, not just color variants.
|
||||
|
||||
### After generation
|
||||
### Approval loop
|
||||
|
||||
Choose a direction with the user, or if the user delegated the decision, pick the strongest one and explain why.
|
||||
Show the comps and ask what should carry forward. If the user asks for changes or the best direction is still weak, generate a focused revision before implementation. Continue until one direction is approved, or until the user explicitly delegates the choice.
|
||||
|
||||
If the user delegates, pick the strongest direction and explain the decision using the brief, not personal taste.
|
||||
|
||||
Before moving to implementation, summarize:
|
||||
|
||||
- What to carry into code
|
||||
- What **not** to literalize from the mock
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** let it override the confirmed brief.
|
||||
This summary is required before Step 4. It is the handoff between visual exploration and semantic implementation.
|
||||
|
||||
## Step 4: Asset Extraction (Optional)
|
||||
### Mock fidelity inventory
|
||||
|
||||
Before building, inventory the approved mock's major visible ingredients:
|
||||
|
||||
- Hero silhouette and dominant composition.
|
||||
- Signature motifs: planets, devices, portraits, charts, route lines, insets, badges, or other memorable objects.
|
||||
- Nav and primary CTA treatment.
|
||||
- Section sequence visible in the mock, especially the second fold.
|
||||
- Image-native content the concept depends on.
|
||||
- Typography, density, color/material treatment, and motion cues.
|
||||
|
||||
For each ingredient, decide how it will be implemented: semantic HTML/CSS/SVG, generated asset, sourced project asset, icon library, canvas/WebGL, or an explicitly accepted omission. Do not substitute a different hero composition or new visual driver after approval unless the user approves the change.
|
||||
|
||||
Treat the mock as a **north star**, not a screenshot to trace. Do **not** rasterize core UI text or let the mock override the confirmed brief. But if the live result lacks the mock's major visible ingredients, the implementation is wrong.
|
||||
|
||||
## Step 4: Asset Extraction (Need-Gated)
|
||||
|
||||
If the chosen direction includes image-native visual ingredients that would materially improve the implementation, generate them as separate assets before building.
|
||||
|
||||
@@ -86,53 +123,71 @@ Good candidates:
|
||||
- decorative marks
|
||||
- non-semantic scene elements
|
||||
|
||||
For travel, editorial, portfolio, venue, product showcase, entertainment, education, or any other image-led brand surface, visual assets are usually core content, not decoration. Do not ship abstract CSS panels where the approved mock or subject matter calls for real imagery, generated plates, illustrations, maps, product/object renders, or destination scenes.
|
||||
|
||||
Do **not** export assets for core UI text, navigation, body copy, or any structure that should stay semantic and editable in code.
|
||||
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets.
|
||||
Usually **1 to 5** extracted assets is enough. If the design can be built cleanly in HTML/CSS/SVG, prefer that over raster assets. If the mock contains major visual content that cannot be built credibly in code, asset extraction is not optional.
|
||||
|
||||
## Step 5: Build
|
||||
## Step 5: Build to Production Quality
|
||||
|
||||
Implement the feature following the design brief. Work in this order:
|
||||
Implement the feature following the design brief. Build in passes so structure, visual system, states, motion/media, and responsive behavior each get deliberate attention. The list below is the definition of done, not inspiration.
|
||||
|
||||
1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
|
||||
2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
|
||||
3. **Typography and color**: Apply the type scale and color system.
|
||||
4. **Interactive states**: Hover, focus, active, disabled.
|
||||
5. **Edge case states**: Empty, loading, error, overflow, first-run.
|
||||
6. **Motion**: Purposeful transitions and animations (if appropriate).
|
||||
7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
|
||||
### Production bar
|
||||
|
||||
### During Build
|
||||
- Test with real (or realistic) data at every step, not placeholder text
|
||||
- Check each state as you build it, not all at the end
|
||||
- If you discover a design question, stop and ask rather than guessing
|
||||
- Every visual choice should trace back to something in the design brief or the chosen north-star direction
|
||||
- Keep text semantic, layout real, and interactions accessible. Do not turn the mock into a pile of rasterized UI
|
||||
- If assets were extracted, use them intentionally. They support the build; they do not replace interface structure
|
||||
- Use real or realistic content. Remove placeholder copy, placeholder images, dead links, fake controls, and unused scaffold before presenting.
|
||||
- Preserve the approved mock's major ingredients. Missing hero objects, missing world/product imagery, different section structure, downgraded CTA/nav treatment, or generic replacements for distinctive motifs are blocking defects unless the user accepted the change.
|
||||
- Build semantically first: real headings, landmarks, labels, form associations, button/link semantics, accessible names, and state announcements where needed.
|
||||
- Calibrate spacing, alignment, grid placement, and vertical rhythm deliberately. Do not accept default gaps, arbitrary margins, unbalanced whitespace, or accidental optical misalignment.
|
||||
- Make typography intentional: chosen font loading strategy, clear hierarchy, readable measure, stable line breaks, tuned wrapping, and no overflow at mobile or large desktop sizes.
|
||||
- Design realistic state coverage: default, hover where supported, focus-visible, active, disabled, loading, error, success, empty, overflow, long text, short text, and first-run states where relevant.
|
||||
- Make interaction quality feel finished: keyboard paths, touch targets, feedback timing, scroll behavior, transitions between states, and no hover-only functionality.
|
||||
- Use icons from the project's established icon set when available. If no set exists, choose a coherent library or use accessible text controls; do not mix unrelated icon styles.
|
||||
- Optimize imagery and media: correct dimensions, useful alt text, lazy loading below the fold, modern formats when practical, responsive `srcset` / `picture` for raster assets, and no project-referenced asset left outside the workspace.
|
||||
- Make motion feel premium: use atmospheric blur, filter, mask, shadow, or reveal effects when they improve the experience; avoid casual layout-property animation, bound expensive effects, verify smoothness in-browser, respect reduced motion, and avoid choreography that blocks task completion.
|
||||
- Preserve maintainability: reusable local patterns, clear component boundaries, project conventions, no rasterized UI text, and no hard-coded one-off hacks when a better local pattern exists.
|
||||
- Fit the technical context: production build passes, no obvious console errors, no avoidable layout shift, no needless dependency, and no broken asset path.
|
||||
- If you discover a design question that materially changes the brief or approved direction, stop and ask rather than guessing.
|
||||
|
||||
## Step 6: Visual Iteration
|
||||
## Step 6: Browser-Based Iteration
|
||||
|
||||
**This step is critical.** Do not stop after the first implementation pass.
|
||||
|
||||
Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
|
||||
Open the result in a browser. In Codex, use browser-use or equivalent browser automation when available; otherwise use Playwright or ask the user for screenshots. Inspect screenshots, not just DOM or terminal output.
|
||||
|
||||
Iterate through these checks visually:
|
||||
### Required viewport pass
|
||||
|
||||
Check the experience at the viewports that matter for the brief. Default minimum:
|
||||
|
||||
- Mobile narrow
|
||||
- Tablet or small laptop
|
||||
- Desktop wide
|
||||
|
||||
For each viewport, capture or inspect the rendered state and look for visual defects: overlap, clipping, weak hierarchy, off-grid alignment, awkward whitespace, cramped controls, unreadable type, broken imagery, hover-only functionality, layout shift, and text overflow.
|
||||
|
||||
### Critique and fix loop
|
||||
|
||||
After the first browser pass, write a short critique for yourself and patch the implementation. Repeat browser inspection after fixes. Continue until no material issues remain against this checklist:
|
||||
|
||||
1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
|
||||
2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
|
||||
6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
|
||||
2. **Does it match the approved mock?** Compare screenshots against the mock fidelity inventory: hero silhouette, major motifs, imagery, nav/CTA, section sequence, density, color/materials, and second-fold substance. Missing major ingredients are P0 defects.
|
||||
3. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
|
||||
4. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
|
||||
5. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
|
||||
6. **Check responsive behavior.** The design should adapt compositionally, not merely shrink.
|
||||
7. **Check craft details.** Spacing consistency, optical alignment, type hierarchy, color contrast, image quality, icon coherence, interactive feedback, motion timing, and focus treatment.
|
||||
8. **Check performance basics.** No obviously oversized images, avoidable layout thrash, blocking animations, or heavy assets without a reason.
|
||||
|
||||
After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
|
||||
The exit bar is not "it works." It is: the rendered result looks intentional at all checked viewports, all expected states are handled, no placeholders remain unless explicitly accepted, and the implementation quality would be defensible in a high-end studio review.
|
||||
|
||||
## Step 7: Present
|
||||
|
||||
Present the result to the user:
|
||||
- Show the feature in its primary state
|
||||
- Summarize the browser/viewports checked and the most important fixes made after inspection
|
||||
- Walk through the key states (empty, error, responsive)
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock
|
||||
- Explain design decisions that connect back to the design brief and, when used, the chosen north-star mock. Include any accepted deviations from the mock; do not hide unimplemented mock ingredients.
|
||||
- Note any remaining limitations or follow-up risks honestly
|
||||
- Ask: "What's working? What isn't?"
|
||||
|
||||
Iterate based on feedback. Good design is rarely right on the first pass.
|
||||
|
||||
@@ -38,9 +38,19 @@ Timing matters more than easing. These durations feel right for most UI:
|
||||
|
||||
**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
|
||||
|
||||
## The Only Two Properties You Should Animate
|
||||
## Premium Motion Materials
|
||||
|
||||
**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
|
||||
Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties: blur reveals, backdrop-filter panels, saturation or brightness shifts, shadow bloom, SVG filters, masks, clip paths, gradient-position movement, and variable font or shader-driven effects.
|
||||
|
||||
Use the right material for the effect:
|
||||
|
||||
- **Transform / opacity**: movement, press feedback, simple reveals, list choreography.
|
||||
- **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances, atmospheric transitions.
|
||||
- **Clip path / masks**: wipes, reveals, editorial cropping, product-like transitions.
|
||||
- **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state.
|
||||
- **Grid-template rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly.
|
||||
|
||||
The hard rule is not "transform and opacity only." The hard rule is: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify in-browser that the result is smooth on the target viewports. If blur/filter makes the interaction feel significantly more premium and remains smooth, use it.
|
||||
|
||||
## Staggered Animations
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ elements.forEach((el, i) => {
|
||||
- Virtual scrolling for very long lists (react-window, react-virtualized)
|
||||
|
||||
**Reduce Paint & Composite**:
|
||||
- Use `transform` and `opacity` for animations (GPU-accelerated)
|
||||
- Avoid animating layout properties (width, height, top, left)
|
||||
- Use `transform` and `opacity` for reliable movement, but allow blur, filters, masks, clip paths, shadows, and color shifts when they create meaningful polish
|
||||
- Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
|
||||
- Use `will-change` sparingly for known expensive operations
|
||||
- Minimize paint areas (smaller is faster)
|
||||
- Bound expensive paint areas for blur/filter/shadow effects (smaller and isolated is faster)
|
||||
|
||||
### Animation Performance
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Every interactive element needs all states:
|
||||
|
||||
- **Smooth transitions**: All state changes animated appropriately (150-300ms)
|
||||
- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
|
||||
- **No jank**: 60fps animations, only animate transform and opacity
|
||||
- **No jank**: Smooth animations; use atmospheric blur/filter/mask/shadow effects when they add polish, but bound expensive paint areas and avoid casual layout-property animation
|
||||
- **Appropriate motion**: Motion serves purpose, not decoration
|
||||
- **Reduced motion**: Respects `prefers-reduced-motion`
|
||||
|
||||
|
||||
@@ -12,7 +12,18 @@ Most AI-generated UIs fail not because of bad code, but because of skipped think
|
||||
|
||||
**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
|
||||
|
||||
Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
This is a required interaction, not optional guidance. Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
|
||||
|
||||
### Interview cadence
|
||||
|
||||
Discovery must include at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed design inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
|
||||
- Round 1 should clarify purpose, audience/context, and success or emotional outcome.
|
||||
- Round 2 should clarify content/data/states and scope/fidelity.
|
||||
- Round 3 should clarify visual direction, constraints, and anti-goals when still unresolved.
|
||||
|
||||
### Purpose & Context
|
||||
- What is this feature for? What problem does it solve?
|
||||
@@ -63,7 +74,11 @@ After the discovery interview, generate a small set of visual direction probes *
|
||||
- The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
|
||||
- The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
|
||||
|
||||
When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
|
||||
When those conditions are met, this step is mandatory for Codex and any harness with built-in image generation. Use native image generation; in Codex, use the built-in `image_gen` tool via the imagegen skill. If image generation is unavailable, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed.
|
||||
|
||||
Use probes to explore visual lanes, not to replace the brief.
|
||||
|
||||
Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
|
||||
|
||||
### What to generate
|
||||
|
||||
@@ -89,11 +104,11 @@ The probes should differ in primary visual direction (hierarchy, topology, densi
|
||||
- Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
|
||||
- Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
|
||||
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
|
||||
If image generation is unavailable, or the task doesn't benefit from it, skip this phase only with a one-line reason and proceed directly to the design brief.
|
||||
|
||||
## Phase 2: Design Brief
|
||||
|
||||
After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
|
||||
After the interview and any required probes, synthesize everything into a structured design brief. Present it to the user for explicit confirmation before considering this command complete. Stop after asking for confirmation; do not proceed to craft or implementation in the same response unless the user has already approved the brief.
|
||||
|
||||
### Brief Structure
|
||||
|
||||
@@ -131,6 +146,6 @@ Anything unresolved that the implementer should resolve during build.
|
||||
|
||||
---
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
|
||||
ask the user directly to clarify what you cannot infer. Ask for explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the brief is confirmed.
|
||||
|
||||
Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.)
|
||||
|
||||
@@ -21,11 +21,13 @@ Decision tree:
|
||||
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
||||
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `/impeccable document` for DESIGN.md.
|
||||
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. which to refresh. Skip the one the user doesn't want changed.
|
||||
- **Both exist**: ask the user directly to clarify what you cannot infer. Ask which file to refresh. Skip the one the user doesn't want changed.
|
||||
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
||||
|
||||
Never silently overwrite an existing file. Always confirm first.
|
||||
|
||||
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
||||
|
||||
## Step 2: Explore the codebase
|
||||
|
||||
Before asking questions, thoroughly scan the project to discover what you can:
|
||||
@@ -48,7 +50,22 @@ Note what you've learned and what remains unclear. This exploration feeds both P
|
||||
|
||||
## Step 3: Ask strategic questions (for PRODUCT.md)
|
||||
|
||||
ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase.
|
||||
ask the user directly to clarify what you cannot infer. Ask only about what you couldn't infer from the codebase.
|
||||
|
||||
### Interview mode, not confirmation mode
|
||||
|
||||
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
||||
|
||||
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
||||
- Ask **2-3 questions per round**, then wait for answers.
|
||||
- Use inferred answers as hypotheses or options, not as finished facts.
|
||||
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
||||
- Round 1 should establish register, users/purpose, and desired outcome.
|
||||
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
||||
|
||||
### Minimum viable interview
|
||||
|
||||
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
||||
|
||||
### Register (ask first — it shapes everything below)
|
||||
|
||||
@@ -56,7 +73,7 @@ Every design task is either **brand** (marketing, landing, campaign, long-form c
|
||||
|
||||
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
|
||||
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
||||
|
||||
### Users & Purpose
|
||||
- Who uses this? What's their context when using it?
|
||||
@@ -79,6 +96,8 @@ Skip questions where the answer is already clear. **Do NOT ask about colors, fon
|
||||
|
||||
## Step 4: Write PRODUCT.md
|
||||
|
||||
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
||||
|
||||
Synthesize into a strategic document:
|
||||
|
||||
```markdown
|
||||
@@ -134,4 +153,4 @@ Summarize:
|
||||
|
||||
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
||||
|
||||
Optionally ask the user directly to clarify what you cannot infer. whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
Optionally ask the user directly to clarify what you cannot infer. Ask whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user