launchframe 0.4.10 → 0.4.12

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 (37) hide show
  1. package/.amazonq/cli-agents/launchframe.json +1 -1
  2. package/.amazonq/rules/project.md +6 -7
  3. package/.augment/commands/launchframe.md +16 -0
  4. package/.claude/skills/launchframe/SKILL.md +16 -0
  5. package/.clinerules +6 -7
  6. package/.codex/skills/launchframe/SKILL.md +16 -0
  7. package/.continue/commands/launchframe.md +16 -0
  8. package/.continue/rules/project.md +8 -8
  9. package/.cursor/commands/launchframe.md +16 -0
  10. package/.gemini/commands/launchframe.toml +16 -0
  11. package/.github/copilot-instructions.md +6 -7
  12. package/.github/skills/launchframe/SKILL.md +16 -0
  13. package/.gitignore +4 -0
  14. package/.opencode/commands/launchframe.md +16 -0
  15. package/.windsurf/workflows/launchframe.md +16 -0
  16. package/AGENTS.md +1 -1
  17. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-24-43-488Z/README.txt +16 -0
  18. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-24-43-488Z/body-outer.html +2 -0
  19. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-24-43-488Z/capture-meta.json +19 -0
  20. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-24-43-488Z/document.html +2 -0
  21. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-24-43-488Z/inline-styles.json +7 -0
  22. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-24-43-488Z/motion-summary.json +18 -0
  23. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/README.txt +17 -0
  24. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/ai-page-bundle.txt +29 -0
  25. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/body-outer.html +2 -0
  26. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/capture-meta.json +21 -0
  27. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/document.html +2 -0
  28. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/inline-styles.json +7 -0
  29. package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/motion-summary.json +18 -0
  30. package/docs/research/page-captures/example.com-2026-05-15T21-21-31-863Z/README.txt +16 -0
  31. package/docs/research/page-captures/example.com-2026-05-15T21-21-31-863Z/body-outer.html +2 -0
  32. package/docs/research/page-captures/example.com-2026-05-15T21-21-31-863Z/capture-meta.json +19 -0
  33. package/docs/research/page-captures/example.com-2026-05-15T21-21-31-863Z/document.html +2 -0
  34. package/docs/research/page-captures/example.com-2026-05-15T21-21-31-863Z/inline-styles.json +7 -0
  35. package/docs/research/page-captures/example.com-2026-05-15T21-21-31-863Z/motion-summary.json +18 -0
  36. package/package.json +5 -3
  37. package/scripts/page-inspection-dump.mjs +418 -0
@@ -23,6 +23,22 @@ Before reconnaissance, write or update:
23
23
  - `docs/research/LAUNCHFRAME.md` — URLs and SaaS idea
24
24
  - **`docs/research/LAUNCHFRAME_SUBAGENTS.md`** — **before Phase 6**, ensure this runbook holds all four verifier prompts (**copy-ready**). When the bundled template differs from the latest SKILL rubrics (after skill edits), re-sync Section **Phase 6** rubrics **into this file**. Subagents receive prompts **only** from here.
25
25
 
26
+ ### Step 0a — Automated page inspection dump (mandatory)
27
+
28
+ Right after Step 0 files are written, **from the repository root**, run the bundled **Playwright** capture **once per parsed reference URL** (before Phase 1 Chrome MCP). This produces **`ai-page-bundle.txt`** (one plain-text file: full post-JS HTML + all captured CSS), plus `document.html`, network `*.css` bodies, `inline-styles.json`, and `motion-summary.json` — attach **`ai-page-bundle.txt`** to the agent when a single pasteable artifact is enough; the frozen bundle complements live `getComputedStyle` / WAAPI work (**it does not replace** Chrome MCP for numeric motion and interaction sweeps).
29
+
30
+ 1. **One-time per machine:** `npx playwright install chromium`
31
+ 2. **Per URL** — use the URL’s hostname for the folder (example hostname `www.example.com`):
32
+
33
+ ```bash
34
+ npm run inspect:page -- "https://www.example.com/" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/www.example.com/page-inspection"
35
+ ```
36
+
37
+ That creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with all artifacts. Omit `--out-parent` to use the default `docs/research/page-captures/<host>-<stamp>/`.
38
+ 3. Append an **`Automated captures`** subsection to `docs/research/LAUNCHFRAME.md` listing every URL and its output directory path. Use those files in Phase 1 when structuring specs (DOM outline, stylesheet text, `@keyframes` from `motion-summary.json`) while still measuring behavior in the live tab.
39
+
40
+ If the dump fails (missing browsers, navigation timeout, TLS, bot wall), increase `--timeout`, retry with `domcontentloaded` only when necessary, or document the failure in `LAUNCHFRAME.md` and unblock before treating Phase 1 as complete.
41
+
26
42
  ## SaaS copy overlay (Phase 4 assembly and final polish)
