sdd-cli 0.1.12 → 0.1.13

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/README.md CHANGED
@@ -119,6 +119,7 @@ Project names must use letters, numbers, spaces, `-` or `_`, and cannot include
119
119
 
120
120
  The `hello` command is the entry point: it connects to AI, lists active projects, and offers to create a new one or continue.
121
121
  Default behavior is now a guided autopilot from discovery to completion with minimal prompts.
122
+ When you pass direct intent text (`sdd-cli hello "..."`), hello uses auto-guided defaults and minimizes confirmations.
122
123
  Use `--questions` when you want the manual question-by-question flow.
123
124
 
124
125
  ## The happy path (end-to-end flow)
@@ -203,6 +204,15 @@ sdd-cli hello "I want a simple booking system for appointments"
203
204
  5) Check output in:
204
205
  `<workspace>/<project>/requirements/done/<REQ-ID>/`
205
206
 
207
+ ## Recovery quick commands
208
+
209
+ - Continue an existing project:
210
+ `sdd-cli --project <project-name> hello "continue"`
211
+ - Resume from a specific stage:
212
+ `sdd-cli --project <project-name> --from-step test hello "resume"`
213
+ - Script-safe full default run:
214
+ `sdd-cli --non-interactive hello "<your intent>"`
215
+
206
216
  ## Where files are stored (clean repos)
207
217
 
208
218
  By default, the tool writes to a dedicated workspace, not into your repo:
