jun-claude-code 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -12
- package/dist/cli.js +22 -0
- package/dist/init-context.js +25 -3
- package/dist/validate.d.ts +4 -0
- package/dist/validate.js +105 -0
- package/package.json +1 -1
- package/templates/global/CLAUDE.md +50 -21
- package/templates/global/agents/architect.md +23 -11
- package/templates/global/agents/code-reviewer.md +17 -7
- package/templates/global/agents/code-writer.md +27 -15
- package/templates/global/agents/context-collector.md +11 -3
- package/templates/global/agents/context-manager.md +20 -8
- package/templates/global/agents/designer.md +32 -20
- package/templates/global/agents/director.md +43 -31
- package/templates/global/agents/explore.md +12 -4
- package/templates/global/agents/git-manager.md +39 -22
- package/templates/global/agents/impact-analyzer.md +17 -7
- package/templates/global/agents/qa-tester.md +22 -8
- package/templates/global/agents/simple-code-writer.md +12 -4
- package/templates/global/agents/task-planner.md +18 -10
- package/templates/global/hooks/skill-forced.sh +49 -39
- package/templates/global/hooks/workflow-enforced.sh +49 -31
- package/templates/global/skills/Backend/SKILL.md +38 -9
- package/templates/global/skills/Coding/SKILL.md +69 -29
- package/templates/global/skills/Director/SKILL.md +9 -5
- package/templates/global/skills/Documentation/SKILL.md +68 -1
- package/templates/global/skills/Git/SKILL.md +8 -4
- package/templates/global/skills/Git/git.md +60 -28
- package/templates/global/skills/Git/pr-apply.md +18 -6
- package/templates/global/skills/Git/pr-review.md +4 -0
- package/templates/global/skills/PromptStructuring/SKILL.md +67 -0
- package/templates/global/skills/PromptStructuring/positive-phrasing.md +206 -0
- package/templates/global/skills/PromptStructuring/xml-tags.md +330 -0
- package/templates/global/skills/React/SKILL.md +28 -8
- package/templates/global/skills/React/react-hook-form.md +20 -12
- package/templates/global/skills/React/tailwind-styled.md +29 -7
- package/templates/global/skills/React/tanstack-router.md +21 -9
- package/templates/project/agents/project-task-manager.md +19 -7
- package/templates/{global → project}/skills/ContextGeneration/SKILL.md +20 -12
- package/templates/project/workflows/context-gen.yml +30 -7
- /package/templates/{global → project}/agents/context-generator.md +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Claude Code 설정 템플릿 CLI. 미리 정의된 Agents, Skills, Hooks, Workfl
|
|
|
6
6
|
|
|
7
7
|
### Agents (`templates/global/agents/`)
|
|
8
8
|
|
|
9
|
-
작업별 전문 Subagent
|
|
9
|
+
작업별 전문 Subagent 13종. Main Agent의 Context Window를 절약하면서 각 작업을 위임합니다.
|
|
10
10
|
|
|
11
11
|
| Agent | 역할 |
|
|
12
12
|
|-------|------|
|
|
@@ -23,8 +23,6 @@ Claude Code 설정 템플릿 CLI. 미리 정의된 Agents, Skills, Hooks, Workfl
|
|
|
23
23
|
| `director` | 작업 총괄 디렉터 |
|
|
24
24
|
| `context-collector` | Context 수집 |
|
|
25
25
|
| `context-manager` | Context 문서 관리 |
|
|
26
|
-
| `context-generator` | Context 자동 생성 |
|
|
27
|
-
| `project-task-manager` | GitHub Project 태스크 관리 |
|
|
28
26
|
|
|
29
27
|
### Skills (`templates/global/skills/`)
|
|
30
28
|
|
|
@@ -36,7 +34,6 @@ Claude Code 설정 템플릿 CLI. 미리 정의된 Agents, Skills, Hooks, Workfl
|
|
|
36
34
|
| `React` | React 개발 (TanStack Router, React Hook Form, Tailwind) |
|
|
37
35
|
| `Documentation` | .claude 문서 작성 가이드 |
|
|
38
36
|
| `Director` | 디렉터 Agent 운영 스킬 |
|
|
39
|
-
| `ContextGeneration` | Context 자동 생성 스킬 |
|
|
40
37
|
|
|
41
38
|
### Hooks (`templates/global/hooks/`)
|
|
42
39
|
|
|
@@ -44,7 +41,21 @@ Claude Code 설정 템플릿 CLI. 미리 정의된 Agents, Skills, Hooks, Workfl
|
|
|
44
41
|
|------|------|
|
|
45
42
|
| `workflow-enforced.sh` | 워크플로우 순서 강제 프로토콜 |
|
|
46
43
|
| `skill-forced.sh` | Skill/Agent 평가 프로토콜 |
|
|
47
|
-
|
|
44
|
+
|
|
45
|
+
### Project Agents (`templates/project/agents/`)
|
|
46
|
+
|
|
47
|
+
프로젝트 `.claude/`에 설치되는 프로젝트별 Agent.
|
|
48
|
+
|
|
49
|
+
| Agent | 역할 |
|
|
50
|
+
|-------|------|
|
|
51
|
+
| `project-task-manager` | GitHub Project 태스크 관리 |
|
|
52
|
+
| `context-generator` | Context 자동 생성 |
|
|
53
|
+
|
|
54
|
+
### Project Skills (`templates/project/skills/`)
|
|
55
|
+
|
|
56
|
+
| Skill | 설명 |
|
|
57
|
+
|-------|------|
|
|
58
|
+
| `ContextGeneration` | Context 자동 생성 스킬 |
|
|
48
59
|
|
|
49
60
|
### Workflow
|
|
50
61
|
|
|
@@ -116,11 +127,17 @@ jun-claude-code init-context
|
|
|
116
127
|
.github/workflows/
|
|
117
128
|
└── context-gen.yml # Context 생성 GitHub Actions 워크플로우
|
|
118
129
|
|
|
119
|
-
.claude/
|
|
120
|
-
├──
|
|
121
|
-
│ └──
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
.claude/
|
|
131
|
+
├── agents/
|
|
132
|
+
│ └── context-generator.md # Context 자동 생성 Agent
|
|
133
|
+
├── skills/
|
|
134
|
+
│ └── ContextGeneration/
|
|
135
|
+
│ └── SKILL.md # Context 자동 생성 Skill
|
|
136
|
+
└── context/
|
|
137
|
+
├── codebase/
|
|
138
|
+
│ └── INDEX.md # 코드베이스 모듈 참조 목록
|
|
139
|
+
└── business/
|
|
140
|
+
└── INDEX.md # 비즈니스 도메인 참조 목록
|
|
124
141
|
```
|
|
125
142
|
|
|
126
143
|
> `CLAUDE_CODE_OAUTH_TOKEN`를 GitHub repository secrets에 추가해야 합니다.
|
|
@@ -131,12 +148,13 @@ jun-claude-code init-context
|
|
|
131
148
|
templates/
|
|
132
149
|
├── global/ # ~/.claude/에 설치되는 전역 설정
|
|
133
150
|
│ ├── CLAUDE.md # 작업 가이드 (워크플로우, Context 절약 원칙)
|
|
134
|
-
│ ├── agents/ # Subagent 정의 (
|
|
151
|
+
│ ├── agents/ # Subagent 정의 (13종)
|
|
135
152
|
│ ├── skills/ # 스킬 가이드 (코딩, Git, BE, FE 등)
|
|
136
153
|
│ ├── hooks/ # 자동 실행 스크립트 (워크플로우 강제, 스킬 평가)
|
|
137
154
|
│ └── settings.json # Claude Code 전역 설정
|
|
138
155
|
└── project/ # 프로젝트 .claude/에 설치되는 프로젝트별 설정
|
|
139
|
-
├── agents/ # project-task-manager Agent
|
|
156
|
+
├── agents/ # project-task-manager, context-generator Agent
|
|
157
|
+
├── skills/ # ContextGeneration Skill
|
|
140
158
|
├── hooks/ # task-loader Hook
|
|
141
159
|
├── workflows/ # context-gen Workflow
|
|
142
160
|
└── project.env.example
|
package/dist/cli.js
CHANGED
|
@@ -33,10 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
return result;
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
36
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
40
|
const commander_1 = require("commander");
|
|
41
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
38
42
|
const copy_1 = require("./copy");
|
|
39
43
|
const init_context_1 = require("./init-context");
|
|
44
|
+
const validate_1 = require("./validate");
|
|
40
45
|
const program = new commander_1.Command();
|
|
41
46
|
program
|
|
42
47
|
.name('jun-claude-code')
|
|
@@ -96,4 +101,21 @@ program
|
|
|
96
101
|
process.exit(1);
|
|
97
102
|
}
|
|
98
103
|
});
|
|
104
|
+
program
|
|
105
|
+
.command('validate')
|
|
106
|
+
.description('Validate template directory structure')
|
|
107
|
+
.action(async () => {
|
|
108
|
+
try {
|
|
109
|
+
await (0, validate_1.validateTemplates)();
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
if (error instanceof Error) {
|
|
113
|
+
console.error(chalk_1.default.red('Validation failed:'), error.message);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
console.error(chalk_1.default.red('Validation failed'));
|
|
117
|
+
}
|
|
118
|
+
process.exit(1);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
99
121
|
program.parse();
|
package/dist/init-context.js
CHANGED
|
@@ -63,7 +63,29 @@ async function initContext() {
|
|
|
63
63
|
fs.copyFileSync(templateSrc, workflowDest);
|
|
64
64
|
console.log(chalk_1.default.green(' ✓ Created .github/workflows/context-gen.yml'));
|
|
65
65
|
}
|
|
66
|
-
// 2.
|
|
66
|
+
// 2. context-generator Agent 복사
|
|
67
|
+
const agentSrc = path.join(getTemplatesDir(), 'agents', 'context-generator.md');
|
|
68
|
+
const agentDest = path.join(cwd, '.claude', 'agents', 'context-generator.md');
|
|
69
|
+
fs.mkdirSync(path.dirname(agentDest), { recursive: true });
|
|
70
|
+
if (fs.existsSync(agentDest)) {
|
|
71
|
+
console.log(chalk_1.default.yellow(' ⚠ .claude/agents/context-generator.md already exists, skipping'));
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
fs.copyFileSync(agentSrc, agentDest);
|
|
75
|
+
console.log(chalk_1.default.green(' ✓ Created .claude/agents/context-generator.md'));
|
|
76
|
+
}
|
|
77
|
+
// 3. ContextGeneration Skill 복사
|
|
78
|
+
const skillSrc = path.join(getTemplatesDir(), 'skills', 'ContextGeneration', 'SKILL.md');
|
|
79
|
+
const skillDest = path.join(cwd, '.claude', 'skills', 'ContextGeneration', 'SKILL.md');
|
|
80
|
+
fs.mkdirSync(path.dirname(skillDest), { recursive: true });
|
|
81
|
+
if (fs.existsSync(skillDest)) {
|
|
82
|
+
console.log(chalk_1.default.yellow(' ⚠ .claude/skills/ContextGeneration/SKILL.md already exists, skipping'));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
fs.copyFileSync(skillSrc, skillDest);
|
|
86
|
+
console.log(chalk_1.default.green(' ✓ Created .claude/skills/ContextGeneration/SKILL.md'));
|
|
87
|
+
}
|
|
88
|
+
// 4. .claude/context/codebase/ 디렉토리 + stub INDEX.md
|
|
67
89
|
const codebaseDirPath = path.join(cwd, '.claude', 'context', 'codebase');
|
|
68
90
|
const codebaseIndex = path.join(codebaseDirPath, 'INDEX.md');
|
|
69
91
|
fs.mkdirSync(codebaseDirPath, { recursive: true });
|
|
@@ -85,7 +107,7 @@ description: 코드베이스 모듈 참조 목록
|
|
|
85
107
|
`);
|
|
86
108
|
console.log(chalk_1.default.green(' ✓ Created .claude/context/codebase/INDEX.md'));
|
|
87
109
|
}
|
|
88
|
-
//
|
|
110
|
+
// 5. .claude/context/business/ 디렉토리 + stub INDEX.md
|
|
89
111
|
const businessDirPath = path.join(cwd, '.claude', 'context', 'business');
|
|
90
112
|
const businessIndex = path.join(businessDirPath, 'INDEX.md');
|
|
91
113
|
fs.mkdirSync(businessDirPath, { recursive: true });
|
|
@@ -111,7 +133,7 @@ description: 비즈니스 도메인 참조 목록
|
|
|
111
133
|
`);
|
|
112
134
|
console.log(chalk_1.default.green(' ✓ Created .claude/context/business/INDEX.md'));
|
|
113
135
|
}
|
|
114
|
-
//
|
|
136
|
+
// 6. 안내 메시지
|
|
115
137
|
console.log(chalk_1.default.bold('\n✅ Context auto-generation setup complete!\n'));
|
|
116
138
|
console.log(chalk_1.default.cyan('Next steps:'));
|
|
117
139
|
console.log(chalk_1.default.cyan(' 1. Add CLAUDE_CODE_OAUTH_TOKEN to your repository secrets'));
|
package/dist/validate.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.validateTemplates = validateTemplates;
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
43
|
+
/**
|
|
44
|
+
* Get the templates directory path (from package installation)
|
|
45
|
+
*/
|
|
46
|
+
function getTemplatesDir() {
|
|
47
|
+
return path.resolve(__dirname, '..', 'templates');
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Validate that all required items exist in a template directory
|
|
51
|
+
*/
|
|
52
|
+
function validateTemplate(rule) {
|
|
53
|
+
const missing = [];
|
|
54
|
+
const baseDir = path.join(getTemplatesDir(), rule.dir);
|
|
55
|
+
for (const item of rule.required) {
|
|
56
|
+
const itemPath = path.join(baseDir, item);
|
|
57
|
+
if (!fs.existsSync(itemPath)) {
|
|
58
|
+
missing.push(item);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return missing;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Validate template directory structure
|
|
65
|
+
*/
|
|
66
|
+
async function validateTemplates() {
|
|
67
|
+
const templatesDir = getTemplatesDir();
|
|
68
|
+
console.log(chalk_1.default.cyan('\nValidating template directory structure...\n'));
|
|
69
|
+
if (!fs.existsSync(templatesDir)) {
|
|
70
|
+
console.error(chalk_1.default.red('Error:'), 'templates/ directory not found');
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
const rules = [
|
|
74
|
+
{
|
|
75
|
+
name: 'Global',
|
|
76
|
+
dir: 'global',
|
|
77
|
+
required: ['CLAUDE.md', 'settings.json', 'agents', 'skills'],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Project',
|
|
81
|
+
dir: 'project',
|
|
82
|
+
required: ['workflows'],
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
let hasErrors = false;
|
|
86
|
+
for (const rule of rules) {
|
|
87
|
+
const missing = validateTemplate(rule);
|
|
88
|
+
if (missing.length === 0) {
|
|
89
|
+
console.log(chalk_1.default.green(` [PASS] ${rule.name} template (templates/${rule.dir}/)`));
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
hasErrors = true;
|
|
93
|
+
console.log(chalk_1.default.red(` [FAIL] ${rule.name} template (templates/${rule.dir}/)`));
|
|
94
|
+
for (const item of missing) {
|
|
95
|
+
console.log(chalk_1.default.yellow(` - missing: ${item}`));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
console.log();
|
|
100
|
+
if (hasErrors) {
|
|
101
|
+
console.error(chalk_1.default.red('Validation failed: some required items are missing.'));
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
console.log(chalk_1.default.green('All templates are valid.'));
|
|
105
|
+
}
|
package/package.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
이 파일은 Claude Code의 작업 워크플로우와 규칙을 정의합니다.
|
|
4
4
|
|
|
5
|
-
## Context 절약 원칙 (최우선
|
|
5
|
+
## Context 절약 원칙 (최우선)
|
|
6
6
|
|
|
7
7
|
Main Agent의 Context Window는 제한적입니다.
|
|
8
|
-
**Subagent가 할 수 있는 작업은
|
|
8
|
+
**Subagent가 할 수 있는 작업은 Subagent에 위임하세요.**
|
|
9
9
|
|
|
10
|
-
### 필수 위임 작업 (
|
|
10
|
+
### 필수 위임 작업 (Subagent 전담)
|
|
11
11
|
|
|
12
12
|
| 작업 | Agent | 이유 |
|
|
13
13
|
|------|-------|------|
|
|
@@ -18,40 +18,45 @@ Main Agent의 Context Window는 제한적입니다.
|
|
|
18
18
|
| 영향 분석 | `impact-analyzer` | 분석 결과만 받음 |
|
|
19
19
|
| 코드 리뷰 | `code-reviewer` | 리뷰 결과만 받음 |
|
|
20
20
|
| 테스트/빌드 검증 | `qa-tester` | 검증 결과만 받음 |
|
|
21
|
-
| 단순 수정 (lint/build 오류, 오타, 설정값) | `simple-code-writer` | Main
|
|
21
|
+
| 단순 수정 (lint/build 오류, 오타, 설정값) | `simple-code-writer` | Main Context 보존 |
|
|
22
22
|
| 여러 파일 코드 작성 | `code-writer` | 구현 결과만 받음 |
|
|
23
23
|
| Git 작업 | `git-manager` | 커밋/PR 결과만 받음 |
|
|
24
24
|
| Context 문서 정리 | `context-manager` | 파일 분리, 토큰 최적화 |
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
<delegation_rules>
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
- Main Agent에서 직접 여러 파일 Read (2개 이상)
|
|
30
|
-
- Main Agent에서 복잡한 분석/계획 수행
|
|
31
|
-
- Main Agent에서 3개 이상 파일 수정
|
|
32
|
-
- **Main Agent에서 직접 Git 명령어 실행 (git add, commit, push 등)**
|
|
33
|
-
- **Main Agent에서 직접 코드 수정 (Edit/Write로 코드 파일 수정)**
|
|
28
|
+
### Subagent 전용 작업
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
| 작업 | 전담 Agent |
|
|
31
|
+
|------|-----------|
|
|
32
|
+
| 파일 탐색 (Glob/Grep) | explore Agent가 전담 |
|
|
33
|
+
| 2개 이상 파일 읽기 | explore/context-collector가 전담 |
|
|
34
|
+
| 복잡한 분석/계획 | task-planner에 위임 |
|
|
35
|
+
| 파일 수정 | code-writer가 전담 |
|
|
36
|
+
| Git 명령어 실행 (git add, commit, push 등) | git-manager에 위임 |
|
|
37
|
+
| 코드 수정 (Edit/Write) | code-writer/simple-code-writer에 위임 |
|
|
38
|
+
|
|
39
|
+
### Main Agent 전담 작업
|
|
36
40
|
|
|
37
41
|
- 사용자와 대화/질문 응답
|
|
38
42
|
- Task 흐름 관리 (TaskCreate, TaskUpdate, TaskList)
|
|
39
43
|
- Subagent 호출 및 결과 전달
|
|
40
|
-
- 단순 명령 실행 (Bash) -
|
|
44
|
+
- 단순 명령 실행 (Bash) - **Git/코드수정은 Subagent 전담**
|
|
45
|
+
|
|
46
|
+
</delegation_rules>
|
|
41
47
|
|
|
42
|
-
###
|
|
48
|
+
### 코드 수정 위임 규칙
|
|
43
49
|
|
|
44
|
-
|
|
45
|
-
모든 코드 수정은 Subagent에 위임하세요.
|
|
50
|
+
모든 코드 수정은 Subagent가 전담합니다.
|
|
46
51
|
|
|
47
52
|
| 수정 유형 | Agent | 모델 |
|
|
48
53
|
|----------|-------|------|
|
|
49
54
|
| lint/build 오류 수정, 오타, 설정값 변경 등 단순 수정 | `simple-code-writer` | haiku |
|
|
50
55
|
| 로직 작성, 기능 구현, 리팩토링 (파일 수 무관) | `code-writer` | opus |
|
|
51
56
|
|
|
52
|
-
### Git 작업은
|
|
57
|
+
### Git 작업은 Subagent 전담
|
|
53
58
|
|
|
54
|
-
**모든 Git 작업은 `git-manager` Agent에
|
|
59
|
+
**모든 Git 작업은 `git-manager` Agent에 위임하세요.**
|
|
55
60
|
|
|
56
61
|
```
|
|
57
62
|
Task(subagent_type="git-manager", prompt="현재 변경사항을 커밋해줘")
|
|
@@ -72,10 +77,14 @@ Task(subagent_type="git-manager", prompt="PR을 생성해줘")
|
|
|
72
77
|
| lint/build 오류, 오타, 설정값 등 단순 수정 | `simple-code-writer` Agent에 위임 |
|
|
73
78
|
| 로직 작성, 기능 구현, 리팩토링 | `code-writer` Agent에 위임 |
|
|
74
79
|
|
|
80
|
+
<workflow>
|
|
81
|
+
|
|
75
82
|
## 작업 워크플로우 (필수)
|
|
76
83
|
|
|
77
84
|
모든 코드 작업은 아래 순서를 따릅니다:
|
|
78
85
|
|
|
86
|
+
<phase name="계획">
|
|
87
|
+
|
|
79
88
|
### Phase 1: 계획 (Planning)
|
|
80
89
|
|
|
81
90
|
```
|
|
@@ -98,6 +107,10 @@ Task(subagent_type="git-manager", prompt="PR을 생성해줘")
|
|
|
98
107
|
4. 작성된 내용을 사용자에게 Confirm 받음 **필수**
|
|
99
108
|
```
|
|
100
109
|
|
|
110
|
+
</phase>
|
|
111
|
+
|
|
112
|
+
<phase name="검증">
|
|
113
|
+
|
|
101
114
|
### Phase 2: 검증 (Validation)
|
|
102
115
|
|
|
103
116
|
```
|
|
@@ -107,20 +120,28 @@ Task(subagent_type="git-manager", prompt="PR을 생성해줘")
|
|
|
107
120
|
- Breaking Change 여부 확인
|
|
108
121
|
```
|
|
109
122
|
|
|
123
|
+
</phase>
|
|
124
|
+
|
|
125
|
+
<phase name="구현">
|
|
126
|
+
|
|
110
127
|
### Phase 3: 구현 (Implementation)
|
|
111
128
|
|
|
112
129
|
```
|
|
113
130
|
5. 작은 단위로 코드 수정
|
|
114
131
|
- 독립적으로 빌드 가능한 단위로 작업
|
|
115
132
|
- 한 번에 하나의 기능/수정만 진행
|
|
116
|
-
- 빌드
|
|
133
|
+
- 빌드 가능 상태를 유지
|
|
117
134
|
|
|
118
135
|
6. 단위별 커밋
|
|
119
|
-
- 수정한 파일만
|
|
136
|
+
- 수정한 파일만 개별 지정하여 git add
|
|
120
137
|
- 명확한 커밋 메시지 작성
|
|
121
138
|
- 커밋 단위: 하나의 논리적 변경
|
|
122
139
|
```
|
|
123
140
|
|
|
141
|
+
</phase>
|
|
142
|
+
|
|
143
|
+
<phase name="리뷰">
|
|
144
|
+
|
|
124
145
|
### Phase 4: 리뷰 (Review)
|
|
125
146
|
|
|
126
147
|
```
|
|
@@ -131,9 +152,11 @@ Task(subagent_type="git-manager", prompt="PR을 생성해줘")
|
|
|
131
152
|
8. Task 완료 검증
|
|
132
153
|
- 원래 요청사항이 모두 충족되었는지 확인
|
|
133
154
|
- 예상한 동작이 구현되었는지 확인
|
|
134
|
-
-
|
|
155
|
+
- 모든 엣지케이스가 처리되었는지 점검
|
|
135
156
|
```
|
|
136
157
|
|
|
158
|
+
</phase>
|
|
159
|
+
|
|
137
160
|
### 워크플로우 요약
|
|
138
161
|
|
|
139
162
|
```
|
|
@@ -148,8 +171,12 @@ Task(subagent_type="git-manager", prompt="PR을 생성해줘")
|
|
|
148
171
|
└─────────────────────────────────────────────────────────────┘
|
|
149
172
|
```
|
|
150
173
|
|
|
174
|
+
</workflow>
|
|
175
|
+
|
|
151
176
|
## 문서 참조
|
|
152
177
|
|
|
178
|
+
<reference>
|
|
179
|
+
|
|
153
180
|
### Context (사실/배경) - "우리 프로젝트는 이렇다"
|
|
154
181
|
|
|
155
182
|
프로젝트별로 `.claude/context/` 에 작성
|
|
@@ -163,6 +190,8 @@ Task(subagent_type="git-manager", prompt="PR을 생성해줘")
|
|
|
163
190
|
| PR 리뷰 | `.claude/skills/Git/pr-review.md` |
|
|
164
191
|
| PR 피드백 적용 | `.claude/skills/Git/pr-apply.md` |
|
|
165
192
|
|
|
193
|
+
</reference>
|
|
194
|
+
|
|
166
195
|
---
|
|
167
196
|
|
|
168
197
|
## .claude 문서 작성 가이드
|
|
@@ -8,21 +8,25 @@ color: red
|
|
|
8
8
|
|
|
9
9
|
# Architect Agent
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
<role>
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
시스템 아키텍처 설계와 복잡한 디버깅을 담당하는 전문 Agent입니다.
|
|
14
14
|
|
|
15
15
|
1. **아키텍처 설계**: 새로운 기능/모듈의 구조 설계
|
|
16
16
|
2. **복잡한 디버깅**: 여러 레이어에 걸친 버그 추적
|
|
17
17
|
3. **기술 부채 분석**: 리팩토링 대상 식별 및 계획
|
|
18
18
|
4. **설계 검토**: 기존 설계의 문제점 분석 및 개선안 제시
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
</role>
|
|
21
|
+
|
|
22
|
+
<reference>
|
|
21
23
|
|
|
22
24
|
> **필수 참조**:
|
|
23
25
|
> - `.claude/context/architecture/` - 시스템 아키텍처
|
|
24
26
|
> - `.claude/context/` - 프로젝트 컨텍스트
|
|
25
27
|
|
|
28
|
+
</reference>
|
|
29
|
+
|
|
26
30
|
---
|
|
27
31
|
|
|
28
32
|
## 사용 시점
|
|
@@ -38,16 +42,18 @@ color: red
|
|
|
38
42
|
- DB 스키마 설계 검토
|
|
39
43
|
```
|
|
40
44
|
|
|
41
|
-
###
|
|
45
|
+
### 다른 Agent가 적합한 경우
|
|
42
46
|
|
|
43
47
|
```
|
|
44
|
-
- 단순 CRUD 구현
|
|
45
|
-
- UI 컴포넌트 설계
|
|
46
|
-
- 일반적인 코드 탐색
|
|
48
|
+
- 단순 CRUD 구현 → code-writer 사용
|
|
49
|
+
- UI 컴포넌트 설계 → designer 사용
|
|
50
|
+
- 일반적인 코드 탐색 → explore 사용
|
|
47
51
|
```
|
|
48
52
|
|
|
49
53
|
---
|
|
50
54
|
|
|
55
|
+
<instructions>
|
|
56
|
+
|
|
51
57
|
## 분석 프로세스
|
|
52
58
|
|
|
53
59
|
### Step 1: 현재 아키텍처 파악
|
|
@@ -77,9 +83,11 @@ color: red
|
|
|
77
83
|
4. 구현 로드맵 제시
|
|
78
84
|
```
|
|
79
85
|
|
|
86
|
+
</instructions>
|
|
87
|
+
|
|
80
88
|
---
|
|
81
89
|
|
|
82
|
-
|
|
90
|
+
<output_format>
|
|
83
91
|
|
|
84
92
|
### 아키텍처 분석
|
|
85
93
|
|
|
@@ -153,11 +161,15 @@ color: red
|
|
|
153
161
|
- ...
|
|
154
162
|
```
|
|
155
163
|
|
|
164
|
+
</output_format>
|
|
165
|
+
|
|
156
166
|
---
|
|
157
167
|
|
|
158
|
-
|
|
168
|
+
<constraints>
|
|
159
169
|
|
|
160
|
-
-
|
|
170
|
+
- **현재 필요한 만큼만 설계**: 미래 요구사항 예측보다 현재 문제 해결에 집중
|
|
161
171
|
- **기존 패턴 존중**: 프로젝트 컨벤션 따르기
|
|
162
|
-
- **점진적 개선**: 빅뱅 리팩토링보다
|
|
172
|
+
- **점진적 개선**: 빅뱅 리팩토링보다 단계별 개선 우선
|
|
163
173
|
- **근거 명시**: 모든 설계 결정에 이유 설명
|
|
174
|
+
|
|
175
|
+
</constraints>
|
|
@@ -8,24 +8,28 @@ color: yellow
|
|
|
8
8
|
|
|
9
9
|
# Code Reviewer Agent
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
<role>
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
작성된 코드가 프로젝트 규칙을 준수하는지 검토하는 전문 Agent입니다.
|
|
14
14
|
|
|
15
15
|
1. **규칙 준수 확인**: CLAUDE.md, 프로젝트 체크리스트 기준 검토
|
|
16
16
|
2. **코드 품질 검사**: 가독성, 유지보수성, 일관성
|
|
17
17
|
3. **Lint 실행**: lint 실행 및 결과 확인
|
|
18
18
|
4. **개선 제안**: 발견된 문제에 대한 수정 방안 제시
|
|
19
19
|
|
|
20
|
+
</role>
|
|
21
|
+
|
|
20
22
|
---
|
|
21
23
|
|
|
24
|
+
<instructions>
|
|
25
|
+
|
|
22
26
|
## 검토 프로세스
|
|
23
27
|
|
|
24
28
|
### Step 1: 공통 체크리스트
|
|
25
29
|
|
|
26
30
|
| 항목 | 확인 |
|
|
27
31
|
|------|------|
|
|
28
|
-
|
|
|
32
|
+
| 의미 있는 변수명 사용 | ☐ |
|
|
29
33
|
| 함수형 메서드 사용 (map, filter, reduce) | ☐ |
|
|
30
34
|
| 타입 안전성 (any 최소화) | ☐ |
|
|
31
35
|
| 에러 핸들링 적절함 | ☐ |
|
|
@@ -45,6 +49,8 @@ npm run lint
|
|
|
45
49
|
yarn lint
|
|
46
50
|
```
|
|
47
51
|
|
|
52
|
+
</instructions>
|
|
53
|
+
|
|
48
54
|
---
|
|
49
55
|
|
|
50
56
|
## 문제 분류
|
|
@@ -59,7 +65,7 @@ yarn lint
|
|
|
59
65
|
|
|
60
66
|
---
|
|
61
67
|
|
|
62
|
-
|
|
68
|
+
<output_format>
|
|
63
69
|
|
|
64
70
|
```markdown
|
|
65
71
|
# Code Review 결과
|
|
@@ -107,10 +113,14 @@ yarn lint
|
|
|
107
113
|
- 이슈 없음: 최종 검증 진행
|
|
108
114
|
```
|
|
109
115
|
|
|
116
|
+
</output_format>
|
|
117
|
+
|
|
110
118
|
---
|
|
111
119
|
|
|
112
|
-
|
|
120
|
+
<constraints>
|
|
113
121
|
|
|
114
|
-
-
|
|
115
|
-
- **대안 제시 필수**:
|
|
122
|
+
- **실제 문제만 지적**: 코드에 실질적 영향이 있는 부분만 리뷰
|
|
123
|
+
- **대안 제시 필수**: 문제 지적 시 해결책도 함께 제시
|
|
116
124
|
- **컨텍스트 고려**: 프로젝트 상황에 맞게 유연하게 판단
|
|
125
|
+
|
|
126
|
+
</constraints>
|