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.
Files changed (195) hide show
  1. package/CHANGELOG.md +47 -1
  2. package/README.md +60 -27
  3. package/dist/analysis/temporal-deadline.d.ts +59 -0
  4. package/dist/analysis/temporal-deadline.d.ts.map +1 -0
  5. package/dist/analysis/temporal-deadline.js +387 -0
  6. package/dist/analysis/temporal-deadline.js.map +1 -0
  7. package/dist/analysis/temporal-precedence.d.ts +45 -0
  8. package/dist/analysis/temporal-precedence.d.ts.map +1 -0
  9. package/dist/analysis/temporal-precedence.js +123 -0
  10. package/dist/analysis/temporal-precedence.js.map +1 -0
  11. package/dist/analysis/temporal-resource.d.ts +66 -0
  12. package/dist/analysis/temporal-resource.d.ts.map +1 -0
  13. package/dist/analysis/temporal-resource.js +292 -0
  14. package/dist/analysis/temporal-resource.js.map +1 -0
  15. package/dist/application/check.d.ts +16 -0
  16. package/dist/application/check.d.ts.map +1 -1
  17. package/dist/application/check.js +51 -0
  18. package/dist/application/check.js.map +1 -1
  19. package/dist/application/contract4.d.ts +17 -0
  20. package/dist/application/contract4.d.ts.map +1 -0
  21. package/dist/application/contract4.js +27 -0
  22. package/dist/application/contract4.js.map +1 -0
  23. package/dist/application/init.d.ts +2 -1
  24. package/dist/application/init.d.ts.map +1 -1
  25. package/dist/application/init.js +11 -2
  26. package/dist/application/init.js.map +1 -1
  27. package/dist/application/mutate.d.ts +19 -0
  28. package/dist/application/mutate.d.ts.map +1 -1
  29. package/dist/application/mutate.js +34 -16
  30. package/dist/application/mutate.js.map +1 -1
  31. package/dist/application/next.d.ts +2 -0
  32. package/dist/application/next.d.ts.map +1 -1
  33. package/dist/application/next.js +7 -1
  34. package/dist/application/next.js.map +1 -1
  35. package/dist/application/project.d.ts +3 -1
  36. package/dist/application/project.d.ts.map +1 -1
  37. package/dist/application/project.js +2 -1
  38. package/dist/application/project.js.map +1 -1
  39. package/dist/application/target-check.d.ts +34 -0
  40. package/dist/application/target-check.d.ts.map +1 -0
  41. package/dist/application/target-check.js +90 -0
  42. package/dist/application/target-check.js.map +1 -0
  43. package/dist/application/target-grammar-boundary.d.ts +22 -0
  44. package/dist/application/target-grammar-boundary.d.ts.map +1 -0
  45. package/dist/application/target-grammar-boundary.js +91 -0
  46. package/dist/application/target-grammar-boundary.js.map +1 -0
  47. package/dist/application/target-mutate.d.ts +8 -0
  48. package/dist/application/target-mutate.d.ts.map +1 -0
  49. package/dist/application/target-mutate.js +56 -0
  50. package/dist/application/target-mutate.js.map +1 -0
  51. package/dist/application/target-project.d.ts +28 -0
  52. package/dist/application/target-project.d.ts.map +1 -0
  53. package/dist/application/target-project.js +60 -0
  54. package/dist/application/target-project.js.map +1 -0
  55. package/dist/application/target-temporal-analysis.d.ts +138 -0
  56. package/dist/application/target-temporal-analysis.d.ts.map +1 -0
  57. package/dist/application/target-temporal-analysis.js +409 -0
  58. package/dist/application/target-temporal-analysis.js.map +1 -0
  59. package/dist/application/target-temporal-input.d.ts +86 -0
  60. package/dist/application/target-temporal-input.d.ts.map +1 -0
  61. package/dist/application/target-temporal-input.js +238 -0
  62. package/dist/application/target-temporal-input.js.map +1 -0
  63. package/dist/application/target-unit-migration-candidate.d.ts +60 -0
  64. package/dist/application/target-unit-migration-candidate.d.ts.map +1 -0
  65. package/dist/application/target-unit-migration-candidate.js +290 -0
  66. package/dist/application/target-unit-migration-candidate.js.map +1 -0
  67. package/dist/application/target-unit-migration-request.d.ts +35 -0
  68. package/dist/application/target-unit-migration-request.d.ts.map +1 -0
  69. package/dist/application/target-unit-migration-request.js +68 -0
  70. package/dist/application/target-unit-migration-request.js.map +1 -0
  71. package/dist/application/target-unit-migration-result.d.ts +66 -0
  72. package/dist/application/target-unit-migration-result.d.ts.map +1 -0
  73. package/dist/application/target-unit-migration-result.js +86 -0
  74. package/dist/application/target-unit-migration-result.js.map +1 -0
  75. package/dist/application/unit-migration.d.ts +13 -0
  76. package/dist/application/unit-migration.d.ts.map +1 -0
  77. package/dist/application/unit-migration.js +9 -0
  78. package/dist/application/unit-migration.js.map +1 -0
  79. package/dist/cli.js +264 -26
  80. package/dist/cli.js.map +1 -1
  81. package/dist/command/discovery.d.ts +3 -3
  82. package/dist/command/discovery.d.ts.map +1 -1
  83. package/dist/command/discovery.js +149 -22
  84. package/dist/command/discovery.js.map +1 -1
  85. package/dist/command/registry.d.ts +1 -1
  86. package/dist/command/registry.d.ts.map +1 -1
  87. package/dist/command/registry.js +14 -1
  88. package/dist/command/registry.js.map +1 -1
  89. package/dist/command/usage.js +3 -3
  90. package/dist/formatter/source-formatter.d.ts +12 -0
  91. package/dist/formatter/source-formatter.d.ts.map +1 -1
  92. package/dist/formatter/source-formatter.js +48 -6
  93. package/dist/formatter/source-formatter.js.map +1 -1
  94. package/dist/formatter/target-source-formatter.d.ts +8 -0
  95. package/dist/formatter/target-source-formatter.d.ts.map +1 -0
  96. package/dist/formatter/target-source-formatter.js +36 -0
  97. package/dist/formatter/target-source-formatter.js.map +1 -0
  98. package/dist/help/guide.d.ts +1 -1
  99. package/dist/help/guide.js +1 -1
  100. package/dist/help/registry.d.ts.map +1 -1
  101. package/dist/help/registry.js +124 -13
  102. package/dist/help/registry.js.map +1 -1
  103. package/dist/index.d.ts +9 -6
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +3 -3
  106. package/dist/index.js.map +1 -1
  107. package/dist/io/safe-write.d.ts +7 -0
  108. package/dist/io/safe-write.d.ts.map +1 -1
  109. package/dist/io/safe-write.js +19 -10
  110. package/dist/io/safe-write.js.map +1 -1
  111. package/dist/io/target-safe-write.d.ts +7 -0
  112. package/dist/io/target-safe-write.d.ts.map +1 -0
  113. package/dist/io/target-safe-write.js +33 -0
  114. package/dist/io/target-safe-write.js.map +1 -0
  115. package/dist/migration/conversion.d.ts +40 -0
  116. package/dist/migration/conversion.d.ts.map +1 -0
  117. package/dist/migration/conversion.js +106 -0
  118. package/dist/migration/conversion.js.map +1 -0
  119. package/dist/migration/grammar-boundary.d.ts +20 -0
  120. package/dist/migration/grammar-boundary.d.ts.map +1 -0
  121. package/dist/migration/grammar-boundary.js +92 -0
  122. package/dist/migration/grammar-boundary.js.map +1 -0
  123. package/dist/migration/request.d.ts +79 -0
  124. package/dist/migration/request.d.ts.map +1 -0
  125. package/dist/migration/request.js +308 -0
  126. package/dist/migration/request.js.map +1 -0
  127. package/dist/model/calendar-arithmetic.d.ts +46 -0
  128. package/dist/model/calendar-arithmetic.d.ts.map +1 -0
  129. package/dist/model/calendar-arithmetic.js +236 -0
  130. package/dist/model/calendar-arithmetic.js.map +1 -0
  131. package/dist/model/calendar.d.ts +22 -0
  132. package/dist/model/calendar.d.ts.map +1 -0
  133. package/dist/model/calendar.js +83 -0
  134. package/dist/model/calendar.js.map +1 -0
  135. package/dist/model/declaration-fields.d.ts +15 -0
  136. package/dist/model/declaration-fields.d.ts.map +1 -0
  137. package/dist/model/declaration-fields.js +54 -0
  138. package/dist/model/declaration-fields.js.map +1 -0
  139. package/dist/model/exact-duration-source.d.ts +10 -0
  140. package/dist/model/exact-duration-source.d.ts.map +1 -0
  141. package/dist/model/exact-duration-source.js +69 -0
  142. package/dist/model/exact-duration-source.js.map +1 -0
  143. package/dist/model/rational.d.ts +2 -2
  144. package/dist/model/rational.d.ts.map +1 -1
  145. package/dist/model/rational.js +3 -1
  146. package/dist/model/rational.js.map +1 -1
  147. package/dist/model/syntax.d.ts +9 -2
  148. package/dist/model/syntax.d.ts.map +1 -1
  149. package/dist/model/syntax.js +20 -4
  150. package/dist/model/syntax.js.map +1 -1
  151. package/dist/model/target-calendar.d.ts +25 -0
  152. package/dist/model/target-calendar.d.ts.map +1 -0
  153. package/dist/model/target-calendar.js +56 -0
  154. package/dist/model/target-calendar.js.map +1 -0
  155. package/dist/mutation/advance.d.ts.map +1 -1
  156. package/dist/mutation/advance.js +21 -4
  157. package/dist/mutation/advance.js.map +1 -1
  158. package/dist/mutation/milestone.d.ts +10 -1
  159. package/dist/mutation/milestone.d.ts.map +1 -1
  160. package/dist/mutation/milestone.js +77 -21
  161. package/dist/mutation/milestone.js.map +1 -1
  162. package/dist/mutation/project.d.ts +7 -1
  163. package/dist/mutation/project.d.ts.map +1 -1
  164. package/dist/mutation/project.js +18 -5
  165. package/dist/mutation/project.js.map +1 -1
  166. package/dist/mutation/target-types.d.ts +42 -0
  167. package/dist/mutation/target-types.d.ts.map +1 -0
  168. package/dist/mutation/target-types.js +2 -0
  169. package/dist/mutation/target-types.js.map +1 -0
  170. package/dist/mutation/task.d.ts +12 -1
  171. package/dist/mutation/task.d.ts.map +1 -1
  172. package/dist/mutation/task.js +108 -49
  173. package/dist/mutation/task.js.map +1 -1
  174. package/dist/mutation/types.d.ts +8 -2
  175. package/dist/mutation/types.d.ts.map +1 -1
  176. package/dist/parser/document-parser.d.ts +14 -0
  177. package/dist/parser/document-parser.d.ts.map +1 -1
  178. package/dist/parser/document-parser.js +142 -38
  179. package/dist/parser/document-parser.js.map +1 -1
  180. package/dist/recommendation/override-types.d.ts +2 -2
  181. package/dist/recommendation/override.d.ts +2 -2
  182. package/dist/recommendation/override.d.ts.map +1 -1
  183. package/dist/recommendation/override.js +49 -12
  184. package/dist/recommendation/override.js.map +1 -1
  185. package/dist/semantic/target-validator.d.ts +36 -0
  186. package/dist/semantic/target-validator.d.ts.map +1 -0
  187. package/dist/semantic/target-validator.js +87 -0
  188. package/dist/semantic/target-validator.js.map +1 -0
  189. package/dist/semantic/validator.d.ts +2 -0
  190. package/dist/semantic/validator.d.ts.map +1 -1
  191. package/dist/semantic/validator.js +50 -5
  192. package/dist/semantic/validator.js.map +1 -1
  193. package/dist/version.d.ts +1 -1
  194. package/dist/version.js +1 -1
  195. 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.2.0...HEAD
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 3 version is `0.2.0`. Beta releases may contain breaking
9
- CLI or schema changes. Version `0.2.0` requires Node.js 22 or later. The prior
10
- `0.1.0` artifact uses CLI Contract 2 and declares Node.js 24.
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 3 explicitly:
14
+ Use `npx` for an occasional invocation and select Contract 4 explicitly:
15
15
 
