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,979 @@
|
|
|
1
|
+
# AIWF API Reference
|
|
2
|
+
|
|
3
|
+
This comprehensive API reference covers all modules and utilities provided by the AIWF framework. The API is organized into core systems and feature-specific modules.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Performance & Optimization APIs](#performance--optimization-apis)
|
|
8
|
+
- [GitHub API Cache System](#github-api-cache-system)
|
|
9
|
+
- [File Batch Processing](#file-batch-processing)
|
|
10
|
+
- [Memory Profiler](#memory-profiler)
|
|
11
|
+
- [Performance Benchmark](#performance-benchmark)
|
|
12
|
+
2. [Feature Management APIs](#feature-management-apis)
|
|
13
|
+
- [Feature Ledger](#feature-ledger)
|
|
14
|
+
- [Token Tracker](#token-tracker)
|
|
15
|
+
3. [AI Enhancement APIs](#ai-enhancement-apis)
|
|
16
|
+
- [AI Persona Manager](#ai-persona-manager)
|
|
17
|
+
- [Context Compressor](#context-compressor)
|
|
18
|
+
- [Feature-Git Integration](#feature-git-integration)
|
|
19
|
+
4. [Utility APIs](#utility-apis)
|
|
20
|
+
- [Markdown Processor](#markdown-processor)
|
|
21
|
+
- [Template Engine](#template-engine)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Performance & Optimization APIs
|
|
26
|
+
|
|
27
|
+
### GitHub API Cache System
|
|
28
|
+
|
|
29
|
+
Optimizes GitHub API calls through intelligent caching and batch processing.
|
|
30
|
+
|
|
31
|
+
#### GitHubAPICache
|
|
32
|
+
|
|
33
|
+
##### Constructor
|
|
34
|
+
```javascript
|
|
35
|
+
new GitHubAPICache(cacheDir?: string, ttl?: number)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
| Parameter | Type | Default | Description |
|
|
39
|
+
|-----------|------|---------|-------------|
|
|
40
|
+
| cacheDir | string | '.aiwf/cache' | Cache directory path |
|
|
41
|
+
| ttl | number | 300000 | Cache TTL in milliseconds |
|
|
42
|
+
|
|
43
|
+
##### Methods
|
|
44
|
+
|
|
45
|
+
###### init()
|
|
46
|
+
```javascript
|
|
47
|
+
async init(): Promise<void>
|
|
48
|
+
```
|
|
49
|
+
Initializes the cache system and creates necessary directories.
|
|
50
|
+
|
|
51
|
+
**Example:**
|
|
52
|
+
```javascript
|
|
53
|
+
const cache = new GitHubAPICache();
|
|
54
|
+
await cache.init();
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
###### get()
|
|
58
|
+
```javascript
|
|
59
|
+
async get(url: string, headers?: object): Promise<any>
|
|
60
|
+
```
|
|
61
|
+
Retrieves data from cache.
|
|
62
|
+
|
|
63
|
+
**Parameters:**
|
|
64
|
+
- `url` - The API endpoint URL
|
|
65
|
+
- `headers` - Optional HTTP headers
|
|
66
|
+
|
|
67
|
+
**Returns:** Cached data or null if not found/expired
|
|
68
|
+
|
|
69
|
+
###### set()
|
|
70
|
+
```javascript
|
|
71
|
+
async set(url: string, data: any, headers?: object): Promise<void>
|
|
72
|
+
```
|
|
73
|
+
Stores data in cache.
|
|
74
|
+
|
|
75
|
+
**Parameters:**
|
|
76
|
+
- `url` - The API endpoint URL
|
|
77
|
+
- `data` - Data to cache
|
|
78
|
+
- `headers` - Optional HTTP headers
|
|
79
|
+
|
|
80
|
+
###### getOrFetch()
|
|
81
|
+
```javascript
|
|
82
|
+
async getOrFetch(
|
|
83
|
+
url: string,
|
|
84
|
+
fetchFunction: () => Promise<any>,
|
|
85
|
+
headers?: object
|
|
86
|
+
): Promise<any>
|
|
87
|
+
```
|
|
88
|
+
Gets data from cache or fetches if not available.
|
|
89
|
+
|
|
90
|
+
**Example:**
|
|
91
|
+
```javascript
|
|
92
|
+
const data = await cache.getOrFetch(url, async () => {
|
|
93
|
+
const response = await fetch(url);
|
|
94
|
+
return await response.json();
|
|
95
|
+
});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
###### getStats()
|
|
99
|
+
```javascript
|
|
100
|
+
getStats(): CacheStats
|
|
101
|
+
```
|
|
102
|
+
Returns cache statistics.
|
|
103
|
+
|
|
104
|
+
**Returns:**
|
|
105
|
+
```typescript
|
|
106
|
+
interface CacheStats {
|
|
107
|
+
hits: number;
|
|
108
|
+
misses: number;
|
|
109
|
+
hitRate: number;
|
|
110
|
+
totalSize: number;
|
|
111
|
+
itemCount: number;
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
###### cleanup()
|
|
116
|
+
```javascript
|
|
117
|
+
async cleanup(): Promise<void>
|
|
118
|
+
```
|
|
119
|
+
Removes expired cache entries.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
#### OptimizedGitHubClient
|
|
124
|
+
|
|
125
|
+
Enhanced GitHub API client with caching and batch support.
|
|
126
|
+
|
|
127
|
+
##### Constructor
|
|
128
|
+
```javascript
|
|
129
|
+
new OptimizedGitHubClient(baseUrl?: string, cacheOptions?: object)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
##### Methods
|
|
133
|
+
|
|
134
|
+
###### cachedFetch()
|
|
135
|
+
```javascript
|
|
136
|
+
async cachedFetch(url: string, options?: RequestInit): Promise<any>
|
|
137
|
+
```
|
|
138
|
+
Performs cached HTTP request.
|
|
139
|
+
|
|
140
|
+
###### batchRequest()
|
|
141
|
+
```javascript
|
|
142
|
+
async batchRequest(
|
|
143
|
+
urls: string[],
|
|
144
|
+
options?: BatchOptions
|
|
145
|
+
): Promise<any[]>
|
|
146
|
+
```
|
|
147
|
+
Executes batch requests with rate limiting.
|
|
148
|
+
|
|
149
|
+
**Options:**
|
|
150
|
+
```typescript
|
|
151
|
+
interface BatchOptions {
|
|
152
|
+
batchSize?: number; // Default: 5
|
|
153
|
+
delay?: number; // Delay between batches (ms)
|
|
154
|
+
headers?: object; // HTTP headers
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
###### getDirectoryStructure()
|
|
159
|
+
```javascript
|
|
160
|
+
async getDirectoryStructure(
|
|
161
|
+
repoPath: string,
|
|
162
|
+
dirPath?: string
|
|
163
|
+
): Promise<TreeNode[]>
|
|
164
|
+
```
|
|
165
|
+
Fetches repository directory structure.
|
|
166
|
+
|
|
167
|
+
**Example:**
|
|
168
|
+
```javascript
|
|
169
|
+
const structure = await client.getDirectoryStructure('owner/repo', 'src');
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### File Batch Processing
|
|
175
|
+
|
|
176
|
+
Optimizes file system operations through batching and concurrency control.
|
|
177
|
+
|
|
178
|
+
#### FileBatchProcessor
|
|
179
|
+
|
|
180
|
+
##### Constructor
|
|
181
|
+
```javascript
|
|
182
|
+
new FileBatchProcessor(options?: ProcessorOptions)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Options:**
|
|
186
|
+
```typescript
|
|
187
|
+
interface ProcessorOptions {
|
|
188
|
+
maxConcurrency?: number; // Default: 10
|
|
189
|
+
batchSize?: number; // Default: 50
|
|
190
|
+
timeout?: number; // Operation timeout (ms)
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
##### Methods
|
|
195
|
+
|
|
196
|
+
###### addReadOperation()
|
|
197
|
+
```javascript
|
|
198
|
+
async addReadOperation(
|
|
199
|
+
filePath: string,
|
|
200
|
+
options?: ReadOptions
|
|
201
|
+
): Promise<string>
|
|
202
|
+
```
|
|
203
|
+
Queues a file read operation.
|
|
204
|
+
|
|
205
|
+
**Options:**
|
|
206
|
+
```typescript
|
|
207
|
+
interface ReadOptions {
|
|
208
|
+
encoding?: string; // Default: 'utf8'
|
|
209
|
+
flag?: string; // File system flag
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
###### addWriteOperation()
|
|
214
|
+
```javascript
|
|
215
|
+
async addWriteOperation(
|
|
216
|
+
filePath: string,
|
|
217
|
+
content: string,
|
|
218
|
+
options?: WriteOptions
|
|
219
|
+
): Promise<void>
|
|
220
|
+
```
|
|
221
|
+
Queues a file write operation.
|
|
222
|
+
|
|
223
|
+
###### addCopyOperation()
|
|
224
|
+
```javascript
|
|
225
|
+
async addCopyOperation(
|
|
226
|
+
source: string,
|
|
227
|
+
destination: string,
|
|
228
|
+
options?: CopyOptions
|
|
229
|
+
): Promise<void>
|
|
230
|
+
```
|
|
231
|
+
Queues a file copy operation.
|
|
232
|
+
|
|
233
|
+
###### processBatch()
|
|
234
|
+
```javascript
|
|
235
|
+
async processBatch(): Promise<BatchResult>
|
|
236
|
+
```
|
|
237
|
+
Processes all queued operations.
|
|
238
|
+
|
|
239
|
+
**Returns:**
|
|
240
|
+
```typescript
|
|
241
|
+
interface BatchResult {
|
|
242
|
+
successful: number;
|
|
243
|
+
failed: number;
|
|
244
|
+
errors: Error[];
|
|
245
|
+
duration: number;
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
###### getStats()
|
|
250
|
+
```javascript
|
|
251
|
+
getStats(): ProcessorStats
|
|
252
|
+
```
|
|
253
|
+
Returns processor statistics.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
#### FileUtils
|
|
258
|
+
|
|
259
|
+
Static utility methods for file operations.
|
|
260
|
+
|
|
261
|
+
##### readMultipleFiles()
|
|
262
|
+
```javascript
|
|
263
|
+
static async readMultipleFiles(
|
|
264
|
+
filePaths: string[],
|
|
265
|
+
processor: FileBatchProcessor
|
|
266
|
+
): Promise<Map<string, string>>
|
|
267
|
+
```
|
|
268
|
+
Reads multiple files concurrently.
|
|
269
|
+
|
|
270
|
+
##### writeMultipleFiles()
|
|
271
|
+
```javascript
|
|
272
|
+
static async writeMultipleFiles(
|
|
273
|
+
fileData: Record<string, string>,
|
|
274
|
+
processor: FileBatchProcessor
|
|
275
|
+
): Promise<void>
|
|
276
|
+
```
|
|
277
|
+
Writes multiple files concurrently.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
### Memory Profiler
|
|
282
|
+
|
|
283
|
+
Monitors and optimizes memory usage in Node.js applications.
|
|
284
|
+
|
|
285
|
+
#### MemoryProfiler
|
|
286
|
+
|
|
287
|
+
##### Constructor
|
|
288
|
+
```javascript
|
|
289
|
+
new MemoryProfiler(options?: ProfilerOptions)
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Options:**
|
|
293
|
+
```typescript
|
|
294
|
+
interface ProfilerOptions {
|
|
295
|
+
samplingInterval?: number; // Default: 1000ms
|
|
296
|
+
maxSamples?: number; // Default: 1000
|
|
297
|
+
heapThreshold?: number; // Default: 100MB
|
|
298
|
+
autoGC?: boolean; // Default: false
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
##### Methods
|
|
303
|
+
|
|
304
|
+
###### startProfiling()
|
|
305
|
+
```javascript
|
|
306
|
+
startProfiling(): void
|
|
307
|
+
```
|
|
308
|
+
Starts memory profiling.
|
|
309
|
+
|
|
310
|
+
###### stopProfiling()
|
|
311
|
+
```javascript
|
|
312
|
+
stopProfiling(): ProfileReport
|
|
313
|
+
```
|
|
314
|
+
Stops profiling and returns report.
|
|
315
|
+
|
|
316
|
+
###### createSnapshot()
|
|
317
|
+
```javascript
|
|
318
|
+
createSnapshot(label: string): Snapshot
|
|
319
|
+
```
|
|
320
|
+
Creates a memory snapshot.
|
|
321
|
+
|
|
322
|
+
**Returns:**
|
|
323
|
+
```typescript
|
|
324
|
+
interface Snapshot {
|
|
325
|
+
label: string;
|
|
326
|
+
timestamp: number;
|
|
327
|
+
heapUsed: number;
|
|
328
|
+
heapTotal: number;
|
|
329
|
+
external: number;
|
|
330
|
+
arrayBuffers: number;
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
###### compareSnapshots()
|
|
335
|
+
```javascript
|
|
336
|
+
compareSnapshots(
|
|
337
|
+
label1: string,
|
|
338
|
+
label2: string
|
|
339
|
+
): SnapshotComparison
|
|
340
|
+
```
|
|
341
|
+
Compares two snapshots.
|
|
342
|
+
|
|
343
|
+
**Returns:**
|
|
344
|
+
```typescript
|
|
345
|
+
interface SnapshotComparison {
|
|
346
|
+
memoryDiff: number;
|
|
347
|
+
percentChange: number;
|
|
348
|
+
timeDiff: number;
|
|
349
|
+
details: object;
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
###### getOptimizationSuggestions()
|
|
354
|
+
```javascript
|
|
355
|
+
getOptimizationSuggestions(): Suggestion[]
|
|
356
|
+
```
|
|
357
|
+
Returns memory optimization suggestions.
|
|
358
|
+
|
|
359
|
+
###### monitor()
|
|
360
|
+
```javascript
|
|
361
|
+
async monitor(duration?: number): Promise<MonitorReport>
|
|
362
|
+
```
|
|
363
|
+
Monitors memory for specified duration.
|
|
364
|
+
|
|
365
|
+
**Example:**
|
|
366
|
+
```javascript
|
|
367
|
+
const report = await profiler.monitor(60000); // Monitor for 1 minute
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
### Performance Benchmark
|
|
373
|
+
|
|
374
|
+
Comprehensive performance testing and benchmarking system.
|
|
375
|
+
|
|
376
|
+
#### PerformanceBenchmark
|
|
377
|
+
|
|
378
|
+
##### Constructor
|
|
379
|
+
```javascript
|
|
380
|
+
new PerformanceBenchmark(options?: BenchmarkOptions)
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
**Options:**
|
|
384
|
+
```typescript
|
|
385
|
+
interface BenchmarkOptions {
|
|
386
|
+
iterations?: number; // Default: 100
|
|
387
|
+
warmupIterations?: number; // Default: 10
|
|
388
|
+
memoryProfiling?: boolean; // Default: false
|
|
389
|
+
timeout?: number; // Test timeout (ms)
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
##### Methods
|
|
394
|
+
|
|
395
|
+
###### run()
|
|
396
|
+
```javascript
|
|
397
|
+
async run(testSuite: TestSuite): Promise<BenchmarkResult>
|
|
398
|
+
```
|
|
399
|
+
Runs a benchmark test suite.
|
|
400
|
+
|
|
401
|
+
**Test Suite Structure:**
|
|
402
|
+
```typescript
|
|
403
|
+
interface TestSuite {
|
|
404
|
+
name: string;
|
|
405
|
+
tests: Test[];
|
|
406
|
+
setup?: () => Promise<void>;
|
|
407
|
+
teardown?: () => Promise<void>;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
interface Test {
|
|
411
|
+
name: string;
|
|
412
|
+
fn: () => Promise<void>;
|
|
413
|
+
options?: TestOptions;
|
|
414
|
+
}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
###### runLoadTest()
|
|
418
|
+
```javascript
|
|
419
|
+
async runLoadTest(config: LoadTestConfig): Promise<LoadTestResult>
|
|
420
|
+
```
|
|
421
|
+
Performs load testing.
|
|
422
|
+
|
|
423
|
+
**Config:**
|
|
424
|
+
```typescript
|
|
425
|
+
interface LoadTestConfig {
|
|
426
|
+
name: string;
|
|
427
|
+
target: string | (() => Promise<void>);
|
|
428
|
+
duration: number;
|
|
429
|
+
concurrency: number;
|
|
430
|
+
rampUp?: number;
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
###### detectPerformanceRegression()
|
|
435
|
+
```javascript
|
|
436
|
+
detectPerformanceRegression(
|
|
437
|
+
current: BenchmarkResult,
|
|
438
|
+
baseline: BenchmarkResult
|
|
439
|
+
): RegressionReport
|
|
440
|
+
```
|
|
441
|
+
Detects performance regressions.
|
|
442
|
+
|
|
443
|
+
###### generateReport()
|
|
444
|
+
```javascript
|
|
445
|
+
generateReport(): BenchmarkReport
|
|
446
|
+
```
|
|
447
|
+
Generates comprehensive benchmark report.
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## Feature Management APIs
|
|
452
|
+
|
|
453
|
+
### Feature Ledger
|
|
454
|
+
|
|
455
|
+
Tracks and manages feature development progress.
|
|
456
|
+
|
|
457
|
+
#### FeatureLedger
|
|
458
|
+
|
|
459
|
+
##### Constructor
|
|
460
|
+
```javascript
|
|
461
|
+
new FeatureLedger(ledgerPath?: string)
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
##### Methods
|
|
465
|
+
|
|
466
|
+
###### createFeature()
|
|
467
|
+
```javascript
|
|
468
|
+
async createFeature(feature: FeatureInput): Promise<Feature>
|
|
469
|
+
```
|
|
470
|
+
Creates a new feature entry.
|
|
471
|
+
|
|
472
|
+
**Input:**
|
|
473
|
+
```typescript
|
|
474
|
+
interface FeatureInput {
|
|
475
|
+
name: string;
|
|
476
|
+
description: string;
|
|
477
|
+
category: 'feature' | 'bugfix' | 'enhancement' | 'refactor';
|
|
478
|
+
priority: 'low' | 'medium' | 'high' | 'critical';
|
|
479
|
+
assignee?: string;
|
|
480
|
+
tags?: string[];
|
|
481
|
+
}
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**Returns:**
|
|
485
|
+
```typescript
|
|
486
|
+
interface Feature extends FeatureInput {
|
|
487
|
+
id: string; // Auto-generated (F001, F002, etc.)
|
|
488
|
+
status: string; // 'planned' | 'in_progress' | 'completed'
|
|
489
|
+
createdAt: string; // ISO timestamp
|
|
490
|
+
updatedAt: string; // ISO timestamp
|
|
491
|
+
progress: number; // 0-100
|
|
492
|
+
commits: string[]; // Related commit hashes
|
|
493
|
+
}
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
###### updateFeatureStatus()
|
|
497
|
+
```javascript
|
|
498
|
+
async updateFeatureStatus(
|
|
499
|
+
featureId: string,
|
|
500
|
+
status: FeatureStatus
|
|
501
|
+
): Promise<void>
|
|
502
|
+
```
|
|
503
|
+
Updates feature status.
|
|
504
|
+
|
|
505
|
+
###### linkCommit()
|
|
506
|
+
```javascript
|
|
507
|
+
async linkCommit(
|
|
508
|
+
featureId: string,
|
|
509
|
+
commitHash: string
|
|
510
|
+
): Promise<void>
|
|
511
|
+
```
|
|
512
|
+
Links a commit to a feature.
|
|
513
|
+
|
|
514
|
+
###### getFeatureProgress()
|
|
515
|
+
```javascript
|
|
516
|
+
async getFeatureProgress(featureId: string): Promise<number>
|
|
517
|
+
```
|
|
518
|
+
Calculates feature completion percentage.
|
|
519
|
+
|
|
520
|
+
###### searchFeatures()
|
|
521
|
+
```javascript
|
|
522
|
+
async searchFeatures(query: SearchQuery): Promise<Feature[]>
|
|
523
|
+
```
|
|
524
|
+
Searches features with filters.
|
|
525
|
+
|
|
526
|
+
**Query Options:**
|
|
527
|
+
```typescript
|
|
528
|
+
interface SearchQuery {
|
|
529
|
+
status?: FeatureStatus;
|
|
530
|
+
category?: string;
|
|
531
|
+
priority?: string;
|
|
532
|
+
assignee?: string;
|
|
533
|
+
tags?: string[];
|
|
534
|
+
dateRange?: {
|
|
535
|
+
start: string;
|
|
536
|
+
end: string;
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
### Token Tracker
|
|
544
|
+
|
|
545
|
+
Monitors token usage in AI conversations.
|
|
546
|
+
|
|
547
|
+
#### TokenTracker
|
|
548
|
+
|
|
549
|
+
##### Constructor
|
|
550
|
+
```javascript
|
|
551
|
+
new TokenTracker(options?: TrackerOptions)
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
**Options:**
|
|
555
|
+
```typescript
|
|
556
|
+
interface TrackerOptions {
|
|
557
|
+
maxTokensPerSession?: number; // Default: 100000
|
|
558
|
+
warningThreshold?: number; // Default: 0.8 (80%)
|
|
559
|
+
model?: 'claude-3' | 'gpt-4'; // For accurate counting
|
|
560
|
+
}
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
##### Methods
|
|
564
|
+
|
|
565
|
+
###### trackTokens()
|
|
566
|
+
```javascript
|
|
567
|
+
trackTokens(message: string, tokenCount?: number): void
|
|
568
|
+
```
|
|
569
|
+
Records token usage.
|
|
570
|
+
|
|
571
|
+
###### getSessionStats()
|
|
572
|
+
```javascript
|
|
573
|
+
getSessionStats(): SessionStats
|
|
574
|
+
```
|
|
575
|
+
Returns current session statistics.
|
|
576
|
+
|
|
577
|
+
**Returns:**
|
|
578
|
+
```typescript
|
|
579
|
+
interface SessionStats {
|
|
580
|
+
totalTokens: number;
|
|
581
|
+
remainingTokens: number;
|
|
582
|
+
percentageUsed: number;
|
|
583
|
+
messageCount: number;
|
|
584
|
+
avgTokensPerMessage: number;
|
|
585
|
+
}
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
###### predictTokenUsage()
|
|
589
|
+
```javascript
|
|
590
|
+
predictTokenUsage(content: string): number
|
|
591
|
+
```
|
|
592
|
+
Estimates token count for content.
|
|
593
|
+
|
|
594
|
+
###### resetSession()
|
|
595
|
+
```javascript
|
|
596
|
+
resetSession(): void
|
|
597
|
+
```
|
|
598
|
+
Resets session tracking.
|
|
599
|
+
|
|
600
|
+
###### exportHistory()
|
|
601
|
+
```javascript
|
|
602
|
+
exportHistory(): TokenHistory[]
|
|
603
|
+
```
|
|
604
|
+
Exports token usage history.
|
|
605
|
+
|
|
606
|
+
---
|
|
607
|
+
|
|
608
|
+
## AI Enhancement APIs
|
|
609
|
+
|
|
610
|
+
### AI Persona Manager
|
|
611
|
+
|
|
612
|
+
Manages AI behavior personas for different development tasks.
|
|
613
|
+
|
|
614
|
+
#### AIPersonaManager
|
|
615
|
+
|
|
616
|
+
##### Constructor
|
|
617
|
+
```javascript
|
|
618
|
+
new AIPersonaManager(configPath?: string)
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
##### Available Personas
|
|
622
|
+
|
|
623
|
+
| Persona | Purpose | Characteristics |
|
|
624
|
+
|---------|---------|-----------------|
|
|
625
|
+
| architect | System design | Big picture, scalability focus |
|
|
626
|
+
| debugger | Bug fixing | Detail-oriented, systematic |
|
|
627
|
+
| reviewer | Code review | Quality, standards, security |
|
|
628
|
+
| documenter | Documentation | Clear explanations, examples |
|
|
629
|
+
| optimizer | Performance | Efficiency, benchmarking |
|
|
630
|
+
|
|
631
|
+
##### Methods
|
|
632
|
+
|
|
633
|
+
###### switchPersona()
|
|
634
|
+
```javascript
|
|
635
|
+
async switchPersona(personaName: string): Promise<void>
|
|
636
|
+
```
|
|
637
|
+
Switches to specified persona.
|
|
638
|
+
|
|
639
|
+
**Example:**
|
|
640
|
+
```javascript
|
|
641
|
+
await manager.switchPersona('architect');
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
###### getCurrentPersona()
|
|
645
|
+
```javascript
|
|
646
|
+
getCurrentPersona(): Persona
|
|
647
|
+
```
|
|
648
|
+
Returns currently active persona.
|
|
649
|
+
|
|
650
|
+
###### getPersonaContext()
|
|
651
|
+
```javascript
|
|
652
|
+
getPersonaContext(personaName: string): ContextRules
|
|
653
|
+
```
|
|
654
|
+
Gets context rules for persona.
|
|
655
|
+
|
|
656
|
+
**Returns:**
|
|
657
|
+
```typescript
|
|
658
|
+
interface ContextRules {
|
|
659
|
+
priority: string[]; // Priority file types
|
|
660
|
+
focus: string[]; // Focus areas
|
|
661
|
+
exclude: string[]; // Excluded patterns
|
|
662
|
+
keywords: string[]; // Important keywords
|
|
663
|
+
}
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
###### applyPersonaRules()
|
|
667
|
+
```javascript
|
|
668
|
+
async applyPersonaRules(
|
|
669
|
+
content: string,
|
|
670
|
+
personaName: string
|
|
671
|
+
): Promise<string>
|
|
672
|
+
```
|
|
673
|
+
Applies persona filtering to content.
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
### Context Compressor
|
|
678
|
+
|
|
679
|
+
Optimizes context size for AI interactions.
|
|
680
|
+
|
|
681
|
+
#### ContextCompressor
|
|
682
|
+
|
|
683
|
+
##### Constructor
|
|
684
|
+
```javascript
|
|
685
|
+
new ContextCompressor(options?: CompressorOptions)
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
**Options:**
|
|
689
|
+
```typescript
|
|
690
|
+
interface CompressorOptions {
|
|
691
|
+
defaultMode?: 'aggressive' | 'balanced' | 'conservative';
|
|
692
|
+
cacheEnabled?: boolean;
|
|
693
|
+
preserveStructure?: boolean;
|
|
694
|
+
}
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
##### Compression Modes
|
|
698
|
+
|
|
699
|
+
| Mode | Compression Rate | Quality Loss | Use Case |
|
|
700
|
+
|------|------------------|--------------|----------|
|
|
701
|
+
| aggressive | 70-80% | Medium-High | Large codebases, overview |
|
|
702
|
+
| balanced | 50-60% | Low | General development |
|
|
703
|
+
| conservative | 30-40% | Very Low | Critical code, debugging |
|
|
704
|
+
|
|
705
|
+
##### Methods
|
|
706
|
+
|
|
707
|
+
###### compressContext()
|
|
708
|
+
```javascript
|
|
709
|
+
compressContext(
|
|
710
|
+
context: string,
|
|
711
|
+
mode?: CompressionMode
|
|
712
|
+
): CompressedResult
|
|
713
|
+
```
|
|
714
|
+
Compresses context with specified mode.
|
|
715
|
+
|
|
716
|
+
**Returns:**
|
|
717
|
+
```typescript
|
|
718
|
+
interface CompressedResult {
|
|
719
|
+
compressed: string;
|
|
720
|
+
originalSize: number;
|
|
721
|
+
compressedSize: number;
|
|
722
|
+
compressionRatio: number;
|
|
723
|
+
mode: string;
|
|
724
|
+
}
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
###### compressFile()
|
|
728
|
+
```javascript
|
|
729
|
+
async compressFile(
|
|
730
|
+
filePath: string,
|
|
731
|
+
mode?: CompressionMode
|
|
732
|
+
): Promise<CompressedResult>
|
|
733
|
+
```
|
|
734
|
+
Compresses a single file.
|
|
735
|
+
|
|
736
|
+
###### compressDirectory()
|
|
737
|
+
```javascript
|
|
738
|
+
async compressDirectory(
|
|
739
|
+
dirPath: string,
|
|
740
|
+
mode?: CompressionMode,
|
|
741
|
+
options?: DirectoryOptions
|
|
742
|
+
): Promise<DirectoryResult>
|
|
743
|
+
```
|
|
744
|
+
Compresses entire directory.
|
|
745
|
+
|
|
746
|
+
**Options:**
|
|
747
|
+
```typescript
|
|
748
|
+
interface DirectoryOptions {
|
|
749
|
+
exclude?: string[]; // Patterns to exclude
|
|
750
|
+
includeOnly?: string[]; // Patterns to include
|
|
751
|
+
recursive?: boolean; // Default: true
|
|
752
|
+
maxDepth?: number; // Max recursion depth
|
|
753
|
+
}
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
---
|
|
757
|
+
|
|
758
|
+
### Feature-Git Integration
|
|
759
|
+
|
|
760
|
+
Integrates Feature Ledger with Git workflows.
|
|
761
|
+
|
|
762
|
+
#### FeatureGitIntegration
|
|
763
|
+
|
|
764
|
+
##### Constructor
|
|
765
|
+
```javascript
|
|
766
|
+
new FeatureGitIntegration(options?: IntegrationOptions)
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
**Options:**
|
|
770
|
+
```typescript
|
|
771
|
+
interface IntegrationOptions {
|
|
772
|
+
ledgerPath?: string;
|
|
773
|
+
autoLink?: boolean; // Default: true
|
|
774
|
+
hooks?: boolean; // Install git hooks
|
|
775
|
+
}
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
##### Methods
|
|
779
|
+
|
|
780
|
+
###### parseCommitMessage()
|
|
781
|
+
```javascript
|
|
782
|
+
parseCommitMessage(message: string): ParsedCommit
|
|
783
|
+
```
|
|
784
|
+
Extracts feature information from commit message.
|
|
785
|
+
|
|
786
|
+
**Returns:**
|
|
787
|
+
```typescript
|
|
788
|
+
interface ParsedCommit {
|
|
789
|
+
featureId?: string;
|
|
790
|
+
type?: string;
|
|
791
|
+
scope?: string;
|
|
792
|
+
description: string;
|
|
793
|
+
}
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
###### linkFeatureCommit()
|
|
797
|
+
```javascript
|
|
798
|
+
async linkFeatureCommit(
|
|
799
|
+
commitHash: string,
|
|
800
|
+
featureId: string
|
|
801
|
+
): Promise<void>
|
|
802
|
+
```
|
|
803
|
+
Links commit to feature.
|
|
804
|
+
|
|
805
|
+
###### installHooks()
|
|
806
|
+
```javascript
|
|
807
|
+
async installHooks(): Promise<void>
|
|
808
|
+
```
|
|
809
|
+
Installs Git hooks for automatic linking.
|
|
810
|
+
|
|
811
|
+
###### validateCommit()
|
|
812
|
+
```javascript
|
|
813
|
+
async validateCommit(commitMessage: string): Promise<boolean>
|
|
814
|
+
```
|
|
815
|
+
Validates commit message format.
|
|
816
|
+
|
|
817
|
+
###### generateChangeLog()
|
|
818
|
+
```javascript
|
|
819
|
+
async generateChangeLog(
|
|
820
|
+
featureId: string
|
|
821
|
+
): Promise<string>
|
|
822
|
+
```
|
|
823
|
+
Generates feature-specific changelog.
|
|
824
|
+
|
|
825
|
+
---
|
|
826
|
+
|
|
827
|
+
## Utility APIs
|
|
828
|
+
|
|
829
|
+
### Markdown Processor
|
|
830
|
+
|
|
831
|
+
Processes and manipulates markdown files.
|
|
832
|
+
|
|
833
|
+
#### MarkdownProcessor
|
|
834
|
+
|
|
835
|
+
##### Methods
|
|
836
|
+
|
|
837
|
+
###### parse()
|
|
838
|
+
```javascript
|
|
839
|
+
static parse(markdown: string): ParsedMarkdown
|
|
840
|
+
```
|
|
841
|
+
Parses markdown content.
|
|
842
|
+
|
|
843
|
+
###### extract()
|
|
844
|
+
```javascript
|
|
845
|
+
static extract(
|
|
846
|
+
markdown: string,
|
|
847
|
+
selector: string
|
|
848
|
+
): string | null
|
|
849
|
+
```
|
|
850
|
+
Extracts content by selector.
|
|
851
|
+
|
|
852
|
+
###### transform()
|
|
853
|
+
```javascript
|
|
854
|
+
static transform(
|
|
855
|
+
markdown: string,
|
|
856
|
+
transformFn: (node: Node) => Node
|
|
857
|
+
): string
|
|
858
|
+
```
|
|
859
|
+
Transforms markdown AST.
|
|
860
|
+
|
|
861
|
+
---
|
|
862
|
+
|
|
863
|
+
### Template Engine
|
|
864
|
+
|
|
865
|
+
Processes AIWF templates with variable substitution.
|
|
866
|
+
|
|
867
|
+
#### TemplateEngine
|
|
868
|
+
|
|
869
|
+
##### Methods
|
|
870
|
+
|
|
871
|
+
###### render()
|
|
872
|
+
```javascript
|
|
873
|
+
static render(
|
|
874
|
+
template: string,
|
|
875
|
+
variables: Record<string, any>
|
|
876
|
+
): string
|
|
877
|
+
```
|
|
878
|
+
Renders template with variables.
|
|
879
|
+
|
|
880
|
+
###### loadTemplate()
|
|
881
|
+
```javascript
|
|
882
|
+
static async loadTemplate(
|
|
883
|
+
templateName: string
|
|
884
|
+
): Promise<string>
|
|
885
|
+
```
|
|
886
|
+
Loads template from templates directory.
|
|
887
|
+
|
|
888
|
+
###### registerHelper()
|
|
889
|
+
```javascript
|
|
890
|
+
static registerHelper(
|
|
891
|
+
name: string,
|
|
892
|
+
fn: (...args: any[]) => any
|
|
893
|
+
): void
|
|
894
|
+
```
|
|
895
|
+
Registers template helper function.
|
|
896
|
+
|
|
897
|
+
---
|
|
898
|
+
|
|
899
|
+
## Error Handling
|
|
900
|
+
|
|
901
|
+
All async methods follow standard Promise rejection patterns:
|
|
902
|
+
|
|
903
|
+
```javascript
|
|
904
|
+
try {
|
|
905
|
+
const result = await someAsyncOperation();
|
|
906
|
+
console.log(result);
|
|
907
|
+
} catch (error) {
|
|
908
|
+
if (error instanceof ValidationError) {
|
|
909
|
+
// Handle validation errors
|
|
910
|
+
} else if (error instanceof NetworkError) {
|
|
911
|
+
// Handle network errors
|
|
912
|
+
} else {
|
|
913
|
+
// Handle general errors
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
### Common Error Types
|
|
919
|
+
|
|
920
|
+
```typescript
|
|
921
|
+
class ValidationError extends Error {
|
|
922
|
+
field?: string;
|
|
923
|
+
value?: any;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
class NetworkError extends Error {
|
|
927
|
+
statusCode?: number;
|
|
928
|
+
response?: any;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
class FileSystemError extends Error {
|
|
932
|
+
path?: string;
|
|
933
|
+
operation?: string;
|
|
934
|
+
}
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
---
|
|
938
|
+
|
|
939
|
+
## Best Practices
|
|
940
|
+
|
|
941
|
+
### Performance
|
|
942
|
+
|
|
943
|
+
1. **Batch Operations**: Use batch processors for multiple file operations
|
|
944
|
+
2. **Caching**: Enable caching for repeated API calls
|
|
945
|
+
3. **Memory Management**: Monitor memory usage in long-running processes
|
|
946
|
+
4. **Compression**: Use appropriate compression modes based on use case
|
|
947
|
+
|
|
948
|
+
### Error Handling
|
|
949
|
+
|
|
950
|
+
1. **Graceful Degradation**: Provide fallbacks for failed operations
|
|
951
|
+
2. **Retry Logic**: Implement exponential backoff for network requests
|
|
952
|
+
3. **Logging**: Use structured logging for debugging
|
|
953
|
+
4. **Validation**: Validate inputs before processing
|
|
954
|
+
|
|
955
|
+
### Integration
|
|
956
|
+
|
|
957
|
+
1. **Git Hooks**: Install hooks for automatic feature tracking
|
|
958
|
+
2. **CI/CD**: Integrate benchmarks into build pipeline
|
|
959
|
+
3. **Monitoring**: Track token usage and performance metrics
|
|
960
|
+
4. **Documentation**: Keep API documentation in sync with code
|
|
961
|
+
|
|
962
|
+
---
|
|
963
|
+
|
|
964
|
+
## Version Compatibility
|
|
965
|
+
|
|
966
|
+
| AIWF Version | Node.js | API Version |
|
|
967
|
+
|--------------|---------|-------------|
|
|
968
|
+
| 1.0.x | 14+ | v1 |
|
|
969
|
+
| 1.1.x | 16+ | v1 |
|
|
970
|
+
| 2.0.x | 18+ | v2 |
|
|
971
|
+
|
|
972
|
+
---
|
|
973
|
+
|
|
974
|
+
## Support
|
|
975
|
+
|
|
976
|
+
- **GitHub Issues**: [github.com/aiwf/aiwf/issues](https://github.com/aiwf/aiwf/issues)
|
|
977
|
+
- **Documentation**: [aiwf.github.io/docs](https://aiwf.github.io/docs)
|
|
978
|
+
- **Discord**: [discord.gg/aiwf](https://discord.gg/aiwf)
|
|
979
|
+
- **Email**: support@aiwf.dev
|