tevra-design-kit 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/PROVENANCE.md +18 -0
- package/README.md +251 -2
- package/SKILL.md +20 -0
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/adapters/claude-code/CLAUDE.md +14 -0
- package/adapters/codex/AGENTS.md +5 -0
- package/adapters/cursor/README.md +5 -0
- package/adapters/gemini-cli/README.md +5 -0
- package/adapters/github-copilot/README.md +5 -0
- package/adapters/kiro/README.md +5 -0
- package/adapters/opencode/README.md +5 -0
- package/adapters/windsurf/README.md +5 -0
- package/dist/packages/cli/src/arguments.d.ts +9 -0
- package/dist/packages/cli/src/arguments.js +58 -0
- package/dist/packages/cli/src/arguments.js.map +1 -0
- package/dist/packages/cli/src/index.d.ts +2 -0
- package/dist/packages/cli/src/index.js +132 -0
- package/dist/packages/cli/src/index.js.map +1 -0
- package/dist/packages/cli/src/project-commands.d.ts +4 -0
- package/dist/packages/cli/src/project-commands.js +137 -0
- package/dist/packages/cli/src/project-commands.js.map +1 -0
- package/dist/packages/cli/src/run-command.d.ts +2 -0
- package/dist/packages/cli/src/run-command.js +35 -0
- package/dist/packages/cli/src/run-command.js.map +1 -0
- package/dist/packages/cli/src/visual-commands.d.ts +5 -0
- package/dist/packages/cli/src/visual-commands.js +73 -0
- package/dist/packages/cli/src/visual-commands.js.map +1 -0
- package/dist/packages/cli/src/workflow-commands.d.ts +2 -0
- package/dist/packages/cli/src/workflow-commands.js +73 -0
- package/dist/packages/cli/src/workflow-commands.js.map +1 -0
- package/dist/packages/contracts/src/index.d.ts +181 -0
- package/dist/packages/contracts/src/index.js +3 -0
- package/dist/packages/contracts/src/index.js.map +1 -0
- package/dist/packages/core/src/analyze.d.ts +6 -0
- package/dist/packages/core/src/analyze.js +46 -0
- package/dist/packages/core/src/analyze.js.map +1 -0
- package/dist/packages/core/src/config.d.ts +4 -0
- package/dist/packages/core/src/config.js +39 -0
- package/dist/packages/core/src/config.js.map +1 -0
- package/dist/packages/core/src/install.d.ts +13 -0
- package/dist/packages/core/src/install.js +69 -0
- package/dist/packages/core/src/install.js.map +1 -0
- package/dist/packages/core/src/router.d.ts +12 -0
- package/dist/packages/core/src/router.js +90 -0
- package/dist/packages/core/src/router.js.map +1 -0
- package/dist/packages/core/src/search.d.ts +12 -0
- package/dist/packages/core/src/search.js +31 -0
- package/dist/packages/core/src/search.js.map +1 -0
- package/dist/packages/core/src/skills.d.ts +7 -0
- package/dist/packages/core/src/skills.js +36 -0
- package/dist/packages/core/src/skills.js.map +1 -0
- package/dist/packages/core/src/workflow.d.ts +3 -0
- package/dist/packages/core/src/workflow.js +73 -0
- package/dist/packages/core/src/workflow.js.map +1 -0
- package/dist/packages/design-context/src/index.d.ts +5 -0
- package/dist/packages/design-context/src/index.js +41 -0
- package/dist/packages/design-context/src/index.js.map +1 -0
- package/dist/packages/design-context/src/migrate.d.ts +2 -0
- package/dist/packages/design-context/src/migrate.js +27 -0
- package/dist/packages/design-context/src/migrate.js.map +1 -0
- package/dist/packages/design-context/src/tokens.d.ts +8 -0
- package/dist/packages/design-context/src/tokens.js +65 -0
- package/dist/packages/design-context/src/tokens.js.map +1 -0
- package/dist/packages/design-context/src/validation.d.ts +1 -0
- package/dist/packages/design-context/src/validation.js +22 -0
- package/dist/packages/design-context/src/validation.js.map +1 -0
- package/dist/packages/design-memory/src/index.d.ts +16 -0
- package/dist/packages/design-memory/src/index.js +47 -0
- package/dist/packages/design-memory/src/index.js.map +1 -0
- package/dist/packages/filesystem/src/index.d.ts +8 -0
- package/dist/packages/filesystem/src/index.js +83 -0
- package/dist/packages/filesystem/src/index.js.map +1 -0
- package/dist/packages/filesystem/src/resources.d.ts +1 -0
- package/dist/packages/filesystem/src/resources.js +13 -0
- package/dist/packages/filesystem/src/resources.js.map +1 -0
- package/dist/packages/performance-qa/src/index.d.ts +24 -0
- package/dist/packages/performance-qa/src/index.js +77 -0
- package/dist/packages/performance-qa/src/index.js.map +1 -0
- package/dist/packages/quality-engine/src/html.d.ts +2 -0
- package/dist/packages/quality-engine/src/html.js +15 -0
- package/dist/packages/quality-engine/src/html.js.map +1 -0
- package/dist/packages/quality-engine/src/index.d.ts +3 -0
- package/dist/packages/quality-engine/src/index.js +45 -0
- package/dist/packages/quality-engine/src/index.js.map +1 -0
- package/dist/packages/registry/src/index.d.ts +49 -0
- package/dist/packages/registry/src/index.js +132 -0
- package/dist/packages/registry/src/index.js.map +1 -0
- package/dist/packages/visual-testing/src/capture.d.ts +12 -0
- package/dist/packages/visual-testing/src/capture.js +174 -0
- package/dist/packages/visual-testing/src/capture.js.map +1 -0
- package/dist/packages/visual-testing/src/checks.d.ts +3 -0
- package/dist/packages/visual-testing/src/checks.js +17 -0
- package/dist/packages/visual-testing/src/checks.js.map +1 -0
- package/dist/packages/visual-testing/src/compare.d.ts +12 -0
- package/dist/packages/visual-testing/src/compare.js +85 -0
- package/dist/packages/visual-testing/src/compare.js.map +1 -0
- package/dist/packages/visual-testing/src/types.d.ts +49 -0
- package/dist/packages/visual-testing/src/types.js +2 -0
- package/dist/packages/visual-testing/src/types.js.map +1 -0
- package/dist/packages/workflow-engine/src/index.d.ts +11 -0
- package/dist/packages/workflow-engine/src/index.js +51 -0
- package/dist/packages/workflow-engine/src/index.js.map +1 -0
- package/docs/agents.md +36 -0
- package/docs/architecture.md +86 -0
- package/docs/configuration.md +109 -0
- package/docs/contributing.md +75 -0
- package/docs/security.md +42 -0
- package/docs/usage.md +142 -0
- package/package.json +85 -4
- package/references/accessibility/manual-checklist.md +3 -0
- package/references/color-systems/semantic-color.md +3 -0
- package/references/design-principles/decision-making.md +3 -0
- package/references/frameworks/nextjs.md +3 -0
- package/references/frameworks/react-native-expo.md +3 -0
- package/references/frameworks/react.md +3 -0
- package/references/frameworks/sveltekit.md +3 -0
- package/references/frameworks/vue.md +3 -0
- package/references/typography/scales.md +3 -0
- package/references/ux-patterns/README.md +7 -0
- package/references/ux-patterns/UPSTREAM-LICENSE.txt +21 -0
- package/references/ux-patterns/catalog.json +221 -0
- package/registry/capability-ownership.json +191 -0
- package/registry/skills.json +764 -0
- package/registry/sources.json +159 -0
- package/rubrics/quality-rubric.md +24 -0
- package/schemas/capability-ownership.schema.json +69 -0
- package/schemas/capture-manifest.schema.json +209 -0
- package/schemas/checks.schema.json +83 -0
- package/schemas/comparison.schema.json +154 -0
- package/schemas/config.schema.json +297 -0
- package/schemas/design-context.schema.json +651 -0
- package/schemas/design-context.v2.schema.json +395 -0
- package/schemas/handoff.schema.json +135 -0
- package/schemas/legacy/design-context.master-v1.schema.json +167 -0
- package/schemas/legacy/design-context.v1.schema.json +36 -0
- package/schemas/memory.schema.json +69 -0
- package/schemas/plan.schema.json +139 -0
- package/schemas/quality-report.schema.json +151 -0
- package/schemas/skill-registry.schema.json +222 -0
- package/schemas/sources.schema.json +129 -0
- package/skills/accessibility-qa/LICENSE +21 -0
- package/skills/accessibility-qa/SKILL.md +56 -0
- package/skills/accessibility-qa/references/guide.md +3 -0
- package/skills/browser-testing/LICENSE +21 -0
- package/skills/browser-testing/SKILL.md +35 -0
- package/skills/browser-testing/references/guide.md +11 -0
- package/skills/design-direction/LICENSE +21 -0
- package/skills/design-direction/SKILL.md +56 -0
- package/skills/design-direction/references/guide.md +3 -0
- package/skills/design-research/LICENSE +21 -0
- package/skills/design-research/SKILL.md +56 -0
- package/skills/design-research/references/guide.md +3 -0
- package/skills/design-system/LICENSE +21 -0
- package/skills/design-system/SKILL.md +56 -0
- package/skills/design-system/references/guide.md +3 -0
- package/skills/frontend-review/LICENSE +21 -0
- package/skills/frontend-review/SKILL.md +35 -0
- package/skills/frontend-review/references/guide.md +11 -0
- package/skills/interaction-motion/LICENSE +21 -0
- package/skills/interaction-motion/SKILL.md +56 -0
- package/skills/interaction-motion/references/guide.md +3 -0
- package/skills/performance-qa/LICENSE +21 -0
- package/skills/performance-qa/SKILL.md +35 -0
- package/skills/performance-qa/references/guide.md +9 -0
- package/skills/responsive-design/LICENSE +21 -0
- package/skills/responsive-design/SKILL.md +56 -0
- package/skills/responsive-design/references/guide.md +3 -0
- package/skills/ui-builder/LICENSE +21 -0
- package/skills/ui-builder/SKILL.md +58 -0
- package/skills/ui-builder/references/guide.md +3 -0
- package/skills/ui-builder/references/nextjs.md +3 -0
- package/skills/ui-builder/references/react-native-expo.md +3 -0
- package/skills/ui-builder/references/react.md +3 -0
- package/skills/ui-builder/references/sveltekit.md +3 -0
- package/skills/ui-builder/references/vue.md +3 -0
- package/skills/ui-redesign/LICENSE +21 -0
- package/skills/ui-redesign/SKILL.md +56 -0
- package/skills/ui-redesign/references/guide.md +3 -0
- package/skills/visual-review/LICENSE +21 -0
- package/skills/visual-review/SKILL.md +56 -0
- package/skills/visual-review/references/guide.md +7 -0
- package/templates/direction-decision.md +45 -0
- package/templates/research-brief.md +56 -0
- package/templates/visual-review.md +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tevra Design Kit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/PROVENANCE.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Provenance
|
|
2
|
+
|
|
3
|
+
Tevra Design Kit's TypeScript code and skill instructions are original work, licensed under the MIT [LICENSE](LICENSE). Third-party projects listed below were used as references only.
|
|
4
|
+
|
|
5
|
+
| Source | License | How it is used |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| [Leonxlnx/taste-skill](https://github.com/Leonxlnx/taste-skill) | MIT, © 2026 Leonxlnx | Conceptual reference for art direction and the screenshot review loop. No code, prompts or assets copied |
|
|
8
|
+
| [nextlevelbuilder/ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) | MIT, © 2024 Next Level Builder | Reference for search and domain organization. Three short UX records adapted with attribution |
|
|
9
|
+
| Web Quality Skills (Addy Osmani) | MIT, © 2026 Addy Osmani | Inspiration only for performance guidance. Nothing redistributed |
|
|
10
|
+
| Vercel React guidance | Declared MIT | Inspiration only. No rule files redistributed |
|
|
11
|
+
|
|
12
|
+
The three adapted records in `references/ux-patterns/catalog.json` have IDs starting with `upstream-` and carry their source URL, confidence and license. The full upstream MIT notice is at `references/ux-patterns/UPSTREAM-LICENSE.txt`. All other catalog records are Tevra guidance labeled `inferred`; they are not user-research data.
|
|
13
|
+
|
|
14
|
+
Inspected revisions, license status and known limitations for every source are recorded in `registry/sources.json`.
|
|
15
|
+
|
|
16
|
+
No upstream fonts, images, icons, logos, screenshots, full catalogs or scripts are included. A link to an asset is not permission to copy it; review each new asset separately.
|
|
17
|
+
|
|
18
|
+
Third-party names and brands belong to their respective owners.
|
package/README.md
CHANGED
|
@@ -1,3 +1,252 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Tevra Design Kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Design and frontend QA skills for coding agents, with a CLI that proves the work.**
|
|
4
|
+
|
|
5
|
+
Tevra gives your coding agent twelve focused skills for researching, building, redesigning and reviewing user interfaces, and a local CLI that turns "looks good to me" into evidence: real screenshots, pixel diffs, accessibility results, performance metrics and a quality report that blocks delivery when something critical fails.
|
|
6
|
+
|
|
7
|
+
Works with **Claude Code, Codex, Cursor, Kiro, Gemini CLI, GitHub Copilot, OpenCode and Windsurf**.
|
|
8
|
+
|
|
9
|
+
[](https://github.com/tevra-si/design-kit/actions/workflows/ci.yml)   
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
- [Why Tevra](#why-tevra)
|
|
16
|
+
- [See it in action](#see-it-in-action)
|
|
17
|
+
- [The skills](#the-skills)
|
|
18
|
+
- [Requirements](#requirements)
|
|
19
|
+
- [Installation](#installation)
|
|
20
|
+
- [Configure a project](#configure-a-project)
|
|
21
|
+
- [Quick tour](#quick-tour)
|
|
22
|
+
- [Update and uninstall](#update-and-uninstall)
|
|
23
|
+
- [Troubleshooting](#troubleshooting)
|
|
24
|
+
- [Documentation](#documentation)
|
|
25
|
+
|
|
26
|
+
## Why Tevra
|
|
27
|
+
|
|
28
|
+
- **Respects your design system.** Every skill inspects and reuses the project's tokens and components first. Tevra never introduces a parallel system.
|
|
29
|
+
- **Evidence over opinion.** Checks produce files you can open: screenshots, diffs, axe output, Lighthouse JSON. A missing tool is reported as an error, never as a pass.
|
|
30
|
+
- **Humans stay in charge.** Baselines, transformative redesigns and brand changes need an explicit, recorded approval.
|
|
31
|
+
- **Local and private.** Everything lives in the project's `.tevra/` folder. Nothing is uploaded, committed or sent to a model by the CLI.
|
|
32
|
+
- **Agent-agnostic.** Plain Markdown skills in the open Agent Skills format, installable into eight agents.
|
|
33
|
+
|
|
34
|
+
## See it in action
|
|
35
|
+
|
|
36
|
+
The image above is a real run on the bundled [acceptance app](examples/acceptance-app/README.md): a pricing redesign captured across 3 states × 4 viewports. Every behavior, axe, console, network, overflow and touch-target check passed, yet delivery is blocked because 3–7% of pixels changed and nobody has approved the new look. Reproduce it yourself:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
pnpm --filter @tevra/acceptance-app build:before && pnpm --filter @tevra/acceptance-app start # terminal 1
|
|
40
|
+
tevra-design init --root examples/acceptance-app --yes --skip-skills # terminal 2
|
|
41
|
+
tevra-design capture --root examples/acceptance-app --kind baseline --approve-baseline
|
|
42
|
+
pnpm --filter @tevra/acceptance-app build # apply the redesign
|
|
43
|
+
tevra-design capture --root examples/acceptance-app
|
|
44
|
+
tevra-design compare --root examples/acceptance-app
|
|
45
|
+
tevra-design report --root examples/acceptance-app # FAIL: visual-diff
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Every finding links to its evidence in the HTML report:
|
|
49
|
+
|
|
50
|
+
<img src="docs/assets/report.png" alt="Tevra HTML quality report listing passed checks and the failed visual diff with links to evidence" width="720">
|
|
51
|
+
|
|
52
|
+
## The skills
|
|
53
|
+
|
|
54
|
+
| Skill | Use it when |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `design-research` | The brief, users or problem are unclear and need evidence first |
|
|
57
|
+
| `design-direction` | Starting substantial new UI or a redesign, or turning a screenshot into a direction |
|
|
58
|
+
| `design-system` | Creating or extending tokens, themes, dark mode or component variants |
|
|
59
|
+
| `ui-builder` | Building or changing a real screen, component, route or form |
|
|
60
|
+
| `ui-redesign` | Improving an existing screen without breaking its behavior |
|
|
61
|
+
| `responsive-design` | Fixing mobile/tablet layouts, overflow, breakpoints or safe areas |
|
|
62
|
+
| `interaction-motion` | Adding feedback, transitions, loading states or reduced-motion behavior |
|
|
63
|
+
| `visual-review` | Comparing screenshots, approving baselines or scoring visual quality |
|
|
64
|
+
| `accessibility-qa` | Checking WCAG, keyboard and focus, labels and contrast |
|
|
65
|
+
| `browser-testing` | Writing or running end-to-end tests of real user flows |
|
|
66
|
+
| `performance-qa` | A page feels slow, or you need Lighthouse, LCP, CLS or TBT |
|
|
67
|
+
| `frontend-review` | Reviewing frontend code or a diff before merge |
|
|
68
|
+
|
|
69
|
+
Agents pick skills automatically from your request. Bigger requests chain several skills. For example, "build a new dashboard" runs research → direction → system → builder → responsive → visual review → accessibility.
|
|
70
|
+
|
|
71
|
+
## Requirements
|
|
72
|
+
|
|
73
|
+
| Needed for | Requirement |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| CLI | Node `^22.22.2`, `^24.15.0` or `>=26`, and pnpm 11 |
|
|
76
|
+
| Screenshots, axe, Lighthouse | A Chromium-based browser Playwright can launch |
|
|
77
|
+
| Claude Code plugin | Claude Code with plugin support (`claude plugin --help` lists the commands) |
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
Choose **A** for skills in Claude Code, **B** for the CLI and any other agent. Most teams use both.
|
|
82
|
+
|
|
83
|
+
### A. Claude Code plugin
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
claude plugin marketplace add tevra-si/design-kit
|
|
87
|
+
claude plugin install tevra@tevra
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Or inside a session: `/plugin marketplace add tevra-si/design-kit`, then `/plugin install tevra@tevra`.
|
|
91
|
+
|
|
92
|
+
Open a **new** session (skills load at startup) and type `/tevra` to see them. Skills are namespaced as `tevra:<skill>`, such as `/tevra:ui-builder`, so they never collide with a project skill of the same name.
|
|
93
|
+
|
|
94
|
+
### B. CLI and skills for any agent
|
|
95
|
+
|
|
96
|
+
**1. Install the CLI**
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
git clone https://github.com/tevra-si/design-kit.git
|
|
100
|
+
cd design-kit
|
|
101
|
+
pnpm install
|
|
102
|
+
pnpm build
|
|
103
|
+
npm link # adds `tevra-design` to your PATH
|
|
104
|
+
pnpm exec playwright install chromium # browser for screenshots and axe
|
|
105
|
+
tevra-design help
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
After `git pull`, run `pnpm build` again; the linked command uses your clone.
|
|
109
|
+
|
|
110
|
+
**2. Add Tevra to a project**
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
cd /path/to/your-project
|
|
114
|
+
tevra-design init --yes --agents claude,cursor
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
| `--agents` | Installs into |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| `claude` | `.claude/skills/` |
|
|
120
|
+
| `codex` | `.agents/skills/` |
|
|
121
|
+
| `cursor` | `.cursor/skills/` |
|
|
122
|
+
| `kiro` | `.kiro/skills/` |
|
|
123
|
+
| `gemini` | `.gemini/skills/` |
|
|
124
|
+
| `copilot` | `.github/skills/` |
|
|
125
|
+
| `opencode` | `.opencode/skills/` |
|
|
126
|
+
| `windsurf` | `.windsurf/skills/` |
|
|
127
|
+
|
|
128
|
+
Use one folder per agent: Gemini CLI also reads `.agents/skills`, and Copilot also reads `.claude/skills` and `.agents/skills`. Installing twice shows every skill twice. See [supported agents](docs/agents.md) for details.
|
|
129
|
+
|
|
130
|
+
`init` also creates `.tevra/` with the project config, design context and memory. Add `.tevra/` to your `.gitignore`.
|
|
131
|
+
|
|
132
|
+
Useful variations:
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
tevra-design init # interactive
|
|
136
|
+
tevra-design skills install --agents codex --dry-run # preview only
|
|
137
|
+
tevra-design init --yes --skip-skills # config and context only
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The installer never overwrites a file you changed; on any conflict it stops without writing anything.
|
|
141
|
+
|
|
142
|
+
**3. Restart your agent** in the project so it loads the skills.
|
|
143
|
+
|
|
144
|
+
## Configure a project
|
|
145
|
+
|
|
146
|
+
Start your app, then tell Tevra where it runs and which screens matter in `.tevra/config.json`:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"baseURL": "http://localhost:3000",
|
|
151
|
+
"permittedOrigins": ["http://localhost:3000"],
|
|
152
|
+
"routes": [
|
|
153
|
+
{
|
|
154
|
+
"name": "checkout",
|
|
155
|
+
"path": "/checkout",
|
|
156
|
+
"states": [
|
|
157
|
+
{ "name": "default", "actions": [], "masks": [] },
|
|
158
|
+
{
|
|
159
|
+
"name": "invalid-email",
|
|
160
|
+
"actions": [
|
|
161
|
+
{ "type": "fill", "selector": "#email", "value": "not-an-email" },
|
|
162
|
+
{ "type": "click", "selector": "button[type=submit]" },
|
|
163
|
+
{ "type": "expect-visible", "selector": "#email-error" }
|
|
164
|
+
],
|
|
165
|
+
"masks": ["[data-testid=order-number]"]
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Keep the other fields `init` generated (viewports, thresholds, weights). Only `permittedOrigins` may be loaded. `masks` hide private or changing content in screenshots. Never put real credentials or customer data in actions. Full reference: [configuration](docs/configuration.md).
|
|
174
|
+
|
|
175
|
+
> **Pages behind a login.** The CLI's browser starts signed out. Check those pages by asking your agent to use an already signed-in browser, and keep the CLI for public pages, test environments and CI.
|
|
176
|
+
|
|
177
|
+
## Quick tour
|
|
178
|
+
|
|
179
|
+
**Ask your agent:**
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
The pricing table overflows on mobile, fix it
|
|
183
|
+
/tevra:accessibility-qa check the signup form
|
|
184
|
+
Review this diff before I merge
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Plan and research:**
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
tevra-design workflow plan "Improve pricing card" --mode quick
|
|
191
|
+
tevra-design search "form error validation" --limit 5
|
|
192
|
+
tevra-design analyze
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Verify a running app:**
|
|
196
|
+
|
|
197
|
+
```sh
|
|
198
|
+
tevra-design doctor --launch # browser starts
|
|
199
|
+
tevra-design capture --kind baseline --approve-baseline # after a human approves the screens
|
|
200
|
+
tevra-design capture && tevra-design compare # what changed?
|
|
201
|
+
tevra-design a11y # axe on every route, state and viewport
|
|
202
|
+
tevra-design test performance --allow-network # Lighthouse lab metrics
|
|
203
|
+
tevra-design report # .tevra/reports/quality.{md,json,html}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Exit codes: `0` passed, `1` a check failed, `2` input or environment error. See [usage](docs/usage.md) for workflows, evidence, context and memory.
|
|
207
|
+
|
|
208
|
+
## Update and uninstall
|
|
209
|
+
|
|
210
|
+
| | Update | Uninstall |
|
|
211
|
+
| --- | --- | --- |
|
|
212
|
+
| Plugin | `claude plugin marketplace update tevra` then `claude plugin update tevra@tevra` | `claude plugin uninstall tevra@tevra` and `claude plugin marketplace remove tevra` |
|
|
213
|
+
| CLI | `git pull && pnpm install && pnpm build` in your clone | `npm unlink -g tevra-design-kit` |
|
|
214
|
+
| Project skills | Move the old Tevra skill folders aside, then `tevra-design skills install --agents <agent>` | Delete the Tevra skill folders and, if unwanted, `.tevra/` |
|
|
215
|
+
|
|
216
|
+
## Troubleshooting
|
|
217
|
+
|
|
218
|
+
| Symptom | Fix |
|
|
219
|
+
| --- | --- |
|
|
220
|
+
| A skill like `/ui-builder` does not appear | The skills are in another agent's folder, or the session started before the install. Use the plugin, or `--agents claude`, then open a new session |
|
|
221
|
+
| `Installation conflict; preserve local file` | A skill with the same name already exists (for example `design-system`). Use the plugin, or move the existing folder aside |
|
|
222
|
+
| `Marketplace file not found` | Pull the latest `main`; the repository root must contain `.claude-plugin/marketplace.json` |
|
|
223
|
+
| `Unknown agent` | Use one of `codex, claude, cursor, kiro, gemini, copilot, opencode, windsurf` |
|
|
224
|
+
| `doctor` fails or the browser cannot launch | Run `pnpm exec playwright install chromium` in the design-kit clone. Some sandboxes block browsers or local servers; Tevra reports the error instead of faking results |
|
|
225
|
+
| Screenshots show the sign-in page | The route needs a login; see [Configure a project](#configure-a-project) |
|
|
226
|
+
| Capture refuses a URL | Add its origin to `permittedOrigins` |
|
|
227
|
+
| `Mask matches no elements` | Every mask selector must exist on the page; fix or remove it |
|
|
228
|
+
| `Write lock unavailable` | Another Tevra command is running, or one crashed. Remove the stale `.tevra/*.lock` file |
|
|
229
|
+
| Plugin install mentions packages not installed | Expected: the plugin ships skills only; the CLI comes from step B |
|
|
230
|
+
|
|
231
|
+
## Known limitations
|
|
232
|
+
|
|
233
|
+
- Automated checks are evidence, not certification. axe and heuristics cannot confirm screen-reader behavior or full WCAG conformance; skills list the manual checks still required.
|
|
234
|
+
- Lighthouse results are lab metrics and do not represent real-user data such as INP.
|
|
235
|
+
- Browser checks cover web pages. Native React Native/Expo apps need device testing.
|
|
236
|
+
- The research catalog is small and local; it cannot report current trends.
|
|
237
|
+
|
|
238
|
+
## Documentation
|
|
239
|
+
|
|
240
|
+
| Guide | Contents |
|
|
241
|
+
| --- | --- |
|
|
242
|
+
| [Usage](docs/usage.md) | Skills, workflows, capture, reports, context, memory, examples |
|
|
243
|
+
| [Configuration](docs/configuration.md) | Every config field, actions, privacy, design controls, extensions |
|
|
244
|
+
| [Supported agents](docs/agents.md) | Per-agent install paths and activation |
|
|
245
|
+
| [Architecture](docs/architecture.md) | Packages, capability ownership, workflow and evidence model |
|
|
246
|
+
| [Security](docs/security.md) | Boundaries, protections and limits |
|
|
247
|
+
| [Contributing](docs/contributing.md) | Development setup, checks and release steps |
|
|
248
|
+
| [Changelog](CHANGELOG.md) | Release history |
|
|
249
|
+
|
|
250
|
+
## License
|
|
251
|
+
|
|
252
|
+
MIT. See [LICENSE](LICENSE), [PROVENANCE](PROVENANCE.md) and [third-party notices](THIRD_PARTY_NOTICES.md).
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tevra-design
|
|
3
|
+
description: Route product design and frontend work to focused Tevra skills, manage shared decisions and deliver evidence-based visual and accessibility review.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Tevra Design Orchestrator
|
|
8
|
+
|
|
9
|
+
Inspect the active project instructions and design system. Use the smallest workflow that completes the request. `tevra-design analyze` inventories likely sources; `tevra-design plan "<request>" --mode quick|standard|full` creates a local plan with explicit budgets. The CLI does not invoke an AI agent.
|
|
10
|
+
|
|
11
|
+
- New interface: research → direction → system → builder → responsive → visual review → accessibility.
|
|
12
|
+
- Existing component: redesign → builder → visual review; add accessibility when interaction changes.
|
|
13
|
+
- Screenshot: direction with visible evidence/assumptions → builder → responsive → visual review.
|
|
14
|
+
- Focused motion, responsive or accessibility task: invoke the relevant independent skill.
|
|
15
|
+
|
|
16
|
+
Read only each selected skill's `SKILL.md` and needed references. Use project-scoped context revisions and transparent memory. Preserve user-approved decisions and public contracts. Use handoffs with exclusive file ownership for future agent dispatch. Record human approval for shared system migrations and transformative changes.
|
|
17
|
+
|
|
18
|
+
Run available behavior and browser checks; do not fabricate a PASS when a tool is missing. Critical functionality/accessibility failures and failed required tests block delivery. Refine only within the configured retry/time budget. Report outputs, executed checks, evidence and unresolved blockers.
|
|
19
|
+
|
|
20
|
+
Use `skills list|inspect|validate|graph` for metadata discovery. `workflow run` executes supported local QA stages; design and coding stages need the coding agent and an evidence file to complete. Unsupported integrations are reported as blocked. See `docs/usage.md` for commands.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## Adapted content
|
|
4
|
+
|
|
5
|
+
Three guidance records in `references/ux-patterns/catalog.json` (IDs starting with `upstream-`) are adapted from [UI/UX Pro Max `ux-guidelines.csv`](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/blob/main/src/ui-ux-pro-max/data/ux-guidelines.csv), MIT, Copyright (c) 2024 Next Level Builder. The complete notice is bundled at `references/ux-patterns/UPSTREAM-LICENSE.txt`. Wording is shortened; non-universal guidance is kept as advice.
|
|
6
|
+
|
|
7
|
+
Taste Skill (MIT, Copyright (c) 2026 Leonxlnx) and Web Quality Skills (MIT, Copyright (c) 2026 Addy Osmani) are conceptual references only; no code, text or assets are redistributed.
|
|
8
|
+
|
|
9
|
+
## Runtime dependencies
|
|
10
|
+
|
|
11
|
+
| Package | License |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| Ajv | MIT |
|
|
14
|
+
| YAML | ISC |
|
|
15
|
+
| Playwright | Apache-2.0 (its NOTICE credits Microsoft Corporation and Puppeteer-derived code) |
|
|
16
|
+
| axe-core | MPL-2.0 |
|
|
17
|
+
| Lighthouse | Apache-2.0 |
|
|
18
|
+
| pngjs | MIT |
|
|
19
|
+
| pixelmatch | ISC |
|
|
20
|
+
|
|
21
|
+
Build, test and example dependencies keep their own notices under `node_modules`. `pnpm-lock.yaml` pins exact transitive versions. No proprietary service or model is required, and no dependency source is modified.
|
|
22
|
+
|
|
23
|
+
Run `pnpm licenses list` and `pnpm audit` before each release.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Tevra with Claude Code
|
|
2
|
+
|
|
3
|
+
**Recommended:** install the plugin once per machine. Skills are namespaced as `tevra:<skill>`, so they never collide with project skills such as an existing `design-system`.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
claude plugin marketplace add tevra-si/design-kit
|
|
7
|
+
claude plugin install tevra@tevra
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
**Per project:** `tevra-design init --yes --agents claude --root <project>` copies skills into `.claude/skills/<name>/SKILL.md`, unnamespaced. The installer refuses to overwrite a same-named skill.
|
|
11
|
+
|
|
12
|
+
Start a new session after installing; skills load at startup. Invoke them through natural-language requests or `/tevra:<skill>` (plugin) or `/<skill>` (project install). Follow the project's own CLAUDE.md and design system first. Do not replace that file with this note.
|
|
13
|
+
|
|
14
|
+
Source: https://code.claude.com/docs/en/skills . Managed policy may affect loading.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Tevra with Codex
|
|
2
|
+
|
|
3
|
+
Install using `tevra-design init --yes --agents codex --root <project>`. Native project skills live in `.agents/skills/<name>/SKILL.md`; focused references are copied with each skill. Invoke from the native selector or `$skill-name` where supported. Prioritize project instructions and the current design system.
|
|
4
|
+
|
|
5
|
+
Source: https://learn.chatgpt.com/docs/build-skills . A managed workspace can protect .agents; report that permission error, use a permitted installation environment and never claim discovery without host evidence. Do not overwrite unrelated AGENTS.md instructions.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Tevra with Cursor
|
|
2
|
+
|
|
3
|
+
Install using `tevra-design init --yes --agents cursor --root <project>`. Project skills live in `.cursor/skills/<name>/SKILL.md` with their focused references. Cursor also documents compatibility paths, but Tevra uses its native project directory to avoid assuming identical agent behavior. Select a skill through `/` in Agent chat where supported.
|
|
4
|
+
|
|
5
|
+
Source: https://cursor.com/docs/skills . Remote/global sync and managed trust differ from local discovery. Installer tests establish file layout, not host activation.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Tevra with Gemini CLI
|
|
2
|
+
|
|
3
|
+
Install using `tevra-design init --yes --agents gemini --root <project>`. Workspace skills live in `.gemini/skills/<name>/SKILL.md`. Gemini CLI also reads `.agents/skills`, so install either `gemini` or `codex` for a project, not both, to avoid duplicate skill names. Gemini asks for confirmation before activating a matching skill; check with `/skills list`. Keep always-on conventions in GEMINI.md.
|
|
4
|
+
|
|
5
|
+
Source: https://geminicli.com/docs/cli/skills/ . Installer tests establish file layout, not host activation.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Tevra with GitHub Copilot
|
|
2
|
+
|
|
3
|
+
Install using `tevra-design init --yes --agents copilot --root <project>`. Repository skills live in `.github/skills/<name>/SKILL.md` and apply to Copilot agent mode in VS Code, Copilot CLI and the cloud agent. Copilot also reads `.claude/skills` and `.agents/skills`; install only one of `copilot`, `claude` or `codex` when a project uses Copilot to avoid duplicate skill names. Keep repository instructions in `.github/copilot-instructions.md`.
|
|
4
|
+
|
|
5
|
+
Source: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-skills . Installer tests establish file layout, not host activation.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Tevra with Kiro
|
|
2
|
+
|
|
3
|
+
Install using `tevra-design init --yes --agents kiro --root <project>`. Workspace skills live in `.kiro/skills/<name>/SKILL.md` with their focused references. Kiro activates a skill when the request matches its description, or through `/skill-name`. Custom Kiro agents load skills only when their `resources` include `skill://.kiro/skills/**/SKILL.md`. Keep project steering files in `.kiro/steering/`; this adapter does not replace them.
|
|
4
|
+
|
|
5
|
+
Source: https://kiro.dev/docs/skills/ . Workspace skills override global `~/.kiro/skills` of the same name. Installer tests establish file layout, not host activation.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Tevra with OpenCode
|
|
2
|
+
|
|
3
|
+
Install using `tevra-design init --yes --agents opencode --root <project>`. Project skills live in `.opencode/skills/<name>/SKILL.md`; relative reference links resolve from each skill folder. OpenCode also loads `.claude/skills`; when both exist, `.opencode/skills` wins for the same name, so installing both `claude` and `opencode` is safe but redundant.
|
|
4
|
+
|
|
5
|
+
Source: https://opencode.ai/docs/skills/ . Installer tests establish file layout, not host activation.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Tevra with Windsurf
|
|
2
|
+
|
|
3
|
+
Install using `tevra-design init --yes --agents windsurf --root <project>`. Skills install to `.windsurf/skills/<name>/SKILL.md`, which Cascade reads in both older Windsurf releases and current Devin Desktop (whose primary workspace path is `.devin/skills/`). Cascade activates a skill from its description or an `@skill-name` mention. Keep project rules in `.windsurf/rules/`.
|
|
4
|
+
|
|
5
|
+
Source: https://docs.windsurf.com/windsurf/cascade/skills . The product is changing; verify the path against the installed version. Installer tests establish file layout, not host activation.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface Arguments {
|
|
2
|
+
command: string;
|
|
3
|
+
positional: string[];
|
|
4
|
+
flags: Record<string, string | boolean | undefined>;
|
|
5
|
+
}
|
|
6
|
+
export declare function parseCLI(argv: string[]): Arguments;
|
|
7
|
+
export declare function flag(args: Arguments, name: string, fallback?: string): string;
|
|
8
|
+
export declare function numeric(args: Arguments, name: string, fallback?: number): number;
|
|
9
|
+
export declare function inputPath(args: Arguments): string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { parseArgs } from 'node:util';
|
|
2
|
+
const boolean = { type: 'boolean' };
|
|
3
|
+
const string = { type: 'string' };
|
|
4
|
+
const specs = {
|
|
5
|
+
init: { agents: string, yes: boolean, 'skip-skills': boolean }, doctor: { launch: boolean, 'allow-custom-browser': boolean }, analyze: {},
|
|
6
|
+
'skills list': { registry: string }, 'skills inspect': { registry: string }, 'skills validate': { registry: string }, 'skills graph': { registry: string }, 'skills check': {}, 'skills install': { agents: string, 'dry-run': boolean },
|
|
7
|
+
validate: {}, 'context show': {}, 'context validate': {}, 'context migrate': { out: string, owner: string }, 'context update': { revision: string, 'approve-constraints': boolean },
|
|
8
|
+
'memory inspect': {}, 'memory list': {}, 'memory update': { revision: string }, 'memory reset': { yes: boolean },
|
|
9
|
+
'workflow plan': { registry: string, mode: string, 'max-steps': string, 'max-minutes': string, 'max-refinements': string, out: string },
|
|
10
|
+
'workflow run': { 'allow-network': boolean, 'allow-custom-browser': boolean },
|
|
11
|
+
plan: { registry: string, mode: string, 'max-steps': string, 'max-minutes': string, 'max-refinements': string, out: string },
|
|
12
|
+
'workflow status': {}, 'workflow start': { skill: string }, 'workflow complete': { skill: string, evidence: string }, 'workflow fail': { skill: string, evidence: string }, 'workflow approve': { by: string, yes: boolean },
|
|
13
|
+
'handoff validate': {}, 'handoff save': {}, search: { category: string, limit: string },
|
|
14
|
+
'tokens generate': { 'new-system': boolean, brand: string }, 'tokens export': {},
|
|
15
|
+
'test performance': { 'allow-network': boolean, 'allow-custom-browser': boolean, 'lcp-ms': string, cls: string, 'tbt-ms': string },
|
|
16
|
+
'test browser': { 'allow-custom-browser': boolean }, 'test visual': { 'allow-custom-browser': boolean }, 'test accessibility': { 'allow-custom-browser': boolean },
|
|
17
|
+
capture: { kind: string, 'approve-baseline': boolean, 'allow-custom-browser': boolean }, compare: {}, a11y: { 'allow-custom-browser': boolean },
|
|
18
|
+
report: { checks: string, out: string }, review: { checks: string, out: string, 'allow-custom-browser': boolean }, help: {}
|
|
19
|
+
};
|
|
20
|
+
export function parseCLI(argv) {
|
|
21
|
+
const words = [...argv];
|
|
22
|
+
let command = words.shift() ?? 'help';
|
|
23
|
+
if (command === '--help' || command === '-h')
|
|
24
|
+
command = 'help';
|
|
25
|
+
if (['skills', 'context', 'memory', 'workflow', 'handoff', 'tokens', 'test'].includes(command))
|
|
26
|
+
command += ` ${words.shift() ?? ''}`;
|
|
27
|
+
const specification = specs[command];
|
|
28
|
+
if (!specification)
|
|
29
|
+
throw new Error(`Unknown command: ${command}. Use tevra-design help.`);
|
|
30
|
+
const result = parseArgs({ args: words, options: { ...specification, root: string, help: boolean }, allowPositionals: true, strict: true });
|
|
31
|
+
if (!result.values.help && command !== 'help') {
|
|
32
|
+
const single = ['skills inspect', 'workflow run', 'context migrate', 'context update', 'memory update', 'workflow status', 'workflow start', 'workflow complete', 'workflow fail', 'workflow approve', 'handoff validate', 'handoff save'];
|
|
33
|
+
const count = result.positionals.length;
|
|
34
|
+
if (single.includes(command) ? count !== 1 : ['plan', 'workflow plan', 'search'].includes(command) ? count < 1 : command === 'validate' ? count > 1 : count !== 0)
|
|
35
|
+
throw new Error(`Unexpected positional arguments for ${command}`);
|
|
36
|
+
}
|
|
37
|
+
return { command: result.values.help ? 'help' : command, positional: result.positionals, flags: result.values };
|
|
38
|
+
}
|
|
39
|
+
export function flag(args, name, fallback) {
|
|
40
|
+
const value = args.flags[name];
|
|
41
|
+
if (typeof value === 'string')
|
|
42
|
+
return value;
|
|
43
|
+
if (fallback !== undefined)
|
|
44
|
+
return fallback;
|
|
45
|
+
throw new Error(`--${name} is required`);
|
|
46
|
+
}
|
|
47
|
+
export function numeric(args, name, fallback) {
|
|
48
|
+
const value = Number(flag(args, name, fallback?.toString()));
|
|
49
|
+
if (!Number.isFinite(value))
|
|
50
|
+
throw new Error(`--${name} must be a finite number`);
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
export function inputPath(args) {
|
|
54
|
+
if (args.positional.length !== 1 || !args.positional[0])
|
|
55
|
+
throw new Error('Expected exactly one project-relative input file');
|
|
56
|
+
return args.positional[0];
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=arguments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arguments.js","sourceRoot":"","sources":["../../../../packages/cli/src/arguments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,SAAS,EAAW,CAAC;AAC7C,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAW,CAAC;AAC3C,MAAM,KAAK,GAAmE;IAC5E,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE;IACzI,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,gBAAgB,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;IACxO,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAA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MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAAC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5E,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC5C,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,cAAc,CAAC,CAAC;AAC3C,CAAC;AACD,MAAM,UAAU,OAAO,CAAC,IAAe,EAAE,IAAY,EAAE,QAAiB;IACtE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,0BAA0B,CAAC,CAAC;IAAC,OAAO,KAAK,CAAC;AAClG,CAAC;AACD,MAAM,UAAU,SAAS,CAAC,IAAe;IACvC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IAC7H,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { existsSync, realpathSync } from 'node:fs';
|
|
5
|
+
import { auditPerformance } from '../../performance-qa/src/index.js';
|
|
6
|
+
import { loadConfig } from '../../core/src/config.js';
|
|
7
|
+
import { loadContext } from '../../design-context/src/index.js';
|
|
8
|
+
import { loadRegistry, registryGraph, validateBundledProvenance } from '../../registry/src/index.js';
|
|
9
|
+
import { safePath } from '../../filesystem/src/index.js';
|
|
10
|
+
import { discoverSkills } from '../../core/src/skills.js';
|
|
11
|
+
import { installSkills } from '../../core/src/install.js';
|
|
12
|
+
import { searchPatterns } from '../../core/src/search.js';
|
|
13
|
+
import { projectRoot, redact } from '../../filesystem/src/index.js';
|
|
14
|
+
import { kitRoot } from '../../filesystem/src/resources.js';
|
|
15
|
+
import { parseCLI, flag, numeric } from './arguments.js';
|
|
16
|
+
import { agents, projectCommand } from './project-commands.js';
|
|
17
|
+
import { runCommand } from './run-command.js';
|
|
18
|
+
import { workflowCommand } from './workflow-commands.js';
|
|
19
|
+
import { visualCommand } from './visual-commands.js';
|
|
20
|
+
const help = `Tevra Design Kit — local agent skills and evidence tools
|
|
21
|
+
|
|
22
|
+
tevra-design init [--yes --agents codex,claude,cursor,kiro,gemini,copilot,opencode,windsurf | --skip-skills]
|
|
23
|
+
tevra-design doctor [--launch]
|
|
24
|
+
tevra-design analyze
|
|
25
|
+
tevra-design skills list|check|validate|graph [--registry extension.json]
|
|
26
|
+
tevra-design skills inspect <name> [--registry extension.json]
|
|
27
|
+
tevra-design skills install --agents codex,claude,cursor,kiro,gemini,copilot,opencode,windsurf [--dry-run]
|
|
28
|
+
tevra-design validate [design-context.json]
|
|
29
|
+
tevra-design context show|validate
|
|
30
|
+
tevra-design context migrate <legacy.json> [--out .tevra/migrated-context.json --owner name]
|
|
31
|
+
tevra-design context update <candidate.json> --revision N [--approve-constraints]
|
|
32
|
+
tevra-design memory list|inspect|reset [--yes]
|
|
33
|
+
tevra-design memory update <entry.json> --revision N
|
|
34
|
+
tevra-design search "query" [--category ux --limit 5]
|
|
35
|
+
tevra-design plan "request" [--mode quick|standard|full --max-steps 12 --max-minutes 60 --max-refinements 2]
|
|
36
|
+
tevra-design workflow plan "request" [--mode quick|standard|full]
|
|
37
|
+
tevra-design workflow run <plan.json> [--allow-network]
|
|
38
|
+
tevra-design workflow status <plan.json>
|
|
39
|
+
tevra-design workflow start|complete|fail <plan.json> --skill name [--evidence file1,file2]
|
|
40
|
+
tevra-design workflow approve <plan.json> --by human-name --yes
|
|
41
|
+
tevra-design handoff validate|save <handoff.json>
|
|
42
|
+
tevra-design tokens generate --new-system [--brand '#175a44']
|
|
43
|
+
tevra-design tokens export
|
|
44
|
+
tevra-design capture [--kind current|baseline --approve-baseline]
|
|
45
|
+
tevra-design compare
|
|
46
|
+
tevra-design test browser|visual|accessibility [--allow-custom-browser]
|
|
47
|
+
tevra-design test performance --allow-network [--lcp-ms 2500 --cls 0.1 --tbt-ms 200]
|
|
48
|
+
tevra-design a11y
|
|
49
|
+
tevra-design report|review [--checks checks.json --out .tevra/reports/quality.md]
|
|
50
|
+
|
|
51
|
+
Every command accepts --root <project-directory>. Paths are project-relative.
|
|
52
|
+
Custom executable paths require --allow-custom-browser on doctor/capture/a11y/review.
|
|
53
|
+
Exit: 0 success, 1 quality/check failure, 2 input/environment error.
|
|
54
|
+
The CLI executes local QA adapters; your coding agent executes design/implementation instructions.
|
|
55
|
+
`;
|
|
56
|
+
export async function run(argv) {
|
|
57
|
+
try {
|
|
58
|
+
const args = parseCLI(argv);
|
|
59
|
+
if (args.command === 'help') {
|
|
60
|
+
process.stdout.write(help);
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
const root = await projectRoot(flag(args, 'root', process.cwd()));
|
|
64
|
+
let result;
|
|
65
|
+
if (['skills list', 'skills inspect', 'skills validate', 'skills graph'].includes(args.command)) {
|
|
66
|
+
const extension = typeof args.flags.registry === 'string' ? [await safePath(root, args.flags.registry)] : [];
|
|
67
|
+
const registry = await loadRegistry(extension);
|
|
68
|
+
if (args.command === 'skills inspect') {
|
|
69
|
+
const name = args.positional[0];
|
|
70
|
+
const entry = registry.skills.find(skill => skill.name === name || skill.id === name);
|
|
71
|
+
if (!entry)
|
|
72
|
+
throw new Error(`Unknown skill: ${name}`);
|
|
73
|
+
result = entry;
|
|
74
|
+
}
|
|
75
|
+
else if (args.command === 'skills graph')
|
|
76
|
+
result = { format: 'mermaid', graph: registryGraph(registry) };
|
|
77
|
+
else if (args.command === 'skills validate') {
|
|
78
|
+
await validateBundledProvenance(registry);
|
|
79
|
+
const canonical = await discoverSkills(resolve(kitRoot(), 'skills'));
|
|
80
|
+
for (const skill of canonical)
|
|
81
|
+
if (!registry.skills.some(entry => entry.name === skill.name))
|
|
82
|
+
throw new Error(`Unregistered skill ${skill.name}`);
|
|
83
|
+
result = { valid: true, count: registry.skills.length };
|
|
84
|
+
}
|
|
85
|
+
else
|
|
86
|
+
result = registry.skills;
|
|
87
|
+
}
|
|
88
|
+
else if (args.command === 'skills check')
|
|
89
|
+
result = await discoverSkills(resolve(kitRoot(), 'skills'));
|
|
90
|
+
else if (args.command === 'skills install')
|
|
91
|
+
result = await installSkills(root, agents(flag(args, 'agents', 'codex')), args.flags['dry-run'] === true);
|
|
92
|
+
else if (args.command === 'search')
|
|
93
|
+
result = await searchPatterns(args.positional.join(' '), typeof args.flags.category === 'string' ? args.flags.category : undefined, numeric(args, 'limit', 5));
|
|
94
|
+
else if (args.command === 'test performance') {
|
|
95
|
+
const outcome = await auditPerformance(root, await loadConfig(root), (await loadContext(root)).revision, {
|
|
96
|
+
allowNetwork: args.flags['allow-network'] === true, allowCustomBrowser: args.flags['allow-custom-browser'] === true,
|
|
97
|
+
budgets: { lcpMs: numeric(args, 'lcp-ms', 2500), cls: numeric(args, 'cls', 0.1), tbtMs: numeric(args, 'tbt-ms', 200) }
|
|
98
|
+
});
|
|
99
|
+
process.stdout.write(`${redact(JSON.stringify(outcome, null, 2))}\n`);
|
|
100
|
+
return outcome.checks.some(check => check.status === 'failed') ? 1 : 0;
|
|
101
|
+
}
|
|
102
|
+
else if (['test browser', 'test visual', 'test accessibility'].includes(args.command)) {
|
|
103
|
+
const command = args.command === 'test visual' ? 'review' : args.command === 'test browser' ? 'browser' : 'a11y';
|
|
104
|
+
const outcome = await visualCommand({ ...args, command }, root);
|
|
105
|
+
process.stdout.write(`${redact(JSON.stringify(outcome.result, null, 2))}\n`);
|
|
106
|
+
return outcome.failed ? 1 : 0;
|
|
107
|
+
}
|
|
108
|
+
else if (['capture', 'compare', 'a11y', 'report', 'review'].includes(args.command)) {
|
|
109
|
+
const outcome = await visualCommand(args, root);
|
|
110
|
+
process.stdout.write(`${redact(JSON.stringify(outcome.result, null, 2))}\n`);
|
|
111
|
+
return outcome.failed ? 1 : 0;
|
|
112
|
+
}
|
|
113
|
+
else if (args.command === 'workflow run') {
|
|
114
|
+
const outcome = await runCommand(args, root);
|
|
115
|
+
process.stdout.write(`${redact(JSON.stringify(outcome, null, 2))}\n`);
|
|
116
|
+
return typeof outcome === 'object' && outcome !== null && 'status' in outcome && outcome.status === 'passed' ? 0 : 1;
|
|
117
|
+
}
|
|
118
|
+
else if (args.command === 'plan' || args.command.startsWith('workflow ') || args.command.startsWith('handoff '))
|
|
119
|
+
result = await workflowCommand(args, root);
|
|
120
|
+
else
|
|
121
|
+
result = await projectCommand(args, root);
|
|
122
|
+
process.stdout.write(`${redact(JSON.stringify(result, null, 2))}\n`);
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
process.stderr.write(`${redact(error instanceof Error ? error.message : String(error))}\n`);
|
|
127
|
+
return 2;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (process.argv[1] && existsSync(process.argv[1]) && fileURLToPath(import.meta.url) === realpathSync(process.argv[1]))
|
|
131
|
+
process.exitCode = await run(process.argv.slice(2));
|
|
132
|
+
//# sourceMappingURL=index.js.map
|