Skip to content

feat: retrieve public assets and export complete template projects - #21

Merged
AnxForever merged 3 commits into
mainfrom
release/public-assets-20261002
Oct 2, 2026
Merged

AnxForever merged 3 commits into
mainfrom
release/public-assets-20261002

Conversation

@AnxForever

@AnxForever AnxForever commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

The skill could only retrieve style briefs, leaving the site's animation, background, typography and template assets outside its workflow. It now searches the public asset catalog, retrieves complete asset records through HTTP or saved MCP responses, and materializes template projects with their source files, dependencies and license notices.

Saved style briefs are also validated consistently across fetch, lint, spec verification and benchmark commands. Unavailable sources remain explicit; external references and restricted packs are not treated as downloadable source.

Validation:

  • 35 Python tests, compileall and the Skill validator passed.
  • Live local API search/get passed for all 18 asset kinds.
  • A complete Brutal Landing template was materialized from the live API.
  • Template paths, binary encodings, ZIP integrity and refusal to overwrite existing directories are covered.

The matching website and npm release provides the new /api/assets endpoints. Browser/build acceptance is tracked with that release; these script checks do not by themselves prove generated UI quality.

Summary by CodeRabbit

  • New Features

    • Search the StyleKit asset catalogue and retrieve available assets, including supported template downloads.
    • Use style specifications from the API, a local file, or MCP results, and configure the API address for supported tools.
    • Check specification sources and run implementation evaluations using a saved specification.
  • Documentation

    • Updated setup and workflow guidance, with new instructions for finding and using assets, handling specification inputs, and manually reviewing responsive layouts, interactions, and accessibility.

Preserve implementation inputs, distinguish inconclusive checks, and add
deterministic script tests with shared Core lint fixtures.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b1c5fb3e-6189-4dcc-be3f-3446cc9ee6bd

📥 Commits

Reviewing files that changed from the base of the PR and between 422afca and 845716f.

📒 Files selected for processing (13)
  • README.en.md
  • README.md
  • SKILL.md
  • references/assets.md
  • references/forward-test.md
  • scripts/benchmark.py
  • scripts/eval-check.py
  • scripts/fetch-asset.py
  • scripts/fetch-style.py
  • scripts/spec_input.py
  • scripts/verify-spec.py
  • tests/test_assets.py
  • tests/test_scripts.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes add specification input and validation workflows, update evaluation and benchmark tools, and introduce a CLI for searching and retrieving public assets. The Skill documentation describes these workflows and adds guidance for manual forward testing.

Changes

Specification and evaluation workflow

Layer / File(s) Summary
Specification contracts and input handling
scripts/spec_input.py, scripts/fetch-style.py, tests/test_scripts.py
Shared helpers validate and normalize brief and legacy specifications, load files or MCP results, and record source metadata. Style fetching and searching accept configurable API bases.
Evaluation, verification, and benchmark inputs
scripts/eval-check.py, scripts/verify-spec.py, scripts/benchmark.py, tests/test_scripts.py
Evaluation and verification accept saved or MCP specifications and report source metadata. The benchmark passes its configured API base to style fetching.
Skill workflow and usage guidance
SKILL.md, README.md, README.en.md, references/forward-test.md
The documentation covers project detection, style selection, specification reuse, implementation, evaluation, optional MCP setup, and manual forward testing.

Public asset search and retrieval

Layer / File(s) Summary
Catalogue search and asset data handling
scripts/fetch-asset.py, tests/test_assets.py, references/assets.md, README.md, README.en.md
The CLI validates catalogue and asset details, processes saved API or MCP responses, and supports search and exact-asset retrieval. Documentation describes asset availability, rights signals, and supported inputs.
Template download and materialization
scripts/fetch-asset.py, tests/test_assets.py
The CLI validates template download routes and source files, then downloads ZIPs or writes files to a new directory. Tests cover download, path, decoding, and output constraints.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant FetchAssetCLI
  participant StyleKitAPI
  participant LocalFilesystem
  User->>FetchAssetCLI: Search or request an asset
  FetchAssetCLI->>StyleKitAPI: Search catalogue or fetch asset
  StyleKitAPI-->>FetchAssetCLI: Return catalogue or asset data
  FetchAssetCLI->>LocalFilesystem: Write ZIP or validated template files
  LocalFilesystem-->>FetchAssetCLI: Return output path and file details
Loading

Merge Risk: ⚪ Minimal · up to 84571

The change adds saved and MCP spec inputs and guarded public asset retrieval. No concrete merge-blocking issue was found in the supplied evidence. Live API behavior and browser or build acceptance are tracked separately by the author.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 84571

The new workflow writes externally supplied project files, but requires explicit destinations, validates paths and sizes, restricts ZIP downloads, and prohibits automatic dependency installation. Export publication has limited interruption and concurrency gaps. The corresponding production API and downstream execution behavior remain outside the verified scope.

Retained concerns

  • Low · reliability · inferred: The new export lifecycle has incomplete publication and recovery guarantees. ZIP downloads write directly to the final filename, so an interrupted or failed write can leave a partial file that subsequent retries refuse. Directory materialization checks destination existence before staging and later uses rename; on platforms allowing replacement of an existing empty directory, a concurrent creator can lose destination ownership. Ordinary staging failures are cleaned up, and this does not establish overwrite of an existing nonempty project or privilege escalation.
Security review details

Security Blast Radius

  • inferred — The demonstrated persistent-write authority is the invoking user's filesystem authority at explicitly chosen export destinations. Template paths are constrained beneath staging. The inspected flow does not establish tenant-wide, authenticated-kit, service-administration, or credential authority.

Security Findings and Attack Paths

  • inferred — An attacker controlling a selected API response or saved MCP input could supply template source and dependency declarations within the validated file contract. Turning that source into executed code requires later integration or execution beyond the inspected export CLI. Guidance explicitly requires review and prohibits automatic dependency installation, so an automatic code-execution finding is not established.

Trust Boundaries and Controls

  • observed — Directory export rejects unsafe paths, malformed binary content, existing or symlink destinations, and projects exceeding 500 files or 100 MiB decoded size. ZIP export requires the exact template route on an official HTTPS host or the configured loopback origin, rejects redirects, caps the response at 50 MiB, and checks content type and ZIP format before writing.

Resilience and Maintainability Implications

  • inferred — The export controls contain ordinary failures, but incomplete ZIP files can block retries and abrupt termination can leave staging directories. Concurrent directory publication does not provide an atomic no-replace guarantee. These are bounded output-lifecycle issues rather than demonstrated access-control bypasses.

Hardening Proposals

  • proposed — Use completed temporary-file publication with exclusive destination ownership for ZIPs, an atomic no-replace strategy for directories, and an explicit recovery policy for interrupted exports and orphan staging directories.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 90 functions across 8 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary changes: public asset retrieval and complete template project export.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 7.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 90 functions across 8 files. (5 skipped: 5 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AnxForever
AnxForever merged commit a5e42c8 into main Oct 2, 2026
3 checks passed
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.

1 participant