perttool 0.5.5 → 0.7.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 (265) hide show
  1. package/CHANGELOG.md +71 -1
  2. package/README.md +128 -30
  3. package/dist/application/advance-history.d.ts +48 -0
  4. package/dist/application/advance-history.d.ts.map +1 -0
  5. package/dist/application/advance-history.js +263 -0
  6. package/dist/application/advance-history.js.map +1 -0
  7. package/dist/application/contract6-mutation.d.ts +3 -2
  8. package/dist/application/contract6-mutation.d.ts.map +1 -1
  9. package/dist/application/contract6-mutation.js +2 -1
  10. package/dist/application/contract6-mutation.js.map +1 -1
  11. package/dist/application/contract6-projection.d.ts +2 -1
  12. package/dist/application/contract6-projection.d.ts.map +1 -1
  13. package/dist/application/contract6-projection.js +31 -1
  14. package/dist/application/contract6-projection.js.map +1 -1
  15. package/dist/application/contract7-assurance.d.ts +57 -0
  16. package/dist/application/contract7-assurance.d.ts.map +1 -0
  17. package/dist/application/contract7-assurance.js +248 -0
  18. package/dist/application/contract7-assurance.js.map +1 -0
  19. package/dist/application/contract7-mermaid.d.ts +9 -0
  20. package/dist/application/contract7-mermaid.d.ts.map +1 -0
  21. package/dist/application/contract7-mermaid.js +73 -0
  22. package/dist/application/contract7-mermaid.js.map +1 -0
  23. package/dist/application/contract7-mutation.d.ts +21 -0
  24. package/dist/application/contract7-mutation.d.ts.map +1 -0
  25. package/dist/application/contract7-mutation.js +181 -0
  26. package/dist/application/contract7-mutation.js.map +1 -0
  27. package/dist/application/contract7-project.d.ts +10 -0
  28. package/dist/application/contract7-project.d.ts.map +1 -0
  29. package/dist/application/contract7-project.js +29 -0
  30. package/dist/application/contract7-project.js.map +1 -0
  31. package/dist/application/contract7-projection.d.ts +9 -0
  32. package/dist/application/contract7-projection.d.ts.map +1 -0
  33. package/dist/application/contract7-projection.js +100 -0
  34. package/dist/application/contract7-projection.js.map +1 -0
  35. package/dist/application/contract7-source.d.ts +24 -0
  36. package/dist/application/contract7-source.d.ts.map +1 -0
  37. package/dist/application/contract7-source.js +54 -0
  38. package/dist/application/contract7-source.js.map +1 -0
  39. package/dist/application/contract7-unit-migration.d.ts +13 -0
  40. package/dist/application/contract7-unit-migration.d.ts.map +1 -0
  41. package/dist/application/contract7-unit-migration.js +13 -0
  42. package/dist/application/contract7-unit-migration.js.map +1 -0
  43. package/dist/application/init.d.ts +1 -1
  44. package/dist/application/init.js +3 -3
  45. package/dist/application/mutate.d.ts +5 -1
  46. package/dist/application/mutate.d.ts.map +1 -1
  47. package/dist/application/mutate.js +2 -2
  48. package/dist/application/mutate.js.map +1 -1
  49. package/dist/application/target-actuals-analysis.d.ts +5 -4
  50. package/dist/application/target-actuals-analysis.d.ts.map +1 -1
  51. package/dist/application/target-actuals-analysis.js +18 -11
  52. package/dist/application/target-actuals-analysis.js.map +1 -1
  53. package/dist/application/target-actuals-mutation.d.ts +5 -3
  54. package/dist/application/target-actuals-mutation.d.ts.map +1 -1
  55. package/dist/application/target-actuals-mutation.js +16 -8
  56. package/dist/application/target-actuals-mutation.js.map +1 -1
  57. package/dist/application/target-actuals-write.d.ts +2 -1
  58. package/dist/application/target-actuals-write.d.ts.map +1 -1
  59. package/dist/application/target-actuals-write.js.map +1 -1
  60. package/dist/application/target-assurance-advance-history.d.ts +19 -0
  61. package/dist/application/target-assurance-advance-history.d.ts.map +1 -0
  62. package/dist/application/target-assurance-advance-history.js +61 -0
  63. package/dist/application/target-assurance-advance-history.js.map +1 -0
  64. package/dist/application/target-assurance-analysis.d.ts +34 -0
  65. package/dist/application/target-assurance-analysis.d.ts.map +1 -0
  66. package/dist/application/target-assurance-analysis.js +103 -0
  67. package/dist/application/target-assurance-analysis.js.map +1 -0
  68. package/dist/application/target-assurance-inspection.d.ts +38 -0
  69. package/dist/application/target-assurance-inspection.d.ts.map +1 -0
  70. package/dist/application/target-assurance-inspection.js +356 -0
  71. package/dist/application/target-assurance-inspection.js.map +1 -0
  72. package/dist/application/target-assurance-write.d.ts +22 -0
  73. package/dist/application/target-assurance-write.d.ts.map +1 -0
  74. package/dist/application/target-assurance-write.js +73 -0
  75. package/dist/application/target-assurance-write.js.map +1 -0
  76. package/dist/application/target-governance-init.d.ts +3 -3
  77. package/dist/application/target-governance-init.d.ts.map +1 -1
  78. package/dist/application/target-governance-init.js +14 -10
  79. package/dist/application/target-governance-init.js.map +1 -1
  80. package/dist/application/target-governance-project.d.ts +6 -4
  81. package/dist/application/target-governance-project.d.ts.map +1 -1
  82. package/dist/application/target-governance-project.js +18 -4
  83. package/dist/application/target-governance-project.js.map +1 -1
  84. package/dist/application/target-mutate.d.ts +7 -1
  85. package/dist/application/target-mutate.d.ts.map +1 -1
  86. package/dist/application/target-mutate.js +50 -3
  87. package/dist/application/target-mutate.js.map +1 -1
  88. package/dist/application/target-project-history.d.ts +4 -4
  89. package/dist/application/target-project-history.d.ts.map +1 -1
  90. package/dist/application/target-project-history.js +1 -1
  91. package/dist/application/target-project-history.js.map +1 -1
  92. package/dist/application/target-unit-migration-candidate.d.ts +29 -6
  93. package/dist/application/target-unit-migration-candidate.d.ts.map +1 -1
  94. package/dist/application/target-unit-migration-candidate.js +204 -3
  95. package/dist/application/target-unit-migration-candidate.js.map +1 -1
  96. package/dist/application/target-unit-migration-result.d.ts +2 -2
  97. package/dist/application/target-unit-migration-result.d.ts.map +1 -1
  98. package/dist/application/target-unit-migration-result.js +4 -2
  99. package/dist/application/target-unit-migration-result.js.map +1 -1
  100. package/dist/application/target-velocity-observation.d.ts +1 -1
  101. package/dist/application/target-velocity-observation.js +1 -1
  102. package/dist/assurance/advance.d.ts +45 -0
  103. package/dist/assurance/advance.d.ts.map +1 -0
  104. package/dist/assurance/advance.js +507 -0
  105. package/dist/assurance/advance.js.map +1 -0
  106. package/dist/assurance/authority.d.ts +86 -0
  107. package/dist/assurance/authority.d.ts.map +1 -0
  108. package/dist/assurance/authority.js +269 -0
  109. package/dist/assurance/authority.js.map +1 -0
  110. package/dist/assurance/canonical.d.ts +13 -0
  111. package/dist/assurance/canonical.d.ts.map +1 -0
  112. package/dist/assurance/canonical.js +320 -0
  113. package/dist/assurance/canonical.js.map +1 -0
  114. package/dist/assurance/compatibility.d.ts +62 -0
  115. package/dist/assurance/compatibility.d.ts.map +1 -0
  116. package/dist/assurance/compatibility.js +163 -0
  117. package/dist/assurance/compatibility.js.map +1 -0
  118. package/dist/assurance/evaluate.d.ts +4 -0
  119. package/dist/assurance/evaluate.d.ts.map +1 -0
  120. package/dist/assurance/evaluate.js +631 -0
  121. package/dist/assurance/evaluate.js.map +1 -0
  122. package/dist/assurance/governance.d.ts +42 -0
  123. package/dist/assurance/governance.d.ts.map +1 -0
  124. package/dist/assurance/governance.js +95 -0
  125. package/dist/assurance/governance.js.map +1 -0
  126. package/dist/assurance/mermaid.d.ts +40 -0
  127. package/dist/assurance/mermaid.d.ts.map +1 -0
  128. package/dist/assurance/mermaid.js +401 -0
  129. package/dist/assurance/mermaid.js.map +1 -0
  130. package/dist/assurance/mutation.d.ts +96 -0
  131. package/dist/assurance/mutation.d.ts.map +1 -0
  132. package/dist/assurance/mutation.js +757 -0
  133. package/dist/assurance/mutation.js.map +1 -0
  134. package/dist/assurance/source.d.ts +20 -0
  135. package/dist/assurance/source.d.ts.map +1 -0
  136. package/dist/assurance/source.js +313 -0
  137. package/dist/assurance/source.js.map +1 -0
  138. package/dist/assurance/types.d.ts +166 -0
  139. package/dist/assurance/types.d.ts.map +1 -0
  140. package/dist/assurance/types.js +3 -0
  141. package/dist/assurance/types.js.map +1 -0
  142. package/dist/cli.js +431 -72
  143. package/dist/cli.js.map +1 -1
  144. package/dist/command/actuals-discovery.d.ts.map +1 -1
  145. package/dist/command/actuals-discovery.js +50 -4
  146. package/dist/command/actuals-discovery.js.map +1 -1
  147. package/dist/command/assurance-discovery.d.ts +17 -0
  148. package/dist/command/assurance-discovery.d.ts.map +1 -0
  149. package/dist/command/assurance-discovery.js +287 -0
  150. package/dist/command/assurance-discovery.js.map +1 -0
  151. package/dist/command/assurance-usage.d.ts +20 -0
  152. package/dist/command/assurance-usage.d.ts.map +1 -0
  153. package/dist/command/assurance-usage.js +66 -0
  154. package/dist/command/assurance-usage.js.map +1 -0
  155. package/dist/conversion/mermaid.d.ts +2 -1
  156. package/dist/conversion/mermaid.d.ts.map +1 -1
  157. package/dist/conversion/mermaid.js +2 -2
  158. package/dist/conversion/mermaid.js.map +1 -1
  159. package/dist/formatter/source-formatter.d.ts +1 -1
  160. package/dist/formatter/source-formatter.d.ts.map +1 -1
  161. package/dist/formatter/source-formatter.js +56 -4
  162. package/dist/formatter/source-formatter.js.map +1 -1
  163. package/dist/formatter/target-source-formatter.d.ts +2 -1
  164. package/dist/formatter/target-source-formatter.d.ts.map +1 -1
  165. package/dist/formatter/target-source-formatter.js +18 -2
  166. package/dist/formatter/target-source-formatter.js.map +1 -1
  167. package/dist/help/assurance-guide.d.ts +10 -0
  168. package/dist/help/assurance-guide.d.ts.map +1 -0
  169. package/dist/help/assurance-guide.js +115 -0
  170. package/dist/help/assurance-guide.js.map +1 -0
  171. package/dist/help/guide.d.ts +1 -1
  172. package/dist/help/guide.d.ts.map +1 -1
  173. package/dist/help/registry.d.ts.map +1 -1
  174. package/dist/help/registry.js +11 -1
  175. package/dist/help/registry.js.map +1 -1
  176. package/dist/history/advance-history.d.ts +46 -0
  177. package/dist/history/advance-history.d.ts.map +1 -0
  178. package/dist/history/advance-history.js +425 -0
  179. package/dist/history/advance-history.js.map +1 -0
  180. package/dist/history/git-probe.d.ts +40 -0
  181. package/dist/history/git-probe.d.ts.map +1 -1
  182. package/dist/history/git-probe.js +330 -0
  183. package/dist/history/git-probe.js.map +1 -1
  184. package/dist/history/project-history.d.ts +14 -5
  185. package/dist/history/project-history.d.ts.map +1 -1
  186. package/dist/history/project-history.js +25 -18
  187. package/dist/history/project-history.js.map +1 -1
  188. package/dist/index.d.ts +31 -25
  189. package/dist/index.d.ts.map +1 -1
  190. package/dist/index.js +12 -14
  191. package/dist/index.js.map +1 -1
  192. package/dist/io/target-safe-write.d.ts +4 -1
  193. package/dist/io/target-safe-write.d.ts.map +1 -1
  194. package/dist/io/target-safe-write.js +19 -1
  195. package/dist/io/target-safe-write.js.map +1 -1
  196. package/dist/migration/grammar-boundary.d.ts +1 -1
  197. package/dist/migration/grammar-boundary.d.ts.map +1 -1
  198. package/dist/migration/grammar-boundary.js +7 -3
  199. package/dist/migration/grammar-boundary.js.map +1 -1
  200. package/dist/model/declaration-fields.d.ts +12 -0
  201. package/dist/model/declaration-fields.d.ts.map +1 -1
  202. package/dist/model/declaration-fields.js +45 -0
  203. package/dist/model/declaration-fields.js.map +1 -1
  204. package/dist/model/syntax.d.ts +17 -1
  205. package/dist/model/syntax.d.ts.map +1 -1
  206. package/dist/model/syntax.js.map +1 -1
  207. package/dist/mutation/actuals.js +1 -1
  208. package/dist/mutation/actuals.js.map +1 -1
  209. package/dist/mutation/advance-deletion.d.ts +14 -0
  210. package/dist/mutation/advance-deletion.d.ts.map +1 -0
  211. package/dist/mutation/advance-deletion.js +53 -0
  212. package/dist/mutation/advance-deletion.js.map +1 -0
  213. package/dist/mutation/advance.d.ts +18 -1
  214. package/dist/mutation/advance.d.ts.map +1 -1
  215. package/dist/mutation/advance.js +28 -25
  216. package/dist/mutation/advance.js.map +1 -1
  217. package/dist/mutation/project.d.ts +2 -1
  218. package/dist/mutation/project.d.ts.map +1 -1
  219. package/dist/mutation/project.js +21 -0
  220. package/dist/mutation/project.js.map +1 -1
  221. package/dist/parser/document-parser.d.ts +7 -0
  222. package/dist/parser/document-parser.d.ts.map +1 -1
  223. package/dist/parser/document-parser.js +227 -12
  224. package/dist/parser/document-parser.js.map +1 -1
  225. package/dist/recommendation/override-types.d.ts +2 -2
  226. package/dist/recommendation/override.d.ts +2 -2
  227. package/dist/recommendation/override.d.ts.map +1 -1
  228. package/dist/recommendation/override.js +13 -5
  229. package/dist/recommendation/override.js.map +1 -1
  230. package/dist/schema/registry.d.ts +1 -1
  231. package/dist/schema/registry.d.ts.map +1 -1
  232. package/dist/schema/registry.js +8 -6
  233. package/dist/schema/registry.js.map +1 -1
  234. package/dist/semantic/target-validator.d.ts +12 -1
  235. package/dist/semantic/target-validator.d.ts.map +1 -1
  236. package/dist/semantic/target-validator.js +47 -2
  237. package/dist/semantic/target-validator.js.map +1 -1
  238. package/dist/semantic/validator.d.ts +1 -0
  239. package/dist/semantic/validator.d.ts.map +1 -1
  240. package/dist/semantic/validator.js +304 -0
  241. package/dist/semantic/validator.js.map +1 -1
  242. package/dist/version.d.ts +1 -1
  243. package/dist/version.js +1 -1
  244. package/package.json +1 -1
  245. package/schemas/Perttool.AdvanceResult.v2.schema.json +334 -0
  246. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +1 -1
  247. package/schemas/{Perttool.AnalysisResult.v4.schema.json → Perttool.AnalysisResult.v5.schema.json} +10 -6
  248. package/schemas/{Perttool.CheckResult.v3.schema.json → Perttool.CheckResult.v4.schema.json} +14 -6
  249. package/schemas/Perttool.CliError.v1.schema.json +1 -1
  250. package/schemas/Perttool.CommandHelpResult.v1.schema.json +2 -2
  251. package/schemas/Perttool.Common.v1.schema.json +300 -4
  252. package/schemas/Perttool.ExportResult.v1.schema.json +1 -1
  253. package/schemas/Perttool.FormatResult.v1.schema.json +1 -1
  254. package/schemas/Perttool.GuideResult.v1.schema.json +1 -1
  255. package/schemas/Perttool.ImportResult.v1.schema.json +1 -1
  256. package/schemas/Perttool.InitResult.v1.schema.json +1 -1
  257. package/schemas/{Perttool.MutationResult.v3.schema.json → Perttool.MutationResult.v4.schema.json} +16 -5
  258. package/schemas/{Perttool.NextResult.v5.schema.json → Perttool.NextResult.v6.schema.json} +53 -8
  259. package/schemas/Perttool.OverrideDecision.v1.schema.json +1 -1
  260. package/schemas/Perttool.PlanAssuranceResult.v1.schema.json +77 -0
  261. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +1 -1
  262. package/schemas/{Perttool.ProjectResult.v3.schema.json → Perttool.ProjectResult.v4.schema.json} +15 -7
  263. package/schemas/Perttool.SchemaResult.v1.schema.json +1 -1
  264. package/schemas/Perttool.UnitMigrationResult.v3.schema.json +5 -3
  265. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +1 -1
