aiwf 0.3.6 → 0.3.8
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/.aiwf/00_PROJECT_MANIFEST.md +226 -2
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/S03_M02_sprint_meta.md +112 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T01_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T02_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T03_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T04_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T05_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T06_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T07_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T08_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T09_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T100_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T101_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T102_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T103_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T104_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T105_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T106_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T107_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T108_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T109_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T10_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T110_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T111_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T112_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T11_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T12_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T13_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T14_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T15_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T16_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T17_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T18_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T19_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T20_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T21_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T22_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T23_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T24_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T25_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T26_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T27_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T28_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T29_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T30_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T31_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T32_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T33_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T34_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T35_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T36_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T37_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T38_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T39_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T40_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T41_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T42_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T43_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T44_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T45_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T46_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T47_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T48_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T49_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T50_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T51_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T52_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T53_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T54_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T55_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T56_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T57_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T58_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T59_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T60_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T61_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T62_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T63_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T64_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T65_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T66_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T67_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T68_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T69_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T70_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T71_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T72_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T73_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T74_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T75_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T76_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T77_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T78_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T79_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T80_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T81_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T82_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T83_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T84_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T85_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T86_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T87_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T88_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T89_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T90_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T91_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T92_S03_task_with_special_characters.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T93_S03_test.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T94_S03_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T95_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T96_S03_next_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T97_S03_new_test_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T98_S03_first_task.md +39 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/T99_S03_test_task.md +39 -0
- package/.aiwf/test-results-s02.json +5 -5
- package/.claude/commands/aiwf/aiwf_compress_aggressive_persona.md +3 -15
- package/.claude/commands/aiwf/aiwf_compress_minimal_persona.md +2 -15
- package/.claude/commands/aiwf/aiwf_compress_stats.md +2 -51
- package/.claude/commands/aiwf/aiwf_compress_with_persona.md +5 -18
- package/.claude/commands/aiwf/aiwf_create_feature_ledger.md +1 -1
- package/.claude/commands/aiwf/aiwf_default_mode.md +1 -1
- package/.claude/commands/aiwf/aiwf_evaluate.md +3 -16
- package/.claude/commands/aiwf/aiwf_get_feature_details.md +1 -1
- package/.claude/commands/aiwf/aiwf_link_feature_to_milestone.md +1 -1
- package/.claude/commands/aiwf/aiwf_list_features.md +1 -1
- package/.claude/commands/aiwf/aiwf_switch_language.md +48 -120
- package/.claude/commands/aiwf/aiwf_update_feature_status.md +1 -1
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_create_testcase.md +561 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_aggressive_persona.md +2 -2
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_minimal_persona.md +2 -2
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_stats.md +10 -47
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_with_persona.md +2 -2
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_create_feature_ledger.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_create_testcase.md +561 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_default_mode.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_evaluate.md +2 -2
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_get_feature_details.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_link_feature_to_milestone.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_list_features.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_architect.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_backend.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_data_analyst.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_frontend.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_security.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_status.md +1 -1
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_update_feature_status.md +1 -1
- package/package.json +1 -1
- package/src/cli/index.js +174 -0
- package/src/commands/compress.js +60 -0
- package/src/commands/create-project.js +23 -17
- package/src/commands/evaluate.js +459 -0
- package/src/commands/feature.js +365 -0
- package/src/commands/persona.js +37 -16
- package/src/commands/token.js +312 -0
- package/src/lib/file-downloader.js +189 -33
- package/src/lib/installer.js +38 -11
- package/src/lib/resource-loader.js +250 -0
- package/src/lib/resources/commands/ai-persona.js +602 -0
- package/src/lib/resources/commands/compress-context.js +389 -0
- package/src/lib/resources/commands/evaluate.js +246 -0
- package/src/lib/resources/commands/feature-ledger.js +565 -0
- package/src/lib/resources/commands/feature_commit_report.js +370 -0
- package/src/lib/resources/commands/persona-context-apply.js +562 -0
- package/src/lib/resources/commands/scan_git_history.js +234 -0
- package/src/lib/resources/commands/sync_feature_commits.js +154 -0
- package/src/lib/resources/commands/token-tracking.js +443 -0
- package/src/lib/resources/config/commit-patterns.js +103 -0
- package/src/lib/resources/config/language.json +6 -0
- package/src/lib/resources/personas/PERSONA_INDEX.md +57 -0
- package/src/lib/resources/personas/analyst.json +44 -0
- package/src/lib/resources/personas/architect/best_practices.md +136 -0
- package/src/lib/resources/personas/architect/knowledge_base.md +377 -0
- package/src/lib/resources/personas/architect.json +44 -0
- package/src/lib/resources/personas/backend/best_practices.md +766 -0
- package/src/lib/resources/personas/backend/knowledge_base.md +1070 -0
- package/src/lib/resources/personas/data_analyst/best_practices.md +594 -0
- package/src/lib/resources/personas/data_analyst/knowledge_base.md +1057 -0
- package/src/lib/resources/personas/developer.json +44 -0
- package/src/lib/resources/personas/developer.md +37 -0
- package/src/lib/resources/personas/evaluation_criteria.json +137 -0
- package/src/lib/resources/personas/frontend/best_practices.md +445 -0
- package/src/lib/resources/personas/frontend/knowledge_base.md +729 -0
- package/src/lib/resources/personas/persona-index.json +31 -0
- package/src/lib/resources/personas/reviewer.json +44 -0
- package/src/lib/resources/personas/security/best_practices.md +307 -0
- package/src/lib/resources/personas/security/knowledge_base.md +498 -0
- package/src/lib/resources/personas/tester.json +44 -0
- package/src/lib/resources/templates/README.md +78 -0
- package/src/lib/resources/templates/api-server/config.json +64 -0
- package/src/lib/resources/templates/api-server/template/.aiwf/config.json +56 -0
- package/src/lib/resources/templates/api-server/template/.aiwf/feature-ledger.json +42 -0
- package/src/lib/resources/templates/api-server/template/.aiwf/personas/backend-engineer.json +40 -0
- package/src/lib/resources/templates/api-server/template/.aiwf/scripts/cli.js +111 -0
- package/src/lib/resources/templates/api-server/template/.env.example +29 -0
- package/src/lib/resources/templates/api-server/template/.eslintrc.json +23 -0
- package/src/lib/resources/templates/api-server/template/README.md +171 -0
- package/src/lib/resources/templates/api-server/template/jest.config.js +26 -0
- package/src/lib/resources/templates/api-server/template/nodemon.json +9 -0
- package/src/lib/resources/templates/api-server/template/package.json +61 -0
- package/src/lib/resources/templates/api-server/template/src/app.ts +60 -0
- package/src/lib/resources/templates/api-server/template/src/config/swagger.ts +38 -0
- package/src/lib/resources/templates/api-server/template/src/controllers/aiwfController.ts +68 -0
- package/src/lib/resources/templates/api-server/template/src/controllers/authController.ts +128 -0
- package/src/lib/resources/templates/api-server/template/src/controllers/statusController.ts +28 -0
- package/src/lib/resources/templates/api-server/template/src/index.ts +28 -0
- package/src/lib/resources/templates/api-server/template/src/middleware/aiwfMiddleware.ts +50 -0
- package/src/lib/resources/templates/api-server/template/src/middleware/authMiddleware.ts +41 -0
- package/src/lib/resources/templates/api-server/template/src/middleware/errorHandler.ts +42 -0
- package/src/lib/resources/templates/api-server/template/src/middleware/notFoundHandler.ts +14 -0
- package/src/lib/resources/templates/api-server/template/src/middleware/requestLogger.ts +20 -0
- package/src/lib/resources/templates/api-server/template/src/routes/aiwf.ts +42 -0
- package/src/lib/resources/templates/api-server/template/src/routes/index.ts +13 -0
- package/src/lib/resources/templates/api-server/template/src/routes/v1/index.ts +67 -0
- package/src/lib/resources/templates/api-server/template/src/utils/logger.ts +37 -0
- package/src/lib/resources/templates/api-server/template/tests/app.test.ts +40 -0
- package/src/lib/resources/templates/api-server/template/tsconfig.json +43 -0
- package/src/lib/resources/templates/npm-library/config.json +61 -0
- package/src/lib/resources/templates/npm-library/template/LICENSE +21 -0
- package/src/lib/resources/templates/npm-library/template/README.md +201 -0
- package/src/lib/resources/templates/npm-library/template/package.json +78 -0
- package/src/lib/resources/templates/web-app/config.json +53 -0
- package/src/lib/resources/templates/web-app/template/.aiwf/config.json +54 -0
- package/src/lib/resources/templates/web-app/template/.aiwf/feature-ledger.json +37 -0
- package/src/lib/resources/templates/web-app/template/.aiwf/personas/fullstack-developer.json +40 -0
- package/src/lib/resources/templates/web-app/template/.aiwf/scripts/cli.js +110 -0
- package/src/lib/resources/templates/web-app/template/.eslintrc.cjs +20 -0
- package/src/lib/resources/templates/web-app/template/README.md +151 -0
- package/src/lib/resources/templates/web-app/template/index.html +14 -0
- package/src/lib/resources/templates/web-app/template/package.json +44 -0
- package/src/lib/resources/templates/web-app/template/postcss.config.js +6 -0
- package/src/lib/resources/templates/web-app/template/public/vite.svg +1 -0
- package/src/lib/resources/templates/web-app/template/src/App.tsx +21 -0
- package/src/lib/resources/templates/web-app/template/src/components/Layout.tsx +57 -0
- package/src/lib/resources/templates/web-app/template/src/components/aiwf/ContextStatus.tsx +107 -0
- package/src/lib/resources/templates/web-app/template/src/components/aiwf/FeatureLedger.tsx +93 -0
- package/src/lib/resources/templates/web-app/template/src/components/aiwf/TokenUsage.tsx +71 -0
- package/src/lib/resources/templates/web-app/template/src/index.css +60 -0
- package/src/lib/resources/templates/web-app/template/src/main.tsx +10 -0
- package/src/lib/resources/templates/web-app/template/src/pages/AiwfDashboard.tsx +60 -0
- package/src/lib/resources/templates/web-app/template/src/pages/HomePage.tsx +89 -0
- package/src/lib/resources/templates/web-app/template/src/pages/NotFound.tsx +25 -0
- package/src/lib/resources/templates/web-app/template/src/stores/aiwfStore.ts +126 -0
- package/src/lib/resources/templates/web-app/template/src/types/global.d.ts +9 -0
- package/src/lib/resources/templates/web-app/template/src/vite-env.d.ts +1 -0
- package/src/lib/resources/templates/web-app/template/tailwind.config.js +30 -0
- package/src/lib/resources/templates/web-app/template/tsconfig.json +37 -0
- package/src/lib/resources/templates/web-app/template/tsconfig.node.json +10 -0
- package/src/lib/resources/templates/web-app/template/vite.config.ts +23 -0
- package/src/lib/resources/utils/background-monitor.js +223 -0
- package/src/lib/resources/utils/compression-metrics.js +1031 -0
- package/src/lib/resources/utils/compression-strategies.js +557 -0
- package/src/lib/resources/utils/content-normalizer.js +455 -0
- package/src/lib/resources/utils/context-compressor.js +583 -0
- package/src/lib/resources/utils/context-rule-parser.js +180 -0
- package/src/lib/resources/utils/context-token-monitor.js +463 -0
- package/src/lib/resources/utils/context-update-manager.js +502 -0
- package/src/lib/resources/utils/feature-updater.js +271 -0
- package/src/lib/resources/utils/git-utils.js +220 -0
- package/src/lib/resources/utils/importance-classifier.js +645 -0
- package/src/lib/resources/utils/information-filter.js +710 -0
- package/src/lib/resources/utils/persona-aware-compressor.js +598 -0
- package/src/lib/resources/utils/prompt-injector.js +242 -0
- package/src/lib/resources/utils/simplified-evaluator.js +119 -0
- package/src/lib/resources/utils/text-summarizer.js +492 -0
- package/src/lib/resources/utils/token-counter.js +177 -0
- package/src/lib/resources/utils/token-monitor.js +484 -0
- package/src/lib/resources/utils/token-reporter.js +453 -0
- package/src/lib/resources/utils/token-storage.js +433 -0
- package/src/lib/resources/utils/token-tracker.js +283 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_switch_language.md +0 -160
- /package/claude-code/aiwf/ko/.claude/commands/aiwf/{aiwf_update_docs_kr.md → aiwf_update_docs.md} +0 -0
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AIWF 평가 명령어
|
|
5
|
+
* AI 응답 품질 평가 및 개선
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { ResourceLoader } from '../lib/resource-loader.js';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
import fs from 'fs-extra';
|
|
11
|
+
import path from 'path';
|
|
12
|
+
|
|
13
|
+
class EvaluateCommand {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.resourceLoader = new ResourceLoader();
|
|
16
|
+
this.evaluationPath = path.join(process.cwd(), '.aiwf', 'evaluations');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Evaluate 명령어 실행
|
|
21
|
+
*/
|
|
22
|
+
async execute(args) {
|
|
23
|
+
const [subcommand, ...restArgs] = args;
|
|
24
|
+
|
|
25
|
+
switch (subcommand) {
|
|
26
|
+
case 'response':
|
|
27
|
+
await this.evaluateResponse(restArgs);
|
|
28
|
+
break;
|
|
29
|
+
case 'code':
|
|
30
|
+
await this.evaluateCode(restArgs);
|
|
31
|
+
break;
|
|
32
|
+
case 'persona':
|
|
33
|
+
await this.evaluatePersona(restArgs);
|
|
34
|
+
break;
|
|
35
|
+
case 'report':
|
|
36
|
+
await this.generateReport();
|
|
37
|
+
break;
|
|
38
|
+
case 'criteria':
|
|
39
|
+
await this.showCriteria();
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
this.showHelp();
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* AI 응답 평가
|
|
49
|
+
*/
|
|
50
|
+
async evaluateResponse(args) {
|
|
51
|
+
const [responsePath] = args;
|
|
52
|
+
|
|
53
|
+
if (!responsePath) {
|
|
54
|
+
console.error(chalk.red('❌ 평가할 응답 파일 경로를 지정해주세요.'));
|
|
55
|
+
console.log(chalk.gray('사용법: aiwf evaluate response <파일경로>'));
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
// 평가자 모듈 로드
|
|
61
|
+
const evaluatorModule = await this.resourceLoader.loadUtil('simplified-evaluator.js');
|
|
62
|
+
const SimplifiedEvaluator = evaluatorModule.SimplifiedEvaluator || evaluatorModule.default;
|
|
63
|
+
|
|
64
|
+
if (!SimplifiedEvaluator) {
|
|
65
|
+
throw new Error('SimplifiedEvaluator 모듈을 로드할 수 없습니다.');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const evaluator = new SimplifiedEvaluator();
|
|
69
|
+
|
|
70
|
+
// 응답 내용 읽기
|
|
71
|
+
const content = await fs.readFile(responsePath, 'utf8');
|
|
72
|
+
|
|
73
|
+
console.log(chalk.cyan('🔍 AI 응답 평가 중...'));
|
|
74
|
+
|
|
75
|
+
// 평가 수행
|
|
76
|
+
const evaluation = await evaluator.evaluate(content, 'response');
|
|
77
|
+
|
|
78
|
+
// 결과 표시
|
|
79
|
+
this.displayEvaluation(evaluation);
|
|
80
|
+
|
|
81
|
+
// 평가 결과 저장
|
|
82
|
+
await this.saveEvaluation(evaluation, 'response', responsePath);
|
|
83
|
+
|
|
84
|
+
} catch (error) {
|
|
85
|
+
console.error(chalk.red('❌ 응답 평가 중 오류가 발생했습니다:'), error.message);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 코드 품질 평가
|
|
91
|
+
*/
|
|
92
|
+
async evaluateCode(args) {
|
|
93
|
+
const [codePath] = args;
|
|
94
|
+
|
|
95
|
+
if (!codePath) {
|
|
96
|
+
console.error(chalk.red('❌ 평가할 코드 파일 경로를 지정해주세요.'));
|
|
97
|
+
console.log(chalk.gray('사용법: aiwf evaluate code <파일경로>'));
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const evaluatorModule = await this.resourceLoader.loadUtil('simplified-evaluator.js');
|
|
103
|
+
const SimplifiedEvaluator = evaluatorModule.SimplifiedEvaluator || evaluatorModule.default;
|
|
104
|
+
|
|
105
|
+
const evaluator = new SimplifiedEvaluator();
|
|
106
|
+
|
|
107
|
+
// 코드 내용 읽기
|
|
108
|
+
const code = await fs.readFile(codePath, 'utf8');
|
|
109
|
+
const language = path.extname(codePath).slice(1) || 'javascript';
|
|
110
|
+
|
|
111
|
+
console.log(chalk.cyan('🔍 코드 품질 평가 중...'));
|
|
112
|
+
|
|
113
|
+
// 평가 수행
|
|
114
|
+
const evaluation = await evaluator.evaluateCode(code, language);
|
|
115
|
+
|
|
116
|
+
// 결과 표시
|
|
117
|
+
this.displayCodeEvaluation(evaluation);
|
|
118
|
+
|
|
119
|
+
// 평가 결과 저장
|
|
120
|
+
await this.saveEvaluation(evaluation, 'code', codePath);
|
|
121
|
+
|
|
122
|
+
} catch (error) {
|
|
123
|
+
console.error(chalk.red('❌ 코드 평가 중 오류가 발생했습니다:'), error.message);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 페르소나 적합성 평가
|
|
129
|
+
*/
|
|
130
|
+
async evaluatePersona(args) {
|
|
131
|
+
const [contentPath, personaName] = args;
|
|
132
|
+
|
|
133
|
+
if (!contentPath || !personaName) {
|
|
134
|
+
console.error(chalk.red('❌ 콘텐츠 경로와 페르소나 이름을 지정해주세요.'));
|
|
135
|
+
console.log(chalk.gray('사용법: aiwf evaluate persona <파일경로> <페르소나명>'));
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
try {
|
|
140
|
+
// 페르소나 인식 평가자 로드
|
|
141
|
+
const backgroundModule = await this.resourceLoader.loadUtil('background-monitor.js');
|
|
142
|
+
const BackgroundMonitor = backgroundModule.BackgroundMonitor || backgroundModule.default;
|
|
143
|
+
|
|
144
|
+
const monitor = new BackgroundMonitor();
|
|
145
|
+
|
|
146
|
+
// 콘텐츠 읽기
|
|
147
|
+
const content = await fs.readFile(contentPath, 'utf8');
|
|
148
|
+
|
|
149
|
+
console.log(chalk.cyan(`🎭 페르소나 적합성 평가 중 (${personaName})...`));
|
|
150
|
+
|
|
151
|
+
// 평가 수행
|
|
152
|
+
const result = await monitor.monitorResponse(content, personaName);
|
|
153
|
+
|
|
154
|
+
// 결과 표시
|
|
155
|
+
this.displayPersonaEvaluation(result, personaName);
|
|
156
|
+
|
|
157
|
+
// 평가 결과 저장
|
|
158
|
+
await this.saveEvaluation(result, 'persona', contentPath, { persona: personaName });
|
|
159
|
+
|
|
160
|
+
} catch (error) {
|
|
161
|
+
console.error(chalk.red('❌ 페르소나 평가 중 오류가 발생했습니다:'), error.message);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 평가 리포트 생성
|
|
167
|
+
*/
|
|
168
|
+
async generateReport() {
|
|
169
|
+
try {
|
|
170
|
+
const evaluations = await this.loadAllEvaluations();
|
|
171
|
+
|
|
172
|
+
if (evaluations.length === 0) {
|
|
173
|
+
console.log(chalk.yellow('⚠️ 저장된 평가 결과가 없습니다.'));
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
console.log(chalk.cyan('📊 평가 리포트 생성 중...'));
|
|
178
|
+
|
|
179
|
+
const report = this.createReport(evaluations);
|
|
180
|
+
const reportPath = path.join(this.evaluationPath, 'reports', `evaluation-report-${Date.now()}.md`);
|
|
181
|
+
|
|
182
|
+
await fs.ensureDir(path.dirname(reportPath));
|
|
183
|
+
await fs.writeFile(reportPath, report);
|
|
184
|
+
|
|
185
|
+
console.log(chalk.green(`✅ 리포트가 생성되었습니다: ${reportPath}`));
|
|
186
|
+
|
|
187
|
+
// 요약 표시
|
|
188
|
+
const summary = this.createSummary(evaluations);
|
|
189
|
+
console.log(chalk.cyan('\n📈 평가 요약:'));
|
|
190
|
+
console.log(summary);
|
|
191
|
+
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error(chalk.red('❌ 리포트 생성 중 오류가 발생했습니다:'), error.message);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* 평가 기준 표시
|
|
199
|
+
*/
|
|
200
|
+
async showCriteria() {
|
|
201
|
+
try {
|
|
202
|
+
const criteria = await this.resourceLoader.loadJSON('personas', 'evaluation_criteria.json');
|
|
203
|
+
|
|
204
|
+
console.log(chalk.cyan('📋 평가 기준'));
|
|
205
|
+
console.log(chalk.gray('-'.repeat(50)));
|
|
206
|
+
|
|
207
|
+
// 응답 평가 기준
|
|
208
|
+
console.log(chalk.bold('\n응답 평가 기준:'));
|
|
209
|
+
Object.entries(criteria.response || {}).forEach(([key, desc]) => {
|
|
210
|
+
console.log(` • ${chalk.yellow(key)}: ${desc}`);
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// 코드 평가 기준
|
|
214
|
+
console.log(chalk.bold('\n코드 평가 기준:'));
|
|
215
|
+
Object.entries(criteria.code || {}).forEach(([key, desc]) => {
|
|
216
|
+
console.log(` • ${chalk.yellow(key)}: ${desc}`);
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// 페르소나 평가 기준
|
|
220
|
+
console.log(chalk.bold('\n페르소나 평가 기준:'));
|
|
221
|
+
Object.entries(criteria.persona || {}).forEach(([key, desc]) => {
|
|
222
|
+
console.log(` • ${chalk.yellow(key)}: ${desc}`);
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
} catch (error) {
|
|
226
|
+
// 기본 기준 표시
|
|
227
|
+
console.log(chalk.cyan('📋 평가 기준'));
|
|
228
|
+
console.log(chalk.gray('-'.repeat(50)));
|
|
229
|
+
console.log('\n기본 평가 항목:');
|
|
230
|
+
console.log(' • 정확성: 요구사항을 정확히 충족하는가');
|
|
231
|
+
console.log(' • 명확성: 이해하기 쉽고 명확한가');
|
|
232
|
+
console.log(' • 완전성: 필요한 모든 정보를 포함하는가');
|
|
233
|
+
console.log(' • 일관성: 스타일과 접근법이 일관되는가');
|
|
234
|
+
console.log(' • 효율성: 최적화되고 효율적인가');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* 평가 결과 표시
|
|
240
|
+
*/
|
|
241
|
+
displayEvaluation(evaluation) {
|
|
242
|
+
console.log(chalk.cyan('\n📊 평가 결과'));
|
|
243
|
+
console.log(chalk.gray('-'.repeat(50)));
|
|
244
|
+
|
|
245
|
+
const score = evaluation.score || 0;
|
|
246
|
+
const scoreColor = score >= 80 ? 'green' : score >= 60 ? 'yellow' : 'red';
|
|
247
|
+
|
|
248
|
+
console.log(`전체 점수: ${chalk[scoreColor](`${score}/100`)}`);
|
|
249
|
+
|
|
250
|
+
if (evaluation.criteria) {
|
|
251
|
+
console.log('\n세부 평가:');
|
|
252
|
+
Object.entries(evaluation.criteria).forEach(([criterion, value]) => {
|
|
253
|
+
const itemScore = value.score || value;
|
|
254
|
+
const itemColor = itemScore >= 80 ? 'green' : itemScore >= 60 ? 'yellow' : 'red';
|
|
255
|
+
console.log(` • ${criterion}: ${chalk[itemColor](`${itemScore}/100`)}`);
|
|
256
|
+
if (value.feedback) {
|
|
257
|
+
console.log(` ${chalk.gray(value.feedback)}`);
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (evaluation.suggestions && evaluation.suggestions.length > 0) {
|
|
263
|
+
console.log('\n💡 개선 제안:');
|
|
264
|
+
evaluation.suggestions.forEach((suggestion, index) => {
|
|
265
|
+
console.log(` ${index + 1}. ${suggestion}`);
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* 코드 평가 결과 표시
|
|
272
|
+
*/
|
|
273
|
+
displayCodeEvaluation(evaluation) {
|
|
274
|
+
this.displayEvaluation(evaluation);
|
|
275
|
+
|
|
276
|
+
if (evaluation.issues && evaluation.issues.length > 0) {
|
|
277
|
+
console.log('\n⚠️ 발견된 문제:');
|
|
278
|
+
evaluation.issues.forEach((issue, index) => {
|
|
279
|
+
const severity = issue.severity || 'info';
|
|
280
|
+
const severityColor = severity === 'error' ? 'red' : severity === 'warning' ? 'yellow' : 'gray';
|
|
281
|
+
console.log(` ${index + 1}. [${chalk[severityColor](severity.toUpperCase())}] ${issue.message}`);
|
|
282
|
+
if (issue.line) {
|
|
283
|
+
console.log(` ${chalk.gray(`라인 ${issue.line}`)}`);
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* 페르소나 평가 결과 표시
|
|
291
|
+
*/
|
|
292
|
+
displayPersonaEvaluation(result, personaName) {
|
|
293
|
+
console.log(chalk.cyan(`\n🎭 페르소나 적합성 평가: ${personaName}`));
|
|
294
|
+
console.log(chalk.gray('-'.repeat(50)));
|
|
295
|
+
|
|
296
|
+
if (result.isAppropriate) {
|
|
297
|
+
console.log(chalk.green('✅ 페르소나에 적합한 응답입니다.'));
|
|
298
|
+
} else {
|
|
299
|
+
console.log(chalk.red('❌ 페르소나에 적합하지 않은 응답입니다.'));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (result.confidence) {
|
|
303
|
+
const confColor = result.confidence >= 0.8 ? 'green' : result.confidence >= 0.6 ? 'yellow' : 'red';
|
|
304
|
+
console.log(`신뢰도: ${chalk[confColor](`${(result.confidence * 100).toFixed(0)}%`)}`);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (result.feedback) {
|
|
308
|
+
console.log(`\n피드백:\n${result.feedback}`);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (result.characteristics) {
|
|
312
|
+
console.log('\n발견된 특성:');
|
|
313
|
+
Object.entries(result.characteristics).forEach(([char, present]) => {
|
|
314
|
+
const icon = present ? '✅' : '❌';
|
|
315
|
+
console.log(` ${icon} ${char}`);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* 평가 결과 저장
|
|
322
|
+
*/
|
|
323
|
+
async saveEvaluation(evaluation, type, filePath, metadata = {}) {
|
|
324
|
+
const timestamp = new Date().toISOString();
|
|
325
|
+
const id = `eval-${type}-${Date.now()}`;
|
|
326
|
+
|
|
327
|
+
const data = {
|
|
328
|
+
id,
|
|
329
|
+
type,
|
|
330
|
+
timestamp,
|
|
331
|
+
filePath,
|
|
332
|
+
evaluation,
|
|
333
|
+
metadata
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
const savePath = path.join(this.evaluationPath, `${id}.json`);
|
|
337
|
+
await fs.ensureDir(this.evaluationPath);
|
|
338
|
+
await fs.writeJson(savePath, data, { spaces: 2 });
|
|
339
|
+
|
|
340
|
+
console.log(chalk.gray(`\n평가 결과 저장됨: ${savePath}`));
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* 모든 평가 결과 로드
|
|
345
|
+
*/
|
|
346
|
+
async loadAllEvaluations() {
|
|
347
|
+
const evaluations = [];
|
|
348
|
+
|
|
349
|
+
if (!fs.existsSync(this.evaluationPath)) {
|
|
350
|
+
return evaluations;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
const files = await fs.readdir(this.evaluationPath);
|
|
354
|
+
for (const file of files) {
|
|
355
|
+
if (file.endsWith('.json') && file.startsWith('eval-')) {
|
|
356
|
+
try {
|
|
357
|
+
const data = await fs.readJson(path.join(this.evaluationPath, file));
|
|
358
|
+
evaluations.push(data);
|
|
359
|
+
} catch (error) {
|
|
360
|
+
// 잘못된 파일 무시
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return evaluations.sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp));
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* 평가 리포트 생성
|
|
370
|
+
*/
|
|
371
|
+
createReport(evaluations) {
|
|
372
|
+
const report = [];
|
|
373
|
+
|
|
374
|
+
report.push('# AIWF 평가 리포트');
|
|
375
|
+
report.push(`\n생성일: ${new Date().toISOString()}`);
|
|
376
|
+
report.push(`총 평가 수: ${evaluations.length}`);
|
|
377
|
+
|
|
378
|
+
// 타입별 통계
|
|
379
|
+
const byType = {};
|
|
380
|
+
evaluations.forEach(evaluation => {
|
|
381
|
+
byType[evaluation.type] = (byType[evaluation.type] || 0) + 1;
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
report.push('\n## 평가 유형별 통계');
|
|
385
|
+
Object.entries(byType).forEach(([type, count]) => {
|
|
386
|
+
report.push(`- ${type}: ${count}건`);
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
// 최근 평가 목록
|
|
390
|
+
report.push('\n## 최근 평가 (최대 10건)');
|
|
391
|
+
evaluations.slice(0, 10).forEach((evaluation, index) => {
|
|
392
|
+
const score = evaluation.evaluation.score || 0;
|
|
393
|
+
report.push(`\n### ${index + 1}. ${evaluation.type} 평가 - ${evaluation.filePath}`);
|
|
394
|
+
report.push(`- 시간: ${evaluation.timestamp}`);
|
|
395
|
+
report.push(`- 점수: ${score}/100`);
|
|
396
|
+
if (evaluation.evaluation.suggestions) {
|
|
397
|
+
report.push('- 제안사항:');
|
|
398
|
+
evaluation.evaluation.suggestions.forEach(s => report.push(` - ${s}`));
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
return report.join('\n');
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* 평가 요약 생성
|
|
407
|
+
*/
|
|
408
|
+
createSummary(evaluations) {
|
|
409
|
+
const totalScore = evaluations.reduce((sum, e) => sum + (e.evaluation.score || 0), 0);
|
|
410
|
+
const avgScore = evaluations.length > 0 ? totalScore / evaluations.length : 0;
|
|
411
|
+
|
|
412
|
+
const summary = [];
|
|
413
|
+
summary.push(`평균 점수: ${avgScore.toFixed(1)}/100`);
|
|
414
|
+
summary.push(`총 평가 수: ${evaluations.length}`);
|
|
415
|
+
|
|
416
|
+
// 타입별 평균
|
|
417
|
+
const typeScores = {};
|
|
418
|
+
const typeCounts = {};
|
|
419
|
+
|
|
420
|
+
evaluations.forEach(evaluation => {
|
|
421
|
+
const type = evaluation.type;
|
|
422
|
+
const score = evaluation.evaluation.score || 0;
|
|
423
|
+
typeScores[type] = (typeScores[type] || 0) + score;
|
|
424
|
+
typeCounts[type] = (typeCounts[type] || 0) + 1;
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
summary.push('\n타입별 평균 점수:');
|
|
428
|
+
Object.keys(typeScores).forEach(type => {
|
|
429
|
+
const avg = typeScores[type] / typeCounts[type];
|
|
430
|
+
summary.push(` - ${type}: ${avg.toFixed(1)}/100`);
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
return summary.join('\n');
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* 도움말 표시
|
|
438
|
+
*/
|
|
439
|
+
showHelp() {
|
|
440
|
+
console.log(chalk.cyan('🔍 AIWF 평가 도구'));
|
|
441
|
+
console.log(chalk.gray('-'.repeat(50)));
|
|
442
|
+
console.log('사용법: aiwf evaluate <명령어> [옵션]');
|
|
443
|
+
console.log('');
|
|
444
|
+
console.log('명령어:');
|
|
445
|
+
console.log(' response <파일> AI 응답 품질 평가');
|
|
446
|
+
console.log(' code <파일> 코드 품질 평가');
|
|
447
|
+
console.log(' persona <파일> <이름> 페르소나 적합성 평가');
|
|
448
|
+
console.log(' report 평가 리포트 생성');
|
|
449
|
+
console.log(' criteria 평가 기준 표시');
|
|
450
|
+
console.log('');
|
|
451
|
+
console.log('예시:');
|
|
452
|
+
console.log(' aiwf evaluate response response.md');
|
|
453
|
+
console.log(' aiwf evaluate code src/app.js');
|
|
454
|
+
console.log(' aiwf evaluate persona output.txt architect');
|
|
455
|
+
console.log(' aiwf evaluate report');
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export default EvaluateCommand;
|