@minhduydev/mdpi 0.4.0 → 0.5.0

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 (48) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.pi/VERSION +1 -1
  3. package/dist/template/.pi/extensions/templates-injector.ts +34 -6
  4. package/dist/template/.pi/prompts/INDEX.md +3 -9
  5. package/dist/template/.pi/skills/INDEX.md +81 -19
  6. package/dist/template/.pi/skills/accessibility-audit/SKILL.md +8 -2
  7. package/dist/template/.pi/skills/baseline-ui/SKILL.md +211 -0
  8. package/dist/template/.pi/skills/dcp-hygiene/SKILL.md +1 -1
  9. package/dist/template/.pi/skills/design-taste-frontend/SKILL.md +53 -42
  10. package/dist/template/.pi/skills/fixing-accessibility/SKILL.md +509 -0
  11. package/dist/template/.pi/skills/frontend-design/SKILL.md +60 -47
  12. package/dist/template/.pi/skills/frontend-design/references/animation/motion-advanced.md +88 -15
  13. package/dist/template/.pi/skills/frontend-design/references/animation/motion-core.md +148 -13
  14. package/dist/template/.pi/skills/frontend-design/references/shadcn/setup.md +127 -20
  15. package/dist/template/.pi/skills/frontend-ui-engineering/SKILL.md +21 -27
  16. package/dist/template/.pi/skills/nextjs-app-router/SKILL.md +334 -0
  17. package/dist/template/.pi/skills/nextjs-cache/SKILL.md +262 -0
  18. package/dist/template/.pi/skills/oklch-color-workflow/SKILL.md +426 -0
  19. package/dist/template/.pi/skills/production-hardening/SKILL.md +652 -0
  20. package/dist/template/.pi/skills/react-best-practices/SKILL.md +79 -1
  21. package/dist/template/.pi/skills/react-compiler/SKILL.md +237 -0
  22. package/dist/template/.pi/skills/react-hook-form/SKILL.md +374 -0
  23. package/dist/template/.pi/skills/react-server-actions/SKILL.md +299 -0
  24. package/dist/template/.pi/skills/shadcn-ui/SKILL.md +404 -0
  25. package/dist/template/.pi/skills/tanstack-query/SKILL.md +330 -0
  26. package/dist/template/.pi/skills/ui-craft-principles/SKILL.md +564 -0
  27. package/dist/template/.pi/skills/ui-quality-audit/SKILL.md +329 -0
  28. package/dist/template/.pi/skills/v0/SKILL.md +264 -0
  29. package/dist/template/.pi/skills/zustand/SKILL.md +333 -0
  30. package/dist/template/.pi/templates/DESIGN.md +76 -0
  31. package/dist/template/.pi/workflows/INDEX.md +2 -1
  32. package/dist/template/.pi/workflows/frontend-feature-workflow.md +343 -0
  33. package/dist/template/.pi/workflows/quality-loop.md +1 -1
  34. package/package.json +1 -1
  35. package/dist/template/.pi/prompts/loop-check.md +0 -87
  36. package/dist/template/.pi/prompts/loop-init.md +0 -157
  37. package/dist/template/.pi/prompts/loop-review.md +0 -90
  38. package/dist/template/.pi/skills/loop-audit/SKILL.md +0 -141
  39. package/dist/template/.pi/skills/loop-cost/SKILL.md +0 -130
  40. package/dist/template/.pi/skills/loop-engineering/SKILL.md +0 -175
  41. package/dist/template/.pi/templates/loop-github-action.yml +0 -162
  42. package/dist/template/.pi/templates/loop-orchestrator.sh +0 -514
  43. package/dist/template/.pi/templates/loop-orchestrator.test.ts +0 -332
  44. package/dist/template/.pi/templates/loop-orchestrator.ts +0 -936
  45. package/dist/template/.pi/templates/loop-state.json +0 -24
  46. package/dist/template/.pi/templates/loop-state.md +0 -98
  47. package/dist/template/.pi/templates/loop-vision.md +0 -110
  48. /package/dist/template/.pi/templates/{design.md → feature-design.md} +0 -0
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { spawn, spawnSync } from "node:child_process";
10
10
  import { fileURLToPath } from "node:url";
11
11
  import { mkdir, readdir } from "node:fs/promises";
12
12
  //#region package.json
13
- var version = "0.4.0";
13
+ var version = "0.5.0";
14
14
  //#endregion
15
15
  //#region src/utils/manifest.ts
16
16
  /**
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * Templates Injector Extension
3
3
  *
4
- * Auto-injects project context files into system prompt.
5
4
  * Auto-injects project context files into system prompt via pi's before_agent_start hook.
6
5
  *
7
6
  * Resolution: prefer the LIVE file at `.pi/{name}` (filled by /init, the project's
@@ -9,12 +8,20 @@
9
8
  * when no live file exists. This keeps templates/ pristine as deliverables while
10
9
  * ensuring real project state is what the agent actually sees.
11
10
  *
12
- * Auto-injected (always, whichever resolves):
11
+ * Auto-injected (always, whichever resolves) — but ONLY when not placeholder-heavy:
13
12
  * - project.md
14
13
  * - tech-stack.md
15
14
  * - state.md ← the "you are here" marker; live version injected once /init fills it
16
15
  *
17
- * User can opt-in to inject more via /inject-template command.
16
+ * Placeholder-skip: at before_agent_start, blank seed templates (still full of
17
+ * `[Criterion]`/`[URL]`/`<!-- ... -->` markers) are skipped so they don't tax the
18
+ * first message. A live file with real content (few markers) still injects.
19
+ *
20
+ * DESIGN.md is NOT auto-injected — load it on demand via `/inject-template DESIGN.md`
21
+ * (e.g. when starting UI work).
22
+ *
23
+ * User can opt-in to inject more via /inject-template command (placeholder-skip
24
+ * does not apply to explicit on-demand injection).
18
25
  */
19
26
 
