---
name: ds-manager
description: >
  One-shot entry point for the Design System & Token Manager plugin. Detects what the user
  wants to do — generate tokens, audit tokens, scaffold a brand, configure a pipeline, write
  component docs, or produce governance docs — and routes to the appropriate skill with the
  right arguments. Provides a guided workflow for common multi-step tasks.
---

# /ds-manager — Design System & Token Manager

One-shot entry point for design system and token management work. Analyses the request and
routes to the appropriate skill, or offers a guided choice when the intent is ambiguous.

## What this command handles

Detect the user's intent from the invocation context (arguments, current directory, files
present) and route accordingly:

| Intent signal | Routes to |
|--------------|-----------|
| `audit`, `check`, `review tokens` | `design-token-audit` |
| `generate`, `create tokens`, `new token set` | `design-token-generator` |
| `pipeline`, `style dictionary`, `build tokens`, `transform` | `token-transform-pipeline` |
| `new brand`, `brand theme`, `white label` | `brand-theme-scaffolder` |
| `document component`, `component docs`, `write docs` | `component-doc-writer` |
| `guidelines`, `contribution`, `deprecation`, `ADR`, `governance` | `design-system-usage-guidelines` |
| `review PR`, `token PR`, `check diff` | `ds-token-reviewer` agent |

## Guided workflow: New design system from scratch

If the user says "set up a design system" or "start a design system" with no existing tokens:

1. Prompt for brand brief (primary colour, font, grid size, platform).
2. Run `design-token-generator` to create the three-tier token set.
3. Run `token-transform-pipeline` to configure the Style Dictionary build.
4. Offer to generate component docs for the first 3 components.

## Guided workflow: New brand on existing system

If tokens exist and the user says "add a brand" or "new theme":

1. Confirm base tokens path.
2. Prompt for brand slug, primary hex, secondary (optional), font family (optional), radius style, platform.
3. Run `brand-theme-scaffolder` with collected args.
4. Print diff report and theme-switcher snippet.

## Direct invocation examples

```
/ds-manager audit tokens/
/ds-manager generate brand-brief.md --platform sitecore
/ds-manager pipeline tokens/ --outputs css,tailwind --platform optimizely
/ds-manager brand tokens/ --brand nova --primary #0F4C81 --radius rounded
/ds-manager docs Button --source src/components/Button.tsx
/ds-manager guidelines "Form components" --type all
/ds-manager review-pr
```

## When invoked with no arguments

Show a brief menu:

```
Design System & Token Manager
───────────────────────────────
What would you like to do?

1. Audit existing tokens
2. Generate a new token set
3. Configure a Style Dictionary pipeline
4. Scaffold a new brand theme
5. Write component documentation
6. Generate usage guidelines / governance docs
7. Review token changes in current PR

Reply with a number or describe what you need.
```
