Skip to content

Route studio create --from URLs through Data Liberation - #3952

Draft
chubes4 wants to merge 4 commits into
trunkfrom
feat/site-artifact-import-cli
Draft

Route studio create --from URLs through Data Liberation#3952
chubes4 wants to merge 4 commits into
trunkfrom
feat/site-artifact-import-cli

Conversation

@chubes4

@chubes4 chubes4 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Flow

  1. Studio invokes the bundled Data Liberation CLI with the source URL, a deterministic output base, and --resume.
  2. Data Liberation captures the site and reports its portable website directory through the CLI's Site: output contract.
  3. Studio validates that path is a directory inside the requested output base.
  4. Studio stages the portable site through Static Site Importer, which owns WordPress materialization.
  5. The capture is retained after failure for resume and removed after a successful import.
studio create \
  --path ./imported-site \
  --name "Imported Site" \
  --from https://example.com \
  --skip-browser

Completion Gate

This PR and Automattic/data-liberation-agent#119 remain draft while Static Site Importer and Blocks Engine mature. The portable-HTML handoff is integrated here for proving and iteration; it is not ready to replace the existing Data Liberation path until representative external sites can be imported mostly reliably as static, editable WordPress sites through this canonical flow.

Data Liberation owns complete portable HTML capture, Static Site Importer owns deterministic WordPress materialization, and Blocks Engine owns HTML-to-block conversion. Remaining failures should be fixed in those owning layers using generic primitives. Individual generated sites still require exact frontend parity, usable block-editor output, and zero fallback blocks before acceptance.

Validation

  • Focused Studio URL and SSI tests: 81 passed.
  • Data Liberation suite: 856 passed.
  • Data Liberation liberation/path contract tests: 11 passed.
  • Studio CLI TypeScript check passed.
  • Focused Studio CLI ESLint passed.
  • Studio CLI development build passed.
  • The built Studio distribution contains and executes the bundled Data Liberation CLI (0.1.0).
  • git diff --check passed with generated bundles marked as deterministic binary artifacts.

Dependency State

Automattic/data-liberation-agent#119 remains open, draft, and unmerged at 6a81d1a3, based directly on Data Liberation main at 505a04c1. This PR vendors that exact reviewed snapshot.

AI Assistance

OpenAI GPT-5.6 Sol via OpenCode was used to inspect the existing branches, reconstruct this PR on current trunk, wire and test the Data Liberation CLI handoff, rebase and audit the vendored #119 snapshot, and run verification. Chris Huber remains responsible for the submitted changes.

@chubes4

chubes4 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

CI follow-up pushed in 7d7f45d8c:

  • Unit lane now runs npm run test -- --tagsFilter='!e2e', keeping tagged CLI integration suites in the dedicated serialized CLI E2E lane.
  • Filtered Unit verification passed: 211 files, 2747 passed, 60 skipped.
  • Focused start-stop.e2e.test.ts passed: 2/2.
  • The full local CLI E2E lane remains machine-sensitive under concurrent Playground/PHP load; isolated lifecycle coverage passes and the existing dedicated lane remains serialized.

AI assistance: openai/gpt-5.6-sol via OpenCode diagnosed the CI lane overlap, drafted the one-line test-selection change, and ran verification. Chris Huber remains responsible for the change.

@chubes4

chubes4 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

1,145-route scale validation

The latest branch head (ca6191a59) is pushed and the end-to-end Richlynn run completed successfully through this Studio CLI path.

  • Source: https://www.richlynngroup.com/
  • Routes: 1,145/1,145 completed
  • Batches: 124/124 completed
  • Final state: zero failed or pending batches
  • WordPress routes: 1,148 unique page URIs, no duplicate paths
  • Cache: 5,364 network requests avoided
  • Recovery: resumed across compiler interruption, encoded Unicode paths, transient HTML classification, and canonical route collisions

This proves the Studio orchestration and dependent SSI batching path can handle the target scale. It does not mark the generated site as fidelity-complete: Richlynn still has 13,055 core/html blocks, 1,235 reported fallbacks, 396 retained external assets, and no exact visual/editor parity proof. The generated site remains evidence under the zero-fallback gate.

Dependency PRs:

Validation on the pushed Studio head: npx vitest run apps/cli/commands/site/tests/create.test.ts apps/cli/lib/tests/run-wp-cli-command.test.ts (66/66 passed).

AI assistance: openai/gpt-5.6-sol via OpenCode was used for scale-run diagnosis, implementation support, verification, and drafting this evidence update. Chris Huber remains responsible for the submitted changes.

@chubes4 chubes4 changed the title Experiment: create Studio sites from static artifacts Add studio create --from static source imports Aug 3, 2026
@borkweb

borkweb commented Aug 3, 2026

Copy link
Copy Markdown
Member

The /liberate command already imports static sites into Studio via the blocks-engine 🕺

You can do so via: /liberate ~/path/to/static/site

That being said, switching out liberate's tooling to a different set of direct calls would make sense if the php-transformer has caught up to the JS approach! I also like the direct CLI command that you have for it.

@chubes4

chubes4 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@borkweb I have not compared the outputs side by side, but I was hoping the approaches could coexist initially. This PR intentionally avoids disrupting existing behavior.

Longer term, I think Data Liberation could own the browser-dependent stages: client-side rendering, runtime behavior, and the visual feedback loop, and use the Studio CLI to materialize the site.

The shared contract would be a clean HTML-based website artifact, regardless of the original source.

I think that refactoring can be explored separately from this PR. Redirecting /liberate is not necessary for this primitive to exist.

Comment thread packages/data-liberation-agent/src/lib/screenshot/screenshotter.ts Fixed
Comment thread packages/data-liberation-agent/src/lib/screenshot/screenshotter.ts Fixed
Comment thread packages/data-liberation-agent/src/lib/screenshot/screenshotter.ts Fixed
@chubes4 chubes4 changed the title Add studio site create --from static source imports Add static source imports to studio create Aug 24, 2026
@chubes4 chubes4 changed the title Add static source imports to studio create Add studio capture and studio create --from workflows Aug 24, 2026
@chubes4 chubes4 changed the title Add studio capture and studio create --from workflows Add studio create --from workflows Aug 25, 2026
@chubes4
chubes4 force-pushed the feat/site-artifact-import-cli branch from 43bc3f9 to b7abf7d Compare August 30, 2026 05:03
@chubes4 chubes4 changed the title Add studio create --from workflows Route studio create --from URLs through Data Liberation Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants