ui-gateway 0.1.0 → 0.1.2
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/AGENTS.md +41 -6
- package/BENCHMARK.md +141 -0
- package/CHANGELOG.md +200 -2
- package/CONTRIBUTING.md +48 -6
- package/NON-GOALS.md +9 -6
- package/README.md +148 -38
- package/SECURITY.md +22 -1
- package/SKILL.md +71 -17
- package/action.yml +90 -0
- package/dist/evals/src/baseline.d.ts +4 -1
- package/dist/evals/src/baseline.d.ts.map +1 -1
- package/dist/evals/src/baseline.js +28 -6
- package/dist/evals/src/baseline.js.map +1 -1
- package/dist/evals/src/metrics.d.ts +35 -0
- package/dist/evals/src/metrics.d.ts.map +1 -1
- package/dist/evals/src/metrics.js +24 -0
- package/dist/evals/src/metrics.js.map +1 -1
- package/dist/packages/adapters/src/angular/index.js +2 -2
- package/dist/packages/adapters/src/angular/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/angular/manifest.js +2 -8
- package/dist/packages/adapters/src/angular/manifest.js.map +1 -1
- package/dist/packages/adapters/src/antd/index.js +2 -2
- package/dist/packages/adapters/src/antd/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/antd/manifest.js +2 -8
- package/dist/packages/adapters/src/antd/manifest.js.map +1 -1
- package/dist/packages/adapters/src/bootstrap/index.js +2 -2
- package/dist/packages/adapters/src/bootstrap/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/bootstrap/manifest.js +2 -8
- package/dist/packages/adapters/src/bootstrap/manifest.js.map +1 -1
- package/dist/packages/adapters/src/chakra/index.d.ts.map +1 -1
- package/dist/packages/adapters/src/chakra/index.js +30 -5
- package/dist/packages/adapters/src/chakra/index.js.map +1 -1
- package/dist/packages/adapters/src/chakra/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/chakra/manifest.js +309 -10
- package/dist/packages/adapters/src/chakra/manifest.js.map +1 -1
- package/dist/packages/adapters/src/index.d.ts +4 -0
- package/dist/packages/adapters/src/index.d.ts.map +1 -1
- package/dist/packages/adapters/src/index.js +18 -14
- package/dist/packages/adapters/src/index.js.map +1 -1
- package/dist/packages/adapters/src/local.d.ts.map +1 -1
- package/dist/packages/adapters/src/local.js +4 -2
- package/dist/packages/adapters/src/local.js.map +1 -1
- package/dist/packages/adapters/src/mantine/index.js +3 -3
- package/dist/packages/adapters/src/mantine/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/mantine/manifest.js +8 -21
- package/dist/packages/adapters/src/mantine/manifest.js.map +1 -1
- package/dist/packages/adapters/src/mui/index.js +3 -3
- package/dist/packages/adapters/src/mui/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/mui/manifest.js +2 -11
- package/dist/packages/adapters/src/mui/manifest.js.map +1 -1
- package/dist/packages/adapters/src/nuxt-ui/index.d.ts +5 -0
- package/dist/packages/adapters/src/nuxt-ui/index.d.ts.map +1 -0
- package/dist/packages/adapters/src/nuxt-ui/index.js +79 -0
- package/dist/packages/adapters/src/nuxt-ui/index.js.map +1 -0
- package/dist/packages/adapters/src/nuxt-ui/manifest.d.ts +3 -0
- package/dist/packages/adapters/src/nuxt-ui/manifest.d.ts.map +1 -0
- package/dist/packages/adapters/src/nuxt-ui/manifest.js +295 -0
- package/dist/packages/adapters/src/nuxt-ui/manifest.js.map +1 -0
- package/dist/packages/adapters/src/radix/index.d.ts +5 -0
- package/dist/packages/adapters/src/radix/index.d.ts.map +1 -0
- package/dist/packages/adapters/src/radix/index.js +71 -0
- package/dist/packages/adapters/src/radix/index.js.map +1 -0
- package/dist/packages/adapters/src/radix/manifest.d.ts +3 -0
- package/dist/packages/adapters/src/radix/manifest.d.ts.map +1 -0
- package/dist/packages/adapters/src/radix/manifest.js +331 -0
- package/dist/packages/adapters/src/radix/manifest.js.map +1 -0
- package/dist/packages/adapters/src/registry.d.ts +1 -1
- package/dist/packages/adapters/src/registry.d.ts.map +1 -1
- package/dist/packages/adapters/src/registry.js +16 -12
- package/dist/packages/adapters/src/registry.js.map +1 -1
- package/dist/packages/adapters/src/shadcn/index.js +3 -3
- package/dist/packages/adapters/src/shadcn/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/shadcn/manifest.js +2 -11
- package/dist/packages/adapters/src/shadcn/manifest.js.map +1 -1
- package/dist/packages/adapters/src/solid/index.js +2 -2
- package/dist/packages/adapters/src/solid/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/solid/manifest.js +2 -8
- package/dist/packages/adapters/src/solid/manifest.js.map +1 -1
- package/dist/packages/adapters/src/svelte/index.js +2 -2
- package/dist/packages/adapters/src/svelte/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/svelte/manifest.js +2 -8
- package/dist/packages/adapters/src/svelte/manifest.js.map +1 -1
- package/dist/packages/adapters/src/vue/index.js +2 -2
- package/dist/packages/adapters/src/vue/manifest.d.ts.map +1 -1
- package/dist/packages/adapters/src/vue/manifest.js +2 -8
- package/dist/packages/adapters/src/vue/manifest.js.map +1 -1
- package/dist/packages/design-md/src/compile.js +2 -2
- package/dist/packages/design-md/src/derive.d.ts +41 -0
- package/dist/packages/design-md/src/derive.d.ts.map +1 -0
- package/dist/packages/design-md/src/derive.js +341 -0
- package/dist/packages/design-md/src/derive.js.map +1 -0
- package/dist/packages/design-md/src/index.d.ts +1 -0
- package/dist/packages/design-md/src/index.d.ts.map +1 -1
- package/dist/packages/design-md/src/index.js +6 -5
- package/dist/packages/design-md/src/index.js.map +1 -1
- package/dist/packages/gateway/src/confidence.d.ts +51 -1
- package/dist/packages/gateway/src/confidence.d.ts.map +1 -1
- package/dist/packages/gateway/src/confidence.js +198 -6
- package/dist/packages/gateway/src/confidence.js.map +1 -1
- package/dist/packages/gateway/src/gateway.d.ts +10 -2
- package/dist/packages/gateway/src/gateway.d.ts.map +1 -1
- package/dist/packages/gateway/src/gateway.js +190 -14
- package/dist/packages/gateway/src/gateway.js.map +1 -1
- package/dist/packages/gateway/src/index.d.ts +1 -0
- package/dist/packages/gateway/src/index.d.ts.map +1 -1
- package/dist/packages/gateway/src/index.js +7 -6
- package/dist/packages/gateway/src/index.js.map +1 -1
- package/dist/packages/gateway/src/preview.d.ts +12 -0
- package/dist/packages/gateway/src/preview.d.ts.map +1 -0
- package/dist/packages/gateway/src/preview.js +113 -0
- package/dist/packages/gateway/src/preview.js.map +1 -0
- package/dist/packages/gateway/src/validate.d.ts +5 -2
- package/dist/packages/gateway/src/validate.d.ts.map +1 -1
- package/dist/packages/gateway/src/validate.js +46 -18
- package/dist/packages/gateway/src/validate.js.map +1 -1
- package/dist/packages/kb/src/bundle-size.d.ts +8 -9
- package/dist/packages/kb/src/bundle-size.d.ts.map +1 -1
- package/dist/packages/kb/src/bundle-size.js +14 -12
- package/dist/packages/kb/src/bundle-size.js.map +1 -1
- package/dist/packages/kb/src/entry.d.ts +19 -1
- package/dist/packages/kb/src/entry.d.ts.map +1 -1
- package/dist/packages/kb/src/entry.js +13 -1
- package/dist/packages/kb/src/entry.js.map +1 -1
- package/dist/packages/kb/src/freshness.d.ts +76 -0
- package/dist/packages/kb/src/freshness.d.ts.map +1 -0
- package/dist/packages/kb/src/freshness.js +186 -0
- package/dist/packages/kb/src/freshness.js.map +1 -0
- package/dist/packages/kb/src/index.d.ts +2 -1
- package/dist/packages/kb/src/index.d.ts.map +1 -1
- package/dist/packages/kb/src/index.js +6 -5
- package/dist/packages/kb/src/index.js.map +1 -1
- package/dist/packages/kb/src/ingest.d.ts +3 -0
- package/dist/packages/kb/src/ingest.d.ts.map +1 -1
- package/dist/packages/kb/src/ingest.js +7 -1
- package/dist/packages/kb/src/ingest.js.map +1 -1
- package/dist/packages/kb/src/kb.d.ts +5 -0
- package/dist/packages/kb/src/kb.d.ts.map +1 -1
- package/dist/packages/kb/src/kb.js +5 -2
- package/dist/packages/kb/src/kb.js.map +1 -1
- package/dist/packages/matcher/src/anthropic.js +1 -1
- package/dist/packages/matcher/src/index.d.ts +8 -1
- package/dist/packages/matcher/src/index.d.ts.map +1 -1
- package/dist/packages/matcher/src/index.js +21 -11
- package/dist/packages/matcher/src/index.js.map +1 -1
- package/dist/packages/matcher/src/scaffold.d.ts.map +1 -1
- package/dist/packages/matcher/src/scaffold.js +62 -19
- package/dist/packages/matcher/src/scaffold.js.map +1 -1
- package/dist/packages/matcher/src/score.d.ts +8 -1
- package/dist/packages/matcher/src/score.d.ts.map +1 -1
- package/dist/packages/matcher/src/score.js +90 -25
- package/dist/packages/matcher/src/score.js.map +1 -1
- package/dist/packages/matcher/src/select.d.ts +15 -1
- package/dist/packages/matcher/src/select.d.ts.map +1 -1
- package/dist/packages/matcher/src/select.js +53 -3
- package/dist/packages/matcher/src/select.js.map +1 -1
- package/dist/packages/orchestrator/src/figma.d.ts +12 -0
- package/dist/packages/orchestrator/src/figma.d.ts.map +1 -0
- package/dist/packages/orchestrator/src/figma.js +102 -0
- package/dist/packages/orchestrator/src/figma.js.map +1 -0
- package/dist/packages/orchestrator/src/index.d.ts +1 -0
- package/dist/packages/orchestrator/src/index.d.ts.map +1 -1
- package/dist/packages/orchestrator/src/index.js +3 -2
- package/dist/packages/orchestrator/src/index.js.map +1 -1
- package/dist/packages/orchestrator/src/orchestrator.d.ts.map +1 -1
- package/dist/packages/orchestrator/src/orchestrator.js +14 -3
- package/dist/packages/orchestrator/src/orchestrator.js.map +1 -1
- package/dist/packages/profile/src/detect.d.ts +9 -0
- package/dist/packages/profile/src/detect.d.ts.map +1 -1
- package/dist/packages/profile/src/detect.js +52 -5
- package/dist/packages/profile/src/detect.js.map +1 -1
- package/dist/packages/profile/src/index.js +7 -7
- package/dist/packages/profile/src/local-components.d.ts.map +1 -1
- package/dist/packages/profile/src/local-components.js +70 -1
- package/dist/packages/profile/src/local-components.js.map +1 -1
- package/dist/packages/profile/src/registry.d.ts.map +1 -1
- package/dist/packages/profile/src/registry.js +3 -1
- package/dist/packages/profile/src/registry.js.map +1 -1
- package/dist/packages/profile/src/skills.js +1 -1
- package/dist/packages/protocol/src/errors.js +1 -1
- package/dist/packages/protocol/src/errors.js.map +1 -1
- package/dist/packages/protocol/src/event-log.d.ts.map +1 -1
- package/dist/packages/protocol/src/event-log.js +11 -5
- package/dist/packages/protocol/src/event-log.js.map +1 -1
- package/dist/packages/protocol/src/events.js +5 -5
- package/dist/packages/protocol/src/hashing.d.ts +6 -0
- package/dist/packages/protocol/src/hashing.d.ts.map +1 -1
- package/dist/packages/protocol/src/hashing.js +8 -2
- package/dist/packages/protocol/src/hashing.js.map +1 -1
- package/dist/packages/protocol/src/index.js +12 -12
- package/dist/packages/protocol/src/lease.js +2 -2
- package/dist/packages/protocol/src/schemas.d.ts +2803 -116
- package/dist/packages/protocol/src/schemas.d.ts.map +1 -1
- package/dist/packages/protocol/src/schemas.js +54 -4
- package/dist/packages/protocol/src/schemas.js.map +1 -1
- package/dist/packages/protocol/src/semantic.js +1 -1
- package/dist/packages/protocol/src/state-machine.js +1 -1
- package/dist/packages/transports/src/check.d.ts +30 -0
- package/dist/packages/transports/src/check.d.ts.map +1 -0
- package/dist/packages/transports/src/check.js +190 -0
- package/dist/packages/transports/src/check.js.map +1 -0
- package/dist/packages/transports/src/cli.d.ts +1 -1
- package/dist/packages/transports/src/cli.js +278 -25
- package/dist/packages/transports/src/cli.js.map +1 -1
- package/dist/packages/transports/src/exit-codes.d.ts +8 -0
- package/dist/packages/transports/src/exit-codes.d.ts.map +1 -0
- package/dist/packages/transports/src/exit-codes.js +19 -0
- package/dist/packages/transports/src/exit-codes.js.map +1 -0
- package/dist/packages/transports/src/http.js +2 -2
- package/dist/packages/transports/src/http.js.map +1 -1
- package/dist/packages/transports/src/index.d.ts +5 -0
- package/dist/packages/transports/src/index.d.ts.map +1 -1
- package/dist/packages/transports/src/index.js +11 -6
- package/dist/packages/transports/src/index.js.map +1 -1
- package/dist/packages/transports/src/init.d.ts +32 -0
- package/dist/packages/transports/src/init.d.ts.map +1 -0
- package/dist/packages/transports/src/init.js +110 -0
- package/dist/packages/transports/src/init.js.map +1 -0
- package/dist/packages/transports/src/mcp-config.d.ts +27 -0
- package/dist/packages/transports/src/mcp-config.d.ts.map +1 -0
- package/dist/packages/transports/src/mcp-config.js +99 -0
- package/dist/packages/transports/src/mcp-config.js.map +1 -0
- package/dist/packages/transports/src/mcp.js +3 -3
- package/dist/packages/transports/src/paths.d.ts +9 -0
- package/dist/packages/transports/src/paths.d.ts.map +1 -0
- package/dist/packages/transports/src/paths.js +32 -0
- package/dist/packages/transports/src/paths.js.map +1 -0
- package/dist/packages/transports/src/receipt.d.ts +8 -0
- package/dist/packages/transports/src/receipt.d.ts.map +1 -0
- package/dist/packages/transports/src/receipt.js +87 -0
- package/dist/packages/transports/src/receipt.js.map +1 -0
- package/dist/packages/transports/src/resources.js +3 -3
- package/dist/packages/transports/src/resources.js.map +1 -1
- package/dist/packages/transports/src/tools.d.ts.map +1 -1
- package/dist/packages/transports/src/tools.js +284 -10
- package/dist/packages/transports/src/tools.js.map +1 -1
- package/dist/packages/verifier/src/index.js +7 -7
- package/dist/packages/verifier/src/lint.js +1 -1
- package/dist/packages/verifier/src/page.js +2 -2
- package/dist/packages/verifier/src/render-axe.js +1 -1
- package/dist/packages/verifier/src/verify.js +4 -4
- package/dist/scripts/build-site.d.ts +2 -0
- package/dist/scripts/build-site.d.ts.map +1 -0
- package/dist/scripts/build-site.js +254 -0
- package/dist/scripts/build-site.js.map +1 -0
- package/dist/scripts/calibration.js +33 -2
- package/dist/scripts/calibration.js.map +1 -1
- package/dist/scripts/fix-imports.js +32 -2
- package/dist/scripts/fix-imports.js.map +1 -1
- package/dist/scripts/generate-kb.d.ts +3 -0
- package/dist/scripts/generate-kb.d.ts.map +1 -0
- package/dist/scripts/generate-kb.js +195 -0
- package/dist/scripts/generate-kb.js.map +1 -0
- package/dist/scripts/generate-refusal-catalog.d.ts +3 -0
- package/dist/scripts/generate-refusal-catalog.d.ts.map +1 -0
- package/dist/scripts/generate-refusal-catalog.js +50 -0
- package/dist/scripts/generate-refusal-catalog.js.map +1 -0
- package/dist/scripts/generate-tool-docs.d.ts +3 -0
- package/dist/scripts/generate-tool-docs.d.ts.map +1 -0
- package/dist/scripts/generate-tool-docs.js +24 -0
- package/dist/scripts/generate-tool-docs.js.map +1 -0
- package/dist/scripts/mcp-config.js +28 -60
- package/dist/scripts/mcp-config.js.map +1 -1
- package/docs/archive/UI Gateway Final Project Roadmap.md +285 -0
- package/docs/benchmarks/external-repos.json +26 -0
- package/docs/benchmarks/local-gemma3-1b-stride32.json +455 -0
- package/docs/calibration.svg +44 -0
- package/docs/design-import.md +19 -0
- package/docs/design-md.md +109 -0
- package/docs/distribution.md +41 -0
- package/docs/engineering-principles.md +152 -0
- package/docs/layers-plan.md +372 -0
- package/docs/metrics.md +153 -0
- package/docs/modes.md +22 -0
- package/docs/parking-lot.md +25 -0
- package/docs/quickstart.md +72 -0
- package/docs/refusal-catalog.md +32 -0
- package/docs/spike-source-discovery.md +36 -0
- package/docs/telemetry.md +26 -0
- package/evals/fixtures/external-repos.json +55 -0
- package/evals/fixtures/kb-generated/angular.json +72 -0
- package/evals/fixtures/kb-generated/antd.json +72 -0
- package/evals/fixtures/kb-generated/bootstrap.json +72 -0
- package/evals/fixtures/kb-generated/chakra.json +14939 -0
- package/evals/fixtures/kb-generated/mantine.json +192 -0
- package/evals/fixtures/kb-generated/mui.json +8997 -0
- package/evals/fixtures/kb-generated/shadcn.json +192 -0
- package/evals/fixtures/kb-generated/solid.json +72 -0
- package/evals/fixtures/kb-generated/svelte.json +72 -0
- package/evals/fixtures/kb-generated/vue.json +72 -0
- package/evals/fixtures/projects/existing-chakra-v3/package.json +10 -0
- package/evals/fixtures/projects/existing-nuxt-ui/package.json +9 -0
- package/evals/fixtures/projects/existing-radix/package.json +9 -0
- package/evals/out/agent-report.json +190 -11
- package/evals/out/baseline-report.json +1441 -387
- package/evals/out/calibration.json +387 -42
- package/evals/out/external-repos-report.json +112 -0
- package/evals/out/local-benchmark-report.json +455 -0
- package/evals/src/agent-eval.test.ts +3 -0
- package/evals/src/agent-eval.ts +26 -4
- package/evals/src/baseline.ts +48 -7
- package/evals/src/blind-labeling-cli.ts +5 -0
- package/evals/src/blind-labeling.ts +46 -0
- package/evals/src/external-repos.ts +179 -0
- package/evals/src/metrics.ts +70 -0
- package/evals/src/mutations.ts +6 -6
- package/evals/src/page-a11y-eval.ts +37 -36
- package/evals/src/page-real-eval.ts +8 -7
- package/evals/src/plain-agent.test.ts +14 -0
- package/evals/src/plain-agent.ts +240 -0
- package/evals/src/run-agent-evals.ts +3 -0
- package/evals/src/run-external-repos.ts +43 -0
- package/evals/src/run-local-benchmark.ts +105 -0
- package/evals/src/run-plain-agent.ts +81 -0
- package/examples/README.md +32 -0
- package/examples/build-handoff.ts +106 -0
- package/examples/design-md.md +24 -0
- package/examples/handoff-input.json +59 -0
- package/examples/handoff.json +216 -0
- package/examples/layer-operations.json +18 -0
- package/examples/website-demo-handoff.json +580 -0
- package/package.json +30 -7
- package/references/design-md.md +3 -1
- package/references/errors.md +1 -1
- package/references/handoff.md +16 -1
- package/references/outcomes.md +60 -11
- package/references/patterns.md +3 -3
- package/references/tools.md +86 -27
- package/scripts/action-review.mjs +59 -0
- package/scripts/bench-latency.ts +90 -0
- package/scripts/build-site.ts +324 -0
- package/scripts/calibration.ts +50 -14
- package/scripts/fix-imports.ts +31 -2
- package/scripts/generate-kb.ts +214 -0
- package/scripts/generate-refusal-catalog.ts +58 -0
- package/scripts/generate-tool-docs.ts +31 -0
- package/scripts/mcp-config.ts +26 -83
- package/scripts/package-plugin.mjs +50 -0
- package/scripts/sbom.mjs +46 -0
- package/scripts/visual-diff.mjs +52 -0
- package/site/data.json +187 -0
- package/site/index.html +151 -0
- package/skills/ui-gateway-cli/SKILL.md +41 -0
- package/templates/next-shadcn/.github/workflows/ui-check.yml +14 -0
- package/templates/next-shadcn/.mcp.json +8 -0
- package/templates/next-shadcn/DESIGN.md +35 -0
- package/templates/next-shadcn/README.md +14 -0
- package/templates/next-shadcn/app/page.tsx +8 -0
- package/templates/next-shadcn/package.json +19 -0
- package/templates/vite-mantine/.github/workflows/ui-check.yml +14 -0
- package/templates/vite-mantine/.mcp.json +8 -0
- package/templates/vite-mantine/DESIGN.md +30 -0
- package/templates/vite-mantine/README.md +7 -0
- package/templates/vite-mantine/package.json +21 -0
- package/templates/vite-mantine/src/App.tsx +10 -0
- package/templates/vite-mui/.github/workflows/ui-check.yml +14 -0
- package/templates/vite-mui/.mcp.json +8 -0
- package/templates/vite-mui/DESIGN.md +30 -0
- package/templates/vite-mui/README.md +8 -0
- package/templates/vite-mui/package.json +22 -0
- package/templates/vite-mui/src/App.tsx +12 -0
- package/scripts/fetch-bundle-sizes.ts +0 -106
- package/scripts/test-bundlephobia.ts +0 -11
package/docs/metrics.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Metric definitions and thresholds
|
|
2
|
+
|
|
3
|
+
Thresholds were written down in `evals/fixtures/thresholds.json` before the first eval run. They are pre-registered: changing them after seeing a result requires a written reason in the same commit.
|
|
4
|
+
|
|
5
|
+
## Definitions
|
|
6
|
+
|
|
7
|
+
| Metric | Definition | Direction |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Schema validity | share of results that validate against `GatewayResultSchema` | ≥ 1.0 |
|
|
10
|
+
| Hallucination rate | predicted component ids that are not in the KB, over all predicted ids | ≤ 0.0 |
|
|
11
|
+
| Constraint violation rate | items whose verifier found any failed check | ≤ 0.0 |
|
|
12
|
+
| Acceptable-set hit rate | top predicted id ∈ the labeled acceptable set | ≥ 0.7 |
|
|
13
|
+
| Silent-wrong rate | top id not acceptable **and** computed confidence ≥ 0.8 | ≤ 0.1 |
|
|
14
|
+
| Abstention rate | items with no predicted id | reported |
|
|
15
|
+
| Verifier recall | injected bad scaffolds rejected by the verifier | tracked, measured by the mutation suites |
|
|
16
|
+
|
|
17
|
+
`acceptable_set_hit_rate` is reported with a Wilson 95% interval. With 172 items at 98.8% the interval is roughly 0.96–1.00: trust large gaps, not small ones.
|
|
18
|
+
|
|
19
|
+
## Pre-registered thresholds
|
|
20
|
+
|
|
21
|
+
| Metric | Threshold |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Schema validity | 1.0 |
|
|
24
|
+
| Hallucination rate | 0.0 |
|
|
25
|
+
| Constraint violation rate | 0.0 |
|
|
26
|
+
| Acceptable-set hit rate | 0.7 |
|
|
27
|
+
| Silent-wrong rate | 0.1 |
|
|
28
|
+
|
|
29
|
+
## Current run (Phase 6 set, 172 items)
|
|
30
|
+
|
|
31
|
+
`npm run eval` on 124 dev and 48 test labels across five project fixtures (`greenfield-react`, `existing-shadcn`, `existing-mui`, `existing-chakra`, `existing-mantine`):
|
|
32
|
+
|
|
33
|
+
| Arm | Hit rate (95% CI) | Hallucination | Constraint violations | Silent wrong | Abstained |
|
|
34
|
+
| --- | --- | --- | --- | --- | --- |
|
|
35
|
+
| full skill | 0.988 (0.959–0.997) | 0.00 | 0.00 | 0.012 | 0.058 |
|
|
36
|
+
| no retrieval | 0.192 (0.140–0.257) | 0.00 | 0.00 | 0.808 | 0.035 |
|
|
37
|
+
| plain generation | 0.000 (0.000–0.022) | 1.00 | 0.00 | 1.00 | 0.00 |
|
|
38
|
+
|
|
39
|
+
**Note:** The table above shows the **offline deterministic stand-in arms** (default `npm run eval`).
|
|
40
|
+
|
|
41
|
+
Real model evaluation is now available for the no-retrieval and plain arms:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Simulated behaviors (offline, no API key needed)
|
|
45
|
+
npm run eval -- --simulatedBehavior confident --modelArms all --nSamples 1
|
|
46
|
+
|
|
47
|
+
# Real Ollama/local LLM
|
|
48
|
+
npm run eval -- --local-llm http://localhost:11434,llama3 --modelArms all --nSamples 1
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
With simulated or real models, the no-retrieval and plain arms produce meaningful predictions instead of deterministic stand-ins. The full-skill arm always uses the verifier.
|
|
52
|
+
|
|
53
|
+
Coverage from the same run:
|
|
54
|
+
|
|
55
|
+
| Dimension | Count |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| dev / test | 124 / 48 |
|
|
58
|
+
| greenfield-react | 105 |
|
|
59
|
+
| existing-shadcn | 15 |
|
|
60
|
+
| existing-mui | 20 |
|
|
61
|
+
| existing-chakra | 16 |
|
|
62
|
+
| existing-mantine | 16 |
|
|
63
|
+
| acceptable labels by library | shadcn 105, MUI 17, Chakra 16, Mantine 16, local 8 |
|
|
64
|
+
| decoys (no acceptable component) | 10 |
|
|
65
|
+
|
|
66
|
+
Interpretation, stated plainly:
|
|
67
|
+
|
|
68
|
+
- 170 of 172 items hit the acceptable set. All 10 abstentions are the deliberate decoys (hero, chart, stepper, breadcrumb, toast, carousel); no component was invented for any of them, and no real item abstained.
|
|
69
|
+
- Two answered items miss their label (a Chakra label matched `badge` over `form-label`, and a Mantine chip matched `switch`). Both are high-confidence errors (0.949 and 0.948), so silent-wrong is 0.012. They are kept as recorded selector weaknesses, not relabelled to make the run green. The BM25 swap fixed the earlier Mantine text-input miss. The tabs miss it surfaced was a scaffold bug (`<Tab label>` instead of Mantine's `value` API), not a ranking error, and is now fixed.
|
|
70
|
+
- A near-tie is now resolved when exactly one close candidate declares a prop that the wireframe element names (an element called `customer-email` selects the input whose `type` includes `email`). This fixed the vague form-field abstention without moving item scores; two prop matches, or a match far behind the top two, still abstain.
|
|
71
|
+
- The set includes existing-project cases: 15 labels against the shadcn project with a local wrapper, 20 against the MUI project with a local `StatusCard`, 16 against the Chakra project and 16 against the Mantine project.
|
|
72
|
+
- The no-retrieval and plain arms are **deterministic stand-ins**, not measured Claude behaviour. Plain generation is modelled as writing `shadcn/<intent_type>` without the KB; no-retrieval as taking the first declared candidate. They demonstrate that the harness separates the arms and that the verifier catches what they produce.
|
|
73
|
+
- The Phase 6 **count gate is met** (124 dev, 48 test), and the four GA adapters (shadcn, MUI, Chakra v2/v3, Mantine) have labeled positives. Nuxt UI, Radix and the other six adapters are experimental and do not yet have labeled data. It is not the whole Phase 6 gate: the labels are author-labeled against the KB, not blind human labels. A 15% relabel pass is now available (`blind-labeling-cli.ts --relabel 0.15`, written to `self-agreement.json`), but the committed 21-item consensus is still a two-annotator pilot, not independent human labeling. Many descriptions name the component or use its exact term, so 0.988 is an optimistic upper bound until blind labeling; those steps remain open and are not claimed.
|
|
74
|
+
|
|
75
|
+
## Real model evaluation (Claude, Ollama, simulated)
|
|
76
|
+
|
|
77
|
+
`npm run eval:claude` runs the same 172 items through three model-backed arms:
|
|
78
|
+
|
|
79
|
+
- **full skill** — retrieval + Claude closed-ID selection + verifier, with verifier feedback on retry.
|
|
80
|
+
- **no retrieval** — Claude sees an unranked list of every component declaring the intent type; no retrieval scores.
|
|
81
|
+
- **plain generation** — Claude names one component id with no candidate list at all.
|
|
82
|
+
|
|
83
|
+
Requirements:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
export ANTHROPIC_API_KEY=...
|
|
87
|
+
export UIGW_CLAUDE_MODEL=claude-sonnet-5-5 # optional; pinned default
|
|
88
|
+
npm run eval:claude
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Offline alternatives (no API key required):**
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Simulated behaviors (5 modes: confident, conservative, random, intent-aware, adversarial)
|
|
95
|
+
npm run eval -- --simulatedBehavior confident --modelArms all --nSamples 1
|
|
96
|
+
|
|
97
|
+
# Real Ollama/local LLM (requires running Ollama)
|
|
98
|
+
npm run eval -- --local-llm http://localhost:11434,llama3 --modelArms all --nSamples 1
|
|
99
|
+
|
|
100
|
+
# Blind-only subset with N-sample agreement
|
|
101
|
+
npm run eval -- --simulatedBehavior confident --modelArms all --nSamples 3 --blindOnly
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
One sample per item (`UIGW_EVAL_LIMIT=N` restricts to the first N items for a smoke run; `UIGW_EVAL_STRIDE=N` evaluates every Nth item, which keeps a sample across all fixtures when a provider rate limit makes a full run impractical). The report records the sampling in its notes. The report is written to `evals/out/baseline-report.json` and records `model_info` so the run is reproducible. The no-retrieval and plain arms do not run the verifier; only the full arm does.
|
|
105
|
+
|
|
106
|
+
**Status in this workspace:** Real Claude baseline not recorded (no `ANTHROPIC_API_KEY`). One real-model run is recorded below. The plain-agent code arm is implemented in `evals/src/plain-agent.ts` and requires a key; see `BENCHMARK.md` for the pre-registered decision rule.
|
|
107
|
+
|
|
108
|
+
### Recorded Groq run (`qwen/qwen3.8-27b`)
|
|
109
|
+
|
|
110
|
+
The workspace `.env` supplies `GROQ_API_KEY`; the provider's rate limit makes a full 516-call run impractical, so this is a **stratified sample**: every 8th item, 22 of 172, spanning all three arms and all five fixtures (`evals/out/groq-baseline-report.json`).
|
|
111
|
+
|
|
112
|
+
| Arm | Hit rate | Hallucination | Constraint violations | Silent wrong | Abstained |
|
|
113
|
+
| --- | --- | --- | --- | --- | --- |
|
|
114
|
+
| full skill | 1.000 (0.85–1.00) | 0.00 | 0.00 | 0.00 | 0.045 |
|
|
115
|
+
| no retrieval | 0.455 (0.27–0.65) | 0.00 | 0.00 | 0.364 | 0.182 |
|
|
116
|
+
| plain generation | 0.591 (0.39–0.77) | 0.41 | 0.00 | 0.409 | 0.00 |
|
|
117
|
+
|
|
118
|
+
- Windowed confidence intervals on 22 items are wide (±0.15); treat this as directional, not a precise baseline.
|
|
119
|
+
- The model-backed arms show the harness separates retrieval from generation: no-retrieval picks a real component but often the wrong one, and plain generation invents ids (41% hallucination) even when it guesses correctly.
|
|
120
|
+
- Self-agreement on the 4 blind items in the sample was 100% over 5 samples each.
|
|
121
|
+
- Reproduce with `UIGW_EVAL_STRIDE=8 npm run eval:groq`; the report notes record the sampling.
|
|
122
|
+
|
|
123
|
+
## How the harness works
|
|
124
|
+
|
|
125
|
+
- `evals/src/baseline.ts` builds one handoff per golden item against that item's project fixture and Design MD, submits it to a real gateway (compiler off for speed), and records the top mapping, confidence and verifier outcome. Items without `project` default to the greenfield fixture; items without `design_md_file` use the set-level Design MD. Passing `model`, `noRetrievalModel` and `plainCall` switches the three arms to a real model; the defaults keep the run offline.
|
|
126
|
+
- `evals/src/metrics.ts` computes the metrics and intervals.
|
|
127
|
+
- `evals/src/mutations.ts` is a separate recall harness: every input mutation is assigned an expected error code or outcome and must match.
|
|
128
|
+
- `packages/verifier/src/verifier.test.ts` mutates good scaffolds (invented props, imports, components, dropped elements, forbidden patterns, invalid variants) and requires rejection.
|
|
129
|
+
|
|
130
|
+
## Calibration
|
|
131
|
+
|
|
132
|
+
Confidence is computed from retrieval score, top-two margin, first-pass verification and sample agreement. The reliability curve below is generated by `npm run calibration`; it writes `docs/calibration.svg` and `evals/out/calibration.json`.
|
|
133
|
+
|
|
134
|
+

|
|
135
|
+
|
|
136
|
+
Full-skill arm only, generated from the **offline rules selector**. The model-backed full arm records the same calibration object in `claude-baseline-report.json`, but `npm run calibration` does not render that run. Abstentions are excluded from the bins because they have no top prediction; they are reported as coverage loss. Correctness means the top id is in the labeled acceptable set.
|
|
137
|
+
|
|
138
|
+
| Bin | Answered | Mean confidence | Observed accuracy | Gap |
|
|
139
|
+
| --- | --- | --- | --- | --- |
|
|
140
|
+
| 0.9–1.0 | 161 | 0.951 | 0.988 | 0.036 |
|
|
141
|
+
|
|
142
|
+
- Answered: 161 of 172; abstained: 11; coverage: 0.936.
|
|
143
|
+
- Mean confidence: 0.951; observed accuracy: 0.988 (159 of 161 answered items).
|
|
144
|
+
- **ECE: 0.036; Brier: 0.014.** The ECE target (< 0.05) is met **in-sample**.
|
|
145
|
+
- The missing-agreement default was removed: when no sample ran, the remaining weights are renormalized instead of injecting a constant 0.5.
|
|
146
|
+
- `npm run calibration` fits logistic weights on the labeled set and ships them as `DEFAULT_CONFIDENCE_WEIGHTS`; `fitted_weights` and the isotonic curve are in `evals/out/calibration.json`. The fit is on the same 161 answered items it is scored on. It is **not** evidence of out-of-sample calibration; re-fit on a held-out or blind split before claiming generalization. The raw signal range is 0.358–0.959 and both errors land at 0.948–0.949, so the high-confidence region still has almost no errors to validate the silent-wrong threshold.
|
|
147
|
+
- The isotonic ECE of 0 on its training samples is deliberately not reported as a result.
|
|
148
|
+
- The two answered errors are the recorded selector misses (Chakra label, Mantine chip) at 0.948–0.949 confidence, so the high-confidence region still has too few errors to validate the silent-wrong threshold. That requires blind labels and a set with real mistakes.
|
|
149
|
+
- The no-retrieval and plain arms hardcode confidence at 0.9, so their records are intentionally excluded from the calibration curve.
|
|
150
|
+
|
|
151
|
+
## Updating the golden set
|
|
152
|
+
|
|
153
|
+
Labels live in `evals/fixtures/golden-set.json`. Each item may name a `project` fixture and a `design_md_file`; otherwise it uses the greenfield project and the set-level Design MD. Use `npm run cli -- label <file>.jsonl` for the keyboard-only labeling loop; every orchestrator override should become a new labeled fixture (regression rule in the roadmap).
|
package/docs/modes.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Which mode do I need?
|
|
2
|
+
|
|
3
|
+
| Situation | Mode | Command / tool |
|
|
4
|
+
| --- | --- | --- |
|
|
5
|
+
| Normal agent task in a supported project | MCP submit | `map_ui` |
|
|
6
|
+
| "Which component should I use?" | MCP lookup | `map_ui({ mode: "lookup" })` |
|
|
7
|
+
| Need to inspect/edit the handoff | Granular MCP | `detect_project` → `derive_design_md` → `build_handoff` → `validate_handoff` → `submit_handoff` |
|
|
8
|
+
| No MCP client | CLI | `init --print-skill`, then `detect`, `kb`, `derive-design-md`, `build-handoff`, `validate`, `submit` |
|
|
9
|
+
| Check existing code in CI | Verifier | `ui-gateway check` or the `action.yml` GitHub Action |
|
|
10
|
+
| Figma frame → intents | Deterministic import | `ui-gateway import-figma frame.json` |
|
|
11
|
+
| Multi-process coordination | SQLite leases | `--sqlite <file>` (Node 22.5+) |
|
|
12
|
+
| Screenshot regression | Optional diff | `npm run visual:diff -- <baseline> <current>` |
|
|
13
|
+
|
|
14
|
+
`lookup` deliberately writes no lease and no event-log entry: it is a read-only
|
|
15
|
+
ranking. `submit` is idempotent per `handoff_id` + content hash.
|
|
16
|
+
|
|
17
|
+
## Adapter maturity
|
|
18
|
+
|
|
19
|
+
GA (labeled eval data): `shadcn`, `mui`, `chakra` (v2), `mantine`.
|
|
20
|
+
Experimental (no labeled data yet): `vue`, `svelte`, `angular`, `solid`,
|
|
21
|
+
`bootstrap`, `antd`. `describe_kb` returns `libraries[].maturity`, so an agent can
|
|
22
|
+
say "experimental" instead of overclaiming.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Parking lot
|
|
2
|
+
|
|
3
|
+
Reviewed only at phase boundaries. Nothing here is committed work.
|
|
4
|
+
|
|
5
|
+
- Vue / Svelte / Angular compilers (vue-tsc, svelte-check) and adapter verification.
|
|
6
|
+
- Record the real model baseline once Groq/Claude credentials allow full eval; simulated `intent-aware` baseline (92.9% hit rate, 0% hallucination) available.
|
|
7
|
+
- Blind human labeling infrastructure complete (CLI + merge with kappa/agreement); needs 2-3 annotators for 21 blind items.
|
|
8
|
+
- Competence map and high-confidence calibration once the set contains real errors and blind labels.
|
|
9
|
+
- `design_md_updates` feedback loop (explicitly post-v1).
|
|
10
|
+
- Import/usage telemetry for drift detection across real projects - IMPLEMENTED (packages/kb/src/telemetry.ts)
|
|
11
|
+
- A second transport (HTTP) if a hosted caller ever appears - IMPLEMENTED (packages/transports/src/http.ts)
|
|
12
|
+
- Nuxt UI SFC output - the adapter and KB exist, but the shared TSX sandbox does not compile a Vue SFC yet. Chakra v3 is no longer parked: the adapter filters v2/v3 entries by installed major version.
|
|
13
|
+
|
|
14
|
+
## Completed (moved to NON-GOALS.md as done)
|
|
15
|
+
|
|
16
|
+
- Cross-process SQLite lease concurrency (WAL + atomic ops + 10-process stress test) - IMPLEMENTED
|
|
17
|
+
- Render + axe layer (Phase 8) - IMPLEMENTED
|
|
18
|
+
- Bundle-size scoring - REMOVED from ranking: the per-component values were
|
|
19
|
+
package-level duplicates, not measurements. The field, option and kb helpers
|
|
20
|
+
are deprecated no-ops until 0.3.0, then removed.
|
|
21
|
+
- Property-based tests for the scaffolder and the AST verifier - IMPLEMENTED (28 tests in verifier.pbt.test.ts)
|
|
22
|
+
- Mantine as fourth adapter - IMPLEMENTED (packages/adapters/src/mantine/)
|
|
23
|
+
- Agent skill references + MCP builder/validator/status tools and resource reads - IMPLEMENTED
|
|
24
|
+
|
|
25
|
+
(End of file - total 20 lines)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Quick start
|
|
2
|
+
|
|
3
|
+
## 1. Install
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install ui-gateway
|
|
7
|
+
# or, without adding a dependency:
|
|
8
|
+
npx -y ui-gateway --help
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Node 20+ is enough. `--sqlite` needs Node 22.5+.
|
|
12
|
+
|
|
13
|
+
## 2. Configure your agent
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx ui-gateway init --project .
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`init` detects Claude Code, Cursor, VS Code, OpenCode or a generic MCP client,
|
|
20
|
+
writes/merges the config, copies the skill to `.ui-gateway/skill`, and prints
|
|
21
|
+
project detection with `needs_input` questions. Use `--dry-run` to preview.
|
|
22
|
+
|
|
23
|
+
No MCP support? Print the lean CLI skill:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx ui-gateway init --project . --print-skill
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 3. Map UI
|
|
30
|
+
|
|
31
|
+
Fast path, two calls:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
map_ui({ intents: [
|
|
35
|
+
{ id: "save", intent_type: "action", elements: ["save-button"] },
|
|
36
|
+
{ id: "orders", intent_type: "data_display", description: "recent orders table" }
|
|
37
|
+
]})
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The response contains mappings, scaffolds, confidence and verification. The
|
|
41
|
+
agent writes the files. The gateway never writes, installs or pushes.
|
|
42
|
+
|
|
43
|
+
## 4. Check existing code
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx ui-gateway check src --project . # JSON by default; add --text for a readable list
|
|
47
|
+
npx ui-gateway check src --design DESIGN.md
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Add the GitHub Action (`action.yml`) to post inline PR comments and fail on hard
|
|
51
|
+
Design MD violations.
|
|
52
|
+
|
|
53
|
+
## 5. Derive a Design MD
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx ui-gateway derive-design-md --project . --out DESIGN.md
|
|
57
|
+
npx ui-gateway validate-design DESIGN.md --project .
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The derivation reads CSS variables, Tailwind theme values, DTCG token files and
|
|
61
|
+
an existing `DESIGN.md`; only undefined tokens get the neutral palette.
|
|
62
|
+
|
|
63
|
+
## 6. See what is still open
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm run site
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`site/index.html` is generated from the eval artifacts: benchmark numbers,
|
|
70
|
+
external commit pins, adapter maturity and every open caveat with its evidence
|
|
71
|
+
and next action. It is not a marketing page; it is the status page for this
|
|
72
|
+
repository.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Refusal catalog
|
|
2
|
+
|
|
3
|
+
Generated from `ErrorCodeSchema` and `RETRYABLE` in `packages/protocol/src/errors.ts`.
|
|
4
|
+
Do not edit by hand; run `npm run docs:refusals`.
|
|
5
|
+
|
|
6
|
+
The gateway fails closed. A refusal is data: report it, answer the missing
|
|
7
|
+
information, or fix the input. Never replace a refused mapping with a guess.
|
|
8
|
+
|
|
9
|
+
| Code | Retryable | What to do |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `INVALID_HANDOFF` | no | Fix the schema, hash, semantic issue or Design MD error named in the message, then rebuild. Do not submit again unchanged. |
|
|
12
|
+
| `INTEGRITY_MISMATCH` | no | Re-read the Design MD and rebuild the handoff so design_md_hash matches the normalized text. |
|
|
13
|
+
| `CONFLICT` | no | The handoff_id was already used with different content. Use a new handoff_id; do not overwrite history. |
|
|
14
|
+
| `UNSATISFIABLE_CONSTRAINTS` | no | The Design MD contradicts itself or the project. Remove the conflicting constraint or add the missing provider. |
|
|
15
|
+
| `NO_MATCH` | no | No vetted component survived verification. Read the failures, add a local component, or relax the constraint that filtered the candidates. |
|
|
16
|
+
| `KB_STALE` | yes | Call describe_kb and rebuild with the returned kb_version. |
|
|
17
|
+
| `LEASE_EXPIRED` | yes | Ownership was not returned in time. Retry with a new handoff or recover the expired result. |
|
|
18
|
+
| `LEASE_CONFLICT` | yes | Another process owns this handoff. Wait for its lease or use a different handoff_id. |
|
|
19
|
+
| `UNSUPPORTED` | no | The framework, schema version or library is not supported. Ask the user; do not guess a fallback. |
|
|
20
|
+
| `INTERNAL` | no | Report the message with the handoff id. Do not retry automatically. |
|
|
21
|
+
| `RESULT_REJECTED` | no | The returned result failed its integrity check. Report it; do not apply it. |
|
|
22
|
+
|
|
23
|
+
## Outcomes
|
|
24
|
+
|
|
25
|
+
| Outcome | Meaning | Action |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `COMPLETED` | Every intent mapped and acceptance passed. | Apply the scaffolds. |
|
|
28
|
+
| `PARTIAL` | Some intents mapped; others refused or acceptance failed. | Apply mapped intents only and report the rest. |
|
|
29
|
+
| `NEEDS_INPUT` | The gateway needs a decision or a fact. | Write nothing; ask the questions in `missing_information`. |
|
|
30
|
+
| `AMBIGUOUS` | Two or more candidates are too close to choose. | Ask the user to pick from the returned alternatives. |
|
|
31
|
+
| `FAILED` | Nothing could be mapped, or a hard failure occurred. | Read `errors`; do not retry unchanged. |
|
|
32
|
+
| `EXPIRED` | The lease expired before the result was written. | Recover or resubmit with a new handoff. |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Phase 0 spike: source discovery
|
|
2
|
+
|
|
3
|
+
Recorded 24 November 2026. Purpose: assign every candidate library a source-quality tier and a license before adapter design, and pre-decide a fallback.
|
|
4
|
+
|
|
5
|
+
## Source-quality ladder
|
|
6
|
+
|
|
7
|
+
| Tier | Source | Verifier trust |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| A | Published TypeScript types / `.d.ts` | authoritative |
|
|
10
|
+
| B | Library registry or manifest | authoritative for what it covers |
|
|
11
|
+
| C | Source parsing (TypeScript compiler API, `cva`) | authoritative if it compiles |
|
|
12
|
+
| D | Docs scraping | advisory only, never used by the verifier |
|
|
13
|
+
|
|
14
|
+
## Decisions
|
|
15
|
+
|
|
16
|
+
| Library | Tier | Evidence | License | Adapter in v1 |
|
|
17
|
+
| --- | --- | --- | --- | --- |
|
|
18
|
+
| shadcn/ui | **B** | Published registry metadata plus copied-in TSX source; prop shapes read from the published TypeScript components. Component code lives in the project, so imports are project-local. | MIT | yes |
|
|
19
|
+
| MUI (`@mui/material`) | **A** | Published `.d.ts` declarations with prop unions and enums; registry only used for the package name. | MIT | yes |
|
|
20
|
+
| Chakra UI | **A** | Published `.d.ts` for the v2 flat named-component surface and the v3 dotted namespace surface, selected by installed major version. | MIT | yes (v2/v3) |
|
|
21
|
+
| Mantine | A (types) | Published `.d.ts`. | MIT | no |
|
|
22
|
+
| Ant Design | A (types) | Published `.d.ts`; large surface, different styling model. | MIT | no |
|
|
23
|
+
| Radix primitives | C | Source parsing is required for composition APIs; not a design system on its own. | MIT | no |
|
|
24
|
+
| DaisyUI | D | Docs/class names only; no typed surface for verification. | MIT | no (rejected) |
|
|
25
|
+
|
|
26
|
+
## Consequences
|
|
27
|
+
|
|
28
|
+
- shadcn entries carry `verification_level: partial` and tier B. The verifier trusts import roots and prop shapes from the KB; it does not trust shadcn docs.
|
|
29
|
+
- MUI and Chakra v2 entries carry `verification_level: derived` and tier A.
|
|
30
|
+
- The local-components adapter derives entries with the TypeScript compiler API from the project's own wrapper types (tier C, `derived`). This is the answer to "wrapped components hide real props": the wrapper's own signature is used, not the wrapped library's.
|
|
31
|
+
- The KB stores metadata and imports, never copied library source, so licenses are recorded per library and redistribution is avoided.
|
|
32
|
+
- Tier D ingestion is refused by `ingestManifest`; a docs-scraped manifest produces zero trusted entries and a quarantine report.
|
|
33
|
+
|
|
34
|
+
## Pre-decided fallback
|
|
35
|
+
|
|
36
|
+
If MUI's typed surface had not covered composition props, the second adapter would have been Chakra (also tier A). MUI passed, so it remained the second adapter. Chakra was later added as the third adapter against its v2 flat exports; the adapter now also models v3 dotted namespaces and filters entries by installed major version. Mantine was added as the fourth adapter against its published types. All four adapters now pass the same conformance suite.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Telemetry
|
|
2
|
+
|
|
3
|
+
`packages/kb/src/telemetry.ts` records drift data locally. It is not sent
|
|
4
|
+
anywhere.
|
|
5
|
+
|
|
6
|
+
## What is recorded
|
|
7
|
+
|
|
8
|
+
- project root (local path), timestamp;
|
|
9
|
+
- framework and styling systems;
|
|
10
|
+
- detected libraries and versions;
|
|
11
|
+
- local component names/files/import paths;
|
|
12
|
+
- component usage: component id, import path, usage count, files, prop values.
|
|
13
|
+
|
|
14
|
+
## What is not recorded
|
|
15
|
+
|
|
16
|
+
- source code bodies, text content, user input;
|
|
17
|
+
- environment variables, tokens or credentials;
|
|
18
|
+
- network destinations.
|
|
19
|
+
|
|
20
|
+
## Opt-in only
|
|
21
|
+
|
|
22
|
+
`scanProjectTelemetry`, `detectDrift`, `saveTelemetry` and `loadTelemetry` are
|
|
23
|
+
library functions; nothing calls them on the gateway path. Any future network
|
|
24
|
+
upload must be a separate, explicit opt-in with a documented endpoint and
|
|
25
|
+
retention policy. `docs/metrics.md` is the only place eval telemetry is
|
|
26
|
+
published, and it records metrics, not project contents.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"notes": "Pinned open-source projects used by eval:repos. ref is a tag or branch; resolved_commit is written by `eval:repos --update-pins`. Runs are reproducible once every entry has a resolved_commit.",
|
|
3
|
+
"repos": [
|
|
4
|
+
{
|
|
5
|
+
"name": "shadcn-ui",
|
|
6
|
+
"repo": "https://github.com/shadcn-ui/ui.git",
|
|
7
|
+
"ref": "main",
|
|
8
|
+
"library": "shadcn",
|
|
9
|
+
"framework": "next",
|
|
10
|
+
"resolved_commit": "0e5b2e621a9ee4cf6a604bbe6c5c0d5b70561eb4"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "material-ui",
|
|
14
|
+
"repo": "https://github.com/mui/material-ui.git",
|
|
15
|
+
"ref": "master",
|
|
16
|
+
"library": "mui",
|
|
17
|
+
"framework": "react",
|
|
18
|
+
"resolved_commit": "a26374c0ffa5e7e574ca2bea93fe6770d414bfe3"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "chakra-ui",
|
|
22
|
+
"repo": "https://github.com/chakra-ui/chakra-ui.git",
|
|
23
|
+
"ref": "main",
|
|
24
|
+
"library": "chakra",
|
|
25
|
+
"framework": "react",
|
|
26
|
+
"resolved_commit": "f8fb0c1110d6919b7261afab877bd9adccf8276a"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "mantine",
|
|
30
|
+
"repo": "https://github.com/mantinedev/mantine.git",
|
|
31
|
+
"ref": "master",
|
|
32
|
+
"library": "mantine",
|
|
33
|
+
"framework": "next",
|
|
34
|
+
"resolved_commit": "49e2bcbfe10f2b231370cd7761d7e777dcca5f16"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "vite-react-template",
|
|
38
|
+
"repo": "https://github.com/vitejs/vite.git",
|
|
39
|
+
"ref": "main",
|
|
40
|
+
"subdir": "packages/create-vite/template-react-ts",
|
|
41
|
+
"library": "none",
|
|
42
|
+
"framework": "vite-react",
|
|
43
|
+
"resolved_commit": "7d0c054f41ba1107a1d7d9ddae23930d9d6b4f8e"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "nextjs-app-router",
|
|
47
|
+
"repo": "https://github.com/vercel/next.js.git",
|
|
48
|
+
"ref": "canary",
|
|
49
|
+
"subdir": "examples/app-router",
|
|
50
|
+
"library": "none",
|
|
51
|
+
"framework": "next",
|
|
52
|
+
"resolved_commit": "91488f9db32a19b02e6756a4bcdb34fa487ef52f"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"library": "angular",
|
|
3
|
+
"package_name": "@angular/core",
|
|
4
|
+
"types_loaded": false,
|
|
5
|
+
"entries": [
|
|
6
|
+
{
|
|
7
|
+
"component_id": "angular/button",
|
|
8
|
+
"name": "ButtonComponent",
|
|
9
|
+
"matched": false,
|
|
10
|
+
"exports": [],
|
|
11
|
+
"props": [],
|
|
12
|
+
"required_props": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"component_id": "angular/input",
|
|
16
|
+
"name": "InputComponent",
|
|
17
|
+
"matched": false,
|
|
18
|
+
"exports": [],
|
|
19
|
+
"props": [],
|
|
20
|
+
"required_props": []
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"component_id": "angular/card",
|
|
24
|
+
"name": "CardComponent",
|
|
25
|
+
"matched": false,
|
|
26
|
+
"exports": [],
|
|
27
|
+
"props": [],
|
|
28
|
+
"required_props": []
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"component_id": "angular/modal",
|
|
32
|
+
"name": "ModalComponent",
|
|
33
|
+
"matched": false,
|
|
34
|
+
"exports": [],
|
|
35
|
+
"props": [],
|
|
36
|
+
"required_props": []
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"component_id": "angular/table",
|
|
40
|
+
"name": "TableComponent",
|
|
41
|
+
"matched": false,
|
|
42
|
+
"exports": [],
|
|
43
|
+
"props": [],
|
|
44
|
+
"required_props": []
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"component_id": "angular/alert",
|
|
48
|
+
"name": "AlertComponent",
|
|
49
|
+
"matched": false,
|
|
50
|
+
"exports": [],
|
|
51
|
+
"props": [],
|
|
52
|
+
"required_props": []
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"component_id": "angular/tabs",
|
|
56
|
+
"name": "TabsComponent",
|
|
57
|
+
"matched": false,
|
|
58
|
+
"exports": [],
|
|
59
|
+
"props": [],
|
|
60
|
+
"required_props": []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"component_id": "angular/select",
|
|
64
|
+
"name": "SelectComponent",
|
|
65
|
+
"matched": false,
|
|
66
|
+
"exports": [],
|
|
67
|
+
"props": [],
|
|
68
|
+
"required_props": []
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"unmatched": []
|
|
72
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"library": "antd",
|
|
3
|
+
"package_name": "antd",
|
|
4
|
+
"types_loaded": false,
|
|
5
|
+
"entries": [
|
|
6
|
+
{
|
|
7
|
+
"component_id": "antd/button",
|
|
8
|
+
"name": "Button",
|
|
9
|
+
"matched": false,
|
|
10
|
+
"exports": [],
|
|
11
|
+
"props": [],
|
|
12
|
+
"required_props": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"component_id": "antd/input",
|
|
16
|
+
"name": "Input",
|
|
17
|
+
"matched": false,
|
|
18
|
+
"exports": [],
|
|
19
|
+
"props": [],
|
|
20
|
+
"required_props": []
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"component_id": "antd/card",
|
|
24
|
+
"name": "Card",
|
|
25
|
+
"matched": false,
|
|
26
|
+
"exports": [],
|
|
27
|
+
"props": [],
|
|
28
|
+
"required_props": []
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"component_id": "antd/modal",
|
|
32
|
+
"name": "Modal",
|
|
33
|
+
"matched": false,
|
|
34
|
+
"exports": [],
|
|
35
|
+
"props": [],
|
|
36
|
+
"required_props": []
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"component_id": "antd/table",
|
|
40
|
+
"name": "Table",
|
|
41
|
+
"matched": false,
|
|
42
|
+
"exports": [],
|
|
43
|
+
"props": [],
|
|
44
|
+
"required_props": []
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"component_id": "antd/alert",
|
|
48
|
+
"name": "Alert",
|
|
49
|
+
"matched": false,
|
|
50
|
+
"exports": [],
|
|
51
|
+
"props": [],
|
|
52
|
+
"required_props": []
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"component_id": "antd/tabs",
|
|
56
|
+
"name": "Tabs",
|
|
57
|
+
"matched": false,
|
|
58
|
+
"exports": [],
|
|
59
|
+
"props": [],
|
|
60
|
+
"required_props": []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"component_id": "antd/select",
|
|
64
|
+
"name": "Select",
|
|
65
|
+
"matched": false,
|
|
66
|
+
"exports": [],
|
|
67
|
+
"props": [],
|
|
68
|
+
"required_props": []
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"unmatched": []
|
|
72
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"library": "bootstrap",
|
|
3
|
+
"package_name": "bootstrap",
|
|
4
|
+
"types_loaded": false,
|
|
5
|
+
"entries": [
|
|
6
|
+
{
|
|
7
|
+
"component_id": "bootstrap/button",
|
|
8
|
+
"name": "Button",
|
|
9
|
+
"matched": false,
|
|
10
|
+
"exports": [],
|
|
11
|
+
"props": [],
|
|
12
|
+
"required_props": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"component_id": "bootstrap/input",
|
|
16
|
+
"name": "Input",
|
|
17
|
+
"matched": false,
|
|
18
|
+
"exports": [],
|
|
19
|
+
"props": [],
|
|
20
|
+
"required_props": []
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"component_id": "bootstrap/card",
|
|
24
|
+
"name": "Card",
|
|
25
|
+
"matched": false,
|
|
26
|
+
"exports": [],
|
|
27
|
+
"props": [],
|
|
28
|
+
"required_props": []
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"component_id": "bootstrap/modal",
|
|
32
|
+
"name": "Modal",
|
|
33
|
+
"matched": false,
|
|
34
|
+
"exports": [],
|
|
35
|
+
"props": [],
|
|
36
|
+
"required_props": []
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"component_id": "bootstrap/table",
|
|
40
|
+
"name": "Table",
|
|
41
|
+
"matched": false,
|
|
42
|
+
"exports": [],
|
|
43
|
+
"props": [],
|
|
44
|
+
"required_props": []
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"component_id": "bootstrap/alert",
|
|
48
|
+
"name": "Alert",
|
|
49
|
+
"matched": false,
|
|
50
|
+
"exports": [],
|
|
51
|
+
"props": [],
|
|
52
|
+
"required_props": []
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"component_id": "bootstrap/tabs",
|
|
56
|
+
"name": "Tabs",
|
|
57
|
+
"matched": false,
|
|
58
|
+
"exports": [],
|
|
59
|
+
"props": [],
|
|
60
|
+
"required_props": []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"component_id": "bootstrap/select",
|
|
64
|
+
"name": "Select",
|
|
65
|
+
"matched": false,
|
|
66
|
+
"exports": [],
|
|
67
|
+
"props": [],
|
|
68
|
+
"required_props": []
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"unmatched": []
|
|
72
|
+
}
|