@sk8metal/michi-cli 0.14.1 → 0.19.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/CHANGELOG.md +268 -2
- package/README.md +27 -2
- package/dist/scripts/config/config-schema.d.ts +5 -333
- package/dist/scripts/config/config-schema.d.ts.map +1 -1
- package/dist/scripts/config/config-schema.js +6 -233
- package/dist/scripts/config/config-schema.js.map +1 -1
- package/dist/scripts/config-global.d.ts.map +1 -1
- package/dist/scripts/config-global.js +3 -2
- package/dist/scripts/config-global.js.map +1 -1
- package/dist/scripts/confluence-sync.d.ts +5 -73
- package/dist/scripts/confluence-sync.d.ts.map +1 -1
- package/dist/scripts/confluence-sync.js +14 -392
- package/dist/scripts/confluence-sync.js.map +1 -1
- package/dist/scripts/constants/environments.d.ts +3 -30
- package/dist/scripts/constants/environments.d.ts.map +1 -1
- package/dist/scripts/constants/environments.js +3 -41
- package/dist/scripts/constants/environments.js.map +1 -1
- package/dist/scripts/constants/languages.d.ts +3 -20
- package/dist/scripts/constants/languages.d.ts.map +1 -1
- package/dist/scripts/constants/languages.js +3 -50
- package/dist/scripts/constants/languages.js.map +1 -1
- package/dist/scripts/constants/test-commands.d.ts +3 -33
- package/dist/scripts/constants/test-commands.d.ts.map +1 -1
- package/dist/scripts/constants/test-commands.js +3 -67
- package/dist/scripts/constants/test-commands.js.map +1 -1
- package/dist/scripts/dev-tools/mermaid-converter.d.ts.map +1 -0
- package/dist/scripts/dev-tools/mermaid-converter.js.map +1 -0
- package/dist/scripts/dev-tools/test-interactive.d.ts.map +1 -0
- package/dist/scripts/{test-interactive.js → dev-tools/test-interactive.js} +4 -3
- package/dist/scripts/dev-tools/test-interactive.js.map +1 -0
- package/dist/scripts/github-actions-client.d.ts +5 -75
- package/dist/scripts/github-actions-client.d.ts.map +1 -1
- package/dist/scripts/github-actions-client.js +4 -178
- package/dist/scripts/github-actions-client.js.map +1 -1
- package/dist/scripts/jira-sync.d.ts +3 -121
- package/dist/scripts/jira-sync.d.ts.map +1 -1
- package/dist/scripts/jira-sync.js +5 -879
- package/dist/scripts/jira-sync.js.map +1 -1
- package/dist/scripts/markdown-to-confluence.d.ts.map +1 -1
- package/dist/scripts/markdown-to-confluence.js +2 -2
- package/dist/scripts/markdown-to-confluence.js.map +1 -1
- package/dist/scripts/multi-project-estimate.d.ts.map +1 -1
- package/dist/scripts/multi-project-estimate.js +3 -2
- package/dist/scripts/multi-project-estimate.js.map +1 -1
- package/dist/scripts/phase-runner.d.ts.map +1 -1
- package/dist/scripts/phase-runner.js +34 -18
- package/dist/scripts/phase-runner.js.map +1 -1
- package/dist/scripts/pre-flight-check.d.ts.map +1 -1
- package/dist/scripts/pre-flight-check.js +27 -11
- package/dist/scripts/pre-flight-check.js.map +1 -1
- package/dist/scripts/template/multi-repo-renderer.js +2 -2
- package/dist/scripts/template/multi-repo-renderer.js.map +1 -1
- package/dist/scripts/test-execution-generator.d.ts.map +1 -1
- package/dist/scripts/test-execution-generator.js +5 -4
- package/dist/scripts/test-execution-generator.js.map +1 -1
- package/dist/scripts/utils/aidlc-parser.d.ts +5 -82
- package/dist/scripts/utils/aidlc-parser.d.ts.map +1 -1
- package/dist/scripts/utils/aidlc-parser.js +4 -204
- package/dist/scripts/utils/aidlc-parser.js.map +1 -1
- package/dist/scripts/utils/ci-generator.d.ts.map +1 -1
- package/dist/scripts/utils/ci-generator.js +4 -3
- package/dist/scripts/utils/ci-generator.js.map +1 -1
- package/dist/scripts/utils/config-loader.d.ts.map +1 -1
- package/dist/scripts/utils/config-loader.js +46 -49
- package/dist/scripts/utils/config-loader.js.map +1 -1
- package/dist/scripts/utils/config-validator.d.ts +9 -10
- package/dist/scripts/utils/config-validator.d.ts.map +1 -1
- package/dist/scripts/utils/config-validator.js +68 -70
- package/dist/scripts/utils/config-validator.js.map +1 -1
- package/dist/scripts/utils/docker-requirement-detector.d.ts.map +1 -1
- package/dist/scripts/utils/docker-requirement-detector.js +5 -4
- package/dist/scripts/utils/docker-requirement-detector.js.map +1 -1
- package/dist/scripts/utils/env-config.d.ts.map +1 -1
- package/dist/scripts/utils/env-config.js +55 -38
- package/dist/scripts/utils/env-config.js.map +1 -1
- package/dist/scripts/utils/feature-name-validator.d.ts +4 -9
- package/dist/scripts/utils/feature-name-validator.d.ts.map +1 -1
- package/dist/scripts/utils/feature-name-validator.js +12 -21
- package/dist/scripts/utils/feature-name-validator.js.map +1 -1
- package/dist/scripts/utils/interactive-helpers.d.ts +5 -29
- package/dist/scripts/utils/interactive-helpers.d.ts.map +1 -1
- package/dist/scripts/utils/interactive-helpers.js +5 -89
- package/dist/scripts/utils/interactive-helpers.js.map +1 -1
- package/dist/scripts/utils/language-detector.d.ts.map +1 -1
- package/dist/scripts/utils/language-detector.js +4 -3
- package/dist/scripts/utils/language-detector.js.map +1 -1
- package/dist/scripts/utils/markdown-parser.d.ts +6 -52
- package/dist/scripts/utils/markdown-parser.d.ts.map +1 -1
- package/dist/scripts/utils/markdown-parser.js +5 -286
- package/dist/scripts/utils/markdown-parser.js.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.d.ts +9 -10
- package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.js +15 -17
- package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
- package/dist/scripts/utils/project-analyzer.d.ts +120 -0
- package/dist/scripts/utils/project-analyzer.d.ts.map +1 -0
- package/dist/scripts/utils/project-analyzer.js +358 -0
- package/dist/scripts/utils/project-analyzer.js.map +1 -0
- package/dist/scripts/utils/project-detector.d.ts.map +1 -1
- package/dist/scripts/utils/project-detector.js +6 -5
- package/dist/scripts/utils/project-detector.js.map +1 -1
- package/dist/scripts/utils/project-finder.d.ts +1 -21
- package/dist/scripts/utils/project-finder.d.ts.map +1 -1
- package/dist/scripts/utils/project-finder.js +2 -121
- package/dist/scripts/utils/project-finder.js.map +1 -1
- package/dist/scripts/utils/project-meta.d.ts +4 -27
- package/dist/scripts/utils/project-meta.d.ts.map +1 -1
- package/dist/scripts/utils/project-meta.js +3 -67
- package/dist/scripts/utils/project-meta.js.map +1 -1
- package/dist/scripts/utils/safe-file-reader.d.ts +84 -0
- package/dist/scripts/utils/safe-file-reader.d.ts.map +1 -0
- package/dist/scripts/utils/safe-file-reader.js +122 -0
- package/dist/scripts/utils/safe-file-reader.js.map +1 -0
- package/dist/scripts/utils/security-validator.d.ts +8 -19
- package/dist/scripts/utils/security-validator.d.ts.map +1 -1
- package/dist/scripts/utils/security-validator.js +28 -58
- package/dist/scripts/utils/security-validator.js.map +1 -1
- package/dist/scripts/utils/spec-archiver.d.ts.map +1 -1
- package/dist/scripts/utils/spec-archiver.js +7 -6
- package/dist/scripts/utils/spec-archiver.js.map +1 -1
- package/dist/scripts/utils/spec-updater.d.ts.map +1 -1
- package/dist/scripts/utils/spec-updater.js +10 -7
- package/dist/scripts/utils/spec-updater.js.map +1 -1
- package/dist/scripts/utils/tasks-converter.js +2 -2
- package/dist/scripts/utils/tasks-converter.js.map +1 -1
- package/dist/scripts/utils/tasks-format-validator.js +4 -4
- package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
- package/dist/scripts/utils/template-applier.d.ts.map +1 -1
- package/dist/scripts/utils/template-applier.js +4 -3
- package/dist/scripts/utils/template-applier.js.map +1 -1
- package/dist/scripts/utils/types/validation.d.ts +57 -0
- package/dist/scripts/utils/types/validation.d.ts.map +1 -0
- package/dist/scripts/utils/types/validation.js +50 -0
- package/dist/scripts/utils/types/validation.js.map +1 -0
- package/dist/scripts/validate-phase.d.ts +6 -1
- package/dist/scripts/validate-phase.d.ts.map +1 -1
- package/dist/scripts/validate-phase.js +42 -20
- package/dist/scripts/validate-phase.js.map +1 -1
- package/dist/scripts/workflow-orchestrator.d.ts +4 -40
- package/dist/scripts/workflow-orchestrator.d.ts.map +1 -1
- package/dist/scripts/workflow-orchestrator.js +7 -194
- package/dist/scripts/workflow-orchestrator.js.map +1 -1
- package/dist/src/application/interfaces/config-provider.d.ts +89 -0
- package/dist/src/application/interfaces/config-provider.d.ts.map +1 -0
- package/dist/src/application/interfaces/config-provider.js +8 -0
- package/dist/src/application/interfaces/config-provider.js.map +1 -0
- package/dist/src/application/interfaces/external-api.d.ts +80 -0
- package/dist/src/application/interfaces/external-api.d.ts.map +1 -0
- package/dist/src/application/interfaces/external-api.js +8 -0
- package/dist/src/application/interfaces/external-api.js.map +1 -0
- package/dist/src/application/interfaces/spec-repository.d.ts +52 -0
- package/dist/src/application/interfaces/spec-repository.d.ts.map +1 -0
- package/dist/src/application/interfaces/spec-repository.js +8 -0
- package/dist/src/application/interfaces/spec-repository.js.map +1 -0
- package/dist/src/application/services/spec-service.d.ts +49 -0
- package/dist/src/application/services/spec-service.d.ts.map +1 -0
- package/dist/src/application/services/spec-service.js +94 -0
- package/dist/src/application/services/spec-service.js.map +1 -0
- package/dist/src/application/services/workflow-service.d.ts +58 -0
- package/dist/src/application/services/workflow-service.d.ts.map +1 -0
- package/dist/src/application/services/workflow-service.js +125 -0
- package/dist/src/application/services/workflow-service.js.map +1 -0
- package/dist/src/application/templates/processor.d.ts +31 -0
- package/dist/src/application/templates/processor.d.ts.map +1 -0
- package/dist/src/application/templates/processor.js +58 -0
- package/dist/src/application/templates/processor.js.map +1 -0
- package/dist/src/application/use-cases/spec/archive-spec.d.ts +34 -0
- package/dist/src/application/use-cases/spec/archive-spec.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/archive-spec.js +56 -0
- package/dist/src/application/use-cases/spec/archive-spec.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-design.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-design.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-design.js +58 -0
- package/dist/src/application/use-cases/spec/generate-design.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-requirements.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-requirements.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-requirements.js +58 -0
- package/dist/src/application/use-cases/spec/generate-requirements.js.map +1 -0
- package/dist/src/application/use-cases/spec/generate-tasks.d.ts +34 -0
- package/dist/src/application/use-cases/spec/generate-tasks.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/generate-tasks.js +58 -0
- package/dist/src/application/use-cases/spec/generate-tasks.js.map +1 -0
- package/dist/src/application/use-cases/spec/init-spec.d.ts +48 -0
- package/dist/src/application/use-cases/spec/init-spec.d.ts.map +1 -0
- package/dist/src/application/use-cases/spec/init-spec.js +121 -0
- package/dist/src/application/use-cases/spec/init-spec.js.map +1 -0
- package/dist/src/cli.d.ts +6 -7
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +6 -745
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/config-validate.js +2 -2
- package/dist/src/commands/init.d.ts +6 -21
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +5 -508
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/migrate.js +4 -3
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/spec-archive.d.ts +6 -13
- package/dist/src/commands/spec-archive.d.ts.map +1 -1
- package/dist/src/commands/spec-archive.js +5 -36
- package/dist/src/commands/spec-archive.js.map +1 -1
- package/dist/src/commands/spec-list.d.ts +6 -11
- package/dist/src/commands/spec-list.d.ts.map +1 -1
- package/dist/src/commands/spec-list.js +5 -51
- package/dist/src/commands/spec-list.js.map +1 -1
- package/dist/src/domain/constants/approval.d.ts +18 -0
- package/dist/src/domain/constants/approval.d.ts.map +1 -0
- package/dist/src/domain/constants/approval.js +23 -0
- package/dist/src/domain/constants/approval.js.map +1 -0
- package/dist/src/domain/constants/environments.d.ts +33 -0
- package/dist/src/domain/constants/environments.d.ts.map +1 -0
- package/dist/src/domain/constants/environments.js +44 -0
- package/dist/src/domain/constants/environments.js.map +1 -0
- package/dist/src/domain/constants/index.d.ts +12 -0
- package/dist/src/domain/constants/index.d.ts.map +1 -0
- package/dist/src/domain/constants/index.js +18 -0
- package/dist/src/domain/constants/index.js.map +1 -0
- package/dist/src/domain/constants/languages.d.ts +23 -0
- package/dist/src/domain/constants/languages.d.ts.map +1 -0
- package/dist/src/domain/constants/languages.js +53 -0
- package/dist/src/domain/constants/languages.js.map +1 -0
- package/dist/src/domain/constants/phases.d.ts +32 -0
- package/dist/src/domain/constants/phases.d.ts.map +1 -0
- package/dist/src/domain/constants/phases.js +52 -0
- package/dist/src/domain/constants/phases.js.map +1 -0
- package/dist/src/domain/constants/test-commands.d.ts +36 -0
- package/dist/src/domain/constants/test-commands.d.ts.map +1 -0
- package/dist/src/domain/constants/test-commands.js +70 -0
- package/dist/src/domain/constants/test-commands.js.map +1 -0
- package/dist/src/domain/constants/validation-rules.d.ts +32 -0
- package/dist/src/domain/constants/validation-rules.d.ts.map +1 -0
- package/dist/src/domain/constants/validation-rules.js +51 -0
- package/dist/src/domain/constants/validation-rules.js.map +1 -0
- package/dist/src/domain/entities/spec.d.ts +66 -0
- package/dist/src/domain/entities/spec.d.ts.map +1 -0
- package/dist/src/domain/entities/spec.js +112 -0
- package/dist/src/domain/entities/spec.js.map +1 -0
- package/dist/src/domain/entities/task.d.ts +43 -0
- package/dist/src/domain/entities/task.d.ts.map +1 -0
- package/dist/src/domain/entities/task.js +65 -0
- package/dist/src/domain/entities/task.js.map +1 -0
- package/dist/src/domain/services/spec-validator.d.ts +46 -0
- package/dist/src/domain/services/spec-validator.d.ts.map +1 -0
- package/dist/src/domain/services/spec-validator.js +99 -0
- package/dist/src/domain/services/spec-validator.js.map +1 -0
- package/dist/src/domain/value-objects/feature-name.d.ts +24 -0
- package/dist/src/domain/value-objects/feature-name.d.ts.map +1 -0
- package/dist/src/domain/value-objects/feature-name.js +36 -0
- package/dist/src/domain/value-objects/feature-name.js.map +1 -0
- package/dist/src/domain/value-objects/index.d.ts +7 -0
- package/dist/src/domain/value-objects/index.d.ts.map +1 -0
- package/dist/src/domain/value-objects/index.js +7 -0
- package/dist/src/domain/value-objects/index.js.map +1 -0
- package/dist/src/infrastructure/config/index.d.ts +5 -0
- package/dist/src/infrastructure/config/index.d.ts.map +1 -0
- package/dist/src/infrastructure/config/index.js +6 -0
- package/dist/src/infrastructure/config/index.js.map +1 -0
- package/dist/src/infrastructure/config/schema.d.ts +337 -0
- package/dist/src/infrastructure/config/schema.d.ts.map +1 -0
- package/dist/src/infrastructure/config/schema.js +237 -0
- package/dist/src/infrastructure/config/schema.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts +14 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js +102 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts +23 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js +192 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts +48 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js +531 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts +10 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js +12 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts +13 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js +129 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts +113 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js +5 -0
- package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts +15 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js +141 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts +50 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.js +226 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts +12 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.js +16 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts +49 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js +165 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts +14 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js +110 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts +32 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js +284 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts +114 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.js +7 -0
- package/dist/src/infrastructure/external-apis/atlassian/jira/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/client.d.ts +25 -0
- package/dist/src/infrastructure/external-apis/github/client.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/client.js +109 -0
- package/dist/src/infrastructure/external-apis/github/client.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/index.d.ts +7 -0
- package/dist/src/infrastructure/external-apis/github/index.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/index.js +8 -0
- package/dist/src/infrastructure/external-apis/github/index.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/types.d.ts +69 -0
- package/dist/src/infrastructure/external-apis/github/types.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/types.js +5 -0
- package/dist/src/infrastructure/external-apis/github/types.js.map +1 -0
- package/dist/src/infrastructure/external-apis/github/utils.d.ts +18 -0
- package/dist/src/infrastructure/external-apis/github/utils.d.ts.map +1 -0
- package/dist/src/infrastructure/external-apis/github/utils.js +84 -0
- package/dist/src/infrastructure/external-apis/github/utils.js.map +1 -0
- package/dist/src/infrastructure/filesystem/index.d.ts +6 -0
- package/dist/src/infrastructure/filesystem/index.d.ts.map +1 -0
- package/dist/src/infrastructure/filesystem/index.js +5 -0
- package/dist/src/infrastructure/filesystem/index.js.map +1 -0
- package/dist/src/infrastructure/filesystem/project-meta.d.ts +32 -0
- package/dist/src/infrastructure/filesystem/project-meta.d.ts.map +1 -0
- package/dist/src/infrastructure/filesystem/project-meta.js +75 -0
- package/dist/src/infrastructure/filesystem/project-meta.js.map +1 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.d.ts +86 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.js +208 -0
- package/dist/src/infrastructure/parsers/aidlc-parser.js.map +1 -0
- package/dist/src/infrastructure/parsers/index.d.ts +8 -0
- package/dist/src/infrastructure/parsers/index.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/index.js +6 -0
- package/dist/src/infrastructure/parsers/index.js.map +1 -0
- package/dist/src/infrastructure/parsers/markdown-parser.d.ts +51 -0
- package/dist/src/infrastructure/parsers/markdown-parser.d.ts.map +1 -0
- package/dist/src/infrastructure/parsers/markdown-parser.js +253 -0
- package/dist/src/infrastructure/parsers/markdown-parser.js.map +1 -0
- package/dist/src/presentation/cli/config.d.ts +12 -0
- package/dist/src/presentation/cli/config.d.ts.map +1 -0
- package/dist/src/presentation/cli/config.js +22 -0
- package/dist/src/presentation/cli/config.js.map +1 -0
- package/dist/src/presentation/cli/version.d.ts +10 -0
- package/dist/src/presentation/cli/version.d.ts.map +1 -0
- package/dist/src/presentation/cli/version.js +41 -0
- package/dist/src/presentation/cli/version.js.map +1 -0
- package/dist/src/presentation/cli.d.ts +22 -0
- package/dist/src/presentation/cli.d.ts.map +1 -0
- package/dist/src/presentation/cli.js +85 -0
- package/dist/src/presentation/cli.js.map +1 -0
- package/dist/src/presentation/commands/config/register.d.ts +11 -0
- package/dist/src/presentation/commands/config/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/config/register.js +44 -0
- package/dist/src/presentation/commands/config/register.js.map +1 -0
- package/dist/src/presentation/commands/confluence/register.d.ts +11 -0
- package/dist/src/presentation/commands/confluence/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/confluence/register.js +32 -0
- package/dist/src/presentation/commands/confluence/register.js.map +1 -0
- package/dist/src/presentation/commands/confluence/sync.d.ts +17 -0
- package/dist/src/presentation/commands/confluence/sync.d.ts.map +1 -0
- package/dist/src/presentation/commands/confluence/sync.js +25 -0
- package/dist/src/presentation/commands/confluence/sync.js.map +1 -0
- package/dist/src/presentation/commands/init/handler.d.ts +10 -0
- package/dist/src/presentation/commands/init/handler.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/handler.js +64 -0
- package/dist/src/presentation/commands/init/handler.js.map +1 -0
- package/dist/src/presentation/commands/init/prompts.d.ts +41 -0
- package/dist/src/presentation/commands/init/prompts.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/prompts.js +119 -0
- package/dist/src/presentation/commands/init/prompts.js.map +1 -0
- package/dist/src/presentation/commands/init/register.d.ts +11 -0
- package/dist/src/presentation/commands/init/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/register.js +141 -0
- package/dist/src/presentation/commands/init/register.js.map +1 -0
- package/dist/src/presentation/commands/init/setup.d.ts +26 -0
- package/dist/src/presentation/commands/init/setup.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/setup.js +196 -0
- package/dist/src/presentation/commands/init/setup.js.map +1 -0
- package/dist/src/presentation/commands/init/templates.d.ts +19 -0
- package/dist/src/presentation/commands/init/templates.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/templates.js +140 -0
- package/dist/src/presentation/commands/init/templates.js.map +1 -0
- package/dist/src/presentation/commands/init/validation.d.ts +21 -0
- package/dist/src/presentation/commands/init/validation.d.ts.map +1 -0
- package/dist/src/presentation/commands/init/validation.js +65 -0
- package/dist/src/presentation/commands/init/validation.js.map +1 -0
- package/dist/src/presentation/commands/jira/register.d.ts +11 -0
- package/dist/src/presentation/commands/jira/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/jira/register.js +75 -0
- package/dist/src/presentation/commands/jira/register.js.map +1 -0
- package/dist/src/presentation/commands/jira/sync.d.ts +29 -0
- package/dist/src/presentation/commands/jira/sync.d.ts.map +1 -0
- package/dist/src/presentation/commands/jira/sync.js +37 -0
- package/dist/src/presentation/commands/jira/sync.js.map +1 -0
- package/dist/src/{commands/multi-repo-add-repo.d.ts → presentation/commands/multi-repo/add-repo.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/add-repo.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-add-repo.js → presentation/commands/multi-repo/add-repo.js} +4 -4
- package/dist/src/presentation/commands/multi-repo/add-repo.js.map +1 -0
- package/dist/src/{commands/multi-repo-ci-status.d.ts → presentation/commands/multi-repo/ci-status.d.ts} +2 -2
- package/dist/src/presentation/commands/multi-repo/ci-status.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-ci-status.js → presentation/commands/multi-repo/ci-status.js} +95 -81
- package/dist/src/presentation/commands/multi-repo/ci-status.js.map +1 -0
- package/dist/src/{commands/multi-repo-confluence-sync.d.ts → presentation/commands/multi-repo/confluence-sync.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/confluence-sync.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-confluence-sync.js → presentation/commands/multi-repo/confluence-sync.js} +7 -6
- package/dist/src/presentation/commands/multi-repo/confluence-sync.js.map +1 -0
- package/dist/src/{commands/multi-repo-init.d.ts → presentation/commands/multi-repo/init.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/init.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-init.js → presentation/commands/multi-repo/init.js} +6 -6
- package/dist/src/presentation/commands/multi-repo/init.js.map +1 -0
- package/dist/src/{commands/multi-repo-list.d.ts → presentation/commands/multi-repo/list.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/list.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-list.js → presentation/commands/multi-repo/list.js} +2 -2
- package/dist/src/presentation/commands/multi-repo/list.js.map +1 -0
- package/dist/src/presentation/commands/multi-repo/register.d.ts +12 -0
- package/dist/src/presentation/commands/multi-repo/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/multi-repo/register.js +249 -0
- package/dist/src/presentation/commands/multi-repo/register.js.map +1 -0
- package/dist/src/{commands/multi-repo-test.d.ts → presentation/commands/multi-repo/test.d.ts} +1 -1
- package/dist/src/presentation/commands/multi-repo/test.d.ts.map +1 -0
- package/dist/src/{commands/multi-repo-test.js → presentation/commands/multi-repo/test.js} +4 -4
- package/dist/src/presentation/commands/multi-repo/test.js.map +1 -0
- package/dist/src/presentation/commands/phase/register.d.ts +11 -0
- package/dist/src/presentation/commands/phase/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/phase/register.js +97 -0
- package/dist/src/presentation/commands/phase/register.js.map +1 -0
- package/dist/src/presentation/commands/spec/archive.d.ts +17 -0
- package/dist/src/presentation/commands/spec/archive.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/archive.js +40 -0
- package/dist/src/presentation/commands/spec/archive.js.map +1 -0
- package/dist/src/presentation/commands/spec/list.d.ts +15 -0
- package/dist/src/presentation/commands/spec/list.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/list.js +55 -0
- package/dist/src/presentation/commands/spec/list.js.map +1 -0
- package/dist/src/presentation/commands/spec/register.d.ts +11 -0
- package/dist/src/presentation/commands/spec/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/spec/register.js +45 -0
- package/dist/src/presentation/commands/spec/register.js.map +1 -0
- package/dist/src/presentation/commands/workflow/orchestrator.d.ts +50 -0
- package/dist/src/presentation/commands/workflow/orchestrator.d.ts.map +1 -0
- package/dist/src/presentation/commands/workflow/orchestrator.js +174 -0
- package/dist/src/presentation/commands/workflow/orchestrator.js.map +1 -0
- package/dist/src/presentation/commands/workflow/register.d.ts +11 -0
- package/dist/src/presentation/commands/workflow/register.d.ts.map +1 -0
- package/dist/src/presentation/commands/workflow/register.js +58 -0
- package/dist/src/presentation/commands/workflow/register.js.map +1 -0
- package/dist/src/presentation/formatters/error-formatter.d.ts +79 -0
- package/dist/src/presentation/formatters/error-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/error-formatter.js +150 -0
- package/dist/src/presentation/formatters/error-formatter.js.map +1 -0
- package/dist/src/presentation/formatters/index.d.ts +8 -0
- package/dist/src/presentation/formatters/index.d.ts.map +1 -0
- package/dist/src/presentation/formatters/index.js +11 -0
- package/dist/src/presentation/formatters/index.js.map +1 -0
- package/dist/src/presentation/formatters/output-formatter.d.ts +98 -0
- package/dist/src/presentation/formatters/output-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/output-formatter.js +165 -0
- package/dist/src/presentation/formatters/output-formatter.js.map +1 -0
- package/dist/src/presentation/formatters/progress-formatter.d.ts +121 -0
- package/dist/src/presentation/formatters/progress-formatter.d.ts.map +1 -0
- package/dist/src/presentation/formatters/progress-formatter.js +235 -0
- package/dist/src/presentation/formatters/progress-formatter.js.map +1 -0
- package/dist/src/presentation/interactive/confirmation.d.ts +24 -0
- package/dist/src/presentation/interactive/confirmation.d.ts.map +1 -0
- package/dist/src/presentation/interactive/confirmation.js +54 -0
- package/dist/src/presentation/interactive/confirmation.js.map +1 -0
- package/dist/src/presentation/interactive/index.d.ts +8 -0
- package/dist/src/presentation/interactive/index.d.ts.map +1 -0
- package/dist/src/presentation/interactive/index.js +11 -0
- package/dist/src/presentation/interactive/index.js.map +1 -0
- package/dist/src/presentation/interactive/prompts.d.ts +31 -0
- package/dist/src/presentation/interactive/prompts.d.ts.map +1 -0
- package/dist/src/presentation/interactive/prompts.js +71 -0
- package/dist/src/presentation/interactive/prompts.js.map +1 -0
- package/dist/src/presentation/interactive/selection.d.ts +31 -0
- package/dist/src/presentation/interactive/selection.d.ts.map +1 -0
- package/dist/src/presentation/interactive/selection.js +138 -0
- package/dist/src/presentation/interactive/selection.js.map +1 -0
- package/dist/src/shared/types/errors.d.ts +132 -0
- package/dist/src/shared/types/errors.d.ts.map +1 -0
- package/dist/src/shared/types/errors.js +61 -0
- package/dist/src/shared/types/errors.js.map +1 -0
- package/dist/src/shared/types/result.d.ts +53 -0
- package/dist/src/shared/types/result.d.ts.map +1 -0
- package/dist/src/shared/types/result.js +42 -0
- package/dist/src/shared/types/result.js.map +1 -0
- package/dist/test-confluence-auth.d.ts +6 -0
- package/dist/test-confluence-auth.d.ts.map +1 -0
- package/dist/test-confluence-auth.js +128 -0
- package/dist/test-confluence-auth.js.map +1 -0
- package/docs/MIGRATION.md +513 -0
- package/docs/architecture.md +774 -0
- package/docs/guides/comprehensive-verification-guide.md +1926 -0
- package/docs/onion-architecture-phase0-complete.md +91 -0
- package/package.json +6 -6
- package/scripts/README.md +148 -0
- package/scripts/__tests__/jira-transitions.test.ts +44 -30
- package/scripts/__tests__/mermaid-converter.test.ts +2 -2
- package/scripts/__tests__/multi-repo-validator.test.ts +62 -62
- package/scripts/__tests__/spec-archiver.test.ts +12 -0
- package/scripts/__tests__/validate-phase.test.ts +6 -6
- package/scripts/build/README.md +24 -0
- package/scripts/{copy-static-assets.js → build/copy-static-assets.js} +1 -1
- package/scripts/{set-permissions.js → build/set-permissions.js} +1 -1
- package/scripts/config/config-schema.ts +43 -302
- package/scripts/config-global.ts +3 -2
- package/scripts/confluence-sync.ts +17 -538
- package/scripts/constants/environments.ts +3 -53
- package/scripts/constants/languages.ts +3 -68
- package/scripts/constants/test-commands.ts +3 -94
- package/scripts/dev-tools/README.md +22 -0
- package/scripts/{test-interactive.ts → dev-tools/test-interactive.ts} +4 -3
- package/scripts/github-actions-client.ts +18 -256
- package/scripts/jira-sync.ts +5 -1270
- package/scripts/markdown-to-confluence.ts +5 -5
- package/scripts/multi-project-estimate.ts +3 -2
- package/scripts/phase-runner.ts +41 -19
- package/scripts/pre-flight-check.ts +27 -11
- package/scripts/template/__tests__/multi-repo-renderer.test.ts +12 -0
- package/scripts/template/multi-repo-renderer.ts +2 -2
- package/scripts/test-execution-generator.ts +5 -4
- package/scripts/utils/__tests__/config-validator.test.ts +19 -19
- package/scripts/utils/__tests__/feature-name-validator.test.ts +13 -13
- package/scripts/utils/__tests__/multi-repo-validator.test.ts +34 -34
- package/scripts/utils/__tests__/project-analyzer.test.ts +542 -0
- package/scripts/utils/__tests__/safe-file-reader.test.ts +208 -0
- package/scripts/utils/__tests__/security-validator.test.ts +33 -33
- package/scripts/utils/__tests__/validation-result.test.ts +112 -0
- package/scripts/utils/aidlc-parser.ts +18 -287
- package/scripts/utils/ci-generator.ts +4 -3
- package/scripts/utils/config-loader.ts +54 -50
- package/scripts/utils/config-validator.ts +89 -80
- package/scripts/utils/docker-requirement-detector.ts +5 -4
- package/scripts/utils/env-config.ts +59 -40
- package/scripts/utils/feature-name-validator.ts +25 -40
- package/scripts/utils/interactive-helpers.ts +24 -132
- package/scripts/utils/language-detector.ts +4 -3
- package/scripts/utils/markdown-parser.ts +18 -373
- package/scripts/utils/multi-repo-validator.ts +27 -28
- package/scripts/utils/project-analyzer.ts +429 -0
- package/scripts/utils/project-detector.ts +6 -5
- package/scripts/utils/project-finder.ts +2 -154
- package/scripts/utils/project-meta.ts +8 -91
- package/scripts/utils/safe-file-reader.ts +158 -0
- package/scripts/utils/security-validator.ts +42 -78
- package/scripts/utils/spec-archiver.ts +7 -6
- package/scripts/utils/spec-updater.ts +12 -6
- package/scripts/utils/tasks-converter.ts +2 -2
- package/scripts/utils/tasks-format-validator.ts +4 -4
- package/scripts/utils/template-applier.ts +4 -3
- package/scripts/utils/types/validation.ts +92 -0
- package/scripts/validate-phase.ts +51 -23
- package/scripts/workflow-orchestrator.ts +16 -251
- package/dist/scripts/mermaid-converter.d.ts.map +0 -1
- package/dist/scripts/mermaid-converter.js.map +0 -1
- package/dist/scripts/resource-dashboard.d.ts +0 -7
- package/dist/scripts/resource-dashboard.d.ts.map +0 -1
- package/dist/scripts/resource-dashboard.js +0 -157
- package/dist/scripts/resource-dashboard.js.map +0 -1
- package/dist/scripts/test-interactive.d.ts.map +0 -1
- package/dist/scripts/test-interactive.js.map +0 -1
- package/dist/scripts/test-new-features.d.ts +0 -5
- package/dist/scripts/test-new-features.d.ts.map +0 -1
- package/dist/scripts/test-new-features.js +0 -148
- package/dist/scripts/test-new-features.js.map +0 -1
- package/dist/scripts/test-spec-generator.d.ts +0 -29
- package/dist/scripts/test-spec-generator.d.ts.map +0 -1
- package/dist/scripts/test-spec-generator.js +0 -493
- package/dist/scripts/test-spec-generator.js.map +0 -1
- package/dist/scripts/utils/confluence-approval.d.ts +0 -46
- package/dist/scripts/utils/confluence-approval.d.ts.map +0 -1
- package/dist/scripts/utils/confluence-approval.js +0 -120
- package/dist/scripts/utils/confluence-approval.js.map +0 -1
- package/dist/scripts/utils/template-finder.d.ts +0 -37
- package/dist/scripts/utils/template-finder.d.ts.map +0 -1
- package/dist/scripts/utils/template-finder.js +0 -58
- package/dist/scripts/utils/template-finder.js.map +0 -1
- package/dist/src/commands/multi-repo-add-repo.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-add-repo.js.map +0 -1
- package/dist/src/commands/multi-repo-ci-status.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-ci-status.js.map +0 -1
- package/dist/src/commands/multi-repo-confluence-sync.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-confluence-sync.js.map +0 -1
- package/dist/src/commands/multi-repo-init.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-init.js.map +0 -1
- package/dist/src/commands/multi-repo-list.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-list.js.map +0 -1
- package/dist/src/commands/multi-repo-test.d.ts.map +0 -1
- package/dist/src/commands/multi-repo-test.js.map +0 -1
- package/dist/src/commands/setup-existing.d.ts +0 -22
- package/dist/src/commands/setup-existing.d.ts.map +0 -1
- package/dist/src/commands/setup-existing.js +0 -606
- package/dist/src/commands/setup-existing.js.map +0 -1
- package/scripts/__tests__/setup-existing-project.test.ts +0 -244
- package/scripts/resource-dashboard.ts +0 -189
- package/scripts/test-new-features.ts +0 -171
- package/scripts/test-spec-generator.ts +0 -570
- package/scripts/utils/confluence-approval.ts +0 -169
- package/scripts/utils/template-finder.ts +0 -69
- /package/dist/scripts/{mermaid-converter.d.ts → dev-tools/mermaid-converter.d.ts} +0 -0
- /package/dist/scripts/{mermaid-converter.js → dev-tools/mermaid-converter.js} +0 -0
- /package/dist/scripts/{test-interactive.d.ts → dev-tools/test-interactive.d.ts} +0 -0
- /package/scripts/{mermaid-converter.ts → dev-tools/mermaid-converter.ts} +0 -0
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
# Migration Guide: Onion Architecture
|
|
2
|
+
|
|
3
|
+
このドキュメントは、Michiプロジェクトのオニオンアーキテクチャ移行について説明します。
|
|
4
|
+
|
|
5
|
+
## 目次
|
|
6
|
+
|
|
7
|
+
- [概要](#概要)
|
|
8
|
+
- [移行の背景と目的](#移行の背景と目的)
|
|
9
|
+
- [Before/After ディレクトリ構造比較](#beforeafter-ディレクトリ構造比較)
|
|
10
|
+
- [ハイブリッドアプローチ: src/ + scripts/](#ハイブリッドアプローチ-src--scripts)
|
|
11
|
+
- [ファイル移動マッピング](#ファイル移動マッピング)
|
|
12
|
+
- [移行の影響](#移行の影響)
|
|
13
|
+
- [開発者向けガイドライン](#開発者向けガイドライン)
|
|
14
|
+
|
|
15
|
+
## 概要
|
|
16
|
+
|
|
17
|
+
**移行期間**: Phase 1 - Phase 7 (v0.13.0 - v0.18.x)
|
|
18
|
+
|
|
19
|
+
Michiは、従来の`scripts/`中心のフラット構造から、**オニオンアーキテクチャ(4層構造)**に移行しました。これにより、以下を実現します:
|
|
20
|
+
|
|
21
|
+
- ✅ **明確な責務分離**: ビジネスロジックと外部依存の分離
|
|
22
|
+
- ✅ **テスト容易性**: 各層を独立してテスト可能
|
|
23
|
+
- ✅ **保守性向上**: 依存関係ルールによる変更影響の局所化
|
|
24
|
+
- ✅ **ハイブリッドアプローチ**: プロダクションコード(`src/`)とビルドツール(`scripts/`)の共存
|
|
25
|
+
|
|
26
|
+
## 移行の背景と目的
|
|
27
|
+
|
|
28
|
+
### 移行前の課題
|
|
29
|
+
|
|
30
|
+
1. **責務の混在**: プロダクションコードとビルドツールが同じ`scripts/`に混在
|
|
31
|
+
2. **依存関係の複雑化**: 外部APIとビジネスロジックが密結合
|
|
32
|
+
3. **テストの困難性**: モックが困難で単体テストが書きにくい
|
|
33
|
+
4. **コード重複**: 類似処理が複数箇所に散在(約1,600行)
|
|
34
|
+
|
|
35
|
+
### 移行後の改善
|
|
36
|
+
|
|
37
|
+
1. **4層構造**: Domain/Application/Infrastructure/Presentation に責務を分離
|
|
38
|
+
2. **依存性逆転**: インターフェースを介した疎結合設計
|
|
39
|
+
3. **テスト戦略**: 各層ごとに適切なテスト手法を適用
|
|
40
|
+
4. **コード簡素化**: 重複コード削減と共通化により約1,600行削減
|
|
41
|
+
|
|
42
|
+
## Before/After ディレクトリ構造比較
|
|
43
|
+
|
|
44
|
+
### Before: フラット構造(v0.12.x以前)
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
michi/
|
|
48
|
+
├── scripts/
|
|
49
|
+
│ ├── confluence-sync.ts # Presentation層相当
|
|
50
|
+
│ ├── jira-sync.ts # Presentation層相当
|
|
51
|
+
│ ├── workflow-orchestrator.ts # Application層相当
|
|
52
|
+
│ ├── phase-runner.ts # Application層相当
|
|
53
|
+
│ ├── spec-impl-workflow.ts # Application層相当
|
|
54
|
+
│ ├── utils/
|
|
55
|
+
│ │ ├── confluence-api.ts # Infrastructure層相当
|
|
56
|
+
│ │ ├── jira-api.ts # Infrastructure層相当
|
|
57
|
+
│ │ ├── github-api.ts # Infrastructure層相当
|
|
58
|
+
│ │ ├── spec-file-system.ts # Infrastructure層相当
|
|
59
|
+
│ │ ├── template-engine.ts # Application層相当
|
|
60
|
+
│ │ ├── feature-name-validator.ts # Domain層相当
|
|
61
|
+
│ │ ├── project-finder.ts # 削除(ProjectAnalyzerに統合)
|
|
62
|
+
│ │ ├── project-detector.ts # 削除(ProjectAnalyzerに統合)
|
|
63
|
+
│ │ └── ... (40以上のファイルが混在)
|
|
64
|
+
│ ├── build/
|
|
65
|
+
│ │ ├── copy-static-assets.js # ビルドツール(scripts/に残る)
|
|
66
|
+
│ │ └── set-permissions.js # ビルドツール(scripts/に残る)
|
|
67
|
+
│ └── dev-tools/
|
|
68
|
+
│ ├── test-interactive.ts # 開発ツール(scripts/に残る)
|
|
69
|
+
│ └── mermaid-converter.ts # 開発ツール(scripts/に残る)
|
|
70
|
+
└── src/
|
|
71
|
+
└── cli.ts # CLIエントリーポイントのみ
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**課題**:
|
|
75
|
+
- プロダクションコード(`confluence-api.ts`, `spec-file-system.ts`など)がビルドツールと混在
|
|
76
|
+
- 依存関係が不明確(どのファイルがどれに依存しているか分からない)
|
|
77
|
+
- テストが困難(外部APIとビジネスロジックが密結合)
|
|
78
|
+
|
|
79
|
+
### After: オニオンアーキテクチャ(v0.18.x)
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
michi/
|
|
83
|
+
├── src/ # プロダクションコード(4層構造)
|
|
84
|
+
│ ├── domain/ # Layer 1: ビジネスロジック
|
|
85
|
+
│ │ ├── entities/
|
|
86
|
+
│ │ │ ├── spec.ts # 仕様エンティティ
|
|
87
|
+
│ │ │ ├── feature-name.ts # 値オブジェクト
|
|
88
|
+
│ │ │ └── phase-identifier.ts
|
|
89
|
+
│ │ ├── services/
|
|
90
|
+
│ │ │ ├── spec-validator.ts
|
|
91
|
+
│ │ │ └── template-validator.ts
|
|
92
|
+
│ │ └── constants/
|
|
93
|
+
│ │ └── phases.ts
|
|
94
|
+
│ │
|
|
95
|
+
│ ├── application/ # Layer 2: ユースケース調整
|
|
96
|
+
│ │ ├── use-cases/
|
|
97
|
+
│ │ │ ├── init-spec.ts
|
|
98
|
+
│ │ │ ├── generate-requirements.ts
|
|
99
|
+
│ │ │ └── generate-design.ts
|
|
100
|
+
│ │ ├── interfaces/ # DI用インターフェース
|
|
101
|
+
│ │ │ ├── spec-repository.ts
|
|
102
|
+
│ │ │ ├── external-api.ts
|
|
103
|
+
│ │ │ └── template-engine.ts
|
|
104
|
+
│ │ ├── services/
|
|
105
|
+
│ │ │ └── template-processor.ts
|
|
106
|
+
│ │ └── dto/
|
|
107
|
+
│ │ └── spec-dto.ts
|
|
108
|
+
│ │
|
|
109
|
+
│ ├── infrastructure/ # Layer 3: 外部サービス統合
|
|
110
|
+
│ │ ├── repositories/
|
|
111
|
+
│ │ │ └── file-system-spec-repository.ts
|
|
112
|
+
│ │ ├── external-apis/
|
|
113
|
+
│ │ │ ├── confluence/
|
|
114
|
+
│ │ │ │ ├── confluence-client.ts
|
|
115
|
+
│ │ │ │ └── confluence-parser.ts
|
|
116
|
+
│ │ │ ├── jira/
|
|
117
|
+
│ │ │ │ ├── jira-client.ts
|
|
118
|
+
│ │ │ │ └── jira-parser.ts
|
|
119
|
+
│ │ │ └── github/
|
|
120
|
+
│ │ │ └── github-client.ts
|
|
121
|
+
│ │ ├── config/
|
|
122
|
+
│ │ │ └── config-loader.ts
|
|
123
|
+
│ │ └── file-system/
|
|
124
|
+
│ │ └── safe-file-reader.ts
|
|
125
|
+
│ │
|
|
126
|
+
│ ├── presentation/ # Layer 4: ユーザーインターフェース
|
|
127
|
+
│ │ ├── commands/
|
|
128
|
+
│ │ │ ├── confluence/
|
|
129
|
+
│ │ │ │ └── confluence-sync-handler.ts
|
|
130
|
+
│ │ │ ├── jira/
|
|
131
|
+
│ │ │ │ └── jira-sync-handler.ts
|
|
132
|
+
│ │ │ ├── spec/
|
|
133
|
+
│ │ │ │ ├── init-handler.ts
|
|
134
|
+
│ │ │ │ ├── requirements-handler.ts
|
|
135
|
+
│ │ │ │ └── design-handler.ts
|
|
136
|
+
│ │ │ └── workflow/
|
|
137
|
+
│ │ │ └── workflow-orchestrator-handler.ts
|
|
138
|
+
│ │ ├── formatters/
|
|
139
|
+
│ │ │ └── console-formatter.ts
|
|
140
|
+
│ │ └── cli.ts # CLIエントリーポイント
|
|
141
|
+
│ │
|
|
142
|
+
│ └── shared/ # 共通ユーティリティ
|
|
143
|
+
│ ├── utils/
|
|
144
|
+
│ │ ├── logger.ts
|
|
145
|
+
│ │ └── error-handler.ts
|
|
146
|
+
│ └── types/
|
|
147
|
+
│ └── common.ts
|
|
148
|
+
│
|
|
149
|
+
└── scripts/ # ビルド・開発ツール(層なし)
|
|
150
|
+
├── build/ # ビルドツール
|
|
151
|
+
│ ├── copy-static-assets.js
|
|
152
|
+
│ └── set-permissions.js
|
|
153
|
+
├── dev-tools/ # 開発ツール
|
|
154
|
+
│ ├── test-interactive.ts
|
|
155
|
+
│ └── mermaid-converter.ts
|
|
156
|
+
├── utils/ # スクリプト共通ユーティリティ
|
|
157
|
+
│ ├── env-loader.js
|
|
158
|
+
│ ├── config-loader.ts
|
|
159
|
+
│ └── safe-file-reader.ts
|
|
160
|
+
├── confluence-sync.ts # Entry Point → src/presentation/commands/confluence/
|
|
161
|
+
├── jira-sync.ts # Entry Point → src/presentation/commands/jira/
|
|
162
|
+
├── workflow-orchestrator.ts # Entry Point → src/presentation/commands/workflow/
|
|
163
|
+
└── ...
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**改善点**:
|
|
167
|
+
- ✅ プロダクションコードが`src/`に明確に分離
|
|
168
|
+
- ✅ 4層構造で責務が明確(Domain/Application/Infrastructure/Presentation)
|
|
169
|
+
- ✅ ビルド・開発ツールは`scripts/`に残る(ハイブリッドアプローチ)
|
|
170
|
+
- ✅ 依存関係ルールが明確(内側→外側の一方向のみ)
|
|
171
|
+
|
|
172
|
+
## ハイブリッドアプローチ: src/ + scripts/
|
|
173
|
+
|
|
174
|
+
Michiは**ハイブリッドアプローチ**を採用しています:
|
|
175
|
+
|
|
176
|
+
### src/ - プロダクションコード(4層構造)
|
|
177
|
+
|
|
178
|
+
**対象**: CLIツール本体の実装
|
|
179
|
+
|
|
180
|
+
**適用ルール**:
|
|
181
|
+
- ✅ オニオンアーキテクチャの4層構造を適用
|
|
182
|
+
- ✅ 依存関係ルール(内側→外側の一方向)
|
|
183
|
+
- ✅ TypeScriptパスエイリアス(`@domain/*`, `@application/*`, etc.)
|
|
184
|
+
- ✅ ts-archによる自動アーキテクチャ検証
|
|
185
|
+
|
|
186
|
+
**例**:
|
|
187
|
+
```typescript
|
|
188
|
+
// src/presentation/commands/spec/init-handler.ts
|
|
189
|
+
import { InitSpecUseCase } from '@application/use-cases/init-spec';
|
|
190
|
+
import { FileSystemSpecRepository } from '@infrastructure/repositories/file-system-spec-repository';
|
|
191
|
+
|
|
192
|
+
export class InitHandler {
|
|
193
|
+
async execute(featureName: string, description: string): Promise<void> {
|
|
194
|
+
const repo = new FileSystemSpecRepository();
|
|
195
|
+
const useCase = new InitSpecUseCase(repo);
|
|
196
|
+
await useCase.execute(featureName, description);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### scripts/ - ビルド・開発ツール(層なし)
|
|
202
|
+
|
|
203
|
+
**対象**: ビルドツール、開発支援ツール、ワークフロー自動化
|
|
204
|
+
|
|
205
|
+
**適用ルール**:
|
|
206
|
+
- ❌ オニオンアーキテクチャの層構造は**適用しない**
|
|
207
|
+
- ✅ シンプルなディレクトリ分類(`build/`, `dev-tools/`, `utils/`)
|
|
208
|
+
- ✅ Entry Point方式(実装本体は`src/`に配置し、`scripts/`はラッパーのみ)
|
|
209
|
+
|
|
210
|
+
**例**:
|
|
211
|
+
```typescript
|
|
212
|
+
// scripts/confluence-sync.ts - Entry Point
|
|
213
|
+
import { ConfluenceSyncHandler } from '../src/presentation/commands/confluence/confluence-sync-handler.js';
|
|
214
|
+
|
|
215
|
+
async function main() {
|
|
216
|
+
const handler = new ConfluenceSyncHandler();
|
|
217
|
+
await handler.execute(process.argv.slice(2));
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
main();
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### 判断基準
|
|
224
|
+
|
|
225
|
+
**scripts/に配置すべきもの**:
|
|
226
|
+
- ✅ ビルドスクリプト(`copy-static-assets.js`, `set-permissions.js`)
|
|
227
|
+
- ✅ 開発ツール(`test-interactive.ts`, `mermaid-converter.ts`)
|
|
228
|
+
- ✅ Entry Point(`confluence-sync.ts`, `jira-sync.ts`)
|
|
229
|
+
- ✅ npm scriptsから直接実行されるツール
|
|
230
|
+
|
|
231
|
+
**src/に配置すべきもの**:
|
|
232
|
+
- ✅ ビジネスロジック(バリデーション、エンティティ、値オブジェクト)
|
|
233
|
+
- ✅ ユースケース(`InitSpecUseCase`, `GenerateRequirementsUseCase`)
|
|
234
|
+
- ✅ 外部API統合(`ConfluenceClient`, `JiraClient`)
|
|
235
|
+
- ✅ コマンドハンドラー(`InitHandler`, `RequirementsHandler`)
|
|
236
|
+
- ✅ 再利用可能な共通コード
|
|
237
|
+
|
|
238
|
+
## ファイル移動マッピング
|
|
239
|
+
|
|
240
|
+
### Domain Layer(ビジネスロジック)
|
|
241
|
+
|
|
242
|
+
| Before (scripts/) | After (src/domain/) | 説明 |
|
|
243
|
+
|------------------|---------------------|------|
|
|
244
|
+
| `utils/feature-name-validator.ts` | `domain/services/spec-validator.ts` | 仕様検証ロジック |
|
|
245
|
+
| `utils/phase-constants.ts` | `domain/constants/phases.ts` | フェーズ定数 |
|
|
246
|
+
| `utils/template-validator.ts` | `domain/services/template-validator.ts` | テンプレート検証 |
|
|
247
|
+
| `utils/types/spec.ts` | `domain/entities/spec.ts` | 仕様エンティティ |
|
|
248
|
+
| `utils/types/feature-name.ts` | `domain/entities/feature-name.ts` | 値オブジェクト |
|
|
249
|
+
|
|
250
|
+
### Application Layer(ユースケース)
|
|
251
|
+
|
|
252
|
+
| Before (scripts/) | After (src/application/) | 説明 |
|
|
253
|
+
|------------------|--------------------------|------|
|
|
254
|
+
| `spec-init-workflow.ts` | `application/use-cases/init-spec.ts` | 仕様初期化ユースケース |
|
|
255
|
+
| `spec-requirements-generator.ts` | `application/use-cases/generate-requirements.ts` | 要件定義生成 |
|
|
256
|
+
| `spec-design-generator.ts` | `application/use-cases/generate-design.ts` | 設計書生成 |
|
|
257
|
+
| `utils/template-engine.ts` | `application/services/template-processor.ts` | テンプレート処理 |
|
|
258
|
+
| `workflow-orchestrator.ts` | `application/use-cases/orchestrate-workflow.ts` | ワークフロー調整 |
|
|
259
|
+
| `phase-runner.ts` | `application/use-cases/run-phase.ts` | フェーズ実行 |
|
|
260
|
+
| `spec-impl-workflow.ts` | `application/use-cases/implement-spec.ts` | 実装ワークフロー |
|
|
261
|
+
|
|
262
|
+
### Infrastructure Layer(外部サービス)
|
|
263
|
+
|
|
264
|
+
| Before (scripts/) | After (src/infrastructure/) | 説明 |
|
|
265
|
+
|------------------|----------------------------|------|
|
|
266
|
+
| `utils/confluence-api.ts` | `infrastructure/external-apis/confluence/confluence-client.ts` | Confluence統合 |
|
|
267
|
+
| `utils/jira-api.ts` | `infrastructure/external-apis/jira/jira-client.ts` | JIRA統合 |
|
|
268
|
+
| `utils/github-api.ts` | `infrastructure/external-apis/github/github-client.ts` | GitHub統合 |
|
|
269
|
+
| `github-actions-client.ts` | `infrastructure/external-apis/github/github-actions-client.ts` | GitHub Actions |
|
|
270
|
+
| `utils/spec-file-system.ts` | `infrastructure/repositories/file-system-spec-repository.ts` | ファイルシステム |
|
|
271
|
+
| `utils/config-loader.ts` | `infrastructure/config/config-loader.ts` | 設定読み込み |
|
|
272
|
+
| `utils/safe-file-reader.ts` | `infrastructure/file-system/safe-file-reader.ts` | ファイル読み込み |
|
|
273
|
+
| `utils/markdown-parser.ts` | `infrastructure/parsers/markdown-parser.ts` | Markdown解析 |
|
|
274
|
+
| `utils/confluence-parser.ts` | `infrastructure/external-apis/confluence/confluence-parser.ts` | Confluence解析 |
|
|
275
|
+
|
|
276
|
+
### Presentation Layer(CLI)
|
|
277
|
+
|
|
278
|
+
| Before (scripts/) | After (src/presentation/) | 説明 |
|
|
279
|
+
|------------------|--------------------------|------|
|
|
280
|
+
| `confluence-sync.ts` | `presentation/commands/confluence/confluence-sync-handler.ts` | Confluence同期 |
|
|
281
|
+
| `jira-sync.ts` | `presentation/commands/jira/jira-sync-handler.ts` | JIRA同期 |
|
|
282
|
+
| `workflow-orchestrator.ts` | `presentation/commands/workflow/workflow-orchestrator-handler.ts` | ワークフロー |
|
|
283
|
+
| `utils/console-formatter.ts` | `presentation/formatters/console-formatter.ts` | コンソール出力 |
|
|
284
|
+
| `utils/progress-reporter.ts` | `presentation/formatters/progress-reporter.ts` | 進捗表示 |
|
|
285
|
+
| `utils/interactive-prompt.ts` | `presentation/ui/interactive-prompt.ts` | 対話型UI |
|
|
286
|
+
|
|
287
|
+
### Shared Layer(共通)
|
|
288
|
+
|
|
289
|
+
| Before (scripts/) | After (src/shared/) | 説明 |
|
|
290
|
+
|------------------|---------------------|------|
|
|
291
|
+
| `utils/logger.ts` | `shared/utils/logger.ts` | ロガー |
|
|
292
|
+
| `utils/error-handler.ts` | `shared/utils/error-handler.ts` | エラーハンドリング |
|
|
293
|
+
| `utils/types/common.ts` | `shared/types/common.ts` | 共通型定義 |
|
|
294
|
+
| `utils/types/validation.ts` | `shared/types/validation.ts` | バリデーション型 |
|
|
295
|
+
|
|
296
|
+
### scripts/に残るファイル(ビルド・開発ツール)
|
|
297
|
+
|
|
298
|
+
| ファイルパス | 分類 | 説明 |
|
|
299
|
+
|-------------|------|------|
|
|
300
|
+
| `scripts/build/copy-static-assets.js` | ビルドツール | 静的ファイルコピー |
|
|
301
|
+
| `scripts/build/set-permissions.js` | ビルドツール | 実行権限設定 |
|
|
302
|
+
| `scripts/dev-tools/test-interactive.ts` | 開発ツール | 対話型テスト |
|
|
303
|
+
| `scripts/dev-tools/mermaid-converter.ts` | 開発ツール | Mermaid図変換 |
|
|
304
|
+
| `scripts/utils/env-loader.js` | スクリプト共通 | 環境変数読み込み |
|
|
305
|
+
| `scripts/config-global.ts` | 開発ツール | グローバル設定 |
|
|
306
|
+
| `scripts/pre-flight-check.ts` | 開発ツール | 環境チェック |
|
|
307
|
+
| `scripts/validate-phase.ts` | 開発ツール | フェーズ検証 |
|
|
308
|
+
| `scripts/confluence-sync.ts` | Entry Point | Confluence同期(ラッパー) |
|
|
309
|
+
| `scripts/jira-sync.ts` | Entry Point | JIRA同期(ラッパー) |
|
|
310
|
+
| `scripts/workflow-orchestrator.ts` | Entry Point | ワークフロー(ラッパー) |
|
|
311
|
+
|
|
312
|
+
### 削除されたファイル(未使用・重複)
|
|
313
|
+
|
|
314
|
+
| ファイルパス | 理由 |
|
|
315
|
+
|-------------|------|
|
|
316
|
+
| `scripts/setup-existing.ts` | 非推奨コマンド |
|
|
317
|
+
| `scripts/utils/resource-dashboard.ts` | 完全未使用 |
|
|
318
|
+
| `scripts/utils/test-spec-generator.ts` | 完全未使用 |
|
|
319
|
+
| `scripts/utils/template-finder.ts` | 完全未使用 |
|
|
320
|
+
| `scripts/utils/test-new-features.ts` | 完全未使用 |
|
|
321
|
+
| `scripts/utils/project-finder.ts` | ProjectAnalyzerに統合 |
|
|
322
|
+
| `scripts/utils/project-detector.ts` | ProjectAnalyzerに統合 |
|
|
323
|
+
| `scripts/utils/language-detector.ts` | ProjectAnalyzerに統合 |
|
|
324
|
+
|
|
325
|
+
**削減コード量**: 約1,600行
|
|
326
|
+
|
|
327
|
+
## 移行の影響
|
|
328
|
+
|
|
329
|
+
### 1. インポートパスの変更
|
|
330
|
+
|
|
331
|
+
**Before**:
|
|
332
|
+
```typescript
|
|
333
|
+
import { ConfluenceAPI } from './utils/confluence-api';
|
|
334
|
+
import { SpecValidator } from './utils/feature-name-validator';
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**After**:
|
|
338
|
+
```typescript
|
|
339
|
+
import { ConfluenceClient } from '@infrastructure/external-apis/confluence/confluence-client';
|
|
340
|
+
import { SpecValidator } from '@domain/services/spec-validator';
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### 2. 依存性注入(DI)の導入
|
|
344
|
+
|
|
345
|
+
**Before**: 直接インスタンス化
|
|
346
|
+
```typescript
|
|
347
|
+
export class WorkflowOrchestrator {
|
|
348
|
+
async run() {
|
|
349
|
+
const confluenceAPI = new ConfluenceAPI();
|
|
350
|
+
await confluenceAPI.sync();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
**After**: インターフェースを介した注入
|
|
356
|
+
```typescript
|
|
357
|
+
export class OrchestrateWorkflowUseCase {
|
|
358
|
+
constructor(private confluenceAPI: IConfluenceAPI) {}
|
|
359
|
+
|
|
360
|
+
async execute(): Promise<void> {
|
|
361
|
+
await this.confluenceAPI.sync();
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### 3. テスト戦略の変更
|
|
367
|
+
|
|
368
|
+
**Before**: 統合テストのみ
|
|
369
|
+
```typescript
|
|
370
|
+
describe('WorkflowOrchestrator', () => {
|
|
371
|
+
it('should sync to Confluence', async () => {
|
|
372
|
+
// 実際のConfluence APIを呼び出す必要がある
|
|
373
|
+
const orchestrator = new WorkflowOrchestrator();
|
|
374
|
+
await orchestrator.run();
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**After**: 単体テスト + モック
|
|
380
|
+
```typescript
|
|
381
|
+
describe('OrchestrateWorkflowUseCase', () => {
|
|
382
|
+
it('should sync to Confluence', async () => {
|
|
383
|
+
// モックで単体テスト可能
|
|
384
|
+
const mockConfluenceAPI: IConfluenceAPI = {
|
|
385
|
+
sync: vi.fn().mockResolvedValue(undefined),
|
|
386
|
+
};
|
|
387
|
+
const useCase = new OrchestrateWorkflowUseCase(mockConfluenceAPI);
|
|
388
|
+
await useCase.execute();
|
|
389
|
+
expect(mockConfluenceAPI.sync).toHaveBeenCalled();
|
|
390
|
+
});
|
|
391
|
+
});
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### 4. package.jsonスクリプトの変更
|
|
395
|
+
|
|
396
|
+
**Before**:
|
|
397
|
+
```json
|
|
398
|
+
{
|
|
399
|
+
"scripts": {
|
|
400
|
+
"confluence:sync": "tsx scripts/utils/confluence-api.ts"
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
**After**:
|
|
406
|
+
```json
|
|
407
|
+
{
|
|
408
|
+
"scripts": {
|
|
409
|
+
"confluence:sync": "tsx scripts/confluence-sync.ts"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
**変更点**: 実装が`src/`に移動し、`scripts/`はEntry Pointのみ
|
|
415
|
+
|
|
416
|
+
### 5. tsconfig.jsonの更新
|
|
417
|
+
|
|
418
|
+
**追加されたパスエイリアス**:
|
|
419
|
+
```json
|
|
420
|
+
{
|
|
421
|
+
"compilerOptions": {
|
|
422
|
+
"paths": {
|
|
423
|
+
"@domain/*": ["./src/domain/*"],
|
|
424
|
+
"@application/*": ["./src/application/*"],
|
|
425
|
+
"@infrastructure/*": ["./src/infrastructure/*"],
|
|
426
|
+
"@presentation/*": ["./src/presentation/*"],
|
|
427
|
+
"@shared/*": ["./src/shared/*"]
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
## 開発者向けガイドライン
|
|
434
|
+
|
|
435
|
+
### 新しいファイルを作成する場合
|
|
436
|
+
|
|
437
|
+
1. **ビルド・開発ツールか?** → `scripts/build/` or `scripts/dev-tools/`
|
|
438
|
+
2. **プロダクションコードか?** → 以下の判断フローに従う:
|
|
439
|
+
- **ユーザーと直接やり取り** → `src/presentation/`
|
|
440
|
+
- **外部サービスと統合** → `src/infrastructure/`
|
|
441
|
+
- **ビジネスロジック調整** → `src/application/`
|
|
442
|
+
- **コアビジネスルール** → `src/domain/`
|
|
443
|
+
- **共通ユーティリティ** → `src/shared/`
|
|
444
|
+
|
|
445
|
+
詳細は [アーキテクチャガイド](architecture.md) を参照してください。
|
|
446
|
+
|
|
447
|
+
### 既存コードの修正
|
|
448
|
+
|
|
449
|
+
**原則**: ファイルの配置場所に応じて、適切なルールに従う
|
|
450
|
+
|
|
451
|
+
| 配置場所 | 適用ルール |
|
|
452
|
+
|---------|-----------|
|
|
453
|
+
| `src/domain/` | 外部ライブラリ禁止、`shared/`のみ依存可 |
|
|
454
|
+
| `src/application/` | `domain/`, `shared/`のみ依存可 |
|
|
455
|
+
| `src/infrastructure/` | インターフェースに依存、実装は具体的 |
|
|
456
|
+
| `src/presentation/` | すべての層に依存可 |
|
|
457
|
+
| `scripts/` | オニオンアーキテクチャルールなし |
|
|
458
|
+
|
|
459
|
+
### アーキテクチャ検証
|
|
460
|
+
|
|
461
|
+
**自動テスト**: `npm run test:arch`
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
npm run test:arch
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
**検証内容** (13テスト):
|
|
468
|
+
- ✅ Domain層は外部ライブラリに依存しない
|
|
469
|
+
- ✅ Application層はDomain層のみに依存
|
|
470
|
+
- ✅ Infrastructure層はインターフェースに依存
|
|
471
|
+
- ✅ Presentation層はすべての層に依存可
|
|
472
|
+
- ✅ 循環依存の検出
|
|
473
|
+
|
|
474
|
+
### トラブルシューティング
|
|
475
|
+
|
|
476
|
+
#### インポートエラー
|
|
477
|
+
|
|
478
|
+
**エラー**: `Cannot find module '@domain/...'`
|
|
479
|
+
|
|
480
|
+
**解決策**:
|
|
481
|
+
```bash
|
|
482
|
+
# TypeScriptコンパイル
|
|
483
|
+
npm run build
|
|
484
|
+
|
|
485
|
+
# または開発モード
|
|
486
|
+
npm run michi
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
#### アーキテクチャ違反
|
|
490
|
+
|
|
491
|
+
**エラー**: `Architecture violation: Domain layer cannot depend on ...`
|
|
492
|
+
|
|
493
|
+
**解決策**:
|
|
494
|
+
1. 依存関係を確認
|
|
495
|
+
2. 適切な層に移動
|
|
496
|
+
3. インターフェースを介した疎結合に変更
|
|
497
|
+
|
|
498
|
+
詳細は [アーキテクチャガイド - トラブルシューティング](architecture.md#トラブルシューティング) を参照してください。
|
|
499
|
+
|
|
500
|
+
## 関連ドキュメント
|
|
501
|
+
|
|
502
|
+
- [アーキテクチャガイド](architecture.md) - 4層構造の詳細説明
|
|
503
|
+
- [プロジェクト構成](.kiro/steering/structure.md) - 全体構成
|
|
504
|
+
- [開発ワークフロー](.kiro/steering/workflow.md) - 開発フロー
|
|
505
|
+
|
|
506
|
+
## バージョン履歴
|
|
507
|
+
|
|
508
|
+
- **v0.18.x**: Phase 7完了 - ドキュメント整備、最終調整
|
|
509
|
+
- **v0.17.x**: Phase 6完了 - Presentation層リファクタリング
|
|
510
|
+
- **v0.16.x**: Phase 5完了 - scripts/分離とEntry Point化
|
|
511
|
+
- **v0.15.x**: Phase 4完了 - Application層構築
|
|
512
|
+
- **v0.14.x**: Phase 3完了 - Infrastructure層リファクタリング
|
|
513
|
+
- **v0.13.x**: Phase 1-2完了 - Domain層構築とts-arch導入
|