phasegate 0.159.0 → 0.160.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 +6 -0
- package/docs/guide/cli-reference.md +1 -1
- package/docs/guide/configuration.md +35 -0
- package/package.json +1 -1
- package/scripts/harness/config-foundation/domain/harness-config.ts +11 -0
- package/scripts/harness/config-foundation/infrastructure/schemas/harness-config-v2.schema.json +49 -0
- package/scripts/harness/config-foundation/infrastructure/schemas/harness-config-v3.schema.json +49 -0
- package/scripts/harness/main.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.160.0] - 2026-05-13
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **WI-170 — phase2 initial-creation expiration public contract** — documents `p2:check-initial-creation` as a public compatibility command and adds schema/type support for `phase2Extensions.initialCreationExpirationRules` in v2 and v3 config documents.
|
|
15
|
+
|
|
10
16
|
## [0.159.0] - 2026-05-13
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -415,7 +415,7 @@ ISSUE-005 P3-10 で明確化された境界:
|
|
|
415
415
|
| `p2:check-freshness` | `--pattern <glob>` `--dry-run` `--format text\|json` | Compatibility entry point for L4-004 doc freshness; canonical L4 execution is `validate --layer L4` |
|
|
416
416
|
| `p2:validate-pointers` | `--include-urls` `--format text\|json` | Compatibility entry point for L4-005 pointer validation; canonical L4 execution is `validate --layer L4` |
|
|
417
417
|
| `p2:generate-e2e-template` | `--phase <phase>` `--output <path>` | Generate E2E test template |
|
|
418
|
-
| `p2:check-initial-creation` | `--pattern <glob>` `--format text\|json` |
|
|
418
|
+
| `p2:check-initial-creation` | `--pattern <glob>` `--format text\|json` | Public compatibility detector for long-lived `initial_creation: true` docs; configured by `phase2Extensions.initialCreationExpirationRules`. |
|
|
419
419
|
|
|
420
420
|
### `phasegate:generate-matrix`
|
|
421
421
|
|
|
@@ -75,6 +75,18 @@ The plan identifies target fields, managed artifacts, commands, validation, risk
|
|
|
75
75
|
"baseline": {
|
|
76
76
|
"enabled": true,
|
|
77
77
|
"path": ".phasegate/baseline.json"
|
|
78
|
+
},
|
|
79
|
+
"phase2Extensions": {
|
|
80
|
+
"initialCreationExpirationRules": [
|
|
81
|
+
{
|
|
82
|
+
"ruleId": "stale-initial-creation",
|
|
83
|
+
"documentPattern": "docs/**/*.md",
|
|
84
|
+
"daysThreshold": 90,
|
|
85
|
+
"commitCountThreshold": 5,
|
|
86
|
+
"evaluationMode": "or",
|
|
87
|
+
"enabled": true
|
|
88
|
+
}
|
|
89
|
+
]
|
|
78
90
|
}
|
|
79
91
|
}
|
|
80
92
|
```
|
|
@@ -179,6 +191,29 @@ Example for Python and TypeScript:
|
|
|
179
191
|
|
|
180
192
|
The metadata validators read `@unit` and `@layer` with language-agnostic regular expressions, so Python `# @unit api` and Go `// @unit api` style comments are both valid as long as the file extension is included here.
|
|
181
193
|
|
|
194
|
+
#### `phase2Extensions`
|
|
195
|
+
|
|
196
|
+
<!-- @work-item-id WI-170 -->
|
|
197
|
+
|
|
198
|
+
`phase2Extensions.initialCreationExpirationRules` is a public compatibility contract for `phasegate p2:check-initial-creation`. The command detects documents that still carry `traceability.initial_creation: true` after they have aged past configured thresholds. Regular scheduled drift checks should still run through `phasegate validate --layer L4`.
|
|
199
|
+
|
|
200
|
+
| Sub-field | Type | Default | Description |
|
|
201
|
+
|-----------|------|---------|-------------|
|
|
202
|
+
| `initialCreationExpirationRules` | `array` | built-in `90 days / 5 commits / or` rule | Rules used by `p2:check-initial-creation`. Omit to use the built-in rule. |
|
|
203
|
+
|
|
204
|
+
Rule fields:
|
|
205
|
+
|
|
206
|
+
| Field | Type | Description |
|
|
207
|
+
|-------|------|-------------|
|
|
208
|
+
| `ruleId` | `string` | Stable identifier shown in diagnostics. |
|
|
209
|
+
| `documentPattern` | `string` | Glob for candidate Markdown documents. |
|
|
210
|
+
| `daysThreshold` | `number` | Non-negative age threshold in days. |
|
|
211
|
+
| `commitCountThreshold` | `number` | Non-negative threshold for the number of commits touching the document. |
|
|
212
|
+
| `evaluationMode` | `"or"` \| `"and"` | `"or"` reports when either threshold is met; `"and"` requires both. |
|
|
213
|
+
| `enabled` | `boolean` | Optional. Defaults to `true`. |
|
|
214
|
+
|
|
215
|
+
Keep `initial_creation: true` only while a document is genuinely new and still being filled. Remove it once the expected initial content exists; otherwise this compatibility command reports the document after the configured age or commit-count threshold.
|
|
216
|
+
|
|
182
217
|
##### Phase Dependency Presets
|
|
183
218
|
|
|
184
219
|
| Preset | Phase 3 Gates | storyReflection default | Use Case |
|
package/package.json
CHANGED
|
@@ -54,6 +54,7 @@ export interface HarnessConfigSourceDocument {
|
|
|
54
54
|
ci?: HarnessConfigResolvedDocument['ci'];
|
|
55
55
|
validate?: HarnessConfigResolvedDocument['validate'];
|
|
56
56
|
preCommit?: Partial<HarnessConfigResolvedDocument['preCommit']>;
|
|
57
|
+
phase2Extensions?: HarnessConfigResolvedDocument['phase2Extensions'];
|
|
57
58
|
architecture?: ArchitectureConfigSource;
|
|
58
59
|
}
|
|
59
60
|
|
|
@@ -122,6 +123,16 @@ export interface HarnessConfigResolvedDocument {
|
|
|
122
123
|
preCommit?: {
|
|
123
124
|
implementationExtensions: string[];
|
|
124
125
|
};
|
|
126
|
+
phase2Extensions?: {
|
|
127
|
+
initialCreationExpirationRules?: Array<{
|
|
128
|
+
ruleId: string;
|
|
129
|
+
documentPattern: string;
|
|
130
|
+
daysThreshold: number;
|
|
131
|
+
commitCountThreshold: number;
|
|
132
|
+
evaluationMode: 'or' | 'and';
|
|
133
|
+
enabled?: boolean;
|
|
134
|
+
}>;
|
|
135
|
+
};
|
|
125
136
|
architecture?: ArchitectureConfigDocument;
|
|
126
137
|
}
|
|
127
138
|
|
package/scripts/harness/config-foundation/infrastructure/schemas/harness-config-v2.schema.json
CHANGED
|
@@ -498,6 +498,55 @@
|
|
|
498
498
|
"minLength": 1
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
+
},
|
|
502
|
+
"phase2Extensions": {
|
|
503
|
+
"type": "object",
|
|
504
|
+
"additionalProperties": false,
|
|
505
|
+
"properties": {
|
|
506
|
+
"initialCreationExpirationRules": {
|
|
507
|
+
"type": "array",
|
|
508
|
+
"items": {
|
|
509
|
+
"type": "object",
|
|
510
|
+
"additionalProperties": false,
|
|
511
|
+
"required": [
|
|
512
|
+
"ruleId",
|
|
513
|
+
"documentPattern",
|
|
514
|
+
"daysThreshold",
|
|
515
|
+
"commitCountThreshold",
|
|
516
|
+
"evaluationMode"
|
|
517
|
+
],
|
|
518
|
+
"properties": {
|
|
519
|
+
"ruleId": {
|
|
520
|
+
"type": "string",
|
|
521
|
+
"minLength": 1
|
|
522
|
+
},
|
|
523
|
+
"documentPattern": {
|
|
524
|
+
"type": "string",
|
|
525
|
+
"minLength": 1
|
|
526
|
+
},
|
|
527
|
+
"daysThreshold": {
|
|
528
|
+
"type": "number",
|
|
529
|
+
"minimum": 0
|
|
530
|
+
},
|
|
531
|
+
"commitCountThreshold": {
|
|
532
|
+
"type": "number",
|
|
533
|
+
"minimum": 0
|
|
534
|
+
},
|
|
535
|
+
"evaluationMode": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"enum": [
|
|
538
|
+
"or",
|
|
539
|
+
"and"
|
|
540
|
+
]
|
|
541
|
+
},
|
|
542
|
+
"enabled": {
|
|
543
|
+
"type": "boolean"
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
"uniqueItems": true
|
|
548
|
+
}
|
|
549
|
+
}
|
|
501
550
|
}
|
|
502
551
|
}
|
|
503
552
|
}
|
package/scripts/harness/config-foundation/infrastructure/schemas/harness-config-v3.schema.json
CHANGED
|
@@ -619,6 +619,55 @@
|
|
|
619
619
|
"then": { "required": ["preset", "layers", "allowedDependencies"] }
|
|
620
620
|
}
|
|
621
621
|
]
|
|
622
|
+
},
|
|
623
|
+
"phase2Extensions": {
|
|
624
|
+
"type": "object",
|
|
625
|
+
"additionalProperties": false,
|
|
626
|
+
"properties": {
|
|
627
|
+
"initialCreationExpirationRules": {
|
|
628
|
+
"type": "array",
|
|
629
|
+
"items": {
|
|
630
|
+
"type": "object",
|
|
631
|
+
"additionalProperties": false,
|
|
632
|
+
"required": [
|
|
633
|
+
"ruleId",
|
|
634
|
+
"documentPattern",
|
|
635
|
+
"daysThreshold",
|
|
636
|
+
"commitCountThreshold",
|
|
637
|
+
"evaluationMode"
|
|
638
|
+
],
|
|
639
|
+
"properties": {
|
|
640
|
+
"ruleId": {
|
|
641
|
+
"type": "string",
|
|
642
|
+
"minLength": 1
|
|
643
|
+
},
|
|
644
|
+
"documentPattern": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"minLength": 1
|
|
647
|
+
},
|
|
648
|
+
"daysThreshold": {
|
|
649
|
+
"type": "number",
|
|
650
|
+
"minimum": 0
|
|
651
|
+
},
|
|
652
|
+
"commitCountThreshold": {
|
|
653
|
+
"type": "number",
|
|
654
|
+
"minimum": 0
|
|
655
|
+
},
|
|
656
|
+
"evaluationMode": {
|
|
657
|
+
"type": "string",
|
|
658
|
+
"enum": [
|
|
659
|
+
"or",
|
|
660
|
+
"and"
|
|
661
|
+
]
|
|
662
|
+
},
|
|
663
|
+
"enabled": {
|
|
664
|
+
"type": "boolean"
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
"uniqueItems": true
|
|
669
|
+
}
|
|
670
|
+
}
|
|
622
671
|
}
|
|
623
672
|
}
|
|
624
673
|
}
|
package/scripts/harness/main.ts
CHANGED
|
@@ -221,7 +221,7 @@ Commands:
|
|
|
221
221
|
p2:check-freshness Check doc freshness (--pattern <glob>, --dry-run, --format text|json)
|
|
222
222
|
p2:validate-pointers Validate doc pointers (--include-urls, --format text|json)
|
|
223
223
|
p2:generate-e2e-template Generate E2E test template (--phase <phase>, --output <path>)
|
|
224
|
-
p2:check-initial-creation
|
|
224
|
+
p2:check-initial-creation Public compatibility detector for long-lived initial_creation:true docs (--pattern <glob>, --format text|json)
|
|
225
225
|
hook <pre-tool-use|post-tool-use|stop|session-start|user-prompt-submit> Run agent hook (reads JSON from stdin; writes JSON to stdout for session-start/user-prompt-submit)
|
|
226
226
|
pre-commit Run L2 pre-commit validators on staged files
|
|
227
227
|
commit-msg <message-file> Validate commit message trailers against staged files
|