--- name: ac-tools-human-agentic-design description: "Generates interactive HTML prototypes optimized for dual human+agent interaction. Produces semantic, accessible designs with Tailwind + DaisyUI (Tier A) or React + shadcn/ui + Vite (Tier B). Triggers on keywords: prototype, design, UI prototype, landing page, dashboard, form design, human-agentic, had, mockup, wireframe" project-agnostic: true allowed-tools: - Read - Write - Edit - Bash - Glob - Grep - mcp__playwright__browser_navigate - mcp__playwright__browser_take_screenshot - mcp__playwright__browser_snapshot - mcp__playwright__browser_resize - mcp__playwright__browser_click - mcp__playwright__browser_type --- # Human-Agentic Design ## Compatibility Note This pi wrapper preserves the original optional Playwright preview loop, but the documented non-MCP fallback remains mandatory when preview tooling is unavailable. Generates live, interactive prototype designs optimized for dual human+agent interaction. Every prototype is equally usable by humans (visual interaction) and AI agents (programmatic interaction via accessibility trees). ## Purpose - Generate production-quality HTML prototypes with zero setup - Enforce semantic HTML and accessibility standards that enable AI agent navigation - Provide iterative visual + accessibility feedback via Playwright MCP - Support two tiers: zero-dep HTML (Tier A) and React + shadcn/ui (Tier B) ## Workflow ### 1. Environment Probe Detect available capabilities. Run these checks silently (no user prompting): ```bash # Check Playwright MCP availability (tool list includes mcp__playwright__*) # Check Node.js if NODE_BIN=$(command -v node); then "$NODE_BIN" --version; fi ``` **Tier Selection:** - Playwright MCP tools available -> Enable preview loop - `node` binary found in PATH -> Offer Tier B (React + shadcn/ui + Vite) - Default -> Tier A (single-file HTML + Tailwind CDN + DaisyUI CDN) Report detected tier to user in one line: ``` Environment: Tier [A|B] | Playwright: [available|unavailable] | Node: [vX.Y.Z|not found] ``` If user explicitly requests a tier, honor that request regardless of detection. ### 2. Parse Request Identify from user prompt: - **Page type**: landing, dashboard, form, blog, portfolio, or custom - **Design requirements**: colors, branding, content, layout preferences - **Tier preference**: explicit tier request overrides auto-detection - **Multi-page**: if multiple pages requested, plan linked file set If page type matches a built-in template, use it as starting point. Read the template from `templates/.html` within this skill directory. ### 3. Generate Code **Tier A (HTML + Tailwind CDN + DaisyUI CDN):** - Read `cookbook/tier-a.md` for boilerplate and CDN URLs - Read `cookbook/agent-principles.md` for the 8 mandatory principles - Generate single `index.html` (or multiple linked HTML files for multi-page) - All CSS via Tailwind utility classes + DaisyUI component classes - All JS vanilla, embedded in `