Style presets are references, not templates - #48
Merged
Merged
Conversation
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
marked this pull request as ready for review
October 2, 2026 07:13
ZLHad
enabled auto-merge (squash)
October 2, 2026 07:13
… locale in bash 3.2 and matched Dark-Math on the macOS runner)
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
--stylecopied the preset into the project asSTYLE_PRESET.md.Research note 06 shows the cost. A workflow agent that borrowed
ink-washhad to log three "taste overrides" just to depart from it.What changes
bin/vh new --style a,bandbin/vh style apply a,b <project>attach one or more presets as references:style-refs/<preset>/(STYLE.md, tokens.json);Style refs (repo presets)line listing them;风格参考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 presetblock is removed when a project is touched again.CI checks that two presets attach side by side, without repeats, and with nothing pasted.
Docs:
styles/README.md's how-to and the template's prompt-block note now describe presets as references.Not in this PR (not approved yet):
Checks
tools/ci.sh --committed(also withVH_BASH=/bin/bash): all passed.bin/vh new math x --style dark-math,blueprintwrites both references, the note and two DECISIONS lines.