# The Kela Design Engineer Handbook

How to work on the design system directly in code, with an AI agent doing the typing. You describe what you want, check it in the browser, and read what changed.

## What you work with

ARK is Kela's design system. It has three parts, and each one is a package.

| Part | What it is | Package |
| --- | --- | --- |
| Tokens | Colours, spacing, type and radii, synced from Tokens Studio. | `@kela-systems/tokens` |
| Icons | The icon set. | `@kela-systems/icons` |
| Components | Buttons, inputs, menus, dialogs and the rest of the library. | `@kela-systems/ui-components` |

ARK is published as packages that apps install. You look at every part on its own in the ARK Storybook.

## Git in two minutes

You won't type git commands; the agent does that. These are the words you'll see along the way.

| Word | What it means |
| --- | --- |
| Repository | The project and its full history. |
| main | The shared, official version. Nobody works on it directly. |
| Branch | Your own copy of main, where you change things without affecting anyone. One branch per task. |
| Commit | A saved snapshot of your changes, with a short message. A branch can have several. |
| Push | Uploads your commits to GitHub, so others can see them. |
| Diff | The list of what changed: lines added, removed or edited in each file. |
| Pull request | A PR asks to add your branch to main. It shows the diff, runs the checks, and is where people review. |
| Checks (CI) | Automatic tests that run on every PR on a clean machine. Green passes; red tells you what failed. |
| Approve | A teammate has read the change and agrees. Approve means "ship it". |
| Merge | Your branch becomes part of main. For ARK, merging also publishes a new version. |

## The workflow

The same steps apply to every kind of change: a token, an icon, a component variant, a story, or a screen in an app that uses ARK.

You get ready in steps 1 to 3, make the change in steps 4 and 5, ship it in steps 6 to 9, and merge in step 10.

### 1. Set up once

Once per machine:

- **GitHub access** to the repository. Ask a developer to add you.
- **An agent**: Claude Code or Cursor.
- **The repo**: open the agent in any folder and ask it to get the repo. Then open the repo's folder in the agent. That's where every other prompt goes.

The first time you run something, the agent installs whatever is missing.

