inspire-screens
Create and validate screens (a screen is the UI spec for one view). A screen declares its own bindings — data sources, dispatches, navigation, states — and names a shared layout and shared components as dependencies. Use when designing or reviewing an application's screens.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- inspire-screens
- description
- Create and validate screens (a screen is the UI spec for one view). A screen declares its own bindings — data sources, dispatches, navigation, states — and names a shared layout and shared components as dependencies. Use when designing or reviewing an application's screens.
02 资源文件 14
- 参考文档references/format-screen.md19.8 KB
- 参考文档references/screen-backfill.md6.2 KB
- 参考文档references/screen-catalog.md5.4 KB
- 参考文档references/screen-checks.md6.0 KB
- 参考文档references/screen-create.md6.4 KB
- 参考文档references/screen-lifecycle.md4.4 KB
- 参考文档references/screen-propagation.md1.3 KB
- 参考文档references/screen-routes.md3.9 KB
- 参考文档references/screen-update.md8.4 KB
- 参考文档references/screen-validate.md5.0 KB
- 参考文档templates/component.template.md1.8 KB
- 参考文档templates/layout.template.md3.8 KB
- 参考文档templates/pattern.template.md2.1 KB
- 参考文档templates/screen.template.md6.7 KB
03 SKILL.md 正文
/inspire-screens — Screen Specifications
When to use
- Creating a new screen in a face, for a module's feature
- Iterating on an existing screen — its bindings, its layout, its prose — or bringing one of an older shape to the current one
- Validating existing screens against their bindings, patterns and components
- Detecting drift between a screen spec and the layout it names — including reverse drift where the prototype is ahead of the spec
- Promoting a screen through its lifecycle, or rendering the route map
- Identifying extraction opportunities — UI blocks that should become shared components or patterns
Architecture
Three tiers under inspire_kb/01_spec/, with a sibling middle:
| Tier | Where it sits | Source of truth for | Found by |
|---|---|---|---|
| 1 | _design-system/design-system.md · design-system.tokens.json |
what each token means · its value; supported viewports, icons, the reference | two files |
| 2a | _design-system/patterns/ |
reusable screen structures — their regions | *.pattern.md |
| 2b | _design-system/components/ |
shared components — their props | *.component.md |
| 2c | _design-system/layouts/ |
the page frames those structures sit in — their geometry, per width | *.layout.md |
| 3 | _faces/{face}/_screens/ |
one face's screens — the wiring, and how each value is drawn | *.screen.md |
Tools find every one of these by its typed extension, and a link names the file
itself (kb-links.md). A catalog entry's id is its file
name without the extension: list.pattern.md is the pattern list, linked from a
screen as [list](../../../_design-system/patterns/list.pattern.md).
Patterns, components and layouts are siblings: none depends on another by
construction. A pattern's regions accept injected content, so it never imports leaf
components, and a leaf component never references a pattern. Where a pattern does
reference a shared component, it declares it on a **Components:** line like any
other dependency — an actual declared edge, never an assumed tier.
Four ownerships, and they never bleed: a component owns its props, a
pattern owns its regions, a layout owns the geometry those regions sit at,
and a screen owns the wiring — data into components, components into regions —
and its ## Render table. A pattern region is a hole, never a mirror of some
component's props, and never a measurement.
A layout names the pattern it frames and answers where each region sits, at what
size, in what order, and what changes at each supported width. The face shell
— sidebar, bars, every persistent control — is a layout entry of its own, shell,
framing every route though no screen names it. Every row of a layout's
## Geometry and ## Breakpoints tables carries a Source from a closed
vocabulary (design-system.md §… · design-system.tokens.json · reference · generated
· undecided · as {layout}), defined in
layout.template.md. A generated or
undecided row is a question for the design system, and a run never silently
promotes one into a decision.
design-system.md and its token file design-system.tokens.json are seeded at
install from the defaults theme.md and theme.tokens.json beside them in
_design-system/, and
owned by /inspire-bootstrap design-system —
screens read the tokens, citing each by its path in braces, and never edit
them. A face can add tokens of its own in _faces/{face}/{face}.tokens.json;
screens read those the same way. What every measurement is taken from — the prototype by default — and how it
is read is _references/ui-reference.md.
Tier 3 sits inside a face: an application a person uses, declared by its own
{face}.face.md (id, package, profiles, shell, bundles:). Every screen
belongs to exactly one face, and its id says which. Tiers 1, 2a, 2b and 2c do not
split by face — design-system.md, design-system.tokens.json, patterns/,
components/ and layouts/ serve the whole project from _design-system/, never
from inside a face. An entry that serves only some faces says so in its faces:
field. The chrome every face sits in is one layout entry, shell.layout.md, shared
by every face; never copy the catalog into a face. How a write resolves its face is
_references/face-scope.md; read it before writing a
screen. Creating or retiring a face is /inspire-face's,
never this skill's.
No shared screens. When two faces show the same thing, what they share is its
structure, not the screen: the structure becomes a layout or a pattern in
_design-system/, and each face keeps its own screen, with its own id and its own
bindings.
Screens are lightweight — they declare their own bindings, say how each value they show is drawn, and describe only what deviates from the pattern and layout they name. They do NOT redefine colors, typography, geometry, or re-describe components.
Screen file structure
The on-disk shape — identity, header lines, ## Purpose, ## Bindings, claims,
the route derivation and the old-shape catalogue — is
references/format-screen.md. Read it before
writing a screen. Template:
templates/screen.template.md — the template is
the single source of which parts are required (the frontmatter identity block,
H1, **Features:**, ## Purpose, ## Bindings) versus optional/presence-free
(**Pattern:**, **Layout:**, **Components:**, ## Render,
## Module-specific deviations, ## Current prototype, ## Notes).
Four facts about that shape carry the rest of this skill:
- The
idis the referent, the path is only where the file sits. Minted once as{face}.{slug}from the face and the file's slug, never re-derived from location afterwards. Same id at a new path is a move; a changed id is a new screen. - The screen says what it is for.
## Purposecarries one paragraph — who comes here, for which task, what they see first. It is what the emanating agent would otherwise have to guess from the feature links. It restates no binding and names no route. - The screen owns its semantics.
## Bindingsdeclares the input parameters, data sources, dispatches, navigation and states, keyed screen-locally, and generates claims whether or not a pattern is named.**Pattern:**is a peer dependency constraining presentation, never the screen's definition. One transition, one declaration, one claim: a transition a dispatch causes is that dispatch's outcome and never also a### Navigationrow, which declares only the transitions no dispatch on this screen causes. - Routes derive from
module:+screen:under the face'sshell, so no screen file authors one.routesrenders the map, per face. - The screen says how it is drawn.
## Renderbinds every column, field and meta value it shows to a field type, a catalogued component, a treatment and an alignment, and every table column to what it does at narrow widths. It mints no claim, so a Render edit never shifts a contract.
The Current prototype section names the prototype route(s) realizing the screen
and tracks drift — misalignments between the prototype and this spec, grouped by
type (ADR alignment · data wiring · component adoption · gap · cosmetic).
Drift is informational: it never blocks a PR unless it contradicts a current ADR
(one present and not superseded or rejected), and it drives the propagation check
(references/screen-propagation.md). Omit the
section only until a prototype target exists. Each target carries its face's
shell prefix: the route lives inside that face's shell.
Granularity rule: one file per screen
Each screen is its own file. A "screen" is any navigable entity with its own route, or its own distinct set of bindings.
Rationale: parallelization (agents work on different screens without conflicts), diff clarity, link precision, and a 1:1 mapping to the prototype (one screen file ≈ one prototype screen).
Not a separate file: steps inside a wizard, tabs inside a detail page, sub-sections of a single settings form.
File naming: {slug}.screen.md, kebab-case, matching the screen's conceptual
name (agents-list.screen.md, agent-detail.screen.md, not agents.screen.md).
The slug is unique within the face, and it mints the id once: agent-detail in the
face console is console.agent-detail. After that the frontmatter id: wins, so
renaming the file is a move that leaves the id, the route and every claim
untouched.
Where the file goes: inspire_kb/01_spec/_faces/{face}/_screens/{slug}.screen.md,
in the face its id names. Catalog links ([list](../../../_design-system/patterns/list.pattern.md), [collection](../../../_design-system/layouts/collection.layout.md),
[data-table](../../../_design-system/components/data-table.component.md)) climb from the screen's directory to 01_spec/.
Which face a screen belongs to
The id is the scope declaration, which is why a screen's frontmatter carries
identity and lifecycle but no faces: field. Resolve the face with the rule in
_references/face-scope.md and state the face being
written to in the turn's output. A face exists when a {face}.face.md declares it;
an id that no face file declares stops the write and routes to
/inspire-face add rather than being invented.
- The face's bundles expose what its screens bind. Every action a screen binds
under
### Dataor### Dispatchesbelongs to a bundle the face lists inbundles:..inspire/bin/face-exposure.shchecks it. An action outside them is a question for/inspire-face— add the bundle to the face, or the action to a bundle — never a reason to drop the binding. - Directories are created lazily. A face's
_screens/directory comes into existence when the first screen lands in it, never ahead of one. - One navigation file per face.
_faces/{face}/_index.mdcarries the face's navigation prose. It lists no screens: a search for*.screen.mdgives them.
Flows in references/
Each flow's full procedure lives in a reference file. Before executing any flow, read every reference file its index row names — the table below is an index, not the flow.
| Flow | Read | Invocation |
|---|---|---|
| The on-disk shape (every flow) | references/format-screen.md |
— |
| Create a screen | references/screen-create.md and the format reference |
create {face}.{slug} |
| Update a screen | references/screen-update.md and the format reference |
update {id} |
| Validate / audit | references/screen-validate.md and references/screen-checks.md, applying the § Triangulation matrix below; audit also reads references/screen-catalog.md for extraction opportunities |
validate · audit |
| Promote through the lifecycle | references/screen-lifecycle.md |
promote {id} {state} |
| Render the derived route map | references/screen-routes.md |
routes |
| Extract a pattern/layout/component | references/screen-catalog.md |
extract {pattern|layout|component} {name} |
| Backfill the presentation half | references/screen-backfill.md and _references/ui-reference.md |
backfill [{reference}] |
| Propagation after spec edits | references/screen-propagation.md — it owns which edits trigger the ask |
a duty, not an invocation |
When validating an existing screen
The validate / audit procedure lives in
references/screen-validate.md and
references/screen-checks.md, applying the
triangulation matrix below.
Triangulation matrix — Features ↔ screen spec ↔ Prototype
Three sources of truth, three pairwise checks. Resolution rules differ per pair:
| Pair | Mismatch direction | Authority | Action |
|---|---|---|---|
| Features ↔ Prototype | Feature described, not in the prototype | Features | "Code behind spec". Suggest /inspire-prototype. |
| Features ↔ Prototype | Feature in the prototype, no feature file | Open | WARN. Ask the user. Backfill via /inspire-feature create, or remove it from the prototype. Don't silently accept undocumented features. |
| screen spec ↔ Prototype | screen spec describes UI not rendered | Prototype | Spec stale. Update via /inspire-screens validate. Do NOT change the prototype — risks losing iterations. |
| screen spec ↔ Prototype | Prototype renders UI not in the screen spec | Prototype | Spec stale (reverse drift). Update the spec. |
| Patterns / layouts / components / design-system / UX ADRs | Prototype or screen spec contradicts a canonical convention | Skill | Enforce. Patterns + layouts + components + design-system.md + current UX ADRs are authoritative for visual/structural conventions. A layout row sourced reference, generated or undecided is not yet a convention: drift against it is a question for the design system. |
Why the prototype wins on functional drift: prototypes evolve through user iterations. The screen spec captures intent at write-time; the prototype captures it at last-touch. Removing user-validated functionality by "fixing" the prototype to match a stale spec is riskier than updating the spec.
Why the skill wins on UI conventions: patterns, components, design tokens and
current UX ADRs are project-wide invariants. A prototype that violates them is a
regression to fix in the prototype, not in the spec. A screen cannot except itself
from one either: a token is a project-wide fact, so a local exception to it is still
a project-wide change and the token moves instead
(_references/authority.md § A3).
The matrix is this skill's three pairs, resolved. The general rule behind the
Authority column — the narrowest artifact that speaks to the question wins, and an
undeclared contradiction is drift rather than an override — lives in
_references/authority.md.
When uncertain which layer a finding belongs to, ask the user.
Rules
Output language. Write every artifact you produce in the project's declared
output_language(default English) — see_references/output-language.md. Applies whatever language the conversation is in, and independently of the product's own i18n; machine-read tokens (frontmatter keys/values, link paths, filenames) stay verbatim.
Writing contract. Screens, pattern entries and component entries follow
_references/writing-style.md.## Module-specific deviationsand## Notesare normative prose (R1–R6); binding, region, coverage and API tables are structured sections (R3, R4, R6). The no-ASCII rule below is this layer's own local contract — the writing contract points at it rather than restating it.
Lesson capture. At a natural pause, when the operator's feedback should change how this skill behaves, offer
/inspire-lesson note— never auto-write a lesson. Protocol and ticket-vs-lesson routing:_references/lesson-capture.md.
- Features are the source of truth for what exists. Every screen traces to one
or more
*.feature.mdfiles in its module's_features/. - Each tier owns its truth — the Source of truth for column of the
§ Architecture table above:
design-system.mdanddesign-system.tokens.jsonfor tokens,patterns/for regions,layouts/for geometry and breakpoints,components/for component props. Screens declare and reference; they never redefine a token, nor redescribe a layout or a component's props. Project-specific screen conventions live in those artifacts, not in this skill. - Screens are lightweight (aim <300 lines). Extract sub-patterns/components if a screen grows.
- No ASCII layout diagrams in screen, pattern, layout or component files, unless the
screen is bespoke and its layout cannot be expressed textually. This is the
single statement of the rule for this layer; the create flow and the validate
checks reference it, and
_references/writing-style.mdpoints here rather than restating it. - Routes derive from
module:andscreen:— never author one. The route of a screen is{shell}/{module}/{screen}: its declaredmodule:andscreen:fields, prefixed by its face'sshell(/admin→/admin/billing/list). The id is not a route input. The exact rendering belongs to the framework profile, like every binding convention. Nothing writes a route into a screen file, so a route and an id can never disagree. Full rule:references/format-screen.md§ Routes derive. - Identity is write-once.
id:is minted at creation as{face}.{slug}and never re-derived from location;module:andscreen:are written once beside it. A changed id is a new screen, not a moved one. A user-chosen slug never starts with_. - The screen declares, the pattern constrains. Every data source, dispatch, navigation target and state is the screen's own declaration, present whether or not a pattern is named. Where one is named, its regions are joined against those declarations — a required region that accepts data, with no data binding to serve it, is a finding.
- Validate before merge — run
/inspire-module reviewbefore any PR that modifies screen spec files, and.inspire/bin/face-exposure.shover the face. - Respect current UX ADRs. Screens must not contradict a UX decision that is
not superseded or rejected: a global
*.adr.mdunder_adr/whosefaces:is absent or names the screen's face, or one in the face's own_adr/. Flag any that do. - Propagation check after spec edits. Ask the operator before ending the turn
whether to propagate visible UI changes to the prototype — which edits trigger
the ask, and what each answer leads to, are
references/screen-propagation.md's. - Check and stamp every write. After
create,update,validate, orextractwrites a screen or catalog file, run.inspire/bin/review.sh <file>and fix what it reports on that file: every error, and every warning the operator does not choose to keep (write-checks). Then run.inspire/bin/trust.sh stamp <file> --skill screens(trust-stamps); rewriting one that carriesendorsed:is disclosed to the operator first (trust-stamps). - Name what is drawn. A component a screen names gets its
{name}.component.mdentry in the same turn, at**State:** to-extract. Every icon a screen, a region or a state implies is named by library and glyph (lucide-folder), never "an icon". Every hover-only affordance names its touch equivalent. Every table column says what it does at narrow widths. - A link needs its target. When a screen links a screen, pattern, layout or
component that does not exist yet, create the target in the same turn from its
template: a screen at
lifecycle: draft, a catalog entry at**State:** to-extract. A missing target is then always a broken link, never a concept nobody wrote down. A missing action goes through/inspire-domain, which creates it at draft. - Measure from the reference, at several widths. Before a screen or layout
says anything responsive,
design-system.md§ Supported viewports names the floor. Values come from the reference_references/ui-reference.mdresolves — the prototype by default — captured at several widths, swept for breakpoints and measured from computed boxes. What breaks at a width is a gap, never the rule.
Skill invocations
/inspire-screens create {face}.{slug}— scaffold a new screen in a face: mint its id, declare its bindings, name a layout if one fits/inspire-screens update {id} [args]— iterate on an existing screen, or bring an older shape to the current one (blocks on stable — regress it withpromotefirst)/inspire-screens validate {id}— validate a screen, browsing the prototype when it can be run/inspire-screens promote {id} {state}— walk a screen through the 4-state lifecycle/inspire-screens routes [{face}]— render the derived route map and the transition graph, per face; writes nothing/inspire-screens extract {pattern|layout|component} {name}— promote a recurring UI block or frame to a shared artifact/inspire-screens backfill [{reference}]— bring every screen, layout and component up to the presentation half of the current shape, measured from the prototype or the named reference/inspire-screens audit {face}— scan a face's screens for forward + reverse drift, duplication, extraction opportunities
04 同仓库更多 Skills
update
Update this project's INSPIRE runtime to the installed plugin's version: report drift, re-materialize unchanged files, and refuse to clobber local edits. Use after /plugin update inspire reports a newer base.
migrate
Move this project's knowledge base from the layered layout (01_adr, 02_modules, 03_features, 04_domain, 05_screens and the surface roster) to the concept layout under inspire_kb/01_spec/, where every artifact has a typed extension, and convert its [[wikilinks]] to relative Markdown links. Run once, on purpose, after /inspire:update reports the layered layout or counts wikilinks. Rebuilds nothing that is already built.
init
Install the INSPIRE runtime into this repository: materialize the skills, validators, hooks and knowledge-base skeleton, register the hooks, and freeze the runtime version. Run once per project. Use when setting up INSPIRE in a new or existing repo.
inspire-workspace
Workspace-level validation: the global pre-PR review (orchestrating module + cross-module checks) and vault-structure validation. Use for the required pre-merge gate and top-level structure checks. ADR lifecycle lives in /inspire-adr; the task tracker in /inspire-task.
inspire-task
Task tracker: create / update / close / list / show tickets in inspire_kb/99_tracker/. A plain-file kanban (one Markdown file per ticket, no external tool) for tracking work, drift, and skill-feedback. Use to open, advance, close, or query tickets.
inspire-spike
Vertical spikes: register and harvest external functional-prototype repos. A spike is a narrow, deep, throwaway build in its OWN repo that answers 'can we build it as we think?'. Use to register such a repo (name/reference it, set up its learnings hygiene) and to capture its learnings into the vault as a gap analysis against the current project.