RFC-002: Template Ecosystem for Deterministic Agent Output#1724
Draft
ChaiWithJai wants to merge 5 commits intofeat/web-ui-agentfrom
Draft
RFC-002: Template Ecosystem for Deterministic Agent Output#1724ChaiWithJai wants to merge 5 commits intofeat/web-ui-agentfrom
ChaiWithJai wants to merge 5 commits intofeat/web-ui-agentfrom
Conversation
RFC-002 documents the comprehensive evaluation of agent-built artifacts and proposes a deterministic template ecosystem to address observed failures: Composite Evaluation: - 6 screenshots documenting conscious-observer.localhost artifact state - /home: Working with 3 content cards (Toronto, Jersey City, Observation) - /toronto, /jersey-city: Rich narrative content successfully rendered - /write: BROKEN - NoMethodError for non-existent render_api_form - /stories: Empty page - no content populated Template Designer Subagent: - VERIFIED_LIQUID_TAGS: Deterministic list of known-good tags - FORBIDDEN_TAGS: Explicitly block render_api_form, api_resource, etc - Blog templates: home, category, post_index, post_show, write, about - verify_page tool: HTTP verification with error pattern detection - generate_styled_page: Complete HTML with 90s nostalgia CSS 90s Low-Tech Nostalgia CSS: - Design Philosophy: "Don't Make Me Think Revisited" - Cream backgrounds (#f5f0e6), paper-white cards (#fffef9) - Georgia serif typography for web 1.0 feel - Teal/coral accents (#2a9d8f, #e76f51) - CSS Grid layout with content-width container - Mobile responsive with print styles Success Criteria: - PageVerificationCriteria class for systematic validation - HTTP 200 + no Liquid errors + has_content check Related: #1720, #1721, #1722, #1723, #1724, #1725 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds Template Designer tools and subagent to the main Violet App Agent: Tools added: - list_templates: List available blog templates - select_template: Choose template for page type - get_liquid_tag: Get verified Liquid tag syntax - generate_styled_page: Generate HTML with 90s nostalgia CSS - verify_page: HTTP verification after page creation Subagent added: - Template Designer: Deterministic template generation with verified tags Fix: Changed create_react_agent parameter from state_modifier to prompt (API compatibility with current langgraph version) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates the system prompt to explicitly instruct the agent to use the Template Designer workflow for all page creation, ensuring 90s nostalgia CSS styling is consistently applied. Changes: - prompts.py: Added Template Designer workflow instructions to Step 4 - agent.py: Import Template Designer tools for main agent access - template_designer.py: Added page type documentation and slot references - subagents/__init__.py: Export Template Designer constants The agent now follows this workflow for pages: 1. generate_styled_page() → Returns HTML with 90s nostalgia CSS 2. create_page() → Creates the page in CMS 3. verify_page() → Confirms page renders without errors Tested E2E: cosmic-observer.localhost:5250/home renders with: - Cream background (#fdf6e3) - Georgia serif typography - Teal/coral accent buttons 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
donrestarone
reviewed
Dec 9, 2025
Contributor
There was a problem hiding this comment.
@ChaiWithJai this error came up because its using the wrong syntax to render the form, it should be
https://github.com/restarone/violet_rails/wiki/API:-Entities,-Form-Rendering,-Interfaces-and-Actions#render-the-form
it should be something like;
{{ cms:helper render_form, 1 }}
Contributor
|
@ChaiWithJai do you want to merge this PR to the base branch you are currently targeting? I think the merge looks good, only concern is storing generated screenshots. Of course if/when we eventually merge this to master we would need to strip the python directory when emitting the source code for the rails server deployment |
Adds a complete demo package for the Violet Rails Hackathon: - index.html: Landing page with 90s nostalgia styling - Hero: "One sentence. One deployed app." - Live demo section showing agent workflow - Features grid highlighting key capabilities - Hackathon CTA for "Building with AI" track - "Try It Live" button linking to chat UI - DEMO_SCRIPT.md: Video recording script with timing - SOCIAL_POSTS.md: Twitter, LinkedIn, YouTube, Reddit, HN posts - demo-landing-page.png: Full page screenshot Pull this PR to try the agent locally for the hackathon. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comprehensive guide for hackathon participants to extend the Template Ecosystem feature: - Architecture overview with Deep Agent pattern - Setup instructions for local development - Key code locations and examples - Extension ideas (beginner to advanced) - Step-by-step guides for: - Adding new page templates - Creating CSS themes - Building new subagents - Testing strategies and common pitfalls - Submission checklist 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <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
Implements a deterministic template ecosystem that eliminates hallucinated Liquid tags and ensures verifiable page creation with consistent 90s nostalgia styling.
Key Features:
render_api_formArchitecture: Deep Agent Template Designer Subagent (DIAGNOSE → MULTI-EXPERT → ARTIFACT-FIRST → DOMAIN-NATIVE)
Tools (5):
list_templatesselect_templateget_liquid_taggenerate_styled_pageverify_pageTemplate Types:
homecategorypost_indexpost_showwriterender_form, NOTrender_api_form)aboutProblem Statement
Evaluation of agent-built artifacts revealed:
/writepage BROKEN withNoMethodError: undefined method 'render_api_form'Root Cause
Walking Through The Workflow
The Template Designer ensures consistent styling through a 3-step workflow:
Step 1: Generate Styled HTML
Step 2: Create the Page
Step 3: Verify It Renders
Result: Styled Page
Tested E2E with "Create a blog called The Cosmic Observer about astronomy":
cosmic-observer.localhost:5250/homeThe 90s Nostalgia CSS
Design philosophy: "Don't Make Me Think Revisited"
Visual characteristics:
Files Changed
prompts.pyagent.pytemplate_designer.pysubagents/__init__.pytemplates/styles/90s_nostalgia.cssdocs/RFC-002-template-ecosystem.mdTest Plan
VERIFIED_LIQUID_TAGSmatches actual Violet Rails tagsFORBIDDEN_TAGSblocksrender_api_form,api_resourcegenerate_styled_pagefor pagesverify_pagedetects render errorsRun tests:
cd violet-app-agent/apps/agent && pytest tests/ -vDependencies
This PR builds on
feat/web-ui-agent(PR #1719).Related
Closes #1726 - Template ecosystem for deterministic output
Relates to #1720, #1721, #1722, #1723, #1724, #1725
🤖 Generated with Claude Code