Building in Phases
The most reliable way to avoid getting stuck in vibe coding is to build in four explicit phases. Each phase has one job. Mixing phases in a single prompt is the single most common cause of messy, hard-to-fix AI output.
The four phases
Phase 1 — Structure: Write only HTML. No CSS, no JS. The goal is correct semantic content: headings in the right order, lists vs. grids, which elements are interactive. Browser-default styles are fine at this stage — they tell you if the structure makes sense.
Phase 2 — Styling: Apply design tokens. Add layout, spacing, color, and typography. Zero JavaScript at this stage. The prompt: “디자인 토큰 파일 기준으로 스타일 추가해줘. JS는 아직 필요 없어.”
Phase 3 — Interactions: Add only the JavaScript needed for the page to work. Click handlers, state, toggles. The prompt: “이 페이지에 인터랙션을 추가해줘. 클릭하면 카드가 펼쳐지고, 필터로 카테고리를 선택할 수 있어야 해.”
Phase 4 — Polish: Animations, transitions, hover states, edge cases. This is the last thing you add, not the first. The prompt: “이제 애니메이션을 추가해줘. 카드 진입, 필터 전환, hover 효과.”
The prompt sequence
Each phase gets its own prompt. Do not combine them:
[Phase 1] HTML 구조만 먼저 만들어줘.
[Phase 2] 스타일 추가해줘. 디자인 토큰 기준.
[Phase 3] JS 인터랙션 추가해줘.
[Phase 4] 애니메이션과 polish 추가해줘.
Between each prompt, review what was generated before moving on. If the structure is wrong in Phase 1, the other phases will inherit those mistakes.
The common mistake
Trying to do all four phases in one prompt produces code that technically works but is hard to maintain. The AI packs styling, logic, and animations into the same blocks. When something breaks, it’s harder to identify which layer caused it.
One prompt per phase keeps each concern separate. It also makes it easy to roll back — if Phase 3 goes wrong, you still have a working Phase 2 baseline.
Why this works
Each phase gives Claude Code a narrow, well-defined problem. A prompt that says “make a portfolio page with animations, filtering, and responsive layout” has too many variables. A prompt that says “HTML 구조만 만들어줘” has exactly one success condition: does the HTML make sense?
Narrow prompts produce precise output. That’s the core principle behind phased building.
The demo shows a portfolio “Work” page rendered in all four phases, selectable via tabs. You can see exactly what each phase adds — and understand what the AI was focused on at each step.
복잡한 UI를 한 번의 프롬프트로 구축하려고 하지 마세요. 단계별로 구성합니다.
4단계 프레임워크
1단계: 구조 — HTML과 레이아웃
제품 상세 페이지 HTML 구조:
이미지 갤러리 왼쪽, 제품 정보 오른쪽 (2열 그리드).
CSS는 최소한으로 — 레이아웃만.
2단계: 콘텐츠 — 실제 데이터와 상태
JS로 제품 데이터 객체를 만들고 DOM에 렌더링해줘.
색상 옵션 클릭으로 선택 가능하게.
3단계: 인터랙션 — 동작과 로직
이미지 갤러리에 썸네일 클릭으로 메인 이미지 교체 추가.
수량 증감 버튼 (1-10 범위).
4단계: 폴리시 — 애니메이션과 마무리
색상 전환 시 부드러운 fade 추가.
이미지 교체 시 cross-fade 효과.
add-to-cart 버튼 클릭 피드백.
단계마다 검토하고 다음 단계로 넘어가세요. 폴리시 전에 로직이 올바른지 확인하는 것이 핵심입니다.