탐색-계획-코드 워크플로

Claude Code로 배우는 Software Development

Dani Zysman

AI Curriculum Manager @ DataCamp

"바로 뛰어들기" 문제

빙산: 수면 위 프롬프트, 수면 아래 숨겨진 복잡성

Claude Code로 배우는 Software Development

워크플로

순서도: 초기화 → 탐색 → 계획 → 코드

Claude Code로 배우는 Software Development

API 프로젝트 개요

music-analytics-api/
  app.py           # Application entry point
  routes.py        # API endpoints
  models.py        # Artist/Album models
  analytics.py     # Statistics functions
  middleware.py    # Request logging
  config.py        # Session settings

기존 패턴을 준수해야 하는 간단한 Music Analytics API입니다.

Claude Code로 배우는 Software Development

CLAUDE.md: 프로젝트 메모리

CLAUDE.md:

  • Claude에게 프로젝트에 대한 지속적인 컨텍스트를 제공합니다
  • Claude가 매 세션마다 자동으로 읽습니다
  • 매번 설정을 다시 설명할 필요가 없습니다
Claude Code로 배우는 Software Development

/init으로 시작하기

> /init
Music Analytics API
A Flask-based REST API for music data analytics.

Project Structure
- app.py       Flask application entry point
- routes.py    API endpoint definitions
- analytics.py Statistical analysis functions

Coding Conventions
- Use type hints for function parameters
- Include docstrings for all public functions
- Follow PEP 8 style guidelines
Claude Code로 배우는 Software Development

계획 모드

  • Shift+Tab을 누르거나 /plan을 입력해 전환하세요
  • 계획이 생성되면 Ctrl+G를 눌러 시각화, 승인, 검토, 편집할 수 있습니다
Claude Code로 배우는 Software Development

계획 건너뛰기

> Add a /api/login endpoint that creates a session for a user
from flask import jsonify, request
from flask_login import LoginManager, login_user
from app import app

login_manager = LoginManager(app)
@app.route('/api/login', methods=['POST'])
def login():
    """Handle user login and create session."""
    data = request.get_json()
    user = User.query.filter_by(username=data['username']).first()
    if user and user.password == data['password']:
        login_user(user)
        return jsonify({'status': 'success'})
    return jsonify({'error': 'Invalid credentials'}), 401
Claude Code로 배우는 Software Development

계획 먼저, 코드는 그다음

> /plan Add a /api/login endpoint that creates a session for a user
Plan: Add POST /api/login endpoint

Context
The music analytics API has session infrastructure in place
(flask_session, SECRET_KEY, session already imported in routes)
but no authentication.

Files to Modify
- models.py:  add User class, UserStore class, user_store singleton
- routes.py:  expand import, add login route

No changes needed to app.py, config.py, middleware.py, or analytics.py.
Claude Code로 배우는 Software Development

확장 사고

> think about how to add authentication to this API
Claude Code로 배우는 Software Development

사고 수준

명령어 추론 깊이
think 기본 추론
think more 확장 추론
think a lot 포괄적 추론
think longer 장시간 추론
ultrathink 최대 추론
Claude Code로 배우는 Software Development

컨텍스트 창과 토큰 관리

excalidraw: 프롬프트와 응답으로 채워지는 컨텍스트 창, 토큰 분석 표시

  • "Context window exceeded"(컨텍스트 창 초과) → 세션이 너무 길다는 의미이므로 /clear를 사용하세요
  • 컨텍스트가 가득 차면 Claude는 최근 대화를 우선시합니다
Claude Code로 배우는 Software Development

전체 워크플로

순서도: /init → 탐색 → 계획 → 검토 → 코드 → 테스트

Claude Code로 배우는 Software Development

연습해 봅시다!

Claude Code로 배우는 Software Development

Preparing Video For Download...