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/src/lib/installer.js
CHANGED
|
@@ -504,6 +504,22 @@ async function updateCommands(languagePath, spinner, msg, debugLog) {
|
|
|
504
504
|
} catch (error) {
|
|
505
505
|
logWithSpinner(spinner, 'Agents not found or failed to download', debugLog);
|
|
506
506
|
}
|
|
507
|
+
|
|
508
|
+
// Download full .claude directory to include tools, workflow, and any other subfolders
|
|
509
|
+
logWithSpinner(spinner, 'Downloading full .claude directory (tools, workflow, etc.)...', debugLog);
|
|
510
|
+
try {
|
|
511
|
+
await downloadDirectory(
|
|
512
|
+
`${GITHUB_CONTENT_PREFIX}/${languagePath}/.claude`,
|
|
513
|
+
'.claude',
|
|
514
|
+
spinner,
|
|
515
|
+
msg,
|
|
516
|
+
languagePath,
|
|
517
|
+
true // ์ ์ฒด .claude ํด๋ ๋์ ๋ค์ด๋ก๋
|
|
518
|
+
);
|
|
519
|
+
logWithSpinner(spinner, 'Successfully downloaded .claude directory', debugLog);
|
|
520
|
+
} catch (error) {
|
|
521
|
+
logWithSpinner(spinner, `Failed to download full .claude directory: ${error.message}`, debugLog);
|
|
522
|
+
}
|
|
507
523
|
}
|
|
508
524
|
|
|
509
525
|
/**
|
|
@@ -877,6 +893,221 @@ async function offerReinstallationOptions(validationResults, language) {
|
|
|
877
893
|
return response.action;
|
|
878
894
|
}
|
|
879
895
|
|
|
896
|
+
/**
|
|
897
|
+
* ์ฌ์ฉ์ ์ค์น ์ต์
์ ํ
|
|
898
|
+
* @param {Object} msg - ์ง์ญํ๋ ๋ฉ์์ง
|
|
899
|
+
* @returns {Promise<Array>} ์ ํ๋ ์ค์น ์ต์
๋ชฉ๋ก
|
|
900
|
+
*/
|
|
901
|
+
async function selectInstallationOptions(msg) {
|
|
902
|
+
console.log(chalk.cyan(`\n${msg.installationOptions}`));
|
|
903
|
+
|
|
904
|
+
const installOptions = [
|
|
905
|
+
{
|
|
906
|
+
title: msg.aiwfDocs,
|
|
907
|
+
value: 'aiwf-docs',
|
|
908
|
+
description: 'AIWF ๋ฌธ์ ํด๋'
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
title: msg.claudeCodeCommands,
|
|
912
|
+
value: 'claude-code-commands',
|
|
913
|
+
description: 'Claude Code ๋ช
๋ น์ด ๋ฐ ์์ด์ ํธ'
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
title: msg.windsurfRules,
|
|
917
|
+
value: 'windsurf-rules',
|
|
918
|
+
description: 'Windsurf ๊ท์น ํ์ผ'
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
title: msg.cursorRules,
|
|
922
|
+
value: 'cursor-rules',
|
|
923
|
+
description: 'Cursor ๊ท์น ํ์ผ'
|
|
924
|
+
}
|
|
925
|
+
];
|
|
926
|
+
|
|
927
|
+
// 1๋จ๊ณ: ์ ์ฒด ์ค์น vs ๊ฐ๋ณ ์ ํ
|
|
928
|
+
const installTypeResponse = await prompts({
|
|
929
|
+
type: 'select',
|
|
930
|
+
name: 'installType',
|
|
931
|
+
message: msg.installationOptions || '์ค์น ์ต์
์ ์ ํํ์ธ์:',
|
|
932
|
+
choices: [
|
|
933
|
+
{
|
|
934
|
+
title: msg.selectAll || 'โ
๋ชจ๋ ํญ๋ชฉ ์ค์น (๊ถ์ฅ)',
|
|
935
|
+
value: 'all',
|
|
936
|
+
description: '๋ชจ๋ AIWF ์ปดํฌ๋ํธ๋ฅผ ์ค์นํฉ๋๋ค'
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
title: '๐ฏ ๊ฐ๋ณ ํญ๋ชฉ ์ ํ',
|
|
940
|
+
value: 'custom',
|
|
941
|
+
description: '์ํ๋ ํญ๋ชฉ๋ง ์ ํํ์ฌ ์ค์นํฉ๋๋ค'
|
|
942
|
+
}
|
|
943
|
+
]
|
|
944
|
+
});
|
|
945
|
+
|
|
946
|
+
// ์ทจ์๋ ๊ฒฝ์ฐ
|
|
947
|
+
if (!installTypeResponse.installType) {
|
|
948
|
+
console.log(chalk.yellow(msg.noOptionsSelected || '์ค์น๊ฐ ์ทจ์๋์์ต๋๋ค.'));
|
|
949
|
+
process.exit(0);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
// ์ ์ฒด ์ค์น ์ ํ
|
|
953
|
+
if (installTypeResponse.installType === 'all') {
|
|
954
|
+
return installOptions.map(opt => opt.value);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
// 2๋จ๊ณ: ๊ฐ๋ณ ํญ๋ชฉ ์ ํ
|
|
958
|
+
const customResponse = await prompts({
|
|
959
|
+
type: 'multiselect',
|
|
960
|
+
name: 'selectedOptions',
|
|
961
|
+
message: '์ค์นํ ํญ๋ชฉ์ ์ ํํ์ธ์ (์คํ์ด์ค๋ก ์ ํ/ํด์ , ์ํฐ๋ก ํ์ธ):',
|
|
962
|
+
choices: installOptions,
|
|
963
|
+
hint: 'โโ ์ด๋, ์คํ์ด์ค ์ ํ/ํด์ , ์ํฐ ํ์ธ',
|
|
964
|
+
instructions: false
|
|
965
|
+
});
|
|
966
|
+
|
|
967
|
+
// ์ทจ์๋๊ฑฐ๋ ์๋ฌด๊ฒ๋ ์ ํํ์ง ์์ ๊ฒฝ์ฐ
|
|
968
|
+
if (!customResponse.selectedOptions || customResponse.selectedOptions.length === 0) {
|
|
969
|
+
console.log(chalk.yellow(msg.noOptionsSelected || '์ ํ๋ ํญ๋ชฉ์ด ์์ต๋๋ค.'));
|
|
970
|
+
process.exit(0);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
return customResponse.selectedOptions;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* ์ ํ๋ ์ต์
๋ณ ์ค์น ์คํ
|
|
978
|
+
* @param {Array} selectedOptions - ์ ํ๋ ์ค์น ์ต์
๋ค
|
|
979
|
+
* @param {string} languagePath - ์ธ์ด ๊ฒฝ๋ก
|
|
980
|
+
* @param {Object} msg - ์ง์ญํ๋ ๋ฉ์์ง
|
|
981
|
+
* @param {boolean} debugLog - ๋๋ฒ๊ทธ ๋ก๊ทธ ์ฌ๋ถ
|
|
982
|
+
*/
|
|
983
|
+
async function installSelectedOptions(selectedOptions, languagePath, msg, debugLog) {
|
|
984
|
+
for (const option of selectedOptions) {
|
|
985
|
+
const spinner = ora(`${msg.installingOption}${option}...`).start();
|
|
986
|
+
|
|
987
|
+
try {
|
|
988
|
+
switch (option) {
|
|
989
|
+
case 'aiwf-docs':
|
|
990
|
+
await installAIWFDocs(languagePath, debugLog);
|
|
991
|
+
break;
|
|
992
|
+
case 'claude-code-commands':
|
|
993
|
+
await installClaudeCodeCommands(languagePath, debugLog);
|
|
994
|
+
break;
|
|
995
|
+
case 'windsurf-rules':
|
|
996
|
+
await installWindsurfRules(debugLog);
|
|
997
|
+
break;
|
|
998
|
+
case 'cursor-rules':
|
|
999
|
+
await installCursorRules(debugLog);
|
|
1000
|
+
break;
|
|
1001
|
+
default:
|
|
1002
|
+
spinner.warn(`Unknown option: ${option}`);
|
|
1003
|
+
continue;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
spinner.succeed(`${msg.optionInstalled}${option}`);
|
|
1007
|
+
} catch (error) {
|
|
1008
|
+
spinner.fail(`Failed to install ${option}: ${error.message}`);
|
|
1009
|
+
if (debugLog) {
|
|
1010
|
+
console.error(error);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* AIWF ๋ฌธ์ ์ค์น
|
|
1018
|
+
*/
|
|
1019
|
+
async function installAIWFDocs(languagePath, debugLog) {
|
|
1020
|
+
await createDirectoryStructure();
|
|
1021
|
+
const spinner = ora('Downloading AIWF files...').start();
|
|
1022
|
+
const msg = {
|
|
1023
|
+
downloading: 'Downloading AIWF documentation...',
|
|
1024
|
+
downloadingTemplates: 'Downloading templates...',
|
|
1025
|
+
templatesNotFound: 'Templates not found'
|
|
1026
|
+
};
|
|
1027
|
+
|
|
1028
|
+
try {
|
|
1029
|
+
// ๋งค๋ํ์คํธ ๋ค์ด๋ก๋
|
|
1030
|
+
await downloadManifest(languagePath, spinner, msg, debugLog);
|
|
1031
|
+
|
|
1032
|
+
// ์ ์ฒด .aiwf ๋๋ ํ ๋ฆฌ ๋ค์ด๋ก๋
|
|
1033
|
+
await downloadTemplates(languagePath, spinner, msg, debugLog);
|
|
1034
|
+
|
|
1035
|
+
spinner.succeed('AIWF documentation installed successfully');
|
|
1036
|
+
} catch (error) {
|
|
1037
|
+
spinner.fail('Failed to install AIWF documentation');
|
|
1038
|
+
if (debugLog) {
|
|
1039
|
+
console.error(error);
|
|
1040
|
+
}
|
|
1041
|
+
throw error;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Claude Code ๋ช
๋ น์ด ์ค์น
|
|
1047
|
+
*/
|
|
1048
|
+
async function installClaudeCodeCommands(languagePath, debugLog) {
|
|
1049
|
+
const GITHUB_CONTENT_LANGUAGE_PREFIX = `${GITHUB_CONTENT_PREFIX}/${languagePath}`;
|
|
1050
|
+
const dummySpinner = null;
|
|
1051
|
+
const dummyMsg = { downloadingCommands: 'Downloading Claude Code commands...' };
|
|
1052
|
+
await updateCommands(languagePath, dummySpinner, dummyMsg, debugLog);
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Windsurf ๊ท์น ์ค์น
|
|
1057
|
+
*/
|
|
1058
|
+
async function installWindsurfRules(debugLog) {
|
|
1059
|
+
const spinner = ora('Installing Windsurf rules...').start();
|
|
1060
|
+
const msg = {
|
|
1061
|
+
checkingExistingTools: 'Checking existing tools...',
|
|
1062
|
+
foundExistingCursor: 'Found existing Cursor rules',
|
|
1063
|
+
foundExistingWindsurf: 'Found existing Windsurf rules',
|
|
1064
|
+
backingUpToolFiles: 'Backing up tool files...',
|
|
1065
|
+
toolBackupCreated: 'Tool backup created',
|
|
1066
|
+
rulesGlobalNotFound: 'Rules global not found',
|
|
1067
|
+
rulesManualNotFound: 'Rules manual not found',
|
|
1068
|
+
toolRulesInstalled: 'Tool rules installed successfully'
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
try {
|
|
1072
|
+
await downloadAndProcessRules(spinner, msg, debugLog);
|
|
1073
|
+
spinner.succeed('Windsurf rules installed successfully');
|
|
1074
|
+
} catch (error) {
|
|
1075
|
+
spinner.fail('Failed to install Windsurf rules');
|
|
1076
|
+
if (debugLog) {
|
|
1077
|
+
console.error(error);
|
|
1078
|
+
}
|
|
1079
|
+
throw error;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Cursor ๊ท์น ์ค์น
|
|
1085
|
+
*/
|
|
1086
|
+
async function installCursorRules(debugLog) {
|
|
1087
|
+
const spinner = ora('Installing Cursor rules...').start();
|
|
1088
|
+
const msg = {
|
|
1089
|
+
checkingExistingTools: 'Checking existing tools...',
|
|
1090
|
+
foundExistingCursor: 'Found existing Cursor rules',
|
|
1091
|
+
foundExistingWindsurf: 'Found existing Windsurf rules',
|
|
1092
|
+
backingUpToolFiles: 'Backing up tool files...',
|
|
1093
|
+
toolBackupCreated: 'Tool backup created',
|
|
1094
|
+
rulesGlobalNotFound: 'Rules global not found',
|
|
1095
|
+
rulesManualNotFound: 'Rules manual not found',
|
|
1096
|
+
toolRulesInstalled: 'Tool rules installed successfully'
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1099
|
+
try {
|
|
1100
|
+
await downloadAndProcessRules(spinner, msg, debugLog);
|
|
1101
|
+
spinner.succeed('Cursor rules installed successfully');
|
|
1102
|
+
} catch (error) {
|
|
1103
|
+
spinner.fail('Failed to install Cursor rules');
|
|
1104
|
+
if (debugLog) {
|
|
1105
|
+
console.error(error);
|
|
1106
|
+
}
|
|
1107
|
+
throw error;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
|
|
880
1111
|
/**
|
|
881
1112
|
* Main installation function
|
|
882
1113
|
* @param {Object} options - Installation options
|
|
@@ -894,7 +1125,6 @@ export async function installAIWF(options = {}) {
|
|
|
894
1125
|
|
|
895
1126
|
// Set language path
|
|
896
1127
|
const languagePath = getInstallationLanguagePath(selectedLanguage);
|
|
897
|
-
const GITHUB_CONTENT_LANGUAGE_PREFIX = `${GITHUB_CONTENT_PREFIX}/${languagePath}`;
|
|
898
1128
|
|
|
899
1129
|
// Check existing installation
|
|
900
1130
|
const hasExisting = await checkExistingInstallation();
|
|
@@ -903,11 +1133,9 @@ export async function installAIWF(options = {}) {
|
|
|
903
1133
|
let projectBackupDir = null;
|
|
904
1134
|
|
|
905
1135
|
if (hasExisting) {
|
|
906
|
-
|
|
907
1136
|
installDecision = await handleExistingInstallation(msg, options);
|
|
908
|
-
|
|
909
1137
|
if (!installDecision.continue) return;
|
|
910
|
-
|
|
1138
|
+
|
|
911
1139
|
// If reinstalling and preserving project, backup project files
|
|
912
1140
|
if (installDecision.installType === 'reinstall' && installDecision.preserveProject) {
|
|
913
1141
|
const { hasProject, projectFiles } = await checkExistingProject();
|
|
@@ -917,120 +1145,112 @@ export async function installAIWF(options = {}) {
|
|
|
917
1145
|
}
|
|
918
1146
|
}
|
|
919
1147
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
await downloadTemplates(languagePath, spinner, msg, debugLog);
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
// Update documentation (fresh installs and complete reinstall only)
|
|
937
|
-
if (!hasExisting || installDecision.installType === 'reinstall') {
|
|
938
|
-
await updateDocumentation(languagePath, spinner, msg, debugLog);
|
|
939
|
-
}
|
|
1148
|
+
// ์ค์น ์ต์
์ ํ
|
|
1149
|
+
let selectedOptions = ['aiwf-docs', 'claude-code-commands', 'windsurf-rules', 'cursor-rules'];
|
|
1150
|
+
|
|
1151
|
+
if (options.preselectedOptions) {
|
|
1152
|
+
// CLI์์ ๋ฏธ๋ฆฌ ์ ํ๋ ์ต์
๋ค์ ์ฌ์ฉ
|
|
1153
|
+
selectedOptions = options.preselectedOptions;
|
|
1154
|
+
} else if (!options.force && !options.interactive) {
|
|
1155
|
+
// ๊ธฐ๋ณธ์ ์ผ๋ก๋ ๋ํํ ์ ํ์ ์ฌ์ฉ
|
|
1156
|
+
selectedOptions = await selectInstallationOptions(msg);
|
|
1157
|
+
} else if (options.interactive) {
|
|
1158
|
+
// --interactive ํ๋๊ทธ๊ฐ ๋ช
์์ ์ผ๋ก ์ค์ ๋ ๊ฒฝ์ฐ
|
|
1159
|
+
selectedOptions = await selectInstallationOptions(msg);
|
|
1160
|
+
}
|
|
940
1161
|
|
|
941
|
-
|
|
942
|
-
await updateCommands(languagePath, spinner, msg, debugLog);
|
|
1162
|
+
console.log(chalk.blue(`\n์ค์นํ ์ต์
: ${selectedOptions.join(', ')}`));
|
|
943
1163
|
|
|
944
|
-
|
|
945
|
-
|
|
1164
|
+
try {
|
|
1165
|
+
// ์ ํ๋ ์ต์
๋ค์ ์ค์น
|
|
1166
|
+
await installSelectedOptions(selectedOptions, languagePath, msg, debugLog);
|
|
946
1167
|
|
|
947
1168
|
// Restore project files if needed
|
|
948
1169
|
if (projectBackupDir) {
|
|
949
1170
|
await restoreProjectFiles(projectBackupDir, msg);
|
|
950
1171
|
}
|
|
951
1172
|
|
|
952
|
-
// Success
|
|
1173
|
+
// Success message
|
|
953
1174
|
if (hasExisting && installDecision.installType === 'update') {
|
|
954
|
-
|
|
1175
|
+
console.log(chalk.green(`\nโ
${msg.updateSuccess}`));
|
|
955
1176
|
} else {
|
|
956
|
-
|
|
1177
|
+
console.log(chalk.green(`\nโ
${msg.installSuccess}`));
|
|
957
1178
|
}
|
|
958
1179
|
|
|
959
1180
|
// Display summary
|
|
960
1181
|
displaySummary(hasExisting, msg);
|
|
961
1182
|
|
|
962
|
-
// Run validation
|
|
1183
|
+
// Run validation based on selected options
|
|
963
1184
|
console.log(
|
|
964
1185
|
chalk.blue('\n๐ Installation Validation / ์ค์น ๊ฒ์ฆ์ ์์ํฉ๋๋ค...')
|
|
965
1186
|
);
|
|
966
|
-
const selectedTools = ['claude-code', 'cursor', 'windsurf'];
|
|
967
|
-
const validationResults = await validateInstallation(
|
|
968
|
-
selectedTools,
|
|
969
|
-
selectedLanguage
|
|
970
|
-
);
|
|
971
|
-
displaySpecCompliantValidationResults(validationResults, selectedLanguage);
|
|
972
1187
|
|
|
973
|
-
//
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1188
|
+
// Map selected options to validation tools
|
|
1189
|
+
const validationTools = [];
|
|
1190
|
+
if (selectedOptions.includes('claude-code-commands')) {
|
|
1191
|
+
validationTools.push('claude-code');
|
|
1192
|
+
}
|
|
1193
|
+
if (selectedOptions.includes('cursor-rules')) {
|
|
1194
|
+
validationTools.push('cursor');
|
|
1195
|
+
}
|
|
1196
|
+
if (selectedOptions.includes('windsurf-rules')) {
|
|
1197
|
+
validationTools.push('windsurf');
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
if (validationTools.length > 0) {
|
|
1201
|
+
const validationResults = await validateInstallation(
|
|
1202
|
+
validationTools,
|
|
977
1203
|
selectedLanguage
|
|
978
1204
|
);
|
|
1205
|
+
displaySpecCompliantValidationResults(validationResults, selectedLanguage);
|
|
979
1206
|
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
// Retry installation once
|
|
985
|
-
if (!options.isRetry) {
|
|
986
|
-
return await installAIWF({ ...options, isRetry: true });
|
|
987
|
-
}
|
|
988
|
-
} else if (action === 'rollback') {
|
|
989
|
-
console.log(
|
|
990
|
-
chalk.blue('\nโฉ๏ธ ์คํจํ ๋๊ตฌ๋ฅผ ๋กค๋ฐฑํฉ๋๋ค... / Rolling back failed tools...')
|
|
991
|
-
);
|
|
992
|
-
|
|
993
|
-
// Rollback failed tools
|
|
994
|
-
const failedTools = validationResults.failed.map(({ tool }) => tool);
|
|
995
|
-
const backupDir = getCurrentBackupDir();
|
|
996
|
-
let rollbackResults = {};
|
|
997
|
-
|
|
998
|
-
for (const tool of failedTools) {
|
|
999
|
-
if (backupDir) {
|
|
1000
|
-
const rollbackResult = await rollbackTool(
|
|
1001
|
-
tool,
|
|
1002
|
-
backupDir,
|
|
1003
|
-
selectedLanguage
|
|
1004
|
-
);
|
|
1005
|
-
rollbackResults[tool] = rollbackResult;
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
// Re-validate after rollback
|
|
1010
|
-
console.log(
|
|
1011
|
-
chalk.blue('\n๐ ๋กค๋ฐฑ ํ ์ฌ๊ฒ์ฆ... / Re-validating after rollback...')
|
|
1012
|
-
);
|
|
1013
|
-
const postRollbackValidation = await validateInstallation(
|
|
1014
|
-
selectedTools,
|
|
1015
|
-
selectedLanguage
|
|
1016
|
-
);
|
|
1017
|
-
displaySpecCompliantValidationResults(
|
|
1018
|
-
postRollbackValidation,
|
|
1207
|
+
// Handle partial failures
|
|
1208
|
+
if (validationResults.failed.length > 0) {
|
|
1209
|
+
const action = await offerReinstallationOptions(
|
|
1210
|
+
validationResults,
|
|
1019
1211
|
selectedLanguage
|
|
1020
1212
|
);
|
|
1021
1213
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
);
|
|
1029
|
-
} else {
|
|
1030
|
-
console.log(chalk.red(`โ ${tool}: ${result.error}`));
|
|
1214
|
+
if (action === 'reinstall') {
|
|
1215
|
+
console.log(
|
|
1216
|
+
chalk.blue('\n๐ ์ฌ์ค์น๋ฅผ ์์ํฉ๋๋ค... / Starting reinstallation...')
|
|
1217
|
+
);
|
|
1218
|
+
// Retry installation once
|
|
1219
|
+
if (!options.isRetry) {
|
|
1220
|
+
return await installAIWF({ ...options, isRetry: true });
|
|
1031
1221
|
}
|
|
1222
|
+
} else if (action === 'rollback') {
|
|
1223
|
+
console.log(
|
|
1224
|
+
chalk.blue('\nโฉ๏ธ ์คํจํ ๋๊ตฌ๋ฅผ ๋กค๋ฐฑํฉ๋๋ค... / Rolling back failed tools...')
|
|
1225
|
+
);
|
|
1226
|
+
|
|
1227
|
+
// Rollback failed tools
|
|
1228
|
+
const failedTools = validationResults.failed.map(({ tool }) => tool);
|
|
1229
|
+
const backupDir = getCurrentBackupDir();
|
|
1230
|
+
|
|
1231
|
+
for (const tool of failedTools) {
|
|
1232
|
+
if (backupDir) {
|
|
1233
|
+
await rollbackTool(
|
|
1234
|
+
tool,
|
|
1235
|
+
backupDir,
|
|
1236
|
+
selectedLanguage
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
// Re-validate after rollback
|
|
1242
|
+
console.log(
|
|
1243
|
+
chalk.blue('\n๐ ๋กค๋ฐฑ ํ ์ฌ๊ฒ์ฆ... / Re-validating after rollback...')
|
|
1244
|
+
);
|
|
1245
|
+
const postRollbackValidation = await validateInstallation(
|
|
1246
|
+
validationTools,
|
|
1247
|
+
selectedLanguage
|
|
1248
|
+
);
|
|
1249
|
+
displaySpecCompliantValidationResults(postRollbackValidation, selectedLanguage);
|
|
1032
1250
|
}
|
|
1033
1251
|
}
|
|
1252
|
+
} else {
|
|
1253
|
+
console.log(chalk.yellow('\nโ ๏ธ ๊ฒ์ฆํ ๋๊ตฌ๊ฐ ์ ํ๋์ง ์์์ต๋๋ค.'));
|
|
1034
1254
|
}
|
|
1035
1255
|
|
|
1036
1256
|
console.log(chalk.green(msg.enjoy));
|
package/src/utils/messages.js
CHANGED
|
@@ -77,6 +77,18 @@ export const messages = {
|
|
|
77
77
|
toolBackupCreated: '๋๊ตฌ ํ์ผ ๋ฐฑ์
์ด ์์ฑ๋์์ต๋๋ค',
|
|
78
78
|
installingToolRules: '๋๊ตฌ ๊ท์น์ ์ค์นํ๋ ์ค...',
|
|
79
79
|
toolRulesInstalled: '๋๊ตฌ ๊ท์น์ด ์ฑ๊ณต์ ์ผ๋ก ์ค์น๋์์ต๋๋ค',
|
|
80
|
+
|
|
81
|
+
// ์ค์น ์ต์
๊ด๋ จ
|
|
82
|
+
installationOptions: 'AIWF ์ค์น ์ต์
์ ์ ํํ์ธ์:',
|
|
83
|
+
aiwfDocs: 'AIWF ๋ฌธ์ ํด๋ (.aiwf/docs)',
|
|
84
|
+
claudeCodeCommands: 'Claude Code ๋ช
๋ น์ด ๋ฐ ์์ด์ ํธ',
|
|
85
|
+
windsurfRules: 'Windsurf ๊ท์น ํ์ผ',
|
|
86
|
+
cursorRules: 'Cursor ๊ท์น ํ์ผ',
|
|
87
|
+
selectAll: '๋ชจ๋ ์ต์
์ ํ',
|
|
88
|
+
installSelected: '์ ํํ ํญ๋ชฉ๋ค์ ์ค์นํ์๊ฒ ์ต๋๊น?',
|
|
89
|
+
installingOption: '์ค์น ์ค: ',
|
|
90
|
+
optionInstalled: '์๋ฃ: ',
|
|
91
|
+
noOptionsSelected: '์ ํ๋ ์ต์
์ด ์์ต๋๋ค.',
|
|
80
92
|
},
|
|
81
93
|
en: {
|
|
82
94
|
welcome: '\n๐ Welcome to AIWF!\n',
|
|
@@ -153,6 +165,18 @@ export const messages = {
|
|
|
153
165
|
toolBackupCreated: 'Tool files backup created',
|
|
154
166
|
installingToolRules: 'Installing tool rules...',
|
|
155
167
|
toolRulesInstalled: 'Tool rules installed successfully',
|
|
168
|
+
|
|
169
|
+
// Installation options
|
|
170
|
+
installationOptions: 'Select AIWF installation options:',
|
|
171
|
+
aiwfDocs: 'AIWF Documentation folder (.aiwf/docs)',
|
|
172
|
+
claudeCodeCommands: 'Claude Code commands and agents',
|
|
173
|
+
windsurfRules: 'Windsurf rules files',
|
|
174
|
+
cursorRules: 'Cursor rules files',
|
|
175
|
+
selectAll: 'Select all options',
|
|
176
|
+
installSelected: 'Install selected items?',
|
|
177
|
+
installingOption: 'Installing: ',
|
|
178
|
+
optionInstalled: 'Completed: ',
|
|
179
|
+
noOptionsSelected: 'No options selected.',
|
|
156
180
|
}
|
|
157
181
|
};
|
|
158
182
|
|
package/src/DEPENDENCY_MAP.md
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# AIWF ๋ชจ๋ ์์กด์ฑ ๋งคํธ๋ฆญ์ค
|
|
2
|
-
|
|
3
|
-
## ๐ CLI ๋ช
๋ น์ด๋ณ ์์กด์ฑ
|
|
4
|
-
|
|
5
|
-
| ๋ช
๋ น์ด | ์ง์ ์์กด์ฑ | ๊ฐ์ ์์กด์ฑ | ํน์ ์ฌ์ฉ |
|
|
6
|
-
|--------|-------------|-------------|-----------|
|
|
7
|
-
| `aiwf install` | installer.js | backup-manager.js, file-downloader.js, rollback-manager.js, validator.js | - |
|
|
8
|
-
| `aiwf persona` | persona.js, ai-persona-manager.js | context-engine.js, metrics-collector.js, task-analyzer.js, token-optimizer.js | - |
|
|
9
|
-
| `aiwf compress` | compress.js, resource-loader.js | - | - |
|
|
10
|
-
| `aiwf token` | token.js, resource-loader.js | - | - |
|
|
11
|
-
| `aiwf evaluate` | evaluate.js, resource-loader.js | - | - |
|
|
12
|
-
| `aiwf state` | state.js | - | - |
|
|
13
|
-
| `aiwf create-project` | create-project.js, resource-loader.js | - | - |
|
|
14
|
-
| `aiwf ai-tool` | ai-tool.js | - | - |
|
|
15
|
-
| `aiwf sprint-task` | sprint-task.js | - | - |
|
|
16
|
-
| `aiwf sprint` | sprint-independent.js | - | - |
|
|
17
|
-
| `aiwf yolo-config` | yolo-config.js | - | - |
|
|
18
|
-
| `aiwf checkpoint` | checkpoint-manager.js | - | โ ๏ธ YOLO ์ ์ฉ |
|
|
19
|
-
| `aiwf-checkpoint` | checkpoint-manager.js | - | โ ๏ธ YOLO ์ ์ฉ |
|
|
20
|
-
| `aiwf cache` | cache-cli.js | template-cache-system.js, offline-detector.js, template-downloader.js, template-version-manager.js | - |
|
|
21
|
-
| `aiwf github` | github-integration.js | state/state-index.js | - |
|
|
22
|
-
| `YOLO ๋ชจ๋` | engineering-guard.js | - | โ ๏ธ ๋์ import |
|
|
23
|
-
|
|
24
|
-
## ๐๏ธ ๋ชจ๋ ๋ถ๋ฅ
|
|
25
|
-
|
|
26
|
-
### ๐ง ํต์ฌ ์ ํธ๋ฆฌํฐ (์ญ์ ๊ธ์ง)
|
|
27
|
-
- **paths.js** - ๊ฒฝ๋ก ๊ด๋ฆฌ (8๊ณณ์์ ์ฌ์ฉ)
|
|
28
|
-
- **messages.js** - ๋ค๊ตญ์ด ๋ฉ์์ง ์์คํ
(5๊ณณ์์ ์ฌ์ฉ)
|
|
29
|
-
- **language-utils.js** - ์ธ์ด ์ค์ ๊ด๋ฆฌ (3๊ณณ์์ ์ฌ์ฉ)
|
|
30
|
-
|
|
31
|
-
### ๐ YOLO ์์คํ
(์ญ์ ๊ธ์ง)
|
|
32
|
-
- **engineering-guard.js** - ์ค๋ฒ์์ง๋์ด๋ง ๋ฐฉ์ง โ ๏ธ ๋์ ๋ก๋
|
|
33
|
-
- **checkpoint-manager.js** - ์ฒดํฌํฌ์ธํธ ๊ด๋ฆฌ
|
|
34
|
-
|
|
35
|
-
### ๐ฏ ๋ช
๋ น์ด๋ณ ์ ์ฉ ๋ชจ๋
|
|
36
|
-
|
|
37
|
-
#### AI Persona ์์คํ
|
|
38
|
-
- **ai-persona-manager.js** โ persona ๋ช
๋ น์ด
|
|
39
|
-
- **context-engine.js** โ ai-persona-manager๊ฐ ์ฌ์ฉ
|
|
40
|
-
- **metrics-collector.js** โ ai-persona-manager๊ฐ ์ฌ์ฉ
|
|
41
|
-
- **task-analyzer.js** โ ai-persona-manager๊ฐ ์ฌ์ฉ
|
|
42
|
-
- **token-optimizer.js** โ context-engine์ด ์ฌ์ฉ
|
|
43
|
-
|
|
44
|
-
#### ์ค์น/๋ฐฑ์
์์คํ
|
|
45
|
-
- **installer.js** โ install ๋ช
๋ น์ด
|
|
46
|
-
- **backup-manager.js** โ installer๊ฐ ์ฌ์ฉ
|
|
47
|
-
- **file-downloader.js** โ installer๊ฐ ์ฌ์ฉ
|
|
48
|
-
- **rollback-manager.js** โ installer๊ฐ ์ฌ์ฉ
|
|
49
|
-
- **validator.js** โ installer๊ฐ ์ฌ์ฉ
|
|
50
|
-
|
|
51
|
-
#### ์บ์ ์์คํ
|
|
52
|
-
- **template-cache-system.js** โ cache ๋ช
๋ น์ด
|
|
53
|
-
- **offline-detector.js** โ cache ๋ช
๋ น์ด
|
|
54
|
-
- **template-downloader.js** โ cache ๋ช
๋ น์ด
|
|
55
|
-
- **template-version-manager.js** โ cache ๋ช
๋ น์ด
|
|
56
|
-
|
|
57
|
-
#### GitHub ํตํฉ
|
|
58
|
-
- **github-integration.js** โ github ๋ช
๋ น์ด
|
|
59
|
-
- **state/state-index.js** โ github-integration์ด ์ฌ์ฉ
|
|
60
|
-
|
|
61
|
-
#### ๊ณตํต ๋ฆฌ์์ค
|
|
62
|
-
- **resource-loader.js** โ 5๊ฐ ๋ช
๋ น์ด์์ ์ฌ์ฉ
|
|
63
|
-
|
|
64
|
-
## โ ๏ธ ์ญ์ ์ํ ๋ชจ๋
|
|
65
|
-
|
|
66
|
-
### ๋์ ๋ก๋ ๋ชจ๋ (CLI์์ ์ง์ ์ฐธ์กฐ๋์ง ์์)
|
|
67
|
-
- **engineering-guard.js** - YOLO ํ
ํ๋ฆฟ์์ `import()`๋ก ๋ก๋
|
|
68
|
-
- **state/priority-calculator.js** - github-integration์์ ์ฌ์ฉ
|
|
69
|
-
- **state/task-scanner.js** - github-integration์์ ์ฌ์ฉ
|
|
70
|
-
|
|
71
|
-
### ๊ฐ์ ์์กด์ฑ ๋ชจ๋
|
|
72
|
-
- AI Persona ์์คํ
์ ํ์ ๋ชจ๋๋ค
|
|
73
|
-
- ์ค์น ์์คํ
์ ๋ฐฑ์
/๋ณต๊ตฌ ๋ชจ๋๋ค
|
|
74
|
-
|
|
75
|
-
## ๐จ ์ญ์ ํ๊ธฐ ์ ํ์ธ์ฌํญ
|
|
76
|
-
|
|
77
|
-
1. **์ด ํ์ผ์์ ๋ชจ๋ ์์น ํ์ธ**
|
|
78
|
-
2. **`@warning ์ญ์ ๊ธ์ง` ์ฃผ์ ํ์ธ**
|
|
79
|
-
3. **YOLO ์ ์ฉ ๋ชจ๋์ธ์ง ํ์ธ**
|
|
80
|
-
4. **๋์ import ์ฌ์ฉ ์ฌ๋ถ ํ์ธ**
|
|
81
|
-
5. **๊ฐ์ ์์กด์ฑ ์ฒด์ธ ํ์ธ**
|
|
82
|
-
|
|
83
|
-
## ๐ ๋ฏธ์ฌ์ฉ ๋ชจ๋ (์ญ์ ๊ฐ๋ฅ)
|
|
84
|
-
|
|
85
|
-
ํ์ฌ ์์ ํ ๋ฏธ์ฌ์ฉ๋๋ ๋ชจ๋์ ์์ต๋๋ค. ๋ชจ๋ ๋ชจ๋์ด ์ง๊ฐ์ ์ ์ผ๋ก CLI ์์คํ
์์ ์ฌ์ฉ๋ฉ๋๋ค.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
**๋ง์ง๋ง ์
๋ฐ์ดํธ**: 2024-01-27
|
|
90
|
-
**๊ฒ์ฆ ๋ฐฉ๋ฒ**: `grep -r "๋ชจ๋๋ช
" src/` ์ผ๋ก ์ฌ์ฉ์ฒ ํ์ธ
|