16
16
  ```sh
17
- npx --yes --package=perttool@0.2.0 -- perttool --version
18
- npx --yes --package=perttool@0.2.0 -- perttool document check PLAN.pert
19
- npx --yes --package=perttool@0.2.0 -- perttool dag next PLAN.pert --format json
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.2.0 -- perttool --version
26
- npm exec --yes --package=perttool@0.2.0 -- perttool document check PLAN.pert
27
- npm exec --yes --package=perttool@0.2.0 -- perttool dag analyze PLAN.pert
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.1.0` selects the prior Contract 2 interface and therefore
32
- does not accept the commands in this README.
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.2.0
41
+ npm install --global perttool@0.3.0
40
42
  perttool --version
41
43
  ```
42
44
 
43
- npm `beta` resolves to Contract 3 `0.2.0`. npm `latest` remains on Contract 2
44
- `0.1.0` unless a later, separately authorized promotion occurs.
45
- `perttool@beta` is an alternative to the exact `0.2.0` pin.
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 minimal plan has one one-day task:
52
+ readable. This temporal plan has one one-day task:
51
53
 
52
54
  ```text
53
55
  project EXAMPLE:
54
- version 1
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 == 3` and the result-specific `schema_version` before
186
- reading the rest of a result. A complete, known `Perttool.NextResult.v3`
187
- recommendation graph is the task-selection authority; do not infer authority
188
- from the text summary or from `ready` alone.
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, and `PTREC-*`
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 3](docs/specs/cli-contract-3.md)
198
- - [Migration from CLI Contract 2](docs/process/cli-contract-3-migration.md)
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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