perttool 0.1.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 (213) hide show
  1. package/CHANGELOG.md +112 -33
  2. package/README.md +206 -111
  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/analyze.js +5 -5
  16. package/dist/application/analyze.js.map +1 -1
  17. package/dist/application/check.d.ts +16 -0
  18. package/dist/application/check.d.ts.map +1 -1
  19. package/dist/application/check.js +51 -0
  20. package/dist/application/check.js.map +1 -1
  21. package/dist/application/contract4.d.ts +17 -0
  22. package/dist/application/contract4.d.ts.map +1 -0
  23. package/dist/application/contract4.js +27 -0
  24. package/dist/application/contract4.js.map +1 -0
  25. package/dist/application/init.d.ts +43 -0
  26. package/dist/application/init.d.ts.map +1 -0
  27. package/dist/application/init.js +226 -0
  28. package/dist/application/init.js.map +1 -0
  29. package/dist/application/mutate.d.ts +19 -0
  30. package/dist/application/mutate.d.ts.map +1 -1
  31. package/dist/application/mutate.js +47 -25
  32. package/dist/application/mutate.js.map +1 -1
  33. package/dist/application/next.d.ts +2 -0
  34. package/dist/application/next.d.ts.map +1 -1
  35. package/dist/application/next.js +7 -1
  36. package/dist/application/next.js.map +1 -1
  37. package/dist/application/project.d.ts +3 -1
  38. package/dist/application/project.d.ts.map +1 -1
  39. package/dist/application/project.js +2 -1
  40. package/dist/application/project.js.map +1 -1
  41. package/dist/application/target-check.d.ts +34 -0
  42. package/dist/application/target-check.d.ts.map +1 -0
  43. package/dist/application/target-check.js +90 -0
  44. package/dist/application/target-check.js.map +1 -0
  45. package/dist/application/target-grammar-boundary.d.ts +22 -0
  46. package/dist/application/target-grammar-boundary.d.ts.map +1 -0
  47. package/dist/application/target-grammar-boundary.js +91 -0
  48. package/dist/application/target-grammar-boundary.js.map +1 -0
  49. package/dist/application/target-mutate.d.ts +8 -0
  50. package/dist/application/target-mutate.d.ts.map +1 -0
  51. package/dist/application/target-mutate.js +56 -0
  52. package/dist/application/target-mutate.js.map +1 -0
  53. package/dist/application/target-project.d.ts +28 -0
  54. package/dist/application/target-project.d.ts.map +1 -0
  55. package/dist/application/target-project.js +60 -0
  56. package/dist/application/target-project.js.map +1 -0
  57. package/dist/application/target-temporal-analysis.d.ts +138 -0
  58. package/dist/application/target-temporal-analysis.d.ts.map +1 -0
  59. package/dist/application/target-temporal-analysis.js +409 -0
  60. package/dist/application/target-temporal-analysis.js.map +1 -0
  61. package/dist/application/target-temporal-input.d.ts +86 -0
  62. package/dist/application/target-temporal-input.d.ts.map +1 -0
  63. package/dist/application/target-temporal-input.js +238 -0
  64. package/dist/application/target-temporal-input.js.map +1 -0
  65. package/dist/application/target-unit-migration-candidate.d.ts +60 -0
  66. package/dist/application/target-unit-migration-candidate.d.ts.map +1 -0
  67. package/dist/application/target-unit-migration-candidate.js +290 -0
  68. package/dist/application/target-unit-migration-candidate.js.map +1 -0
  69. package/dist/application/target-unit-migration-request.d.ts +35 -0
  70. package/dist/application/target-unit-migration-request.d.ts.map +1 -0
  71. package/dist/application/target-unit-migration-request.js +68 -0
  72. package/dist/application/target-unit-migration-request.js.map +1 -0
  73. package/dist/application/target-unit-migration-result.d.ts +66 -0
  74. package/dist/application/target-unit-migration-result.d.ts.map +1 -0
  75. package/dist/application/target-unit-migration-result.js +86 -0
  76. package/dist/application/target-unit-migration-result.js.map +1 -0
  77. package/dist/application/unit-migration.d.ts +13 -0
  78. package/dist/application/unit-migration.d.ts.map +1 -0
  79. package/dist/application/unit-migration.js +9 -0
  80. package/dist/application/unit-migration.js.map +1 -0
  81. package/dist/cli.js +494 -383
  82. package/dist/cli.js.map +1 -1
  83. package/dist/command/discovery.d.ts +30 -0
  84. package/dist/command/discovery.d.ts.map +1 -0
  85. package/dist/command/discovery.js +752 -0
  86. package/dist/command/discovery.js.map +1 -0
  87. package/dist/command/registry.d.ts +84 -0
  88. package/dist/command/registry.d.ts.map +1 -0
  89. package/dist/command/registry.js +964 -0
  90. package/dist/command/registry.js.map +1 -0
  91. package/dist/command/usage.d.ts +42 -0
  92. package/dist/command/usage.d.ts.map +1 -0
  93. package/dist/command/usage.js +337 -0
  94. package/dist/command/usage.js.map +1 -0
  95. package/dist/conversion/mermaid-import.js +56 -56
  96. package/dist/conversion/mermaid-import.js.map +1 -1
  97. package/dist/conversion/mermaid.js +1 -1
  98. package/dist/conversion/mermaid.js.map +1 -1
  99. package/dist/formatter/source-formatter.d.ts +12 -0
  100. package/dist/formatter/source-formatter.d.ts.map +1 -1
  101. package/dist/formatter/source-formatter.js +48 -6
  102. package/dist/formatter/source-formatter.js.map +1 -1
  103. package/dist/formatter/target-source-formatter.d.ts +8 -0
  104. package/dist/formatter/target-source-formatter.d.ts.map +1 -0
  105. package/dist/formatter/target-source-formatter.js +36 -0
  106. package/dist/formatter/target-source-formatter.js.map +1 -0
  107. package/dist/help/guide.d.ts +12 -0
  108. package/dist/help/guide.d.ts.map +1 -0
  109. package/dist/help/guide.js +103 -0
  110. package/dist/help/guide.js.map +1 -0
  111. package/dist/help/registry.d.ts +0 -6
  112. package/dist/help/registry.d.ts.map +1 -1
  113. package/dist/help/registry.js +186 -86
  114. package/dist/help/registry.js.map +1 -1
  115. package/dist/index.d.ts +20 -7
  116. package/dist/index.d.ts.map +1 -1
  117. package/dist/index.js +8 -3
  118. package/dist/index.js.map +1 -1
  119. package/dist/io/safe-write.d.ts +7 -0
  120. package/dist/io/safe-write.d.ts.map +1 -1
  121. package/dist/io/safe-write.js +36 -27
  122. package/dist/io/safe-write.js.map +1 -1
  123. package/dist/io/target-safe-write.d.ts +7 -0
  124. package/dist/io/target-safe-write.d.ts.map +1 -0
  125. package/dist/io/target-safe-write.js +33 -0
  126. package/dist/io/target-safe-write.js.map +1 -0
  127. package/dist/migration/conversion.d.ts +40 -0
  128. package/dist/migration/conversion.d.ts.map +1 -0
  129. package/dist/migration/conversion.js +106 -0
  130. package/dist/migration/conversion.js.map +1 -0
  131. package/dist/migration/grammar-boundary.d.ts +20 -0
  132. package/dist/migration/grammar-boundary.d.ts.map +1 -0
  133. package/dist/migration/grammar-boundary.js +92 -0
  134. package/dist/migration/grammar-boundary.js.map +1 -0
  135. package/dist/migration/request.d.ts +79 -0
  136. package/dist/migration/request.d.ts.map +1 -0
  137. package/dist/migration/request.js +308 -0
  138. package/dist/migration/request.js.map +1 -0
  139. package/dist/model/calendar-arithmetic.d.ts +46 -0
  140. package/dist/model/calendar-arithmetic.d.ts.map +1 -0
  141. package/dist/model/calendar-arithmetic.js +236 -0
  142. package/dist/model/calendar-arithmetic.js.map +1 -0
  143. package/dist/model/calendar.d.ts +22 -0
  144. package/dist/model/calendar.d.ts.map +1 -0
  145. package/dist/model/calendar.js +83 -0
  146. package/dist/model/calendar.js.map +1 -0
  147. package/dist/model/declaration-fields.d.ts +15 -0
  148. package/dist/model/declaration-fields.d.ts.map +1 -0
  149. package/dist/model/declaration-fields.js +54 -0
  150. package/dist/model/declaration-fields.js.map +1 -0
  151. package/dist/model/exact-duration-source.d.ts +10 -0
  152. package/dist/model/exact-duration-source.d.ts.map +1 -0
  153. package/dist/model/exact-duration-source.js +69 -0
  154. package/dist/model/exact-duration-source.js.map +1 -0
  155. package/dist/model/rational.d.ts +2 -2
  156. package/dist/model/rational.d.ts.map +1 -1
  157. package/dist/model/rational.js +3 -1
  158. package/dist/model/rational.js.map +1 -1
  159. package/dist/model/syntax.d.ts +9 -2
  160. package/dist/model/syntax.d.ts.map +1 -1
  161. package/dist/model/syntax.js +20 -4
  162. package/dist/model/syntax.js.map +1 -1
  163. package/dist/model/target-calendar.d.ts +25 -0
  164. package/dist/model/target-calendar.d.ts.map +1 -0
  165. package/dist/model/target-calendar.js +56 -0
  166. package/dist/model/target-calendar.js.map +1 -0
  167. package/dist/mutation/advance.d.ts.map +1 -1
  168. package/dist/mutation/advance.js +21 -4
  169. package/dist/mutation/advance.js.map +1 -1
  170. package/dist/mutation/gate.d.ts +5 -0
  171. package/dist/mutation/gate.d.ts.map +1 -0
  172. package/dist/mutation/gate.js +156 -0
  173. package/dist/mutation/gate.js.map +1 -0
  174. package/dist/mutation/milestone.d.ts +10 -1
  175. package/dist/mutation/milestone.d.ts.map +1 -1
  176. package/dist/mutation/milestone.js +104 -48
  177. package/dist/mutation/milestone.js.map +1 -1
  178. package/dist/mutation/project.d.ts +7 -1
  179. package/dist/mutation/project.d.ts.map +1 -1
  180. package/dist/mutation/project.js +32 -19
  181. package/dist/mutation/project.js.map +1 -1
  182. package/dist/mutation/resource.js +22 -22
  183. package/dist/mutation/resource.js.map +1 -1
  184. package/dist/mutation/target-types.d.ts +42 -0
  185. package/dist/mutation/target-types.d.ts.map +1 -0
  186. package/dist/mutation/target-types.js +2 -0
  187. package/dist/mutation/target-types.js.map +1 -0
  188. package/dist/mutation/task.d.ts +12 -1
  189. package/dist/mutation/task.d.ts.map +1 -1
  190. package/dist/mutation/task.js +148 -89
  191. package/dist/mutation/task.js.map +1 -1
  192. package/dist/mutation/types.d.ts +34 -3
  193. package/dist/mutation/types.d.ts.map +1 -1
  194. package/dist/parser/document-parser.d.ts +14 -0
  195. package/dist/parser/document-parser.d.ts.map +1 -1
  196. package/dist/parser/document-parser.js +159 -55
  197. package/dist/parser/document-parser.js.map +1 -1
  198. package/dist/recommendation/override-types.d.ts +2 -2
  199. package/dist/recommendation/override.d.ts +2 -2
  200. package/dist/recommendation/override.d.ts.map +1 -1
  201. package/dist/recommendation/override.js +49 -12
  202. package/dist/recommendation/override.js.map +1 -1
  203. package/dist/semantic/target-validator.d.ts +36 -0
  204. package/dist/semantic/target-validator.d.ts.map +1 -0
  205. package/dist/semantic/target-validator.js +87 -0
  206. package/dist/semantic/target-validator.js.map +1 -0
  207. package/dist/semantic/validator.d.ts +2 -0
  208. package/dist/semantic/validator.d.ts.map +1 -1
  209. package/dist/semantic/validator.js +90 -45
  210. package/dist/semantic/validator.js.map +1 -1
  211. package/dist/version.d.ts +1 -1
  212. package/dist/version.js +1 -1
  213. package/package.json +3 -3
