From c218607335576bfe7b4fd07e7e3f40554294a703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Wed, 18 Mar 2026 16:53:44 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20[plans]=20BOM=20=ED=8A=B8=EB=A6=AC=203?= =?UTF-8?q?=EB=8B=A8=EA=B3=84=20React=20=EA=B5=AC=ED=98=84=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=EC=84=9C=20=EC=9E=AC=EC=9E=91=EC=84=B1=20(=ED=94=84?= =?UTF-8?q?=EB=A1=A0=ED=8A=B8=EC=97=94=EB=93=9C=20=EC=A0=84=EB=8B=AC?= =?UTF-8?q?=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/agents/code-reviewer.md | 58 + .claude/agents/debugger.md | 45 + .claude/agents/doc-writer.md | 44 + .claude/agents/git-manager.md | 54 + .claude/agents/laravel-expert.md | 62 + .claude/agents/organizer-agent.md | 497 +++++++ .claude/agents/performance-optimizer.md | 45 + .claude/agents/proposal-agent.md | 394 ++++++ .claude/agents/refactoring-agent.md | 48 + .claude/agents/research-agent.md | 80 ++ .claude/agents/security-auditor.md | 58 + .claude/agents/test-runner.md | 45 + .../app-comprehensive-test-generator/SKILL.md | 145 ++ .../skills/async-await-keyword-fixer/SKILL.md | 122 ++ .claude/skills/build-auditor/SKILL.md | 181 +++ .claude/skills/code-bug-finder/SKILL.md | 88 ++ .claude/skills/code-commenter/SKILL.md | 169 +++ .../code-flow-web-doc-generator/SKILL.md | 124 ++ .claude/skills/code-flow-web-report/SKILL.md | 179 +++ .../skills/code-principles-auditor/SKILL.md | 422 ++++++ .claude/skills/code-quality-auditor/SKILL.md | 302 +++++ .claude/skills/code-quality-checker/SKILL.md | 207 +++ .claude/skills/code-refactoring/SKILL.md | 111 ++ .../codebase-analysis-web-report/SKILL.md | 70 + .claude/skills/concurrency-auditor/SKILL.md | 194 +++ .../coverage-improvement-planner/SKILL.md | 96 ++ .claude/skills/dead-code-auditor/SKILL.md | 142 ++ .claude/skills/dependencies-auditor/SKILL.md | 193 +++ .claude/skills/design-skill/SKILL.md | 949 +++++++++++++ .claude/skills/differential-review/SKILL.md | 220 +++ .../skills/duplicate-file-cleaner/SKILL.md | 154 +++ .claude/skills/flutter-ux-hardening/SKILL.md | 165 +++ .claude/skills/frontend-design/SKILL.md | 42 + .claude/skills/insecure-defaults/SKILL.md | 117 ++ .../skills/layer-boundary-auditor/SKILL.md | 323 +++++ .../node-debug-logging-middleware/SKILL.md | 223 +++ .claude/skills/npm-release-manager/SKILL.md | 129 ++ .claude/skills/observability-auditor/SKILL.md | 134 ++ .claude/skills/pdf-template-skill/SKILL.md | 211 +++ .../scripts/analyze-template.js | 572 ++++++++ .../scripts/generate-from-template.js | 453 +++++++ .claude/skills/ppt-auto-generator/SKILL.md | 193 +++ .claude/skills/pptx-skill/SKILL.md | 434 ++++++ .claude/skills/pptx-skill/html2pptx.md | 769 +++++++++++ .claude/skills/pptx-skill/ooxml.md | 427 ++++++ .../skills/pptx-skill/ooxml/scripts/pack.py | 159 +++ .../skills/pptx-skill/ooxml/scripts/unpack.py | 29 + .../pptx-skill/ooxml/scripts/validate.py | 69 + .../scripts/enhanced-pptx-generator.js | 359 +++++ .../skills/pptx-skill/scripts/html2pptx.cjs | 979 +++++++++++++ .../skills/pptx-skill/scripts/html2pptx.js | 979 +++++++++++++ .../pptx-skill/scripts/package-lock.json | 761 +++++++++++ .../skills/pptx-skill/scripts/package.json | 7 + .../skills/pptx-skill/scripts/thumbnail.py | 450 ++++++ .claude/skills/proposal-skill/SKILL.md | 301 ++++ .../proposal-skill/scripts/pdf-analyzer.js | 393 ++++++ .../scripts/proposal-generator.js | 829 +++++++++++ .../skills/query-efficiency-auditor/SKILL.md | 202 +++ .claude/skills/regression-checker/SKILL.md | 42 + .claude/skills/security-auditor/SKILL.md | 152 +++ .claude/skills/sharp-edges/SKILL.md | 292 ++++ .../skills/static-analysis/codeql/SKILL.md | 119 ++ .../static-analysis/sarif-parsing/SKILL.md | 479 +++++++ .../skills/static-analysis/semgrep/SKILL.md | 417 ++++++ .claude/skills/story-quality-gate/SKILL.md | 171 +++ .claude/skills/storyboard-generator/SKILL.md | 816 +++++++++++ .../examples/fire-shutter-config.json | 95 ++ .../scripts/convert-html-to-pptx.js | 122 ++ .../scripts/generate-html-storyboard.js | 1206 +++++++++++++++++ .../scripts/generate-storyboard.js | 761 +++++++++++ .../scripts/package-lock.json | 765 +++++++++++ .../storyboard-generator/scripts/package.json | 18 + .../templates/storyboard-slide.html | 349 +++++ .claude/skills/system-debug-logger/SKILL.md | 171 +++ .claude/skills/test-coverage-auditor/SKILL.md | 223 +++ .../skills/test-isolation-auditor/SKILL.md | 367 +++++ .claude/skills/text-analyzer-skill/SKILL.md | 599 ++++++++ .../scripts/txt-to-pptx.js | 306 +++++ .claude/skills/uml-generator/SKILL.md | 93 ++ .claude/skills/webapp-testing/SKILL.md | 96 ++ .claude/skills/웹문서/SKILL.md | 166 +++ INDEX.md | 2 +- ...고객_서비스이용계약서_v4_0_전자서명용.docx | Bin 39346 -> 50145 bytes guides/sam-pricing-simple-guide.pdf | Bin 0 -> 295373 bytes patent-briefing.pptx | Bin 0 -> 485006 bytes patent-candidate-summary.md | 513 +++++++ plans/bom-tree-3level-react-request.md | 375 +++++ plans/bom-tree-3level-react.md | 297 ---- 88 files changed, 23921 insertions(+), 298 deletions(-) create mode 100644 .claude/agents/code-reviewer.md create mode 100644 .claude/agents/debugger.md create mode 100644 .claude/agents/doc-writer.md create mode 100644 .claude/agents/git-manager.md create mode 100644 .claude/agents/laravel-expert.md create mode 100755 .claude/agents/organizer-agent.md create mode 100644 .claude/agents/performance-optimizer.md create mode 100755 .claude/agents/proposal-agent.md create mode 100644 .claude/agents/refactoring-agent.md create mode 100755 .claude/agents/research-agent.md create mode 100644 .claude/agents/security-auditor.md create mode 100644 .claude/agents/test-runner.md create mode 100755 .claude/skills/app-comprehensive-test-generator/SKILL.md create mode 100755 .claude/skills/async-await-keyword-fixer/SKILL.md create mode 100644 .claude/skills/build-auditor/SKILL.md create mode 100755 .claude/skills/code-bug-finder/SKILL.md create mode 100755 .claude/skills/code-commenter/SKILL.md create mode 100755 .claude/skills/code-flow-web-doc-generator/SKILL.md create mode 100755 .claude/skills/code-flow-web-report/SKILL.md create mode 100644 .claude/skills/code-principles-auditor/SKILL.md create mode 100644 .claude/skills/code-quality-auditor/SKILL.md create mode 100644 .claude/skills/code-quality-checker/SKILL.md create mode 100755 .claude/skills/code-refactoring/SKILL.md create mode 100755 .claude/skills/codebase-analysis-web-report/SKILL.md create mode 100644 .claude/skills/concurrency-auditor/SKILL.md create mode 100755 .claude/skills/coverage-improvement-planner/SKILL.md create mode 100644 .claude/skills/dead-code-auditor/SKILL.md create mode 100644 .claude/skills/dependencies-auditor/SKILL.md create mode 100755 .claude/skills/design-skill/SKILL.md create mode 100644 .claude/skills/differential-review/SKILL.md create mode 100755 .claude/skills/duplicate-file-cleaner/SKILL.md create mode 100755 .claude/skills/flutter-ux-hardening/SKILL.md create mode 100644 .claude/skills/frontend-design/SKILL.md create mode 100644 .claude/skills/insecure-defaults/SKILL.md create mode 100644 .claude/skills/layer-boundary-auditor/SKILL.md create mode 100755 .claude/skills/node-debug-logging-middleware/SKILL.md create mode 100755 .claude/skills/npm-release-manager/SKILL.md create mode 100644 .claude/skills/observability-auditor/SKILL.md create mode 100755 .claude/skills/pdf-template-skill/SKILL.md create mode 100755 .claude/skills/pdf-template-skill/scripts/analyze-template.js create mode 100755 .claude/skills/pdf-template-skill/scripts/generate-from-template.js create mode 100755 .claude/skills/ppt-auto-generator/SKILL.md create mode 100755 .claude/skills/pptx-skill/SKILL.md create mode 100755 .claude/skills/pptx-skill/html2pptx.md create mode 100755 .claude/skills/pptx-skill/ooxml.md create mode 100755 .claude/skills/pptx-skill/ooxml/scripts/pack.py create mode 100755 .claude/skills/pptx-skill/ooxml/scripts/unpack.py create mode 100755 .claude/skills/pptx-skill/ooxml/scripts/validate.py create mode 100755 .claude/skills/pptx-skill/scripts/enhanced-pptx-generator.js create mode 100755 .claude/skills/pptx-skill/scripts/html2pptx.cjs create mode 100755 .claude/skills/pptx-skill/scripts/html2pptx.js create mode 100755 .claude/skills/pptx-skill/scripts/package-lock.json create mode 100755 .claude/skills/pptx-skill/scripts/package.json create mode 100755 .claude/skills/pptx-skill/scripts/thumbnail.py create mode 100755 .claude/skills/proposal-skill/SKILL.md create mode 100755 .claude/skills/proposal-skill/scripts/pdf-analyzer.js create mode 100755 .claude/skills/proposal-skill/scripts/proposal-generator.js create mode 100644 .claude/skills/query-efficiency-auditor/SKILL.md create mode 100644 .claude/skills/regression-checker/SKILL.md create mode 100644 .claude/skills/security-auditor/SKILL.md create mode 100644 .claude/skills/sharp-edges/SKILL.md create mode 100644 .claude/skills/static-analysis/codeql/SKILL.md create mode 100644 .claude/skills/static-analysis/sarif-parsing/SKILL.md create mode 100644 .claude/skills/static-analysis/semgrep/SKILL.md create mode 100644 .claude/skills/story-quality-gate/SKILL.md create mode 100755 .claude/skills/storyboard-generator/SKILL.md create mode 100755 .claude/skills/storyboard-generator/examples/fire-shutter-config.json create mode 100755 .claude/skills/storyboard-generator/scripts/convert-html-to-pptx.js create mode 100755 .claude/skills/storyboard-generator/scripts/generate-html-storyboard.js create mode 100755 .claude/skills/storyboard-generator/scripts/generate-storyboard.js create mode 100755 .claude/skills/storyboard-generator/scripts/package-lock.json create mode 100755 .claude/skills/storyboard-generator/scripts/package.json create mode 100755 .claude/skills/storyboard-generator/templates/storyboard-slide.html create mode 100755 .claude/skills/system-debug-logger/SKILL.md create mode 100644 .claude/skills/test-coverage-auditor/SKILL.md create mode 100644 .claude/skills/test-isolation-auditor/SKILL.md create mode 100755 .claude/skills/text-analyzer-skill/SKILL.md create mode 100755 .claude/skills/text-analyzer-skill/scripts/txt-to-pptx.js create mode 100755 .claude/skills/uml-generator/SKILL.md create mode 100644 .claude/skills/webapp-testing/SKILL.md create mode 100755 .claude/skills/웹문서/SKILL.md create mode 100644 guides/sam-pricing-simple-guide.pdf create mode 100644 patent-briefing.pptx create mode 100644 patent-candidate-summary.md create mode 100644 plans/bom-tree-3level-react-request.md delete mode 100644 plans/bom-tree-3level-react.md diff --git a/.claude/agents/code-reviewer.md b/.claude/agents/code-reviewer.md new file mode 100644 index 0000000..865047f --- /dev/null +++ b/.claude/agents/code-reviewer.md @@ -0,0 +1,58 @@ +--- +name: code-reviewer +description: 코드 리뷰 전문가. 코드 변경 후 품질, 보안, 유지보수성을 검토. 코드 작성/수정 후 자동으로 사용. Use proactively after code changes. +tools: Read, Grep, Glob, Bash +model: sonnet +memory: user +--- + +# Code Reviewer - 코드 리뷰 에이전트 + +당신은 10년 이상 경력의 시니어 코드 리뷰어입니다. 코드 품질과 보안의 높은 기준을 유지합니다. + +## 실행 절차 + +1. `git diff`로 최근 변경사항 확인 +2. 변경된 파일에 집중하여 분석 +3. 즉시 리뷰 시작 + +## 리뷰 체크리스트 + +### 코드 품질 +- 코드가 명확하고 읽기 쉬운가 +- 함수/변수명이 적절한가 +- 중복 코드가 없는가 +- 적절한 에러 처리가 되어 있는가 +- SOLID 원칙을 준수하는가 +- 복잡도가 적절한가 (Cyclomatic Complexity ≤ 10) + +### 보안 +- 시크릿이나 API 키가 노출되지 않았는가 +- 입력 검증이 구현되어 있는가 +- SQL Injection, XSS 취약점이 없는가 +- 인증/인가가 적절한가 + +### 성능 +- N+1 쿼리 패턴이 없는가 +- 불필요한 DB 쿼리가 없는가 +- 메모리 효율성이 적절한가 +- 적절한 인덱스를 사용하는가 + +### Laravel 특화 (PHP/Laravel 프로젝트인 경우) +- FormRequest로 입력 검증을 하는가 +- Service 레이어에 비즈니스 로직이 있는가 +- Eager Loading을 사용하는가 +- 적절한 미들웨어가 적용되어 있는가 + +## 출력 형식 + +피드백을 우선순위별로 정리: +- **Critical** (반드시 수정): 보안 취약점, 데이터 손실 위험 +- **Warning** (수정 권장): 성능 문제, 코드 스멜 +- **Suggestion** (개선 고려): 가독성, 네이밍, 스타일 + +각 이슈에 대해 구체적인 수정 방법을 포함합니다. + +## 메모리 활용 + +리뷰하면서 발견한 패턴, 반복되는 이슈, 코드베이스 컨벤션을 메모리에 기록하여 점점 더 정확한 리뷰를 제공합니다. diff --git a/.claude/agents/debugger.md b/.claude/agents/debugger.md new file mode 100644 index 0000000..6fa00f8 --- /dev/null +++ b/.claude/agents/debugger.md @@ -0,0 +1,45 @@ +--- +name: debugger +description: 디버깅 전문가. 에러, 테스트 실패, 예상치 못한 동작을 분석하고 수정. 문제 발생 시 자동으로 사용. Use proactively when encountering any issues. +tools: Read, Edit, Bash, Grep, Glob +model: sonnet +--- + +# Debugger - 디버깅 전문 에이전트 + +당신은 근본 원인 분석에 특화된 전문 디버거입니다. + +## 실행 절차 + +1. 에러 메시지와 스택 트레이스 수집 +2. 재현 단계 확인 +3. 실패 위치 격리 +4. 최소한의 수정 구현 +5. 솔루션 동작 검증 + +## 디버깅 프로세스 + +- 에러 메시지와 로그 분석 +- 최근 코드 변경사항 확인 (`git log`, `git diff`) +- 가설 수립 및 테스트 +- 전략적 디버그 로깅 추가 +- 변수 상태 검사 + +## Laravel/PHP 디버깅 특화 + +- `storage/logs/laravel.log` 확인 +- `php artisan tinker`로 상태 검증 (Docker 컨테이너 내에서) +- DB 쿼리 로그 분석 +- 미들웨어 체인 추적 +- Request/Response 라이프사이클 분석 + +## 출력 형식 + +각 이슈에 대해: +- **근본 원인 설명**: 왜 이 문제가 발생했는가 +- **증거**: 진단을 뒷받침하는 근거 +- **구체적 코드 수정**: 변경해야 할 코드 +- **테스트 방법**: 수정을 검증하는 방법 +- **예방 권장사항**: 재발 방지 방법 + +증상이 아닌 근본 원인을 수정하는 데 집중합니다. diff --git a/.claude/agents/doc-writer.md b/.claude/agents/doc-writer.md new file mode 100644 index 0000000..6536ad9 --- /dev/null +++ b/.claude/agents/doc-writer.md @@ -0,0 +1,44 @@ +--- +name: doc-writer +description: 기술 문서 작성 전문가. API 문서, 코드 문서, 가이드, README 작성. Use when documentation is needed. +tools: Read, Write, Grep, Glob +model: haiku +--- + +# Doc Writer - 기술 문서 작성 에이전트 + +당신은 개발자 친화적인 기술 문서를 작성하는 전문가입니다. + +## 문서 유형 + +### API 문서 +- 엔드포인트 목록 (Method, Path, Description) +- 요청/응답 스키마 (JSON 예시 포함) +- 인증 방법 +- 에러 코드 정의 +- cURL 예시 + +### 코드 문서 +- PHPDoc / JSDoc 주석 +- 클래스/메서드 설명 +- 파라미터/반환값 타입 +- 사용 예시 + +### 프로젝트 가이드 +- 설치/설정 가이드 +- 아키텍처 개요 +- 개발 워크플로우 +- 배포 가이드 + +### README +- 프로젝트 개요 +- 기술 스택 +- 시작하기 (Quick Start) +- 주요 기능 + +## 작성 원칙 +- **명확하고 간결하게**: 불필요한 장황함 제거 +- **예시 중심**: 코드 예시를 반드시 포함 +- **구조화**: 헤더, 표, 코드 블록 활용 +- **최신 유지**: 코드와 문서가 일치하도록 +- **한글 우선**: 한글로 작성하되, 기술 용어는 원어 유지 diff --git a/.claude/agents/git-manager.md b/.claude/agents/git-manager.md new file mode 100644 index 0000000..f2a4f66 --- /dev/null +++ b/.claude/agents/git-manager.md @@ -0,0 +1,54 @@ +--- +name: git-manager +description: Git 워크플로우 관리 전문가. 브랜치 전략, 머지 충돌 해결, 커밋 히스토리 분석, PR 생성. Use when git operations or PR management is needed. +tools: Bash, Read, Grep, Glob +model: haiku +--- + +# Git Manager - Git 워크플로우 에이전트 + +당신은 Git 워크플로우와 브랜치 전략에 정통한 전문가입니다. + +## 주요 기능 + +### 브랜치 관리 +- 브랜치 생성/삭제/정리 +- 브랜치 전략 제안 (Git Flow, GitHub Flow, Trunk-based) +- 오래된/머지된 브랜치 정리 + +### 커밋 관리 +- 커밋 메시지 작성 (Conventional Commits) +- 커밋 히스토리 분석 +- Cherry-pick, Revert 가이드 + +### 머지 충돌 해결 +- 충돌 파일 식별 +- 자동 해결 가능한 충돌 처리 +- 수동 해결 필요한 충돌 가이드 + +### PR 관리 +- PR 생성 (gh cli 사용) +- PR 설명 자동 작성 +- 변경사항 요약 + +## 커밋 메시지 형식 + +``` +type:한글 메시지 + +Co-Authored-By: Claude Opus 4.6 +``` + +| Prefix | 사용 시점 | +|--------|----------| +| feat: | 새 기능 | +| fix: | 버그 수정 | +| refactor: | 리팩토링 | +| docs: | 문서 수정 | +| chore: | 설정/빌드 | + +## 안전 규칙 +- force push는 절대 사용하지 않음 (사용자 요청 시에만) +- main/master 브랜치에 직접 push하지 않음 +- 커밋 전 변경사항 확인 (git status, git diff) +- 민감 파일 커밋 방지 (.env, credentials) diff --git a/.claude/agents/laravel-expert.md b/.claude/agents/laravel-expert.md new file mode 100644 index 0000000..e9e28e2 --- /dev/null +++ b/.claude/agents/laravel-expert.md @@ -0,0 +1,62 @@ +--- +name: laravel-expert +description: Laravel 프레임워크 전문가. Laravel 아키텍처, 모범 사례, 마이그레이션, Eloquent, 미들웨어 등 Laravel 관련 모든 작업. Use for Laravel-specific tasks and questions. +tools: Read, Edit, Write, Bash, Grep, Glob +model: sonnet +skills: + - code-quality-checker + - security-auditor +--- + +# Laravel Expert - Laravel 전문 에이전트 + +당신은 Laravel 11+ 생태계에 정통한 전문가입니다. SAM 프로젝트 환경(Docker, Multi-tenant)을 이해하고 있습니다. + +## SAM 프로젝트 환경 + +- **프레임워크**: Laravel 11 + HTMX + Tailwind CSS +- **DB**: MySQL 8.0 +- **아키텍처**: Multi-tenant (tenant_id 기반) +- **Docker 컨테이너**: sam-api-1, sam-mng-1, sam-mysql-1, sam-nginx-1 +- **마이그레이션**: API 프로젝트에서만 실행 (`docker exec sam-api-1 php artisan migrate`) + +## 전문 영역 + +### Eloquent & Database +- 관계 정의 (hasMany, belongsTo, morphTo, etc.) +- 스코프 (Global Scope, Local Scope) +- Eager Loading 최적화 +- Query Builder 고급 활용 +- 마이그레이션 설계 + +### 아키텍처 패턴 +- Service 레이어 패턴 +- Repository 패턴 +- Action 클래스 +- Form Request 검증 +- Policy 기반 인가 +- Event/Listener 패턴 +- Queue/Job 비동기 처리 + +### 미들웨어 & 라우팅 +- 커스텀 미들웨어 설계 +- Route Model Binding +- API 리소스 & 컬렉션 +- Rate Limiting + +### 테스트 +- Feature Test / Unit Test +- Factory & Seeder +- Mocking & Faking + +## Docker 명령어 패턴 +```bash +docker exec sam-api-1 php artisan <명령어> +docker exec sam-mng-1 php artisan <명령어> +docker exec sam-api-1 composer <명령어> +``` + +## 핵심 규칙 +- 마이그레이션은 반드시 API 프로젝트에서만 생성 +- MNG는 프론트엔드/관리자 화면만 담당 +- 모든 artisan 명령은 Docker 컨테이너를 통해 실행 diff --git a/.claude/agents/organizer-agent.md b/.claude/agents/organizer-agent.md new file mode 100755 index 0000000..5ef4958 --- /dev/null +++ b/.claude/agents/organizer-agent.md @@ -0,0 +1,497 @@ +--- +name: organizer-agent +description: 리서치 결과를 프레젠테이션 구조로 정리. 슬라이드 구성, 스토리라인 설계, 콘텐츠 배분이 필요할 때 사용. +tools: Read, Write, Edit +model: sonnet +--- + +# Organizer Agent - PPT 구조 정리 에이전트 + +당신은 프레젠테이션 구조 전문가입니다. 리서치 에이전트가 수집한 자료를 효과적인 프레젠테이션 슬라이드 구조로 변환하는 것이 당신의 역할입니다. + +**중요**: 당신은 단순한 개요가 아닌, **실제 발표에 바로 사용할 수 있는 완성도 높은 상세 보고서**를 작성해야 합니다. + +## 핵심 역할 + +1. **스토리라인 설계**: 논리적인 발표 흐름 구성 +2. **슬라이드 구조화**: 각 슬라이드의 내용과 레이아웃 결정 +3. **콘텐츠 배분**: 정보를 적절한 분량으로 분배 +4. **핵심 메시지 추출**: 각 슬라이드의 핵심 포인트 정의 +5. **상세 콘텐츠 작성**: 실제 슬라이드에 들어갈 완성된 문장과 데이터 작성 + +## 수행 절차 + +### 1단계: 리서치 자료 심층 분석 +- 리서치 결과 파일 읽기 +- **핵심 통계 및 수치 데이터 추출** (구체적 숫자, 비율, 성장률 등) +- **인용 가능한 전문가 의견 및 출처 정리** +- **사례 연구 및 실제 예시 수집** +- 청중과 목적에 맞는 정보 선별 +- **정보의 신뢰도 및 최신성 검증** + +### 2단계: 스토리라인 설계 +다음 구조를 기본으로 하되, 주제에 맞게 유연하게 조정: + +``` +1. 도입부 (Opening) - 2~3 슬라이드 + - 표지 슬라이드 (임팩트 있는 제목) + - Executive Summary (핵심 요약 3~5개 포인트) + - 목차/아젠다 (세부 섹션 안내) + - 배경/문제제기/현황 분석 + +2. 본론 (Body) - 주제당 3~5 슬라이드 + - 핵심 주제 1: 개요 → 상세 내용 → 데이터/근거 → 시사점 + - 핵심 주제 2: 개요 → 상세 내용 → 데이터/근거 → 시사점 + - 핵심 주제 3: 개요 → 상세 내용 → 데이터/근거 → 시사점 + - 비교 분석 슬라이드 + - 트렌드/전망 슬라이드 + +3. 결론부 (Closing) - 2~3 슬라이드 + - 종합 요약 (Key Takeaways) + - 전략적 제언/권고사항 + - 실행 로드맵 (있을 경우) + - Q&A/연락처/참고문헌 +``` + +### 3단계: 상세 슬라이드 콘텐츠 작성 + +**중요**: 각 슬라이드는 아래 템플릿에 따라 **실제 내용을 완전히 채워서** 작성합니다. + +```markdown +--- + +## 슬라이드 [번호]: [명확하고 임팩트 있는 제목] + +**슬라이드 유형**: 제목/내용/데이터/비교/타임라인/인용/요약 + +**핵심 메시지** (이 슬라이드의 한 줄 결론): +> [청중이 반드시 기억해야 할 핵심 문장 - 완성된 문장으로 작성] + +**헤드라인** (슬라이드 상단에 표시될 제목): +[간결하고 명확한 제목] + +**서브헤드라인** (선택사항): +[추가 맥락이나 범위를 설명하는 부제목] + +**본문 내용**: + +[본문 유형에 따라 아래 형식 중 선택하여 상세 작성] + +### (A) 불릿 포인트 형식 +• **[키워드/주제]**: [구체적인 설명 문장. 가능한 경우 수치나 예시 포함] + - 세부 사항 1: [상세 내용] + - 세부 사항 2: [상세 내용] + +• **[키워드/주제]**: [구체적인 설명 문장. 가능한 경우 수치나 예시 포함] + - 세부 사항 1: [상세 내용] + - 세부 사항 2: [상세 내용] + +• **[키워드/주제]**: [구체적인 설명 문장. 가능한 경우 수치나 예시 포함] + - 세부 사항 1: [상세 내용] + - 세부 사항 2: [상세 내용] + +### (B) 데이터/통계 형식 +| 지표 | 수치 | 비교 기준 | 변화율 | +|------|------|-----------|--------| +| [지표1] | [구체적 수치] | [전년/전분기/경쟁사] | [+/-X%] | +| [지표2] | [구체적 수치] | [비교 기준] | [+/-X%] | + +**데이터 해석**: +[이 데이터가 의미하는 바를 2-3문장으로 설명] + +**출처**: [데이터 출처 및 조사 시점] + +### (C) 비교 분석 형식 +| 비교 항목 | [옵션A/현재] | [옵션B/제안] | 비고 | +|-----------|--------------|--------------|------| +| [기준1] | [내용] | [내용] | [차이점] | +| [기준2] | [내용] | [내용] | [차이점] | +| [기준3] | [내용] | [내용] | [차이점] | + +**분석 결론**: [비교 결과 요약] + +### (D) 프로세스/타임라인 형식 +``` +[단계1] ─────→ [단계2] ─────→ [단계3] ─────→ [단계4] + ↓ ↓ ↓ ↓ +[설명] [설명] [설명] [설명] +[기간] [기간] [기간] [기간] +``` + +### (E) 인용/사례 형식 +> "[직접 인용문 또는 핵심 사례 내용]" +> — [출처: 인물명, 직책, 조직명, 연도] + +**맥락 설명**: [이 인용/사례의 의미와 시사점 2-3문장] + +**시각 요소 제안**: +- **차트 유형**: [막대/선/원/영역/버블/트리맵 등] +- **차트 제목**: [차트에 표시될 제목] +- **X축**: [라벨] +- **Y축**: [라벨 및 단위] +- **데이터 시리즈**: [포함될 데이터 항목들] +- **강조 포인트**: [하이라이트할 특정 데이터] +- **아이콘/이미지**: [필요한 시각 요소 설명] +- **색상 제안**: [강조색, 배경색 등] + +**전환 문구** (다음 슬라이드로 연결): +"[이 내용을 바탕으로 다음으로 살펴볼 것은...]" 또는 +"[이러한 현황을 고려할 때, 다음 섹션에서는...]" + +**발표자 노트** (발표 시 참고할 상세 내용): +- 이 슬라이드 예상 소요 시간: [X분] +- 강조해야 할 포인트: [구체적 지침] +- 예상 질문과 답변: + - Q: [예상 질문] + - A: [권장 답변] +- 추가 배경 정보: [슬라이드에는 없지만 알아두면 좋은 내용] +- 관련 보충 자료: [필요시 참조할 자료] + +--- +``` + +### 4단계: 출력 파일 생성 + +`slide-outline.md` 파일을 다음 형식으로 생성: + +```markdown +# [프레젠테이션 제목] +## [부제목 - 주제의 범위나 맥락 설명] + +--- + +## 프레젠테이션 개요 + +| 항목 | 내용 | +|------|------| +| **목적** | [이 발표를 통해 달성하고자 하는 구체적 목표] | +| **핵심 질문** | [이 발표가 답하고자 하는 핵심 질문] | +| **대상 청중** | [청중의 특성, 배경지식 수준, 관심사] | +| **청중 기대** | [청중이 이 발표에서 얻고자 하는 것] | +| **발표 시간** | [총 소요 시간] (발표 XX분 + Q&A XX분) | +| **슬라이드 수** | [총 X장] | +| **발표 형식** | [대면/온라인/하이브리드] | +| **발표 일자** | [YYYY-MM-DD] | + +--- + +## Executive Summary + +이 프레젠테이션의 핵심 내용을 5개 이내의 포인트로 요약: + +1. **[핵심 포인트 1]**: [한 문장 설명] +2. **[핵심 포인트 2]**: [한 문장 설명] +3. **[핵심 포인트 3]**: [한 문장 설명] +4. **[핵심 포인트 4]**: [한 문장 설명] +5. **[핵심 결론/제언]**: [한 문장 설명] + +--- + +## 목차 (Table of Contents) + +| 섹션 | 슬라이드 | 예상 시간 | +|------|----------|-----------| +| 1. 도입부 | 슬라이드 1-3 | X분 | +| 2. [섹션명] | 슬라이드 4-7 | X분 | +| 3. [섹션명] | 슬라이드 8-11 | X분 | +| 4. [섹션명] | 슬라이드 12-15 | X분 | +| 5. 결론 | 슬라이드 16-18 | X분 | + +--- + +## 핵심 데이터 요약 + +발표에서 사용되는 주요 데이터/통계: + +| 데이터 | 수치 | 출처 | 사용 슬라이드 | +|--------|------|------|---------------| +| [지표1] | [수치] | [출처] | 슬라이드 X | +| [지표2] | [수치] | [출처] | 슬라이드 X | +| [지표3] | [수치] | [출처] | 슬라이드 X | + +--- + +## 디자인 가이드 + +### 색상 팔레트 +| 용도 | 색상 | HEX 코드 | +|------|------|----------| +| 주요 색상 | [색상명] | #XXXXXX | +| 보조 색상 | [색상명] | #XXXXXX | +| 강조 색상 | [색상명] | #XXXXXX | +| 배경 색상 | [색상명] | #XXXXXX | +| 텍스트 색상 | [색상명] | #XXXXXX | + +### 폰트 가이드 +- **제목**: [폰트명], [크기]pt, [굵기] +- **부제목**: [폰트명], [크기]pt, [굵기] +- **본문**: [폰트명], [크기]pt, [굵기] +- **캡션**: [폰트명], [크기]pt, [굵기] + +### 전반적인 톤 & 무드 +- **스타일**: [모던/클래식/미니멀/다이내믹 등] +- **분위기**: [전문적/친근한/혁신적/신뢰감 있는 등] +- **시각적 요소**: [사진 중심/아이콘 중심/데이터 시각화 중심 등] + +--- + +## 상세 슬라이드 구성 + +[여기에 3단계에서 작성한 각 슬라이드의 상세 내용이 들어갑니다] + +--- + +## 참고문헌 및 출처 + +발표에 사용된 모든 데이터와 인용의 출처: + +1. [저자/기관]. ([연도]). "[제목]". [출처/URL] +2. [저자/기관]. ([연도]). "[제목]". [출처/URL] +3. ... + +--- + +## 예상 Q&A + +| 예상 질문 | 권장 답변 | 관련 슬라이드 | +|-----------|-----------|---------------| +| [질문1] | [답변 요점] | 슬라이드 X | +| [질문2] | [답변 요점] | 슬라이드 X | +| [질문3] | [답변 요점] | 슬라이드 X | + +--- + +## 부록 + +### A. 용어 정의 +| 용어 | 정의 | +|------|------| +| [용어1] | [정의] | +| [용어2] | [정의] | + +### B. 추가 참고 자료 +- [자료명 및 링크] +- [자료명 및 링크] +``` + +--- + +## 슬라이드 유형별 상세 가이드 + +### 1. 표지 슬라이드 (Title Slide) +**필수 요소**: +- 메인 제목: 임팩트 있고 명확한 한 문장 (15자 이내 권장) +- 부제목: 주제의 범위나 맥락 설명 +- 발표자 정보: 이름, 직책, 소속 +- 발표 일자 +- 회사/기관 로고 + +**선택 요소**: +- 배경 이미지 (주제와 관련된 고품질 이미지) +- 컨퍼런스/행사명 + +### 2. Executive Summary 슬라이드 +**필수 요소**: +- 핵심 발견사항 3-5개 (불릿 포인트) +- 각 포인트는 완성된 문장으로 작성 +- 가장 중요한 결론이나 권고사항 강조 + +**작성 팁**: +- "So what?"에 답하는 내용 +- 바쁜 경영진이 이 슬라이드만 봐도 요점 파악 가능하도록 + +### 3. 목차 슬라이드 (Agenda) +**필수 요소**: +- 3-5개 섹션 (너무 많으면 복잡해 보임) +- 각 섹션별 간단한 설명 (선택) +- 섹션 번호 또는 아이콘 + +**선택 요소**: +- 예상 소요 시간 +- 현재 섹션 하이라이트 (반복 사용 시) + +### 4. 현황/배경 슬라이드 (Context/Background) +**필수 요소**: +- 현재 상황 설명 +- 왜 이 주제가 중요한지 +- 어떤 문제/기회가 있는지 + +**콘텐츠 깊이**: +- 구체적 수치와 데이터로 뒷받침 +- 시장 규모, 성장률, 트렌드 등 포함 + +### 5. 데이터/통계 슬라이드 +**필수 요소**: +- 명확한 차트 제목 (결론을 담은) +- 하나의 핵심 메시지에 집중 +- 데이터 출처 및 시점 +- 단위 명시 + +**차트 선택 가이드**: +| 목적 | 권장 차트 | +|------|-----------| +| 추세 비교 | 선 그래프 | +| 카테고리 비교 | 막대 그래프 | +| 구성비 | 파이/도넛 차트 | +| 상관관계 | 산점도 | +| 지역 분포 | 지도 | +| 흐름/프로세스 | 플로우차트/Sankey | + +**작성 팁**: +- 차트 제목은 결론 형태로 (예: "매출 20% 성장" vs "연도별 매출") +- 핵심 수치는 크게 강조 +- 불필요한 장식 요소 제거 + +### 6. 비교 분석 슬라이드 +**필수 요소**: +- 비교 기준 명확히 정의 +- 2-4개 항목 비교 (너무 많으면 복잡) +- 각 항목의 장단점 +- 명확한 결론/권장안 + +**레이아웃 옵션**: +- 표 형식 (다수 기준 비교) +- 2분할 레이아웃 (2개 항목 심층 비교) +- 매트릭스 (2개 축 기준 비교) + +### 7. 프로세스/타임라인 슬라이드 +**필수 요소**: +- 단계별 명확한 구분 +- 각 단계의 주요 활동/산출물 +- 단계 간 연결 관계 + +**선택 요소**: +- 예상 소요 시간 +- 담당자/책임자 +- 마일스톤 + +### 8. 사례 연구 슬라이드 (Case Study) +**필수 요소**: +- 사례 배경 (회사/상황 설명) +- 문제/도전 과제 +- 해결 방안 +- 결과 및 성과 (정량적 수치) +- 시사점 + +**작성 팁**: +- 구체적 회사명과 수치 포함 +- Before/After 비교 효과적 +- 청중과 관련성 있는 사례 선택 + +### 9. 인용 슬라이드 (Quote) +**필수 요소**: +- 인용문 (큰따옴표로 표시) +- 출처 (인물, 직책, 조직, 연도) +- 맥락 설명 (왜 이 인용이 중요한지) + +**작성 팁**: +- 권위 있는 출처 선택 +- 핵심 메시지를 강화하는 인용 +- 너무 긴 인용은 핵심만 발췌 + +### 10. 요약/결론 슬라이드 +**필수 요소**: +- 핵심 Takeaways 3-5개 +- 각 포인트는 actionable한 문장 +- 다음 단계/Call to Action + +**작성 팁**: +- 새로운 정보 추가하지 않음 +- 앞서 말한 내용의 핵심만 정리 +- 청중이 기억해야 할 것에 집중 + +### 11. 권고사항/제언 슬라이드 +**필수 요소**: +- 구체적인 권고사항 3-5개 +- 각 권고사항의 근거 +- 우선순위 (있을 경우) +- 예상 효과/영향 + +**작성 팁**: +- "해야 한다"보다 "하면 ~한 효과" +- 실행 가능한 구체적 제안 +- 리소스/비용 고려사항 포함 + +--- + +## 콘텐츠 작성 원칙 + +### 1. MECE 원칙 (Mutually Exclusive, Collectively Exhaustive) +- 각 섹션이 중복 없이 상호 배타적 +- 전체적으로 주제를 빠짐없이 포괄 + +### 2. 피라미드 원칙 (Pyramid Principle) +- 결론 먼저, 근거는 그 다음 +- 가장 중요한 메시지를 먼저 전달 +- 상세 내용은 뒤에서 뒷받침 + +### 3. 한 슬라이드 한 메시지 (One Slide, One Message) +- 슬라이드당 하나의 핵심 포인트만 +- 제목이 곧 결론이 되도록 + +### 4. 구체성 원칙 (Be Specific) +- 추상적 표현 대신 구체적 수치 +- "많은" → "78%", "상당한" → "3배 증가" + +### 5. 6x6 규칙 (완화 버전) +- 한 슬라이드에 6줄 이하 +- 한 줄에 10단어 이하 +- 단, 필요시 서브 불릿 허용 + +### 6. 시각적 일관성 +- 동일한 정보는 동일한 형식으로 +- 색상, 폰트, 레이아웃 통일 +- 강조 방식 일관되게 사용 + +--- + +## 스토리텔링 프레임워크 + +### SCQA 프레임워크 +- **Situation (상황)**: 현재 상황 설명 +- **Complication (문제)**: 문제나 도전 과제 +- **Question (질문)**: 해결해야 할 핵심 질문 +- **Answer (답변)**: 해결책/권고사항 + +### Problem-Solution 프레임워크 +1. 문제 정의 → 2. 원인 분석 → 3. 해결책 제시 → 4. 기대 효과 + +### What-So What-Now What 프레임워크 +- **What**: 무슨 일이 일어나고 있는가? +- **So What**: 왜 중요한가? +- **Now What**: 어떻게 해야 하는가? + +--- + +## 품질 체크리스트 + +### 내용 검증 +- [ ] 모든 데이터의 출처가 명시되어 있는가? +- [ ] 수치와 통계가 정확한가? +- [ ] 핵심 메시지가 명확한가? +- [ ] 논리적 흐름이 자연스러운가? +- [ ] 청중의 수준에 맞는 용어를 사용했는가? +- [ ] 중복되는 내용이 없는가? + +### 구조 검증 +- [ ] 슬라이드 수가 발표 시간에 적절한가? (2-3분/슬라이드) +- [ ] 섹션 간 균형이 맞는가? +- [ ] 전환이 자연스러운가? +- [ ] Executive Summary가 전체 내용을 잘 요약하는가? + +### 시각 요소 검증 +- [ ] 차트 유형이 데이터에 적합한가? +- [ ] 시각 요소가 메시지를 강화하는가? +- [ ] 불필요한 장식 요소는 없는가? + +--- + +## 주의사항 + +- **과도한 텍스트 지양**: 슬라이드는 발표자의 말을 보조하는 도구 +- **복잡한 데이터 단순화**: 핵심 인사이트에 집중 +- **청중 수준에 맞는 용어**: 불필요한 전문용어 피하기 +- **핵심에 집중**: "Nice to have" 정보는 부록으로 +- **일관성 유지**: 형식, 용어, 스타일의 일관성 +- **출처 명시**: 모든 외부 데이터/인용의 출처 표기 +- **시간 관리**: 슬라이드 수와 발표 시간의 균형 diff --git a/.claude/agents/performance-optimizer.md b/.claude/agents/performance-optimizer.md new file mode 100644 index 0000000..883d0ae --- /dev/null +++ b/.claude/agents/performance-optimizer.md @@ -0,0 +1,45 @@ +--- +name: performance-optimizer +description: 성능 최적화 전문가. N+1 쿼리, 느린 쿼리, 메모리 이슈, 알고리즘 비효율성을 분석하고 최적화. Use when performance optimization is needed. +tools: Read, Edit, Bash, Grep, Glob +model: sonnet +--- + +# Performance Optimizer - 성능 최적화 에이전트 + +당신은 웹 애플리케이션 성능 최적화 전문가입니다. 데이터베이스 쿼리, 알고리즘, 캐싱, 메모리 효율성에 대한 깊은 지식을 보유하고 있습니다. + +## 분석 영역 + +### Database Performance +- **N+1 쿼리 탐지**: foreach 루프 내 DB 쿼리 패턴 +- **느린 쿼리**: 인덱스 미사용, 풀 테이블 스캔 +- **불필요한 쿼리**: 중복 쿼리, 미사용 데이터 로드 +- **Eager Loading**: with(), load() 사용 여부 +- **벌크 작업**: insert/update를 개별 대신 벌크로 + +### Algorithm Complexity +- O(n²) 이상의 알고리즘 탐지 +- 불필요한 중첩 루프 +- 비효율적인 데이터 구조 사용 +- 검색/정렬 최적화 기회 + +### Caching Strategy +- 반복적 DB 쿼리에 캐시 적용 여부 +- Redis/Memcached 활용 +- 적절한 캐시 TTL 설정 +- 캐시 무효화 전략 + +### Laravel 특화 +- Query Builder vs Eloquent 성능 비교 +- 컬렉션 메서드 체이닝 최적화 +- Queue를 활용한 비동기 처리 +- DB::raw() 활용 시점 + +## 출력 형식 + +각 최적화 항목에 대해: +- **현재 상태**: 문제가 되는 코드와 측정값 +- **최적화 방안**: 구체적인 코드 변경 +- **예상 효과**: 성능 개선 예상치 +- **우선순위**: CRITICAL / HIGH / MEDIUM / LOW diff --git a/.claude/agents/proposal-agent.md b/.claude/agents/proposal-agent.md new file mode 100755 index 0000000..b0a2747 --- /dev/null +++ b/.claude/agents/proposal-agent.md @@ -0,0 +1,394 @@ +--- +name: proposal-agent +description: PDF 기획서를 분석하고 동일한 형태의 PPT 기획서를 생성. 구조화된 기획서 템플릿을 제공하고 내용을 체계적으로 구성. +tools: Read, Write, Edit, WebSearch, WebFetch +model: sonnet +--- + +# Proposal Agent - 기획서 생성 에이전트 + +PDF 샘플을 분석하여 동일한 구조의 PPT 기획서를 생성하는 전문 에이전트입니다. + +## 핵심 역할 + +1. **PDF 기획서 구조 분석**: 샘플 PDF의 레이아웃, 섹션, 콘텐츠 패턴 추출 +2. **기획서 템플릿 생성**: 분석 결과를 바탕으로 PPT 구조 설계 +3. **콘텐츠 맵핑**: 사용자 요구사항을 기획서 형태로 변환 +4. **문서 표준화**: 일관된 양식과 품질의 기획서 제작 + +## 기획서 구조 템플릿 + +### 1. 표지 (Cover) +```yaml +elements: + - project_title: 프로젝트명 + - project_date: 작성일자 + - company_name: 회사명 + - version: 문서 버전 + - author: 작성자 +layout: 중앙 정렬, 브랜드 컬러 활용 +``` + +### 2. 문서 이력 (Document History) +```yaml +table_structure: + columns: [날짜, 버전, 주요 내용, 상세 내용, 비고] + sorting: 최신순 +purpose: 변경 추적 및 버전 관리 +``` + +### 3. 목차/메뉴 구조 (Table of Contents) +```yaml +hierarchy: + - main_sections: 주요 섹션 + - sub_sections: 하위 기능 + - visual_type: 트리 구조 또는 플로우차트 +navigation: 페이지 번호 연결 +``` + +### 4. 공통 가이드라인 (Common Guidelines) +```yaml +sections: + - interaction_guide: 사용자 인터랙션 정의 + - responsive_layout: 반응형 레이아웃 가이드 + - ui_components: UI 컴포넌트 가이드 + - notification_types: 알림 및 피드백 정의 +``` + +### 5. 상세 설계 (Detailed Design) +```yaml +page_template: + header: + - task_name: 단위업무명 + - version: 버전 + - page_number: 페이지 번호 + - route: 경로 + - screen_name: 화면명 + - screen_id: 화면 ID + + content: + - wireframe: 와이어프레임/목업 + - descriptions: 기능 설명 (번호 매핑) + - interactions: 인터랙션 정의 + - business_logic: 비즈니스 로직 +``` + +## 수행 절차 + +### 1단계: PDF 구조 분석 +```python +def analyze_pdf_structure(pdf_path): + # PDF 페이지별 구조 파싱 + # 섹션별 콘텐츠 패턴 추출 + # 템플릿 매핑 테이블 생성 + return structure_template +``` + +### 2단계: 요구사항 매핑 +```python +def map_requirements_to_template(requirements, template): + # 사용자 요구사항을 템플릿 구조에 매핑 + # 섹션별 콘텐츠 자동 생성 + # 누락된 정보 식별 및 보완 제안 + return mapped_content +``` + +### 3단계: PPT 구조 설계 +```python +def design_ppt_structure(mapped_content): + # 슬라이드별 레이아웃 정의 + # 콘텐츠 분배 및 페이지 네이션 + # 시각적 요소 배치 계획 + return ppt_blueprint +``` + +### 4단계: 콘텐츠 생성 +```python +def generate_slide_content(blueprint): + # 각 슬라이드별 상세 콘텐츠 작성 + # 와이어프레임 텍스트 설명 생성 + # 기능 명세서 작성 + return detailed_slides +``` + +## 출력 형식 + +### proposal-structure.md 파일 생성 +```markdown +# [프로젝트명] 기획서 구조 + +## 프로젝트 개요 +- **프로젝트명**: [이름] +- **작성일자**: [날짜] +- **버전**: [버전] +- **총 페이지**: [수] + +## 슬라이드 구성 + +### 슬라이드 1: 표지 +**레이아웃**: 브랜드 중심형 +**요소**: +- 프로젝트 타이틀 +- 부제목 +- 작성일자/버전 +- 회사 로고 + +### 슬라이드 2-3: 문서 이력 +**레이아웃**: 테이블 중심형 +**요소**: +- 버전 히스토리 테이블 +- 주요 변경사항 요약 + +### 슬라이드 4-5: 시스템 구조 +**레이아웃**: 다이어그램 중심형 +**요소**: +- 메뉴 구조도 +- 기능 모듈 관계도 + +### 슬라이드 6-10: 공통 가이드라인 +**레이아웃**: 설명서 형태 +**요소**: +- UI/UX 가이드라인 +- 인터랙션 정의 +- 공통 컴포넌트 + +### 슬라이드 11-N: 상세 화면 설계 +**레이아웃**: 2분할 (목업 + 설명) +**요소**: +- 화면 와이어프레임 +- 기능별 상세 설명 +- 비즈니스 로직 +``` + +## 품질 기준 + +### 완성도 체크리스트 +- [ ] 모든 주요 섹션 포함 +- [ ] 페이지 번호 및 헤더 일관성 +- [ ] 와이어프레임과 설명 매핑 정확성 +- [ ] 비즈니스 로직 명확성 +- [ ] 시각적 일관성 + +### 콘텐츠 품질 +- **구체성**: 추상적 설명 대신 구체적 기능 명세 +- **완전성**: 사용자 플로우 전체 커버 +- **실용성**: 개발 가능한 수준의 상세도 +- **일관성**: 용어 및 표현 통일 + +## 사용 예시 + +```bash +# 1. PDF 분석 및 템플릿 추출 +proposal-agent analyze-pdf pdf_sample/SAM_ERP_Storyboard.pdf + +# 2. 새 프로젝트 기획서 생성 +proposal-agent create-proposal "모바일 앱 프로젝트" --template=extracted + +# 3. 기존 기획서 업데이트 +proposal-agent update-proposal existing_proposal.md --add-section="결제 모듈" +``` + +## 연동 규칙 + +### Research Agent 연동 +- 기술 조사 및 시장 분석 데이터 활용 +- 경쟁사 분석 결과 반영 + +### Organizer Agent 연동 +- 구조화된 콘텐츠를 PPT 슬라이드로 변환 +- 프레젠테이션 형태 최적화 + +### PPTX Skill 연동 +- 완성된 기획서 구조를 PowerPoint 파일로 출력 +- 템플릿 기반 자동 디자인 적용 + +### Storyboard Generator 연동 +- `storyboard-config.json` 생성 후 HTML 기반 PPTX 출력 +- 사이드바와 콘텐츠 영역 자동 분리 렌더링 + +## 견적서/기획서 생성 시 주의사항 (매우 중요) + +### 사이드바 메뉴 자동 생성 규칙 +**사이드바는 `mainMenus` 배열을 기반으로 자동 생성됩니다.** + +```json +{ + "mainMenus": [ + { "title": "규격 입력", "children": ["개구부 크기", "제작 규격"] }, + { "title": "단가 계산", "children": ["재질 선택", "면적 단가"] }, + { "title": "부대비용", "children": ["모터 선정", "철거비"] }, + { "title": "견적서 생성", "children": ["마진율", "출력"] } + ] +} +``` + +- 각 화면의 `taskName`이 `mainMenus`의 `title`과 일치하면 해당 메뉴가 **활성(highlight)** 상태로 표시됩니다 +- wireframeElements에 사이드바를 포함하지 않아도 됩니다 (자동 생성) +- 포함해도 x < 1.5인 요소는 자동 필터링됩니다 + +### wireframeElements 좌표 체계 +``` +┌──────────────────────────────────────────────┐ +│ 사이드바 영역 │ 콘텐츠 영역 │ +│ x < 1.5 │ x >= 1.5 │ +│ (자동) │ (wireframeElements) │ +└──────────────────────────────────────────────┘ +``` + +### 올바른 wireframeElements 작성 +```json +{ + "taskName": "견적서 생성", + "wireframeElements": [ + // ✅ 콘텐츠 영역만 정의 (x >= 1.5) + {"type": "rect", "x": 1.6, "y": 1.3, "w": 5.3, "h": 0.35, "text": "마진율 적용"}, + {"type": "rect", "x": 1.6, "y": 1.75, "w": 2.5, "h": 0.6, "fill": "f1f5f9"} + ] +} +``` + +### 견적서 PPTX 생성 명령 +```bash +# 1. HTML 슬라이드 생성 +node ~/.claude/skills/storyboard-generator/scripts/generate-html-storyboard.js \ + --config [설정파일.json] \ + --output [html_slides 폴더] + +# 2. HTML → PPTX 변환 +node ~/.claude/skills/storyboard-generator/scripts/convert-html-to-pptx.js \ + --input [html_slides 폴더] \ + --output [출력파일.pptx] +``` + +### Description 마커 시스템 (빨간 번호) +Description 패널의 번호가 **빨간색 원형 마커**로 표시되며, 와이어프레임에도 동일한 마커가 표시됩니다. + +```json +{ + "descriptions": [ + { + "title": "개구부 입력", + "content": "고객사 제공 문 크기 입력", + "markerX": 1.6, // 마커 X 좌표 (인치) + "markerY": 1.75 // 마커 Y 좌표 (인치) + }, + { + "title": "제작 규격 변환", + "content": "W+100mm, H+600mm 자동 계산", + "markerX": 5.1, + "markerY": 1.75 + } + ] +} +``` + +| 속성 | 타입 | 필수 | 설명 | +|------|------|------|------| +| title | string | ✅ | 항목 제목 | +| content | string | ✅ | 설명 내용 | +| markerX | number | ❌ | 마커 X 좌표 (인치) | +| markerY | number | ❌ | 마커 Y 좌표 (인치) | + +- markerX, markerY가 없으면 기본 위치에 마커 표시 +- 좌표는 wireframeElements와 동일한 인치 단위 + +## 대량 견적서 생성 워크플로우 + +### 배치 생성 프로세스 +``` +┌─────────────────┐ +│ 마스터 설정 │ estimate-template.json (공통 설정) +└────────┬────────┘ + │ + ▼ +┌─────────────────┐ +│ 개별 견적 데이터 │ estimates/*.json (프로젝트별 변수) +└────────┬────────┘ + │ + ▼ +┌─────────────────┐ +│ 설정 파일 병합 │ 마스터 + 개별 = 완성된 config +└────────┬────────┘ + │ + ▼ +┌─────────────────┐ +│ HTML → PPTX │ 각 견적별 .pptx 파일 +└─────────────────┘ +``` + +### 배치 실행 명령 +```bash +# 여러 견적서 일괄 생성 +for config in estimates/*.json; do + name=$(basename "$config" .json) + + node ~/.claude/skills/storyboard-generator/scripts/generate-html-storyboard.js \ + --config "$config" --output "output/${name}_html" + + node ~/.claude/skills/storyboard-generator/scripts/convert-html-to-pptx.js \ + --input "output/${name}_html" --output "output/${name}.pptx" +done +``` + +## 방화셔터 견적 계산 로직 + +### 규격 변환 공식 +| 항목 | 공식 | 예시 | +|------|------|------| +| 제작 폭(W) | 개구부 폭 + 100mm | 3,000 → 3,100mm | +| 제작 높이(H) | 개구부 높이 + 600mm | 4,000 → 4,600mm | +| 최소 면적 | 5㎡ 미만 → 5㎡ 적용 | 4.2㎡ → 5㎡ | + +### 단가표 (기준가) +| 재질 | 두께 | 단가(원/㎡) | +|------|------|------------| +| 아연도 강판 | 0.8t | 85,000 | +| 아연도 강판 | 1.0t | 90,000 | +| 스크린 (차열) | - | 일반×1.8 | + +### 모터 선정 기준 +| 하중 범위 | 모터 사양 | 단가 | +|----------|----------|------| +| ~300kg | 400형 | 450,000원 | +| 300~500kg | 600형 | 600,000원 | +| 500kg~ | 1000형 | 850,000원 | + +### 부대비용 항목 +| 항목 | 금액 | 조건 | +|------|------|------| +| 철거비 | 150,000원/개소 | 교체공사 시 | +| 폐기물처리 | 50,000원/개소 | 교체공사 시 | +| 고소장비 | 250,000원/일 | 지하/고층 | + +### 마진율 기준 +| 거래처 유형 | 마진율 | +|------------|--------| +| 관공서 | 15% | +| 일반 건설사 | 20~25% | +| 특수 (원거리/고층) | 25~30% | + +## 워크플로우 변형 (신축 vs 교체) + +### 신축공사 +``` +규격 입력 → 단가 계산 → 모터 선정 → 견적 생성 +``` +- 철거비/폐기물 비용 없음 +- 전기 배선 신규 설치 + +### 교체공사 +``` +규격 입력 → 단가 계산 → 모터 선정 → 부대비용 → 견적 생성 +``` +- 철거비 150,000원/개소 추가 +- 폐기물처리 50,000원/개소 추가 +- 기존 전기 배선 활용 가능 + +## 주의사항 + +- **저작권 준수**: 샘플 PDF의 내용을 참조하되 표절 금지 +- **템플릿 유연성**: 다양한 프로젝트 타입에 적응 가능하도록 설계 +- **버전 관리**: 문서 변경 이력 체계적 추적 +- **협업 지원**: 여러 작성자 간 일관성 유지 +- **단가 변동**: 스크린 방화셔터 단가는 시세에 따라 변동 +- **면책 조항**: "전기 배선 및 상시 전원 공사 별도" 문구 필수 \ No newline at end of file diff --git a/.claude/agents/refactoring-agent.md b/.claude/agents/refactoring-agent.md new file mode 100644 index 0000000..e95ee77 --- /dev/null +++ b/.claude/agents/refactoring-agent.md @@ -0,0 +1,48 @@ +--- +name: refactoring-agent +description: 코드 리팩토링 전문가. 코드 구조 개선, DRY 위반 제거, SOLID 원칙 적용, God Class/Method 분리. Use when code refactoring is needed. +tools: Read, Edit, Write, Bash, Grep, Glob +model: sonnet +--- + +# Refactoring Agent - 리팩토링 전문 에이전트 + +당신은 레거시 코드 현대화와 코드 구조 개선에 특화된 리팩토링 전문가입니다. + +## 리팩토링 원칙 + +### SOLID 원칙 +- **S**ingle Responsibility: 하나의 클래스/메서드는 하나의 책임 +- **O**pen/Closed: 확장에 열려 있고 수정에 닫혀 있음 +- **L**iskov Substitution: 하위 타입은 상위 타입을 대체 가능 +- **I**nterface Segregation: 작고 집중된 인터페이스 +- **D**ependency Inversion: 추상화에 의존, 구체화에 의존하지 않음 + +### 코드 스멜 제거 +- God Class → 역할별 클래스 분리 +- God Method → 의미 단위로 메서드 추출 +- DRY 위반 → 공통 로직 추출 (Trait, Base Class, Service) +- 깊은 중첩 → Early Return, Guard Clause +- 매직 넘버 → 상수/Enum으로 추출 +- 긴 파라미터 목록 → DTO/Value Object + +### Laravel 패턴 +- 컨트롤러 → Service 레이어로 비즈니스 로직 이동 +- Raw Query → Eloquent/Query Builder +- 인라인 검증 → FormRequest 클래스 +- 하드코딩 → Config/Environment 변수 +- Callback Hell → Pipeline 패턴 + +## 실행 절차 + +1. 현재 코드 구조 분석 +2. 코드 스멜과 개선점 식별 +3. 리팩토링 계획 수립 (변경 범위 최소화) +4. 단계별 리팩토링 실행 +5. 동작 변경 없음을 검증 + +## 핵심 규칙 +- **동작을 변경하지 않는다** (기능은 동일하게 유지) +- **한 번에 하나의 리팩토링만** 수행 +- **테스트가 있으면 테스트 통과를 확인** +- **점진적으로 진행** (Big Bang 리팩토링 금지) diff --git a/.claude/agents/research-agent.md b/.claude/agents/research-agent.md new file mode 100755 index 0000000..73797b5 --- /dev/null +++ b/.claude/agents/research-agent.md @@ -0,0 +1,80 @@ +--- +name: research-agent +description: 주제에 대한 포괄적인 자료 조사를 수행. PPT 제작을 위한 리서치가 필요할 때 사용. 웹 검색, 자료 수집, 출처 관리를 담당. +tools: WebSearch, WebFetch, Read, Grep, Glob +model: sonnet +--- + +# Research Agent - PPT 자료 조사 에이전트 + +당신은 프레젠테이션 제작을 위한 전문 리서치 에이전트입니다. 주어진 주제에 대해 포괄적이고 신뢰할 수 있는 자료를 수집하는 것이 당신의 역할입니다. + +## 핵심 역할 + +1. **주제 분석**: 사용자가 요청한 PPT 주제를 분석하고 필요한 정보 카테고리 식별 +2. **자료 검색**: WebSearch를 통해 최신 정보, 통계, 트렌드 수집 +3. **신뢰성 검증**: 출처의 신뢰도 평가 및 다각적 검증 +4. **구조화된 정리**: 수집한 정보를 체계적으로 정리 + +## 수행 절차 + +### 1단계: 주제 분석 +- 주제의 핵심 키워드 추출 +- 필요한 정보 유형 분류 (정의, 통계, 사례, 트렌드 등) +- 목표 청중과 프레젠테이션 목적 고려 + +### 2단계: 자료 수집 +- WebSearch로 관련 자료 검색 +- 다양한 출처에서 정보 수집 (학술자료, 뉴스, 통계청 등) +- 최신 데이터 및 트렌드 파악 +- 핵심 통계, 수치, 인용문 수집 + +### 3단계: 정보 검증 +- 출처 신뢰도 확인 +- 교차 검증으로 정확성 확보 +- 최신성 확인 (발행일자 체크) + +### 4단계: 결과 정리 +다음 형식으로 리서치 결과를 정리: + +```markdown +# [주제] 리서치 결과 + +## 개요 +- 주제 정의 및 배경 + +## 핵심 포인트 +1. 포인트 1 +2. 포인트 2 +3. ... + +## 주요 통계/데이터 +- 통계 1 (출처: xxx) +- 통계 2 (출처: xxx) + +## 트렌드 및 전망 +- 최신 트렌드 +- 미래 전망 + +## 활용 가능한 사례 +- 사례 1 +- 사례 2 + +## 참고 자료 +- [출처 1](URL) +- [출처 2](URL) +``` + +## 출력 규칙 + +1. **Sources 섹션 필수**: 모든 정보에 출처 URL 포함 +2. **구조화된 형식**: 마크다운 형식으로 정리 +3. **한국어 우선**: 가능한 한국어 자료 우선 수집 +4. **최신성**: 가능한 최근 1-2년 내 자료 중심 + +## 주의사항 + +- 신뢰할 수 없는 출처는 제외 +- 추측이나 확인되지 않은 정보는 명시적으로 표시 +- 저작권이 있는 콘텐츠는 인용 형식으로 처리 +- 너무 많은 정보보다는 핵심 정보 중심으로 정리 diff --git a/.claude/agents/security-auditor.md b/.claude/agents/security-auditor.md new file mode 100644 index 0000000..630df61 --- /dev/null +++ b/.claude/agents/security-auditor.md @@ -0,0 +1,58 @@ +--- +name: security-auditor +description: 보안 감사 전문가. 코드의 보안 취약점을 탐지하고 수정 방안을 제시. 보안 점검, 취약점 분석, 시크릿 노출 확인 시 사용. Use when security review is needed. +tools: Read, Grep, Glob, Bash +model: sonnet +--- + +# Security Auditor - 보안 감사 에이전트 + +당신은 OWASP Top 10과 보안 모범 사례에 정통한 보안 감사 전문가입니다. + +## 검사 항목 + +### OWASP Top 10 +1. **Injection**: SQL Injection, Command Injection, LDAP Injection +2. **Broken Authentication**: 약한 비밀번호 정책, 세션 관리 결함 +3. **Sensitive Data Exposure**: 시크릿 하드코딩, 암호화 미적용 +4. **XXE**: XML External Entity 공격 +5. **Broken Access Control**: 권한 우회, IDOR +6. **Security Misconfiguration**: 디버그 모드, 기본 설정 +7. **XSS**: Reflected, Stored, DOM-based XSS +8. **Insecure Deserialization**: 안전하지 않은 역직렬화 +9. **Using Components with Known Vulnerabilities**: 취약한 의존성 +10. **Insufficient Logging**: 부적절한 로깅/모니터링 + +### 코드 스캔 패턴 +- `eval()`, `exec()`, `system()` 사용 +- 하드코딩된 자격증명 (password, secret, token, api_key) +- SSL 검증 비활성화 (verify_peer => false) +- 위험한 PHP 함수 (unserialize, extract, $$variable) +- SQL 직접 조합 (DB::raw, whereRaw + 변수) +- 인증 미적용 라우트 +- CSRF 보호 미적용 +- .env 파일 노출 + +### Laravel 특화 보안 +- Mass Assignment 취약점 ($guarded, $fillable) +- 미들웨어 적용 확인 (auth, throttle, verified) +- 입력 검증 (FormRequest 사용 여부) +- 파일 업로드 검증 +- Rate Limiting 적용 + +## 출력 형식 + +```yaml +severity: CRITICAL | HIGH | MEDIUM | LOW | INFO +finding: 발견된 취약점 설명 +file: 파일 경로:라인번호 +evidence: 문제가 되는 코드 +impact: 악용 시 영향 +remediation: 구체적 수정 방법 +reference: OWASP/CWE 참조 +``` + +## 원칙 +- 오탐(false positive)을 최소화하되, 놓치지 않는 것이 우선 +- 구체적이고 실행 가능한 수정 방안 제시 +- 심각도를 정확하게 분류 diff --git a/.claude/agents/test-runner.md b/.claude/agents/test-runner.md new file mode 100644 index 0000000..f7ad847 --- /dev/null +++ b/.claude/agents/test-runner.md @@ -0,0 +1,45 @@ +--- +name: test-runner +description: 테스트 실행 및 분석 전문가. 코드 작성 후 테스트를 실행하고 실패한 테스트를 분석. Use proactively after writing code to run tests. +tools: Read, Bash, Grep, Glob +model: haiku +--- + +# Test Runner - 테스트 실행 에이전트 + +당신은 테스트 실행 및 결과 분석 전문가입니다. 테스트를 실행하고 결과를 간결하게 요약합니다. + +## 실행 절차 + +1. 프로젝트 유형 확인 (Laravel, Node.js, etc.) +2. 적절한 테스트 명령 실행 +3. 결과 분석 및 요약 +4. 실패한 테스트에 대한 원인 분석 + +## 테스트 명령어 + +### Laravel (Docker 환경) +```bash +# Unit Tests +docker exec sam-api-1 php artisan test +docker exec sam-mng-1 php artisan test + +# 특정 테스트 +docker exec sam-api-1 php artisan test --filter=TestClassName +``` + +### Node.js +```bash +npm test +npx jest +npx vitest +``` + +## 출력 형식 + +- **통과**: X개 테스트 통과 +- **실패**: 실패한 테스트 목록 + 에러 메시지 +- **원인 분석**: 각 실패에 대한 간단한 원인 분석 +- **권장 조치**: 수정을 위한 구체적 제안 + +큰 테스트 출력은 요약하여 핵심만 전달합니다. diff --git a/.claude/skills/app-comprehensive-test-generator/SKILL.md b/.claude/skills/app-comprehensive-test-generator/SKILL.md new file mode 100755 index 0000000..86dd473 --- /dev/null +++ b/.claude/skills/app-comprehensive-test-generator/SKILL.md @@ -0,0 +1,145 @@ +--- +name: app-comprehensive-test-generator +description: 사용자 흐름 및 엣지 케이스 테스트 시나리오를 생성하고 실행하여 QA 리포트를 작성합니다. 테스트 생성, QA, 테스트 케이스 작성 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep, Bash +--- + +# App Comprehensive Test Generator + +애플리케이션의 종합적인 테스트 시나리오를 생성하고 QA 리포트를 작성하는 스킬입니다. + +## 기능 + +### 테스트 유형 +- **유닛 테스트**: 개별 함수/메서드 테스트 +- **통합 테스트**: 모듈 간 상호작용 테스트 +- **E2E 테스트**: 사용자 시나리오 기반 전체 흐름 테스트 +- **엣지 케이스 테스트**: 경계값, 예외 상황 테스트 + +### 분석 항목 +- 코드 구조 분석 +- 함수 시그니처 추출 +- 의존성 파악 +- 비즈니스 로직 이해 + +### 생성 테스트 케이스 +- Happy Path (정상 흐름) +- Error Cases (오류 상황) +- Boundary Values (경계값) +- Null/Empty Inputs (빈 입력) +- Concurrent Operations (동시성) +- Performance Scenarios (성능) + +## 워크플로우 + +1. 코드베이스 스캔 및 분석 +2. 테스트 대상 식별 +3. 테스트 시나리오 설계 +4. 테스트 코드 생성 +5. 테스트 실행 +6. QA 리포트 작성 + +## 테스트 템플릿 + +### Jest (JavaScript/TypeScript) +```javascript +describe('ModuleName', () => { + describe('functionName', () => { + // Happy Path + test('should return expected result with valid input', () => { + const result = functionName(validInput); + expect(result).toEqual(expectedOutput); + }); + + // Edge Cases + test('should handle empty input', () => { + expect(() => functionName('')).toThrow(); + }); + + test('should handle null input', () => { + expect(() => functionName(null)).toThrow(); + }); + + // Boundary Values + test('should handle minimum value', () => { + const result = functionName(MIN_VALUE); + expect(result).toBeDefined(); + }); + + test('should handle maximum value', () => { + const result = functionName(MAX_VALUE); + expect(result).toBeDefined(); + }); + }); +}); +``` + +### pytest (Python) +```python +import pytest +from module import function_name + +class TestFunctionName: + def test_valid_input(self): + """Happy path with valid input""" + result = function_name(valid_input) + assert result == expected_output + + def test_empty_input(self): + """Should raise error for empty input""" + with pytest.raises(ValueError): + function_name('') + + def test_none_input(self): + """Should raise error for None input""" + with pytest.raises(TypeError): + function_name(None) + + @pytest.mark.parametrize("input,expected", [ + (MIN_VALUE, expected_min), + (MAX_VALUE, expected_max), + ]) + def test_boundary_values(self, input, expected): + """Boundary value tests""" + assert function_name(input) == expected +``` + +## QA 리포트 구조 + +```markdown +# QA 테스트 리포트 + +## 요약 +- 총 테스트 케이스: N개 +- 통과: N개 (%) +- 실패: N개 (%) +- 스킵: N개 (%) + +## 테스트 범위 +| 모듈 | 테스트 수 | 통과 | 실패 | 커버리지 | +|------|----------|------|------|----------| +| auth | 15 | 14 | 1 | 85% | +| api | 23 | 23 | 0 | 92% | + +## 실패한 테스트 +### auth.test.js - loginUser +- **시나리오**: 만료된 토큰으로 로그인 +- **예상**: UnauthorizedError +- **실제**: TimeoutError +- **원인 분석**: 토큰 검증 로직 누락 + +## 권장 조치 +1. auth 모듈 토큰 검증 로직 추가 +2. 타임아웃 처리 개선 +``` + +## 사용 예시 + +``` +이 프로젝트의 테스트 케이스를 생성해줘 +user 모듈의 종합 테스트를 만들어줘 +엣지 케이스 테스트를 추가해줘 +``` + +## 출처 +Original skill from skills.cokac.com diff --git a/.claude/skills/async-await-keyword-fixer/SKILL.md b/.claude/skills/async-await-keyword-fixer/SKILL.md new file mode 100755 index 0000000..49bfc0b --- /dev/null +++ b/.claude/skills/async-await-keyword-fixer/SKILL.md @@ -0,0 +1,122 @@ +--- +name: async-await-keyword-fixer +description: JavaScript/TypeScript 코드에서 누락된 async/await 키워드를 찾아 수정합니다. 비동기 오류, Promise 문제, await 누락 수정 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep +--- + +# Async/Await Keyword Fixer + +JavaScript 및 TypeScript 코드에서 async/await 관련 문제를 탐지하고 수정하는 스킬입니다. + +## 기능 + +### 탐지 대상 +- **누락된 await**: Promise를 반환하는 함수 호출에 await 누락 +- **불필요한 await**: 동기 함수나 non-Promise에 await 사용 +- **누락된 async**: await를 사용하지만 async 선언 누락 +- **Promise 체이닝 문제**: then/catch와 async/await 혼용 +- **병렬 처리 최적화**: 순차 await를 Promise.all로 개선 가능한 경우 + +### 분석 패턴 +```javascript +// ❌ 누락된 await +async function fetchData() { + const response = fetch('/api/data'); // await 누락 + return response.json(); +} + +// ✅ 수정 +async function fetchData() { + const response = await fetch('/api/data'); + return response.json(); +} +``` + +```javascript +// ❌ 누락된 async +function processData() { + const data = await fetchData(); // async 누락 + return data; +} + +// ✅ 수정 +async function processData() { + const data = await fetchData(); + return data; +} +``` + +```javascript +// ❌ 비효율적 순차 처리 +async function loadAll() { + const a = await fetchA(); + const b = await fetchB(); + const c = await fetchC(); +} + +// ✅ 병렬 처리로 최적화 +async function loadAll() { + const [a, b, c] = await Promise.all([ + fetchA(), + fetchB(), + fetchC() + ]); +} +``` + +## 분석 프로세스 + +1. JavaScript/TypeScript 파일 스캔 +2. 함수 및 메서드 식별 +3. async/await 사용 패턴 분석 +4. Promise 반환 함수 추적 +5. 문제점 탐지 및 분류 +6. 최소 침습적 수정 제안 + +## 리포트 구조 + +```markdown +# Async/Await 분석 리포트 + +## 요약 +- 분석 파일: N개 +- 발견된 이슈: N개 +- 자동 수정 가능: N개 + +## 발견된 이슈 + +### 🔴 Critical: 누락된 await +| 파일 | 라인 | 함수 | 문제 | +|------|------|------|------| +| api.js | 23 | fetchUser | await 누락 | +| db.js | 45 | saveData | await 누락 | + +### 🟡 Warning: 누락된 async +| 파일 | 라인 | 함수 | 문제 | +|------|------|------|------| +| utils.js | 12 | processItem | async 누락 | + +### 💡 최적화 제안 +| 파일 | 라인 | 제안 | +|------|------|------| +| loader.js | 30-35 | Promise.all 사용 권장 | + +## 수정 패치 + +### api.js +```diff +- const response = fetch('/api/user'); ++ const response = await fetch('/api/user'); +``` +``` + +## 사용 예시 + +``` +async/await 문제를 찾아서 수정해줘 +이 파일에서 await 누락된 곳을 찾아줘 +비동기 코드 문제를 분석해줘 +``` + +## 출처 +Original skill from skills.cokac.com diff --git a/.claude/skills/build-auditor/SKILL.md b/.claude/skills/build-auditor/SKILL.md new file mode 100644 index 0000000..27e1d01 --- /dev/null +++ b/.claude/skills/build-auditor/SKILL.md @@ -0,0 +1,181 @@ +--- +name: ln-622-build-auditor +description: Build health audit worker (L3). Checks compiler/linter errors, deprecation warnings, type errors, failed tests, build configuration issues. Returns findings with severity (Critical/High/Medium/Low), location, effort, and recommendations. +allowed-tools: Read, Grep, Glob, Bash +--- + +# Build Health Auditor (L3 Worker) + +Specialized worker auditing build health and code quality tooling. + +## Purpose & Scope + +- **Worker in ln-620 coordinator pipeline** - invoked by ln-620-codebase-auditor +- Audit codebase for **build health issues** (Category 2: Critical Priority) +- Check compiler/linter errors, deprecation warnings, type errors, failed tests, build config +- Return structured findings to coordinator with severity, location, effort, recommendations +- Calculate compliance score (X/10) for Build Health category + +## Inputs (from Coordinator) + +**MANDATORY READ:** Load `shared/references/task_delegation_pattern.md#audit-coordinator--worker-contract` for contextStore structure. + +Receives `contextStore` with: `tech_stack` (including build_tool, test_framework), `best_practices`, `principles`, `codebase_root`. + +## Workflow + +1) **Parse Context:** Extract tech stack, build tools, test framework from contextStore +2) **Run Build Checks:** Execute compiler, linter, type checker, tests (see Audit Rules below) +3) **Collect Findings:** Record each violation with severity, location, effort, recommendation +4) **Calculate Score:** Count violations by severity, calculate compliance score (X/10) +5) **Return Results:** Return JSON with category, score, findings to coordinator + +## Audit Rules (Priority: CRITICAL) + +### 1. Compiler/Linter Errors +**What:** Syntax errors, compilation failures, linter rule violations + +**Detection by Stack:** + +| Stack | Command | Error Detection | +|-------|---------|-----------------| +| Node.js/TypeScript | `npm run build` or `tsc --noEmit` | Check exit code, parse stderr for errors | +| Python | `python -m py_compile *.py` | Check exit code, parse stderr | +| Go | `go build ./...` | Check exit code, parse stderr | +| Rust | `cargo build` | Check exit code, parse stderr | +| Java | `mvn compile` | Check exit code, parse build log | + +**Linters:** +- ESLint (JS/TS): `npx eslint . --format json` → parse JSON for errors +- Pylint (Python): `pylint **/*.py --output-format=json` +- RuboCop (Ruby): `rubocop --format json` +- golangci-lint (Go): `golangci-lint run --out-format json` + +**Severity:** +- **CRITICAL:** Compilation fails, cannot build project +- **HIGH:** Linter errors (not warnings) +- **MEDIUM:** Linter warnings +- **LOW:** Stylistic linter warnings (formatting) + +**Recommendation:** Fix errors before proceeding, configure linter rules, add pre-commit hooks + +**Effort:** S-M (fix syntax error vs refactor code structure) + +### 2. Deprecation Warnings +**What:** Usage of deprecated APIs, libraries, or language features + +**Detection:** +- Compiler warnings: `DeprecationWarning`, `@deprecated` in stack trace +- Dependency warnings: `npm outdated`, `pip list --outdated` +- Static analysis: Grep for `@deprecated` annotations + +**Severity:** +- **CRITICAL:** Deprecated API removed in next major version (imminent breakage) +- **HIGH:** Deprecated with migration path available +- **MEDIUM:** Deprecated but still supported for 1+ year +- **LOW:** Soft deprecation (no removal timeline) + +**Recommendation:** Migrate to recommended API, update dependencies, refactor code + +**Effort:** M-L (depends on API complexity and usage frequency) + +### 3. Type Errors +**What:** Type mismatches, missing type annotations, type checker failures + +**Detection by Stack:** + +| Stack | Tool | Command | +|-------|------|---------| +| TypeScript | tsc | `tsc --noEmit --strict` | +| Python | mypy | `mypy . --strict` | +| Python | pyright | `pyright --warnings` | +| Go | go vet | `go vet ./...` | +| Rust | cargo | `cargo check` (type checks only) | + +**Severity:** +- **CRITICAL:** Type error prevents compilation (`tsc` fails, `cargo check` fails) +- **HIGH:** Runtime type error likely (implicit `any`, missing type guards) +- **MEDIUM:** Missing type annotations (code works but untyped) +- **LOW:** Overly permissive types (`any`, `unknown` without narrowing) + +**Recommendation:** Add type annotations, enable strict mode, use type guards + +**Effort:** S-M (add types to single file vs refactor entire module) + +### 4. Failed or Skipped Tests +**What:** Test suite failures, skipped tests, missing test coverage + +**Detection by Stack:** + +| Stack | Framework | Command | +|-------|-----------|---------| +| Node.js | Jest | `npm test -- --json --outputFile=test-results.json` | +| Node.js | Mocha | `mocha --reporter json > test-results.json` | +| Python | Pytest | `pytest --json-report --json-report-file=test-results.json` | +| Go | go test | `go test ./... -json` | +| Rust | cargo test | `cargo test --no-fail-fast` | + +**Severity:** +- **CRITICAL:** Test failures in CI/production code +- **HIGH:** Skipped tests for critical features (payment, auth) +- **MEDIUM:** Skipped tests for non-critical features +- **LOW:** Skipped tests with "TODO" comment (acknowledged debt) + +**Recommendation:** Fix failing tests, remove skip markers, add missing tests + +**Effort:** S-M (update test assertion vs redesign test strategy) + +### 5. Build Configuration Issues +**What:** Misconfigured build tools, missing scripts, incorrect paths + +**Detection:** +- Missing build scripts in `package.json`, `Makefile`, `build.gradle` +- Incorrect paths in `tsconfig.json`, `webpack.config.js`, `Cargo.toml` +- Missing environment-specific configs (dev, staging, prod) +- Unused or conflicting build dependencies + +**Severity:** +- **CRITICAL:** Build fails due to misconfiguration +- **HIGH:** Build succeeds but outputs incorrect artifacts (wrong target, missing assets) +- **MEDIUM:** Suboptimal config (no minification, missing source maps) +- **LOW:** Unused config options + +**Recommendation:** Fix config paths, add missing build scripts, optimize build settings + +**Effort:** S-M (update config file vs redesign build pipeline) + +## Scoring Algorithm + +See `shared/references/audit_scoring.md` for unified formula and score interpretation. + +## Output Format + +**MANDATORY READ:** Load `shared/references/audit_output_schema.md` for JSON structure. + +Return JSON with `category: "Build Health"` and checks: compilation_errors, linter_warnings, type_errors, test_failures, build_config. + +## Critical Rules + +- **Do not auto-fix:** Report violations only; coordinator creates task for user to fix +- **Tech stack aware:** Use contextStore to run appropriate build commands (npm vs cargo vs gradle) +- **Exit code checking:** Always check exit code (0 = success, non-zero = failure) +- **Timeout handling:** Set timeout for build/test commands (default 5 minutes) +- **Environment aware:** Run in CI mode if detected (no interactive prompts) + +## Definition of Done + +- contextStore parsed successfully +- All 5 build checks completed (compiler, linter, type checker, tests, config) +- Findings collected with severity, location, effort, recommendation +- Score calculated using penalty algorithm +- JSON result returned to coordinator + +## Reference Files + +- **Audit scoring formula:** `shared/references/audit_scoring.md` +- **Audit output schema:** `shared/references/audit_output_schema.md` +- Build audit rules: [references/build_rules.md](references/build_rules.md) + +--- +**Version:** 3.0.0 +**Last Updated:** 2025-12-23 diff --git a/.claude/skills/code-bug-finder/SKILL.md b/.claude/skills/code-bug-finder/SKILL.md new file mode 100755 index 0000000..323b0dc --- /dev/null +++ b/.claude/skills/code-bug-finder/SKILL.md @@ -0,0 +1,88 @@ +--- +name: code-bug-finder +description: 다양한 프로그래밍 언어에서 버그를 자동으로 탐지하고 보고서를 생성합니다. 버그 찾기, 코드 검사, 결함 분석 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep, Bash +--- + +# Code Bug Finder + +코드에서 잠재적 버그와 문제점을 자동으로 탐지하는 스킬입니다. + +## 기능 + +### 탐지 대상 +- **논리 오류**: 조건문 오류, 무한 루프, off-by-one 에러 +- **널 참조**: null/undefined 체크 누락 +- **리소스 누수**: 파일/연결 미해제, 메모리 누수 +- **타입 오류**: 암시적 형변환, 타입 불일치 +- **보안 취약점**: SQL 인젝션, XSS, 하드코딩된 자격증명 +- **동시성 문제**: 레이스 컨디션, 데드락 가능성 +- **예외 처리**: 빈 catch 블록, 광범위한 예외 포착 + +### 지원 언어 +- JavaScript/TypeScript +- Python +- Java/Kotlin +- PHP +- Go +- C/C++ + +### 출력 형식 +- 심각도별 분류 (Critical, High, Medium, Low) +- 파일 위치 및 라인 번호 +- 문제 설명 및 수정 제안 +- HTML 또는 마크다운 리포트 + +## 분석 프로세스 + +1. 코드베이스 스캔 및 파일 수집 +2. 언어별 패턴 매칭 적용 +3. 정적 분석 수행 +4. 발견된 이슈 분류 및 우선순위 지정 +5. 수정 제안 생성 +6. 종합 리포트 작성 + +## 리포트 구조 + +```markdown +# 버그 분석 리포트 + +## 요약 +- 총 검사 파일: N개 +- 발견된 이슈: N개 +- Critical: N개 | High: N개 | Medium: N개 | Low: N개 + +## Critical Issues +### [파일명:라인] 이슈 제목 +- **설명**: 문제에 대한 상세 설명 +- **영향**: 이 버그가 미치는 영향 +- **수정 제안**: 권장 수정 방법 +- **코드**: + ``` + // 문제 코드 + ``` + +## High Priority Issues +... + +## Medium Priority Issues +... + +## Low Priority Issues +... + +## 권장 사항 +- 즉시 조치 필요 항목 +- 점진적 개선 항목 +``` + +## 사용 예시 + +``` +이 프로젝트에서 버그를 찾아줘 +src 폴더의 코드를 검사하고 문제점을 알려줘 +보안 취약점이 있는지 분석해줘 +``` + +## 출처 +Original skill from skills.cokac.com diff --git a/.claude/skills/code-commenter/SKILL.md b/.claude/skills/code-commenter/SKILL.md new file mode 100755 index 0000000..ae1ae8e --- /dev/null +++ b/.claude/skills/code-commenter/SKILL.md @@ -0,0 +1,169 @@ +--- +name: code-commenter +description: 프로그램 소스 코드에 이해하기 쉬운 주석을 추가합니다. 코드 주석 추가, 코드 설명, 문서화 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep +--- + +# Code Commenter + +소스 코드에 초보자도 이해할 수 있는 설명적인 주석을 추가하는 스킬입니다. + +## 기능 + +### 주석 유형 +- **파일 헤더**: 파일 목적 및 개요 +- **함수/메서드 문서**: 입력, 출력, 동작 설명 +- **인라인 주석**: 복잡한 로직 설명 +- **TODO/FIXME**: 개선 필요 영역 표시 +- **섹션 구분**: 코드 영역 구분 + +### 지원 언어 +- JavaScript/TypeScript (JSDoc) +- Python (docstring) +- Java/Kotlin (JavaDoc) +- PHP (PHPDoc) +- Go +- C/C++ +- 기타 언어 + +### 주석 스타일 + +#### JavaScript/TypeScript (JSDoc) +```javascript +/** + * 사용자 인증을 처리하고 JWT 토큰을 반환합니다. + * + * @param {string} email - 사용자 이메일 주소 + * @param {string} password - 사용자 비밀번호 (평문) + * @returns {Promise<{token: string, user: Object}>} 인증 토큰과 사용자 정보 + * @throws {AuthenticationError} 이메일 또는 비밀번호가 잘못된 경우 + * + * @example + * const result = await authenticateUser('user@example.com', 'password123'); + * console.log(result.token); // 'eyJhbGc...' + */ +async function authenticateUser(email, password) { + // 데이터베이스에서 사용자 조회 + const user = await User.findByEmail(email); + + // 비밀번호 해시 비교로 인증 검증 + const isValid = await bcrypt.compare(password, user.passwordHash); + + if (!isValid) { + throw new AuthenticationError('Invalid credentials'); + } + + // JWT 토큰 생성 (24시간 유효) + const token = jwt.sign({ userId: user.id }, SECRET_KEY, { expiresIn: '24h' }); + + return { token, user }; +} +``` + +#### Python (docstring) +```python +def calculate_tax(income: float, deductions: list[float] = None) -> float: + """ + 소득에 대한 세금을 계산합니다. + + 누진세율을 적용하여 과세표준에 따른 세금을 계산합니다. + 공제 항목이 있으면 소득에서 차감한 후 계산합니다. + + Args: + income: 연간 총 소득 (원) + deductions: 공제 항목 목록 (선택사항) + + Returns: + 계산된 세금 (원) + + Raises: + ValueError: 소득이 음수인 경우 + + Example: + >>> calculate_tax(50000000, [5000000, 2000000]) + 4320000.0 + """ + # 입력값 검증 + if income < 0: + raise ValueError("소득은 음수가 될 수 없습니다") + + # 공제 적용 + taxable_income = income - sum(deductions or []) + + # 누진세율 적용 (간소화된 예시) + if taxable_income <= 12000000: + return taxable_income * 0.06 + elif taxable_income <= 46000000: + return 720000 + (taxable_income - 12000000) * 0.15 + else: + return 5820000 + (taxable_income - 46000000) * 0.24 +``` + +#### Java (JavaDoc) +```java +/** + * 주문 처리 서비스 + * + *

고객의 주문을 생성, 수정, 취소하는 기능을 제공합니다. + * 재고 확인 및 결제 처리와 연동됩니다.

+ * + * @author 개발팀 + * @version 1.0 + * @since 2024-01-01 + */ +public class OrderService { + + /** + * 새로운 주문을 생성합니다. + * + *

장바구니의 상품들을 주문으로 변환하고, + * 재고를 확인한 후 결제를 진행합니다.

+ * + * @param customerId 고객 ID + * @param cartItems 장바구니 상품 목록 + * @param paymentMethod 결제 수단 + * @return 생성된 주문 객체 + * @throws InsufficientStockException 재고가 부족한 경우 + * @throws PaymentFailedException 결제가 실패한 경우 + */ + public Order createOrder(Long customerId, List cartItems, PaymentMethod paymentMethod) { + // 재고 확인 + validateStock(cartItems); + + // 주문 생성 + Order order = new Order(customerId, cartItems); + + // 결제 처리 + processPayment(order, paymentMethod); + + return orderRepository.save(order); + } +} +``` + +## 주석 가이드라인 + +### DO (권장) +- 복잡한 비즈니스 로직 설명 +- 알고리즘의 의도 설명 +- 비직관적인 결정의 이유 설명 +- 외부 의존성 및 부작용 문서화 +- 매개변수 제약조건 명시 + +### DON'T (피해야 할 것) +- 코드를 그대로 반복하는 주석 +- 너무 명백한 내용 설명 +- 오래된/부정확한 주석 방치 +- 주석으로 코드 숨기기 +- 과도한 주석으로 가독성 저해 + +## 사용 예시 + +``` +이 코드에 설명 주석을 추가해줘 +함수들에 JSDoc 주석을 작성해줘 +초보자도 이해할 수 있게 코드를 문서화해줘 +``` + +## 출처 +Original skill from skills.cokac.com diff --git a/.claude/skills/code-flow-web-doc-generator/SKILL.md b/.claude/skills/code-flow-web-doc-generator/SKILL.md new file mode 100755 index 0000000..d23eea0 --- /dev/null +++ b/.claude/skills/code-flow-web-doc-generator/SKILL.md @@ -0,0 +1,124 @@ +--- +name: code-flow-web-doc-generator +description: 소스 코드를 분석하여 호출 흐름과 데이터 흐름 다이어그램이 포함된 자체 완결형 HTML 문서를 생성합니다. 코드 흐름 문서화, 시퀀스 다이어그램 생성, 코드 이해를 위한 시각화 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep +--- + +# Code Flow Web Document Generator + +소스 코드를 분석하여 시각적 다이어그램과 설명이 포함된 자체 완결형 HTML 문서를 생성하는 스킬입니다. + +## 주요 기능 + +프로그램 동작과 구조를 이해하는 데 도움이 되는 호출 흐름 및 데이터 흐름 다이어그램과 간결한 노드 수준 설명이 포함된 웹 문서를 생성합니다. + +## 워크플로우 + +1. 코드 입력 수신 (단일 파일, 다중 파일, 저장소, 또는 코드 스니펫) +2. 함수, 클래스, import, 호출 관계 추출 +3. 컴포넌트 간 데이터 흐름 식별 +4. Mermaid 형식으로 모듈 및 시퀀스 다이어그램 생성 +5. 요약, 다이어그램, 상세 노드 설명 섹션이 포함된 구조화된 HTML 생성 + +## 기능 상세 + +### 다이어그램 유형 +- 고수준 모듈 다이어그램 +- 호출 시퀀스 흐름 + +### 출력 형식 +- 인라인 CSS 및 스크립트가 포함된 단일 자체 완결형 HTML 파일 + +### 코드 분석 +- 함수 역할, 입력, 출력, 부작용 추출 + +### 문서화 +- 코드 발췌 (3-12줄) +- 핫스팟 분석 +- 재생성 지침 포함 + +## 사용 사례 + +- 단일 파일 스크립트 분석 +- 다중 모듈 웹 서비스 문서화 +- 이벤트 기반 코드 설명 +- 코드 리뷰 준비 및 온보딩 + +## HTML 출력 템플릿 + +```html + + + + + 코드 흐름 문서 + + + + + +
+ +
+ +
+ +
+

프로젝트 요약

+ +
+ + +
+

모듈 구조

+
+ graph TD + A[Entry Point] --> B[Module A] + A --> C[Module B] +
+
+ + +
+

호출 흐름

+
+ sequenceDiagram + participant User + participant API + participant DB +
+
+ + +
+

함수 상세

+ +
+ + +
+

데이터 흐름

+ +
+
+ + + + +``` + +## 사용 예시 + +``` +이 파일의 코드 흐름을 다이어그램으로 문서화해줘 +src 폴더의 호출 관계를 시퀀스 다이어그램으로 만들어줘 +이 함수들의 데이터 흐름을 HTML 문서로 생성해줘 +``` + +## 출처 +Original skill from skills.cokac.com diff --git a/.claude/skills/code-flow-web-report/SKILL.md b/.claude/skills/code-flow-web-report/SKILL.md new file mode 100755 index 0000000..6c7f8a9 --- /dev/null +++ b/.claude/skills/code-flow-web-report/SKILL.md @@ -0,0 +1,179 @@ +--- +name: code-flow-web-report +description: 웹 애플리케이션의 런타임 흐름을 시각화하는 인터랙티브 리포트를 생성합니다. 라우트, 컨트롤러, 서비스 흐름 분석 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep, Bash +--- + +# Code Flow Web Report + +웹 애플리케이션의 요청 처리 흐름을 시각화하는 인터랙티브 HTML 리포트를 생성하는 스킬입니다. + +## 기능 + +### 분석 대상 +- **라우트 (Routes)**: URL 엔드포인트 매핑 +- **컨트롤러 (Controllers)**: 요청 처리 로직 +- **서비스 (Services)**: 비즈니스 로직 +- **미들웨어 (Middleware)**: 전처리/후처리 +- **모델/리포지토리**: 데이터 접근 + +### 시각화 요소 +- 요청 흐름 시퀀스 다이어그램 +- 레이어 간 의존성 그래프 +- 컴포넌트 상호작용 맵 +- API 엔드포인트 목록 + +### 지원 프레임워크 +- Express.js / Koa.js +- NestJS +- Django / Flask +- Laravel / Symfony +- Spring Boot + +## 분석 프로세스 + +1. 라우트 정의 파일 스캔 +2. 컨트롤러/핸들러 매핑 추출 +3. 서비스 의존성 분석 +4. 미들웨어 체인 파악 +5. 데이터 흐름 추적 +6. 인터랙티브 HTML 생성 + +## HTML 템플릿 + +```html + + + + + 코드 흐름 리포트 + + + + + + +
+
+

🔄 코드 흐름 리포트

+
+
+ +
+ +
+

📊 요약

+
+
+
24
+
API 엔드포인트
+
+
+
8
+
컨트롤러
+
+
+
12
+
서비스
+
+
+
5
+
미들웨어
+
+
+
+ + +
+

🏗️ 아키텍처

+
+ graph TD + Client[클라이언트] --> Router[라우터] + Router --> MW[미들웨어] + MW --> Controller[컨트롤러] + Controller --> Service[서비스] + Service --> Repository[리포지토리] + Repository --> DB[(데이터베이스)] +
+
+ + +
+

🔄 요청 흐름 예시

+
+ sequenceDiagram + participant C as Client + participant R as Router + participant M as Middleware + participant CT as Controller + participant S as Service + participant DB as Database + + C->>R: POST /api/users + R->>M: authMiddleware() + M->>CT: UserController.create() + CT->>S: UserService.createUser() + S->>DB: INSERT INTO users + DB-->>S: user record + S-->>CT: User object + CT-->>C: 201 Created +
+
+ + +
+

📡 API 엔드포인트

+
+
+
+ GET + /api/users + UserController.list +
+
+
+
+ POST + /api/users + UserController.create +
+
+
+
+ PUT + /api/users/:id + UserController.update +
+
+
+
+ DELETE + /api/users/:id + UserController.delete +
+
+
+
+
+ + + + +``` + +## 사용 예시 + +``` +이 웹앱의 코드 흐름을 분석해서 리포트로 만들어줘 +API 요청이 어떻게 처리되는지 시각화해줘 +라우트에서 DB까지의 흐름을 다이어그램으로 보여줘 +``` + +## 출처 +Original skill from skills.cokac.com diff --git a/.claude/skills/code-principles-auditor/SKILL.md b/.claude/skills/code-principles-auditor/SKILL.md new file mode 100644 index 0000000..7d0f7f4 --- /dev/null +++ b/.claude/skills/code-principles-auditor/SKILL.md @@ -0,0 +1,422 @@ +--- +name: ln-623-code-principles-auditor +description: Code principles audit worker (L3). Checks DRY (7 types), KISS/YAGNI, TODOs, error handling, DI patterns. Returns findings with severity, location, effort, recommendations. +allowed-tools: Read, Grep, Glob, Bash +--- + +# Code Principles Auditor (L3 Worker) + +Specialized worker auditing code principles (DRY, KISS, YAGNI) and design patterns. + +## Purpose & Scope + +- **Worker in ln-620 coordinator pipeline** - invoked by ln-620-codebase-auditor +- Audit **code principles** (DRY/KISS/YAGNI, error handling, DI) +- Check DRY/KISS/YAGNI violations, TODO/FIXME, workarounds, error handling +- Return structured findings with severity, location, effort, recommendations +- Calculate compliance score (X/10) for Code Principles category + +## Inputs (from Coordinator) + +**MANDATORY READ:** Load `shared/references/task_delegation_pattern.md#audit-coordinator--worker-contract` for contextStore structure. + +Receives `contextStore` with: `tech_stack`, `best_practices`, `principles`, `codebase_root`. + +**Domain-aware:** Supports `domain_mode` + `current_domain` (see `audit_output_schema.md#domain-aware-worker-output`). + +## Workflow + +1) **Parse context** — extract fields, determine `scan_path` (domain-aware if specified) +2) **Scan codebase for violations** + - All Grep/Glob patterns use `scan_path` (not codebase_root) + - Example: `Grep(pattern="TODO", path=scan_path)` + +3) **Collect findings with severity, location, effort, recommendation** + - Tag each finding with `domain: domain_name` (if domain-aware) + +4) **Calculate score using penalty algorithm** + +5) **Return JSON result to coordinator** + - Include `domain` and `scan_path` fields (if domain-aware) + +## Audit Rules (Priority: HIGH) + +### 1. DRY Violations (Don't Repeat Yourself) +**What:** Duplicated logic, constants, or code blocks across files + +**Detection Categories:** + +#### 1.1. Identical Code Duplication +- Search for identical functions (use AST comparison or text similarity) +- Find repeated constants: same value defined in multiple files +- Detect copy-pasted code blocks (>10 lines identical) + +**Severity:** +- **HIGH:** Critical business logic duplicated (payment, auth) +- **MEDIUM:** Utility functions duplicated +- **LOW:** Simple constants duplicated (<5 occurrences) + +#### 1.2. Duplicated Validation Logic +**What:** Same validation patterns repeated across validators/controllers + +**Detection:** +- Email validation: `/@.*\./` regex patterns in multiple files +- Password validation: `/.{8,}/`, strength checks repeated +- Phone validation: phone number regex duplicated +- Common patterns: `isValid*`, `validate*`, `check*` functions with similar logic + +**Severity:** +- **HIGH:** Auth/payment validation duplicated (inconsistency risk) +- **MEDIUM:** User input validation duplicated (3+ occurrences) +- **LOW:** Simple format checks duplicated (<3 occurrences) + +**Recommendation:** Extract to shared validators module (`validators/common.ts`) + +**Effort:** M (extract validators, update imports) + +#### 1.3. Repeated Error Messages +**What:** Hardcoded error messages instead of centralized error catalog + +**Detection:** +- Grep for hardcoded strings in `throw new Error("...")`, `res.status(400).json({ error: "..." })` +- Find repeated messages: "User not found", "Invalid credentials", "Unauthorized access" +- Check for missing error constants file: `errors.ts`, `error-messages.ts`, `constants/errors.ts` + +**Severity:** +- **MEDIUM:** Critical error messages hardcoded (auth, payment) - inconsistency risk +- **MEDIUM:** No centralized error messages file +- **LOW:** Same error message in <3 places + +**Recommendation:** +- Create central error messages file (`constants/error-messages.ts`) +- Define error catalog: `const ERRORS = { USER_NOT_FOUND: "User not found", ... }` +- Replace hardcoded strings with constants: `throw new Error(ERRORS.USER_NOT_FOUND)` + +**Effort:** M (create error catalog, replace hardcoded strings) + +#### 1.4. Similar Code Patterns (>80% Similarity) +**What:** Code with similar logic but different variable names/structure + +**Detection:** +- Use fuzzy matching/similarity algorithms (Levenshtein distance, Jaccard similarity) +- Compare function bodies ignoring variable names +- Threshold: >80% similarity = potential duplication + +**Example:** +```typescript +// File 1 +function processUser(user) { return user.name.toUpperCase(); } + +// File 2 +function formatUserName(u) { return u.name.toUpperCase(); } +// ✅ Same logic, different names - DETECTED +``` + +**Severity:** +- **MEDIUM:** Similar business logic (>80% similarity) in critical paths +- **LOW:** Similar utility functions (<3 occurrences) + +**Recommendation:** Extract common logic, create shared helper function + +**Effort:** M (refactor to shared module) + +#### 1.5. Duplicated SQL Queries +**What:** Same SQL queries/ORM calls in different controllers/services + +**Detection:** +- Find repeated raw SQL strings: `SELECT * FROM users WHERE id = ?` +- ORM duplicates: `User.findOne({ where: { email } })` in multiple files +- Grep for common patterns: `SELECT`, `INSERT`, `UPDATE`, `DELETE` with similar structure + +**Severity:** +- **HIGH:** Critical queries duplicated (payment, auth) +- **MEDIUM:** Common queries duplicated (3+ occurrences) +- **LOW:** Simple queries duplicated (<3 occurrences) + +**Recommendation:** Extract to Repository layer, create query methods + +**Effort:** M (create repository methods, update callers) + +#### 1.6. Copy-Pasted Tests +**What:** Test files with identical structure (arrange-act-assert duplicated) + +**Detection:** +- Find tests with >80% similar setup/teardown +- Repeated test data: same fixtures defined in multiple test files +- Pattern: `beforeEach`, `afterEach` with identical code + +**Severity:** +- **MEDIUM:** Test setup duplicated in 5+ files +- **LOW:** Similar test utilities duplicated (<5 files) + +**Recommendation:** Extract to test helpers (`tests/helpers/*`), use shared fixtures + +**Effort:** M (create test utilities, refactor tests) + +#### 1.7. Repeated API Response Structures +**What:** Duplicated response objects instead of shared DTOs + +**Detection:** +- Find repeated object structures in API responses: + ```typescript + return { id: user.id, name: user.name, email: user.email } + ``` +- Check for missing DTOs folder: `dtos/`, `responses/`, `models/` +- Grep for common patterns: `return { ... }` in controllers + +**Severity:** +- **MEDIUM:** Response structures duplicated in 5+ endpoints (inconsistency risk) +- **LOW:** Simple response objects duplicated (<5 endpoints) + +**Recommendation:** Create DTOs/Response classes, use serializers + +**Effort:** M (create DTOs, update endpoints) + +--- + +**Overall Recommendation for DRY:** +Extract to shared module, create utility function, centralize constants/messages/validators/DTOs + +**Overall Effort:** M (refactor + update imports, typically 1-4 hours per duplication type) + +### 2. KISS Violations (Keep It Simple, Stupid) +**What:** Over-engineered abstractions, unnecessary complexity + +**Detection:** +- Abstract classes with single implementation +- Factory patterns for 2 objects +- Deep inheritance (>3 levels) +- Generic types with excessive constraints + +**Severity:** +- **HIGH:** Abstraction prevents understanding core logic +- **MEDIUM:** Unnecessary pattern (factory for 2 types) +- **LOW:** Over-generic types (acceptable tradeoff) + +**Recommendation:** Remove abstraction, inline implementation, flatten hierarchy + +**Effort:** L (requires careful refactoring) + +### 3. YAGNI Violations (You Aren't Gonna Need It) +**What:** Unused extensibility, dead feature flags, premature optimization + +**Detection:** +- Feature flags that are always true/false +- Abstract methods never overridden +- Config options never used +- Interfaces with single implementation (no plans for more) + +**Severity:** +- **MEDIUM:** Unused extensibility points adding complexity +- **LOW:** Dead feature flags (cleanup needed) + +**Recommendation:** Remove unused code, simplify interfaces + +**Effort:** M (verify no future use, then delete) + +### 4. TODO/FIXME/HACK Comments +**What:** Unfinished work, temporary solutions + +**Detection:** +- Grep for `TODO`, `FIXME`, `HACK`, `XXX`, `OPTIMIZE` +- Check age (git blame) - old TODOs are higher severity + +**Severity:** +- **HIGH:** TODO in critical path (auth, payment) >6 months old +- **MEDIUM:** FIXME/HACK with explanation +- **LOW:** Recent TODO (<1 month) with plan + +**Recommendation:** Complete TODO, remove HACK, refactor workaround + +**Effort:** Varies (S for simple TODO, L for architectural HACK) + +### 5. Missing Error Handling +**What:** Critical paths without try-catch, error propagation + +**Detection:** +- Find async functions without error handling +- Check API routes without error middleware +- Verify database calls have error handling + +**Severity:** +- **CRITICAL:** Payment/auth without error handling +- **HIGH:** User-facing operations without error handling +- **MEDIUM:** Internal operations without error handling + +**Recommendation:** Add try-catch, implement error middleware, propagate errors properly + +**Effort:** M (add error handling logic) + +### 6. Centralized Error Handling +**What:** Errors handled inconsistently across different contexts (web requests, cron jobs, background tasks) + +**Detection:** +- Search for centralized error handler class/module: `ErrorHandler`, `errorHandler`, `error-handler.ts/js/py` +- Check if error middleware delegates to handler: `errorHandler.handleError(err)` or similar +- Verify all async routes use promises or async/await (Express 5+ auto-catches rejections) +- Check for error transformation (sanitize stack traces for users in production) +- **Anti-pattern check:** Look for `process.on("uncaughtException")` usage (BAD PRACTICE per Express docs) + +**Severity:** +- **HIGH:** No centralized error handler (errors handled inconsistently in multiple places) +- **HIGH:** Using `uncaughtException` listener instead of proper error propagation (Express anti-pattern) +- **MEDIUM:** Error middleware handles errors directly (doesn't delegate to central handler) +- **MEDIUM:** Async routes without proper error handling (not using promises/async-await) +- **LOW:** Stack traces exposed in production responses (security/UX issue) + +**Recommendation:** +- Create single ErrorHandler class/module for ALL error contexts +- Middleware should only catch and forward to ErrorHandler (delegate pattern) +- Use async/await for async routes (framework auto-forwards errors) +- Transform errors for users: hide sensitive details (stack traces, internal paths) in production +- **DO NOT use uncaughtException listeners** - use process managers (PM2, systemd) for restart instead +- For unhandled rejections: log and restart process (use supervisor, not inline handler) + +**Effort:** M-L (create error handler, refactor existing middleware) + +### 7. Dependency Injection / Centralized Init +**What:** Direct imports/instantiation instead of dependency injection, scattered initialization + +**Detection:** +- Check for DI container usage: + - Node.js: `inversify`, `awilix`, `tsyringe`, `typedi` packages + - Python: `dependency_injector`, `injector` packages + - Java: Spring `@Autowired`, `@Inject` annotations + - .NET: Built-in DI in ASP.NET Core, `IServiceCollection` +- Grep for direct instantiations in business logic: `new SomeService()`, `new SomeRepository()` +- Check for centralized Init/Bootstrap module: `bootstrap.ts`, `init.py`, `Startup.cs`, `app.module.ts` +- Verify controllers/services receive dependencies via constructor/parameters, not direct imports + +**Severity:** +- **MEDIUM:** No DI container (hard to test, tight coupling, difficult to swap implementations) +- **MEDIUM:** Direct instantiation in business logic (`new Service()` in controllers/services) +- **LOW:** Mixed DI and direct imports (inconsistent pattern) + +**Recommendation:** +- Use DI container for dependency management (Inversify, Awilix, Spring, built-in .NET DI) +- Centralize initialization in Init/Bootstrap module +- Inject dependencies via constructor/parameters (dependency injection pattern) +- Never use direct instantiation for business logic classes (only for DTOs, value objects) + +**Effort:** L (refactor to DI pattern, add container, update all instantiations) + +### 8. Missing Best Practices Guide +**What:** No architecture/design best practices documentation for developers + +**Detection:** +- Check for architecture guide files: + - `docs/architecture.md`, `docs/best-practices.md`, `docs/design-patterns.md` + - `ARCHITECTURE.md`, `CONTRIBUTING.md` (architecture section) +- Verify content includes: layering rules, error handling patterns, DI usage, coding conventions + +**Severity:** +- **LOW:** No architecture guide (harder for new developers to understand patterns and conventions) + +**Recommendation:** +- Create `docs/architecture.md` with project-specific patterns: + - Document layering: Controller→Service→Repository→DB + - Error handling: centralized ErrorHandler pattern + - Dependency Injection: how to add new services/repositories + - Coding conventions: naming, file organization, imports +- Include examples from existing codebase +- Keep framework-agnostic (principles, not specific implementations) + +**Effort:** S (create markdown file, ~1-2 hours documentation) + +## Scoring Algorithm + +See `shared/references/audit_scoring.md` for unified formula and score interpretation. + +## Output Format + +Return JSON to coordinator: + +**Global mode output:** +```json +{ + "category": "Architecture & Design", + "score": 6, + "total_issues": 12, + "critical": 2, + "high": 4, + "medium": 4, + "low": 2, + "checks": [ + {"id": "dry_violations", "name": "DRY Violations", "status": "failed", "details": "4 duplications found"}, + {"id": "kiss_violations", "name": "KISS Violations", "status": "warning", "details": "1 over-engineered abstraction"}, + {"id": "yagni_violations", "name": "YAGNI Violations", "status": "passed", "details": "No unused code"}, + {"id": "solid_violations", "name": "SOLID Violations", "status": "failed", "details": "2 SRP violations"} + ], + "findings": [...] +} +``` + +**Domain-aware mode output (NEW):** +```json +{ + "category": "Architecture & Design", + "score": 6, + "domain": "users", + "scan_path": "src/users", + "total_issues": 12, + "critical": 2, + "high": 4, + "medium": 4, + "low": 2, + "checks": [ + {"id": "dry_violations", "name": "DRY Violations", "status": "failed", "details": "4 duplications found"}, + {"id": "kiss_violations", "name": "KISS Violations", "status": "warning", "details": "1 over-engineered abstraction"}, + {"id": "yagni_violations", "name": "YAGNI Violations", "status": "passed", "details": "No unused code"}, + {"id": "solid_violations", "name": "SOLID Violations", "status": "failed", "details": "2 SRP violations"} + ], + "findings": [ + { + "severity": "CRITICAL", + "location": "src/users/controllers/UserController.ts:45", + "issue": "Controller directly uses Repository (layer boundary break)", + "principle": "Layer Separation (Clean Architecture)", + "recommendation": "Create UserService, inject into controller", + "effort": "L", + "domain": "users" + }, + { + "severity": "HIGH", + "location": "src/users/services/UserService.ts:45", + "issue": "DRY violation - duplicate validation logic", + "principle": "DRY Principle", + "recommendation": "Extract to shared validators module", + "effort": "M", + "domain": "users" + } + ] +} +``` + +## Critical Rules + +- **Do not auto-fix:** Report only +- **Domain-aware scanning:** If `domain_mode="domain-aware"`, scan ONLY `scan_path` (not entire codebase) +- **Tag findings:** Include `domain` field in each finding when domain-aware +- **Context-aware:** Use project's `principles.md` to define what's acceptable +- **Age matters:** Old TODOs are higher severity than recent ones +- **Effort realism:** S = <1h, M = 1-4h, L = >4h + +## Definition of Done + +- contextStore parsed (including domain_mode and current_domain) +- scan_path determined (domain path or codebase root) +- All 8 checks completed (scoped to scan_path): + - DRY (7 subcategories), KISS, YAGNI, TODOs, Error Handling, Centralized Errors, DI/Init, Best Practices Guide +- Findings collected with severity, location, effort, recommendation, domain +- Score calculated +- JSON returned to coordinator with domain metadata + +## Reference Files + +- **Audit scoring formula:** `shared/references/audit_scoring.md` +- **Audit output schema:** `shared/references/audit_output_schema.md` +- Architecture rules: [references/architecture_rules.md](references/architecture_rules.md) + +--- +**Version:** 4.1.0 +**Last Updated:** 2026-01-29 diff --git a/.claude/skills/code-quality-auditor/SKILL.md b/.claude/skills/code-quality-auditor/SKILL.md new file mode 100644 index 0000000..c879e4b --- /dev/null +++ b/.claude/skills/code-quality-auditor/SKILL.md @@ -0,0 +1,302 @@ +--- +name: ln-624-code-quality-auditor +description: "Code quality audit worker (L3). Checks cyclomatic complexity, deep nesting, long methods, god classes, method signature quality, O(n²) algorithms, N+1 queries, magic numbers/constants. Returns findings with severity, location, effort, recommendations." +allowed-tools: Read, Grep, Glob, Bash +--- + +# Code Quality Auditor (L3 Worker) + +Specialized worker auditing code complexity, method signatures, algorithms, and constants management. + +## Purpose & Scope + +- **Worker in ln-620 coordinator pipeline** - invoked by ln-620-codebase-auditor +- Audit **code quality** (Categories 5+6+NEW: Medium Priority) +- Check complexity metrics, method signature quality, algorithmic efficiency, constants management +- Return structured findings with severity, location, effort, recommendations +- Calculate compliance score (X/10) for Code Quality category + +## Inputs (from Coordinator) + +**MANDATORY READ:** Load `shared/references/task_delegation_pattern.md#audit-coordinator--worker-contract` for contextStore structure. + +Receives `contextStore` with: `tech_stack`, `best_practices`, `principles`, `codebase_root`. + +**Domain-aware:** Supports `domain_mode` + `current_domain` (see `audit_output_schema.md#domain-aware-worker-output`). + +## Workflow + +1) **Parse context** — extract fields, determine `scan_path` (domain-aware if specified) +2) **Scan codebase for violations** + - All Grep/Glob patterns use `scan_path` (not codebase_root) + - Example: `Grep(pattern="if.*if.*if", path=scan_path)` for nesting detection + +3) **Collect findings with severity, location, effort, recommendation** + - Tag each finding with `domain: domain_name` (if domain-aware) + +4) **Calculate score using penalty algorithm** + +5) **Return JSON result to coordinator** + - Include `domain` and `scan_path` fields (if domain-aware) + +## Audit Rules (Priority: MEDIUM) + +### 1. Cyclomatic Complexity +**What:** Too many decision points in single function (> 10) + +**Detection:** +- Count if/else, switch/case, ternary, &&, ||, for, while +- Use tools: `eslint-plugin-complexity`, `radon` (Python), `gocyclo` (Go) + +**Severity:** +- **HIGH:** Complexity > 20 (extremely hard to test) +- **MEDIUM:** Complexity 11-20 (refactor recommended) +- **LOW:** Complexity 8-10 (acceptable but monitor) + +**Recommendation:** Split function, extract helper methods, use early returns + +**Effort:** M-L (depends on complexity) + +### 2. Deep Nesting (> 4 levels) +**What:** Nested if/for/while blocks too deep + +**Detection:** +- Count indentation levels +- Pattern: if { if { if { if { if { ... } } } } } + +**Severity:** +- **HIGH:** > 6 levels (unreadable) +- **MEDIUM:** 5-6 levels +- **LOW:** 4 levels + +**Recommendation:** Extract functions, use guard clauses, invert conditions + +**Effort:** M (refactor structure) + +### 3. Long Methods (> 50 lines) +**What:** Functions too long, doing too much + +**Detection:** +- Count lines between function start and end +- Exclude comments, blank lines + +**Severity:** +- **HIGH:** > 100 lines +- **MEDIUM:** 51-100 lines +- **LOW:** 40-50 lines (borderline) + +**Recommendation:** Split into smaller functions, apply Single Responsibility + +**Effort:** M (extract logic) + +### 4. God Classes/Modules (> 500 lines) +**What:** Files with too many responsibilities + +**Detection:** +- Count lines in file (exclude comments) +- Check number of public methods/functions + +**Severity:** +- **HIGH:** > 1000 lines +- **MEDIUM:** 501-1000 lines +- **LOW:** 400-500 lines + +**Recommendation:** Split into multiple files, apply separation of concerns + +**Effort:** L (major refactor) + +### 5. Too Many Parameters (> 5) +**What:** Functions with excessive parameters + +**Detection:** +- Count function parameters +- Check constructors, methods + +**Severity:** +- **MEDIUM:** 6-8 parameters +- **LOW:** 5 parameters (borderline) + +**Recommendation:** Use parameter object, builder pattern, default parameters + +**Effort:** S-M (refactor signature + calls) + +### 6. O(n²) or Worse Algorithms +**What:** Inefficient nested loops over collections + +**Detection:** +- Nested for loops: `for (i) { for (j) { ... } }` +- Nested array methods: `arr.map(x => arr.filter(...))` + +**Severity:** +- **HIGH:** O(n²) in hot path (API request handler) +- **MEDIUM:** O(n²) in occasional operations +- **LOW:** O(n²) on small datasets (n < 100) + +**Recommendation:** Use hash maps, optimize with single pass, use better data structures + +**Effort:** M (algorithm redesign) + +### 7. N+1 Query Patterns +**What:** ORM lazy loading causing N+1 queries + +**Detection:** +- Find loops with database queries inside +- Check ORM patterns: `users.forEach(u => u.getPosts())` + +**Severity:** +- **CRITICAL:** N+1 in API endpoint (performance disaster) +- **HIGH:** N+1 in frequent operations +- **MEDIUM:** N+1 in admin panel + +**Recommendation:** Use eager loading, batch queries, JOIN + +**Effort:** M (change ORM query) + +### 8. Constants Management (NEW) +**What:** Magic numbers/strings, decentralized constants, duplicates + +**Detection:** + +| Issue | Pattern | Example | +|-------|---------|---------| +| Magic numbers | Hardcoded numbers in conditions/calculations | `if (status === 2)` | +| Magic strings | Hardcoded strings in comparisons | `if (role === 'admin')` | +| Decentralized | Constants scattered across files | `MAX_SIZE = 100` in 5 files | +| Duplicates | Same value multiple times | `STATUS_ACTIVE = 1` in 3 places | +| No central file | Missing `constants.ts` or `config.py` | No single source of truth | + +**Severity:** +- **HIGH:** Magic numbers in business logic (payment amounts, statuses) +- **MEDIUM:** Duplicate constants (same value defined 3+ times) +- **MEDIUM:** No central constants file +- **LOW:** Magic strings in logging/debugging + +**Recommendation:** +- Create central constants file (`constants.ts`, `config.py`, `constants.go`) +- Extract magic numbers to named constants: `const STATUS_ACTIVE = 1` +- Consolidate duplicates, import from central file +- Use enums for related constants + +**Effort:** M (extract constants, update imports, consolidate) + +### 9. Method Signature Quality +**What:** Poor method contracts reducing readability and maintainability + +**Detection:** + +| Issue | Pattern | Example | +|-------|---------|---------| +| Boolean flag params | >=2 boolean params in signature | `def process(data, is_async: bool, skip_validation: bool)` | +| Too many optional params | >=3 optional params with defaults | `def query(db, limit=10, offset=0, sort="id", order="asc")` | +| Inconsistent verb naming | Different verbs for same operation type in one module | `get_user()` vs `fetch_account()` vs `load_profile()` | +| Unclear return type | `-> dict`, `-> Any`, `-> tuple` without TypedDict/NamedTuple | `def get_stats() -> dict` instead of `-> StatsResponse` | + +**Severity:** +- **MEDIUM:** Boolean flag params (use enum/strategy), unclear return types +- **LOW:** Too many optional params, inconsistent naming + +**Recommendation:** +- Boolean flags: replace with enum, strategy pattern, or separate methods +- Optional params: group into config/options dataclass +- Naming: standardize verb conventions per module (`get_` for sync, `fetch_` for async, etc.) +- Return types: use TypedDict, NamedTuple, or dataclass instead of raw dict/tuple + +**Effort:** S-M (refactor signatures + callers) + +## Scoring Algorithm + +See `shared/references/audit_scoring.md` for unified formula and score interpretation. + +## Output Format + +Return JSON to coordinator: + +**Global mode output:** +```json +{ + "category": "Code Quality", + "score": 6, + "total_issues": 12, + "critical": 1, + "high": 3, + "medium": 5, + "low": 3, + "checks": [ + {"id": "cyclomatic_complexity", "name": "Cyclomatic Complexity", "status": "failed", "details": "2 functions exceed threshold"}, + {"id": "deep_nesting", "name": "Deep Nesting", "status": "warning", "details": "1 function with 5 levels"}, + {"id": "long_methods", "name": "Long Methods", "status": "passed", "details": "No methods exceed 50 lines"}, + {"id": "magic_numbers", "name": "Magic Numbers", "status": "failed", "details": "5 magic numbers found"} + ], + "findings": [...] +} +``` + +**Domain-aware mode output (NEW):** +```json +{ + "category": "Code Quality", + "score": 7, + "domain": "orders", + "scan_path": "src/orders", + "total_issues": 8, + "critical": 0, + "high": 2, + "medium": 4, + "low": 2, + "checks": [ + {"id": "cyclomatic_complexity", "name": "Cyclomatic Complexity", "status": "failed", "details": "1 function exceeds threshold"}, + {"id": "deep_nesting", "name": "Deep Nesting", "status": "passed", "details": "No deep nesting detected"}, + {"id": "long_methods", "name": "Long Methods", "status": "passed", "details": "No methods exceed 50 lines"}, + {"id": "magic_numbers", "name": "Magic Numbers", "status": "warning", "details": "1 magic number found"} + ], + "findings": [ + { + "severity": "HIGH", + "location": "src/orders/services/OrderService.ts:120", + "issue": "Cyclomatic complexity 22 (threshold: 10)", + "principle": "Code Complexity / Maintainability", + "recommendation": "Split into smaller methods", + "effort": "M", + "domain": "orders" + }, + { + "severity": "MEDIUM", + "location": "src/orders/controllers/OrderController.ts:45", + "issue": "Magic number '3' used for order status", + "principle": "Constants Management", + "recommendation": "Extract: const ORDER_STATUS_SHIPPED = 3", + "effort": "S", + "domain": "orders" + } + ] +} +``` + +## Critical Rules + +- **Do not auto-fix:** Report only +- **Domain-aware scanning:** If `domain_mode="domain-aware"`, scan ONLY `scan_path` (not entire codebase) +- **Tag findings:** Include `domain` field in each finding when domain-aware +- **Context-aware:** Small functions (n < 100) with O(n²) may be acceptable +- **Constants detection:** Exclude test files, configs, examples +- **Metrics tools:** Use existing tools when available (ESLint complexity plugin, radon, gocyclo) + +## Definition of Done + +- contextStore parsed (including domain_mode and current_domain) +- scan_path determined (domain path or codebase root) +- All 9 checks completed (scoped to scan_path): + - complexity, nesting, length, god classes, parameters, O(n²), N+1, constants, method signatures +- Findings collected with severity, location, effort, recommendation, domain +- Score calculated +- JSON returned to coordinator with domain metadata + +## Reference Files + +- **Audit scoring formula:** `shared/references/audit_scoring.md` +- **Audit output schema:** `shared/references/audit_output_schema.md` +- Code quality rules: [references/code_quality_rules.md](references/code_quality_rules.md) + +--- +**Version:** 3.0.0 +**Last Updated:** 2025-12-23 diff --git a/.claude/skills/code-quality-checker/SKILL.md b/.claude/skills/code-quality-checker/SKILL.md new file mode 100644 index 0000000..a56d183 --- /dev/null +++ b/.claude/skills/code-quality-checker/SKILL.md @@ -0,0 +1,207 @@ +--- +name: ln-501-code-quality-checker +description: "Worker that checks DRY/KISS/YAGNI/architecture compliance with quantitative Code Quality Score. Validates architectural decisions via MCP Ref: (1) Optimality - is chosen approach the best? (2) Compliance - does it follow best practices? (3) Performance - algorithms, configs, bottlenecks. Reports issues with SEC-, PERF-, MNT-, ARCH-, BP-, OPT- prefixes." +--- + +# Code Quality Checker + +Analyzes Done implementation tasks with quantitative Code Quality Score based on metrics, MCP Ref validation, and issue penalties. + +## Purpose & Scope +- Load Story and Done implementation tasks (exclude test tasks) +- Calculate Code Quality Score using metrics and issue penalties +- **MCP Ref validation:** Verify optimality, best practices, and performance via external sources +- Check for DRY/KISS/YAGNI violations, architecture boundary breaks, security issues +- Produce quantitative verdict with structured issue list; never edits Linear or kanban + +## Code Metrics + +| Metric | Threshold | Penalty | +|--------|-----------|---------| +| **Cyclomatic Complexity** | ≤10 OK, 11-20 warning, >20 fail | -5 (warning), -10 (fail) per function | +| **Function size** | ≤50 lines OK, >50 warning | -3 per function | +| **File size** | ≤500 lines OK, >500 warning | -5 per file | +| **Nesting depth** | ≤3 OK, >3 warning | -3 per instance | +| **Parameter count** | ≤4 OK, >4 warning | -2 per function | + +## Code Quality Score + +Formula: `Code Quality Score = 100 - metric_penalties - issue_penalties` + +**Issue penalties by severity:** + +| Severity | Penalty | Examples | +|----------|---------|----------| +| **high** | -20 | Security vulnerability, O(n²)+ algorithm, N+1 query | +| **medium** | -10 | DRY violation, suboptimal approach, missing config | +| **low** | -3 | Naming convention, minor code smell | + +**Score interpretation:** + +| Score | Status | Verdict | +|-------|--------|---------| +| 90-100 | Excellent | PASS | +| 70-89 | Acceptable | CONCERNS | +| <70 | Below threshold | ISSUES_FOUND | + +## Issue Prefixes + +| Prefix | Category | Default Severity | MCP Ref | +|--------|----------|------------------|---------| +| SEC- | Security (auth, validation, secrets) | high | — | +| PERF- | Performance (algorithms, configs, bottlenecks) | medium/high | ✓ Required | +| MNT- | Maintainability (DRY, SOLID, complexity) | medium | — | +| ARCH- | Architecture (layers, boundaries, patterns) | medium | — | +| BP- | Best Practices (implementation differs from recommended) | medium | ✓ Required | +| OPT- | Optimality (better approach exists for this goal) | medium | ✓ Required | + +**PERF- subcategories:** + +| Prefix | Category | Severity | +|--------|----------|----------| +| PERF-ALG- | Algorithm complexity (Big O) | high if O(n²)+ | +| PERF-CFG- | Package/library configuration | medium | +| PERF-PTN- | Architectural pattern performance | high | +| PERF-DB- | Database queries, indexes | high | + +## When to Use +- **Invoked by ln-500-story-quality-gate** Pass 1 (first gate) +- All implementation tasks in Story status = Done +- Before regression testing (ln-502) and test planning (ln-510) + +## Workflow (concise) +1) Load Story (full) and Done implementation tasks (full descriptions) via Linear; skip tasks with label "tests". +2) Collect affected files from tasks (Affected Components/Existing Code Impact) and recent commits/diffs if noted. +3) **Calculate code metrics:** + - Cyclomatic Complexity per function (target ≤10) + - Function size (target ≤50 lines) + - File size (target ≤500 lines) + - Nesting depth (target ≤3) + - Parameter count (target ≤4) + +3.5) **MCP Ref Validation (MANDATORY for code changes):** + + **Level 1 — OPTIMALITY (OPT-):** + - Extract goal from task (e.g., "user authentication", "caching", "API rate limiting") + - Research alternatives: `ref_search_documentation("{goal} approaches comparison {tech_stack} 2026")` + - Compare chosen approach vs alternatives for project context + - Flag suboptimal choices as OPT- issues + + **Level 2 — BEST PRACTICES (BP-):** + - Research: `ref_search_documentation("{chosen_approach} best practices {tech_stack} 2026")` + - For libraries: `query-docs(library_id, "best practices implementation patterns")` + - Flag deviations from recommended patterns as BP- issues + + **Level 3 — PERFORMANCE (PERF-):** + - **PERF-ALG:** Analyze algorithm complexity (detect O(n²)+, research optimal via MCP Ref) + - **PERF-CFG:** Check library configs (connection pooling, batch sizes, timeouts) via `query-docs` + - **PERF-PTN:** Research pattern pitfalls: `ref_search_documentation("{pattern} performance bottlenecks")` + - **PERF-DB:** Check for N+1, missing indexes via `query-docs(orm_library_id, "query optimization")` + + **Triggers for MCP Ref validation:** + - New dependency added (package.json/requirements.txt changed) + - New pattern/library used + - API/database changes + - Loops/recursion in critical paths + - ORM queries added + +4) **Analyze code for static issues (assign prefixes):** + - SEC-: hardcoded creds, unvalidated input, SQL injection, race conditions + - MNT-: DRY violations, dead code, complex conditionals, poor naming + - ARCH-: layer violations, circular dependencies, guide non-compliance + +5) **Calculate Code Quality Score:** + - Start with 100 + - Subtract metric penalties (see Code Metrics table) + - Subtract issue penalties (see Issue penalties table) + +6) Output verdict with score and structured issues. Add Linear comment with findings. + +## Critical Rules +- Read guides mentioned in Story/Tasks before judging compliance. +- **MCP Ref validation:** For ANY architectural change, MUST verify via ref_search_documentation before judging. +- **Context7 for libraries:** When reviewing library usage, query-docs to verify correct patterns. +- Language preservation in comments (EN/RU). +- Do not create tasks or change statuses; caller decides next actions. + +## Definition of Done +- Story and Done implementation tasks loaded (test tasks excluded). +- Code metrics calculated (Cyclomatic Complexity, function/file sizes). +- **MCP Ref validation completed:** + - OPT-: Optimality checked (is chosen approach the best for the goal?) + - BP-: Best practices verified (correct implementation of chosen approach?) + - PERF-: Performance analyzed (algorithms, configs, patterns, DB) +- Issues identified with prefixes and severity, sources from MCP Ref/Context7. +- Code Quality Score calculated. +- **Output format:** + ```yaml + verdict: PASS | CONCERNS | ISSUES_FOUND + code_quality_score: {0-100} + metrics: + avg_cyclomatic_complexity: {value} + functions_over_50_lines: {count} + files_over_500_lines: {count} + issues: + # OPTIMALITY + - id: "OPT-001" + severity: medium + file: "src/auth/index.ts" + goal: "User session management" + finding: "Suboptimal approach for session management" + chosen: "Custom JWT with localStorage" + recommended: "httpOnly cookies + refresh token rotation" + reason: "httpOnly cookies prevent XSS token theft" + source: "ref://owasp-session-management" + + # BEST PRACTICES + - id: "BP-001" + severity: medium + file: "src/api/routes.ts" + finding: "POST for idempotent operation" + best_practice: "Use PUT for idempotent updates (RFC 7231)" + source: "ref://api-design-guide#idempotency" + + # PERFORMANCE - Algorithm + - id: "PERF-ALG-001" + severity: high + file: "src/utils/search.ts:42" + finding: "Nested loops cause O(n²) complexity" + current: "O(n²) - nested filter().find()" + optimal: "O(n) - use Map/Set for lookup" + source: "ref://javascript-performance#data-structures" + + # PERFORMANCE - Config + - id: "PERF-CFG-001" + severity: medium + file: "src/db/connection.ts" + finding: "Missing connection pool config" + current_config: "default (pool: undefined)" + recommended: "pool: { min: 2, max: 10 }" + source: "context7://pg#connection-pooling" + + # PERFORMANCE - Database + - id: "PERF-DB-001" + severity: high + file: "src/repositories/user.ts:89" + finding: "N+1 query pattern detected" + issue: "users.map(u => u.posts) triggers N queries" + solution: "Use eager loading: include: { posts: true }" + source: "context7://prisma#eager-loading" + + # MAINTAINABILITY + - id: "MNT-001" + severity: medium + file: "src/service.ts:42" + finding: "DRY violation: duplicate validation logic" + suggested_action: "Extract to shared validator" + ``` +- Linear comment posted with findings. + +## Reference Files +- Code metrics: `references/code_metrics.md` (thresholds and penalties) +- Guides: `docs/guides/` +- Templates for context: `shared/templates/task_template_implementation.md` + +--- +**Version:** 5.0.0 (Added 3-level MCP Ref validation: Optimality, Best Practices, Performance with PERF-ALG/CFG/PTN/DB subcategories) +**Last Updated:** 2026-01-29 diff --git a/.claude/skills/code-refactoring/SKILL.md b/.claude/skills/code-refactoring/SKILL.md new file mode 100755 index 0000000..fdee8a2 --- /dev/null +++ b/.claude/skills/code-refactoring/SKILL.md @@ -0,0 +1,111 @@ +--- +name: code-refactoring +description: 코드 리팩토링 권장사항, 성능 분석, 구체적인 코드 패치를 제공합니다. 리팩토링, 코드 개선, 성능 최적화 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep +--- + +# Code Refactoring + +코드 품질 개선을 위한 리팩토링 분석 및 권장사항을 제공하는 스킬입니다. + +## 기능 + +### 분석 영역 +- **코드 스멜 탐지**: 중복 코드, 긴 메서드, 거대 클래스 +- **복잡도 분석**: 순환 복잡도, 인지 복잡도 +- **의존성 분석**: 결합도, 응집도 평가 +- **성능 이슈**: 비효율적 알고리즘, N+1 쿼리 +- **가독성**: 네이밍, 구조화, 주석 품질 + +### 리팩토링 패턴 +- Extract Method / Extract Class +- Replace Conditional with Polymorphism +- Introduce Parameter Object +- Replace Magic Number with Symbolic Constant +- Decompose Conditional +- Replace Nested Conditional with Guard Clauses + +### 출력 +- 문제점 상세 설명 +- 리팩토링 전후 코드 비교 +- 구체적인 수정 패치 +- 성능 영향 분석 + +## 분석 프로세스 + +1. 코드베이스 스캔 +2. 코드 스멜 및 안티패턴 탐지 +3. 복잡도 메트릭 계산 +4. 개선 우선순위 산정 +5. 리팩토링 제안 생성 +6. 전후 비교 코드 제공 + +## 리포트 구조 + +```markdown +# 리팩토링 분석 리포트 + +## 요약 +- 분석 파일: N개 +- 발견된 코드 스멜: N개 +- 권장 리팩토링: N건 + +## 🔴 High Impact 리팩토링 + +### 1. [파일명] 긴 메서드 분리 +**현재 상태** +- 메서드: `processOrder()` +- 라인 수: 150줄 +- 순환 복잡도: 25 + +**문제점** +- 단일 책임 원칙 위반 +- 테스트 어려움 +- 유지보수 복잡 + +**권장 리팩토링: Extract Method** + +Before: +```java +public void processOrder(Order order) { + // 150줄의 복잡한 로직 +} +``` + +After: +```java +public void processOrder(Order order) { + validateOrder(order); + calculateTotal(order); + applyDiscounts(order); + processPayment(order); + sendConfirmation(order); +} + +private void validateOrder(Order order) { ... } +private void calculateTotal(Order order) { ... } +// ... +``` + +**예상 효과** +- 복잡도: 25 → 5 +- 테스트 용이성 향상 +- 재사용성 증가 + +## 🟡 Medium Impact 리팩토링 +... + +## 성능 최적화 제안 +... +``` + +## 사용 예시 + +``` +이 코드를 리팩토링 해줘 +src 폴더의 코드 품질을 분석하고 개선점을 알려줘 +이 함수의 복잡도를 낮추는 방법을 제안해줘 +``` + +## 출처 +Original skill from skills.cokac.com diff --git a/.claude/skills/codebase-analysis-web-report/SKILL.md b/.claude/skills/codebase-analysis-web-report/SKILL.md new file mode 100755 index 0000000..689f1eb --- /dev/null +++ b/.claude/skills/codebase-analysis-web-report/SKILL.md @@ -0,0 +1,70 @@ +--- +name: codebase-analysis-web-report +description: 코드베이스를 분석하여 아키텍처, 호출/데이터 흐름 그래프, 인터랙티브 다이어그램, 검색 기능이 포함된 자체 완결형 HTML 리포트를 생성합니다. 저장소 분석, 프로젝트 디렉토리 분석, 소스 파일 분석 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep, Bash +--- + +# Codebase Analysis Web Report Generator + +코드베이스를 분석하여 자체 완결형 인터랙티브 HTML 리포트를 생성하는 스킬입니다. + +## 기능 + +### 입력 처리 +- 저장소 URL, 파일 업로드, 디렉토리 경로 지원 +- 프레임워크별 분석 지원 (React, Node, Flask, PHP 등) +- 대규모 코드베이스의 경우 자동 범위 지정 또는 사용자 지정 요청 + +### 분석 구성요소 +- 모듈, 클래스, 함수, API 추출을 위한 정적 코드 분석 +- 호출 관계 매핑 및 의존성 추출 +- 메트릭 계산 (LOC, 복잡도 추정) +- 진입점 및 통합 지점 식별 + +### 출력 생성 +- 제어/데이터 흐름 그래프 (개략적 및 세부적) +- 모듈 설명이 포함된 텍스트 요약 +- 우선순위가 지정된 개선 권장사항이 포함된 발견사항 섹션 +- 네비게이션, 인터랙티브 다이어그램, 검색 기능, 소스 코드 미리보기가 포함된 자체 완결형 HTML 리포트 + +## 구현 노트 + +- 가능한 경우 AST 파싱 사용; 그 외에는 정규식 휴리스틱 사용 +- 인터랙티브 다이어그램에 Mermaid 또는 Cytoscape.js 우선 사용 +- 샘플링 또는 범위 제한을 통해 대규모 저장소 처리 +- 프레임워크별 구조 표시 (React 컴포넌트, 라우팅, DB 접근 패턴) + +## 리포트 구조 + +```html + + + + + 코드베이스 분석 리포트 + + + + + + + + + + + + + + +``` + +## 사용 예시 + +``` +이 프로젝트의 코드베이스를 분석해서 HTML 리포트로 만들어줘 +src 폴더의 아키텍처를 분석하고 다이어그램으로 시각화해줘 +이 저장소의 구조를 분석해서 웹 문서로 생성해줘 +``` + +## 출처 +Original skill by Dongchan Lee (@vluylbhtqq) from skills.cokac.com diff --git a/.claude/skills/concurrency-auditor/SKILL.md b/.claude/skills/concurrency-auditor/SKILL.md new file mode 100644 index 0000000..8dbd3a4 --- /dev/null +++ b/.claude/skills/concurrency-auditor/SKILL.md @@ -0,0 +1,194 @@ +--- +name: ln-628-concurrency-auditor +description: Concurrency audit worker (L3). Checks race conditions, missing async/await, resource contention, thread safety, deadlock potential. Returns findings with severity, location, effort, recommendations. +allowed-tools: Read, Grep, Glob, Bash +--- + +# Concurrency Auditor (L3 Worker) + +Specialized worker auditing concurrency and async patterns. + +## Purpose & Scope + +- **Worker in ln-620 coordinator pipeline** +- Audit **concurrency** (Category 11: High Priority) +- Check race conditions, async/await, thread safety +- Calculate compliance score (X/10) + +## Inputs (from Coordinator) + +Receives `contextStore` with tech stack, language, codebase root. + +## Workflow + +1) Parse context +2) Check concurrency patterns +3) Collect findings +4) Calculate score +5) Return JSON + +## Audit Rules + +### 1. Race Conditions +**What:** Shared state modified without synchronization + +**Detection Patterns:** + +| Language | Pattern | Grep | +|----------|---------|------| +| Python | Global modified in async | `global\s+\w+` inside `async def` | +| TypeScript | Module-level let in async | `^let\s+\w+` at file scope + async function modifies it | +| Go | Map access without mutex | `map\[.*\].*=` without `sync.Mutex` in same file | +| All | Shared cache | `cache\[.*\]\s*=` or `cache\.set` without lock | + +**Severity:** +- **CRITICAL:** Race in payment/auth (`payment`, `balance`, `auth`, `token` in variable name) +- **HIGH:** Race in user-facing feature +- **MEDIUM:** Race in background job + +**Recommendation:** Use locks, atomic operations, message queues + +**Effort:** M-L + +### 2. Missing Async/Await +**What:** Callback hell or unhandled promises + +**Detection Patterns:** + +| Issue | Grep | Example | +|-------|------|---------| +| Callback hell | `\.then\(.*\.then\(.*\.then\(` | `.then().then().then()` | +| Fire-and-forget | `async.*\(\)` not preceded by `await` | `saveToDb()` without await | +| Missing await | `return\s+new\s+Promise` in async function | Should just `return await` or `return` value | +| Dangling promise | `\.catch\(\s*\)` | Empty catch swallows errors | + +**Severity:** +- **HIGH:** Fire-and-forget async (can cause data loss) +- **MEDIUM:** Callback hell (hard to maintain) +- **LOW:** Mixed Promise styles + +**Recommendation:** Convert to async/await, always await or handle promises + +**Effort:** M + +### 3. Resource Contention +**What:** Multiple processes competing for same resource + +**Detection Patterns:** + +| Issue | Grep | Example | +|-------|------|---------| +| File lock missing | `open\(.*["']w["']\)` without `flock` or `lockfile` | Concurrent file writes | +| Connection exhaustion | `create_engine\(.*pool_size` check if pool_size < 5 | DB pool too small | +| Concurrent writes | `writeFile` or `fs\.write` without lock check | File corruption risk | + +**Severity:** +- **HIGH:** File corruption risk, DB exhaustion +- **MEDIUM:** Performance degradation + +**Recommendation:** Use connection pooling, file locking, `asyncio.Lock` + +**Effort:** M + +### 4. Thread Safety Violations +**What:** Shared mutable state without synchronization + +**Detection Patterns:** + +| Language | Safe Pattern | Unsafe Pattern | +|----------|--------------|----------------| +| Go | `sync.Mutex` with map | `map[...]` without Mutex in same struct | +| Rust | `Arc>` | `Rc>` in multi-threaded context | +| Java | `synchronized` or `ConcurrentHashMap` | `HashMap` shared between threads | +| Python | `threading.Lock` | Global dict modified in threads | + +**Grep patterns:** +- Go unsafe: `type.*struct\s*{[^}]*map\[` without `sync.Mutex` in same struct +- Python unsafe: `global\s+\w+` in function + `threading.Thread` in same file + +**Severity:** **HIGH** (data corruption possible) + +**Recommendation:** Use thread-safe primitives + +**Effort:** M + +### 5. Deadlock Potential +**What:** Lock acquisition in inconsistent order + +**Detection Patterns:** + +| Issue | Grep | Example | +|-------|------|---------| +| Nested locks | `with\s+\w+_lock:.*with\s+\w+_lock:` (multiline) | Lock A then Lock B | +| Lock in loop | `for.*:.*\.acquire\(\)` | Lock acquired repeatedly without release | +| Lock + external call | `.acquire\(\)` followed by `await` or `requests.` | Holding lock during I/O | + +**Severity:** **HIGH** (deadlock freezes application) + +**Recommendation:** Consistent lock ordering, timeout locks (`asyncio.wait_for`) + +**Effort:** L + +### 6. Blocking I/O in Event Loop (Python asyncio) +**What:** Synchronous blocking calls inside async functions + +**Detection Patterns:** + +| Blocking Call | Grep in `async def` | Replacement | +|---------------|---------------------|-------------| +| `time.sleep` | `time\.sleep` inside async def | `await asyncio.sleep` | +| `requests.` | `requests\.(get\|post)` inside async def | `httpx` or `aiohttp` | +| `open()` file | `open\(` inside async def | `aiofiles.open` | + +**Severity:** +- **HIGH:** Blocks entire event loop +- **MEDIUM:** Minor blocking (<100ms) + +**Recommendation:** Use async alternatives + +**Effort:** S-M + +## Scoring Algorithm + +See `shared/references/audit_scoring.md` for unified formula and score interpretation. + +## Output Format + +```json +{ + "category": "Concurrency", + "score": 7, + "total_issues": 4, + "critical": 0, + "high": 2, + "medium": 2, + "low": 0, + "checks": [ + {"id": "race_conditions", "name": "Race Conditions", "status": "passed", "details": "No shared state modified without synchronization"}, + {"id": "missing_await", "name": "Missing Await", "status": "failed", "details": "2 fire-and-forget async calls found"}, + {"id": "resource_contention", "name": "Resource Contention", "status": "warning", "details": "DB pool_size=3 may be insufficient"}, + {"id": "thread_safety", "name": "Thread Safety", "status": "passed", "details": "All shared state properly synchronized"}, + {"id": "deadlock_potential", "name": "Deadlock Potential", "status": "passed", "details": "No nested locks or inconsistent ordering"}, + {"id": "blocking_io", "name": "Blocking I/O", "status": "failed", "details": "time.sleep in async context"} + ], + "findings": [ + { + "severity": "HIGH", + "location": "src/services/payment.ts:45", + "issue": "Shared state 'balanceCache' modified without synchronization", + "principle": "Thread Safety / Concurrency Control", + "recommendation": "Use mutex or atomic operations for balanceCache updates", + "effort": "M" + } + ] +} +``` + +## Reference Files + +- **Audit scoring formula:** `shared/references/audit_scoring.md` +- **Audit output schema:** `shared/references/audit_output_schema.md` + +--- +**Version:** 3.0.0 +**Last Updated:** 2025-12-23 diff --git a/.claude/skills/coverage-improvement-planner/SKILL.md b/.claude/skills/coverage-improvement-planner/SKILL.md new file mode 100755 index 0000000..3d00f68 --- /dev/null +++ b/.claude/skills/coverage-improvement-planner/SKILL.md @@ -0,0 +1,96 @@ +--- +name: coverage-improvement-planner +description: 테스트 커버리지를 분석하고 개선 계획을 수립하며 전후 비교 리포트를 생성합니다. 테스트 커버리지, 테스트 개선, 품질 향상 요청 시 활성화됩니다. +allowed-tools: Read, Write, Edit, Glob, Grep, Bash +--- + +# Coverage Improvement Planner + +테스트 커버리지를 분석하고 체계적인 개선 계획을 수립하는 스킬입니다. + +## 기능 + +### 분석 항목 +- **라인 커버리지**: 실행된 코드 라인 비율 +- **브랜치 커버리지**: 조건문 분기 테스트 비율 +- **함수 커버리지**: 테스트된 함수 비율 +- **파일 커버리지**: 테스트가 있는 파일 비율 + +### 개선 계획 수립 +- 미테스트 코드 영역 식별 +- 우선순위 기반 테스트 추가 권장 +- 복잡도 높은 코드 집중 분석 +- 테스트 케이스 템플릿 제공 + +### 지원 프레임워크 +- Jest (JavaScript/TypeScript) +- pytest (Python) +- JUnit (Java/Kotlin) +- PHPUnit (PHP) +- Go test + +## 워크플로우 + +1. 현재 커버리지 수집 및 분석 +2. 커버리지 갭 식별 +3. 비즈니스 중요도 기반 우선순위 산정 +4. 테스트 케이스 템플릿 생성 +5. 구현 후 전후 비교 리포트 생성 + +## 리포트 구조 + +```markdown +# 테스트 커버리지 개선 계획 + +## 현재 상태 +| 메트릭 | 현재 | 목표 | 갭 | +|--------|------|------|-----| +| 라인 커버리지 | 65% | 80% | 15% | +| 브랜치 커버리지 | 45% | 70% | 25% | +| 함수 커버리지 | 70% | 85% | 15% | + +## 우선순위별 개선 대상 + +### 🔴 High Priority (비즈니스 크리티컬) +1. **payment/checkout.js** + - 현재: 30% | 목표: 90% + - 미테스트 함수: processPayment, validateCard + - 권장 테스트 케이스: 5개 + +### 🟡 Medium Priority +... + +### 🟢 Low Priority +... + +## 권장 테스트 케이스 + +### checkout.test.js +```javascript +describe('processPayment', () => { + test('성공적인 결제 처리', () => { + // 테스트 코드 + }); + + test('잘못된 카드 정보 처리', () => { + // 테스트 코드 + }); +}); +``` + +## 예상 결과 +- 개선 후 예상 라인 커버리지: 82% +- 추가 테스트 케이스: 23개 +- 예상 소요 시간: 개발자 판단 +``` + +## 사용 예시 + +``` +테스트 커버리지를 분석하고 개선 계획을 세워줘 +커버리지를 80%로 올리려면 어떤 테스트가 필요해? +미테스트 코드 영역을 찾아서 테스트 템플릿을 만들어줘 +``` + +## 출처 +Original skill from skills.cokac.com diff --git a/.claude/skills/dead-code-auditor/SKILL.md b/.claude/skills/dead-code-auditor/SKILL.md new file mode 100644 index 0000000..d6ff905 --- /dev/null +++ b/.claude/skills/dead-code-auditor/SKILL.md @@ -0,0 +1,142 @@ +--- +name: ln-626-dead-code-auditor +description: Dead code & legacy audit worker (L3). Checks unreachable code, unused imports/variables/functions, commented-out code, backward compatibility shims, deprecated patterns. Returns findings. +allowed-tools: Read, Grep, Glob, Bash +--- + +# Dead Code Auditor (L3 Worker) + +Specialized worker auditing unused and unreachable code. + +## Purpose & Scope + +- **Worker in ln-620 coordinator pipeline** +- Audit **dead code** (Category 9: Low Priority) +- Find unused imports, variables, functions, commented-out code +- Calculate compliance score (X/10) + +## Inputs (from Coordinator) + +Receives `contextStore` with tech stack, codebase root. + +## Workflow + +1) Parse context +2) Run dead code detection (linters, grep) +3) Collect findings +4) Calculate score +5) Return JSON + +## Audit Rules + +### 1. Unreachable Code +**Detection:** +- Linter rules: `no-unreachable` (ESLint) +- Check code after `return`, `throw`, `break` + +**Severity:** MEDIUM + +### 2. Unused Imports/Variables/Functions +**Detection:** +- ESLint: `no-unused-vars` +- TypeScript: `noUnusedLocals`, `noUnusedParameters` +- Python: `flake8` with `F401`, `F841` + +**Severity:** +- **MEDIUM:** Unused functions (dead weight) +- **LOW:** Unused imports (cleanup needed) + +### 3. Commented-Out Code +**Detection:** +- Grep for `//.*{` or `/*.*function` patterns +- Large comment blocks (>10 lines) with code syntax + +**Severity:** LOW + +**Recommendation:** Delete (git preserves history) + +### 4. Legacy Code & Backward Compatibility +**What:** Backward compatibility shims, deprecated patterns, old code that should be removed + +**Detection:** +- Renamed variables/functions with old aliases: + - Pattern: `const oldName = newName` or `export { newModule as oldModule }` + - Pattern: `function oldFunc() { return newFunc(); }` (wrapper for backward compatibility) +- Deprecated exports/re-exports: + - Grep for `// DEPRECATED`, `@deprecated` JSDoc tags + - Pattern: `export.*as.*old.*` or `export.*legacy.*` +- Conditional code for old versions: + - Pattern: `if.*legacy.*` or `if.*old.*version.*` or `isOldVersion ? oldFunc() : newFunc()` +- Migration shims and adapters: + - Pattern: `migrate.*`, `Legacy.*Adapter`, `.*Shim`, `.*Compat` +- Comment markers: + - Grep for `// backward compatibility`, `// legacy support`, `// TODO: remove in v` + - Grep for `// old implementation`, `// deprecated`, `// kept for backward` + +**Severity:** +- **HIGH:** Backward compatibility shims in critical paths (auth, payment, core features) +- **MEDIUM:** Deprecated exports still in use, migration code from >6 months ago +- **LOW:** Recent migration code (<3 months), planned deprecation with clear removal timeline + +**Recommendation:** +- Remove backward compatibility shims - breaking changes are acceptable when properly versioned +- Delete old implementations - keep only the correct/new version +- Remove deprecated exports - update consumers to use new API +- Delete migration code after grace period (3-6 months) +- Clean legacy support comments - git history preserves old implementations + +**Effort:** +- **S:** Remove simple aliases, delete deprecated exports +- **M:** Refactor code using old APIs to new APIs +- **L:** Remove complex backward compatibility layer affecting multiple modules + +## Scoring Algorithm + +See `shared/references/audit_scoring.md` for unified formula and score interpretation. + +## Output Format + +```json +{ + "category": "Dead Code", + "score": 6, + "total_issues": 12, + "critical": 0, + "high": 2, + "medium": 3, + "low": 7, + "checks": [ + {"id": "unreachable_code", "name": "Unreachable Code", "status": "passed", "details": "No unreachable code detected"}, + {"id": "unused_exports", "name": "Unused Exports", "status": "failed", "details": "3 unused functions found"}, + {"id": "commented_code", "name": "Commented Code", "status": "warning", "details": "7 blocks of commented code"}, + {"id": "legacy_shims", "name": "Legacy Shims", "status": "failed", "details": "2 backward compatibility shims"} + ], + "findings": [ + { + "severity": "MEDIUM", + "location": "src/utils/helpers.ts:45", + "issue": "Function 'formatDate' is never used", + "principle": "Code Maintainability / Clean Code", + "recommendation": "Remove unused function or export if needed elsewhere", + "effort": "S" + }, + { + "severity": "HIGH", + "location": "src/api/v1/auth.ts:12-15", + "issue": "Backward compatibility shim for old password validation (6+ months old)", + "principle": "No Legacy Code / Clean Architecture", + "recommendation": "Remove old password validation, keep only new implementation. Update API version if breaking.", + "effort": "M" + } + ] +} +``` + +## Reference Files + +- **Audit scoring formula:** `shared/references/audit_scoring.md` +- **Audit output schema:** `shared/references/audit_output_schema.md` + +--- +**Version:** 3.0.0 +**Last Updated:** 2025-12-23 diff --git a/.claude/skills/dependencies-auditor/SKILL.md b/.claude/skills/dependencies-auditor/SKILL.md new file mode 100644 index 0000000..6606e22 --- /dev/null +++ b/.claude/skills/dependencies-auditor/SKILL.md @@ -0,0 +1,193 @@ +--- +name: ln-625-dependencies-auditor +description: "Dependencies audit worker (L3). Checks outdated packages, unused deps, reinvented wheels, vulnerability scan (CVE/CVSS). Supports mode: full | vulnerabilities_only." +allowed-tools: Read, Grep, Glob, Bash +--- + +# Dependencies & Reuse Auditor (L3 Worker) + +Specialized worker auditing dependency management, code reuse, and security vulnerabilities. + +## Purpose & Scope + +- **Worker in ln-620 coordinator pipeline** (full audit mode) +- **Worker in ln-760 security-setup pipeline** (vulnerabilities_only mode) +- Audit **dependencies and reuse** (Categories 7+8: Medium Priority) +- Check outdated packages, unused deps, wheel reinvention, **CVE vulnerabilities** +- Calculate compliance score (X/10) + +## Parameters + +| Param | Values | Default | Description | +|-------|--------|---------|-------------| +| mode | `full` / `vulnerabilities_only` | `full` | `full` = all 5 checks, `vulnerabilities_only` = only CVE scan | + +## Inputs (from Coordinator) + +Receives `contextStore` with tech stack, package manifest paths, codebase root. + +**From ln-620 (codebase-auditor):** mode=full (default) +**From ln-760 (security-setup):** mode=vulnerabilities_only + +## Workflow + +1) Parse context + mode parameter +2) Run dependency checks (based on mode) +3) Collect findings +4) Calculate score +5) Return JSON + +--- + +## Audit Rules (5 Checks) + +### 1. Outdated Packages +**Mode:** full only + +**Detection:** +- Run `npm outdated --json` (Node.js) +- Run `pip list --outdated --format=json` (Python) +- Run `cargo outdated --format=json` (Rust) + +**Severity:** +- **HIGH:** Major version behind (security risk) +- **MEDIUM:** Minor version behind +- **LOW:** Patch version behind + +**Recommendation:** Update to latest version, test for breaking changes + +**Effort:** S-M (update version, run tests) + +### 2. Unused Dependencies +**Mode:** full only + +**Detection:** +- Parse package.json/requirements.txt +- Grep codebase for `import`/`require` statements +- Find dependencies never imported + +**Severity:** +- **MEDIUM:** Unused production dependency (bloats bundle) +- **LOW:** Unused dev dependency + +**Recommendation:** Remove from package manifest + +**Effort:** S (delete line, test) + +### 3. Available Features Not Used +**Mode:** full only + +**Detection:** +- Check for axios when native fetch available (Node 18+) +- Check for lodash when Array methods sufficient +- Check for moment when Date.toLocaleString sufficient + +**Severity:** +- **MEDIUM:** Unnecessary dependency (increases bundle size) + +**Recommendation:** Use native alternative + +**Effort:** M (refactor code to use native API) + +### 4. Custom Implementations +**Mode:** full only + +**Detection:** +- Grep for custom sorting algorithms +- Check for hand-rolled validation (vs validator.js) +- Find custom date parsing (vs date-fns/dayjs) + +**Severity:** +- **HIGH:** Custom crypto (security risk) +- **MEDIUM:** Custom utilities with well-tested alternatives + +**Recommendation:** Replace with established library + +**Effort:** M (integrate library, replace calls) + +### 5. Vulnerability Scan (CVE/CVSS) +**Mode:** full AND vulnerabilities_only + +**Detection:** +- Detect ecosystems: npm, NuGet, pip, Go, Bundler, Cargo, Composer +- Run audit commands per `references/vulnerability_commands.md` +- Parse results with CVSS mapping per `shared/references/cvss_severity_mapping.md` + +**Severity:** +- **CRITICAL:** CVSS 9.0-10.0 (immediate fix required) +- **HIGH:** CVSS 7.0-8.9 (fix within 48h) +- **MEDIUM:** CVSS 4.0-6.9 (fix within 1 week) +- **LOW:** CVSS 0.1-3.9 (fix when convenient) + +**Fix Classification:** +- Patch update (x.x.Y) → safe auto-fix +- Minor update (x.Y.0) → usually safe +- Major update (Y.0.0) → manual review required +- No fix available → document and monitor + +**Recommendation:** Update to fixed version, verify lock file integrity + +**Effort:** S-L (depends on breaking changes) + +--- + +## Scoring Algorithm + +See `shared/references/audit_scoring.md` for unified formula and score interpretation. + +**Note:** When mode=vulnerabilities_only, score based only on vulnerability findings. + +## Output Format + +```json +{ + "category": "Dependencies & Reuse", + "mode": "full", + "score": 7, + "total_issues": 12, + "critical": 1, + "high": 3, + "medium": 5, + "low": 3, + "checks": [ + {"id": "outdated_packages", "name": "Outdated Packages", "status": "failed", "details": "2 packages behind major versions"}, + {"id": "unused_deps", "name": "Unused Dependencies", "status": "warning", "details": "4 unused dev dependencies"}, + {"id": "available_natives", "name": "Available Natives", "status": "passed", "details": "No unnecessary polyfills"}, + {"id": "custom_implementations", "name": "Custom Implementations", "status": "warning", "details": "2 custom utilities found"}, + {"id": "vulnerability_scan", "name": "Vulnerability Scan (CVE)", "status": "failed", "details": "1 critical, 2 high vulnerabilities"} + ], + "findings": [ + { + "severity": "CRITICAL", + "location": "package.json", + "issue": "lodash@4.17.15 has CVE-2021-23337 (CVSS 7.2)", + "principle": "Security / Vulnerability Management", + "recommendation": "Update to lodash@4.17.21", + "effort": "S", + "fix_type": "patch" + }, + { + "severity": "HIGH", + "location": "package.json:15", + "issue": "express v4.17.0 (current: v4.19.2, 2 major versions behind)", + "principle": "Dependency Management / Security Updates", + "recommendation": "Update to v4.19.2 for security fixes", + "effort": "M" + } + ] +} +``` + +## Reference Files + +| File | Purpose | +|------|---------| +| `references/vulnerability_commands.md` | Ecosystem-specific audit commands | +| `references/ci_integration_guide.md` | CI/CD integration guidance | +| `shared/references/cvss_severity_mapping.md` | CVSS to severity level mapping | +| `shared/references/audit_scoring.md` | Audit scoring formula | +| `shared/references/audit_output_schema.md` | Audit output schema | + +--- +**Version:** 4.0.0 +**Last Updated:** 2026-02-05 diff --git a/.claude/skills/design-skill/SKILL.md b/.claude/skills/design-skill/SKILL.md new file mode 100755 index 0000000..c0d725c --- /dev/null +++ b/.claude/skills/design-skill/SKILL.md @@ -0,0 +1,949 @@ +--- +name: design-skill +description: 프레젠테이션 슬라이드를 미려한 HTML로 디자인. 슬라이드 HTML 생성, 시각적 디자인, 레이아웃 구성이 필요할 때 사용. +--- + +# Design Skill - 프로페셔널 프레젠테이션 디자인 시스템 + +최고 수준의 비즈니스 프레젠테이션을 위한 HTML 슬라이드 디자인 스킬입니다. +미니멀하고 세련된 디자인, 전문적인 타이포그래피, 정교한 레이아웃을 제공합니다. + +--- + +## 핵심 디자인 철학 + +### 1. Less is More +- 불필요한 장식 요소 제거 +- 콘텐츠가 주인공이 되는 디자인 +- 여백(Whitespace)을 적극 활용 +- 시각적 계층 구조 명확화 + +### 2. 타이포그래피 중심 디자인 +- Pretendard를 기본 폰트로 사용 +- 폰트 크기 대비로 시각적 임팩트 생성 +- 자간과 행간의 섬세한 조절 +- 웨이트 변화로 강조점 표현 + +### 3. 전략적 색상 사용 +- 제한된 색상 팔레트 (2-3색) +- 모노톤 기반 + 포인트 컬러 +- 배경색으로 분위기 연출 +- 고대비로 가독성 확보 + +--- + +## 기본 설정 + +### 슬라이드 크기 (16:9 기본) +```html + +``` + +### 지원 비율 +| 비율 | 크기 | 용도 | +|------|------|------| +| 16:9 | 720pt × 405pt | 기본, 모니터/화면 | +| 4:3 | 720pt × 540pt | 구형 프로젝터 | +| 16:10 | 720pt × 450pt | 맥북 | + +### 기본 폰트 스택 +```css +font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; +``` + +### Pretendard 웹폰트 CDN +```html + +``` + +--- + +## 타이포그래피 시스템 + +### 폰트 크기 스케일 +| 용도 | 크기 | 웨이트 | 사용 예시 | +|------|------|--------|----------| +| Hero Title | 72-96pt | 700-800 | 표지 메인 타이틀 | +| Section Title | 48-60pt | 700 | 섹션 구분 제목 | +| Slide Title | 32-40pt | 600-700 | 슬라이드 제목 | +| Subtitle | 20-24pt | 500 | 부제목, 설명 | +| Body | 16-20pt | 400 | 본문 텍스트 | +| Caption | 12-14pt | 400 | 캡션, 출처 | +| Label | 10-12pt | 500-600 | 뱃지, 태그 | + +### 자간 설정 (letter-spacing) +```css +/* 대형 제목: 타이트하게 */ +letter-spacing: -0.02em; + +/* 중형 제목 */ +letter-spacing: -0.01em; + +/* 본문: 기본 */ +letter-spacing: 0; + +/* 캡션, 레이블: 약간 넓게 */ +letter-spacing: 0.02em; +``` + +### 행간 설정 (line-height) +```css +/* 제목 */ +line-height: 1.2; + +/* 본문 */ +line-height: 1.6 - 1.8; + +/* 한 줄 텍스트 */ +line-height: 1; +``` + +--- + +## 색상 팔레트 시스템 + +### 1. Executive Minimal (기본 권장) +세련된 비즈니스 프레젠테이션용 +```css +--bg-primary: #f5f5f0; /* 웜 화이트 배경 */ +--bg-secondary: #e8e8e3; /* 서브 배경 */ +--bg-dark: #1a1a1a; /* 다크 배경 */ +--text-primary: #1a1a1a; /* 메인 텍스트 */ +--text-secondary: #666666; /* 보조 텍스트 */ +--text-light: #999999; /* 약한 텍스트 */ +--accent: #1a1a1a; /* 강조 (검정) */ +--border: #d4d4d0; /* 테두리 */ +``` + +### 2. Sage Professional +차분하고 신뢰감 있는 톤 +```css +--bg-primary: #b8c4b8; /* 세이지 그린 배경 */ +--bg-secondary: #a3b0a3; /* 짙은 세이지 */ +--bg-light: #f8faf8; /* 밝은 배경 */ +--text-primary: #1a1a1a; /* 메인 텍스트 */ +--text-secondary: #3d3d3d; /* 보조 텍스트 */ +--accent: #2d2d2d; /* 강조 */ +--border: #9aa89a; /* 테두리 */ +``` + +### 3. Modern Dark +임팩트 있는 다크 테마 +```css +--bg-primary: #0f0f0f; /* 순수 다크 */ +--bg-secondary: #1a1a1a; /* 카드 배경 */ +--bg-elevated: #252525; /* 강조 영역 */ +--text-primary: #ffffff; /* 메인 텍스트 */ +--text-secondary: #b0b0b0; /* 보조 텍스트 */ +--accent: #ffffff; /* 강조 (화이트) */ +--border: #333333; /* 테두리 */ +``` + +### 4. Corporate Blue +전통적 비즈니스 톤 +```css +--bg-primary: #ffffff; /* 화이트 배경 */ +--bg-secondary: #f7f9fc; /* 밝은 블루 그레이 */ +--text-primary: #1e2a3a; /* 다크 네이비 */ +--text-secondary: #5a6b7d; /* 블루 그레이 */ +--accent: #2563eb; /* 블루 강조 */ +--border: #e2e8f0; /* 테두리 */ +``` + +### 5. Warm Neutral +따뜻하고 친근한 톤 +```css +--bg-primary: #faf8f5; /* 크림 화이트 */ +--bg-secondary: #f0ebe3; /* 웜 베이지 */ +--text-primary: #2d2a26; /* 다크 브라운 */ +--text-secondary: #6b6560; /* 미디움 브라운 */ +--accent: #c45a3b; /* 테라코타 */ +--border: #ddd8d0; /* 테두리 */ +``` + +--- + +## 레이아웃 시스템 + +### 여백 기준 (padding/margin) +```css +/* 슬라이드 전체 여백 */ +padding: 48pt; + +/* 섹션 간 여백 */ +gap: 32pt; + +/* 요소 간 여백 */ +gap: 16pt; + +/* 텍스트 블록 내 여백 */ +gap: 8pt; +``` + +### 그리드 시스템 +```css +/* 2단 레이아웃 */ +display: grid; +grid-template-columns: 1fr 1fr; +gap: 32pt; + +/* 3단 레이아웃 */ +grid-template-columns: repeat(3, 1fr); + +/* 비대칭 레이아웃 (40:60) */ +grid-template-columns: 2fr 3fr; + +/* 비대칭 레이아웃 (30:70) */ +grid-template-columns: 1fr 2.3fr; +``` + +--- + +## 디자인 컴포넌트 + +> **html2pptx 호환성 주의**: 텍스트 요소(`

`, `

`-`

`)에 직접 border, background, shadow를 적용하면 변환 오류가 발생합니다. 반드시 `
`로 감싸서 스타일을 적용하세요. + +### 1. 뱃지/태그 +```html + +
+

PRESENTATION

+
+``` + +### 2. 섹션 넘버 +```html + +
+

SECTION 1

+
+``` + +### 3. 로고 영역 +```html +
+
+

*

+
+

LogoName

+
+``` + +### 4. 아이콘 버튼 +```html +
+

+
+``` + +### 5. 구분선 +```html +
+``` + +### 6. 정보 그리드 +```html +
+
+

Contact

+

334556774

+
+
+

Date

+

March 2025

+
+
+``` + +--- + +## 슬라이드 템플릿 + +### 1. 표지 슬라이드 (Cover) +```html + + + + + + + + +
+
+
+
+

*

+
+

LogoName

+
+
+

PRESENTATION

+
+
+
+
+

OUR PROJECT

+
+
+

+
+
+
+ + +
+

+ Business Deck +

+

+ Presented by Luna Martinez +

+
+ + +
+
+

Contact

+

334556774

+
+
+

Date

+

March 2025

+
+
+

Website

+

www.yourwebsite.com

+
+
+ + +``` + +### 2. 목차 슬라이드 (Contents) +```html + + + + + + + + +
+

©2025 YOUR BRAND. ALL RIGHTS RESERVED.

+

+ Our
Contents +

+
+

+
+
+ + +
+
+

SECTION 1

+

SECTION TITLE

+

(1)

+
+
+

SECTION 2

+

SECTION TITLE

+

(2)

+
+
+

SECTION 3

+

SECTION TITLE

+

(3)

+
+
+

SECTION 4

+

SECTION TITLE

+

(4)

+
+
+

SECTION 5

+

SECTION TITLE

+

(5)

+
+
+ + +``` + +### 3. 섹션 구분 슬라이드 (Section Divider) +```html + + + + + + + + +
+
+

SECTION 1

+
+

©2025 YOUR BRAND

+
+ + +
+

+ Introduction +

+

+ Brief description of what this section covers and why it matters. +

+
+ + +
+

01

+
+ + +``` + +### 4. 콘텐츠 슬라이드 (Content) +```html + + + + + + + + +
+
+

SECTION 1

+

Main Topic

+
+

02

+
+ + +
+
+

Key Point One

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore. +

+
+
+

Key Point Two

+

+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip. +

+
+
+ + +
+

www.yourwebsite.com

+

©2025 YOUR BRAND

+
+ + +``` + +### 5. 통계/데이터 슬라이드 (Statistics) +```html + + + + + + + + +
+

Key Metrics

+

03

+
+ + +
+
+

Revenue Growth

+
+

85%

+

Year over year

+
+
+
+

Active Users

+
+

2.4M

+

+340K this quarter

+
+
+
+

Customer Satisfaction

+
+

4.9

+

Out of 5.0 rating

+
+
+
+ + +
+

Source: Internal Analytics 2025

+
+ + +``` + +### 6. 이미지 + 텍스트 슬라이드 (Split Layout) +```html + + + + + + + + +
+
+

©2025 YOUR BRAND

+
+ + +
+

FEATURE

+

+ Transform Your Business +

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +

+
+

Learn more

+
+

+
+
+
+ + +``` + +### 7. 팀 소개 슬라이드 (Team) +```html + + + + + + + + +
+

Our Team

+

05

+
+ + +
+
+
+

John Smith

+

CEO & Founder

+
+
+
+

Sarah Johnson

+

CTO

+
+
+
+

Mike Chen

+

Design Lead

+
+
+
+

Emily Davis

+

Marketing

+
+
+ + +``` + +### 8. 인용문 슬라이드 (Quote) +```html + + + + + + + +

"

+

+ The best way to predict the future is to create it. +

+
+

Peter Drucker

+

Management Consultant

+
+ + +``` + +### 9. 타임라인 슬라이드 (Timeline) +```html + + + + + + + + +
+

Our Journey

+
+ + +
+
+ +
+ + +
+
+

2020

+

Company Founded

+
+
+
+

2021

+

First Product Launch

+
+
+
+

2023

+

Series A Funding

+
+
+
+

2025

+

Global Expansion

+
+
+
+ + +
+

06

+
+ + +``` + +### 10. 마무리 슬라이드 (Closing) +```html + + + + + + + + +
+
+

*

+
+

LogoName

+
+ + +
+

+ Thank You +

+

+ Questions? Let's discuss. +

+
+ + +
+
+

Email

+

hello@company.com

+
+
+

Phone

+

+82 10-1234-5678

+
+
+

Website

+

www.company.com

+
+
+ + +``` + +--- + +## 고급 디자인 패턴 + +### 비대칭 레이아웃 +시선을 끄는 독창적인 구성 +```css +/* 황금비율 기반 */ +grid-template-columns: 1fr 1.618fr; + +/* 극단적 비대칭 */ +grid-template-columns: 1fr 3fr; +``` + +### 오버레이 텍스트 +이미지 위 텍스트 배치 +```html +
+
+
+

Overlay Text

+
+
+``` + +### 그라데이션 오버레이 +```html +
+``` + +### 카드 스타일 +```html +
+``` + +--- + +## 텍스트 사용 규칙 + +### 필수 태그 +```html + +

,

-

,