phasegate 0.140.0 → 0.142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.ja.md +7 -3
  3. package/README.md +8 -5
  4. package/docs/guide/cli-reference.md +1 -1
  5. package/docs/guide/layer-model.md +6 -1
  6. package/package.json +1 -1
  7. package/scripts/harness/biome-ast-engine/infrastructure/adapters/harness-error-formatter-adapter.ts +15 -1
  8. package/scripts/harness/biome-ast-engine/infrastructure/adapters/typescript-source-module-analyzer-adapter.ts +31 -1
  9. package/scripts/harness/config-foundation/application/mappers/validator-system-config-mapper.ts +1 -1
  10. package/scripts/harness/harness-api/domain/services/command-dispatch-service.ts +40 -4
  11. package/scripts/harness/harness-api/domain/services/status-derivation-service.ts +29 -11
  12. package/scripts/harness/harness-api/domain/value-objects/ci-check-result.ts +6 -4
  13. package/scripts/harness/harness-api/domain/value-objects/drift-report-summary.ts +108 -8
  14. package/scripts/harness/harness-api/domain/value-objects/layer-health.ts +25 -2
  15. package/scripts/harness/harness-api/infrastructure/adapters/validator-system-execution-adapter.ts +2 -0
  16. package/scripts/harness/integrations/pre-commit.ts +7 -4
  17. package/scripts/harness/main.ts +37 -1
  18. package/scripts/harness/phase-dependency-model/infrastructure/filesystem/file-system-story-reflection-adapter.ts +47 -1
  19. package/scripts/harness/traceability-model/application/usecases/apply-work-item-status-usecase.ts +30 -0
  20. package/scripts/harness/traceability-model/application/usecases/derive-work-item-status-usecase.ts +27 -0
  21. package/scripts/harness/traceability-model/composition-root.ts +20 -0
  22. package/scripts/harness/traceability-model/domain/ports/work-item-status-port.ts +16 -0
  23. package/scripts/harness/traceability-model/domain/services/work-item-status-derivation-service.ts +121 -0
  24. package/scripts/harness/traceability-model/domain/value-objects/work-item-status-report.ts +47 -0
  25. package/scripts/harness/traceability-model/infrastructure/gateways/file-system-work-item-status-gateway.ts +240 -0
  26. package/scripts/harness/traceability-model/presentation/cli/work-item-status-command-handler.ts +103 -0
  27. package/scripts/harness/validator-system/application/use-cases/run-l1-validators-usecase.ts +1 -44
  28. package/scripts/harness/validator-system/application/use-cases/run-l2-validators-usecase.ts +30 -0
  29. package/scripts/harness/validator-system/application/use-cases/run-l4-validators-usecase.ts +1 -1
  30. package/scripts/harness/validator-system/composition-root.ts +16 -13
  31. package/scripts/harness/validator-system/domain/services/cli-e2e-test-existence-service.ts +36 -5
  32. package/scripts/harness/validator-system/domain/value-objects/cli-e2e-test-coverage-report.ts +8 -2
  33. package/scripts/harness/validator-system/infrastructure/adapters/e2e-test-file-registry-adapter.ts +12 -3
  34. package/scripts/harness/validator-system/infrastructure/adapters/harness-config-validator-config-adapter.ts +1 -1
@@ -6,7 +6,7 @@
6
6
  * E2Eテストファイルのパス一覧を提供する。
7
7
  */
8
8
  import type { E2eTestFileRegistryPort } from '../../domain/ports/e2e-test-file-registry-port.js';
9
- import { readdir } from 'node:fs/promises';
9
+ import { readFile, readdir } from 'node:fs/promises';
10
10
  import { join } from 'node:path';
11
11
 
12
12
  export interface E2eTestFileRegistryAdapterOptions {
@@ -22,7 +22,16 @@ export class E2eTestFileRegistryAdapter implements E2eTestFileRegistryPort {
22
22
 
23
23
  async getE2eTestFiles(): Promise<readonly string[]> {
24
24
  if (!this.e2eTestRoot) return [];
25
- return this.findFiles(this.e2eTestRoot, /\.test\.ts$/);
25
+ const filePaths = await this.findFiles(this.e2eTestRoot, /\.test\.ts$/);
26
+ const contents: string[] = [];
27
+ for (const filePath of filePaths) {
28
+ try {
29
+ contents.push(`${filePath}\n${await readFile(filePath, 'utf-8')}`);
30
+ } catch {
31
+ contents.push(filePath);
32
+ }
33
+ }
34
+ return contents;
26
35
  }
27
36
 
28
37
  private async findFiles(dir: string, pattern: RegExp): Promise<string[]> {
@@ -45,4 +54,4 @@ export class E2eTestFileRegistryAdapter implements E2eTestFileRegistryPort {
45
54
  }
46
55
  }
47
56
 
48
- // @story-id H08-07
57
+ // @story-id H08-07
@@ -38,7 +38,7 @@ export class HarnessConfigValidatorConfigAdapter implements ValidatorConfigPort
38
38
  const layerData = this.config.layers?.[layer] ?? {};
39
39
 
40
40
  const defaultValidators: Record<string, string[]> = {
41
- L2: ['L2-001', 'L2-002', 'L2-003'],
41
+ L2: ['L2-001', 'L2-002', 'L2-003', 'L2-013'],
42
42
  L3: ['L3-001', 'L3-002', 'L3-003', 'L3-004'],
43
43
  L4: ['L4-001', 'L4-002', 'L4-003', 'L4-004', 'L4-005'],
44
44
  };