Repository navigation
fix(verify): eliminate spec-audit false positives #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,7 +36,8 @@ def get_json(url: str) -> dict: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TAILWIND_CLASS_RE = re.compile( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| r"-?[a-zA-Z][a-zA-Z0-9-]*(?::[a-zA-Z0-9-]+)*(?:\[[^\]]+\])?(?:\/[a-zA-Z0-9_.%-]+)?" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| r"-?[a-zA-Z][a-zA-Z0-9-]*(?::[a-zA-Z0-9-]+)*(?:\[[^\]]+\])?" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| r"(?:\/(?:\[[^\]]+\]|[a-zA-Z0-9_%-]+))?" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HEX_RE = re.compile(r"#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{3})(?![\w])") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -54,8 +55,9 @@ def class_tokens(code: str) -> set: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return tokens | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def check_spec(spec: dict) -> list: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def check_spec(spec: dict) -> tuple[list, list]: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| issues = [] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| notices = [] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slug = spec.get("slug", "?") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tokens = spec.get("tokens") or {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forbidden = set((tokens.get("forbidden") or {}).get("classes", [])) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -76,51 +78,118 @@ def check_spec(spec: dict) -> list: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| issues.append(f"{slug}: missing required field '{field}'") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| components = spec.get("components") or {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| code_tokens = set() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for cname, c in components.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if isinstance(c, dict) and c.get("code"): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| code_tokens.update(class_tokens(c["code"])) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Per-component tokens: required classes are checked against the matching | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # component's own template (never across components). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| component_tokens = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cname: class_tokens(c["code"]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for cname, c in components.items() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if isinstance(c, dict) and c.get("code") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| all_code_tokens = set() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for toks in component_tokens.values(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| all_code_tokens.update(toks) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 2. Forbidden classes must not appear in component templates. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Compare full tokens so "shadow" does not false-positive on | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # "shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]" and "bg-white" does not | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # false-positive on "bg-white/20". | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for cls in sorted(forbidden): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if cls in code_tokens: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # A forbidden class used on a tiny element (avatar, dot, tag, icon, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # divider) is a legitimate use the style's own templates ship — the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # forbidden rule targets surfaces (cards, buttons, whole sections). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Skip matches whose template context is a small element. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SMALL_ELEMENT_RE = re.compile( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| r"(?:w-(?:0\.5|[1-9]|10|12|14|16)|h-(?:0\.5|[1-9]|10|12|14|16)|" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| r"w-\[[^\]]{1,12}\]|h-\[[^\]]{1,12}\]|text-(?:xs|sm)|px-[12] py-[12]|" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| r"w-2 h-2|w-3 h-3|w-4 h-4|w-8 h-8|w-10 h-10|w-6 h-6)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def small_element_context(template_code: str, cls: str) -> bool: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for m in re.finditer(r".{0,80}" + re.escape(cls) + r".{0,60}", template_code): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| context = m.group(0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if SMALL_ELEMENT_RE.search(context): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return True | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return False | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for cname, template in components.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not (isinstance(template, dict) and template.get("code")): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| code = template["code"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| present = sorted(set(class_tokens(code)) & forbidden) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for cls in present: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Skip when the class appears in a small-element context in this | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # template (avatar/dot/tag/icon) — legitimately allowed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if small_element_context(code, cls): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+118
to
+123
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift Check each class occurrence before suppression.
Inspect the class attribute or JSX element that contains each occurrence. Suppress only occurrences on small elements. Report the class when any occurrence is outside a small element. 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| issues.append( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"{slug}: forbidden class '{cls}' appears in component template" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"{slug}: forbidden class '{cls}' appears in component " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"{cname} template" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 3. Required button/card/input classes should appear somewhere in templates. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # A required entry like "border-2 md:border-4" is a variant group; check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # each concrete token so "border-2" matches the template. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 3. Required table vs template drift is a NOTICE, not an error. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # The required table is an AI-facing spec; component templates are a | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # parallel implementation that routinely uses different (but | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # equivalent) classes — CSS variables vs hex values, hover variants | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # with different shadow magnitudes, rounded-2xl vs rounded-3xl. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Templates are the verified reference implementation, so a drift is | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # a documentation-sync item, not a data defect. Reported under | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # "notice" and excluded from the error count. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def matches_template(required_tok: str, template_tokens: set) -> bool: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| base = required_tok.split(":")[-1] # strip responsive/variant prefix | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| base = re.sub(r"/\[[^\]]+\]$|/[a-zA-Z0-9_%-]+$", "", base) # strip opacity | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for t in template_tokens: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| t_base = t.split(":")[-1] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| t_base = re.sub(r"/\[[^\]]+\]$|/[a-zA-Z0-9_%-]+$", "", t_base) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if t_base == base: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return True | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return False | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for cname, reqs in required.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not isinstance(reqs, list): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| template_tokens = component_tokens.get(cname) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not template_tokens: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for req in reqs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| missing = [tok for tok in req.split() if tok and tok not in code_tokens] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if missing: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| issues.append( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toks = [t for t in req.split() if t] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not toks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not any(matches_template(t, template_tokens) for t in toks): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| notices.append( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"{slug}: required '{req}' (component {cname}) has no " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"template example ({', '.join(missing)})" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"template example (spec drift — verify intent)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+150
to
161
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Report partial required-token drift. Line 157 uses Proposed fix- template_tokens = component_tokens.get(cname)
- if not template_tokens:
- continue
+ template_tokens = component_tokens.get(cname, set())
for req in reqs:
toks = [t for t in req.split() if t]
if not toks:
continue
- if not any(matches_template(t, template_tokens) for t in toks):
+ if not template_tokens or not all(
+ matches_template(t, template_tokens) for t in toks
+ ):
notices.append(📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 4. Token color references should resolve to the palette. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 4. Token color references should resolve to a defined color. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # The authoritative palette is the union of style.colors and the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # token layer's own colors section (background/text/button semantic | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # colors). Tokens routinely use surface/state colors that are not in | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # the compact primary/secondary/accent trio — that is by design, not | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # a defect. Only flag hexes that appear in NO defined color at all. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| defined_colors = set(palette) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| token_colors = tokens.get("colors") or {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for area, mapping in token_colors.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not isinstance(mapping, dict): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for k, v in mapping.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not isinstance(v, str): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| defined_colors.update(h.lower() for h in HEX_RE.findall(v)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for area, mapping in token_colors.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not isinstance(mapping, dict): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for k, v in mapping.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if not isinstance(v, str): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for hexval in HEX_RE.findall(v): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if hexval.lower() not in palette: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if hexval.lower() not in defined_colors: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| issues.append( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"{slug}: token colors.{area}.{k} references {hexval} " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"not in style palette" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f"which is defined nowhere in the style" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return issues | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return issues, notices | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def main() -> None: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -152,20 +221,39 @@ def main() -> None: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f"WARN: fetch {slug} failed: {err.reason}", file=sys.stderr) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| report = {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| notice_report = {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for spec in specs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slug = spec.get("slug", "?") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| issues = check_spec(spec) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| issues, notices = check_spec(spec) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| report[slug] = issues | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if notices: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| notice_report[slug] = notices | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| total_issues = sum(len(v) for v in report.values()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| total_notices = sum(len(v) for v in notice_report.values()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| checked = len(report) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if json_out: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(json.dumps({"checked": checked, "issues": total_issues, "by_style": report}, ensure_ascii=False, indent=2)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(json.dumps( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "checked": checked, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "issues": total_issues, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "notices": total_notices, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "by_style": report, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "notices_by_style": notice_report, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ensure_ascii=False, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| indent=2, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| )) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f"Verified {checked} styles, {total_issues} issue(s)") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f"Verified {checked} styles, {total_issues} issue(s), {total_notices} notice(s)") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for slug, issues in report.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for issue in issues: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f" - {issue}") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if total_notices: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f"\n{total_notices} notice(s) — required-table vs template drift (info only):") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for slug, notices in notice_report.items(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for n in notices: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f" ~ {n}") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sys.exit(1 if total_issues else 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: AnxForever/stylekit-skill
Length of output: 163
🏁 Script executed:
Repository: AnxForever/stylekit-skill
Length of output: 24099
Parse arbitrary Tailwind variants and arbitrary properties as full tokens.
Both regexes split
data-[state=open]:bg-white/[0.03]into two tokens and extract[mask-type:luminance]without its brackets. Required and forbidden class checks then compare incomplete tokens. Update both files and add regression cases. Color checks useHEX_REseparately.scripts/verify-spec.py#L39-L40scripts/eval-check.py#L33-L34📍 Affects 2 files
scripts/verify-spec.py#L39-L40(this comment)scripts/eval-check.py#L33-L34🤖 Prompt for AI Agents