aiwf 0.3.1 → 0.3.3
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 +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/installed.flag +1 -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 +95 -11
- package/CHANGELOG_M02.md +52 -0
- package/CLAUDE.md +135 -0
- package/README.ko.md +5 -0
- package/README.md +6 -0
- 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_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_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_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_default_mode.md +44 -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_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_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 +2 -2
- 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/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/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-lock.json +10022 -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_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 +8 -2
- package/docs/COMMANDS_GUIDE.md +196 -2
- package/docs/CONTRIBUTING.ko.md +408 -0
- package/docs/CONTRIBUTING.md +205 -203
- package/docs/EXAMPLES.md +691 -0
- package/docs/GETTING_STARTED.md +480 -0
- package/docs/PERFORMANCE_ARCHITECTURE.md +494 -0
- package/docs/PERFORMANCE_GUIDELINES.md +553 -0
- 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 +116 -4
- package/jest.config.js +20 -1
- package/language-utils.js +1 -1
- 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 +6 -3
- package/scripts/run-integration-tests.js +317 -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 +1 -1
- 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 +25 -9
- 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_language_manager.md +0 -287
- package/claude-code/aiwf/en/.claude/commands/aiwf/aiwf_language_status.md +0 -246
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_language_manager.md +0 -287
- package/claude-code/aiwf/ko/.claude/commands/aiwf/aiwf_language_status.md +0 -246
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
# AIWF 성능 가이드라인
|
|
2
|
+
|
|
3
|
+
## 개요
|
|
4
|
+
|
|
5
|
+
이 문서는 AIWF 프로젝트에서 최적의 성능을 얻기 위한 가이드라인과 모범 사례를 제공합니다. 개발자들이 성능을 고려한 코드를 작성하고 시스템을 효율적으로 운영할 수 있도록 돕습니다.
|
|
6
|
+
|
|
7
|
+
## 1. GitHub API 사용 최적화
|
|
8
|
+
|
|
9
|
+
### 1.1 캐싱 전략
|
|
10
|
+
|
|
11
|
+
#### 기본 캐싱 사용법
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
import { GitHubAPICache, OptimizedGitHubClient } from './lib/cache-system.js';
|
|
15
|
+
|
|
16
|
+
// 캐시 시스템 초기화
|
|
17
|
+
const githubClient = new OptimizedGitHubClient();
|
|
18
|
+
await githubClient.init();
|
|
19
|
+
|
|
20
|
+
// 자동 캐싱과 함께 API 호출
|
|
21
|
+
const repoData = await githubClient.cachedFetch('https://api.github.com/repos/user/repo');
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### 캐시 설정 최적화
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
// 환경별 캐시 설정
|
|
28
|
+
const cacheOptions = {
|
|
29
|
+
cacheDir: process.env.NODE_ENV === 'production' ? '.aiwf/cache' : '.aiwf/cache-dev',
|
|
30
|
+
ttl: process.env.NODE_ENV === 'production' ? 300000 : 60000 // 프로덕션: 5분, 개발: 1분
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const client = new OptimizedGitHubClient('https://api.github.com', cacheOptions);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 1.2 배치 처리
|
|
37
|
+
|
|
38
|
+
#### 여러 API 호출 최적화
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
// 순차 호출 (비효율적)
|
|
42
|
+
const repos = [];
|
|
43
|
+
for (const repoName of repoNames) {
|
|
44
|
+
repos.push(await client.cachedFetch(`/repos/user/${repoName}`));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 배치 처리 (효율적)
|
|
48
|
+
const urls = repoNames.map(name => `/repos/user/${name}`);
|
|
49
|
+
const results = await client.batchRequest(urls, { batchSize: 10 });
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 1.3 Rate Limiting 대응
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
// Rate Limiter 커스터마이징
|
|
56
|
+
class CustomRateLimiter extends RateLimiter {
|
|
57
|
+
constructor() {
|
|
58
|
+
super(60, 60000); // 분당 60개 요청
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async waitForNext() {
|
|
62
|
+
// GitHub API 헤더에서 남은 요청 수 확인
|
|
63
|
+
const remaining = this.getRemainingRequests();
|
|
64
|
+
if (remaining < 10) {
|
|
65
|
+
// 남은 요청이 적으면 더 오래 대기
|
|
66
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return super.waitForNext();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 2. 파일 시스템 작업 최적화
|
|
75
|
+
|
|
76
|
+
### 2.1 배치 처리 활용
|
|
77
|
+
|
|
78
|
+
#### 단일 파일 작업 (비효율적)
|
|
79
|
+
|
|
80
|
+
```javascript
|
|
81
|
+
// 비효율적인 방법
|
|
82
|
+
for (const filePath of filePaths) {
|
|
83
|
+
const content = await fs.readFile(filePath, 'utf8');
|
|
84
|
+
await processFile(content);
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
#### 배치 처리 (효율적)
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
import { FileBatchProcessor, FileUtils } from './lib/file-batch-processor.js';
|
|
92
|
+
|
|
93
|
+
// 효율적인 방법
|
|
94
|
+
const processor = new FileBatchProcessor({
|
|
95
|
+
maxConcurrency: 5,
|
|
96
|
+
batchSize: 20
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const results = await FileUtils.readMultipleFiles(filePaths, processor);
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 2.2 큰 파일 처리
|
|
103
|
+
|
|
104
|
+
#### 스트리밍 처리
|
|
105
|
+
|
|
106
|
+
```javascript
|
|
107
|
+
// 큰 파일은 자동으로 스트리밍 처리됨 (10MB 이상)
|
|
108
|
+
const processor = new FileBatchProcessor();
|
|
109
|
+
|
|
110
|
+
// 큰 파일 읽기 - 자동으로 스트리밍 사용
|
|
111
|
+
const content = await processor.addReadOperation('/path/to/large/file.txt');
|
|
112
|
+
|
|
113
|
+
// 큰 파일 쓰기 - 자동으로 스트리밍 사용
|
|
114
|
+
await processor.addWriteOperation('/path/to/output.txt', largeContent);
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 2.3 메모리 효율적인 파일 복사
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
// 메모리 효율적인 파일 복사
|
|
121
|
+
const fileMappings = {
|
|
122
|
+
'/source/file1.txt': '/dest/file1.txt',
|
|
123
|
+
'/source/file2.txt': '/dest/file2.txt'
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const results = await FileUtils.copyMultipleFiles(fileMappings, processor);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## 3. 메모리 사용량 최적화
|
|
130
|
+
|
|
131
|
+
### 3.1 메모리 프로파일링
|
|
132
|
+
|
|
133
|
+
#### 기본 프로파일링
|
|
134
|
+
|
|
135
|
+
```javascript
|
|
136
|
+
import { MemoryProfiler } from './lib/memory-profiler.js';
|
|
137
|
+
|
|
138
|
+
const profiler = new MemoryProfiler({
|
|
139
|
+
samplingInterval: 1000, // 1초마다 샘플링
|
|
140
|
+
heapThreshold: 100 * 1024 * 1024 // 100MB 임계값
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// 프로파일링 시작
|
|
144
|
+
profiler.startProfiling();
|
|
145
|
+
|
|
146
|
+
// 작업 실행
|
|
147
|
+
await performWorkload();
|
|
148
|
+
|
|
149
|
+
// 프로파일링 중지 및 보고서 생성
|
|
150
|
+
profiler.stopProfiling();
|
|
151
|
+
const report = profiler.generateReport();
|
|
152
|
+
console.log('메모리 사용량 보고서:', report);
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### 스냅샷 비교
|
|
156
|
+
|
|
157
|
+
```javascript
|
|
158
|
+
// 작업 전후 메모리 사용량 비교
|
|
159
|
+
profiler.createSnapshot('before-operation');
|
|
160
|
+
|
|
161
|
+
// 메모리 집약적인 작업
|
|
162
|
+
await processLargeDataset();
|
|
163
|
+
|
|
164
|
+
profiler.createSnapshot('after-operation');
|
|
165
|
+
|
|
166
|
+
// 메모리 변화 분석
|
|
167
|
+
const comparison = profiler.compareSnapshots('before-operation', 'after-operation');
|
|
168
|
+
console.log('메모리 변화:', comparison.memoryDiff);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 3.2 메모리 누수 방지
|
|
172
|
+
|
|
173
|
+
#### 객체 추적
|
|
174
|
+
|
|
175
|
+
```javascript
|
|
176
|
+
// 객체 생성/소멸 추적
|
|
177
|
+
const leakDetector = profiler.objectLeakDetector;
|
|
178
|
+
leakDetector.startTracking();
|
|
179
|
+
|
|
180
|
+
// 객체 생성 추적
|
|
181
|
+
leakDetector.trackObject('MyClass', 'create');
|
|
182
|
+
|
|
183
|
+
// 객체 소멸 추적
|
|
184
|
+
leakDetector.trackObject('MyClass', 'destroy');
|
|
185
|
+
|
|
186
|
+
// 누수 의심 객체 확인
|
|
187
|
+
const leaking = leakDetector.findLeakingObjects(1000);
|
|
188
|
+
if (leaking.length > 0) {
|
|
189
|
+
console.warn('메모리 누수 의심 객체:', leaking);
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
#### 가비지 컬렉션 최적화
|
|
194
|
+
|
|
195
|
+
```javascript
|
|
196
|
+
// 메모리 정리 필요 시 강제 GC 실행
|
|
197
|
+
const gcResult = profiler.forceGarbageCollection();
|
|
198
|
+
if (gcResult) {
|
|
199
|
+
console.log('GC로 해제된 메모리:', gcResult.freed);
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### 3.3 메모리 최적화 제안 활용
|
|
204
|
+
|
|
205
|
+
```javascript
|
|
206
|
+
import { MemoryOptimizer } from './lib/memory-profiler.js';
|
|
207
|
+
|
|
208
|
+
// 대용량 파일 처리 최적화
|
|
209
|
+
const fileOptimization = await MemoryOptimizer.optimizeForLargeFiles('/path/to/large/file');
|
|
210
|
+
if (fileOptimization.recommendation === 'streaming') {
|
|
211
|
+
// 스트리밍 처리 사용
|
|
212
|
+
console.log('스트리밍 처리 권장:', fileOptimization.reason);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// 데이터 구조 최적화
|
|
216
|
+
const dataOptimization = MemoryOptimizer.optimizeDataStructures(largeArray);
|
|
217
|
+
if (dataOptimization.recommendation !== 'Current data structure is optimal') {
|
|
218
|
+
console.log('데이터 구조 최적화 제안:', dataOptimization);
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## 4. 성능 벤치마킹
|
|
223
|
+
|
|
224
|
+
### 4.1 기본 벤치마크 실행
|
|
225
|
+
|
|
226
|
+
```javascript
|
|
227
|
+
import { PerformanceBenchmark, BenchmarkSuites } from './lib/performance-benchmark.js';
|
|
228
|
+
|
|
229
|
+
const benchmark = new PerformanceBenchmark({
|
|
230
|
+
iterations: 100,
|
|
231
|
+
warmupIterations: 10,
|
|
232
|
+
memoryProfiling: true
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
// 사전 정의된 테스트 스위트 실행
|
|
236
|
+
const fileOpsSuite = BenchmarkSuites.fileOperations();
|
|
237
|
+
const results = await benchmark.run(fileOpsSuite);
|
|
238
|
+
|
|
239
|
+
console.log('벤치마크 결과:', results.summary);
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### 4.2 커스텀 벤치마크 작성
|
|
243
|
+
|
|
244
|
+
```javascript
|
|
245
|
+
// 커스텀 테스트 스위트 정의
|
|
246
|
+
const customSuite = {
|
|
247
|
+
name: 'Custom Performance Tests',
|
|
248
|
+
tests: [
|
|
249
|
+
{
|
|
250
|
+
name: 'Data Processing Performance',
|
|
251
|
+
fn: async () => {
|
|
252
|
+
const startTime = performance.now();
|
|
253
|
+
await processData(testData);
|
|
254
|
+
const endTime = performance.now();
|
|
255
|
+
return { duration: endTime - startTime };
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: 'Cache Hit Performance',
|
|
260
|
+
fn: async () => {
|
|
261
|
+
const cache = new GitHubAPICache();
|
|
262
|
+
await cache.init();
|
|
263
|
+
|
|
264
|
+
// 캐시에 데이터 저장
|
|
265
|
+
await cache.set('test-key', testData);
|
|
266
|
+
|
|
267
|
+
const startTime = performance.now();
|
|
268
|
+
const result = await cache.get('test-key');
|
|
269
|
+
const endTime = performance.now();
|
|
270
|
+
|
|
271
|
+
return { duration: endTime - startTime, throughput: 1 };
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const customResults = await benchmark.run(customSuite);
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### 4.3 부하 테스트
|
|
281
|
+
|
|
282
|
+
```javascript
|
|
283
|
+
// API 엔드포인트 부하 테스트
|
|
284
|
+
const loadTestResult = await benchmark.runLoadTest({
|
|
285
|
+
name: 'GitHub API Load Test',
|
|
286
|
+
target: 'https://api.github.com/repos/user/repo',
|
|
287
|
+
duration: 60000, // 1분
|
|
288
|
+
concurrency: 10, // 동시 10개 요청
|
|
289
|
+
rampUp: 5000 // 5초에 걸쳐 점진적 증가
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
console.log('부하 테스트 결과:', loadTestResult.metrics);
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### 4.4 성능 회귀 감지
|
|
296
|
+
|
|
297
|
+
```javascript
|
|
298
|
+
// 이전 결과와 비교하여 성능 회귀 감지
|
|
299
|
+
const currentResult = await benchmark.run(testSuite);
|
|
300
|
+
const baselineResult = loadBaselineResults(); // 기준 결과 로드
|
|
301
|
+
|
|
302
|
+
const regression = benchmark.detectPerformanceRegression(currentResult, baselineResult);
|
|
303
|
+
if (regression.detected) {
|
|
304
|
+
console.error('성능 회귀 감지:', regression.issues);
|
|
305
|
+
} else {
|
|
306
|
+
console.log('성능 개선:', regression.improvements);
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## 5. 통합 성능 최적화 워크플로우
|
|
311
|
+
|
|
312
|
+
### 5.1 전체 최적화 프로세스
|
|
313
|
+
|
|
314
|
+
```javascript
|
|
315
|
+
async function optimizeApplicationPerformance() {
|
|
316
|
+
// 1. 메모리 프로파일링 시작
|
|
317
|
+
const profiler = new MemoryProfiler();
|
|
318
|
+
profiler.startProfiling();
|
|
319
|
+
|
|
320
|
+
// 2. GitHub API 캐싱 설정
|
|
321
|
+
const githubClient = new OptimizedGitHubClient();
|
|
322
|
+
await githubClient.init();
|
|
323
|
+
|
|
324
|
+
// 3. 파일 배치 처리 설정
|
|
325
|
+
const fileProcessor = new FileBatchProcessor({
|
|
326
|
+
maxConcurrency: 5,
|
|
327
|
+
batchSize: 20
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
// 4. 성능 벤치마크 실행
|
|
331
|
+
const benchmark = new PerformanceBenchmark({
|
|
332
|
+
iterations: 50,
|
|
333
|
+
memoryProfiling: true
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
const suites = [
|
|
337
|
+
BenchmarkSuites.fileOperations(),
|
|
338
|
+
BenchmarkSuites.memoryOperations(),
|
|
339
|
+
BenchmarkSuites.githubAPICache()
|
|
340
|
+
];
|
|
341
|
+
|
|
342
|
+
const results = await Promise.all(
|
|
343
|
+
suites.map(suite => benchmark.run(suite))
|
|
344
|
+
);
|
|
345
|
+
|
|
346
|
+
// 5. 결과 분석 및 보고서 생성
|
|
347
|
+
profiler.stopProfiling();
|
|
348
|
+
const memoryReport = profiler.generateReport();
|
|
349
|
+
const suggestions = profiler.getOptimizationSuggestions();
|
|
350
|
+
|
|
351
|
+
// 6. 보고서 저장
|
|
352
|
+
await benchmark.saveReport('./performance-report.json');
|
|
353
|
+
await benchmark.generateHTMLReport('./performance-report.html');
|
|
354
|
+
await profiler.saveReport('./memory-report.json');
|
|
355
|
+
|
|
356
|
+
return {
|
|
357
|
+
performanceResults: results,
|
|
358
|
+
memoryReport,
|
|
359
|
+
suggestions,
|
|
360
|
+
githubStats: githubClient.getStats(),
|
|
361
|
+
fileProcessorStats: fileProcessor.getStats()
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### 5.2 CI/CD 통합
|
|
367
|
+
|
|
368
|
+
```javascript
|
|
369
|
+
// CI/CD 파이프라인에서 성능 테스트 실행
|
|
370
|
+
async function runPerformanceTests() {
|
|
371
|
+
const benchmark = new PerformanceBenchmark();
|
|
372
|
+
const results = await benchmark.run(BenchmarkSuites.fileOperations());
|
|
373
|
+
|
|
374
|
+
// 성능 기준 확인
|
|
375
|
+
const avgDuration = results.summary.averageDuration;
|
|
376
|
+
const threshold = 1000; // 1초
|
|
377
|
+
|
|
378
|
+
if (avgDuration > threshold) {
|
|
379
|
+
throw new Error(`Performance regression detected: ${avgDuration}ms > ${threshold}ms`);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
console.log('✅ Performance tests passed');
|
|
383
|
+
return results;
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
## 6. 모니터링 및 경고
|
|
388
|
+
|
|
389
|
+
### 6.1 실시간 모니터링 설정
|
|
390
|
+
|
|
391
|
+
```javascript
|
|
392
|
+
// 프로덕션 환경에서 실시간 모니터링
|
|
393
|
+
const productionProfiler = new MemoryProfiler({
|
|
394
|
+
samplingInterval: 5000, // 5초마다
|
|
395
|
+
heapThreshold: 500 * 1024 * 1024, // 500MB
|
|
396
|
+
alertCallback: (alerts) => {
|
|
397
|
+
// 알림 시스템으로 경고 전송
|
|
398
|
+
alerts.forEach(alert => {
|
|
399
|
+
sendAlert(`Memory Alert: ${alert.type}`, alert);
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
productionProfiler.startProfiling();
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### 6.2 성능 대시보드
|
|
408
|
+
|
|
409
|
+
```javascript
|
|
410
|
+
// 성능 메트릭 대시보드용 데이터 생성
|
|
411
|
+
function generateDashboardData() {
|
|
412
|
+
return {
|
|
413
|
+
timestamp: Date.now(),
|
|
414
|
+
memory: process.memoryUsage(),
|
|
415
|
+
cache: githubClient.getStats(),
|
|
416
|
+
fileProcessor: fileProcessor.getStats(),
|
|
417
|
+
uptime: process.uptime()
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// 주기적으로 대시보드 데이터 업데이트
|
|
422
|
+
setInterval(() => {
|
|
423
|
+
const dashboardData = generateDashboardData();
|
|
424
|
+
updateDashboard(dashboardData);
|
|
425
|
+
}, 30000); // 30초마다
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
## 7. 환경별 설정 가이드
|
|
429
|
+
|
|
430
|
+
### 7.1 개발 환경
|
|
431
|
+
|
|
432
|
+
```javascript
|
|
433
|
+
const developmentConfig = {
|
|
434
|
+
github: {
|
|
435
|
+
cacheDir: '.aiwf/cache-dev',
|
|
436
|
+
ttl: 60000, // 1분
|
|
437
|
+
rateLimitPerMinute: 30
|
|
438
|
+
},
|
|
439
|
+
fileProcessor: {
|
|
440
|
+
maxConcurrency: 2,
|
|
441
|
+
batchSize: 10
|
|
442
|
+
},
|
|
443
|
+
memoryProfiler: {
|
|
444
|
+
samplingInterval: 2000, // 2초
|
|
445
|
+
alertThreshold: 100 * 1024 * 1024 // 100MB
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### 7.2 프로덕션 환경
|
|
451
|
+
|
|
452
|
+
```javascript
|
|
453
|
+
const productionConfig = {
|
|
454
|
+
github: {
|
|
455
|
+
cacheDir: '.aiwf/cache',
|
|
456
|
+
ttl: 300000, // 5분
|
|
457
|
+
rateLimitPerMinute: 60
|
|
458
|
+
},
|
|
459
|
+
fileProcessor: {
|
|
460
|
+
maxConcurrency: 10,
|
|
461
|
+
batchSize: 50
|
|
462
|
+
},
|
|
463
|
+
memoryProfiler: {
|
|
464
|
+
samplingInterval: 5000, // 5초
|
|
465
|
+
alertThreshold: 500 * 1024 * 1024 // 500MB
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
## 8. 문제 해결 가이드
|
|
471
|
+
|
|
472
|
+
### 8.1 메모리 사용량 급증
|
|
473
|
+
|
|
474
|
+
```javascript
|
|
475
|
+
// 메모리 사용량이 급증하는 경우
|
|
476
|
+
if (currentMemoryUsage > threshold) {
|
|
477
|
+
// 1. 강제 가비지 컬렉션
|
|
478
|
+
const gcResult = profiler.forceGarbageCollection();
|
|
479
|
+
|
|
480
|
+
// 2. 캐시 정리
|
|
481
|
+
await githubClient.cleanup();
|
|
482
|
+
|
|
483
|
+
// 3. 임시 파일 정리
|
|
484
|
+
await MemoryOptimizer.cleanupTemporaryFiles();
|
|
485
|
+
|
|
486
|
+
// 4. 배치 처리 큐 정리
|
|
487
|
+
fileProcessor.clearQueue();
|
|
488
|
+
}
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### 8.2 GitHub API Rate Limit 초과
|
|
492
|
+
|
|
493
|
+
```javascript
|
|
494
|
+
// Rate limit 초과 시 대응
|
|
495
|
+
client.on('rateLimit', async (resetTime) => {
|
|
496
|
+
console.log(`Rate limit exceeded. Waiting until ${new Date(resetTime)}`);
|
|
497
|
+
|
|
498
|
+
// 캐시된 데이터 우선 사용
|
|
499
|
+
const cachedData = await cache.get(url);
|
|
500
|
+
if (cachedData) {
|
|
501
|
+
return cachedData;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// Reset 시간까지 대기
|
|
505
|
+
const waitTime = resetTime - Date.now();
|
|
506
|
+
await new Promise(resolve => setTimeout(resolve, waitTime));
|
|
507
|
+
});
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### 8.3 파일 시스템 성능 저하
|
|
511
|
+
|
|
512
|
+
```javascript
|
|
513
|
+
// 파일 시스템 성능 저하 시
|
|
514
|
+
if (fileProcessor.getStats().averageProcessingTime > 5000) { // 5초 이상
|
|
515
|
+
// 1. 동시성 감소
|
|
516
|
+
fileProcessor.maxConcurrency = Math.max(1, fileProcessor.maxConcurrency / 2);
|
|
517
|
+
|
|
518
|
+
// 2. 배치 크기 감소
|
|
519
|
+
fileProcessor.batchSize = Math.max(5, fileProcessor.batchSize / 2);
|
|
520
|
+
|
|
521
|
+
// 3. 임시 파일 정리
|
|
522
|
+
await MemoryOptimizer.cleanupTemporaryFiles();
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
## 9. 베스트 프랙티스
|
|
527
|
+
|
|
528
|
+
### 9.1 코드 레벨 최적화
|
|
529
|
+
|
|
530
|
+
1. **비동기 처리 활용**: Promise.all() 대신 Promise.allSettled() 사용
|
|
531
|
+
2. **메모리 효율적인 데이터 구조**: 큰 데이터셋에는 Map/Set 사용
|
|
532
|
+
3. **스트리밍 처리**: 큰 파일은 항상 스트림으로 처리
|
|
533
|
+
4. **캐시 우선 사용**: API 호출 전 항상 캐시 확인
|
|
534
|
+
|
|
535
|
+
### 9.2 아키텍처 레벨 최적화
|
|
536
|
+
|
|
537
|
+
1. **배치 처리 우선**: 개별 작업보다 배치 처리 사용
|
|
538
|
+
2. **적절한 캐시 TTL**: 데이터 성격에 맞는 TTL 설정
|
|
539
|
+
3. **동시성 제어**: 시스템 리소스에 맞는 동시성 수준 설정
|
|
540
|
+
4. **모니터링 필수**: 프로덕션에서 항상 성능 모니터링
|
|
541
|
+
|
|
542
|
+
### 9.3 운영 레벨 최적화
|
|
543
|
+
|
|
544
|
+
1. **정기적인 정리**: 캐시, 로그, 임시 파일 정기 정리
|
|
545
|
+
2. **성능 기준 설정**: 명확한 성능 SLA 정의
|
|
546
|
+
3. **알림 시스템**: 성능 저하 시 즉시 알림
|
|
547
|
+
4. **지속적인 개선**: 정기적인 성능 벤치마크 실행
|
|
548
|
+
|
|
549
|
+
## 결론
|
|
550
|
+
|
|
551
|
+
AIWF의 성능 최적화는 GitHub API 캐싱, 파일 배치 처리, 메모리 관리, 성능 벤치마킹의 4가지 핵심 영역에서 이루어집니다. 이 가이드라인을 따라 구현하면 대규모 프로젝트에서도 안정적이고 효율적인 성능을 유지할 수 있습니다.
|
|
552
|
+
|
|
553
|
+
성능 최적화는 지속적인 과정이므로, 정기적인 모니터링과 벤치마킹을 통해 시스템을 개선해 나가는 것이 중요합니다.
|