orchestrix-skills 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-skills",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Capability-first AI development skill graph (Anthropic-native): plan → build with a warm-context orchestrator, contract-wired skills, and independent verification.",
5
5
  "author": "Orchestrix",
6
6
  "homepage": "https://orchestrix-mcp.youlidao.ai",
package/README.md CHANGED
@@ -16,7 +16,7 @@ intent
16
16
  └─ orchestrate (root: warm context, wires skills by output→input, enforces gates)
17
17
  ├─ brainstorm ──(needs facts?)─→ research
18
18
  ├─ (existing repo?) ──→ map-codebase (brownfield entry: evidence-based map → registry)
19
- ├─ (has UI?) ──→ design-system (once) → design-ui
19
+ ├─ (has UI?) ──→ design-directions (human picks a rendered direction) → design-system (once) → design-ui
20
20
  ├─ (arch decision?) ──→ design-architecture
21
21
  ├─ draft-story → implement → run-tests → review-code → commit
22
22
  │ ↑ verify ↑ design-review (UI only)
@@ -51,7 +51,7 @@ Re-running `install` refreshes the skills in place. It also writes a stamp at
51
51
  `<skills-dir>/.orchestrix-skills.json`:
52
52
 
53
53
  ```json
54
- { "version": "0.8.0", "ide": "claude", "skills": ["brainstorm", "commit", "…"] }
54
+ { "version": "0.10.0", "ide": "claude", "skills": ["brainstorm", "commit", "…"] }
55
55
  ```
56
56
 
57
57
  Two things read it. The installer prunes skills a previous version placed that
@@ -88,7 +88,11 @@ The root skill is where the interesting engineering lives. Beyond wiring:
88
88
  even if it asked for a deferred one.
89
89
  - **Two rules are hard-wired** because output→input matching structurally cannot
90
90
  reach them: `smoke-test` is the acceptance floor for a runnable app the run
91
- changed, and `design-system` precedes `design-ui`.
91
+ changed, and visual work runs direction → system → screens, with the human
92
+ approving rendered artboards at each gate rather than token files.
93
+ - **Model tiers are declared, not guessed.** Each skill states
94
+ `requires.model: frontier | capable | cheap`; the adapter maps the tier to a
95
+ model, and the resolved model is recorded on every ledger step.
92
96
 
93
97
  ## Runtime adapters
94
98
 
@@ -8,6 +8,12 @@
8
8
  "filesystem.write": "Write, Edit",
9
9
  "shell.execute": "Bash",
10
10
  "web.read": "WebSearch, WebFetch",
11
- "agent.spawn": "Task"
11
+ "agent.spawn": "Task",
12
+ "design.canvas": "the bundled design skill (Claude Design canvas) + Artifact publish"
13
+ },
14
+ "models": {
15
+ "frontier": "fable",
16
+ "capable": "opus",
17
+ "cheap": "haiku"
12
18
  }
13
19
  }
@@ -4,7 +4,8 @@
4
4
  - Use the skills installed under `.codex/skills/`; start end-to-end work with `orchestrate`.
5
5
  - Treat each skill's `metadata.contract` as Orchestrix workflow data. Codex skill selection still depends on `name` and `description`.
6
6
  - Resolve logical knowledge and work namespaces through `core-config.yaml`.
7
- - Map capability names in `metadata.requires.capabilities` to the tools available in the current Codex session.
7
+ - Map capability names in `metadata.requires.capabilities` to the tools available in the current Codex session. `design.canvas` is not available: design skills write standalone HTML files, and you open them for the human at visual gates.
8
+ - Map `metadata.requires.model` tiers to models the session can select (`frontier` = the most capable available). When a step cannot switch models, record the session model in its ledger `step` event.
8
9
  - When isolated agents are available, dispatch independent leaf skills concurrently and await them. Otherwise execute leaf skills sequentially in the current context, reading only their declared inputs before each step.
9
10
  - Independently run every objective verification command. Never accept an agent's success report as proof.
10
11
  - Keep runtime evidence at the fixed `.orchestrate/` path described by the `orchestrate` skill.
@@ -8,6 +8,12 @@
8
8
  "filesystem.write": "runtime patch/edit tools",
9
9
  "shell.execute": "runtime shell tool",
10
10
  "web.read": "runtime web tools when enabled",
11
- "agent.spawn": "optional collaboration tools; otherwise sequential fallback"
11
+ "agent.spawn": "optional collaboration tools; otherwise sequential fallback",
12
+ "design.canvas": "not available; design skills write standalone HTML files"
13
+ },
14
+ "models": {
15
+ "frontier": "the most capable model the session can select; else the session model, recorded in the ledger",
16
+ "capable": "the session default model",
17
+ "cheap": "the smallest model the session can select; else the session model"
12
18
  }
13
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-skills",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Capability-first AI development skill graph — Anthropic-native skills that run in any agent runtime.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,4 +42,5 @@ focus:
42
42
  visible_style: "" # the keyboard focus indicator every interactive element carries
43
43
 
44
44
  provenance: { source: design-system, added: "", approved_by: "" }
