๐ ๋ฌธ์ํ ์ค์ํธ (Dev Doc Suite)
์ด ์ํฌํ๋ก์ฐ๋ dev-doc-suite ์คํฌ์ ์ฌ์ฉํ์ฌ ํ๋ก์ ํธ ๋ฌธ์๋ฅผ ์ฝ๋๋ ํญ์ '์ง์ค(Truth)'์ด๋ผ๋ ์์น ํ์ ์ต์ ์ํ๋ก ์ ์งํฉ๋๋ค.
1. ์ด๊ธฐํ (Initialization)
- ์คํฌ ๋ก๋:
this document๋ฅผ ์ฝ์ด ๋ฌธ์ํ ์์น(Core Principles)์ ํ์ ํฉ๋๋ค. - ๋์ ํ์ธ: ์ฌ์ฉ์์๊ฒ ๋ฌธ์ํํ ๋์(์ ์ฒด ํ๋ก์ ํธ, ํน์ ๋ชจ๋, ๋๋ ํน์ ํ์ผ)์ ๋ฌป์ต๋๋ค.
2. ๋ถ์ (Analysis - Phase 1)
"์ฝ๋๊ฐ ๊ณง ๋ฌธ์์ ์์ฒ์ ๋๋ค."
- ๊ตฌ์กฐ ํ์
: ๋์ ๊ฒฝ๋ก์ ๋ํด
list_dir๋ฅผ ์ํํ์ฌ ํ์ผ ๊ตฌ์กฐ๋ฅผ ํ์ ํฉ๋๋ค. - ๋ด์ฉ ์ค์บ: ์ฃผ์ ํ์ผ(์ง์
์ , ํต์ฌ ๋ชจ๋)์ ๋ํด
view_file_outline๋๋read_file์ ์ฌ์ฉํ์ฌ ํด๋์ค, ํจ์ ์๊ทธ๋์ฒ, ๋ ์คํธ๋ง(Docstring)์ ์ถ์ถํฉ๋๋ค. - ์์กด์ฑ ๋ถ์: ์ฃผ์ ํ์ผ๋ค์ด ์๋ก ์ด๋ป๊ฒ ์ฐ๊ฒฐ๋์ด ์๋์ง ํ์ ํฉ๋๋ค.
3. ์์ฑ (Drafting - Phase 2)
"๋ ์๋ฅผ ๋จผ์ ์๊ฐํ์ธ์ (๊ฐ๋ฐ์ vs ์ฌ์ฉ์)."
- ์ด์ ์์ฑ: ๋ถ์๋ ๋ด์ฉ์ ๋ฐํ์ผ๋ก ๋ฌธ์ ์ ํ์ ์ ํํ์ฌ ์์ฑํฉ๋๋ค. (SKILL.md ์ฐธ์กฐ)
- Code Docs (Docstrings): ํจ์/ํด๋์ค ๋จ์์ ์์ธ ์ค๋ช (Python/JS).
- API Docs: REST API ์๋ํฌ์ธํธ ๋ช ์ธ (Request/Response).
- Architecture: Mermaid ๋ค์ด์ด๊ทธ๋จ์ ํฌํจํ ์์คํ ๊ตฌ์กฐ๋.
- README: ํ๋ก์ ํธ ๋ชฉ์ , ์ค์น, ์ฌ์ฉ๋ฒ์ ํฌํจํ ๋๋ฌธ.
- Explanations: ๋ณต์กํ ๋น์ฆ๋์ค ๋ก์ง์ ๋ํ "How it works" ์ฌ์ธต ํด์ค.
- ํฌ๋งทํ
์ ์ฉ:
SKILL.md์ "Standardized Format"์ ๋ฐ๋ผ ๋งํฌ๋ค์ด์ ์ ๋ํฉ๋๋ค.
4. ๊ฒ์ฆ ๋ฐ ์๋ฃ (Verification - Phase 3)
- ์ ํฉ์ฑ ํ์ธ: ์์ฑ๋ ์ค๋ช ์ด ์ค์ ์ฝ๋ ๋์๊ณผ ์ผ์นํ๋์ง ์ฌํ์ธํฉ๋๋ค.
- ์ ์ฅ:
docs/๋๋ ํ ๋ฆฌ ๋๋ ํด๋น ํ์ผ ์์น(README.md ๋ฑ)์ ๋ฌธ์๋ฅผ ์ ์ฅํฉ๋๋ค. - ์ฌ์ฉ์ ์๋ฆผ:
notify_user๋ฅผ ํตํด ์์ฑ๋ ๋ฌธ์์ ์์น์ ์์ฝ์ ์๋ฆฌ๊ณ ๋ฆฌ๋ทฐ๋ฅผ ์์ฒญํฉ๋๋ค.
Standards & Rules
Documentation Suite (Dev Doc Suite)
Core Principles
- Code as Truth: Documentation must always be derived from the actual code implementation, not assumptions.
- Living Documents: Documentation is NOT a post-mortem artifact; it must evolve with every commit.
- Audience-Centric: Clearly distinguish between User Docs (Ease of use) and Developer Docs (Implementation details).
- Standardized Format: Follow the "3-Tier Language Strategy" (Korean for high-level structure, English for technical details).
Documentation Types & Templates (Source: document-suite-skills)
1. Code Documentation (Docstrings)
Goal: Clear, comprehensive function/class documentation
Example Format:
def function_name(param1: Type, param2: Type) -> ReturnType:
"""
Brief one-line description.
Detailed explanation of purpose, behavior, and context.
Args:
param1: Description with type and example values
param2: Description with constraints
Returns:
Description of return value and meaning
Example:
>>> function_name(example_value1, example_value2)
expected_output
Raises:
ErrorType: When and why this error occurs
Note:
Important details, gotchas, performance considerations
"""
2. API Documentation
Goal: Complete API reference for endpoints
REST API Example:
## Authentication API
### POST /api/auth/login
Authenticate user and return JWT access token.
**Request:**
```json
{
"email": "user@example.com",
"password": "SecureP@ss123"
}
Response (200 OK):
{
"success": true,
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600
}
}
### 3. Architecture Documentation
**Goal:** Clear system overview and component relationships
**Example:**
```markdown
# System Architecture
## System Diagram
```mermaid
graph TD
Client[Frontend] -->|HTTPS| Gateway[API Gateway]
Gateway --> Auth[Auth Service]
Gateway --> Trade[Trading Service]
Trade --> DB[(Database)]
Core Components
1. API Gateway
Responsibility: Entry point for all client requests
- Request routing
- Rate limiting
2. Auth Service
Responsibility: User authentication
- JWT generation
- Session management
### 4. README Generation
**Goal:** Comprehensive project README
**Essential Sections:**
```markdown
# [Project Name]
[One-line description] - [What problem it solves]
## Features
- Key feature 1
- Key feature 2
## Installation
\`\`\`bash
npm install
npm run dev
\`\`\`
## Configuration
| Variable | Description | Required |
|----------|-------------|----------|
| `DATABASE_URL` | DB connection string | Yes |
5. Code Explanations
Goal: Clear explanations of complex code
Process:
- High-Level Purpose: What problem does this solve?
- Step-by-Step Logic: Break down into phases.
- Key Algorithms: Identify important patterns.
- Edge Cases: validation and error handling.
Quality Standards
- Freshness: All generated docs must be verified against the current codebase state.
- Completeness: Every public function/class must have at least a summary description.
- Readability: Use clear formatting, bullet points, and code blocks.
- Safe YAML: Frontmatter descriptions with special characters must be quoted.
Checklist
- [ ] Analysis: Did you read all relevant code files before writing?
- [ ] Verification: Does the documentation accurately reflect the code behavior?
- [ ] Formatting: Is the markdown syntax correct and consistent?
- [ ] Language: Is the appropriate language (Korean/English) used for the target audience?
Scan to join WeChat group