Refactor project name from "Open Claude Design" to "Open Design" (#1)

* Refactor project name from "Open Claude Design" to "Open Design"

- Updated project name in package.json, package-lock.json, and README files.
- Changed CLI commands and references from "ocd" to "od".
- Adjusted file structure references in documentation and code to reflect new naming conventions.
- Enhanced .gitignore to include new runtime data files.
- Updated metadata in LICENSE file to match new project name.

* Add contributing guidelines in English and Chinese

- Introduced CONTRIBUTING.md and CONTRIBUTING.zh-CN.md to provide clear instructions for contributors.
- Outlined contribution types, local setup instructions, and merging criteria for skills and design systems.
- Enhanced README files to reference the new contributing guidelines.
This commit is contained in:
Tom Huang
2026-04-28 16:03:35 +08:00
committed by GitHub
parent a98096a042
commit 6f6bf31dd2
131 changed files with 2560 additions and 650 deletions
+5 -5
View File
@@ -26,7 +26,7 @@
* Drift fixes baked in:
* - `transform-origin: top left` and the stage is positioned by grid +
* place-items, so scaling never shifts content sideways inside the
* OCD viewer's nested transform wrapper.
* OD viewer's nested transform wrapper.
* - Capture-phase keydown on BOTH window and document so iframe focus
* quirks can't swallow arrow keys.
* - Auto-focus body on load and on every click.
@@ -242,7 +242,7 @@ export const DECK_SKELETON_HTML = `<!doctype html>
// The stage is 1920×1080 and positioned by .deck-shell's
// \`display:grid;place-items:center\`. We scale via transform with
// transform-origin:top-left, then re-center by translating to the
// remainder. This survives nested transforms (e.g. when the OCD viewer
// remainder. This survives nested transforms (e.g. when the OD viewer
// wraps the iframe in its own scale wrapper at zoom != 100%).
function fit() {
var sw = window.innerWidth;
@@ -277,7 +277,7 @@ export const DECK_SKELETON_HTML = `<!doctype html>
else if (e.key === 'Home') { e.preventDefault(); go(0); }
else if (e.key === 'End') { e.preventDefault(); go(slides.length - 1); }
}
// Capture phase + listen on both targets — inside the OCD iframe,
// Capture phase + listen on both targets — inside the OD iframe,
// focus may be on window OR document; a single non-capture listener
// silently misses presses.
window.addEventListener('keydown', onKey, true);
@@ -328,7 +328,7 @@ You may edit only inside slots marked \`SLOT:\`:
These are the failure patterns we just spent days debugging. Each one looks "equivalent" but breaks something specific:
- ❌ Don't write your own \`fit()\` function or \`transform: scale()\` script. The framework already does it, and ad-hoc versions drift inside the OCD viewer's nested transform wrapper.
- ❌ Don't write your own \`fit()\` function or \`transform: scale()\` script. The framework already does it, and ad-hoc versions drift inside the OD viewer's nested transform wrapper.
- ❌ Don't use \`transform-origin: center center\` on the stage. The framework uses \`top left\` plus an explicit translate so scaled content lands at the same place every render.
- ❌ Don't use \`document.addEventListener('keydown', …)\` alone. Inside an iframe, focus is sometimes on window. The framework adds capture-phase listeners on **both** targets — replacing this with a single listener silently swallows arrow keys.
- ❌ Don't replace the localStorage key, the slide-visibility toggle (\`.slide.active\`), or the counter element IDs (\`#deck-cur\`, \`#deck-total\`, \`#deck-prev\`, \`#deck-next\`). The framework reads them by ID.
@@ -338,7 +338,7 @@ These are the failure patterns we just spent days debugging. Each one looks "equ
## Why this matters (so you can judge edge cases)
The framework is a contract with the host viewer. The OCD iframe sits inside a transformed wrapper (the zoom control); the keyboard handler needs capture phase + dual targets; "Share → PDF" reads the print stylesheet; the position survives reloads via localStorage. If a turn rewrites any of these — even with "equivalent" code — the next turn diverges, and three turns in the deck has subtly broken nav and a one-page PDF. Treat the framework as load-bearing infrastructure.
The framework is a contract with the host viewer. The OD iframe sits inside a transformed wrapper (the zoom control); the keyboard handler needs capture phase + dual targets; "Share → PDF" reads the print stylesheet; the position survives reloads via localStorage. If a turn rewrites any of these — even with "equivalent" code — the next turn diverges, and three turns in the deck has subtly broken nav and a one-page PDF. Treat the framework as load-bearing infrastructure.
If the user asks for something the framework genuinely doesn't support (vertical decks, custom slide transitions, multi-column simultaneous slides), say so and ask before forking. **Default answer: keep the framework, change the slide content.**
+2 -2
View File
@@ -2,7 +2,7 @@
* Discovery + planning + huashu-philosophy directives.
*
* This is the dominant layer of the composed system prompt. It stacks
* BEFORE the official OCD designer prompt so the hard rules below — emit
* BEFORE the official OD designer prompt so the hard rules below — emit
* a discovery form on turn 1, branch into a direction picker / brand
* extraction on turn 2, plan with TodoWrite on turn 3 — beat the softer
* "skip questions for small tweaks" wording in the base prompt.
@@ -23,7 +23,7 @@
*/
import { renderDirectionFormBody, renderDirectionSpecBlock } from './directions';
export const DISCOVERY_AND_PHILOSOPHY = `# OCD core directives (read first — these override anything later in this prompt)
export const DISCOVERY_AND_PHILOSOPHY = `# OD core directives (read first — these override anything later in this prompt)
You are an expert designer working with the user as your manager. You produce design artifacts in HTML — prototypes, decks, dashboards, marketing pages. **HTML is your tool, not your medium**: when making slides be a slide designer, when making an app prototype be an interaction designer. Don't write a web page when the brief is a deck.
+2 -2
View File
@@ -1,8 +1,8 @@
/**
* The base system prompt for Open Claude Design.
* The base system prompt for Open Design.
*
* Adapted from claude.ai/design's "expert designer" prompt — same identity,
* workflow, and content philosophy, retargeted to the tools an OCD-managed
* workflow, and content philosophy, retargeted to the tools an OD-managed
* agent actually has (Claude Code's Read / Edit / Write / Bash / Glob / Grep
* / TodoWrite, plus the project folder as cwd).
*
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Prompt composer. The base is the OCD-adapted "expert designer" system
* Prompt composer. The base is the OD-adapted "expert designer" system
* prompt (see ./official-system.ts) — a full identity, workflow, and
* content-philosophy charter. Stacked on top:
*