aiwf 0.3.0 → 0.3.2
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/.claude/commands/aiwf/aiwf_compress_aggressive_persona.md +53 -0
- package/.aiwf/.claude/commands/aiwf/aiwf_compress_minimal_persona.md +48 -0
- package/.aiwf/.claude/commands/aiwf/aiwf_compress_stats.md +79 -0
- package/.aiwf/.claude/commands/aiwf/aiwf_compress_with_persona.md +51 -0
- package/.aiwf/.claude/commands/aiwf/aiwf_evaluate.md +92 -0
- package/.aiwf/00_PROJECT_MANIFEST.md +183 -0
- package/.aiwf/01_PROJECT_DOCS/ARCHITECTURE.md +121 -0
- package/.aiwf/01_PROJECT_DOCS/FEATURE_LEDGER_ADVANCED_USE_CASES.md +412 -0
- package/.aiwf/01_PROJECT_DOCS/FEATURE_LEDGER_API_REFERENCE.md +361 -0
- package/.aiwf/01_PROJECT_DOCS/FEATURE_LEDGER_COMMANDS_GUIDE.md +254 -0
- package/.aiwf/01_PROJECT_DOCS/FEATURE_LEDGER_FAQ.md +365 -0
- package/.aiwf/01_PROJECT_DOCS/FEATURE_LEDGER_SYSTEM_OVERVIEW.md +305 -0
- package/.aiwf/01_PROJECT_DOCS/FEATURE_LEDGER_USER_GUIDE.md +416 -0
- package/.aiwf/01_PROJECT_DOCS/FEATURE_LEDGER_/354/213/234/354/236/221_/352/260/200/354/235/264/353/223/234.md +247 -0
- package/.aiwf/02_REQUIREMENTS/CLAUDE.md +78 -0
- package/.aiwf/02_REQUIREMENTS/M02_Context_Engineering_Enhancement/M02_milestone_meta.md +34 -0
- package/.aiwf/02_REQUIREMENTS/M02_Context_Engineering_Enhancement/PRD_Context_Engineering_Enhancement.md +108 -0
- package/.aiwf/02_REQUIREMENTS/M02_Context_Engineering_Enhancement/SPECS_AI_Persona_System.md +299 -0
- package/.aiwf/02_REQUIREMENTS/M02_Context_Engineering_Enhancement/SPECS_Feature_Ledger_System.md +330 -0
- package/.aiwf/02_REQUIREMENTS/M02_Context_Engineering_Enhancement/SPECS_Token_Optimization.md +833 -0
- package/.aiwf/03_SPRINTS/CLAUDE.md +83 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/S01_M02_sprint_meta.md +95 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX01_S01_Feature_Ledger_/353/215/260/354/235/264/355/204/260_/352/265/254/354/241/260_/354/204/244/352/263/204.md +111 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX02_S01_Feature_Ledger_CLI_/353/252/205/353/240/271/354/226/264_/352/260/234/353/260/234.md +115 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX03_S01_Git_/354/227/260/353/217/231_Feature_/354/266/224/354/240/201.md +141 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX04_S01_Feature_Ledger_/353/254/270/354/204/234/355/231/224.md +114 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX05_S01_AI_/355/216/230/353/245/264/354/206/214/353/202/230_/353/215/260/354/235/264/355/204/260_/352/265/254/354/241/260_/354/204/244/352/263/204.md +123 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX06_S01_/355/216/230/353/245/264/354/206/214/353/202/230_/352/264/200/353/246/254_/353/252/205/353/240/271/354/226/264_/352/265/254/355/230/204.md +114 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX07_S01_Context_/354/225/225/354/266/225_/354/225/204/355/202/244/355/205/215/354/262/230_/354/204/244/352/263/204.md +114 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX08_S01_/355/206/240/355/201/260_/354/266/224/354/240/201_/354/213/234/354/212/244/355/205/234_/355/224/204/353/241/234/355/206/240/355/203/200/354/236/205.md +112 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX09_S01_/354/225/225/354/266/225_/354/225/214/352/263/240/353/246/254/354/246/230_/355/224/204/353/241/234/355/206/240/355/203/200/354/236/205.md +118 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX10_S01_update_docs_/353/252/205/353/240/271/354/226/264_/353/263/265/352/265/254.md +118 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX11_S01_/355/206/265/355/225/251_/355/205/214/354/212/244/355/212/270_Suite_/352/265/254/354/266/225.md +128 -0
- package/.aiwf/03_SPRINTS/S01_M02_context_foundation/TX12_S01_/354/204/261/353/212/245_/354/265/234/354/240/201/355/231/224_/353/260/217_/353/254/270/354/204/234/355/231/224.md +122 -0
- package/.aiwf/03_SPRINTS/S02_M02_ai_enhancement/S02_M02_sprint_meta.md +107 -0
- package/.aiwf/03_SPRINTS/S02_M02_ai_enhancement/TX01_S02_AI_/355/216/230/353/245/264/354/206/214/353/202/230_/353/252/205/353/240/271/354/226/264_/352/265/254/355/230/204.md +129 -0
- package/.aiwf/03_SPRINTS/S02_M02_ai_enhancement/TX02_S02_/355/216/230/353/245/264/354/206/214/353/202/230_/354/273/250/355/205/215/354/212/244/355/212/270_/354/240/201/354/232/251_/354/213/234/354/212/244/355/205/234.md +152 -0
- package/.aiwf/03_SPRINTS/S02_M02_ai_enhancement/TX03_S02_Context_/354/225/225/354/266/225_/354/225/214/352/263/240/353/246/254/354/246/230_/352/265/254/355/230/204.md +186 -0
- package/.aiwf/03_SPRINTS/S02_M02_ai_enhancement/TX05_S02_S02_/355/206/265/355/225/251_/355/205/214/354/212/244/355/212/270_/353/260/217_/353/254/270/354/204/234/355/231/224.md +192 -0
- package/.aiwf/03_SPRINTS/S02_M02_ai_enhancement/TX4_S02_Feature_Git_/354/227/260/353/217/231_/353/260/217_/354/236/220/353/217/231/355/231/224.md +162 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/S03_FINAL_SPRINT_SUMMARY.md +137 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/S03_M02_sprint_meta.md +106 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/TX14_S03_M02_/353/247/210/354/235/274/354/212/244/355/206/244_/354/265/234/354/242/205_/352/262/200/354/246/235_/353/260/217_/353/254/270/354/204/234/355/231/224.md +214 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/TX15_S03_/352/270/260/353/263/270_/355/224/204/353/241/234/354/240/235/355/212/270_/355/205/234/355/224/214/353/246/277_/352/260/234/353/260/234.md +177 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/TX16_S03_/354/230/244/355/224/204/353/235/274/354/235/270_/355/205/234/355/224/214/353/246/277_/354/272/220/354/213/234_/354/213/234/354/212/244/355/205/234.md +206 -0
- package/.aiwf/03_SPRINTS/S03_M02_ecosystem_integration/TX_T13_S03_AI_/353/217/204/352/265/254_/355/206/265/355/225/251_/355/205/234/355/224/214/353/246/277_/352/260/234/353/260/234.md +151 -0
- package/.aiwf/04_GENERAL_TASKS/CLAUDE.md +96 -0
- package/.aiwf/04_GENERAL_TASKS/TX001_complete_english_translation.md +127 -0
- package/.aiwf/05_DOCUMENTATION/performance-report.md +33 -0
- package/.aiwf/06_FEATURE_LEDGERS/FEATURE_GIT_INTEGRATION.md +314 -0
- package/.aiwf/06_FEATURE_LEDGERS/FEATURE_INTEGRATION_GUIDE.md +227 -0
- package/.aiwf/06_FEATURE_LEDGERS/FEATURE_LEDGER_INDEX.md +23 -0
- package/.aiwf/06_FEATURE_LEDGERS/FEATURE_SCHEMA.md +205 -0
- package/.aiwf/06_FEATURE_LEDGERS/FEATURE_STATE_DIAGRAM.md +190 -0
- package/.aiwf/06_FEATURE_LEDGERS/active/FL001_user_authentication_system.md +47 -0
- package/.aiwf/06_FEATURE_LEDGERS/active/FL002_user_authentication_system.md +47 -0
- package/.aiwf/07_AI_PERSONAS/PERSONA_INDEX.md +57 -0
- package/.aiwf/07_AI_PERSONAS/architect/best_practices.md +104 -0
- package/.aiwf/07_AI_PERSONAS/architect/context_rules.md +46 -0
- package/.aiwf/07_AI_PERSONAS/architect/knowledge_base.md +235 -0
- package/.aiwf/07_AI_PERSONAS/backend/best_practices.md +363 -0
- package/.aiwf/07_AI_PERSONAS/backend/context_rules.md +61 -0
- package/.aiwf/07_AI_PERSONAS/backend/knowledge_base.md +623 -0
- package/.aiwf/07_AI_PERSONAS/data_analyst/best_practices.md +32 -0
- package/.aiwf/07_AI_PERSONAS/data_analyst/context_rules.md +43 -0
- package/.aiwf/07_AI_PERSONAS/data_analyst/knowledge_base.md +36 -0
- package/.aiwf/07_AI_PERSONAS/frontend/best_practices.md +31 -0
- package/.aiwf/07_AI_PERSONAS/frontend/context_rules.md +43 -0
- package/.aiwf/07_AI_PERSONAS/frontend/knowledge_base.md +32 -0
- package/.aiwf/07_AI_PERSONAS/security/best_practices.md +63 -0
- package/.aiwf/07_AI_PERSONAS/security/context_rules.md +53 -0
- package/.aiwf/07_AI_PERSONAS/security/knowledge_base.md +93 -0
- package/.aiwf/10_PERSONAS/active.json +1 -0
- package/.aiwf/10_PERSONAS/developer.md +37 -0
- package/.aiwf/10_STATE_OF_PROJECT/2025-07-09-07-20-solid-progress.md +144 -0
- package/.aiwf/98_PROMPTS/SAAS_DEVELOPMENT_GUIDE.md +302 -0
- package/.aiwf/98_PROMPTS/github_integration.md +130 -0
- package/.aiwf/98_PROMPTS/useful-prompts.md +31 -0
- package/.aiwf/98_PROMPTS/vibe-front-prompts.md +89 -0
- package/.aiwf/99_TEMPLATES/adr_template.md +49 -0
- package/.aiwf/99_TEMPLATES/feature_template.md +263 -0
- package/.aiwf/99_TEMPLATES/milestone_meta_template.md +25 -0
- package/.aiwf/99_TEMPLATES/project_manifest_template.md +39 -0
- package/.aiwf/99_TEMPLATES/sprint_meta_template.md +23 -0
- package/.aiwf/99_TEMPLATES/task_template.md +36 -0
- package/.aiwf/CLAUDE.md +76 -0
- package/.aiwf/ai-tools/README.md +105 -0
- package/.aiwf/ai-tools/augment/README.md +371 -0
- package/.aiwf/ai-tools/augment/config.json +30 -0
- package/.aiwf/ai-tools/augment/template/.augment/aiwf-integration.md +387 -0
- package/.aiwf/ai-tools/augment/template/.augment/augment.yaml +347 -0
- package/.aiwf/ai-tools/augment/template/augment.config.json +64 -0
- package/.aiwf/ai-tools/claude-code/README.md +151 -0
- package/.aiwf/ai-tools/claude-code/config.json +28 -0
- package/.aiwf/ai-tools/claude-code/template/CLAUDE.md +91 -0
- package/.aiwf/ai-tools/cursor/README.md +314 -0
- package/.aiwf/ai-tools/cursor/config.json +29 -0
- package/.aiwf/ai-tools/cursor/template/.cursorrules +362 -0
- package/.aiwf/ai-tools/github-copilot/README.md +195 -0
- package/.aiwf/ai-tools/github-copilot/config.json +24 -0
- package/.aiwf/ai-tools/github-copilot/template/.github/copilot-instructions.md +202 -0
- package/.aiwf/ai-tools/windsurf/README.md +355 -0
- package/.aiwf/ai-tools/windsurf/config.json +29 -0
- package/.aiwf/ai-tools/windsurf/template/.windsurf/aiwf-rules.md +260 -0
- package/.aiwf/ai-tools/windsurf/template/.windsurf/windsurf.config.js +312 -0
- package/.aiwf/ai-tools/windsurf/template/windsurf.config.json +63 -0
- package/.aiwf/config/language.json +6 -0
- package/.aiwf/feature-ledger/FL-001-authentication.json +52 -0
- package/.aiwf/feature-ledger/feature-index.json +20 -0
- package/.aiwf/personas/analyst.json +44 -0
- package/.aiwf/personas/architect/best_practices.md +136 -0
- package/.aiwf/personas/architect/knowledge_base.md +377 -0
- package/.aiwf/personas/architect.json +44 -0
- package/.aiwf/personas/backend/best_practices.md +766 -0
- package/.aiwf/personas/backend/knowledge_base.md +1070 -0
- package/.aiwf/personas/data_analyst/best_practices.md +594 -0
- package/.aiwf/personas/data_analyst/knowledge_base.md +1057 -0
- package/.aiwf/personas/developer.json +44 -0
- package/.aiwf/personas/evaluation_criteria.json +137 -0
- package/.aiwf/personas/frontend/best_practices.md +445 -0
- package/.aiwf/personas/frontend/knowledge_base.md +729 -0
- package/.aiwf/personas/persona-index.json +31 -0
- package/.aiwf/personas/reviewer.json +44 -0
- package/.aiwf/personas/security/best_practices.md +307 -0
- package/.aiwf/personas/security/knowledge_base.md +498 -0
- package/.aiwf/personas/tester.json +44 -0
- package/.aiwf/scripts/cache-templates.js +209 -0
- package/.aiwf/scripts/create-offline.js +86 -0
- package/.aiwf/scripts/create-project.js +151 -0
- package/.aiwf/scripts/feature-progress-calculator.cjs +236 -0
- package/.aiwf/scripts/git-integration.cjs +391 -0
- package/.aiwf/scripts/install-git-hooks.cjs +226 -0
- package/.aiwf/scripts/test-commit-parsing.cjs +125 -0
- package/.aiwf/scripts/update-feature-status.cjs +198 -0
- package/.aiwf/templates/README.md +78 -0
- package/.aiwf/templates/api-server/config.json +64 -0
- package/.aiwf/templates/api-server/template/.aiwf/config.json +56 -0
- package/.aiwf/templates/api-server/template/.aiwf/feature-ledger.json +42 -0
- package/.aiwf/templates/api-server/template/.aiwf/personas/backend-engineer.json +40 -0
- package/.aiwf/templates/api-server/template/.aiwf/scripts/cli.js +111 -0
- package/.aiwf/templates/api-server/template/.env.example +29 -0
- package/.aiwf/templates/api-server/template/.eslintrc.json +23 -0
- package/.aiwf/templates/api-server/template/README.md +171 -0
- package/.aiwf/templates/api-server/template/jest.config.js +26 -0
- package/.aiwf/templates/api-server/template/nodemon.json +9 -0
- package/.aiwf/templates/api-server/template/package.json +61 -0
- package/.aiwf/templates/api-server/template/src/app.ts +60 -0
- package/.aiwf/templates/api-server/template/src/config/swagger.ts +38 -0
- package/.aiwf/templates/api-server/template/src/controllers/aiwfController.ts +68 -0
- package/.aiwf/templates/api-server/template/src/controllers/authController.ts +128 -0
- package/.aiwf/templates/api-server/template/src/controllers/statusController.ts +28 -0
- package/.aiwf/templates/api-server/template/src/index.ts +28 -0
- package/.aiwf/templates/api-server/template/src/middleware/aiwfMiddleware.ts +50 -0
- package/.aiwf/templates/api-server/template/src/middleware/authMiddleware.ts +41 -0
- package/.aiwf/templates/api-server/template/src/middleware/errorHandler.ts +42 -0
- package/.aiwf/templates/api-server/template/src/middleware/notFoundHandler.ts +14 -0
- package/.aiwf/templates/api-server/template/src/middleware/requestLogger.ts +20 -0
- package/.aiwf/templates/api-server/template/src/routes/aiwf.ts +42 -0
- package/.aiwf/templates/api-server/template/src/routes/index.ts +13 -0
- package/.aiwf/templates/api-server/template/src/routes/v1/index.ts +67 -0
- package/.aiwf/templates/api-server/template/src/utils/logger.ts +37 -0
- package/.aiwf/templates/api-server/template/tests/app.test.ts +40 -0
- package/.aiwf/templates/api-server/template/tsconfig.json +43 -0
- package/.aiwf/templates/npm-library/config.json +61 -0
- package/.aiwf/templates/npm-library/template/LICENSE +21 -0
- package/.aiwf/templates/npm-library/template/README.md +201 -0
- package/.aiwf/templates/npm-library/template/package.json +78 -0
- package/.aiwf/templates/web-app/config.json +53 -0
- package/.aiwf/templates/web-app/template/.aiwf/config.json +54 -0
- package/.aiwf/templates/web-app/template/.aiwf/feature-ledger.json +37 -0
- package/.aiwf/templates/web-app/template/.aiwf/personas/fullstack-developer.json +40 -0
- package/.aiwf/templates/web-app/template/.aiwf/scripts/cli.js +110 -0
- package/.aiwf/templates/web-app/template/.eslintrc.cjs +20 -0
- package/.aiwf/templates/web-app/template/README.md +151 -0
- package/.aiwf/templates/web-app/template/index.html +14 -0
- package/.aiwf/templates/web-app/template/package.json +44 -0
- package/.aiwf/templates/web-app/template/postcss.config.js +6 -0
- package/.aiwf/templates/web-app/template/public/vite.svg +1 -0
- package/.aiwf/templates/web-app/template/src/App.tsx +21 -0
- package/.aiwf/templates/web-app/template/src/components/Layout.tsx +57 -0
- package/.aiwf/templates/web-app/template/src/components/aiwf/ContextStatus.tsx +107 -0
- package/.aiwf/templates/web-app/template/src/components/aiwf/FeatureLedger.tsx +93 -0
- package/.aiwf/templates/web-app/template/src/components/aiwf/TokenUsage.tsx +71 -0
- package/.aiwf/templates/web-app/template/src/index.css +60 -0
- package/.aiwf/templates/web-app/template/src/main.tsx +10 -0
- package/.aiwf/templates/web-app/template/src/pages/AiwfDashboard.tsx +60 -0
- package/.aiwf/templates/web-app/template/src/pages/HomePage.tsx +89 -0
- package/.aiwf/templates/web-app/template/src/pages/NotFound.tsx +25 -0
- package/.aiwf/templates/web-app/template/src/stores/aiwfStore.ts +126 -0
- package/.aiwf/templates/web-app/template/src/types/global.d.ts +9 -0
- package/.aiwf/templates/web-app/template/src/vite-env.d.ts +1 -0
- package/.aiwf/templates/web-app/template/tailwind.config.js +30 -0
- package/.aiwf/templates/web-app/template/tsconfig.json +37 -0
- package/.aiwf/templates/web-app/template/tsconfig.node.json +10 -0
- package/.aiwf/templates/web-app/template/vite.config.ts +23 -0
- package/.aiwf/test-cache/86c7f9e80251abb8bedd58953ab0d1779e46b4f43ea33b63bffdb778106373b0.json +6 -0
- package/.aiwf/test-cache/9e252a90b80fce0585d7ed0646e7a9b4343e109f661f42a3ae678ba1ec5e22c7.json +7 -0
- package/.aiwf/test-results-s02.json +36 -0
- package/.aiwf/token-data/alerts.json +293 -0
- package/.aiwf/token-data/monitor-config.json +12 -0
- package/CHANGELOG.md +119 -33
- package/CHANGELOG_M02.md +52 -0
- package/CLAUDE.md +133 -199
- package/README.ko.md +5 -0
- package/README.md +31 -5
- package/RELEASE_NOTES_M02.md +177 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_create_feature_ledger.md +54 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_default_mode.md +66 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_docs.md +225 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_get_feature_details.md +78 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_link_feature_to_milestone.md +57 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_list_features.md +54 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_persona_architect.md +60 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_persona_backend.md +60 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_persona_data_analyst.md +60 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_persona_frontend.md +60 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_persona_security.md +60 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_persona_status.md +72 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_switch_language.md +160 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_update_feature_status.md +53 -0
- package/claude-code/aiwf/en/commands/ai-persona.js +667 -0
- package/claude-code/aiwf/en/commands/compress-context.js +355 -0
- package/claude-code/aiwf/en/commands/feature-ledger.js +565 -0
- package/claude-code/aiwf/en/commands/feature_commit_report.js +370 -0
- package/claude-code/aiwf/en/commands/scan_git_history.js +234 -0
- package/claude-code/aiwf/en/commands/sync_feature_commits.js +154 -0
- package/claude-code/aiwf/en/commands/token-tracking.js +443 -0
- package/claude-code/aiwf/en/config/commit-patterns.js +103 -0
- package/claude-code/aiwf/en/hooks/install-hooks.sh +100 -0
- package/claude-code/aiwf/en/hooks/post-commit +84 -0
- package/claude-code/aiwf/en/tests/compression-test-suite.js +1252 -0
- package/claude-code/aiwf/en/tests/test-git-integration.js +164 -0
- package/claude-code/aiwf/en/tests/token-tracking.test.js +537 -0
- package/claude-code/aiwf/en/utils/compression-metrics.js +1031 -0
- package/claude-code/aiwf/en/utils/compression-strategies.js +557 -0
- package/claude-code/aiwf/en/utils/content-normalizer.js +455 -0
- package/claude-code/aiwf/en/utils/context-compressor.js +583 -0
- package/claude-code/aiwf/en/utils/feature-updater.js +271 -0
- package/claude-code/aiwf/en/utils/git-utils.js +220 -0
- package/claude-code/aiwf/en/utils/importance-classifier.js +645 -0
- package/claude-code/aiwf/en/utils/information-filter.js +710 -0
- package/claude-code/aiwf/en/utils/text-summarizer.js +487 -0
- package/claude-code/aiwf/en/utils/token-counter.js +177 -0
- package/claude-code/aiwf/en/utils/token-monitor.js +484 -0
- package/claude-code/aiwf/en/utils/token-reporter.js +453 -0
- package/claude-code/aiwf/en/utils/token-storage.js +433 -0
- package/claude-code/aiwf/en/utils/token-tracker.js +283 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/FEATURE_ID_GENERATOR.md +138 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/FEATURE_INDEX.md +186 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/FEATURE_METADATA.md +240 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/FEATURE_WORKFLOW.md +183 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/README.md +94 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/active/FL001_/354/202/254/354/232/251/354/236/220_/354/235/270/354/246/235_/354/213/234/354/212/244/355/205/234.md +154 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/active/FL002_ai_/355/216/230/353/245/264/354/206/214/353/202/230_/354/213/234/354/212/244/355/205/234.md +272 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/completed/FL003_/353/213/244/352/265/255/354/226/264_/353/252/205/353/240/271/354/226/264_/355/221/234/354/244/200/355/231/224.md +266 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/schemas/feature_schema.json +122 -0
- package/claude-code/aiwf/ko/.aiwf/06_FEATURE_LEDGERS/schemas/feature_validator.cjs +406 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_code_review.md +62 -62
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_commit.md +111 -111
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_aggressive_persona.md +53 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_context.md +116 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_minimal_persona.md +48 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_stats.md +79 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_compress_with_persona.md +51 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_create_feature_ledger.md +54 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_create_general_task.md +106 -106
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_create_milestone_plan.md +127 -127
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_create_sprint_tasks.md +130 -130
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_create_sprints_from_milestone.md +87 -87
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_default_mode.md +44 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_do_task.md +72 -72
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_docs.md +225 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_evaluate.md +92 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_get_feature_details.md +78 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_initialize.md +86 -86
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_issue_create.md +3 -3
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_link_feature_to_milestone.md +57 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_list_features.md +54 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_architect.md +48 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_backend.md +37 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_data_analyst.md +37 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_frontend.md +37 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_security.md +48 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_persona_status.md +50 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_pr_create.md +14 -14
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_prime.md +5 -5
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_project_review.md +39 -39
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_switch_language.md +160 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_test.md +76 -77
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_testing_review.md +120 -120
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_ultrathink_general.md +209 -266
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_update_docs_kr.md +25 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_update_feature_status.md +53 -0
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_yolo.md +226 -226
- package/claude-code/aiwf/ko/CLAUDE.md +76 -0
- package/claude-code/aiwf/ko/ai-tools/README.md +105 -0
- package/claude-code/aiwf/ko/ai-tools/augment/README.md +371 -0
- package/claude-code/aiwf/ko/ai-tools/augment/config.json +30 -0
- package/claude-code/aiwf/ko/ai-tools/augment/template/.augment/aiwf-integration.md +387 -0
- package/claude-code/aiwf/ko/ai-tools/augment/template/.augment/augment.yaml +347 -0
- package/claude-code/aiwf/ko/ai-tools/augment/template/augment.config.json +64 -0
- package/claude-code/aiwf/ko/ai-tools/claude-code/README.md +151 -0
- package/claude-code/aiwf/ko/ai-tools/claude-code/config.json +28 -0
- package/claude-code/aiwf/ko/ai-tools/claude-code/template/CLAUDE.md +91 -0
- package/claude-code/aiwf/ko/ai-tools/cursor/README.md +314 -0
- package/claude-code/aiwf/ko/ai-tools/cursor/config.json +29 -0
- package/claude-code/aiwf/ko/ai-tools/cursor/template/.cursorrules +362 -0
- package/claude-code/aiwf/ko/ai-tools/github-copilot/README.md +195 -0
- package/claude-code/aiwf/ko/ai-tools/github-copilot/config.json +24 -0
- package/claude-code/aiwf/ko/ai-tools/github-copilot/template/.github/copilot-instructions.md +202 -0
- package/claude-code/aiwf/ko/ai-tools/windsurf/README.md +355 -0
- package/claude-code/aiwf/ko/ai-tools/windsurf/config.json +29 -0
- package/claude-code/aiwf/ko/ai-tools/windsurf/template/.windsurf/aiwf-rules.md +260 -0
- package/claude-code/aiwf/ko/ai-tools/windsurf/template/.windsurf/windsurf.config.js +312 -0
- package/claude-code/aiwf/ko/ai-tools/windsurf/template/windsurf.config.json +63 -0
- package/claude-code/aiwf/ko/bin/aiwf-create.js +56 -0
- package/claude-code/aiwf/ko/bin/aiwf.js +21 -0
- package/claude-code/aiwf/ko/commands/ai-persona.js +602 -0
- package/claude-code/aiwf/ko/commands/compress-context.js +389 -0
- package/claude-code/aiwf/ko/commands/evaluate.js +246 -0
- package/claude-code/aiwf/ko/commands/feature-ledger.js +565 -0
- package/claude-code/aiwf/ko/commands/feature_commit_report.js +370 -0
- package/claude-code/aiwf/ko/commands/persona-context-apply.js +562 -0
- package/claude-code/aiwf/ko/commands/scan_git_history.js +234 -0
- package/claude-code/aiwf/ko/commands/sync_feature_commits.js +154 -0
- package/claude-code/aiwf/ko/commands/token-tracking.js +443 -0
- package/claude-code/aiwf/ko/config/commit-patterns.js +103 -0
- package/claude-code/aiwf/ko/config/language.json +6 -0
- package/claude-code/aiwf/ko/docs/00_PROJECT_MANIFEST.md +183 -0
- package/claude-code/aiwf/ko/docs/ARCHITECTURE.md +121 -0
- package/claude-code/aiwf/ko/docs/FEATURE_LEDGER_ADVANCED_USE_CASES.md +412 -0
- package/claude-code/aiwf/ko/docs/FEATURE_LEDGER_API_REFERENCE.md +361 -0
- package/claude-code/aiwf/ko/docs/FEATURE_LEDGER_COMMANDS_GUIDE.md +254 -0
- package/claude-code/aiwf/ko/docs/FEATURE_LEDGER_FAQ.md +365 -0
- package/claude-code/aiwf/ko/docs/FEATURE_LEDGER_SYSTEM_OVERVIEW.md +305 -0
- package/claude-code/aiwf/ko/docs/FEATURE_LEDGER_USER_GUIDE.md +416 -0
- package/claude-code/aiwf/ko/docs/FEATURE_LEDGER_/354/213/234/354/236/221_/352/260/200/354/235/264/353/223/234.md +247 -0
- package/claude-code/aiwf/ko/feature-ledger/FL-001-authentication.json +52 -0
- package/claude-code/aiwf/ko/feature-ledger/feature-index.json +20 -0
- package/claude-code/aiwf/ko/hooks/install-hooks.sh +100 -0
- package/claude-code/aiwf/ko/hooks/post-commit +84 -0
- package/claude-code/aiwf/ko/personas/PERSONA_INDEX.md +57 -0
- package/claude-code/aiwf/ko/personas/analyst.json +44 -0
- package/claude-code/aiwf/ko/personas/architect/best_practices.md +136 -0
- package/claude-code/aiwf/ko/personas/architect/knowledge_base.md +377 -0
- package/claude-code/aiwf/ko/personas/architect.json +44 -0
- package/claude-code/aiwf/ko/personas/backend/best_practices.md +766 -0
- package/claude-code/aiwf/ko/personas/backend/knowledge_base.md +1070 -0
- package/claude-code/aiwf/ko/personas/data_analyst/best_practices.md +594 -0
- package/claude-code/aiwf/ko/personas/data_analyst/knowledge_base.md +1057 -0
- package/claude-code/aiwf/ko/personas/developer.json +44 -0
- package/claude-code/aiwf/ko/personas/developer.md +37 -0
- package/claude-code/aiwf/ko/personas/evaluation_criteria.json +137 -0
- package/claude-code/aiwf/ko/personas/frontend/best_practices.md +445 -0
- package/claude-code/aiwf/ko/personas/frontend/knowledge_base.md +729 -0
- package/claude-code/aiwf/ko/personas/persona-index.json +31 -0
- package/claude-code/aiwf/ko/personas/reviewer.json +44 -0
- package/claude-code/aiwf/ko/personas/security/best_practices.md +307 -0
- package/claude-code/aiwf/ko/personas/security/knowledge_base.md +498 -0
- package/claude-code/aiwf/ko/personas/tester.json +44 -0
- package/claude-code/aiwf/ko/scripts/cache-templates.js +209 -0
- package/claude-code/aiwf/ko/scripts/create-offline.js +86 -0
- package/claude-code/aiwf/ko/scripts/create-project.js +151 -0
- package/claude-code/aiwf/ko/scripts/feature-progress-calculator.cjs +236 -0
- package/claude-code/aiwf/ko/scripts/git-integration.cjs +391 -0
- package/claude-code/aiwf/ko/scripts/install-git-hooks.cjs +226 -0
- package/claude-code/aiwf/ko/scripts/test-commit-parsing.cjs +125 -0
- package/claude-code/aiwf/ko/scripts/update-feature-status.cjs +198 -0
- package/claude-code/aiwf/ko/templates/README.md +78 -0
- package/claude-code/aiwf/ko/templates/api-server/config.json +64 -0
- package/claude-code/aiwf/ko/templates/api-server/template/.aiwf/config.json +56 -0
- package/claude-code/aiwf/ko/templates/api-server/template/.aiwf/feature-ledger.json +42 -0
- package/claude-code/aiwf/ko/templates/api-server/template/.aiwf/personas/backend-engineer.json +40 -0
- package/claude-code/aiwf/ko/templates/api-server/template/.aiwf/scripts/cli.js +111 -0
- package/claude-code/aiwf/ko/templates/api-server/template/.env.example +29 -0
- package/claude-code/aiwf/ko/templates/api-server/template/.eslintrc.json +23 -0
- package/claude-code/aiwf/ko/templates/api-server/template/README.md +171 -0
- package/claude-code/aiwf/ko/templates/api-server/template/jest.config.js +26 -0
- package/claude-code/aiwf/ko/templates/api-server/template/nodemon.json +9 -0
- package/claude-code/aiwf/ko/templates/api-server/template/package.json +61 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/app.ts +60 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/config/swagger.ts +38 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/controllers/aiwfController.ts +68 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/controllers/authController.ts +128 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/controllers/statusController.ts +28 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/index.ts +28 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/middleware/aiwfMiddleware.ts +50 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/middleware/authMiddleware.ts +41 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/middleware/errorHandler.ts +42 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/middleware/notFoundHandler.ts +14 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/middleware/requestLogger.ts +20 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/routes/aiwf.ts +42 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/routes/index.ts +13 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/routes/v1/index.ts +67 -0
- package/claude-code/aiwf/ko/templates/api-server/template/src/utils/logger.ts +37 -0
- package/claude-code/aiwf/ko/templates/api-server/template/tests/app.test.ts +40 -0
- package/claude-code/aiwf/ko/templates/api-server/template/tsconfig.json +43 -0
- package/claude-code/aiwf/ko/templates/npm-library/config.json +61 -0
- package/claude-code/aiwf/ko/templates/npm-library/template/LICENSE +21 -0
- package/claude-code/aiwf/ko/templates/npm-library/template/README.md +201 -0
- package/claude-code/aiwf/ko/templates/npm-library/template/package.json +78 -0
- package/claude-code/aiwf/ko/templates/web-app/config.json +53 -0
- package/claude-code/aiwf/ko/templates/web-app/template/.aiwf/config.json +54 -0
- package/claude-code/aiwf/ko/templates/web-app/template/.aiwf/feature-ledger.json +37 -0
- package/claude-code/aiwf/ko/templates/web-app/template/.aiwf/personas/fullstack-developer.json +40 -0
- package/claude-code/aiwf/ko/templates/web-app/template/.aiwf/scripts/cli.js +110 -0
- package/claude-code/aiwf/ko/templates/web-app/template/.eslintrc.cjs +20 -0
- package/claude-code/aiwf/ko/templates/web-app/template/README.md +151 -0
- package/claude-code/aiwf/ko/templates/web-app/template/index.html +14 -0
- package/claude-code/aiwf/ko/templates/web-app/template/package.json +44 -0
- package/claude-code/aiwf/ko/templates/web-app/template/postcss.config.js +6 -0
- package/claude-code/aiwf/ko/templates/web-app/template/public/vite.svg +1 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/App.tsx +21 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/components/Layout.tsx +57 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/components/aiwf/ContextStatus.tsx +107 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/components/aiwf/FeatureLedger.tsx +93 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/components/aiwf/TokenUsage.tsx +71 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/index.css +60 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/main.tsx +10 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/pages/AiwfDashboard.tsx +60 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/pages/HomePage.tsx +89 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/pages/NotFound.tsx +25 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/stores/aiwfStore.ts +126 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/types/global.d.ts +9 -0
- package/claude-code/aiwf/ko/templates/web-app/template/src/vite-env.d.ts +1 -0
- package/claude-code/aiwf/ko/templates/web-app/template/tailwind.config.js +30 -0
- package/claude-code/aiwf/ko/templates/web-app/template/tsconfig.json +37 -0
- package/claude-code/aiwf/ko/templates/web-app/template/tsconfig.node.json +10 -0
- package/claude-code/aiwf/ko/templates/web-app/template/vite.config.ts +23 -0
- package/claude-code/aiwf/ko/tests/compression-test-suite.js +1252 -0
- package/claude-code/aiwf/ko/tests/test-git-integration.js +164 -0
- package/claude-code/aiwf/ko/tests/token-tracking.test.js +537 -0
- package/claude-code/aiwf/ko/token-data/alerts.json +293 -0
- package/claude-code/aiwf/ko/token-data/monitor-config.json +12 -0
- package/claude-code/aiwf/ko/utils/background-monitor.js +223 -0
- package/claude-code/aiwf/ko/utils/compression-metrics.js +1031 -0
- package/claude-code/aiwf/ko/utils/compression-strategies.js +557 -0
- package/claude-code/aiwf/ko/utils/content-normalizer.js +455 -0
- package/claude-code/aiwf/ko/utils/context-compressor.js +583 -0
- package/claude-code/aiwf/ko/utils/context-rule-parser.js +180 -0
- package/claude-code/aiwf/ko/utils/context-token-monitor.js +463 -0
- package/claude-code/aiwf/ko/utils/context-update-manager.js +502 -0
- package/claude-code/aiwf/ko/utils/feature-updater.js +271 -0
- package/claude-code/aiwf/ko/utils/git-utils.js +220 -0
- package/claude-code/aiwf/ko/utils/importance-classifier.js +645 -0
- package/claude-code/aiwf/ko/utils/information-filter.js +710 -0
- package/claude-code/aiwf/ko/utils/persona-aware-compressor.js +598 -0
- package/claude-code/aiwf/ko/utils/prompt-injector.js +242 -0
- package/claude-code/aiwf/ko/utils/simplified-evaluator.js +119 -0
- package/claude-code/aiwf/ko/utils/text-summarizer.js +492 -0
- package/claude-code/aiwf/ko/utils/token-counter.js +177 -0
- package/claude-code/aiwf/ko/utils/token-monitor.js +484 -0
- package/claude-code/aiwf/ko/utils/token-reporter.js +453 -0
- package/claude-code/aiwf/ko/utils/token-storage.js +433 -0
- package/claude-code/aiwf/ko/utils/token-tracker.js +283 -0
- package/docs/AI-WORKFLOW.ko.md +9 -2
- package/docs/AI-WORKFLOW.md +9 -2
- package/docs/AI_PERSONA_SYSTEM_DESIGN.md +516 -0
- package/docs/API_DOCUMENTATION.md +932 -0
- package/docs/API_REFERENCE.md +979 -0
- package/docs/COMMANDS_GUIDE.ko.md +101 -5
- package/docs/COMMANDS_GUIDE.md +289 -5
- package/docs/CONTRIBUTING.ko.md +408 -0
- package/docs/CONTRIBUTING.md +205 -203
- package/docs/EXAMPLES.md +691 -0
- package/docs/Enhanced_Installation_Flow_Design.md +498 -0
- package/docs/GETTING_STARTED.md +480 -0
- package/docs/PERFORMANCE_ARCHITECTURE.md +494 -0
- package/docs/PERFORMANCE_GUIDELINES.md +553 -0
- package/docs/PRD.ko.md +110 -58
- package/docs/PRD.md +110 -58
- package/docs/TROUBLESHOOTING.md +721 -0
- package/docs/git-feature-integration-guide.md +253 -0
- package/docs/guides/ai-personas-guide-ko.md +239 -0
- package/docs/guides/ai-personas-guide.md +239 -0
- package/docs/guides/context-compression-guide-ko.md +313 -0
- package/docs/guides/context-compression-guide.md +313 -0
- package/docs/guides/feature-git-integration-guide-ko.md +481 -0
- package/docs/guides/feature-git-integration-guide.md +481 -0
- package/docs/lightweight-evaluation.md +198 -0
- package/docs/m02-dod-checklist.md +125 -0
- package/docs/m02-gap-analysis.md +214 -0
- package/docs/m02-milestone-completion-report.md +186 -0
- package/docs/m02-milestone-executive-summary.md +68 -0
- package/docs/offline-template-cache.md +323 -0
- package/docs/performance-benchmark-report.md +159 -0
- package/docs/persona-aware-compression.md +168 -0
- package/docs/reports/S02-sprint-report.md +190 -0
- package/docs/usability-test-report.md +170 -0
- package/index.js +1349 -21
- package/jest.config.js +23 -0
- package/language-cli.js +279 -0
- package/language-utils.js +330 -0
- package/lib/ai-persona-manager.js +711 -0
- package/lib/cache-cli.js +459 -0
- package/lib/cache-integration.js +401 -0
- package/lib/cache-system.js +332 -0
- package/lib/context-engine.js +568 -0
- package/lib/file-batch-processor.js +401 -0
- package/lib/memory-profiler.js +471 -0
- package/lib/metrics-collector.js +885 -0
- package/lib/offline-detector.js +386 -0
- package/lib/performance-benchmark.js +621 -0
- package/lib/task-analyzer.js +599 -0
- package/lib/template-cache-system.js +559 -0
- package/lib/template-downloader.js +467 -0
- package/lib/template-manager.js +310 -0
- package/lib/template-version-manager.js +491 -0
- package/lib/token-optimizer.js +517 -0
- package/package.json +17 -6
- package/scripts/run-integration-tests.js +317 -0
- package/scripts/validate-commands.cjs +338 -0
- package/scripts/validate-commands.js +254 -0
- package/src/commands/ai-tool.js +383 -0
- package/test-token-system.js +88 -0
- package/tests/application.test.js +260 -0
- package/tests/basic.test.js +62 -0
- package/tests/commands.test.js +127 -0
- package/tests/installer.test.js +129 -0
- package/tests/integration/ai-persona-system.test.js +396 -0
- package/tests/integration/ai-persona.test.js +390 -0
- package/tests/integration/command-integration.test.js +600 -0
- package/tests/integration/context-compression.test.js +361 -0
- package/tests/integration/feature-ledger.test.js +226 -0
- package/tests/integration/git-integration.test.js +307 -0
- package/tests/integration/m02-milestone.test.js +420 -0
- package/tests/integration/persona-context-application.test.js +508 -0
- package/tests/integration/setup.js +174 -0
- package/tests/integration/test-persona-aware-compression.js +93 -0
- package/tests/language-utils.test.js +287 -0
- package/tests/s02-integration.test.js +422 -0
- package/tests/unit/ai-persona-manager.test.js +514 -0
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_prime_context.md +0 -5
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_prime_context.md +0 -8
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { performance } from 'perf_hooks';
|
|
4
|
+
import { Worker } from 'worker_threads';
|
|
5
|
+
import fs from 'fs/promises';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { MemoryProfiler } from './memory-profiler.js';
|
|
8
|
+
import { GitHubAPICache } from './cache-system.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 성능 벤치마크 도구
|
|
12
|
+
* - 다양한 성능 메트릭 측정
|
|
13
|
+
* - 부하 테스트 실행
|
|
14
|
+
* - 성능 회귀 감지
|
|
15
|
+
*/
|
|
16
|
+
class PerformanceBenchmark {
|
|
17
|
+
constructor(options = {}) {
|
|
18
|
+
this.options = {
|
|
19
|
+
iterations: options.iterations || 100,
|
|
20
|
+
warmupIterations: options.warmupIterations || 10,
|
|
21
|
+
memoryProfiling: options.memoryProfiling || false,
|
|
22
|
+
concurrency: options.concurrency || 1,
|
|
23
|
+
timeout: options.timeout || 30000,
|
|
24
|
+
...options
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
this.results = [];
|
|
28
|
+
this.memoryProfiler = new MemoryProfiler();
|
|
29
|
+
this.benchmarkHistory = new Map();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 벤치마크 실행
|
|
33
|
+
async run(testSuite) {
|
|
34
|
+
console.log(`Starting benchmark suite: ${testSuite.name}`);
|
|
35
|
+
|
|
36
|
+
if (this.options.memoryProfiling) {
|
|
37
|
+
this.memoryProfiler.startProfiling();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const suiteResults = {
|
|
41
|
+
name: testSuite.name,
|
|
42
|
+
timestamp: Date.now(),
|
|
43
|
+
tests: [],
|
|
44
|
+
summary: {}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// 각 테스트 실행
|
|
48
|
+
for (const test of testSuite.tests) {
|
|
49
|
+
console.log(`Running test: ${test.name}`);
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
const testResult = await this.runTest(test);
|
|
53
|
+
suiteResults.tests.push(testResult);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
suiteResults.tests.push({
|
|
56
|
+
name: test.name,
|
|
57
|
+
error: error.message,
|
|
58
|
+
status: 'failed'
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 요약 생성
|
|
64
|
+
suiteResults.summary = this.generateSummary(suiteResults.tests);
|
|
65
|
+
|
|
66
|
+
if (this.options.memoryProfiling) {
|
|
67
|
+
this.memoryProfiler.stopProfiling();
|
|
68
|
+
suiteResults.memoryReport = this.memoryProfiler.generateReport();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
this.results.push(suiteResults);
|
|
72
|
+
this.benchmarkHistory.set(testSuite.name, suiteResults);
|
|
73
|
+
|
|
74
|
+
return suiteResults;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 개별 테스트 실행
|
|
78
|
+
async runTest(test) {
|
|
79
|
+
const testResult = {
|
|
80
|
+
name: test.name,
|
|
81
|
+
status: 'running',
|
|
82
|
+
iterations: this.options.iterations,
|
|
83
|
+
warmupIterations: this.options.warmupIterations,
|
|
84
|
+
metrics: {
|
|
85
|
+
duration: [],
|
|
86
|
+
memory: [],
|
|
87
|
+
throughput: [],
|
|
88
|
+
errors: 0
|
|
89
|
+
},
|
|
90
|
+
statistics: {}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// 워밍업 실행
|
|
94
|
+
await this.warmup(test);
|
|
95
|
+
|
|
96
|
+
// 메인 벤치마크 실행
|
|
97
|
+
const startTime = performance.now();
|
|
98
|
+
|
|
99
|
+
for (let i = 0; i < this.options.iterations; i++) {
|
|
100
|
+
const iterationStartTime = performance.now();
|
|
101
|
+
const memoryBefore = process.memoryUsage();
|
|
102
|
+
|
|
103
|
+
try {
|
|
104
|
+
const result = await Promise.race([
|
|
105
|
+
this.executeTest(test),
|
|
106
|
+
this.createTimeout(this.options.timeout)
|
|
107
|
+
]);
|
|
108
|
+
|
|
109
|
+
const iterationEndTime = performance.now();
|
|
110
|
+
const memoryAfter = process.memoryUsage();
|
|
111
|
+
|
|
112
|
+
// 메트릭 수집
|
|
113
|
+
testResult.metrics.duration.push(iterationEndTime - iterationStartTime);
|
|
114
|
+
testResult.metrics.memory.push(memoryAfter.heapUsed - memoryBefore.heapUsed);
|
|
115
|
+
|
|
116
|
+
if (result && result.throughput) {
|
|
117
|
+
testResult.metrics.throughput.push(result.throughput);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
} catch (error) {
|
|
121
|
+
testResult.metrics.errors++;
|
|
122
|
+
console.warn(`Test iteration ${i} failed:`, error.message);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const endTime = performance.now();
|
|
127
|
+
testResult.totalTime = endTime - startTime;
|
|
128
|
+
testResult.status = 'completed';
|
|
129
|
+
|
|
130
|
+
// 통계 계산
|
|
131
|
+
testResult.statistics = this.calculateStatistics(testResult.metrics);
|
|
132
|
+
|
|
133
|
+
return testResult;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 워밍업 실행
|
|
137
|
+
async warmup(test) {
|
|
138
|
+
console.log(`Warming up: ${test.name}`);
|
|
139
|
+
|
|
140
|
+
for (let i = 0; i < this.options.warmupIterations; i++) {
|
|
141
|
+
try {
|
|
142
|
+
await this.executeTest(test);
|
|
143
|
+
} catch (error) {
|
|
144
|
+
// 워밍업 실패는 무시
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// 테스트 실행
|
|
150
|
+
async executeTest(test) {
|
|
151
|
+
if (this.options.concurrency > 1) {
|
|
152
|
+
return await this.executeConcurrentTest(test);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return await test.fn();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// 동시성 테스트 실행
|
|
159
|
+
async executeConcurrentTest(test) {
|
|
160
|
+
const promises = [];
|
|
161
|
+
|
|
162
|
+
for (let i = 0; i < this.options.concurrency; i++) {
|
|
163
|
+
promises.push(test.fn());
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const results = await Promise.allSettled(promises);
|
|
167
|
+
const successfulResults = results.filter(r => r.status === 'fulfilled');
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
totalRequests: this.options.concurrency,
|
|
171
|
+
successfulRequests: successfulResults.length,
|
|
172
|
+
failedRequests: results.length - successfulResults.length,
|
|
173
|
+
throughput: successfulResults.length / (Date.now() / 1000)
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// 타임아웃 생성
|
|
178
|
+
createTimeout(timeout) {
|
|
179
|
+
return new Promise((_, reject) => {
|
|
180
|
+
setTimeout(() => reject(new Error('Test timeout')), timeout);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 통계 계산
|
|
185
|
+
calculateStatistics(metrics) {
|
|
186
|
+
const stats = {};
|
|
187
|
+
|
|
188
|
+
['duration', 'memory', 'throughput'].forEach(metric => {
|
|
189
|
+
if (metrics[metric].length > 0) {
|
|
190
|
+
const sorted = metrics[metric].slice().sort((a, b) => a - b);
|
|
191
|
+
|
|
192
|
+
stats[metric] = {
|
|
193
|
+
min: sorted[0],
|
|
194
|
+
max: sorted[sorted.length - 1],
|
|
195
|
+
avg: sorted.reduce((a, b) => a + b, 0) / sorted.length,
|
|
196
|
+
median: this.calculateMedian(sorted),
|
|
197
|
+
p95: this.calculatePercentile(sorted, 95),
|
|
198
|
+
p99: this.calculatePercentile(sorted, 99),
|
|
199
|
+
stddev: this.calculateStandardDeviation(sorted)
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
stats.errorRate = metrics.errors / (metrics.duration.length + metrics.errors);
|
|
205
|
+
|
|
206
|
+
return stats;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// 중간값 계산
|
|
210
|
+
calculateMedian(sorted) {
|
|
211
|
+
const mid = Math.floor(sorted.length / 2);
|
|
212
|
+
return sorted.length % 2 === 0 ?
|
|
213
|
+
(sorted[mid - 1] + sorted[mid]) / 2 :
|
|
214
|
+
sorted[mid];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// 백분위수 계산
|
|
218
|
+
calculatePercentile(sorted, percentile) {
|
|
219
|
+
const index = Math.ceil((percentile / 100) * sorted.length) - 1;
|
|
220
|
+
return sorted[Math.max(0, Math.min(index, sorted.length - 1))];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// 표준편차 계산
|
|
224
|
+
calculateStandardDeviation(values) {
|
|
225
|
+
const avg = values.reduce((a, b) => a + b, 0) / values.length;
|
|
226
|
+
const variance = values.reduce((a, b) => a + Math.pow(b - avg, 2), 0) / values.length;
|
|
227
|
+
return Math.sqrt(variance);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// 요약 생성
|
|
231
|
+
generateSummary(tests) {
|
|
232
|
+
const summary = {
|
|
233
|
+
totalTests: tests.length,
|
|
234
|
+
passedTests: tests.filter(t => t.status === 'completed').length,
|
|
235
|
+
failedTests: tests.filter(t => t.status === 'failed').length,
|
|
236
|
+
averageDuration: 0,
|
|
237
|
+
totalDuration: 0,
|
|
238
|
+
memoryUsage: {
|
|
239
|
+
min: Infinity,
|
|
240
|
+
max: 0,
|
|
241
|
+
avg: 0
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
const completedTests = tests.filter(t => t.status === 'completed');
|
|
246
|
+
|
|
247
|
+
if (completedTests.length > 0) {
|
|
248
|
+
summary.totalDuration = completedTests.reduce((sum, test) => sum + test.totalTime, 0);
|
|
249
|
+
summary.averageDuration = summary.totalDuration / completedTests.length;
|
|
250
|
+
|
|
251
|
+
// 메모리 사용량 요약
|
|
252
|
+
const memoryStats = completedTests.map(t => t.statistics.memory).filter(Boolean);
|
|
253
|
+
if (memoryStats.length > 0) {
|
|
254
|
+
summary.memoryUsage.min = Math.min(...memoryStats.map(s => s.min));
|
|
255
|
+
summary.memoryUsage.max = Math.max(...memoryStats.map(s => s.max));
|
|
256
|
+
summary.memoryUsage.avg = memoryStats.reduce((sum, s) => sum + s.avg, 0) / memoryStats.length;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return summary;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// 부하 테스트 실행
|
|
264
|
+
async runLoadTest(testConfig) {
|
|
265
|
+
const {
|
|
266
|
+
name,
|
|
267
|
+
target,
|
|
268
|
+
duration = 60000, // 1분
|
|
269
|
+
concurrency = 10,
|
|
270
|
+
rampUp = 5000 // 5초
|
|
271
|
+
} = testConfig;
|
|
272
|
+
|
|
273
|
+
console.log(`Starting load test: ${name}`);
|
|
274
|
+
console.log(`Target: ${target}, Duration: ${duration}ms, Concurrency: ${concurrency}`);
|
|
275
|
+
|
|
276
|
+
const loadTestResult = {
|
|
277
|
+
name,
|
|
278
|
+
config: testConfig,
|
|
279
|
+
timestamp: Date.now(),
|
|
280
|
+
metrics: {
|
|
281
|
+
totalRequests: 0,
|
|
282
|
+
successfulRequests: 0,
|
|
283
|
+
failedRequests: 0,
|
|
284
|
+
averageResponseTime: 0,
|
|
285
|
+
responseTimePercentiles: {},
|
|
286
|
+
throughput: 0,
|
|
287
|
+
errorRate: 0
|
|
288
|
+
},
|
|
289
|
+
timeline: []
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
const startTime = Date.now();
|
|
293
|
+
const workers = [];
|
|
294
|
+
const results = [];
|
|
295
|
+
|
|
296
|
+
// 점진적 부하 증가
|
|
297
|
+
for (let i = 0; i < concurrency; i++) {
|
|
298
|
+
setTimeout(() => {
|
|
299
|
+
const worker = this.createLoadTestWorker(target, duration, results);
|
|
300
|
+
workers.push(worker);
|
|
301
|
+
}, (i / concurrency) * rampUp);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// 테스트 완료 대기
|
|
305
|
+
await new Promise(resolve => setTimeout(resolve, duration + rampUp));
|
|
306
|
+
|
|
307
|
+
// 워커 정리
|
|
308
|
+
workers.forEach(worker => worker.terminate());
|
|
309
|
+
|
|
310
|
+
// 결과 분석
|
|
311
|
+
loadTestResult.metrics = this.analyzeLoadTestResults(results);
|
|
312
|
+
loadTestResult.duration = Date.now() - startTime;
|
|
313
|
+
|
|
314
|
+
return loadTestResult;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// 부하 테스트 워커 생성
|
|
318
|
+
createLoadTestWorker(target, duration, results) {
|
|
319
|
+
const worker = new Worker(`
|
|
320
|
+
const { parentPort } = require('worker_threads');
|
|
321
|
+
const startTime = Date.now();
|
|
322
|
+
|
|
323
|
+
async function runRequests() {
|
|
324
|
+
while (Date.now() - startTime < ${duration}) {
|
|
325
|
+
const requestStartTime = Date.now();
|
|
326
|
+
|
|
327
|
+
try {
|
|
328
|
+
// 실제 요청 실행 (예: HTTP 요청)
|
|
329
|
+
await new Promise(resolve => setTimeout(resolve, Math.random() * 100));
|
|
330
|
+
|
|
331
|
+
const responseTime = Date.now() - requestStartTime;
|
|
332
|
+
parentPort.postMessage({
|
|
333
|
+
type: 'success',
|
|
334
|
+
responseTime,
|
|
335
|
+
timestamp: Date.now()
|
|
336
|
+
});
|
|
337
|
+
} catch (error) {
|
|
338
|
+
parentPort.postMessage({
|
|
339
|
+
type: 'error',
|
|
340
|
+
error: error.message,
|
|
341
|
+
timestamp: Date.now()
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
runRequests();
|
|
348
|
+
`, { eval: true });
|
|
349
|
+
|
|
350
|
+
worker.on('message', (message) => {
|
|
351
|
+
results.push(message);
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
return worker;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// 부하 테스트 결과 분석
|
|
358
|
+
analyzeLoadTestResults(results) {
|
|
359
|
+
const successful = results.filter(r => r.type === 'success');
|
|
360
|
+
const failed = results.filter(r => r.type === 'error');
|
|
361
|
+
|
|
362
|
+
const responseTimes = successful.map(r => r.responseTime);
|
|
363
|
+
const sorted = responseTimes.slice().sort((a, b) => a - b);
|
|
364
|
+
|
|
365
|
+
return {
|
|
366
|
+
totalRequests: results.length,
|
|
367
|
+
successfulRequests: successful.length,
|
|
368
|
+
failedRequests: failed.length,
|
|
369
|
+
averageResponseTime: responseTimes.reduce((a, b) => a + b, 0) / responseTimes.length,
|
|
370
|
+
responseTimePercentiles: {
|
|
371
|
+
p50: this.calculatePercentile(sorted, 50),
|
|
372
|
+
p95: this.calculatePercentile(sorted, 95),
|
|
373
|
+
p99: this.calculatePercentile(sorted, 99)
|
|
374
|
+
},
|
|
375
|
+
throughput: successful.length / (results.length > 0 ?
|
|
376
|
+
(Math.max(...results.map(r => r.timestamp)) - Math.min(...results.map(r => r.timestamp))) / 1000 : 1),
|
|
377
|
+
errorRate: failed.length / results.length
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// 성능 회귀 감지
|
|
382
|
+
detectPerformanceRegression(currentResult, baselineResult) {
|
|
383
|
+
const regression = {
|
|
384
|
+
detected: false,
|
|
385
|
+
issues: [],
|
|
386
|
+
improvements: []
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
const thresholds = {
|
|
390
|
+
duration: 0.2, // 20% 증가
|
|
391
|
+
memory: 0.3, // 30% 증가
|
|
392
|
+
throughput: -0.1 // 10% 감소
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
// 지속 시간 회귀 검사
|
|
396
|
+
const durationChange = (currentResult.statistics.duration.avg - baselineResult.statistics.duration.avg) / baselineResult.statistics.duration.avg;
|
|
397
|
+
|
|
398
|
+
if (durationChange > thresholds.duration) {
|
|
399
|
+
regression.detected = true;
|
|
400
|
+
regression.issues.push({
|
|
401
|
+
metric: 'duration',
|
|
402
|
+
change: durationChange,
|
|
403
|
+
threshold: thresholds.duration
|
|
404
|
+
});
|
|
405
|
+
} else if (durationChange < -thresholds.duration) {
|
|
406
|
+
regression.improvements.push({
|
|
407
|
+
metric: 'duration',
|
|
408
|
+
change: durationChange
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// 메모리 회귀 검사
|
|
413
|
+
if (currentResult.statistics.memory && baselineResult.statistics.memory) {
|
|
414
|
+
const memoryChange = (currentResult.statistics.memory.avg - baselineResult.statistics.memory.avg) / baselineResult.statistics.memory.avg;
|
|
415
|
+
|
|
416
|
+
if (memoryChange > thresholds.memory) {
|
|
417
|
+
regression.detected = true;
|
|
418
|
+
regression.issues.push({
|
|
419
|
+
metric: 'memory',
|
|
420
|
+
change: memoryChange,
|
|
421
|
+
threshold: thresholds.memory
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
return regression;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// 보고서 생성
|
|
430
|
+
generateReport() {
|
|
431
|
+
const report = {
|
|
432
|
+
timestamp: Date.now(),
|
|
433
|
+
summary: {
|
|
434
|
+
totalSuites: this.results.length,
|
|
435
|
+
totalTests: this.results.reduce((sum, suite) => sum + suite.tests.length, 0),
|
|
436
|
+
overallStatus: this.results.every(suite => suite.tests.every(test => test.status === 'completed')) ? 'passed' : 'failed'
|
|
437
|
+
},
|
|
438
|
+
suites: this.results,
|
|
439
|
+
configuration: this.options,
|
|
440
|
+
systemInfo: {
|
|
441
|
+
nodeVersion: process.version,
|
|
442
|
+
platform: process.platform,
|
|
443
|
+
arch: process.arch,
|
|
444
|
+
memory: process.memoryUsage()
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
return report;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// 보고서 저장
|
|
452
|
+
async saveReport(filePath) {
|
|
453
|
+
const report = this.generateReport();
|
|
454
|
+
await fs.writeFile(filePath, JSON.stringify(report, null, 2));
|
|
455
|
+
return filePath;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// HTML 보고서 생성
|
|
459
|
+
async generateHTMLReport(filePath) {
|
|
460
|
+
const report = this.generateReport();
|
|
461
|
+
const html = this.generateHTMLTemplate(report);
|
|
462
|
+
await fs.writeFile(filePath, html);
|
|
463
|
+
return filePath;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// HTML 템플릿 생성
|
|
467
|
+
generateHTMLTemplate(report) {
|
|
468
|
+
return `
|
|
469
|
+
<!DOCTYPE html>
|
|
470
|
+
<html>
|
|
471
|
+
<head>
|
|
472
|
+
<title>Performance Benchmark Report</title>
|
|
473
|
+
<style>
|
|
474
|
+
body { font-family: Arial, sans-serif; margin: 20px; }
|
|
475
|
+
.summary { background: #f5f5f5; padding: 15px; border-radius: 5px; }
|
|
476
|
+
.test-suite { margin: 20px 0; border: 1px solid #ddd; padding: 15px; border-radius: 5px; }
|
|
477
|
+
.test { margin: 10px 0; padding: 10px; background: #fafafa; border-radius: 3px; }
|
|
478
|
+
.passed { border-left: 4px solid #4CAF50; }
|
|
479
|
+
.failed { border-left: 4px solid #f44336; }
|
|
480
|
+
.metric { display: inline-block; margin: 5px 10px; }
|
|
481
|
+
.chart { width: 100%; height: 200px; margin: 10px 0; }
|
|
482
|
+
table { width: 100%; border-collapse: collapse; }
|
|
483
|
+
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
|
|
484
|
+
th { background-color: #f2f2f2; }
|
|
485
|
+
</style>
|
|
486
|
+
</head>
|
|
487
|
+
<body>
|
|
488
|
+
<h1>Performance Benchmark Report</h1>
|
|
489
|
+
|
|
490
|
+
<div class="summary">
|
|
491
|
+
<h2>Summary</h2>
|
|
492
|
+
<p>Generated: ${new Date(report.timestamp).toLocaleString()}</p>
|
|
493
|
+
<p>Total Suites: ${report.summary.totalSuites}</p>
|
|
494
|
+
<p>Total Tests: ${report.summary.totalTests}</p>
|
|
495
|
+
<p>Overall Status: ${report.summary.overallStatus}</p>
|
|
496
|
+
</div>
|
|
497
|
+
|
|
498
|
+
${report.suites.map(suite => `
|
|
499
|
+
<div class="test-suite">
|
|
500
|
+
<h3>${suite.name}</h3>
|
|
501
|
+
<p>Tests: ${suite.tests.length}</p>
|
|
502
|
+
<p>Duration: ${suite.summary.totalDuration.toFixed(2)}ms</p>
|
|
503
|
+
|
|
504
|
+
${suite.tests.map(test => `
|
|
505
|
+
<div class="test ${test.status}">
|
|
506
|
+
<h4>${test.name}</h4>
|
|
507
|
+
<div class="metric">Duration: ${test.statistics.duration?.avg.toFixed(2)}ms</div>
|
|
508
|
+
<div class="metric">Memory: ${test.statistics.memory?.avg.toFixed(2)} bytes</div>
|
|
509
|
+
<div class="metric">Error Rate: ${(test.statistics.errorRate * 100).toFixed(2)}%</div>
|
|
510
|
+
</div>
|
|
511
|
+
`).join('')}
|
|
512
|
+
</div>
|
|
513
|
+
`).join('')}
|
|
514
|
+
|
|
515
|
+
<div class="summary">
|
|
516
|
+
<h2>System Information</h2>
|
|
517
|
+
<table>
|
|
518
|
+
<tr><th>Property</th><th>Value</th></tr>
|
|
519
|
+
<tr><td>Node Version</td><td>${report.systemInfo.nodeVersion}</td></tr>
|
|
520
|
+
<tr><td>Platform</td><td>${report.systemInfo.platform}</td></tr>
|
|
521
|
+
<tr><td>Architecture</td><td>${report.systemInfo.arch}</td></tr>
|
|
522
|
+
<tr><td>Memory (RSS)</td><td>${(report.systemInfo.memory.rss / 1024 / 1024).toFixed(2)} MB</td></tr>
|
|
523
|
+
</table>
|
|
524
|
+
</div>
|
|
525
|
+
</body>
|
|
526
|
+
</html>
|
|
527
|
+
`;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// 사전 정의된 벤치마크 테스트 스위트
|
|
532
|
+
class BenchmarkSuites {
|
|
533
|
+
static fileOperations() {
|
|
534
|
+
return {
|
|
535
|
+
name: 'File Operations',
|
|
536
|
+
tests: [
|
|
537
|
+
{
|
|
538
|
+
name: 'File Read Performance',
|
|
539
|
+
fn: async () => {
|
|
540
|
+
const filePath = '/tmp/test-file.txt';
|
|
541
|
+
await fs.writeFile(filePath, 'test content'.repeat(1000));
|
|
542
|
+
const startTime = performance.now();
|
|
543
|
+
await fs.readFile(filePath, 'utf8');
|
|
544
|
+
const endTime = performance.now();
|
|
545
|
+
await fs.unlink(filePath);
|
|
546
|
+
return { duration: endTime - startTime };
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
name: 'File Write Performance',
|
|
551
|
+
fn: async () => {
|
|
552
|
+
const filePath = '/tmp/test-write.txt';
|
|
553
|
+
const content = 'test content'.repeat(1000);
|
|
554
|
+
const startTime = performance.now();
|
|
555
|
+
await fs.writeFile(filePath, content);
|
|
556
|
+
const endTime = performance.now();
|
|
557
|
+
await fs.unlink(filePath);
|
|
558
|
+
return { duration: endTime - startTime };
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
]
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
static memoryOperations() {
|
|
566
|
+
return {
|
|
567
|
+
name: 'Memory Operations',
|
|
568
|
+
tests: [
|
|
569
|
+
{
|
|
570
|
+
name: 'Array Creation',
|
|
571
|
+
fn: async () => {
|
|
572
|
+
const startTime = performance.now();
|
|
573
|
+
const arr = new Array(100000).fill(0);
|
|
574
|
+
const endTime = performance.now();
|
|
575
|
+
return { duration: endTime - startTime };
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
name: 'Object Creation',
|
|
580
|
+
fn: async () => {
|
|
581
|
+
const startTime = performance.now();
|
|
582
|
+
const obj = {};
|
|
583
|
+
for (let i = 0; i < 10000; i++) {
|
|
584
|
+
obj[`key${i}`] = `value${i}`;
|
|
585
|
+
}
|
|
586
|
+
const endTime = performance.now();
|
|
587
|
+
return { duration: endTime - startTime };
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
]
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
static githubAPICache() {
|
|
595
|
+
return {
|
|
596
|
+
name: 'GitHub API Cache',
|
|
597
|
+
tests: [
|
|
598
|
+
{
|
|
599
|
+
name: 'Cache Hit Performance',
|
|
600
|
+
fn: async () => {
|
|
601
|
+
const cache = new GitHubAPICache();
|
|
602
|
+
await cache.init();
|
|
603
|
+
|
|
604
|
+
const url = 'https://api.github.com/repos/test/test';
|
|
605
|
+
const data = { test: 'data' };
|
|
606
|
+
|
|
607
|
+
await cache.set(url, data);
|
|
608
|
+
|
|
609
|
+
const startTime = performance.now();
|
|
610
|
+
const result = await cache.get(url);
|
|
611
|
+
const endTime = performance.now();
|
|
612
|
+
|
|
613
|
+
return { duration: endTime - startTime, throughput: 1 };
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
]
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export { PerformanceBenchmark, BenchmarkSuites };
|