@@ -20,6 +20,9 @@ function printStep(step, description) {
20
20
  function printWhy(message) {
21
21
  console.log(` -> ${message}`);
22
22
  }
23
+ function printRecoveryNext(project, step, hint) {
24
+ console.log(`Next command: sdd-cli --project "${project}" --from-step ${step} hello "${hint}"`);
25
+ }
23
26
  function deriveProjectName(input, flow) {
24
27
  const seed = input
25
28
  .trim()
@@ -99,35 +102,38 @@ async function runHello(input, runQuestions) {
99
102
  return { workspace, projects };
100
103
  }
101
104
  let { workspace, projects } = loadWorkspace();
105
+ const runtimeFlags = (0, flags_1.getFlags)();
106
+ const hasDirectIntent = input.trim().length > 0;
107
+ const shouldRunQuestions = runQuestions === true;
108
+ const autoGuidedMode = !shouldRunQuestions && (runtimeFlags.nonInteractive || hasDirectIntent);
102
109
  console.log("Hello from sdd-cli.");
103
110
  console.log(`Workspace: ${workspace.root}`);
104
- const useWorkspace = await (0, prompt_1.confirm)("Use this workspace path? (y/n) ");
105
- if (!useWorkspace) {
106
- const nextPath = await (0, prompt_1.ask)("Workspace path to use (blank to exit): ");
107
- if (!nextPath) {
108
- console.log("Run again from the desired folder or pass --output <path>.");
109
- return;
111
+ if (autoGuidedMode) {
112
+ printWhy("Auto-guided mode active: using current workspace defaults.");
113
+ }
114
+ else {
115
+ const useWorkspace = await (0, prompt_1.confirm)("Use this workspace path? (y/n) ");
116
+ if (!useWorkspace) {
117
+ const nextPath = await (0, prompt_1.ask)("Workspace path to use (blank to exit): ");
118
+ if (!nextPath) {
119
+ console.log("Run again from the desired folder or pass --output <path>.");
120
+ return;
121
+ }
122
+ (0, flags_1.setFlags)({ output: nextPath });
123
+ const reloaded = loadWorkspace();
124
+ workspace = reloaded.workspace;
125
+ projects = reloaded.projects;
126
+ console.log(`Workspace updated: ${workspace.root}`);
110
127
  }
111
- (0, flags_1.setFlags)({ output: nextPath });
112
- const reloaded = loadWorkspace();
113
- workspace = reloaded.workspace;
114
- projects = reloaded.projects;
115
- console.log(`Workspace updated: ${workspace.root}`);
116
128
  }
117
- const runtimeFlags = (0, flags_1.getFlags)();
118
129
  if (projects.length > 0) {
119
130
  console.log("Active projects:");
120
131
  projects.forEach((project) => {
121
132
  console.log(`- ${project.name} (${project.status})`);
122
133
  });
123
- const choice = await (0, prompt_1.ask)("Start new or continue? (new/continue) ");
124
- const normalized = choice.trim().toLowerCase();
125
- if (normalized === "continue") {
126
- const selected = runtimeFlags.project || (await (0, prompt_1.ask)("Project to continue: "));
127
- if (!selected) {
128
- console.log("No project selected. Continuing with new flow.");
129
- }
130
- else if (!projects.find((project) => project.name === selected)) {
134
+ if (runtimeFlags.project) {
135
+ const selected = runtimeFlags.project.trim();
136
+ if (!projects.find((project) => project.name === selected)) {
131
137
  console.log(`Project not found: ${selected}. Continuing with new flow.`);
132
138
  }
133
139
  else {
@@ -135,15 +141,34 @@ async function runHello(input, runQuestions) {
135
141
  console.log(`Continuing: ${selected}`);
136
142
  }
137
143
  }
144
+ else if (!autoGuidedMode) {
145
+ const choice = await (0, prompt_1.ask)("Start new or continue? (new/continue) ");
146
+ const normalized = choice.trim().toLowerCase();
147
+ if (normalized === "continue") {
148
+ const selected = await (0, prompt_1.ask)("Project to continue: ");
149
+ if (!selected) {
150
+ console.log("No project selected. Continuing with new flow.");
151
+ }
152
+ else if (!projects.find((project) => project.name === selected)) {
153
+ console.log(`Project not found: ${selected}. Continuing with new flow.`);
154
+ }
155
+ else {
156
+ (0, flags_1.setFlags)({ project: selected });
157
+ console.log(`Continuing: ${selected}`);
158
+ }
159
+ }
160
+ else {
161
+ console.log(`Selected: ${choice || "new"}`);
162
+ }
163
+ }
138
164
  else {
139
- console.log(`Selected: ${choice || "new"}`);
165
+ console.log("Auto-selected: new flow.");
140
166
  }
141
167
  }
142
168
  else {
143
169
  console.log("No active projects found.");
144
170
  }
145
171
  let text = input || (await (0, prompt_1.ask)("Describe what you want to do: "));
146
- const shouldRunQuestions = runQuestions === true;
147
172
  let checkpoint = null;
148
173
  let fromStep = (0, autopilot_checkpoint_1.normalizeStep)(runtimeFlags.fromStep);
149
174
  let activeProjectForCheckpoint = runtimeFlags.project;
@@ -211,8 +236,13 @@ async function runHello(input, runQuestions) {
211
236
  else {
212
237
  let activeProject = (0, flags_1.getFlags)().project;
213
238
  if (!activeProject) {
214
- const quickProject = await (0, prompt_1.ask)("Project name (optional, press Enter to auto-generate): ");
215
- activeProject = quickProject || deriveProjectName(text, intent.flow);
239
+ if (autoGuidedMode) {
240
+ activeProject = deriveProjectName(text, intent.flow);
241
+ }
242
+ else {
243
+ const quickProject = await (0, prompt_1.ask)("Project name (optional, press Enter to auto-generate): ");
244
+ activeProject = quickProject || deriveProjectName(text, intent.flow);
245
+ }
216
246
  }
217
247
  if (!activeProject) {
218
248
  console.log("Project name is required to run autopilot.");
@@ -237,6 +267,7 @@ async function runHello(input, runQuestions) {
237
267
  const startStep = fromStep ?? "create";
238
268
  if (startStep !== "create" && !reqId) {
239
269
  console.log("No checkpoint found for resume. Run full autopilot first or use --from-step create.");
270
+ printRecoveryNext(activeProject, "create", text);
240
271
  return;
241
272
  }
242
273
  if (fromStep) {
@@ -251,6 +282,7 @@ async function runHello(input, runQuestions) {
251
282
  const created = await (0, req_create_1.runReqCreate)(draft, { autofill: true });
252
283
  if (!created) {
253
284
  console.log("Autopilot stopped at requirement creation.");
285
+ printRecoveryNext(activeProject, "create", text);
254
286
  return;
255
287
  }
256
288
  reqId = created.reqId;
@@ -266,6 +298,7 @@ async function runHello(input, runQuestions) {
266
298
  });
267
299
  if (!planned) {
268
300
  console.log("Autopilot stopped at planning.");
301
+ printRecoveryNext(activeProject, "plan", text);
269
302
  return;
270
303
  }
271
304
  }
@@ -280,6 +313,7 @@ async function runHello(input, runQuestions) {
280
313
  });
281
314
  if (!started) {
282
315
  console.log("Autopilot stopped at start phase.");
316
+ printRecoveryNext(activeProject, "start", text);
283
317
  return;
284
318
  }
285
319
  }
@@ -294,6 +328,7 @@ async function runHello(input, runQuestions) {
294
328
  });
295
329
  if (!tested) {
296
330
  console.log("Autopilot stopped at test planning.");
331
+ printRecoveryNext(activeProject, "test", text);
297
332
  return;
298
333
  }
299
334
  }
@@ -308,6 +343,7 @@ async function runHello(input, runQuestions) {
308
343
  });
309
344
  if (!finished) {
310
345
  console.log("Autopilot stopped at finish phase.");
346
+ printRecoveryNext(activeProject, "finish", text);
311
347
  return;
312
348
  }
313
349
  (0, autopilot_checkpoint_1.clearCheckpoint)(activeProject);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdd-cli",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "SDD-first, AI-native CLI for end-to-end delivery.",
5
5
  "homepage": "https://github.com/jdsalasca/sdd-tool#readme",
6
6
  "repository": {