# ๋๊ตฌ ์ฐธ์กฐ
Spec Workflow MCP์์ ์ ๊ณตํ๋ ๋ชจ๋ MCP ๋๊ตฌ์ ๋ํ ์์ ํ ๋ฌธ์์
๋๋ค.
## ๊ฐ์
Spec Workflow MCP๋ ๊ตฌ์กฐํ๋ ์ํํธ์จ์ด ๊ฐ๋ฐ์ ์ํ ์ ๋ฌธ ๋๊ตฌ๋ฅผ ์ ๊ณตํฉ๋๋ค. ์ด๋ฌํ ๋๊ตฌ๋ Model Context Protocol์ ํตํด AI ์ด์์คํดํธ์์ ์ ๊ทผํ ์ ์์ต๋๋ค.
## ๋๊ตฌ ์นดํ
๊ณ ๋ฆฌ
1. **์ํฌํ๋ก์ฐ ๊ฐ์ด๋** - ๋ฌธ์ ๋ฐ ์๋ด
2. **Spec ๊ด๋ฆฌ** - ์ฌ์ ์์ฑ ๋ฐ ๊ด๋ฆฌ
3. **์ปจํ
์คํธ ๋๊ตฌ** - ํ๋ก์ ํธ ์ ๋ณด ๊ฒ์
4. **Steering ๋๊ตฌ** - ํ๋ก์ ํธ ์์ค ๊ฐ์ด๋
5. **์น์ธ ๋๊ตฌ** - ๋ฌธ์ ์น์ธ ์ํฌํ๋ก์ฐ
## ์ํฌํ๋ก์ฐ ๊ฐ์ด๋ ๋๊ตฌ
### spec-workflow-guide
**๋ชฉ์ **: spec ์ค์ฌ ์ํฌํ๋ก์ฐ ํ๋ก์ธ์ค์ ๋ํ ํฌ๊ด์ ์ธ ๊ฐ์ด๋๋ฅผ ์ ๊ณตํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**: ์์
**๋ฐํ๊ฐ**: ์์ ํ ์ํฌํ๋ก์ฐ๋ฅผ ์ค๋ช
ํ๋ Markdown ๊ฐ์ด๋
**์ฌ์ฉ ์์ **:
```
"spec ์ํฌํ๋ก์ฐ ๊ฐ์ด๋ ๋ณด์ฌ์ค"
```
**์๋ต ํฌํจ ๋ด์ฉ**:
- ์ํฌํ๋ก์ฐ ๊ฐ์
- ๋จ๊ณ๋ณ ํ๋ก์ธ์ค
- ๋ชจ๋ฒ ์ฌ๋ก
- ์์ ํ๋กฌํํธ
### steering-guide
**๋ชฉ์ **: ํ๋ก์ ํธ steering ๋ฌธ์ ์์ฑ ๊ฐ์ด๋์
๋๋ค.
**๋งค๊ฐ๋ณ์**: ์์
**๋ฐํ๊ฐ**: steering ๋ฌธ์ ์์ฑ์ ์ํ Markdown ๊ฐ์ด๋
**์ฌ์ฉ ์์ **:
```
"steering ๋ฌธ์ ๋ง๋๋ ๋ฐฉ๋ฒ ๋ณด์ฌ์ค"
```
**์๋ต ํฌํจ ๋ด์ฉ**:
- Steering ๋ฌธ์ ์ ํ
- ์์ฑ ํ๋ก์ธ์ค
- ๋ด์ฉ ๊ฐ์ด๋๋ผ์ธ
- ์์
## Spec ๊ด๋ฆฌ ๋๊ตฌ
### create-spec-doc
**๋ชฉ์ **: ์ฌ์ ๋ฌธ์(์๊ตฌ์ฌํญ, ์ค๊ณ, ์์
)๋ฅผ ์์ฑํ๊ฑฐ๋ ์
๋ฐ์ดํธํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| specName | string | ์ | spec์ ์ด๋ฆ (kebab-case) |
| docType | string | ์ | ํ์
: "requirements", "design", ๋๋ "tasks" |
| content | string | ์ | ๋ฌธ์์ Markdown ๋ด์ฉ |
| revision | boolean | ์๋์ค | ์์ ์ฌ๋ถ (๊ธฐ๋ณธ๊ฐ: false) |
**์ฌ์ฉ ์์ **:
```typescript
{
specName: "user-authentication",
docType: "requirements",
content: "# User Authentication Requirements\n\n## Overview\n...",
revision: false
}
```
**๋ฐํ๊ฐ**:
```typescript
{
success: true,
message: "Requirements document created successfully",
path: ".spec-workflow/specs/user-authentication/requirements.md",
requestedApproval: true
}
```
**์ฐธ๊ณ ์ฌํญ**:
- spec ๋๋ ํ ๋ฆฌ๊ฐ ์์ผ๋ฉด ์์ฑ
- ์ ๋ฌธ์์ ๋ํด ์๋์ผ๋ก ์น์ธ ์์ฒญ
- Markdown ํ์ ๊ฒ์ฆ
- ์ ํ์
์์ฑ ์ ๊ธฐ์กด ๋ฌธ์ ๋ณด์กด
### spec-list
**๋ชฉ์ **: ๋ชจ๋ ์ฌ์์ ํ์ฌ ์ํ์ ํจ๊ป ๋์ดํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**: ์์
**๋ฐํ๊ฐ**: spec ์์ฝ ๋ฐฐ์ด
**์๋ต ๊ตฌ์กฐ**:
```typescript
[
{
name: "user-authentication",
status: "in-progress",
progress: 45,
documents: {
requirements: "approved",
design: "pending-approval",
tasks: "not-created"
},
taskStats: {
total: 15,
completed: 7,
inProgress: 1,
pending: 7
}
}
]
```
**์ฌ์ฉ ์์ **:
```
"๋ด ๋ชจ๋ spec ๋ชฉ๋ก ๋ณด์ฌ์ค"
```
### spec-status
**๋ชฉ์ **: ํน์ spec์ ๋ํ ์์ธ ์ํ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ต๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| specName | string | ์ | ํ์ธํ spec์ ์ด๋ฆ |
**๋ฐํ๊ฐ**: ์์ธ spec ์ํ
**์๋ต ๊ตฌ์กฐ**:
```typescript
{
exists: true,
name: "user-authentication",
documents: {
requirements: {
exists: true,
approved: true,
lastModified: "2024-01-15T10:30:00Z",
size: 4523
},
design: {
exists: true,
approved: false,
pendingApproval: true,
lastModified: "2024-01-15T14:20:00Z",
size: 6234
},
tasks: {
exists: true,
taskCount: 15,
completedCount: 7,
inProgressCount: 1,
progress: 45
}
},
overallProgress: 45,
currentPhase: "implementation"
}
```
**์ฌ์ฉ ์์ **:
```
"user-authentication spec์ ์ํ ๋ณด์ฌ์ค"
```
### manage-tasks
**๋ชฉ์ **: ์
๋ฐ์ดํธ, ์ํ ๋ณ๊ฒฝ, ์งํ ์ํฉ ์ถ์ ์ ํฌํจํ ํฌ๊ด์ ์ธ ์์
๊ด๋ฆฌ์
๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| specName | string | ์ | spec์ ์ด๋ฆ |
| action | string | ์ | ์์
: "update", "complete", "list", "progress" |
| taskId | string | ๋๋๋ก | ์์
ID (update/complete์ ํ์) |
| status | string | ์๋์ค | ์ ์ํ: "pending", "in-progress", "completed" |
| notes | string | ์๋์ค | ์์
์ ๋ํ ์ถ๊ฐ ๋ฉ๋ชจ |
**์์
**:
1. **์์
์ํ ์
๋ฐ์ดํธ**:
```typescript
{
specName: "user-auth",
action: "update",
taskId: "1.2.1",
status: "in-progress",
notes: "Started implementation"
}
```
2. **์์
์๋ฃ**:
```typescript
{
specName: "user-auth",
action: "complete",
taskId: "1.2.1"
}
```
3. **์์
๋ชฉ๋ก**:
```typescript
{
specName: "user-auth",
action: "list"
}
```
4. **์งํ ์ํฉ ๊ฐ์ ธ์ค๊ธฐ**:
```typescript
{
specName: "user-auth",
action: "progress"
}
```
**๋ฐํ๊ฐ**: ์์
์ ๋ณด ๋๋ ์
๋ฐ์ดํธ ํ์ธ
## ์ปจํ
์คํธ ๋๊ตฌ
### get-template-context
**๋ชฉ์ **: ๋ชจ๋ ๋ฌธ์ ํ์
์ ๋ํ Markdown ํ
ํ๋ฆฟ์ ๊ฒ์ํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**: ์์
**๋ฐํ๊ฐ**: ๋ชจ๋ ํ
ํ๋ฆฟ์ ํฌํจํ๋ ๊ฐ์ฒด
**์๋ต ๊ตฌ์กฐ**:
```typescript
{
requirements: "# Requirements Template\n\n## Overview\n...",
design: "# Design Template\n\n## Architecture\n...",
tasks: "# Tasks Template\n\n## Implementation Tasks\n...",
product: "# Product Steering Template\n...",
tech: "# Technical Steering Template\n...",
structure: "# Structure Steering Template\n..."
}
```
**์ฌ์ฉ ์์ **:
```
"๋ชจ๋ ๋ฌธ์ ํ
ํ๋ฆฟ ๊ฐ์ ธ์์ค"
```
### get-steering-context
**๋ชฉ์ **: ํ๋ก์ ํธ steering ๋ฌธ์ ๋ฐ ๊ฐ์ด๋๋ฅผ ๊ฒ์ํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| docType | string | ์๋์ค | ํน์ ๋ฌธ์: "product", "tech", "structure", ๋๋ "all" |
**๋ฐํ๊ฐ**: Steering ๋ฌธ์ ๋ด์ฉ
**์ฌ์ฉ ์์ **:
```typescript
{
docType: "tech" // ๊ธฐ์ steering๋ง ๋ฐํ
}
```
**์๋ต ๊ตฌ์กฐ**:
```typescript
{
product: "# Product Steering\n\n## Vision\n...",
tech: "# Technical Steering\n\n## Architecture\n...",
structure: "# Structure Steering\n\n## Organization\n..."
}
```
### get-spec-context
**๋ชฉ์ **: ํน์ spec์ ๋ํ ์์ ํ ์ปจํ
์คํธ๋ฅผ ๊ฒ์ํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| specName | string | ์ | spec์ ์ด๋ฆ |
| includeContent | boolean | ์๋์ค | ๋ฌธ์ ๋ด์ฉ ํฌํจ (๊ธฐ๋ณธ๊ฐ: true) |
**๋ฐํ๊ฐ**: ์์ ํ spec ์ปจํ
์คํธ
**์๋ต ๊ตฌ์กฐ**:
```typescript
{
name: "user-authentication",
exists: true,
documents: {
requirements: {
exists: true,
content: "# Requirements\n\n...",
approved: true
},
design: {
exists: true,
content: "# Design\n\n...",
approved: false
},
tasks: {
exists: true,
content: "# Tasks\n\n...",
stats: {
total: 15,
completed: 7,
progress: 45
}
}
},
relatedSpecs: ["user-profile", "session-management"],
dependencies: ["database-setup", "auth-library"]
}
```
**์ฌ์ฉ ์์ **:
```
"user-authentication spec์ ์ ์ฒด ์ปจํ
์คํธ ๊ฐ์ ธ์์ค"
```
## Steering ๋ฌธ์ ๋๊ตฌ
### create-steering-doc
**๋ชฉ์ **: ํ๋ก์ ํธ steering ๋ฌธ์(product, tech, structure)๋ฅผ ์์ฑํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| docType | string | ์ | ํ์
: "product", "tech", ๋๋ "structure" |
| content | string | ์ | ๋ฌธ์์ Markdown ๋ด์ฉ |
**์ฌ์ฉ ์์ **:
```typescript
{
docType: "product",
content: "# Product Steering\n\n## Vision\nBuild the best..."
}
```
**๋ฐํ๊ฐ**:
```typescript
{
success: true,
message: "Product steering document created",
path: ".spec-workflow/steering/product.md"
}
```
**์ฐธ๊ณ ์ฌํญ**:
- ํ์์ steering ๋๋ ํ ๋ฆฌ ์์ฑ
- ๊ธฐ์กด steering ๋ฌธ์ ๋ฎ์ด์ฐ๊ธฐ
- steering ๋ฌธ์์๋ ์น์ธ ๋ถํ์
- spec ์ ์ ์์ฑ๋์ด์ผ ํจ
## ์น์ธ ์์คํ
๋๊ตฌ
### request-approval
**๋ชฉ์ **: ๋ฌธ์์ ๋ํ ์ฌ์ฉ์ ์น์ธ์ ์์ฒญํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| specName | string | ์ | spec์ ์ด๋ฆ |
| docType | string | ์ | ์น์ธํ ๋ฌธ์ ํ์
|
| documentId | string | ์ | ์ถ์ ์ ์ํ ๊ณ ์ ID |
| content | string | ์ | ๊ฒํ ํ ๋ฌธ์ ๋ด์ฉ |
**์ฌ์ฉ ์์ **:
```typescript
{
specName: "user-auth",
docType: "requirements",
documentId: "user-auth-req-v1",
content: "# Requirements\n\n..."
}
```
**๋ฐํ๊ฐ**:
```typescript
{
success: true,
approvalId: "user-auth-req-v1",
message: "Approval requested. Check dashboard to review."
}
```
### get-approval-status
**๋ชฉ์ **: ๋ฌธ์์ ์น์ธ ์ํ๋ฅผ ํ์ธํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| specName | string | ์ | spec์ ์ด๋ฆ |
| documentId | string | ์ | ํ์ธํ ๋ฌธ์ ID |
**๋ฐํ๊ฐ**:
```typescript
{
exists: true,
status: "pending" | "approved" | "rejected" | "changes-requested",
feedback: "Please add more detail about error handling",
timestamp: "2024-01-15T10:30:00Z",
reviewer: "user"
}
```
**์ฌ์ฉ ์์ **:
```
"user-auth ์๊ตฌ์ฌํญ์ ์น์ธ ์ํ ํ์ธํด์ค"
```
### delete-approval
**๋ชฉ์ **: ์๋ฃ๋ ์น์ธ ์์ฒญ์ ์ ๊ฑฐํ์ฌ ์น์ธ ํ๋ฅผ ์ ๋ฆฌํฉ๋๋ค.
**๋งค๊ฐ๋ณ์**:
| ๋งค๊ฐ๋ณ์ | ํ์
| ํ์ | ์ค๋ช
|
|-----------|------|----------|-------------|
| specName | string | ์ | spec์ ์ด๋ฆ |
| documentId | string | ์ | ์ ๊ฑฐํ ๋ฌธ์ ID |
**๋ฐํ๊ฐ**:
```typescript
{
success: true,
message: "Approval record deleted"
}
```
**์ฌ์ฉ ์์ **:
```
"user-auth์ ์๋ฃ๋ ์น์ธ ์ ๋ฆฌํด์ค"
```
## ๋๊ตฌ ํตํฉ ํจํด
### ์์ฐจ์ ์ํฌํ๋ก์ฐ
๋๊ตฌ๋ ์์๋๋ก ์๋ํ๋๋ก ์ค๊ณ๋์์ต๋๋ค:
1. `steering-guide` โ steering์ ๋ํด ํ์ต
2. `create-steering-doc` โ steering ๋ฌธ์ ์์ฑ
3. `spec-workflow-guide` โ ์ํฌํ๋ก์ฐ ํ์ต
4. `create-spec-doc` โ ์๊ตฌ์ฌํญ ์์ฑ
5. `request-approval` โ ๊ฒํ ์์ฒญ
6. `get-approval-status` โ ์ํ ํ์ธ
7. `create-spec-doc` โ ์ค๊ณ ์์ฑ (์น์ธ ํ)
8. `manage-tasks` โ ๊ตฌํ ์ถ์
### ๋ณ๋ ฌ ์์
์ผ๋ถ ๋๊ตฌ๋ ๋์์ ์ฌ์ฉํ ์ ์์ต๋๋ค:
- `spec-list` + `spec-status` โ ๊ฐ์ ๋ฐ ์ธ๋ถ์ฌํญ ๊ฐ์ ธ์ค๊ธฐ
- `get-spec-context` + `get-steering-context` โ ์ ์ฒด ํ๋ก์ ํธ ์ปจํ
์คํธ
- ์ฌ๋ฌ `create-spec-doc` โ ์ฌ๋ฌ spec ์์ฑ
### ์๋ฌ ์ฒ๋ฆฌ
๋ชจ๋ ๋๊ตฌ๋ ์ผ๊ด๋ ์๋ฌ ๊ตฌ์กฐ๋ฅผ ๋ฐํํฉ๋๋ค:
```typescript
{
success: false,
error: "Spec not found",
details: "No spec named 'invalid-spec' exists",
suggestion: "Use spec-list to see available specs"
}
```
## ๋ชจ๋ฒ ์ฌ๋ก
### ๋๊ตฌ ์ ํ
1. **์ ๋ณด ์์ง**:
- ๊ฐ์๋ฅผ ์ํด `spec-list` ์ฌ์ฉ
- ํน์ spec์ ์ํด `spec-status` ์ฌ์ฉ
- ๊ตฌํ์ ์ํด `get-spec-context` ์ฌ์ฉ
2. **๋ฌธ์ ์์ฑ**:
- ํญ์ ์๊ตฌ์ฌํญ์ ๋จผ์ ์์ฑ
- ์ค๊ณ ์ ์ ์น์ธ ๋๊ธฐ
- ์ค๊ณ ์น์ธ ํ ์์
์์ฑ
3. **์์
๊ด๋ฆฌ**:
- ์์
์์ ์ ์ํ ์
๋ฐ์ดํธ
- ์๋ฃ ์ฆ์ ์๋ฃ๋ก ํ์
- ์ค์ํ ์ปจํ
์คํธ๋ฅผ ์ํ ๋ฉ๋ชจ ์ฌ์ฉ
### ์ฑ๋ฅ ๊ณ ๋ ค์ฌํญ
- **๋ฐฐ์น ์์
**: ํ ๋ํ์์ ์ฌ๋ฌ spec ์์ฒญ
- **์บ์ฑ**: ๋๊ตฌ๋ ์ฑ๋ฅ์ ์ํด ํ์ผ ์ฝ๊ธฐ๋ฅผ ์บ์
- **์ ํ์ ๋ก๋ฉ**: ๋ ๋น ๋ฅธ ์ํ ํ์ธ์ ์ํด `includeContent: false` ์ฌ์ฉ
### ๋ณด์
- **๊ฒฝ๋ก ๊ฒ์ฆ**: ๋ชจ๋ ๊ฒฝ๋ก๊ฐ ๊ฒ์ฆ๋๊ณ ์ ์ ๋จ
- **ํ๋ก์ ํธ ๊ฒฉ๋ฆฌ**: ๋๊ตฌ๋ ํ๋ก์ ํธ ๋๋ ํ ๋ฆฌ๋ง ์ ๊ทผ
- **์
๋ ฅ ์ ์ **: Markdown ๋ด์ฉ์ด ์ ์ ๋จ
- **์คํ ์์**: ๋๊ตฌ๋ ์ฝ๋๋ฅผ ์คํํ์ง ์์
## ๋๊ตฌ ํ์ฅ
### ์ฌ์ฉ์ ์ ์ ๋๊ตฌ ๊ฐ๋ฐ
์ ๋๊ตฌ๋ฅผ ์ถ๊ฐํ๋ ค๋ฉด:
1. `src/tools/`์ ๋๊ตฌ ๋ชจ๋ ์์ฑ
2. ๋งค๊ฐ๋ณ์ ์คํค๋ง ์ ์
3. ํธ๋ค๋ฌ ํจ์ ๊ตฌํ
4. MCP ์๋ฒ์ ๋ฑ๋ก
5. exports์ ์ถ๊ฐ
์์ ๊ตฌ์กฐ:
```typescript
export const customTool = {
name: 'custom-tool',
description: 'Description',
parameters: {
// JSON Schema
},
handler: async (params) => {
// Implementation
}
};
```
## ๋๊ตฌ ๋ฒ์ ๊ด๋ฆฌ
๋๊ตฌ๋ ํ์ ํธํ์ฑ์ ์ ์งํฉ๋๋ค:
- ๋งค๊ฐ๋ณ์ ์ถ๊ฐ๋ ์ ํ ์ฌํญ
- ์๋ต ๊ตฌ์กฐ๋ ๊ต์ฒด๊ฐ ์๋ ํ์ฅ
- ๋ ์ด์ ์ฌ์ฉ๋์ง ์๋ ๊ธฐ๋ฅ์ ๊ฒฝ๊ณ ํ์
- ๋ง์ด๊ทธ๋ ์ด์
๊ฐ์ด๋ ์ ๊ณต
## ๊ด๋ จ ๋ฌธ์
- [์ฌ์ฉ์ ๊ฐ์ด๋](USER-GUIDE.md) - ๋๊ตฌ๋ฅผ ํจ๊ณผ์ ์ผ๋ก ์ฌ์ฉํ๊ธฐ
- [์ํฌํ๋ก์ฐ ํ๋ก์ธ์ค](WORKFLOW.md) - ์ํฌํ๋ก์ฐ์์์ ๋๊ตฌ ์ฌ์ฉ
- [ํ๋กฌํํ
๊ฐ์ด๋](PROMPTING-GUIDE.md) - ๋๊ตฌ ์ฌ์ฉ ์์
- [๊ฐ๋ฐ ๊ฐ์ด๋](DEVELOPMENT.md) - ์ ๋๊ตฌ ์ถ๊ฐ