@proletariat/cli 0.3.22 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -21
- package/README.md +7 -7
- package/dist/commands/action/create.js +1 -1
- package/dist/commands/agent/{temp/cleanup.d.ts → cleanup.d.ts} +1 -1
- package/dist/commands/agent/{temp/cleanup.js → cleanup.js} +4 -4
- package/dist/commands/agent/index.js +8 -8
- package/dist/commands/branch/create.js +2 -2
- package/dist/commands/epic/create.d.ts +1 -0
- package/dist/commands/epic/create.js +39 -2
- package/dist/commands/epic/index.js +2 -2
- package/dist/commands/{epic/link/remove.d.ts → link/create.d.ts} +6 -7
- package/dist/commands/link/create.js +141 -0
- package/dist/commands/{epic/link/relates.d.ts → link/index.d.ts} +4 -5
- package/dist/commands/link/index.js +87 -0
- package/dist/commands/{epic/link/duplicates.d.ts → link/list.d.ts} +7 -4
- package/dist/commands/link/list.js +182 -0
- package/dist/commands/{spec/link → link}/remove.d.ts +4 -5
- package/dist/commands/link/remove.js +120 -0
- package/dist/commands/mcp-server.d.ts +22 -0
- package/dist/commands/mcp-server.js +98 -0
- package/dist/commands/phase/create.js +1 -1
- package/dist/commands/project/create.d.ts +1 -0
- package/dist/commands/project/create.js +38 -4
- package/dist/commands/spec/create.d.ts +1 -0
- package/dist/commands/spec/create.js +43 -2
- package/dist/commands/spec/index.js +2 -2
- package/dist/commands/{agent/staff → staff}/add.js +10 -10
- package/dist/commands/{agent/staff → staff}/index.d.ts +1 -1
- package/dist/commands/{agent/staff → staff}/index.js +7 -7
- package/dist/commands/{agent/staff → staff}/list.js +3 -3
- package/dist/commands/{agent/staff → staff}/remove.d.ts +1 -1
- package/dist/commands/{agent/staff → staff}/remove.js +8 -8
- package/dist/commands/{ticket/template → template}/apply.d.ts +8 -6
- package/dist/commands/template/apply.js +262 -0
- package/dist/commands/{ticket/template → template}/create.d.ts +5 -6
- package/dist/commands/template/create.js +238 -0
- package/dist/commands/template/index.js +48 -36
- package/dist/commands/{ticket/template → template}/save.d.ts +2 -2
- package/dist/commands/template/save.js +104 -0
- package/dist/commands/{phase/template → template}/update.d.ts +2 -2
- package/dist/commands/template/update.js +99 -0
- package/dist/commands/{agent/themes → theme}/add-names.d.ts +1 -1
- package/dist/commands/{agent/themes → theme}/add-names.js +6 -6
- package/dist/commands/{agent/themes → theme}/create.d.ts +1 -1
- package/dist/commands/{agent/themes → theme}/create.js +5 -5
- package/dist/commands/{agent/themes → theme}/index.d.ts +1 -1
- package/dist/commands/{agent/themes → theme}/index.js +10 -10
- package/dist/commands/{agent/themes → theme}/list.d.ts +1 -1
- package/dist/commands/{agent/themes → theme}/list.js +5 -5
- package/dist/commands/{agent/themes → theme}/set.d.ts +1 -1
- package/dist/commands/{agent/themes → theme}/set.js +7 -7
- package/dist/commands/ticket/create.d.ts +1 -0
- package/dist/commands/ticket/create.js +54 -2
- package/dist/commands/ticket/index.js +6 -6
- package/dist/commands/work/spawn.js +1 -1
- package/dist/lib/mcp/helpers.d.ts +43 -0
- package/dist/lib/mcp/helpers.js +57 -0
- package/dist/lib/mcp/index.d.ts +6 -0
- package/dist/lib/mcp/index.js +6 -0
- package/dist/lib/mcp/tools/action.d.ts +6 -0
- package/dist/lib/mcp/tools/action.js +88 -0
- package/dist/lib/mcp/tools/board.d.ts +6 -0
- package/dist/lib/mcp/tools/board.js +139 -0
- package/dist/lib/mcp/tools/category.d.ts +6 -0
- package/dist/lib/mcp/tools/category.js +84 -0
- package/dist/lib/mcp/tools/cli-passthrough.d.ts +15 -0
- package/dist/lib/mcp/tools/cli-passthrough.js +333 -0
- package/dist/lib/mcp/tools/epic.d.ts +6 -0
- package/dist/lib/mcp/tools/epic.js +178 -0
- package/dist/lib/mcp/tools/index.d.ts +18 -0
- package/dist/lib/mcp/tools/index.js +19 -0
- package/dist/lib/mcp/tools/phase.d.ts +6 -0
- package/dist/lib/mcp/tools/phase.js +131 -0
- package/dist/lib/mcp/tools/project.d.ts +6 -0
- package/dist/lib/mcp/tools/project.js +196 -0
- package/dist/lib/mcp/tools/roadmap.d.ts +6 -0
- package/dist/lib/mcp/tools/roadmap.js +123 -0
- package/dist/lib/mcp/tools/spec.d.ts +6 -0
- package/dist/lib/mcp/tools/spec.js +196 -0
- package/dist/lib/mcp/tools/status.d.ts +6 -0
- package/dist/lib/mcp/tools/status.js +109 -0
- package/dist/lib/mcp/tools/template.d.ts +6 -0
- package/dist/lib/mcp/tools/template.js +107 -0
- package/dist/lib/mcp/tools/ticket.d.ts +6 -0
- package/dist/lib/mcp/tools/ticket.js +393 -0
- package/dist/lib/mcp/tools/view.d.ts +6 -0
- package/dist/lib/mcp/tools/view.js +76 -0
- package/dist/lib/mcp/tools/work.d.ts +6 -0
- package/dist/lib/mcp/tools/work.js +132 -0
- package/dist/lib/mcp/tools/workflow.d.ts +6 -0
- package/dist/lib/mcp/tools/workflow.js +95 -0
- package/dist/lib/mcp/types.d.ts +17 -0
- package/dist/lib/mcp/types.js +4 -0
- package/dist/lib/prompt-json.d.ts +52 -1
- package/dist/lib/prompt-json.js +45 -0
- package/oclif.manifest.json +3553 -5457
- package/package.json +10 -7
- package/dist/commands/agent/temp/index.d.ts +0 -14
- package/dist/commands/agent/temp/index.js +0 -85
- package/dist/commands/agent/temp/list.d.ts +0 -7
- package/dist/commands/agent/temp/list.js +0 -108
- package/dist/commands/epic/link/block.d.ts +0 -14
- package/dist/commands/epic/link/block.js +0 -81
- package/dist/commands/epic/link/duplicates.js +0 -68
- package/dist/commands/epic/link/index.d.ts +0 -19
- package/dist/commands/epic/link/index.js +0 -272
- package/dist/commands/epic/link/relates.js +0 -68
- package/dist/commands/epic/link/remove.js +0 -93
- package/dist/commands/phase/template/apply.d.ts +0 -17
- package/dist/commands/phase/template/apply.js +0 -108
- package/dist/commands/phase/template/create.d.ts +0 -17
- package/dist/commands/phase/template/create.js +0 -104
- package/dist/commands/phase/template/delete.d.ts +0 -17
- package/dist/commands/phase/template/delete.js +0 -100
- package/dist/commands/phase/template/index.d.ts +0 -15
- package/dist/commands/phase/template/index.js +0 -130
- package/dist/commands/phase/template/list.d.ts +0 -16
- package/dist/commands/phase/template/list.js +0 -97
- package/dist/commands/phase/template/update.js +0 -89
- package/dist/commands/spec/link/depends.d.ts +0 -14
- package/dist/commands/spec/link/depends.js +0 -64
- package/dist/commands/spec/link/duplicates.d.ts +0 -14
- package/dist/commands/spec/link/duplicates.js +0 -63
- package/dist/commands/spec/link/index.d.ts +0 -19
- package/dist/commands/spec/link/index.js +0 -207
- package/dist/commands/spec/link/relates.d.ts +0 -14
- package/dist/commands/spec/link/relates.js +0 -63
- package/dist/commands/spec/link/remove.js +0 -96
- package/dist/commands/template/phase/apply.d.ts +0 -14
- package/dist/commands/template/phase/apply.js +0 -43
- package/dist/commands/template/phase/create.d.ts +0 -13
- package/dist/commands/template/phase/create.js +0 -38
- package/dist/commands/template/phase/delete.d.ts +0 -13
- package/dist/commands/template/phase/delete.js +0 -36
- package/dist/commands/template/phase/index.d.ts +0 -10
- package/dist/commands/template/phase/index.js +0 -63
- package/dist/commands/template/phase/list.d.ts +0 -11
- package/dist/commands/template/phase/list.js +0 -36
- package/dist/commands/template/phase/update.d.ts +0 -14
- package/dist/commands/template/phase/update.js +0 -43
- package/dist/commands/template/ticket/apply.d.ts +0 -17
- package/dist/commands/template/ticket/apply.js +0 -60
- package/dist/commands/template/ticket/create.d.ts +0 -20
- package/dist/commands/template/ticket/create.js +0 -89
- package/dist/commands/template/ticket/delete.d.ts +0 -13
- package/dist/commands/template/ticket/delete.js +0 -38
- package/dist/commands/template/ticket/index.d.ts +0 -10
- package/dist/commands/template/ticket/index.js +0 -63
- package/dist/commands/template/ticket/list.d.ts +0 -11
- package/dist/commands/template/ticket/list.js +0 -36
- package/dist/commands/template/ticket/save.d.ts +0 -15
- package/dist/commands/template/ticket/save.js +0 -46
- package/dist/commands/ticket/link/block.d.ts +0 -14
- package/dist/commands/ticket/link/block.js +0 -96
- package/dist/commands/ticket/link/duplicates.d.ts +0 -14
- package/dist/commands/ticket/link/duplicates.js +0 -95
- package/dist/commands/ticket/link/index.d.ts +0 -19
- package/dist/commands/ticket/link/index.js +0 -256
- package/dist/commands/ticket/link/relates.d.ts +0 -14
- package/dist/commands/ticket/link/relates.js +0 -95
- package/dist/commands/ticket/link/remove.d.ts +0 -16
- package/dist/commands/ticket/link/remove.js +0 -132
- package/dist/commands/ticket/template/apply.js +0 -252
- package/dist/commands/ticket/template/create.js +0 -386
- package/dist/commands/ticket/template/delete.d.ts +0 -17
- package/dist/commands/ticket/template/delete.js +0 -94
- package/dist/commands/ticket/template/index.d.ts +0 -15
- package/dist/commands/ticket/template/index.js +0 -120
- package/dist/commands/ticket/template/list.d.ts +0 -16
- package/dist/commands/ticket/template/list.js +0 -112
- package/dist/commands/ticket/template/save.js +0 -163
- /package/dist/commands/{agent/staff → staff}/add.d.ts +0 -0
- /package/dist/commands/{agent/staff → staff}/list.d.ts +0 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,190 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2025 Chris McDermut
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -88,19 +88,19 @@ Spawn agents to implement, groom, or review—not just write code.
|
|
|
88
88
|
`prlt work` guides you through project and ticket selection:
|
|
89
89
|
|
|
90
90
|
<p align="center">
|
|
91
|
-
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat
|
|
91
|
+
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat/main/apps/cli/images/work/work-project-select.png" alt="Project Selection" width="600">
|
|
92
92
|
</p>
|
|
93
93
|
|
|
94
94
|
Choose your operation—start a single agent, batch spawn, or watch a column:
|
|
95
95
|
|
|
96
96
|
<p align="center">
|
|
97
|
-
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat
|
|
97
|
+
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat/main/apps/cli/images/work/work-operations-menu.png" alt="Work Operations Menu" width="600">
|
|
98
98
|
</p>
|
|
99
99
|
|
|
100
100
|
Select tickets to spawn, grouped by priority:
|
|
101
101
|
|
|
102
102
|
<p align="center">
|
|
103
|
-
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat
|
|
103
|
+
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat/main/apps/cli/images/work/work-ticket-select.png" alt="Ticket Selection" width="800">
|
|
104
104
|
</p>
|
|
105
105
|
|
|
106
106
|
---
|
|
@@ -254,7 +254,7 @@ $ prlt ticket create
|
|
|
254
254
|
View ticket details with `prlt ticket`:
|
|
255
255
|
|
|
256
256
|
<p align="center">
|
|
257
|
-
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat
|
|
257
|
+
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat/main/apps/cli/images/ticket/ticket-view.png" alt="Ticket View" width="600">
|
|
258
258
|
</p>
|
|
259
259
|
|
|
260
260
|
#### 2. JSON Mode (AI Agents)
|
|
@@ -386,7 +386,7 @@ Each agent works in its own branch. No conflicts.
|
|
|
386
386
|
Monitor running agents with `prlt execution`:
|
|
387
387
|
|
|
388
388
|
<p align="center">
|
|
389
|
-
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat
|
|
389
|
+
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat/main/apps/cli/images/execution/execution-list.png" alt="Execution List" width="800">
|
|
390
390
|
</p>
|
|
391
391
|
|
|
392
392
|
```mermaid
|
|
@@ -419,7 +419,7 @@ flowchart LR
|
|
|
419
419
|
Agent-created PRs ready for review:
|
|
420
420
|
|
|
421
421
|
<p align="center">
|
|
422
|
-
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat
|
|
422
|
+
<img src="https://raw.githubusercontent.com/chrismcdermut/proletariat/main/apps/cli/images/execution/github-prs.png" alt="GitHub Pull Requests" width="800">
|
|
423
423
|
</p>
|
|
424
424
|
|
|
425
425
|
### Command Reference
|
|
@@ -641,7 +641,7 @@ Claude Code handles its own authentication via `claude login`.
|
|
|
641
641
|
## Support
|
|
642
642
|
|
|
643
643
|
- **Discord**: [discord.gg/tmZyjNNSvw](https://discord.gg/tmZyjNNSvw)
|
|
644
|
-
- **GitHub Issues**: [Report bugs or request features](https://github.com/chrismcdermut/proletariat
|
|
644
|
+
- **GitHub Issues**: [Report bugs or request features](https://github.com/chrismcdermut/proletariat/issues)
|
|
645
645
|
- **Setup Help**: [Book a call][cal-link] - I'll help you get things running
|
|
646
646
|
|
|
647
647
|
---
|
|
@@ -21,7 +21,7 @@ export default class ActionCreate extends PMOCommand {
|
|
|
21
21
|
...pmoBaseFlags,
|
|
22
22
|
prompt: Flags.string({
|
|
23
23
|
char: 'p',
|
|
24
|
-
description: 'The prompt to send to the agent',
|
|
24
|
+
description: 'The prompt to send to the agent [required for non-interactive]',
|
|
25
25
|
}),
|
|
26
26
|
description: Flags.string({
|
|
27
27
|
char: 'd',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
|
-
import { colors, format } from '
|
|
4
|
-
import { getWorkspaceInfo, cleanupAgent, getCleanableAgents, getAgentTmuxSessions } from '
|
|
5
|
-
import { PMOCommand, pmoBaseFlags } from '
|
|
6
|
-
import { shouldOutputJson, outputPromptAsJson, outputErrorAsJson, outputSuccessAsJson, createMetadata, buildPromptConfig, } from '
|
|
3
|
+
import { colors, format } from '../../lib/colors.js';
|
|
4
|
+
import { getWorkspaceInfo, cleanupAgent, getCleanableAgents, getAgentTmuxSessions } from '../../lib/agents/commands.js';
|
|
5
|
+
import { PMOCommand, pmoBaseFlags } from '../../lib/pmo/index.js';
|
|
6
|
+
import { shouldOutputJson, outputPromptAsJson, outputErrorAsJson, outputSuccessAsJson, createMetadata, buildPromptConfig, } from '../../lib/prompt-json.js';
|
|
7
7
|
export default class Cleanup extends PMOCommand {
|
|
8
8
|
static description = 'Clean up agent resources (containers, directories, tmux sessions)';
|
|
9
9
|
static examples = [
|
|
@@ -10,7 +10,7 @@ export default class Agent extends PMOCommand {
|
|
|
10
10
|
'<%= config.bin %> <%= command.id %> visit tacoma',
|
|
11
11
|
'<%= config.bin %> <%= command.id %> staff add',
|
|
12
12
|
'<%= config.bin %> <%= command.id %> staff remove camry',
|
|
13
|
-
'<%= config.bin %> <%= command.id %>
|
|
13
|
+
'<%= config.bin %> <%= command.id %> cleanup --temp',
|
|
14
14
|
'<%= config.bin %> <%= command.id %> restart altman',
|
|
15
15
|
'<%= config.bin %> <%= command.id %> rebuild altman',
|
|
16
16
|
'<%= config.bin %> <%= command.id %> shell altman',
|
|
@@ -52,7 +52,7 @@ export default class Agent extends PMOCommand {
|
|
|
52
52
|
{ name: '🗑️ Remove agent', value: 'remove', command: 'prlt agent remove --machine' },
|
|
53
53
|
// Management group
|
|
54
54
|
{ name: '👔 Manage staff agents', value: 'staff', command: 'prlt agent staff --machine' },
|
|
55
|
-
{ name: '
|
|
55
|
+
{ name: '🧹 Cleanup agents', value: 'cleanup', command: 'prlt agent cleanup --machine' },
|
|
56
56
|
{ name: '🎨 Manage themes', value: 'themes', command: 'prlt agent themes --machine' },
|
|
57
57
|
// Operations group
|
|
58
58
|
{ name: '🐚 Open shell', value: 'shell', command: 'prlt agent shell --machine' },
|
|
@@ -96,20 +96,20 @@ export default class Agent extends PMOCommand {
|
|
|
96
96
|
break;
|
|
97
97
|
}
|
|
98
98
|
case 'staff': {
|
|
99
|
-
const { default: StaffCommand } = await import('
|
|
99
|
+
const { default: StaffCommand } = await import('../staff/index.js');
|
|
100
100
|
const cmd = new StaffCommand([], this.config);
|
|
101
101
|
await cmd.run();
|
|
102
102
|
break;
|
|
103
103
|
}
|
|
104
|
-
case '
|
|
105
|
-
const { default:
|
|
106
|
-
const cmd = new
|
|
104
|
+
case 'cleanup': {
|
|
105
|
+
const { default: CleanupCommand } = await import('./cleanup.js');
|
|
106
|
+
const cmd = new CleanupCommand([], this.config);
|
|
107
107
|
await cmd.run();
|
|
108
108
|
break;
|
|
109
109
|
}
|
|
110
110
|
case 'themes': {
|
|
111
|
-
const { default:
|
|
112
|
-
const cmd = new
|
|
111
|
+
const { default: ThemeCommand } = await import('../theme/index.js');
|
|
112
|
+
const cmd = new ThemeCommand([], this.config);
|
|
113
113
|
await cmd.run();
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
@@ -38,7 +38,7 @@ export default class BranchCreate extends PMOCommand {
|
|
|
38
38
|
}),
|
|
39
39
|
type: Flags.string({
|
|
40
40
|
char: 't',
|
|
41
|
-
description: 'Branch type',
|
|
41
|
+
description: 'Branch type [required for non-interactive with -d]',
|
|
42
42
|
options: Object.keys(BRANCH_TYPES),
|
|
43
43
|
}),
|
|
44
44
|
owner: Flags.string({
|
|
@@ -47,7 +47,7 @@ export default class BranchCreate extends PMOCommand {
|
|
|
47
47
|
}),
|
|
48
48
|
description: Flags.string({
|
|
49
49
|
char: 'd',
|
|
50
|
-
description: 'Branch description (kebab-case)',
|
|
50
|
+
description: 'Branch description (kebab-case) [required for non-interactive with -t]',
|
|
51
51
|
}),
|
|
52
52
|
'empty-commit': Flags.boolean({
|
|
53
53
|
char: 'e',
|
|
@@ -8,6 +8,7 @@ export default class EpicCreate extends PMOCommand {
|
|
|
8
8
|
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
spec: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
execute(): Promise<void>;
|
|
@@ -3,7 +3,7 @@ import inquirer from 'inquirer';
|
|
|
3
3
|
import { PMOCommand, pmoBaseFlags } from '../../lib/pmo/index.js';
|
|
4
4
|
import { styles } from '../../lib/styles.js';
|
|
5
5
|
import { createEpicFile, getRelativeEpicPath } from '../../lib/pmo/epic-files.js';
|
|
6
|
-
import { shouldOutputJson, outputPromptAsJson, createMetadata, buildFormPromptConfig, } from '../../lib/prompt-json.js';
|
|
6
|
+
import { shouldOutputJson, outputPromptAsJson, outputDryRunSuccessAsJson, outputDryRunErrorsAsJson, createMetadata, buildFormPromptConfig, } from '../../lib/prompt-json.js';
|
|
7
7
|
export default class EpicCreate extends PMOCommand {
|
|
8
8
|
static description = 'Create a new epic';
|
|
9
9
|
static examples = [
|
|
@@ -11,12 +11,13 @@ export default class EpicCreate extends PMOCommand {
|
|
|
11
11
|
'<%= config.bin %> <%= command.id %> --title "User Authentication System"',
|
|
12
12
|
'<%= config.bin %> <%= command.id %> -t "API Design" --status draft',
|
|
13
13
|
'<%= config.bin %> <%= command.id %> -t "Implement Auth" --spec SPEC-001',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --title "Test" -P PROJ-001 --dry-run --json # Validate without creating',
|
|
14
15
|
];
|
|
15
16
|
static flags = {
|
|
16
17
|
...pmoBaseFlags,
|
|
17
18
|
title: Flags.string({
|
|
18
19
|
char: 't',
|
|
19
|
-
description: 'Epic title',
|
|
20
|
+
description: 'Epic title [required for non-interactive]',
|
|
20
21
|
}),
|
|
21
22
|
status: Flags.string({
|
|
22
23
|
char: 's',
|
|
@@ -37,6 +38,10 @@ export default class EpicCreate extends PMOCommand {
|
|
|
37
38
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
38
39
|
default: false,
|
|
39
40
|
}),
|
|
41
|
+
'dry-run': Flags.boolean({
|
|
42
|
+
description: 'Validate inputs without creating epic (use with --json for structured output)',
|
|
43
|
+
default: false,
|
|
44
|
+
}),
|
|
40
45
|
};
|
|
41
46
|
async execute() {
|
|
42
47
|
const { flags } = await this.parse(EpicCreate);
|
|
@@ -90,9 +95,41 @@ export default class EpicCreate extends PMOCommand {
|
|
|
90
95
|
if (epicData.specId) {
|
|
91
96
|
const spec = await this.storage.getSpec(epicData.specId);
|
|
92
97
|
if (!spec) {
|
|
98
|
+
if (flags['dry-run']) {
|
|
99
|
+
if (jsonMode) {
|
|
100
|
+
outputDryRunErrorsAsJson([{ field: 'spec', error: `Spec not found: ${epicData.specId}` }], createMetadata('epic create', flags));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
93
103
|
this.error(`Spec not found: ${epicData.specId}`);
|
|
94
104
|
}
|
|
95
105
|
}
|
|
106
|
+
// Handle dry-run: show what would be created without actually creating
|
|
107
|
+
if (flags['dry-run']) {
|
|
108
|
+
const projectName = await this.getProjectName(projectId);
|
|
109
|
+
const wouldCreate = {
|
|
110
|
+
title: epicData.title,
|
|
111
|
+
project: projectId,
|
|
112
|
+
status: epicData.status,
|
|
113
|
+
...(epicData.description && { description: epicData.description }),
|
|
114
|
+
...(epicData.specId && { spec: epicData.specId }),
|
|
115
|
+
};
|
|
116
|
+
if (jsonMode) {
|
|
117
|
+
outputDryRunSuccessAsJson('epic', wouldCreate, createMetadata('epic create', flags));
|
|
118
|
+
}
|
|
119
|
+
// Human-readable dry-run output
|
|
120
|
+
this.log(styles.warning('\n[DRY RUN] Would create epic:'));
|
|
121
|
+
this.log(styles.muted(` Title: ${epicData.title}`));
|
|
122
|
+
this.log(styles.muted(` Project: ${projectName}`));
|
|
123
|
+
this.log(styles.muted(` Status: ${epicData.status}`));
|
|
124
|
+
if (epicData.description) {
|
|
125
|
+
this.log(styles.muted(` Description: ${epicData.description}`));
|
|
126
|
+
}
|
|
127
|
+
if (epicData.specId) {
|
|
128
|
+
this.log(styles.muted(` Spec: ${epicData.specId}`));
|
|
129
|
+
}
|
|
130
|
+
this.log(styles.muted('\n(No epic was created)'));
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
96
133
|
const epic = await this.storage.createEpic(projectId, {
|
|
97
134
|
title: epicData.title,
|
|
98
135
|
status: epicData.status,
|
|
@@ -31,7 +31,7 @@ export default class Epic extends PMOCommand {
|
|
|
31
31
|
{ id: 'progress', name: 'Show progress', command: 'prlt epic progress --json' },
|
|
32
32
|
{ id: 'ticket', name: 'Assign tickets to epic', command: 'prlt epic ticket --json' },
|
|
33
33
|
{ id: 'spec', name: 'Assign spec to epic', command: 'prlt epic spec --json' },
|
|
34
|
-
{ id: 'link', name: 'Manage dependencies', command: 'prlt
|
|
34
|
+
{ id: 'link', name: 'Manage dependencies', command: 'prlt link list --json' },
|
|
35
35
|
{ id: 'archive', name: 'Archive epic (complete)', command: 'prlt epic archive --json' },
|
|
36
36
|
{ id: 'activate', name: 'Activate epic', command: 'prlt epic activate --json' },
|
|
37
37
|
{ id: 'move', name: 'Reorder epic', command: 'prlt epic move --json' },
|
|
@@ -72,7 +72,7 @@ export default class Epic extends PMOCommand {
|
|
|
72
72
|
await this.config.runCommand('epic:spec', []);
|
|
73
73
|
break;
|
|
74
74
|
case 'link':
|
|
75
|
-
await this.config.runCommand('
|
|
75
|
+
await this.config.runCommand('link', []);
|
|
76
76
|
break;
|
|
77
77
|
case 'archive':
|
|
78
78
|
await this.config.runCommand('epic:archive', []);
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { PMOCommand } from '
|
|
2
|
-
export default class
|
|
1
|
+
import { PMOCommand } from '../../lib/pmo/index.js';
|
|
2
|
+
export default class LinkCreate extends PMOCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static args: {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
from: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
to: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
8
|
};
|
|
9
9
|
static flags: {
|
|
10
|
-
|
|
11
|
-
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
type: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
13
|
};
|
|
15
14
|
execute(): Promise<void>;
|
|
16
15
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { autoExportToBoard, PMOCommand, pmoBaseFlags } from '../../lib/pmo/index.js';
|
|
3
|
+
import { styles } from '../../lib/styles.js';
|
|
4
|
+
import { shouldOutputJson, outputErrorAsJson, createMetadata, } from '../../lib/prompt-json.js';
|
|
5
|
+
/**
|
|
6
|
+
* Infer entity type from ID prefix
|
|
7
|
+
*/
|
|
8
|
+
function inferEntityType(id) {
|
|
9
|
+
const upper = id.toUpperCase();
|
|
10
|
+
if (upper.startsWith('TKT-'))
|
|
11
|
+
return 'ticket';
|
|
12
|
+
if (upper.startsWith('SPEC-'))
|
|
13
|
+
return 'spec';
|
|
14
|
+
if (upper.startsWith('EPIC-'))
|
|
15
|
+
return 'epic';
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
export default class LinkCreate extends PMOCommand {
|
|
19
|
+
static description = 'Create a link (dependency) between two entities';
|
|
20
|
+
static examples = [
|
|
21
|
+
'<%= config.bin %> <%= command.id %> TKT-001 TKT-002 --type blocks # TKT-001 is blocked by TKT-002',
|
|
22
|
+
'<%= config.bin %> <%= command.id %> TKT-001 TKT-002 --type relates # TKT-001 relates to TKT-002',
|
|
23
|
+
'<%= config.bin %> <%= command.id %> SPEC-001 SPEC-002 --type depends # SPEC-001 depends on SPEC-002',
|
|
24
|
+
'<%= config.bin %> <%= command.id %> EPIC-001 EPIC-002 --type blocks # EPIC-001 is blocked by EPIC-002',
|
|
25
|
+
];
|
|
26
|
+
static args = {
|
|
27
|
+
from: Args.string({
|
|
28
|
+
description: 'Source entity ID (TKT-xxx, SPEC-xxx, or EPIC-xxx)',
|
|
29
|
+
required: true,
|
|
30
|
+
}),
|
|
31
|
+
to: Args.string({
|
|
32
|
+
description: 'Target entity ID',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
static flags = {
|
|
37
|
+
...pmoBaseFlags,
|
|
38
|
+
type: Flags.string({
|
|
39
|
+
char: 't',
|
|
40
|
+
description: 'Link type',
|
|
41
|
+
options: ['blocks', 'relates', 'duplicates', 'depends'],
|
|
42
|
+
required: true,
|
|
43
|
+
}),
|
|
44
|
+
json: Flags.boolean({
|
|
45
|
+
char: 'm',
|
|
46
|
+
aliases: ['machine'],
|
|
47
|
+
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
48
|
+
default: false,
|
|
49
|
+
}),
|
|
50
|
+
};
|
|
51
|
+
async execute() {
|
|
52
|
+
const { args, flags } = await this.parse(LinkCreate);
|
|
53
|
+
const jsonMode = shouldOutputJson(flags);
|
|
54
|
+
const handleError = (code, message) => {
|
|
55
|
+
if (jsonMode) {
|
|
56
|
+
outputErrorAsJson(code, message, createMetadata('link create', flags));
|
|
57
|
+
this.exit(1);
|
|
58
|
+
}
|
|
59
|
+
this.error(message);
|
|
60
|
+
};
|
|
61
|
+
const fromType = inferEntityType(args.from);
|
|
62
|
+
const toType = inferEntityType(args.to);
|
|
63
|
+
if (!fromType) {
|
|
64
|
+
return handleError('INVALID_FROM_ID', `Cannot infer entity type from "${args.from}". Use TKT-, SPEC-, or EPIC- prefix.`);
|
|
65
|
+
}
|
|
66
|
+
if (!toType) {
|
|
67
|
+
return handleError('INVALID_TO_ID', `Cannot infer entity type from "${args.to}". Use TKT-, SPEC-, or EPIC- prefix.`);
|
|
68
|
+
}
|
|
69
|
+
if (fromType !== toType) {
|
|
70
|
+
return handleError('TYPE_MISMATCH', `Cannot link different entity types: ${fromType} and ${toType}`);
|
|
71
|
+
}
|
|
72
|
+
const linkType = flags.type;
|
|
73
|
+
// Validate link type for entity type
|
|
74
|
+
// Tickets: blocks, relates_to, duplicates
|
|
75
|
+
// Specs: depends_on, relates_to, duplicates (no blocks)
|
|
76
|
+
// Epics: blocks, relates_to, duplicates (no depends)
|
|
77
|
+
if (fromType === 'spec' && linkType === 'blocks') {
|
|
78
|
+
return handleError('INVALID_LINK_TYPE', 'Specs do not support "blocks" link type. Use "depends" instead.');
|
|
79
|
+
}
|
|
80
|
+
if (fromType === 'epic' && linkType === 'depends') {
|
|
81
|
+
return handleError('INVALID_LINK_TYPE', 'Epics do not support "depends" link type. Use "blocks" instead.');
|
|
82
|
+
}
|
|
83
|
+
if (fromType === 'ticket' && linkType === 'depends') {
|
|
84
|
+
return handleError('INVALID_LINK_TYPE', 'Tickets do not support "depends" link type. Use "blocks" instead.');
|
|
85
|
+
}
|
|
86
|
+
// Map the link type to the storage dependency type
|
|
87
|
+
const dependencyType = linkType === 'relates' ? 'relates_to' :
|
|
88
|
+
linkType === 'depends' ? 'depends_on' : linkType;
|
|
89
|
+
try {
|
|
90
|
+
if (fromType === 'ticket') {
|
|
91
|
+
const ticket = await this.storage.getTicket(args.from);
|
|
92
|
+
if (!ticket)
|
|
93
|
+
return handleError('FROM_NOT_FOUND', `Ticket not found: ${args.from}`);
|
|
94
|
+
const targetTicket = await this.storage.getTicket(args.to);
|
|
95
|
+
if (!targetTicket)
|
|
96
|
+
return handleError('TO_NOT_FOUND', `Ticket not found: ${args.to}`);
|
|
97
|
+
await this.storage.createTicketDependency(args.from, args.to, dependencyType);
|
|
98
|
+
await autoExportToBoard(this.pmoPath, this.storage, (msg) => this.log(styles.muted(msg)));
|
|
99
|
+
this.log(styles.success(`\n✅ Link created: ${styles.emphasis(args.from)} → ${styles.emphasis(args.to)} (${linkType})`));
|
|
100
|
+
this.log(styles.muted(` ${ticket.title}`));
|
|
101
|
+
this.log(styles.muted(` ${linkType}: ${targetTicket.title}`));
|
|
102
|
+
}
|
|
103
|
+
else if (fromType === 'spec') {
|
|
104
|
+
const spec = await this.storage.getSpec(args.from);
|
|
105
|
+
if (!spec)
|
|
106
|
+
return handleError('FROM_NOT_FOUND', `Spec not found: ${args.from}`);
|
|
107
|
+
const targetSpec = await this.storage.getSpec(args.to);
|
|
108
|
+
if (!targetSpec)
|
|
109
|
+
return handleError('TO_NOT_FOUND', `Spec not found: ${args.to}`);
|
|
110
|
+
await this.storage.createSpecDependency(args.from, args.to, dependencyType);
|
|
111
|
+
this.log(styles.success(`\n✅ Link created: ${styles.emphasis(args.from)} → ${styles.emphasis(args.to)} (${linkType})`));
|
|
112
|
+
this.log(styles.muted(` ${spec.title}`));
|
|
113
|
+
this.log(styles.muted(` ${linkType}: ${targetSpec.title}`));
|
|
114
|
+
}
|
|
115
|
+
else if (fromType === 'epic') {
|
|
116
|
+
const epic = await this.storage.getEpic(args.from);
|
|
117
|
+
if (!epic)
|
|
118
|
+
return handleError('FROM_NOT_FOUND', `Epic not found: ${args.from}`);
|
|
119
|
+
const targetEpic = await this.storage.getEpic(args.to);
|
|
120
|
+
if (!targetEpic)
|
|
121
|
+
return handleError('TO_NOT_FOUND', `Epic not found: ${args.to}`);
|
|
122
|
+
await this.storage.createEpicDependency(args.from, args.to, dependencyType);
|
|
123
|
+
await autoExportToBoard(this.pmoPath, this.storage, (msg) => this.log(styles.muted(msg)));
|
|
124
|
+
this.log(styles.success(`\n✅ Link created: ${styles.emphasis(args.from)} → ${styles.emphasis(args.to)} (${linkType})`));
|
|
125
|
+
this.log(styles.muted(` ${epic.title}`));
|
|
126
|
+
this.log(styles.muted(` ${linkType}: ${targetEpic.title}`));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
if (error instanceof Error) {
|
|
131
|
+
if (error.message.includes('already exists')) {
|
|
132
|
+
return handleError('ALREADY_EXISTS', 'Link already exists');
|
|
133
|
+
}
|
|
134
|
+
if (error.message.includes('self-dependency')) {
|
|
135
|
+
return handleError('SELF_LINK', 'Cannot create self-link');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
throw error;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|