aiwf 0.3.23 → 0.4.0

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.
Files changed (321) hide show
  1. package/.claude-plugin/marketplace.json +146 -0
  2. package/CHANGELOG.md +49 -1
  3. package/README.ko.md +118 -309
  4. package/README.md +68 -254
  5. package/docs/modernization/BROWNFIELD-GREENFIELD.ko.md +105 -0
  6. package/docs/modernization/CLAUDE-PLAN-REVIEW-2026-10-03.ko.md +77 -0
  7. package/docs/modernization/CLI-PRODUCTIVITY-REVIEWED-2026-10-03.ko.md +177 -0
  8. package/docs/modernization/CLI-PRODUCTIVITY.ko.md +193 -0
  9. package/docs/modernization/CORE-PACKAGE-PLAN.md +7 -0
  10. package/docs/modernization/DEEP-REVERSE-ENGINEERING.ko.md +88 -0
  11. package/docs/modernization/DELEGATION-OPTIONAL.ko.md +57 -0
  12. package/docs/modernization/DIRECTION.ko.md +56 -0
  13. package/docs/modernization/FULL-TEST-2026-10-03.md +49 -0
  14. package/docs/modernization/LEGACY-REMOVAL-PLAN.md +9 -0
  15. package/docs/modernization/PILOT-RESULT-2026-10-03.ko.md +85 -0
  16. package/docs/modernization/PILOT-UC-001.ko.md +79 -0
  17. package/docs/modernization/PLAN.md +28 -0
  18. package/docs/modernization/SKILLS.ko.md +105 -0
  19. package/docs/modernization/SPRINTABLE.ko.md +47 -0
  20. package/docs/modernization/SYNC-DOCS-VALIDATION-2026-10-04.ko.md +38 -0
  21. package/docs/modernization/VALIDATION.md +79 -0
  22. package/docs/modernization/evidence/example-review-packet.json +115 -0
  23. package/docs/modernization/evidence/example-spec-pin.json +48 -0
  24. package/docs/modernization/evidence/full-test-20261003/claude-lint.md +22 -0
  25. package/docs/modernization/evidence/full-test-20261003/claude-review-retry.md +56 -0
  26. package/docs/modernization/evidence/full-test-20261003/codex-review-packet.json +159 -0
  27. package/docs/modernization/evidence/full-test-20261003/src/expense.mjs +40 -0
  28. package/docs/modernization/evidence/full-test-20261003/summary.json +106 -0
  29. package/docs/modernization/evidence/full-test-20261003/tests/expense.test.mjs +61 -0
  30. package/docs/modernization/evidence/local-pilot-20261003/README.ko.md +40 -0
  31. package/docs/modernization/evidence/local-pilot-20261003/execution.json +1055 -0
  32. package/docs/modernization/evidence/local-pilot-20261003/maintenance/dependencies.json +24 -0
  33. package/docs/modernization/evidence/local-pilot-20261003/maintenance/dependencies.stderr.txt +0 -0
  34. package/docs/modernization/evidence/local-pilot-20261003/maintenance/dependencies.stdout.txt +5 -0
  35. package/docs/modernization/evidence/local-pilot-20261003/maintenance/docs.json +24 -0
  36. package/docs/modernization/evidence/local-pilot-20261003/maintenance/docs.stderr.txt +0 -0
  37. package/docs/modernization/evidence/local-pilot-20261003/maintenance/docs.stdout.txt +6 -0
  38. package/docs/modernization/evidence/local-pilot-20261003/maintenance/example.json +24 -0
  39. package/docs/modernization/evidence/local-pilot-20261003/maintenance/example.stderr.txt +0 -0
  40. package/docs/modernization/evidence/local-pilot-20261003/maintenance/example.stdout.txt +5 -0
  41. package/docs/modernization/evidence/local-pilot-20261003/maintenance/local-docs.json +24 -0
  42. package/docs/modernization/evidence/local-pilot-20261003/maintenance/local-docs.stderr.txt +0 -0
  43. package/docs/modernization/evidence/local-pilot-20261003/maintenance/local-docs.stdout.txt +6 -0
  44. package/docs/modernization/evidence/local-pilot-20261003/maintenance/node.json +23 -0
  45. package/docs/modernization/evidence/local-pilot-20261003/maintenance/node.stderr.txt +0 -0
  46. package/docs/modernization/evidence/local-pilot-20261003/maintenance/node.stdout.txt +535 -0
  47. package/docs/modernization/evidence/local-pilot-20261003/maintenance/provenance.json +24 -0
  48. package/docs/modernization/evidence/local-pilot-20261003/maintenance/provenance.stderr.txt +0 -0
  49. package/docs/modernization/evidence/local-pilot-20261003/maintenance/provenance.stdout.txt +5 -0
  50. package/docs/modernization/evidence/local-pilot-20261003/maintenance/readme-replay.json +24 -0
  51. package/docs/modernization/evidence/local-pilot-20261003/maintenance/readme-replay.stderr.txt +0 -0
  52. package/docs/modernization/evidence/local-pilot-20261003/maintenance/readme-replay.stdout.txt +273 -0
  53. package/docs/modernization/evidence/local-pilot-20261003/maintenance/upstream.json +24 -0
  54. package/docs/modernization/evidence/local-pilot-20261003/maintenance/upstream.stderr.txt +0 -0
  55. package/docs/modernization/evidence/local-pilot-20261003/maintenance/upstream.stdout.txt +7 -0
  56. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/archive-service.stderr.txt +0 -0
  57. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/archive-service.stdout.txt +148 -0
  58. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/archive-structure.stderr.txt +0 -0
  59. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/archive-structure.stdout.txt +9 -0
  60. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-check.stderr.txt +0 -0
  61. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-check.stdout.txt +67 -0
  62. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-evidence.json +34 -0
  63. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-packet.json +128 -0
  64. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-packet.stderr.txt +0 -0
  65. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-packet.stdout.txt +128 -0
  66. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-pin.json +54 -0
  67. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-pin.stderr.txt +0 -0
  68. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-pin.stdout.txt +60 -0
  69. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-readback.json +15 -0
  70. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-service.stderr.txt +0 -0
  71. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-service.stdout.txt +82 -0
  72. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-structure.stderr.txt +0 -0
  73. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-structure.stdout.txt +9 -0
  74. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-check.stderr.txt +0 -0
  75. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-check.stdout.txt +79 -0
  76. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-packet-refused.stderr.txt +0 -0
  77. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-packet-refused.stdout.txt +7 -0
  78. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-pin-refresh.stderr.txt +0 -0
  79. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-pin-refresh.stdout.txt +66 -0
  80. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-pin.json +60 -0
  81. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-structure.stderr.txt +0 -0
  82. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-structure.stdout.txt +9 -0
  83. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-check.stderr.txt +0 -0
  84. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-check.stdout.txt +73 -0
  85. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-evidence.json +34 -0
  86. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-packet.json +134 -0
  87. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-packet.stderr.txt +0 -0
  88. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-packet.stdout.txt +134 -0
  89. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-readback.json +15 -0
  90. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-service.stderr.txt +0 -0
  91. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-service.stdout.txt +148 -0
  92. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-structure.stderr.txt +0 -0
  93. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-structure.stdout.txt +9 -0
  94. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/node-version.stderr.txt +0 -0
  95. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/node-version.stdout.txt +1 -0
  96. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/python-version.stderr.txt +0 -0
  97. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/python-version.stdout.txt +1 -0
  98. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-evidence.json +34 -0
  99. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-packet.json +134 -0
  100. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-packet.stderr.txt +0 -0
  101. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-packet.stdout.txt +134 -0
  102. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-readback.json +15 -0
  103. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-service.stderr.txt +0 -0
  104. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-service.stdout.txt +266 -0
  105. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-structure.stderr.txt +0 -0
  106. package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-structure.stdout.txt +9 -0
  107. package/docs/modernization/evidence/local-pilot-20261003/project/docs/entity_model.md +33 -0
  108. package/docs/modernization/evidence/local-pilot-20261003/project/docs/glossary.md +9 -0
  109. package/docs/modernization/evidence/local-pilot-20261003/project/docs/plans/UC-001.md +20 -0
  110. package/docs/modernization/evidence/local-pilot-20261003/project/docs/requirements.md +10 -0
  111. package/docs/modernization/evidence/local-pilot-20261003/project/docs/test_cases/TC-001-submit-expense.md +37 -0
  112. package/docs/modernization/evidence/local-pilot-20261003/project/docs/test_cases/TC-002-description-limit.md +42 -0
  113. package/docs/modernization/evidence/local-pilot-20261003/project/docs/use_cases/UC-001-submit-expense.md +76 -0
  114. package/docs/modernization/evidence/local-pilot-20261003/project/docs/use_cases.puml +12 -0
  115. package/docs/modernization/evidence/local-pilot-20261003/project/docs/vision.md +21 -0
  116. package/docs/modernization/evidence/local-pilot-20261003/project/src/expense.mjs +48 -0
  117. package/docs/modernization/evidence/local-pilot-20261003/project/tests/expense.test.mjs +116 -0
  118. package/docs/modernization/evidence/local-pilot-20261003/scope.json +31 -0
  119. package/docs/modernization/reviews/2026-10-03-claude-cli/CONTRACTS.ko.md +122 -0
  120. package/docs/modernization/reviews/2026-10-03-claude-cli/DIRECTION.ko.md +84 -0
  121. package/examples/spec-workflow/README.md +54 -0
  122. package/examples/spec-workflow/docs/entity_model.md +33 -0
  123. package/examples/spec-workflow/docs/glossary.md +9 -0
  124. package/examples/spec-workflow/docs/requirements.md +10 -0
  125. package/examples/spec-workflow/docs/test_cases/TC-001-submit-expense.md +37 -0
  126. package/examples/spec-workflow/docs/use_cases/UC-001-submit-expense.md +63 -0
  127. package/examples/spec-workflow/docs/use_cases.puml +12 -0
  128. package/examples/spec-workflow/docs/vision.md +21 -0
  129. package/package.json +37 -105
  130. package/plugins/aiwf-angular-jpa/.claude-plugin/plugin.json +11 -0
  131. package/plugins/aiwf-angular-jpa/LICENSE +201 -0
  132. package/plugins/aiwf-angular-jpa/NOTICE +16 -0
  133. package/plugins/aiwf-angular-jpa/README.md +54 -0
  134. package/plugins/aiwf-angular-jpa/UPSTREAM.json +35 -0
  135. package/plugins/aiwf-angular-jpa/agents/uc-coverage.md +263 -0
  136. package/plugins/aiwf-angular-jpa/rules/mcp-servers.md +64 -0
  137. package/plugins/aiwf-angular-jpa/skills/coverage-check/SKILL.md +190 -0
  138. package/plugins/aiwf-angular-jpa/skills/flyway-migration/SKILL.md +119 -0
  139. package/plugins/aiwf-angular-jpa/skills/implement/SKILL.md +528 -0
  140. package/plugins/aiwf-angular-jpa/skills/implement/references/module-layout.md +95 -0
  141. package/plugins/aiwf-angular-jpa/skills/playwright-test/SKILL.md +360 -0
  142. package/plugins/aiwf-angular-jpa/skills/spring-boot-test/SKILL.md +504 -0
  143. package/plugins/aiwf-angular-jpa/skills/vitest-test/SKILL.md +309 -0
  144. package/plugins/aiwf-blazor-dotnet/.claude-plugin/plugin.json +11 -0
  145. package/plugins/aiwf-blazor-dotnet/LICENSE +201 -0
  146. package/plugins/aiwf-blazor-dotnet/NOTICE +16 -0
  147. package/plugins/aiwf-blazor-dotnet/README.md +53 -0
  148. package/plugins/aiwf-blazor-dotnet/UPSTREAM.json +31 -0
  149. package/plugins/aiwf-blazor-dotnet/rules/mcp-servers.md +25 -0
  150. package/plugins/aiwf-blazor-dotnet/skills/bunit-test/SKILL.md +110 -0
  151. package/plugins/aiwf-blazor-dotnet/skills/dotnet-test/SKILL.md +108 -0
  152. package/plugins/aiwf-blazor-dotnet/skills/ef-migration/SKILL.md +43 -0
  153. package/plugins/aiwf-blazor-dotnet/skills/implement/SKILL.md +149 -0
  154. package/plugins/aiwf-blazor-dotnet/skills/playwright-test/SKILL.md +130 -0
  155. package/plugins/aiwf-core/.claude-plugin/plugin.json +11 -0
  156. package/plugins/aiwf-core/LICENSE +201 -0
  157. package/plugins/aiwf-core/NOTICE +20 -0
  158. package/plugins/aiwf-core/README.md +38 -0
  159. package/plugins/aiwf-core/UPSTREAM.json +50 -0
  160. package/plugins/aiwf-core/skills/entity-model/SKILL.md +160 -0
  161. package/plugins/aiwf-core/skills/entity-model/references/REFERENCE.md +36 -0
  162. package/plugins/aiwf-core/skills/requirements/SKILL.md +157 -0
  163. package/plugins/aiwf-core/skills/requirements/references/REFERENCE.md +70 -0
  164. package/plugins/aiwf-core/skills/requirements/references/glossary.md +7 -0
  165. package/plugins/aiwf-core/skills/reverse-engineer/SKILL.md +509 -0
  166. package/plugins/aiwf-core/skills/reverse-engineer/references/stack-signals.md +210 -0
  167. package/plugins/aiwf-core/skills/spec-review/SKILL.md +197 -0
  168. package/plugins/aiwf-core/skills/spec-review/references/lint-codes.md +63 -0
  169. package/plugins/aiwf-core/skills/spec-review/references/review-checklist.md +189 -0
  170. package/plugins/aiwf-core/skills/spec-review/scripts/spec_lint.py +1216 -0
  171. package/plugins/aiwf-core/skills/test-case/SKILL.md +138 -0
  172. package/plugins/aiwf-core/skills/test-case/references/example-process.bpmn +118 -0
  173. package/plugins/aiwf-core/skills/test-case/references/example.md +38 -0
  174. package/plugins/aiwf-core/skills/test-case/references/test-case.md +35 -0
  175. package/plugins/aiwf-core/skills/test-case/scripts/bpmn_paths.py +542 -0
  176. package/plugins/aiwf-core/skills/use-case-diagram/SKILL.md +99 -0
  177. package/plugins/aiwf-core/skills/use-case-spec/SKILL.md +257 -0
  178. package/plugins/aiwf-core/skills/use-case-spec/references/clarify-checklist.md +70 -0
  179. package/plugins/aiwf-core/skills/use-case-spec/references/example.md +88 -0
  180. package/plugins/aiwf-core/skills/use-case-spec/references/format-spec.md +246 -0
  181. package/plugins/aiwf-core/skills/use-case-spec/references/use-case.md +50 -0
  182. package/plugins/aiwf-core/skills/use-case-spec/scripts/validate_use_case.py +941 -0
  183. package/plugins/aiwf-delegate-claude/.claude-plugin/plugin.json +9 -0
  184. package/plugins/aiwf-delegate-claude/LICENSE +21 -0
  185. package/plugins/aiwf-delegate-claude/NOTICE +4 -0
  186. package/plugins/aiwf-delegate-claude/README.md +10 -0
  187. package/plugins/aiwf-delegate-claude/plugin.json +13 -0
  188. package/plugins/aiwf-delegate-claude/skills/delegate-claude/LICENSE +21 -0
  189. package/plugins/aiwf-delegate-claude/skills/delegate-claude/NOTICE +4 -0
  190. package/plugins/aiwf-delegate-claude/skills/delegate-claude/SKILL.md +49 -0
  191. package/plugins/aiwf-delegate-claude/skills/delegate-claude/agents/openai.yaml +2 -0
  192. package/plugins/aiwf-delegate-codex/.claude-plugin/plugin.json +9 -0
  193. package/plugins/aiwf-delegate-codex/LICENSE +21 -0
  194. package/plugins/aiwf-delegate-codex/NOTICE +4 -0
  195. package/plugins/aiwf-delegate-codex/README.md +10 -0
  196. package/plugins/aiwf-delegate-codex/plugin.json +13 -0
  197. package/plugins/aiwf-delegate-codex/skills/delegate-codex/LICENSE +21 -0
  198. package/plugins/aiwf-delegate-codex/skills/delegate-codex/NOTICE +4 -0
  199. package/plugins/aiwf-delegate-codex/skills/delegate-codex/SKILL.md +47 -0
  200. package/plugins/aiwf-delegate-codex/skills/delegate-codex/agents/openai.yaml +2 -0
  201. package/plugins/aiwf-nestjs-nextjs/.claude-plugin/plugin.json +11 -0
  202. package/plugins/aiwf-nestjs-nextjs/LICENSE +201 -0
  203. package/plugins/aiwf-nestjs-nextjs/NOTICE +16 -0
  204. package/plugins/aiwf-nestjs-nextjs/README.md +53 -0
  205. package/plugins/aiwf-nestjs-nextjs/UPSTREAM.json +32 -0
  206. package/plugins/aiwf-nestjs-nextjs/rules/mcp-servers.md +59 -0
  207. package/plugins/aiwf-nestjs-nextjs/skills/drizzle-migration/SKILL.md +222 -0
  208. package/plugins/aiwf-nestjs-nextjs/skills/implement/SKILL.md +393 -0
  209. package/plugins/aiwf-nestjs-nextjs/skills/implement/references/project-layout.md +158 -0
  210. package/plugins/aiwf-nestjs-nextjs/skills/nest-test/SKILL.md +300 -0
  211. package/plugins/aiwf-nestjs-nextjs/skills/playwright-test/SKILL.md +245 -0
  212. package/plugins/aiwf-nestjs-nextjs/skills/react-test/SKILL.md +217 -0
  213. package/plugins/aiwf-spec/.claude-plugin/plugin.json +9 -0
  214. package/plugins/aiwf-spec/LICENSE +201 -0
  215. package/plugins/aiwf-spec/NOTICE +20 -0
  216. package/plugins/aiwf-spec/README.md +36 -0
  217. package/plugins/aiwf-spec/skills/sync-docs/SKILL.md +47 -0
  218. package/plugins/aiwf-spec/skills/workflow/SKILL.md +42 -0
  219. package/plugins/aiwf-vaadin-jooq/.claude-plugin/plugin.json +11 -0
  220. package/plugins/aiwf-vaadin-jooq/LICENSE +201 -0
  221. package/plugins/aiwf-vaadin-jooq/NOTICE +16 -0
  222. package/plugins/aiwf-vaadin-jooq/README.md +56 -0
  223. package/plugins/aiwf-vaadin-jooq/UPSTREAM.json +43 -0
  224. package/plugins/aiwf-vaadin-jooq/agents/uc-coverage.md +260 -0
  225. package/plugins/aiwf-vaadin-jooq/rules/mcp-servers.md +44 -0
  226. package/plugins/aiwf-vaadin-jooq/skills/browserless-test/SKILL.md +407 -0
  227. package/plugins/aiwf-vaadin-jooq/skills/browserless-test/references/UC001ManagePersonsTest.java +111 -0
  228. package/plugins/aiwf-vaadin-jooq/skills/coverage-check/SKILL.md +190 -0
  229. package/plugins/aiwf-vaadin-jooq/skills/flyway-migration/SKILL.md +70 -0
  230. package/plugins/aiwf-vaadin-jooq/skills/hilla-test/SKILL.md +350 -0
  231. package/plugins/aiwf-vaadin-jooq/skills/hilla-test/references/UC001ManagePersonsServiceTest.java +81 -0
  232. package/plugins/aiwf-vaadin-jooq/skills/hilla-test/references/UC001ManagePersonsViewTest.tsx +87 -0
  233. package/plugins/aiwf-vaadin-jooq/skills/implement/SKILL.md +196 -0
  234. package/plugins/aiwf-vaadin-jooq/skills/implement-hilla/SKILL.md +216 -0
  235. package/plugins/aiwf-vaadin-jooq/skills/karibu-test/SKILL.md +298 -0
  236. package/plugins/aiwf-vaadin-jooq/skills/karibu-test/references/UC001ManagePersonsTest.java +93 -0
  237. package/plugins/aiwf-vaadin-jooq/skills/playwright-test/SKILL.md +237 -0
  238. package/plugins/aiwf-vaadin-jooq/skills/playwright-test/references/ExampleViewIT.java +143 -0
  239. package/plugins/aiwf-vaadin-jooq/skills/playwright-test/references/TC001CustomerOnboardingIT.java +144 -0
  240. package/plugins/aiwf-vaadin-jooq/skills/playwright-test/references/dramafinder-api.md +190 -0
  241. package/scripts/check-dependencies.js +26 -96
  242. package/scripts/install-spec-skills.mjs +126 -0
  243. package/scripts/validate-spec-plugin.mjs +145 -0
  244. package/src/cli/spec-cli.js +292 -0
  245. package/src/lib/spec-workflow.js +982 -0
  246. package/docs/ADR_MANAGEMENT_GUIDE.ko.md +0 -602
  247. package/docs/ADR_MANAGEMENT_GUIDE.md +0 -602
  248. package/docs/AI-WORKFLOW.ko.md +0 -299
  249. package/docs/AI-WORKFLOW.md +0 -401
  250. package/docs/API_REFERENCE_FULL.ko.md +0 -1135
  251. package/docs/API_REFERENCE_FULL.md +0 -1135
  252. package/docs/ARCHITECTURE.ko.md +0 -314
  253. package/docs/ARCHITECTURE.md +0 -314
  254. package/docs/CLI_USAGE_GUIDE.ko.md +0 -634
  255. package/docs/CLI_USAGE_GUIDE.md +0 -640
  256. package/docs/CODE_CLEANUP_GUIDE.ko.md +0 -415
  257. package/docs/CODE_CLEANUP_GUIDE.md +0 -415
  258. package/docs/COMMANDS_GUIDE.ko.md +0 -1037
  259. package/docs/COMMANDS_GUIDE.md +0 -1037
  260. package/docs/CONTRIBUTING.ko.md +0 -408
  261. package/docs/CONTRIBUTING.md +0 -408
  262. package/docs/DEVELOPMENT_GUIDE.ko.md +0 -440
  263. package/docs/DEVELOPMENT_GUIDE.md +0 -727
  264. package/docs/EXAMPLES.ko.md +0 -695
  265. package/docs/EXAMPLES.md +0 -693
  266. package/docs/GETTING_STARTED.ko.md +0 -219
  267. package/docs/GETTING_STARTED.md +0 -476
  268. package/docs/MODULE_MANAGEMENT_GUIDE.ko.md +0 -289
  269. package/docs/MODULE_MANAGEMENT_GUIDE.md +0 -289
  270. package/docs/PERFORMANCE_ARCHITECTURE.md +0 -494
  271. package/docs/PERFORMANCE_GUIDELINES.ko.md +0 -388
  272. package/docs/PERFORMANCE_GUIDELINES.md +0 -553
  273. package/docs/PRD.ko.md +0 -148
  274. package/docs/PRD.md +0 -150
  275. package/docs/ROADMAP_v0.4.0.md +0 -286
  276. package/docs/STATE_MANAGEMENT_GUIDE.ko.md +0 -278
  277. package/docs/STATE_MANAGEMENT_GUIDE.md +0 -278
  278. package/docs/TROUBLESHOOTING.ko.md +0 -366
  279. package/docs/TROUBLESHOOTING.md +0 -722
  280. package/docs/VALIDATOR_API.ko.md +0 -324
  281. package/docs/VALIDATOR_API.md +0 -324
  282. package/docs/YOLO_SYSTEM_GUIDE.ko.md +0 -542
  283. package/docs/YOLO_SYSTEM_GUIDE.md +0 -542
  284. package/docs/designs/AI_PERSONA_SYSTEM_DESIGN.md +0 -516
  285. package/docs/designs/API_DOCUMENTATION.md +0 -932
  286. package/docs/designs/API_REFERENCE.md +0 -979
  287. package/docs/designs/Enhanced_Installation_Flow_Design.md +0 -498
  288. package/docs/designs/aiwf-metadata-system-prd.md +0 -127
  289. package/docs/designs/offline-template-cache.md +0 -323
  290. package/docs/designs/persona-aware-compression.md +0 -168
  291. package/docs/guides/ai-personas-guide-ko.md +0 -239
  292. package/docs/guides/ai-personas-guide.md +0 -239
  293. package/docs/guides/checkpoint-system-guide-ko.md +0 -356
  294. package/docs/guides/checkpoint-system-guide.md +0 -356
  295. package/docs/guides/context-compression-guide-ko.md +0 -313
  296. package/docs/guides/context-compression-guide.md +0 -313
  297. package/docs/guides/independent-sprint-guide-ko.md +0 -321
  298. package/docs/guides/independent-sprint-guide.md +0 -321
  299. package/rules/global/aiwf-code-style-guide.md +0 -30
  300. package/rules/global/aiwf-coding-principles.md +0 -33
  301. package/rules/global/aiwf-development-process.md +0 -41
  302. package/rules/global/aiwf-global-rules.md +0 -84
  303. package/rules/manual/aiwf-generate-plan-docs.md +0 -280
  304. package/scripts/run-integration-tests.js +0 -317
  305. package/scripts/update-file-lists.js +0 -267
  306. package/scripts/validate-commands.js +0 -254
  307. package/src/cli/index.js +0 -184
  308. package/src/commands/sprint-independent.js +0 -393
  309. package/src/commands/state.js +0 -1164
  310. package/src/commands/yolo-config.js +0 -502
  311. package/src/config/file-lists.js +0 -147
  312. package/src/config/yolo-config-template.yaml +0 -168
  313. package/src/lib/backup-manager.js +0 -271
  314. package/src/lib/file-downloader.js +0 -304
  315. package/src/lib/installer.js +0 -1270
  316. package/src/lib/rollback-manager.js +0 -418
  317. package/src/lib/validator.js +0 -376
  318. package/src/utils/checkpoint-manager.js +0 -435
  319. package/src/utils/language-utils.js +0 -331
  320. package/src/utils/messages.js +0 -190
  321. package/src/utils/paths.js +0 -112
