initial specs webbuilder #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Specification — Hero App for Slide & Website Generation
1. Purpose
This application is a Rust-first automation workspace for creating:
The system follows internal Hero best practices and integrates with (as skills):
/hero_proc_logfor structured logging/hero_proc_sdkfor remote job execution and TTY-backed process control/hero_crates_best_practices_checkfor repository structure and crate organizationThe app provides a UI for authoring, previewing, generating, monitoring, and re-running automated content creation workflows.
there are 2 components for UI
2. Goals
Primary goals
Non-goals
3. System overview
The app has two main domains:
A. Slides domain
A slide deck is stored as a folder with:
style.mdThe user edits slide source files in the UI using an editor with preview. The system hashes slide content and triggers automatic image regeneration when slide files change.
Image generation uses:
OpenRouterstyle.mdB. Websites domain
A website project starts from a standard internal template from Forge. Website generation is done through Cloud automation using a Cloud agent and multiple quality levels.
Generation runs as managed jobs through Hero process infrastructure, with PTY/TTY support for interactive or streamable execution, status inspection, restart, and logging.
4. Core principles
5. Functional specification
5.1 Main application structure
The application shall provide at least these main tabs:
Optional later tabs:
5.2 Slides tab
5.2.1 Purpose
The Slides tab allows users to create and manage slide decks as folders containing one file per slide.
5.2.2 Folder-based deck model
Each deck is represented by a folder.
Recommended structure:
Requirements
deck.jsonor equivalent.5.2.3 Slide source format
Each slide file shall be human-editable and version-control friendly.
Preferred options:
Minimum requirement:
5.2.4 style.md
style.mdis a required deck-level file.Purpose:
Requirements
style.mdshall always be included when generating slide images.style.mdchanges, all slide generation hashes depending on it become invalid.style.mdas a first-class editable file.5.2.5 Editor + preview
The Slides tab shall include:
Requirements
5.2.6 Hash-based regeneration
The system shall compute a content hash per slide generation input.
Hash input should include:
style.mdcontentRequirements
Recommended sidecar:
Containing:
5.2.7 Slide image generation
Generation for slides is direct and does not require Cloud agent execution.
Generation path
style.md+ optional deck metadata.Requirements
5.2.8 Automatic regeneration via jobs
Although actual slide generation is direct, detection and orchestration may still use Hero jobs.
Requirements
5.2.9 Slide ordering
Requirements
5.2.10 Deck-level actions
The UI shall support:
5.3 Websites tab
5.3.1 Purpose
The Websites tab allows users to generate websites from a standard Forge template using Cloud automation and quality-controlled job execution.
5.3.2 Template-based initialization
Each website starts from a standard internal template.
Requirements
Recommended structure:
5.3.3 Website generation inputs
Website generation should combine:
5.3.5 Cloud agent execution
Website generation shall run through Cloud agent automation.
Requirements
5.3.6 Generated output handling
Requirements
5.3.7 Website lifecycle actions
The UI shall support:
5.4 Jobs tab
5.4.1 Purpose
The Jobs tab provides visibility and control over automation tasks.
Job types
5.4.2 Requirements
For each job, show:
Supported states:
5.4.3 Actions
The UI shall support:
5.5 Logs tab
5.5.1 Purpose
The Logs tab exposes structured logs from the application and jobs.
Logging requirements
Logging shall follow
hero_proc_logconventions.Each log event should support structured fields such as:
Requirements
5.6 Settings tab
The Settings tab shall configure:
6. Architecture specification
6.1 High-level components
Recommended components:
6.2 Rust crate organization
Must align with
hero_crates_best_practices_check.Suggested crate split:
hero_studio_web— top-level app runtime for the website for endusershero_studio_ui— UI layer = admin pannelshero_studio_sdk— SDK using openrpchero_studio_core— domain models and shared logichero_studio_slides— slide domain logichero_studio_websites— website domain logichero_studio_jobs— job abstraction and orchestrationhero_studio_openrouter— use skill /herolib_ai is just a wrapper to a libRepo requirements
6.3 Process/job integration
The app shall use
hero_proc_sdkto execute and control remote jobs.Requirements
Job abstraction
Each job should define:
6.5 Metadata persistence
The system needs lightweight state persistence.
Possible storage:
Recommended split:
Persist at least:
7. Data model
7.1 Slide deck
7.2 Slide
7.3 Website project
7.4 Job
8. UX requirements
8.1 General UX
8.2 Slides UX
8.3 Websites UX
8.4 Jobs UX
9. Error handling requirements
The system shall provide explicit error categories:
Requirements
10. Security and operational requirements
11. Observability requirements
The system shall make it easy to answer:
12. MVP scope
MVP Slides
style.mdMVP Websites
MVP Platform
13. Future scope
14. Open implementation questions
/output?15. Recommended implementation order
Phase 1
Phase 2
style.mdintegrationPhase 3
Phase 4
16. Acceptance criteria
The system is acceptable when:
style.mdand slide files with live preview.17. Short design summary
This app is a file-first Rust automation studio with two production tracks:
It should feel like a practical internal production tool: easy to edit, easy to observe, easy to rerun, and aligned with Hero process, logging, and crate standards.
IMPORTANT CHANGES TO ABOVE
Implementation Spec for Issue #1 -- Hero Studio Initial Scaffold
Objective
Set up the complete Cargo workspace scaffold for Hero Studio (
hero_webbuilder), a Rust-first automation workspace for creating slides and websites. This creates all crate skeletons, core data models, an initial OpenRPC spec, server/SDK/UI/web binaries, and build infrastructure — following the established hero ecosystem patterns demonstrated byhero_whiteboard.Requirements
hero_studio_core,hero_studio_server,hero_studio_sdk,hero_studio_ui,hero_studio_web,hero_studio_slides,hero_studio_websites,hero_studio_jobscrates/~/hero/var/data/hero_studio/studio.db~/hero/var/sockets/hero_studio_*.sockCrate Responsibilities
hero_studio_corehero_studio_serverhero_studio_sdkhero_studio_uihero_studio_webhero_studio_slideshero_studio_websiteshero_studio_jobsImplementation Plan (9 Steps)
Step 1: Root workspace and build infrastructure
Cargo.toml,Makefile,buildenv.sh,CLAUDE.md, scriptsStep 2: hero_studio_core — domain models
Step 3: hero_studio_slides — slide domain logic (parallel with 4, 5)
Step 4: hero_studio_websites — website domain logic (parallel with 3, 5)
Step 5: hero_studio_jobs — job abstraction (parallel with 3, 4)
Step 6: hero_studio_server — server skeleton
Step 7: hero_studio_sdk — client library
Step 8: hero_studio_ui — admin dashboard (parallel with 9)
Step 9: hero_studio_web — end-user web (parallel with 8)
Acceptance Criteria
cargo check --workspacepassescargo build --workspacecompiles all 8 cratescargo test --workspacepassescargo clippy --workspace --all-targets -- -D warningspassescrates/openrpc.jsonwith all CRUD methodsmake buildworks end-to-endNotes
hero_studio_openrouterfrom the issue maps to a module withinhero_studio_jobs(not a separate crate at scaffold stage)Test Results
Minor Warnings (non-blocking)
hero_studio_slides:map_orcan be simplifiedhero_studio_web: unusedbase_pathfield (will be used when routes are implemented)hero_studio_server: some handler stubs have too many arguments (will be refactored when implementing real logic)All 8 crates compile and link successfully.
Implementation Summary
Scaffold Complete - 8 Crates Created
hero_studio_corehero_studio_slideshero_studio_websiteshero_studio_jobshero_studio_serverhero_studio_sdkhero_studio_uihero_studio_webBuild Infrastructure
Cargo.tomlwith shared dependenciesMakefilewith build/install/run/stop/test/lint targetsCLAUDE.mdwith project conventionsPatterns Followed
Implementation committed:
2dce569Browse:
2dce569