---
name: design-dna-skill
description: >
  Skill describing how to interpret, enforce, and evolve design-dna.json across
  projects. Used by design-system-architect, builders, and gate agents.
---

# Design-DNA Skill – Tokens & Patterns

This skill provides shared understanding of **design-dna** for all lanes.

It is used by:
- `design-system-architect`
- Implementation agents (e.g. `nextjs-builder`, `expo-builder`) when applying tokens
- Gate agents (`nextjs-standards-enforcer`, design QA) when checking usage

## Core Concepts

- `design-dna.json` encodes:
  - Color palette + semantic roles,
  - Typography scale and roles,
  - Spacing grid,
  - Named patterns (cards, layouts, shells, etc.).
- It is the **law** for UI work: where tokens exist, ad-hoc values are forbidden.

## Usage Pattern

1. When reading design-dna:
   - Identify available roles for:
     - Colors (primary, secondary, accent, surface, etc.),
     - Typography (display, heading, body, caption),
     - Spacing (base grid, section spacing, gaps),
     - Patterns (hero, card grid, dashboard shell, etc.).
   - Note any documented minimums or constraints (e.g., minimum font size).

2. When applying tokens in implementation:
   - Map design-dna roles to the project's styling tools:
     - CSS variables,
     - Utility classes,
     - Component variants.
   - Avoid creating new arbitrary values when tokens already cover the need.

3. When enforcing tokens in gates:
   - Treat:
     - Inline styles and raw hex values as hard violations when tokens exist,
     - Spacing and typography outside the defined scales as violations,
     - Overuse/misuse of accent colors as design-dna violations if documented.

---

## CSS Comment Format (OS 7.0)

For projects without JSON design-dna, tokens and rules can be embedded in CSS comments.

### Token Syntax
```css
/* @design-token: <name> = <value> */
```

**Examples:**
```css
/* @design-token: primary = #007AFF */
/* @design-token: secondary = #5856D6 */
/* @design-token: spacing-base = 8px */
/* @design-token: font-body = 16px/24px Inter */
```

### Rule Syntax
```css
/* @design-rule: <constraint> = <value> */
```

**Examples:**
```css
/* @design-rule: min-touch-target = 44px */
/* @design-rule: max-content-width = 1200px */
/* @design-rule: min-font-size = 14px */
```

### Priority Order

When checking for design rules, agents search in this order:
1. **JSON** (highest priority): `.claude/design-dna/*.json`, `design-dna.json`, `design-tokens.json`
2. **Markdown**: `design-system.md`, `.claude/design-dna/README.md`, `docs/design-system.md`
3. **CSS comments** (lowest priority): Any `*.css` file with `@design-token:` or `@design-rule:`

JSON takes precedence because it provides structured, machine-parseable tokens. CSS comments are a fallback for legacy projects or quick prototypes.

---

This skill ensures all agents reason about design-dna in a consistent way and
know when to consult project design documentation for deeper schema and examples.


---
Source attribution: adilkalam
Original project: https://github.com/adilkalam/orca/blob/ecb9256bd44f9c328b1f772282952555d9a3ddf3/skills/design-dna-skill/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2026 ORCA-OS Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: adilkalam
Original project: https://github.com/adilkalam/orca/blob/ecb9256bd44f9c328b1f772282952555d9a3ddf3/skills/design-dna-skill/SKILL.md
Attribution basis: Recovered original package and original project license at a pinned revision

Fields of work: Design, Development & Engineering
Roles: Design System Lead, Frontend Developer, Product Designer, QA / Test Engineer, UX Designer
Specialties: Cross Platform, Design
Tools: Tool not specified
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: ac6a0c76899d680f50d85907eacda00811b1f2ed33784f0779a6069727be0409
Metadata reviewed: 2026-10-27
This metadata supersedes earlier Dave AI catalog attribution. Original instruction and supporting files are preserved.