@@ -1689,6 +1689,301 @@
1689
1689
  }
1690
1690
  ]
1691
1691
  },
1692
+ "planAssuranceCause": {
1693
+ "type": "object",
1694
+ "required": [
1695
+ "kind",
1696
+ "direct",
1697
+ "root_task_id",
1698
+ "affected_task_id",
1699
+ "path_task_ids"
1700
+ ],
1701
+ "properties": {
1702
+ "kind": {
1703
+ "enum": [
1704
+ "unknown_model",
1705
+ "task_contract_changed",
1706
+ "planning_relation_changed",
1707
+ "predecessor_commitment_changed",
1708
+ "predecessor_unavailable",
1709
+ "frontier_commitment_changed",
1710
+ "accepted_seal_inconsistent",
1711
+ "outcome_missing",
1712
+ "outcome_basis_mismatch",
1713
+ "outcome_invalid",
1714
+ "changed_outcome"
1715
+ ]
1716
+ },
1717
+ "direct": { "type": "boolean" },
1718
+ "root_task_id": { "type": "string" },
1719
+ "affected_task_id": { "type": "string" },
1720
+ "path_task_ids": { "$ref": "#/$defs/stringArray" }
1721
+ },
1722
+ "additionalProperties": false
1723
+ },
1724
+ "acceptedPlanningInput": {
1725
+ "type": "object",
1726
+ "required": [
1727
+ "predecessor_task_id",
1728
+ "relation_mode",
1729
+ "assurance_hash"
1730
+ ],
1731
+ "properties": {
1732
+ "predecessor_task_id": { "type": "string" },
1733
+ "relation_mode": {
1734
+ "enum": ["both", "planning_only"]
1735
+ },
1736
+ "assurance_hash": { "$ref": "#/$defs/digest" }
1737
+ },
1738
+ "additionalProperties": false
1739
+ },
1740
+ "planAssuranceTaskResult": {
1741
+ "type": "object",
1742
+ "required": [
1743
+ "task_id",
1744
+ "status",
1745
+ "outcome_status",
1746
+ "contract_hash",
1747
+ "computed_basis_hash",
1748
+ "accepted_basis_hash",
1749
+ "computed_inputs",
1750
+ "exported_assurance_hash",
1751
+ "direct_causes",
1752
+ "inherited_causes"
1753
+ ],
1754
+ "properties": {
1755
+ "task_id": { "type": "string" },
1756
+ "status": {
1757
+ "enum": [
1758
+ "not_applicable",
1759
+ "unsealed",
1760
+ "conditional",
1761
+ "verified",
1762
+ "review_required",
1763
+ "unavailable"
1764
+ ]
1765
+ },
1766
+ "outcome_status": {
1767
+ "enum": ["unfinished", "conformant", "changed", "unavailable"]
1768
+ },
1769
+ "contract_hash": { "$ref": "#/$defs/nullableDigest" },
1770
+ "computed_basis_hash": { "$ref": "#/$defs/nullableDigest" },
1771
+ "accepted_basis_hash": { "$ref": "#/$defs/nullableDigest" },
1772
+ "computed_inputs": {
1773
+ "type": "array",
1774
+ "items": { "$ref": "#/$defs/acceptedPlanningInput" }
1775
+ },
1776
+ "exported_assurance_hash": { "$ref": "#/$defs/nullableDigest" },
1777
+ "direct_causes": {
1778
+ "type": "array",
1779
+ "items": { "$ref": "#/$defs/planAssuranceCause" }
1780
+ },
1781
+ "inherited_causes": {
1782
+ "type": "array",
1783
+ "items": { "$ref": "#/$defs/planAssuranceCause" }
1784
+ }
1785
+ },
1786
+ "additionalProperties": false
1787
+ },
1788
+ "planAssuranceRequiredAction": {
1789
+ "type": "object",
1790
+ "required": ["kind", "root_task_ids", "affected_task_ids"],
1791
+ "properties": {
1792
+ "kind": {
1793
+ "enum": [
1794
+ "initial_seal",
1795
+ "replan_and_reseal",
1796
+ "restore_assurance_evidence"
1797
+ ]
1798
+ },
1799
+ "root_task_ids": { "$ref": "#/$defs/stringArray" },
1800
+ "affected_task_ids": { "$ref": "#/$defs/stringArray" }
1801
+ },
1802
+ "additionalProperties": false
1803
+ },
1804
+ "planAssuranceProjection": {
1805
+ "type": "object",
1806
+ "required": [
1807
+ "model_version",
1808
+ "hash_model_version",
1809
+ "coverage",
1810
+ "task_results",
1811
+ "direct_mismatch_task_ids",
1812
+ "inherited_mismatch_task_ids",
1813
+ "replan_required_task_ids",
1814
+ "active_attention_required_task_ids",
1815
+ "required_actions"
1816
+ ],
1817
+ "properties": {
1818
+ "model_version": { "type": ["integer", "null"] },
1819
+ "hash_model_version": { "type": ["integer", "null"] },
1820
+ "coverage": {
1821
+ "enum": ["not_enabled", "unsealed", "partial", "complete"]
1822
+ },
1823
+ "task_results": {
1824
+ "type": "array",
1825
+ "items": { "$ref": "#/$defs/planAssuranceTaskResult" }
1826
+ },
1827
+ "direct_mismatch_task_ids": { "$ref": "#/$defs/stringArray" },
1828
+ "inherited_mismatch_task_ids": { "$ref": "#/$defs/stringArray" },
1829
+ "replan_required_task_ids": { "$ref": "#/$defs/stringArray" },
1830
+ "active_attention_required_task_ids": { "$ref": "#/$defs/stringArray" },
1831
+ "required_actions": {
1832
+ "type": "array",
1833
+ "items": { "$ref": "#/$defs/planAssuranceRequiredAction" }
1834
+ }
1835
+ },
1836
+ "additionalProperties": false
1837
+ },
1838
+ "nullablePlanAssuranceProjection": {
1839
+ "oneOf": [
1840
+ { "$ref": "#/$defs/planAssuranceProjection" },
1841
+ { "type": "null" }
1842
+ ]
1843
+ },
1844
+ "planAssuranceStateCounts": {
1845
+ "type": "object",
1846
+ "required": ["task", "outcome"],
1847
+ "properties": {
1848
+ "task": {
1849
+ "type": "object",
1850
+ "required": [
1851
+ "not_applicable",
1852
+ "unsealed",
1853
+ "conditional",
1854
+ "verified",
1855
+ "review_required",
1856
+ "unavailable"
1857
+ ],
1858
+ "properties": {
1859
+ "not_applicable": { "type": "integer", "minimum": 0 },
1860
+ "unsealed": { "type": "integer", "minimum": 0 },
1861
+ "conditional": { "type": "integer", "minimum": 0 },
1862
+ "verified": { "type": "integer", "minimum": 0 },
1863
+ "review_required": { "type": "integer", "minimum": 0 },
1864
+ "unavailable": { "type": "integer", "minimum": 0 }
1865
+ },
1866
+ "additionalProperties": false
1867
+ },
1868
+ "outcome": {
1869
+ "type": "object",
1870
+ "required": ["unfinished", "conformant", "changed", "unavailable"],
1871
+ "properties": {
1872
+ "unfinished": { "type": "integer", "minimum": 0 },
1873
+ "conformant": { "type": "integer", "minimum": 0 },
1874
+ "changed": { "type": "integer", "minimum": 0 },
1875
+ "unavailable": { "type": "integer", "minimum": 0 }
1876
+ },
1877
+ "additionalProperties": false
1878
+ }
1879
+ },
1880
+ "additionalProperties": false
1881
+ },
1882
+ "planAssuranceEvaluation": {
1883
+ "type": "object",
1884
+ "required": [
1885
+ "ok",
1886
+ "model_version",
1887
+ "hash_model_version",
1888
+ "coverage",
1889
+ "effective_dependencies",
1890
+ "task_results",
1891
+ "direct_mismatch_task_ids",
1892
+ "inherited_mismatch_task_ids",
1893
+ "replan_required_task_ids",
1894
+ "unavailable_task_ids",
1895
+ "diagnostics"
1896
+ ],
1897
+ "properties": {
1898
+ "ok": { "type": "boolean" },
1899
+ "model_version": { "type": ["integer", "null"] },
1900
+ "hash_model_version": { "type": ["integer", "null"] },
1901
+ "coverage": {
1902
+ "enum": ["not_enabled", "unsealed", "partial", "complete", null]
1903
+ },
1904
+ "effective_dependencies": {
1905
+ "type": "array",
1906
+ "items": {
1907
+ "type": "object",
1908
+ "required": [
1909
+ "relation_id",
1910
+ "predecessor_task_id",
1911
+ "successor_task_id",
1912
+ "mode",
1913
+ "explicit"
1914
+ ],
1915
+ "properties": {
1916
+ "relation_id": { "$ref": "#/$defs/nullableString" },
1917
+ "predecessor_task_id": { "type": "string" },
1918
+ "successor_task_id": { "type": "string" },
1919
+ "mode": {
1920
+ "enum": ["both", "execution_only", "planning_only"]
1921
+ },
1922
+ "explicit": { "type": "boolean" }
1923
+ },
1924
+ "additionalProperties": false
1925
+ }
1926
+ },
1927
+ "task_results": {
1928
+ "type": "array",
1929
+ "items": { "$ref": "#/$defs/planAssuranceTaskResult" }
1930
+ },
1931
+ "direct_mismatch_task_ids": { "$ref": "#/$defs/stringArray" },
1932
+ "inherited_mismatch_task_ids": { "$ref": "#/$defs/stringArray" },
1933
+ "replan_required_task_ids": { "$ref": "#/$defs/stringArray" },
1934
+ "unavailable_task_ids": { "$ref": "#/$defs/stringArray" },
1935
+ "diagnostics": {
1936
+ "type": "array",
1937
+ "items": {
1938
+ "type": "object",
1939
+ "required": ["code", "message", "entity_id", "data"],
1940
+ "properties": {
1941
+ "code": { "enum": ["PTASSURE-101", "PTASSURE-102"] },
1942
+ "message": { "type": "string" },
1943
+ "entity_id": { "$ref": "#/$defs/nullableString" },
1944
+ "data": { "$ref": "#/$defs/jsonObject" }
1945
+ },
1946
+ "additionalProperties": false
1947
+ }
1948
+ }
1949
+ },
1950
+ "additionalProperties": false
1951
+ },
1952
+ "planAssuranceImpact": {
1953
+ "type": "object",
1954
+ "required": [
1955
+ "model_version",
1956
+ "affected_task_ids",
1957
+ "before",
1958
+ "after",
1959
+ "projection"
1960
+ ],
1961
+ "properties": {
1962
+ "model_version": { "const": 1 },
1963
+ "affected_task_ids": { "$ref": "#/$defs/stringArray" },
1964
+ "before": { "$ref": "#/$defs/planAssuranceEvaluation" },
1965
+ "after": { "$ref": "#/$defs/planAssuranceEvaluation" },
1966
+ "projection": {
1967
+ "type": "object",
1968
+ "required": [
1969
+ "model_version",
1970
+ "affected_task_ids",
1971
+ "before",
1972
+ "after",
1973
+ "diagnostics"
1974
+ ],
1975
+ "properties": {
1976
+ "model_version": { "const": 1 },
1977
+ "affected_task_ids": { "$ref": "#/$defs/stringArray" },
1978
+ "before": { "$ref": "#/$defs/nullablePlanAssuranceProjection" },
1979
+ "after": { "$ref": "#/$defs/nullablePlanAssuranceProjection" },
1980
+ "diagnostics": { "$ref": "#/$defs/diagnostics" }
1981
+ },
1982
+ "additionalProperties": false
1983
+ }
1984
+ },
1985
+ "additionalProperties": false
1986
+ },
1692
1987
  "governanceDecision": {
1693
1988
  "type": "object",
1694
1989
  "required": [
@@ -1709,16 +2004,16 @@
1709
2004
  ],
1710
2005
  "properties": {
1711
2006
  "schema_version": {
1712
- "const": "Perttool.GovernanceDecision.v1"
2007
+ "const": "Perttool.GovernanceDecision.v2"
1713
2008
  },
1714
2009
  "governance_interface_version": {
1715
- "const": 1
2010
+ "const": 2
1716
2011
  },
1717
2012
  "governance_source_contract_version": {
1718
2013
  "const": 1
1719
2014
  },
1720
2015
  "governance_semantics_version": {
1721
- "const": 1
2016
+ "const": 2
1722
2017
  },
1723
2018
  "source_digest": {
1724
2019
  "$ref": "#/$defs/digest"
@@ -1775,7 +2070,8 @@
1775
2070
  "scope": {
1776
2071
  "enum": [
1777
2072
  "goal",
1778
- "dag"
2073
+ "dag",
2074
+ "plan_assurance"
1779
2075
  ]
1780
2076
  },
1781
2077
  "required_owner": {
@@ -29,7 +29,7 @@
29
29
  "const": "Perttool.ExportResult.v1"
30
30
  },
31
31
  "cli_contract_version": {
32
- "const": 6
32
+ "const": 7
33
33
  },
34
34
  "tool_version": {
35
35
  "type": "string"
@@ -27,7 +27,7 @@
27
27
  "const": "Perttool.FormatResult.v1"
28
28
  },
29
29
  "cli_contract_version": {
30
- "const": 6
30
+ "const": 7
31
31
  },
32
32
  "tool_version": {
33
33
  "type": "string"
@@ -25,7 +25,7 @@
25
25
  "const": "Perttool.GuideResult.v1"
26
26
  },
27
27
  "cli_contract_version": {
28
- "const": 6
28
+ "const": 7
29
29
  },
30
30
  "tool_version": {
31
31
  "type": "string"
@@ -29,7 +29,7 @@
29
29
  "const": "Perttool.ImportResult.v1"
30
30
  },
31
31
  "cli_contract_version": {
32
- "const": 6
32
+ "const": 7
33
33
  },
34
34
  "tool_version": {
35
35
  "type": "string"
@@ -24,7 +24,7 @@
24
24
  "const": "Perttool.InitResult.v1"
25
25
  },
26
26
  "cli_contract_version": {
27
- "const": 6
27
+ "const": 7
28
28
  },
29
29
  "tool_version": {
30
30
  "type": "string"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://github.com/mako10k/perttool/schemas/Perttool.MutationResult.v3.schema.json",
4
- "title": "Perttool.MutationResult.v3",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.MutationResult.v4.schema.json",
4
+ "title": "Perttool.MutationResult.v4",
5
5
  "type": "object",
6
6
  "required": [
7
7
  "schema_version",
@@ -22,14 +22,15 @@
22
22
  "edits",
23
23
  "write",
24
24
  "governance",
25
- "lifecycle"
25
+ "lifecycle",
26
+ "assurance_impact"
26
27
  ],
27
28
  "properties": {
28
29
  "schema_version": {
29
- "const": "Perttool.MutationResult.v3"
30
+ "const": "Perttool.MutationResult.v4"
30
31
  },
31
32
  "cli_contract_version": {
32
- "const": 6
33
+ "const": 7
33
34
  },
34
35
  "tool_version": {
35
36
  "type": "string"
@@ -188,6 +189,16 @@
188
189
  "type": "null"
189
190
  }
190
191
  ]
192
+ },
193
+ "assurance_impact": {
194
+ "oneOf": [
195
+ {
196
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/planAssuranceImpact"
197
+ },
198
+ {
199
+ "type": "null"
200
+ }
201
+ ]
191
202
  }
192
203
  },
193
204
  "additionalProperties": false
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://github.com/mako10k/perttool/schemas/Perttool.NextResult.v5.schema.json",
4
- "title": "Perttool.NextResult.v5",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.NextResult.v6.schema.json",
4
+ "title": "Perttool.NextResult.v6",
5
5
  "$defs": {
6
6
  "tier": {
7
7
  "enum": [
@@ -1033,6 +1033,7 @@
1033
1033
  "type": "object",
1034
1034
  "required": [
1035
1035
  "policy",
1036
+ "complete",
1036
1037
  "recommendation_algorithm",
1037
1038
  "deadline_facts_used_for_ranking",
1038
1039
  "time_eligible_task_ids",
@@ -1040,11 +1041,20 @@
1040
1041
  "time_eligibility_unavailable_task_ids",
1041
1042
  "startable_recommended_task_ids",
1042
1043
  "delayed_recommended_task_ids",
1043
- "unavailable_recommended_task_ids"
1044
+ "unavailable_recommended_task_ids",
1045
+ "raw_recommended_task_ids",
1046
+ "temporal_startable_recommended_task_ids",
1047
+ "assurance_eligible_task_ids",
1048
+ "assurance_withheld_recommended_task_ids",
1049
+ "assurance_unavailable_recommended_task_ids",
1050
+ "safe_stop_reasons"
1044
1051
  ],
1045
1052
  "properties": {
1046
1053
  "policy": {
1047
- "const": "recommendation_v1_plus_release_gate"
1054
+ "const": "recommendation_v1_plus_release_gate_plus_plan_assurance_v1"
1055
+ },
1056
+ "complete": {
1057
+ "type": "boolean"
1048
1058
  },
1049
1059
  "recommendation_algorithm": {
1050
1060
  "type": "object",
@@ -1083,6 +1093,37 @@
1083
1093
  },
1084
1094
  "unavailable_recommended_task_ids": {
1085
1095
  "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1096
+ },
1097
+ "raw_recommended_task_ids": {
1098
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1099
+ },
1100
+ "temporal_startable_recommended_task_ids": {
1101
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1102
+ },
1103
+ "assurance_eligible_task_ids": {
1104
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1105
+ },
1106
+ "assurance_withheld_recommended_task_ids": {
1107
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1108
+ },
1109
+ "assurance_unavailable_recommended_task_ids": {
1110
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1111
+ },
1112
+ "safe_stop_reasons": {
1113
+ "type": "array",
1114
+ "items": {
1115
+ "enum": [
1116
+ "unknown_recommendation_interface",
1117
+ "unknown_ranking_algorithm",
1118
+ "unknown_recommendation_contract",
1119
+ "unknown_temporal_authority_policy",
1120
+ "incomplete_recommendation_trace",
1121
+ "invalid_recommendation_authority",
1122
+ "invalid_assurance_evaluation",
1123
+ "unknown_assurance_model",
1124
+ "missing_assurance_task_result"
1125
+ ]
1126
+ }
1086
1127
  }
1087
1128
  },
1088
1129
  "additionalProperties": false
@@ -1111,14 +1152,15 @@
1111
1152
  "diagnostics",
1112
1153
  "diagnostics_truncated",
1113
1154
  "grammar_version",
1114
- "temporal"
1155
+ "temporal",
1156
+ "assurance"
1115
1157
  ],
1116
1158
  "properties": {
1117
1159
  "schema_version": {
1118
- "const": "Perttool.NextResult.v5"
1160
+ "const": "Perttool.NextResult.v6"
1119
1161
  },
1120
1162
  "cli_contract_version": {
1121
- "const": 6
1163
+ "const": 7
1122
1164
  },
1123
1165
  "recommendation_interface_version": {
1124
1166
  "const": 1
@@ -1153,7 +1195,7 @@
1153
1195
  "null"
1154
1196
  ],
1155
1197
  "minimum": 1,
1156
- "maximum": 5
1198
+ "maximum": 6
1157
1199
  },
1158
1200
  "precision": {
1159
1201
  "type": "integer",
@@ -1258,6 +1300,9 @@
1258
1300
  "type": "null"
1259
1301
  }
1260
1302
  ]
1303
+ },
1304
+ "assurance": {
1305
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullablePlanAssuranceProjection"
1261
1306
  }
1262
1307
  },
1263
1308
  "additionalProperties": false
@@ -306,7 +306,7 @@
306
306
  ],
