CodeDesign
Copyright 2026 wz927

This product includes material derived from nexu-io/open-design
(https://github.com/nexu-io/open-design), licensed under the Apache
License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0).

Specifically, the following files in this package contain derivative
work from open-design, adapted for the codedesign terminal agent:

  - src/directions.ts
      Derived from apps/daemon/src/prompts/directions.ts.
      The five design directions (editorial-monocle, modern-minimal,
      warm-soft, tech-utility, brutalist-experimental), their OKLch
      palettes, font stacks, posture rules, and real-world references
      are ported verbatim. sRGB hex approximations of each OKLch value
      are added so the DS token consumer (Figma) can bind them.

  - src/prompts.ts
      Derived from apps/daemon/src/prompts/discovery.ts.
      The three-rule discovery arc (Turn 1 discovery brief → Turn 2
      brand-answer branching → Turn 3 plan-aloud), the anti-AI-slop
      P0 checklist, and the 5-dimensional critique rubric are adapted
      from open-design's HTML-artifact context to codedesign's
      terminal/Figma context.

  - craft/*.md (11 files)
      Derived from open-design's craft/ directory, which is itself
      adapted from the MIT-licensed refero_skill project
      (https://github.com/referodesign/refero_skill, © Refero Design).
      Files vendored verbatim with minor edits to:
        - replace open-design-specific references (apps/daemon paths,
          data-od-id, .ph-img class) with codedesign equivalents;
        - retarget the `od.craft.requires` key to `cd.craft.requires`;
        - add a Figma-vocabulary mapping in the craft/README.md so the
          CSS/DOM idioms in the rules translate unambiguously to Figma
          nodes, text styles, and color variables.
      See craft/README.md for the full attribution chain (refero → open-
      design → codedesign) and Figma mapping table.

  - src/craft.ts
      New file. Loads the vendored craft/*.md files at runtime and
      concatenates the requested set into the system prompt. The default
      set (typography, color, anti-ai-slop) is always-on.

  - src/craftLint.ts, src/tools/craftLint.ts
      Derived from apps/daemon/src/lint-artifact.ts. Ports the
      deterministic P0/P1 rule data (AI_DEFAULT_INDIGO hex list,
      EMOJI_AS_ICON glyph list, invented-metric + filler-copy + external
      placeholder regex patterns) and the scanning approach into a
      standalone function that runs against either a text blob or a
      Figma-style node tree. Exposed to the agent as the `craft_lint`
      tool so the model can self-check without an LLM round trip.

  - src/skills.ts, skills/README.md
      SKILL.md schema ported from open-design's skill frontmatter
      (name, description, triggers, od.{mode, platform, scenario,
      preview, design_system, craft, inputs, parameters, outputs,
      default_for, upstream, featured, fidelity, speaker_notes,
      animations, example_prompt}). The `od.` namespace is retargeted
      to `cd.`; output kinds that only applied to HTML artifacts
      (html, jsx) are replaced with Figma-shaped kinds
      (figma_frames, figma_component). The loader implements a
      minimal YAML parser sufficient for the schema (scalars, inline
      arrays, block sequences, nested 2-space mappings); all extensions
      beyond that subset require a real YAML library.

  - src/designSpec.ts
      Inspired by open-design's design-systems/*.md layout (the
      nine-section structure: visual-theme, palette, typography,
      components, spacing, shadows, motion, tokens, guidelines). The
      section ordering and headings match open-design's convention so
      hand-authored DS files can round-trip between the two projects.
      Rendering from a CodeDesign Direction is original to this project
      (deterministic, no LLM), as is the parser and round-trip contract.

No other material from open-design is vendored in this package.

────────────────────────────────────────────────────────────────────────

This product also includes material derived from alchaincyf/huashu-design
(https://github.com/alchaincyf/huashu-design), licensed under the MIT
License. The huashu-design project provides an HTML-first design playbook
(single-file React/Tailwind prototypes, cinematic motion, audio-aware
deck patterns, scene templates). Its references and craft material are
vendored to power CodeDesign's html_file output line.

Specifically, the following files in this package contain derivative
work from huashu-design:

  - craft/animation-best-practices.md
  - craft/animation-pitfalls.md
  - craft/react-html-setup.md   (renamed from huashu's react-setup.md)
  - craft/audio-design-rules.md
  - craft/cinematic-patterns.md
  - craft/scene-templates.md
      Vendored from huashu-design/references/, with minor edits to:
        - replace huashu/Alchaincyf brand references with CodeDesign /
          html-design naming;
        - retarget HTML-artifact context to CodeDesign's html_file
          output kind.

  - kb/html-craft/*.md (23 files)
      Knowledge-base pack assembled verbatim from huashu-design/
      references/, with YAML frontmatter (title, slug, category,
      aliases, status) added per file so the alpha.32 folder-pack
      loader can index them. Brand references rewritten as above.

  - skills/html-prototype-html/SKILL.md
  - skills/html-deck-html/SKILL.md
  - skills/html-motion-html/SKILL.md
  - skills/html-infographic-html/SKILL.md
  - skills/html-tweaks-html/SKILL.md
      New skill descriptors that wire huashu-design's HTML-output
      patterns (single-file rule, cinematic patterns, scene templates,
      tweaks system) into CodeDesign's skill schema. Each declares
      cd.platform: html-canvas and cd.outputs.primary: html_file.

  - vendored/html-craft/
      Holds the upstream LICENSE and any non-derivative reference
      material kept verbatim for traceability.

The MIT license preserved in vendored/html-craft/LICENSE applies to
all huashu-design-derived material listed above.

No other material from huashu-design is vendored in this package.
