Skip to content

feat(prompts): align with Claude Design conventions (empty EDITMODE, 9-token palette, 2-font default, animation cap, Fraunces for marketing)#110

Closed
hqhq1025 wants to merge 1 commit intowt/progressive-promptfrom
wt/prompt-claude-design-align
Closed

feat(prompts): align with Claude Design conventions (empty EDITMODE, 9-token palette, 2-font default, animation cap, Fraunces for marketing)#110
hqhq1025 wants to merge 1 commit intowt/progressive-promptfrom
wt/prompt-claude-design-align

Conversation

@hqhq1025
Copy link
Copy Markdown
Collaborator

Five small content updates that align our system prompt with patterns extracted from real Claude Design output (research docs §1.2, §2, §6, §11.3, §11.4).

Changes

  1. EDITMODE protocol — empty {} block valid (research §11.4). Documents that an empty marker block is a valid signal to the host that the artifact is tweak-aware.
  2. Design methodology — token density (research §1.2). New subsection: aim for 9 ± 3 oklch tokens per artifact, declared as a flat object.
  3. Craft directives — Typography ladder (research §2). Default to two font families (display + workhorse sans). Mono is on-demand only — not part of the default ladder.
  4. Craft directives — Animation budget (research §6). New subsection capping CSS keyframes at four named animations: fadeUp, breathe, pulse-ring, spin, with staggered animation-delay.
  5. Progressive disclosure — Marketing font hint (research §11.3). New marketingFontHint Layer 2 section + routing in composeCreateProgressive. Marketing/landing/case-study prompts now surface a Fraunces preference reminder (~150 chars).

Tests

  • +1 marketing prompt includes Fraunces hint
  • +1 dashboard prompt does NOT include Fraunces hint
  • Existing drift test auto-handles the new section (PROMPT_SECTIONS / PROMPT_SECTION_FILES both updated; one new marketing-font-hint.v1.txt)
  • 161 → 163 tests, all green

Verification

  • pnpm --filter @open-codesign/core test ✅ 163/163
  • pnpm --filter @open-codesign/core typecheck
  • pnpm exec biome check packages/core/src/prompts/ packages/core/src/generate.test.ts

PRINCIPLES §5b checks

  • Compatibility ✅ — additive only, no schema/contract changes
  • Upgradeability ✅ — sections registered in PROMPT_SECTIONS map, drift test enforces .txt/TS parity
  • No bloat ✅ — marketing hint only ships when keyword matches; budget for matched dashboard prompt still <25 KB
  • Elegance ✅ — content edits + one routing line; no abstractions added

Five small content updates extracted from real Claude Design output
analysis (research docs §1.2, §2, §6, §11.3, §11.4):

- EDITMODE: document empty `{}` block as valid (tweak-aware signal)
- Design methodology: 9 ± 3 oklch token density target
- Craft directives: 2-font default (mono on-demand only)
- Craft directives: 4-animation CSS keyframe budget
- Progressive disclosure: marketing prompts surface Fraunces hint

New `marketingFontHint` section + Layer 2 routing in
`composeCreateProgressive` triggers on KEYWORDS_MARKETING. Drift test
auto-handles the new section via PROMPT_SECTIONS / PROMPT_SECTION_FILES
maps. +2 tests for Fraunces inclusion / exclusion.
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • No high-confidence issues found in added/modified lines.

Summary

  • Review mode: initial
  • No issues identified in this diff.
  • Constraint checks on touched files: no new dependencies/licenses introduced, no direct provider SDK imports, no hardcoded UI-token violations in app code, and no silent-fallback patterns introduced.
  • Not found in repo/docs: docs/VISION.md, docs/PRINCIPLES.md.

Testing

  • Not run (automation)

open-codesign Bot

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