rosettify 2.2.1 → 2.4.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.
- package/dist/commands/help/index.d.ts.map +1 -1
- package/dist/commands/help/index.js +1 -2
- package/dist/commands/help/index.js.map +1 -1
- package/dist/commands/plan/core.d.ts +38 -31
- package/dist/commands/plan/core.d.ts.map +1 -1
- package/dist/commands/plan/core.js.map +1 -1
- package/dist/commands/plan/create-with-template.d.ts +7 -16
- package/dist/commands/plan/create-with-template.d.ts.map +1 -1
- package/dist/commands/plan/create-with-template.js +19 -14
- package/dist/commands/plan/create-with-template.js.map +1 -1
- package/dist/commands/plan/create.d.ts +3 -55
- package/dist/commands/plan/create.d.ts.map +1 -1
- package/dist/commands/plan/create.js +4 -38
- package/dist/commands/plan/create.js.map +1 -1
- package/dist/commands/plan/errors.d.ts +2 -0
- package/dist/commands/plan/errors.d.ts.map +1 -1
- package/dist/commands/plan/errors.js +2 -0
- package/dist/commands/plan/errors.js.map +1 -1
- package/dist/commands/plan/help-content.d.ts +42 -19
- package/dist/commands/plan/help-content.d.ts.map +1 -1
- package/dist/commands/plan/help-content.js +74 -47
- package/dist/commands/plan/help-content.js.map +1 -1
- package/dist/commands/plan/index.d.ts.map +1 -1
- package/dist/commands/plan/index.js +16 -10
- package/dist/commands/plan/index.js.map +1 -1
- package/dist/commands/plan/list-templates.d.ts +4 -27
- package/dist/commands/plan/list-templates.d.ts.map +1 -1
- package/dist/commands/plan/list-templates.js +1 -7
- package/dist/commands/plan/list-templates.js.map +1 -1
- package/dist/commands/plan/next.d.ts +3 -16
- package/dist/commands/plan/next.d.ts.map +1 -1
- package/dist/commands/plan/next.js +67 -25
- package/dist/commands/plan/next.js.map +1 -1
- package/dist/commands/plan/output.d.ts +10 -21
- package/dist/commands/plan/output.d.ts.map +1 -1
- package/dist/commands/plan/output.js +6 -6
- package/dist/commands/plan/output.js.map +1 -1
- package/dist/commands/plan/query.d.ts +7 -2
- package/dist/commands/plan/query.d.ts.map +1 -1
- package/dist/commands/plan/query.js +6 -3
- package/dist/commands/plan/query.js.map +1 -1
- package/dist/commands/plan/schemas.d.ts +44 -151
- package/dist/commands/plan/schemas.d.ts.map +1 -1
- package/dist/commands/plan/schemas.js +200 -68
- package/dist/commands/plan/schemas.js.map +1 -1
- package/dist/commands/plan/show-status.d.ts +9 -22
- package/dist/commands/plan/show-status.d.ts.map +1 -1
- package/dist/commands/plan/show-status.js +7 -10
- package/dist/commands/plan/show-status.js.map +1 -1
- package/dist/commands/plan/templates/create/for-orchestrator.d.ts +14 -33
- package/dist/commands/plan/templates/create/for-orchestrator.d.ts.map +1 -1
- package/dist/commands/plan/templates/create/for-orchestrator.js +14 -38
- package/dist/commands/plan/templates/create/for-orchestrator.js.map +1 -1
- package/dist/commands/plan/templates/index.d.ts +29 -45
- package/dist/commands/plan/templates/index.d.ts.map +1 -1
- package/dist/commands/plan/templates/index.js +2 -0
- package/dist/commands/plan/templates/index.js.map +1 -1
- package/dist/commands/plan/templates/render.d.ts +18 -0
- package/dist/commands/plan/templates/render.d.ts.map +1 -1
- package/dist/commands/plan/templates/render.js +29 -1
- package/dist/commands/plan/templates/render.js.map +1 -1
- package/dist/commands/plan/templates/upsert/for-subagent.d.ts +10 -9
- package/dist/commands/plan/templates/upsert/for-subagent.d.ts.map +1 -1
- package/dist/commands/plan/templates/upsert/for-subagent.js +12 -11
- package/dist/commands/plan/templates/upsert/for-subagent.js.map +1 -1
- package/dist/commands/plan/update-status.d.ts +2 -3
- package/dist/commands/plan/update-status.d.ts.map +1 -1
- package/dist/commands/plan/update-status.js +2 -3
- package/dist/commands/plan/update-status.js.map +1 -1
- package/dist/commands/plan/upsert-with-template.d.ts +7 -16
- package/dist/commands/plan/upsert-with-template.d.ts.map +1 -1
- package/dist/commands/plan/upsert-with-template.js +19 -15
- package/dist/commands/plan/upsert-with-template.js.map +1 -1
- package/dist/commands/plan/upsert.d.ts +3 -16
- package/dist/commands/plan/upsert.d.ts.map +1 -1
- package/dist/commands/plan/upsert.js +9 -17
- package/dist/commands/plan/upsert.js.map +1 -1
- package/dist/frontends/cli.d.ts.map +1 -1
- package/dist/frontends/cli.js +18 -8
- package/dist/frontends/cli.js.map +1 -1
- package/dist/frontends/mcp.d.ts.map +1 -1
- package/dist/frontends/mcp.js +2 -1
- package/dist/frontends/mcp.js.map +1 -1
- package/dist/registry/types.d.ts +2 -0
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/shared/version.d.ts +2 -0
- package/dist/shared/version.d.ts.map +1 -0
- package/dist/shared/version.js +8 -0
- package/dist/shared/version.js.map +1 -0
- package/package.json +3 -3
|
@@ -13,7 +13,6 @@ export declare const planHelpContent: {
|
|
|
13
13
|
depends_on: string;
|
|
14
14
|
status_propagation: string;
|
|
15
15
|
target_id: string;
|
|
16
|
-
resume: string;
|
|
17
16
|
};
|
|
18
17
|
subagent_fields: {
|
|
19
18
|
note: string;
|
|
@@ -26,27 +25,30 @@ export declare const planHelpContent: {
|
|
|
26
25
|
brief: string;
|
|
27
26
|
usage: string;
|
|
28
27
|
args: {
|
|
29
|
-
"plan-json": string;
|
|
28
|
+
"plan-json-string": string;
|
|
30
29
|
limit?: undefined;
|
|
31
30
|
"--target"?: undefined;
|
|
32
31
|
step_id?: undefined;
|
|
33
32
|
status?: undefined;
|
|
34
33
|
target_id?: undefined;
|
|
35
|
-
"patch-json"?: undefined;
|
|
34
|
+
"patch-json-string"?: undefined;
|
|
36
35
|
kind?: undefined;
|
|
37
36
|
phase_id?: undefined;
|
|
38
37
|
template?: undefined;
|
|
39
38
|
"plan-name"?: undefined;
|
|
40
39
|
"plan-description"?: undefined;
|
|
40
|
+
"phase-steps"?: undefined;
|
|
41
41
|
"phase-id"?: undefined;
|
|
42
42
|
"phase-name"?: undefined;
|
|
43
43
|
"phase-description"?: undefined;
|
|
44
44
|
};
|
|
45
|
+
required: string;
|
|
45
46
|
description: string;
|
|
46
47
|
examples: {
|
|
47
48
|
tip: string;
|
|
48
49
|
real: string;
|
|
49
50
|
};
|
|
51
|
+
conditional_requirements?: undefined;
|
|
50
52
|
} | {
|
|
51
53
|
name: string;
|
|
52
54
|
brief: string;
|
|
@@ -54,25 +56,28 @@ export declare const planHelpContent: {
|
|
|
54
56
|
args: {
|
|
55
57
|
limit: string;
|
|
56
58
|
"--target": string;
|
|
57
|
-
"plan-json"?: undefined;
|
|
59
|
+
"plan-json-string"?: undefined;
|
|
58
60
|
step_id?: undefined;
|
|
59
61
|
status?: undefined;
|
|
60
62
|
target_id?: undefined;
|
|
61
|
-
"patch-json"?: undefined;
|
|
63
|
+
"patch-json-string"?: undefined;
|
|
62
64
|
kind?: undefined;
|
|
63
65
|
phase_id?: undefined;
|
|
64
66
|
template?: undefined;
|
|
65
67
|
"plan-name"?: undefined;
|
|
66
68
|
"plan-description"?: undefined;
|
|
69
|
+
"phase-steps"?: undefined;
|
|
67
70
|
"phase-id"?: undefined;
|
|
68
71
|
"phase-name"?: undefined;
|
|
69
72
|
"phase-description"?: undefined;
|
|
70
73
|
};
|
|
74
|
+
required: string;
|
|
71
75
|
description: string;
|
|
72
76
|
examples: {
|
|
73
77
|
tip: string;
|
|
74
78
|
real: string;
|
|
75
79
|
};
|
|
80
|
+
conditional_requirements?: undefined;
|
|
76
81
|
} | {
|
|
77
82
|
name: string;
|
|
78
83
|
brief: string;
|
|
@@ -80,61 +85,67 @@ export declare const planHelpContent: {
|
|
|
80
85
|
args: {
|
|
81
86
|
step_id: string;
|
|
82
87
|
status: string;
|
|
83
|
-
"plan-json"?: undefined;
|
|
88
|
+
"plan-json-string"?: undefined;
|
|
84
89
|
limit?: undefined;
|
|
85
90
|
"--target"?: undefined;
|
|
86
91
|
target_id?: undefined;
|
|
87
|
-
"patch-json"?: undefined;
|
|
92
|
+
"patch-json-string"?: undefined;
|
|
88
93
|
kind?: undefined;
|
|
89
94
|
phase_id?: undefined;
|
|
90
95
|
template?: undefined;
|
|
91
96
|
"plan-name"?: undefined;
|
|
92
97
|
"plan-description"?: undefined;
|
|
98
|
+
"phase-steps"?: undefined;
|
|
93
99
|
"phase-id"?: undefined;
|
|
94
100
|
"phase-name"?: undefined;
|
|
95
101
|
"phase-description"?: undefined;
|
|
96
102
|
};
|
|
103
|
+
required: string;
|
|
97
104
|
description: string;
|
|
98
105
|
examples: {
|
|
99
106
|
tip: string;
|
|
100
107
|
real: string;
|
|
101
108
|
};
|
|
109
|
+
conditional_requirements?: undefined;
|
|
102
110
|
} | {
|
|
103
111
|
name: string;
|
|
104
112
|
brief: string;
|
|
105
113
|
usage: string;
|
|
106
114
|
args: {
|
|
107
115
|
target_id: string;
|
|
108
|
-
"plan-json"?: undefined;
|
|
116
|
+
"plan-json-string"?: undefined;
|
|
109
117
|
limit?: undefined;
|
|
110
118
|
"--target"?: undefined;
|
|
111
119
|
step_id?: undefined;
|
|
112
120
|
status?: undefined;
|
|
113
|
-
"patch-json"?: undefined;
|
|
121
|
+
"patch-json-string"?: undefined;
|
|
114
122
|
kind?: undefined;
|
|
115
123
|
phase_id?: undefined;
|
|
116
124
|
template?: undefined;
|
|
117
125
|
"plan-name"?: undefined;
|
|
118
126
|
"plan-description"?: undefined;
|
|
127
|
+
"phase-steps"?: undefined;
|
|
119
128
|
"phase-id"?: undefined;
|
|
120
129
|
"phase-name"?: undefined;
|
|
121
130
|
"phase-description"?: undefined;
|
|
122
131
|
};
|
|
132
|
+
required: string;
|
|
123
133
|
description: string;
|
|
124
134
|
examples: {
|
|
125
135
|
tip: string;
|
|
126
136
|
real: string;
|
|
127
137
|
};
|
|
138
|
+
conditional_requirements?: undefined;
|
|
128
139
|
} | {
|
|
129
140
|
name: string;
|
|
130
141
|
brief: string;
|
|
131
142
|
usage: string;
|
|
132
143
|
args: {
|
|
133
144
|
target_id: string;
|
|
134
|
-
"patch-json": string;
|
|
145
|
+
"patch-json-string": string;
|
|
135
146
|
kind: string;
|
|
136
147
|
phase_id: string;
|
|
137
|
-
"plan-json"?: undefined;
|
|
148
|
+
"plan-json-string"?: undefined;
|
|
138
149
|
limit?: undefined;
|
|
139
150
|
"--target"?: undefined;
|
|
140
151
|
step_id?: undefined;
|
|
@@ -142,10 +153,13 @@ export declare const planHelpContent: {
|
|
|
142
153
|
template?: undefined;
|
|
143
154
|
"plan-name"?: undefined;
|
|
144
155
|
"plan-description"?: undefined;
|
|
156
|
+
"phase-steps"?: undefined;
|
|
145
157
|
"phase-id"?: undefined;
|
|
146
158
|
"phase-name"?: undefined;
|
|
147
159
|
"phase-description"?: undefined;
|
|
148
160
|
};
|
|
161
|
+
required: string;
|
|
162
|
+
conditional_requirements: string;
|
|
149
163
|
description: string;
|
|
150
164
|
examples: {
|
|
151
165
|
tip: string;
|
|
@@ -159,24 +173,27 @@ export declare const planHelpContent: {
|
|
|
159
173
|
template: string;
|
|
160
174
|
"plan-name": string;
|
|
161
175
|
"plan-description": string;
|
|
162
|
-
"
|
|
176
|
+
"phase-steps": string;
|
|
177
|
+
"plan-json-string"?: undefined;
|
|
163
178
|
limit?: undefined;
|
|
164
179
|
"--target"?: undefined;
|
|
165
180
|
step_id?: undefined;
|
|
166
181
|
status?: undefined;
|
|
167
182
|
target_id?: undefined;
|
|
168
|
-
"patch-json"?: undefined;
|
|
183
|
+
"patch-json-string"?: undefined;
|
|
169
184
|
kind?: undefined;
|
|
170
185
|
phase_id?: undefined;
|
|
171
186
|
"phase-id"?: undefined;
|
|
172
187
|
"phase-name"?: undefined;
|
|
173
188
|
"phase-description"?: undefined;
|
|
174
189
|
};
|
|
190
|
+
required: string;
|
|
175
191
|
description: string;
|
|
176
192
|
examples: {
|
|
177
193
|
tip: string;
|
|
178
194
|
real: string;
|
|
179
195
|
};
|
|
196
|
+
conditional_requirements?: undefined;
|
|
180
197
|
} | {
|
|
181
198
|
name: string;
|
|
182
199
|
brief: string;
|
|
@@ -186,49 +203,55 @@ export declare const planHelpContent: {
|
|
|
186
203
|
template: string;
|
|
187
204
|
"phase-name": string;
|
|
188
205
|
"phase-description": string;
|
|
189
|
-
"
|
|
206
|
+
"phase-steps": string;
|
|
207
|
+
"plan-json-string"?: undefined;
|
|
190
208
|
limit?: undefined;
|
|
191
209
|
"--target"?: undefined;
|
|
192
210
|
step_id?: undefined;
|
|
193
211
|
status?: undefined;
|
|
194
212
|
target_id?: undefined;
|
|
195
|
-
"patch-json"?: undefined;
|
|
213
|
+
"patch-json-string"?: undefined;
|
|
196
214
|
kind?: undefined;
|
|
197
215
|
phase_id?: undefined;
|
|
198
216
|
"plan-name"?: undefined;
|
|
199
217
|
"plan-description"?: undefined;
|
|
200
218
|
};
|
|
219
|
+
required: string;
|
|
201
220
|
description: string;
|
|
202
221
|
examples: {
|
|
203
222
|
tip: string;
|
|
204
223
|
real: string;
|
|
205
224
|
};
|
|
225
|
+
conditional_requirements?: undefined;
|
|
206
226
|
} | {
|
|
207
227
|
name: string;
|
|
208
228
|
brief: string;
|
|
209
229
|
usage: string;
|
|
210
230
|
args: {
|
|
211
|
-
"plan-json"?: undefined;
|
|
231
|
+
"plan-json-string"?: undefined;
|
|
212
232
|
limit?: undefined;
|
|
213
233
|
"--target"?: undefined;
|
|
214
234
|
step_id?: undefined;
|
|
215
235
|
status?: undefined;
|
|
216
236
|
target_id?: undefined;
|
|
217
|
-
"patch-json"?: undefined;
|
|
237
|
+
"patch-json-string"?: undefined;
|
|
218
238
|
kind?: undefined;
|
|
219
239
|
phase_id?: undefined;
|
|
220
240
|
template?: undefined;
|
|
221
241
|
"plan-name"?: undefined;
|
|
222
242
|
"plan-description"?: undefined;
|
|
243
|
+
"phase-steps"?: undefined;
|
|
223
244
|
"phase-id"?: undefined;
|
|
224
245
|
"phase-name"?: undefined;
|
|
225
246
|
"phase-description"?: undefined;
|
|
226
247
|
};
|
|
248
|
+
required: string;
|
|
227
249
|
description: string;
|
|
228
250
|
examples: {
|
|
229
251
|
tip: string;
|
|
230
252
|
real: string;
|
|
231
253
|
};
|
|
254
|
+
conditional_requirements?: undefined;
|
|
232
255
|
})[];
|
|
233
256
|
schemas: Record<string, unknown>;
|
|
234
257
|
limits: {
|
|
@@ -239,8 +262,8 @@ export declare const planHelpContent: {
|
|
|
239
262
|
max_name_length: number;
|
|
240
263
|
};
|
|
241
264
|
readonly templates: {
|
|
242
|
-
create: import("./templates/index.js").
|
|
243
|
-
upsert: import("./templates/index.js").
|
|
265
|
+
create: import("./templates/index.js").PlanTemplateCatalogEntry[];
|
|
266
|
+
upsert: import("./templates/index.js").PlanTemplateCatalogEntry[];
|
|
244
267
|
};
|
|
245
268
|
notes: string[];
|
|
246
269
|
plan_authoring_guidance: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-content.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/help-content.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"help-content.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/help-content.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS,EAAE,MAAM,EA2B7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoO3B,CAAC"}
|
|
@@ -1,31 +1,43 @@
|
|
|
1
|
-
// Implements FR-PLAN-0016 (plan help content), FR-PLAN-0018 (limits
|
|
2
|
-
// FR-
|
|
1
|
+
// Implements FR-PLAN-0016 (plan help content), FR-PLAN-0018 (limits/examples),
|
|
2
|
+
// FR-PLAN-0041 (schemas), FR-PLAN-0042 (notes), FR-HELP-0002.
|
|
3
3
|
import { PLAN_MAX_PHASES, PLAN_MAX_STEPS_PER_PHASE, PLAN_MAX_DEPENDENCIES_PER_ITEM, PLAN_MAX_STRING_LENGTH, PLAN_MAX_NAME_LENGTH, } from "../../shared/constants.js";
|
|
4
4
|
import { planSchemasDict } from "./schemas.js";
|
|
5
5
|
import { buildTemplateCatalog } from "./templates/index.js";
|
|
6
|
-
// FR-PLAN-
|
|
6
|
+
// FR-PLAN-0042 — notes documenting behaviors that affect the caller upfront
|
|
7
7
|
export const planNotes = [
|
|
8
|
-
// FR-PLAN-0015 / FR-PLAN-0016
|
|
8
|
+
// Silent-drop note (FR-PLAN-0015 / FR-PLAN-0016)
|
|
9
9
|
"upsert silently drops status fields — use update_status to change status one-by-one after each task completion",
|
|
10
|
-
// FR-PLAN-0024
|
|
10
|
+
// Write-cycle summary (FR-PLAN-0024)
|
|
11
11
|
"write-cycle process (high level): read with retries → modify in memory → rename old file as backup → write new file",
|
|
12
|
-
// FR-PLAN-0024
|
|
12
|
+
// Atomic rename + previous_version chain (FR-PLAN-0024)
|
|
13
13
|
"every successful write atomically renames the plan file to <plan_file>.bakNNN before writing the new plan; the plan's previous_version field points to the immediately prior version (the backup captured at write time)",
|
|
14
|
-
// FR-PLAN-0024
|
|
14
|
+
// Backup retention (FR-PLAN-0024)
|
|
15
15
|
"backup retention is bounded; the oldest backups beyond the configured limit (default 5) are pruned",
|
|
16
|
-
// FR-SHRD-0009
|
|
16
|
+
// Read resilience (FR-SHRD-0009)
|
|
17
17
|
"if the plan file is missing but at least one backup exists, reads retry briefly before returning plan_not_found",
|
|
18
|
-
// FR-PLAN-0033
|
|
18
|
+
// Template kind separation (FR-PLAN-0033)
|
|
19
19
|
"templates have two kinds (create, upsert); a template of one kind cannot be used with the other kind",
|
|
20
|
-
// FR-PLAN-0034
|
|
20
|
+
// Placeholder syntax (FR-PLAN-0034)
|
|
21
21
|
"placeholder syntax in templates is [placeholder-name]; provided params and declared placeholders must match exactly",
|
|
22
|
+
// Inline JSON-string arguments (FR-PLAN-0044)
|
|
23
|
+
"the JSON-bearing arguments are inline JSON strings: the plan data for create, the patch for upsert, and phase-steps for create-with-template and upsert-with-template are each passed as the JSON value itself directly on the command line (for example '[{\"id\":\"s1\",\"name\":\"Step\",\"prompt\":\"do it\"}]')",
|
|
24
|
+
// End-to-end usage (FR-PLAN-0042)
|
|
25
|
+
"end-to-end usage — build the whole execution plan first, then execute. Build: (1) create the plan and its initial preparation phase with create-with-template, passing the actual phase-steps (the main body of work) to fill that first phase in one call; (2) add each subsequent phase (phase 1, phase 2, …) with upsert-with-template, every call passing the actual phase-steps so the phase arrives complete — the seeded subagent bootstrap steps plus the actual phase-steps; always add every follow-up phase with upsert-with-template (never plain upsert for a new phase); use plain upsert only for follow-up steps and patching existing items (rarely); change status only via update_status; (3) keep steps granular — each step is about 3–5 minutes of an AI coding agent's own work. Execute only after the whole execution plan is built: (4) hand each phase to its subagent, which loops — call next with --target <its phase id> for the next small batch, update_status <step_id> in_progress before starting a step and update_status <step_id> complete once it passes; (5) a phase is finished when next returns count 0 and parent.status is complete; if blocked or failed steps remain, recover them before finishing",
|
|
26
|
+
// Phase-scoped next (FR-PLAN-0042)
|
|
27
|
+
"phase-scoped next: when working a single phase always call next with --target <that phase id> so the batch and all the counts cover only that phase; --target may be passed with or without a limit",
|
|
28
|
+
// What next returns (FR-PLAN-0042)
|
|
29
|
+
"what next returns: next lists steps in priority order — in_progress, then ready open, then blocked, then failed — and cuts the list off at limit (default 3). Because in_progress and open steps come first, when there is enough work to do the blocked and failed steps get cut off and won't appear in that call. The Overall*Count fields are a headcount of every status in scope (open, in_progress, blocked, failed, complete) — a reminder of what exists even when the limit hid some",
|
|
30
|
+
// Three outcomes of a next call (FR-PLAN-0042)
|
|
31
|
+
"three outcomes of a next call: if count is greater than 0, work the returned steps; if count is 0 and the scope is complete (parent.status complete under --target, otherwise plan_status complete), the scope is done; if count is 0 but blocked or failed steps remain, stop looping and recover them",
|
|
32
|
+
// Recover blocked/failed/stuck steps (FR-PLAN-0042)
|
|
33
|
+
"recover blocked, failed, or stuck steps: when OverallBlockedCount or OverallFailedCount is non-zero, or OverallInProgressCount does not fall across calls (a stuck in_progress step), call show_status with --target <phase id> to list every step with its status — it has no limit, so it scales to any number of steps — then for each blocked, failed, or stuck step call query <step_id> for full detail, re-review and re-verify the work, and retry it by resetting its status with update_status <step_id> open (or in_progress) so next surfaces it again; do not finish the phase while any blocked or failed step remains",
|
|
22
34
|
];
|
|
23
35
|
export const planHelpContent = {
|
|
24
36
|
name: "plan",
|
|
25
37
|
brief: "Manage execution plans (create, query, update, upsert)",
|
|
26
38
|
description: "The plan command manages two-level execution plans stored as JSON files. " +
|
|
27
39
|
"Plans contain phases, phases contain steps. Status propagates bottom-up automatically. " +
|
|
28
|
-
"Write subcommands return a
|
|
40
|
+
"Write subcommands return a PlanWriteResult snapshot of the post-write plan.",
|
|
29
41
|
// FR-PLAN-0016 — plan_file convention
|
|
30
42
|
plan_file: {
|
|
31
43
|
convention: "plans/<feature>/plan.json",
|
|
@@ -36,12 +48,10 @@ export const planHelpContent = {
|
|
|
36
48
|
hierarchy: "Two levels: phases contain steps. You assign string IDs.",
|
|
37
49
|
statuses: "open | in_progress | complete | blocked | failed",
|
|
38
50
|
depends_on: "Phases reference phase IDs; steps reference step IDs (cross-phase allowed).",
|
|
39
|
-
status_propagation: "Bottom-up: steps → phases → plan. all
|
|
40
|
-
"
|
|
51
|
+
status_propagation: "Bottom-up: steps → phases → plan. A parent is complete only when all children are complete. " +
|
|
52
|
+
"Otherwise: failed outranks blocked, blocked outranks in_progress, in_progress outranks open. " +
|
|
41
53
|
"Plan root status is always derived — never set manually.",
|
|
42
54
|
target_id: '"entire_plan" | phase-id | step-id (default: entire_plan)',
|
|
43
|
-
resume: "next returns in_progress steps (resume:true) before open steps. " +
|
|
44
|
-
"Always check resume flag to avoid duplicate work on interrupted sessions.",
|
|
45
55
|
},
|
|
46
56
|
// FR-PLAN-0016 — subagent_fields
|
|
47
57
|
subagent_fields: {
|
|
@@ -50,19 +60,19 @@ export const planHelpContent = {
|
|
|
50
60
|
role: "specialization to assume, brilliant and short",
|
|
51
61
|
model: "comma-separated list of recommended models",
|
|
52
62
|
},
|
|
53
|
-
// FR-PLAN-0016 — subcommands with dual-form examples (FR-PLAN-0018)
|
|
63
|
+
// FR-PLAN-0016 — subcommands with dual-form examples (FR-PLAN-0018) and required statements
|
|
54
64
|
subcommands: [
|
|
55
65
|
{
|
|
56
66
|
name: "create",
|
|
57
67
|
brief: "Create a new plan JSON file",
|
|
58
|
-
usage: "rosettify plan create <plan_file> '<plan-json>'",
|
|
59
|
-
args: { "plan-json": "JSON with name, description?, phases[]" },
|
|
68
|
+
usage: "rosettify plan create <plan_file> '<plan-json-string>'",
|
|
69
|
+
args: { "plan-json-string": "inline JSON string with name, description?, phases[]" },
|
|
70
|
+
required: "plan_file and data (an inline plan JSON string) are required",
|
|
60
71
|
description: "Creates a new plan at plan_file. Defaults: name='Unnamed Plan', status='open', " +
|
|
61
72
|
"depends_on=[], timestamps set. Validates unique IDs, dependencies, and size limits. " +
|
|
62
|
-
"Returns
|
|
63
|
-
// FR-PLAN-0018 — dual-form examples
|
|
73
|
+
"Returns PlanWriteResult: plan + phases summary.",
|
|
64
74
|
examples: {
|
|
65
|
-
tip: "rosettify plan create [plan_file] '[plan-json-with-name-phases]'",
|
|
75
|
+
tip: "rosettify plan create [plan_file] '[plan-json-string-with-name-and-phases]'",
|
|
66
76
|
real: "rosettify plan create plans/feature-x/plan.json '{\"name\":\"Feature X\",\"phases\":[]}'",
|
|
67
77
|
},
|
|
68
78
|
},
|
|
@@ -71,12 +81,15 @@ export const planHelpContent = {
|
|
|
71
81
|
brief: "Return steps ready for execution",
|
|
72
82
|
usage: "rosettify plan next <plan_file> [limit] [--target <phase_id>]",
|
|
73
83
|
args: {
|
|
74
|
-
limit: "max steps to return (default:
|
|
84
|
+
limit: "max steps to return (default: 3)",
|
|
75
85
|
"--target": "scope to a specific phase",
|
|
76
86
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"(
|
|
87
|
+
required: "plan_file is required; limit and --target are optional",
|
|
88
|
+
description: "Returns steps in priority order: (1) in_progress, " +
|
|
89
|
+
"(2) open with deps satisfied, (3) blocked, " +
|
|
90
|
+
"(4) failed. Truncated to limit (default 3). Each step carries its status. " +
|
|
91
|
+
"Completion is judged by parent.status when --target is used (otherwise plan_status); blocked or failed steps must be recovered, not ignored — see notes for the three outcomes. " +
|
|
92
|
+
"Overall*Count fields report counts for all statuses in scope regardless of the limit.",
|
|
80
93
|
examples: {
|
|
81
94
|
tip: "rosettify plan next [plan_file] [limit] --target [phase-id]",
|
|
82
95
|
real: "rosettify plan next plans/feature-x/plan.json 5 --target ph-impl",
|
|
@@ -90,6 +103,7 @@ export const planHelpContent = {
|
|
|
90
103
|
step_id: "step ID (phases are derived, cannot be set directly)",
|
|
91
104
|
status: "open | in_progress | complete | blocked | failed",
|
|
92
105
|
},
|
|
106
|
+
required: "plan_file, step_id, and status are required",
|
|
93
107
|
description: "Updates a single step status and propagates upward. " +
|
|
94
108
|
"Phase status is always derived from child steps.",
|
|
95
109
|
examples: {
|
|
@@ -102,6 +116,7 @@ export const planHelpContent = {
|
|
|
102
116
|
brief: "Status summary with progress percentages and totals",
|
|
103
117
|
usage: "rosettify plan show_status <plan_file> [target_id]",
|
|
104
118
|
args: { target_id: "entire_plan | phase-id | step-id (default: entire_plan)" },
|
|
119
|
+
required: "plan_file is required; target_id defaults to entire_plan",
|
|
105
120
|
description: "Returns progress totals for plan, phase, or step. " +
|
|
106
121
|
"progress_pct = round(complete/total * 1000) / 10",
|
|
107
122
|
examples: {
|
|
@@ -114,6 +129,7 @@ export const planHelpContent = {
|
|
|
114
129
|
brief: "Return full JSON of plan, phase, or step",
|
|
115
130
|
usage: "rosettify plan query <plan_file> [target_id]",
|
|
116
131
|
args: { target_id: "entire_plan | phase-id | step-id (default: entire_plan)" },
|
|
132
|
+
required: "plan_file is required; target_id defaults to entire_plan",
|
|
117
133
|
description: "Returns full JSON of the requested target.",
|
|
118
134
|
examples: {
|
|
119
135
|
tip: "rosettify plan query [plan_file] [target-id-or-entire_plan]",
|
|
@@ -123,54 +139,59 @@ export const planHelpContent = {
|
|
|
123
139
|
{
|
|
124
140
|
name: "upsert",
|
|
125
141
|
brief: "Create or merge-patch plan/phase/step by id",
|
|
126
|
-
usage: "rosettify plan upsert <plan_file> <target_id> '<patch-json>'",
|
|
142
|
+
usage: "rosettify plan upsert <plan_file> <target_id> '<patch-json-string>'",
|
|
127
143
|
args: {
|
|
128
144
|
target_id: "entire_plan | phase-id | step-id",
|
|
129
|
-
"patch-json": "RFC 7396 patch object
|
|
145
|
+
"patch-json-string": "inline JSON string; RFC 7396 patch object, null removes a key",
|
|
130
146
|
kind: "required for new items: 'phase' or 'step'",
|
|
131
147
|
phase_id: "required for new step: parent phase ID",
|
|
132
148
|
},
|
|
149
|
+
required: "plan_file, target_id, and data (an inline patch JSON string) are required",
|
|
150
|
+
conditional_requirements: "kind is required only when the target id does not already exist; phase_id is required only when kind is step",
|
|
133
151
|
description: "Creates or merge-patches plan/phase/step. Status fields in patch are silently stripped. " +
|
|
134
|
-
"Use update_status to change status after each task completion. Returns
|
|
152
|
+
"Use update_status to change status after each task completion. Returns PlanWriteResult.",
|
|
135
153
|
examples: {
|
|
136
|
-
tip: "rosettify plan upsert [plan_file] [target-id] '[patch-json]'",
|
|
154
|
+
tip: "rosettify plan upsert [plan_file] [target-id] '[patch-json-string]'",
|
|
137
155
|
real: "rosettify plan upsert plans/feature-x/plan.json ph-review '{\"kind\":\"phase\",\"name\":\"Review\"}'",
|
|
138
156
|
},
|
|
139
157
|
},
|
|
140
158
|
{
|
|
141
159
|
name: "create-with-template",
|
|
142
160
|
brief: "Create a plan from a registered create-kind template",
|
|
143
|
-
usage: "rosettify plan create-with-template <plan_file> <template> <plan-name> <plan-description>",
|
|
161
|
+
usage: "rosettify plan create-with-template <plan_file> <template> <plan-name> <plan-description> <phase-steps-json-string>",
|
|
144
162
|
args: {
|
|
145
163
|
template: "template name from create-kind collection",
|
|
146
164
|
"plan-name": "value for [plan-name] placeholder",
|
|
147
165
|
"plan-description": "value for [plan-description] placeholder",
|
|
166
|
+
"phase-steps": "inline JSON string of a steps array appended to the seeded ph-prep phase (empty array [] allowed); not a placeholder",
|
|
148
167
|
},
|
|
168
|
+
required: "plan_file, template, plan-name, plan-description, and phase-steps are all required",
|
|
149
169
|
description: "Renders the named create-kind template with the provided placeholder values, " +
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
// FR-PLAN-0016 — concrete illustration from requirements
|
|
170
|
+
"appends the phase-steps JSON array to the seeded ph-prep phase, then creates the plan. " +
|
|
171
|
+
"All validations and write semantics are identical to create. Returns PlanWriteResult.",
|
|
153
172
|
examples: {
|
|
154
|
-
tip: "rosettify plan create-with-template plans/feature-x/plan.json for-orchestrator [plan-name] [user-request-description-one-sentence]",
|
|
155
|
-
real: "rosettify plan create-with-template plans/feature-x/plan.json for-orchestrator \"Feature X\" \"User wants to add Y to Z\"",
|
|
173
|
+
tip: "rosettify plan create-with-template plans/feature-x/plan.json for-orchestrator [plan-name] [user-request-description-one-sentence] [phase-steps-json-string]",
|
|
174
|
+
real: "rosettify plan create-with-template plans/feature-x/plan.json for-orchestrator \"Feature X\" \"User wants to add Y to Z\" '[{\"id\":\"ph-prep-s-impl\",\"name\":\"Implement\",\"prompt\":\"Implement Y\"}]'",
|
|
156
175
|
},
|
|
157
176
|
},
|
|
158
177
|
{
|
|
159
178
|
name: "upsert-with-template",
|
|
160
179
|
brief: "Upsert a phase into an existing plan using a registered upsert-kind template",
|
|
161
|
-
usage: "rosettify plan upsert-with-template <plan_file> <phase-id> <template> <phase-name> <phase-description>",
|
|
180
|
+
usage: "rosettify plan upsert-with-template <plan_file> <phase-id> <template> <phase-name> <phase-description> <phase-steps-json-string>",
|
|
162
181
|
args: {
|
|
163
182
|
"phase-id": "target phase ID and value for [phase-id] placeholder",
|
|
164
183
|
template: "template name from upsert-kind collection",
|
|
165
184
|
"phase-name": "value for [phase-name] placeholder",
|
|
166
185
|
"phase-description": "value for [phase-description] placeholder",
|
|
186
|
+
"phase-steps": "inline JSON string of a steps array appended to the seeded phase (empty array [] allowed); not a placeholder",
|
|
167
187
|
},
|
|
188
|
+
required: "plan_file, phase-id, template, phase-name, phase-description, and phase-steps are all required",
|
|
168
189
|
description: "Renders the named upsert-kind template with the provided placeholder values, " +
|
|
169
|
-
"then upserts the rendered phase into the plan.
|
|
170
|
-
"
|
|
190
|
+
"appends the phase-steps JSON array to the seeded phase, then upserts the rendered phase into the plan. " +
|
|
191
|
+
"All upsert merge semantics apply. Returns PlanWriteResult.",
|
|
171
192
|
examples: {
|
|
172
|
-
tip: "rosettify plan upsert-with-template plans/feature-x/plan.json [phase-id] for-subagent [phase-name] [phase-description-one-sentence]",
|
|
173
|
-
real: "rosettify plan upsert-with-template plans/feature-x/plan.json ph-impl for-subagent \"Implementation\" \"Implement the API endpoint\"",
|
|
193
|
+
tip: "rosettify plan upsert-with-template plans/feature-x/plan.json [phase-id] for-subagent [phase-name] [phase-description-one-sentence] [phase-steps-json-string]",
|
|
194
|
+
real: "rosettify plan upsert-with-template plans/feature-x/plan.json ph-impl for-subagent \"Implementation\" \"Implement the API endpoint\" '[{\"id\":\"ph-impl-s-build\",\"name\":\"Build\",\"prompt\":\"Build the endpoint\"}]'",
|
|
174
195
|
},
|
|
175
196
|
},
|
|
176
197
|
{
|
|
@@ -178,8 +199,9 @@ export const planHelpContent = {
|
|
|
178
199
|
brief: "List all registered templates grouped by kind",
|
|
179
200
|
usage: "rosettify plan list-templates",
|
|
180
201
|
args: {},
|
|
202
|
+
required: "no required inputs",
|
|
181
203
|
description: "Returns the catalog of registered templates grouped by kind (create, upsert). " +
|
|
182
|
-
"Each entry has name, brief, and
|
|
204
|
+
"Each entry has name, brief, placeholders array, and produces (what the template generates).",
|
|
183
205
|
examples: {
|
|
184
206
|
tip: "rosettify plan list-templates",
|
|
185
207
|
real: "rosettify plan list-templates",
|
|
@@ -200,15 +222,20 @@ export const planHelpContent = {
|
|
|
200
222
|
get templates() {
|
|
201
223
|
return buildTemplateCatalog();
|
|
202
224
|
},
|
|
203
|
-
// FR-PLAN-0016 — notes array with all required behaviors
|
|
225
|
+
// FR-PLAN-0016 / FR-PLAN-0042 — notes array with all required behaviors
|
|
204
226
|
notes: planNotes,
|
|
205
227
|
// FR-PLAN-0016 — plan_authoring_guidance (verbatim from requirement)
|
|
206
228
|
plan_authoring_guidance: "the last step in each phase should verify all work in that phase was actually completed; " +
|
|
207
229
|
"the last phase should verify all work across the entire plan was completed",
|
|
208
|
-
// FR-PLAN-0016 — next_steps_for_ai
|
|
209
|
-
next_steps_for_ai: "
|
|
210
|
-
"
|
|
211
|
-
"then call
|
|
212
|
-
"
|
|
230
|
+
// FR-PLAN-0016 — next_steps_for_ai with three outcomes
|
|
231
|
+
next_steps_for_ai: "Three outcomes of a next call: " +
|
|
232
|
+
"(1) count > 0 — work the returned steps (call update_status in_progress before starting each step, " +
|
|
233
|
+
"update_status complete once it passes, then call next again for the next batch). " +
|
|
234
|
+
"(2) count = 0 and scope is complete (parent.status = complete under --target, otherwise plan_status = complete) — " +
|
|
235
|
+
"the scope is done; move on. " +
|
|
236
|
+
"(3) count = 0 but blocked or failed steps remain — stop looping and recover: call show_status --target <phase id> " +
|
|
237
|
+
"to list every step with its status, call query <step_id> for full detail on each blocked or failed step, " +
|
|
238
|
+
"re-review and re-verify the work, then reset status with update_status <step_id> open (or in_progress) " +
|
|
239
|
+
"so next surfaces it again.",
|
|
213
240
|
};
|
|
214
241
|
//# sourceMappingURL=help-content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-content.js","sourceRoot":"","sources":["../../../src/commands/plan/help-content.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"help-content.js","sourceRoot":"","sources":["../../../src/commands/plan/help-content.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8DAA8D;AAE9D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":["../../../src/commands/plan/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AA8I3C,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CA6FnD,CAAC"}
|
|
@@ -27,7 +27,7 @@ const VALID_SUBCOMMANDS = [
|
|
|
27
27
|
];
|
|
28
28
|
const VALID_SUBCOMMANDS_STR = VALID_SUBCOMMANDS.join(", ");
|
|
29
29
|
async function runPlan(input) {
|
|
30
|
-
const { subcommand, plan_file, data, target_id, new_status, limit, kind, phase_id, template, "plan-name": planName, "plan-description": planDescription, "phase-id": phaseId, "phase-name": phaseName, "phase-description": phaseDescription, } = input;
|
|
30
|
+
const { subcommand, plan_file, data, target_id, new_status, limit, kind, phase_id, template, "plan-name": planName, "plan-description": planDescription, "phase-id": phaseId, "phase-name": phaseName, "phase-description": phaseDescription, "phase-steps": phaseSteps, } = input;
|
|
31
31
|
// FR-PLAN-0022 — no subcommand returns help content
|
|
32
32
|
if (!subcommand) {
|
|
33
33
|
return ok(planHelpContent);
|
|
@@ -101,7 +101,8 @@ async function runPlan(input) {
|
|
|
101
101
|
return err(`${ERR_MISSING_TEMPLATE_PARAM}: plan-name`, true);
|
|
102
102
|
if (planDescription === undefined || planDescription === null)
|
|
103
103
|
return err(`${ERR_MISSING_TEMPLATE_PARAM}: plan-description`, true);
|
|
104
|
-
|
|
104
|
+
// FR-PLAN-0043 — phase-steps is required/recommended in guidance, but for backward compatibility an omitted value is treated as [] (recovered downstream). Malformed content is still rejected as invalid_phase_steps.
|
|
105
|
+
return cmdCreateWithTemplate(plan_file, template, planName, planDescription, phaseSteps);
|
|
105
106
|
}
|
|
106
107
|
// FR-PLAN-0031 — upsert-with-template
|
|
107
108
|
case "upsert-with-template": {
|
|
@@ -116,7 +117,8 @@ async function runPlan(input) {
|
|
|
116
117
|
return err(`${ERR_MISSING_TEMPLATE_PARAM}: phase-name`, true);
|
|
117
118
|
if (phaseDescription === undefined || phaseDescription === null)
|
|
118
119
|
return err(`${ERR_MISSING_TEMPLATE_PARAM}: phase-description`, true);
|
|
119
|
-
|
|
120
|
+
// FR-PLAN-0043 — phase-steps is required/recommended in guidance, but for backward compatibility an omitted value is treated as [] (recovered downstream). Malformed content is still rejected as invalid_phase_steps.
|
|
121
|
+
return cmdUpsertWithTemplate(plan_file, phaseId, template, phaseName, phaseDescription, phaseSteps);
|
|
120
122
|
}
|
|
121
123
|
// FR-PLAN-0032 — list-templates
|
|
122
124
|
case "list-templates": {
|
|
@@ -172,30 +174,34 @@ export const planToolDef = {
|
|
|
172
174
|
// FR-PLAN-0030 / FR-PLAN-0034 — template parameters (kebab-case, uniform across CLI/MCP)
|
|
173
175
|
template: {
|
|
174
176
|
type: "string",
|
|
175
|
-
description: "
|
|
177
|
+
description: "Template name",
|
|
176
178
|
},
|
|
177
179
|
"plan-name": {
|
|
178
180
|
type: "string",
|
|
179
|
-
description: "
|
|
181
|
+
description: "Value for [plan-name] placeholder",
|
|
180
182
|
},
|
|
181
183
|
"plan-description": {
|
|
182
184
|
type: "string",
|
|
183
|
-
description: "
|
|
185
|
+
description: "Value for [plan-description] placeholder",
|
|
184
186
|
},
|
|
185
187
|
"phase-id": {
|
|
186
188
|
type: "string",
|
|
187
|
-
description: "
|
|
189
|
+
description: "Value for [phase-id] placeholder",
|
|
188
190
|
},
|
|
189
191
|
"phase-name": {
|
|
190
192
|
type: "string",
|
|
191
|
-
description: "
|
|
193
|
+
description: "Value for [phase-name] placeholder",
|
|
192
194
|
},
|
|
193
195
|
"phase-description": {
|
|
194
196
|
type: "string",
|
|
195
|
-
description: "
|
|
197
|
+
description: "Value for [phase-description] placeholder",
|
|
198
|
+
},
|
|
199
|
+
// FR-PLAN-0043 — phase-steps array injection (not a placeholder)
|
|
200
|
+
"phase-steps": {
|
|
201
|
+
type: "string",
|
|
202
|
+
description: "JSON array of steps appended to the seeded phase (create-with-template, upsert-with-template)",
|
|
196
203
|
},
|
|
197
204
|
},
|
|
198
|
-
required: [],
|
|
199
205
|
},
|
|
200
206
|
outputSchema: {
|
|
201
207
|
type: "object",
|