Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ User-invokable prompts triggered with `/command-name`.
| ----------------------- | ------------------------------------- | -------------------------------------------------------- |
| `/new-component` | `/new-component Button` | Scaffold a new EDS 2.0 component with all required files |
| `/create-component-doc` | `/create-component-doc <raw content>` | Restructure raw content into component documentation |
| `/accessibility-audit` | `/accessibility-audit <url>` | Audit a page or Storybook story against WCAG 2.1 AA |
| `/audit-harnesses` | `/audit-harnesses` | Audit AI harness configs for drift across tools |
| `/tokens-studio` | `/tokens-studio <task>` | Tokens Studio platform / studio CLI pipeline assistant |

## Hooks

Expand Down
15 changes: 15 additions & 0 deletions .claude/commands/tokens-studio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Tokens Studio Pipeline Assistant

Help with the Tokens Studio platform and `studio` CLI task described in **$ARGUMENTS** — pulling tokens, export configurations, `.studio.json`, auth, branches/releases, or building the new token pipeline.

> **Canonical reference:** [`documentation/agent-instructions/TOKENS_STUDIO.md`](../../documentation/agent-instructions/TOKENS_STUDIO.md) — platform concepts, CLI setup, configuration model, command overview, safety rubric, and how to stay current. The legacy Figma-REST pipeline is documented in [`documentation/how-to/TOKEN_SYSTEM_GUIDE.md`](../../documentation/how-to/TOKEN_SYSTEM_GUIDE.md).

@../../documentation/agent-instructions/TOKENS_STUDIO.md

## Steps

1. Verify before asserting: run `pnpm exec studio <command> --help` from `packages/eds-tokens` for CLI questions, and fetch the relevant `documentation-v2.tokens.studio` page for platform questions — do not answer from memory alone.
2. Classify every command against the safety rubric in the canonical doc before running it. Ask the user before anything the rubric classifies as remote-mutating — shortcut aliases (`studio logout` = `auth logout`) count too. `studio auth login` is interactive — the user runs it themselves.
3. If the installed CLI version differs from the snapshot in the canonical doc, tell the user and offer to regenerate the snapshot section.

If `$ARGUMENTS` is empty, ask what the user wants to do with Tokens Studio before proceeding.
16 changes: 16 additions & 0 deletions .github/prompts/tokens-studio.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
mode: agent
description: Help with the Tokens Studio platform and studio CLI (pull, exports, config, auth, pipeline)
---

# Tokens Studio Pipeline Assistant

> **Canonical reference:** [`documentation/agent-instructions/TOKENS_STUDIO.md`](../../documentation/agent-instructions/TOKENS_STUDIO.md) — platform concepts, CLI setup, configuration model, command overview, safety rubric, and how to stay current. The legacy Figma-REST pipeline is documented in [`documentation/how-to/TOKEN_SYSTEM_GUIDE.md`](../../documentation/how-to/TOKEN_SYSTEM_GUIDE.md).

Help with the following Tokens Studio task, following the canonical doc above: ${input:task}

## Steps

1. Verify before asserting: run `pnpm exec studio <command> --help` from `packages/eds-tokens` for CLI questions, and fetch the relevant `documentation-v2.tokens.studio` page for platform questions — do not answer from memory alone.
2. Classify every command against the safety rubric in the canonical doc before running it. Ask the user before anything the rubric classifies as remote-mutating — shortcut aliases (`studio logout` = `auth logout`) count too. `studio auth login` is interactive — the user runs it themselves.
3. If the installed CLI version differs from the snapshot in the canonical doc, tell the user and offer to regenerate the snapshot section.
4 changes: 3 additions & 1 deletion .opencode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Primary agents are selectable by the user and run as the main conversation agent
|-------|-------------|-------|
| `build` | Development agent with EDS conventions | All (asks for git commit/push/branch) |
| `advisor` | Read-only architectural advice and code reviews | Read-only (no write/edit/bash) |
| `tokens-studio` | Tokens Studio pipeline assistant (studio CLI, pull, exports, config) | All (asks for git commit/push/branch, gh, and remote-mutating studio commands) |

### Sub-Agents

