Skip to content

Add frontend-design workflow mode - #1066

Open
nehamalepati wants to merge 3 commits into
akashgit:mainfrom
nehamalepati:feature/frontend-design-mode
Open

Add frontend-design workflow mode#1066
nehamalepati wants to merge 3 commits into
akashgit:mainfrom
nehamalepati:feature/frontend-design-mode

Conversation

@nehamalepati

Copy link
Copy Markdown

Summary

  • New frontend-design workflow mode — a Feature-to-UI pipeline that discovers a project's design system from its code and enforces it on every new feature
  • 20-node workflow DAG with 5 phases: parallel research → audit → spec (user approval gate) → constrained build → two-tier QA
  • 9 custom agent prompts, 6 check scripts, SKILL.md playbook
  • Project-agnostic — works on any frontend project with a token/component system

What it does

  1. Researches the existing design system (tokens, components, patterns) via 3 parallel agents
  2. Synthesizes a canonical design-baseline.json with allowed values
  3. Produces a UI spec constrained by the baseline — user approves before any code is written
  4. Builds with design rules enforced (no hardcoded hex, no raw HTML, dark mode parity, a11y)
  5. QA gates verify compliance — hard failures auto-revert, soft warnings surface in PR

Tested on

Amortized Studio (React 19 + TypeScript + Tailwind + Radix UI) — full pipeline produced PR #105 with zero design violations.

Files changed

  • factory/workflow/definitions.pyfrontend_design_workflow() + registration
  • factory/workflow/skill_export.py — WORKFLOW_META entry
  • factory/cli/_helpers.py — added to CEO_MODES
  • factory/cli/ceo.py — allow --focus with frontend-design mode
  • factory/agents/prompts/frontend_design/ — 9 agent prompts
  • factory/templates/design_checks/ — 6 shell scripts
  • skills/workflow-frontend-design/SKILL.md — generated playbook
  • tests/test_workflow_frontend_design.py — 36 DAG validation tests

Test plan

  • 36 unit tests pass (graph validation, triggers, gates, edges)
  • 172 total tests pass (zero regressions)
  • Full end-to-end pipeline tested against Amortized Studio
  • Check scripts detect real violations (135 token purity, 51 raw HTML)
  • Builder output passes all QA gates (tsc, lint, design compliance, consistency)

🤖 Generated with Claude Code

nehamalepati and others added 3 commits July 27, 2026 12:09
Feature-to-UI pipeline that discovers a project's design system from
its code and enforces it on every new feature. 20-node DAG with
parallel research, audit, user-approved spec, constrained build,
and two-tier QA gates. Project-agnostic — works on any frontend
project with a token/component system.

Tested end-to-end on Amortized Studio — produced PR akashgit#105 with zero
design violations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change 1: 4th parallel researcher (researcher_ux) captures animation
choreography, information hierarchy, and non-technical user patterns.
Updated auditor, spec writer, and builder prompts to enforce UX quality.
DAG: 20 → 21 nodes.

Change 2: New frontend-design-scan workflow (17 nodes) for continuous
design health monitoring. Scans entire codebase with SCAN_MODE=full,
produces structured health-report.json with per-dimension scores and
trend data. No builder/spec/user gates — pure scan pipeline. Works
with factory run --loop for hourly monitoring.

62 tests pass (38 frontend-design + 24 frontend-design-scan).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The frontend-design pipeline now catches two classes of failures:

1. Prompt updates enforce that data-fetching components handle three
   states (loading, populated, unavailable) — the unavailable state must
   show a designed message, never "Unable to load" or "Failed to fetch".
   Updated builder, spec writer, health checker, and auditor prompts.

2. gate_render (23rd node) starts the dev server after build, verifies
   HTTP 200, and RELOOPs to builder if the server crashes. Detects
   monorepo subdirectories (studio/, web/, app/, etc.) automatically.

Pipeline: builder → gate_build → gate_render → gate_ci → health_checker

48 frontend-design tests + 24 scan tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@osilkin98

Copy link
Copy Markdown
Collaborator

Thanks for the PR @nehamalepati ! It just looks like there's a few conflicts with the main branch, could you please take a look?

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.

2 participants