45
+ # per token: extracted: <file> | extracted: <file>, snapped <before → after> | added
45
46
  ```
package/skills/README.md CHANGED
@@ -18,6 +18,11 @@ Runtime-neutral capability requirements live under
18
18
  Adapters map those names to runtime tools. Runtime-specific tool names are not
19
19
  part of the orchestration contract.
20
20
 
21
+ `metadata.requires.model` declares the model tier a skill needs —
22
+ `frontier` (judgment: design, review, planning), `capable` (implementation),
23
+ or `cheap` (mechanical). Adapters map tiers to models under `models` in
24
+ `runtime.json`; the orchestrator states the resolved model on every dispatch.
25
+
21
26
  ### The contract (6 fields)
22
27
 
23
28
  | Field | Meaning |
@@ -54,7 +59,7 @@ are different gates; never merge them.
54
59
  intent
55
60
  └─ orchestrate (root: warm context, wires skills by output→input, enforces gates)
56
61
  ├─ brainstorm ──(needs facts?)─→ research
57
- ├─ (has UI?) ──→ design-system (once) → design-ui
62
+ ├─ (has UI?) ──→ design-directions (human picks a rendered direction) → design-system (once) → design-ui
58
63
  ├─ (arch decision?) ──→ design-architecture
59
64
  └─ draft-story → implement → run-tests → review-code → commit
60
65
  ↑ verify ↑ design-review (UI only)
@@ -71,6 +76,7 @@ Human gates are front-loaded (planning = direction) and at the very end
71
76
  | `orchestrate` | root | inline (delivery) |
72
77
  | `brainstorm` | planning | inline (hard gate) |
73
78
  | `research` | planning (optional) | never |
79
+ | `design-directions` | planning (UI, once) | inline |
74
80
  | `design-system` | planning (UI, once) | inline |
75
81
  | `design-ui` | planning (UI only) | inline |
76
82
  | `design-architecture` | planning (when needed) | inline |
@@ -6,6 +6,7 @@ allowed-tools: [Read, Write, Grep, Glob]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, filesystem.write]
9
+ model: frontier
9
10
  contract:
10
11
  inputs: [intent, project_context]
11
12
  reads: [taste/*, architecture/*, registry/*]
@@ -75,6 +76,8 @@ origin: <stable short handle of this intent>
75
76
  ## Downstream — flags for the orchestrator:
76
77
 
77
78
  - needs UI design? yes/no (→ design-ui)
79
+ - key screens (UI only): the 2–3 screens that carry the product, one line each
80
+ (→ design-directions renders these first)
78
81
  - needs an architecture decision? yes/no (→ design-architecture)
79
82
  - open question needing facts? yes/no (→ research)
80
83
 
@@ -6,6 +6,7 @@ allowed-tools: [Read, Bash]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, shell.execute]
9
+ model: cheap
9
10
  contract:
10
11
  inputs: [verified_changes, message_intent]
11
12
  reads: []
@@ -6,6 +6,7 @@ allowed-tools: [Read, Bash]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, shell.execute]
9
+ model: capable
9
10
  contract:
10
11
  inputs: [accepted_deliverable, target]
11
12
  reads: [registry/deploy]
@@ -6,6 +6,7 @@ allowed-tools: [Read, Write, Grep, Glob]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, filesystem.write]
9
+ model: frontier
9
10
  contract:
10
11
  inputs: [requirement, system_context]
11
12
  reads: [architecture/*, registry/api, registry/db]
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: design-directions
3
+ description: Use when a product has a UI but no settled visual direction — renders 2–4 genuinely different low-fidelity directions of the key screens so the human picks one they can SEE, before any design system is written.
4
+ license: MIT
5
+ allowed-tools: [Read, Write, Bash, Grep, Glob, Skill]
6
+ metadata:
7
+ requires:
8
+ capabilities: [filesystem.read, filesystem.write, shell.execute, "design.canvas?"]
9
+ model: frontier
10
+ contract:
11
+ inputs: [product_context, key_screens, "references?", "direction_feedback?"]
12
+ reads: [taste/brand, taste/design-system, registry/*]
13
+ outputs: [design_directions]
14
+ authority: "Write design assets under the specs namespace (default docs/specs/design/directions/). No source code, no production. Never publish or share externally — the orchestrator shows the artboards at the gate."
15
+ verify: "2–4 directions, each named by the axis it explores; every direction renders every key screen; every artboard passes the canvas check command (or is a standalone HTML file that opens from disk); directions.md gives every direction a motivation and a tradeoff."
16
+ accept:
17
+ when: "Always — the human picks a direction by looking at rendered screens, never by reading tokens."
18
+ timing: inline
19
+ ---
20
+
21
+ # Design Directions
22
+
23
+ Settle the visual direction with the human, not for them. People react to a
24
+ rendered screen; they do not react to a typeface name or a hex value. So the
25
+ first thing a human sees of a new product's look is 2–4 low-fidelity screens
26
+ they can compare — and the direction they pick is what `design-system` then
27
+ codifies.
28
+
29
+ **Posture:** Senior product designer running a direction review. Breadth over
30
+ polish. Every option gets an honest case; a set where only your favorite is
31
+ argued for is a rigged vote.
32
+
33
+ ## Precondition — skip when the direction is already settled
34
+
35
+ Do not explore what is already decided. Return `skipped` with a one-line
36
+ reason when either holds:
37
+
38
+ - `taste/design-system` is populated (a real system, not the unedited seed).
39
+ - `registry/*` shows an existing UI in the repo. Its look is the direction;
40
+ `design-system` extracts it from source.
41
+
42
+ ## Inputs
43
+
44
+ - `product_context` — the approved spec from `brainstorm` (goal, requirement,
45
+ constraints).
46
+ - `key_screens` — the 2–3 screens that carry the product, from the spec's
47
+ `Downstream` section. If the spec lists none, derive them from the
48
+ requirement and name them at the top of `directions.md`. Never more than 3.
49
+ - `references?` — products, brands, or assets the human named.
50
+ - `direction_feedback?` — present on re-dispatch when the human rejected every
51
+ direction. Read it first; the new set must answer it.
52
+
53
+ ## Process
54
+
55
+ 1. **Read the signal.** `taste/brand`, references, and the product context.
56
+ What is the product for, and for whom? Which tone does the brief imply
57
+ (internal tool → utilitarian; consumer → expressive)?
58
+ 2. **Name 2–4 directions, each on a named axis.** An axis is a real choice:
59
+ density (dense vs airy), type personality (editorial serif vs geometric
60
+ sans vs mono), color stance (one accent on neutral vs tonal), tone (quiet
61
+ vs bold). Two directions that differ only in shade are one direction —
62
+ replace one.
63
+ 3. **Sketch every key screen in every direction, low-fi.** Structure,
64
+ hierarchy, a type pairing, one accent, real layout. Real copy where the
65
+ brief supplies it; a bracketed placeholder like `[price]` where it does
66
+ not. No filler sections, no emoji as icons, no fake device chrome. Low-fi
67
+ means decision fidelity, not deliverable fidelity — enough to choose, not
68
+ enough to ship.
69
+ 4. **Author the artboards.**
70
+ - With `design.canvas`: one artboard per direction × screen, named
71
+ `<Direction>-<Screen>.dc.html`, plus a `canvas.json` that lays each
72
+ direction out as one row. `Main.dc.html` is the leading candidate's
73
+ first screen. Follow the runtime's design skill for the file format and
74
+ run its check command; its output is the verify evidence.
75
+ - Without it: one standalone `<Direction>-<Screen>.html` per artboard,
76
+ self-contained (inline CSS, no external assets except Google Fonts), and
77
+ an `index.html` that links every file under its direction name. Each
78
+ must open from disk.
79
+ 5. **Write `directions.md`.** For each direction: name, the axis it explores,
80
+ the motivation (why it fits this product), and its main tradeoff (what it
81
+ costs). One paragraph each. End with the key screens list.
82
+
83
+ ## Anti-slop
84
+
85
+ The canonical list lives in the `design-system` skill. A direction that lands
86
+ on one of those defaults is allowed only as a stated, justified choice — and
87
+ never as two of the 2–4.
88
+
89
+ ## Output: `specs/design/directions/`
90
+
91
+ ```
92
+ directions.md # name, axis, motivation, tradeoff per direction
93
+ canvas.json # with design.canvas only
94
+ <Direction>-<Screen>.dc.html # with design.canvas
95
+ <Direction>-<Screen>.html + index.html # without it
96
+ ```
97
+
98
+ ## Done
99
+
100
+ Write the files, run the check, then stop (`accept: inline`). The
101
+ orchestrator puts the rendered artboards in front of the human and records
102
+ their pick as `chosen_direction`. Never pick for them. If they reject every
103
+ direction, you are re-dispatched with `direction_feedback` — same skill, new
104
+ set.
@@ -6,8 +6,9 @@ allowed-tools: [Read, Bash, Grep, Glob]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, shell.execute]
9
+ model: frontier
9
10
  contract:
10
- inputs: [built_ui, ui_spec, "screenshots?"]
11
+ inputs: [built_ui, ui_spec, "ui_artboards?", "screenshots?"]
11
12
  reads: [taste/design-system, taste/brand]
12
13
  outputs: [design_review_report]
13
14
  authority: "Read-only on code. Start and stop the app locally to render it, and drive it via browser automation or HTTP. No edits, no commits, no deploy, no external spend."
@@ -42,6 +43,10 @@ clean one.
42
43
  - `built_ui` — the running app (a live URL, or a dev server this skill starts).
43
44
  - `ui_spec` — `specs/<slug>-ui.md` it must satisfy, including its declared
44
45
  **treatment** (`utility` / `product` / `editorial`).
46
+ - `ui_artboards?` — the artboards the human approved at the `design-ui` gate
47
+ (`specs/design/<slug>/`). They are the visual bar for Verdict 3: a built
48
+ screen that departs from its approved artboard in hierarchy, spacing, or
49
+ treatment is a finding, at the same severity as a deviation from the system.
45
50
  - `screenshots?` — captures a prior `smoke-test` already took. Use them instead
46
51
  of relaunching the app for the same screen.
47
52
  - Read `taste/design-system` + `taste/brand` — the bar to calibrate against.
@@ -1,73 +1,105 @@
1
1
  ---
2
2
  name: design-system
3
- description: Use when a project has no design direction yet, or must (re)establish its aesthetic — produces the durable design system (aesthetic POV, type, color, space, motion) before any UI is designed.
3
+ description: Use once a visual direction is chosen (or an existing UI must be codified) to write the durable design system — extracts tokens from what the human approved, completes what a sketch cannot show, and renders the system as a sheet for visual approval.
4
4
  license: MIT
5
- allowed-tools: [Read, Write, WebSearch, Grep, Glob]
5
+ allowed-tools: [Read, Write, Bash, WebSearch, Grep, Glob, Skill]
6
6
  metadata:
7
7
  requires:
8
- capabilities: [filesystem.read, filesystem.write, web.read]
8
+ capabilities: [filesystem.read, filesystem.write, shell.execute, web.read, "design.canvas?"]
9
+ model: frontier
9
10
  contract:
10
- inputs: [product_context, "references?"]
11
- reads: [taste/brand, taste/design-system]
12
- outputs: [taste/design-system, taste/brand]
13
- authority: "Author the durable design KB (taste/design-system, taste/brand). High-authority, audited (knowledge write). No source code, no production."
14
- verify: "Specific, not generic: a named typeface, real type/space scales, named reference products, one memorable-thing. Covers type + color + theme + space + motion + focus. Every mode listed under theme.modes has a full palette. No AI-default tells (see anti-slop)."
11
+ inputs: [product_context, "chosen_direction?", "references?"]
12
+ reads: [taste/brand, taste/design-system, registry/*]
13
+ outputs: [taste/design-system, taste/brand, design_system_sheet]
14
+ authority: "Author the durable design KB (taste/design-system, taste/brand) and the system sheet under the specs namespace. High-authority, audited (knowledge write). No source code, no production."
15
+ verify: "Every token value traces to the chosen direction's artboard source or to existing UI source, or is marked added and appears on the system sheet; covers type + color + theme + space + motion + focus; every mode under theme.modes has a full palette; the sheet and re-rendered key screens pass the canvas check command; no AI-default tells (see anti-slop)."
15
16
  accept:
16
- when: "Always — the aesthetic direction is foundational and brand-defining."
17
+ when: "Always — the human approves the rendered sheet and key screens, not the YAML."
17
18
  timing: inline
18
19
  ---
19
20
 
20
21
  # Design System
21
22
 
22
- Establish the project's durable visual direction — once — so every UI after it
23
- is consistent and unmistakably this product's. This is the source of taste the
24
- `design-ui` skill applies.
25
-
26
- **Posture:** You are a senior product designer with strong opinions about
27
- typography, color, space, and motion. You research, then propose ONE coherent
28
- system and explain why. Opinionated, not dogmatic. Zero tolerance for generic,
29
- AI-generated-looking interfaces.
30
-
31
- ## The forcing question (do this first)
32
-
33
- Ask: **"What is the one thing someone should remember after seeing this product
34
- for the first time?"** One sentence — a feeling, a claim, a posture. Every
35
- decision below serves it. A system that tries to be memorable for everything is
36
- memorable for nothing.
37
-
38
- ## Commit to a reference (this is what beats slop)
39
-
40
- AI defaults to the on-distribution average. Beat it by committing to a specific
41
- point of view BEFORE specifying anything:
42
-
43
- 1. **Research the space.** What do the 2–3 best products here actually look like?
44
- 2. **Name 2–3 concrete references** to steal direction from (e.g. Linear,
45
- Things 3, Stripe, Vercel, Bloomberg terminal, Notion). Not to copy — to anchor.
46
- 3. **State the one rule that makes this distinctive** (the type personality, a
47
- signature color, a density choice, a motion restraint).
48
-
49
- ## Specify the system (specifics, not adjectives)
50
-
51
- - **Typography** — a named typeface (not Inter/Roboto unless deliberate and
52
- justified), a type scale with real sizes/weights, line-height rules, and the
53
- target measure for running text (~65 characters).
54
- - **Color** — a real palette with roles (bg, surface, text, accent, states), not
55
- default framework swatches; state the contrast floor as a number.
56
- **Accent and semantic color are two different systems.** The accent is the one
57
- brand hue; success/warning/error carry meaning. If the accent doubles as
58
- "success", state cannot be read at a glance — pick again.
59
- - **Theme** — decide `light | dark | both`, and how a mode is selected (OS
60
- preference, an explicit user toggle, or both). If dark is in scope, specify a
61
- **second full palette, role for role**. A dark palette is re-picked, not
62
- inverted: an accent that holds 4.5:1 on white usually fails on near-black.
63
- Deciding light-only is allowed — but it must be written down as a decision, so
64
- `design-review` knows there is nothing else to check.
65
- - **Space** — a spacing scale; density posture (tight/airy) tied to the product.
23
+ Codify the project's durable visual direction — once — so every UI after it
24
+ is consistent and unmistakably this product's. This skill does not invent the
25
+ direction: the human already chose it by looking at rendered screens
26
+ (`design-directions`), or the repo already has one in code. It extracts,
27
+ regularizes, completes, and renders the result so the human approves pixels,
28
+ not a token file.
29
+
30
+ **Posture:** Senior product designer with strong opinions about typography,
31
+ color, space, and motion. Zero tolerance for generic, AI-generated-looking
32
+ interfaces.
33
+
34
+ ## Three entry paths — pick exactly one
35
+
36
+ | Entry | Condition | Source of truth |
37
+ | ------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------- |
38
+ | Extract from a chosen direction | `chosen_direction` names a direction in `specs/design/directions/` | That direction's artboard source files |
39
+ | Extract from existing UI | `registry/*` shows a UI in the repo and there is no `chosen_direction` | The repo's stylesheets, tokens, and components |
40
+ | Backfill | `taste/design-system` exists but lacks newer fields | The existing system; fill only the gaps |
41
+
42
+ If none holds, stop: the orchestrator must run `design-directions` first. Do
43
+ not invent a direction the human has never seen rendered.
44
+
45
+ ## Extract — from source, not screenshots
46
+
47
+ Read the artboard `.dc.html` / `.html` source, or the repo's stylesheets and
48
+ component source. Inline styles and tokens carry exact values; a screenshot is
49
+ a guess. Lift: typeface(s), every font size and weight in use, line-heights,
50
+ colors by role (bg, surface, text, accent), spacing values, radii, borders,
51
+ control heights.
52
+
53
+ Then regularize onto scales: a type scale, a spacing scale, a palette with
54
+ named roles. When snapping changes a value, record `before → after` in the
55
+ entry's provenance so the human can see what moved and why.
56
+
57
+ ## Complete — what a sketch cannot show
58
+
59
+ A low-fi direction shows the happy path in one theme. The system must also
60
+ decide the following, and each decision carries `added` provenance because the
61
+ human has not seen it yet:
62
+
63
+ - **Typography** — line-height rules and the measure for running text
64
+ (~65 characters). Named typeface only; Inter/Roboto need a stated
65
+ justification.
66
+ - **Color** — the contrast floor as a number. **Accent and semantic color are
67
+ two systems:** the accent is the one brand hue; success/warning/error carry
68
+ meaning and must read as distinct from it.
69
+ - **Theme** — `light | dark | both`, and how a mode is selected (OS
70
+ preference, an explicit user toggle, or both). If dark is in scope, a
71
+ **second full palette, role for role**, re-picked — never inverted: an
72
+ accent that holds 4.5:1 on white usually fails on near-black. Light-only is
73
+ allowed, but it must be written down so `design-review` knows there is
74
+ nothing else to check.
75
+ - **Space** — density posture (tight/airy) tied to the product.
66
76
  - **Layout** — grid and composition principles; how hierarchy is created.
67
77
  - **Motion** — timing, easing, where motion is used (and where it is not), and
68
78
  what `prefers-reduced-motion` removes while keeping the UI usable.
69
- - **Focus** — the keyboard focus indicator every interactive element carries. An
70
- invisible focus ring is a broken system, not a style choice.
79
+ - **Focus** — the keyboard focus indicator every interactive element carries.
80
+ An invisible focus ring is a broken system, not a style choice.
81
+
82
+ Record the **memorable-thing** (one sentence: what a first-time viewer should
83
+ remember), the **references** (2–3 named products), and the **one distinctive
84
+ rule** — taken from the chosen direction's entry in `directions.md`, or
85
+ derived from the existing UI.
86
+
87
+ ## Render — the system sheet
88
+
89
+ Write the system as artboards under `specs/design/system/`, using the same
90
+ format rules as `design-directions` (canvas files with `design.canvas`,
91
+ standalone HTML without it), and run the check command:
92
+
93
+ - `Sheet` — the type ramp at real sizes, the light palette (and the dark
94
+ palette when declared), the spacing scale, and the core components in every
95
+ state: button (default / hover / focus-visible / disabled), text input
96
+ (default / focus / error), one empty state, one loading state.
97
+ - One artboard per key screen, re-rendered hi-fi on the system, in every
98
+ declared theme mode. These are the screens `design-ui` reuses — it does not
99
+ redraw them.
100
+
101
+ The sheet is what the human approves. A token that is not on the sheet has
102
+ not been approved.
71
103
 
72
104
  ## Anti-slop (the canonical list — `design-ui` and `design-review` check it too)
73
105
 
@@ -99,11 +131,11 @@ pretending to be structure.
99
131
 
100
132
  Write `taste/design-system` and `taste/brand` as structured entries (per the
101
133
  knowledge format: terse, chunked, each with `source`/`added`/`approved_by`).
102
- Record the memorable-thing, the references, the one distinctive rule, and each
103
- specified token/scale. Leave no field of the seed blank: `theme`,
104
- `motion.reduced_motion`, and `focus.visible_style` are decisions, and a blank
105
- one reads to `design-review` as unspecified rather than as "not needed". This is
106
- the source `design-ui` reads.
134
+ Each token entry names where its value came from: `extracted: <file>`,
135
+ `extracted: <file>, snapped <before → after>`, or `added`. Leave no field of
136
+ the seed blank: `theme`, `motion.reduced_motion`, and `focus.visible_style`
137
+ are decisions, and a blank one reads to `design-review` as unspecified rather
138
+ than as "not needed". This is the source `design-ui` reads.
107
139
 
108
140
  **Backfilling an older system.** An upgrade refreshes skills but never rewrites
109
141
  an existing `knowledge/` — that brain belongs to the project. So a system
@@ -113,16 +145,19 @@ will report every dependent check against an assumed bar. When you re-run on
113
145
  such a project, add those fields rather than re-authoring the whole system:
114
146
  keep every existing value untouched, fill only the gaps, and give the new
115
147
  entries their own `added` date and approver. Adding a dark palette to a
116
- light-only product is a real design decision — put it through the same accept
117
- gate as the rest, don't infer it.
148
+ light-only product is a real design decision — put it on the sheet and through
149
+ the same accept gate as the rest, don't infer it.
118
150
 
119
151
  ## Self-critique before done
120
152
 
121
- Look at the system with a designer's eye: does it read as a specific, named
122
- point of view, or as a generic template? Could you tell it apart from a default
123
- AI UI? If not, sharpen it.
153
+ Look at the sheet with a designer's eye: does it still read as the direction
154
+ the human chose, or has regularizing flattened it into a template? Could you
155
+ tell it apart from a default AI UI? If not, sharpen it — and check the change
156
+ back against the chosen artboard.
124
157
 
125
158
  ## Done
126
159
 
127
- Write the KB, then stop for approval (`accept: inline`). On approval, `design-ui`
128
- applies this system per feature. Re-run only to evolve the direction.
160
+ Write the KB and the sheet, then stop for approval (`accept: inline`). The
161
+ orchestrator shows the sheet and the re-rendered key screens; the human
162
+ approves those. On approval, `design-ui` applies this system per feature.
163
+ Re-run only to evolve the direction or to backfill fields.
@@ -2,19 +2,20 @@
2
2
  name: design-ui
3
3
  description: Use when a feature has a user interface, to design its screens and flows by applying the project's design system with world-class craft, before stories are drafted.
4
4
  license: MIT
5
- allowed-tools: [Read, Write, Grep, Glob]
5
+ allowed-tools: [Read, Write, Bash, Grep, Glob, Skill]
6
6
  metadata:
7
7
  requires:
8
- capabilities: [filesystem.read, filesystem.write]
8
+ capabilities: [filesystem.read, filesystem.write, shell.execute, "design.canvas?"]
9
+ model: frontier
9
10
  contract:
10
11
  inputs: [requirement, ui_context]
11
12
  reads: [taste/design-system, taste/brand]
12
- outputs: [specs/<slug>-ui.md]
13
+ outputs: [specs/<slug>-ui.md, ui_artboards]
13
14
  updates: ["taste/design-system?", "taste/brand?"]
14
- authority: "Write to the specs namespace (default docs/specs/) and design assets. No source code, no production."
15
- verify: "Every screen and flow maps to a requirement; a treatment is declared and held to; expresses the design system (not generic defaults); copy and non-happy states are specified for every screen; the design plan passed its critique before the spec was written."
15
+ authority: "Write to the specs namespace (default docs/specs/) and design assets under it. No source code, no production."
16
+ verify: "Every screen and flow maps to a requirement; a treatment is declared and held to; expresses the design system (not generic defaults); copy and non-happy states are specified for every screen; every screen in the spec has a rendered artboard that passes the canvas check command; the design plan passed its critique before the spec was written."
16
17
  accept:
17
- when: "Visual direction — the look is foundational; everything downstream builds on it."
18
+ when: "Always — the human approves the rendered artboards; the spec is what draft-story and design-review read."
18
19
  timing: inline
19
20
  ---
20
21
 
@@ -77,8 +78,13 @@ choice you must justify in one sentence in the spec.
77
78
  screen's spec names the tokens it uses, not literal colors, and calls out any
78
79
  place the two palettes need different treatment (elevation, dividers, images
79
80
  on a dark ground). If the system is light-only, say so once and move on.
80
- 7. **Show, don't just tell.** When a layout choice is clearer shown than
81
- described, produce a mockup or wireframe, not prose.
81
+ 7. **Render every screen.** Write one artboard per screen and state under
82
+ `specs/design/<slug>/`, in every declared theme mode, using the same format
83
+ rules as `design-directions` (canvas files with `design.canvas`, standalone
84
+ HTML without it), and run the check command. A key screen `design-system`
85
+ already rendered is reused, not redrawn — the spec references its file.
86
+ The artboards are what the human approves; the spec is what machines read.
87
+ Both are required.
82
88
 
83
89
  ## Copy is design material
84
90
 
@@ -128,7 +134,7 @@ from `taste/design-system` needs the same justification.
128
134
  ## Designer's-eye self-critique (mandatory gate before done)
129
135
 
130
136
  The plan critique in step 2 catches generic direction. This catches generic
131
- execution. Look at the result and ask:
137
+ execution. Look at the rendered artboards and ask:
132
138
 
133
139
  - Does this look like it could ship from {the named references}, or like a
134
140
  generic AI UI? If the latter, fix it.
@@ -142,7 +148,7 @@ execution. Look at the result and ask:
142
148
  Fix until it passes. This is the visual equivalent of `run-tests` — don't claim
143
149
  done without running it.
144
150
 
145
- ## Output: `specs/<slug>-ui.md`
151
+ ## Output: `specs/<slug>-ui.md` + `specs/design/<slug>/`
146
152
 
147
153
  ```markdown
148
154
  # <Feature> — UI Spec
@@ -162,10 +168,15 @@ done without running it.
162
168
  ## System use — tokens/components used; theme coverage; how the
163
169
  memorable-thing shows up here.
164
170
 
171
+ ## Artboards — one file per screen and state, including any reused from
172
+ design-system.
173
+
165
174
  ## New patterns — anything the system lacked, with rationale (candidate for KB).
166
175
  ```
167
176
 
168
- `draft-story`'s `UI Reference` points to this file.
177
+ `specs/design/<slug>/` holds the artboards (plus `canvas.json` when the canvas
178
+ is available). `draft-story`'s `UI Reference` points to the spec;
179
+ `design-review` walks the spec and uses the artboards as the visual bar.
169
180
 
170
181
  ## Metabolism
171
182
 
@@ -175,5 +186,6 @@ supersede rather than rewrite. Feature-only details stay in the spec.
175
186
 
176
187
  ## Done
177
188
 
178
- Write the UI spec, pass the self-critique, then stop for visual approval
179
- (`accept: inline`). On approval the orchestrator wires `draft-story`.
189
+ Write the UI spec and the artboards, pass the self-critique, then stop
190
+ (`accept: inline`). The orchestrator shows the artboards; the human approves
191
+ those. On approval the orchestrator wires `draft-story`.
@@ -6,6 +6,7 @@ allowed-tools: [Read, Write, Grep, Glob]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, filesystem.write]
9
+ model: capable
9
10
  contract:
10
11
  inputs: [requirement, context]
11
12
  reads: [taste/coding-standards, registry/api, registry/db, "front-end-spec?"]
@@ -6,6 +6,7 @@ allowed-tools: [Read, Write, Edit, Bash]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, filesystem.write, shell.execute]
9
+ model: capable
9
10
  contract:
10
11
  inputs: [story, acceptance_criteria, scope, "qa_feedback?"]
11
12
  reads: [taste/coding-standards, registry/api, registry/db]
@@ -6,6 +6,7 @@ allowed-tools: [Read, Bash, Grep, Glob]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, shell.execute]
9
+ model: capable
9
10
  contract:
10
11
  inputs: [symptom, "context?", "prior_attempts?"]
11
12
  reads: [registry/architecture, taste/coding-standards]
@@ -6,6 +6,7 @@ allowed-tools: [Read, Write, Bash, Grep, Glob]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, filesystem.write, shell.execute]
9
+ model: capable
9
10
  contract:
10
11
  inputs: [repo_path, "focus?"]
11
12
  reads: []
@@ -2,11 +2,12 @@
2
2
  name: orchestrate
3
3
  description: Use when a goal must be delivered end-to-end by composing skills, with the human approving direction at the start and the result at the end.
4
4
  license: MIT
5
- allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Task]
5
+ allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Task, Skill, Artifact]
6
6
  metadata:
7
- version: 6
7
+ version: 7
8
8
  requires:
9
- capabilities: [filesystem.read, filesystem.write, shell.execute, "agent.spawn?"]
9
+ capabilities: [filesystem.read, filesystem.write, shell.execute, "agent.spawn?", "design.canvas?"]
10
+ model: frontier
10
11
  contract:
11
12
  inputs: [intent, "constraints?"]
12
13
  reads: [core-config, skill-registry, taste/*]
@@ -46,7 +47,8 @@ no step above intent.
46
47
  4. **Dispatch.** Hand the skill exactly the `inputs` it declares, as files —
47
48
  resolving each logical namespace it reads/writes to a physical path via
48
49
  `core-config.yaml` (see Namespace resolution). If the runtime supports isolated
49
- agents, run each leaf as a fresh dispatch and choose the cheapest capable model.
50
+ agents, run each leaf as a fresh dispatch on the model its `requires.model`
51
+ tier resolves to (see Model tier).
50
52
  Dispatch independent steps concurrently and await them in the same turn; keep
51
53
  dependent steps sequential. Never fire-and-forget a background agent. If the
52
54
  runtime has no isolated-agent capability, execute leaves sequentially in the
@@ -134,11 +136,16 @@ CANNOT reach — wire these by rule, not by match:
134
136
  proves the product — green unit tests are not this evidence. A `failed` or
135
137
  `untested` verdict is a real result: carry it into final acceptance
136
138
  verbatim, never round it up to passed.
137
- 2. **`design-system` comes before `design-ui`.** `design-ui` READS
138
- `taste/design-system` — it never produces it. If UI work is wired and the
139
- resolved `taste/design-system` namespace is empty, wire `design-system`
140
- first; otherwise `design-ui` dresses a project that has a brand in generic
141
- defaults.
139
+ 2. **Direction → system → screens.** `design-ui` READS `taste/design-system`
140
+ and never produces it; `design-system` codifies a direction and never
141
+ invents one. If UI work is wired and the resolved `taste/design-system`
142
+ namespace is empty:
143
+ - the repo already has a UI (`registry/*` says so) → wire `design-system`
144
+ (its extract-from-source path), then `design-ui`;
145
+ - otherwise → wire `design-directions` first, show its artboards at the
146
+ gate, hand the human's pick to `design-system` as `chosen_direction`,
147
+ then `design-ui`.
148
+ A direction the human has not seen rendered is not a direction.
142
149
 
143
150
  ## Accept gate
144
151
 
@@ -151,6 +158,15 @@ CANNOT reach — wire these by rule, not by match:
151
158
 
152
159
  You are the teeth. The fields are only data; you enforce them.
153
160
 
161
+ **Visual gates show pixels.** When the skill at an inline gate produced
162
+ artboards (`design-directions`, `design-system`, `design-ui`), put the
163
+ rendered result in front of the human before asking: with `design.canvas`,
164
+ publish the canvas through the runtime's design skill; without it, give the
165
+ local HTML paths to open. Publishing is an outward action and belongs to you
166
+ at the gate, never to the leaf. Record the URL or path in the `gate` event's
167
+ `shows` field. Asking a human to approve a design from a token file or a
168
+ prose spec is a failed gate.
169
+
154
170
  ## Rework is a loop, not a skill — and the loop is BOUNDED
155
171
 
156
172
  A failed `verify` or a `changes_requested` review is not a separate "fix" step.
@@ -219,8 +235,8 @@ Events and when to write them:
219
235
  | ----- | ---- | ----- |
220
236
  | `run_start` | right after binding intent | `{"e":"run_start","run":"r-<yyyymmdd>-<slug>","intent":"...","ts":"..."}` |
221
237
  | `plan` | after wiring the graph, and EVERY time the graph changes | `{"e":"plan","run":"...","steps":[{"n":1,"skill":"research","title":"..."}, …]}` — full current plan; latest `plan` line wins; steps may be added, never removed |
222
- | `step` | immediately BEFORE each dispatch, and again after its verify | `{"e":"step","run":"...","n":3,"skill":"implement","status":"dispatched\|done\|failed\|skipped","attempt":1,"evidence":"<file or one-line result>","ts":"..."}` — rework = same `n`, next `attempt`; a step a replan made obsolete gets `skipped` with the reason in `evidence` (plan lines are never removed, so this is how an obsolete step closes) |
223
- | `gate` | when stopping at a human gate | `{"e":"gate","run":"...","kind":"inline_accept","question":"...","ts":"..."}` |
238
+ | `step` | immediately BEFORE each dispatch, and again after its verify | `{"e":"step","run":"...","n":3,"skill":"implement","status":"dispatched\|done\|failed\|skipped","attempt":1,"model":"<resolved model, or session>","evidence":"<file or one-line result>","ts":"..."}` — rework = same `n`, next `attempt`; a step a replan made obsolete gets `skipped` with the reason in `evidence` (plan lines are never removed, so this is how an obsolete step closes) |
239
+ | `gate` | when stopping at a human gate | `{"e":"gate","run":"...","kind":"inline_accept","question":"...","shows":"<artboard URL or path, visual gates only>","ts":"..."}` |
224
240
  | `run_end` | at delivery or abandonment | `{"e":"run_end","run":"...","result":"delivered\|paused\|abandoned","ts":"..."}` |
225
241
 
226
242
  A step recorded `done` is done — do not re-dispatch it. `evidence` on a `done`
@@ -250,10 +266,25 @@ session, or a wake-up — do NOT continue from what you remember. Replay:
250
266
 
251
267
  - **Files, not paste.** Move artifacts between steps as files. Never paste a
252
268
  step's full output into your context — it would be re-read every later turn.
253
- - **Cheapest model per step.** Mechanical step → cheap model. Judgment step →
254
- capable model. State the model explicitly on every dispatch.
269
+ - **The declared tier per step.** Resolve `requires.model` through the
270
+ adapter and state the model on every dispatch (see Model tier).
255
271
  - **Keep your own context small.** You coordinate; the leaves do the heavy work.
256
272
 
273
+ ## Model tier
274
+
275
+ Every skill declares `metadata.requires.model: frontier | capable | cheap`.
276
+ Resolve it through the adapter (`adapters/<runtime>/runtime.json` → `models`)
277
+ and state the resolved model on every dispatch. The tiers encode where
278
+ judgment lives: design and review skills are `frontier` because a weaker
279
+ model converges on the generic default and a weaker reviewer misses what the
280
+ implementer missed; mechanical skills are `cheap`.
281
+
282
+ - Escalate `implement` to `frontier` when the story's scope is high-risk
283
+ (security, data, money, irreversible).
284
+ - If the runtime cannot switch models for a step (sequential fallback), the
285
+ step runs on the session's model. Record that model in the `step` event and
286
+ say so at the next gate. Never silently run a `frontier` step on less.
287
+
257
288
  ## Red flags — stop
258
289
 
259
290
  - Pausing to ask the human mid-run when nothing is `inline` or irreversible
@@ -274,4 +305,10 @@ session, or a wake-up — do NOT continue from what you remember. Replay:
274
305
  - Delivering a runnable app this run changed with no `smoke-test` verdicts
275
306
  (unit tests are not that evidence)
276
307
  - Dispatching `design-ui` while the resolved `taste/design-system` is empty
308
+ - Letting `design-system` invent a direction with no `chosen_direction` and no
309
+ existing UI
310
+ - Asking for design approval on a token file or a prose spec instead of
311
+ rendered artboards
312
+ - Running a `frontier` step on a cheaper model without recording it in the
313
+ ledger
277
314
  - Marking the run complete without every step's `verify` evidence
@@ -6,6 +6,7 @@ allowed-tools: [Read, Write, WebSearch, WebFetch]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, filesystem.write, web.read]
9
+ model: capable
9
10
  contract:
10
11
  inputs: [question, scope]
11
12
  reads: []
@@ -6,6 +6,7 @@ allowed-tools: [Read, Bash, Grep, Glob]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, shell.execute]
9
+ model: frontier
9
10
  contract:
10
11
  inputs: [diff, spec]
11
12
  reads: [taste/coding-standards]
@@ -6,6 +6,7 @@ allowed-tools: [Read, Bash]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, shell.execute]
9
+ model: cheap
9
10
  contract:
10
11
  inputs: [target, "expected_outcome?"]
11
12
  reads: []
@@ -6,6 +6,7 @@ allowed-tools: [Read, Bash, Grep, Glob]
6
6
  metadata:
7
7
  requires:
8
8
  capabilities: [filesystem.read, shell.execute]
9
+ model: cheap
9
10
  contract:
10
11
  inputs: [run_instructions, flows, "qa_feedback?"]
11
12
  reads: [registry/app]