20
27
  import * as fs from "node:fs";
@@ -23,7 +30,18 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
23
30
 
24
31
  const ALWAYS_INJECT = ["project.md", "tech-stack.md", "state.md"];
25
32
 
26
- function readTemplate(cwd: string, name: string): string | null {
33
+ // Placeholder markers that indicate a template is still a blank seed (not filled).
34
+ // Counted to decide whether an auto-injected file would just add noise to the
35
+ // first message. Threshold is intentionally low (>5) so a genuinely filled live
36
+ // file (a handful of incidental bracket occurrences) still injects.
37
+ const PLACEHOLDER_MARKER_RE = /\[(?:e\.g\.|Criterion|URL|Title|Date|slug)[^\]]*\]|<slug>|<!-- /g;
38
+ const PLACEHOLDER_MARKER_THRESHOLD = 5;
39
+
40
+ function readTemplate(
41
+ cwd: string,
42
+ name: string,
43
+ skipPlaceholders = false,
44
+ ): string | null {
27
45
  // Prefer live file at .pi/{name} (filled by /init — real project state);
28
46
  // fall back to blank seed at .pi/templates/{name} when no live file exists.
29
47
  const livePath = path.join(cwd, ".pi", name);
@@ -33,7 +51,17 @@ function readTemplate(cwd: string, name: string): string | null {
33
51
  const content = fs.readFileSync(filePath, "utf-8");
34
52
  // Strip frontmatter for injection
35
53
  const fmMatch = content.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);
36
- return (fmMatch ? fmMatch[1] : content).trim();
54
+ const body = (fmMatch ? fmMatch[1] : content).trim();
55
+ // Auto-inject only: skip placeholder-heavy files so unfilled templates don't
56
+ // tax the first message. On-demand /inject-template bypasses this (default).
57
+ // Anchored to a closing `]` so real markdown links like `[Vercel](...)` don't
58
+ // count; only placeholder-shaped tokens (`[URL]`, `[Criterion 1]`, `[e.g., ...]`,
59
+ // `<slug>`, `<!-- `) do.
60
+ if (skipPlaceholders) {
61
+ const markers = body.match(PLACEHOLDER_MARKER_RE);
62
+ if (markers && markers.length > PLACEHOLDER_MARKER_THRESHOLD) return null;
63
+ }
64
+ return body;
37
65
  }
38
66
 
