Add creative-direction skill for vague site briefs#3629
Conversation
Rebuilt on top of #3605's skill-routing architecture: - Skill lives in apps/cli/ai/skills/creative-direction/SKILL.md - System prompt only adds: (a) routing pointer in LOCAL_SKILL_ROUTING, (b) one-sentence reference in the local 'Plan the design' step. - Skill itself contains all the expansion logic (Step 0 gauge, type detection, page/section recipes, design-direction commitments). - Skill is invoked only when the agent decides the brief is vague — not on every site creation. Validation built into Step 0 via the three explicit modes: auto-expand, ask one question, or skip. Tests: apps/cli/ai/tests/creative-direction-skill.test.ts (14 pass).
📊 Performance Test ResultsComparing 66bee27 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
|
Picking up @youknowriad's question from #3610 — marking this as a PoC so the team has something concrete to evaluate. This PR implements approach 2 (auto-expansion, like Telex). Here's how the three approaches play out in practice:
The Telex observation is relevant here: Telex's better output quality comes specifically from committing to a On Riad's concern about merging with site-spec: agreed — a separate skill for the same purpose is redundant. A follow-up PR will fold this into |
What
Adds a
creative-directionskill that expands a vague site brief into a rich content and structure plan — choosing pages, sections, hero framing, and copy direction — before the agent starts building.Follows the skill-routing pattern established in #3605.
Why
When a user says "make a site for my bar", the agent has to guess what pages, sections, and tone to use. Without a planning step it either under-builds (minimal skeleton) or over-asks (wizard-like back-and-forth). This skill lets the agent commit to a concrete creative direction and then build confidently, with no user interruption.
Changes
apps/cli/ai/skills/creative-direction/SKILL.md— the skill: site-type inference, page/section inventory, hero framing, copy direction, confidence rulesapps/cli/ai/system-prompt.ts— two small routing lines:For new sites built from a vague brief…)apps/cli/ai/tests/creative-direction-skill.test.ts— 14 unit tests covering invocation conditions, confidence rules, and system prompt integration (all pass)What changed vs the earlier draft (#3610)
#3610 predated #3605 and made large edits to
system-prompt.ts(+152 / −0 lines) plus touched several other files. This PR is a clean rebase:system-prompt.tsdelta reduced to +4 / −2 lines (routing pointer only, no inline spec)Testing
Then in Studio AI chat: "crea un sitio para una hamburguesería" — agent should load
creative-direction, plan pages/sections, then start building without asking for approval.