@llipe.com/dev-tasks 0.9.2 → 0.11.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 (69) hide show
  1. package/.claude/agents/developer.md +11 -0
  2. package/.claude/agents/qa-engineer.md +31 -2
  3. package/.claude/agents/researcher.md +96 -0
  4. package/.claude/agents/ux-engineer.md +118 -114
  5. package/.claude/commands/planner.md +22 -7
  6. package/.claude/commands/product-engineer.md +37 -10
  7. package/.claude/commands/researcher.md +28 -0
  8. package/.claude/skills/activity-codebase-research/SKILL.md +158 -0
  9. package/.claude/skills/activity-contract-validation/SKILL.md +167 -0
  10. package/.claude/skills/activity-e2e-test-implementation/SKILL.md +156 -0
  11. package/.claude/skills/activity-integration-test-implementation/SKILL.md +156 -0
  12. package/.claude/skills/activity-refine/SKILL.md +1 -0
  13. package/.claude/skills/activity-test-standards/SKILL.md +41 -0
  14. package/.claude/skills/ux-scaffold/SKILL.md +129 -0
  15. package/.claude/skills/ux-scaffold/scripts/scaffold-full.sh +183 -0
  16. package/.claude/skills/ux-scaffold/scripts/scaffold-lite.sh +235 -0
  17. package/.claude/skills/ux-theme-gen/SKILL.md +149 -0
  18. package/.github/agents/developer.agent.md +11 -0
  19. package/.github/agents/planner.agent.md +22 -7
  20. package/.github/agents/product-engineer.agent.md +37 -10
  21. package/.github/agents/qa-engineer.agent.md +30 -3
  22. package/.github/agents/researcher.agent.md +96 -0
  23. package/.github/agents/ux-engineer.agent.md +119 -114
  24. package/.github/prompts/researcher.prompt.md +29 -0
  25. package/.github/skills/activity-codebase-research/SKILL.md +158 -0
  26. package/.github/skills/activity-contract-validation/SKILL.md +167 -0
  27. package/.github/skills/activity-e2e-test-implementation/SKILL.md +156 -0
  28. package/.github/skills/activity-integration-test-implementation/SKILL.md +156 -0
  29. package/.github/skills/activity-refine/SKILL.md +6 -0
  30. package/.github/skills/activity-test-standards/SKILL.md +41 -0
  31. package/.github/skills/ux-scaffold/SKILL.md +129 -0
  32. package/.github/skills/ux-scaffold/scripts/scaffold-full.sh +183 -0
  33. package/.github/skills/ux-scaffold/scripts/scaffold-lite.sh +235 -0
  34. package/.github/skills/ux-theme-gen/SKILL.md +149 -0
  35. package/.kiro/agents/developer.md +11 -0
  36. package/.kiro/agents/planner.md +22 -7
  37. package/.kiro/agents/product-engineer.md +37 -10
  38. package/.kiro/agents/qa-engineer.md +30 -3
  39. package/.kiro/agents/researcher.md +99 -0
  40. package/.kiro/agents/ux-engineer.md +119 -132
  41. package/.kiro/agents/verifier.md +1 -1
  42. package/.kiro/skills/activity-codebase-research/SKILL.md +158 -0
  43. package/.kiro/skills/activity-contract-validation/SKILL.md +167 -0
  44. package/.kiro/skills/activity-e2e-test-implementation/SKILL.md +156 -0
  45. package/.kiro/skills/activity-integration-test-implementation/SKILL.md +156 -0
  46. package/.kiro/skills/activity-refine/SKILL.md +1 -0
  47. package/.kiro/skills/activity-test-standards/SKILL.md +41 -0
  48. package/.kiro/skills/ux-scaffold/SKILL.md +129 -0
  49. package/.kiro/skills/ux-scaffold/scripts/scaffold-full.sh +183 -0
  50. package/.kiro/skills/ux-scaffold/scripts/scaffold-lite.sh +235 -0
  51. package/.kiro/skills/ux-theme-gen/SKILL.md +149 -0
  52. package/AGENTS.md +91 -214
  53. package/CHANGELOG.md +64 -0
  54. package/CLAUDE.md +3 -2
  55. package/DESIGN.md +233 -0
  56. package/README.md +31 -28
  57. package/TESTING.md +19 -11
  58. package/bundle-manifest.json +1 -0
  59. package/dist/core/distribution/doctor.d.ts +2 -2
  60. package/dist/core/distribution/doctor.js +3 -3
  61. package/dist/core/distribution/profiles.d.ts.map +1 -1
  62. package/dist/core/distribution/profiles.js +1 -1
  63. package/dist/core/distribution/profiles.js.map +1 -1
  64. package/package.json +4 -3
  65. package/.claude/skills/webapp-mockup/SKILL.md +0 -76
  66. package/.claude/skills/webapp-mockup/scripts/scaffold-mockup.sh +0 -469
  67. package/.github/skills/webapp-mockup/SKILL.md +0 -71
  68. package/.github/skills/webapp-mockup/scripts/scaffold-mockup.sh +0 -469
  69. package/.kiro/skills/webapp-mockup/SKILL.md +0 -76
