요구사항 명세를 기반으로 프로젝트 아키텍처와 GitHub Actions CI 파이프라인을 설계합니다. "프로젝트 시작", "프로젝트 초기화", "CI 설정", "아키텍처 설계" 등의 요청 시 활성화됩니다.
설계 명세를 분석해 아키텍처 문서와 GitHub Actions CI 파이프라인을 생성합니다. "프로젝트 시작"이나 "CI 설정" 요청 시 사용됩니다.
/plugin marketplace add dlddu/claude-plugin-marketplace/plugin install agile-tdd-workflow@dlddu-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
이 스킬은 요구사항 명세를 기반으로 프로젝트 아키텍처를 설계하고, GitHub Actions CI 파이프라인을 구축합니다. Hello World와 Health Check 엔드포인트를 포함한 초기 구현으로 CI 파이프라인의 동작을 검증합니다.
docs/specs/ 디렉토리에 명세서가 존재해야 합니다.docs/user-stories/ 디렉토리에 사용자 스토리가 존재해야 합니다.docs/traceability-matrix.md 파일이 존재해야 합니다.| 산출물 | 경로 | 설명 |
|---|---|---|
| 아키텍처 문서 | docs/architecture/ARCHITECTURE.md | 시스템 아키텍처 설계 |
| CI 설계 문서 | docs/architecture/CI-PIPELINE.md | CI/CD 파이프라인 설계 |
| GitHub Workflow | .github/workflows/ci.yml | CI 파이프라인 구현 |
| Hello World 구현 | 프로젝트에 따라 다름 | 초기 동작 검증용 |
| Health Check 구현 | 프로젝트에 따라 다름 | 시스템 상태 확인용 |
기존 명세서와 사용자 스토리를 분석하여 다음을 파악합니다:
docs/architecture/ARCHITECTURE.md 파일을 작성합니다:
# 시스템 아키텍처
## 메타데이터
- **작성일**: YYYY-MM-DD
- **버전**: 1.0
- **관련 명세**: SPEC-{번호}, SPEC-{번호}
## 개요
{시스템의 전체적인 목적과 범위}
## 기술 스택
| 계층 | 기술 | 선정 이유 |
|------|------|----------|
| 언어 | {언어} | {이유} |
| 프레임워크 | {프레임워크} | {이유} |
| 데이터베이스 | {DB} | {이유} |
| 테스트 | {테스트 도구} | {이유} |
## 시스템 구조
{프로젝트 루트}/ ├── src/ # 소스 코드 │ ├── main/ # 메인 애플리케이션 │ └── ... ├── tests/ # 테스트 코드 │ ├── unit/ # 단위 테스트 │ ├── integration/ # 통합 테스트 │ └── acceptance/ # 인수 테스트 ├── docs/ # 문서 │ ├── specs/ # 명세서 │ ├── user-stories/ # 사용자 스토리 │ └── architecture/ # 아키텍처 문서 └── .github/workflows/ # CI/CD 파이프라인
## 컴포넌트 다이어그램
┌─────────────────────────────────────────────────────────┐ │ 시스템 경계 │ ├─────────────────────────────────────────────────────────┤ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │ 컴포넌트 A │───▶│ 컴포넌트 B │───▶│ 컴포넌트 C │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ └─────────────────────────────────────────────────────────┘
## 데이터 흐름
{주요 데이터 흐름 설명}
## 보안 고려사항
- {보안 관련 설계 결정}
## 확장성 고려사항
- {확장성 관련 설계 결정}
## 추적성
| 아키텍처 결정 | 관련 요구사항 |
|--------------|--------------|
| {결정 1} | SPEC-{번호}-NFR-{번호} |
docs/architecture/CI-PIPELINE.md 파일을 작성합니다:
# CI/CD 파이프라인 설계
## 메타데이터
- **작성일**: YYYY-MM-DD
- **CI 도구**: GitHub Actions
## 파이프라인 개요
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ Build │───▶│ Lint │───▶│ Test │───▶│ Deploy │ └──────────┘ └──────────┘ └──────────┘ └──────────┘
## 단계별 상세
### 1. Build
- 의존성 설치
- 컴파일/빌드
### 2. Lint
- 코드 스타일 검사
- 정적 분석
### 3. Test
- 단위 테스트
- 통합 테스트
- 인수 테스트
### 4. Deploy (선택적)
- 스테이징/프로덕션 배포
## 트리거 조건
| 이벤트 | 브랜치 | 실행 단계 |
|--------|--------|----------|
| push | main | 전체 |
| pull_request | * | Build, Lint, Test |
## 환경 변수
| 변수명 | 용도 | 비밀값 여부 |
|--------|------|------------|
| {변수} | {용도} | 예/아니오 |
.github/workflows/ci.yml 파일을 생성합니다:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 코드 체크아웃
uses: actions/checkout@v4
# 언어/프레임워크에 따른 설정
# 예시: Node.js
- name: Node.js 설정
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: 의존성 설치
run: npm ci
- name: 린트 검사
run: npm run lint
- name: 테스트 실행
run: npm test
- name: 빌드
run: npm run build
health-check:
runs-on: ubuntu-latest
needs: build
steps:
- name: 코드 체크아웃
uses: actions/checkout@v4
- name: 애플리케이션 시작 및 Health Check
run: |
# 애플리케이션 시작 (백그라운드)
npm start &
sleep 5
# Health Check
curl -f http://localhost:3000/health || exit 1
프로젝트 기술 스택에 맞게 초기 구현을 작성합니다.
// src/index.js
// @trace BOOTSTRAP-HELLO
// @trace BOOTSTRAP-HEALTH
const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;
// Hello World 엔드포인트
// @trace BOOTSTRAP-HELLO
app.get('/', (req, res) => {
res.json({ message: 'Hello, World!' });
});
// Health Check 엔드포인트
// @trace BOOTSTRAP-HEALTH
app.get('/health', (req, res) => {
res.json({
status: 'healthy',
timestamp: new Date().toISOString()
});
});
app.listen(PORT, () => {
console.log(`서버가 포트 ${PORT}에서 실행 중입니다.`);
});
module.exports = app;
// tests/health.test.js
// @trace BOOTSTRAP-HEALTH
const request = require('supertest');
const app = require('../src/index');
describe('Health Check', () => {
// @trace BOOTSTRAP-HEALTH
it('GET /health는 healthy 상태를 반환해야 한다', async () => {
const response = await request(app).get('/health');
expect(response.status).toBe(200);
expect(response.body.status).toBe('healthy');
});
// @trace BOOTSTRAP-HELLO
it('GET /는 Hello World 메시지를 반환해야 한다', async () => {
const response = await request(app).get('/');
expect(response.status).toBe(200);
expect(response.body.message).toBe('Hello, World!');
});
});
# src/app.py
# @trace BOOTSTRAP-HELLO
# @trace BOOTSTRAP-HEALTH
from flask import Flask, jsonify
from datetime import datetime
app = Flask(__name__)
# @trace BOOTSTRAP-HELLO
@app.route('/')
def hello_world():
return jsonify({'message': 'Hello, World!'})
# @trace BOOTSTRAP-HEALTH
@app.route('/health')
def health_check():
return jsonify({
'status': 'healthy',
'timestamp': datetime.utcnow().isoformat()
})
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
# tests/test_health.py
# @trace BOOTSTRAP-HEALTH
import pytest
from src.app import app
@pytest.fixture
def client():
app.config['TESTING'] = True
with app.test_client() as client:
yield client
# @trace BOOTSTRAP-HEALTH
def test_health_check(client):
response = client.get('/health')
assert response.status_code == 200
assert response.json['status'] == 'healthy'
# @trace BOOTSTRAP-HELLO
def test_hello_world(client):
response = client.get('/')
assert response.status_code == 200
assert response.json['message'] == 'Hello, World!'
docs/traceability-matrix.md에 부트스트랩 관련 추적 정보를 추가합니다:
## 부트스트랩 추적
| 추적 ID | 설명 | 파일 |
|---------|------|------|
| BOOTSTRAP-HELLO | Hello World 엔드포인트 | src/index.js, tests/health.test.js |
| BOOTSTRAP-HEALTH | Health Check 엔드포인트 | src/index.js, tests/health.test.js |
프로젝트 부트스트랩이 완료되면:
task-planning 스킬을 사용하여 사용자 스토리 기반의 작업 계획을 수립합니다.