27
43
 
28
44
  After structure and styles match the reference, apply the **SaaS idea** to hero, headings, and primary CTAs where the reference uses interchangeable marketing copy, **without** changing layout grids, spacing, or **motion numbers** from extracted specs. **Icon shapes** and **animations** (`@keyframes`, transitions, staggers, scroll triggers) remain **parity goals** sourced from extraction — swapping narrative photos does **not** relax them. **Brand identity** (below) must be **original** for anything you ship as the user’s product — never pass off the reference company’s trademarks or distinctive marks.
@@ -20,6 +20,22 @@ Before reconnaissance, write or update:
20
20
  - `docs/research/LAUNCHFRAME.md` — URLs and SaaS idea
21
21
  - **`docs/research/LAUNCHFRAME_SUBAGENTS.md`** — **before Phase 6**, ensure this runbook holds all four verifier prompts (**copy-ready**). When the bundled template differs from the latest SKILL rubrics (after skill edits), re-sync Section **Phase 6** rubrics **into this file**. Subagents receive prompts **only** from here.
22
22
 
23
+ ### Step 0a — Automated page inspection dump (mandatory)
24
+
25
+ Right after Step 0 files are written, **from the repository root**, run the bundled **Playwright** capture **once per parsed reference URL** (before Phase 1 Chrome MCP). This produces **`ai-page-bundle.txt`** (one plain-text file: full post-JS HTML + all captured CSS), plus `document.html`, network `*.css` bodies, `inline-styles.json`, and `motion-summary.json` — attach **`ai-page-bundle.txt`** to the agent when a single pasteable artifact is enough; the frozen bundle complements live `getComputedStyle` / WAAPI work (**it does not replace** Chrome MCP for numeric motion and interaction sweeps).
26
+
27
+ 1. **One-time per machine:** `npx playwright install chromium`
28
+ 2. **Per URL** — use the URL’s hostname for the folder (example hostname `www.example.com`):
29
+
30
+ ```bash
31
+ npm run inspect:page -- "https://www.example.com/" --scroll-full --wait-until networkidle --timeout 120000 --out-parent "docs/research/www.example.com/page-inspection"
32
+ ```
33
+
34
+ That creates `docs/research/<hostname>/page-inspection/<hostname>-<iso-stamp>/` with all artifacts. Omit `--out-parent` to use the default `docs/research/page-captures/<host>-<stamp>/`.
35
+ 3. Append an **`Automated captures`** subsection to `docs/research/LAUNCHFRAME.md` listing every URL and its output directory path. Use those files in Phase 1 when structuring specs (DOM outline, stylesheet text, `@keyframes` from `motion-summary.json`) while still measuring behavior in the live tab.
36
+
37
+ If the dump fails (missing browsers, navigation timeout, TLS, bot wall), increase `--timeout`, retry with `domcontentloaded` only when necessary, or document the failure in `LAUNCHFRAME.md` and unblock before treating Phase 1 as complete.
38
+
23
39
  ## SaaS copy overlay (Phase 4 assembly and final polish)
24
40
 
25
41
  After structure and styles match the reference, apply the **SaaS idea** to hero, headings, and primary CTAs where the reference uses interchangeable marketing copy, **without** changing layout grids, spacing, or **motion numbers** from extracted specs. **Icon shapes** and **animations** (`@keyframes`, transitions, staggers, scroll triggers) remain **parity goals** sourced from extraction — swapping narrative photos does **not** relax them. **Brand identity** (below) must be **original** for anything you ship as the user’s product — never pass off the reference company’s trademarks or distinctive marks.