@@ -92,6 +92,47 @@ A monorepo defines `test:node` as `app && scraper && db` while the `api` package
92
92
 
93
93
  Correct output: **defect** — `api` is unreachable from the aggregate; the CI gate and the deploy gate both let untested backend code through. Reporting "all script names conform" here is a false pass.
94
94
 
95
+ ## Part 4 — Integration, E2E, and Contract Infrastructure Detection
96
+
97
+ Detect the presence and configuration state of higher-layer test infrastructure. Report findings as **informational** — missing infrastructure is not a defect, but it informs the gap analysis.
98
+
99
+ ### Integration testing infrastructure
100
+
101
+ | Check | What to look for |
102
+ | ----------------------- | ------------------------------------------------------------- |
103
+ | **Testcontainers** | `@testcontainers/postgresql` or similar in dependencies |
104
+ | **Docker Compose** | `docker-compose.yml` or `compose.yml` with a database service |
105
+ | **Supabase local CLI** | `supabase/config.toml` or `.supabase/` directory |
106
+ | **Docker availability** | `docker info` succeeds (report if unavailable) |
107
+
108
+ ### E2E testing infrastructure
109
+
110
+ | Check | What to look for |
111
+ | ------------------------- | -------------------------------------------------------------------------------- |
112
+ | **Playwright config** | `playwright.config.ts` or `playwright.config.js` present |
113
+ | **Base URL configured** | Config references `process.env.BASE_URL` or equivalent (not hardcoded localhost) |
114
+ | **Auth setup project** | A `global-setup` or setup project defined in Playwright config |
115
+ | **Browser install in CI** | CI workflow includes `playwright install` step |
116
+ | **`test:e2e` script** | Present in `package.json` and reachable from aggregate |
117
+
118
+ ### Contract validation infrastructure
119
+
120
+ | Check | What to look for |
121
+ | -------------------------- | ------------------------------------------------------ |
122
+ | **OpenAPI spec** | `openapi.yaml`, `openapi.json`, `swagger.*` in repo |
123
+ | **AsyncAPI spec** | `asyncapi.yaml`, `asyncapi.json` in repo |
124
+ | **`dt` CLI** | `which dt` succeeds |
125
+ | **`test:contract` script** | Present in `package.json` and reachable from aggregate |
126
+
127
+ ### Reporting
128
+
129
+ Report each finding as:
130
+
131
+ - `[INFO] <infrastructure> detected: <path or status>`
132
+ - `[INFO] <infrastructure> not found — Layer {X} tests require this`
133
+
134
+ These are informational findings for the gap analysis. They do **NOT** block or fail the standards check.
135
+
95
136
  ## Failure Modes
96
137
 
