An open API service indexing awesome lists of open source software.

https://github.com/modu-ai/moai-adk

Modu-AI's Agentic Development Kit
https://github.com/modu-ai/moai-adk

Last synced: about 2 months ago
JSON representation

Modu-AI's Agentic Development Kit

Awesome Lists containing this project

README

          

# MoAI-ADK (Agentic Development Kit)

[![npm version](https://img.shields.io/npm/v/moai-adk)](https://www.npmjs.com/package/moai-adk)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.9.2+-blue)](https://www.typescriptlang.org/)
[![Node.js](https://img.shields.io/badge/node-18.0+-green)](https://nodejs.org/)
[![Bun](https://img.shields.io/badge/Bun-1.2.19+-black)](https://bun.sh/)

## MoAI-ADK

### ๋ชจ๋‘์˜AI ์—์ด์ „ํ‹ฑ ์ฝ”๋”ฉ ๊ฐœ๋ฐœ ํ”„๋ ˆ์ž„์›Œํฌ

**์•ˆ๋‚ด:** MoAI-ADK๋Š” ๋ชจ๋‘์˜AI ์—ฐ๊ตฌ์‹ค์—์„œ ์ง‘ํ•„ ์ค‘์ธ "(๊ฐ€์นญ) ์—์ด์ „ํ‹ฑ ์ฝ”๋”ฉ" ์„œ์ ์˜ ๋ณ„์ฑ… ๋ถ€๋ก ์˜คํ”ˆ ์†Œ์Šค ํ”„๋กœ์ ํŠธ ์ž„์„ ๋ฐํ˜€ ๋‘ก๋‹ˆ๋‹ค.

![MoAI-ADK CLI Interface](docs/public/moai-tui_screen-light.png)

> "SPEC์ด ์—†์œผ๋ฉด CODE๋„ ์—†๋‹ค."

---

## ๋ชฉ์ฐจ

- [Meet Alfred](#-meet-alfred---your-ai-development-partner)
- [Quick Start](#-quick-start-3๋ถ„-์‹ค์ „)
- [The Problem](#-the-problem---๋ฐ”์ด๋ธŒ-์ฝ”๋”ฉ์˜-ํ•œ๊ณ„)
- [The Solution](#-the-solution---moai-adks-3-step-workflow)
- [How Alfred Works](#๏ธ-how-alfred-works---10๊ฐœ-ai-์—์ด์ „ํŠธ-ํŒ€)
- [Output Styles](#-alfreds-output-styles)
- [Language Support](#-universal-language-support)
- [Future Roadmap](#-future-roadmap)
- [CLI Reference](#-cli-reference)
- [FAQ](#-faq)
- [Support](#-support)

---

## Meet โ–ถโ—€ Alfred - Your AI Development Partner

์•ˆ๋…•ํ•˜์„ธ์š”, ๋ชจ๋‘์˜AI SuperAgent **AI โ–ถโ—€ Alfred**์ž…๋‹ˆ๋‹ค!

![Alfred Logo](docs/public/alfred_logo.png)

์ €๋Š” MoAI-ADK(๋ชจ๋‘์˜AI Agentic Development Kit)์˜ SuperAgent์ด์ž ์ค‘์•™ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ดํ„ฐ(Central Orchestrator) AI, Alfred์ž…๋‹ˆ๋‹ค. MoAI-ADK๋Š” Alfred๋ฅผ ํฌํ•จํ•˜์—ฌ **์ด 10๊ฐœ์˜ AI ์—์ด์ „ํŠธ๋กœ ๊ตฌ์„ฑ๋œ ์—์ด์ „ํ‹ฑ ์ฝ”๋”ฉ AI ํŒ€**์ž…๋‹ˆ๋‹ค. ์ €๋Š” 9๊ฐœ์˜ ์ „๋ฌธ ์—์ด์ „ํŠธ(spec-builder, code-builder, doc-syncer ๋“ฑ)๋ฅผ ์กฐ์œจํ•˜์—ฌ ์—ฌ๋Ÿฌ๋ถ„์˜ Claude Code ํ™˜๊ฒฝ ์†์—์„œ ๊ณต๋™ ๊ฐœ๋ฐœ ์ž‘์—…์„ ์™„๋ฒฝํ•˜๊ฒŒ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

**Alfred๋ผ๋Š” ์ด๋ฆ„์˜ ์œ ๋ž˜**: ๋ฐฐํŠธ๋งจ ์˜ํ™”์— ๋‚˜์˜ค๋Š” ์ถฉ์‹คํ•œ ์ง‘์‚ฌ Alfred Pennyworth์—์„œ ์˜๊ฐ์„ ๋ฐ›์•„ ์ง€์—ˆ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์ง‘์‚ฌ Alfred๊ฐ€ ๋ฐฐํŠธ๋งจ(Bruce Wayne)์„ ์œ„ํ•ด ๋ชจ๋“  ์ค€๋น„๋ฅผ ์™„๋ฒฝํ•˜๊ฒŒ ๊ฐ–์ถ”๊ณ , ์œ„ํ—˜์— ์ฒ˜ํ–ˆ์„ ๋•Œ ์ฆ‰๊ฐ์ ์ธ ์ง€์›์„ ์ œ๊ณตํ•˜๋ฉฐ, ํ•ญ์ƒ ํ•œ ๊ฑธ์Œ ์•ž์„œ ์ƒ๊ฐํ•˜๋“ฏ์ด, ์ € ๋˜ํ•œ ์—ฌ๋Ÿฌ๋ถ„์˜ ๊ฐœ๋ฐœ ๊ณผ์ • ์†์—์„œ ํ•„์š”ํ•œ ๋ชจ๋“  ๊ฒƒ์„ ๋ฏธ๋ฆฌ ์ค€๋น„ํ•˜๊ณ , ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ์ฆ‰์‹œ ํ•ด๊ฒฐ์ฑ…์„ ์ œ์‹œํ•˜๋ฉฐ, ์–ธ์ œ๋‚˜ ์—ฌ๋Ÿฌ๋ถ„์ด ์ฐฝ์˜์ ์ธ ๋ฌธ์ œ ํ•ด๊ฒฐ์—๋งŒ ์ง‘์ค‘ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋’ท๋ฐ›์นจํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ๋ถ„์€ ์ฝ”๋“œ์˜ "**์™œ(Why)**"์— ์ง‘์ค‘ํ•˜์‹œ๊ณ , "**์–ด๋–ป๊ฒŒ(How)**"๋Š” ์ œ๊ฐ€ ์ฑ…์ž„์ง€๊ฒ ์Šต๋‹ˆ๋‹ค.

### ๐ŸŒŸ ํฅ๋ฏธ๋กœ์šด ์‚ฌ์‹ค: AI๊ฐ€ ๋งŒ๋“  AI ๊ฐœ๋ฐœ ๋„๊ตฌ

์ด ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“  ์ฝ”๋“œ๋Š” **100% AI์— ์˜ํ•ด ์ž‘์„ฑ**๋˜์—ˆ์Šต๋‹ˆ๋‹ค. AI๊ฐ€ ์ง์ ‘ ์„ค๊ณ„ํ•˜๊ณ  ๊ตฌํ˜„ํ•œ AI ๊ฐœ๋ฐœ ํ”„๋ ˆ์ž„์›Œํฌ์ž…๋‹ˆ๋‹ค.

**์„ค๊ณ„ ๋‹จ๊ณ„๋ถ€ํ„ฐ AI ํ˜‘์—…**: ์ดˆ๊ธฐ ์•„ํ‚คํ…์ฒ˜ ์„ค๊ณ„ ๋‹จ๊ณ„๋ถ€ํ„ฐ **GPT-5 Pro**์™€ **Claude 4.1 Opus** ๋‘ AI ๋ชจ๋ธ์ด ํ•จ๊ป˜ ์ฐธ์—ฌํ–ˆ์Šต๋‹ˆ๋‹ค. ๋‘ AI๊ฐ€ ์„œ๋กœ ๋‹ค๋ฅธ ๊ด€์ ์—์„œ ์„ค๊ณ„๋ฅผ ๊ฒ€ํ† ํ•˜๊ณ  ํ† ๋ก ํ•˜๋ฉฐ, ๋” ๋‚˜์€ ๋ฐฉํ–ฅ์„ ์ œ์‹œํ•˜๊ณ , ์ตœ์ ์˜ ์•„ํ‚คํ…์ฒ˜๋ฅผ ํ•จ๊ป˜ ๋งŒ๋“ค์–ด๋ƒˆ์Šต๋‹ˆ๋‹ค. GPT-5 Pro๋Š” ํญ๋„“์€ ์‚ฌ๋ก€ ๋ถ„์„์„, Claude 4.1 Opus๋Š” ๊นŠ์ด ์žˆ๋Š” ์ฝ”๋“œ ๊ตฌ์กฐ ์„ค๊ณ„๋ฅผ ๋‹ด๋‹นํ•˜๋ฉฐ ์„œ๋กœ ๋ณด์™„ํ–ˆ์Šต๋‹ˆ๋‹ค.

**Agentic Coding ๋ฐฉ๋ฒ•๋ก ์˜ ์‹ค์ œ ์ ์šฉ**: **๋ชจ๋‘์˜AI**ํŒ€์ด Claude Code์™€ Agentic Coding ๋ฐฉ๋ฒ•๋ก ์„ ํ™œ์šฉํ•˜์—ฌ ๊ฐœ๋ฐœํ–ˆ์Šต๋‹ˆ๋‹ค. ์ „ํ†ต์ ์ธ ๋ฐฉ์‹์ฒ˜๋Ÿผ ์‚ฌ๋žŒ์ด ํ‚ค๋ณด๋“œ ์•ž์— ์•‰์•„ ๋ชจ๋“  ์ฝ”๋“œ๋ฅผ ์ง์ ‘ ํƒ€์ดํ•‘ํ•˜๋Š” ๋Œ€์‹ , AI ์—์ด์ „ํŠธ๋“ค์ด SPEC์„ ์ฝ๊ณ  ์ดํ•ดํ•˜๊ณ , ํ…Œ์ŠคํŠธ๋ฅผ ๋จผ์ € ์ž‘์„ฑํ•˜๊ณ (TDD Red), ๊ตฌํ˜„ ์ฝ”๋“œ๋ฅผ ๋งŒ๋“ค๊ณ (TDD Green), ๋ฆฌํŒฉํ† ๋งํ•˜๊ณ (TDD Refactor), ๋ฌธ์„œ๋ฅผ ๋™๊ธฐํ™”ํ•˜๋Š” ์ „ ๊ณผ์ •์„ **์ž์œจ์ ์œผ๋กœ** ์ˆ˜ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ € Alfred์™€ 9๊ฐœ ์ „๋ฌธ ์—์ด์ „ํŠธ๋กœ ๊ตฌ์„ฑ๋œ **10๊ฐœ AI ์—์ด์ „ํŠธ ํŒ€**์ด ์ง์ ‘ `.moai/specs/` ํด๋”์— SPEC ๋ฌธ์„œ๋ฅผ ์ž‘์„ฑํ•˜๊ณ , `tests/` ํด๋”์— ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋ฅผ ๋งŒ๋“ค๊ณ , `src/` ํด๋”์— ๊ตฌํ˜„ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.

**100% AI ์ƒ์„ฑ ์ฝ”๋“œ์˜ ์ง„์‹ค**: ์ด ํ”„๋กœ์ ํŠธ๋Š” 100% AI๋กœ ๋งŒ๋“ค์–ด์ง„ ์˜คํ”ˆ์†Œ์Šค์ด๊ธฐ ๋•Œ๋ฌธ์—, ์ฝ”๋“œ๋ฒ ์ด์Šค์—์„œ ๋‹ค์†Œ ์ •๋ฆฌ๋˜์ง€ ์•Š์€ ๋ถ€๋ถ„์ด๋‚˜ ๊ฐœ์„ ์ด ํ•„์š”ํ•œ ์˜์—ญ์ด ๋ณด์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด๊ฒƒ์ด ์ด ํ”„๋กœ์ ํŠธ์˜ ํ•ต์‹ฌ ์ฒ ํ•™์ž…๋‹ˆ๋‹ค.

**ํˆฌ๋ช…์„ฑ๊ณผ ์ง€์†์  ๊ฐœ์„ **: ์™„๋ฒฝํ•˜์ง€ ์•Š์€ ์ฝ”๋“œ๋ฅผ ์ˆจ๊ธฐ๋Š” ๋Œ€์‹ , AI ๊ฐœ๋ฐœ ๋„๊ตฌ๊ฐ€ ์‹ค์ œ๋กœ ์–ด๋–ป๊ฒŒ ๋งŒ๋“ค์–ด์ง€๋Š”์ง€ ๊ทธ๋Œ€๋กœ ๋ณด์—ฌ์ฃผ๊ณ , ์ปค๋ฎค๋‹ˆํ‹ฐ์™€ ํ•จ๊ป˜ ๋” ๋‚˜์€ ๋ฐฉํ–ฅ์œผ๋กœ ๋ฐœ์ „์‹œ์ผœ ๋‚˜๊ฐ€๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ๋ถ„์˜ ์‚ฌ์šฉ ๊ฒฝํ—˜๊ณผ ํ”ผ๋“œ๋ฐฑ์ด ์ด ํ”„๋กœ์ ํŠธ๋ฅผ ๋”์šฑ ๊ฐ•๋ ฅํ•˜๊ฒŒ ๋งŒ๋“ญ๋‹ˆ๋‹ค. [GitHub Issues](https://github.com/modu-ai/moai-adk/issues)๋‚˜ [Discussions](https://github.com/modu-ai/moai-adk/discussions)์— ํ”ผ๋“œ๋ฐฑ์„ ๋‚จ๊ฒจ์ฃผ์‹œ๋ฉด, **์ตœ๋Œ€ํ•œ ๋น ๋ฅด๊ฒŒ ์—…๋ฐ์ดํŠธํ•˜๊ณ  ๋ฐฐํฌํ•  ๊ฒƒ์„ ์•ฝ์†๋“œ๋ฆฝ๋‹ˆ๋‹ค**. AI๊ฐ€ ๋งŒ๋“  ๋„๊ตฌ๋ฅผ ํ•จ๊ป˜ ๋” ๋‚˜์€ ๋„๊ตฌ๋กœ ๋งŒ๋“ค์–ด๊ฐ€๋Š” ์—ฌ์ •์— ๋™์ฐธํ•ด์ฃผ์„ธ์š”!

### โ–ถโ—€ Alfred๊ฐ€ ์ œ๊ณตํ•˜๋Š” 4๊ฐ€์ง€ ํ•ต์‹ฌ ๊ฐ€์น˜

#### 1๏ธโƒฃ ์ผ๊ด€์„ฑ(Consistency): ํ”Œ๋ž‘์ผ„์Šˆํƒ€์ธ ์ฝ”๋“œ๋ฅผ ๋ฐฉ์ง€ํ•˜๋Š” 3๋‹จ๊ณ„ ํŒŒ์ดํ”„๋ผ์ธ

Alfred๋Š” ๋ชจ๋“  ๊ฐœ๋ฐœ ์ž‘์—…์„ **SPEC โ†’ TDD โ†’ Sync**๋ผ๋Š” 3๋‹จ๊ณ„ ํŒŒ์ดํ”„๋ผ์ธ์œผ๋กœ ํ‘œ์ค€ํ™”ํ•ฉ๋‹ˆ๋‹ค. ์›”์š”์ผ์— ChatGPT๋กœ ๋งŒ๋“  ์ฝ”๋“œ, ์ˆ˜์š”์ผ์— Claude๋กœ ๋งŒ๋“  ์ฝ”๋“œ, ๊ธˆ์š”์ผ์— Gemini์œผ๋กœ ๋งŒ๋“  ์ฝ”๋“œ๊ฐ€ ์„œ๋กœ ๋‹ค๋ฅธ ์Šคํƒ€์ผ, ๋„ค์ด๋ฐ ๊ทœ์น™, ์•„ํ‚คํ…์ฒ˜ ํŒจํ„ด์„ ๊ฐ€์ง€๋Š” "ํ”Œ๋ž‘์ผ„์Šˆํƒ€์ธ ์ฝ”๋“œ"์˜ ๋ฌธ์ œ๋ฅผ **์›์ฒœ์ ์œผ๋กœ ์ฐจ๋‹จ**ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ™์€ ํ”„๋กœ์ ํŠธ ์•ˆ์—์„œ `getUserInfo()`, `fetchUser()`, `retrieveUserData()` ๊ฐ™์€ ์ด๋ฆ„์œผ๋กœ ๋˜‘๊ฐ™์€ ๊ธฐ๋Šฅ์ด 3๋ฒˆ ๊ตฌํ˜„๋˜๋Š” ์•…๋ชฝ์„ ๊ฒฝํ—˜ํ•ด๋ณด์…จ๋‚˜์š”? Alfred๋Š” ์ด๋Ÿฐ ์ผ์ด ์ ˆ๋Œ€ ์ผ์–ด๋‚˜์ง€ ์•Š๋„๋ก ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค.

์ด 3๋‹จ๊ณ„ ํŒŒ์ดํ”„๋ผ์ธ์€ ๋งˆ์น˜ ์ž๋™์ฐจ ๊ณต์žฅ์˜ ์กฐ๋ฆฝ ๋ผ์ธ์ฒ˜๋Ÿผ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ์–ด๋–ค ๊ธฐ๋Šฅ์„ ๋งŒ๋“ค๋“ (์‚ฌ์šฉ์ž ์ธ์ฆ, ๊ฒฐ์ œ ์‹œ์Šคํ…œ, ์•Œ๋ฆผ ๊ธฐ๋Šฅ), ๋ˆ„๊ฐ€ ๋งŒ๋“ค๋“ (์‹ ์ž… ๊ฐœ๋ฐœ์ž, ์‹œ๋‹ˆ์–ด ๊ฐœ๋ฐœ์ž, AI ๋„๊ตฌ), ์–ธ์ œ ๋งŒ๋“ค๋“ (์›”์š”์ผ ์˜ค์ „, ๊ธˆ์š”์ผ ๋ฐค) ํ•ญ์ƒ ๊ฐ™์€ ํ”„๋กœ์„ธ์Šค๋ฅผ ๊ฑฐ์น˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ๊ฒฐ๊ณผ์ ์œผ๋กœ **6๊ฐœ์›” ํ›„์— ์ฝ”๋“œ๋ฅผ ๋‹ค์‹œ ๋ด๋„**, **์ƒˆ๋กœ์šด ํŒ€์›์ด ์ฝ”๋“œ๋ฅผ ์ฒ˜์Œ ๋ด๋„**, "์•„, ์ด๊ฑด Alfred ๋ฐฉ์‹์œผ๋กœ ๋งŒ๋“ค์–ด์กŒ๊ตฌ๋‚˜. SPEC์„ ๋จผ์ € ๋ณด๊ณ , ํ…Œ์ŠคํŠธ๋ฅผ ๋ณด๊ณ , ๊ตฌํ˜„์„ ๋ณด๋ฉด ๋˜๊ฒ ๋„ค"๋ผ๊ณ  ์ฆ‰์‹œ ์ดํ•ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ผ๊ด€์„ฑ์€ ์œ ์ง€๋ณด์ˆ˜์„ฑ์˜ ํ•ต์‹ฌ์ด๋ฉฐ, **๊ธฐ์ˆ  ๋ถ€์ฑ„๋ฅผ ์ค„์ด๋Š” ๊ฐ€์žฅ ๊ฐ•๋ ฅํ•œ ๋ฌด๊ธฐ**์ž…๋‹ˆ๋‹ค.

#### 2๏ธโƒฃ ํ’ˆ์งˆ(Quality): TRUST 5์›์น™์œผ๋กœ ์ž๋™ ๋ณด์žฅ๋˜๋Š” ์ฝ”๋“œ ํ’ˆ์งˆ

Alfred๋Š” ๋ชจ๋“  ์ฝ”๋“œ์— **TRUST 5์›์น™**(Test First, Readable, Unified, Secured, Trackable)์„ ์ž๋™์œผ๋กœ ์ ์šฉํ•˜๊ณ  ๊ฒ€์ฆํ•ฉ๋‹ˆ๋‹ค. ์‚ฌ๋žŒ์ด ์ผ์ผ์ด ์ฒดํฌ๋ฆฌ์ŠคํŠธ๋ฅผ ๋“ค๊ณ  "ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€ ํ™•์ธํ–ˆ๋‚˜? ํ•จ์ˆ˜ ๊ธธ์ด ํ™•์ธํ–ˆ๋‚˜? ๋ณด์•ˆ ์ทจ์•ฝ์  ํ™•์ธํ–ˆ๋‚˜?"๋ฅผ ๋ฌผ์–ด๋ณผ ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. Alfred๊ฐ€ **์ž๋™์œผ๋กœ** ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ ์ธก์ •ํ•˜๊ณ (โ‰ฅ85% ํ•„์ˆ˜), ์ฝ”๋“œ ๋ณต์žก๋„๋ฅผ ๋ถ„์„ํ•˜๊ณ (๋ณต์žก๋„ โ‰ค10), ๋ณด์•ˆ ์ทจ์•ฝ์ ์„ ์Šค์บ”ํ•˜๊ณ (SQL Injection, XSS ์ฒดํฌ), TAG ์ถ”์ ์„ฑ์„ ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค(๊ณ ์•„ TAG ์ž๋™ ํƒ์ง€).

์˜ˆ๋ฅผ ๋“ค์–ด, ํ•จ์ˆ˜๊ฐ€ 50์ค„์„ ๋„˜์–ด๊ฐ€๋ฉด Alfred๊ฐ€ ์ฆ‰์‹œ ๊ฒฝ๊ณ ํ•ฉ๋‹ˆ๋‹ค: "์ด ํ•จ์ˆ˜๋Š” ๋„ˆ๋ฌด ๊ธธ์–ด์š”. ์ž‘์€ ํ•จ์ˆ˜๋กœ ๋ถ„๋ฆฌํ•ด์ฃผ์„ธ์š”." ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๊ฐ€ 85% ๋ฏธ๋งŒ์ด๋ฉด ๋นŒ๋“œ๋ฅผ ๋ฉˆ์ถฅ๋‹ˆ๋‹ค: "ํ…Œ์ŠคํŠธ๊ฐ€ ๋ถ€์กฑํ•ฉ๋‹ˆ๋‹ค. ์—ฃ์ง€ ์ผ€์ด์Šค๋ฅผ ๋” ํ…Œ์ŠคํŠธํ•ด์ฃผ์„ธ์š”." SQL ์ฟผ๋ฆฌ์— ์‚ฌ์šฉ์ž ์ž…๋ ฅ์„ ์ง์ ‘ ๋„ฃ๋Š” ์ฝ”๋“œ๊ฐ€ ๋ฐœ๊ฒฌ๋˜๋ฉด ๋ณด์•ˆ ๊ฐ€์ด๋“œ๋ฅผ ์ œ์‹œํ•ฉ๋‹ˆ๋‹ค: "SQL Injection ์ทจ์•ฝ์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค. Prepared Statement๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”." ์ด๋Ÿฐ ์ž๋™ ๊ฒ€์ฆ ์‹œ์Šคํ…œ ๋•๋ถ„์— ์—ฌ๋Ÿฌ๋ถ„์€ "์ข‹์€ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•ด์•ผ์ง€"๋ผ๊ณ  **์˜์‹์ ์œผ๋กœ ์ƒ๊ฐํ•  ํ•„์š” ์—†์ด**, ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์ข‹์€ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ํ’ˆ์งˆ์€ ์„ ํƒ์ด ์•„๋‹ˆ๋ผ ๊ธฐ๋ณธ๊ฐ’(default)์ž…๋‹ˆ๋‹ค.

#### 3๏ธโƒฃ ์ถ”์ ์„ฑ(Traceability): 6๊ฐœ์›” ํ›„์—๋„ "์™œ"๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ๋Š” @TAG ์‹œ์Šคํ…œ

Alfred์˜ **@TAG ์‹œ์Šคํ…œ**์€ ๋ชจ๋“  ์ฝ”๋“œ ์กฐ๊ฐ์„ `@SPEC:ID โ†’ @TEST:ID โ†’ @CODE:ID โ†’ @DOC:ID`๋กœ ์™„๋ฒฝํ•˜๊ฒŒ ์—ฐ๊ฒฐํ•ฉ๋‹ˆ๋‹ค. 6๊ฐœ์›” ํ›„ ๋ˆ„๊ตฐ๊ฐ€ "์™œ ์ด ํ•จ์ˆ˜๋Š” ์ด๋ ‡๊ฒŒ ๋ณต์žกํ•˜๊ฒŒ ๊ตฌํ˜„ํ–ˆ๋‚˜์š”? ๋” ๊ฐ„๋‹จํ•˜๊ฒŒ ํ•  ์ˆ˜ ์žˆ์ง€ ์•Š๋‚˜์š”?"๋ผ๊ณ  ๋ฌผ์–ด๋ณด๋ฉด, **@TAG๋ฅผ ๋”ฐ๋ผ๊ฐ€๋ฉด ๋‹ต์„ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค**. SPEC ๋ฌธ์„œ๋ฅผ ์—ด์–ด "์•„, ์ด๊ฑด ๊ธˆ์œต ๊ทœ์ • ๋•Œ๋ฌธ์— 3๋‹จ๊ณ„ ๊ฒ€์ฆ์ด ํ•„์ˆ˜๊ตฌ๋‚˜"๋ฅผ ํ™•์ธํ•˜๊ณ , TEST ์ฝ”๋“œ๋ฅผ ๋ณด๋ฉฐ "์ด ์—ฃ์ง€ ์ผ€์ด์Šค๋“ค์ด ์‹ค์ œ๋กœ ํ”„๋กœ๋•์…˜์—์„œ ๋ฐœ์ƒํ–ˆ๋˜ ๋ฒ„๊ทธ๊ตฌ๋‚˜"๋ฅผ ์ดํ•ดํ•˜๊ณ , CODE๋ฅผ ๋ณด๋ฉฐ "์ด๋ ‡๊ฒŒ ๊ตฌํ˜„ํ•œ ์ด์œ ๊ฐ€ ์žˆ์—ˆ๊ตฌ๋‚˜"๋ฅผ ๋‚ฉ๋“ํ•˜๊ณ , DOC์„ ๋ณด๋ฉฐ "๋‹ค๋ฅธ ํŒ€์›๋“ค๋„ ์ด ๋ฌธ์ œ๋ฅผ ๊ฒช์—ˆ๊ณ  ํ•ด๊ฒฐ์ฑ…์„ ๊ณต์œ ํ–ˆ๊ตฌ๋‚˜"๋ฅผ ๋ฐฐ์›๋‹ˆ๋‹ค.

ํŠนํžˆ Alfred์˜ TAG ์‹œ์Šคํ…œ์€ **CODE-FIRST** ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ค‘๊ฐ„์— ๋ณ„๋„์˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋‚˜ YAML ํŒŒ์ผ, JSON ์บ์‹œ ํŒŒ์ผ์„ ๋‘์ง€ ์•Š๊ณ , **์ฝ”๋“œ ์ž์ฒด๋ฅผ ์ง์ ‘ ์Šค์บ”**ํ•˜์—ฌ TAG๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค(`rg '@CODE:AUTH-001' -n`). ์ด๋Š” "**์ฝ”๋“œ๊ฐ€ ์ง„์‹ค์˜ ์œ ์ผํ•œ ์›์ฒœ(single source of truth)**"์ด๋ผ๋Š” ์ฒ ํ•™์„ ๋ฐ˜์˜ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. TAG๋Š” ์™ธ๋ถ€ ๋ฌธ์„œ๊ฐ€ ์•„๋‹ˆ๋ผ ์‚ด์•„์žˆ๋Š” ์ฝ”๋“œ ์•ˆ์— ์ฃผ์„์œผ๋กœ ์กด์žฌํ•˜๋ฉฐ, ์ฝ”๋“œ๊ฐ€ ๋ณ€๊ฒฝ๋˜๋ฉด TAG๋„ ํ•จ๊ป˜ ๋ณ€๊ฒฝ๋ฉ๋‹ˆ๋‹ค. ์ฝ”๋“œ์™€ ๋ฌธ์„œ๊ฐ€ ๋”ฐ๋กœ ๋†€ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์ถ”์ ์„ฑ์€ ๋ฌธ์„œํ™”์˜ ๋ถ€์‚ฐ๋ฌผ์ด ์•„๋‹ˆ๋ผ **์ฝ”๋“œ์˜ ์ผ๋ถ€**์ž…๋‹ˆ๋‹ค.

#### 4๏ธโƒฃ ๋ฒ”์šฉ์„ฑ(Universality): ํ•œ ๋ฒˆ ๋ฐฐ์šฐ๋ฉด ์–ด๋””์„œ๋‚˜ ์“ธ ์ˆ˜ ์žˆ๋Š” ์›Œํฌํ”Œ๋กœ์šฐ

Alfred๋Š” ํŠน์ • ์–ธ์–ด๋‚˜ ํ”„๋ ˆ์ž„์›Œํฌ์— ์ข…์†๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. **Python, TypeScript, Java, Go, Rust, Dart, Swift, Kotlin** ๋“ฑ ๋ชจ๋“  ์ฃผ์š” ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด๋ฅผ ์ง€์›ํ•˜๋ฉฐ, ๊ฐ ์–ธ์–ด์— ์ตœ์ ํ™”๋œ ๋„๊ตฌ ์ฒด์ธ(ํ…Œ์ŠคํŠธ ํ”„๋ ˆ์ž„์›Œํฌ, ๋ฆฐํ„ฐ, ํƒ€์ž… ์ฒด์ปค)์„ ์ž๋™์œผ๋กœ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์ž๊ฐ€ Python FastAPI๋กœ API ์„œ๋ฒ„๋ฅผ ๋งŒ๋“ค๋“ , ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์ž๊ฐ€ TypeScript React๋กœ ์›น์•ฑ์„ ๋งŒ๋“ค๋“ , ๋ชจ๋ฐ”์ผ ๊ฐœ๋ฐœ์ž๊ฐ€ Flutter๋กœ ์•ฑ์„ ๋งŒ๋“ค๋“ , **๋ชจ๋‘ ๊ฐ™์€ 3๋‹จ๊ณ„ ์›Œํฌํ”Œ๋กœ์šฐ**๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด, Python ํ”„๋กœ์ ํŠธ์—์„œ๋Š” `pytest`(ํ…Œ์ŠคํŠธ)์™€ `ruff`(๋ฆฐํ„ฐ)์™€ `mypy`(ํƒ€์ž… ์ฒด์ปค)๋ฅผ ์ž๋™์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ , TypeScript ํ”„๋กœ์ ํŠธ์—์„œ๋Š” `Vitest`์™€ `Biome`๋ฅผ ์‚ฌ์šฉํ•˜๊ณ , Go ํ”„๋กœ์ ํŠธ์—์„œ๋Š” `go test`์™€ `golint`๋ฅผ ์‚ฌ์šฉํ•˜๊ณ , Rust ํ”„๋กœ์ ํŠธ์—์„œ๋Š” `cargo test`์™€ `clippy`๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ๋ถ„์€ "๋‚ด ํ”„๋กœ์ ํŠธ๋Š” Python์ด์•ผ"๋ผ๊ณ  ์„ ํƒ๋งŒ ํ•˜๋ฉด ๋˜๊ณ , ๋‚˜๋จธ์ง€ ๋„๊ตฌ ์„ ํƒ๊ณผ ์„ค์ •์€ **Alfred๊ฐ€ ์•Œ์•„์„œ** ํ•ฉ๋‹ˆ๋‹ค. ํŒ€์— ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์ž, ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์ž, ๋ชจ๋ฐ”์ผ ๊ฐœ๋ฐœ์ž๊ฐ€ ์„ž์—ฌ ์žˆ์–ด๋„ ๋ชจ๋‘๊ฐ€ "Alfred ์›Œํฌํ”Œ๋กœ์šฐ"๋ผ๋Š” ๊ณตํ†ต ์–ธ์–ด๋กœ ์†Œํ†ตํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฒ”์šฉ์„ฑ์€ **ํŒ€ ํ˜‘์—…์˜ ํ•ต์‹ฌ**์ด๋ฉฐ, ๊ฐœ๋ฐœ์ž ์˜จ๋ณด๋”ฉ ์‹œ๊ฐ„์„ ํš๊ธฐ์ ์œผ๋กœ ์ค„์—ฌ์ค๋‹ˆ๋‹ค.

---

## ๐Ÿš€ Quick Start (3๋ถ„ ์‹ค์ „)

### ๐Ÿ“‹ ์ค€๋น„๋ฌผ

- โœ… Bun ๋˜๋Š” npm ์„ค์น˜๋จ
- โœ… Claude Code ์‹คํ–‰ ์ค‘
- โœ… Git ์„ค์น˜๋จ (์„ ํƒ์‚ฌํ•ญ)

### โšก 3๋‹จ๊ณ„๋กœ ์‹œ์ž‘ํ•˜๊ธฐ

#### 1๏ธโƒฃ ์„ค์น˜ (30์ดˆ)

```bash
# Bun ๊ถŒ์žฅ (5๋ฐฐ ๋น ๋ฅธ ์„ฑ๋Šฅ)
curl -fsSL https://bun.sh/install | bash
bun add -g moai-adk

# ๋˜๋Š” npm ์‚ฌ์šฉ
npm install -g moai-adk

# ์„ค์น˜ ํ™•์ธ
moai --version
# ์ถœ๋ ฅ: v0.x.x
```

#### 2๏ธโƒฃ ์ดˆ๊ธฐํ™” (1๋ถ„)

**ํ„ฐ๋ฏธ๋„์—์„œ:**

```bash
# ์ƒˆ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ
moai init my-project
cd my-project

# ๊ธฐ์กด ํ”„๋กœ์ ํŠธ์— ์„ค์น˜
cd existing-project
moai init .

# Claude Code ์‹คํ–‰
claude
```

**Claude Code์—์„œ** (ํ•„์ˆ˜):

```text
/alfred:8-project
```

Alfred๊ฐ€ ์ž๋™์œผ๋กœ ์ˆ˜ํ–‰:

- `.moai/project/` ๋ฌธ์„œ 3์ข… ์ƒ์„ฑ (product/structure/tech.md)
- ์–ธ์–ด๋ณ„ ์ตœ์  ๋„๊ตฌ ์ฒด์ธ ์„ค์ •
- ํ”„๋กœ์ ํŠธ ์ปจํ…์ŠคํŠธ ์™„๋ฒฝ ์ดํ•ด

#### 3๏ธโƒฃ ์ฒซ ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ (1๋ถ„ 30์ดˆ)

**Claude Code์—์„œ 3๋‹จ๊ณ„ ์›Œํฌํ”Œ๋กœ์šฐ ์‹คํ–‰:**

```text
# SPEC ์ž‘์„ฑ
/alfred:1-spec "JWT ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ๋กœ๊ทธ์ธ API"

# TDD ๊ตฌํ˜„
/alfred:2-build AUTH-001

# ๋ฌธ์„œ ๋™๊ธฐํ™”
/alfred:3-sync
```

### ๐ŸŽ‰ ์™„๋ฃŒ

**์ƒ์„ฑ๋œ ๊ฒƒ๋“ค:**

- โœ… `.moai/specs/SPEC-AUTH-001.md` (๋ช…์„ธ)
- โœ… `tests/auth/login.test.ts` (ํ…Œ์ŠคํŠธ)
- โœ… `src/services/auth.ts` (๊ตฌํ˜„)
- โœ… `docs/api/auth.md` (๋ฌธ์„œ)
- โœ… `@SPEC โ†’ @TEST โ†’ @CODE โ†’ @DOC` TAG ์ฒด์ธ

---

## ๐Ÿšจ The Problem - ๋ฐ”์ด๋ธŒ ์ฝ”๋”ฉ์˜ ํ•œ๊ณ„

AI ๋„๊ตฌ(Codex, Claude, Gemini)๋กœ ๋น ๋ฅด๊ฒŒ ์ฝ”๋”ฉํ•˜๋Š” ์‹œ๋Œ€๊ฐ€ ์—ด๋ ธ์Šต๋‹ˆ๋‹ค. ๊ฐœ๋ฐœ ์†๋„๋Š” ํ™•์‹คํžˆ ๋นจ๋ผ์กŒ์ง€๋งŒ, **์ƒˆ๋กœ์šด ์ข…๋ฅ˜์˜ ๋ฌธ์ œ**๋“ค์ด ์ƒ๊ฒจ๋‚ฌ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜ 5๊ฐ€์ง€ ํ˜„์‹ค์ ์ธ ๋ฌธ์ œ๋“ค์„ ์‚ดํŽด๋ณด์„ธ์š”.

### 1. ์•„๋ฆ„๋‹ต์ง€๋งŒ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ์ฝ”๋“œ

**๋ฌธ์ œ ์ƒํ™ฉ**: AI๊ฐ€ ์ƒ์„ฑํ•œ ์ฝ”๋“œ๋Š” ๋ฌธ๋ฒ•์ ์œผ๋กœ ์™„๋ฒฝํ•˜๊ณ  ๊ตฌ์กฐ๋„ ์šฐ์•„ํ•ฉ๋‹ˆ๋‹ค. ์ฝ”๋“œ ๋ฆฌ๋ทฐ๋ฅผ ํ•˜๋ฉด "์™€, ๊น”๋”ํ•œ๋ฐ?"๋ผ๋Š” ๋ฐ˜์‘์ด ๋‚˜์˜ต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์‹ค์ œ๋กœ ์‹คํ–‰ํ•ด๋ณด๋ฉด...

- **์ปดํŒŒ์ผ์€ ๋˜์ง€๋งŒ ์‹คํ–‰์€ ์•ˆ ๋จ**: TypeScript ํƒ€์ž…์€ ์™„๋ฒฝํ•˜๊ฒŒ ๋งž๋Š”๋ฐ, ๋Ÿฐํƒ€์ž„์— `undefined` ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. "๋ถ„๋ช… ํƒ€์ž… ์ฒดํฌ๋Š” ํ†ต๊ณผํ–ˆ๋Š”๋ฐ ์™œ?"
- **์—ฃ์ง€ ์ผ€์ด์Šค ์ฒ˜๋ฆฌ ๋ถ€์กฑ**: ์ •์ƒ ์‹œ๋‚˜๋ฆฌ์˜ค(happy path)๋งŒ ๊ณ ๋ คํ•˜๊ณ , ๋นˆ ๋ฐฐ์—ด, null ๊ฐ’, ๋„คํŠธ์›Œํฌ ํƒ€์ž„์•„์›ƒ ๊ฐ™์€ ์˜ˆ์™ธ ์ƒํ™ฉ์€ ์™„์ „ํžˆ ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค.
- **์„ฑ๋Šฅ ๋ฌธ์ œ**: ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ๋งž๋Š”๋ฐ `O(nยณ)` ๋ณต์žก๋„๋กœ ๊ตฌํ˜„๋˜์–ด, ๋ฐ์ดํ„ฐ๊ฐ€ 100๊ฐœ์ผ ๋•Œ๋Š” ๊ดœ์ฐฎ์ง€๋งŒ 10,000๊ฐœ๊ฐ€ ๋˜๋ฉด ์„œ๋ฒ„๊ฐ€ ๋ฉˆ์ถฅ๋‹ˆ๋‹ค.
- **์˜์กด์„ฑ ์ง€์˜ฅ**: ๋‹จ์ˆœํ•œ ๋‚ ์งœ ํฌ๋งทํŒ…์„ ์œ„ํ•ด ๋‹ค์–‘ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ถ”์ฒœ๋ฐ›์•„ ์„ค์น˜ํ•˜๊ณ , ๋‚˜์ค‘์— ๋ณด์•ˆ ์ทจ์•ฝ์  ๊ฒฝ๊ณ ๊ฐ€ ์Ÿ์•„์ง‘๋‹ˆ๋‹ค.

**AI ์˜ˆ์ธก ์‚ฌ๋ก€**: ํ•œ ๊ฐœ๋ฐœ์ž๊ฐ€ ChatGPT๋กœ ์‚ฌ์šฉ์ž ์ธ์ฆ ์ฝ”๋“œ๋ฅผ ์ƒ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค. ์ฝ”๋“œ๋Š” ์•„๋ฆ„๋‹ค์› ๊ณ  ์ปดํŒŒ์ผ๋„ ์™„๋ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์‹ค์ œ๋กœ ๋ฐฐํฌ ํ›„, ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ํ‰๋ฌธ(plain text)์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅ๋˜๊ณ  ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. AI๋Š” "์‚ฌ์šฉ์ž ์ธ์ฆ"์ด๋ผ๋Š” ์š”์ฒญ๋งŒ ๋ฐ›์•˜์ง€, "๋ณด์•ˆ ์š”๊ตฌ์‚ฌํ•ญ"์„ ๋ช…์‹œ์ ์œผ๋กœ ๋“ฃ์ง€ ๋ชปํ–ˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ์‹ค์ œ๋กœ ๋Œ๋ ค๋ณด๊ธฐ ์ „๊นŒ์ง€๋Š” ์ด๋Ÿฐ ์น˜๋ช…์ ์ธ ๋ฌธ์ œ๋ฅผ ์•Œ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

### 2. ํ”Œ๋ž‘์ผ„์Šˆํƒ€์ธ ์ฝ”๋“œ์˜ ํƒ„์ƒ

**๋ฌธ์ œ ์ƒํ™ฉ**: ์—ฌ๋Ÿฌ AI ๋„๊ตฌ๋ฅผ ๋ฒˆ๊ฐˆ์•„ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜, ๊ฐ™์€ AI๋ผ๋„ ๋‹ค๋ฅธ ์„ธ์…˜์—์„œ ์ฝ”๋“œ๋ฅผ ์ƒ์„ฑํ•˜๋‹ค ๋ณด๋ฉด ์ผ๊ด€์„ฑ ์—†๋Š” ์ฝ”๋“œ๋ฒ ์ด์Šค๊ฐ€ ๋งŒ๋“ค์–ด์ง‘๋‹ˆ๋‹ค.

- **์ผ๊ด€์„ฑ ์—†๋Š” ์ฝ”๋”ฉ ์Šคํƒ€์ผ**: ์›”์š”์ผ์— ChatGPT๊ฐ€ ๋งŒ๋“  ์ฝ”๋“œ๋Š” ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์Šคํƒ€์ผ, ์ˆ˜์š”์ผ์— Claude๊ฐ€ ๋งŒ๋“  ์ฝ”๋“œ๋Š” ๊ฐ์ฒด์ง€ํ–ฅ ์Šคํƒ€์ผ, ๊ธˆ์š”์ผ์— Gemini๊ฐ€ ๋งŒ๋“  ์ฝ”๋“œ๋Š” ์ ˆ์ฐจํ˜• ์Šคํƒ€์ผ. ๊ฐ™์€ ํ”„๋กœ์ ํŠธ ์•ˆ์—์„œ 3๊ฐ€์ง€ ํŒจ๋Ÿฌ๋‹ค์ž„์ด ํ˜ผ์žฌํ•ฉ๋‹ˆ๋‹ค.
- **์ค‘๋ณต ๋กœ์ง ๋‚œ๋ฌด**: ๊ฐ™์€ ๊ธฐ๋Šฅ(์˜ˆ: ์ด๋ฉ”์ผ ์œ ํšจ์„ฑ ๊ฒ€์ฆ)์„ `validateEmail()`, `checkEmailFormat()`, `isEmailValid()`๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ 3๋ฒˆ ๊ตฌํ˜„ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ AI ์„ธ์…˜์ด ์ด์ „ ์ฝ”๋“œ๋ฅผ ๋ชจ๋ฅด๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.
- **์•„ํ‚คํ…์ฒ˜ ๋ถ•๊ดด**: ํ”„๋กœ์ ํŠธ๋Š” MVC ํŒจํ„ด์œผ๋กœ ์‹œ์ž‘ํ–ˆ๋Š”๋ฐ, ์–ด๋А์ƒˆ Hexagonal Architecture์™€ Clean Architecture๊ฐ€ ํ˜ผ์žฌ๋˜๊ณ , ์ผ๋ถ€๋Š” CQRS ํŒจํ„ด๊นŒ์ง€ ์„ž์—ฌ์žˆ์Šต๋‹ˆ๋‹ค.
- **๋„ค์ด๋ฐ ํ˜ผ๋ž€**: `getUserData()`, `fetchUser()`, `retrieveUserInfo()`, `loadUserProfile()` ๋ชจ๋‘ ๊ฐ™์€ ๊ธฐ๋Šฅ์ธ๋ฐ ์ด๋ฆ„๋งŒ ๋‹ค๋ฆ…๋‹ˆ๋‹ค.

**AI ์˜ˆ์ธก ์‚ฌ๋ก€**: ์Šคํƒ€ํŠธ์—… ํŒ€์ด 1๊ฐœ์›”๊ฐ„ AI๋กœ ๋น ๋ฅด๊ฒŒ ํ”„๋กœํ† ํƒ€์ž…์„ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ๊ธฐ๋Šฅ์€ ๋ชจ๋‘ ์ž‘๋™ํ–ˆ์ง€๋งŒ, ์ฝ”๋“œ๋ฒ ์ด์Šค๋Š” ๊ฐ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋‹ค๋ฅธ AI๋กœ ๋งŒ๋“  ์ฝ”๋“œ๋“ค์ด ๋’ค์„ž์ธ "ํ”Œ๋ž‘์ผ„์Šˆํƒ€์ธ"์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ๋ถ€๋ถ„์€ ํ›Œ๋ฅญํ–ˆ์ง€๋งŒ, ์ „์ฒด๋Š” ์žฌ์•™์ด์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฒฐ๊ตญ ๊ธฐ์ˆ  ๋ถ€์ฑ„๋ฅผ ๊ฐš๊ธฐ ์œ„ํ•ด 3๊ฐœ์›”์„ ํˆฌ์žํ–ˆ๊ณ , ๊ทธ ์‚ฌ์ด ๊ฒฝ์Ÿ์‚ฌ์— ์‹œ์žฅ์„ ๋นผ์•—๊ฒผ์Šต๋‹ˆ๋‹ค. "๋น ๋ฅด๊ฒŒ ๋งŒ๋“ค์—ˆ์ง€๋งŒ, ๋А๋ฆฌ๊ฒŒ ๋งํ–ˆ๋‹ค"๋Š” ๊ตํ›ˆ๋งŒ ๋‚จ์•˜์Šต๋‹ˆ๋‹ค.

### 3. ๋””๋ฒ„๊น… ์ง€์˜ฅ

**๋ฌธ์ œ ์ƒํ™ฉ**: ํ”„๋กœ๋•์…˜์—์„œ ๋ฒ„๊ทธ๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ๋•Œ, ์›์ธ์„ ์ฐพ๋Š” ๊ฒƒ์ด ๊ฑฐ์˜ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

- **์›์ธ ์ถ”์  ๋ถˆ๊ฐ€**: "์ด ํ•จ์ˆ˜๊ฐ€ ์™œ ์ด๋ ‡๊ฒŒ ๋ณต์žกํ•˜๊ฒŒ ๊ตฌํ˜„๋˜์—ˆ์ง€?" โ†’ AI ์ฑ„ํŒ… ํžˆ์Šคํ† ๋ฆฌ๋Š” ์ด๋ฏธ ์‚ญ์ œ๋˜์—ˆ๊ณ , ๋‹น์‹œ ๊ฐœ๋ฐœ์ž๋„ ๊ธฐ์–ต์ด ์•ˆ ๋‚ฉ๋‹ˆ๋‹ค.
- **์‚ฌ์ด๋“œ ์ดํŽ™ํŠธ ํŒŒ์•… ๋ถˆ๊ฐ€**: "์ด ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜๋ฉด ๋‹ค๋ฅธ ๊ณณ์ด ๊นจ์งˆ๊นŒ?" โ†’ ํ…Œ์ŠคํŠธ๊ฐ€ ์—†์œผ๋‹ˆ ์ง์ ‘ ์‹คํ–‰ํ•ด๋ด์•ผ ํ•˜๋Š”๋ฐ, ๋ชจ๋“  ๊ฒฝ์šฐ์˜ ์ˆ˜๋ฅผ ๋‹ค ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
- **ํ…Œ์ŠคํŠธ ๋ถ€์žฌ**: AI์—๊ฒŒ "ํ…Œ์ŠคํŠธ๋„ ์ž‘์„ฑํ•ด์ค˜"๋ผ๊ณ  ์š”์ฒญํ•˜๋ฉด ํ…Œ์ŠคํŠธ๋Š” ๋งŒ๋“ค์–ด์ฃผ์ง€๋งŒ, ์‹ค์ œ๋กœ ์‹คํ–‰ํ•ด๋ณด์ง€ ์•Š์•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ทธ ํ…Œ์ŠคํŠธ์กฐ์ฐจ ์ œ๋Œ€๋กœ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธ์ด ์•ˆ ๋ฉ๋‹ˆ๋‹ค. "ํ…Œ์ŠคํŠธ๋Š” ๋‚˜์ค‘์—"๋ผ๋Š” ์ƒ๊ฐ์œผ๋กœ ๋ฏธ๋ฃจ๋ฉด, ๋‚˜์ค‘์€ ์˜์›ํžˆ ์˜ค์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
- **๋ฌธ์„œ ์—†์Œ**: AI๋Š” ์ฝ”๋“œ๋งŒ ๋งŒ๋“ค์–ด์ฃผ์ง€, README๋‚˜ API ๋ฌธ์„œ๋Š” ์•ˆ ์จ์ค๋‹ˆ๋‹ค. ์„ค์‚ฌ ๋ฌธ์„œ๋ฅผ ๋งŒ๋“ค์–ด๋‹ฌ๋ผ๊ณ  ํ•ด๋„, ์ฝ”๋“œ๊ฐ€ ๋ณ€๊ฒฝ๋˜๋ฉด ๋ฌธ์„œ๋Š” outdated ์ƒํƒœ๊ฐ€ ๋ฉ๋‹ˆ๋‹ค.

**AI ์˜ˆ์ธก ์‚ฌ๋ก€**: ๊ธˆ์š”์ผ ์ €๋… 6์‹œ, ํ”„๋กœ๋•์…˜์—์„œ ๊ฒฐ์ œ ์‹คํŒจ ๋ฒ„๊ทธ๊ฐ€ ๋ณด๊ณ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐœ๋ฐœ์ž๋Š” 3๊ฐœ์›” ์ „์— AI๋กœ ์ƒ์„ฑํ•œ ๊ฒฐ์ œ ๋กœ์ง์„ ์—ด์–ด๋ดค์ง€๋งŒ, ์™œ ์ด๋ ‡๊ฒŒ ๊ตฌํ˜„ํ–ˆ๋Š”์ง€ ์ „ํ˜€ ๊ธฐ์–ต์ด ์•ˆ ๋‚ฌ์Šต๋‹ˆ๋‹ค. AI ์ฑ„ํŒ…์€ ์‚ญ์ œ๋˜์—ˆ๊ณ , ์ฃผ์„๋„ ์—†์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฒฐ๊ตญ `console.log()`๋ฅผ ์ˆ˜์‹ญ ๊ฐœ ์ฐ์–ด๊ฐ€๋ฉฐ ๋””๋ฒ„๊น…ํ–ˆ๊ณ , ์›์ธ์„ ์ฐพ๋Š” ๋ฐ ์ฃผ๋ง ์ดํ‹€์ด ๊ฑธ๋ ธ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œ๋Š” ๋‹จ์ˆœํ•œ ํƒ€์ž„์กด ์ฒ˜๋ฆฌ ๋ฒ„๊ทธ์˜€์ง€๋งŒ, ์ถ”์ ์„ฑ์ด ์—†์–ด์„œ ์ฐพ๊ธฐ๊ฐ€ ๋„ˆ๋ฌด ์–ด๋ ค์› ์Šต๋‹ˆ๋‹ค.

### 4. ์š”๊ตฌ์‚ฌํ•ญ ์ถ”์ ์„ฑ ์ƒ์‹ค

**AI ์˜ˆ์ธก ์‚ฌ๋ก€**: ์‹œ๊ฐ„์ด ์ง€๋‚ ์ˆ˜๋ก "์™œ ์ด ์ฝ”๋“œ๋ฅผ ์ด๋ ‡๊ฒŒ ๋งŒ๋“ค์—ˆ๋Š”์ง€" ๋งฅ๋ฝ์„ ์žƒ์–ด๋ฒ„๋ฆฝ๋‹ˆ๋‹ค.

- **"์™œ"๋ฅผ ์žƒ์–ด๋ฒ„๋ฆผ**: ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์˜ ๋ฐฐ๊ฒฝ๊ณผ ์ด์œ ๋ฅผ ๋ชจ๋ฆ…๋‹ˆ๋‹ค. "์™œ ๊ฒฐ์ œ ๊ธˆ์•ก์ด 10๋งŒ์›์„ ๋„˜์œผ๋ฉด ์ถ”๊ฐ€ ์ธ์ฆ์„ ์š”๊ตฌํ•˜๋‚˜์š”?" โ†’ "๊ธ€์Ž„์š”, AI๊ฐ€ ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“ค์—ˆ๋Š”๋ฐ์š”..."
- **๋ณ€๊ฒฝ ์ด๋ ฅ ๋ถ€์žฌ**: ๋ˆ„๊ฐ€, ์–ธ์ œ, ์™œ ์ด ์ฝ”๋“œ๋ฅผ ๋ฐ”๊ฟจ๋Š”์ง€ ๊ธฐ๋ก์ด ์—†์Šต๋‹ˆ๋‹ค. Git ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€๋„ "fix bug", "update code" ๊ฐ™์€ ๋ฌด์˜๋ฏธํ•œ ๋ฉ”์‹œ์ง€๋ฟ์ž…๋‹ˆ๋‹ค.
- **์˜์‚ฌ๊ฒฐ์ • ๊ทผ๊ฑฐ ์‚ฌ๋ผ์ง**: "์™œ JWT๋ฅผ ์„ ํƒํ–ˆ๊ณ , Session ๋Œ€์‹  ์‚ฌ์šฉํ•˜๋‚˜์š”?" โ†’ "๊ธฐ์–ต ์•ˆ ๋‚˜์š”. AI๊ฐ€ ์ถ”์ฒœํ•ด์„œ์š”."

**AI ์˜ˆ์ธก ์‚ฌ๋ก€**: ํ•€ํ…Œํฌ ์Šคํƒ€ํŠธ์—…์ด ๊ฐ์‚ฌ๋ฅผ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌ๊ด€์ด "์ด ๊ณ ๊ฐ ์‹ ์šฉ ํ‰๊ฐ€ ๋กœ์ง์˜ ๊ทผ๊ฑฐ๋ฅผ ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”"๋ผ๊ณ  ์š”์ฒญํ–ˆ์ง€๋งŒ, ์ฝ”๋“œ๋งŒ ์žˆ๊ณ  SPEC ๋ฌธ์„œ๊ฐ€ ์—†์—ˆ์Šต๋‹ˆ๋‹ค. ๋ˆ„๊ฐ€ ์™œ ์ด ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์„ ํƒํ–ˆ๋Š”์ง€, ์–ด๋–ค ๋น„์ฆˆ๋‹ˆ์Šค ์š”๊ตฌ์‚ฌํ•ญ์„ ๋ฐ˜์˜ํ•œ ๊ฒƒ์ธ์ง€ ์•„๋ฌด๋„ ๋ชฐ๋ž์Šต๋‹ˆ๋‹ค. AI๊ฐ€ ์ƒ์„ฑํ•œ ์ฝ”๋“œ์˜€๊ณ , ์ž‘๋™ํ•˜๋‹ˆ๊นŒ ๊ทธ๋ƒฅ ์‚ฌ์šฉํ–ˆ๋˜ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ฒฐ๊ณผ์ ์œผ๋กœ ๊ธˆ์œต ๋ผ์ด์„ ์Šค ์Šน์ธ์ด 6๊ฐœ์›” ์ง€์—ฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ฝ”๋“œ๋Š” ์žˆ๋Š”๋ฐ ์ปจํ…์ŠคํŠธ๊ฐ€ ์—†์–ด์„œ ์ƒ๊ธด ๋น„๊ทน์ž…๋‹ˆ๋‹ค.

### 5. ํŒ€ ํ˜‘์—… ๋ถ•๊ดด

**๋ฌธ์ œ ์ƒํ™ฉ**: ์—ฌ๋Ÿฌ ๊ฐœ๋ฐœ์ž๊ฐ€ ๊ฐ์ž AI๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์„œ ํ˜‘์—…์ด ๋ฌด๋„ˆ์ง‘๋‹ˆ๋‹ค.

- **์ŠคํŒŒ๊ฒŒํ‹ฐ ์ฝ”๋“œ ์–‘์‚ฐ**: A ๊ฐœ๋ฐœ์ž๋Š” ChatGPT๋กœ, B ๊ฐœ๋ฐœ์ž๋Š” Claude๋กœ, C ๊ฐœ๋ฐœ์ž๋Š” Gemini์œผ๋กœ ๊ฐ์ž ์ฝ”๋“œ๋ฅผ ๋งŒ๋“ค์–ด์„œ Git์— ํ‘ธ์‹œํ•ฉ๋‹ˆ๋‹ค. ์ฝ”๋“œ ๋ฆฌ๋ทฐ ์—†์ด ๊ทธ๋ƒฅ ๋จธ์ง€ํ•ฉ๋‹ˆ๋‹ค. 3๊ฐœ์›” ํ›„ ์ฝ”๋“œ๋ฒ ์ด์Šค๋Š” ์ŠคํŒŒ๊ฒŒํ‹ฐ๊ฐ€ ๋ฉ๋‹ˆ๋‹ค.
- **์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋ถˆ๊ฐ€**: ๋ฆฌ๋ทฐ์–ด๊ฐ€ "์ด๊ฒŒ ๋ญ ํ•˜๋Š” ์ฝ”๋“œ์ธ์ง€ ๋ชจ๋ฅด๊ฒ ์–ด์š”. ์„ค๋ช… ๋ถ€ํƒ๋“œ๋ ค์š”"๋ผ๊ณ  ํ•˜๋ฉด, ์ž‘์„ฑ์ž๋„ "์ €๋„ AI๊ฐ€ ๋งŒ๋“  ๊ฑด๋ฐ, ์ž˜ ๋ชจ๋ฅด๊ฒ ์–ด์š”"๋ผ๊ณ  ๋‹ตํ•ฉ๋‹ˆ๋‹ค.
- **์˜จ๋ณด๋”ฉ ์•…๋ชฝ**: ์ƒˆ๋กœ ์ž…์‚ฌํ•œ ๊ฐœ๋ฐœ์ž๊ฐ€ ์ฝ”๋“œ๋ฒ ์ด์Šค๋ฅผ ์ดํ•ดํ•˜๋Š” ๋ฐ ํ•œ ๋‹ฌ ์ด์ƒ ๊ฑธ๋ฆฝ๋‹ˆ๋‹ค. ๋ฉ˜ํ† ๊ฐ€ "์ด ๋ถ€๋ถ„์€... ์Œ... ์†”์งํžˆ ์ €๋„ ์ž˜ ๋ชจ๋ฅด๊ฒ ๋„ค์š”"๋ผ๊ณ  ๋‹ตํ•˜๋Š” ์ˆœ๊ฐ„, ์‹ ์ž…์€ ์ ˆ๋งํ•ฉ๋‹ˆ๋‹ค.
- **๊ธฐ์ˆ  ๋ถ€์ฑ„ ํญ๋ฐœ**: "์ด ์ฝ”๋“œ ๊ฑด๋“œ๋ฆฌ๋ฉด ๋ญ”๊ฐ€ ๊นจ์งˆ ๊ฒƒ ๊ฐ™์•„์„œ ๋ชป ๊ฑด๋“œ๋ฆฌ๊ฒ ์–ด์š”"๋ผ๋Š” "๊ธˆ๊ธฐ ์ฝ”๋“œ" ์˜์—ญ์ด ์ ์  ํ™•๋Œ€๋ฉ๋‹ˆ๋‹ค. ๋ฆฌํŒฉํ† ๋ง์€ ๋ถˆ๊ฐ€๋Šฅํ•ด์ง€๊ณ , ์ƒˆ ๊ธฐ๋Šฅ์€ ๋•์ง€๋•์ง€ ๋ถ™์—ฌ๋‚˜๊ฐ‘๋‹ˆ๋‹ค.

**AI ์˜ˆ์ธก ์‚ฌ๋ก€**: 10๋ช… ๊ทœ๋ชจ์˜ ๊ฐœ๋ฐœ ํŒ€์ด ๊ฐ์ž AI๋กœ ๋น ๋ฅด๊ฒŒ ๊ธฐ๋Šฅ์„ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐœ๋ณ„ ๊ธฐ๋Šฅ์€ ๋ชจ๋‘ ์ž‘๋™ํ–ˆ์ง€๋งŒ, ํ†ตํ•ฉํ•˜๋‹ˆ ์ถฉ๋Œ์ด ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ™์€ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ํ…Œ์ด๋ธ”์„ ์„œ๋กœ ๋‹ค๋ฅธ ๋ฐฉ์‹์œผ๋กœ ์ ‘๊ทผํ•˜๊ณ , API ์‘๋‹ต ํ˜•์‹๋„ ์ œ๊ฐ๊ฐ์ด์—ˆ์Šต๋‹ˆ๋‹ค. ์ฝ”๋“œ ๋ฆฌ๋ทฐ๋ฅผ ํ•˜๋ ค ํ•ด๋„, ๊ฐ์ž๊ฐ€ ๋งŒ๋“  ์ฝ”๋“œ๋ฅผ ๋ณธ์ธ๋„ ์™„์ „ํžˆ ์ดํ•ดํ•˜์ง€ ๋ชปํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฆฌ๋ทฐ๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฒฐ๊ตญ CTO๊ฐ€ "์ด ํ”„๋กœ์ ํŠธ๋Š” ์œ ์ง€๋ณด์ˆ˜๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค. ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹ค์‹œ ๋งŒ๋“ค์ž"๋Š” ๊ฒฐ๋ก ์„ ๋‚ด๋ ธ๊ณ , 6๊ฐœ์›”์˜ ๊ฐœ๋ฐœ์ด ๋ฌผ๊ฑฐํ’ˆ์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

### ๐Ÿ’” ๋ฐ”์ด๋ธŒ ์ฝ”๋”ฉ์˜ ์—ญ์„ค

**์†๋„์™€ ํ’ˆ์งˆ์˜ ํŠธ๋ ˆ์ด๋“œ์˜คํ”„**: AI๊ฐ€ ์ฝ”๋“œ๋ฅผ ๋น ๋ฅด๊ฒŒ ์ƒ์„ฑํ•ด์ฃผ์ง€๋งŒ, ๊ทธ ์ฝ”๋“œ๋Š” **์œ ์ง€๋ณด์ˆ˜ํ•  ์ˆ˜ ์—†๋Š” ๋ธ”๋ž™๋ฐ•์Šค**๊ฐ€ ๋ฉ๋‹ˆ๋‹ค. ์ƒ์‚ฐ์„ฑ์€ ๋†’์•„์กŒ๋Š”๋ฐ ํ’ˆ์งˆ์€ ๋‚ฎ์•„์ง€๋Š” ๋”œ๋ ˆ๋งˆ์— ๋น ์ง‘๋‹ˆ๋‹ค. 1์ฃผ์ผ ๋งŒ์— ๋งŒ๋“  ํ”„๋กœํ† ํƒ€์ž…์ด 3๊ฐœ์›” ๋™์•ˆ ๊ธฐ์ˆ  ๋ถ€์ฑ„๋ฅผ ๋งŒ๋“ค์–ด๋ƒ…๋‹ˆ๋‹ค.

**๋‹จ๊ธฐ ์ด์ต, ์žฅ๊ธฐ ์†ํ•ด**: ์ฒ˜์Œ์—” "์™€, AI ๋•๋ถ„์— ๊ฐœ๋ฐœ์ด ๋นจ๋ผ์กŒ์–ด!"๋ผ๊ณ  ๊ธฐ๋ปํ•˜์ง€๋งŒ, 3๊ฐœ์›” ํ›„์—” "์ด ์ฝ”๋“œ ์–ด๋–ป๊ฒŒ ์œ ์ง€๋ณด์ˆ˜ํ•˜์ง€?"๋ผ๊ณ  ๊ณ ๋ฏผํ•˜๊ณ , 6๊ฐœ์›” ํ›„์—” "์ฐจ๋ผ๋ฆฌ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹ค์‹œ ๋งŒ๋“ค๊นŒ?"๋ผ๊ณ  ์ขŒ์ ˆํ•ฉ๋‹ˆ๋‹ค.

**ํ•ด๊ฒฐ์ฑ…์˜ ํ•„์š”์„ฑ**: ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋ ค๋ฉด, AI์˜ ์†๋„๋Š” ์œ ์ง€ํ•˜๋ฉด์„œ๋„ ์ฝ”๋“œ์˜ **์ผ๊ด€์„ฑ, ํ’ˆ์งˆ, ์ถ”์ ์„ฑ**์„ ๋ณด์žฅํ•˜๋Š” ์ฒด๊ณ„์ ์ธ ๋ฐฉ๋ฒ•๋ก ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋ฐ”๋กœ ์—ฌ๊ธฐ์„œ **Alfred์™€ MoAI-ADK**๊ฐ€ ๋“ฑ์žฅํ•ฉ๋‹ˆ๋‹ค.

---

## โœจ The Solution - MoAI-ADK's 3-Step Workflow

Alfred๋Š” Agentic AI ์‹œ๋Œ€์˜ ์ฝ”๋“œ ํ’ˆ์งˆ ๋ฌธ์ œ๋ฅผ **์ฒด๊ณ„์ ์ธ 3๋‹จ๊ณ„ MoAI-ADK ์›Œํฌํ”Œ๋กœ์šฐ**๋กœ ํ•ด๊ฒฐํ•ฉ๋‹ˆ๋‹ค. ๋ฐ”์ด๋ธŒ ์ฝ”๋”ฉ์˜ ํ˜ผ๋ž€์„ **์ผ๊ด€์„ฑ, ํ’ˆ์งˆ, ์ถ”์ ์„ฑ**์ด ๋ณด์žฅ๋˜๋Š” ์ฒด๊ณ„์ ์ธ ํ”„๋กœ์„ธ์Šค๋กœ ์ „ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

์ด 3๋‹จ๊ณ„ ์›Œํฌํ”Œ๋กœ์šฐ๋Š” ์†Œํ”„ํŠธ์›จ์–ด ๊ณตํ•™์˜ ์˜ค๋žœ ์ง€ํ˜œ(๋ช…์„ธ ์ž‘์„ฑ, TDD, ๋ฌธ์„œํ™”)๋ฅผ AI ์‹œ๋Œ€์— ๋งž๊ฒŒ ์žฌํ•ด์„ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์‚ฌ๋žŒ์ด ์ผ์ผ์ด ํ•˜๊ธฐ์—” ๋ฒˆ๊ฑฐ๋กญ์ง€๋งŒ, AI ์—์ด์ „ํŠธ๊ฐ€ ์ž๋™ํ™”ํ•˜๋ฉด ๋†€๋ผ์šธ ์ •๋„๋กœ ํšจ์œจ์ ์ž…๋‹ˆ๋‹ค. ์ด์ œ **์ฝ”๋“œ/๋ฌธ์„œ ์ž‘์„ฑ์€ AI, ๊ฒ€ํ† ๋Š” ์—ฌ๋Ÿฌ๋ถ„**์ด ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

```mermaid
graph LR
A[1๏ธโƒฃ SPEC] --> B[2๏ธโƒฃ BUILD]
B --> C[3๏ธโƒฃ SYNC]
C --> D[โœ… Production Ready]
D -.๋ฐ˜๋ณต.-> A
```

### 1๏ธโƒฃ SPEC - ๋ช…์„ธ ์ž‘์„ฑ (Specification)

**๋ช…๋ น์–ด**: `/alfred:1-spec "JWT ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ๋กœ๊ทธ์ธ API"`

**ํ•ต์‹ฌ ์ฒ ํ•™**: "์ฝ”๋“œ๋ฅผ ์“ฐ๊ธฐ ์ „์— ๋ฌด์—‡์„ ๋งŒ๋“ค์ง€ ๋จผ์ € ์ •์˜ํ•˜๋ผ." SPEC ์—†์ด ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์€ ์ง€๋„ ์—†์ด ์—ฌํ–‰์„ ๋– ๋‚˜๋Š” ๊ฒƒ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

**Alfred๊ฐ€ ์ž๋™์œผ๋กœ ์ˆ˜ํ–‰ํ•˜๋Š” ์ž‘์—…**:

1. **EARS ํ˜•์‹ ๋ช…์„ธ ์ž๋™ ์ƒ์„ฑ**: Alfred๊ฐ€ ์—ฌ๋Ÿฌ๋ถ„์˜ ๊ฐ„๋‹จํ•œ ์š”์ฒญ("JWT ๋กœ๊ทธ์ธ")์„ ๊ตฌ์กฐํ™”๋œ EARS ๋ฌธ๋ฒ•์œผ๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
- **Ubiquitous**: "์‹œ์Šคํ…œ์€ JWT ํ† ํฐ ๊ธฐ๋ฐ˜ ์ธ์ฆ์„ ์ œ๊ณตํ•ด์•ผ ํ•œ๋‹ค"
- **Event-driven**: "WHEN ์‚ฌ์šฉ์ž๊ฐ€ ์œ ํšจํ•œ ์ด๋ฉ”์ผ/๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด, ์‹œ์Šคํ…œ์€ JWT ํ† ํฐ์„ ๋ฐœ๊ธ‰ํ•ด์•ผ ํ•œ๋‹ค"
- **State-driven**: "WHILE ํ† ํฐ์ด ์œ ํšจํ•œ ๋™์•ˆ, ์‹œ์Šคํ…œ์€ ์ธ์ฆ๋œ ์š”์ฒญ์„ ํ—ˆ์šฉํ•ด์•ผ ํ•œ๋‹ค"
- **Constraints**: "IF ํ† ํฐ์ด ๋งŒ๋ฃŒ๋˜์—ˆ์œผ๋ฉด, ์‹œ์Šคํ…œ์€ 401 ์—๋Ÿฌ๋ฅผ ๋ฐ˜ํ™˜ํ•ด์•ผ ํ•œ๋‹ค"

2. **`@SPEC:ID` TAG ๋ถ€์—ฌ**: ์˜๊ตฌ์ ์ธ ์ถ”์  ID๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค (์˜ˆ: `@SPEC:AUTH-001`). ์ด ID๋Š” ์ ˆ๋Œ€ ๋ณ€ํ•˜์ง€ ์•Š์œผ๋ฉฐ, ์•ž์œผ๋กœ ๋ชจ๋“  ํ…Œ์ŠคํŠธ, ์ฝ”๋“œ, ๋ฌธ์„œ๊ฐ€ ์ด ID๋ฅผ ์ฐธ์กฐํ•ฉ๋‹ˆ๋‹ค.

3. **Git ๋ธŒ๋žœ์น˜ ์ž๋™ ์ƒ์„ฑ**: `feature/SPEC-AUTH-001-jwt-login` ๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค๊ณ  ์ „ํ™˜ํ•ฉ๋‹ˆ๋‹ค. GitFlow ์ „๋žต์„ ์ž๋™์œผ๋กœ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.

4. **HISTORY ์„น์…˜ ์ž๋™ ์ถ”๊ฐ€**: ๋ณ€๊ฒฝ ์ด๋ ฅ์„ ์ถ”์ ํ•ฉ๋‹ˆ๋‹ค.

```yaml
## HISTORY
- v1.0.0 (2025-10-02): INITIAL - JWT ์ธ์ฆ SPEC ์ตœ์ดˆ ์ž‘์„ฑ
```

**์‹ค์ œ ์ƒ์„ฑ๋˜๋Š” ํŒŒ์ผ ์˜ˆ์‹œ** (`.moai/specs/SPEC-AUTH-001.md`):

```markdown
---
id: AUTH-001
title: JWT ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ๋กœ๊ทธ์ธ API
version: 1.0.0
status: Draft
created: 2025-10-02
author: AI Alfred
tags: [authentication, jwt, api]
---

# @SPEC:AUTH-001 | JWT ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ๋กœ๊ทธ์ธ API

## ์š”๊ตฌ์‚ฌํ•ญ (EARS)

### Ubiquitous
- ์‹œ์Šคํ…œ์€ JWT ํ† ํฐ ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ์ธ์ฆ์„ ์ œ๊ณตํ•ด์•ผ ํ•œ๋‹ค

### Event-driven
- WHEN ์‚ฌ์šฉ์ž๊ฐ€ POST /api/auth/login์— ์ด๋ฉ”์ผ/๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ „์†กํ•˜๋ฉด
- ์‹œ์Šคํ…œ์€ DB์—์„œ ์‚ฌ์šฉ์ž๋ฅผ ์กฐํšŒํ•ด์•ผ ํ•œ๋‹ค
- ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ์ผ์น˜ํ•˜๋ฉด JWT ํ† ํฐ์„ ์ƒ์„ฑํ•ด์•ผ ํ•œ๋‹ค
- ์‘๋‹ต์œผ๋กœ { token, expiresIn } JSON์„ ๋ฐ˜ํ™˜ํ•ด์•ผ ํ•œ๋‹ค

### Constraints
- IF ์ด๋ฉ”์ผ์ด ์กด์žฌํ•˜์ง€ ์•Š์œผ๋ฉด, 404 ์—๋Ÿฌ๋ฅผ ๋ฐ˜ํ™˜ํ•ด์•ผ ํ•œ๋‹ค
- IF ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ํ‹€๋ฆฌ๋ฉด, 401 ์—๋Ÿฌ๋ฅผ ๋ฐ˜ํ™˜ํ•ด์•ผ ํ•œ๋‹ค
- IF ํ† ํฐ ๋งŒ๋ฃŒ ์‹œ๊ฐ„์€ 24์‹œ๊ฐ„์ด์–ด์•ผ ํ•œ๋‹ค

## HISTORY
- v1.0.0 (2025-10-02): INITIAL - JWT ์ธ์ฆ SPEC ์ตœ์ดˆ ์ž‘์„ฑ
```

**Why it matters**: 6๊ฐœ์›” ํ›„ ๋ˆ„๊ตฐ๊ฐ€ "์™œ ํ† ํฐ ๋งŒ๋ฃŒ ์‹œ๊ฐ„์ด 24์‹œ๊ฐ„์ด์ง€?"๋ผ๊ณ  ๋ฌผ์–ด๋ณด๋ฉด, SPEC ๋ฌธ์„œ๋ฅผ ์—ด์–ด HISTORY๋ฅผ ํ™•์ธํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. "์•„, v1.0.0์—์„œ ๋ณด์•ˆํŒ€ ์š”๊ตฌ์‚ฌํ•ญ์œผ๋กœ 24์‹œ๊ฐ„์œผ๋กœ ๊ฒฐ์ •๋˜์—ˆ๊ตฌ๋‚˜" ๊ฐ™์€ ๋งฅ๋ฝ์„ ์ฆ‰์‹œ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

### 2๏ธโƒฃ BUILD - TDD ๊ตฌํ˜„ (Test-Driven Development)

**๋ช…๋ น์–ด**: `/alfred:2-build AUTH-001`

**ํ•ต์‹ฌ ์ฒ ํ•™**: "ํ…Œ์ŠคํŠธ๋ฅผ ๋จผ์ € ์ž‘์„ฑํ•˜๊ณ , ๊ทธ ๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋ผ." TDD๋Š” ์ฝ”๋“œ์˜ ์•ˆ์ „๋ง์ด์ž, ์‚ด์•„์žˆ๋Š” ๋ฌธ์„œ์ด๋ฉฐ, ๋ฆฌํŒฉํ† ๋ง์˜ ์ž์‹ ๊ฐ์ž…๋‹ˆ๋‹ค.

**Alfred๊ฐ€ ์ˆ˜ํ–‰ํ•˜๋Š” TDD ์‚ฌ์ดํด**:

```mermaid
graph LR
A[SPEC ์ฝ๊ธฐ] --> B[๐Ÿ”ด RED
ํ…Œ์ŠคํŠธ ์ž‘์„ฑ]
B --> C{ํ…Œ์ŠคํŠธ ์‹คํ–‰}
C -->|์‹คํŒจ| D[๐ŸŸข GREEN
์ตœ์†Œ ๊ตฌํ˜„]
D --> E{ํ…Œ์ŠคํŠธ ์‹คํ–‰}
E -->|ํ†ต๊ณผ| F[๐Ÿ”ต REFACTOR
์ฝ”๋“œ ๊ฐœ์„ ]
F --> G{ํ…Œ์ŠคํŠธ ์‹คํ–‰}
G -->|ํ†ต๊ณผ| H[โœ… ์™„๋ฃŒ]
G -->|์‹คํŒจ| F

style A fill:#e1f5ff
style B fill:#ffcdd2
style D fill:#c8e6c9
style F fill:#bbdefb
style H fill:#fff9c4
```

#### ๐Ÿ”ด RED Phase - ์‹คํŒจํ•˜๋Š” ํ…Œ์ŠคํŠธ ์ž‘์„ฑ

Alfred๊ฐ€ SPEC์„ ์ฝ๊ณ  ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋ฅผ ๋จผ์ € ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค (`@TEST:AUTH-001`).

```typescript
// tests/auth/login.test.ts
// @TEST:AUTH-001 | SPEC: SPEC-AUTH-001.md

import { describe, it, expect } from 'vitest';
import { loginUser } from '@/services/auth';

describe('JWT ๋กœ๊ทธ์ธ API', () => {
it('์œ ํšจํ•œ ์ด๋ฉ”์ผ/๋น„๋ฐ€๋ฒˆํ˜ธ๋กœ ๋กœ๊ทธ์ธ ์‹œ JWT ํ† ํฐ์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค', async () => {
const result = await loginUser('user@example.com', 'password123');

expect(result.token).toBeDefined();
expect(result.expiresIn).toBe(86400); // 24์‹œ๊ฐ„ = 86400์ดˆ
expect(result.token).toMatch(/^eyJ/); // JWT ํ˜•์‹ ํ™•์ธ
});

it('์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ด๋ฉ”์ผ๋กœ ๋กœ๊ทธ์ธ ์‹œ 404 ์—๋Ÿฌ', async () => {
await expect(
loginUser('nonexistent@example.com', 'password')
).rejects.toThrow('User not found');
});

it('ํ‹€๋ฆฐ ๋น„๋ฐ€๋ฒˆํ˜ธ๋กœ ๋กœ๊ทธ์ธ ์‹œ 401 ์—๋Ÿฌ', async () => {
await expect(
loginUser('user@example.com', 'wrongpassword')
).rejects.toThrow('Invalid password');
});
});

// TDD History:
// - 2025-10-02: RED - ํ…Œ์ŠคํŠธ ์ตœ์ดˆ ์ž‘์„ฑ (๋‹น์—ฐํžˆ ์‹คํŒจ)
```

์ด ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด **๋‹น์—ฐํžˆ ์‹คํŒจ**ํ•ฉ๋‹ˆ๋‹ค. ์•„์ง `loginUser` ํ•จ์ˆ˜๋ฅผ ๊ตฌํ˜„ํ•˜์ง€ ์•Š์•˜์œผ๋‹ˆ๊นŒ์š”. ์ด๊ฒƒ์ด RED ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค.

#### ๐ŸŸข GREEN Phase - ์ตœ์†Œ ๊ตฌํ˜„์œผ๋กœ ํ…Œ์ŠคํŠธ ํ†ต๊ณผ

์ด์ œ Alfred๊ฐ€ ํ…Œ์ŠคํŠธ๋ฅผ ํ†ต๊ณผ์‹œํ‚ค๋Š” **์ตœ์†Œํ•œ์˜ ์ฝ”๋“œ**๋งŒ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค (`@CODE:AUTH-001`).

```typescript
// src/services/auth.ts
// @CODE:AUTH-001 | SPEC: SPEC-AUTH-001.md | TEST: tests/auth/login.test.ts

import jwt from 'jsonwebtoken';
import bcrypt from 'bcrypt';
import { getUserByEmail } from '@/db/users';

export async function loginUser(email: string, password: string) {
// ์‚ฌ์šฉ์ž ์กฐํšŒ
const user = await getUserByEmail(email);
if (!user) {
throw new Error('User not found'); // 404
}

// ๋น„๋ฐ€๋ฒˆํ˜ธ ๊ฒ€์ฆ
const isValid = await bcrypt.compare(password, user.hashedPassword);
if (!isValid) {
throw new Error('Invalid password'); // 401
}

// JWT ํ† ํฐ ์ƒ์„ฑ
const token = jwt.sign(
{ userId: user.id, email: user.email },
process.env.JWT_SECRET!,
{ expiresIn: '24h' } // 24์‹œ๊ฐ„
);

return {
token,
expiresIn: 86400 // 24์‹œ๊ฐ„ = 86400์ดˆ
};
}

// TDD History:
// - 2025-10-02: GREEN - ํ…Œ์ŠคํŠธ ํ†ต๊ณผํ•˜๋Š” ์ตœ์†Œ ๊ตฌํ˜„
```

ํ…Œ์ŠคํŠธ๋ฅผ ๋‹ค์‹œ ์‹คํ–‰ํ•˜๋ฉด **๋ชจ๋‘ ํ†ต๊ณผ**ํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ์ด GREEN ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค.

#### ๐Ÿ”ต REFACTOR Phase - ์ฝ”๋“œ ํ’ˆ์งˆ ๊ฐœ์„ 

์ด์ œ Alfred๊ฐ€ ์ฝ”๋“œ๋ฅผ ๋ฆฌํŒฉํ† ๋งํ•˜์—ฌ ํ’ˆ์งˆ์„ ๋†’์ž…๋‹ˆ๋‹ค. TRUST 5์›์น™์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.

```typescript
// src/services/auth.ts
// @CODE:AUTH-001 | SPEC: SPEC-AUTH-001.md | TEST: tests/auth/login.test.ts

import jwt from 'jsonwebtoken';
import bcrypt from 'bcrypt';
import { getUserByEmail } from '@/db/users';
import { UnauthorizedError, NotFoundError } from '@/errors';

const TOKEN_EXPIRY = '24h';
const TOKEN_EXPIRY_SECONDS = 86400;

interface LoginResult {
token: string;
expiresIn: number;
}

export async function loginUser(
email: string,
password: string
): Promise {
// ์ž…๋ ฅ ๊ฒ€์ฆ (Secured)
if (!email || !password) {
throw new UnauthorizedError('Email and password required');
}

// ์‚ฌ์šฉ์ž ์กฐํšŒ
const user = await getUserByEmail(email);
if (!user) {
throw new NotFoundError('User not found');
}

// ๋น„๋ฐ€๋ฒˆํ˜ธ ๊ฒ€์ฆ
const isValid = await verifyPassword(password, user.hashedPassword);
if (!isValid) {
throw new UnauthorizedError('Invalid password');
}

// JWT ํ† ํฐ ์ƒ์„ฑ
const token = generateJwtToken(user);

return {
token,
expiresIn: TOKEN_EXPIRY_SECONDS
};
}

// ์ž‘์€ ํ•จ์ˆ˜๋กœ ๋ถ„๋ฆฌ (Readable)
async function verifyPassword(
plain: string,
hashed: string
): Promise {
return bcrypt.compare(plain, hashed);
}

function generateJwtToken(user: User): string {
return jwt.sign(
{ userId: user.id, email: user.email },
getJwtSecret(),
{ expiresIn: TOKEN_EXPIRY }
);
}

function getJwtSecret(): string {
const secret = process.env.JWT_SECRET;
if (!secret) {
throw new Error('JWT_SECRET not configured');
}
return secret;
}

// TDD History:
// - 2025-10-02: RED - ํ…Œ์ŠคํŠธ ์ตœ์ดˆ ์ž‘์„ฑ
// - 2025-10-02: GREEN - ํ…Œ์ŠคํŠธ ํ†ต๊ณผ
// - 2025-10-02: REFACTOR - ํ•จ์ˆ˜ ๋ถ„๋ฆฌ, ํƒ€์ž… ์ถ”๊ฐ€, ์—๋Ÿฌ ์ฒ˜๋ฆฌ ๊ฐœ์„ 
```

ํ…Œ์ŠคํŠธ๋ฅผ ๋‹ค์‹œ ์‹คํ–‰ํ•˜๋ฉด **์—ฌ์ „ํžˆ ํ†ต๊ณผ**ํ•ฉ๋‹ˆ๋‹ค. ๋ฆฌํŒฉํ† ๋ง์€ ์™ธ๋ถ€ ๋™์ž‘์„ ๋ฐ”๊พธ์ง€ ์•Š๊ณ  ๋‚ด๋ถ€ ๊ตฌ์กฐ๋งŒ ๊ฐœ์„ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.

**Why it matters**: ํ…Œ์ŠคํŠธ๊ฐ€ ์•ˆ์ „๋ง ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค. ๋‚˜์ค‘์— ๋ˆ„๊ตฐ๊ฐ€ ์ด ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜๋”๋ผ๋„, ํ…Œ์ŠคํŠธ๊ฐ€ ๊นจ์ง€๋ฉด ์ฆ‰์‹œ ์•Œ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. "๋ฆฌํŒฉํ† ๋ง์€ ์œ„ํ—˜ํ•ด"๊ฐ€ ์•„๋‹ˆ๋ผ "ํ…Œ์ŠคํŠธ๋งŒ ํ†ต๊ณผํ•˜๋ฉด ์•ˆ์ „ํ•ด"๋กœ ๋ฐ”๋€๋‹ˆ๋‹ค.

### 3๏ธโƒฃ SYNC - ๋ฌธ์„œ ๋™๊ธฐํ™” (Synchronization)

**๋ช…๋ น์–ด**: `/alfred:3-sync`

**ํ•ต์‹ฌ ์ฒ ํ•™**: "์ฝ”๋“œ์™€ ๋ฌธ์„œ๋Š” ํ•ญ์ƒ ๋™๊ธฐํ™”๋˜์–ด์•ผ ํ•œ๋‹ค." ๋ฌธ์„œ๊ฐ€ outdated๋˜๋Š” ์ˆœ๊ฐ„, ์•„๋ฌด๋„ ๋ฌธ์„œ๋ฅผ ๋ฏฟ์ง€ ์•Š๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

**Alfred๊ฐ€ ์ž๋™์œผ๋กœ ์ˆ˜ํ–‰ํ•˜๋Š” ์ž‘์—…**:

1. **TAG ์ฒด์ธ ๊ฒ€์ฆ**: `@SPEC:AUTH-001` โ†’ `@TEST:AUTH-001` โ†’ `@CODE:AUTH-001` ์ฒด์ธ์ด ์™„์ „ํ•œ์ง€ ๊ฒ€์ฆํ•ฉ๋‹ˆ๋‹ค.

```bash
โœ… SPEC-AUTH-001.md์— @SPEC:AUTH-001 ์กด์žฌ
โœ… tests/auth/login.test.ts์— @TEST:AUTH-001 ์กด์žฌ
โœ… src/services/auth.ts์— @CODE:AUTH-001 ์กด์žฌ
โœ… TAG ์ฒด์ธ ์™„์ „ํ•จ
```

2. **๊ณ ์•„ TAG ์ž๋™ ํƒ์ง€**: SPEC ์—†์ด CODE๋งŒ ์žˆ๊ฑฐ๋‚˜, TEST ์—†์ด CODE๋งŒ ์žˆ๋Š” ๊ฒฝ์šฐ๋ฅผ ์ฐพ์•„๋ƒ…๋‹ˆ๋‹ค.

```bash
โš ๏ธ ๊ฒฝ๊ณ : @CODE:PAYMENT-005๊ฐ€ src/payment.ts์— ์žˆ์ง€๋งŒ
@SPEC:PAYMENT-005๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค
โŒ ๊ณ ์•„ TAG ๋ฐœ๊ฒฌ! ๋ฌธ์„œํ™” ํ•„์š”
```

3. **Living Document ์ž๋™ ์ƒ์„ฑ**: ์ฝ”๋“œ์—์„œ ์ถ”์ถœํ•œ ์ •๋ณด๋กœ ์ตœ์‹  ๋ฌธ์„œ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค (`docs/api/auth.md`).

```markdown
# ์ธ์ฆ API ๋ฌธ์„œ

๋งˆ์ง€๋ง‰ ์—…๋ฐ์ดํŠธ: 2025-10-02 (์ฝ”๋“œ์™€ ์ž๋™ ๋™๊ธฐํ™”๋จ)

## POST /api/auth/login

JWT ํ† ํฐ ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ๋กœ๊ทธ์ธ

- SPEC: SPEC-AUTH-001.md
- ๊ตฌํ˜„: src/services/auth.ts
- ํ…Œ์ŠคํŠธ: tests/auth/login.test.ts

### ์š”์ฒญ
```json
{
"email": "user@example.com",
"password": "password123"
}
```

### ์‘๋‹ต (200 OK)

```json
{
"token": "eyJhbGc...",
"expiresIn": 86400
}
```

### ์—๋Ÿฌ

- 404: ์‚ฌ์šฉ์ž๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Œ
- 401: ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ํ‹€๋ฆผ

```

4. **PR ์ƒํƒœ ์ „ํ™˜**: GitHub PR์„ Draft์—์„œ Ready for Review๋กœ ์ „ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

```bash
๐ŸŽ‰ PR #42 ์ƒํƒœ ๋ณ€๊ฒฝ: Draft โ†’ Ready for Review
๐Ÿ“ ๋ฆฌ๋ทฐ์–ด: @team-lead, @security-team ์ž๋™ ํ• ๋‹น
```

**Why it matters**: ์ฝ”๋“œ์™€ ๋ฌธ์„œ๊ฐ€ ํ•ญ์ƒ ๋™๊ธฐํ™”๋˜์–ด ์ถ”์ ์„ฑ์ด 100% ๋ณด์žฅ๋ฉ๋‹ˆ๋‹ค. 6๊ฐœ์›” ํ›„์—๋„ "์ด API๊ฐ€ ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜์ง€?"๋ฅผ ๊ถ๊ธˆํ•ดํ•˜์ง€ ์•Š์•„๋„ ๋ฉ๋‹ˆ๋‹ค. Living Document๋ฅผ ์—ด์–ด๋ณด๋ฉด ์ตœ์‹  ์ •๋ณด๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

---

**3๋‹จ๊ณ„ ์›Œํฌํ”Œ๋กœ์šฐ์˜ ์„ ์ˆœํ™˜**:

```
SPEC (๋ฌด์—‡์„) โ†’ BUILD (์–ด๋–ป๊ฒŒ + ๊ฒ€์ฆ) โ†’ SYNC (์ถ”์ ์„ฑ ๋ณด์žฅ)
โ†“
๋‹ค์Œ SPEC
```

์ด ์‚ฌ์ดํด์„ ๋ฐ˜๋ณตํ•˜๋ฉด ํ• ์ˆ˜๋ก ์ฝ”๋“œ๋ฒ ์ด์Šค๋Š” ๋” ์ฒด๊ณ„์ ์ด๊ณ , ๋” ์•ˆ์ „ํ•˜๊ณ , ๋” ์ถ”์  ๊ฐ€๋Šฅํ•ด์ง‘๋‹ˆ๋‹ค. ๋ฐ”์ด๋ธŒ ์ฝ”๋”ฉ์˜ ํ˜ผ๋ž€์—์„œ ๋ฒ—์–ด๋‚˜ **์—”์ง€๋‹ˆ์–ด๋ง์˜ ํ’ˆ๊ฒฉ**์„ ๋˜์ฐพ์Šต๋‹ˆ๋‹ค.

---

## ๐Ÿ—๏ธ How Alfred Works - 10๊ฐœ AI ์—์ด์ „ํŠธ ํŒ€

MoAI-ADK๋Š” **Alfred (SuperAgent) + 9๊ฐœ ์ „๋ฌธ ์—์ด์ „ํŠธ = ์ด 10๊ฐœ AI ์—์ด์ „ํŠธ**๋กœ ๊ตฌ์„ฑ๋œ ์—์ด์ „ํ‹ฑ ์ฝ”๋”ฉ ํŒ€์ž…๋‹ˆ๋‹ค. ๊ฐ ์—์ด์ „ํŠธ๋Š” IT ์—…๊ณ„์˜ ์‹ค์ œ ์ง๋ฌด์— ๋งคํ•‘๋˜์–ด ๋ช…ํ™•ํ•œ ์—ญํ• ์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

### โ–ถโ—€ Alfred - SuperAgent (1๋ฒˆ์งธ ์—์ด์ „ํŠธ)

**์—ญํ• **: ์ค‘์•™ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ดํ„ฐ (Central Orchestrator)

**์ฑ…์ž„**:

- ์‚ฌ์šฉ์ž ์š”์ฒญ ๋ถ„์„ ๋ฐ ์ž‘์—… ๋ถ„ํ•ด
- ์ ์ ˆํ•œ ์ „๋ฌธ ์—์ด์ „ํŠธ ์„ ํƒ ๋ฐ ์กฐ์œจ
- ์—์ด์ „ํŠธ ๊ฐ„ ํ˜‘์—… ๊ด€๋ฆฌ
- ํ’ˆ์งˆ ๊ฒŒ์ดํŠธ ๊ฒ€์ฆ ๋ฐ ๊ฒฐ๊ณผ ํ†ตํ•ฉ

**์ž‘๋™ ๋ฐฉ์‹**:

```mermaid
graph TD
A[์‚ฌ์šฉ์ž ์š”์ฒญ] --> B[Alfred ๋ถ„์„]
B --> C{์ž‘์—… ๋ณต์žก๋„}
C -->|๊ฐ„๋‹จ| D[์ง์ ‘ ์ฒ˜๋ฆฌ]
C -->|๋‹จ์ผ| E[Single Agent ์œ„์ž„]
C -->|์ˆœ์ฐจ| F[Sequential ์กฐ์œจ]
C -->|๋ณ‘๋ ฌ| G[Parallel ์กฐ์œจ]

D --> H[๊ฒฐ๊ณผ ๋ฐ˜ํ™˜]
E --> I[์—์ด์ „ํŠธ ์‹คํ–‰]
F --> J[์ˆœ์ฐจ ์‹คํ–‰
1-spec โ†’ 2-build โ†’ 3-sync]
G --> K[๋ณ‘๋ ฌ ์‹คํ–‰
test + lint + build]

I --> L[ํ’ˆ์งˆ ๊ฒŒ์ดํŠธ ๊ฒ€์ฆ]
J --> L
K --> L
L --> M[Alfred ๊ฒฐ๊ณผ ํ†ตํ•ฉ]
M --> H

style A fill:#e1f5ff
style B fill:#fff4e1
style H fill:#e8f5e9
style L fill:#fce4ec
```

---

### ์ „๋ฌธ๊ฐ€ AI ์„œ๋ธŒ ์—์ด์ „ํŠธ

Alfred๊ฐ€ ์กฐ์œจํ•˜๋Š” ์ „๋ฌธ AI ์—์ด์ „ํŠธ๋“ค์ž…๋‹ˆ๋‹ค.

#### ํ•ต์‹ฌ 3๋‹จ๊ณ„ ์—์ด์ „ํŠธ (์ž๋™ ํ˜ธ์ถœ)

| ์—์ด์ „ํŠธ | ํŽ˜๋ฅด์†Œ๋‚˜ | ์ „๋ฌธ ์˜์—ญ | ํ˜ธ์ถœ ์‹œ์  |
| ------------------ | --------------- | -------------- | ----------------- |
| **spec-builder** ๐Ÿ—๏ธ | ์‹œ์Šคํ…œ ์•„ํ‚คํ…ํŠธ | EARS ๋ช…์„ธ ์ž‘์„ฑ | `/alfred:1-spec` |
| **code-builder** ๐Ÿ’Ž | ์ˆ˜์„ ๊ฐœ๋ฐœ์ž | TDD ๊ตฌํ˜„ | `/alfred:2-build` |
| **doc-syncer** ๐Ÿ“– | ํ…Œํฌ๋‹ˆ์ปฌ ๋ผ์ดํ„ฐ | ๋ฌธ์„œ ๋™๊ธฐํ™” | `/alfred:3-sync` |

#### ํ’ˆ์งˆ ๋ณด์ฆ ์—์ด์ „ํŠธ (์˜จ๋””๋งจ๋“œ)

| ์—์ด์ „ํŠธ | ํŽ˜๋ฅด์†Œ๋‚˜ | ์ „๋ฌธ ์˜์—ญ | ํ˜ธ์ถœ ๋ฐฉ๋ฒ• |
| ------------------- | --------------- | -------------- | ---------------------- |
| **tag-agent** ๐Ÿท๏ธ | ์ง€์‹ ๊ด€๋ฆฌ์ž | TAG ์ฒด์ธ ๊ฒ€์ฆ | `@agent-tag-agent` |
| **debug-helper** ๐Ÿ”ฌ | SRE ์ „๋ฌธ๊ฐ€ | ์˜ค๋ฅ˜ ์ง„๋‹จ | `@agent-debug-helper` |
| **trust-checker** โœ… | QA ๋ฆฌ๋“œ | TRUST ๊ฒ€์ฆ | `@agent-trust-checker` |
| **git-manager** ๐Ÿš€ | ๋ฆด๋ฆฌ์Šค ์—”์ง€๋‹ˆ์–ด | Git ์›Œํฌํ”Œ๋กœ์šฐ | `@agent-git-manager` |

#### ์‹œ์Šคํ…œ ๊ด€๋ฆฌ ์—์ด์ „ํŠธ

| ์—์ด์ „ํŠธ | ํŽ˜๋ฅด์†Œ๋‚˜ | ์ „๋ฌธ ์˜์—ญ | ํ˜ธ์ถœ ๋ฐฉ๋ฒ• |
| --------------------- | ----------------- | ---------------- | ------------------- |
| **cc-manager** ๐Ÿ› ๏ธ | ๋ฐ๋ธŒ์˜ต์Šค ์—”์ง€๋‹ˆ์–ด | Claude Code ์„ค์ • | `@agent-cc-manager` |
| **project-manager** ๐Ÿ“‹ | ํ”„๋กœ์ ํŠธ ๋งค๋‹ˆ์ € | ํ”„๋กœ์ ํŠธ ์ดˆ๊ธฐํ™” | `/alfred:8-project` |

### ์—์ด์ „ํŠธ ํ˜‘์—… ์•„ํ‚คํ…์ฒ˜

```mermaid
graph TB
Alfred["โ–ถโ—€ Alfred
(SuperAgent)
์ค‘์•™ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ดํ„ฐ"]

subgraph core["ํ•ต์‹ฌ 3๋‹จ๊ณ„ ์—์ด์ „ํŠธ"]
Spec["๐Ÿ—๏ธ spec-builder
๋ช…์„ธ ์ž‘์„ฑ"]
Code["๐Ÿ’Ž code-builder
TDD ๊ตฌํ˜„"]
Doc["๐Ÿ“– doc-syncer
๋ฌธ์„œ ๋™๊ธฐํ™”"]
end

subgraph quality["ํ’ˆ์งˆ ๋ณด์ฆ ์—์ด์ „ํŠธ"]
Tag["๐Ÿท๏ธ tag-agent
TAG ๊ฒ€์ฆ"]
Trust["โœ… trust-checker
TRUST ๊ฒ€์ฆ"]
Debug["๐Ÿ”ฌ debug-helper
์˜ค๋ฅ˜ ์ง„๋‹จ"]
Git["๐Ÿš€ git-manager
Git ์›Œํฌํ”Œ๋กœ์šฐ"]
end

subgraph system["์‹œ์Šคํ…œ ๊ด€๋ฆฌ ์—์ด์ „ํŠธ"]
CC["๐Ÿ› ๏ธ cc-manager
์„ค์ • ๊ด€๋ฆฌ"]
PM["๐Ÿ“‹ project-manager
ํ”„๋กœ์ ํŠธ ์ดˆ๊ธฐํ™”"]
end

Alfred --> core
Alfred --> quality
Alfred --> system

style Alfred fill:#fff4e1,stroke:#333,stroke-width:3px
style core fill:#e1f5ff
style quality fill:#fce4ec
style system fill:#e8f5e9
```

### ํ˜‘์—… ์›์น™

**๋‹จ์ผ ์ฑ…์ž„ (Single Responsibility)**:

- ๊ฐ ์—์ด์ „ํŠธ๋Š” ์ž์‹ ์˜ ์ „๋ฌธ ์˜์—ญ๋งŒ ๋‹ด๋‹น
- ๋‹ค๋ฅธ ์—์ด์ „ํŠธ์˜ ์˜์—ญ์„ ์นจ๋ฒ”ํ•˜์ง€ ์•Š์Œ

**์ค‘์•™ ์กฐ์œจ (Central Orchestration)**:

- Alfred๋งŒ์ด ์—์ด์ „ํŠธ ๊ฐ„ ์ž‘์—…์„ ์กฐ์œจ
- ์—์ด์ „ํŠธ๋ผ๋ฆฌ ์ง์ ‘ ํ˜ธ์ถœ ๊ธˆ์ง€

**ํ’ˆ์งˆ ๊ฒŒ์ดํŠธ (Quality Gates)**:

- ๊ฐ ๋‹จ๊ณ„ ์™„๋ฃŒ ์‹œ TRUST ์›์น™ ์ž๋™ ๊ฒ€์ฆ
- TAG ๋ฌด๊ฒฐ์„ฑ ์ž๋™ ํ™•์ธ

---

### TRUST 5์›์น™ (ํ’ˆ์งˆ ๋ณด์ฆ)

Alfred๋Š” ๋ชจ๋“  ์ฝ”๋“œ์— TRUST 5์›์น™์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค:

#### T - Test First

- SPEC โ†’ Test โ†’ Code ์ˆœ์„œ ์—„์ˆ˜
- ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€ โ‰ฅ 85%

#### R - Readable

- ํŒŒ์ผ โ‰ค300 LOC, ํ•จ์ˆ˜ โ‰ค50 LOC
- ๋ณต์žก๋„ โ‰ค10, ๋งค๊ฐœ๋ณ€์ˆ˜ โ‰ค5๊ฐœ

#### U - Unified

- SPEC ๊ธฐ๋ฐ˜ ์•„ํ‚คํ…์ฒ˜
- ํƒ€์ž… ์•ˆ์ „์„ฑ ๋ณด์žฅ

#### S - Secured

- ์ž…๋ ฅ ๊ฒ€์ฆ, SQL Injection ๋ฐฉ์–ด
- XSS/CSRF ๋ฐฉ์–ด, ๋น„๋ฐ€๋ฒˆํ˜ธ ํ•ด์‹ฑ

#### T - Trackable

- CODE-FIRST @TAG ์‹œ์Šคํ…œ
- ์™„์ „ํ•œ ์ถ”์  ์ฒด์ธ ๋ณด์žฅ

### @TAG ์‹œ์Šคํ…œ

๋ชจ๋“  ์ฝ”๋“œ๋Š” 4๊ฐ€์ง€ TAG๋กœ ์™„๋ฒฝํ•˜๊ฒŒ ์ถ”์ ๋ฉ๋‹ˆ๋‹ค:

```mermaid
graph LR
A["@SPEC:AUTH-001
.moai/specs/SPEC-AUTH-001.md
์š”๊ตฌ์‚ฌํ•ญ ๋ช…์„ธ"]
B["@TEST:AUTH-001
tests/auth/login.test.ts
ํ…Œ์ŠคํŠธ ์ฝ”๋“œ"]
C["@CODE:AUTH-001
src/services/auth.ts
๊ตฌํ˜„ ์ฝ”๋“œ"]
D["@DOC:AUTH-001
docs/api/auth.md
API ๋ฌธ์„œ"]

A -->|์ฐธ์กฐ| B
B -->|์ฐธ์กฐ| C
C -->|์ฐธ์กฐ| D

E[TAG ์ฒด์ธ ๊ฒ€์ฆ
rg '@SPEC:AUTH-001' -n] -.->|์Šค์บ”| A
E -.->|์Šค์บ”| B
E -.->|์Šค์บ”| C
E -.->|์Šค์บ”| D

style A fill:#e1f5ff
style B fill:#ffcdd2
style C fill:#c8e6c9
style D fill:#fff9c4
style E fill:#f3e5f5
```

**TAG ID ๊ทœ์น™**: `<๋„๋ฉ”์ธ>-<3์ž๋ฆฌ>` (์˜ˆ: `AUTH-001`, `PAYMENT-042`)

**๊ฒ€์ฆ ๋ฐฉ๋ฒ•**:

```bash
# ์ „์ฒด TAG ์Šค์บ”
rg '@(SPEC|TEST|CODE|DOC):' -n

# ํŠน์ • TAG ์ถ”์ 
rg 'AUTH-001' -n
```

---

## ๐ŸŽจ Alfred's Output Styles

Alfred๋Š” ๊ฐœ๋ฐœ ์ƒํ™ฉ์— ๋”ฐ๋ผ **4๊ฐ€์ง€ ๋Œ€ํ™” ์Šคํƒ€์ผ**์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. Claude Code์—์„œ `/output-style` ๋ช…๋ น์–ด๋กœ ์–ธ์ œ๋“  ์ „ํ™˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

### ๐Ÿ“‹ ์ œ๊ณต๋˜๋Š” Output Styles

| ์Šคํƒ€์ผ ์ด๋ฆ„ | ์„ค๋ช… |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **MoAI Professional** | SPEC-First TDD ์ „๋ฌธ๊ฐ€๋ฅผ ์œ„ํ•œ ๊ฐ„๊ฒฐํ•˜๊ณ  ๊ธฐ์ˆ ์ ์ธ ๊ฐœ๋ฐœ ์Šคํƒ€์ผ. Alfred SuperAgent๊ฐ€ 9๊ฐœ ์ „๋ฌธ ์—์ด์ „ํŠธ๋ฅผ ์กฐ์œจํ•˜์—ฌ TRUST 5์›์น™๊ณผ @TAG ์ถ”์ ์„ฑ์„ ์ž๋™ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค. |
| **MoAI Beginner Learning** | ๊ฐœ๋ฐœ ์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•œ ์ƒ์„ธํ•˜๊ณ  ์นœ์ ˆํ•œ ๋‹จ๊ณ„๋ณ„ ํ•™์Šต ๊ฐ€์ด๋“œ (ํ•™์Šต ์ „์šฉ) |
| **MoAI Pair Collaboration** | AI์™€ ํ•จ๊ป˜ ๋ธŒ๋ ˆ์ธ์Šคํ† ๋ฐ, ๊ณ„ํš ์ˆ˜๋ฆฝ, ์‹ค์‹œ๊ฐ„ ์ฝ”๋“œ ๋ฆฌ๋ทฐ๋ฅผ ์ง„ํ–‰ํ•˜๋Š” ํ˜‘์—… ๋ชจ๋“œ. Alfred SuperAgent๊ฐ€ 9๊ฐœ ์ „๋ฌธ ์—์ด์ „ํŠธ๋ฅผ ์กฐ์œจํ•˜์—ฌ ์ตœ์ ์˜ ํ˜‘์—… ๊ฒฝํ—˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. |
| **MoAI Study Deep** | ์ƒˆ๋กœ์šด ๊ฐœ๋…, ๋„๊ตฌ, ์–ธ์–ด, ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์ฒด๊ณ„์ ์œผ๋กœ ํ•™์Šตํ•˜๋Š” ์‹ฌํ™” ๊ต์œก ๋ชจ๋“œ. Alfred SuperAgent๊ฐ€ 9๊ฐœ ์ „๋ฌธ ์—์ด์ „ํŠธ์˜ ์ „๋ฌธ ์ง€์‹์„ ํ™œ์šฉํ•˜์—ฌ ๊นŠ์ด ์žˆ๋Š” ํ•™์Šต ๊ฒฝํ—˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. |

### ๐Ÿ”„ ์Šคํƒ€์ผ ์ „ํ™˜ ๋ฐฉ๋ฒ•

Claude Code์—์„œ `/output-style` ๋ช…๋ น์–ด๋กœ ์ „ํ™˜:

```bash
/output-style alfred-pro # MoAI Professional (๊ธฐ๋ณธ๊ฐ’)
/output-style beginner-learning # MoAI Beginner Learning
/output-style pair-collab # MoAI Pair Collaboration
/output-style study-deep # MoAI Study Deep
```

### ๐ŸŽฏ ์Šคํƒ€์ผ ์„ ํƒ ๊ฐ€์ด๋“œ

| ์ƒํ™ฉ | ์ถ”์ฒœ ์Šคํƒ€์ผ | ๋Œ€์ƒ | ํŠน์ง• |
| ------------------------ | ------------------- | -------------------------- | ---------------------------- |
| ์‹ค๋ฌด ํ”„๋กœ์ ํŠธ ๋น ๋ฅธ ๊ฐœ๋ฐœ | `alfred-pro` | ์‹ค๋ฌด ๊ฐœ๋ฐœ์ž, ํ”„๋กœ์ ํŠธ ๋ฆฌ๋” | ๊ฐ„๊ฒฐ, ๊ธฐ์ˆ ์ , ๊ฒฐ๊ณผ ์ค‘์‹ฌ |
| ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ฒ˜์Œ ๋ฐฐ์šฐ๊ธฐ | `beginner-learning` | ๊ฐœ๋ฐœ ์ž…๋ฌธ์ž | ์นœ์ ˆ, ์ƒ์„ธ ์„ค๋ช…, ๋‹จ๊ณ„๋ณ„ ์•ˆ๋‚ด |
| ํŒ€ ๊ธฐ์ˆ  ์„ ํƒ & ์„ค๊ณ„ ๋…ผ์˜ | `pair-collab` | ํ˜‘์—… ๊ฐœ๋ฐœ์ž, ์•„ํ‚คํ…ํŠธ | ์งˆ๋ฌธ ๊ธฐ๋ฐ˜, ๋ธŒ๋ ˆ์ธ์Šคํ† ๋ฐ |
| ์ƒˆ๋กœ์šด ๊ธฐ์ˆ  ํ•™์Šต | `study-deep` | ์‹ ๊ธฐ์ˆ  ํ•™์Šต์ž | ๊ฐœ๋… โ†’ ์‹ค์Šต โ†’ ์ „๋ฌธ๊ฐ€ ํŒ |

### ๐Ÿ’ก ๋ชจ๋“  ์Šคํƒ€์ผ์—์„œ ๋™์ผํ•˜๊ฒŒ ์ž‘๋™

- โœ… 9๊ฐœ ์ „๋ฌธ ์—์ด์ „ํŠธ ์กฐ์œจ
- โœ… SPEC-First TDD ์›Œํฌํ”Œ๋กœ์šฐ
- โœ… TRUST 5์›์น™ ์ž๋™ ๊ฒ€์ฆ
- โœ… @TAG ์ถ”์ ์„ฑ ๋ณด์žฅ

**์ฐจ์ด์ ์€ ์˜ค์ง ์„ค๋ช… ๋ฐฉ์‹**:

- ๐Ÿ“ ๊ฐ„๊ฒฐ vs ์ƒ์„ธ
- ๐ŸŽ“ ๋น ๋ฅธ ๊ตฌํ˜„ vs ๊ฐœ๋… ํ•™์Šต
- ๐Ÿ’ฌ ๊ธฐ์ˆ ์  vs ์นœ์ ˆ vs ํ˜‘์—…์  vs ๊ต์œก์ 

---

### 1๏ธโƒฃ MoAI Professional

**๋ช…๋ น์–ด**: `/output-style alfred-pro`
**์‘๋‹ต ๋ฐฉ์‹**: ๊ฐ„๊ฒฐ, ๊ฒฐ๊ณผ ์ค‘์‹ฌ, ์ตœ์†Œ ์„ค๋ช…
**๋Œ€์ƒ**: ์‹ค๋ฌด ๊ฐœ๋ฐœ์ž, ํ”„๋กœ์ ํŠธ ๋ฆฌ๋”, SPEC-First TDD ์ „๋ฌธ๊ฐ€

์ถœ๋ ฅ ์˜ˆ์‹œ

```
JWT ์ธ์ฆ ๊ตฌํ˜„ ์‹œ์ž‘.

/alfred:1-spec "JWT ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ์ธ์ฆ API"
โœ… SPEC-AUTH-001.md ์ƒ์„ฑ
โœ… feature/SPEC-AUTH-001-jwt-auth ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ

/alfred:2-build AUTH-001
๐Ÿ”ด RED: tests/auth/jwt.test.ts (์ปค๋ฒ„๋ฆฌ์ง€: 90%)
๐ŸŸข GREEN: src/auth/jwt.service.ts, src/middleware/auth.middleware.ts
๐Ÿ”ต REFACTOR: TRUST ๊ฒ€์ฆ ์™„๋ฃŒ, ๋ณต์žก๋„โ‰ค10, LOCโ‰ค50

/alfred:3-sync
โœ… @SPEC โ†’ @TEST โ†’ @CODE ์ฒด์ธ ๊ฒ€์ฆ
โœ… docs/api/auth.md ์ƒ์„ฑ
โœ… PR #42 Ready for Review

๊ตฌํ˜„ ์™„๋ฃŒ.
```

---

### 2๏ธโƒฃ MoAI Beginner Learning

**๋ช…๋ น์–ด**: `/output-style beginner-learning`
**์‘๋‹ต ๋ฐฉ์‹**: ์ƒ์„ธํ•œ ๋‹จ๊ณ„๋ณ„ ์„ค๋ช…, ๊ฐœ๋… ๋จผ์ € ์„ค๋ช…
**๋Œ€์ƒ**: ๊ฐœ๋ฐœ ์ž…๋ฌธ์ž ๋ฐ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ดˆ๋ณด์ž (ํ•™์Šต ์ „์šฉ)

์ถœ๋ ฅ ์˜ˆ์‹œ

```
JWT ์ธ์ฆ ๊ตฌํ˜„์„ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐ŸŽฏ ๋ชฉํ‘œ: JWT ๊ธฐ๋ฐ˜ ๋กœ๊ทธ์ธ ์‹œ์Šคํ…œ ๊ตฌํ˜„
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

**JWT (JSON Web Token)**
์‚ฌ์šฉ์ž ์ธ์ฆ์„ ์œ„ํ•œ ํ† ํฐ ๊ธฐ๋ฐ˜ ๋ฐฉ์‹.
๋กœ๊ทธ์ธ ์‹œ ํ† ํฐ์„ ๋ฐœ๊ธ‰ํ•˜๊ณ , ์ดํ›„ ์š”์ฒญ์—์„œ ํ† ํฐ์œผ๋กœ ์ธ์ฆ ํ™•์ธ.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ“ 1๋‹จ๊ณ„: SPEC ์ž‘์„ฑ
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

๊ตฌํ˜„ ์ „์— ๋ช…์„ธ๋ฅผ ๋จผ์ € ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

/alfred:1-spec "JWT ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ์ธ์ฆ API"

โœ… .moai/specs/SPEC-AUTH-001.md ์ƒ์„ฑ
โ†’ ์š”๊ตฌ์‚ฌํ•ญ, ์ œ์•ฝ์‚ฌํ•ญ, ํ…Œ์ŠคํŠธ ์‹œ๋‚˜๋ฆฌ์˜ค ํฌํ•จ
โ†’ ๋‚˜์ค‘์— "์™œ ์ด๋ ‡๊ฒŒ ๋งŒ๋“ค์—ˆ์ง€?" ๊ถ๊ธˆํ•  ๋•Œ ์ฐธ์กฐ

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿงช 2๋‹จ๊ณ„: TDD ๊ตฌํ˜„
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

ํ…Œ์ŠคํŠธ๋ฅผ ๋จผ์ € ์ž‘์„ฑํ•˜๊ณ , ๊ทธ ๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

/alfred:2-build AUTH-001

๐Ÿ”ด RED (ํ…Œ์ŠคํŠธ ์ž‘์„ฑ):
- tests/auth/jwt.test.ts ์ž‘์„ฑ
- ์•„์ง ๊ตฌํ˜„ ์ฝ”๋“œ๊ฐ€ ์—†์–ด์„œ ์‹คํŒจ (์ •์ƒ)

๐ŸŸข GREEN (์ตœ์†Œ ๊ตฌํ˜„):
- src/auth/jwt.service.ts ์ž‘์„ฑ
- ํ…Œ์ŠคํŠธ ํ†ต๊ณผํ•˜๋Š” ์ตœ์†Œ ์ฝ”๋“œ ์ž‘์„ฑ

๐Ÿ”ต REFACTOR (์ฝ”๋“œ ํ’ˆ์งˆ ๊ฐœ์„ ):
- ํ•จ์ˆ˜ ๋ถ„๋ฆฌ, ํƒ€์ž… ์ถ”๊ฐ€, ์—๋Ÿฌ ์ฒ˜๋ฆฌ
- TRUST 5์›์น™ ์ ์šฉ

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ“š 3๋‹จ๊ณ„: ๋ฌธ์„œ ๋™๊ธฐํ™”
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

/alfred:3-sync

โœ… @TAG ์ถ”๊ฐ€: @SPEC โ†’ @TEST โ†’ @CODE ์ฒด์ธ ์ƒ์„ฑ
โœ… API ๋ฌธ์„œ ์ž๋™ ์ƒ์„ฑ: docs/api/auth.md
โœ… PR ์ƒํƒœ ์ „ํ™˜: Draft โ†’ Ready for Review

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
์™„๋ฃŒํ•œ ์ž‘์—…:
- SPEC ๋ฌธ์„œ ์ž‘์„ฑ
- ํ…Œ์ŠคํŠธ ์šฐ์„  ์ž‘์„ฑ (TDD)
- ์ฝ”๋“œ ๊ตฌํ˜„ ๋ฐ ๋ฆฌํŒฉํ† ๋ง
- ๋ฌธ์„œ ์ž๋™ ๋™๊ธฐํ™”

๋‹ค์Œ ๊ธฐ๋Šฅ ๊ตฌํ˜„์„ ์‹œ์ž‘ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?
```

---

### 3๏ธโƒฃ MoAI Pair Collaboration

**๋ช…๋ น์–ด**: `/output-style pair-collab`
**์‘๋‹ต ๋ฐฉ์‹**: ์งˆ๋ฌธ ๊ธฐ๋ฐ˜, ํŠธ๋ ˆ์ด๋“œ์˜คํ”„ ๋ถ„์„, ์„ ํƒ์ง€ ์ œ์‹œ
**๋Œ€์ƒ**: ํ˜‘์—… ๊ฐœ๋ฐœ์ž, ์•„ํ‚คํ…ํŠธ, ์„ค๊ณ„ ์„ธ์…˜, ์ฝ”๋“œ ๋ฆฌ๋ทฐ

์ถœ๋ ฅ ์˜ˆ์‹œ

```
JWT ์ธ์ฆ ๊ตฌํ˜„ ์ „์— ์„ค๊ณ„ ๊ฒฐ์ •์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿค” ์„ค๊ณ„ ์งˆ๋ฌธ
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

**Q1: ํ† ํฐ ์ €์žฅ ๋ฐฉ์‹**

| ๋ฐฉ์‹ | ์žฅ์  | ๋‹จ์  | ์‚ฌ์šฉ ์‹œ๋‚˜๋ฆฌ์˜ค |
| --------------- | ------------------- | -------------------- | --------------- |
| localStorage | ๊ฐ„๋‹จ, ์ƒˆ๋กœ๊ณ ์นจ ์œ ์ง€ | XSS ์œ„ํ—˜ | ๋‚ด๋ถ€ ๋„๊ตฌ |
| httpOnly Cookie | XSS ๋ฐฉ์–ด | CSRF ๋Œ€์‘ ํ•„์š” | ํ”„๋กœ๋•์…˜ (๊ถŒ์žฅ) |
| memory (state) | ์ตœ๋Œ€ ๋ณด์•ˆ | ์ƒˆ๋กœ๊ณ ์นจ ์‹œ ๋กœ๊ทธ์•„์›ƒ | ๊ธˆ์œต/์˜๋ฃŒ |

**๊ถŒ์žฅ**: httpOnly Cookie + CSRF ํ† ํฐ

**Q2: ํ† ํฐ ๋งŒ๋ฃŒ ์‹œ๊ฐ„**

- Access Token: 15๋ถ„ (๋ณด์•ˆ ์šฐ์„ )
- Refresh Token: 7์ผ (UX ์šฐ์„ )

์„œ๋น„์Šค ํŠน์„ฑ์— ๋”ฐ๋ผ ์กฐ์ • ๊ฐ€๋Šฅ (์˜ˆ: ๋ฑ…ํ‚น ์•ฑ โ†’ 5๋ถ„/1์ผ)

**Q3: ํ† ํฐ ๊ฐฑ์‹  ์ „๋žต**

```typescript
// ์˜ต์…˜ A: ์ž๋™ ๊ฐฑ์‹ 
if (tokenExpiresIn < 5 * 60) await refreshToken();

// ์˜ต์…˜ B: ๋งŒ๋ฃŒ ํ›„ ๊ฐฑ์‹ 
// 401 ์—๋Ÿฌ โ†’ Refresh Token ์žฌ๋ฐœ๊ธ‰
```

**ํŠธ๋ ˆ์ด๋“œ์˜คํ”„**:

- ์˜ต์…˜ A: UX โ†‘, ์„œ๋ฒ„ ๋ถ€ํ•˜ โ†‘
- ์˜ต์…˜ B: ๋ณด์•ˆ โ†‘, ์ผ์‹œ์  ๋Š๊น€

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ“‹ ๊ตฌํ˜„ ๊ณ„ํš (httpOnly + ์ž๋™ ๊ฐฑ์‹  ๊ธฐ์ค€)
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

**1. SPEC ๋ช…์„ธ**:

- Storage: httpOnly Cookie
- Expiry: Access 15m, Refresh 7d
- Strategy: Auto-refresh at 5m remaining
- Security: Double Submit Cookie (CSRF)

**2. TDD ์‹œ๋‚˜๋ฆฌ์˜ค**:

- โœ… ๋กœ๊ทธ์ธ โ†’ 2๊ฐœ ํ† ํฐ ๋ฐœ๊ธ‰
- โœ… Access ๋งŒ๋ฃŒ โ†’ ์ž๋™ ๊ฐฑ์‹ 
- โœ… Refresh ๋งŒ๋ฃŒ โ†’ ์žฌ๋กœ๊ทธ์ธ
- โœ… CSRF ๊ณต๊ฒฉ โ†’ ์ฐจ๋‹จ

**3. ๋ณด์•ˆ ์ฒดํฌ๋ฆฌ์ŠคํŠธ**:

- [ ] XSS: httpOnly + Secure
- [ ] CSRF: SameSite=Strict
- [ ] Replay Attack: JWT ID + Redis

์ด ๋ฐฉํ–ฅ์œผ๋กœ ์ง„ํ–‰ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ? ์กฐ์ • ์‚ฌํ•ญ์ด ์žˆ์œผ๋ฉด ๋ง์”€ํ•˜์„ธ์š”.

```

---

### 4๏ธโƒฃ MoAI Study Deep

**๋ช…๋ น์–ด**: `/output-style study-deep`
**์‘๋‹ต ๋ฐฉ์‹**: ๊ฐœ๋… โ†’ ์‹ค์Šต โ†’ ์ „๋ฌธ๊ฐ€ ํŒ (3๋‹จ๊ณ„ ํ•™์Šต)
**๋Œ€์ƒ**: ์‹ ๊ธฐ์ˆ  ํ•™์Šต์ž, ํ”„๋ ˆ์ž„์›Œํฌ ์ „ํ™˜์ž, ์‹ฌํ™” ์ด๋ก  ํƒ๊ตฌ์ž

์ถœ๋ ฅ ์˜ˆ์‹œ

```

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ“š 1๋‹จ๊ณ„: ๊ฐœ๋… (Concept)
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

JWT (JSON Web Token)
Stateless ์ธ์ฆ์„ ์œ„ํ•œ ํ† ํฐ ๊ธฐ๋ฐ˜ ๋ฐฉ์‹.

**Session vs JWT**

| ๋ฐฉ์‹ | ์ €์žฅ ์œ„์น˜ | ํ™•์žฅ์„ฑ | ํŠน์ง• |
| ------- | -------------- | ------ | ---------------------- |
| Session | ์„œ๋ฒ„ ๋ฉ”๋ชจ๋ฆฌ/DB | ๋‚ฎ์Œ | Stateful, ์„œ๋ฒ„ ์˜์กด |
| JWT | ํด๋ผ์ด์–ธํŠธ | ๋†’์Œ | Stateless, ๋ถ„์‚ฐ ์‹œ์Šคํ…œ |

**JWT ๊ตฌ์กฐ (3 Parts)**

eyJhbGc.eyJzdWI.SflKxw
โ†“ โ†“ โ†“
Header Payload Signature

1. Header: {"alg": "HS256", "typ": "JWT"}
2. Payload: {"sub": "user-123", "email": "", "exp": 1735689600}
3. Signature: HMACSHA256(base64(header + payload), SECRET_KEY)

**๋ณด์•ˆ**

- Payload๋Š” Base64 ์ธ์ฝ”๋”ฉ (์•”ํ˜ธํ™” ์•„๋‹˜)
- ๋ฏผ๊ฐ ์ •๋ณด ์ ˆ๋Œ€ ํฌํ•จ ๊ธˆ์ง€
- HTTPS ํ•„์ˆ˜, exp claim ํ•„์ˆ˜

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ› ๏ธ 2๋‹จ๊ณ„: ์‹ค์Šต (Practice)
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

MoAI-ADK๋กœ TDD ๊ตฌํ˜„.

/alfred:1-spec "JWT ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ์ธ์ฆ API"

- WHEN POST /api/auth/login โ†’ JWT ๋ฐ˜ํ™˜
- IF ํ† ํฐ ๋งŒ๋ฃŒ 15๋ถ„

/alfred:2-build AUTH-001

๐Ÿ”ด RED: expect(token.split('.')).toHaveLength(3)
๐ŸŸข GREEN: jwt.sign(payload, SECRET, {expiresIn: '15m'})
๐Ÿ”ต REFACTOR: ํƒ€์ž… ์•ˆ์ „์„ฑ, ํ™˜๊ฒฝ ๊ฒ€์ฆ, ํ‘œ์ค€ claims

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
๐Ÿ’Ž 3๋‹จ๊ณ„: ์ „๋ฌธ๊ฐ€ ํŒ (Expert Tips)
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

**1. Access + Refresh Token**

const accessToken = generateJWT(payload, '15m');
const refreshToken = generateRefresh(userId);
await saveRefreshToken(userId, refreshToken); // DB ์ €์žฅ

- Access ํƒˆ์ทจ โ†’ 15๋ถ„ ํ›„ ๋ฌดํšจํ™”
- Refresh โ†’ DB์—์„œ ์ฆ‰์‹œ ํ๊ธฐ ๊ฐ€๋Šฅ

**2. ์•Œ๊ณ ๋ฆฌ์ฆ˜**

| ์•Œ๊ณ ๋ฆฌ์ฆ˜ | ์‚ฌ์šฉ ์‚ฌ๋ก€ |
| ---------------- | ---------------- |
| HS256 (๋Œ€์นญํ‚ค) | ๋‹จ์ผ ์„œ๋ฒ„ |
| RS256 (๋น„๋Œ€์นญํ‚ค) | MSA, ๋ฉ€ํ‹ฐ ์„œ๋น„์Šค |

**3. Payload ์ตœ์ ํ™”**

โŒ {userId, email, name, address} // ๋น„๋Œ€
โœ… {sub: '123', email, role} // ์ตœ์†Œ

**4. ๋ณด์•ˆ ์ฒดํฌ๋ฆฌ์ŠคํŠธ**

- [ ] HTTPS ํ•„์ˆ˜
- [ ] SECRET_KEY โ‰ฅ256bit
- [ ] exp claim ํ•„์ˆ˜
- [ ] ๋ฏผ๊ฐ ์ •๋ณด ์ œ์™ธ

**5. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ**

| ์–ธ์–ด | ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ |
| ---------- | -------------- |
| TypeScript | jsonwebtoken |
| Python | PyJWT |
| Go | golang-jwt/jwt |
| Rust | jsonwebtoken |

**ํ•™์Šต ๊ฒฝ๋กœ**

1. โœ… JWT ๊ธฐ๋ณธ
2. โญ๏ธ Refresh Token
3. โญ๏ธ OAuth 2.0
4. โญ๏ธ Zero Trust

```

---

## ๐ŸŒ Universal Language Support

MoAI-ADK๋Š” ๋ชจ๋“  ์ฃผ์š” ์–ธ์–ด๋ฅผ ์ง€์›ํ•˜๋ฉฐ, ์–ธ์–ด๋ณ„ ์ตœ์  ๋„๊ตฌ ์ฒด์ธ์„ ์ž๋™์œผ๋กœ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

### ์›น/๋ฐฑ์—”๋“œ

| ์–ธ์–ด | ํ…Œ์ŠคํŠธ | ๋ฆฐํ„ฐ | ํƒ€์ž… | ์ƒํƒœ |
| -------------- | ----------- | ------------ | ---- | ---- |
| **TypeScript** | Vitest/Jest | Biome/ESLint | โœ… | Full |
| **Python** | pytest | ruff/black | mypy | Full |
| **Java** | JUnit 5 | checkstyle | โœ… | Full |
| **Go** | go test | golint | โœ… | Full |
| **Rust** | cargo test | clippy | โœ… | Full |

### ๋ชจ๋ฐ”์ผ

| ์–ธ์–ด/ํ”„๋ ˆ์ž„์›Œํฌ | ํ…Œ์ŠคํŠธ | ๋ฆฐํ„ฐ | ์ƒํƒœ |
| ------------------ | ---------------- | ------------ | ---- |
| **Flutter/Dart** | flutter test | dart analyze | Full |
| **Swift/iOS** | XCTest | SwiftLint | Full |
| **Kotlin/Android** | JUnit + Espresso | detekt | Full |
| **React Native** | Jest + RNTL | ESLint | Full |

### ์ž๋™ ์–ธ์–ด ๊ฐ์ง€

์‹œ์Šคํ…œ์ด ํ”„๋กœ์ ํŠธ๋ฅผ ์Šค์บ”ํ•˜์—ฌ ์ž๋™์œผ๋กœ ๊ฐ์ง€:

- `package.json` โ†’ TypeScript/JavaScript
- `requirements.txt` โ†’ Python
- `go.mod` โ†’ Go
- `Cargo.toml` โ†’ Rust
- `pubspec.yaml` โ†’ Flutter/Dart

---

## ๐Ÿ’ป CLI Reference

### ํ•ต์‹ฌ ๋ช…๋ น์–ด

```bash
# ํ”„๋กœ์ ํŠธ ์ดˆ๊ธฐํ™”
moai init [project] [options]

# ์‹œ์Šคํ…œ ์ง„๋‹จ
moai doctor [options]

# ํ”„๋กœ์ ํŠธ ์ƒํƒœ ํ™•์ธ
moai status [options]

# ๋ฐฑ์—… ๋ณต์›
moai restore [options]
```

### Claude Code ์ „์šฉ ๋ช…๋ น์–ด

```text
# ํ…œํ”Œ๋ฆฟ ์—…๋ฐ์ดํŠธ (๊ถŒ์žฅ โญ)
/alfred:9-update

# ํ”„๋กœ์ ํŠธ ์ดˆ๊ธฐํ™”
/alfred:8-project
```

### moai init [project]

์ƒˆ MoAI-ADK ํ”„๋กœ์ ํŠธ๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๊ฑฐ๋‚˜ ๊ธฐ์กด ํ”„๋กœ์ ํŠธ์— MoAI-ADK๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

**์˜ต์…˜**:

- `--personal`: Personal ๋ชจ๋“œ๋กœ ์ดˆ๊ธฐํ™” (๊ธฐ๋ณธ๊ฐ’)
- `--team`: Team ๋ชจ๋“œ๋กœ ์ดˆ๊ธฐํ™” (GitHub ํ†ตํ•ฉ)
- `-b, --backup`: ์„ค์น˜ ์ „ ๋ฐฑ์—… ์ƒ์„ฑ
- `-f, --force`: ๊ธฐ์กด ํŒŒ์ผ ๊ฐ•์ œ ๋ฎ์–ด์“ฐ๊ธฐ

**์‚ฌ์šฉ ์˜ˆ์‹œ**:

```bash
# ์ƒˆ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ (Personal ๋ชจ๋“œ)
moai init my-project

# ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ์— ์„ค์น˜
moai init .

# Team ๋ชจ๋“œ๋กœ ์ดˆ๊ธฐํ™”
moai init my-project --team

# ๋ฐฑ์—… ์ƒ์„ฑ ํ›„ ์„ค์น˜
moai init . -b

# ๊ธฐ์กด ํŒŒ์ผ ๊ฐ•์ œ ๋ฎ์–ด์“ฐ๊ธฐ
moai init . -f
```

### moai doctor

์‹œ์Šคํ…œ ์ง„๋‹จ์„ ์‹คํ–‰ํ•˜์—ฌ MoAI-ADK๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์น˜๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

**์˜ต์…˜**:

- `-l, --list-backups`: ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ฐฑ์—… ๋ชฉ๋ก ํ‘œ์‹œ

**์‚ฌ์šฉ ์˜ˆ์‹œ**:

```bash
# ์‹œ์Šคํ…œ ์ง„๋‹จ ์‹คํ–‰
moai doctor

# ๋ฐฑ์—… ๋ชฉ๋ก ํ™•์ธ
moai doctor -l
```

### moai status

MoAI-ADK ํ”„๋กœ์ ํŠธ ์ƒํƒœ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.

**์˜ต์…˜**:

- `-v, --verbose`: ์ƒ์„ธ ์ƒํƒœ ์ •๋ณด ํ‘œ์‹œ
- `-p, --project-path `: ํ”„๋กœ์ ํŠธ ๋””๋ ‰ํ† ๋ฆฌ ๊ฒฝ๋กœ ์ง€์ • (๊ฒฝ๋กœ ํ•„์ˆ˜)

**์‚ฌ์šฉ ์˜ˆ์‹œ**:

```bash
# ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ ์ƒํƒœ ํ™•์ธ
moai status

# ์ƒ์„ธ ์ •๋ณด ํฌํ•จ
moai status -v

# ํŠน์ • ๊ฒฝ๋กœ ํ”„๋กœ์ ํŠธ ์ƒํƒœ ํ™•์ธ
moai status -p /path/to/project

# ์ƒ์„ธ ์ •๋ณด + ํŠน์ • ๊ฒฝ๋กœ
moai status -v -p /path/to/project
```

### moai restore

๋ฐฑ์—… ๋””๋ ‰ํ† ๋ฆฌ์—์„œ MoAI-ADK๋ฅผ ๋ณต์›ํ•ฉ๋‹ˆ๋‹ค.

**์ธ์ž**:

- ``: ๋ณต์›ํ•  ๋ฐฑ์—… ๋””๋ ‰ํ† ๋ฆฌ ๊ฒฝ๋กœ (ํ•„์ˆ˜)

**์˜ต์…˜**:

- `--dry-run`: ๋ณ€๊ฒฝ ์—†์ด ๋ณต์›ํ•  ๋‚ด์šฉ ๋ฏธ๋ฆฌ๋ณด๊ธฐ
- `--force`: ๊ธฐ์กด ํŒŒ์ผ ๊ฐ•์ œ ๋ฎ์–ด์“ฐ๊ธฐ

**์‚ฌ์šฉ ์˜ˆ์‹œ**:

```bash
# ๋ฐฑ์—…์—์„œ ๋ณต์› (๋ฏธ๋ฆฌ๋ณด๊ธฐ)
moai restore .moai-backup-2025-10-02 --dry-run

# ์‹ค์ œ ๋ณต์› ์‹คํ–‰
moai restore .moai-backup-2025-10-02

# ๊ฐ•์ œ ๋ณต์› (๊ธฐ์กด ํŒŒ์ผ ๋ฎ์–ด์“ฐ๊ธฐ)
moai restore .moai-backup-2025-10-02 --force
```

**์ฐธ๊ณ **: MoAI-ADK ์—…๋ฐ์ดํŠธ๋Š” Claude Code์—์„œ `/alfred:9-update` ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.

---

## โ“ FAQ

### Q1: MoAI-ADK๋Š” ๋ฌด๋ฃŒ์ธ๊ฐ€์š”?

โœ… **๋„ค, ์™„์ „ ๋ฌด๋ฃŒ์ž…๋‹ˆ๋‹ค!**

- MIT ๋ผ์ด์„ ์Šค ์˜คํ”ˆ์†Œ์Šค
- ์ƒ์—…์  ์‚ฌ์šฉ ํฌํ•จ ๋ฌด๋ฃŒ
- Claude Code๋Š” Anthropic์˜ ์œ ๋ฃŒ ์„œ๋น„์Šค (๋ณ„๋„)

### Q2: ๊ธฐ์กด ํ”„๋กœ์ ํŠธ์— ์ ์šฉ ๊ฐ€๋Šฅํ•œ๊ฐ€์š”?

โœ… **๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค!**

```bash
cd existing-project
moai init .
```

Alfred๊ฐ€ ์ž๋™์œผ๋กœ:

- ์–ธ์–ด/ํ”„๋ ˆ์ž„์›Œํฌ ๊ฐ์ง€
- ํด๋” ๊ตฌ์กฐ ๋ถ„์„
- ์ตœ์  ์„ค์ • ์ œ์•ˆ

### Q3: ์–ด๋–ค ์–ธ์–ด๋ฅผ ์ง€์›ํ•˜๋‚˜์š”?

โœ… **๋ชจ๋“  ์ฃผ์š” ์–ธ์–ด ์ง€์›!**

**์›น/๋ฐฑ์—”๋“œ**: TypeScript, JavaScript, Python, Java, Go, Rust
**๋ชจ๋ฐ”์ผ**: Flutter/Dart, Swift/iOS, Kotlin/Android, React Native

โ†’ ๋ชจ๋“  ์–ธ์–ด์—์„œ **๋™์ผํ•œ 3๋‹จ๊ณ„ ์›Œํฌํ”Œ๋กœ์šฐ** ์‚ฌ์šฉ ๊ฐ€๋Šฅ!

### Q4: ํ•™์Šต ๊ณก์„ ์€ ์–ด๋–ค๊ฐ€์š”?

โœ… **๋งค์šฐ ๋น ๋ฆ…๋‹ˆ๋‹ค!**

- โšก **3๋ถ„**: ์ฒซ ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ ์™„๋ฃŒ
- ๐Ÿ“š **1์‹œ๊ฐ„**: 3๋‹จ๊ณ„ ์›Œํฌํ”Œ๋กœ์šฐ ์™„์ „ ์ดํ•ด
- ๐Ÿท๏ธ **1์ผ**: TAG ์‹œ์Šคํ…œ ์ˆ™๋‹ฌ
- ๐Ÿ‘ฅ **1์ฃผ**: ํŒ€ ํ”„๋กœ์ ํŠธ ์ ์šฉ

### Q5: ์—…๋ฐ์ดํŠธ๋Š” ์–ด๋–ป๊ฒŒ ํ•˜๋‚˜์š”?

โœ… **Claude Code์—์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ!**

```text
/alfred:9-update
```

**์™œ ์ด ๋ฐฉ๋ฒ•์„ ๊ถŒ์žฅํ•˜๋‚˜์š”?**

- ์ž๋™ ๋ฐฑ์—… (์‚ฌ์šฉ์ž ํŒŒ์ผ ๋ณดํ˜ธ)
- ๊ถŒํ•œ ์ž๋™ ์„ค์ • (`chmod +x`)
- 5๋‹จ๊ณ„ ๊ฒ€์ฆ (ํŒŒ์ผ/๊ถŒํ•œ/๋ฌด๊ฒฐ์„ฑ)
- ์—๋Ÿฌ ๋ฐœ์ƒ ์‹œ `debug-helper` ์ž๋™ ์ง€์›

---

**๋” ๊ถ๊ธˆํ•œ ์ ์ด ์žˆ์œผ์‹ ๊ฐ€์š”?**

- ๐Ÿ’ฌ **์งˆ๋ฌธ & ํ† ๋ก **: [GitHub Discussions](https://github.com/modu-ai/moai-adk/discussions)
- ๐Ÿ› **๋ฒ„๊ทธ ๋ฆฌํฌํŠธ**: [GitHub Issues](https://github.com/modu-ai/moai-adk/issues)

---

## ๐Ÿ“ž Support

- **๋ฒ„๊ทธ ๋ฆฌํฌํŠธ**: [GitHub Issues](https://github.com/modu-ai/moai-adk/issues)
- **์งˆ๋ฌธ & ํ† ๋ก **: [GitHub Discussions](https://github.com/modu-ai/moai-adk/discussions)
- **npm ํŒจํ‚ค์ง€**: [moai-adk](https://www.npmjs.com/package/moai-adk)

---

Made with MoAI's ๐Ÿชฟ

---

## ๋ผ์ด์„ ์Šค

์ด ํ”„๋กœ์ ํŠธ๋Š” [MIT License](LICENSE)๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.