package/AGENTS.md CHANGED
@@ -7,7 +7,7 @@ This version has breaking changes — APIs, conventions, and file structure may
7
7
  # Website Reverse-Engineer Template
8
8
 
9
9
  ## What This Is
10
- A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — use **`/launchframe <url> "saas idea"`** for the full pixel-perfect clone plus SaaS landing copy (`src/lib/launchframe-config.ts`, `launchframe.context.json`, `docs/research/LAUNCHFRAME.md`). For a **new empty folder** only, **`npx launchframe@latest`** unpacks this template; then run **`/launchframe`** in that project with your URL and pitch.
10
+ A reusable template for reverse-engineering any website into a clean, modern Next.js codebase using AI coding agents. The Next.js + shadcn/ui + Tailwind v4 base is pre-scaffolded — use **`/launchframe <url> "saas idea"`** for the full pixel-perfect clone plus SaaS landing copy (`src/lib/launchframe-config.ts`, `launchframe.context.json`, `docs/research/LAUNCHFRAME.md`). The agent executing **`/launchframe`** must follow **Step 0a** in that command: run **`npm run inspect:page`** once per reference URL (Playwright: `document.html`, network CSS, `motion-summary.json`) before Phase 1. For a **new empty folder** only, **`npx launchframe@latest`** unpacks this template; then run **`/launchframe`** in that project with your URL and pitch.
11
11
 
12
12
  ## Tech Stack
13
13
  - **Framework:** Next.js 16 (App Router, React 19, TypeScript strict)