Expand Down Expand Up @@ -214,7 +215,8 @@ Refer to AGENTS.md for full conventions.
│ ├── figma-component.md # Sub-agent: Figma-to-code
│ ├── accessibility-audit.md # Sub-agent: A11y auditor
│ ├── component-doc.md # Sub-agent: Documentation
│ └── audit-harnesses.md # Sub-agent: Harness auditor
│ ├── audit-harnesses.md # Sub-agent: Harness auditor
│ └── tokens-studio.md # Primary: Tokens Studio pipeline assistant
```

## Best Practices
Expand Down
32 changes: 32 additions & 0 deletions .opencode/agent/tokens-studio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
description: Tokens Studio pipeline assistant — studio CLI, pull, exports, config, auth
mode: primary
# The ask-list below must be kept in sync with the safety rubric in
# documentation/agent-instructions/TOKENS_STUDIO.md as the CLI grows —
# with allow-by-default, a new remote-mutating subcommand in a future
# CLI version is auto-approved until it is added here.
permission:
bash:
'*': 'allow'
'git commit*': 'ask'
'git push*': 'ask'
'git checkout -b*': 'ask'
'git branch*': 'ask'
'gh *': 'ask'
'*studio exports create*': 'ask'
'*studio exports update*': 'ask'
'*studio exports delete*': 'ask'
'*studio exports duplicate*': 'ask'
'*studio auth logout*': 'ask'
'*studio logout*': 'ask'
---

You help build and run the Tokens Studio-based token pipeline: the `studio` CLI, `.studio.json` configuration, token pulls, export configurations, authentication, and platform concepts (branches, releases, DTCG).

> **Canonical reference:** [`documentation/agent-instructions/TOKENS_STUDIO.md`](../../documentation/agent-instructions/TOKENS_STUDIO.md) — platform concepts, CLI setup, configuration model, command overview, safety rubric, and how to stay current. The legacy Figma-REST pipeline is documented in [`documentation/how-to/TOKEN_SYSTEM_GUIDE.md`](../../documentation/how-to/TOKEN_SYSTEM_GUIDE.md).

## Flow

1. Verify before asserting: run `pnpm exec studio <command> --help` from `packages/eds-tokens` for CLI questions, and fetch the relevant `documentation-v2.tokens.studio` page for platform questions — do not answer from memory alone.
2. Classify every command against the safety rubric in the canonical doc before running it. Commands that mutate remote state or credentials require explicit user approval — the permission config above backstops the common forms, but shortcut aliases and future commands may not match a glob, so classify against the rubric first. `studio auth login` is interactive — the user runs it themselves.
3. If the installed CLI version differs from the snapshot in the canonical doc, tell the user and offer to regenerate the snapshot section.
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ For running an accessibility audit on a deployed page or Storybook story, see [`

Component docs live in `apps/design-system-docs/docs/components/{category}/{component}.md`. For writing or reviewing them — tone of voice, formatting (British English, no em-dashes, admonitions), section order, output template, Storybook iframes workflow, sidebar registration, verification checklist — see [`documentation/agent-instructions/COMPONENT_DOC_STYLE.md`](./documentation/agent-instructions/COMPONENT_DOC_STYLE.md). Harness entry points (`/create-component-doc` in Claude Code, the `structure_components_prompt` / `verify_components_prompt` in Copilot, the `component-doc` agent in OpenCode) all reference that doc.

## Tokens Studio Pipeline

EDS is adopting the Tokens Studio platform as the source for a new token pipeline, replacing the legacy Figma-REST sync over time. For platform concepts (organizations, projects, branches, releases), `studio` CLI setup and commands, the `.studio.json` configuration model, the safety rubric for CLI commands, and how to verify against live sources instead of answering from memory, see [`documentation/agent-instructions/TOKENS_STUDIO.md`](./documentation/agent-instructions/TOKENS_STUDIO.md). Harness entry points (`/tokens-studio` in Claude Code, the `tokens-studio` prompt in Copilot, the `tokens-studio` agent in OpenCode) all reference that doc. The legacy pipeline remains documented in [`documentation/how-to/TOKEN_SYSTEM_GUIDE.md`](./documentation/how-to/TOKEN_SYSTEM_GUIDE.md).

## Conventional Commits

```
Expand Down
1 change: 1 addition & 0 deletions documentation/agent-instructions/HARNESS_AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ A developer must not lose access to a workflow by switching harnesses. Build a m
| Structure component doc | `/create-component-doc`| `structure_components_prompt` | `component-doc` agent |
| Verify component doc | (covered by the same) | `verify_components_prompt` | (covered by the same) |
| Re-sync harnesses (this audit) | `/audit-harnesses` | `audit-harnesses` prompt | `audit-harnesses` agent |
| Tokens Studio pipeline | `/tokens-studio` | `tokens-studio` prompt | `tokens-studio` agent |
| Read-only advisor | `.claude/rules/advisor.md` (general scope) | (none) | `advisor` primary agent |

Rows are *intent*, not exact filenames. If the team adds a new workflow, the row should appear in all three harnesses (or be intentionally one-harness with the reason documented). Any gap is a finding.
Expand Down
Loading
Loading