aiwf 0.3.22 → 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.
- package/.claude-plugin/marketplace.json +146 -0
- package/CHANGELOG.md +49 -1
- package/README.ko.md +118 -309
- package/README.md +68 -254
- package/docs/modernization/BROWNFIELD-GREENFIELD.ko.md +105 -0
- package/docs/modernization/CLAUDE-PLAN-REVIEW-2026-10-03.ko.md +77 -0
- package/docs/modernization/CLI-PRODUCTIVITY-REVIEWED-2026-10-03.ko.md +177 -0
- package/docs/modernization/CLI-PRODUCTIVITY.ko.md +193 -0
- package/docs/modernization/CORE-PACKAGE-PLAN.md +7 -0
- package/docs/modernization/DEEP-REVERSE-ENGINEERING.ko.md +88 -0
- package/docs/modernization/DELEGATION-OPTIONAL.ko.md +57 -0
- package/docs/modernization/DIRECTION.ko.md +56 -0
- package/docs/modernization/FULL-TEST-2026-10-03.md +49 -0
- package/docs/modernization/LEGACY-REMOVAL-PLAN.md +9 -0
- package/docs/modernization/PILOT-RESULT-2026-10-03.ko.md +85 -0
- package/docs/modernization/PILOT-UC-001.ko.md +79 -0
- package/docs/modernization/PLAN.md +28 -0
- package/docs/modernization/SKILLS.ko.md +105 -0
- package/docs/modernization/SPRINTABLE.ko.md +47 -0
- package/docs/modernization/SYNC-DOCS-VALIDATION-2026-10-04.ko.md +38 -0
- package/docs/modernization/VALIDATION.md +79 -0
- package/docs/modernization/evidence/example-review-packet.json +115 -0
- package/docs/modernization/evidence/example-spec-pin.json +48 -0
- package/docs/modernization/evidence/full-test-20261003/claude-lint.md +22 -0
- package/docs/modernization/evidence/full-test-20261003/claude-review-retry.md +56 -0
- package/docs/modernization/evidence/full-test-20261003/codex-review-packet.json +159 -0
- package/docs/modernization/evidence/full-test-20261003/src/expense.mjs +40 -0
- package/docs/modernization/evidence/full-test-20261003/summary.json +106 -0
- package/docs/modernization/evidence/full-test-20261003/tests/expense.test.mjs +61 -0
- package/docs/modernization/evidence/local-pilot-20261003/README.ko.md +40 -0
- package/docs/modernization/evidence/local-pilot-20261003/execution.json +1055 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/dependencies.json +24 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/dependencies.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/dependencies.stdout.txt +5 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/docs.json +24 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/docs.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/docs.stdout.txt +6 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/example.json +24 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/example.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/example.stdout.txt +5 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/local-docs.json +24 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/local-docs.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/local-docs.stdout.txt +6 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/node.json +23 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/node.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/node.stdout.txt +535 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/provenance.json +24 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/provenance.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/provenance.stdout.txt +5 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/readme-replay.json +24 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/readme-replay.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/readme-replay.stdout.txt +273 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/upstream.json +24 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/upstream.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/maintenance/upstream.stdout.txt +7 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/archive-service.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/archive-service.stdout.txt +148 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/archive-structure.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/archive-structure.stdout.txt +9 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-check.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-check.stdout.txt +67 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-evidence.json +34 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-packet.json +128 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-packet.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-packet.stdout.txt +128 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-pin.json +54 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-pin.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-pin.stdout.txt +60 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-readback.json +15 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-service.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-service.stdout.txt +82 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-structure.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/baseline-structure.stdout.txt +9 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-check.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-check.stdout.txt +79 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-packet-refused.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-packet-refused.stdout.txt +7 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-pin-refresh.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-pin-refresh.stdout.txt +66 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-pin.json +60 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-structure.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/changed-structure.stdout.txt +9 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-check.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-check.stdout.txt +73 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-evidence.json +34 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-packet.json +134 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-packet.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-packet.stdout.txt +134 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-readback.json +15 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-service.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-service.stdout.txt +148 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-structure.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/final-structure.stdout.txt +9 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/node-version.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/node-version.stdout.txt +1 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/python-version.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/python-version.stdout.txt +1 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-evidence.json +34 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-packet.json +134 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-packet.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-packet.stdout.txt +134 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-readback.json +15 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-service.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-service.stdout.txt +266 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-structure.stderr.txt +0 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/artifacts/red-structure.stdout.txt +9 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/entity_model.md +33 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/glossary.md +9 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/plans/UC-001.md +20 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/requirements.md +10 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/test_cases/TC-001-submit-expense.md +37 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/test_cases/TC-002-description-limit.md +42 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/use_cases/UC-001-submit-expense.md +76 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/use_cases.puml +12 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/docs/vision.md +21 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/src/expense.mjs +48 -0
- package/docs/modernization/evidence/local-pilot-20261003/project/tests/expense.test.mjs +116 -0
- package/docs/modernization/evidence/local-pilot-20261003/scope.json +31 -0
- package/docs/modernization/reviews/2026-10-03-claude-cli/CONTRACTS.ko.md +122 -0
- package/docs/modernization/reviews/2026-10-03-claude-cli/DIRECTION.ko.md +84 -0
- package/examples/spec-workflow/README.md +54 -0
- package/examples/spec-workflow/docs/entity_model.md +33 -0
- package/examples/spec-workflow/docs/glossary.md +9 -0
- package/examples/spec-workflow/docs/requirements.md +10 -0
- package/examples/spec-workflow/docs/test_cases/TC-001-submit-expense.md +37 -0
- package/examples/spec-workflow/docs/use_cases/UC-001-submit-expense.md +63 -0
- package/examples/spec-workflow/docs/use_cases.puml +12 -0
- package/examples/spec-workflow/docs/vision.md +21 -0
- package/package.json +37 -104
- package/plugins/aiwf-angular-jpa/.claude-plugin/plugin.json +11 -0
- package/plugins/aiwf-angular-jpa/LICENSE +201 -0
- package/plugins/aiwf-angular-jpa/NOTICE +16 -0
- package/plugins/aiwf-angular-jpa/README.md +54 -0
- package/plugins/aiwf-angular-jpa/UPSTREAM.json +35 -0
- package/plugins/aiwf-angular-jpa/agents/uc-coverage.md +263 -0
- package/plugins/aiwf-angular-jpa/rules/mcp-servers.md +64 -0
- package/plugins/aiwf-angular-jpa/skills/coverage-check/SKILL.md +190 -0
- package/plugins/aiwf-angular-jpa/skills/flyway-migration/SKILL.md +119 -0
- package/plugins/aiwf-angular-jpa/skills/implement/SKILL.md +528 -0
- package/plugins/aiwf-angular-jpa/skills/implement/references/module-layout.md +95 -0
- package/plugins/aiwf-angular-jpa/skills/playwright-test/SKILL.md +360 -0
- package/plugins/aiwf-angular-jpa/skills/spring-boot-test/SKILL.md +504 -0
- package/plugins/aiwf-angular-jpa/skills/vitest-test/SKILL.md +309 -0
- package/plugins/aiwf-blazor-dotnet/.claude-plugin/plugin.json +11 -0
- package/plugins/aiwf-blazor-dotnet/LICENSE +201 -0
- package/plugins/aiwf-blazor-dotnet/NOTICE +16 -0
- package/plugins/aiwf-blazor-dotnet/README.md +53 -0
- package/plugins/aiwf-blazor-dotnet/UPSTREAM.json +31 -0
- package/plugins/aiwf-blazor-dotnet/rules/mcp-servers.md +25 -0
- package/plugins/aiwf-blazor-dotnet/skills/bunit-test/SKILL.md +110 -0
- package/plugins/aiwf-blazor-dotnet/skills/dotnet-test/SKILL.md +108 -0
- package/plugins/aiwf-blazor-dotnet/skills/ef-migration/SKILL.md +43 -0
- package/plugins/aiwf-blazor-dotnet/skills/implement/SKILL.md +149 -0
- package/plugins/aiwf-blazor-dotnet/skills/playwright-test/SKILL.md +130 -0
- package/plugins/aiwf-core/.claude-plugin/plugin.json +11 -0
- package/plugins/aiwf-core/LICENSE +201 -0
- package/plugins/aiwf-core/NOTICE +20 -0
- package/plugins/aiwf-core/README.md +38 -0
- package/plugins/aiwf-core/UPSTREAM.json +50 -0
- package/plugins/aiwf-core/skills/entity-model/SKILL.md +160 -0
- package/plugins/aiwf-core/skills/entity-model/references/REFERENCE.md +36 -0
- package/plugins/aiwf-core/skills/requirements/SKILL.md +157 -0
- package/plugins/aiwf-core/skills/requirements/references/REFERENCE.md +70 -0
- package/plugins/aiwf-core/skills/requirements/references/glossary.md +7 -0
- package/plugins/aiwf-core/skills/reverse-engineer/SKILL.md +509 -0
- package/plugins/aiwf-core/skills/reverse-engineer/references/stack-signals.md +210 -0
- package/plugins/aiwf-core/skills/spec-review/SKILL.md +197 -0
- package/plugins/aiwf-core/skills/spec-review/references/lint-codes.md +63 -0
- package/plugins/aiwf-core/skills/spec-review/references/review-checklist.md +189 -0
- package/plugins/aiwf-core/skills/spec-review/scripts/spec_lint.py +1216 -0
- package/plugins/aiwf-core/skills/test-case/SKILL.md +138 -0
- package/plugins/aiwf-core/skills/test-case/references/example-process.bpmn +118 -0
- package/plugins/aiwf-core/skills/test-case/references/example.md +38 -0
- package/plugins/aiwf-core/skills/test-case/references/test-case.md +35 -0
- package/plugins/aiwf-core/skills/test-case/scripts/bpmn_paths.py +542 -0
- package/plugins/aiwf-core/skills/use-case-diagram/SKILL.md +99 -0
- package/plugins/aiwf-core/skills/use-case-spec/SKILL.md +257 -0
- package/plugins/aiwf-core/skills/use-case-spec/references/clarify-checklist.md +70 -0
- package/plugins/aiwf-core/skills/use-case-spec/references/example.md +88 -0
- package/plugins/aiwf-core/skills/use-case-spec/references/format-spec.md +246 -0
- package/plugins/aiwf-core/skills/use-case-spec/references/use-case.md +50 -0
- package/plugins/aiwf-core/skills/use-case-spec/scripts/validate_use_case.py +941 -0
- package/plugins/aiwf-delegate-claude/.claude-plugin/plugin.json +9 -0
- package/{src/lib/resources/templates/npm-library/template → plugins/aiwf-delegate-claude}/LICENSE +2 -2
- package/plugins/aiwf-delegate-claude/NOTICE +4 -0
- package/plugins/aiwf-delegate-claude/README.md +10 -0
- package/plugins/aiwf-delegate-claude/plugin.json +13 -0
- package/plugins/aiwf-delegate-claude/skills/delegate-claude/LICENSE +21 -0
- package/plugins/aiwf-delegate-claude/skills/delegate-claude/NOTICE +4 -0
- package/plugins/aiwf-delegate-claude/skills/delegate-claude/SKILL.md +49 -0
- package/plugins/aiwf-delegate-claude/skills/delegate-claude/agents/openai.yaml +2 -0
- package/plugins/aiwf-delegate-codex/.claude-plugin/plugin.json +9 -0
- package/plugins/aiwf-delegate-codex/LICENSE +21 -0
- package/plugins/aiwf-delegate-codex/NOTICE +4 -0
- package/plugins/aiwf-delegate-codex/README.md +10 -0
- package/plugins/aiwf-delegate-codex/plugin.json +13 -0
- package/plugins/aiwf-delegate-codex/skills/delegate-codex/LICENSE +21 -0
- package/plugins/aiwf-delegate-codex/skills/delegate-codex/NOTICE +4 -0
- package/plugins/aiwf-delegate-codex/skills/delegate-codex/SKILL.md +47 -0
- package/plugins/aiwf-delegate-codex/skills/delegate-codex/agents/openai.yaml +2 -0
- package/plugins/aiwf-nestjs-nextjs/.claude-plugin/plugin.json +11 -0
- package/plugins/aiwf-nestjs-nextjs/LICENSE +201 -0
- package/plugins/aiwf-nestjs-nextjs/NOTICE +16 -0
- package/plugins/aiwf-nestjs-nextjs/README.md +53 -0
- package/plugins/aiwf-nestjs-nextjs/UPSTREAM.json +32 -0
- package/plugins/aiwf-nestjs-nextjs/rules/mcp-servers.md +59 -0
- package/plugins/aiwf-nestjs-nextjs/skills/drizzle-migration/SKILL.md +222 -0
- package/plugins/aiwf-nestjs-nextjs/skills/implement/SKILL.md +393 -0
- package/plugins/aiwf-nestjs-nextjs/skills/implement/references/project-layout.md +158 -0
- package/plugins/aiwf-nestjs-nextjs/skills/nest-test/SKILL.md +300 -0
- package/plugins/aiwf-nestjs-nextjs/skills/playwright-test/SKILL.md +245 -0
- package/plugins/aiwf-nestjs-nextjs/skills/react-test/SKILL.md +217 -0
- package/plugins/aiwf-spec/.claude-plugin/plugin.json +9 -0
- package/plugins/aiwf-spec/LICENSE +201 -0
- package/plugins/aiwf-spec/NOTICE +20 -0
- package/plugins/aiwf-spec/README.md +36 -0
- package/plugins/aiwf-spec/skills/sync-docs/SKILL.md +47 -0
- package/plugins/aiwf-spec/skills/workflow/SKILL.md +42 -0
- package/plugins/aiwf-vaadin-jooq/.claude-plugin/plugin.json +11 -0
- package/plugins/aiwf-vaadin-jooq/LICENSE +201 -0
- package/plugins/aiwf-vaadin-jooq/NOTICE +16 -0
- package/plugins/aiwf-vaadin-jooq/README.md +56 -0
- package/plugins/aiwf-vaadin-jooq/UPSTREAM.json +43 -0
- package/plugins/aiwf-vaadin-jooq/agents/uc-coverage.md +260 -0
- package/plugins/aiwf-vaadin-jooq/rules/mcp-servers.md +44 -0
- package/plugins/aiwf-vaadin-jooq/skills/browserless-test/SKILL.md +407 -0
- package/plugins/aiwf-vaadin-jooq/skills/browserless-test/references/UC001ManagePersonsTest.java +111 -0
- package/plugins/aiwf-vaadin-jooq/skills/coverage-check/SKILL.md +190 -0
- package/plugins/aiwf-vaadin-jooq/skills/flyway-migration/SKILL.md +70 -0
- package/plugins/aiwf-vaadin-jooq/skills/hilla-test/SKILL.md +350 -0
- package/plugins/aiwf-vaadin-jooq/skills/hilla-test/references/UC001ManagePersonsServiceTest.java +81 -0
- package/plugins/aiwf-vaadin-jooq/skills/hilla-test/references/UC001ManagePersonsViewTest.tsx +87 -0
- package/plugins/aiwf-vaadin-jooq/skills/implement/SKILL.md +196 -0
- package/plugins/aiwf-vaadin-jooq/skills/implement-hilla/SKILL.md +216 -0
- package/plugins/aiwf-vaadin-jooq/skills/karibu-test/SKILL.md +298 -0
- package/plugins/aiwf-vaadin-jooq/skills/karibu-test/references/UC001ManagePersonsTest.java +93 -0
- package/plugins/aiwf-vaadin-jooq/skills/playwright-test/SKILL.md +237 -0
- package/plugins/aiwf-vaadin-jooq/skills/playwright-test/references/ExampleViewIT.java +143 -0
- package/plugins/aiwf-vaadin-jooq/skills/playwright-test/references/TC001CustomerOnboardingIT.java +144 -0
- package/plugins/aiwf-vaadin-jooq/skills/playwright-test/references/dramafinder-api.md +190 -0
- package/scripts/check-dependencies.js +26 -96
- package/scripts/install-spec-skills.mjs +126 -0
- package/scripts/validate-spec-plugin.mjs +145 -0
- package/src/cli/spec-cli.js +292 -0
- package/src/lib/spec-workflow.js +982 -0
- package/docs/ADR_MANAGEMENT_GUIDE.ko.md +0 -602
- package/docs/ADR_MANAGEMENT_GUIDE.md +0 -602
- package/docs/AI-WORKFLOW.ko.md +0 -299
- package/docs/AI-WORKFLOW.md +0 -401
- package/docs/API_REFERENCE_FULL.ko.md +0 -1135
- package/docs/API_REFERENCE_FULL.md +0 -1135
- package/docs/ARCHITECTURE.ko.md +0 -314
- package/docs/ARCHITECTURE.md +0 -314
- package/docs/CLI_USAGE_GUIDE.ko.md +0 -634
- package/docs/CLI_USAGE_GUIDE.md +0 -640
- package/docs/CODE_CLEANUP_GUIDE.ko.md +0 -415
- package/docs/CODE_CLEANUP_GUIDE.md +0 -415
- package/docs/COMMANDS_GUIDE.ko.md +0 -1037
- package/docs/COMMANDS_GUIDE.md +0 -1037
- package/docs/CONTRIBUTING.ko.md +0 -408
- package/docs/CONTRIBUTING.md +0 -408
- package/docs/DEVELOPMENT_GUIDE.ko.md +0 -440
- package/docs/DEVELOPMENT_GUIDE.md +0 -727
- package/docs/EXAMPLES.ko.md +0 -695
- package/docs/EXAMPLES.md +0 -693
- package/docs/GETTING_STARTED.ko.md +0 -219
- package/docs/GETTING_STARTED.md +0 -476
- package/docs/MODULE_MANAGEMENT_GUIDE.ko.md +0 -289
- package/docs/MODULE_MANAGEMENT_GUIDE.md +0 -289
- package/docs/PERFORMANCE_ARCHITECTURE.md +0 -494
- package/docs/PERFORMANCE_GUIDELINES.ko.md +0 -388
- package/docs/PERFORMANCE_GUIDELINES.md +0 -553
- package/docs/PRD.ko.md +0 -148
- package/docs/PRD.md +0 -150
- package/docs/ROADMAP_v0.4.0.md +0 -286
- package/docs/STATE_MANAGEMENT_GUIDE.ko.md +0 -278
- package/docs/STATE_MANAGEMENT_GUIDE.md +0 -278
- package/docs/TROUBLESHOOTING.ko.md +0 -366
- package/docs/TROUBLESHOOTING.md +0 -722
- package/docs/VALIDATOR_API.ko.md +0 -324
- package/docs/VALIDATOR_API.md +0 -324
- package/docs/YOLO_SYSTEM_GUIDE.ko.md +0 -542
- package/docs/YOLO_SYSTEM_GUIDE.md +0 -542
- package/docs/designs/AI_PERSONA_SYSTEM_DESIGN.md +0 -516
- package/docs/designs/API_DOCUMENTATION.md +0 -932
- package/docs/designs/API_REFERENCE.md +0 -979
- package/docs/designs/Enhanced_Installation_Flow_Design.md +0 -498
- package/docs/designs/aiwf-metadata-system-prd.md +0 -127
- package/docs/designs/offline-template-cache.md +0 -323
- package/docs/designs/persona-aware-compression.md +0 -168
- package/docs/guides/ai-personas-guide-ko.md +0 -239
- package/docs/guides/ai-personas-guide.md +0 -239
- package/docs/guides/checkpoint-system-guide-ko.md +0 -356
- package/docs/guides/checkpoint-system-guide.md +0 -356
- package/docs/guides/context-compression-guide-ko.md +0 -313
- package/docs/guides/context-compression-guide.md +0 -313
- package/docs/guides/independent-sprint-guide-ko.md +0 -321
- package/docs/guides/independent-sprint-guide.md +0 -321
- package/rules/global/aiwf-code-style-guide.md +0 -30
- package/rules/global/aiwf-coding-principles.md +0 -33
- package/rules/global/aiwf-development-process.md +0 -41
- package/rules/global/aiwf-global-rules.md +0 -84
- package/rules/manual/aiwf-generate-plan-docs.md +0 -280
- package/scripts/run-integration-tests.js +0 -317
- package/scripts/update-file-lists.js +0 -267
- package/scripts/validate-commands.js +0 -254
- package/src/DEPENDENCY_MAP.md +0 -90
- package/src/cli/cache-cli.js +0 -459
- package/src/cli/checkpoint-cli.js +0 -417
- package/src/cli/index.js +0 -481
- package/src/cli/language-cli.js +0 -286
- package/src/cli/sprint-cli.js +0 -287
- package/src/commands/ai-tool.js +0 -383
- package/src/commands/compress.js +0 -60
- package/src/commands/create-project.js +0 -160
- package/src/commands/evaluate.js +0 -459
- package/src/commands/persona.js +0 -309
- package/src/commands/sprint-independent.js +0 -393
- package/src/commands/sprint-task.js +0 -262
- package/src/commands/state.js +0 -1164
- package/src/commands/token.js +0 -312
- package/src/commands/yolo-config.js +0 -502
- package/src/config/file-lists.js +0 -147
- package/src/config/yolo-config-template.yaml +0 -168
- package/src/lib/ai-persona-manager.js +0 -711
- package/src/lib/backup-manager.js +0 -271
- package/src/lib/cache-system.js +0 -332
- package/src/lib/context-engine.js +0 -568
- package/src/lib/file-downloader.js +0 -304
- package/src/lib/github-integration.js +0 -402
- package/src/lib/installer.js +0 -1066
- package/src/lib/memory-profiler.js +0 -471
- package/src/lib/metrics-collector.js +0 -885
- package/src/lib/offline-detector.js +0 -386
- package/src/lib/resource-loader-enhanced.js +0 -399
- package/src/lib/resource-loader.js +0 -250
- package/src/lib/resources/commands/ai-persona.js +0 -602
- package/src/lib/resources/commands/compress-context.js +0 -389
- package/src/lib/resources/commands/evaluate.js +0 -246
- package/src/lib/resources/commands/persona-context-apply.js +0 -562
- package/src/lib/resources/commands/token-tracking.js +0 -443
- package/src/lib/resources/config/commit-patterns.js +0 -103
- package/src/lib/resources/config/language.json +0 -6
- package/src/lib/resources/personas/PERSONA_INDEX.md +0 -57
- package/src/lib/resources/personas/analyst.json +0 -44
- package/src/lib/resources/personas/architect/best_practices.md +0 -136
- package/src/lib/resources/personas/architect/knowledge_base.md +0 -377
- package/src/lib/resources/personas/architect.json +0 -44
- package/src/lib/resources/personas/backend/best_practices.md +0 -766
- package/src/lib/resources/personas/backend/knowledge_base.md +0 -1070
- package/src/lib/resources/personas/data_analyst/best_practices.md +0 -594
- package/src/lib/resources/personas/data_analyst/knowledge_base.md +0 -1057
- package/src/lib/resources/personas/developer.json +0 -44
- package/src/lib/resources/personas/developer.md +0 -37
- package/src/lib/resources/personas/evaluation_criteria.json +0 -137
- package/src/lib/resources/personas/frontend/best_practices.md +0 -445
- package/src/lib/resources/personas/frontend/knowledge_base.md +0 -729
- package/src/lib/resources/personas/persona-index.json +0 -31
- package/src/lib/resources/personas/reviewer.json +0 -44
- package/src/lib/resources/personas/security/best_practices.md +0 -307
- package/src/lib/resources/personas/security/knowledge_base.md +0 -498
- package/src/lib/resources/personas/tester.json +0 -44
- package/src/lib/resources/templates/README.md +0 -78
- package/src/lib/resources/templates/api-server/config.json +0 -64
- package/src/lib/resources/templates/api-server/template/.aiwf/config.json +0 -56
- package/src/lib/resources/templates/api-server/template/.aiwf/feature-ledger.json +0 -42
- package/src/lib/resources/templates/api-server/template/.aiwf/personas/backend-engineer.json +0 -40
- package/src/lib/resources/templates/api-server/template/.aiwf/scripts/cli.js +0 -111
- package/src/lib/resources/templates/api-server/template/.env.example +0 -29
- package/src/lib/resources/templates/api-server/template/.eslintrc.json +0 -23
- package/src/lib/resources/templates/api-server/template/README.md +0 -171
- package/src/lib/resources/templates/api-server/template/jest.config.js +0 -26
- package/src/lib/resources/templates/api-server/template/nodemon.json +0 -9
- package/src/lib/resources/templates/api-server/template/package.json +0 -61
- package/src/lib/resources/templates/api-server/template/src/app.ts +0 -60
- package/src/lib/resources/templates/api-server/template/src/config/swagger.ts +0 -38
- package/src/lib/resources/templates/api-server/template/src/controllers/aiwfController.ts +0 -54
- package/src/lib/resources/templates/api-server/template/src/controllers/authController.ts +0 -128
- package/src/lib/resources/templates/api-server/template/src/controllers/statusController.ts +0 -28
- package/src/lib/resources/templates/api-server/template/src/index.ts +0 -28
- package/src/lib/resources/templates/api-server/template/src/middleware/aiwfMiddleware.ts +0 -50
- package/src/lib/resources/templates/api-server/template/src/middleware/authMiddleware.ts +0 -41
- package/src/lib/resources/templates/api-server/template/src/middleware/errorHandler.ts +0 -42
- package/src/lib/resources/templates/api-server/template/src/middleware/notFoundHandler.ts +0 -14
- package/src/lib/resources/templates/api-server/template/src/middleware/requestLogger.ts +0 -20
- package/src/lib/resources/templates/api-server/template/src/routes/aiwf.ts +0 -31
- package/src/lib/resources/templates/api-server/template/src/routes/index.ts +0 -13
- package/src/lib/resources/templates/api-server/template/src/routes/v1/index.ts +0 -67
- package/src/lib/resources/templates/api-server/template/src/utils/logger.ts +0 -37
- package/src/lib/resources/templates/api-server/template/tests/app.test.ts +0 -40
- package/src/lib/resources/templates/api-server/template/tsconfig.json +0 -43
- package/src/lib/resources/templates/npm-library/config.json +0 -61
- package/src/lib/resources/templates/npm-library/template/README.md +0 -201
- package/src/lib/resources/templates/npm-library/template/package.json +0 -78
- package/src/lib/resources/templates/web-app/config.json +0 -53
- package/src/lib/resources/templates/web-app/template/.aiwf/config.json +0 -54
- package/src/lib/resources/templates/web-app/template/.aiwf/feature-ledger.json +0 -37
- package/src/lib/resources/templates/web-app/template/.aiwf/personas/fullstack-developer.json +0 -40
- package/src/lib/resources/templates/web-app/template/.aiwf/scripts/cli.js +0 -110
- package/src/lib/resources/templates/web-app/template/.eslintrc.cjs +0 -20
- package/src/lib/resources/templates/web-app/template/README.md +0 -151
- package/src/lib/resources/templates/web-app/template/index.html +0 -14
- package/src/lib/resources/templates/web-app/template/package.json +0 -44
- package/src/lib/resources/templates/web-app/template/postcss.config.js +0 -6
- package/src/lib/resources/templates/web-app/template/public/vite.svg +0 -1
- package/src/lib/resources/templates/web-app/template/src/App.tsx +0 -21
- package/src/lib/resources/templates/web-app/template/src/components/Layout.tsx +0 -57
- package/src/lib/resources/templates/web-app/template/src/components/aiwf/ContextStatus.tsx +0 -107
- package/src/lib/resources/templates/web-app/template/src/components/aiwf/TokenUsage.tsx +0 -71
- package/src/lib/resources/templates/web-app/template/src/index.css +0 -60
- package/src/lib/resources/templates/web-app/template/src/main.tsx +0 -10
- package/src/lib/resources/templates/web-app/template/src/pages/AiwfDashboard.tsx +0 -57
- package/src/lib/resources/templates/web-app/template/src/pages/HomePage.tsx +0 -89
- package/src/lib/resources/templates/web-app/template/src/pages/NotFound.tsx +0 -25
- package/src/lib/resources/templates/web-app/template/src/stores/aiwfStore.ts +0 -126
- package/src/lib/resources/templates/web-app/template/src/types/global.d.ts +0 -9
- package/src/lib/resources/templates/web-app/template/src/vite-env.d.ts +0 -1
- package/src/lib/resources/templates/web-app/template/tailwind.config.js +0 -30
- package/src/lib/resources/templates/web-app/template/tsconfig.json +0 -37
- package/src/lib/resources/templates/web-app/template/tsconfig.node.json +0 -10
- package/src/lib/resources/templates/web-app/template/vite.config.ts +0 -23
- package/src/lib/resources/utils/background-monitor.js +0 -223
- package/src/lib/resources/utils/compression-metrics.js +0 -1031
- package/src/lib/resources/utils/compression-strategies.js +0 -557
- package/src/lib/resources/utils/content-normalizer.js +0 -455
- package/src/lib/resources/utils/context-compressor.js +0 -583
- package/src/lib/resources/utils/context-rule-parser.js +0 -180
- package/src/lib/resources/utils/context-token-monitor.js +0 -463
- package/src/lib/resources/utils/context-update-manager.js +0 -502
- package/src/lib/resources/utils/git-utils.js +0 -220
- package/src/lib/resources/utils/importance-classifier.js +0 -645
- package/src/lib/resources/utils/information-filter.js +0 -710
- package/src/lib/resources/utils/persona-aware-compressor.js +0 -598
- package/src/lib/resources/utils/prompt-injector.js +0 -242
- package/src/lib/resources/utils/simplified-evaluator.js +0 -119
- package/src/lib/resources/utils/text-summarizer.js +0 -492
- package/src/lib/resources/utils/token-counter.js +0 -177
- package/src/lib/resources/utils/token-monitor.js +0 -484
- package/src/lib/resources/utils/token-reporter.js +0 -452
- package/src/lib/resources/utils/token-storage.js +0 -433
- package/src/lib/resources/utils/token-tracker.js +0 -283
- package/src/lib/rollback-manager.js +0 -418
- package/src/lib/state/priority-calculator.js +0 -217
- package/src/lib/state/state-index.js +0 -155
- package/src/lib/state/task-scanner.js +0 -328
- package/src/lib/task-analyzer.js +0 -599
- package/src/lib/template-cache-system.js +0 -559
- package/src/lib/template-downloader.js +0 -467
- package/src/lib/template-version-manager.js +0 -491
- package/src/lib/token-optimizer.js +0 -517
- package/src/lib/validator.js +0 -376
- package/src/utils/checkpoint-manager.js +0 -435
- package/src/utils/engineering-guard.js +0 -399
- package/src/utils/language-utils.js +0 -331
- package/src/utils/messages.js +0 -166
- package/src/utils/paths.js +0 -112
package/src/commands/state.js
DELETED
|
@@ -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
|
-
}
|