Text Measure Guardrails
Hold long-form text to a readable line length instead of letting it run the full width.
What it adds
A maximum measure applied to the app's prose containers, with named exceptions for content that needs the whole width.
What your agent is told to do
5
What your agent is told to do
5-
1
Find every surface that renders more than a couple of sentences — help articles, changelog entries, terms pages, long empty-state explanations, in-app announcements — and cap the measure on the text container itself rather than on the page shell.
-
2
Express the cap in units that scale with the type, so a larger heading or a user who has raised their base font size gets a proportionally wider column instead of a cramped four-word line.
-
3
Declare which elements are allowed to break out of the measured column — tables, code blocks, images, video, diagrams, full-bleed callouts — and let them span the container while the paragraphs around them stay narrow.
-
4
Do not centre long-form copy to make the narrow column look deliberate. A ragged left edge makes the eye hunt for the start of every line, which is the cost the measure was meant to remove.
-
5
Keep this entry to width only. Text Wrapping Rules owns what happens inside a line — where it breaks, when it truncates, how it hyphenates — so the two briefs do not both try to define overflow behaviour.
Edge cases it handles
7
Edge cases it handles
7- Tables, code samples, and media that are forced into the prose measure become unreadable or scroll horizontally. Let them break out to the container width while the surrounding paragraphs stay capped.
- A measure tuned for body text is too narrow for large display type and too wide for small print. Adjust the cap per step of the type scale rather than applying one number to everything.
- Centred long-form paragraphs cost the reader a fixation on every line return. Reserve centring for single lines such as a page title or an empty-state message.
- The cap must be a maximum, not a fixed width. On a narrow viewport the column has to shrink and keep its gutters, or the text runs into the screen edge.
- Nested containers that each apply the cap compound it and produce a column half the intended width. Apply the measure once, at the outermost prose wrapper.
- In right-to-left locales the column must align to the right edge, not stay pinned left.
- A user who zooms the browser or enlarges their default font must get fewer characters per line, not a horizontally scrolling page.
Definition of done
8
Definition of done
8- Every long-form surface renders its paragraphs within a bounded measure rather than the full page width.
- The measure scales with the type size instead of being a single fixed value across the app.
- Tables, code blocks, and media render at the container width while adjacent paragraphs stay measured.
- No long-form body copy is centred.
- On narrow viewports the column shrinks and retains its gutters, with no horizontal scrolling.
- Nesting two prose containers does not halve the column width.
- The feature matches the existing design system.
- No existing functionality is broken.
Related features
Z-Index Registry
Z-Index Registry
Keep every stacking value in one file so nobody has to guess a bigger number.
What it does
A single source of named z-index tokens, with reserved ranges per layer and a check that blocks raw values.
How it works
- 1 Find every z-index in the codebase, including inline styles and values buried in third-party overrides, and list them with the component that owns each. The count is usually higher than anyone expects and several will be arbitrary large numbers.
- 2 Reserve a range for each layer rather than assigning single values, so a new dropdown can slot between existing ones without renumbering everything above it. Leave real gaps between ranges.
- 3 Name each token after the layer it belongs to and derive the ordering from Elevation Layer Map. That feature decides what covers what; this one holds the numbers and stops them being invented locally.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/z-index-registry
Spacing Scale
Spacing Scale
Reduce the app's spacing to a small set of steps that repeat across every surface.
What it does
A named spacing scale covering gaps, padding, and section rhythm, with every existing value in the app mapped onto it.
How it works
- 1 Collect every spacing value currently in the codebase and count how often each appears. The result is usually a handful of genuine intentions surrounded by dozens of near-misses that were nudged once and never revisited.
- 2 Define a scale that is fine at the small end, where control padding lives, and coarse at the large end, where section separation lives. A linear scale gives too many indistinguishable large steps and too few small ones.
- 3 Separate the tokens used inside a component from the ones used between components and between page sections, and name them so the difference is obvious. The same number serving both purposes means a change to button padding also changes the gap between sections.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/spacing-scale
Shadow Scale
Shadow Scale
Replace ad hoc shadows with a small set tied to what each surface actually is.
What it does
A fixed ladder of shadow tokens, each named for an elevation role rather than a blur radius.
How it works
- 1 Collect every shadow currently declared anywhere in the app and group them by what they sit on — a resting card, a hovered card, a dropdown, a dialog, a toast. Most apps have a dozen near-identical values that collapse into four or five roles.
- 2 Name each step for its role, not its appearance. A token called menu tells the next person which surfaces may use it; a token called shadow-md-2 does not.
- 3 Use a single light source for the whole scale, so offset, blur, and spread grow together as elevation rises. Two shadows lit from different directions on the same screen read as a rendering bug.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/shadow-scale
How it works
-
1
Copy the link
Grab the Markdown instruction URL for this feature.
-
2
Give it to your AI
Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.
-
3
It inspects, then implements
Your agent reads your existing app first, then adds the feature to fit it.
Works with your stack
These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.
Need it tighter than that? Customize the feature and tell it exactly what you're running.