@applica-software-guru/sdd 1.3.1 → 1.3.4
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/init.d.ts.map +1 -1
- package/dist/commands/init.js +2 -31
- package/dist/commands/init.js.map +1 -1
- package/package.json +5 -3
- package/src/commands/init.ts +11 -62
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkDpC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkDpC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2InD"}
|
package/dist/commands/init.js
CHANGED
|
@@ -72,28 +72,6 @@ function registerInit(program) {
|
|
|
72
72
|
console.log(chalk_1.default.yellow("\n No description provided. Aborting.\n"));
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
const agentChoice = await (0, prompts_1.select)({
|
|
76
|
-
message: "Which agent do you use?",
|
|
77
|
-
choices: [
|
|
78
|
-
{ value: "claude", name: "Claude Code" },
|
|
79
|
-
{ value: "codex", name: "Codex" },
|
|
80
|
-
{ value: "opencode", name: "OpenCode" },
|
|
81
|
-
{ value: "other", name: "Other" },
|
|
82
|
-
],
|
|
83
|
-
theme: promptTheme,
|
|
84
|
-
});
|
|
85
|
-
let agentName = agentChoice;
|
|
86
|
-
let customCommand;
|
|
87
|
-
if (agentChoice === "other") {
|
|
88
|
-
agentName = await (0, prompts_1.input)({
|
|
89
|
-
message: "Agent name:",
|
|
90
|
-
theme: promptTheme,
|
|
91
|
-
});
|
|
92
|
-
customCommand = await (0, prompts_1.input)({
|
|
93
|
-
message: "Agent command (use $PROMPT_FILE for the prompt file path):",
|
|
94
|
-
theme: promptTheme,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
75
|
const bootstrapMode = await (0, prompts_1.select)({
|
|
98
76
|
message: "How do you want to start?",
|
|
99
77
|
choices: [
|
|
@@ -115,13 +93,6 @@ function registerInit(program) {
|
|
|
115
93
|
}).start();
|
|
116
94
|
const sdd = new sdd_core_1.SDD({ root: projectDir });
|
|
117
95
|
const files = await sdd.init({ description: description.trim() });
|
|
118
|
-
// Save agent config
|
|
119
|
-
const config = await sdd.config();
|
|
120
|
-
config.agent = agentName;
|
|
121
|
-
if (customCommand) {
|
|
122
|
-
config.agents = { [agentName]: customCommand };
|
|
123
|
-
}
|
|
124
|
-
await (0, sdd_core_1.writeConfig)(projectDir, config);
|
|
125
96
|
spinner.stop();
|
|
126
97
|
// Project created
|
|
127
98
|
console.log(chalk_1.default.cyan.bold(`\n ${chalk_1.default.white(projectName)} is ready!\n`));
|
|
@@ -136,18 +107,18 @@ function registerInit(program) {
|
|
|
136
107
|
console.log((0, format_js_1.success)("code/"));
|
|
137
108
|
console.log((0, format_js_1.success)(".claude/skills/"));
|
|
138
109
|
if (bootstrapMode === "auto") {
|
|
110
|
+
const agentName = "claude";
|
|
139
111
|
const prompt = buildBootstrapPrompt(description.trim(), true);
|
|
140
112
|
console.log(chalk_1.default.dim(" ─".repeat(30)));
|
|
141
113
|
console.log((0, format_js_1.heading)("Agent Prompt"));
|
|
142
114
|
console.log((0, markdown_js_1.renderMarkdown)(prompt));
|
|
143
115
|
console.log(chalk_1.default.dim(" ─".repeat(30)));
|
|
144
|
-
console.log((0, format_js_1.info)(`Using agent: ${chalk_1.default.cyan(agentName)}`));
|
|
116
|
+
console.log((0, format_js_1.info)(`Using agent: ${chalk_1.default.cyan(agentName)} (default)`));
|
|
145
117
|
console.log((0, format_js_1.info)("Starting agent...\n"));
|
|
146
118
|
const exitCode = await (0, sdd_core_1.runAgent)({
|
|
147
119
|
root: projectDir,
|
|
148
120
|
prompt,
|
|
149
121
|
agent: agentName,
|
|
150
|
-
agents: customCommand ? { [agentName]: customCommand } : undefined,
|
|
151
122
|
});
|
|
152
123
|
if (exitCode !== 0) {
|
|
153
124
|
console.log(chalk_1.default.red(`\n Agent exited with code ${exitCode}`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;AAkDA,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;AAkDA,oCA2IC;AA5LD,kDAA0B;AAC1B,+CAAkD;AAClD,4DAAoC;AACpC,qCAAgD;AAChD,yCAAoC;AACpC,8CAAsB;AACtB,8DAAgE;AAChE,+CAA8C;AAC9C,+CAAyD;AACzD,mDAAmD;AAEnD,MAAM,YAAY,GAAG,6JAA6J,CAAC;AAEnL,SAAS,oBAAoB,CAAC,WAAmB,EAAE,IAAa;IAC9D,IAAI,IAAI,EAAE,CAAC;QACT,OAAO;;iBAEM,WAAW;;;;;;;;;;;;sLAY0J,CAAC;IACrL,CAAC;IAED,OAAO;;iBAEQ,WAAW;;;;;;;;;;;;kJAYsH,CAAC;AACnJ,CAAC;AAED,SAAgB,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,qBAAqB,CAAC;SAC9B,WAAW,CAAC,8BAA8B,CAAC;SAC3C,MAAM,CAAC,KAAK,EAAE,WAAmB,EAAE,EAAE;QACpC,IAAA,uBAAW,GAAE,CAAC;QAEd,MAAM,UAAU,GAAG,IAAA,mBAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;QAEvD,IAAI,IAAA,oBAAU,EAAC,IAAA,mBAAO,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;YAC5C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,C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AAG,CAAC,cAAc,eAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;QACvF,OAAO,CAAC,GAAG,CAAC,KAAK,eAAK,CAAC,KAAK,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,QAAQ,eAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAEjD,MAAM,MAAM,GAAG,YAAY,CAAC;QAE5B,IAAI,CAAC;YACH,MAAM,oBAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,mDAAmD,CAAC,CAAC,CAAC;QAC5E,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,0CAA0C,CAAC,CAAC,CAAC;QAChE,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applica-software-guru/sdd",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "CLI for Story Driven Development",
|
|
5
5
|
"author": "Bruno Fortunato <bruno.fortunato@applica.guru>",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
"build": "tsc"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@applica-software-guru/sdd-core": "^1.
|
|
16
|
-
"@applica-software-guru/sdd-ui": "^1.0.0",
|
|
15
|
+
"@applica-software-guru/sdd-core": "^1.3.4",
|
|
17
16
|
"@inquirer/prompts": "^7.0.0",
|
|
18
17
|
"chalk": "^4.1.2",
|
|
19
18
|
"cli-table3": "^0.6.5",
|
|
@@ -22,5 +21,8 @@
|
|
|
22
21
|
"marked": "^15.0.12",
|
|
23
22
|
"marked-terminal": "^7.3.0",
|
|
24
23
|
"ora": "^5.4.1"
|
|
24
|
+
},
|
|
25
|
+
"optionalDependencies": {
|
|
26
|
+
"@applica-software-guru/sdd-ui": "^1.3.4"
|
|
25
27
|
}
|
|
26
28
|
}
|
package/src/commands/init.ts
CHANGED
|
@@ -5,7 +5,7 @@ import clipboardy from "clipboardy";
|
|
|
5
5
|
import { existsSync, mkdirSync } from "node:fs";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import ora from "ora";
|
|
8
|
-
import { SDD,
|
|
8
|
+
import { SDD, runAgent } from "@applica-software-guru/sdd-core";
|
|
9
9
|
import { printBanner } from "../ui/banner.js";
|
|
10
10
|
import { success, info, heading } from "../ui/format.js";
|
|
11
11
|
import { renderMarkdown } from "../ui/markdown.js";
|
|
@@ -58,11 +58,7 @@ export function registerInit(program: Command): void {
|
|
|
58
58
|
const projectDir = resolve(process.cwd(), projectName);
|
|
59
59
|
|
|
60
60
|
if (existsSync(resolve(projectDir, ".sdd"))) {
|
|
61
|
-
console.log(
|
|
62
|
-
chalk.yellow(
|
|
63
|
-
`\n SDD project already initialized at ${projectName}/\n`,
|
|
64
|
-
),
|
|
65
|
-
);
|
|
61
|
+
console.log(chalk.yellow(`\n SDD project already initialized at ${projectName}/\n`));
|
|
66
62
|
return;
|
|
67
63
|
}
|
|
68
64
|
|
|
@@ -81,31 +77,6 @@ export function registerInit(program: Command): void {
|
|
|
81
77
|
return;
|
|
82
78
|
}
|
|
83
79
|
|
|
84
|
-
const agentChoice = await select({
|
|
85
|
-
message: "Which agent do you use?",
|
|
86
|
-
choices: [
|
|
87
|
-
{ value: "claude", name: "Claude Code" },
|
|
88
|
-
{ value: "codex", name: "Codex" },
|
|
89
|
-
{ value: "opencode", name: "OpenCode" },
|
|
90
|
-
{ value: "other", name: "Other" },
|
|
91
|
-
],
|
|
92
|
-
theme: promptTheme,
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
let agentName = agentChoice;
|
|
96
|
-
let customCommand: string | undefined;
|
|
97
|
-
|
|
98
|
-
if (agentChoice === "other") {
|
|
99
|
-
agentName = await input({
|
|
100
|
-
message: "Agent name:",
|
|
101
|
-
theme: promptTheme,
|
|
102
|
-
});
|
|
103
|
-
customCommand = await input({
|
|
104
|
-
message: "Agent command (use $PROMPT_FILE for the prompt file path):",
|
|
105
|
-
theme: promptTheme,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
80
|
const bootstrapMode = await select({
|
|
110
81
|
message: "How do you want to start?",
|
|
111
82
|
choices: [
|
|
@@ -131,20 +102,10 @@ export function registerInit(program: Command): void {
|
|
|
131
102
|
const sdd = new SDD({ root: projectDir });
|
|
132
103
|
const files = await sdd.init({ description: description.trim() });
|
|
133
104
|
|
|
134
|
-
// Save agent config
|
|
135
|
-
const config = await sdd.config();
|
|
136
|
-
config.agent = agentName;
|
|
137
|
-
if (customCommand) {
|
|
138
|
-
config.agents = { [agentName]: customCommand };
|
|
139
|
-
}
|
|
140
|
-
await writeConfig(projectDir, config);
|
|
141
|
-
|
|
142
105
|
spinner.stop();
|
|
143
106
|
|
|
144
107
|
// Project created
|
|
145
|
-
console.log(
|
|
146
|
-
chalk.cyan.bold(`\n ${chalk.white(projectName)} is ready!\n`),
|
|
147
|
-
);
|
|
108
|
+
console.log(chalk.cyan.bold(`\n ${chalk.white(projectName)} is ready!\n`));
|
|
148
109
|
|
|
149
110
|
// Show what was created
|
|
150
111
|
console.log(chalk.dim(" Created:"));
|
|
@@ -158,6 +119,7 @@ export function registerInit(program: Command): void {
|
|
|
158
119
|
console.log(success(".claude/skills/"));
|
|
159
120
|
|
|
160
121
|
if (bootstrapMode === "auto") {
|
|
122
|
+
const agentName = "claude";
|
|
161
123
|
const prompt = buildBootstrapPrompt(description.trim(), true);
|
|
162
124
|
|
|
163
125
|
console.log(chalk.dim(" ─".repeat(30)));
|
|
@@ -165,14 +127,13 @@ export function registerInit(program: Command): void {
|
|
|
165
127
|
console.log(renderMarkdown(prompt));
|
|
166
128
|
console.log(chalk.dim(" ─".repeat(30)));
|
|
167
129
|
|
|
168
|
-
console.log(info(`Using agent: ${chalk.cyan(agentName)}`));
|
|
130
|
+
console.log(info(`Using agent: ${chalk.cyan(agentName)} (default)`));
|
|
169
131
|
console.log(info("Starting agent...\n"));
|
|
170
132
|
|
|
171
133
|
const exitCode = await runAgent({
|
|
172
134
|
root: projectDir,
|
|
173
135
|
prompt,
|
|
174
136
|
agent: agentName,
|
|
175
|
-
agents: customCommand ? { [agentName]: customCommand } : undefined,
|
|
176
137
|
});
|
|
177
138
|
|
|
178
139
|
if (exitCode !== 0) {
|
|
@@ -190,12 +151,8 @@ export function registerInit(program: Command): void {
|
|
|
190
151
|
console.log(chalk.cyan.bold("\n Next steps:\n"));
|
|
191
152
|
console.log(` ${chalk.white("1.")} Enter the project folder:\n`);
|
|
192
153
|
console.log(` ${chalk.green(`cd ${projectName}`)}\n`);
|
|
193
|
-
console.log(
|
|
194
|
-
|
|
195
|
-
);
|
|
196
|
-
console.log(
|
|
197
|
-
` It will ask you a few questions and generate the initial docs.\n`,
|
|
198
|
-
);
|
|
154
|
+
console.log(` ${chalk.white("2.")} Open your AI agent and paste the prompt below.`);
|
|
155
|
+
console.log(` It will ask you a few questions and generate the initial docs.\n`);
|
|
199
156
|
|
|
200
157
|
console.log(chalk.dim(" ─".repeat(30)));
|
|
201
158
|
console.log(heading("Agent Prompt"));
|
|
@@ -203,9 +160,7 @@ export function registerInit(program: Command): void {
|
|
|
203
160
|
|
|
204
161
|
try {
|
|
205
162
|
await clipboardy.write(prompt);
|
|
206
|
-
console.log(
|
|
207
|
-
success("Copied to clipboard — paste it into your agent.\n"),
|
|
208
|
-
);
|
|
163
|
+
console.log(success("Copied to clipboard — paste it into your agent.\n"));
|
|
209
164
|
} catch {
|
|
210
165
|
console.log(info("Copy the prompt above into your agent.\n"));
|
|
211
166
|
}
|
|
@@ -219,21 +174,15 @@ export function registerInit(program: Command): void {
|
|
|
219
174
|
console.log(
|
|
220
175
|
` ${chalk.white("2.")} Start writing your documentation in ${chalk.cyan("product/")} and ${chalk.cyan("system/")}.`,
|
|
221
176
|
);
|
|
222
|
-
console.log(
|
|
223
|
-
|
|
224
|
-
);
|
|
225
|
-
console.log(
|
|
226
|
-
` ${chalk.white("3.")} When ready, let your AI agent run:\n`,
|
|
227
|
-
);
|
|
177
|
+
console.log(` Check ${chalk.cyan(".sdd/skill/sdd/SKILL.md")} for the workflow.\n`);
|
|
178
|
+
console.log(` ${chalk.white("3.")} When ready, let your AI agent run:\n`);
|
|
228
179
|
console.log(` ${chalk.green("sdd sync")}\n`);
|
|
229
180
|
|
|
230
181
|
const prompt = START_PROMPT;
|
|
231
182
|
|
|
232
183
|
try {
|
|
233
184
|
await clipboardy.write(prompt);
|
|
234
|
-
console.log(
|
|
235
|
-
success("Copied to clipboard — paste it into your agent.\n"),
|
|
236
|
-
);
|
|
185
|
+
console.log(success("Copied to clipboard — paste it into your agent.\n"));
|
|
237
186
|
} catch {
|
|
238
187
|
console.log(info("Copy the prompt above into your agent.\n"));
|
|
239
188
|
}
|