perttool 0.2.0 → 0.3.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 +47 -1
- package/README.md +60 -27
- package/dist/analysis/temporal-deadline.d.ts +59 -0
- package/dist/analysis/temporal-deadline.d.ts.map +1 -0
- package/dist/analysis/temporal-deadline.js +387 -0
- package/dist/analysis/temporal-deadline.js.map +1 -0
- package/dist/analysis/temporal-precedence.d.ts +45 -0
- package/dist/analysis/temporal-precedence.d.ts.map +1 -0
- package/dist/analysis/temporal-precedence.js +123 -0
- package/dist/analysis/temporal-precedence.js.map +1 -0
- package/dist/analysis/temporal-resource.d.ts +66 -0
- package/dist/analysis/temporal-resource.d.ts.map +1 -0
- package/dist/analysis/temporal-resource.js +292 -0
- package/dist/analysis/temporal-resource.js.map +1 -0
- package/dist/application/check.d.ts +16 -0
- package/dist/application/check.d.ts.map +1 -1
- package/dist/application/check.js +51 -0
- package/dist/application/check.js.map +1 -1
- package/dist/application/contract4.d.ts +17 -0
- package/dist/application/contract4.d.ts.map +1 -0
- package/dist/application/contract4.js +27 -0
- package/dist/application/contract4.js.map +1 -0
- package/dist/application/init.d.ts +2 -1
- package/dist/application/init.d.ts.map +1 -1
- package/dist/application/init.js +11 -2
- package/dist/application/init.js.map +1 -1
- package/dist/application/mutate.d.ts +19 -0
- package/dist/application/mutate.d.ts.map +1 -1
- package/dist/application/mutate.js +34 -16
- package/dist/application/mutate.js.map +1 -1
- package/dist/application/next.d.ts +2 -0
- package/dist/application/next.d.ts.map +1 -1
- package/dist/application/next.js +7 -1
- package/dist/application/next.js.map +1 -1
- package/dist/application/project.d.ts +3 -1
- package/dist/application/project.d.ts.map +1 -1
- package/dist/application/project.js +2 -1
- package/dist/application/project.js.map +1 -1
- package/dist/application/target-check.d.ts +34 -0
- package/dist/application/target-check.d.ts.map +1 -0
- package/dist/application/target-check.js +90 -0
- package/dist/application/target-check.js.map +1 -0
- package/dist/application/target-grammar-boundary.d.ts +22 -0
- package/dist/application/target-grammar-boundary.d.ts.map +1 -0
- package/dist/application/target-grammar-boundary.js +91 -0
- package/dist/application/target-grammar-boundary.js.map +1 -0
- package/dist/application/target-mutate.d.ts +8 -0
- package/dist/application/target-mutate.d.ts.map +1 -0
- package/dist/application/target-mutate.js +56 -0
- package/dist/application/target-mutate.js.map +1 -0
- package/dist/application/target-project.d.ts +28 -0
- package/dist/application/target-project.d.ts.map +1 -0
- package/dist/application/target-project.js +60 -0
- package/dist/application/target-project.js.map +1 -0
- package/dist/application/target-temporal-analysis.d.ts +138 -0
- package/dist/application/target-temporal-analysis.d.ts.map +1 -0
- package/dist/application/target-temporal-analysis.js +409 -0
- package/dist/application/target-temporal-analysis.js.map +1 -0
- package/dist/application/target-temporal-input.d.ts +86 -0
- package/dist/application/target-temporal-input.d.ts.map +1 -0
- package/dist/application/target-temporal-input.js +238 -0
- package/dist/application/target-temporal-input.js.map +1 -0
- package/dist/application/target-unit-migration-candidate.d.ts +60 -0
- package/dist/application/target-unit-migration-candidate.d.ts.map +1 -0
- package/dist/application/target-unit-migration-candidate.js +290 -0
- package/dist/application/target-unit-migration-candidate.js.map +1 -0
- package/dist/application/target-unit-migration-request.d.ts +35 -0
- package/dist/application/target-unit-migration-request.d.ts.map +1 -0
- package/dist/application/target-unit-migration-request.js +68 -0
- package/dist/application/target-unit-migration-request.js.map +1 -0
- package/dist/application/target-unit-migration-result.d.ts +66 -0
- package/dist/application/target-unit-migration-result.d.ts.map +1 -0
- package/dist/application/target-unit-migration-result.js +86 -0
- package/dist/application/target-unit-migration-result.js.map +1 -0
- package/dist/application/unit-migration.d.ts +13 -0
- package/dist/application/unit-migration.d.ts.map +1 -0
- package/dist/application/unit-migration.js +9 -0
- package/dist/application/unit-migration.js.map +1 -0
- package/dist/cli.js +264 -26
- package/dist/cli.js.map +1 -1
- package/dist/command/discovery.d.ts +3 -3
- package/dist/command/discovery.d.ts.map +1 -1
- package/dist/command/discovery.js +149 -22
- package/dist/command/discovery.js.map +1 -1
- package/dist/command/registry.d.ts +1 -1
- package/dist/command/registry.d.ts.map +1 -1
- package/dist/command/registry.js +14 -1
- package/dist/command/registry.js.map +1 -1
- package/dist/command/usage.js +3 -3
- package/dist/formatter/source-formatter.d.ts +12 -0
- package/dist/formatter/source-formatter.d.ts.map +1 -1
- package/dist/formatter/source-formatter.js +48 -6
- package/dist/formatter/source-formatter.js.map +1 -1
- package/dist/formatter/target-source-formatter.d.ts +8 -0
- package/dist/formatter/target-source-formatter.d.ts.map +1 -0
- package/dist/formatter/target-source-formatter.js +36 -0
- package/dist/formatter/target-source-formatter.js.map +1 -0
- package/dist/help/guide.d.ts +1 -1
- package/dist/help/guide.js +1 -1
- package/dist/help/registry.d.ts.map +1 -1
- package/dist/help/registry.js +124 -13
- package/dist/help/registry.js.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/io/safe-write.d.ts +7 -0
- package/dist/io/safe-write.d.ts.map +1 -1
- package/dist/io/safe-write.js +19 -10
- package/dist/io/safe-write.js.map +1 -1
- package/dist/io/target-safe-write.d.ts +7 -0
- package/dist/io/target-safe-write.d.ts.map +1 -0
- package/dist/io/target-safe-write.js +33 -0
- package/dist/io/target-safe-write.js.map +1 -0
- package/dist/migration/conversion.d.ts +40 -0
- package/dist/migration/conversion.d.ts.map +1 -0
- package/dist/migration/conversion.js +106 -0
- package/dist/migration/conversion.js.map +1 -0
- package/dist/migration/grammar-boundary.d.ts +20 -0
- package/dist/migration/grammar-boundary.d.ts.map +1 -0
- package/dist/migration/grammar-boundary.js +92 -0
- package/dist/migration/grammar-boundary.js.map +1 -0
- package/dist/migration/request.d.ts +79 -0
- package/dist/migration/request.d.ts.map +1 -0
- package/dist/migration/request.js +308 -0
- package/dist/migration/request.js.map +1 -0
- package/dist/model/calendar-arithmetic.d.ts +46 -0
- package/dist/model/calendar-arithmetic.d.ts.map +1 -0
- package/dist/model/calendar-arithmetic.js +236 -0
- package/dist/model/calendar-arithmetic.js.map +1 -0
- package/dist/model/calendar.d.ts +22 -0
- package/dist/model/calendar.d.ts.map +1 -0
- package/dist/model/calendar.js +83 -0
- package/dist/model/calendar.js.map +1 -0
- package/dist/model/declaration-fields.d.ts +15 -0
- package/dist/model/declaration-fields.d.ts.map +1 -0
- package/dist/model/declaration-fields.js +54 -0
- package/dist/model/declaration-fields.js.map +1 -0
- package/dist/model/exact-duration-source.d.ts +10 -0
- package/dist/model/exact-duration-source.d.ts.map +1 -0
- package/dist/model/exact-duration-source.js +69 -0
- package/dist/model/exact-duration-source.js.map +1 -0
- package/dist/model/rational.d.ts +2 -2
- package/dist/model/rational.d.ts.map +1 -1
- package/dist/model/rational.js +3 -1
- package/dist/model/rational.js.map +1 -1
- package/dist/model/syntax.d.ts +9 -2
- package/dist/model/syntax.d.ts.map +1 -1
- package/dist/model/syntax.js +20 -4
- package/dist/model/syntax.js.map +1 -1
- package/dist/model/target-calendar.d.ts +25 -0
- package/dist/model/target-calendar.d.ts.map +1 -0
- package/dist/model/target-calendar.js +56 -0
- package/dist/model/target-calendar.js.map +1 -0
- package/dist/mutation/advance.d.ts.map +1 -1
- package/dist/mutation/advance.js +21 -4
- package/dist/mutation/advance.js.map +1 -1
- package/dist/mutation/milestone.d.ts +10 -1
- package/dist/mutation/milestone.d.ts.map +1 -1
- package/dist/mutation/milestone.js +77 -21
- package/dist/mutation/milestone.js.map +1 -1
- package/dist/mutation/project.d.ts +7 -1
- package/dist/mutation/project.d.ts.map +1 -1
- package/dist/mutation/project.js +18 -5
- package/dist/mutation/project.js.map +1 -1
- package/dist/mutation/target-types.d.ts +42 -0
- package/dist/mutation/target-types.d.ts.map +1 -0
- package/dist/mutation/target-types.js +2 -0
- package/dist/mutation/target-types.js.map +1 -0
- package/dist/mutation/task.d.ts +12 -1
- package/dist/mutation/task.d.ts.map +1 -1
- package/dist/mutation/task.js +108 -49
- package/dist/mutation/task.js.map +1 -1
- package/dist/mutation/types.d.ts +8 -2
- package/dist/mutation/types.d.ts.map +1 -1
- package/dist/parser/document-parser.d.ts +14 -0
- package/dist/parser/document-parser.d.ts.map +1 -1
- package/dist/parser/document-parser.js +142 -38
- package/dist/parser/document-parser.js.map +1 -1
- package/dist/recommendation/override-types.d.ts +2 -2
- package/dist/recommendation/override.d.ts +2 -2
- package/dist/recommendation/override.d.ts.map +1 -1
- package/dist/recommendation/override.js +49 -12
- package/dist/recommendation/override.js.map +1 -1
- package/dist/semantic/target-validator.d.ts +36 -0
- package/dist/semantic/target-validator.d.ts.map +1 -0
- package/dist/semantic/target-validator.js +87 -0
- package/dist/semantic/target-validator.js.map +1 -0
- package/dist/semantic/validator.d.ts +2 -0
- package/dist/semantic/validator.d.ts.map +1 -1
- package/dist/semantic/validator.js +50 -5
- package/dist/semantic/validator.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,51 @@ This project records its notable changes here. The format is based on [Keep a Ch
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.3.0] - 2026-07-26
|
|
8
|
+
|
|
9
|
+
Contract 4 beta release. This version atomically publishes temporal and
|
|
10
|
+
deadline-aware planning, exact unit migration, and Grammar 3. It intentionally
|
|
11
|
+
changes public result identities and extends the CLI surface while retaining
|
|
12
|
+
suffix-free `0.x.x` beta product maturity.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Added Grammar 2 project `as_of`, milestone `deadline`, and task
|
|
17
|
+
`not_before`/`deadline` fields, plus Grammar 3 exact reduced Fraction
|
|
18
|
+
Durations alongside ordinary Decimals.
|
|
19
|
+
- Added exact release-aware precedence and heuristic resource schedules,
|
|
20
|
+
deterministic calendar projection, and separate task, milestone, and
|
|
21
|
+
project deadline evidence in `Perttool.AnalysisResult.v3`.
|
|
22
|
+
- Added preview-first `project migrate-unit` with complete Duration inventory,
|
|
23
|
+
exact Point/hour/day conversion, Decimal-or-Fraction output, coordinated
|
|
24
|
+
grammar upgrades, velocity disposition, no-op/repeat behavior, qualified
|
|
25
|
+
inverse results, and digest-locked safe writes through
|
|
26
|
+
`Perttool.UnitMigrationResult.v2`.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- Activated CLI Contract 4 through one 28-command registry that drives
|
|
31
|
+
dispatch, option validation, text/JSON help, structured recovery, temporal
|
|
32
|
+
entity mutation, Guide, README, and installed-package behavior.
|
|
33
|
+
- Replaced the public check, project, analysis, and next projections with
|
|
34
|
+
their accepted Contract 4 identities. `Perttool.NextResult.v4` preserves
|
|
35
|
+
Recommendation v1 ranking and adds fail-closed temporal start authority;
|
|
36
|
+
temporal eligibility gates the recommended set without substituting the
|
|
37
|
+
heuristic scheduler's runnable set.
|
|
38
|
+
- Extended the isolated installed-package file-first workflow through Grammar
|
|
39
|
+
3 reads and writes, temporal/deadline analysis, complete NextResult v4,
|
|
40
|
+
forward/repeated/inverse exact migration, and public Core export checks.
|
|
41
|
+
- Promoted the accepted `perttool@0.2.0` Contract 3 beta to npm `latest`
|
|
42
|
+
through a separate, explicitly authorized post-acceptance dist-tag
|
|
43
|
+
operation. Contract 4 publication itself keeps `latest` at `0.2.0`.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- Preserved every Contract 3 `task set --clear` value when adding temporal
|
|
48
|
+
task fields to the Contract 4 descriptor.
|
|
49
|
+
- Preserved Recommendation set authority when its selected task differs from
|
|
50
|
+
the heuristic resource scheduler's first runnable task.
|
|
51
|
+
|
|
7
52
|
## [0.2.0] - 2026-07-25
|
|
8
53
|
|
|
9
54
|
Contract 3 beta release. This version intentionally replaces the Contract 2
|
|
@@ -96,7 +141,8 @@ First public development preview. Intended to evaluate the DSL and CLI, read-onl
|
|
|
96
141
|
- Not published to the npm registry; use the GitHub Release asset
|
|
97
142
|
- Requires Node.js 24 or later
|
|
98
143
|
|
|
99
|
-
[Unreleased]: https://github.com/mako10k/perttool/compare/v0.
|
|
144
|
+
[Unreleased]: https://github.com/mako10k/perttool/compare/v0.3.0...HEAD
|
|
145
|
+
[0.3.0]: https://github.com/mako10k/perttool/compare/v0.2.0...v0.3.0
|
|
100
146
|
[0.2.0]: https://github.com/mako10k/perttool/compare/v0.1.0...v0.2.0
|
|
101
147
|
[0.1.0]: https://github.com/mako10k/perttool/compare/v0.1.0-alpha.2...v0.1.0
|
|
102
148
|
[0.1.0-alpha.2]: https://github.com/mako10k/perttool/compare/v0.1.0-alpha.1...v0.1.0-alpha.2
|
package/README.md
CHANGED
|
@@ -5,54 +5,57 @@ It validates an Activity-on-Arrow plan, calculates precedence and
|
|
|
5
5
|
resource-constrained schedules, recommends the next task, and applies
|
|
6
6
|
source-preserving changes through preview-first commands.
|
|
7
7
|
|
|
8
|
-
The current Contract
|
|
9
|
-
CLI or schema changes. Version `0.
|
|
10
|
-
|
|
8
|
+
The current Contract 4 version is `0.3.0`. Beta releases may contain breaking
|
|
9
|
+
CLI or schema changes. Version `0.3.0` requires Node.js 22 or later. Contract 3
|
|
10
|
+
remains available by pinning `0.2.0`.
|
|
11
11
|
|
|
12
12
|
## Run without installing
|
|
13
13
|
|
|
14
|
-
Use `npx` for an occasional invocation and select Contract
|
|
14
|
+
Use `npx` for an occasional invocation and select Contract 4 explicitly:
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
|
-
npx --yes --package=perttool@0.
|
|
18
|
-
npx --yes --package=perttool@0.
|
|
19
|
-
npx --yes --package=perttool@0.
|
|
17
|
+
npx --yes --package=perttool@0.3.0 -- perttool --version
|
|
18
|
+
npx --yes --package=perttool@0.3.0 -- perttool document check PLAN.pert
|
|
19
|
+
npx --yes --package=perttool@0.3.0 -- perttool dag next PLAN.pert --format json
|
|
20
|
+
npx --yes --package=perttool@0.3.0 -- perttool project migrate-unit PLAN.pert --to-unit day --diff
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
The equivalent explicit `npm exec` form is:
|
|
23
24
|
|
|
24
25
|
```sh
|
|
25
|
-
npm exec --yes --package=perttool@0.
|
|
26
|
-
npm exec --yes --package=perttool@0.
|
|
27
|
-
npm exec --yes --package=perttool@0.
|
|
26
|
+
npm exec --yes --package=perttool@0.3.0 -- perttool --version
|
|
27
|
+
npm exec --yes --package=perttool@0.3.0 -- perttool document check PLAN.pert
|
|
28
|
+
npm exec --yes --package=perttool@0.3.0 -- perttool dag analyze PLAN.pert
|
|
29
|
+
npm exec --yes --package=perttool@0.3.0 -- perttool project migrate-unit PLAN.pert --to-unit day --diff
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
`npx` and `npm exec` may download the selected package version into the npm
|
|
31
|
-
cache. Pinning `0.
|
|
32
|
-
|
|
33
|
+
cache. Pinning `0.2.0` selects Contract 3 and therefore does not accept the
|
|
34
|
+
temporal and migration surface in this README.
|
|
33
35
|
|
|
34
36
|
## Install
|
|
35
37
|
|
|
36
38
|
Install the CLI globally when it is used regularly:
|
|
37
39
|
|
|
38
40
|
```sh
|
|
39
|
-
npm install --global perttool@0.
|
|
41
|
+
npm install --global perttool@0.3.0
|
|
40
42
|
perttool --version
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
npm `beta` resolves to Contract
|
|
44
|
-
`0.
|
|
45
|
-
|
|
45
|
+
npm `beta` resolves to Contract 4 `0.3.0`. npm `latest` remains Contract 3
|
|
46
|
+
`0.2.0`; publication does not promote it. Use `perttool@beta` as an alternative
|
|
47
|
+
to the exact `0.3.0` pin.
|
|
46
48
|
|
|
47
49
|
## Plan files
|
|
48
50
|
|
|
49
51
|
A `.pert` file is the source of truth and is intended to remain directly
|
|
50
|
-
readable. This
|
|
52
|
+
readable. This temporal plan has one one-day task:
|
|
51
53
|
|
|
52
54
|
```text
|
|
53
55
|
project EXAMPLE:
|
|
54
|
-
version
|
|
56
|
+
version 2
|
|
55
57
|
title "Example plan"
|
|
58
|
+
as_of 2026-07-26
|
|
56
59
|
duration_unit day
|
|
57
60
|
finish DONE
|
|
58
61
|
|
|
@@ -62,10 +65,13 @@ milestone NOW:
|
|
|
62
65
|
|
|
63
66
|
milestone DONE:
|
|
64
67
|
title "Done"
|
|
68
|
+
deadline 2026-07-28
|
|
65
69
|
|
|
66
70
|
task WORK NOW -> DONE:
|
|
67
71
|
title "Do the work"
|
|
68
72
|
duration 1d
|
|
73
|
+
not_before 2026-07-26
|
|
74
|
+
deadline 2026-07-27
|
|
69
75
|
```
|
|
70
76
|
|
|
71
77
|
Save it as `PLAN.pert`, then inspect it with:
|
|
@@ -80,7 +86,8 @@ perttool dag next PLAN.pert --format json
|
|
|
80
86
|
Task duration can use deterministic `day`, `hour`, or relative `point` units.
|
|
81
87
|
Point plans declare a project-wide velocity such as `20p/10d`. Analysis keeps
|
|
82
88
|
the exact point result and reports the time conversion separately as a velocity
|
|
83
|
-
forecast.
|
|
89
|
+
forecast. Grammar version 3 also accepts an exact Fraction such as `1/3d`;
|
|
90
|
+
versions 1 and 2 continue to accept Decimal duration tokens.
|
|
84
91
|
|
|
85
92
|
## Maintain a plan through the CLI
|
|
86
93
|
|
|
@@ -118,6 +125,8 @@ perttool project show PLAN.pert --format json
|
|
|
118
125
|
# Apply the reviewed change atomically.
|
|
119
126
|
perttool task set PLAN.pert WORK \
|
|
120
127
|
--status active \
|
|
128
|
+
--not-before 2026-07-26 \
|
|
129
|
+
--deadline 2026-07-27 \
|
|
121
130
|
--write \
|
|
122
131
|
--expect-digest 'sha256:...'
|
|
123
132
|
|
|
@@ -147,6 +156,27 @@ perttool batch apply PLAN.pert \
|
|
|
147
156
|
--expect-digest 'sha256:...'
|
|
148
157
|
```
|
|
149
158
|
|
|
159
|
+
Use the dedicated migration route for exact whole-document conversion between
|
|
160
|
+
Point and time units. Preview before writing; the result inventories every
|
|
161
|
+
converted field and reports grammar upgrades and reversibility:
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
perttool project migrate-unit PLAN.pert --to-unit day --diff
|
|
165
|
+
perttool project migrate-unit PLAN.pert \
|
|
166
|
+
--to-unit day \
|
|
167
|
+
--write \
|
|
168
|
+
--expect-digest 'sha256:...'
|
|
169
|
+
|
|
170
|
+
# A time-to-Point conversion requires an explicit relationship when needed.
|
|
171
|
+
perttool project migrate-unit PLAN.pert \
|
|
172
|
+
--to-unit point \
|
|
173
|
+
--replacement-velocity 20p/10d \
|
|
174
|
+
--diff
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Migration is not a `batch apply` member. Re-read and reanalyze the written
|
|
178
|
+
candidate before making a separate mutation.
|
|
179
|
+
|
|
150
180
|
## Command map
|
|
151
181
|
|
|
152
182
|
| Goal | Command |
|
|
@@ -158,6 +188,7 @@ perttool batch apply PLAN.pert \
|
|
|
158
188
|
| Initialize a project | `perttool project init ...` |
|
|
159
189
|
| Read project metadata | `perttool project show <file>` |
|
|
160
190
|
| Change project metadata | `perttool project set <file> ...` |
|
|
191
|
+
| Migrate project units exactly | `perttool project migrate-unit <file> ...` |
|
|
161
192
|
| Analyze schedules | `perttool dag analyze <file>` |
|
|
162
193
|
| Select next work | `perttool dag next <file>` |
|
|
163
194
|
| Remove completed history | `perttool dag advance <file>` |
|
|
@@ -182,20 +213,22 @@ perttool guide editing --level detail --format json
|
|
|
182
213
|
## LLM and automation use
|
|
183
214
|
|
|
184
215
|
Use `--format json` for machine consumers. Check both
|
|
185
|
-
`cli_contract_version ==
|
|
186
|
-
reading the rest of a result. A complete, known
|
|
187
|
-
|
|
188
|
-
|
|
216
|
+
`cli_contract_version == 4` and the result-specific `schema_version` before
|
|
217
|
+
reading the rest of a result. A complete, known, non-truncated
|
|
218
|
+
`Perttool.NextResult.v4` with temporal policy
|
|
219
|
+
`recommendation_v1_plus_release_gate` is required. Start only task IDs in
|
|
220
|
+
`temporal.authority.startable_recommended_task_ids`; do not infer start
|
|
221
|
+
authority from the raw recommended set, the text summary, or `ready` alone.
|
|
189
222
|
|
|
190
223
|
Mutation JSON returns the candidate text, unified diff, UTF-16 text edits,
|
|
191
224
|
source digest, updated digest, diagnostics, and write result in one envelope.
|
|
192
|
-
Unknown schema versions, incomplete recommendation traces,
|
|
193
|
-
diagnostics must fail closed.
|
|
225
|
+
Unknown schema versions, incomplete recommendation traces, `PTREC-*`
|
|
226
|
+
diagnostics, and future or unavailable temporal eligibility must fail closed.
|
|
194
227
|
|
|
195
228
|
## Documentation
|
|
196
229
|
|
|
197
|
-
- [CLI Contract
|
|
198
|
-
- [
|
|
230
|
+
- [Temporal and Unit Interface Contract (CLI Contract 4)](docs/specs/temporal-unit-interface.md)
|
|
231
|
+
- [CLI Contract 3 compatibility baseline](docs/specs/cli-contract-3.md)
|
|
199
232
|
- [DSL grammar](docs/specs/dsl-grammar.md)
|
|
200
233
|
- [Graph semantics](docs/specs/graph-semantics.md)
|
|
201
234
|
- [Analysis semantics](docs/specs/analysis.md)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { TargetCalendarDifference, TargetTemporalExactValue, TargetTemporalInputProjection } from "../application/target-temporal-input.js";
|
|
2
|
+
import { type CalendarUnavailableCause } from "../model/calendar-arithmetic.js";
|
|
3
|
+
import type { TargetCalendarValue } from "../model/target-calendar.js";
|
|
4
|
+
import type { TargetGrammar3ValidatedDocument } from "../semantic/target-validator.js";
|
|
5
|
+
import type { TemporalPrecedenceSchedule } from "./temporal-precedence.js";
|
|
6
|
+
import type { TemporalResourceSchedule } from "./temporal-resource.js";
|
|
7
|
+
export declare const DEADLINE_EVALUATION_IDENTITY: Readonly<{
|
|
8
|
+
id: "perttool.deadline-evaluation";
|
|
9
|
+
version: 1;
|
|
10
|
+
}>;
|
|
11
|
+
export type DeadlineCause = CalendarUnavailableCause | "complete_actual_time_unavailable" | "release_bound_unavailable" | "precedence_projection_unavailable" | "resource_projection_unavailable" | "margin_unit_unavailable";
|
|
12
|
+
export interface DeadlineUnavailableCause {
|
|
13
|
+
readonly cause: DeadlineCause;
|
|
14
|
+
readonly underlyingCause: string | null;
|
|
15
|
+
readonly subjectKind: "task" | "milestone" | null;
|
|
16
|
+
readonly subjectId: string | null;
|
|
17
|
+
readonly taskId: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface DeadlineCurrentState {
|
|
20
|
+
readonly state: "not_due" | "due_now" | "overdue" | "not_applicable" | "unavailable";
|
|
21
|
+
readonly signedWindow: TargetCalendarDifference | null;
|
|
22
|
+
readonly baseUnitWindow: TargetTemporalExactValue | null;
|
|
23
|
+
readonly unavailableCauses: readonly DeadlineUnavailableCause[];
|
|
24
|
+
}
|
|
25
|
+
export interface DeadlineView {
|
|
26
|
+
readonly state: "not_applicable" | "unavailable" | "available";
|
|
27
|
+
readonly projectedCompletion: TargetCalendarValue | null;
|
|
28
|
+
readonly forecastRelation: "before_deadline" | "on_deadline" | "after_deadline" | null;
|
|
29
|
+
readonly signedMargin: TargetCalendarDifference | null;
|
|
30
|
+
readonly baseUnitMargin: TargetTemporalExactValue | null;
|
|
31
|
+
readonly remainingMargin: TargetTemporalExactValue | null;
|
|
32
|
+
readonly lateness: TargetTemporalExactValue | null;
|
|
33
|
+
readonly assessment: "lower_bound_on_time" | "lower_bound_late" | "heuristic_on_time" | "heuristic_late" | null;
|
|
34
|
+
readonly optimal: boolean | null;
|
|
35
|
+
readonly conditionalOnBlocksResolved: boolean;
|
|
36
|
+
readonly blockedTaskIds: readonly string[];
|
|
37
|
+
readonly unavailableCauses: readonly DeadlineUnavailableCause[];
|
|
38
|
+
}
|
|
39
|
+
export interface DeadlineEvaluation {
|
|
40
|
+
readonly subject: {
|
|
41
|
+
readonly kind: "task" | "milestone";
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly roles: readonly ("task" | "milestone" | "project_finish")[];
|
|
44
|
+
};
|
|
45
|
+
readonly deadline: TargetCalendarValue;
|
|
46
|
+
readonly completionState: "incomplete" | "complete_actual_time_unavailable";
|
|
47
|
+
readonly current: DeadlineCurrentState;
|
|
48
|
+
readonly precedence: DeadlineView;
|
|
49
|
+
readonly resource: DeadlineView;
|
|
50
|
+
readonly combinedAssessment: "overdue" | "forecast_infeasible" | "at_risk" | "forecast_on_time" | "not_proven_late" | "not_applicable" | "unavailable";
|
|
51
|
+
readonly conditionalOnBlocksResolved: boolean;
|
|
52
|
+
readonly blockedTaskIds: readonly string[];
|
|
53
|
+
readonly destinationRelationship: {
|
|
54
|
+
readonly milestoneId: string;
|
|
55
|
+
readonly relation: "task_deadline_before_milestone" | "same_deadline" | "task_deadline_after_milestone" | "unavailable" | "deadline_absent";
|
|
56
|
+
} | null;
|
|
57
|
+
}
|
|
58
|
+
export declare function evaluateTemporalDeadlines(validated: TargetGrammar3ValidatedDocument, inputs: TargetTemporalInputProjection, precedenceSchedule: TemporalPrecedenceSchedule, resourceSchedule: TemporalResourceSchedule): readonly DeadlineEvaluation[];
|
|
59
|
+
//# sourceMappingURL=temporal-deadline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal-deadline.d.ts","sourceRoot":"","sources":["../../src/analysis/temporal-deadline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EAGxB,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAIL,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AAazC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,KAAK,EACV,+BAA+B,EAChC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,0BAA0B,EAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,wBAAwB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,4BAA4B;QACnC,8BAA8B;aACzB,CAAC;EACV,CAAC;AAEH,MAAM,MAAM,aAAa,GACrB,wBAAwB,GACxB,kCAAkC,GAClC,2BAA2B,GAC3B,mCAAmC,GACnC,iCAAiC,GACjC,yBAA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