start-vibing 4.0.2 → 4.1.1

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.
Files changed (67) hide show
  1. package/package.json +1 -1
  2. package/template/.claude/CLAUDE.md +86 -20
  3. package/template/.claude/agents/sd-audit.md +197 -0
  4. package/template/.claude/agents/sd-fix-verify-semantic.md +112 -0
  5. package/template/.claude/agents/sd-fix-verify-technical.md +36 -0
  6. package/template/.claude/agents/sd-fix.md +194 -0
  7. package/template/.claude/agents/sd-research.md +61 -0
  8. package/template/.claude/agents/sd-synthesis.md +74 -0
  9. package/template/.claude/commands/super-design.md +15 -0
  10. package/template/.claude/hooks/super-design-session-start.sh +4 -0
  11. package/template/.claude/settings.json +14 -0
  12. package/template/.claude/skills/codebase-knowledge/SKILL.md +145 -0
  13. package/template/.claude/skills/codebase-knowledge/TEMPLATE.md +35 -0
  14. package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +93 -0
  15. package/template/.claude/skills/composition-patterns/SKILL.md +89 -0
  16. package/template/.claude/skills/docs-tracker/SKILL.md +239 -0
  17. package/template/.claude/skills/mcp-builder/SKILL.md +236 -0
  18. package/template/.claude/skills/quality-gate/scripts/check-all.sh +83 -0
  19. package/template/.claude/skills/react-best-practices/SKILL.md +146 -0
  20. package/template/.claude/skills/security-scan/reference/owasp-top-10.md +257 -0
  21. package/template/.claude/skills/security-scan/scripts/scan.py +190 -0
  22. package/template/.claude/skills/super-design/README.md +37 -0
  23. package/template/.claude/skills/super-design/SKILL.md +105 -0
  24. package/template/.claude/skills/super-design/hooks/guard-paths.py +35 -0
  25. package/template/.claude/skills/super-design/hooks/post-edit-lint.py +57 -0
  26. package/template/.claude/skills/super-design/references/audit-methodology.md +513 -0
  27. package/template/.claude/skills/super-design/references/change-detection-playbook.md +1432 -0
  28. package/template/.claude/skills/super-design/references/design-theory.md +706 -0
  29. package/template/.claude/skills/super-design/references/fix-agent-playbook.md +118 -0
  30. package/template/.claude/skills/super-design/references/market-research-playbook.md +773 -0
  31. package/template/.claude/skills/super-design/references/playwright-mcp-reference.md +1057 -0
  32. package/template/.claude/skills/super-design/references/skills-subagents-reference.md +784 -0
  33. package/template/.claude/skills/super-design/references/superpowers-and-distribution.md +136 -0
  34. package/template/.claude/skills/super-design/scripts/detect-changes.sh +61 -0
  35. package/template/.claude/skills/super-design/scripts/diff-tokens.sh +13 -0
  36. package/template/.claude/skills/super-design/scripts/discover-routes.sh +45 -0
  37. package/template/.claude/skills/super-design/scripts/extract-tokens.mjs +41 -0
  38. package/template/.claude/skills/super-design/scripts/hash-pages.sh +42 -0
  39. package/template/.claude/skills/super-design/scripts/validate-state.sh +15 -0
  40. package/template/.claude/skills/super-design/scripts/verify-audit.sh +19 -0
  41. package/template/.claude/skills/super-design/templates/audit-state.schema.json +57 -0
  42. package/template/.claude/skills/super-design/templates/findings.schema.json +57 -0
  43. package/template/.claude/skills/super-design/templates/fix-history.md.tpl +26 -0
  44. package/template/.claude/skills/super-design/templates/overview.md.tpl +52 -0
  45. package/template/.claude/skills/test-coverage/reference/playwright-patterns.md +260 -0
  46. package/template/.claude/skills/test-coverage/scripts/coverage-check.sh +52 -0
  47. package/template/.claude/skills/typeui-ant/SKILL.md +133 -0
  48. package/template/.claude/skills/typeui-application/SKILL.md +128 -0
  49. package/template/.claude/skills/typeui-artistic/SKILL.md +133 -0
  50. package/template/.claude/skills/typeui-bento/SKILL.md +127 -0
  51. package/template/.claude/skills/typeui-bold/SKILL.md +127 -0
  52. package/template/.claude/skills/typeui-clean/SKILL.md +128 -0
  53. package/template/.claude/skills/typeui-dashboard/SKILL.md +133 -0
  54. package/template/.claude/skills/typeui-doodle/SKILL.md +142 -0
  55. package/template/.claude/skills/typeui-dramatic/SKILL.md +127 -0
  56. package/template/.claude/skills/typeui-enterprise/SKILL.md +132 -0
  57. package/template/.claude/skills/typeui-neobrutalism/SKILL.md +127 -0
  58. package/template/.claude/skills/typeui-paper/SKILL.md +127 -0
  59. package/template/.claude/skills/ui-ux-audit/QUICK-START.md +450 -0
  60. package/template/.claude/skills/ui-ux-audit/README.md +470 -0
  61. package/template/.claude/skills/ui-ux-audit/templates/audit-report.md +591 -0
  62. package/template/.claude/skills/ui-ux-audit/templates/competitor-analysis.md +363 -0
  63. package/template/.claude/skills/ui-ux-audit/templates/component-spec.md +491 -0
  64. package/template/.claude/skills/ui-ux-audit/templates/improvement-recommendation.md +450 -0
  65. package/template/.claude/skills/web-design-guidelines/SKILL.md +39 -0
  66. package/template/.claude/skills/webapp-testing/SKILL.md +96 -0
  67. package/template/.claude/skills/workflow-state/workflow-state.json +77 -0
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: super-design
3
+ description: >
4
+ Performs end-to-end design audits on web projects. MUST BE USED when the user
5
+ mentions super-design, design audit, UX review, accessibility review, design
6
+ critique, competitor analysis, WCAG, Core Web Vitals, usability audit, or asks
7
+ to evaluate their website's design quality. Produces market analysis, live-site
8
+ UX audit (WCAG 2.2 AA, Nielsen heuristics, Baymard, CWV), and synthesized
9
+ overview. Re-audits only what changed since last run. On explicit user request,
10
+ applies surgical fixes with full rollback.
11
+ version: 0.4.0
12
+ ---
13
+
14
+ # super-design
15
+
16
+ ## What this skill does
17
+
18
+ Four-phase pipeline with 6 specialist agents:
19
+
20
+ 1. **Market research** (sd-research) — auto-detects niche from repo, finds 5–10
21
+ competitors, extracts design language, produces market-analysis.md.
22
+ 2. **UI/UX audit** (sd-audit) — drives browser via Playwright MCP directly,
23
+ applies Nielsen's 10 heuristics, WCAG 2.2 AA, Baymard (if e-commerce), and
24
+ Core Web Vitals. Produces findings.json with SHOT+QUOTE+SEL+VAL evidence.
25
+ 3. **Synthesis** (sd-synthesis) — unifies research + audit into overview.md.
26
+ 4. **Fix** (sd-fix + two-stage verify) — optional. Applies safe fixes with
27
+ technical gates (types/lint/tests) AND semantic verification ("does this
28
+ fix actually resolve the finding, or just mask it?").
29
+
30
+ ## Entry flow
31
+
32
+ ### Step 1: Preflight
33
+
34
+ ```bash
35
+ STATE=docs/super-design/.audit-state.json
36
+ if [[ ! -f "$STATE" ]]; then MODE=first-audit
37
+ elif ! bash .claude/skills/super-design/scripts/validate-state.sh; then MODE=first-audit
38
+ else MODE=incremental-candidate
39
+ fi
40
+ ```
41
+
42
+ ### Step 2: Scope decision (if incremental)
43
+
44
+ Apply cascade from `references/change-detection-playbook.md` §4:
45
+ - Run `scripts/detect-changes.sh $LAST_SHA` → classify changed files.
46
+ - theory_doc_sha changed OR tokens changed OR major dep bump OR >180d old → FULL.
47
+ - Only components changed → re-audit pages importing them (N=3 hops via madge).
48
+ - Only routes added → audit those routes only.
49
+ - Only content changed → rerun a11y+content on affected pages.
50
+ - Nothing design-relevant → exit with note.
51
+
52
+ Record scope in overview.md changelog banner.
53
+
54
+ ### Step 3: Dispatch (via Task tool)
55
+
56
+ ```
57
+ 1. sd-research (skip if market-analysis.md <90d AND no dep/README change)
58
+ 2. sd-audit (only scoped pages — uses Playwright MCP directly)
59
+ 3. sd-synthesis (always; rebuilds overview.md)
60
+ 4. sd-fix (ONLY if user asked; uses verify-technical + verify-semantic)
61
+ ```
62
+
63
+ Pass findings via files under `.super-design/sessions/<id>/`, not chat.
64
+
65
+ ### Step 4: Write state + history
66
+
67
+ - Atomic write `.audit-state.json` (.tmp then rename).
68
+ - Append session to `audit-history.md`.
69
+ - `git notes --ref=super-design add -f -m <json> HEAD`.
70
+
71
+ ### Step 5: Return summary (≤5 sentences)
72
+
73
+ Do NOT paste overview into chat.
74
+
75
+ ## User flags
76
+
77
+ - `--force-full` — ignore state, full audit
78
+ - `--refresh-research` — rerun sd-research
79
+ - `--only <cat>` — a11y | design | ux | perf | research
80
+ - `--scope <url>` — specific route
81
+ - `--fix` — run sd-fix after audit
82
+ - `--dry-run` — artifacts without committing state
83
+ - `--ci` — non-interactive, create PR, exit non-zero on blockers
84
+
85
+ ## References (Read on demand)
86
+
87
+ - `references/design-theory.md`
88
+ - `references/audit-methodology.md`
89
+ - `references/market-research-playbook.md`
90
+ - `references/change-detection-playbook.md`
91
+ - `references/fix-agent-playbook.md`
92
+ - `references/playwright-mcp-reference.md`
93
+ - `references/skills-subagents-reference.md`
94
+
95
+ ## Hard rules
96
+
97
+ 1. Every finding MUST cite SHOT+QUOTE+SEL+VAL.
98
+ 2. Every fix MUST reference a finding ID in commit message.
99
+ 3. Never auto-apply fixes above LOW risk without user approval.
100
+ 4. Never edit outside configured source roots.
101
+ 5. Never commit to main — all fixes on session branch.
102
+ 6. Playwright MCP is the ONLY way to interact with live site.
103
+ 7. Summary to user ≤5 sentences; report lives in overview.md.
104
+ 8. Two-stage verify: technical gates (types/lint/tests) AND semantic ("does
105
+ this actually resolve the finding?"). Both must pass.
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env python3
2
+ """PreToolUse hook: reject Edit/MultiEdit/Write on protected paths."""
3
+ import json, sys, re
4
+
5
+ DENY_PATTERNS = [
6
+ r"^\.env", r"(^|/)node_modules/", r"(^|/)dist/", r"(^|/)\.next/",
7
+ r"(^|/)build/", r"(^|/)out/", r"package-lock\.json$",
8
+ r"pnpm-lock\.yaml$", r"yarn\.lock$", r"^\.git/",
9
+ ]
10
+ ALLOW_PREFIXES = [
11
+ "src/", "app/", "pages/", "components/", "styles/", "public/",
12
+ "docs/super-design/", ".super-design/", ".claude/",
13
+ ]
14
+
15
+ def main():
16
+ try:
17
+ payload = json.load(sys.stdin)
18
+ except Exception as e:
19
+ print(f"guard-paths: invalid stdin JSON: {e}", file=sys.stderr)
20
+ sys.exit(0)
21
+ path = (payload.get("tool_input", {}) or {}).get("file_path", "")
22
+ if not path:
23
+ sys.exit(0)
24
+ rel = path.lstrip("./")
25
+ for pat in DENY_PATTERNS:
26
+ if re.search(pat, rel):
27
+ print(f"guard-paths: BLOCKED edit on protected path: {rel}", file=sys.stderr)
28
+ sys.exit(2)
29
+ if not any(rel.startswith(p) for p in ALLOW_PREFIXES):
30
+ print(f"guard-paths: WARN edit outside configured source roots: {rel}", file=sys.stderr)
31
+ sys.exit(0)
32
+ sys.exit(0)
33
+
34
+ if __name__ == "__main__":
35
+ main()
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env python3
2
+ """PostToolUse hook: lint just-edited file; exit 2 on NEW errors."""
3
+ import json, sys, subprocess, os, hashlib, pathlib
4
+
5
+ EXT_LINTERS = {
6
+ ".ts": ["npx", "eslint", "--format", "json"],
7
+ ".tsx": ["npx", "eslint", "--format", "json"],
8
+ ".js": ["npx", "eslint", "--format", "json"],
9
+ ".jsx": ["npx", "eslint", "--format", "json"],
10
+ ".vue": ["npx", "eslint", "--format", "json"],
11
+ ".svelte": ["npx", "eslint", "--format", "json"],
12
+ ".astro": ["npx", "eslint", "--format", "json"],
13
+ }
14
+ BASELINE_DIR = pathlib.Path(".super-design/.cache/lint-baselines")
15
+
16
+ def main():
17
+ try:
18
+ payload = json.load(sys.stdin)
19
+ except Exception:
20
+ sys.exit(0)
21
+ path = (payload.get("tool_input", {}) or {}).get("file_path", "")
22
+ if not path or not os.path.exists(path):
23
+ sys.exit(0)
24
+ ext = os.path.splitext(path)[1]
25
+ cmd = EXT_LINTERS.get(ext)
26
+ if not cmd:
27
+ sys.exit(0)
28
+ try:
29
+ result = subprocess.run(cmd + [path], capture_output=True, text=True, timeout=30)
30
+ except Exception as e:
31
+ print(f"post-edit-lint: failed to run lint: {e}", file=sys.stderr)
32
+ sys.exit(0)
33
+ try:
34
+ data = json.loads(result.stdout or "[]")
35
+ except Exception:
36
+ sys.exit(0)
37
+ current_count = sum((f.get("errorCount", 0) + f.get("warningCount", 0)) for f in data)
38
+ BASELINE_DIR.mkdir(parents=True, exist_ok=True)
39
+ key = hashlib.sha256(path.encode()).hexdigest()[:16]
40
+ baseline_file = BASELINE_DIR / f"{key}.txt"
41
+ baseline_count = -1
42
+ if baseline_file.exists():
43
+ try:
44
+ baseline_count = int(baseline_file.read_text().strip())
45
+ except:
46
+ pass
47
+ if baseline_count < 0:
48
+ baseline_file.write_text(str(current_count))
49
+ sys.exit(0)
50
+ if current_count > baseline_count:
51
+ print(f"post-edit-lint: REGRESSION in {path}: {baseline_count} -> {current_count}", file=sys.stderr)
52
+ sys.exit(2)
53
+ baseline_file.write_text(str(current_count))
54
+ sys.exit(0)
55
+
56
+ if __name__ == "__main__":
57
+ main()