97
138
  | Condition | Required behavior |
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: ux-scaffold
3
+ description: "Template-aware mockup project creation with DESIGN.md-derived tokens. Supports html-lite (zero-install, navigable) and react-full (shadcn + Vite + Radix). Use when generating mockups from a PRD or spec."
4
+ ---
5
+
6
+ # UX Scaffold
7
+
8
+ ## Purpose
9
+
10
+ Create mockup projects at the correct fidelity level, styled from DESIGN.md tokens via `ux-theme-gen` output, and structured as navigable screen sets rather than monolithic apps.
11
+
12
+ ## When to Use
13
+
14
+ - `ux-engineer` invokes this after `ux-theme-gen` has produced theme artifacts.
15
+ - User explicitly requests a mockup scaffold.
16
+
17
+ ## Templates
18
+
19
+ | Template | Fidelity | Output | Build step required |
20
+ | --------------- | -------- | --------------------------------------------- | -------------------------------- |
21
+ | `html-lite` | Low | Self-contained HTML per screen + `index.html` | No — opens from `file://` |
22
+ | `react-full` | High | Vite + React + shadcn/ui project | Yes — `pnpm install && pnpm dev` |
23
+ | ~~`react-mid`~~ | — | Cut (decision 2) | — |
24
+ | `react-native` | — | Reserved, not implemented | — |
25
+
26
+ ## Scripts
27
+
28
+ ### `scaffold-lite.sh`
29
+
30
+ ```
31
+ Usage: ./scripts/scaffold-lite.sh <feature> <variant-num> <theme-css-path> <output-dir>
32
+ ```
33
+
34
+ Generates:
35
+
36
+ - `<output-dir>/index.html` — entry point listing all screens with nav
37
+ - `<output-dir>/screen-<name>.html` — one per enumerated screen
38
+ - `<output-dir>/screen-map.md` — Mermaid flowchart of screen navigation
39
+
40
+ ### `scaffold-full.sh`
41
+
42
+ ```
43
+ Usage: ./scripts/scaffold-full.sh <feature> <variant-num> <output-dir>
44
+ ```
45
+
46
+ Scaffolds a Vite + shadcn project. The script:
47
+
48
+ 1. Creates the Vite app via `npm create vite@latest`.
49
+ 2. Runs `pnpm install`.
50
+ 3. Runs `shadcn@4.18.0 init --base radix --preset nova --css-variables --yes --silent` in the created dir.
51
+ 4. Copies `ux-theme-gen` output (`theme.css`) into `src/index.css`, replacing the default token declarations.
52
+
53
+ ## Screen Enumeration
54
+
55
+ Before scaffolding, the agent enumerates screens from the source artifact:
56
+
57
+ | Screen type | Purpose |
58
+ | ------------------ | ------------------------------- |
59
+ | `happy` | Primary flow, success state |
60
+ | `error-validation` | Form validation failures |
61
+ | `error-server` | Server/network error states |
62
+ | `error-permission` | Permission denied, unauthorized |
63
+ | `empty` | No data, first-use experience |
64
+ | `loading` | Skeleton screens, spinners |
65
+ | `edge-overflow` | Long text, many items |
66
+ | `edge-zero` | Zero items, disabled states |
67
+
68
+ Each screen becomes a named file (`screen-happy.html`, `screen-error-validation.html`, etc.).
69
+
70
+ ## html-lite Navigation (Decision 2)
71
+
72
+ Lite output is a **browsable prototype**, not loose files:
73
+
74
+ - **`index.html`** — lists every screen with its purpose and the AC/story it satisfies, plus the screen map rendered inline.
75
+ - **Inter-screen links** — persistent nav strip on every screen: back to index, previous/next, and direct links to related states (e.g., happy → error-validation → empty).
76
+ - **Relative links only** — must work from `file://` with no server.
77
+ - **Current-screen indication** — highlighted in the nav strip.
78
+
79
+ ## Annotations
80
+
81
+ Every screen section carries a machine-readable reference to the AC or story it satisfies:
82
+
83
+ - HTML: `<section data-ac="AC-3">` or `<!-- AC: AC-3 -->`
84
+ - React: `{/* @ac AC-3 */}` comment above the relevant JSX
85
+
86
+ ## Theme Integration
87
+
88
+ - `html-lite`: reads `theme.css` and inlines the `:root` token values as a `<style>` block.
89
+ - `react-full`: `theme.css` replaces the shadcn-generated `:root` / `@theme inline` block in `src/index.css`.
90
+
91
+ Both templates **must not** contain hardcoded palette values. All styling derives from the theme output.
92
+
93
+ ## Palette Inputs — Removed
94
+
95
+ The `palette` parameter and the `colorhunt.co` fallback are **removed**. DESIGN.md is the sole palette source. If DESIGN.md is unfilled, the agent runs the filling procedure rather than inventing a palette.
96
+
97
+ ## Dependencies (react-full)
98
+
99
+ Pinned to the verified compatibility matrix:
100
+
101
+ | Package | Version | Notes |
102
+ | -------------------------- | ------- | ------------------------------- |
103
+ | `vite` | ^8 | via `create vite` |
104
+ | `@vitejs/plugin-react` | ^6 | Vite 8 only |
105
+ | `@tailwindcss/vite` | ^4 | replaces postcss + autoprefixer |
106
+ | `tailwindcss` | ^4 | CSS-first, no config file |
107
+ | `shadcn` | 4.18.0 | pinned exactly; never @latest |
108
+ | `radix-ui` | ^1.6 | unified package |
109
+ | `tw-animate-css` | ^1.4 | replaces tailwindcss-animate |
110
+ | `class-variance-authority` | ^0.7 | |
111
+ | `clsx` + `tailwind-merge` | latest | |
112
+ | `lucide-react` | ^1.33 | icon library |
113
+
114
+ **Node requirement:** `>= 24` (shadcn CLI needs `>= 20.18.1`; repo floor is `>= 24`).
115
+
116
+ ## Backward Compatibility
117
+
118
+ `webapp-mockup` has been removed. Use `ux-scaffold` directly with the appropriate template.
119
+
120
+ ## Acceptance Checklist
121
+
122
+ - Scripts run non-interactively with no TTY
123
+ - html-lite produces valid standalone HTML viewable from `file://`
124
+ - index.html includes screen map + screen listing
125
+ - Inter-screen navigation works with relative links
126
+ - react-full uses shadcn CLI (pinned), not hand-rolled components
127
+ - No hardcoded palette in any scaffold output
128
+ - Every screen carries an AC/story annotation
129
+ - No `postcss`, `autoprefixer`, `tailwindcss-animate`, or `tailwindcss init -p`
@@ -0,0 +1,183 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # scaffold-full.sh — Generate a react-full mockup via shadcn CLI.
5
+ # Creates a Vite + React + Tailwind v4 + shadcn/ui project, then
6
+ # replaces the default theme with ux-theme-gen output.
7
+ #
8
+ # Usage:
9
+ # ./scripts/scaffold-full.sh <feature> <variant-num> <output-dir> [theme-css-path]
10
+ #
11
+ # Example:
12
+ # ./scripts/scaffold-full.sh billing 1 /mockups/mockup-billing-1 /mockups/.theme/theme.css
13
+ #
14
+ # Prerequisites:
15
+ # - Node.js >= 24
16
+ # - pnpm available (preferred) or npm
17
+ # - Internet access for npm create vite + shadcn init
18
+
19
+ SHADCN_VERSION="4.18.0"
20
+
21
+ usage() {
22
+ echo "Usage: $0 <feature> <variant-num> <output-dir> [theme-css-path]"
23
+ echo ""
24
+ echo " feature Feature slug (lowercase, hyphenated)"
25
+ echo " variant-num Variant number (integer)"
26
+ echo " output-dir Directory to create the project in (must not exist)"
27
+ echo " theme-css-path Path to theme.css from ux-theme-gen (optional; merged after scaffold)"
28
+ exit 1
29
+ }
30
+
31
+ if [[ $# -lt 3 || $# -gt 4 ]]; then
32
+ usage
33
+ fi
34
+
35
+ FEATURE="$(echo "$1" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-')"
36
+ VARIANT="$2"
37
+ OUTPUT_DIR="$3"
38
+ THEME_CSS="${4:-}"
39
+
40
+ if [[ -z "$FEATURE" ]]; then
41
+ echo "Error: <feature> produced an empty slug."
42
+ exit 1
43
+ fi
44
+
45
+ if ! [[ "$VARIANT" =~ ^[0-9]+$ ]]; then
46
+ echo "Error: <variant-num> must be an integer."
47
+ exit 1
48
+ fi
49
+
50
+ if [[ -d "$OUTPUT_DIR" ]]; then
51
+ echo "Error: output directory already exists: $OUTPUT_DIR"
52
+ exit 1
53
+ fi
54
+
55
+ # Detect package manager
56
+ PM="npm"
57
+ if command -v pnpm >/dev/null 2>&1; then
58
+ PM="pnpm"
59
+ fi
60
+
61
+ echo "[scaffold-full] Creating Vite + React project at: $OUTPUT_DIR"
62
+ echo "[scaffold-full] Package manager: $PM"
63
+ echo "[scaffold-full] shadcn version: ${SHADCN_VERSION}"
64
+
65
+ # Step 1: Create Vite project
66
+ CI=1 npm_config_yes=true npm create vite@latest "$OUTPUT_DIR" -- --template react-ts
67
+
68
+ # Step 2: Install dependencies with pnpm (or npm)
69
+ pushd "$OUTPUT_DIR" >/dev/null
70
+
71
+ if [[ "$PM" == "pnpm" ]]; then
72
+ pnpm install
73
+ else
74
+ npm install
75
+ fi
76
+
77
+ # Step 3: Install Tailwind v4 + Vite plugin (replaces postcss/autoprefixer pattern)
78
+ $PM add tailwindcss@^4 @tailwindcss/vite@^4 tw-animate-css@^1.4
79
+
80
+ # Step 4: Configure vite.config.ts with tailwindcss plugin and path alias
81
+ cat > vite.config.ts << 'VITE_EOF'
82
+ import path from "path"
83
+ import tailwindcss from "@tailwindcss/vite"
84
+ import react from "@vitejs/plugin-react"
85
+ import { defineConfig } from "vite"
86
+
87
+ export default defineConfig({
88
+ plugins: [react(), tailwindcss()],
89
+ resolve: {
90
+ alias: {
91
+ "@": path.resolve(__dirname, "./src"),
92
+ },
93
+ },
94
+ })
95
+ VITE_EOF
96
+
97
+ # Step 5: Create minimal index.css for shadcn init to find
98
+ cat > src/index.css << 'CSS_EOF'
99
+ @import "tailwindcss";
100
+ CSS_EOF
101
+
102
+ # Step 6: Run shadcn init (writes components.json, updates deps, creates utils)
103
+ npx --yes "shadcn@${SHADCN_VERSION}" init \
104
+ --base radix \
105
+ --preset nova \
106
+ --css-variables \
107
+ --yes \
108
+ --silent
109
+
110
+ echo "[scaffold-full] shadcn init complete."
111
+
112
+ # Step 7: Merge theme.css if provided
113
+ if [[ -n "$THEME_CSS" && -f "$THEME_CSS" ]]; then
114
+ echo "[scaffold-full] Merging theme from: $THEME_CSS"
115
+ # The shadcn init writes its own :root block into src/index.css.
116
+ # We replace the :root and @theme inline sections with the DESIGN.md-derived ones.
117
+ # Strategy: append our theme.css content after the @import lines.
118
+ # The agent should refine this merge based on actual content.
119
+
120
+ # Extract @import lines from current index.css
121
+ IMPORTS=$(grep -E "^@import" src/index.css || true)
122
+
123
+ # Rebuild index.css: imports + our theme + base layer
124
+ {
125
+ echo "$IMPORTS"
126
+ echo ""
127
+ cat "$THEME_CSS"
128
+ echo ""
129
+ echo "@layer base {"
130
+ echo " * {"
131
+ echo " @apply border-border outline-ring/50;"
132
+ echo " }"
133
+ echo " body {"
134
+ echo " @apply bg-background text-foreground;"
135
+ echo " }"
136
+ echo "}"
137
+ } > src/index.css
138
+
139
+ echo "[scaffold-full] Theme merged into src/index.css"
140
+ fi
141
+
142
+ # Step 8: Create a placeholder App.tsx
143
+ cat > src/App.tsx << 'APP_EOF'
144
+ import "./index.css"
145
+
146
+ export default function App() {
147
+ return (
148
+ <main className="mx-auto max-w-4xl px-4 py-10">
149
+ <header className="mb-8 rounded-xl border bg-card p-5 shadow-sm">
150
+ <p className="mb-2 text-xs font-semibold uppercase tracking-wide text-secondary-foreground">
151
+ Mockup — Variant VARIANT_NUM
152
+ </p>
153
+ <h1 className="text-2xl font-semibold">FEATURE_NAME</h1>
154
+ <p className="mt-2 text-sm text-muted-foreground">
155
+ This is a full-fidelity mockup scaffold. Implement screens and interactions here.
156
+ </p>
157
+ </header>
158
+
159
+ {/* Agent: implement mockup screens below */}
160
+ <section className="rounded-xl border bg-card p-5 shadow-sm" data-ac="AC-TODO">
161
+ <h2 className="text-lg font-semibold">Screen Content</h2>
162
+ <p className="mt-2 text-sm text-muted-foreground">
163
+ Replace this with the actual mockup implementation.
164
+ </p>
165
+ </section>
166
+ </main>
167
+ )
168
+ }
169
+ APP_EOF
170
+
171
+ # Replace placeholders
172
+ sed -i '' "s/VARIANT_NUM/${VARIANT}/g" src/App.tsx
173
+ sed -i '' "s/FEATURE_NAME/${FEATURE}/g" src/App.tsx
174
+
175
+ # Clean up Vite default files
176
+ rm -f src/App.css src/assets/react.svg public/vite.svg
177
+
178
+ popd >/dev/null
179
+
180
+ echo ""
181
+ echo "[scaffold-full] Done. Project created at: $OUTPUT_DIR"
182
+ echo " cd $OUTPUT_DIR"
183
+ echo " $PM run dev"
@@ -0,0 +1,235 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # scaffold-lite.sh — Generate a navigable html-lite mockup scaffold.
5
+ # All screens are self-contained HTML files styled from DESIGN.md tokens.
6
+ #
7
+ # Usage:
8
+ # ./scripts/scaffold-lite.sh <feature> <variant-num> <theme-css-path> <output-dir>
9
+ #
10
+ # Example:
11
+ # ./scripts/scaffold-lite.sh onboarding 1 /mockups/.theme/theme.css docs/requirements/mockups/onboarding/
12
+
13
+ usage() {
14
+ echo "Usage: $0 <feature> <variant-num> <theme-css-path> <output-dir>"
15
+ echo ""
16
+ echo " feature Feature slug (lowercase, hyphenated)"
17
+ echo " variant-num Variant number (integer)"
18
+ echo " theme-css-path Path to the generated theme.css from ux-theme-gen"
19
+ echo " output-dir Directory to create the mockup in"
20
+ exit 1
21
+ }
22
+
23
+ if [[ $# -ne 4 ]]; then
24
+ usage
25
+ fi
26
+
27
+ FEATURE="$(echo "$1" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-')"
28
+ VARIANT="$2"
29
+ THEME_CSS="$3"
30
+ OUTPUT_DIR="$4"
31
+
32
+ if [[ -z "$FEATURE" ]]; then
33
+ echo "Error: <feature> produced an empty slug."
34
+ exit 1
35
+ fi
36
+
37
+ if ! [[ "$VARIANT" =~ ^[0-9]+$ ]]; then
38
+ echo "Error: <variant-num> must be an integer."
39
+ exit 1
40
+ fi
41
+
42
+ if [[ ! -f "$THEME_CSS" ]]; then
43
+ echo "Error: theme.css not found at: $THEME_CSS"
44
+ echo "Run ux-theme-gen first to generate theme artifacts from DESIGN.md."
45
+ exit 1
46
+ fi
47
+
48
+ # Extract :root block from theme.css to inline in HTML files
49
+ ROOT_STYLES=$(sed -n '/:root/,/^}/p' "$THEME_CSS")
50
+ THEME_INLINE=$(sed -n '/@theme inline/,/^}/p' "$THEME_CSS")
51
+
52
+ mkdir -p "$OUTPUT_DIR"
53
+
54
+ # Screen types the agent will fill with content
55
+ SCREENS=(
56
+ "happy:Primary flow — success state"
57
+ "error-validation:Form validation failures"
58
+ "error-server:Server or network error state"
59
+ "error-permission:Permission denied or unauthorized"
60
+ "empty:No data or first-use experience"
61
+ "loading:Skeleton screens and spinners"
62
+ "edge-overflow:Long text, many items"
63
+ "edge-zero:Zero items, disabled states"
64
+ )
65
+
66
+ # Generate individual screen files
67
+ for entry in "${SCREENS[@]}"; do
68
+ name="${entry%%:*}"
69
+ desc="${entry#*:}"
70
+ filename="screen-${name}.html"
71
+
72
+ cat > "${OUTPUT_DIR}/${filename}" << SCREEN_EOF
73
+ <!DOCTYPE html>
74
+ <html lang="en">
75
+ <head>
76
+ <meta charset="UTF-8">
77
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
78
+ <title>${FEATURE} v${VARIANT} — ${name}</title>
79
+ <style>
80
+ ${ROOT_STYLES}
81
+
82
+ * { margin: 0; padding: 0; box-sizing: border-box; }
83
+ body {
84
+ font-family: system-ui, -apple-system, sans-serif;
85
+ background: var(--background);
86
+ color: var(--foreground);
87
+ min-height: 100vh;
88
+ padding: 1rem;
89
+ }
90
+ .nav-strip {
91
+ display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
92
+ background: var(--muted); border-radius: 0.5rem;
93
+ margin-bottom: 1.5rem; flex-wrap: wrap; font-size: 0.875rem;
94
+ }
95
+ .nav-strip a { color: var(--primary); text-decoration: none; }
96
+ .nav-strip a:hover { text-decoration: underline; }
97
+ .nav-strip .current { font-weight: 700; color: var(--foreground); }
98
+ .screen-content {
99
+ border: 1px solid var(--border); border-radius: 0.75rem;
100
+ padding: 2rem; min-height: 60vh;
101
+ }
102
+ .screen-content h1 { font-size: 1.5rem; margin-bottom: 1rem; }
103
+ .screen-content .description { color: var(--muted-foreground); margin-bottom: 2rem; }
104
+ .banner {
105
+ background: var(--accent); color: var(--accent-foreground);
106
+ padding: 0.75rem 1rem; border-radius: 0.5rem; margin-bottom: 1.5rem;
107
+ font-size: 0.875rem;
108
+ }
109
+ </style>
110
+ </head>
111
+ <body>
112
+ <nav class="nav-strip">
113
+ <a href="index.html">Index</a>
114
+ SCREEN_EOF
115
+
116
+ # Add prev/next/related links placeholder
117
+ cat >> "${OUTPUT_DIR}/${filename}" << 'NAV_EOF'
118
+ <!-- Agent: replace with actual prev/next links based on screen order -->
119
+ <span class="current">CURRENT_SCREEN</span>
120
+ </nav>
121
+
122
+ <div class="banner">
123
+ Partial mockup — variant VARIANT_NUM of feature FEATURE_NAME. Extend with actual UI content.
124
+ </div>
125
+
126
+ <main class="screen-content" data-ac="AC-TODO">
127
+ <h1>SCREEN_TITLE</h1>
128
+ <p class="description">SCREEN_DESC</p>
129
+
130
+ <!-- Agent: implement the screen content here -->
131
+ <p style="color: var(--muted-foreground); font-style: italic;">
132
+ Screen content to be implemented by ux-engineer.
133
+ </p>
134
+ </main>
135
+ </body>
136
+ </html>
137
+ NAV_EOF
138
+
139
+ # Replace placeholders
140
+ sed -i '' "s/CURRENT_SCREEN/${name}/g" "${OUTPUT_DIR}/${filename}"
141
+ sed -i '' "s/VARIANT_NUM/${VARIANT}/g" "${OUTPUT_DIR}/${filename}"
142
+ sed -i '' "s/FEATURE_NAME/${FEATURE}/g" "${OUTPUT_DIR}/${filename}"
143
+ sed -i '' "s/SCREEN_TITLE/${name}/g" "${OUTPUT_DIR}/${filename}"
144
+ sed -i '' "s/SCREEN_DESC/${desc}/g" "${OUTPUT_DIR}/${filename}"
145
+ done
146
+
147
+ # Generate index.html
148
+ cat > "${OUTPUT_DIR}/index.html" << INDEX_EOF
149
+ <!DOCTYPE html>
150
+ <html lang="en">
151
+ <head>
152
+ <meta charset="UTF-8">
153
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
154
+ <title>${FEATURE} v${VARIANT} — Screen Index</title>
155
+ <style>
156
+ ${ROOT_STYLES}
157
+
158
+ * { margin: 0; padding: 0; box-sizing: border-box; }
159
+ body {
160
+ font-family: system-ui, -apple-system, sans-serif;
161
+ background: var(--background);
162
+ color: var(--foreground);
163
+ min-height: 100vh;
164
+ padding: 2rem;
165
+ max-width: 800px; margin: 0 auto;
166
+ }
167
+ h1 { font-size: 2rem; margin-bottom: 0.5rem; }
168
+ .subtitle { color: var(--muted-foreground); margin-bottom: 2rem; }
169
+ .screen-list { list-style: none; }
170
+ .screen-list li {
171
+ border: 1px solid var(--border); border-radius: 0.5rem;
172
+ padding: 1rem; margin-bottom: 0.75rem;
173
+ }
174
+ .screen-list a { color: var(--primary); text-decoration: none; font-weight: 600; }
175
+ .screen-list a:hover { text-decoration: underline; }
176
+ .screen-list .desc { color: var(--muted-foreground); font-size: 0.875rem; margin-top: 0.25rem; }
177
+ .screen-map { margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: 0.75rem; }
178
+ .screen-map h2 { margin-bottom: 1rem; }
179
+ pre { background: var(--muted); padding: 1rem; border-radius: 0.5rem; overflow-x: auto; font-size: 0.8rem; }
180
+ </style>
181
+ </head>
182
+ <body>
183
+ <h1>${FEATURE} — Variant ${VARIANT}</h1>
184
+ <p class="subtitle">Lite mockup — open any screen below. All links are relative and work from file://.</p>
185
+
186
+ <ul class="screen-list">
187
+ INDEX_EOF
188
+
189
+ for entry in "${SCREENS[@]}"; do
190
+ name="${entry%%:*}"
191
+ desc="${entry#*:}"
192
+ cat >> "${OUTPUT_DIR}/index.html" << ITEM_EOF
193
+ <li>
194
+ <a href="screen-${name}.html">${name}</a>
195
+ <div class="desc">${desc}</div>
196
+ </li>
197
+ ITEM_EOF
198
+ done
199
+
200
+ cat >> "${OUTPUT_DIR}/index.html" << FOOTER_EOF
201
+ </ul>
202
+
203
+ <div class="screen-map">
204
+ <h2>Screen Map</h2>
205
+ <pre><code>
206
+ See screen-map.md for the Mermaid source.
207
+ Agent: embed a rendered diagram here or link to screen-map.md.
208
+ </code></pre>
209
+ </div>
210
+ </body>
211
+ </html>
212
+ FOOTER_EOF
213
+
214
+ # Generate screen-map.md placeholder
215
+ cat > "${OUTPUT_DIR}/screen-map.md" << MAP_EOF
216
+ # Screen Map — ${FEATURE} v${VARIANT}
217
+
218
+ \`\`\`mermaid
219
+ flowchart LR
220
+ happy[Happy Path] --> error-validation[Validation Error]
221
+ happy --> empty[Empty State]
222
+ happy --> loading[Loading]
223
+ error-validation --> happy
224
+ error-server[Server Error] --> happy
225
+ error-permission[Permission Denied] --> happy
226
+ empty --> happy
227
+ edge-overflow[Overflow] --> happy
228
+ edge-zero[Zero Items] --> happy
229
+ \`\`\`
230
+
231
+ > Agent: update this diagram to reflect the actual navigation flow derived from the PRD/spec.
232
+ MAP_EOF
233
+
234
+ echo "Done. Lite scaffold created at: ${OUTPUT_DIR}"
235
+ echo " index.html + $(echo "${SCREENS[@]}" | wc -w | tr -d ' ') screen files + screen-map.md"