aiwf 0.3.21 → 0.3.23
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/package.json +3 -2
- package/src/cli/index.js +39 -336
- package/src/lib/installer.js +310 -90
- package/src/utils/messages.js +24 -0
- package/src/DEPENDENCY_MAP.md +0 -90
- package/src/cli/cache-cli.js +0 -459
- package/src/cli/checkpoint-cli.js +0 -417
- package/src/cli/language-cli.js +0 -286
- package/src/cli/sprint-cli.js +0 -287
- package/src/commands/ai-tool.js +0 -383
- package/src/commands/compress.js +0 -60
- package/src/commands/create-project.js +0 -160
- package/src/commands/evaluate.js +0 -459
- package/src/commands/persona.js +0 -309
- package/src/commands/sprint-task.js +0 -262
- package/src/commands/token.js +0 -312
- package/src/lib/ai-persona-manager.js +0 -711
- package/src/lib/cache-system.js +0 -332
- package/src/lib/context-engine.js +0 -568
- package/src/lib/github-integration.js +0 -402
- package/src/lib/memory-profiler.js +0 -471
- package/src/lib/metrics-collector.js +0 -885
- package/src/lib/offline-detector.js +0 -386
- package/src/lib/resource-loader-enhanced.js +0 -399
- package/src/lib/resource-loader.js +0 -250
- package/src/lib/resources/commands/ai-persona.js +0 -602
- package/src/lib/resources/commands/compress-context.js +0 -389
- package/src/lib/resources/commands/evaluate.js +0 -246
- package/src/lib/resources/commands/persona-context-apply.js +0 -562
- package/src/lib/resources/commands/token-tracking.js +0 -443
- package/src/lib/resources/config/commit-patterns.js +0 -103
- package/src/lib/resources/config/language.json +0 -6
- package/src/lib/resources/personas/PERSONA_INDEX.md +0 -57
- package/src/lib/resources/personas/analyst.json +0 -44
- package/src/lib/resources/personas/architect/best_practices.md +0 -136
- package/src/lib/resources/personas/architect/knowledge_base.md +0 -377
- package/src/lib/resources/personas/architect.json +0 -44
- package/src/lib/resources/personas/backend/best_practices.md +0 -766
- package/src/lib/resources/personas/backend/knowledge_base.md +0 -1070
- package/src/lib/resources/personas/data_analyst/best_practices.md +0 -594
- package/src/lib/resources/personas/data_analyst/knowledge_base.md +0 -1057
- package/src/lib/resources/personas/developer.json +0 -44
- package/src/lib/resources/personas/developer.md +0 -37
- package/src/lib/resources/personas/evaluation_criteria.json +0 -137
- package/src/lib/resources/personas/frontend/best_practices.md +0 -445
- package/src/lib/resources/personas/frontend/knowledge_base.md +0 -729
- package/src/lib/resources/personas/persona-index.json +0 -31
- package/src/lib/resources/personas/reviewer.json +0 -44
- package/src/lib/resources/personas/security/best_practices.md +0 -307
- package/src/lib/resources/personas/security/knowledge_base.md +0 -498
- package/src/lib/resources/personas/tester.json +0 -44
- package/src/lib/resources/templates/README.md +0 -78
- package/src/lib/resources/templates/api-server/config.json +0 -64
- package/src/lib/resources/templates/api-server/template/.aiwf/config.json +0 -56
- package/src/lib/resources/templates/api-server/template/.aiwf/feature-ledger.json +0 -42
- package/src/lib/resources/templates/api-server/template/.aiwf/personas/backend-engineer.json +0 -40
- package/src/lib/resources/templates/api-server/template/.aiwf/scripts/cli.js +0 -111
- package/src/lib/resources/templates/api-server/template/.env.example +0 -29
- package/src/lib/resources/templates/api-server/template/.eslintrc.json +0 -23
- package/src/lib/resources/templates/api-server/template/README.md +0 -171
- package/src/lib/resources/templates/api-server/template/jest.config.js +0 -26
- package/src/lib/resources/templates/api-server/template/nodemon.json +0 -9
- package/src/lib/resources/templates/api-server/template/package.json +0 -61
- package/src/lib/resources/templates/api-server/template/src/app.ts +0 -60
- package/src/lib/resources/templates/api-server/template/src/config/swagger.ts +0 -38
- package/src/lib/resources/templates/api-server/template/src/controllers/aiwfController.ts +0 -54
- package/src/lib/resources/templates/api-server/template/src/controllers/authController.ts +0 -128
- package/src/lib/resources/templates/api-server/template/src/controllers/statusController.ts +0 -28
- package/src/lib/resources/templates/api-server/template/src/index.ts +0 -28
- package/src/lib/resources/templates/api-server/template/src/middleware/aiwfMiddleware.ts +0 -50
- package/src/lib/resources/templates/api-server/template/src/middleware/authMiddleware.ts +0 -41
- package/src/lib/resources/templates/api-server/template/src/middleware/errorHandler.ts +0 -42
- package/src/lib/resources/templates/api-server/template/src/middleware/notFoundHandler.ts +0 -14
- package/src/lib/resources/templates/api-server/template/src/middleware/requestLogger.ts +0 -20
- package/src/lib/resources/templates/api-server/template/src/routes/aiwf.ts +0 -31
- package/src/lib/resources/templates/api-server/template/src/routes/index.ts +0 -13
- package/src/lib/resources/templates/api-server/template/src/routes/v1/index.ts +0 -67
- package/src/lib/resources/templates/api-server/template/src/utils/logger.ts +0 -37
- package/src/lib/resources/templates/api-server/template/tests/app.test.ts +0 -40
- package/src/lib/resources/templates/api-server/template/tsconfig.json +0 -43
- package/src/lib/resources/templates/npm-library/config.json +0 -61
- package/src/lib/resources/templates/npm-library/template/LICENSE +0 -21
- package/src/lib/resources/templates/npm-library/template/README.md +0 -201
- package/src/lib/resources/templates/npm-library/template/package.json +0 -78
- package/src/lib/resources/templates/web-app/config.json +0 -53
- package/src/lib/resources/templates/web-app/template/.aiwf/config.json +0 -54
- package/src/lib/resources/templates/web-app/template/.aiwf/feature-ledger.json +0 -37
- package/src/lib/resources/templates/web-app/template/.aiwf/personas/fullstack-developer.json +0 -40
- package/src/lib/resources/templates/web-app/template/.aiwf/scripts/cli.js +0 -110
- package/src/lib/resources/templates/web-app/template/.eslintrc.cjs +0 -20
- package/src/lib/resources/templates/web-app/template/README.md +0 -151
- package/src/lib/resources/templates/web-app/template/index.html +0 -14
- package/src/lib/resources/templates/web-app/template/package.json +0 -44
- package/src/lib/resources/templates/web-app/template/postcss.config.js +0 -6
- package/src/lib/resources/templates/web-app/template/public/vite.svg +0 -1
- package/src/lib/resources/templates/web-app/template/src/App.tsx +0 -21
- package/src/lib/resources/templates/web-app/template/src/components/Layout.tsx +0 -57
- package/src/lib/resources/templates/web-app/template/src/components/aiwf/ContextStatus.tsx +0 -107
- package/src/lib/resources/templates/web-app/template/src/components/aiwf/TokenUsage.tsx +0 -71
- package/src/lib/resources/templates/web-app/template/src/index.css +0 -60
- package/src/lib/resources/templates/web-app/template/src/main.tsx +0 -10
- package/src/lib/resources/templates/web-app/template/src/pages/AiwfDashboard.tsx +0 -57
- package/src/lib/resources/templates/web-app/template/src/pages/HomePage.tsx +0 -89
- package/src/lib/resources/templates/web-app/template/src/pages/NotFound.tsx +0 -25
- package/src/lib/resources/templates/web-app/template/src/stores/aiwfStore.ts +0 -126
- package/src/lib/resources/templates/web-app/template/src/types/global.d.ts +0 -9
- package/src/lib/resources/templates/web-app/template/src/vite-env.d.ts +0 -1
- package/src/lib/resources/templates/web-app/template/tailwind.config.js +0 -30
- package/src/lib/resources/templates/web-app/template/tsconfig.json +0 -37
- package/src/lib/resources/templates/web-app/template/tsconfig.node.json +0 -10
- package/src/lib/resources/templates/web-app/template/vite.config.ts +0 -23
- package/src/lib/resources/utils/background-monitor.js +0 -223
- package/src/lib/resources/utils/compression-metrics.js +0 -1031
- package/src/lib/resources/utils/compression-strategies.js +0 -557
- package/src/lib/resources/utils/content-normalizer.js +0 -455
- package/src/lib/resources/utils/context-compressor.js +0 -583
- package/src/lib/resources/utils/context-rule-parser.js +0 -180
- package/src/lib/resources/utils/context-token-monitor.js +0 -463
- package/src/lib/resources/utils/context-update-manager.js +0 -502
- package/src/lib/resources/utils/git-utils.js +0 -220
- package/src/lib/resources/utils/importance-classifier.js +0 -645
- package/src/lib/resources/utils/information-filter.js +0 -710
- package/src/lib/resources/utils/persona-aware-compressor.js +0 -598
- package/src/lib/resources/utils/prompt-injector.js +0 -242
- package/src/lib/resources/utils/simplified-evaluator.js +0 -119
- package/src/lib/resources/utils/text-summarizer.js +0 -492
- package/src/lib/resources/utils/token-counter.js +0 -177
- package/src/lib/resources/utils/token-monitor.js +0 -484
- package/src/lib/resources/utils/token-reporter.js +0 -452
- package/src/lib/resources/utils/token-storage.js +0 -433
- package/src/lib/resources/utils/token-tracker.js +0 -283
- package/src/lib/state/priority-calculator.js +0 -217
- package/src/lib/state/state-index.js +0 -155
- package/src/lib/state/task-scanner.js +0 -328
- package/src/lib/task-analyzer.js +0 -599
- package/src/lib/template-cache-system.js +0 -559
- package/src/lib/template-downloader.js +0 -467
- package/src/lib/template-version-manager.js +0 -491
- package/src/lib/token-optimizer.js +0 -517
- package/src/utils/engineering-guard.js +0 -399
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiwf",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
4
4
|
"description": "AI Workflow Framework for Claude Code with multi-language support (Korean/English)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -77,7 +77,8 @@
|
|
|
77
77
|
"table": "^6.8.1",
|
|
78
78
|
"tar": "^6.2.1",
|
|
79
79
|
"tiktoken": "^1.0.21",
|
|
80
|
-
"yaml": "^2.3.4"
|
|
80
|
+
"yaml": "^2.3.4",
|
|
81
|
+
"figlet": "^1.7.0"
|
|
81
82
|
},
|
|
82
83
|
"devDependencies": {
|
|
83
84
|
"jest": "^30.0.3"
|
package/src/cli/index.js
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { program } from 'commander';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
|
+
import figlet from 'figlet';
|
|
5
6
|
import { installAIWF } from '../lib/installer.js';
|
|
6
|
-
import AIToolCommand from '../commands/ai-tool.js';
|
|
7
|
-
import { addTaskToSprint } from '../commands/sprint-task.js';
|
|
8
7
|
import StateCommand from '../commands/state.js';
|
|
9
|
-
import { createIndependentSprint } from '../commands/sprint-independent.js';
|
|
10
8
|
import { createYoloConfig, createInteractiveYoloConfig, showYoloConfig } from '../commands/yolo-config.js';
|
|
11
9
|
|
|
12
10
|
// Parse version from package.json
|
|
@@ -29,78 +27,35 @@ program
|
|
|
29
27
|
.command('install')
|
|
30
28
|
.description('Install AIWF framework')
|
|
31
29
|
.option('-f, --force', 'Force complete reinstall without prompts')
|
|
32
|
-
.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.
|
|
37
|
-
.
|
|
38
|
-
.action(
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
lang
|
|
53
|
-
.command('status')
|
|
54
|
-
.alias('s')
|
|
55
|
-
.description('Show current language configuration / 현재 언어 설정 표시')
|
|
56
|
-
.action(async () => {
|
|
57
|
-
const { showLanguageStatus } = await import('./language-cli.js');
|
|
58
|
-
await showLanguageStatus();
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
lang
|
|
62
|
-
.command('set [language]')
|
|
63
|
-
.alias('switch')
|
|
64
|
-
.description('Set or change language / 언어 설정 또는 변경')
|
|
65
|
-
.option('-a, --auto-detect [boolean]', 'Enable/disable auto detection / 자동 감지 활성화/비활성화')
|
|
66
|
-
.action(async (language, options) => {
|
|
67
|
-
const { setLanguage } = await import('./language-cli.js');
|
|
68
|
-
await setLanguage(language, options);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
lang
|
|
72
|
-
.command('reset')
|
|
73
|
-
.alias('r')
|
|
74
|
-
.description('Reset language configuration to auto-detection / 언어 설정을 자동 감지로 초기화')
|
|
75
|
-
.action(async () => {
|
|
76
|
-
const { resetLanguage } = await import('./language-cli.js');
|
|
77
|
-
await resetLanguage();
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// (removed) persona command group
|
|
81
|
-
|
|
82
|
-
// Sprint task management command
|
|
83
|
-
program
|
|
84
|
-
.command('sprint-task <sprintId> <taskTitle>')
|
|
85
|
-
.alias('st')
|
|
86
|
-
.description('Add a task to an existing sprint / 스프린트에 태스크 추가')
|
|
87
|
-
.action(async (sprintId, taskTitle) => {
|
|
88
|
-
try {
|
|
89
|
-
await addTaskToSprint(sprintId, taskTitle);
|
|
90
|
-
} catch (error) {
|
|
91
|
-
console.error(chalk.red(`오류: ${error.message}`));
|
|
92
|
-
process.exit(1);
|
|
30
|
+
.option('--docs-only', 'Install AIWF documentation folder only')
|
|
31
|
+
.option('--claude-only', 'Install Claude Code commands and agents only')
|
|
32
|
+
.option('--windsurf-only', 'Install Windsurf rules only')
|
|
33
|
+
.option('--cursor-only', 'Install Cursor rules only')
|
|
34
|
+
.option('--all', 'Install all components (default behavior)')
|
|
35
|
+
.option('--interactive', 'Interactive installation with option selection')
|
|
36
|
+
.action((options) => {
|
|
37
|
+
// Convert CLI options to selectedOptions array
|
|
38
|
+
const selectedOptions = [];
|
|
39
|
+
|
|
40
|
+
if (options.docsOnly) {
|
|
41
|
+
selectedOptions.push('aiwf-docs');
|
|
42
|
+
} else if (options.claudeOnly) {
|
|
43
|
+
selectedOptions.push('claude-code-commands');
|
|
44
|
+
} else if (options.windsurfOnly) {
|
|
45
|
+
selectedOptions.push('windsurf-rules');
|
|
46
|
+
} else if (options.cursorOnly) {
|
|
47
|
+
selectedOptions.push('cursor-rules');
|
|
48
|
+
} else if (options.all) {
|
|
49
|
+
selectedOptions.push('aiwf-docs', 'claude-code-commands', 'windsurf-rules', 'cursor-rules');
|
|
93
50
|
}
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// (removed) create-project command
|
|
97
51
|
|
|
98
|
-
//
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
52
|
+
// Pass selected options to installer
|
|
53
|
+
installAIWF({
|
|
54
|
+
...options,
|
|
55
|
+
debugLog: true,
|
|
56
|
+
preselectedOptions: selectedOptions.length > 0 ? selectedOptions : null
|
|
57
|
+
});
|
|
58
|
+
});
|
|
104
59
|
|
|
105
60
|
// State management commands
|
|
106
61
|
const state = program.command('state');
|
|
@@ -159,55 +114,6 @@ state
|
|
|
159
114
|
await stateCmd.execute(['next']);
|
|
160
115
|
});
|
|
161
116
|
|
|
162
|
-
// Sprint management commands (YOLO focused)
|
|
163
|
-
const sprint = program.command('sprint');
|
|
164
|
-
sprint.description('Independent sprint management / 독립 스프린트 관리');
|
|
165
|
-
|
|
166
|
-
sprint
|
|
167
|
-
.command('independent [name]')
|
|
168
|
-
.alias('ind')
|
|
169
|
-
.description('Create independent sprint / 독립 스프린트 생성')
|
|
170
|
-
.option('--from-readme', 'Extract from README TODOs / README TODO에서 추출')
|
|
171
|
-
.option('--from-issue <number>', 'Create from GitHub issue / GitHub 이슈에서 생성')
|
|
172
|
-
.option('--minimal', 'Minimal engineering level / 최소 엔지니어링 레벨')
|
|
173
|
-
.option('--balanced', 'Balanced engineering level / 균형 엔지니어링 레벨')
|
|
174
|
-
.option('--complete', 'Complete engineering level / 완전 엔지니어링 레벨')
|
|
175
|
-
.option('--description <desc>', 'Sprint description / 스프린트 설명')
|
|
176
|
-
.action(async (name, options) => {
|
|
177
|
-
try {
|
|
178
|
-
console.log(chalk.blue('🚀 독립 스프린트 생성 중...'));
|
|
179
|
-
|
|
180
|
-
// 엔지니어링 레벨 결정
|
|
181
|
-
let engineeringLevel = 'minimal';
|
|
182
|
-
if (options.balanced) engineeringLevel = 'balanced';
|
|
183
|
-
else if (options.complete) engineeringLevel = 'complete';
|
|
184
|
-
|
|
185
|
-
const sprintOptions = {
|
|
186
|
-
name,
|
|
187
|
-
description: options.description,
|
|
188
|
-
engineeringLevel,
|
|
189
|
-
fromReadme: options.fromReadme,
|
|
190
|
-
fromIssue: options.fromIssue,
|
|
191
|
-
minimal: engineeringLevel === 'minimal'
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
const result = await createIndependentSprint(sprintOptions);
|
|
195
|
-
|
|
196
|
-
if (result.success) {
|
|
197
|
-
console.log('');
|
|
198
|
-
console.log(chalk.green('✅ 독립 스프린트 생성 완료!'));
|
|
199
|
-
console.log(` 스프린트 ID: ${chalk.cyan(result.sprintId)}`);
|
|
200
|
-
console.log(` 태스크 수: ${chalk.blue(result.tasks)}개`);
|
|
201
|
-
console.log('');
|
|
202
|
-
console.log(chalk.bold('🚀 다음 단계:'));
|
|
203
|
-
console.log(` Claude Code에서 ${chalk.cyan(`/project:aiwf:yolo ${result.sprintId}`)} 실행`);
|
|
204
|
-
}
|
|
205
|
-
} catch (error) {
|
|
206
|
-
console.error(chalk.red('❌ 독립 스프린트 생성 실패:'), error.message);
|
|
207
|
-
process.exit(1);
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
|
|
211
117
|
// YOLO configuration commands
|
|
212
118
|
const yoloConfig = program.command('yolo-config');
|
|
213
119
|
yoloConfig.description('YOLO configuration management / YOLO 설정 관리');
|
|
@@ -260,222 +166,19 @@ yoloConfig
|
|
|
260
166
|
}
|
|
261
167
|
});
|
|
262
168
|
|
|
263
|
-
// (removed) checkpoint command group
|
|
264
|
-
|
|
265
|
-
// Engineering Guard commands (오버엔지니어링 방지)
|
|
266
|
-
const guard = program.command('guard');
|
|
267
|
-
guard.description('Engineering guard for overengineering prevention / 오버엔지니어링 방지 가드');
|
|
268
169
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
// 설정 파일 로드
|
|
279
|
-
await guard.loadConfig(options.config);
|
|
280
|
-
|
|
281
|
-
const checkPath = targetPath || process.cwd();
|
|
282
|
-
console.log(chalk.blue(`🔍 복잡도 검사 중: ${checkPath}`));
|
|
283
|
-
console.log('');
|
|
284
|
-
|
|
285
|
-
const report = await guard.checkProject(checkPath);
|
|
286
|
-
|
|
287
|
-
// 결과 출력
|
|
288
|
-
console.log(chalk.bold('📊 복잡도 분석 결과:'));
|
|
289
|
-
console.log(` 총 위반사항: ${chalk.yellow(report.summary.total_violations)}`);
|
|
290
|
-
console.log(` 높은 심각도: ${chalk.red(report.summary.high_severity)}`);
|
|
291
|
-
console.log(` 중간 심각도: ${chalk.yellow(report.summary.medium_severity)}`);
|
|
292
|
-
console.log(` 경고사항: ${chalk.blue(report.summary.warnings)}`);
|
|
293
|
-
console.log('');
|
|
294
|
-
|
|
295
|
-
if (report.violations && report.violations.length > 0) {
|
|
296
|
-
console.log(chalk.bold('🚨 위반사항:'));
|
|
297
|
-
for (const violation of report.violations.slice(0, 10)) {
|
|
298
|
-
const icon = violation.severity === 'high' ? '❌' :
|
|
299
|
-
violation.severity === 'medium' ? '⚠️' : '💡';
|
|
300
|
-
console.log(` ${icon} ${chalk.cyan(violation.type)}: ${violation.file || violation.message}`);
|
|
301
|
-
if (violation.details) {
|
|
302
|
-
console.log(` ${chalk.gray(violation.details)}`);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
console.log('');
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
if (report.recommendations && report.recommendations.length > 0) {
|
|
309
|
-
console.log(chalk.bold('💡 권장사항:'));
|
|
310
|
-
for (const rec of report.recommendations) {
|
|
311
|
-
console.log(` • ${chalk.green(rec)}`);
|
|
312
|
-
}
|
|
313
|
-
console.log('');
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// 통과/실패 판정
|
|
317
|
-
if (report.passed) {
|
|
318
|
-
console.log(chalk.green('✅ 복잡도 기준 통과'));
|
|
319
|
-
} else {
|
|
320
|
-
console.log(chalk.red('❌ 복잡도 기준 초과 - 리팩토링 필요'));
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
} catch (error) {
|
|
324
|
-
console.error(chalk.red('❌ 복잡도 검사 실패:'), error.message);
|
|
325
|
-
process.exit(1);
|
|
326
|
-
}
|
|
327
|
-
});
|
|
170
|
+
// Display ASCII art logo
|
|
171
|
+
const aiwfLogo = figlet.textSync('AIWF', {
|
|
172
|
+
font: 'ANSI Shadow',
|
|
173
|
+
horizontalLayout: 'default',
|
|
174
|
+
verticalLayout: 'default',
|
|
175
|
+
width: 80,
|
|
176
|
+
whitespaceBreak: true
|
|
177
|
+
});
|
|
328
178
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
.action(async (targetPath) => {
|
|
333
|
-
try {
|
|
334
|
-
const { quickCheck } = await import('../utils/engineering-guard.js');
|
|
335
|
-
|
|
336
|
-
const checkPath = targetPath || process.cwd();
|
|
337
|
-
console.log(chalk.blue(`⚡ 빠른 복잡도 체크: ${checkPath}`));
|
|
338
|
-
|
|
339
|
-
const report = await quickCheck(checkPath);
|
|
340
|
-
|
|
341
|
-
if (report.summary.high_severity > 0) {
|
|
342
|
-
console.log(chalk.red('⚠️ 오버엔지니어링 위험 감지!'));
|
|
343
|
-
console.log('권장사항:', report.recommendations.join(', '));
|
|
344
|
-
} else {
|
|
345
|
-
console.log(chalk.green('✅ 복잡도 양호'));
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
} catch (error) {
|
|
349
|
-
console.error(chalk.red('❌ 빠른 체크 실패:'), error.message);
|
|
350
|
-
process.exit(1);
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
|
|
354
|
-
guard
|
|
355
|
-
.command('init')
|
|
356
|
-
.description('Initialize YOLO config with guard settings / YOLO 설정 초기화')
|
|
357
|
-
.action(async () => {
|
|
358
|
-
try {
|
|
359
|
-
const fs = await import('fs/promises');
|
|
360
|
-
const path = await import('path');
|
|
361
|
-
const yaml = await import('js-yaml');
|
|
362
|
-
|
|
363
|
-
const configPath = path.join(process.cwd(), '.aiwf', 'yolo-config.yaml');
|
|
364
|
-
|
|
365
|
-
// 기본 설정 생성
|
|
366
|
-
const defaultConfig = {
|
|
367
|
-
engineering_level: 'minimal',
|
|
368
|
-
focus_rules: ['requirement_first', 'simple_solution', 'no_gold_plating', 'stay_on_track'],
|
|
369
|
-
overengineering_prevention: {
|
|
370
|
-
max_file_lines: 300,
|
|
371
|
-
max_function_lines: 50,
|
|
372
|
-
max_nesting_depth: 4,
|
|
373
|
-
max_abstraction_layers: 3,
|
|
374
|
-
limit_design_patterns: true,
|
|
375
|
-
no_future_proofing: true,
|
|
376
|
-
enforce_yagni: true
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
// .aiwf 디렉토리 생성
|
|
381
|
-
await fs.mkdir(path.dirname(configPath), { recursive: true });
|
|
382
|
-
|
|
383
|
-
// 설정 파일 쓰기
|
|
384
|
-
await fs.writeFile(configPath, yaml.dump(defaultConfig), 'utf-8');
|
|
385
|
-
|
|
386
|
-
console.log(chalk.green('✅ YOLO 설정 파일 생성 완료!'));
|
|
387
|
-
console.log(` 경로: ${chalk.cyan(configPath)}`);
|
|
388
|
-
console.log('');
|
|
389
|
-
console.log(chalk.bold('🛡️ 오버엔지니어링 방지 설정:'));
|
|
390
|
-
console.log(` 파일 크기 제한: ${chalk.yellow('300')}줄`);
|
|
391
|
-
console.log(` 함수 크기 제한: ${chalk.yellow('50')}줄`);
|
|
392
|
-
console.log(` 중첩 깊이 제한: ${chalk.yellow('4')}레벨`);
|
|
393
|
-
console.log(` YAGNI 원칙: ${chalk.green('적용')}`);
|
|
394
|
-
|
|
395
|
-
} catch (error) {
|
|
396
|
-
console.error(chalk.red('❌ 설정 초기화 실패:'), error.message);
|
|
397
|
-
process.exit(1);
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
|
|
401
|
-
guard
|
|
402
|
-
.command('feedback [area]')
|
|
403
|
-
.description('Get engineering feedback for area / 특정 영역 피드백 받기')
|
|
404
|
-
.action(async (area) => {
|
|
405
|
-
try {
|
|
406
|
-
const { EngineeringGuard } = await import('../utils/engineering-guard.js');
|
|
407
|
-
const guard = new EngineeringGuard();
|
|
408
|
-
|
|
409
|
-
// 설정 파일 로드 시도
|
|
410
|
-
await guard.loadConfig('.aiwf/yolo-config.yaml');
|
|
411
|
-
|
|
412
|
-
const targetArea = area || 'current_task_area';
|
|
413
|
-
console.log(chalk.blue(`💡 엔지니어링 피드백 제공: ${targetArea}`));
|
|
414
|
-
console.log('');
|
|
415
|
-
|
|
416
|
-
const feedback = await guard.provideFeedback(targetArea);
|
|
417
|
-
|
|
418
|
-
if (feedback && feedback.length > 0) {
|
|
419
|
-
for (const item of feedback) {
|
|
420
|
-
const icon = item.level === 'error' ? '❌' :
|
|
421
|
-
item.level === 'warning' ? '⚠️' : '💡';
|
|
422
|
-
console.log(`${icon} ${item.message}`);
|
|
423
|
-
}
|
|
424
|
-
} else {
|
|
425
|
-
console.log(chalk.green('✅ 현재 영역은 복잡도 기준을 만족합니다.'));
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
} catch (error) {
|
|
429
|
-
console.error(chalk.red('❌ 피드백 생성 실패:'), error.message);
|
|
430
|
-
process.exit(1);
|
|
431
|
-
}
|
|
432
|
-
});
|
|
433
|
-
|
|
434
|
-
// GitHub integration commands
|
|
435
|
-
const github = program.command('github');
|
|
436
|
-
github.description('GitHub integration / GitHub 통합');
|
|
437
|
-
|
|
438
|
-
github
|
|
439
|
-
.command('issue <task-id>')
|
|
440
|
-
.description('Create GitHub issue from task / 태스크에서 GitHub 이슈 생성')
|
|
441
|
-
.action(async (taskId) => {
|
|
442
|
-
try {
|
|
443
|
-
const { GitHubIntegration } = await import('../lib/github-integration.js');
|
|
444
|
-
const ghIntegration = new GitHubIntegration();
|
|
445
|
-
await ghIntegration.createIssue(taskId);
|
|
446
|
-
} catch (error) {
|
|
447
|
-
console.error(chalk.red(`GitHub issue creation failed: ${error.message}`));
|
|
448
|
-
process.exit(1);
|
|
449
|
-
}
|
|
450
|
-
});
|
|
451
|
-
|
|
452
|
-
github
|
|
453
|
-
.command('pr [task-id]')
|
|
454
|
-
.description('Create pull request for completed task / 완료된 태스크로 PR 생성')
|
|
455
|
-
.action(async (taskId) => {
|
|
456
|
-
try {
|
|
457
|
-
const { GitHubIntegration } = await import('../lib/github-integration.js');
|
|
458
|
-
const ghIntegration = new GitHubIntegration();
|
|
459
|
-
await ghIntegration.createPullRequest(taskId);
|
|
460
|
-
} catch (error) {
|
|
461
|
-
console.error(chalk.red(`Pull request creation failed: ${error.message}`));
|
|
462
|
-
process.exit(1);
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
|
|
466
|
-
github
|
|
467
|
-
.command('sync')
|
|
468
|
-
.description('Sync GitHub issues with AIWF tasks / GitHub 이슈와 AIWF 태스크 동기화')
|
|
469
|
-
.action(async () => {
|
|
470
|
-
try {
|
|
471
|
-
const { GitHubIntegration } = await import('../lib/github-integration.js');
|
|
472
|
-
const ghIntegration = new GitHubIntegration();
|
|
473
|
-
await ghIntegration.syncIssues();
|
|
474
|
-
} catch (error) {
|
|
475
|
-
console.error(chalk.red(`GitHub sync failed: ${error.message}`));
|
|
476
|
-
process.exit(1);
|
|
477
|
-
}
|
|
478
|
-
});
|
|
179
|
+
console.log(chalk.magentaBright(aiwfLogo));
|
|
180
|
+
console.log(chalk.cyanBright.bold('AI Workflow Framework'));
|
|
181
|
+
console.log();
|
|
479
182
|
|
|
480
183
|
// Parse command line arguments
|
|
481
184
|
program.parse(process.argv);
|