Implementation:AIScientists Dev WorldSeed render review
| Knowledge Sources | |
|---|---|
| Domains | Asset_Sourcing, CLI |
| Last Updated | 2026-10-26 18:00 GMT |
Overview
Concrete CLI script that renders a compact, selectable HTML review page from an asset-sourcing manifest, provided by the WorldSeed library.
Description
The render_review script reads an asset-sourcing manifest JSON (containing entities and candidates), groups candidates by entity, sorts them by recommended rank (when trusted), local image availability, and fit label, then renders a self-contained HTML page with CSS styling and a JavaScript selection bar. The page shows image cards per entity, a collapsible "more options" section, and a fixed bottom bar for copying/downloading picks as JSON. Fit labels (exact/adjacent/vibe/miss) drive sorting priority. The `TRUSTED_RECOMMENDATION_MODES` set controls whether rank badges and top-pick highlighting are shown.
Usage
Run this script from the command line after a visual review pass has populated the manifest with `recommended_rank` fields. It produces a standalone HTML file that can be opened in a browser for human selection of final assets.
Code Reference
Source Location
- Repository: WorldSeed
- File: skills/asset-sourcing/scripts/render_review.py
Signature
def render(manifest: dict[str, Any], manifest_path: Path) -> str:
"""Render a complete HTML review page from a manifest dict."""
def main() -> int:
"""CLI entry: render_review.py <manifest.json> <output.html>"""
Import
from skills.asset_sourcing.scripts.render_review import render
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| manifest | dict[str, Any] | Yes | Manifest with `entities` and `candidates` arrays |
| manifest_path | Path | Yes | Path to manifest (for relative image resolution) |
Outputs
| Name | Type | Description |
|---|---|---|
| render returns | str | Complete HTML page string |
| main returns | int | Exit code (0 success, 2 usage error) |
Usage Examples
# CLI usage
python skills/asset-sourcing/scripts/render_review.py manifest.json review.html
# → writes review.html
# Programmatic usage
from pathlib import Path
from skills.asset_sourcing.scripts.render_review import render
manifest = json.loads(Path("manifest.json").read_text())
html = render(manifest, Path("manifest.json"))
Path("review.html").write_text(html)