Skip to content

Style presets are references, not templates - #48

Merged
ZLHad merged 3 commits into
mainfrom
claude/style-as-reference
Oct 2, 2026
Merged

ZLHad merged 3 commits into
mainfrom
claude/style-as-reference

Conversation

@ZLHad

@ZLHad ZLHad commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Why

The maintainer wants presets to be examples that agents learn from and combine freely, not templates they execute: "预设样式只是一些模版参考,让Agents自由学习组合并参考". They approved the first of three proposed changes: change how a preset enters a project.

How it worked before:

  • --style copied the preset into the project as STYLE_PRESET.md.
  • It pasted the preset's prompt block into the BRIEF as instructions.
  • It opened the project's STYLE.md with "以风格预设为底…下面只写本片对预设的改动".

Research note 06 shows the cost. A workflow agent that borrowed ink-wash had to log three "taste overrides" just to depart from it.

What changes

bin/vh new --style a,b and bin/vh style apply a,b <project> attach one or more presets as references:

  • copies go in style-refs/<preset>/ (STYLE.md, tokens.json);
  • the BRIEF gets a Style refs (repo presets) line listing them;
  • STYLE.md gets a note at the top: references only, departing from them needs no explanation, the film's style comes from its concept;
  • DECISIONS.md gets one 风格参考 line per preset, to fill in with what it lends.

Nothing is pasted into the BRIEF. Attaching the same preset again adds nothing. An old pasted ## Style preset block is removed when a project is touched again.

CI checks that two presets attach side by side, without repeats, and with nothing pasted.

Docs:

  • Presets leave the list of taste defaults that need an override line (CLAUDE.md, playbook 12 §1 and §6).
  • The quick card, playbook 01 stage 2, the concept card's 画面 line, styles/README.md's how-to and the template's prompt-block note now describe presets as references.
  • Mixing presets is allowed; the warning about stacking two textures stays as advice.
  • Both READMEs now say "reference".

Not in this PR (not approved yet):

  • a short "要点" section at the top of every preset;
  • restructuring the existing STYLE.md files.

Checks

  • tools/ci.sh --committed (also with VH_BASH=/bin/bash): all passed.
  • Manual check: bin/vh new math x --style dark-math,blueprint writes both references, the note and two DECISIONS lines.

ZLHad added 2 commits October 2, 2026 15:03
new --style a,b and style apply a,b attach presets as references: copies in
style-refs/<preset>/, a Style refs line in the BRIEF, a note atop STYLE.md and a
DECISIONS line per preset for what it lends. Nothing is pasted into the BRIEF;
re-attaching adds nothing; departing from a preset needs no override line.
Docs (CLAUDE.md, playbooks 01 and 12, styles/README, the template, READMEs)
follow.
An old project's base preset (STYLE_PRESET.md) moves to style-refs/ and stays
listed first instead of being dropped. Preset names go through parse_styles:
lower-case slugs of a preset only (no paths, no _swatch, no glob, no empty
list), so the summary line is built from the parsed names. A missing
DECISIONS.md is created. CI runs a comma list in one call, the migration and
bad names anywhere in a list. recipes/README's precedence counts what is
borrowed only once it is in the project's STYLE.md; anything borrowed that
touches a non-floor checklist item is still an override; the quick card says
to look through style-refs/; README wording and command tables; CHANGELOG.
@ZLHad
ZLHad marked this pull request as ready for review October 2, 2026 07:13
@ZLHad
ZLHad enabled auto-merge (squash) October 2, 2026 07:13
… locale in bash 3.2 and matched Dark-Math on the macOS runner)
@ZLHad
ZLHad merged commit 572d7a8 into main Oct 2, 2026
2 checks passed
@ZLHad
ZLHad deleted the claude/style-as-reference branch October 2, 2026 07:28
ZLHad added a commit that referenced this pull request Oct 4, 2026
bin/vh new --style a,b and bin/vh style apply a,b attach presets as references: copies in style-refs/<preset>/, a Style refs line in the BRIEF, a note atop STYLE.md, a DECISIONS line per preset for what it lends; nothing pasted into the BRIEF; re-attaching adds nothing; an old project's base preset becomes a reference. Departing from a preset needs no override line (borrowing something that touches a non-floor checklist item still does). Names are validated as preset slugs. Docs follow.
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