39
67
  export default function templatesInjector(pi: ExtensionAPI) {
@@ -41,7 +69,7 @@ export default function templatesInjector(pi: ExtensionAPI) {
41
69
  const injected: string[] = [];
42
70
 
43
71
  for (const name of ALWAYS_INJECT) {
44
- const content = readTemplate(ctx.cwd, name);
72
+ const content = readTemplate(ctx.cwd, name, /* skipPlaceholders */ true);
45
73
  if (content && content.length > 0) {
46
74
  injected.push(`### ${name}\n\n${content}`);
47
75
  }
@@ -4,7 +4,7 @@ purpose: Index of slash commands with purpose, when-to-use, and lifecycle positi
4
4
 
5
5
  # Prompts Index
6
6
 
7
- 14 slash commands. Lifecycle is canonical; utilities attach at any phase.
7
+ 11 slash commands. Lifecycle is canonical; utilities attach at any phase.
8
8
 
9
9
  ## Canonical Lifecycle
10
10
 
@@ -39,9 +39,6 @@ Status: /status
39
39
  | `/gc` | Fallow analysis + quality grades + optional cleanup PRs | Maintenance cadence; not during active feature work | `[--dry-run] [--apply] [--scope <dir>]` | Maintenance |
40
40
  | `/status` | Show active feature, progress tail, blockers | Orient at session start or when unsure | `[--full]` | Any (read-only) |
41
41
  | `/close` | Finalize active feature, clear `.active` | Feature done/blocked/abandoned, or recover dangling `.active` | `[--done\|--blocked\|--abandoned] [--note <text>]` | Ship/Recovery |
42
- | `/loop-check` | NO-GO qualification gate — refuse-list + 2-condition test + 30s checklist | Before scheduling a task as an unattended loop | `<task description> [--help]` | Define |
43
- | `/loop-init` | Scaffold `.pi/loops/<name>/` from templates (VISION/STATE/SKILL) | Once a task passes /loop-check | `<name> [--help]` | Define |
44
- | `/loop-review` | Maker/checker gate — verifier subagent runs the gate, emits ACCEPT/REJECT | After a maker run, before ship | `<loop-name> [--help]` | Review |
45
42
 
46
43
  ## When to use what
47
44
 
@@ -57,9 +54,6 @@ Status: /status
57
54
  | "Where am I / what's the state" | `/status` |
58
55
  | Feature done but `/ship` left `.active` dangling | `/close --done` |
59
56
  | Maintenance / dead code sweep | `/gc --dry-run` |
60
- | Qualify a task as an unattended loop (refuse-list + 2-condition test) | `/loop-check "<task>"` (Define) |
61
- | Scaffold a loop after /loop-check returns GO | `/loop-init <name>` (Define) |
62
- | Maker/checker gate on a loop run before shipping | `/loop-review <name>` (Review) |
63
57
 
64
58
  ## Conventions (shared across commands)
65
59
 
@@ -73,6 +67,6 @@ Status: /status
73
67
 
74
68
  ## Related
75
69
 
76
- - `skills/INDEX.md` — task → skill routing (70 skills)
70
+ - `skills/INDEX.md` — task → skill routing (67 skills)
77
71
  - `workflows/INDEX.md` — 6 DAG workflows invoked by commands
78
- - `templates/` — 19 template files (PRD, plan body, state, roadmap, loop-vision, loop-state, orchestrators, etc.)
72
+ - `templates/` — 12 template files (PRD, plan body, state, roadmap, etc.)
@@ -5,7 +5,7 @@ description: "Task-to-skill routing table with File Match + Keyword triggers, Ph
5
5
 
6
6
  # Skills Index — Task → Skill Mapping
7
7
 
8
- This file helps the agent (and humans) discover which skill to load for a given task. Skills are auto-loaded into the system prompt at startup (Tier 1), triggered by File/Keyword Match rules, or loaded on-demand via `/skill:<name>` (Tier 2). All 70 skills are available directly in `.pi/skills/`.
8
+ This file helps the agent (and humans) discover which skill to load for a given task. Skills are auto-loaded into the system prompt at startup (Tier 1), triggered by File/Keyword Match rules, or loaded on-demand via `/skill:<name>` (Tier 2). All skills are available directly in `.pi/skills/`.
9
9
 
10
10
  **How routing works:** File Match → Keyword Match → Quick Routing Table → Decision Tree (if ambiguous).
11
11
 
@@ -17,16 +17,22 @@ When the agent edits files matching these patterns, the listed skills auto-load.
17
17
 
18
18
  | File pattern | Auto-load skill(s) | Why |
19
19
  |-------------|-------------------|-----|
20
- | `*.ts,*.tsx,*.jsx` | `react-best-practices`, `deep-module-design` | TypeScript/React best practices + structural quality |
20
+ | `*.ts,*.tsx,*.jsx` | `react-best-practices`, `deep-module-design`, `react-compiler` | TypeScript/React best practices + structural quality |
21
+ | `**/actions.ts`, `**/actions/**` | `react-server-actions` | Server Actions + useActionState patterns |
22
+ | `**/app/**/page.tsx`, `**/app/**/layout.tsx` | `nextjs-app-router`, `nextjs-cache` | App Router conventions + caching |
23
+ | `**/stores/**`, `**/store.ts` | `zustand` | Zustand state management patterns |
24
+ | `**/hooks/use-query*.ts`, `**/queries/**` | `tanstack-query` | TanStack Query hooks and patterns |
25
+ | `**/forms/**` with `useForm`, `zodResolver` | `react-hook-form` | React Hook Form + Zod patterns |
21
26
  | `*.swift,*.swiftui` | `swift-concurrency`, `swiftui-expert-skill` | Swift patterns + concurrency safety |
22
27
  | `*.test.*,*.spec.*,__tests__/**` | `test-driven-development`, `testing-anti-patterns` | Test-first discipline + mock hygiene |
23
28
  | `*.sql,migrations/**` | `supabase-postgres-best-practices` | Query performance + RLS |
24
29
  | `.github/workflows/**,Dockerfile,docker-compose*.yml` | `ci-cd-and-automation` | Pipeline design + caching |
25
30
  | `.pi/skills/*/SKILL.md` | `writing-skills` | Skill authoring best practices |
26
- | `.pi/loops/**`,`loop-orchestrator.*`,`loop-guard.ts` | `loop-engineering`, `loop-audit` | Loop design/qualification + readiness scoring |
27
- | `*.css,*.scss,*.less` | `frontend-design`, `design-taste-frontend` | Design system consistency |
28
- | `*.tsx,*.jsx` | `frontend-ui-engineering` | Production-quality UI standards |
31
+
32
+ | `*.css,*.scss,*.less` | `baseline-ui`, `frontend-design`, `design-taste-frontend` | Deslop pass + design system consistency |
33
+ | `*.tsx,*.jsx` | `baseline-ui`, `frontend-ui-engineering` | Deslop pass + production-quality UI standards |
29
34
  | `*.md,docs/**,ADR*.md` | `documentation-and-adrs` | Doc structure + ADR format |
35
+ | `.pi/**/DESIGN.md` | `frontend-design`, `design-taste-frontend` | Project design identity — load aesthetic skills when DESIGN.md is edited. NOTE: DESIGN.md is no longer auto-injected; load it into context on demand via `/inject-template DESIGN.md` when starting UI work. |
30
36
 
31
37
  ---
32
38
 
@@ -43,7 +49,13 @@ When the user's prompt contains these keywords (case-insensitive), the listed sk
43
49
  | refactor, cleanup, simplify, clean code, complex | `code-cleanup`, `code-simplification`, `deep-module-design` |
44
50
  | test, spec, verify, assert, coverage, TDD | `test-driven-development`, `testing-anti-patterns` |
45
51
  | review, audit, quality, check, PR | `code-review-and-quality`, `agent-code-quality-gate` |
46
- | design, UI, component, style, layout, CSS, tailwind | `frontend-design`, `design-taste-frontend` |
52
+ | design, UI, component, style, layout, CSS, tailwind, DESIGN.md, design identity, design token, brand identity | `frontend-design`, `design-taste-frontend` |
53
+ | accessibility, a11y, WCAG, ARIA, keyboard, focus, fix a11y | `fixing-accessibility` |
54
+ | craft, polish, detail, micro-interaction, concentric, optical, border-radius | `ui-craft-principles` |
55
+ | i18n, internationalization, RTL, edge case, error state, empty state, harden, text overflow | `production-hardening` |
56
+ | audit, quality score, UI audit, anti-pattern detection, P0 P1 P2 | `ui-quality-audit` |
57
+ | OKLCH, color system, color palette, color space, gamut, color conversion | `oklch-color-workflow` |
58
+ | deslop, quick fix, baseline, fix AI patterns, auto-fix UI | `baseline-ui` |
47
59
  | database, query, SQL, postgres, supabase, RLS, migration | `supabase`, `supabase-postgres-best-practices` |
48
60
  | docs, documentation, README, ADR, changelog | `documentation-and-adrs` |
49
61
  | commit, branch, merge, rebase, git, worktree | `git-workflow-and-versioning`, `using-git-worktrees` |
@@ -58,9 +70,19 @@ When the user's prompt contains these keywords (case-insensitive), the listed sk
58
70
  | payment, subscription, license, billing, checkout | `polar` |
59
71
  | Figma, design token, mockup, screenshot to code | `figma`, `mockup-to-code` |
60
72
  | Jira, Confluence, Atlassian, issue, ticket | `jira` |
73
+ | v0, v0.sh, v0.dev, AI UI generator, Vercel v0, v0 component, v0 generate | `v0` |
74
+ | shadcn, shadcn/ui, shadcn-ui, shadcn ui, shadcn component, shadcn add | `shadcn-ui` |
75
+ | Server Actions, useActionState, useOptimistic, useFormStatus, 'use server', form action, progressive enhancement | `react-server-actions` |
76
+ | App Router, layout.tsx, page.tsx, parallel routes, intercepting routes, route groups, async params, template.tsx, loading.tsx | `nextjs-app-router` |
77
+ | use cache, cacheLife, cacheTag, revalidateTag, revalidatePath, Next.js cache, connection() | `nextjs-cache` |
78
+ | React Compiler, auto-memoize, babel-plugin-react-compiler, useMemo, useCallback, memoization | `react-compiler` |
79
+ | TanStack Query, React Query, useQuery, useMutation, optimistic update, infinite query, prefetch | `tanstack-query` |
80
+ | Zustand, state management, global state, create store, useShallow, immer, persist, devtools | `zustand` |
81
+ | React Hook Form, useForm, zodResolver, Controller, useFieldArray, form validation, conditional fields | `react-hook-form` |
61
82
  | browser, e2e, screenshot, playwright, chrome | `playwright`, `chrome-devtools`, `browser-testing-with-devtools` |
62
83
  | dependency, package, library, npm, PyPI, source | `opensrc` |
63
- | loop, unattended loop, nightly triage, loop-readiness, loop-cost, loop-check, loop-review | `loop-engineering`, `loop-audit`, `loop-cost` |
84
+ | scrape, crawl, webclaw, bot protection, 403, webfetch fail, extract web content, web scraping | `webclaw` |
85
+
64
86
  | Swift, iOS, macOS, actor, async/await, Sendable | `swift-concurrency`, `swiftui-expert-skill`, `core-data-expert` |
65
87
 
66
88
  ---
@@ -103,9 +125,7 @@ When the user's prompt contains these keywords (case-insensitive), the listed sk
103
125
  | `dcp-hygiene` | At command/phase closure — compress closed exploratory work-streams via pi-dcp when `compress` is available; no-ops if DCP absent | All | Low |
104
126
  | `memory-system` | Understanding/leveraging pi-hermes-memory — auto-flywheel, tools, commands, when to use memory_search vs vcc_recall | All | Low |
105
127
  | `doubt-driven-development` | In-flight adversarial review of non-trivial decisions before they stand | Build | Medium |
106
- | `loop-engineering` | Designing/qualifying/running unattended coding loops; 2-condition test + VISION/state + confidence-gated action | All | Medium |
107
- | `loop-audit` | Scoring a project's loop-readiness 0-100 + L0/L1/L2/L3; L3 gated on proven run | Review | Low |
108
- | `loop-cost` | Estimating tokens/day + daily cap + early-exit flag before approving a loop budget | Plan | Low |
128
+
109
129
 
110
130
  ### Implementation
111
131
 
@@ -134,17 +154,30 @@ When the user's prompt contains these keywords (case-insensitive), the listed sk
134
154
 
135
155
  | Skill | Use when | Phase | Risk |
136
156
  |-------|----------|-------|------|
137
- | `frontend-ui-engineering` | Production-quality UIscomponent architecture, design systems, WCAG 2.1 AA, avoid AI aesthetic | Build | Medium |
138
- | `frontend-design` | Building any web UI with React-based frameworks | Build | Medium |
157
+ | `accessibility-audit` | ⚠️ DEPRECATEDuse `fixing-accessibility` instead | Review | Medium |
158
+ | `baseline-ui` | Quick deslop pass fixes common AI-generated UI anti-patterns automatically | Build | Low |
159
+ | `design-system-audit` | Auditing an existing design system for consistency | Review | Medium |
139
160
  | `design-taste-frontend` | BASE aesthetic layer to override default LLM design biases | Build | Low |
161
+ | `fixing-accessibility` | Actionable WCAG 2.1 AA accessibility fixes — before/after code examples | Build + Review | Medium |
162
+ | `frontend-design` | Building any web UI with React-based frameworks | Build | Medium |
163
+ | `frontend-ui-engineering` | Production-quality UIs — component architecture, design systems, WCAG 2.1 AA, avoid AI aesthetic | Build | Medium |
140
164
  | `high-end-visual-design` | Premium, agency-quality, or luxury visual design | Build | Low |
141
- | `minimalist-ui` | Clean, editorial, or minimalist aesthetics | Build | Low |
142
165
  | `industrial-brutalist-ui` | Brutalist, military-terminal, or raw mechanical aesthetics | Build | Low |
143
- | `react-best-practices` | Writing, reviewing, or refactoring React/Next.js code for performance | Build | Medium |
144
- | `redesign-existing-projects` | Upgrading an existing website or app's visual design | Build | High |
166
+ | `minimalist-ui` | Clean, editorial, or minimalist aesthetics | Build | Low |
145
167
  | `mockup-to-code` | Converting UI mockups, screenshots, Figma/Sketch designs into code | Build | Medium |
146
- | `accessibility-audit` | Auditing UI components or pages for accessibility compliance | Review | Medium |
147
- | `design-system-audit` | Auditing an existing design system for consistency | Review | Medium |
168
+ | `oklch-color-workflow` | Complete OKLCH color system syntax, palette generation, contrast, Tailwind v4 | Build | Low |
169
+ | `production-hardening` | Production hardening i18n, error states, edge cases, cross-browser | Ship | High |
170
+ | `react-best-practices` | Writing, reviewing, or refactoring React 19 / Next.js 16 code for performance | Build | Medium |
171
+ | `react-server-actions` | Building forms, mutations, data writes with React 19 Server Actions | Build | Medium |
172
+ | `nextjs-app-router` | Building Next.js App Router pages — layouts, routes, RSC boundaries | Build | Medium |
173
+ | `nextjs-cache` | Next.js 16 caching — `use cache`, cacheLife, cacheTag, revalidation | Build | Medium |
174
+ | `react-compiler` | Enabling, debugging, optimizing with the React Compiler | Build | Low |
175
+ | `tanstack-query` | Data fetching, caching, mutations with TanStack Query v5 | Build | Medium |
176
+ | `zustand` | Global/shared state management with Zustand v5 | Build | Medium |
177
+ | `react-hook-form` | Building forms with React Hook Form v7 + Zod v3 | Build | Medium |
178
+ | `redesign-existing-projects` | Upgrading an existing website or app's visual design | Build | High |
179
+ | `ui-craft-principles` | 16 craft principles — concentric radius, optical alignment, interruptible animations | Build | Low |
180
+ | `ui-quality-audit` | 5-dimension UI quality scoring (0-4) with P0-P3 severity tags | Review | Medium |
148
181
 
149
182
  ### Platform / Infrastructure
150
183
 
@@ -183,6 +216,8 @@ When the user's prompt contains these keywords (case-insensitive), the listed sk
183
216
  | `opensrc` | Understanding how a library works internally, debugging dependency issues | Build | Low |
184
217
  | `pdf-extract` | Extracting text, images, tables, or metadata from PDF files | Build | Low |
185
218
  | `webclaw` | When webfetch returns 403 or bot protection errors | Build | Low |
219
+ | `v0` | Using v0 (v0.app by Vercel) for AI-powered UI generation, prompt engineering, CLI/SDK integration | Build | Medium |
220
+ | `shadcn-ui` | Setting up, configuring, or adding shadcn/ui components — CLI v4, presets, skills, registries | Build | Medium |
186
221
  | `gemini-large-context` | Analyzing large codebases, comparing multiple files exceeding typical context limits | Plan | Low |
187
222
  | `fallow` | Codebase intelligence — quality, dead code, duplication, complexity hotspots | Review | Low |
188
223
 
@@ -213,8 +248,18 @@ Maps user intent to skill(s). `→` = sequential pipeline (execute in order). `+
213
248
  | "I'm stuck" / "not sure what to do" | `behavioral-kernel` + `using-agent-skills` | All | Low |
214
249
  | "which skill to use" / "what skill for" | `using-agent-skills` | Define | Low |
215
250
  | "create UI" / "build component" / "design page" | `frontend-design` + `design-taste-frontend` | Build | Medium |
251
+ | "generate with v0" / "v0 component" / "v0 prompt" / "AI generate UI" | `v0` + `frontend-design` | Build | Medium |
252
+ | "add shadcn components" / "shadcn init" / "setup shadcn" / "shadcn/ui setup" | `shadcn-ui` + `frontend-design` | Build | Medium |
253
+ | "Server Action" / "useActionState" / "useOptimistic" / "'use server'" | `react-server-actions` + `nextjs-app-router` | Build | Medium |
254
+ | "App Router" / "layout.tsx" / "parallel route" / "intercepting route" | `nextjs-app-router` + `react-best-practices` | Build | Medium |
255
+ | "use cache" / "revalidateTag" / "cacheLife" / "Next.js cache" | `nextjs-cache` + `nextjs-app-router` | Build | Medium |
256
+ | "React Compiler" / "auto-memoize" / "useMemo unnecessary" | `react-compiler` + `react-best-practices` | Build | Low |
257
+ | "useQuery" / "useMutation" / "TanStack Query" / "optimistic update" | `tanstack-query` + `zustand` | Build | Medium |
258
+ | "Zustand" / "create store" / "useShallow" / "global state" | `zustand` + `tanstack-query` | Build | Medium |
259
+ | "React Hook Form" / "useForm" / "zodResolver" / "useFieldArray" | `react-hook-form` + `react-server-actions` | Build | Medium |
216
260
  | "deploy to Cloudflare" | `cloudflare` | Ship | High |
217
261
  | "deploy to Vercel" | `vercel-deploy-claimable` | Ship | High |
262
+ | "animate" / "animation" / "motion" / "framer" / "transition" | `frontend-design` (references/animation/) | Build | Low |
218
263
  | "set up database" / "Supabase" | `supabase` + `supabase-postgres-best-practices` | Build | High |
219
264
  | "add logging" / "monitoring" / "observability" | `observability-and-instrumentation` | Ship | Medium |
220
265
  | "optimize context" / "agent quality degraded" / "too many tokens" | `context-engineering` | All | Low |
@@ -227,8 +272,15 @@ Maps user intent to skill(s). `→` = sequential pipeline (execute in order). `+
227
272
  | "add payment" / "subscription" / "checkout" | `polar` | Build | High |
228
273
  | "Figma to code" / "mockup to code" / "design to code" | `figma` → `mockup-to-code` → `frontend-design` | Build | Medium |
229
274
  | "redisign" / "visual upgrade" / "restyle" | `redesign-existing-projects` | Build | High |
230
- | "accessibility" / "a11y" / "WCAG" | `accessibility-audit` | Review | Medium |
275
+ | "color system" / "OKLCH" / "color palette" | `oklch-color-workflow` | Build | Low |
276
+ | "fix accessibility" / "a11y fix" / "WCAG fix" | `fixing-accessibility` | Build | Medium |
277
+ | "make it feel better" / "craft details" / "UI polish" | `ui-craft-principles` | Build | Low |
278
+ | "production ready" / "harden UI" / "edge cases" | `production-hardening` | Ship | High |
279
+ | "quick polish" / "deslop" / "baseline fix" | `baseline-ui` | Build | Low |
280
+ | "UI audit" / "quality score" / "score my UI" | `ui-quality-audit` | Review | Medium |
281
+ | "accessibility" / "a11y" / "WCAG" | `fixing-accessibility` | Review | Medium |
231
282
  | "dependency issue" / "how does library X work" | `opensrc` | Build | Low |
283
+ | "scrape this" / "extract from" / "webclaw" / "crawl site" / "webfetch failed" | `webclaw` | Build | Low |
232
284
  | "browser test" / "e2e test" / "playwright" | `playwright` \| `browser-testing-with-devtools` | Verify | Medium |
233
285
  | "migrate" / "deprecate" / "remove old API" | `deprecation-and-migration` | Ship | High |
234
286
  | "create skill" / "write skill" / "edit skill" | `writing-skills` | Build | Low |
@@ -246,6 +298,7 @@ Execute skills in order — output of one feeds the next.
246
298
  brainstorming → spec-driven-development → planning-and-task-breakdown → incremental-implementation
247
299
  figma → mockup-to-code → frontend-design
248
300
  root-cause-tracing → debugging-and-error-recovery → verification-before-completion
301
+ baseline-ui → frontend-design → ui-craft-principles → production-hardening → ui-quality-audit
249
302
  ```
250
303
 
251
304
  ### Parallel Load (`+`)
@@ -253,7 +306,7 @@ Load multiple skills simultaneously for independent concerns.
253
306
 
254
307
  ```
255
308
  code-review-and-quality + performance-optimization + security-and-hardening
256
- frontend-design + design-taste-frontend + accessibility-audit
309
+ frontend-design + design-taste-frontend + fixing-accessibility
257
310
  test-driven-development + testing-anti-patterns + defense-in-depth
258
311
  ```
259
312
 
@@ -267,6 +320,15 @@ Phase 3 (Review): code-review-and-quality + code-simplification
267
320
  Phase 4 (Ship): verification-before-completion → shipping-and-launch
268
321
  ```
269
322
 
323
+ ```
324
+ Phase 1 (Deslop): baseline-ui
325
+ Phase 2 (Design): design-taste-frontend → frontend-design
326
+ Phase 3 (Craft): ui-craft-principles + oklch-color-workflow
327
+ Phase 4 (Build): frontend-ui-engineering + incremental-implementation
328
+ Phase 5 (Harden): production-hardening + fixing-accessibility
329
+ Phase 6 (Audit): ui-quality-audit
330
+ ```
331
+
270
332
  ### Choose One (`|`)
271
333
  Pick the best single skill when options are context-dependent.
272
334
 
@@ -1,9 +1,15 @@
1
1
  ---
2
2
  name: accessibility-audit
3
- description: Use when auditing UI components or pages for accessibility compliance, checking WCAG conformance, identifying keyboard navigation issues, color contrast problems, and pre-launch accessibility verification
3
+ description: ⚠️ DEPRECATED — Use fixing-accessibility instead. Previously used for auditing UI components or pages for accessibility compliance.
4
4
  ---
5
5
 
6
- # Accessibility Audit Skill
6
+ > **⚠️ DEPRECATED — This skill has been replaced by [`fixing-accessibility`](../fixing-accessibility/SKILL.md).**
7
+ >
8
+ > `fixing-accessibility` provides actionable WCAG 2.1 AA fixes with before/after code examples, not just audit checklists. It covers 9 priority categories with concrete fix recipes.
9
+ >
10
+ > This file is retained for backward compatibility. All references should redirect to `fixing-accessibility`.
11
+
12
+ # Accessibility Audit Skill (Deprecated)
7
13
 
8
14
  ## When to Use
9
15
 
@@ -0,0 +1,211 @@
1
+ ---
2
+ name: baseline-ui
3
+ description: Auto-load when editing *.tsx,*.jsx,*.css — quick deslop pass that fixes common AI-generated UI anti-patterns before any design work begins
4
+ ---
5
+
6
+ # Baseline UI
7
+
8
+ ## When to Use
9
+
10
+ - Auto-load when editing `*.tsx`, `*.jsx`, `*.css`, `*.scss` — runs a quick deslop pass first
11
+ - Before loading any aesthetic overlay (`design-taste-frontend`, `minimalist-ui`, etc.)
12
+ - When reviewing or cleaning up existing UI that looks "AI-generated"
13
+ - First step in any frontend implementation pipeline
14
+
15
+ ## When NOT to Use
16
+
17
+ - When `design-taste-frontend` or a specific aesthetic overlay is already loaded (they supersede these rules)
18
+ - When building non-UI code (backend, CLI, data processing, APIs)
19
+ - When working with an established design system that already bakes in these rules
20
+
21
+ ---
22
+
23
+ ## Quick Deslop Pass — Three Rule Tiers
24
+
25
+ Apply these rules in order. **MUST** rules are hard errors — fix before proceeding. **SHOULD** rules are warnings — fix unless there's a deliberate exception. **NEVER** rules are blocking patterns — rewrite entirely.
26
+
27
+ ### MUST Rules (Hard Errors)
28
+
29
+ Patterns that are never acceptable in production UI. Fix before any other work.
30
+
31
+ | Rule | Anti-pattern | Fix |
32
+ |------|-------------|-----|
33
+ | **No purple gradients** | `bg-gradient-to-r from-purple-500 to-indigo-600` | Use a single flat accent color from the project palette, or a subtle tonal gradient within the same hue |
34
+ | **No Inter/Roboto/Arial** | `font-['Inter']`, `font-['Roboto']`, or bare `sans-serif` fallback to Arial | Use `Geist`, `Outfit`, `Satoshi`, `Cabinet Grotesk`, or system font stack (`-apple-system, BlinkMacSystemFont`) |
35
+ | **No emojis in code** | `🎉`, `🚀`, `✨` in React components, headings, or alt text | Replace with SVG icons (Phosphor, Radix) or clean primitives |
36
+ | **No `h-screen`** | `h-screen` on hero sections or full-page layouts | Use `min-h-[100dvh]` to prevent mobile browser chrome layout jump |
37
+ | **No `div` onClick as button** | `<div onClick={...} className="cursor-pointer">` | Use `<button type="button">` or `<button type="submit">` with proper styling |
38
+ | **No lorem ipsum** | `Lorem ipsum dolor sit amet...` or any lorem ipsum variant | Use real or realistic domain-appropriate text. For placeholder text, use context-aware content (e.g., "Product launch strategy Q3 2026" not "Lorem ipsum"). |
39
+ | **No generic data** | "Jane Doe", "John Smith", "$99/mo", "amazing", "powerful" | Use realistic names, numbers, and domain-appropriate language. No filler testimonials, no startup slop words. |
40
+
41
+ **Before/After examples:**
42
+
43
+ ```tsx
44
+ // BEFORE — MUST fix: purple gradient + emoji + h-screen
45
+ <section className="h-screen bg-gradient-to-r from-purple-500 to-indigo-600">
46
+ <h1>🚀 Launch Your App</h1>
47
+ </section>
48
+
49
+ // AFTER
50
+ <section className="min-h-[100dvh] bg-zinc-900">
51
+ <h1 className="text-white">Launch Your App</h1>
52
+ </section>
53
+ ```
54
+
55
+ ```tsx
56
+ // BEFORE — MUST fix: div as button
57
+ <div onClick={handleSubmit} className="cursor-pointer rounded px-4 py-2 bg-blue-500 text-white">
58
+ Submit
59
+ </div>
60
+
61
+ // AFTER
62
+ <button type="button" onClick={handleSubmit} className="rounded px-4 py-2 bg-blue-500 text-white">
63
+ Submit
64
+ </button>
65
+ ```
66
+
67
+ ---
68
+
69
+ ### SHOULD Rules (Warnings)
70
+
71
+ Patterns that signal low-quality AI output. Fix unless you have a specific reason not to.
72
+
73
+ | Rule | Anti-pattern | Fix |
74
+ |------|-------------|-----|
75
+ | **Use 4pt spacing scale** | Arbitrary spacing: `p-3`, `gap-3`, `m-5` | Use 4pt increments: `p-2` (8px), `p-4` (16px), `p-6` (24px), `p-8` (32px), `p-12` (48px) |
76
+ | **Use semantic color tokens** | Raw hex: `text="#3B82F6"`, `bg="#1E40AF"` | Use Tailwind semantic tokens: `text-primary`, `bg-primary-700`, `text-muted-foreground` |
77
+ | **Max 1 accent color** | Two+ accent colors competing: blue buttons + green badges + orange links | Pick one accent hue. Use it for all interactive elements. Use neutrals for everything else. |
78
+ | **Skeleton loaders, not spinners** | Full-page spinner: `<div className="flex justify-center"><Spinner /></div>` | Match the layout with skeleton bars: `<div className="space-y-4"><div className="h-4 w-3/4 rounded bg-zinc-200 animate-pulse" />...` |
79
+ | **Left-align content by default** | Every section centered (`text-center`, `mx-auto`) | Left-align content blocks. Reserve center for short hero headlines only. |
80
+ | **Use CSS Grid for layouts** | `flex-wrap` with `w-[calc(33%-1rem)]` math | Use `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6` |
81
+ | **Consistent border-radius** | Mixed: `rounded-sm` on cards, `rounded-2xl` on inputs, `rounded-full` on buttons | Pick one radius tier: `rounded-md` (6px) for cards/buttons, `rounded-lg` (8px) for modals. Don't mix. |
82
+
83
+ **Before/After examples:**
84
+
85
+ ```tsx
86
+ // BEFORE — SHOULD fix: arbitrary spacing, raw hex, flex percentage
87
+ <div className="flex flex-wrap p-3 gap-3">
88
+ {items.map(i => (
89
+ <div className="w-[calc(50%-6px)] bg="#F3F4F6" p-2.5">
90
+ {i.name}
91
+ </div>
92
+ ))}
93
+ </div>
94
+
95
+ // AFTER
96
+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-4 p-4">
97
+ {items.map(i => (
98
+ <div className="bg-muted p-4 rounded-md">
99
+ {i.name}
100
+ </div>
101
+ ))}
102
+ </div>
103
+ ```
104
+
105
+ ```tsx
106
+ // BEFORE — SHOULD fix: spinner loading state
107
+ {loading && <div className="flex justify-center py-12"><Spinner /></div>}
108
+
109
+ // AFTER
110
+ {loading && (
111
+ <div className="space-y-4 p-4">
112
+ <div className="h-4 w-3/4 rounded bg-zinc-200 animate-pulse" />
113
+ <div className="h-4 w-1/2 rounded bg-zinc-200 animate-pulse" />
114
+ <div className="h-4 w-5/6 rounded bg-zinc-200 animate-pulse" />
115
+ </div>
116
+ )}
117
+ ```
118
+
119
+ ---
120
+
121
+ ### NEVER Rules (Blocking — Rewrite Entirely)
122
+
123
+ Patterns that signal complete design failure. Block the output and rewrite.
124
+
125
+ | Rule | Why it's blocked |
126
+ |------|-----------------|
127
+ | **Pure black `#000`** | Never looks good in UI. Destroys depth. Use `#111`, `#18181b`, or `#1c1c1e` instead. |
128
+ | **Centered hero with low variance** | Forces boring landing pages. Use split-screen or left-aligned content. Establish a layout variance baseline (see `design-taste-frontend` for DESIGN_VARIANCE dial if loaded). |
129
+ | **3-column identical cards** | Three identical feature cards is the #1 sign of AI-generated UI. Vary layout: 2-col then 1-col, or 4-col grid, or asymmetric bento. |
130
+ | **Glassmorphism as decoration** | `backdrop-blur-xl bg-white/10` applied to elements with no functional need for depth. Use flat surfaces or layered shadows instead. |
131
+ | **Bounce/elastic easing** | `cubic-bezier(0.68, -0.55, 0.265, 1.55)` or CSS `bounce` animation on UI elements. Use `ease-out` or spring-based motion instead. |
132
+ | **Gray text on colored backgrounds** | White text on pastel backgrounds or gray text on white. Always meet 4.5:1 contrast. |
133
+
134
+ **Before/After examples:**
135
+
136
+ ```tsx
137
+ // BEFORE — NEVER: pure black + 3 identical cards + glassmorphism
138
+ <div className="bg-black text-white">
139
+ <div className="backdrop-blur-xl bg-white/10 rounded-2xl p-8">
140
+ <div className="grid grid-cols-3 gap-4">
141
+ <div className="text-center p-6"><h3>Feature 1</h3><p>Description</p></div>
142
+ <div className="text-center p-6"><h3>Feature 2</h3><p>Description</p></div>
143
+ <div className="text-center p-6"><h3>Feature 3</h3><p>Description</p></div>
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+ // AFTER
149
+ <div className="bg-[#111] text-zinc-100">
150
+ <div className="max-w-7xl mx-auto px-6 py-24">
151
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
152
+ <div className="lg:col-span-2 bg-zinc-900 border border-zinc-800 rounded-lg p-8">
153
+ <h3 className="text-xl font-semibold">Feature 1</h3>
154
+ <p className="text-zinc-400 mt-2">Description</p>
155
+ </div>
156
+ <div className="bg-zinc-900 border border-zinc-800 rounded-lg p-8">
157
+ <h3 className="text-xl font-semibold">Feature 2</h3>
158
+ <p className="text-zinc-400 mt-2">Description</p>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Pipeline Position
168
+
169
+ ```
170
+ baseline-ui ──► design-taste-frontend ──► frontend-design ──► frontend-ui-engineering
171
+
172
+ Quick deslop pass before any design or implementation work
173
+ ```
174
+
175
+ Run `baseline-ui` first when starting any frontend work. It catches the most common AI-generation artifacts so downstream skills can focus on real design quality.
176
+
177
+ ## Don't
178
+
179
+ | Pattern | Replacement | Because |
180
+ |---------|-------------|---------|
181
+ | Purple/indigo gradients as primary palette | Single flat accent color from project palette | Purple gradient is the #1 AI-generation fingerprint |
182
+ | Inter, Roboto, Arial fonts | Geist, Outfit, Satoshi, or system font stack | Overused fonts signal generic AI output |
183
+ | Emojis in JSX/TSX or CSS content | SVG icons (Phosphor, Radix) or clean primitives | Emojis look unprofessional in production UI |
184
+ | `h-screen` on hero sections | `min-h-[100dvh]` | h-screen causes layout jump on mobile browsers |
185
+ | `<div onClick>` as interactive element | `<button type="button">` with proper styling | div onClick breaks keyboard and screen reader access |
186
+ | Pure black `#000` in UI | Off-black (`#111`, Zinc-950, or `#1c1c1e`) | Pure black destroys visual depth |
187
+ | 3-column identical card grids | Varied 2-col, asymmetric bento, or alternating layouts | Three identical cards is the #1 AI UI tell |
188
+ | Glassmorphism without functional purpose | Flat surfaces or layered shadows | Decorative glassmorphism adds visual noise |
189
+ | Bounce/elastic CSS easing on UI elements | `ease-out` or spring-based motion | Bounce easing feels unnatural for UI |
190
+
191
+ ## Verification
192
+
193
+ - [ ] No `h-screen` — all full-height containers use `min-h-[100dvh]`
194
+ - [ ] No `div` with `onClick` used as a button — all interactive elements use `<button>`, `<a>`, or proper ARIA roles
195
+ - [ ] No emojis in any JSX/TSX or CSS content
196
+ - [ ] No purple/indigo-blue gradients
197
+ - [ ] No Inter, Roboto, or Arial font references
198
+ - [ ] No pure black (`#000`/`#000000`) color values
199
+ - [ ] Spacing uses 4pt scale (multiples of 4: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96)
200
+ - [ ] No 3-column identical card patterns
201
+ - [ ] No glassmorphism (`backdrop-blur` + semi-transparent bg) used purely decoratively
202
+ - [ ] No bounce/elastic CSS easing curves on UI elements
203
+ - [ ] Skeleton loaders used instead of spinners for content loading states
204
+
205
+ ### Self-Critique (Run Before Output)
206
+
207
+ 1. **Contrast Check:** Are all text/background combinations ≥ 4.5:1 ratio? No low-contrast gray text on colored backgrounds.
208
+ 2. **Data Check:** Is every text string real or realistic? No "Lorem ipsum", "Jane Doe", "$99", or filler words ("amazing", "powerful").
209
+ 3. **Grid Check:** Do all spacing values use the 4pt scale (4, 8, 12, 16, 24, 32, 48, 64)? No arbitrary pixel values.
210
+ 4. **Font Check:** No Inter, Roboto, Arial, or other AI-default fonts. No oversized H1 (>40px without explicit design reason).
211
+ 5. **Color Check:** No pure black `#000`, no purple/indigo gradients, no oversaturated accents like `#FF4500`.
@@ -16,7 +16,7 @@ description: "Use at command/phase closure points to compress closed exploratory
16
16
  - The `compress` tool is not registered (DCP extension not installed, or `compress.permission: "deny"`) — see No-op clause below.
17
17
  - The work-stream is still in-flight or spans your most recent turn — DCP turn protection (last 3 turns) already refuses these; don't try.
18
18
  - The user just asked about the content you'd be compressing — they still need it verbatim.
19
- - The command is read-only/scaffold and produced almost no tool output (`/status`, `/close`, `/loop-init`, `/loop-check`, `/loop-review`) — compressing near-empty streams wastes more tokens than it saves.
19
+ - The command is read-only/scaffold and produced almost no tool output (`/status`, `/close`) — compressing near-empty streams wastes more tokens than it saves.
20
20
  - Inside orchestrator workflows' phase prompts — subagents carry their own context; only the orchestrator's accumulated summaries matter, and those are bounded by "Keep under N words" per prompt.
21
21
 
22
22
  ## Core Principle