@codyswann/lisa 3.45.9 → 3.46.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.
Files changed (134) hide show
  1. package/all/copy-overwrite/scripts/lisa-floor-collisions.mjs +17 -1
  2. package/all/copy-overwrite/scripts/lisa-gates.mjs +2 -2
  3. package/all/copy-overwrite/scripts/lisa-work-item.mjs +54 -12
  4. package/dist/configs/eslint/expo.d.ts.map +1 -1
  5. package/dist/configs/eslint/expo.js +5 -0
  6. package/dist/configs/eslint/expo.js.map +1 -1
  7. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  8. package/dist/core/lisa-owned-hash-ledger.js +15 -0
  9. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  10. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  11. package/dist/core/upstream-evidence-manifest.js +70 -17
  12. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  13. package/eslint-plugin-ui-standards/README.md +90 -0
  14. package/eslint-plugin-ui-standards/index.js +4 -0
  15. package/eslint-plugin-ui-standards/rules/no-unbound-design-value.js +375 -0
  16. package/expo/copy-overwrite/eslint.expo.ts +5 -0
  17. package/expo/copy-overwrite/scripts/bdd/discover.mjs +20 -4
  18. package/expo/copy-overwrite/scripts/bdd/markdown-cell.mjs +7 -1
  19. package/expo/copy-overwrite/scripts/bdd/parse.mjs +8 -2
  20. package/expo/copy-overwrite/scripts/check-e2e-coverage.mjs +8 -2
  21. package/expo/copy-overwrite/scripts/classify-maestro-failures.mjs +91 -10
  22. package/package.json +1 -1
  23. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  25. package/plugins/lisa/.codex-plugin/skills/lisa-design-intake/SKILL.md +169 -0
  26. package/plugins/lisa/.codex-plugin/skills/lisa-design-intake/agents/openai.yaml +4 -0
  27. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +2 -0
  28. package/plugins/lisa/.codex-plugin/skills/lisa-quality-review/SKILL.md +2 -0
  29. package/plugins/lisa/.codex-plugin/skills/lisa-review-local/SKILL.md +9 -0
  30. package/plugins/lisa/.codex-plugin/skills/lisa-tdd-implementation/SKILL.md +1 -0
  31. package/plugins/lisa/commands/design/intake.md +7 -0
  32. package/plugins/lisa/rules/eager/design-value-binding.md +80 -0
  33. package/plugins/lisa/rules/reference/design-value-binding.md +204 -0
  34. package/plugins/lisa/scripts/design-bindings-probe.mjs +713 -0
  35. package/plugins/lisa/scripts/design-intake-gate.mjs +470 -0
  36. package/plugins/lisa/scripts/design-variable-ids.mjs +565 -0
  37. package/plugins/lisa/skills/lisa-design-intake/SKILL.md +169 -0
  38. package/plugins/lisa/skills/lisa-design-intake/agents/openai.yaml +4 -0
  39. package/plugins/lisa/skills/lisa-implement/SKILL.md +2 -0
  40. package/plugins/lisa/skills/lisa-quality-review/SKILL.md +2 -0
  41. package/plugins/lisa/skills/lisa-review-local/SKILL.md +9 -0
  42. package/plugins/lisa/skills/lisa-tdd-implementation/SKILL.md +1 -0
  43. package/plugins/lisa-agy/commands/lisa/design/intake.md +7 -0
  44. package/plugins/lisa-agy/plugin.json +1 -1
  45. package/plugins/lisa-agy/scripts/design-bindings-probe.mjs +713 -0
  46. package/plugins/lisa-agy/scripts/design-intake-gate.mjs +470 -0
  47. package/plugins/lisa-agy/scripts/design-variable-ids.mjs +565 -0
  48. package/plugins/lisa-agy/skills/lisa-design-intake/SKILL.md +169 -0
  49. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +2 -0
  50. package/plugins/lisa-agy/skills/lisa-quality-review/SKILL.md +2 -0
  51. package/plugins/lisa-agy/skills/lisa-review-local/SKILL.md +9 -0
  52. package/plugins/lisa-agy/skills/lisa-tdd-implementation/SKILL.md +1 -0
  53. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  55. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  56. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-copilot/commands/lisa/design/intake.md +7 -0
  60. package/plugins/lisa-copilot/rules/eager/design-value-binding.md +80 -0
  61. package/plugins/lisa-copilot/rules/reference/design-value-binding.md +204 -0
  62. package/plugins/lisa-copilot/scripts/design-bindings-probe.mjs +713 -0
  63. package/plugins/lisa-copilot/scripts/design-intake-gate.mjs +470 -0
  64. package/plugins/lisa-copilot/scripts/design-variable-ids.mjs +565 -0
  65. package/plugins/lisa-copilot/skills/lisa-design-intake/SKILL.md +169 -0
  66. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +2 -0
  67. package/plugins/lisa-copilot/skills/lisa-quality-review/SKILL.md +2 -0
  68. package/plugins/lisa-copilot/skills/lisa-review-local/SKILL.md +9 -0
  69. package/plugins/lisa-copilot/skills/lisa-tdd-implementation/SKILL.md +1 -0
  70. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-cursor/commands/lisa/design/intake.md +7 -0
  72. package/plugins/lisa-cursor/rules/design-value-binding-reference.mdc +209 -0
  73. package/plugins/lisa-cursor/rules/design-value-binding.mdc +85 -0
  74. package/plugins/lisa-cursor/scripts/design-bindings-probe.mjs +713 -0
  75. package/plugins/lisa-cursor/scripts/design-intake-gate.mjs +470 -0
  76. package/plugins/lisa-cursor/scripts/design-variable-ids.mjs +565 -0
  77. package/plugins/lisa-cursor/skills/lisa-design-intake/SKILL.md +169 -0
  78. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +2 -0
  79. package/plugins/lisa-cursor/skills/lisa-quality-review/SKILL.md +2 -0
  80. package/plugins/lisa-cursor/skills/lisa-review-local/SKILL.md +9 -0
  81. package/plugins/lisa-cursor/skills/lisa-tdd-implementation/SKILL.md +1 -0
  82. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  84. package/plugins/lisa-expo-agy/plugin.json +1 -1
  85. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  86. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  89. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  90. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  93. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  94. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  95. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  96. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  99. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  100. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  102. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  104. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  105. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  108. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  109. package/plugins/lisa-rails-agy/plugin.json +1 -1
  110. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  112. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  114. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  115. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  119. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  120. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  122. package/plugins/src/base/commands/design/intake.md +7 -0
  123. package/plugins/src/base/rules/eager/design-value-binding.md +80 -0
  124. package/plugins/src/base/rules/reference/design-value-binding.md +204 -0
  125. package/plugins/src/base/scripts/design-bindings-probe.mjs +713 -0
  126. package/plugins/src/base/scripts/design-intake-gate.mjs +470 -0
  127. package/plugins/src/base/scripts/design-variable-ids.mjs +565 -0
  128. package/plugins/src/base/skills/lisa-design-intake/SKILL.md +169 -0
  129. package/plugins/src/base/skills/lisa-implement/SKILL.md +2 -0
  130. package/plugins/src/base/skills/lisa-quality-review/SKILL.md +2 -0
  131. package/plugins/src/base/skills/lisa-review-local/SKILL.md +9 -0
  132. package/plugins/src/base/skills/lisa-tdd-implementation/SKILL.md +1 -0
  133. package/typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs +22 -6
  134. package/typescript/copy-overwrite/scripts/check-skipped-required-checks.mjs +10 -1
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: lisa-design-intake
3
+ description: "Design-handoff gate for a work item with a UI surface. Resolves the source of truth PER AXIS (colour, spacing, typography, radius, elevation, motion) by querying the published variable collections of the configured design source — never by asking a human — then judges the work item against the five objectively checkable block conditions of the `design-value-binding` rule. Values come from design variables where a variable system exists; visual measurement is supplemental there and the legitimate primary source where none exists. Blocks on UNBOUND, never on UNSURE: aesthetic uncertainty with everything bound is not a block. Escalates a block through the vendor-neutral tracker abstraction to the configured `design.escalation.assignee`, with a plain-language comment a non-technical operator can act on, and records every value derived in an untyped axis so the gaps in the variable system accumulate on their own."
4
+ allowed-tools: ["Skill", "Bash", "Read", "Write"]
5
+ ---
6
+
7
+ # Design Intake: $ARGUMENTS
8
+
9
+ `$ARGUMENTS` is one canonical work-item reference (JIRA key, Linear ref, `org/repo#123`), optionally followed by a design reference. With no arguments, resolve the work item from the worktree binding (`node scripts/lisa-work-item.mjs current`).
10
+
11
+ Run one design-handoff cycle against that work item: resolve the regime per axis, gather the facts, let `scripts/design-intake-gate.mjs` decide, and either escalate a block or hand back a proceed with the derived values recorded.
12
+
13
+ This skill carries the **judgment**. It does not carry the **policy** — that is the `design-value-binding` rule, which it cites rather than restates. Read the rule; do not re-derive its conditions here.
14
+
15
+ ## What this is not
16
+
17
+ `design-source-of-truth` and `scripts/design-source-gate.mjs` already ask whether a changed surface **declares where its design came from**. This asks the orthogonal question: are the **values on it bound**. Both apply. A surface can cite a perfectly valid design node and still paint a literal that no variable backs — that is the case this skill exists for, and it is invisible to the other gate.
18
+
19
+ ## Phase 0 — Is there a design source at all?
20
+
21
+ **A design source is optional, and this is the most important step in the skill.** Most projects have no designs. Run the probe and read its verdict:
22
+
23
+ ```bash
24
+ node "${CLAUDE_PLUGIN_ROOT:-.}/scripts/design-bindings-probe.mjs" --json
25
+ ```
26
+
27
+ A `SKIPPED` verdict means one of: `design.tokens.source` is unset, no access token is present, or no committed variable-id map exists. **Say so and stop cleanly — do not block.** A mandatory gate on an absent integration breaks every project that has no designs, which is a worse outcome than any drift it would have caught.
28
+
29
+ If a design source *is* configured, then per `tool-access-gate` a failed probe **against a configured source** is a block, not a reason to fall back to reading pixels: post the Access Needed comment, move the item to the configured `blocked` role with the `human_needed` marker, and stop.
30
+
31
+ ## Phase 1 — Resolve configuration
32
+
33
+ Read `.lisa.config.local.json` first, then `.lisa.config.json`; local overrides global per key. Use `jq` — never hand-parse JSON.
34
+
35
+ ```bash
36
+ read_key() {
37
+ local key="$1" local_v global_v
38
+ local_v=$(jq -r "$key // empty" .lisa.config.local.json 2>/dev/null)
39
+ global_v=$(jq -r "$key // empty" .lisa.config.json 2>/dev/null)
40
+ printf '%s' "${local_v:-$global_v}"
41
+ }
42
+ tokens_source=$(read_key '.design.tokens.source')
43
+ escalation_assignee=$(read_key '.design.escalation.assignee')
44
+ escalation_label=$(read_key '.design.escalation.label')
45
+ ```
46
+
47
+ | Key | Missing means |
48
+ |---|---|
49
+ | `design.tokens.source` | Stop and report: the authoritative design source is not configured, so there is nothing to resolve the regime against. |
50
+ | `design.escalation.assignee` | **A block condition in its own right.** Do not guess a person, do not skip the escalation, do not assign to the current user. The gate raises `escalation-target-unset` and the run ends blocked. |
51
+ | `design.escalation.label` | Nothing. The label is an additive marker; absent means no marker is added. |
52
+
53
+ **Never write a person's name, handle, or identity into any artifact this skill produces.** These are config keys; the host supplies the values.
54
+
55
+ ## Phase 2 — Resolve the regime, per axis
56
+
57
+ For each of the six axes — `color`, `spacing`, `typography`, `radius`, `elevation`, `motion` — determine whether the design source publishes variables covering it. **Never ask a human.**
58
+
59
+ **Do not try to list the published collections.** That route does not exist headlessly, and the measurement is worth carrying:
60
+
61
+ | Route | Gives names? | Headless? |
62
+ |---|---|---|
63
+ | Variables REST (`/v1/files/:key/variables/local`) | yes | **no** — Enterprise-plan only; the read scope is not offered in the token scope picker on other plans, so no token change unlocks it |
64
+ | Design-tool MCP (`get_variable_defs`) | yes, every plan | **no** — browser OAuth, which cron, CI, and a subagent cannot perform |
65
+ | `/v1/files/:key/nodes` | no — opaque `VariableID:106:15` | **yes**, on a plain access token |
66
+
67
+ A gate built on either of the first two runs interactively and silently no-ops everywhere else. So the regime is derived from the **committed variable-id map**, which `design-variable-ids.mjs` produced once, interactively, and which `design-bindings-probe.mjs` reads headlessly. An axis is typed when the map names at least one variable in its namespace.
68
+
69
+ `result.regime` from Phase 0 already carries this. Use it; do not re-derive it.
70
+
71
+ A mixed regime is the expected case, not an error state. Colour blocking while spacing gets measured, in the same work item, is the design working correctly.
72
+
73
+ **Probe the subtree you are implementing, not the enclosing screen.** Pass `--node` for the component you will actually build. A frame-level read counts the chrome behind a modal and over-reports — one measured work item scored 14 bound values at frame level and **zero** inside the modal subtree, and applying this rule changed 5 of 11 real work-item verdicts.
74
+
75
+ ### When the map cannot name what it saw
76
+
77
+ The probe reports `owner: "us"` when a `VariableID` is unknown (the map is stale) or ambiguous (two variables share a value). **Neither is the designer's fault** — those values ARE bound. Do not escalate them to design. Regenerate the map:
78
+
79
+ ```bash
80
+ FIGMA_ACCESS_TOKEN=… FIGMA_MCP_TOKEN=… \
81
+ node "${CLAUDE_PLUGIN_ROOT:-.}/scripts/design-variable-ids.mjs" \
82
+ --file <key> --light <nodes> --dark <nodes>
83
+ ```
84
+
85
+ Pass `--dark` wherever the library has a dark mode: the light+dark signature is what separates variables that share a value, and without it more ids stay ambiguous. An ambiguous id is still a failure — guessing which variable a value came from is exactly what this contract forbids.
86
+
87
+ ## Phase 3 — Gather findings
88
+
89
+ The probe already produced `hardcoded-in-design` and `bound` findings for every value in the subtree, with the two silent-under-reporting traps handled: the corner-keyed `rectangleCornerRadii` shape is normalised, and boundness is read from `boundVariables` directly rather than inferred from a resolved value (Figma omits zero-valued properties, so a padding bound to a zero-valued variable would otherwise vanish).
90
+
91
+ Add the findings the probe cannot see from a node payload — a named variable that does not exist, an unpublished component, a missing state, a source disagreement — plus the two non-blocking observations. **Findings are observations, not verdicts** — do not pre-judge them; the gate decides.
92
+
93
+ | `kind` | Emit when | Required fields |
94
+ |---|---|---|
95
+ | `bound` | A variable exists and the design binds it. The happy path. | `axis`, `component` |
96
+ | `hardcoded-in-design` | The frame paints a literal instead of binding a variable. | `axis`, `component`, `value` |
97
+ | `measured` | You read the value off the rendering rather than from a variable. | `axis`, `component`, `value` |
98
+ | `missing-token` | The item or frame names a variable the library does not publish. | `axis`, `component`, `name` |
99
+ | `unpublished-component` | The component lives in a draft or local file. | `component` |
100
+ | `missing-state` | A required state (disabled / error / loading / empty) has no design. | `component`, `state` |
101
+ | `source-disagreement` | The bound variable resolves to one value and the frame renders another. | `axis`, `component`, `tokenValue`, `frameValue` |
102
+ | `one-off` | A value that was never going to be shared — an illustration's exact offset. | `axis`, `component`, `value` |
103
+ | `aesthetic-concern` | You find the design ambiguous, unusual, or ugly, and every value you need is bound. | `component`, `note` |
104
+
105
+ Two of these rows carry most of the weight.
106
+
107
+ **`hardcoded-in-design` is the condition most often missed**, because nothing about the artifact looks wrong. The design is finished, the component renders, review sees a screenshot that matches — and the only symptom is that there is nothing to extract. Treating "I can see the value" as "I have the value" is precisely the failure this gate exists to catch.
108
+
109
+ **`aesthetic-concern` is a finding, not a block, and it must still be emitted.** Recording the observation without stopping on it is what keeps the gate from firing on opinion. If you find yourself reaching for a block because the design seems off rather than because a value is missing, that is an `aesthetic-concern` and the work proceeds.
110
+
111
+ Emit no finding kind outside this table. The gate throws on an unrecognised kind rather than inventing a verdict for facts it did not understand.
112
+
113
+ ## Phase 4 — Let the gate decide
114
+
115
+ Merge the probe's findings with your own, write them to a JSON payload, and run the gate. Do not reimplement the decision in prose — a verdict reasoned out fresh each time is a verdict that decides differently on Tuesday.
116
+
117
+ ```bash
118
+ node "${CLAUDE_PLUGIN_ROOT:-.}/scripts/design-intake-gate.mjs" --findings=design-facts.json --json
119
+ ```
120
+
121
+ Payload shape:
122
+
123
+ ```json
124
+ {
125
+ "config": { "design": { "escalation": { "assignee": "…", "label": "…" } } },
126
+ "regime": { "color": "typed", "spacing": "untyped" },
127
+ "findings": [ { "kind": "hardcoded-in-design", "axis": "color", "component": "Raised card", "value": "#3A7BD5" } ]
128
+ }
129
+ ```
130
+
131
+ Omit `config` to have the gate read the merged project config itself. Exit 0 = PROCEED, 1 = BLOCK, 2 = usage. **The gate fails closed**: an unreadable payload is a BLOCK with a named reason, never a quiet pass, because a gate that returns PROCEED on what it could not look at proves nothing.
132
+
133
+ ## Phase 5a — BLOCK
134
+
135
+ 1. **Post the comment.** Use `result.comment` **verbatim**. It is written for the non-technical operator standing at the gate: plain language, naming the specific missing artifact and what to do about it, with no factory vocabulary. Do not "improve" it into engineering terms — the vocabulary ban is enforced by the gate's own tests, and rewriting the comment is how it gets lost.
136
+
137
+ > The 'Raised card' component uses the colour #3A7BD5 directly rather than a colour variable. I need that colour published as a variable so the app and the design stay in sync — otherwise I'd be copying a number that changes without warning.
138
+
139
+ 2. **Transition to the configured `blocked` role** through `lisa-tracker-sync` / `lisa-tracker-write`. Never call a vendor label API directly — per `config-resolution`, Linear resolves `blocked` to a native workflow **state**, GitHub to a **label**, JIRA to a **status**, and hardcoding any one of them breaks the other two.
140
+
141
+ 3. **Assign to `result.assignee`.** If it is `null`, the `escalation-target-unset` condition is already in `result.blocks` and the comment says so — post it and leave the item unassigned. Do not substitute a person.
142
+
143
+ 4. **Add `result.label` as an additive marker** alongside the `blocked` role when one is configured, never instead of it. Add `human_needed` as well: a missing variable, an unpublished component, and a source disagreement all need a person to make a design decision, and none of them clear on a retry.
144
+
145
+ 5. **Stop.** Do not partially build the surfaces that were fine. Design decisions arrive together, and half a screen built against half a design is rework.
146
+
147
+ **Route by owner.** Only `owner: "design"` reaches a designer. A stale or ambiguous id is `owner: "us"` — regenerate the map (Phase 2) and re-run. Sending that to a designer is the wrong person and the wrong work, and it teaches them to ignore the next one.
148
+
149
+ ## Phase 5b — PROCEED
150
+
151
+ 1. **Record the derived values** from `result.derived` on the work item — axis, component, and value for everything measured in an untyped axis. This costs nothing now and accumulates into an inventory of what the variable system is missing, **ranked by what people actually needed**, which no design-system audit produces on its own.
152
+ 2. Build. In a **typed** axis, bind the variable and use a screenshot only to *verify*; a disagreement you find at that point is `source-disagreement` and sends the item back through this skill. In an **untyped** axis, measure — that is the correct source there.
153
+
154
+ The rule is never "do not look at pixels". It is **"do not derive a value from pixels when a binding exists."**
155
+
156
+ ## Contract
157
+
158
+ - **Block on unbound, never on unsure.** Every block traces to one of the eight conditions in `BLOCK_CONDITIONS`. If you cannot name the condition, it is not a block.
159
+ - **The regime is per-axis**, derived from the committed variable-id map. Never per-project, never asked of a human, and never from a live collection query — that route does not run headlessly.
160
+ - **A design source is optional.** No source, no token, or no map is SKIPPED at exit 0, never a block.
161
+ - **Every failure names an owner.** Unbound values are design's; a stale or ambiguous map is ours.
162
+ - **The threshold is 100%.** Relax it only with an explicit `--min` on the command line, never by softening anything in code.
163
+ - **Never guess an escalation target**, and never proceed without one.
164
+ - **Never pick a side in a disagreement.** Which source is right is a design decision.
165
+ - **Never name a person** in a comment, a commit, or any artifact. Config keys only.
166
+ - **Never work around missing design information.** Substituting a nearby value, inventing a state, or narrowing scope to dodge the gap are all forbidden — same standard as `tool-access-gate`.
167
+ - Host design-system rules (`figma-design-system`, `design-system`, `use-the-design-library`, or the project's equivalent) stay authoritative about *what* to build. This skill never overrides them.
168
+
169
+ Full policy: the `design-value-binding` rule.
@@ -157,6 +157,8 @@ For any Fix flow, and for any Build flow that changes user-visible behavior, reg
157
157
 
158
158
  For work that adds or changes a **UI surface**, the `design-source-of-truth` rule adds a second non-demotable deliverable landing in this same PR: every UI surface the change touches declares where its design came from. Figma is the source of truth, so **prefer sync-back** — if the surface is not in Figma yet and the tool-access preflight proved Figma access, reflect it there and cite the node with `DESIGN-SOURCE: <figma-url>`. Only when the surface genuinely does not belong in the design source (debug affordance, dev-only playground, internal tooling) does it carry the exception marker `DESIGN-SOURCE: none — not in Figma`, ideally with a trailing reason. `scripts/design-source-gate.mjs` decides this deterministically and fails closed on anything it cannot resolve; a FAIL blocks the item exactly as a failing coverage gate does. Host design-system rules (`figma-design-system`, `design-system`, `use-the-design-library`, or the project's equivalent) stay authoritative about *what* to build — this obligation is only about declaring the source. Cite the rule; do not restate its marker grammar, host-precedence, or bootstrap mechanics here.
159
159
 
160
+ The `design-value-binding` rule adds a second, orthogonal obligation on the same surfaces: **values come from design variables where a variable system exists.** That contract asks whether the values are *bound*, not whether the source is *declared* — a surface can cite a valid design node and still paint a literal no variable backs. Resolve the regime per axis, block only on the five objectively checkable conditions, and record every value derived in an untyped axis on the work item. `/lisa:design:intake` runs it. Cite the rule; do not restate its conditions, config schema, or comment grammar here.
161
+
160
162
  For work that adds or changes **persistent state**, the `reset-seed-coverage` rule adds a third non-demotable deliverable landing in this same PR: every entity the item introduces or changes is classified in the project's state contract (`fixture-owned` / `preserve` / `derived-rebuild` / `forbidden`) with a reason and an owner, anything `fixture-owned` declares its ownership predicate and is actually swept, and the state-classification check passes. Writing a flow that creates a record and deletes it only on its happy path does NOT satisfy this — that is the leak, not the coverage. Cite the rule; do not restate its policy, waiver, or bootstrap mechanics here.
161
163
 
162
164
  The team lead may not waive, defer, demote, or phrase this regression spec as "optional", "if cheap", "nice to have", or equivalent. The only permitted exits are:
@@ -24,6 +24,8 @@ For each changed file, evaluate:
24
24
 
25
25
  Exit 1 is a **Critical** finding under the `design-source-of-truth` rule -- the change is blocked until every UI surface either cites a Figma node (`DESIGN-SOURCE: <figma-url>`, the preferred fix -- sync it back) or carries the exception marker `DESIGN-SOURCE: none — not in Figma`. The gate fails closed: an unreadable file or an uncomputable diff is a FAIL, not a pass. Host design-system rules (`figma-design-system`, `design-system`, `use-the-design-library`, or the project's equivalent) stay authoritative about what to build; this checks only that the source is declared. If the gate script is absent, say so in the review rather than skipping silently.
26
26
 
27
+ Review the same surfaces against the `design-value-binding` rule as well — it asks the orthogonal question of whether each value is *bound* to what the design system publishes, not whether the source is declared. A literal in an axis the project publishes variables for is a **Critical** finding; the identical literal in an axis with no variable collection is correct and must not be flagged. Aesthetic disagreement is never a finding under this rule. Cite the rule; do not restate its conditions here.
28
+
27
29
  ## Output Format
28
30
 
29
31
  Rank findings by severity:
@@ -41,6 +41,15 @@ asks whether the source is declared. If the gate script is not present (the
41
41
  project predates the plugin version that ships it), say so explicitly in the
42
42
  review — a silent skip is not one of the exits.
43
43
 
44
+ **Design-value binding (`design-value-binding` rule).** A separate, orthogonal
45
+ question about the same surfaces: not *is the source declared* but *are the
46
+ values bound*. In an axis the project publishes design variables for, a literal
47
+ is a **blocking** finding — it is a copied number that will drift when the
48
+ system moves. In an axis with no variable collection, the identical literal is
49
+ correct and must not be flagged; measuring is the legitimate source there, and
50
+ the derived values belong on the work item. Aesthetic disagreement is never a
51
+ finding under this rule. Cite the rule; do not restate its conditions here.
52
+
44
53
  To do this, follow these steps precisely:
45
54
 
46
55
  1. Use a Haiku agent to check the current git state:
@@ -72,6 +72,7 @@ TDD Cycle:
72
72
  - Write the minimum production code to make the test pass
73
73
  - Do not optimize, do not add features beyond what the test requires
74
74
  - For any UI surface the implementation adds or changes, the `design-source-of-truth` rule requires its design-source declaration to land in the same commit as the surface it describes — `DESIGN-SOURCE: <figma-url>` when the surface is backed by a Figma node (sync it back first if Figma access exists), or the exception marker `DESIGN-SOURCE: none — not in Figma` when it genuinely is not captured at the source. `scripts/design-source-gate.mjs` fails closed on an undeclared surface. Cite the rule; do not restate its marker grammar here.
75
+ - Separately, the `design-value-binding` rule governs where each *value* on that surface came from: in an axis with a published variable collection, bind the variable and use a screenshot only to verify; in an axis with none, measure and record what you derived. A literal in a typed axis is a block, not a TODO. Cite the rule; do not restate its conditions here.
75
76
  - The goal is the simplest code that makes the test green
76
77
 
77
78
  ### REFACTOR Phase
@@ -2169,6 +2169,22 @@ function sleep(ms) {
2169
2169
  /** GitHub's remaining-quota response header, read from three call sites. */
2170
2170
  const RATELIMIT_REMAINING_HEADER = "x-ratelimit-remaining";
2171
2171
 
2172
+ /**
2173
+ * The `accept` value that selects GitHub's versioned REST media type.
2174
+ *
2175
+ * Named because it is a wire contract shared by every request this file makes:
2176
+ * send a different one and the API answers with a different response shape,
2177
+ * which every parser below would then misread rather than reject.
2178
+ */
2179
+ const GITHUB_ACCEPT = "application/vnd.github+json";
2180
+
2181
+ /**
2182
+ * The `user-agent` GitHub sees. GitHub requires one, and this value is how a
2183
+ * request from this check is told apart from any other Lisa traffic in an
2184
+ * audit log — so it is one string, not three that can drift apart.
2185
+ */
2186
+ const HEALTH_USER_AGENT = "lisa-nightly-e2e-health";
2187
+
2172
2188
  /**
2173
2189
  * How long to wait before retrying a throttled response, bounded.
2174
2190
  *
@@ -2211,10 +2227,10 @@ export async function apiGet(api, path, wait = sleep) {
2211
2227
  try {
2212
2228
  response = await fetch(`${api.apiUrl}${path}`, {
2213
2229
  headers: {
2214
- accept: "application/vnd.github+json",
2230
+ accept: GITHUB_ACCEPT,
2215
2231
  authorization: `Bearer ${api.token}`,
2216
2232
  "x-github-api-version": "2022-11-28",
2217
- "user-agent": "lisa-nightly-e2e-health",
2233
+ "user-agent": HEALTH_USER_AGENT,
2218
2234
  },
2219
2235
  });
2220
2236
  } catch (error) {
@@ -2523,11 +2539,11 @@ export async function apiWrite(api, method, path, payload, wait = sleep) {
2523
2539
  response = await fetch(`${api.apiUrl}${path}`, {
2524
2540
  method,
2525
2541
  headers: {
2526
- accept: "application/vnd.github+json",
2542
+ accept: GITHUB_ACCEPT,
2527
2543
  authorization: `Bearer ${api.token}`,
2528
2544
  "content-type": "application/json",
2529
2545
  "x-github-api-version": "2022-11-28",
2530
- "user-agent": "lisa-nightly-e2e-health",
2546
+ "user-agent": HEALTH_USER_AGENT,
2531
2547
  },
2532
2548
  body: JSON.stringify(payload),
2533
2549
  });
@@ -2600,10 +2616,10 @@ export async function setIssuePin(api, nodeId, pinned) {
2600
2616
  const response = await fetch(api.graphqlUrl ?? `${api.apiUrl}/graphql`, {
2601
2617
  method: "POST",
2602
2618
  headers: {
2603
- accept: "application/vnd.github+json",
2619
+ accept: GITHUB_ACCEPT,
2604
2620
  authorization: `Bearer ${api.token}`,
2605
2621
  "content-type": "application/json",
2606
- "user-agent": "lisa-nightly-e2e-health",
2622
+ "user-agent": HEALTH_USER_AGENT,
2607
2623
  },
2608
2624
  body: JSON.stringify({
2609
2625
  query: `mutation($id: ID!) { ${mutation}(input: {issueId: $id}) { issue { number } } }`,
@@ -220,8 +220,17 @@ export const SNAPSHOT_MAX_AGE_DAYS = 90;
220
220
  * `[ \t]` rather than `\s`: this matches one already-split LINE, so `\s`'s
221
221
  * newline class buys nothing and three adjacent `\s*` runs give a backtracking
222
222
  * engine work to do for no gain.
223
+ *
224
+ * The capture is `(?:\S.*)?` rather than `.*` for the same reason, one step
225
+ * further. `[ \t]*(.*)` lets both halves claim the same run of spaces, so the
226
+ * engine has a choice to make at every one of them and the match is
227
+ * super-linear in the line's length — S5852, on lines that arrive from a
228
+ * workflow file. Requiring the capture to OPEN on a non-space makes the two
229
+ * halves disjoint, so there is nothing to choose and nothing to give back. An
230
+ * all-whitespace tail still captures the empty string, exactly as before,
231
+ * because `[ \t]*` has already eaten it.
223
232
  */
224
- const SKIP_JOBS_LINE = /^[ \t]*skip_jobs[ \t]*:[ \t]*(.*)$/;
233
+ const SKIP_JOBS_LINE = /^[ \t]*skip_jobs[ \t]*:[ \t]*((?:\S.*)?)$/;
225
234
 
226
235
  /** Matches the tail permitted after a quoted scalar's closing quote. */
227
236
  const TRAILING_COMMENT_ONLY = /^\s*(?:#.*)?$/;