@@ -1,33 +1,20 @@
1
- const agentHelpCommand = {
2
- operation: "agent.help",
3
- summary: "Bundled offline profileからprovider別のread-only AI agent guidanceを表示します。",
4
- syntax: [
5
- "Usage: perttool agent help [<provider> [<surface>]]",
6
- " [--level index|quick|detail]",
7
- " [--format text|json]",
8
- " [--color auto|always|never]",
9
- ],
10
- };
11
- export function getAgentHelpCommandHelp() {
12
- return agentHelpCommand;
13
- }
14
1
  const nodes = [
15
2
  {
16
3
  id: "syntax",
17
4
  title: "DSL syntax",
18
- summary: "project、resource、milestone、task、gateを記述するgrammar version 1。",
5
+ summary: "Grammar versions 1, 2, and 3 for declaring project, resource, milestone, task, and gate.",
19
6
  quick: [
20
7
  {
21
8
  id: "declarations",
22
9
  title: "Declarations",
23
- body: "projectを最初に1件置き、続けてresource、milestone、task、gateを記述します。",
10
+ body: "Place exactly one project first, followed by resource, milestone, task, and gate declarations.",
24
11
  },
25
12
  ],
26
13
  detail: [
27
14
  {
28
15
  id: "indentation",
29
16
  title: "Indentation",
30
- body: "fieldは2 spaces、estimate/requiresの子fieldは4 spacesです。Tabは使用できません。",
17
+ body: "Fields use 2 spaces; child fields in estimate and requires use 4 spaces. Tabs are not allowed.",
31
18
  },
32
19
  ],
33
20
  syntax: [
@@ -52,6 +39,7 @@ const nodes = [
52
39
  "syntax.gate",
53
40
  "syntax.estimate",
54
41
  "syntax.velocity",
42
+ "syntax.temporal",
55
43
  "analysis",
56
44
  "errors",
57
45
  ],
@@ -59,19 +47,19 @@ const nodes = [
59
47
  {
60
48
  id: "syntax.project",
61
49
  title: "Project syntax",
62
- summary: "文書先頭にexactly one置くproject declarationです。",
50
+ summary: "The exactly-one project declaration at the start of a document.",
63
51
  quick: [
64
52
  {
65
53
  id: "required",
66
54
  title: "Required fields",
67
- body: "title、duration_unit、finishが必須です。Point文書では正のvelocityも必須です。",
55
+ body: "title, duration_unit, and finish are required. Point documents also require a positive velocity.",
68
56
  },
69
57
  ],
70
58
  detail: [
71
59
  {
72
60
  id: "version",
73
61
  title: "Grammar version",
74
- body: "version省略時は1として扱い、指定する場合もversion 1だけを受理します。",
62
+ body: "An omitted version is treated as 1. Version 2 adds temporal fields; version 3 additionally accepts exact Fraction Duration.",
75
63
  },
76
64
  ],
77
65
  syntax: [
@@ -83,17 +71,17 @@ const nodes = [
83
71
  examples: [
84
72
  { id: "minimal", title: "Minimal project", text: "docs/examples/minimal.pert" },
85
73
  ],
86
- related: ["syntax", "syntax.duration", "syntax.velocity", "syntax.text"],
74
+ related: ["syntax", "syntax.duration", "syntax.velocity", "syntax.temporal", "syntax.text"],
87
75
  },
88
76
  {
89
77
  id: "syntax.resource",
90
78
  title: "Resource syntax",
91
- summary: "Renewable resourceと同時利用可能な整数capacityを宣言します。",
79
+ summary: "Declares a renewable resource and its integer capacity for concurrent use.",
92
80
  quick: [
93
81
  {
94
82
  id: "capacity",
95
83
  title: "Capacity",
96
- body: "titleと1以上のcapacityが必須です。Taskのrequiresからresource IDを参照します。",
84
+ body: "title and a capacity of at least 1 are required. Tasks reference the resource ID from requires.",
97
85
  },
98
86
  ],
99
87
  detail: [],
@@ -106,12 +94,12 @@ const nodes = [
106
94
  {
107
95
  id: "syntax.milestone",
108
96
  title: "Milestone syntax",
109
- summary: "AoA nodeと現在frontierのreached状態を宣言します。",
97
+ summary: "Declares an AoA node and its reached state in the current frontier.",
110
98
  quick: [
111
99
  {
112
100
  id: "state",
113
101
  title: "Milestone state",
114
- body: "titleが必須です。stateはplannedまたはreachedで、readyは保存せず依存関係から導出します。",
102
+ body: "title is required. state is planned or reached; ready is derived from dependencies and is not stored.",
115
103
  },
116
104
  ],
117
105
  detail: [],
@@ -119,24 +107,24 @@ const nodes = [
119
107
  examples: [
120
108
  { id: "minimal", title: "Reached frontier", text: "docs/examples/minimal.pert" },
121
109
  ],
122
- related: ["syntax", "syntax.task", "syntax.gate", "syntax.tags", "syntax.text"],
110
+ related: ["syntax", "syntax.task", "syntax.gate", "syntax.temporal", "syntax.tags", "syntax.text"],
123
111
  },
124
112
  {
125
113
  id: "syntax.task",
126
114
  title: "Task syntax",
127
- summary: "Taskはmilestone間を結ぶAoA edgeです。",
115
+ summary: "A task is an AoA edge connecting milestones.",
128
116
  quick: [
129
117
  {
130
118
  id: "required",
131
119
  title: "Required fields",
132
- body: "titleと、durationまたはestimateのどちらかexactly oneを指定します。",
120
+ body: "Specify title and exactly one of duration or estimate.",
133
121
  },
134
122
  ],
135
123
  detail: [
136
124
  {
137
125
  id: "resources",
138
126
  title: "Resources",
139
- body: "requires blockの全resourceを同時取得し、task完了まで保持します。",
127
+ body: "All resources in the requires block are acquired together and held until the task completes.",
140
128
  },
141
129
  ],
142
130
  syntax: ["task ID FROM -> TO:", " title \"...\"", " duration 1d"],
@@ -151,17 +139,18 @@ const nodes = [
151
139
  "syntax.text",
152
140
  "syntax.tags",
153
141
  "analysis.resources",
142
+ "syntax.temporal",
154
143
  ],
155
144
  },
156
145
  {
157
146
  id: "syntax.gate",
158
147
  title: "Gate syntax",
159
- summary: "所要時間0のdependency edgeとしてmilestone間を接続します。",
148
+ summary: "Connects milestones with a zero-duration dependency edge.",
160
149
  quick: [
161
150
  {
162
151
  id: "reason",
163
152
  title: "Reason",
164
- body: "reasonが必須です。Gateはresourceを要求せず、task durationも持ちません。",
153
+ body: "reason is required. A gate requires no resources and has no task duration.",
165
154
  },
166
155
  ],
167
156
  detail: [],
@@ -178,19 +167,19 @@ const nodes = [
178
167
  {
179
168
  id: "syntax.estimate",
180
169
  title: "PERT estimate syntax",
181
- summary: "optimistic、most_likely、pessimisticの三点見積りを記述します。",
170
+ summary: "Specifies a three-point estimate: optimistic, most_likely, and pessimistic.",
182
171
  quick: [
183
172
  {
184
173
  id: "order",
185
174
  title: "Ordering constraint",
186
- body: "optimistic <= most_likely <= pessimistic、かつpessimistic > 0が必要です。",
175
+ body: "optimistic <= most_likely <= pessimistic and pessimistic > 0 are required.",
187
176
  },
188
177
  ],
189
178
  detail: [
190
179
  {
191
180
  id: "unit",
192
181
  title: "Duration unit",
193
- body: "3値は同じsuffixを使い、project duration_unit(day/hour/point)と一致させます。",
182
+ body: "All three values use the same suffix, matching the project duration_unit (day/hour/point).",
194
183
  },
195
184
  ],
196
185
  syntax: [
@@ -211,34 +200,71 @@ const nodes = [
211
200
  {
212
201
  id: "syntax.duration",
213
202
  title: "Duration syntax",
214
- summary: "Finite decimalにproject unit suffix d、h、pのいずれかを付けます。",
203
+ summary: "An exact Decimal or, in Grammar 3, reduced Fraction followed by d, h, or p.",
215
204
  quick: [],
216
205
  detail: [],
217
- syntax: ["1d", "2.5h", "3p", "0d"],
206
+ syntax: ["1d", "2.5h", "3p", "1/3d", "0d"],
218
207
  examples: [],
219
208
  related: ["syntax.estimate", "syntax.velocity", "analysis"],
220
209
  },
210
+ {
211
+ id: "syntax.temporal",
212
+ title: "Temporal syntax",
213
+ summary: "Grammar 2 and 3 add milestone deadline plus task not_before and deadline fields.",
214
+ quick: [
215
+ {
216
+ id: "anchor",
217
+ title: "Explicit anchor",
218
+ body: "Any deadline or not_before requires project.as_of. Date and offset date-time values remain distinct, and perttool never invents a clock or host time zone.",
219
+ },
220
+ ],
221
+ detail: [
222
+ {
223
+ id: "semantics",
224
+ title: "Temporal meaning",
225
+ body: "not_before is a release constraint for a new task start. Deadlines are desired completion or reach times, not dependency edges or hard caps. Mixed valid calendar kinds remain source-valid but may make a projection unavailable.",
226
+ },
227
+ ],
228
+ syntax: [
229
+ "project ID:",
230
+ " version 2|3",
231
+ " as_of DATE|OFFSET_DATE_TIME",
232
+ "milestone ID:",
233
+ " deadline DATE|OFFSET_DATE_TIME",
234
+ "task ID FROM -> TO:",
235
+ " not_before DATE|OFFSET_DATE_TIME",
236
+ " deadline DATE|OFFSET_DATE_TIME",
237
+ ],
238
+ examples: [
239
+ {
240
+ id: "temporal-units",
241
+ title: "Normative temporal examples",
242
+ text: "docs/examples/temporal-units.md",
243
+ },
244
+ ],
245
+ related: ["syntax.project", "syntax.task", "syntax.milestone", "analysis.temporal", "editing"],
246
+ },
221
247
  {
222
248
  id: "syntax.velocity",
223
249
  title: "Velocity syntax",
224
- summary: "Pointとday/hourを相互換算するproject-wide velocityを記述します。",
250
+ summary: "Specifies the project-wide velocity for converting between points and days or hours.",
225
251
  quick: [
226
252
  {
227
253
  id: "forecast",
228
254
  title: "Velocity forecast",
229
- body: "duration_unit pointではvelocityが必須です。PERT値はpのまま計算し、換算値をvelocity forecastとして別に返します。",
255
+ body: "duration_unit point requires velocity. PERT values are calculated in p and converted values are returned separately as a velocity forecast.",
230
256
  },
231
257
  ],
232
258
  detail: [
233
259
  {
234
260
  id: "units",
235
261
  title: "Units",
236
- body: "20p/10dまたは20p/80hの形式です。dayとhourの関係は暗黙に推測しません。",
262
+ body: "Use the form 20p/10d or 20p/80h. The relationship between day and hour is not inferred implicitly.",
237
263
  },
238
264
  {
239
265
  id: "scope",
240
266
  title: "MVP scope",
241
- body: "velocityはproject全体で一定です。team別、resource別、期間別velocityはMVP対象外です。",
267
+ body: "velocity is constant across the project. Per-team, per-resource, and time-varying velocity are outside the MVP scope.",
242
268
  },
243
269
  ],
244
270
  syntax: [
@@ -258,7 +284,7 @@ const nodes = [
258
284
  {
259
285
  id: "syntax.indentation",
260
286
  title: "Indentation",
261
- summary: "Structural indentationはASCII spacesだけを使用します。",
287
+ summary: "Structural indentation uses ASCII spaces only.",
262
288
  quick: [],
263
289
  detail: [],
264
290
  syntax: ["field: 2 spaces", "nested field: 4 spaces"],
@@ -268,13 +294,13 @@ const nodes = [
268
294
  {
269
295
  id: "syntax.string",
270
296
  title: "String syntax",
271
- summary: "JSON string literalと同じdouble-quoted textを使用します。",
297
+ summary: "Uses double-quoted text with the same rules as a JSON string literal.",
272
298
  quick: [],
273
299
  detail: [
274
300
  {
275
301
  id: "unicode",
276
302
  title: "Unicode and escapes",
277
- body: "Unicodeは直接記述でき、escapeはJSON形式を使用します。Unpaired surrogateは受理しません。",
303
+ body: "Unicode may be written directly, and escapes use JSON syntax. Unpaired surrogates are not accepted.",
278
304
  },
279
305
  ],
280
306
  syntax: ["\"text\"", "\"\\u65e5\\u672c\""],
@@ -284,13 +310,13 @@ const nodes = [
284
310
  {
285
311
  id: "syntax.text",
286
312
  title: "Text field syntax",
287
- summary: "description、blocked_reason、reasonはStringまたはblock textを取ります。",
313
+ summary: "description, blocked_reason, and reason accept a String or block text.",
288
314
  quick: [],
289
315
  detail: [
290
316
  {
291
317
  id: "block",
292
318
  title: "Block text",
293
- body: "nonblank contentのcommon indentを除去し、paragraph blankと残りのindentを保持します。",
319
+ body: "Removes the common indent from nonblank content while preserving paragraph blanks and remaining indentation.",
294
320
  },
295
321
  ],
296
322
  syntax: [" description \"...\"", " description |", " first line"],
@@ -300,7 +326,7 @@ const nodes = [
300
326
  {
301
327
  id: "syntax.tags",
302
328
  title: "Tag list syntax",
303
- summary: "Bare IdentifierまたはStringを角括弧内へcomma区切りで記述します。",
329
+ summary: "A comma-separated list of bare Identifiers or Strings in square brackets.",
304
330
  quick: [],
305
331
  detail: [],
306
332
  syntax: [" tags [alpha, \"two words\"]", " tags []"],
@@ -310,12 +336,12 @@ const nodes = [
310
336
  {
311
337
  id: "syntax.comments",
312
338
  title: "Comment syntax",
313
- summary: "独立行の#以降をCST triviaとして保持します。",
339
+ summary: "Preserves # and the following text on standalone lines as CST trivia.",
314
340
  quick: [
315
341
  {
316
342
  id: "standalone",
317
343
  title: "Standalone only",
318
- body: "grammar version 1ではinline commentを許可しません。Stringとblock text内の#はcontentです。",
344
+ body: "Grammar version 1 does not allow inline comments. # within a String or block text is content.",
319
345
  },
320
346
  ],
321
347
  detail: [],
@@ -326,7 +352,7 @@ const nodes = [
326
352
  {
327
353
  id: "syntax.top-level",
328
354
  title: "Top-level declaration syntax",
329
- summary: "Projectを文書先頭に置き、各declarationをcolumn 0から開始します。",
355
+ summary: "Place the project declaration at the start of the document and begin every declaration at column 0.",
330
356
  quick: [],
331
357
  detail: [],
332
358
  syntax: [
@@ -344,24 +370,24 @@ const nodes = [
344
370
  {
345
371
  id: "analysis",
346
372
  title: "Analysis",
347
- summary: "PERT/CPM precedence resultとresource scheduleを分離して返します。",
373
+ summary: "Returns PERT/CPM precedence results separately from the resource schedule.",
348
374
  quick: [
349
375
  {
350
376
  id: "results",
351
377
  title: "Separated results",
352
- body: "precedence makespanはresourceを無視した下限、resource makespanはcapacityを守る決定的heuristic resultです。",
378
+ body: "The precedence makespan is a lower bound that ignores resources; the resource makespan is a deterministic heuristic result that respects capacity.",
353
379
  },
354
380
  ],
355
381
  detail: [
356
382
  {
357
383
  id: "exact",
358
384
  title: "Exact arithmetic",
359
- body: "expected、variance、float、makespanはexact Rationalで計算し、displayだけを--precisionで丸めます。Point文書ではvelocity forecastもexact換算します。",
385
+ body: "expected, variance, float, and makespan use exact Rational arithmetic; only display values are rounded with --precision. Point documents also convert velocity forecasts exactly.",
360
386
  },
361
387
  {
362
388
  id: "paths",
363
389
  title: "Critical paths",
364
- body: "near-critical subgraphとexact driving pathを区別し、path countは列挙上限と独立に返します。",
390
+ body: "Distinguishes the near-critical subgraph from exact driving paths, and returns the path count independently of the enumeration limit.",
365
391
  },
366
392
  ],
367
393
  syntax: [
@@ -375,29 +401,29 @@ const nodes = [
375
401
  text: "perttool dag analyze docs/examples/parallel.pert",
376
402
  },
377
403
  ],
378
- related: ["analysis.resources", "next"],
404
+ related: ["analysis.resources", "analysis.temporal", "next"],
379
405
  },
380
406
  {
381
407
  id: "analysis.resources",
382
408
  title: "Resource analysis",
383
- summary: "Renewable capacityを守る決定的heuristic scheduleです。",
409
+ summary: "A deterministic heuristic schedule that respects renewable capacity.",
384
410
  quick: [
385
411
  {
386
412
  id: "capacity",
387
413
  title: "Capacity override",
388
- body: "--capacityはwhat-if入力であり、source documentを書き換えません。",
414
+ body: "--capacity is a what-if input and does not rewrite the source document.",
389
415
  },
390
416
  ],
391
417
  detail: [
392
418
  {
393
419
  id: "algorithm",
394
420
  title: "parallel-sgs v1",
395
- body: "priority、precedence float、expected duration、task IDの順でcandidateをscanします。optimal=falseです。",
421
+ body: "Scans candidates by priority, precedence float, expected duration, and task ID. optimal=false.",
396
422
  },
397
423
  {
398
424
  id: "witness",
399
425
  title: "Resource witness",
400
- body: "resource待ちはrelease taskから開始taskへのanalysis-only resource arcで説明し、正本DAGへ保存しません。",
426
+ body: "Resource waits are explained by analysis-only resource arcs from releasing tasks to starting tasks and are not stored in the authoritative DAG.",
401
427
  },
402
428
  ],
403
429
  syntax: [
@@ -413,47 +439,83 @@ const nodes = [
413
439
  ],
414
440
  related: ["analysis", "next"],
415
441
  },
442
+ {
443
+ id: "analysis.temporal",
444
+ title: "Temporal analysis",
445
+ summary: "Projects exact calendar schedules and deadline states separately for precedence and heuristic resources.",
446
+ quick: [
447
+ {
448
+ id: "views",
449
+ title: "Separate views",
450
+ body: "AnalysisResult v3 retains base analysis and adds temporal precedence, temporal resource, and deadline evaluations. The resource view remains heuristic and optimal=false.",
451
+ },
452
+ ],
453
+ detail: [
454
+ {
455
+ id: "availability",
456
+ title: "Unavailable causes",
457
+ body: "Missing or incomparable calendar relationships, Point/time conversion limits, completed history, and unresolved blocks remain explicit states and causes rather than guessed values.",
458
+ },
459
+ {
460
+ id: "ranking",
461
+ title: "Ranking boundary",
462
+ body: "Deadline facts are informational for Recommendation version 1. NextResult v4 applies not_before only as a separate release gate after recommendation.",
463
+ },
464
+ ],
465
+ syntax: [
466
+ "perttool dag analyze FILE --format json",
467
+ "perttool dag next FILE --format json",
468
+ ],
469
+ examples: [
470
+ {
471
+ id: "temporal-units",
472
+ title: "Temporal and deadline cases",
473
+ text: "docs/examples/temporal-units.md",
474
+ },
475
+ ],
476
+ related: ["analysis", "analysis.resources", "next", "syntax.temporal"],
477
+ },
416
478
  {
417
479
  id: "next",
418
480
  title: "Next tasks",
419
- summary: "NextResult.v3で工程上の推奨taskと、active、ready、runnable_now、blocked_now、upcomingを返します。",
481
+ summary: "Returns NextResult.v4 recommendations, temporal start authority, and active, ready, runnable_now, blocked_now, and upcoming tasks.",
420
482
  quick: [
421
483
  {
422
484
  id: "classification",
423
485
  title: "Task classification",
424
- body: "readyは依存関係上開始可能なplanned task、runnable_nowは現在のactive allocationを差し引いて同時開始できるreadyの部分集合です。",
486
+ body: "ready consists of planned tasks whose dependencies permit them to start; runnable_now is the subset of ready tasks that can start concurrently after accounting for current active allocations.",
425
487
  },
426
488
  {
427
489
  id: "recommendation",
428
490
  title: "Recommendation authority",
429
- body: "recommendationはready taskをrecommended、allowed、deferred、discouragedへ分類します。recommended setは同時開始可能ですがheuristicであり、optimal=falseです。",
491
+ body: "recommendation classifies ready tasks as recommended, allowed, deferred, or discouraged. The recommended set can start concurrently, but is heuristic and optimal=false.",
430
492
  },
431
493
  ],
432
494
  detail: [
433
495
  {
434
496
  id: "consumer-safety",
435
497
  title: "Machine-readable explanation",
436
- body: "--format jsonはcompleteなPerttool.NextResult.v3説明graphを返します。Consumerはschema_versionと各model versionを先に検査し、未知のdecisive semanticsではtaskを自動開始しません。Textはcomplete=falseのsummaryです。",
498
+ body: "--format json returns a complete Perttool.NextResult.v4 with the unchanged Recommendation version 1 explanation graph and a separate temporal release gate. Consumers validate every identity and do not start when decisive or temporal authority is unknown.",
437
499
  },
438
500
  {
439
501
  id: "authority-adoption",
440
502
  title: "AI task selection authority",
441
- body: "AIは--format jsonのknown Perttool.NextResult.v3、recommendation interface 1、ranking algorithm 1、reason taxonomy 1.0、explanation/expression/description model 1、locale en、completeかつnot-truncatedなtraceだけをnormal start authorityとして使用します。Macroのrecommended work packageを選んでから対応detailを再解析し、recommended subset、またはrecommended set全件にallowedを1件だけ追加した集合を選びます。Unknown version、incomplete trace、PTREC diagnostic、deferred/discouraged selectionでは開始せず停止します。Task stateまたはcapacity変更後は再解析します。",
503
+ body: "AI uses only a known Perttool.NextResult.v4 from --format json, Recommendation interface 1, ranking algorithm 1, reason taxonomy 1.0, explanation/expression/description model 1, locale en, a complete non-truncated trace, and temporal policy recommendation_v1_plus_release_gate. Start only IDs in startable_recommended_task_ids. Stop for unknown, incomplete, malformed, future, or unavailable authority, PTREC diagnostics, and deferred or discouraged selections. Reanalyze after task-state or capacity changes.",
442
504
  },
443
505
  {
444
506
  id: "selection",
445
507
  title: "Resource selection",
446
- body: "runnable_nowは既存scheduler順で選ぶoperational subset、recommendationはversion付きranking policyで選ぶauthorityであり、同じ集合とは限りません。CLI rendererはrankingを再実装しません。",
508
+ body: "runnable_now is an operational subset selected by the existing scheduler order, while recommendation is the authority selected by a versioned ranking policy; they are not necessarily the same set. The CLI renderer does not reimplement ranking.",
447
509
  },
448
510
  {
449
511
  id: "override-validation",
450
512
  title: "Human override validation",
451
- body: "Public CoreのvalidateOverrideはcompleteなNextResult.v3と明示requestからPerttool.OverrideDecision.v1を決定的に生成します。これはread-only validationであり、task state、file、Git、networkを変更しません。reason_textとevidenceへsecret、credential、tokenを含めないでください。Override applyとaudit writeのCLIは未実装です。",
513
+ body: "The public Core validateOverride deterministically produces Perttool.OverrideDecision.v1 from a complete NextResult.v4 and an explicit request, and cannot bypass a future or unavailable temporal release gate. This is read-only validation and does not change task state, files, Git, or the network.",
452
514
  },
453
515
  {
454
516
  id: "explanation",
455
517
  title: "Upcoming explanation",
456
- body: "upcomingは未到達の開始milestoneとunsatisfied incoming edgeを返します。--explain-depthは0..32、default 1です。",
518
+ body: "upcoming returns unreached starting milestones and unsatisfied incoming edges. --explain-depth is 0..32; the default is 1.",
457
519
  },
458
520
  ],
459
521
  syntax: [
@@ -467,34 +529,36 @@ const nodes = [
467
529
  text: "perttool dag next docs/examples/parallel.pert --format json",
468
530
  },
469
531
  ],
470
- related: ["analysis", "analysis.resources"],
532
+ related: ["analysis", "analysis.resources", "analysis.temporal"],
471
533
  },
472
534
  {
473
535
  id: "editing",
474
536
  title: "Safe editing",
475
- summary: "dsl format、task/milestone/resource mutation、atomic batch、dag advanceをpreviewし、検査済み候補を安全にwriteできます。",
537
+ summary: "Preview document formatting, project/task/gate/milestone/resource mutations, atomic batches, and DAG advancement, then safely write validated candidates.",
476
538
  quick: [
477
539
  {
478
540
  id: "current-surface",
479
541
  title: "Current surface",
480
- body: "project showはproject metadataをread-onlyで返します。dsl formatはplanFormat、project/entity commandとmutation applyはplanMutation、dag advanceはplanAdvanceの再検査済みcandidate、UTF-16 TextEdit、digest、diffをtext/JSONへ投影します。既定はfileを変更しないpreviewです。",
542
+ body: "project show returns project metadata read-only. project init creates the smallest valid candidate without writing by default. document format projects planFormat; project/entity commands and batch apply project planMutation; and dag advance projects the revalidated candidate from planAdvance, UTF-16 TextEdits, digest, and diff as text/JSON. Direct gate add/set/remove commands and connected atomic batches use the same preview-first mutation path. The default is a preview that does not modify files.",
481
543
  },
482
544
  ],
483
545
  detail: [
484
546
  {
485
547
  id: "write-gate",
486
548
  title: "Safe write",
487
- body: "--writeは初回read digestとwrite直前digestを照合してatomic replaceし、--expect-digestでcaller lockを追加できます。--outは既存targetを上書きせず新規作成します。--diffはpreview専用です。",
549
+ body: "--write atomically replaces a file after comparing the initial-read digest with the digest immediately before writing; --expect-digest adds a caller lock. --out creates a new target without overwriting an existing one. --diff is for previews only.",
488
550
  },
489
551
  ],
490
552
  syntax: [
553
+ "perttool project init PROJECT_ID --title TITLE --duration-unit UNIT --initial-milestone ID --initial-milestone-title TITLE --finish ID [--out PATH]",
491
554
  "perttool project show FILE [--format text|json]",
492
555
  "perttool project set FILE [--velocity VELOCITY]... [--write [--expect-digest DIGEST] | --out PATH]",
493
- "perttool dsl format FILE [--check] [--diff] [--write [--expect-digest DIGEST] | --out PATH]",
556
+ "perttool document format FILE [--check] [--diff] [--write [--expect-digest DIGEST] | --out PATH]",
494
557
  "perttool task add|set|remove|finish ... [--write [--expect-digest DIGEST] | --out PATH]",
558
+ "perttool gate add|set|remove ... [--write [--expect-digest DIGEST] | --out PATH]",
495
559
  "perttool milestone add|set|remove ... [--write [--expect-digest DIGEST] | --out PATH]",
496
560
  "perttool resource add|set|remove ... [--write [--expect-digest DIGEST] | --out PATH]",
497
- "perttool mutation apply FILE --request REQUEST.json [--write [--expect-digest DIGEST] | --out PATH]",
561
+ "perttool batch apply FILE --request REQUEST.json [--write [--expect-digest DIGEST] | --out PATH]",
498
562
  "perttool dag advance FILE [--diff] [--write [--expect-digest DIGEST] | --out PATH]",
499
563
  ],
500
564
  examples: [
@@ -514,34 +578,70 @@ const nodes = [
514
578
  text: "perttool task set plan.pert TASK_ID --status active --write --expect-digest sha256:<64 lowercase hex digits>",
515
579
  },
516
580
  ],
517
- related: ["workflows"],
581
+ related: ["editing.unit-migration", "syntax.temporal", "workflows"],
582
+ },
583
+ {
584
+ id: "editing.unit-migration",
585
+ title: "Exact unit migration",
586
+ summary: "Migrates the complete Duration inventory between Point and matching day or hour units.",
587
+ quick: [
588
+ {
589
+ id: "directions",
590
+ title: "Exact directions",
591
+ body: "Supported directions are point to day or hour and the matching time unit back to point. A declared or explicit replacement velocity supplies the exact relationship; day-to-hour is never inferred.",
592
+ },
593
+ ],
594
+ detail: [
595
+ {
596
+ id: "safety",
597
+ title: "Preview and safe write",
598
+ body: "project migrate-unit previews by default, preserves every absolute temporal token, validates one complete candidate, and shares diff, write, out, digest-lock, race, symlink, and post-write checks with ordinary mutations.",
599
+ },
600
+ {
601
+ id: "batch",
602
+ title: "Batch exclusion and reversibility",
603
+ body: "Automatic migration is not a batch.apply member. UnitMigrationResult v2 reports exact converted records, grammar and velocity dispositions, qualifications, and whether values and metadata are reversible.",
604
+ },
605
+ ],
606
+ syntax: [
607
+ "perttool project migrate-unit FILE --to-unit day|hour|point [--replacement-velocity VELOCITY]",
608
+ " [--diff] [--write [--expect-digest DIGEST] | --out PATH]",
609
+ ],
610
+ examples: [
611
+ {
612
+ id: "point-to-day",
613
+ title: "Preview Point-to-day migration",
614
+ text: "perttool project migrate-unit plan.pert --to-unit day --diff",
615
+ },
616
+ ],
617
+ related: ["editing", "syntax.duration", "syntax.velocity", "syntax.temporal"],
518
618
  },
519
619
  {
520
620
  id: "mermaid",
521
621
  title: "Mermaid conversion",
522
- summary: "dag renderとdag importでlossless Mermaid profileを往復でき、plain importの損失を明示できます。",
622
+ summary: "Round-trip a lossless Mermaid profile with dag render and dag import, and explicitly report plain-import loss.",
523
623
  quick: [
524
624
  {
525
625
  id: "authority",
526
626
  title: "Profile authority",
527
- body: "%% perttool: semantic recordが正規化DSL意味モデルの復元正本で、flowchart node/edgeは人間向けprojectionです。",
627
+ body: "%% perttool: semantic records are the authoritative source for restoring the normalized DSL semantic model; flowchart nodes and edges are a human-facing projection.",
528
628
  },
529
629
  ],
530
630
  detail: [
531
631
  {
532
632
  id: "fidelity",
533
633
  title: "Lossless boundary",
534
- body: "losslessはgrammar v1の正規化意味同値です。comment、blank line、field/declaration順、escape spelling、line endingのbyte同一性は対象外です。",
634
+ body: "Lossless means normalized semantic equivalence for grammar v1. Byte identity for comments, blank lines, field/declaration order, escape spelling, and line endings is out of scope.",
535
635
  },
536
636
  {
537
637
  id: "integrity",
538
638
  title: "Fail-closed validation",
539
- body: "canonical JSON record、record count、metadata/projection SHA-256、node/edge対応を検査します。Profile header検出後の破損をplain importへ黙って降格しません。",
639
+ body: "Validates canonical JSON records, record count, metadata/projection SHA-256 values, and node/edge correspondence. Corruption detected after a profile header is not silently downgraded to plain import.",
540
640
  },
541
641
  {
542
642
  id: "availability",
543
643
  title: "Current availability",
544
- body: "exportMermaid/importMermaid Coreとdag render/importは利用できます。perttool profileは復元用semantic metadataをfail-closed検査し、plain import/exportはstable PTCNV lossを返します。SVG、JSON targetは後続sliceです。",
644
+ body: "The exportMermaid/importMermaid Core and dag render/import are available. The perttool profile fail-closed validates restoration metadata, and plain import/export returns stable PTCNV losses. SVG and JSON targets are later slices.",
545
645
  },
546
646
  ],
547
647
  syntax: [
@@ -565,7 +665,7 @@ const nodes = [
565
665
  {
566
666
  id: "workflows",
567
667
  title: "Workflows",
568
- summary: "check、analyze、next、preview、Git commitの順で運用します。",
668
+ summary: "Operate in the order check, analyze, next, preview, and Git commit.",
569
669
  quick: [],
570
670
  detail: [],
571
671
  syntax: [],
@@ -575,28 +675,28 @@ const nodes = [
575
675
  {
576
676
  id: "errors",
577
677
  title: "Diagnostics",
578
- summary: "Stable code、source span、局所help topicで問題を報告します。",
678
+ summary: "Reports problems with stable codes, source spans, and local help topics.",
579
679
  quick: [
580
680
  {
581
681
  id: "recovery",
582
682
  title: "Error recovery",
583
- body: "独立した構文errorは可能な範囲で複数返し、同じinvalid blockの子行は1 error regionとして抑制します。",
683
+ body: "Returns multiple independent syntax errors where possible, and suppresses child lines in the same invalid block as one error region.",
584
684
  },
585
685
  ],
586
686
  detail: [
587
687
  {
588
688
  id: "phases",
589
689
  title: "Phase suppression",
590
- body: "parse errorがある文書ではfield/graph validationを実行せず、原因を直す前の派生PTSEM/PTDAG diagnosticを返しません。",
690
+ body: "For documents with parse errors, field/graph validation does not run, so derived PTSEM/PTDAG diagnostics are not returned before the cause is fixed.",
591
691
  },
592
692
  {
593
693
  id: "limit",
594
694
  title: "Diagnostic limit",
595
- body: "--max-diagnosticsは1..1000、default 100です。上限超過はdiagnostics_truncatedで確認できます。",
695
+ body: "--max-diagnostics is 1..1000, with a default of 100. diagnostics_truncated indicates when the limit is exceeded.",
596
696
  },
597
697
  ],
598
698
  syntax: [
599
- "perttool dsl check FILE --max-diagnostics 20 --format json",
699
+ "perttool document check FILE --max-diagnostics 20 --format json",
600
700
  "perttool dag analyze FILE --max-diagnostics 20 --format json",
601
701
  "perttool dag next FILE --max-diagnostics 20 --format json",
602
702
  ],
@@ -606,7 +706,7 @@ const nodes = [
606
706
  {
607
707
  id: "samples",
608
708
  title: "Samples",
609
- summary: "Repositoryの規範sample IDを案内します。",
709
+ summary: "Lists the repository's normative sample IDs.",
610
710
  quick: [],
611
711
  detail: [],
612
712
  syntax: [],
@@ -626,7 +726,7 @@ export function getHelp(topicId, level) {
626
726
  topicId: null,
627
727
  level: "index",
628
728
  title: "perttool DSL help",
629
- summary: "利用するtopicを選択してください。",
729
+ summary: "Select a topic to use.",
630
730
  sections: [],
631
731
  syntax: [],
632
732
  examples: [],
@@ -644,7 +744,7 @@ export function getHelp(topicId, level) {
644
744
  topicId,
645
745
  level,
646
746
  title: "Unknown help topic",
647
- summary: "指定されたhelp topicは存在しません。",
747
+ summary: "The specified help topic does not exist.",
648
748
  sections: [],
649
749
  syntax: [],
650
750
  examples: [],