perttool 0.5.0 → 0.5.2

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 (41) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +66 -28
  3. package/dist/cli.js +41 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/command/actuals-discovery.d.ts.map +1 -1
  6. package/dist/command/actuals-discovery.js +92 -13
  7. package/dist/command/actuals-discovery.js.map +1 -1
  8. package/dist/history/git-probe.d.ts +4 -0
  9. package/dist/history/git-probe.d.ts.map +1 -1
  10. package/dist/history/git-probe.js +23 -14
  11. package/dist/history/git-probe.js.map +1 -1
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/schema/registry.d.ts +53 -0
  17. package/dist/schema/registry.d.ts.map +1 -0
  18. package/dist/schema/registry.js +346 -0
  19. package/dist/schema/registry.js.map +1 -0
  20. package/dist/version.d.ts +1 -1
  21. package/dist/version.js +1 -1
  22. package/package.json +5 -2
  23. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +607 -0
  24. package/schemas/Perttool.AnalysisResult.v4.schema.json +790 -0
  25. package/schemas/Perttool.CheckResult.v3.schema.json +203 -0
  26. package/schemas/Perttool.CliError.v1.schema.json +119 -0
  27. package/schemas/Perttool.CommandHelpResult.v1.schema.json +377 -0
  28. package/schemas/Perttool.Common.v1.schema.json +1893 -0
  29. package/schemas/Perttool.ExportResult.v1.schema.json +96 -0
  30. package/schemas/Perttool.FormatResult.v1.schema.json +82 -0
  31. package/schemas/Perttool.GuideResult.v1.schema.json +138 -0
  32. package/schemas/Perttool.ImportResult.v1.schema.json +111 -0
  33. package/schemas/Perttool.InitResult.v1.schema.json +70 -0
  34. package/schemas/Perttool.MutationResult.v3.schema.json +194 -0
  35. package/schemas/Perttool.NextResult.v5.schema.json +1264 -0
  36. package/schemas/Perttool.OverrideDecision.v1.schema.json +402 -0
  37. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +283 -0
  38. package/schemas/Perttool.ProjectResult.v3.schema.json +217 -0
  39. package/schemas/Perttool.SchemaResult.v1.schema.json +137 -0
  40. package/schemas/Perttool.UnitMigrationResult.v3.schema.json +343 -0
  41. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +301 -0
@@ -0,0 +1,96 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.ExportResult.v1.schema.json",
4
+ "title": "Perttool.ExportResult.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
+ "artifact_format",
18
+ "profile",
19
+ "analysis",
20
+ "capacity_overrides",
21
+ "artifact",
22
+ "artifact_digest",
23
+ "loss_report",
24
+ "generated_ids",
25
+ "write"
26
+ ],
27
+ "properties": {
28
+ "schema_version": {
29
+ "const": "Perttool.ExportResult.v1"
30
+ },
31
+ "cli_contract_version": {
32
+ "const": 6
33
+ },
34
+ "tool_version": {
35
+ "type": "string"
36
+ },
37
+ "operation": {
38
+ "const": "dag.render"
39
+ },
40
+ "ok": {
41
+ "type": "boolean"
42
+ },
43
+ "document_id": {
44
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
45
+ },
46
+ "source": {
47
+ "type": "string"
48
+ },
49
+ "source_digest": {
50
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
51
+ },
52
+ "diagnostics": {
53
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
54
+ },
55
+ "diagnostics_truncated": {
56
+ "type": "boolean"
57
+ },
58
+ "artifact_format": {
59
+ "const": "mermaid"
60
+ },
61
+ "profile": {
62
+ "enum": [
63
+ "perttool",
64
+ "plain"
65
+ ]
66
+ },
67
+ "analysis": {
68
+ "enum": [
69
+ "none",
70
+ "precedence",
71
+ "resource",
72
+ "both"
73
+ ]
74
+ },
75
+ "capacity_overrides": {
76
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/capacityOverrides"
77
+ },
78
+ "artifact": {
79
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
80
+ },
81
+ "artifact_digest": {
82
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
83
+ },
84
+ "loss_report": {
85
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/lossReport"
86
+ },
87
+ "generated_ids": {
88
+ "type": "array",
89
+ "maxItems": 0
90
+ },
91
+ "write": {
92
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/write"
93
+ }
94
+ },
95
+ "additionalProperties": false
96
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.FormatResult.v1.schema.json",
4
+ "title": "Perttool.FormatResult.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
+ "changed",
18
+ "original_digest",
19
+ "updated_digest",
20
+ "updated_text",
21
+ "diff",
22
+ "edits",
23
+ "write"
24
+ ],
25
+ "properties": {
26
+ "schema_version": {
27
+ "const": "Perttool.FormatResult.v1"
28
+ },
29
+ "cli_contract_version": {
30
+ "const": 6
31
+ },
32
+ "tool_version": {
33
+ "type": "string"
34
+ },
35
+ "operation": {
36
+ "const": "document.format"
37
+ },
38
+ "ok": {
39
+ "type": "boolean"
40
+ },
41
+ "document_id": {
42
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
43
+ },
44
+ "source": {
45
+ "type": "string"
46
+ },
47
+ "source_digest": {
48
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
49
+ },
50
+ "diagnostics": {
51
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
52
+ },
53
+ "diagnostics_truncated": {
54
+ "type": "boolean"
55
+ },
56
+ "changed": {
57
+ "type": "boolean"
58
+ },
59
+ "original_digest": {
60
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
61
+ },
62
+ "updated_digest": {
63
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
64
+ },
65
+ "updated_text": {
66
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
67
+ },
68
+ "diff": {
69
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
70
+ },
71
+ "edits": {
72
+ "type": "array",
73
+ "items": {
74
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/edit"
75
+ }
76
+ },
77
+ "write": {
78
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/write"
79
+ }
80
+ },
81
+ "additionalProperties": false
82
+ }
@@ -0,0 +1,138 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.GuideResult.v1.schema.json",
4
+ "title": "Perttool.GuideResult.v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "cli_contract_version",
9
+ "tool_version",
10
+ "operation",
11
+ "ok",
12
+ "diagnostics",
13
+ "topic_id",
14
+ "level",
15
+ "title",
16
+ "summary",
17
+ "sections",
18
+ "syntax",
19
+ "examples",
20
+ "related",
21
+ "topics"
22
+ ],
23
+ "properties": {
24
+ "schema_version": {
25
+ "const": "Perttool.GuideResult.v1"
26
+ },
27
+ "cli_contract_version": {
28
+ "const": 6
29
+ },
30
+ "tool_version": {
31
+ "type": "string"
32
+ },
33
+ "operation": {
34
+ "const": "guide"
35
+ },
36
+ "ok": {
37
+ "type": "boolean"
38
+ },
39
+ "diagnostics": {
40
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
41
+ },
42
+ "topic_id": {
43
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
44
+ },
45
+ "level": {
46
+ "enum": [
47
+ "index",
48
+ "quick",
49
+ "detail"
50
+ ]
51
+ },
52
+ "title": {
53
+ "type": "string"
54
+ },
55
+ "summary": {
56
+ "type": "string"
57
+ },
58
+ "sections": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "required": [
63
+ "id",
64
+ "title",
65
+ "body"
66
+ ],
67
+ "properties": {
68
+ "id": {
69
+ "type": "string"
70
+ },
71
+ "title": {
72
+ "type": "string"
73
+ },
74
+ "body": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "additionalProperties": false
79
+ }
80
+ },
81
+ "syntax": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "string"
85
+ }
86
+ },
87
+ "examples": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "object",
91
+ "required": [
92
+ "id",
93
+ "title",
94
+ "text"
95
+ ],
96
+ "properties": {
97
+ "id": {
98
+ "type": "string"
99
+ },
100
+ "title": {
101
+ "type": "string"
102
+ },
103
+ "text": {
104
+ "type": "string"
105
+ }
106
+ },
107
+ "additionalProperties": false
108
+ }
109
+ },
110
+ "related": {
111
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
112
+ },
113
+ "topics": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "required": [
118
+ "id",
119
+ "title",
120
+ "summary"
121
+ ],
122
+ "properties": {
123
+ "id": {
124
+ "type": "string"
125
+ },
126
+ "title": {
127
+ "type": "string"
128
+ },
129
+ "summary": {
130
+ "type": "string"
131
+ }
132
+ },
133
+ "additionalProperties": false
134
+ }
135
+ }
136
+ },
137
+ "additionalProperties": false
138
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.ImportResult.v1.schema.json",
4
+ "title": "Perttool.ImportResult.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
+ "artifact_format",
18
+ "profile",
19
+ "analysis",
20
+ "capacity_overrides",
21
+ "artifact",
22
+ "artifact_digest",
23
+ "loss_report",
24
+ "generated_ids",
25
+ "write"
26
+ ],
27
+ "properties": {
28
+ "schema_version": {
29
+ "const": "Perttool.ImportResult.v1"
30
+ },
31
+ "cli_contract_version": {
32
+ "const": 6
33
+ },
34
+ "tool_version": {
35
+ "type": "string"
36
+ },
37
+ "operation": {
38
+ "const": "dag.import"
39
+ },
40
+ "ok": {
41
+ "type": "boolean"
42
+ },
43
+ "document_id": {
44
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
45
+ },
46
+ "source": {
47
+ "type": "string"
48
+ },
49
+ "source_digest": {
50
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
51
+ },
52
+ "diagnostics": {
53
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
54
+ },
55
+ "diagnostics_truncated": {
56
+ "type": "boolean"
57
+ },
58
+ "artifact_format": {
59
+ "const": "pert"
60
+ },
61
+ "profile": {
62
+ "enum": [
63
+ "perttool",
64
+ "plain"
65
+ ]
66
+ },
67
+ "analysis": {
68
+ "enum": [
69
+ "none",
70
+ "precedence",
71
+ "resource",
72
+ "both"
73
+ ]
74
+ },
75
+ "capacity_overrides": {
76
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/capacityOverrides"
77
+ },
78
+ "artifact": {
79
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
80
+ },
81
+ "artifact_digest": {
82
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
83
+ },
84
+ "loss_report": {
85
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/lossReport"
86
+ },
87
+ "generated_ids": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "object",
91
+ "required": [
92
+ "source_element",
93
+ "generated_id"
94
+ ],
95
+ "properties": {
96
+ "source_element": {
97
+ "type": "string"
98
+ },
99
+ "generated_id": {
100
+ "type": "string"
101
+ }
102
+ },
103
+ "additionalProperties": false
104
+ }
105
+ },
106
+ "write": {
107
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/write"
108
+ }
109
+ },
110
+ "additionalProperties": false
111
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.InitResult.v1.schema.json",
4
+ "title": "Perttool.InitResult.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
+ "candidate_text",
16
+ "candidate_digest",
17
+ "edits",
18
+ "write",
19
+ "diagnostics",
20
+ "diagnostics_truncated"
21
+ ],
22
+ "properties": {
23
+ "schema_version": {
24
+ "const": "Perttool.InitResult.v1"
25
+ },
26
+ "cli_contract_version": {
27
+ "const": 6
28
+ },
29
+ "tool_version": {
30
+ "type": "string"
31
+ },
32
+ "operation": {
33
+ "const": "project.init"
34
+ },
35
+ "ok": {
36
+ "type": "boolean"
37
+ },
38
+ "document_id": {
39
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
40
+ },
41
+ "source": {
42
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
43
+ },
44
+ "source_digest": {
45
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
46
+ },
47
+ "candidate_text": {
48
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
49
+ },
50
+ "candidate_digest": {
51
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
52
+ },
53
+ "edits": {
54
+ "type": "array",
55
+ "items": {
56
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/edit"
57
+ }
58
+ },
59
+ "write": {
60
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/write"
61
+ },
62
+ "diagnostics": {
63
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
64
+ },
65
+ "diagnostics_truncated": {
66
+ "type": "boolean"
67
+ }
68
+ },
69
+ "additionalProperties": false
70
+ }
@@ -0,0 +1,194 @@
1
+ {
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",
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
+ "changed",
18
+ "original_digest",
19
+ "updated_digest",
20
+ "updated_text",
21
+ "diff",
22
+ "edits",
23
+ "write",
24
+ "governance",
25
+ "lifecycle"
26
+ ],
27
+ "properties": {
28
+ "schema_version": {
29
+ "const": "Perttool.MutationResult.v3"
30
+ },
31
+ "cli_contract_version": {
32
+ "const": 6
33
+ },
34
+ "tool_version": {
35
+ "type": "string"
36
+ },
37
+ "operation": {
38
+ "type": "string"
39
+ },
40
+ "ok": {
41
+ "type": "boolean"
42
+ },
43
+ "document_id": {
44
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
45
+ },
46
+ "source": {
47
+ "type": "string"
48
+ },
49
+ "source_digest": {
50
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
51
+ },
52
+ "diagnostics": {
53
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
54
+ },
55
+ "diagnostics_truncated": {
56
+ "type": "boolean"
57
+ },
58
+ "changed": {
59
+ "type": "boolean"
60
+ },
61
+ "original_digest": {
62
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
63
+ },
64
+ "updated_digest": {
65
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
66
+ },
67
+ "updated_text": {
68
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
69
+ },
70
+ "diff": {
71
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
72
+ },
73
+ "edits": {
74
+ "type": "array",
75
+ "items": {
76
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/edit"
77
+ }
78
+ },
79
+ "write": {
80
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/write"
81
+ },
82
+ "governance": {
83
+ "oneOf": [
84
+ {
85
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/governanceDecision"
86
+ },
87
+ {
88
+ "type": "null"
89
+ }
90
+ ]
91
+ },
92
+ "lifecycle": {
93
+ "oneOf": [
94
+ {
95
+ "type": "object",
96
+ "required": [
97
+ "model_version",
98
+ "task_id",
99
+ "from_state",
100
+ "to_state",
101
+ "event",
102
+ "coverage"
103
+ ],
104
+ "properties": {
105
+ "model_version": {
106
+ "const": 1
107
+ },
108
+ "task_id": {
109
+ "type": "string"
110
+ },
111
+ "from_state": {
112
+ "enum": [
113
+ "planned",
114
+ "active",
115
+ "blocked",
116
+ "suspended",
117
+ "done"
118
+ ]
119
+ },
120
+ "to_state": {
121
+ "enum": [
122
+ "active",
123
+ "suspended",
124
+ "done"
125
+ ]
126
+ },
127
+ "event": {
128
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/workEvent"
129
+ },
130
+ "coverage": {
131
+ "enum": [
132
+ "open",
133
+ "finish_only",
134
+ "complete"
135
+ ]
136
+ }
137
+ },
138
+ "additionalProperties": false
139
+ },
140
+ {
141
+ "type": "null"
142
+ }
143
+ ]
144
+ },
145
+ "advance": {
146
+ "oneOf": [
147
+ {
148
+ "type": "object",
149
+ "required": [
150
+ "removed_task_ids",
151
+ "removed_gate_ids",
152
+ "removed_milestone_ids",
153
+ "removed_work_event_ids",
154
+ "frontier_before",
155
+ "frontier_after",
156
+ "ready_before",
157
+ "ready_after"
158
+ ],
159
+ "properties": {
160
+ "removed_task_ids": {
161
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
162
+ },
163
+ "removed_gate_ids": {
164
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
165
+ },
166
+ "removed_milestone_ids": {
167
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
168
+ },
169
+ "removed_work_event_ids": {
170
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
171
+ },
172
+ "frontier_before": {
173
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
174
+ },
175
+ "frontier_after": {
176
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
177
+ },
178
+ "ready_before": {
179
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
180
+ },
181
+ "ready_after": {
182
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
183
+ }
184
+ },
185
+ "additionalProperties": false
186
+ },
187
+ {
188
+ "type": "null"
189
+ }
190
+ ]
191
+ }
192
+ },
193
+ "additionalProperties": false
194
+ }