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,1164 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * AIWF State Management Command
5
- * 중앙 상태 인덱스를 통한 프로젝트 상태 관리
6
- */
7
-
8
- import fs from 'fs/promises';
9
- import path from 'path';
10
- import chalk from 'chalk';
11
- import ora from 'ora';
12
- import { glob } from 'glob';
13
-
14
- export default class StateCommand {
15
- constructor() {
16
- this.stateFile = 'task-state-index.json';
17
- this.workflowRulesFile = 'workflow-rules.json';
18
- this.projectRoot = null;
19
- this.aiwfPath = null;
20
- this.workflowRules = null;
21
- }
22
-
23
- async execute(args) {
24
- const subcommand = args[0] || 'show';
25
-
26
- try {
27
- // 프로젝트 루트 찾기
28
- this.projectRoot = await this.findProjectRoot();
29
- this.aiwfPath = path.join(this.projectRoot, '.aiwf');
30
-
31
- switch (subcommand) {
32
- case 'update':
33
- await this.updateStateIndex();
34
- break;
35
- case 'show':
36
- await this.showState();
37
- break;
38
- case 'focus':
39
- await this.focusTask(args[1]);
40
- break;
41
- case 'complete':
42
- await this.completeTask(args[1]);
43
- break;
44
- case 'next':
45
- await this.suggestNext();
46
- break;
47
- case 'init':
48
- await this.initStateIndex();
49
- break;
50
- case 'validate':
51
- await this.validateCommand();
52
- break;
53
- default:
54
- console.error(chalk.red(`Unknown subcommand: ${subcommand}`));
55
- this.showHelp();
56
- }
57
- } catch (error) {
58
- console.error(chalk.red(`Error: ${error.message}`));
59
- process.exit(1);
60
- }
61
- }
62
-
63
- async findProjectRoot(startDir = process.cwd()) {
64
- let currentDir = startDir;
65
-
66
- while (currentDir !== path.parse(currentDir).root) {
67
- try {
68
- const aiwfPath = path.join(currentDir, '.aiwf');
69
- await fs.access(aiwfPath);
70
- return currentDir;
71
- } catch {
72
- currentDir = path.dirname(currentDir);
73
- }
74
- }
75
-
76
- throw new Error('.aiwf directory not found. Are you in an AIWF project?');
77
- }
78
-
79
- async initStateIndex() {
80
- const spinner = ora('Initializing state index...').start();
81
-
82
- try {
83
- const indexPath = path.join(this.aiwfPath, this.stateFile);
84
- const exists = await this.fileExists(indexPath);
85
-
86
- if (exists) {
87
- spinner.warn('State index already exists');
88
- return;
89
- }
90
-
91
- const initialState = {
92
- version: '1.0.0',
93
- last_updated: new Date().toISOString(),
94
- last_updated_by: 'aiwf-state-init',
95
- project_info: {
96
- name: path.basename(this.projectRoot),
97
- current_milestone: null,
98
- current_sprint: null,
99
- phase: 'planning'
100
- },
101
- current_focus: {
102
- primary_task: null,
103
- secondary_tasks: [],
104
- blocked_tasks: [],
105
- last_worked_on: null,
106
- session_notes: ''
107
- },
108
- tasks: {},
109
- sprint_summary: {},
110
- next_actions: [],
111
- ai_context: {
112
- last_session: new Date().toISOString(),
113
- session_count: 0,
114
- learned_patterns: {},
115
- working_hours: {}
116
- },
117
- metrics: {
118
- total_tasks: 0,
119
- completed_tasks: 0,
120
- in_progress_tasks: 0,
121
- pending_tasks: 0,
122
- blocked_tasks: 0,
123
- overall_progress: 0
124
- }
125
- };
126
-
127
- await fs.writeFile(indexPath, JSON.stringify(initialState, null, 2));
128
- spinner.succeed('State index initialized successfully');
129
- } catch (error) {
130
- spinner.fail(`Failed to initialize state index: ${error.message}`);
131
- throw error;
132
- }
133
- }
134
-
135
- async updateStateIndex() {
136
- const spinner = ora('Updating state index...').start();
137
-
138
- try {
139
- const indexPath = path.join(this.aiwfPath, this.stateFile);
140
- let stateIndex = await this.loadStateIndex();
141
-
142
- if (!stateIndex) {
143
- spinner.info('State index not found. Creating new one...');
144
- await this.initStateIndex();
145
- stateIndex = await this.loadStateIndex();
146
- }
147
-
148
- // 스프린트 폴더들 스캔
149
- const sprintDirs = await glob('03_SPRINTS/S*/', { cwd: this.aiwfPath });
150
- let totalTasks = 0;
151
- let completedTasks = 0;
152
- let inProgressTasks = 0;
153
- let pendingTasks = 0;
154
- let blockedTasks = 0;
155
-
156
- // 각 스프린트 폴더에서 태스크 파일들 스캔
157
- for (const sprintDir of sprintDirs) {
158
- const sprintPath = path.join(this.aiwfPath, sprintDir);
159
- const sprintId = path.basename(sprintDir).split('_')[0];
160
-
161
- // 스프린트 메타 파일 읽기
162
- const metaFiles = await glob('*_sprint_meta.md', { cwd: sprintPath });
163
- let sprintName = sprintDir;
164
- let sprintStatus = 'active';
165
-
166
- if (metaFiles.length > 0) {
167
- const metaContent = await fs.readFile(path.join(sprintPath, metaFiles[0]), 'utf-8');
168
- const nameMatch = metaContent.match(/^#\s+(.+)$/m);
169
- if (nameMatch) sprintName = nameMatch[1];
170
-
171
- // 스프린트 상태 확인
172
- if (metaContent.includes('상태: 완료') || metaContent.includes('Status: Completed')) {
173
- sprintStatus = 'completed';
174
- } else if (metaContent.includes('상태: 계획') || metaContent.includes('Status: Planning')) {
175
- sprintStatus = 'planning';
176
- }
177
- }
178
-
179
- // 태스크 파일들 스캔
180
- const taskFiles = await glob('T*.md', { cwd: sprintPath });
181
- const sprintTasks = taskFiles.filter(f => !f.includes('_template'));
182
-
183
- let sprintCompleted = 0;
184
- let sprintInProgress = 0;
185
- let sprintPending = 0;
186
-
187
- for (const taskFile of sprintTasks) {
188
- totalTasks++;
189
- const taskPath = path.join(sprintPath, taskFile);
190
- const taskContent = await fs.readFile(taskPath, 'utf-8');
191
-
192
- // 태스크 ID 추출
193
- const taskId = taskFile.replace('.md', '').split('_').slice(0, 3).join('_');
194
-
195
- // 태스크 정보 파싱
196
- const titleMatch = taskContent.match(/^#\s+T\d+:\s+(.+)$/m);
197
- const statusMatch = taskContent.match(/\*\*상태\*\*:\s*(\w+)|\*\*Status\*\*:\s*(\w+)/i);
198
- const milestoneMatch = taskContent.match(/\*\*마일스톤\*\*:\s*(M\d+)|\*\*Milestone\*\*:\s*(M\d+)/i);
199
-
200
- const title = titleMatch ? titleMatch[1] : taskFile;
201
- const status = statusMatch ? (statusMatch[1] || statusMatch[2]).toLowerCase() : 'pending';
202
- const milestone = milestoneMatch ? (milestoneMatch[1] || milestoneMatch[2]) : 'M01';
203
-
204
- // 태스크 상태 카운트
205
- switch (status) {
206
- case 'completed':
207
- case 'done':
208
- completedTasks++;
209
- sprintCompleted++;
210
- break;
211
- case 'in_progress':
212
- case 'in-progress':
213
- case 'active':
214
- inProgressTasks++;
215
- sprintInProgress++;
216
- if (!stateIndex.current_focus.primary_task) {
217
- stateIndex.current_focus.primary_task = taskId;
218
- }
219
- break;
220
- case 'blocked':
221
- blockedTasks++;
222
- break;
223
- default:
224
- pendingTasks++;
225
- sprintPending++;
226
- }
227
-
228
- // 태스크 정보 업데이트
229
- stateIndex.tasks[taskId] = {
230
- id: taskId,
231
- title: title,
232
- status: status,
233
- sprint: sprintId,
234
- milestone: milestone,
235
- location: path.relative(this.projectRoot, taskPath),
236
- last_updated: new Date().toISOString()
237
- };
238
-
239
- // OUTPUT LOG 확인
240
- if (taskContent.includes('## OUTPUT LOG')) {
241
- const outputSection = taskContent.split('## OUTPUT LOG')[1];
242
- if (outputSection.includes('✅') || outputSection.includes('완료')) {
243
- stateIndex.tasks[taskId].status = 'completed';
244
- }
245
- }
246
- }
247
-
248
- // 스프린트 요약 업데이트
249
- stateIndex.sprint_summary[sprintId] = {
250
- name: sprintName,
251
- status: sprintStatus,
252
- total_tasks: sprintTasks.length,
253
- completed_tasks: sprintCompleted,
254
- in_progress_tasks: sprintInProgress,
255
- pending_tasks: sprintPending,
256
- completion_rate: sprintTasks.length > 0 ? Math.round((sprintCompleted / sprintTasks.length) * 100) : 0
257
- };
258
- }
259
-
260
- // 현재 마일스톤/스프린트 찾기
261
- const manifestPath = path.join(this.aiwfPath, '00_PROJECT_MANIFEST.md');
262
- if (await this.fileExists(manifestPath)) {
263
- const manifestContent = await fs.readFile(manifestPath, 'utf-8');
264
- const currentMilestoneMatch = manifestContent.match(/\*\*현재 마일스톤\*\*:\s*(M\d+)|\*\*Current Milestone\*\*:\s*(M\d+)/);
265
- const currentSprintMatch = manifestContent.match(/\*\*활성 스프린트\*\*:\s*(S\d+)|\*\*Active Sprint\*\*:\s*(S\d+)/);
266
-
267
- if (currentMilestoneMatch) {
268
- stateIndex.project_info.current_milestone = currentMilestoneMatch[1] || currentMilestoneMatch[2];
269
- }
270
- if (currentSprintMatch) {
271
- stateIndex.project_info.current_sprint = currentSprintMatch[1] || currentSprintMatch[2];
272
- }
273
- }
274
-
275
- // 메트릭스 업데이트
276
- stateIndex.metrics = {
277
- total_tasks: totalTasks,
278
- completed_tasks: completedTasks,
279
- in_progress_tasks: inProgressTasks,
280
- pending_tasks: pendingTasks,
281
- blocked_tasks: blockedTasks,
282
- overall_progress: totalTasks > 0 ? Math.round((completedTasks / totalTasks) * 100) : 0
283
- };
284
-
285
- // 워크플로우 규칙 로드
286
- if (!this.workflowRules) {
287
- this.workflowRules = await this.loadWorkflowRules();
288
- }
289
-
290
- // 의존성 분석
291
- const dependencies = await this.analyzeDependencies(stateIndex);
292
-
293
- // 다음 액션 제안을 우선순위 기반으로 생성
294
- stateIndex.next_actions = [];
295
- const taskPriorities = [];
296
-
297
- // 모든 태스크의 우선순위 계산
298
- Object.values(stateIndex.tasks).forEach(task => {
299
- // 의존성 정보 추가
300
- task.dependencies = dependencies[task.id]?.dependsOn || [];
301
- task.blockedBy = dependencies[task.id]?.blockedBy || [];
302
- task.blocks = dependencies[task.id]?.blocks || [];
303
-
304
- // 우선순위 계산
305
- const priority = this.calculateTaskPriority(task, stateIndex);
306
- taskPriorities.push({ task, priority, dependencies: dependencies[task.id] });
307
- });
308
-
309
- // 우선순위로 정렬
310
- taskPriorities.sort((a, b) => b.priority - a.priority);
311
-
312
- // 진행 중인 태스크 우선
313
- taskPriorities.forEach(({ task, priority }) => {
314
- if (task.status === 'in_progress') {
315
- stateIndex.next_actions.push({
316
- priority: 'high',
317
- score: priority,
318
- action: `Continue working on ${task.title}`,
319
- task_id: task.id,
320
- reason: 'Already in progress',
321
- estimated_time: '2-4 hours',
322
- blockedBy: task.blockedBy
323
- });
324
- }
325
- });
326
-
327
- // 차단되지 않은 대기 중인 태스크 추가
328
- taskPriorities.forEach(({ task, priority }) => {
329
- if (task.status === 'pending' &&
330
- task.sprint === stateIndex.project_info.current_sprint &&
331
- task.blockedBy.length === 0) {
332
- stateIndex.next_actions.push({
333
- priority: priority >= 70 ? 'high' : priority >= 40 ? 'medium' : 'low',
334
- score: priority,
335
- action: `Start ${task.title}`,
336
- task_id: task.id,
337
- reason: task.blocks.length > 0 ? `Blocks ${task.blocks.length} other tasks` : 'Ready to start',
338
- estimated_time: '4-8 hours',
339
- dependencies: task.dependencies
340
- });
341
- }
342
- });
343
-
344
- // 차단된 태스크 정보
345
- taskPriorities.forEach(({ task, priority }) => {
346
- if (task.status === 'pending' && task.blockedBy.length > 0) {
347
- stateIndex.next_actions.push({
348
- priority: 'blocked',
349
- score: priority,
350
- action: `Blocked: ${task.title}`,
351
- task_id: task.id,
352
- reason: `Waiting for: ${task.blockedBy.join(', ')}`,
353
- blockedBy: task.blockedBy
354
- });
355
- }
356
- });
357
-
358
- // 워크플로우 검증
359
- const validation = await this.validateWorkflow(stateIndex);
360
- stateIndex.workflow_validation = validation;
361
-
362
- // 타임스탬프 업데이트
363
- stateIndex.last_updated = new Date().toISOString();
364
- stateIndex.last_updated_by = 'aiwf-state-update';
365
-
366
- // 저장
367
- await fs.writeFile(indexPath, JSON.stringify(stateIndex, null, 2));
368
-
369
- spinner.succeed(`State index updated: ${totalTasks} tasks tracked`);
370
- console.log(chalk.green(` ✅ Completed: ${completedTasks}`));
371
- console.log(chalk.yellow(` 🔄 In Progress: ${inProgressTasks}`));
372
- console.log(chalk.blue(` ⏳ Pending: ${pendingTasks}`));
373
- console.log(chalk.red(` ❌ Blocked: ${blockedTasks}`));
374
- console.log(chalk.cyan(` 📊 Overall Progress: ${stateIndex.metrics.overall_progress}%`));
375
-
376
- } catch (error) {
377
- spinner.fail(`Failed to update state index: ${error.message}`);
378
- throw error;
379
- }
380
- }
381
-
382
- async showState() {
383
- try {
384
- const stateIndex = await this.loadStateIndex();
385
- if (!stateIndex) {
386
- console.log(chalk.yellow('No state index found. Run "aiwf state init" or "aiwf state update" first.'));
387
- return;
388
- }
389
-
390
- console.log(chalk.bold('\n🏗️ AIWF Project State\n'));
391
-
392
- // 프로젝트 정보
393
- console.log(chalk.cyan('📋 Project Information:'));
394
- console.log(` Name: ${stateIndex.project_info.name}`);
395
- console.log(` Current Milestone: ${stateIndex.project_info.current_milestone || 'None'}`);
396
- console.log(` Active Sprint: ${stateIndex.project_info.current_sprint || 'None'}`);
397
- console.log(` Phase: ${stateIndex.project_info.phase}`);
398
- console.log(` Last Updated: ${new Date(stateIndex.last_updated).toLocaleString()}`);
399
-
400
- // 현재 포커스
401
- console.log(chalk.yellow('\n🎯 Current Focus:'));
402
- if (stateIndex.current_focus.primary_task) {
403
- const task = stateIndex.tasks[stateIndex.current_focus.primary_task];
404
- if (task) {
405
- console.log(` Primary Task: ${task.id} - ${task.title}`);
406
- console.log(` Status: ${task.status}`);
407
- }
408
- } else {
409
- console.log(' No task currently in focus');
410
- }
411
-
412
- // 메트릭스
413
- console.log(chalk.green('\n📊 Metrics:'));
414
- const m = stateIndex.metrics;
415
- console.log(` Total Tasks: ${m.total_tasks}`);
416
- console.log(` Completed: ${m.completed_tasks} (${Math.round((m.completed_tasks/m.total_tasks)*100) || 0}%)`);
417
- console.log(` In Progress: ${m.in_progress_tasks}`);
418
- console.log(` Pending: ${m.pending_tasks}`);
419
- console.log(` Blocked: ${m.blocked_tasks}`);
420
-
421
- // 진행률 바
422
- const progressBar = this.createProgressBar(m.overall_progress);
423
- console.log(`\n Overall Progress: ${progressBar} ${m.overall_progress}%`);
424
-
425
- // 다음 액션
426
- if (stateIndex.next_actions.length > 0) {
427
- console.log(chalk.magenta('\n🚀 Next Actions:'));
428
- stateIndex.next_actions.slice(0, 3).forEach((action, i) => {
429
- const priority = action.priority === 'high' ? '🔴' : action.priority === 'medium' ? '🟡' : '🟢';
430
- console.log(` ${i + 1}. ${priority} ${action.action} (${action.estimated_time})`);
431
- });
432
- }
433
-
434
- // 스프린트 요약
435
- const activeSprints = Object.entries(stateIndex.sprint_summary)
436
- .filter(([_, sprint]) => sprint.status === 'active');
437
-
438
- if (activeSprints.length > 0) {
439
- console.log(chalk.blue('\n📅 Active Sprints:'));
440
- activeSprints.forEach(([id, sprint]) => {
441
- const sprintProgress = this.createProgressBar(sprint.completion_rate);
442
- console.log(` ${id}: ${sprint.name}`);
443
- console.log(` Progress: ${sprintProgress} ${sprint.completion_rate}%`);
444
- console.log(` Tasks: ${sprint.completed_tasks}/${sprint.total_tasks} completed`);
445
- });
446
- }
447
-
448
- console.log('');
449
- } catch (error) {
450
- console.error(chalk.red(`Failed to show state: ${error.message}`));
451
- throw error;
452
- }
453
- }
454
-
455
- async focusTask(taskId) {
456
- if (!taskId) {
457
- console.error(chalk.red('Please provide a task ID'));
458
- return;
459
- }
460
-
461
- const spinner = ora(`Setting focus to ${taskId}...`).start();
462
-
463
- try {
464
- const stateIndex = await this.loadStateIndex();
465
- if (!stateIndex) {
466
- spinner.fail('No state index found. Run "aiwf state update" first.');
467
- return;
468
- }
469
-
470
- if (!stateIndex.tasks[taskId]) {
471
- spinner.fail(`Task ${taskId} not found in state index.`);
472
- return;
473
- }
474
-
475
- const task = stateIndex.tasks[taskId];
476
- stateIndex.current_focus.primary_task = taskId;
477
- stateIndex.current_focus.last_worked_on = taskId;
478
- stateIndex.current_focus.session_notes = `Focused on ${task.title}`;
479
-
480
- // AI 컨텍스트 업데이트
481
- stateIndex.ai_context.last_session = new Date().toISOString();
482
- stateIndex.ai_context.session_count++;
483
-
484
- await this.saveStateIndex(stateIndex);
485
-
486
- spinner.succeed(`Focus set to ${taskId}: ${task.title}`);
487
- console.log(chalk.cyan(`\n📍 Task Location: ${task.location}`));
488
- console.log(chalk.yellow(`📊 Current Status: ${task.status}`));
489
-
490
- // 관련 태스크 표시
491
- const relatedTasks = Object.values(stateIndex.tasks)
492
- .filter(t => t.sprint === task.sprint && t.id !== taskId && t.status !== 'completed');
493
-
494
- if (relatedTasks.length > 0) {
495
- console.log(chalk.dim('\n📎 Related tasks in same sprint:'));
496
- relatedTasks.forEach(t => {
497
- console.log(chalk.dim(` - ${t.id}: ${t.title} (${t.status})`));
498
- });
499
- }
500
- } catch (error) {
501
- spinner.fail(`Failed to set focus: ${error.message}`);
502
- throw error;
503
- }
504
- }
505
-
506
- async completeTask(taskId) {
507
- if (!taskId) {
508
- console.error(chalk.red('Please provide a task ID'));
509
- return;
510
- }
511
-
512
- const spinner = ora(`Marking ${taskId} as completed...`).start();
513
-
514
- try {
515
- const stateIndex = await this.loadStateIndex();
516
- if (!stateIndex) {
517
- spinner.fail('No state index found. Run "aiwf state update" first.');
518
- return;
519
- }
520
-
521
- if (!stateIndex.tasks[taskId]) {
522
- spinner.fail(`Task ${taskId} not found in state index.`);
523
- return;
524
- }
525
-
526
- const task = stateIndex.tasks[taskId];
527
- const previousStatus = task.status;
528
-
529
- // 태스크 상태 업데이트
530
- task.status = 'completed';
531
- task.completed = new Date().toISOString();
532
-
533
- // 메트릭스 업데이트
534
- if (previousStatus !== 'completed') {
535
- stateIndex.metrics.completed_tasks++;
536
- if (previousStatus === 'in_progress') {
537
- stateIndex.metrics.in_progress_tasks--;
538
- } else if (previousStatus === 'pending') {
539
- stateIndex.metrics.pending_tasks--;
540
- }
541
-
542
- // 전체 진행률 재계산
543
- stateIndex.metrics.overall_progress = Math.round(
544
- (stateIndex.metrics.completed_tasks / stateIndex.metrics.total_tasks) * 100
545
- );
546
- }
547
-
548
- // 현재 포커스가 완료된 태스크였다면 비우기
549
- if (stateIndex.current_focus.primary_task === taskId) {
550
- stateIndex.current_focus.primary_task = null;
551
- stateIndex.current_focus.session_notes = `Completed ${task.title}`;
552
- }
553
-
554
- // 스프린트 요약 업데이트
555
- const sprint = stateIndex.sprint_summary[task.sprint];
556
- if (sprint && previousStatus !== 'completed') {
557
- sprint.completed_tasks++;
558
- sprint.completion_rate = Math.round(
559
- (sprint.completed_tasks / sprint.total_tasks) * 100
560
- );
561
-
562
- if (previousStatus === 'in_progress') {
563
- sprint.in_progress_tasks--;
564
- } else if (previousStatus === 'pending') {
565
- sprint.pending_tasks--;
566
- }
567
- }
568
-
569
- await this.saveStateIndex(stateIndex);
570
-
571
- spinner.succeed(`Task ${taskId} marked as completed!`);
572
- console.log(chalk.green(`\n✅ ${task.title}`));
573
- console.log(chalk.cyan(`📊 Sprint ${task.sprint} progress: ${sprint.completion_rate}%`));
574
- console.log(chalk.cyan(`📈 Overall progress: ${stateIndex.metrics.overall_progress}%`));
575
-
576
- // 다음 추천 태스크
577
- await this.suggestNext();
578
-
579
- } catch (error) {
580
- spinner.fail(`Failed to complete task: ${error.message}`);
581
- throw error;
582
- }
583
- }
584
-
585
- async suggestNext() {
586
- try {
587
- const stateIndex = await this.loadStateIndex();
588
- if (!stateIndex) {
589
- console.log(chalk.yellow('No state index found. Run "aiwf state update" first.'));
590
- return;
591
- }
592
-
593
- if (!this.workflowRules) {
594
- this.workflowRules = await this.loadWorkflowRules();
595
- }
596
-
597
- console.log(chalk.bold('\n🎯 Workflow-Based Next Actions:\n'));
598
-
599
- // 워크플로우 검증 결과 표시
600
- if (stateIndex.workflow_validation) {
601
- const { errors, warnings, suggestions } = stateIndex.workflow_validation;
602
-
603
- if (errors.length > 0) {
604
- console.log(chalk.red('❌ Workflow Errors:'));
605
- errors.forEach(error => {
606
- console.log(` - ${error.message}`);
607
- });
608
- console.log('');
609
- }
610
-
611
- if (suggestions.length > 0) {
612
- console.log(chalk.yellow('💡 Workflow Suggestions:'));
613
- suggestions.forEach(suggestion => {
614
- console.log(` - ${suggestion.message}`);
615
- });
616
- console.log('');
617
- }
618
- }
619
-
620
- // 우선순위 기반 액션 표시
621
- const actions = stateIndex.next_actions || [];
622
- const inProgress = actions.filter(a => a.task_id && stateIndex.tasks[a.task_id]?.status === 'in_progress');
623
- const ready = actions.filter(a => a.priority !== 'blocked' && !inProgress.find(ip => ip.task_id === a.task_id));
624
- const blocked = actions.filter(a => a.priority === 'blocked');
625
-
626
- if (inProgress.length > 0) {
627
- console.log(chalk.yellow('🔄 Continue In-Progress Tasks:'));
628
- inProgress.forEach(action => {
629
- const task = stateIndex.tasks[action.task_id];
630
- console.log(` ${chalk.yellow('→')} ${task.id}: ${task.title}`);
631
- console.log(chalk.dim(` Priority Score: ${action.score}/100`));
632
- console.log(chalk.dim(` Location: ${task.location}`));
633
- if (task.blocks?.length > 0) {
634
- console.log(chalk.cyan(` 🔗 Blocks: ${task.blocks.join(', ')}`));
635
- }
636
- });
637
- }
638
-
639
- if (ready.length > 0) {
640
- console.log(chalk.blue('\n📋 Ready to Start (Priority Order):'));
641
- ready.slice(0, 5).forEach((action, i) => {
642
- const task = stateIndex.tasks[action.task_id];
643
- const priorityIcon = action.priority === 'high' ? '🔴' : action.priority === 'medium' ? '🟡' : '🟢';
644
- console.log(` ${i + 1}. ${priorityIcon} ${task.id}: ${task.title}`);
645
- console.log(chalk.dim(` Priority Score: ${action.score}/100 - ${action.reason}`));
646
- console.log(chalk.dim(` Location: ${task.location}`));
647
- if (task.blocks?.length > 0) {
648
- console.log(chalk.cyan(` 🔗 Unblocks: ${task.blocks.join(', ')}`));
649
- }
650
- });
651
- }
652
-
653
- if (blocked.length > 0) {
654
- console.log(chalk.red('\n⛔ Blocked Tasks:'));
655
- blocked.slice(0, 3).forEach(action => {
656
- const task = stateIndex.tasks[action.task_id];
657
- console.log(` ❌ ${task.id}: ${task.title}`);
658
- console.log(chalk.dim(` ${action.reason}`));
659
- console.log(chalk.dim(` Priority Score: ${action.score}/100 (when unblocked)`));
660
- });
661
- }
662
-
663
- // 병렬 작업 기회 식별
664
- if (this.workflowRules.ai_behavior.suggest_parallelization && ready.length >= 2) {
665
- const parallelizable = ready.filter(a => {
666
- const task = stateIndex.tasks[a.task_id];
667
- // 서로 의존하지 않는 태스크 찾기
668
- return !ready.some(other =>
669
- other.task_id !== a.task_id &&
670
- (task.dependencies.includes(other.task_id) ||
671
- stateIndex.tasks[other.task_id].dependencies.includes(task.id))
672
- );
673
- });
674
-
675
- if (parallelizable.length >= 2) {
676
- console.log(chalk.magenta('\n⚡ Parallel Work Opportunity:'));
677
- console.log(' These tasks can be worked on simultaneously:');
678
- parallelizable.slice(0, 3).forEach(action => {
679
- const task = stateIndex.tasks[action.task_id];
680
- console.log(` - ${task.id}: ${task.title}`);
681
- });
682
- }
683
- }
684
-
685
- // 스프린트 전환 조건 확인
686
- const currentSprint = stateIndex.project_info.current_sprint;
687
- if (currentSprint && stateIndex.sprint_summary[currentSprint]) {
688
- const sprint = stateIndex.sprint_summary[currentSprint];
689
-
690
- if (sprint.completion_rate === 100) {
691
- console.log(chalk.green(`\n🎉 Sprint ${currentSprint} Complete!`));
692
- console.log(' Next actions:');
693
- console.log(' 1. Run sprint review: aiwf sprint review');
694
- console.log(' 2. Transition to next sprint: aiwf transition sprint');
695
- console.log(' 3. Update project documentation');
696
- } else if (sprint.completion_rate >= 80) {
697
- console.log(chalk.yellow(`\n📊 Sprint ${currentSprint} is ${sprint.completion_rate}% complete`));
698
- console.log(' Consider:');
699
- console.log(' - Preparing next sprint tasks');
700
- console.log(' - Reviewing remaining tasks');
701
- console.log(' - Planning sprint transition');
702
- }
703
- }
704
-
705
- console.log(chalk.dim('\n💡 Commands:'));
706
- console.log(chalk.dim(' Start task: aiwf state focus <task-id>'));
707
- console.log(chalk.dim(' Update state: aiwf state update'));
708
- console.log(chalk.dim(' Validate workflow: aiwf validate workflow'));
709
-
710
- } catch (error) {
711
- console.error(chalk.red(`Failed to suggest next actions: ${error.message}`));
712
- throw error;
713
- }
714
- }
715
-
716
- async loadStateIndex() {
717
- try {
718
- const indexPath = path.join(this.aiwfPath, this.stateFile);
719
- const exists = await this.fileExists(indexPath);
720
-
721
- if (!exists) {
722
- return null;
723
- }
724
-
725
- const content = await fs.readFile(indexPath, 'utf-8');
726
- return JSON.parse(content);
727
- } catch (error) {
728
- throw new Error(`Failed to load state index: ${error.message}`);
729
- }
730
- }
731
-
732
- async loadWorkflowRules() {
733
- try {
734
- const rulesPath = path.join(this.aiwfPath, this.workflowRulesFile);
735
- const exists = await this.fileExists(rulesPath);
736
-
737
- if (!exists) {
738
- // 기본 워크플로우 규칙 생성
739
- const defaultRules = {
740
- version: '1.0.0',
741
- hierarchy: {
742
- milestone: {
743
- contains: 'sprints',
744
- completion_rule: 'all_sprints_completed',
745
- transition_rule: 'manual_review_required'
746
- },
747
- sprint: {
748
- contains: 'tasks',
749
- completion_rule: 'all_tasks_completed',
750
- transition_rule: 'auto_when_complete',
751
- preparation_rule: '80_percent_trigger'
752
- },
753
- task: {
754
- completion_rule: 'acceptance_criteria_met',
755
- transition_rule: 'immediate'
756
- }
757
- },
758
- priority_matrix: {
759
- factors: {
760
- urgency: { weight: 0.4, range: [1, 5] },
761
- importance: { weight: 0.3, range: [1, 5] },
762
- dependencies_blocking: { weight: 0.2, range: [0, 10] },
763
- effort: { weight: 0.1, range: [1, 10] }
764
- },
765
- calculation: 'weighted_sum'
766
- },
767
- dependency_rules: {
768
- strict_mode: true,
769
- allow_circular: false,
770
- max_chain_length: 10
771
- },
772
- transition_rules: {
773
- task_to_task: {
774
- conditions: ['current_complete', 'next_unblocked'],
775
- auto_transition: true
776
- },
777
- sprint_to_sprint: {
778
- conditions: ['current_80_percent', 'next_planned'],
779
- auto_transition: false,
780
- requires_approval: true
781
- },
782
- milestone_to_milestone: {
783
- conditions: ['current_complete', 'review_passed'],
784
- auto_transition: false,
785
- requires_approval: true
786
- }
787
- },
788
- ai_behavior: {
789
- decision_mode: 'conservative',
790
- auto_prioritize: true,
791
- suggest_parallelization: true,
792
- risk_tolerance: 'low'
793
- }
794
- };
795
-
796
- await fs.writeFile(rulesPath, JSON.stringify(defaultRules, null, 2));
797
- return defaultRules;
798
- }
799
-
800
- const content = await fs.readFile(rulesPath, 'utf-8');
801
- return JSON.parse(content);
802
- } catch (error) {
803
- throw new Error(`Failed to load workflow rules: ${error.message}`);
804
- }
805
- }
806
-
807
- async saveStateIndex(stateIndex) {
808
- try {
809
- const indexPath = path.join(this.aiwfPath, this.stateFile);
810
- stateIndex.last_updated = new Date().toISOString();
811
- await fs.writeFile(indexPath, JSON.stringify(stateIndex, null, 2));
812
- } catch (error) {
813
- throw new Error(`Failed to save state index: ${error.message}`);
814
- }
815
- }
816
-
817
- async fileExists(filePath) {
818
- try {
819
- await fs.access(filePath);
820
- return true;
821
- } catch {
822
- return false;
823
- }
824
- }
825
-
826
- createProgressBar(percentage) {
827
- const width = 20;
828
- const filled = Math.round((percentage / 100) * width);
829
- const empty = width - filled;
830
- return `[${chalk.green('█'.repeat(filled))}${chalk.gray('░'.repeat(empty))}]`;
831
- }
832
-
833
- calculateTaskPriority(task, stateIndex) {
834
- if (!this.workflowRules || !this.workflowRules.priority_matrix) {
835
- return 50; // 기본 우선순위
836
- }
837
-
838
- const factors = this.workflowRules.priority_matrix.factors;
839
- let totalWeight = 0;
840
- let weightedSum = 0;
841
-
842
- // 긴급도 계산 (마감일 기반)
843
- const urgency = task.deadline ? this.calculateUrgency(task.deadline) : 3;
844
- weightedSum += urgency * factors.urgency.weight;
845
- totalWeight += factors.urgency.weight;
846
-
847
- // 중요도 (마일스톤/스프린트 우선순위 기반)
848
- const importance = task.priority === 'high' ? 5 : task.priority === 'medium' ? 3 : 1;
849
- weightedSum += importance * factors.importance.weight;
850
- totalWeight += factors.importance.weight;
851
-
852
- // 블로킹 의존성 수
853
- const blockingCount = this.countBlockingDependencies(task, stateIndex);
854
- weightedSum += blockingCount * factors.dependencies_blocking.weight;
855
- totalWeight += factors.dependencies_blocking.weight;
856
-
857
- // 노력 (예상 시간 기반)
858
- const effort = task.estimated_hours ? Math.min(task.estimated_hours / 8, 10) : 5;
859
- weightedSum += (10 - effort) * factors.effort.weight; // 낮은 노력이 높은 우선순위
860
-
861
- return Math.round((weightedSum / totalWeight) * 20); // 0-100 스케일로 변환
862
- }
863
-
864
- calculateUrgency(deadline) {
865
- const now = new Date();
866
- const deadlineDate = new Date(deadline);
867
- const daysUntilDeadline = Math.floor((deadlineDate - now) / (1000 * 60 * 60 * 24));
868
-
869
- if (daysUntilDeadline <= 1) return 5;
870
- if (daysUntilDeadline <= 3) return 4;
871
- if (daysUntilDeadline <= 7) return 3;
872
- if (daysUntilDeadline <= 14) return 2;
873
- return 1;
874
- }
875
-
876
- countBlockingDependencies(task, stateIndex) {
877
- // 이 태스크를 의존하는 다른 태스크 수 계산
878
- let count = 0;
879
- Object.values(stateIndex.tasks).forEach(otherTask => {
880
- if (otherTask.dependencies && otherTask.dependencies.includes(task.id)) {
881
- count++;
882
- }
883
- });
884
- return Math.min(count, 10);
885
- }
886
-
887
- async analyzeDependencies(stateIndex) {
888
- const dependencies = {};
889
-
890
- // 태스크 파일에서 의존성 정보 추출
891
- for (const [taskId, task] of Object.entries(stateIndex.tasks)) {
892
- dependencies[taskId] = {
893
- dependsOn: [],
894
- blockedBy: [],
895
- blocks: []
896
- };
897
-
898
- // 태스크 파일 읽기
899
- try {
900
- const taskPath = path.join(this.projectRoot, task.location);
901
- const taskContent = await fs.readFile(taskPath, 'utf-8');
902
-
903
- // 의존성 섹션 찾기
904
- const dependencyMatch = taskContent.match(/##\s*의존성.*?\n([\s\S]*?)(?=\n##|$)/i);
905
- if (dependencyMatch) {
906
- const depSection = dependencyMatch[1];
907
- const taskRefs = depSection.match(/T\d+_S\d+/g) || [];
908
- dependencies[taskId].dependsOn = taskRefs.filter(ref => ref !== taskId);
909
- }
910
- } catch (error) {
911
- console.warn(`Could not analyze dependencies for ${taskId}: ${error.message}`);
912
- }
913
- }
914
-
915
- // 역방향 의존성 계산
916
- for (const [taskId, deps] of Object.entries(dependencies)) {
917
- deps.dependsOn.forEach(depId => {
918
- if (dependencies[depId]) {
919
- dependencies[depId].blocks.push(taskId);
920
- }
921
- });
922
- }
923
-
924
- // 블로킹 태스크 확인
925
- for (const [taskId, deps] of Object.entries(dependencies)) {
926
- deps.dependsOn.forEach(depId => {
927
- const depTask = stateIndex.tasks[depId];
928
- if (depTask && depTask.status !== 'completed') {
929
- deps.blockedBy.push(depId);
930
- }
931
- });
932
- }
933
-
934
- return dependencies;
935
- }
936
-
937
- async validateWorkflow(stateIndex) {
938
- const errors = [];
939
- const warnings = [];
940
- const suggestions = [];
941
-
942
- if (!this.workflowRules) {
943
- this.workflowRules = await this.loadWorkflowRules();
944
- }
945
-
946
- // 스프린트-태스크 일관성 검증
947
- for (const [sprintId, sprint] of Object.entries(stateIndex.sprint_summary)) {
948
- if (sprint.status === 'completed') {
949
- const incompleteTasks = Object.values(stateIndex.tasks)
950
- .filter(t => t.sprint === sprintId && t.status !== 'completed');
951
-
952
- if (incompleteTasks.length > 0) {
953
- errors.push({
954
- type: 'INCONSISTENT_STATE',
955
- message: `Sprint ${sprintId} marked complete but has ${incompleteTasks.length} incomplete tasks`,
956
- sprint: sprintId,
957
- tasks: incompleteTasks.map(t => t.id)
958
- });
959
- }
960
- }
961
- }
962
-
963
- // 의존성 순환 확인
964
- const dependencies = await this.analyzeDependencies(stateIndex);
965
- const cycles = this.detectCycles(dependencies);
966
- if (cycles.length > 0) {
967
- errors.push({
968
- type: 'CIRCULAR_DEPENDENCY',
969
- message: 'Circular dependencies detected',
970
- cycles: cycles
971
- });
972
- }
973
-
974
- // 80% 규칙 확인
975
- const currentSprint = stateIndex.project_info.current_sprint;
976
- if (currentSprint && stateIndex.sprint_summary[currentSprint]) {
977
- const sprint = stateIndex.sprint_summary[currentSprint];
978
- if (sprint.completion_rate >= 80 && sprint.completion_rate < 100) {
979
- suggestions.push({
980
- type: 'SPRINT_PREPARATION',
981
- message: `Sprint ${currentSprint} is ${sprint.completion_rate}% complete. Consider preparing the next sprint.`,
982
- sprint: currentSprint
983
- });
984
- }
985
- }
986
-
987
- return { errors, warnings, suggestions };
988
- }
989
-
990
- detectCycles(dependencies) {
991
- const cycles = [];
992
- const visited = new Set();
993
- const recursionStack = new Set();
994
-
995
- const dfs = (taskId, path = []) => {
996
- if (recursionStack.has(taskId)) {
997
- const cycleStart = path.indexOf(taskId);
998
- cycles.push(path.slice(cycleStart));
999
- return;
1000
- }
1001
-
1002
- if (visited.has(taskId)) return;
1003
-
1004
- visited.add(taskId);
1005
- recursionStack.add(taskId);
1006
- path.push(taskId);
1007
-
1008
- const deps = dependencies[taskId]?.dependsOn || [];
1009
- deps.forEach(depId => dfs(depId, [...path]));
1010
-
1011
- recursionStack.delete(taskId);
1012
- };
1013
-
1014
- Object.keys(dependencies).forEach(taskId => {
1015
- if (!visited.has(taskId)) {
1016
- dfs(taskId);
1017
- }
1018
- });
1019
-
1020
- return cycles;
1021
- }
1022
-
1023
- async validateCommand() {
1024
- const spinner = ora('Validating workflow...').start();
1025
-
1026
- try {
1027
- // 상태 인덱스 로드
1028
- const stateIndex = await this.loadStateIndex();
1029
- if (!stateIndex) {
1030
- spinner.fail('No state index found. Run "aiwf state update" first.');
1031
- return;
1032
- }
1033
-
1034
- // 워크플로우 규칙 로드
1035
- if (!this.workflowRules) {
1036
- this.workflowRules = await this.loadWorkflowRules();
1037
- }
1038
-
1039
- // 검증 실행
1040
- const validation = await this.validateWorkflow(stateIndex);
1041
- spinner.stop();
1042
-
1043
- console.log(chalk.bold('\n🔍 Workflow Validation Report\n'));
1044
-
1045
- const { errors, warnings, suggestions } = validation;
1046
- const totalIssues = errors.length + warnings.length;
1047
-
1048
- if (totalIssues === 0) {
1049
- console.log(chalk.green('✅ Workflow validation passed!'));
1050
- console.log(chalk.dim(' No errors or warnings found.'));
1051
- } else {
1052
- console.log(chalk.yellow(`Found ${totalIssues} issue(s):`));
1053
- }
1054
-
1055
- // 오류 표시
1056
- if (errors.length > 0) {
1057
- console.log(chalk.red(`\n❌ Errors (${errors.length}):`));
1058
- errors.forEach((error, i) => {
1059
- console.log(chalk.red(` ${i + 1}. ${error.type}`));
1060
- console.log(` ${error.message}`);
1061
- if (error.tasks) {
1062
- console.log(chalk.dim(` Affected tasks: ${error.tasks.join(', ')}`));
1063
- }
1064
- if (error.cycles) {
1065
- error.cycles.forEach(cycle => {
1066
- console.log(chalk.dim(` Cycle: ${cycle.join(' → ')} → ${cycle[0]}`));
1067
- });
1068
- }
1069
- });
1070
- }
1071
-
1072
- // 경고 표시
1073
- if (warnings.length > 0) {
1074
- console.log(chalk.yellow(`\n⚠️ Warnings (${warnings.length}):`));
1075
- warnings.forEach((warning, i) => {
1076
- console.log(chalk.yellow(` ${i + 1}. ${warning.type}`));
1077
- console.log(` ${warning.message}`);
1078
- });
1079
- }
1080
-
1081
- // 제안사항 표시
1082
- if (suggestions.length > 0) {
1083
- console.log(chalk.cyan(`\n💡 Suggestions (${suggestions.length}):`));
1084
- suggestions.forEach((suggestion, i) => {
1085
- console.log(chalk.cyan(` ${i + 1}. ${suggestion.type}`));
1086
- console.log(` ${suggestion.message}`);
1087
- });
1088
- }
1089
-
1090
- // 통계 표시
1091
- console.log(chalk.bold('\n📊 Workflow Statistics:'));
1092
- console.log(` Total Tasks: ${Object.keys(stateIndex.tasks).length}`);
1093
- console.log(` Active Sprints: ${Object.values(stateIndex.sprint_summary).filter(s => s.status === 'active').length}`);
1094
- console.log(` Overall Progress: ${stateIndex.metrics.overall_progress}%`);
1095
-
1096
- // 의존성 분석
1097
- const dependencies = await this.analyzeDependencies(stateIndex);
1098
- const tasksWithDeps = Object.values(dependencies).filter(d => d.dependsOn.length > 0).length;
1099
- const blockedTasks = Object.values(dependencies).filter(d => d.blockedBy.length > 0).length;
1100
-
1101
- console.log(chalk.bold('\n🔗 Dependency Analysis:'));
1102
- console.log(` Tasks with dependencies: ${tasksWithDeps}`);
1103
- console.log(` Currently blocked tasks: ${blockedTasks}`);
1104
- console.log(` Circular dependencies: ${errors.filter(e => e.type === 'CIRCULAR_DEPENDENCY').length}`);
1105
-
1106
- // 권장 조치
1107
- if (totalIssues > 0 || suggestions.length > 0) {
1108
- console.log(chalk.bold('\n🎯 Recommended Actions:'));
1109
- if (errors.some(e => e.type === 'INCONSISTENT_STATE')) {
1110
- console.log(' 1. Fix inconsistent sprint/task states');
1111
- console.log(' - Update task statuses to match sprint status');
1112
- console.log(' - Or reopen completed sprints if needed');
1113
- }
1114
- if (errors.some(e => e.type === 'CIRCULAR_DEPENDENCY')) {
1115
- console.log(' 2. Resolve circular dependencies');
1116
- console.log(' - Review and break dependency cycles');
1117
- console.log(' - Restructure tasks if necessary');
1118
- }
1119
- if (suggestions.some(s => s.type === 'SPRINT_PREPARATION')) {
1120
- console.log(' 3. Prepare next sprint');
1121
- console.log(' - Current sprint is nearing completion');
1122
- console.log(' - Create tasks for the next sprint');
1123
- }
1124
- }
1125
-
1126
- console.log('');
1127
-
1128
- } catch (error) {
1129
- spinner.fail(`Validation failed: ${error.message}`);
1130
- throw error;
1131
- }
1132
- }
1133
-
1134
- showHelp() {
1135
- console.log('\nUsage: aiwf state <subcommand> [options]');
1136
- console.log('\nSubcommands:');
1137
- console.log(' init Initialize a new state index');
1138
- console.log(' update Update state index by scanning all task files');
1139
- console.log(' show Show current project state');
1140
- console.log(' focus <id> Set focus to a specific task');
1141
- console.log(' complete <id> Mark a task as completed');
1142
- console.log(' next Suggest next actions based on workflow rules');
1143
- console.log(' validate Validate workflow consistency and dependencies');
1144
- console.log('\nExamples:');
1145
- console.log(' aiwf state update # Scan and update all task states');
1146
- console.log(' aiwf state show # Display current project state');
1147
- console.log(' aiwf state focus T03_S02 # Start working on a task');
1148
- console.log(' aiwf state complete T03_S02 # Mark task as completed');
1149
- console.log(' aiwf state next # Get smart task recommendations');
1150
- console.log(' aiwf state validate # Check workflow health');
1151
- console.log('\nWorkflow Features:');
1152
- console.log(' - Priority-based task recommendations');
1153
- console.log(' - Dependency tracking and validation');
1154
- console.log(' - Sprint 80% rule notifications');
1155
- console.log(' - Parallel work opportunity detection');
1156
- console.log(' - Workflow consistency validation');
1157
- }
1158
- }
1159
-
1160
- // CLI 실행
1161
- if (import.meta.url === `file://${process.argv[1]}`) {
1162
- const command = new StateCommand();
1163
- command.execute(process.argv.slice(2));
1164
- }