307
307
  "properties": {
308
308
  "schema_version": {
309
- "const": "Perttool.NextResult.v5"
309
+ "const": "Perttool.NextResult.v6"
310
310
  },
311
311
  "tool_version": {
312
312
  "type": "string"
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.PlanAssuranceResult.v1.schema.json",
4
+ "title": "Perttool.PlanAssuranceResult.v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "cli_contract_version",
9
+ "tool_version",
10
+ "operation",
11
+ "ok",
12
+ "document_id",
13
+ "source",
14
+ "source_digest",
15
+ "diagnostics",
16
+ "diagnostics_truncated",
17
+ "grammar_version",
18
+ "selected_task_ids",
19
+ "task_id",
20
+ "kind",
21
+ "selected_hash",
22
+ "assurance"
23
+ ],
24
+ "properties": {
25
+ "schema_version": {
26
+ "const": "Perttool.PlanAssuranceResult.v1"
27
+ },
28
+ "cli_contract_version": {
29
+ "const": 7
30
+ },
31
+ "tool_version": {
32
+ "type": "string"
33
+ },
34
+ "operation": {
35
+ "enum": ["plan-assurance.show", "plan-assurance.hash"]
36
+ },
37
+ "ok": {
38
+ "type": "boolean"
39
+ },
40
+ "document_id": {
41
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
42
+ },
43
+ "source": {
44
+ "type": "string"
45
+ },
46
+ "source_digest": {
47
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
48
+ },
49
+ "diagnostics": {
50
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
51
+ },
52
+ "diagnostics_truncated": {
53
+ "type": "boolean"
54
+ },
55
+ "grammar_version": {
56
+ "type": ["integer", "null"],
57
+ "minimum": 1,
58
+ "maximum": 6
59
+ },
60
+ "selected_task_ids": {
61
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
62
+ },
63
+ "task_id": {
64
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
65
+ },
66
+ "kind": {
67
+ "enum": ["contract", "computed-basis", "exported", null]
68
+ },
69
+ "selected_hash": {
70
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
71
+ },
72
+ "assurance": {
73
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullablePlanAssuranceProjection"
74
+ }
75
+ },
76
+ "additionalProperties": false
77
+ }
@@ -225,7 +225,7 @@
225
225
  "const": "Perttool.ProjectHistoryResult.v1"
226
226
  },
227
227
  "cli_contract_version": {
228
- "const": 6
228
+ "const": 7
229
229
  },
230
230
  "tool_version": {
231
231
  "type": "string"