Skip to content

feat(recipes): a group inside a group is spaced more tightly than the gaps around it - #322

Merged
briangraves merged 1 commit into
mainfrom
feat/recipe-spacing
Oct 5, 2026
Merged

briangraves merged 1 commit into
mainfrom
feat/recipe-spacing

Conversation

@briangraves

Copy link
Copy Markdown
Contributor

forumone-2026#847. Composed sections are built by an agent choosing one Stack's gap at a time. The one mistake that choice can make on its own is breaking proximity: a column's heading and text spaced as widely as the columns themselves. The section then reads as an even list of lines.

lintRecipe gains spacing.rhythm: a layout nested in one of the same kind must use a smaller gap than the one around it. That's a Stack in a Stack, or a Cluster in a Cluster. The message names the gap to shrink and the usual value: "a heading and its text are usually spacing-2". Gaps compare by their step on the scale (the number in spacing-N), using the primitive's default when none is given. A Cluster's gap runs across and a Stack's down, so different kinds aren't compared.

It's an error, so:

  • compose_section refuses such a recipe;
  • the publish gate, which re-lints approved recipes, would stop one that breaks it. forumone-2026 has one recipe, a draft, and it passes: 48px outside, 16px inside.

Tests: 4 new cases in lint.test.ts (passes when tighter; refuses equal, wider, and wider by default). The package has 382 tests.

Prettier wasn't run on lint.ts or lint.test.ts: both had format drift before this change, and reformatting would bury the diff.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sh7Rh2zPq3etuniocxscF5

… gaps around it

forumone-2026#847. A composed section whose column heading-to-text gap is as
wide as the gaps between the columns reads as an even list of lines. lintRecipe
now refuses a Stack in a Stack (or a Cluster in a Cluster) whose gap is not
smaller than the one around it, naming the gap to make smaller. Gaps compare by
their step on the spacing scale; only the same kind is compared, since a
Cluster's gap runs across and a Stack's down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sh7Rh2zPq3etuniocxscF5
@briangraves
briangraves merged commit b2ac71b into main Oct 5, 2026
6 checks passed
@briangraves
briangraves deleted the feat/recipe-spacing branch October 5, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant