feat(snowflake): mechanical asset normalization for Claude Design pages#195
Open
catalan-adobe wants to merge 7 commits into
Open
feat(snowflake): mechanical asset normalization for Claude Design pages#195catalan-adobe wants to merge 7 commits into
catalan-adobe wants to merge 7 commits into
Conversation
…can/classify/download patterns
… via asset-collect.mjs - Phase 1: replace grep-based discovery with asset-collect.mjs call - Phase 2: read asset-manifest.json instead of manual classification; update decisions.json shape (assetManifest replaces assetStrategy/assetBase/vendorAssetsTo) - Phase 3: simplify 3.7 (paths pre-normalized); update B.3 deploy commands - methodology.md: rewrite asset strategy from per-run to per-asset model
Tessl Skill Lint
|
data:image/...;base64,... refs are the primary source of DA document bloat on Claude Design pages. Each unique data URI is decoded, written to images/<sha256-12>.ext, and rewritten out of index.html. Duplicates hash to the same filename — one file, all refs updated. 18 tests pass.
…eployment Bug 1: Page-level path had no explicit step to deploy images/fonts/videos from input/ to the repo root. Added Wire step 1b with cp commands and a verification check. Bug 2: DA doc cells used absolute branch URLs for images, which broke the pipeline's rewriteImageRefs pattern matching. Changed to bare relative paths (images/filename.jpg) across all phases and knowledge docs. Also unified on images/ (not assets/images/) for both page-level and block-level paths, matching what asset-collect.mjs already outputs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
asset-collect.mjs now downloads assets from known-ephemeral hosts (e.g. claudeusercontent.com) regardless of reachability. When the base URL is localhost (snapshot mode), all non-stable-CDN external assets are also downloaded — prevents stale URLs from short-lived Claude Design sessions from leaking into the EDS output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 3 could silently skip DA doc generation (output/da/<slug>.html) under context pressure, with no self-check catching it. Phase 4 Wire then had no input for the drafts transform, resulting in empty DA uploads. Added hard-fail existence checks in three places: - Phase 3 page-level self-check 0: all 5 required artifacts - Phase 3 block-level self-check 0: DA doc - Phase 4 Wire step 2: DA doc before transform Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
asset-collect.mjs— a zero-dependency Node script that runs in Phase 1 for every source page, regardless of origin. It scansindex.htmlfor in-scope asset references (raster images, videos, fonts), classifies each by reachability and type, downloads local/unreachable ones into normalized subdirectories, renames hash-named font blobs using@font-facecontext, rewrites refs inindex.htmlin-place, and emitsasset-manifest.json.methodology.mdto reflect the per-asset strategy model (replaces the old per-runabsolute/vendor/da-mediachoice).Asset strategy (per-asset, not per-run)
absolute— leave as-isvendor→/fonts/(Code Bus)da-media→ DA Media Bus uploadNever vendor images/videos into the git repo.
Test plan
node --test plugins/aem/edge-delivery-services/skills/snowflake/scripts/asset-collect.test.mjs— 16/16 passnode asset-collect.mjs --input <dir> --base-url http://localhost:8080/ --dry-run— discovers both OTF fonts, assignsvendorstrategy, derives semantic names from@font-facecontexthttp://127.0.0.1:8080/) insnowflake-demos— overlay applied, 0 console errors, fonts loaded at/fonts/adobe-clean-spectrum-vf.otf🤖 Generated with Claude Code