@urbicon-ui/design-engine 6.1.8

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/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # @urbicon-ui/design-engine
2
+
3
+ The deterministic core of the Urbicon UI **design loop** — extracted from
4
+ `@urbicon-ui/mcp-server` so one engine can back the MCP server, a CLI, and editor
5
+ hooks alike.
6
+
7
+ **Zero runtime dependencies.** Pure TypeScript over Web/Node built-ins; no framework,
8
+ no parser, no third-party packages.
9
+
10
+ ## Modules
11
+
12
+ Each module is independent and also available as a subpath export.
13
+
14
+ | Import | What it does | Question it answers |
15
+ | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
16
+ | `@urbicon-ui/design-engine/linter` | Two-axis design linter: deterministic **correctness** rules (token whitelist, `dark:`/`focus:`, z-index, dynamic classes) + system-agnostic **slop-floor** heuristics (generic fonts, animated dimensions, grey-on-colour, touch targets, …) | _Is it correct — and does it look generic?_ |
17
+ | `@urbicon-ui/design-engine/manifest` | Parse/edit `design.manifest.md` (product intent, token overrides, pattern usages, ADRs) + the validation-history ndjson; scan `data-design-pattern` markers | _What has this project decided?_ |
18
+ | `@urbicon-ui/design-engine/rubric` | The eight-criterion design-quality rubric | _Is it good?_ (judged) |
19
+
20
+ The package root (`@urbicon-ui/design-engine`) re-exports all three.
21
+
22
+ ```ts
23
+ import { lintDesign } from '@urbicon-ui/design-engine/linter';
24
+ import { parseManifest, scanMarkers } from '@urbicon-ui/design-engine/manifest';
25
+ import { RUBRIC_CRITERIA, renderRubric } from '@urbicon-ui/design-engine/rubric';
26
+ ```
27
+
28
+ ## Notes
29
+
30
+ - Shipped as TypeScript source (no build step), like the rest of the Urbicon UI
31
+ tooling — consume it with a TypeScript-aware runtime (Bun) or bundler.
32
+ - The linter's token whitelist is drift-guarded against the real CSS sources via a
33
+ test; keep it in sync when foundation/semantic tokens change.
34
+
35
+ See [docs/internal/DESIGN-MCP.md](../../docs/internal/DESIGN-MCP.md) (as-built design loop)
36
+ and [DESIGN-MCP-V2.md](../../docs/internal/DESIGN-MCP-V2.md) (package-centric architecture).
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@urbicon-ui/design-engine",
3
+ "version": "6.1.8",
4
+ "description": "Deterministic design engine for Urbicon UI — the zero-dependency design linter, manifest parser and quality rubric that power the design loop (validate · context · judge).",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://codeberg.org/urbicon/ui.git",
9
+ "directory": "packages/design-engine"
10
+ },
11
+ "homepage": "https://ui.urbicon.de",
12
+ "bugs": "https://codeberg.org/urbicon/ui/issues",
13
+ "keywords": [
14
+ "design-system",
15
+ "linter",
16
+ "design-tokens",
17
+ "urbicon-ui",
18
+ "ai"
19
+ ],
20
+ "type": "module",
21
+ "main": "./src/index.ts",
22
+ "types": "./src/index.ts",
23
+ "sideEffects": false,
24
+ "exports": {
25
+ ".": "./src/index.ts",
26
+ "./linter": "./src/linter/index.ts",
27
+ "./manifest": "./src/manifest/index.ts",
28
+ "./rubric": "./src/rubric/index.ts",
29
+ "./search": "./src/search/index.ts"
30
+ },
31
+ "files": [
32
+ "src",
33
+ "README.md"
34
+ ],
35
+ "scripts": {
36
+ "build": "echo 'no build needed — Bun runs TypeScript directly'",
37
+ "check": "tsc --noEmit",
38
+ "test": "vitest",
39
+ "test:run": "vitest run"
40
+ },
41
+ "devDependencies": {
42
+ "typescript": "^6.0.3",
43
+ "@types/node": "^25.9.3",
44
+ "vitest": "^4.1.9"
45
+ },
46
+ "author": "Urbicon UI Team"
47
+ }
package/src/index.ts ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `@urbicon-ui/design-engine` — the deterministic core of the Urbicon UI design loop.
3
+ *
4
+ * Zero runtime dependencies. Three independent modules, each also available as a
5
+ * subpath export (`@urbicon-ui/design-engine/{linter,manifest,rubric}`):
6
+ *
7
+ * - **linter** — the engine behind `validate_design`: deterministic rules + the
8
+ * token whitelist + distribution heuristics ("is it correct?").
9
+ * - **manifest** — the persistent design-intent layer: parse/edit `design.manifest.md`
10
+ * and scan `data-design-pattern` markers ("what has this project decided?").
11
+ * - **rubric** — the eight-criterion design-quality rubric ("is it good?", judged).
12
+ * - **search** — the component-catalog schema, discovery ranker, and `llm.txt`
13
+ * section parser shared by the CLI's `find`/`get-component` and the
14
+ * MCP server's `find_components`/`get_component`.
15
+ *
16
+ * Extracted from `@urbicon-ui/mcp-server` so the same engine can back the MCP server,
17
+ * a CLI, and editor hooks. See docs/internal/DESIGN-MCP-V2.md.
18
+ */
19
+
20
+ export * from './linter/index.js';
21
+ export * from './manifest/index.js';
22
+ export * from './rubric/index.js';
23
+ export * from './search/index.js';