15 Commits

Author SHA1 Message Date
Manav Arya Singh 08113882ce ci(bench): run the benchmark on a clean runner; fix the report footer and median
- .github/workflows/bench.yml: manual (choose a set) plus weekly, installs the
  browser, runs held-out and training sets, writes both tables to the run
  summary and uploads bench/results as an artifact. Nothing is auto-committed.
- the report names the set it ran (a held-out run said bench/sites.json) and
  says when it is the held-out set
- median time rounds to one decimal (it printed 30.349999999999998s)
2026-09-16 09:28:26 +04:00
Manav Arya Singh ddd4ad1b2c ci(release): publish to npm on version tags; fix MCP version and designlang/mcp entry
- release.yml publishes with provenance when a vX.Y.Z tag matches package.json
- MCP serverInfo reports the package version instead of a hard-coded 7.0.0
- add src/mcp/index.js, which the ./mcp export pointed at but never existed
- test a stock SDK client handshake over stdio
2026-09-15 15:41:20 +04:00
Manav Arya Singh 4cf074165c Merge pull request #159 from Manavarya09/dependabot/github_actions/actions/checkout-7
chore(deps): bump actions/checkout from 6 to 7
2026-06-19 10:53:05 +04:00
dependabot[bot] 0b838aeec8 chore(deps): bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-19 02:44:02 +00:00
dependabot[bot] 8f6f2f7fdb chore(deps): bump actions/setup-node from 4 to 6
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-19 02:43:58 +00:00
Manav Arya Singh 08475f7d05 ci: add test workflow (npm test on push + PR)
Runs the full suite on Node 20 and 22 for every push to main and every
PR, installs Chromium for the extraction-failure test, and verifies the
plugin manifest version stays in sync. Gives auto-merge something real to
gate on.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 14:17:50 +04:00
dependabot[bot] 36fb5c0afc chore(deps): bump actions/checkout from 4 to 6 (#152)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-18 13:59:38 +04:00
dependabot[bot] 8140bc11fa chore(deps): bump dependabot/fetch-metadata from 2 to 3 (#151)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2 to 3.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v2...v3)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-18 13:59:34 +04:00
dependabot[bot] d869d93729 chore(deps): bump github/codeql-action from 3 to 4 (#150)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-18 13:59:30 +04:00
Manav Arya Singh 127815f0b5 ci: enable Dependabot with auto-merge for patch & minor updates (#148)
Adds .github/dependabot.yml (weekly npm + github-actions; minor/patch
grouped) and a dependabot-auto-merge workflow that enables GitHub
auto-merge (gh pr merge --auto --squash) for patch & minor bumps, leaving
major versions for manual review. Uses fetch-metadata; PR URL passed via
a quoted env var (no injection); does not check out PR code.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 13:54:17 +04:00
Manav Arya Singh 63011145cf security: SECURITY.md + CodeQL + postcss >=8.5.10 override
- SECURITY.md: disclosure policy, supported versions, scope boundaries,
  points reports at GitHub's private vulnerability reporting.
- .github/workflows/codeql.yml: weekly + per-PR scan with
  security-and-quality query suite.
- website: postcss override to 8.5.10 to clear GHSA-qx2v-qp2m-jg93
  (XSS via unescaped </style> in CSS stringify). Next.js pulls the
  fixed version transparently; build unaffected.
- Private vulnerability reporting enabled via API (no file).
2026-04-24 23:55:07 +04:00
bot-manavarya 922bf2ee10 chore(manavarya-bot): sync reviewer workflow 2026-04-20 03:45:57 +04:00
Manav Arya Singh a017b2d31a chore(repo): social preview image + topic reshuffle for SEO (#32)
- .github/og-preview.png (1280x640, matches our specimen card identity)
- GitHub description and topics reshuffled via gh CLI:
  removed: colors, typography, agent-skills (too generic / duplicate)
  added: mcp-server, dtcg, design-to-code, cursor, figma, shadcn-ui,
         chrome-extension, accessibility
- upload this PNG in repo Settings \u2192 Social preview to finish
2026-04-19 03:05:54 +04:00
bot-manavarya 0d5540db03 chore(manavarya-bot): add reviewer workflow 2026-04-19 02:53:14 +04:00
Manav Arya Singh 2e9710c1cd v7.0 part 1: DTCG tokens, 5 extractors, 4 platform emitters, repo polish (#18)
* docs: v7.0 spec and implementation plan

* chore: add @modelcontextprotocol/sdk for v7 MCP server

* feat(formatters): add DTCG v1 tokens with primitive + semantic + composites

* feat: use DTCG token format by default; legacy via --tokens-legacy

* feat(extractors): add stack-fingerprint for framework + Tailwind detection

Detects framework (next/nuxt/gatsby/remix/react/vue/astro/sveltekit/
shopify/wordpress/webflow/framer), CSS layer (tailwind with top-100
utility frequencies), and analytics providers from crawled page
signals (scripts, meta tags, class-name sample, window globals).

Crawler now emits rawData.light.stack carrying those signals.
design.stack lands on the extraction output.

* feat(extractors): CSS health audit (specificity, !important, unused, keyframes)

Uses Playwright CSS coverage to compute used/unused bytes, counts
!important usage, duplicate prop:value pairs, vendor-prefix hits,
selector specificity distribution, and catalogs @keyframes.

Crawler starts coverage before navigation and stops after the page
settles; gracefully degrades to empty coverage on unsupported targets.

scoring.js gains an additive cssHealth dimension (does not change
existing weighted overall score for back-compat).

* feat(a11y): remediation suggestions — nearest palette color passing WCAG

For every failing contrast pair emitted by the accessibility extractor,
search design.colors.all for a palette entry that clears the matching
WCAG threshold (AA-normal=4.5, AA-large=3, AAA variants).

Exposes design.accessibility.failingPairs (derived) and
design.accessibility.remediation (array of { fg, bg, ratio, rule,
suggestion }). Suggestion is null when no palette color qualifies.

* feat(extractors): semantic-regions classifier (nav/hero/pricing/footer/…)

Classifies page sections using landmark tag/role plus keyword and
layout heuristics into: nav, hero, pricing, testimonials, features,
cta, footer, sidebar, content.

Crawler emits rawData.light.sections carrying tag, role, class/id,
text sample, headings, button/card counts, and bounds for each
landmark/section element.

* feat(extractors): reusable component clustering with variant detection

Groups button/input/link/card candidates by structural hash (tag >
child tags), then splits each group into variants by cosine
similarity on a style vector (padding, bg/fg channels, radius,
border, font metrics). Cosine >= 0.95 collapses into one variant.

Crawler serializes rawData.light.componentCandidates with kind,
structuralHash, styleVector, and human-readable css per element.

Markdown formatter renders a new "Component Clusters" section
(additive — the legacy "Component Patterns" section is preserved).

* chore(repo): add issue templates, funding config, contact links

* feat(formatters): iOS SwiftUI emitter from DTCG tokens

Adds a shared internal `resolveRef(tokens, path)` helper plus
`formatIosSwiftUI(tokens)` that emits a SwiftUI file with:
- semantic Colors (resolved through {primitive.*} references)
- CGFloat extensions for primitive spacing/radius
- a primitive palette for direct use
- typography hint comments (Font generation deferred)

9 new tests (4 iOS + 5 resolveRef).

* feat(formatters): Android Compose emitter

Adds `formatAndroidCompose(tokens)` producing Theme.kt (Kotlin Compose
object with Color/dp values), plus colors.xml and dimens.xml resources.
PascalCase in Kotlin, snake_case in XML, #FF-prefixed hex for alpha.

3 new tests.

* feat(formatters): Flutter Dart emitter

Adds `formatFlutterDart(tokens)` producing a Dart file with a
DesignTokens class (semantic colors, primitive spacing/radius/colors)
and a buildDesignlangTheme() helper wiring primary/surface into a
ColorScheme.

2 new tests.

* feat(formatters): WordPress block theme skeleton with theme.json

Adds `formatWordPressTheme(tokens, design)` returning a full block-theme
file map:
- theme.json (WP schema v3 with color palette, spacing, font sizes/families
  derived from DTCG tokens)
- style.css (valid WP theme header + :root custom props)
- functions.php (minimal theme support)
- index.php (template-part fallback)
- templates/index.html (block-markup entry)

Legacy `formatWordPress(design)` export preserved for existing consumers.
4 new tests.

* feat: --platforms dispatcher for web/ios/android/flutter/wordpress

Adds a comma-separated --platforms CLI option that emits additional
platform-native outputs alongside the existing web set:
- ios → ios/DesignTokens.swift
- android → android/Theme.kt + colors.xml + dimens.xml
- flutter → flutter/design_tokens.dart
- wordpress → wordpress-theme/{theme.json, style.css, functions.php,
  index.php, templates/index.html}

"all" expands to every known platform. Web is always emitted (additive).
Threads `platforms` through mergeConfig with a parsePlatforms helper that
normalizes CSV/array inputs, ignores unknown values, and guarantees web
is present.

10 new tests (6 parsePlatforms, 3 mergeConfig platforms, 1 CLI help).
2026-04-18 14:41:11 +04:00