Prompts: [Get the repo](#prompt-get-the-repo)

### 2. Start from an issue

Pick or create an issue and assign it to yourself. Ask the agent to create the branch from it; the PR checks expect the issue's ID in the branch name.

Prompts: [Start from an issue](#prompt-start-from-an-issue), [Switch tasks](#prompt-switch-tasks)

### 3. Open what you're working on

- **ARK** in the ARK Storybook: every component and state on its own, with live controls, RTL, and dark and light themes. No app, no backend, no login.
- **An app that uses ARK**, running on your machine.

Prompts: [Open Storybook](#prompt-open-storybook), [Run the app](#prompt-run-the-app)

### 4. Make the change with the agent

Name the skill for the job and describe what you want. The repo's conventions (which components to use, strings, RTL) apply automatically, and the agent tells you when something you ask for doesn't exist yet.

Prompts: [Component or variant](#prompt-component-or-variant), [Tokens](#prompt-tokens), [Build a screen with ARK](#prompt-build-a-screen-with-ark)

### 5. Look at it and check it

Check it in the browser and compare it with what you had in mind. Ask the agent to explain the diff. If something's off, describe it and iterate.

If the agent goes in circles, stop and restart with a clearer prompt. That's usually faster than fixing a bad path.

Prompts: [Review my changes](#prompt-review-my-changes), [Share work in progress](#prompt-share-work-in-progress), [Update from main](#prompt-update-from-main)

### 6. Commit and push

Ask the agent to commit with a clear message and push. For an ARK change it also adds the version bump. It picks the bump; you check it makes sense.

| Bump | When | Example |
| --- | --- | --- |
| Patch | A fix, like a colour | 4.1.2 → 4.1.3 |
| Minor | Something new, like a variant | 4.1.3 → 4.2.0 |
| Major | Breaks apps, like a renamed prop | 4.2.0 → 5.0.0 |

### 7. Open the pull request

The agent writes the description. Ask for screenshots in light, dark and RTL, so reviewers see the result without running it.

Prompts: [Commit and open a PR](#prompt-commit-and-open-a-pr)

### 8. The checks run

Each check asks one question.

| Check | The question it asks |
| --- | --- |
| Lint | Does it follow our design-system rules? |
| Typecheck | Do the props and strings fit together? |
| Tests | Does it still behave the same? |
| Tokens contract | Did a token value change on purpose? |
| Build | Can the apps still use it? |
| Consumer test | Does it work installed outside the repo? |
| Release check | Did each changed package get a new version? |

When one goes red, open **Details** on it to see which check failed. Then ask the agent to find out why the CI failed, explain it in one line, and fix it. Push again and the checks rerun. Red checks are normal. They're there so mistakes never reach main.

Prompts: [Red check](#prompt-red-check)

### 9. Visual review in Chromatic

For ARK changes, Chromatic screenshots every story your change affects and compares it with main. Open the build from the PR and log in with GitHub. Look at the baseline next to the new version with the diff highlighted, then accept or deny. Accepted changes become the new baseline once merged.

Prompts: [Chromatic diffs](#prompt-chromatic-diffs)

### 10. Review and merge

A teammate reviews the change. After approval, merge. For ARK, merging publishes the new version.

## Prompts to copy

Paste a prompt into the agent, opened in the repo's folder. A blank in angle quotes, like `‹paste link›`, is yours to fill in. Copy leaves it out.

### One-time setup

```prompt title="Get the repo" hint="once per machine"
Clone this repo into a folder on my machine. If git or the GitHub sign-in is missing, set them up, and walk me through any step I have to do myself. Repo: ‹paste link›
```

### Run

```prompt title="Open Storybook"
Open the ARK Storybook.
```

```prompt title="Run the app" hint="an app that uses ARK"
Run the app on my machine. If my machine is missing anything it needs, install it and tell me in plain words what you did. Give me the link.
```

### Tasks and branches

```prompt title="Start from an issue"
Update main and create a branch for this issue. Summarise what it asks for and what "done" looks like, then plan the change step by step. If anything is unclear or missing, ask me before you start. Don't change any code until I approve the plan. Issue: ‹paste link›
```

```prompt title="Switch tasks"
Save what I have on this branch and go back to an up-to-date main, so I can start something else.
```

```prompt title="Update from main"
Bring my branch up to date with main, and tell me if anything conflicts with my changes.
```

### Work on ARK

```prompt title="Component or variant"
Using the ui-component skill, make this change in ARK. Reuse existing components and tokens. Cover every state (default, hover, focus, disabled, error, long text) in the story, in light, dark and RTL. Run the checks and open Storybook on it. Don't commit. The change: ‹describe it›
```

```prompt title="Tokens"
Using the token-update skill, land this Tokens Studio branch. Tell me which tokens changed and where they're used. Branch: ‹paste name›
```

```prompt title="Propose something new for ARK"
I need something ARK doesn't have. First check whether an existing component, variant or token can already do it. If nothing fits, draft a proposal for a new one and show it to me. Once I approve, create it as an issue. What I need: ‹describe it›
```

### Work in an app

```prompt title="Build a screen with ARK"
Build this in the app. Use only existing ARK components and tokens; if something's missing, tell me instead of inventing it. Use mock data where there's no real data, and write every string through the app's translations. Cover the empty, loading, error and long-content states. Run the checks, start the dev server, and tell me where to look and how to reach each state. Don't commit. What to build: ‹describe it›
```

### Check and ship

```prompt title="Review my changes"
Explain what you changed in plain words, file by file. Flag anything that departs from ARK or that changed outside what I asked for.
```

```prompt title="Share work in progress"
Commit and push what I have, and open a draft PR marked as not ready for review, with screenshots in light, dark and RTL. Give me the link to share.
```

```prompt title="Commit and open a PR"
Commit and push this with a clear message, add the version bump if an ARK package changed, and open a PR with the pr-description skill, with screenshots in light, dark and RTL.
```

```prompt title="Red check"
A check on my PR failed. Find out why the CI failed, explain it in one line, and fix it. PR: ‹paste link›
```

```prompt title="Chromatic diffs"
Chromatic shows visual changes on my PR. List which stories changed and whether each one is expected from my change. PR: ‹paste link›
```

## Skills

Skills are step-by-step playbooks the agent follows. Claude, Cursor and Codex all read the same ones. Name one in your prompt.

| Skill | Use it to |
| --- | --- |
| `ui-component` | Add or change an ARK component or variant. |
| `token-update` | Land a Tokens Studio branch. |
| `figma-to-code` | Build from a Figma frame, when you have one. |
| `pr-description` | Write a PR description reviewers can read. |

> **Note** The repo's conventions apply on their own. If the agent seems to ignore them, for example by hard-coding a colour, inventing a component or skipping RTL, tell it: `Follow the repo's design-system rules.`

## Good habits

- **One issue, one branch, one PR.** Small PRs are reviewed faster and are easier to undo.
- **Explore freely.** Nothing is saved to git until you ask, so try things and throw them away.
- **Always read the diff before a PR.** If files changed that you didn't expect, ask why.
- **Use what exists before inventing.** If ARK doesn't have it, propose it rather than building a one-off.
- **When the code and your design disagree,** the agent follows the system and tells you. Decide whether the design or the system should change, and say so in the PR.
- **Be specific.** Describe what "done" looks like, including the states and edge cases you care about.
- **Ask a developer when you're stuck.** If something in the workflow doesn't work for you, say so.
