Skip to content

Cross-generation similarity: the fingerprint the log never read - #97

Open
muditagrawal2007 wants to merge 2 commits into
Nutlope:mainfrom
muditagrawal2007:feat/cross-generation-similarity
Open

muditagrawal2007 wants to merge 2 commits into
Nutlope:mainfrom
muditagrawal2007:feat/cross-generation-similarity

Conversation

@muditagrawal2007

@muditagrawal2007 muditagrawal2007 commented Oct 27, 2026 •

Copy link
Copy Markdown

Closes #28.

The issue

references/gates.md gate 32 and references/macrostructures.md § The fingerprint say the same thing:

no more than three of six axes shared with any of the last three logged entries

and scripts/theme.mjs log has required a fingerprint field since v2. But nothing ever read it. The field was written to .hallmark/log.json and never compared with anything. So the one defence against a second page that reads like the first was a sentence in a reference file, checked from memory, by a model that will not remember.

theme.mjs had the pieces and none of the join. It compared a theme's three axes (paper, display, accent) against the log, and it compared the shape, hero, nav and footer by substring. The field that carries the page's actual structure was inert.

#28 asks for a cross-generation similarity check. This is that check, wired into the three places a build touches the log.

The solution

The fingerprint, made readable. theme.mjs now knows the six axes and the vocabulary each one answers in, taken from macrostructures.md § The fingerprint. Every one of the twenty-one shape files states its own fingerprint as one line, so a shape is a fingerprint with a name:

**Fingerprint:** `Hanging|Asymmetric spans|Negative space|Outlined|Tightly cropped to the grid|None`

check --fingerprint measures a plan against the last three logged builds, names the axes they share and exits 1 when more than three are shared.

the check, against three builds in the log

log refuses a build whose fingerprint is already logged, and warns when more than three axes are shared. A redesign keeps the fingerprint it has.

the log refuses a repeat

draw keeps clear of a shape that repeats a logged fingerprint, and states the fingerprint of the shape it deals, so the value reaches the stamp and the log entry.

theme.mjs fingerprint prints the six axes and the twenty-one shapes, so a build can read the ruler it is measured against.

The rule the docs already state is now the rule the tool runs: a None on Image or Reveal is the absence of a choice, not a choice, so it never counts as a shared axis.

The tests

theme.mjs had no automated coverage at all. This adds the first suite in the repo, on Node's built-in runner, no dependency: skills/hallmark/scripts/tests/theme.test.mjs, seventeen tests.

the fingerprint command names six axes and the twenty-one shapes the shape map is complete
the vocabulary in the code is the vocabulary in macrostructures.md the two cannot drift
every shape file states a fingerprint the code can read all twenty-one, each one parseable
a fingerprint that is not one choice per axis is refused the format holds
a value from the wrong axis is refused Marginalia is not a heading
the check names the axes a fingerprint shares with a logged build the report says what repeats
the check passes a fingerprint that is clear of the last three builds no false alarms
a None on Image or Reveal is the absence of a choice, not a shared one the exception in the docs
a build never logs a fingerprint that is already logged the refusal
a build logs a fingerprint that shares more than three axes, but says so the warning
a redesign may keep the fingerprint it has a polish is not a new page
a fingerprint that is not a fingerprint is never logged nothing malformed is written
the draw states the fingerprint of the shape it deals the value reaches the log entry
the draw keeps clear of a shape that repeats a logged fingerprint the avoidance, across sixty seeds
the deal still avoids the last three themes no regression
a log the tool cannot read is refused, and nothing is written no clobbering
every shape the draw can deal is in the shape map the pools and the files agree

refcheck holds three things in step now: the vocabulary in the code, the vocabulary in macrostructures.md, and the twenty-one shape files. Change one and it says which.

CI runs both:

- name: The tool holds to its own rules
  run: node --test skills/hallmark/scripts/tests/*.test.mjs

npm test and npm run verify are new.

Notes for the reviewer

  • The shape fingerprints are the shapes' defaults, not a rule. A page that bends an axis bends it on purpose, and the log carries the page's own fingerprint. The assignment is mine, read off each shape file's own six bullets; correcting one is a one-line change and refcheck will keep the file honest either way.
  • theme.mjs check keeps its --axes, --face and --hue behaviour. --fingerprint is a new branch, and it exits 1 when it is over the limit so a build script can act on it.
  • The refusal is deliberately narrow. An identical fingerprint is refused outright; anything over three shared axes is a warning, because gate 32 is a judged tier and a mechanical block would make some legitimate builds impossible to log.
  • Nothing in site/ changed, and the skill's own sweep over the showcase is unchanged at 2 FAIL / 10 REFLEX (those are pre-existing, in site/style.css).

Note for the reviewer: GitHub holds the workflow on a first-time contributor's fork until a maintainer approves it. The three CI steps pass locally: refcheck clean across 101 reference files, 17 of 17 tests, every theme validates, the theme index unchanged.

🤖 Generated with Claude Code

Gate 32 and macrostructures.md both say a build may share no more than three of
the six fingerprint axes with any of the last three logged entries, and theme.mjs
log has required a fingerprint field since v2. But nothing ever read it: the
field was written and never compared, so the one defence against a second page
that looks like the first was a sentence in a reference file, checked by memory.

Issue Nutlope#28 asks for a cross-generation similarity check. This is it.

- theme.mjs reads the six axes and their vocabulary, and every shape file now
  states its own fingerprint, so a shape is a fingerprint with a name.
- theme.mjs check --fingerprint measures a plan against the last three logged
  builds, names the axes they share and exits 1 when more than three are shared.
- theme.mjs log refuses a build whose fingerprint is already logged, and warns
  when more than three axes are shared; a redesign keeps the fingerprint it has.
- theme.mjs draw keeps clear of a shape that repeats a logged fingerprint, and
  states the fingerprint of the shape it deals.
- theme.mjs fingerprint prints the axes and the twenty-one shapes.
- refcheck holds the vocabulary in the code, the vocabulary in the docs and the
  twenty-one shape files in step.
- The first test suite in the repo: seventeen tests over the fingerprint, the
  log and the draw, on the built-in runner, in CI.
@vercel

vercel Bot commented Oct 27, 2026

Copy link
Copy Markdown

@muditagrawal2007 is attempting to deploy a commit to the Together AI Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

Cross-Generation Design Similarity Detection

1 participant