@@ -0,0 +1,16 @@
1
+ LaunchFrame page inspection capture
2
+ ====================================
3
+ Source: https://example.com/
4
+
5
+ Files:
6
+ document.html — Full <html> outerHTML after JS (attach this for an agent)
7
+ body-outer.html — <body> outerHTML only (smaller)
8
+ inline-styles.json — All inline <style> tag contents
9
+ motion-summary.json— @keyframes + animation/transition-related lines
10
+ capture-meta.json — Viewport, stylesheet URLs, <script> inventory
11
+ *.css — Stylesheets observed on the network (unless --no-css-files)
12
+
13
+ Notes:
14
+ • Some sites lazy-load CSS; use --scroll-full to force more requests.
15
+ • Cross-origin styles you cannot access via JS are still captured here if the browser downloaded them.
16
+ • Motion inside bundled JS (not CSS) is not fully extracted—check script src in capture-meta.json.
@@ -0,0 +1,2 @@
1
+ <body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://iana.org/domains/example">Learn more</a></p></div>
2
+ </body>
@@ -0,0 +1,19 @@
1
+ {
2
+ "sourceUrl": "https://example.com/",
3
+ "generatedAt": "2026-05-15T21:24:44.058Z",
4
+ "viewport": {
5
+ "width": 1440,
6
+ "height": 900
7
+ },
8
+ "waitUntil": "domcontentloaded",
9
+ "options": {
10
+ "scrollFull": false,
11
+ "wroteCssFiles": true
12
+ },
13
+ "outputs": {
14
+ "documentHtmlBytes": 513,
15
+ "bodyOuterHtmlBytes": 220,
16
+ "networkStylesheets": []
17
+ },
18
+ "scripts": []
19
+ }
@@ -0,0 +1,2 @@
1
+ <html lang="en"><head><title>Example Domain</title><meta name="viewport" content="width=device-width, initial-scale=1"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style></head><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://iana.org/domains/example">Learn more</a></p></div>
2
+ </body></html>
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "index": 0,
4
+ "media": "",
5
+ "text": "body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}"
6
+ }
7
+ ]
@@ -0,0 +1,18 @@
1
+ {
2
+ "sourceUrl": "https://example.com/",
3
+ "generatedAt": "2026-05-15T21:24:44.057Z",
4
+ "viewport": {
5
+ "width": 1440,
6
+ "height": 900
7
+ },
8
+ "counts": {
9
+ "keyframeRules": 0,
10
+ "motionRelatedLines": 0,
11
+ "inlineStyleTags": 1,
12
+ "networkStylesheets": 0,
13
+ "scriptElements": 0
14
+ },
15
+ "keyframes": [],
16
+ "motionLinesSample": [],
17
+ "motionLinesTotal": 0
18
+ }
@@ -0,0 +1,17 @@
1
+ LaunchFrame page inspection capture
2
+ ====================================
3
+ Source: https://example.com/
4
+
5
+ Files:
6
+ ai-page-bundle.txt — **ALL-IN-ONE for LLMs:** HTML + inline/network CSS as plain text
7
+ document.html — Full <html> outerHTML after JS (same HTML as Part 1 of bundle)
8
+ body-outer.html — <body> outerHTML only (smaller)
9
+ inline-styles.json — All inline <style> tag contents
10
+ motion-summary.json— @keyframes + animation/transition-related lines
11
+ capture-meta.json — Viewport, stylesheet URLs, <script> inventory
12
+ *.css — Stylesheets observed on the network (unless --no-css-files)
13
+
14
+ Notes:
15
+ • Some sites lazy-load CSS; use --scroll-full to force more requests.
16
+ • Cross-origin styles you cannot access via JS are still captured here if the browser downloaded them.
17
+ • Motion inside bundled JS (not CSS) is not fully extracted—check script src in capture-meta.json.
@@ -0,0 +1,29 @@
1
+
2
+ ================================================================================
3
+ LAUNCHFRAME AI PAGE BUNDLE
4
+ ================================================================================
5
+
6
+ Source URL: https://example.com/
7
+ Generated: 2026-05-15T21:49:16.186Z
8
+ Viewport: 1440x900
9
+ Wait until: domcontentloaded
10
+
11
+ Single plain-text file: POST-JS HTML plus all captured CSS (inline + network).
12
+ Use document.html / *.css separately if you hit tool context limits.
13
+
14
+ ================================================================================
15
+ PART 1 — HTML (document.documentElement.outerHTML)
16
+ ================================================================================
17
+
18
+ <html lang="en"><head><title>Example Domain</title><meta name="viewport" content="width=device-width, initial-scale=1"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style></head><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://iana.org/domains/example">Learn more</a></p></div>
19
+ </body></html>
20
+ ================================================================================
21
+ PART 2 — CSS (inline <style> tags, then network stylesheets)
22
+ ================================================================================
23
+
24
+ /* inline style #0 media=all */
25
+ body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}
26
+ ================================================================================
27
+ END OF BUNDLE
28
+ ================================================================================
29
+
@@ -0,0 +1,2 @@
1
+ <body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://iana.org/domains/example">Learn more</a></p></div>
2
+ </body>
@@ -0,0 +1,21 @@
1
+ {
2
+ "sourceUrl": "https://example.com/",
3
+ "generatedAt": "2026-05-15T21:49:16.188Z",
4
+ "viewport": {
5
+ "width": 1440,
6
+ "height": 900
7
+ },
8
+ "waitUntil": "domcontentloaded",
9
+ "options": {
10
+ "scrollFull": false,
11
+ "wroteCssFiles": true,
12
+ "wroteAiBundle": true
13
+ },
14
+ "outputs": {
15
+ "documentHtmlBytes": 513,
16
+ "bodyOuterHtmlBytes": 220,
17
+ "aiPageBundleBytes": 1769,
18
+ "networkStylesheets": []
19
+ },
20
+ "scripts": []
21
+ }
@@ -0,0 +1,2 @@
1
+ <html lang="en"><head><title>Example Domain</title><meta name="viewport" content="width=device-width, initial-scale=1"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style></head><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://iana.org/domains/example">Learn more</a></p></div>
2
+ </body></html>
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "index": 0,
4
+ "media": "",
5
+ "text": "body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}"
6
+ }
7
+ ]
@@ -0,0 +1,18 @@
1
+ {
2
+ "sourceUrl": "https://example.com/",
3
+ "generatedAt": "2026-05-15T21:49:16.187Z",
4
+ "viewport": {
5
+ "width": 1440,
6
+ "height": 900
7
+ },
8
+ "counts": {
9
+ "keyframeRules": 0,
10
+ "motionRelatedLines": 0,
11
+ "inlineStyleTags": 1,
12
+ "networkStylesheets": 0,
13
+ "scriptElements": 0
14
+ },
15
+ "keyframes": [],
16
+ "motionLinesSample": [],
17
+ "motionLinesTotal": 0
18
+ }
@@ -0,0 +1,16 @@
1
+ LaunchFrame page inspection capture
2
+ ====================================
3
+ Source: https://example.com/
4
+
5
+ Files:
6
+ document.html — Full <html> outerHTML after JS (attach this for an agent)
7
+ body-outer.html — <body> outerHTML only (smaller)
8
+ inline-styles.json — All inline <style> tag contents
9
+ motion-summary.json— @keyframes + animation/transition-related lines
10
+ capture-meta.json — Viewport, stylesheet URLs, <script> inventory
11
+ *.css — Stylesheets observed on the network (unless --no-css-files)
12
+
13
+ Notes:
14
+ • Some sites lazy-load CSS; use --scroll-full to force more requests.
15
+ • Cross-origin styles you cannot access via JS are still captured here if the browser downloaded them.
16
+ • Motion inside bundled JS (not CSS) is not fully extracted—check script src in capture-meta.json.
@@ -0,0 +1,2 @@
1
+ <body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://iana.org/domains/example">Learn more</a></p></div>
2
+ </body>
@@ -0,0 +1,19 @@
1
+ {
2
+ "sourceUrl": "https://example.com/",
3
+ "generatedAt": "2026-05-15T21:21:39.771Z",
4
+ "viewport": {
5
+ "width": 1440,
6
+ "height": 900
7
+ },
8
+ "waitUntil": "domcontentloaded",
9
+ "options": {
10
+ "scrollFull": false,
11
+ "wroteCssFiles": true
12
+ },
13
+ "outputs": {
14
+ "documentHtmlBytes": 513,
15
+ "bodyOuterHtmlBytes": 220,
16
+ "networkStylesheets": []
17
+ },
18
+ "scripts": []
19
+ }
@@ -0,0 +1,2 @@
1
+ <html lang="en"><head><title>Example Domain</title><meta name="viewport" content="width=device-width, initial-scale=1"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style></head><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://iana.org/domains/example">Learn more</a></p></div>
2
+ </body></html>
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "index": 0,
4
+ "media": "",
5
+ "text": "body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}"
6
+ }
7
+ ]
@@ -0,0 +1,18 @@
1
+ {
2
+ "sourceUrl": "https://example.com/",
3
+ "generatedAt": "2026-05-15T21:21:39.770Z",
4
+ "viewport": {
5
+ "width": 1440,
6
+ "height": 900
7
+ },
8
+ "counts": {
9
+ "keyframeRules": 0,
10
+ "motionRelatedLines": 0,
11
+ "inlineStyleTags": 1,
12
+ "networkStylesheets": 0,
13
+ "scriptElements": 0
14
+ },
15
+ "keyframes": [],
16
+ "motionLinesSample": [],
17
+ "motionLinesTotal": 0
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launchframe",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "private": false,
5
5
  "description": "Scaffold a Next.js app from a reference URL plus your SaaS idea — AI-ready website cloning",
6
6
  "author": "JCodesMore",
@@ -72,7 +72,8 @@
72
72
  "start": "next start",
73
73
  "lint": "eslint",
74
74
  "typecheck": "tsc --noEmit",
75
- "check": "npm run lint && npm run typecheck && npm run build"
75
+ "check": "npm run lint && npm run typecheck && npm run build",
76
+ "inspect:page": "node scripts/page-inspection-dump.mjs"
76
77
  },
77
78
  "dependencies": {
78
79
  "@base-ui/react": "^1.3.0",
@@ -94,6 +95,7 @@
94
95
  "eslint": "^9",
95
96
  "eslint-config-next": "16.2.1",
96
97
  "tailwindcss": "^4",
97
- "typescript": "^5"
98
+ "typescript": "^5",
99
+ "playwright": "^1.57.0"
98
100
  }
99
101
  }