@@ -1,1135 +0,0 @@
1
- # AIWF Complete API Reference
2
-
3
- [한국어로 보기](API_REFERENCE_FULL.ko.md)
4
-
5
- ## Table of Contents
6
-
7
- 1. [Core APIs](#core-apis)
8
- - [Resource Loader](#resource-loader)
9
- - [State Management](#state-management)
10
- - [Template System](#template-system)
11
- 2. [Command APIs](#command-apis)
12
- - [AI Tool Command](#ai-tool-command)
13
- - [Compress Command](#compress-command)
14
- - [Create Project](#create-project)
15
- - [Evaluate Command](#evaluate-command)
16
- - [Feature Command](#feature-command)
17
- - [Persona Command](#persona-command)
18
- - [State Command](#state-command)
19
- - [Token Command](#token-command)
20
- - [YOLO Config](#yolo-config)
21
- 3. [Utility APIs](#utility-apis)
22
- - [Checkpoint Manager](#checkpoint-manager)
23
- - [Git Utilities](#git-utilities)
24
- - [Token Counter](#token-counter)
25
- - [Text Processors](#text-processors)
26
- 4. [Plugin APIs](#plugin-apis)
27
- - [Plugin Interface](#plugin-interface)
28
- - [Hook System](#hook-system)
29
- 5. [AI Integration APIs](#ai-integration-apis)
30
- - [Persona Manager](#persona-manager)
31
- - [Compression Engine](#compression-engine)
32
- - [Evaluation System](#evaluation-system)
33
-
34
- ---
35
-
36
- ## Core APIs
37
-
38
- ### Resource Loader
39
-
40
- The Resource Loader manages all framework resources, providing a unified interface for accessing bundled and user resources.
41
-
42
- #### Class: `ResourceLoader`
43
-
44
- ```javascript
45
- import { ResourceLoader } from 'aiwf/lib/resource-loader';
46
- ```
47
-
48
- ##### Constructor
49
-
50
- ```javascript
51
- new ResourceLoader(options?: ResourceLoaderOptions)
52
- ```
53
-
54
- **Options:**
55
- ```typescript
56
- interface ResourceLoaderOptions {
57
- bundledPath?: string; // Path to bundled resources
58
- userPath?: string; // Path to user resources
59
- preferUserResources?: boolean; // Prefer user over bundled (default: true)
60
- }
61
- ```
62
-
63
- ##### Methods
64
-
65
- ###### `resolvePath(resourceType, resourceName)`
66
-
67
- Resolves the path to a resource, checking user directory first, then bundled resources.
68
-
69
- ```javascript
70
- async resolvePath(resourceType: string, resourceName: string): Promise<string>
71
- ```
72
-
73
- **Example:**
74
- ```javascript
75
- const loader = new ResourceLoader();
76
- const personaPath = await loader.resolvePath('personas', 'analyst.json');
77
- ```
78
-
79
- ###### `loadResource(resourceType, resourceName)`
80
-
81
- Loads and parses a resource file.
82
-
83
- ```javascript
84
- async loadResource(resourceType: string, resourceName: string): Promise<any>
85
- ```
86
-
87
- **Supported formats:**
88
- - JSON (`.json`)
89
- - YAML (`.yaml`, `.yml`)
90
- - JavaScript modules (`.js`)
91
- - Markdown (`.md`)
92
-
93
- ###### `listResources(resourceType)`
94
-
95
- Lists all available resources of a given type.
96
-
97
- ```javascript
98
- async listResources(resourceType: string): Promise<string[]>
99
- ```
100
-
101
- ###### `copyResource(resourceType, resourceName, destination)`
102
-
103
- Copies a resource to a specified location.
104
-
105
- ```javascript
106
- async copyResource(
107
- resourceType: string,
108
- resourceName: string,
109
- destination: string
110
- ): Promise<void>
111
- ```
112
-
113
- ### State Management
114
-
115
- Manages application and project state with support for checkpoints and atomic updates.
116
-
117
- #### Class: `StateIndexManager`
118
-
119
- ```javascript
120
- import { StateIndexManager } from 'aiwf/lib/state/state-index';
121
- ```
122
-
123
- ##### Constructor
124
-
125
- ```javascript
126
- new StateIndexManager(aiwfPath: string)
127
- ```
128
-
129
- ##### Methods
130
-
131
- ###### `loadState()`
132
-
133
- Loads the current state from disk.
134
-
135
- ```javascript
136
- async loadState(): Promise<StateIndex>
137
- ```
138
-
139
- **Returns:**
140
- ```typescript
141
- interface StateIndex {
142
- version: string;
143
- last_updated: string;
144
- last_updated_by: string;
145
- project_info: ProjectInfo;
146
- milestones: Milestone[];
147
- sprints: Sprint[];
148
- tasks: Task[];
149
- workflow_mode: WorkflowMode;
150
- }
151
- ```
152
-
153
- ###### `saveState(state)`
154
-
155
- Saves state to disk with automatic backup.
156
-
157
- ```javascript
158
- async saveState(state: StateIndex): Promise<void>
159
- ```
160
-
161
- ###### `updateProjectInfo(updates)`
162
-
163
- Updates project information.
164
-
165
- ```javascript
166
- async updateProjectInfo(updates: Partial<ProjectInfo>): Promise<void>
167
- ```
168
-
169
- ###### `addMilestone(milestone)`
170
-
171
- Adds a new milestone to the project.
172
-
173
- ```javascript
174
- async addMilestone(milestone: Milestone): Promise<void>
175
- ```
176
-
177
- ### Template System
178
-
179
- Manages project templates and code generation.
180
-
181
- #### Class: `TemplateEngine`
182
-
183
- ```javascript
184
- import { TemplateEngine } from 'aiwf/lib/template-engine';
185
- ```
186
-
187
- ##### Methods
188
-
189
- ###### `listTemplates()`
190
-
191
- Lists all available project templates.
192
-
193
- ```javascript
194
- async listTemplates(): Promise<TemplateInfo[]>
195
- ```
196
-
197
- ###### `createFromTemplate(templateName, targetPath, variables)`
198
-
199
- Creates a new project from a template.
200
-
201
- ```javascript
202
- async createFromTemplate(
203
- templateName: string,
204
- targetPath: string,
205
- variables: Record<string, string>
206
- ): Promise<void>
207
- ```
208
-
209
- **Example:**
210
- ```javascript
211
- const engine = new TemplateEngine();
212
- await engine.createFromTemplate('api-server', './my-api', {
213
- projectName: 'My API',
214
- author: 'John Doe',
215
- description: 'My awesome API server'
216
- });
217
- ```
218
-
219
- ---
220
-
221
- ## Command APIs
222
-
223
- ### AI Tool Command
224
-
225
- Manages AI tool integrations and configurations.
226
-
227
- #### Class: `AIToolCommand`
228
-
229
- ```javascript
230
- import AIToolCommand from 'aiwf/commands/ai-tool';
231
- ```
232
-
233
- ##### Methods
234
-
235
- ###### `execute(args)`
236
-
237
- Executes AI tool commands.
238
-
239
- ```javascript
240
- async execute(args: string[]): Promise<void>
241
- ```
242
-
243
- **Subcommands:**
244
- - `list` - List all available AI tools
245
- - `activate <tool>` - Activate an AI tool
246
- - `configure <tool>` - Configure an AI tool
247
- - `status` - Show current AI tool status
248
-
249
- ### Compress Command
250
-
251
- Provides various compression strategies for optimizing context.
252
-
253
- #### Functions
254
-
255
- ###### `compress(mode, content, options)`
256
-
257
- Compresses content using specified strategy.
258
-
259
- ```javascript
260
- async compress(
261
- mode: CompressionMode,
262
- content: string,
263
- options?: CompressionOptions
264
- ): Promise<string>
265
- ```
266
-
267
- **Compression Modes:**
268
- - `simple` - Basic whitespace and comment removal
269
- - `moderate` - Balanced compression
270
- - `aggressive` - Maximum compression
271
- - `custom` - User-defined rules
272
-
273
- **Options:**
274
- ```typescript
275
- interface CompressionOptions {
276
- preserveComments?: boolean;
277
- preserveWhitespace?: boolean;
278
- maxLineLength?: number;
279
- customRules?: CompressionRule[];
280
- }
281
- ```
282
-
283
- ### Create Project
284
-
285
- Creates new AIWF projects from templates.
286
-
287
- #### Function: `createProject`
288
-
289
- ```javascript
290
- async createProject(options: CreateProjectOptions): Promise<void>
291
- ```
292
-
293
- **Options:**
294
- ```typescript
295
- interface CreateProjectOptions {
296
- template: string;
297
- name: string;
298
- path?: string;
299
- variables?: Record<string, string>;
300
- skipInstall?: boolean;
301
- gitInit?: boolean;
302
- }
303
- ```
304
-
305
- ### Evaluate Command
306
-
307
- Evaluates AI responses and code quality.
308
-
309
- #### Class: `EvaluateCommand`
310
-
311
- ##### Methods
312
-
313
- ###### `evaluateResponse(file, options)`
314
-
315
- Evaluates the quality of an AI response.
316
-
317
- ```javascript
318
- async evaluateResponse(
319
- file: string,
320
- options?: EvaluationOptions
321
- ): Promise<EvaluationResult>
322
- ```
323
-
324
- ###### `evaluateCode(file, options)`
325
-
326
- Evaluates code quality and best practices.
327
-
328
- ```javascript
329
- async evaluateCode(
330
- file: string,
331
- options?: CodeEvaluationOptions
332
- ): Promise<CodeEvaluationResult>
333
- ```
334
-
335
- ### Feature Command
336
-
337
- Manages feature tracking and development workflow.
338
-
339
- #### Functions
340
-
341
- ###### `createFeature(name, description)`
342
-
343
- Creates a new feature entry.
344
-
345
- ```javascript
346
- async createFeature(
347
- name: string,
348
- description?: string
349
- ): Promise<FeatureEntry>
350
- ```
351
-
352
- ###### `updateFeatureStatus(id, status)`
353
-
354
- Updates the status of a feature.
355
-
356
- ```javascript
357
- async updateFeatureStatus(
358
- id: string,
359
- status: FeatureStatus
360
- ): Promise<void>
361
- ```
362
-
363
- **Feature Statuses:**
364
- - `planned`
365
- - `in-progress`
366
- - `testing`
367
- - `completed`
368
- - `deployed`
369
-
370
- ### Persona Command
371
-
372
- Manages AI personas and their configurations.
373
-
374
- #### Class: `PersonaCommand`
375
-
376
- ##### Methods
377
-
378
- ###### `listPersonas()`
379
-
380
- Lists all available personas.
381
-
382
- ```javascript
383
- async listPersonas(): Promise<PersonaInfo[]>
384
- ```
385
-
386
- ###### `activatePersona(name)`
387
-
388
- Activates a specific persona.
389
-
390
- ```javascript
391
- async activatePersona(name: string): Promise<void>
392
- ```
393
-
394
- ###### `createPersona(name, config)`
395
-
396
- Creates a custom persona.
397
-
398
- ```javascript
399
- async createPersona(
400
- name: string,
401
- config: PersonaConfig
402
- ): Promise<void>
403
- ```
404
-
405
- ### State Command
406
-
407
- Manages project state and workflow transitions.
408
-
409
- #### Class: `StateCommand`
410
-
411
- ##### Methods
412
-
413
- ###### `showStatus()`
414
-
415
- Displays current project state.
416
-
417
- ```javascript
418
- async showStatus(): Promise<StateStatus>
419
- ```
420
-
421
- ###### `checkpoint(name, description)`
422
-
423
- Creates a state checkpoint.
424
-
425
- ```javascript
426
- async checkpoint(
427
- name: string,
428
- description?: string
429
- ): Promise<CheckpointInfo>
430
- ```
431
-
432
- ###### `restore(checkpointId)`
433
-
434
- Restores from a checkpoint.
435
-
436
- ```javascript
437
- async restore(checkpointId: string): Promise<void>
438
- ```
439
-
440
- ### Token Command
441
-
442
- Monitors and manages AI token usage.
443
-
444
- #### Functions
445
-
446
- ###### `trackUsage(input, output, model)`
447
-
448
- Records token usage.
449
-
450
- ```javascript
451
- async trackUsage(
452
- input: string,
453
- output: string,
454
- model?: string
455
- ): Promise<UsageRecord>
456
- ```
457
-
458
- ###### `getUsageReport(period)`
459
-
460
- Generates usage report.
461
-
462
- ```javascript
463
- async getUsageReport(
464
- period?: 'day' | 'week' | 'month'
465
- ): Promise<UsageReport>
466
- ```
467
-
468
- ### YOLO Config
469
-
470
- Manages YOLO mode configuration.
471
-
472
- #### Functions
473
-
474
- ###### `createYoloConfig(options)`
475
-
476
- Creates YOLO configuration file.
477
-
478
- ```javascript
479
- async createYoloConfig(options?: YoloOptions): Promise<void>
480
- ```
481
-
482
- ###### `createInteractiveYoloConfig()`
483
-
484
- Creates configuration through interactive prompts.
485
-
486
- ```javascript
487
- async createInteractiveYoloConfig(): Promise<void>
488
- ```
489
-
490
- ---
491
-
492
- ## Utility APIs
493
-
494
- ### Engineering Guard
495
-
496
- Prevents over-engineering and maintains code quality during autonomous execution.
497
-
498
- #### Class: `EngineeringGuard`
499
-
500
- ```javascript
501
- import { EngineeringGuard } from 'aiwf/utils/engineering-guard';
502
- ```
503
-
504
- ##### Constructor
505
-
506
- ```javascript
507
- new EngineeringGuard(configPath?: string)
508
- ```
509
-
510
- ##### Methods
511
-
512
- ###### `checkFileComplexity(filePath)`
513
-
514
- Checks a single file for complexity violations.
515
-
516
- ```javascript
517
- async checkFileComplexity(filePath: string): Promise<void>
518
- ```
519
-
520
- ###### `checkProject(projectPath, filePatterns)`
521
-
522
- Performs comprehensive project-wide complexity analysis.
523
-
524
- ```javascript
525
- async checkProject(
526
- projectPath: string,
527
- filePatterns?: string[]
528
- ): Promise<GuardReport>
529
- ```
530
-
531
- **Returns:**
532
- ```typescript
533
- interface GuardReport {
534
- passed: boolean;
535
- violations: Violation[];
536
- warnings: Warning[];
537
- summary: {
538
- total_violations: number;
539
- high_severity: number;
540
- medium_severity: number;
541
- warnings: number;
542
- };
543
- recommendations: string[];
544
- }
545
- ```
546
-
547
- ###### `provideFeedback(filePath, content)`
548
-
549
- Provides real-time feedback during development.
550
-
551
- ```javascript
552
- async provideFeedback(
553
- filePath: string,
554
- content?: string
555
- ): Promise<Feedback[]>
556
- ```
557
-
558
- ###### `generateReport()`
559
-
560
- Generates comprehensive analysis report.
561
-
562
- ```javascript
563
- generateReport(): GuardReport
564
- ```
565
-
566
- ### Checkpoint Manager
567
-
568
- Manages state checkpoints and recovery.
569
-
570
- #### Class: `CheckpointManager`
571
-
572
- ```javascript
573
- import { CheckpointManager } from 'aiwf/utils/checkpoint-manager';
574
- ```
575
-
576
- ##### Constructor
577
-
578
- ```javascript
579
- new CheckpointManager(projectRoot: string)
580
- ```
581
-
582
- ##### Methods
583
-
584
- ###### `startSession(sprintId, mode)`
585
-
586
- Starts a new YOLO session with tracking.
587
-
588
- ```javascript
589
- async startSession(sprintId: string, mode?: string): Promise<void>
590
- ```
591
-
592
- ###### `startTask(taskId, taskInfo)`
593
-
594
- Begins tracking a specific task.
595
-
596
- ```javascript
597
- async startTask(taskId: string, taskInfo?: any): Promise<void>
598
- ```
599
-
600
- ###### `completeTask(taskId, result)`
601
-
602
- Marks a task as completed with results.
603
-
604
- ```javascript
605
- async completeTask(taskId: string, result?: any): Promise<void>
606
- ```
607
-
608
- ###### `createCheckpoint(type, metadata)`
609
-
610
- Creates a new checkpoint.
611
-
612
- ```javascript
613
- async createCheckpoint(
614
- type?: string,
615
- metadata?: CheckpointMetadata
616
- ): Promise<string>
617
- ```
618
-
619
- ###### `listCheckpoints()`
620
-
621
- Lists all available checkpoints.
622
-
623
- ```javascript
624
- async listCheckpoints(): Promise<CheckpointInfo[]>
625
- ```
626
-
627
- ###### `restoreFromCheckpoint(checkpointId)`
628
-
629
- Restores from a specific checkpoint.
630
-
631
- ```javascript
632
- async restoreFromCheckpoint(checkpointId: string): Promise<RestoreResult>
633
- ```
634
-
635
- **Returns:**
636
- ```typescript
637
- interface RestoreResult {
638
- success: boolean;
639
- checkpoint: Checkpoint;
640
- tasks_to_resume: {
641
- completed: string[];
642
- current: string | null;
643
- next_task_hint: string;
644
- };
645
- }
646
- ```
647
-
648
- ###### `generateProgressReport()`
649
-
650
- Generates comprehensive progress report.
651
-
652
- ```javascript
653
- async generateProgressReport(): Promise<ProgressReport>
654
- ```
655
-
656
- **Returns:**
657
- ```typescript
658
- interface ProgressReport {
659
- session: {
660
- id: string;
661
- started: string;
662
- sprint: string;
663
- mode: string;
664
- };
665
- progress: {
666
- completed: number;
667
- failed: number;
668
- skipped: number;
669
- current: string;
670
- };
671
- performance: {
672
- total_time: string;
673
- avg_task_time: string;
674
- success_rate: string;
675
- };
676
- checkpoints: CheckpointInfo[];
677
- recommendations: string[];
678
- }
679
- ```
680
-
681
- ###### `endSession(summary)`
682
-
683
- Ends the current session and generates final report.
684
-
685
- ```javascript
686
- async endSession(summary?: any): Promise<ProgressReport>
687
- ```
688
-
689
- ### Git Utilities
690
-
691
- Provides Git integration utilities.
692
-
693
- #### Functions
694
-
695
- ###### `parseCommitMessage(message)`
696
-
697
- Parses structured commit messages.
698
-
699
- ```javascript
700
- parseCommitMessage(message: string): ParsedCommit
701
- ```
702
-
703
- **Returns:**
704
- ```typescript
705
- interface ParsedCommit {
706
- type: string;
707
- scope?: string;
708
- subject: string;
709
- body?: string;
710
- features?: string[];
711
- tasks?: string[];
712
- }
713
- ```
714
-
715
- ###### `getRecentCommits(limit)`
716
-
717
- Gets recent commit history.
718
-
719
- ```javascript
720
- async getRecentCommits(limit?: number): Promise<Commit[]>
721
- ```
722
-
723
- ### Token Counter
724
-
725
- Counts tokens for various AI models.
726
-
727
- #### Functions
728
-
729
- ###### `countTokens(text, model)`
730
-
731
- Counts tokens in text.
732
-
733
- ```javascript
734
- countTokens(text: string, model?: string): number
735
- ```
736
-
737
- **Supported models:**
738
- - `gpt-3.5-turbo`
739
- - `gpt-4`
740
- - `claude`
741
- - `claude-instant`
742
-
743
- ###### `estimateCost(tokens, model)`
744
-
745
- Estimates cost based on token count.
746
-
747
- ```javascript
748
- estimateCost(tokens: number, model: string): number
749
- ```
750
-
751
- ### Text Processors
752
-
753
- Various text processing utilities.
754
-
755
- #### Functions
756
-
757
- ###### `summarizeText(text, maxLength)`
758
-
759
- Creates a summary of text.
760
-
761
- ```javascript
762
- async summarizeText(
763
- text: string,
764
- maxLength?: number
765
- ): Promise<string>
766
- ```
767
-
768
- ###### `extractKeywords(text)`
769
-
770
- Extracts keywords from text.
771
-
772
- ```javascript
773
- extractKeywords(text: string): string[]
774
- ```
775
-
776
- ###### `normalizeWhitespace(text)`
777
-
778
- Normalizes whitespace in text.
779
-
780
- ```javascript
781
- normalizeWhitespace(text: string): string
782
- ```
783
-
784
- ---
785
-
786
- ## Plugin APIs
787
-
788
- ### Plugin Interface
789
-
790
- Standard interface for AIWF plugins.
791
-
792
- #### Interface: `AIWFPlugin`
793
-
794
- ```typescript
795
- interface AIWFPlugin {
796
- name: string;
797
- version: string;
798
- description?: string;
799
-
800
- // Lifecycle hooks
801
- init?(context: PluginContext): Promise<void>;
802
- destroy?(): Promise<void>;
803
-
804
- // Command hooks
805
- commands?: Record<string, CommandHandler>;
806
-
807
- // Event hooks
808
- hooks?: Record<string, HookHandler>;
809
- }
810
- ```
811
-
812
- #### Plugin Context
813
-
814
- ```typescript
815
- interface PluginContext {
816
- aiwfPath: string;
817
- projectRoot: string;
818
- config: AIWFConfig;
819
- logger: Logger;
820
-
821
- // Core services
822
- resourceLoader: ResourceLoader;
823
- stateManager: StateIndexManager;
824
- templateEngine: TemplateEngine;
825
- }
826
- ```
827
-
828
- ### Hook System
829
-
830
- Event-driven extension system.
831
-
832
- #### Available Hooks
833
-
834
- ##### Command Lifecycle
835
-
836
- ```javascript
837
- hooks: {
838
- 'before-command': async (command, args) => { /* ... */ },
839
- 'after-command': async (command, result) => { /* ... */ },
840
- 'command-error': async (command, error) => { /* ... */ }
841
- }
842
- ```
843
-
844
- ##### State Management
845
-
846
- ```javascript
847
- hooks: {
848
- 'before-state-change': async (oldState, newState) => { /* ... */ },
849
- 'after-state-change': async (oldState, newState) => { /* ... */ },
850
- 'state-checkpoint': async (checkpoint) => { /* ... */ }
851
- }
852
- ```
853
-
854
- ##### Resource Loading
855
-
856
- ```javascript
857
- hooks: {
858
- 'before-resource-load': async (type, name) => { /* ... */ },
859
- 'after-resource-load': async (type, name, content) => { /* ... */ },
860
- 'resource-not-found': async (type, name) => { /* ... */ }
861
- }
862
- ```
863
-
864
- ---
865
-
866
- ## AI Integration APIs
867
-
868
- ### Persona Manager
869
-
870
- Manages AI persona configurations and contexts.
871
-
872
- #### Class: `AIPersonaManager`
873
-
874
- ```javascript
875
- import { AIPersonaManager } from 'aiwf/lib/ai-persona-manager';
876
- ```
877
-
878
- ##### Methods
879
-
880
- ###### `loadPersona(name)`
881
-
882
- Loads a persona configuration.
883
-
884
- ```javascript
885
- async loadPersona(name: string): Promise<Persona>
886
- ```
887
-
888
- ###### `applyPersona(content, persona)`
889
-
890
- Applies persona context to content.
891
-
892
- ```javascript
893
- applyPersona(content: string, persona: Persona): string
894
- ```
895
-
896
- ###### `validatePersona(persona)`
897
-
898
- Validates persona configuration.
899
-
900
- ```javascript
901
- validatePersona(persona: Persona): ValidationResult
902
- ```
903
-
904
- ### Compression Engine
905
-
906
- Provides intelligent content compression.
907
-
908
- #### Class: `CompressionEngine`
909
-
910
- ##### Methods
911
-
912
- ###### `compress(content, strategy)`
913
-
914
- Compresses content using specified strategy.
915
-
916
- ```javascript
917
- async compress(
918
- content: string,
919
- strategy: CompressionStrategy
920
- ): Promise<CompressedContent>
921
- ```
922
-
923
- ###### `decompress(compressed)`
924
-
925
- Decompresses content.
926
-
927
- ```javascript
928
- async decompress(compressed: CompressedContent): Promise<string>
929
- ```
930
-
931
- ###### `analyzeCompression(content)`
932
-
933
- Analyzes potential compression savings.
934
-
935
- ```javascript
936
- analyzeCompression(content: string): CompressionAnalysis
937
- ```
938
-
939
- ### Evaluation System
940
-
941
- Evaluates AI responses and code quality.
942
-
943
- #### Class: `EvaluationSystem`
944
-
945
- ##### Methods
946
-
947
- ###### `evaluateQuality(content, criteria)`
948
-
949
- Evaluates content quality.
950
-
951
- ```javascript
952
- async evaluateQuality(
953
- content: string,
954
- criteria?: EvaluationCriteria
955
- ): Promise<QualityScore>
956
- ```
957
-
958
- ###### `compareResponses(responses)`
959
-
960
- Compares multiple AI responses.
961
-
962
- ```javascript
963
- compareResponses(responses: string[]): ComparisonResult
964
- ```
965
-
966
- ###### `generateReport(evaluations)`
967
-
968
- Generates evaluation report.
969
-
970
- ```javascript
971
- generateReport(evaluations: Evaluation[]): EvaluationReport
972
- ```
973
-
974
- ---
975
-
976
- ## Error Handling
977
-
978
- All AIWF APIs follow consistent error handling patterns:
979
-
980
- ```javascript
981
- try {
982
- const result = await aiwfApi.someMethod();
983
- } catch (error) {
984
- if (error.code === 'RESOURCE_NOT_FOUND') {
985
- // Handle missing resource
986
- } else if (error.code === 'VALIDATION_ERROR') {
987
- // Handle validation error
988
- console.error(error.details);
989
- } else {
990
- // Handle unexpected error
991
- throw error;
992
- }
993
- }
994
- ```
995
-
996
- ### Error Codes
997
-
998
- - `RESOURCE_NOT_FOUND` - Requested resource not found
999
- - `VALIDATION_ERROR` - Input validation failed
1000
- - `STATE_CONFLICT` - State operation conflict
1001
- - `PERMISSION_DENIED` - Insufficient permissions
1002
- - `NETWORK_ERROR` - Network operation failed
1003
- - `TIMEOUT` - Operation timed out
1004
-
1005
- ---
1006
-
1007
- ## Best Practices
1008
-
1009
- ### Resource Management
1010
-
1011
- 1. Always use ResourceLoader for accessing framework resources
1012
- 2. Prefer async methods for I/O operations
1013
- 3. Handle resource not found errors gracefully
1014
- 4. Cache expensive operations when possible
1015
-
1016
- ### State Management
1017
-
1018
- 1. Use atomic state updates to prevent conflicts
1019
- 2. Create checkpoints before major operations
1020
- 3. Validate state transitions
1021
- 4. Handle concurrent modifications
1022
-
1023
- ### Error Handling
1024
-
1025
- 1. Use specific error codes for different scenarios
1026
- 2. Provide meaningful error messages
1027
- 3. Include context in error details
1028
- 4. Log errors appropriately
1029
-
1030
- ### Performance
1031
-
1032
- 1. Use streaming for large files
1033
- 2. Implement pagination for lists
1034
- 3. Cache frequently accessed data
1035
- 4. Monitor memory usage
1036
-
1037
- ---
1038
-
1039
- ## Examples
1040
-
1041
- ### Creating a Custom Command
1042
-
1043
- ```javascript
1044
- import { ResourceLoader } from 'aiwf/lib/resource-loader';
1045
- import { StateIndexManager } from 'aiwf/lib/state/state-index';
1046
-
1047
- export default class CustomCommand {
1048
- constructor() {
1049
- this.loader = new ResourceLoader();
1050
- this.stateManager = new StateIndexManager('.aiwf');
1051
- }
1052
-
1053
- async execute(args) {
1054
- // Load current state
1055
- const state = await this.stateManager.loadState();
1056
-
1057
- // Perform operations
1058
- // ...
1059
-
1060
- // Save updated state
1061
- await this.stateManager.saveState(state);
1062
- }
1063
- }
1064
- ```
1065
-
1066
- ### Creating a Plugin
1067
-
1068
- ```javascript
1069
- export default {
1070
- name: 'my-plugin',
1071
- version: '1.0.0',
1072
-
1073
- async init(context) {
1074
- this.logger = context.logger;
1075
- this.logger.info('My plugin initialized');
1076
- },
1077
-
1078
- commands: {
1079
- 'my-command': {
1080
- description: 'My custom command',
1081
- handler: async (args, options) => {
1082
- // Command implementation
1083
- }
1084
- }
1085
- },
1086
-
1087
- hooks: {
1088
- 'after-state-change': async (oldState, newState) => {
1089
- this.logger.info('State changed', {
1090
- from: oldState.workflow_mode,
1091
- to: newState.workflow_mode
1092
- });
1093
- }
1094
- }
1095
- };
1096
- ```
1097
-
1098
- ### Using the Compression Engine
1099
-
1100
- ```javascript
1101
- import { CompressionEngine } from 'aiwf/utils/compression-engine';
1102
-
1103
- const engine = new CompressionEngine();
1104
-
1105
- // Analyze before compression
1106
- const analysis = engine.analyzeCompression(largeContent);
1107
- console.log(`Potential savings: ${analysis.savingsPercent}%`);
1108
-
1109
- // Compress with specific strategy
1110
- const compressed = await engine.compress(largeContent, {
1111
- strategy: 'aggressive',
1112
- preserveStructure: true
1113
- });
1114
-
1115
- // Later, decompress
1116
- const original = await engine.decompress(compressed);
1117
- ```
1118
-
1119
- ---
1120
-
1121
- ## Version History
1122
-
1123
- - **v0.3.x** - Current stable release
1124
- - Complete API redesign
1125
- - Plugin system introduction
1126
- - Enhanced state management
1127
-
1128
- - **v0.2.x** - Legacy version
1129
- - Basic command structure
1130
- - Initial resource loader
1131
-
1132
- - **v0.1.x** - Initial release
1133
- - Core framework setup
1134
-
1135
- For detailed changelog, see [CHANGELOG.md](../CHANGELOG.md).