@applica-software-guru/sdd 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/bug.d.ts.map +1 -1
- package/dist/commands/bug.js +1 -13
- package/dist/commands/bug.js.map +1 -1
- package/dist/commands/cr.d.ts.map +1 -1
- package/dist/commands/cr.js +1 -13
- package/dist/commands/cr.js.map +1 -1
- package/dist/commands/drafts.d.ts +3 -0
- package/dist/commands/drafts.d.ts.map +1 -0
- package/dist/commands/drafts.js +56 -0
- package/dist/commands/drafts.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/ui/format.d.ts +2 -0
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/format.js +26 -0
- package/dist/ui/format.js.map +1 -1
- package/package.json +3 -3
- package/skills/sdd/SKILL.md +8 -0
- package/skills/sdd-remote/SKILL.md +110 -0
- package/src/commands/bug.ts +2 -15
- package/src/commands/cr.ts +2 -15
- package/src/commands/drafts.ts +57 -0
- package/src/index.ts +2 -2
- package/src/ui/format.ts +26 -0
- package/dist/commands/apply.d.ts +0 -3
- package/dist/commands/apply.d.ts.map +0 -1
- package/dist/commands/apply.js +0 -46
- package/dist/commands/apply.js.map +0 -1
- package/src/commands/apply.ts +0 -49
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bug.d.ts","sourceRoot":"","sources":["../../src/commands/bug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"bug.d.ts","sourceRoot":"","sources":["../../src/commands/bug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmElD"}
|
package/dist/commands/bug.js
CHANGED
|
@@ -7,18 +7,6 @@ exports.registerBug = registerBug;
|
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const sdd_core_1 = require("@applica-software-guru/sdd-core");
|
|
9
9
|
const format_js_1 = require("../ui/format.js");
|
|
10
|
-
function statusLabel(status) {
|
|
11
|
-
switch (status) {
|
|
12
|
-
case 'draft':
|
|
13
|
-
return chalk_1.default.magenta('draft');
|
|
14
|
-
case 'open':
|
|
15
|
-
return chalk_1.default.yellow('open');
|
|
16
|
-
case 'resolved':
|
|
17
|
-
return chalk_1.default.green('resolved');
|
|
18
|
-
default:
|
|
19
|
-
return chalk_1.default.gray(status);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
10
|
function registerBug(program) {
|
|
23
11
|
const bug = program
|
|
24
12
|
.command('bug')
|
|
@@ -35,7 +23,7 @@ function registerBug(program) {
|
|
|
35
23
|
}
|
|
36
24
|
for (const b of bugs) {
|
|
37
25
|
const icon = b.frontmatter.status === 'resolved' ? chalk_1.default.green(' ✓') : b.frontmatter.status === 'draft' ? chalk_1.default.magenta(' ◇') : chalk_1.default.yellow(' ●');
|
|
38
|
-
console.log(`${icon} ${chalk_1.default.white(b.relativePath)} ${chalk_1.default.dim(`[${
|
|
26
|
+
console.log(`${icon} ${chalk_1.default.white(b.relativePath)} ${chalk_1.default.dim(`[${(0, format_js_1.bugStatusLabel)(b.frontmatter.status)}]`)} ${chalk_1.default.cyan(b.frontmatter.title)}`);
|
|
39
27
|
}
|
|
40
28
|
console.log('');
|
|
41
29
|
});
|
package/dist/commands/bug.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bug.js","sourceRoot":"","sources":["../../src/commands/bug.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"bug.js","sourceRoot":"","sources":["../../src/commands/bug.ts"],"names":[],"mappings":";;;;;AAKA,kCAmEC;AAvED,kDAA0B;AAC1B,8DAAsD;AACtD,+CAAgE;AAEhE,SAAgB,WAAW,CAAC,OAAgB;IAC1C,MAAM,GAA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EAAE,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO;SACJ,OAAO,CAAC,8BAA8B,CAAC;SACvC,WAAW,CAAC,uBAAuB,CAAC;SACpC,MAAM,CAAC,KAAK,EAAE,KAAe,EAAE,EAAE;QAChC,MAAM,GAAG,GAAG,IAAI,cAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAE/E,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,mBAAmB,CAAC,CAAC,CAAC;QAE1C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,yBAAyB,CAAC,CAAC,CAAC;YAC7C,OAAO;QACT,CAAC;QAED,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,OAAO,MAAM,CAAC,MAAM,+BAA+B,CAAC,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cr.d.ts","sourceRoot":"","sources":["../../src/commands/cr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cr.d.ts","sourceRoot":"","sources":["../../src/commands/cr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmEjD"}
|
package/dist/commands/cr.js
CHANGED
|
@@ -7,18 +7,6 @@ exports.registerCR = registerCR;
|
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const sdd_core_1 = require("@applica-software-guru/sdd-core");
|
|
9
9
|
const format_js_1 = require("../ui/format.js");
|
|
10
|
-
function statusLabel(status) {
|
|
11
|
-
switch (status) {
|
|
12
|
-
case 'draft':
|
|
13
|
-
return chalk_1.default.magenta('draft');
|
|
14
|
-
case 'pending':
|
|
15
|
-
return chalk_1.default.yellow('pending');
|
|
16
|
-
case 'applied':
|
|
17
|
-
return chalk_1.default.green('applied');
|
|
18
|
-
default:
|
|
19
|
-
return chalk_1.default.gray(status);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
10
|
function registerCR(program) {
|
|
23
11
|
const cr = program
|
|
24
12
|
.command('cr')
|
|
@@ -35,7 +23,7 @@ function registerCR(program) {
|
|
|
35
23
|
}
|
|
36
24
|
for (const cr of crs) {
|
|
37
25
|
const icon = cr.frontmatter.status === 'applied' ? chalk_1.default.green(' ✓') : cr.frontmatter.status === 'draft' ? chalk_1.default.magenta(' ◇') : chalk_1.default.yellow(' ●');
|
|
38
|
-
console.log(`${icon} ${chalk_1.default.white(cr.relativePath)} ${chalk_1.default.dim(`[${
|
|
26
|
+
console.log(`${icon} ${chalk_1.default.white(cr.relativePath)} ${chalk_1.default.dim(`[${(0, format_js_1.crStatusLabel)(cr.frontmatter.status)}]`)} ${chalk_1.default.cyan(cr.frontmatter.title)}`);
|
|
39
27
|
}
|
|
40
28
|
console.log('');
|
|
41
29
|
});
|
package/dist/commands/cr.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cr.js","sourceRoot":"","sources":["../../src/commands/cr.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"cr.js","sourceRoot":"","sources":["../../src/commands/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AW,CAAC;AAMpC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkDrD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.registerDrafts = registerDrafts;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const sdd_core_1 = require("@applica-software-guru/sdd-core");
|
|
9
|
+
const format_js_1 = require("../ui/format.js");
|
|
10
|
+
const markdown_js_1 = require("../ui/markdown.js");
|
|
11
|
+
function registerDrafts(program) {
|
|
12
|
+
program
|
|
13
|
+
.command('drafts')
|
|
14
|
+
.description('List draft docs/CRs/bugs and print a TODO prompt for the agent')
|
|
15
|
+
.action(async () => {
|
|
16
|
+
const sdd = new sdd_core_1.SDD({ root: process.cwd() });
|
|
17
|
+
console.log((0, format_js_1.heading)('Drafts'));
|
|
18
|
+
const drafts = await sdd.drafts();
|
|
19
|
+
const total = drafts.docs.length + drafts.crs.length + drafts.bugs.length;
|
|
20
|
+
if (total === 0) {
|
|
21
|
+
console.log((0, format_js_1.info)('No draft elements found.'));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
console.log((0, format_js_1.info)(`Found ${total} draft element(s):`));
|
|
25
|
+
if (drafts.docs.length > 0) {
|
|
26
|
+
console.log(chalk_1.default.dim(` Documents (${drafts.docs.length})`));
|
|
27
|
+
for (const f of drafts.docs) {
|
|
28
|
+
console.log(chalk_1.default.magenta(` ◇ ${f.relativePath}`));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (drafts.crs.length > 0) {
|
|
32
|
+
console.log(chalk_1.default.dim(` Change Requests (${drafts.crs.length})`));
|
|
33
|
+
for (const cr of drafts.crs) {
|
|
34
|
+
console.log(chalk_1.default.magenta(` ◇ ${cr.relativePath}`));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (drafts.bugs.length > 0) {
|
|
38
|
+
console.log(chalk_1.default.dim(` Bugs (${drafts.bugs.length})`));
|
|
39
|
+
for (const bug of drafts.bugs) {
|
|
40
|
+
console.log(chalk_1.default.magenta(` ◇ ${bug.relativePath}`));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
console.log('');
|
|
44
|
+
const prompt = await sdd.draftEnrichmentPrompt();
|
|
45
|
+
if (!prompt) {
|
|
46
|
+
console.log((0, format_js_1.info)('Drafts are present but no enrichment prompt could be generated.'));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
console.log(chalk_1.default.dim(' ─'.repeat(30)));
|
|
50
|
+
console.log((0, format_js_1.heading)('Draft TODO'));
|
|
51
|
+
console.log((0, markdown_js_1.renderMarkdown)(prompt));
|
|
52
|
+
console.log(chalk_1.default.dim(' ─'.repeat(30)));
|
|
53
|
+
console.log((0, format_js_1.info)('After enrichment, run `sdd mark-drafts-enriched` when drafts are ready.'));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=drafts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drafts.js","sourceRoot":"","sources":["../../src/commands/drafts.ts"],"names":[],"mappings":";;;;;AAMA,wCAkDC;AAvDD,kDAA0B;AAC1B,8DAAsD;AACtD,+CAAgD;AAChD,mDAAmD;AAEnD,SAAgB,cAAc,CAAC,OAAgB;IAC7C,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,gEAAgE,CAAC;SAC7E,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,GAAG,GAAG,IAAI,cAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAE7C,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,QAAQ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G,CAAC,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,WAAW,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACzD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC9B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,OAAO,CAAC,OAAO,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEhB,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,qBAAqB,EAAE,CAAC;QACjD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,iEAAiE,CAAC,CAAC,CAAC;YACrF,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,YAAY,CAAC,CAAC,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,IAAA,4BAAc,EAAC,MAAM,CAAC,CAAC,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,yEAAyE,CAAC,CAAC,CAAC;IAC/F,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,13 +11,13 @@ const validate_js_1 = require("./commands/validate.js");
|
|
|
11
11
|
const mark_synced_js_1 = require("./commands/mark-synced.js");
|
|
12
12
|
const cr_js_1 = require("./commands/cr.js");
|
|
13
13
|
const bug_js_1 = require("./commands/bug.js");
|
|
14
|
-
const apply_js_1 = require("./commands/apply.js");
|
|
15
14
|
const adapters_js_1 = require("./commands/adapters.js");
|
|
16
15
|
const ui_js_1 = require("./commands/ui.js");
|
|
17
16
|
const upgrade_js_1 = require("./commands/upgrade.js");
|
|
18
17
|
const remote_js_1 = require("./commands/remote.js");
|
|
19
18
|
const pull_js_1 = require("./commands/pull.js");
|
|
20
19
|
const push_js_1 = require("./commands/push.js");
|
|
20
|
+
const drafts_js_1 = require("./commands/drafts.js");
|
|
21
21
|
const mark_drafts_enriched_js_1 = require("./commands/mark-drafts-enriched.js");
|
|
22
22
|
const packageRequire = (0, node_module_1.createRequire)(__filename);
|
|
23
23
|
const packageJson = packageRequire("../package.json");
|
|
@@ -34,13 +34,13 @@ program
|
|
|
34
34
|
(0, mark_synced_js_1.registerMarkSynced)(program);
|
|
35
35
|
(0, cr_js_1.registerCR)(program);
|
|
36
36
|
(0, bug_js_1.registerBug)(program);
|
|
37
|
-
(0, apply_js_1.registerApply)(program);
|
|
38
37
|
(0, adapters_js_1.registerAdapters)(program);
|
|
39
38
|
(0, ui_js_1.registerUI)(program);
|
|
40
39
|
(0, upgrade_js_1.registerUpgrade)(program);
|
|
41
40
|
(0, remote_js_1.registerRemote)(program);
|
|
42
41
|
(0, pull_js_1.registerPull)(program);
|
|
43
42
|
(0, push_js_1.registerPush)(program);
|
|
43
|
+
(0, drafts_js_1.registerDrafts)(program);
|
|
44
44
|
(0, mark_drafts_enriched_js_1.registerMarkDraftsEnriched)(program);
|
|
45
45
|
program.parseAsync().catch((err) => {
|
|
46
46
|
console.error(err.message);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,6CAA4C;AAC5C,gDAAkD;AAClD,oDAAsD;AACtD,gDAAkD;AAClD,gDAAkD;AAClD,wDAA0D;AAC1D,8DAA+D;AAC/D,4CAA8C;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AAA,sBAAY,EAAC,OAAO,CAAC,CAAC;AACtB,IAAA,0BAAc,EAAC,OAAO,CAAC,CAAC;AACxB,IAAA,oDAA0B,EAAC,OAAO,CAAC,CAAC;AAEpC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/ui/format.d.ts
CHANGED
|
@@ -11,4 +11,6 @@ export declare function success(text: string): string;
|
|
|
11
11
|
export declare function warning(text: string): string;
|
|
12
12
|
export declare function error(text: string): string;
|
|
13
13
|
export declare function info(text: string): string;
|
|
14
|
+
export declare function crStatusLabel(status: string): string;
|
|
15
|
+
export declare function bugStatusLabel(status: string): string;
|
|
14
16
|
//# sourceMappingURL=format.d.ts.map
|
package/dist/ui/format.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/ui/format.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAejD;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAelD;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC7F,MAAM,CAgCR;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzC"}
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/ui/format.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAejD;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAelD;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC7F,MAAM,CAgCR;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAWpD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAWrD"}
|
package/dist/ui/format.js
CHANGED
|
@@ -11,6 +11,8 @@ exports.success = success;
|
|
|
11
11
|
exports.warning = warning;
|
|
12
12
|
exports.error = error;
|
|
13
13
|
exports.info = info;
|
|
14
|
+
exports.crStatusLabel = crStatusLabel;
|
|
15
|
+
exports.bugStatusLabel = bugStatusLabel;
|
|
14
16
|
const chalk_1 = __importDefault(require("chalk"));
|
|
15
17
|
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
16
18
|
function statusIcon(status) {
|
|
@@ -91,4 +93,28 @@ function error(text) {
|
|
|
91
93
|
function info(text) {
|
|
92
94
|
return chalk_1.default.dim(` ${text}`);
|
|
93
95
|
}
|
|
96
|
+
function crStatusLabel(status) {
|
|
97
|
+
switch (status) {
|
|
98
|
+
case 'draft':
|
|
99
|
+
return chalk_1.default.magenta('draft');
|
|
100
|
+
case 'pending':
|
|
101
|
+
return chalk_1.default.yellow('pending');
|
|
102
|
+
case 'applied':
|
|
103
|
+
return chalk_1.default.green('applied');
|
|
104
|
+
default:
|
|
105
|
+
return chalk_1.default.gray(status);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function bugStatusLabel(status) {
|
|
109
|
+
switch (status) {
|
|
110
|
+
case 'draft':
|
|
111
|
+
return chalk_1.default.magenta('draft');
|
|
112
|
+
case 'open':
|
|
113
|
+
return chalk_1.default.yellow('open');
|
|
114
|
+
case 'resolved':
|
|
115
|
+
return chalk_1.default.green('resolved');
|
|
116
|
+
default:
|
|
117
|
+
return chalk_1.default.gray(status);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
94
120
|
//# sourceMappingURL=format.js.map
|
package/dist/ui/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/ui/format.ts"],"names":[],"mappings":";;;;;AAGA,gCAeC;AAED,kCAeC;AAED,8CAkCC;AAED,0BAEC;AAED,0BAEC;AAED,0BAEC;AAED,sBAEC;AAED,oBAEC;
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/ui/format.ts"],"names":[],"mappings":";;;;;AAGA,gCAeC;AAED,kCAeC;AAED,8CAkCC;AAED,0BAEC;AAED,0BAEC;AAED,0BAEC;AAED,sBAEC;AAED,oBAEC;AAED,sCAWC;AAED,wCAWC;AArHD,kDAA0B;AAC1B,4DAA+B;AAE/B,SAAgB,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AAY;IAClC,OAAO,eAAK,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;AACrC,CAAC;AAED,SAAgB,KAAK,CAAC,IAAY;IAChC,OAAO,eAAK,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,SAAgB,IAAI,CAAC,IAAY;IAC/B,OAAO,eAAK,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,SAAgB,aAAa,CAAC,MAAc;IAC1C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,eAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAChC,KAAK,SAAS;YACZ,OAAO,eAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACjC,KAAK,SAAS;YACZ,OAAO,eAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAChC;YACE,OAAO,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,SAAgB,cAAc,CAAC,MAAc;IAC3C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,eAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAChC,KAAK,MAAM;YACT,OAAO,eAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9B,KAAK,UAAU;YACb,OAAO,eAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACjC;YACE,OAAO,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applica-software-guru/sdd",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "CLI for Story Driven Development",
|
|
5
5
|
"author": "Bruno Fortunato <bruno.fortunato@applica.guru>",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"sdd": "./dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"prebuild": "node -e \"require('fs').cpSync('../skill', 'skills', {recursive:
|
|
11
|
+
"prebuild": "node -e \"const fs=require('fs'); fs.cpSync('../skill', 'skills', {recursive:true, force:true}); fs.cpSync('../skill', '../claude-plugin/skills', {recursive:true, force:true})\"",
|
|
12
12
|
"build": "tsc"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@applica-software-guru/sdd-core": "^1.8.
|
|
15
|
+
"@applica-software-guru/sdd-core": "^1.8.2",
|
|
16
16
|
"@inquirer/prompts": "^7.0.0",
|
|
17
17
|
"chalk": "^4.1.2",
|
|
18
18
|
"cli-table3": "^0.6.5",
|
package/skills/sdd/SKILL.md
CHANGED
|
@@ -49,6 +49,12 @@ git add -A && git commit -m "sdd sync: <brief description of what was implemente
|
|
|
49
49
|
|
|
50
50
|
Do NOT skip this step. Every mark-synced must be followed by a git commit.
|
|
51
51
|
|
|
52
|
+
10. If remote sync is configured (remote section in `.sdd/config.yaml` and API key available), remind the user they can publish updates with:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
sdd push
|
|
56
|
+
```
|
|
57
|
+
|
|
52
58
|
### Removing a feature
|
|
53
59
|
|
|
54
60
|
If a documentation file has `status: deleted`, it means that feature should be removed.
|
|
@@ -77,6 +83,7 @@ Delete the related code in `code/`, then run `sdd mark-synced <file>` (the doc f
|
|
|
77
83
|
5. All generated code goes inside `code/`
|
|
78
84
|
6. Respect all constraints in `## Agent Notes` sections (if present)
|
|
79
85
|
7. Do not edit files inside `.sdd/` manually
|
|
86
|
+
8. If remote is configured, suggest `sdd push` after successful local sync + commit
|
|
80
87
|
|
|
81
88
|
## Project structure
|
|
82
89
|
|
|
@@ -94,4 +101,5 @@ For detailed information on specific topics, see:
|
|
|
94
101
|
- [File format and status lifecycle](references/file-format.md)
|
|
95
102
|
- [Change Requests workflow](references/change-requests.md)
|
|
96
103
|
- [Bug workflow](references/bugs.md)
|
|
104
|
+
- [Remote pull/enrich/push workflow](../sdd-remote/SKILL.md)
|
|
97
105
|
- [UI Component workflow](../sdd-ui/SKILL.md)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-remote
|
|
3
|
+
description: >
|
|
4
|
+
Remote sync workflow for Story Driven Development. Use when the user asks
|
|
5
|
+
to update local state from remote changes, process remote drafts, and push
|
|
6
|
+
enriched items back.
|
|
7
|
+
license: MIT
|
|
8
|
+
compatibility: Requires sdd CLI (npm i -g @applica-software-guru/sdd)
|
|
9
|
+
allowed-tools: Bash(sdd:*) Read Glob Grep
|
|
10
|
+
metadata:
|
|
11
|
+
author: applica-software-guru
|
|
12
|
+
version: "1.0"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# SDD Remote - Pull, Enrich, Push
|
|
16
|
+
|
|
17
|
+
## Purpose
|
|
18
|
+
|
|
19
|
+
Use this skill to synchronize local SDD docs with remote updates, enrich draft content,
|
|
20
|
+
and publish the enriched result to remote in active states.
|
|
21
|
+
|
|
22
|
+
## Detection
|
|
23
|
+
|
|
24
|
+
This workflow applies when:
|
|
25
|
+
|
|
26
|
+
- `.sdd/config.yaml` exists in the project root
|
|
27
|
+
- The user asks to update local state from remote, pull pending CRs/bugs/docs,
|
|
28
|
+
enrich drafts, or push pending remote updates
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
Follow this sequence in order:
|
|
33
|
+
|
|
34
|
+
1. Verify remote configuration
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
test -f .sdd/config.yaml && sdd remote status
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If remote is not configured or disconnected, run:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
sdd remote init
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then stop and ask the user for URL/API key if needed.
|
|
47
|
+
|
|
48
|
+
2. Pull remote updates (docs + CRs + bugs)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
sdd pull
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Optional scoped pulls:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
sdd pull --docs-only
|
|
58
|
+
sdd pull --crs-only
|
|
59
|
+
sdd pull --bugs-only
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
3. Generate draft TODO list for your coding agent
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
sdd drafts
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This command lists all local draft docs, CRs, and bugs and prints a minimal TODO-style prompt.
|
|
69
|
+
Give that prompt to your coding agent. If additional context is needed, the agent can fetch it directly from project files.
|
|
70
|
+
|
|
71
|
+
4. Transition enriched drafts to active states
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
sdd mark-drafts-enriched
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This performs:
|
|
78
|
+
|
|
79
|
+
- Document: `draft -> new`
|
|
80
|
+
- Change Request: `draft -> pending`
|
|
81
|
+
- Bug: `draft -> open`
|
|
82
|
+
|
|
83
|
+
5. Push local pending updates to remote
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
sdd push
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
6. Verify final remote sync state
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
sdd remote status
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Rules
|
|
96
|
+
|
|
97
|
+
1. Always check remote configuration before pull/push (`sdd remote status`)
|
|
98
|
+
2. Do not use `sdd push --all` unless the user explicitly asks for a full reseed
|
|
99
|
+
3. If pull reports conflicts, do not overwrite local files blindly; report conflicts and ask how to proceed
|
|
100
|
+
4. Do not edit files inside `.sdd/` manually
|
|
101
|
+
5. Keep status transitions explicit: enrich first, then `sdd mark-drafts-enriched`, then push
|
|
102
|
+
|
|
103
|
+
## Related commands
|
|
104
|
+
|
|
105
|
+
- `sdd remote init`
|
|
106
|
+
- `sdd remote status`
|
|
107
|
+
- `sdd pull`
|
|
108
|
+
- `sdd drafts`
|
|
109
|
+
- `sdd mark-drafts-enriched`
|
|
110
|
+
- `sdd push`
|
package/src/commands/bug.ts
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { SDD } from '@applica-software-guru/sdd-core';
|
|
4
|
-
import { heading, info } from '../ui/format.js';
|
|
5
|
-
|
|
6
|
-
function statusLabel(status: string): string {
|
|
7
|
-
switch (status) {
|
|
8
|
-
case 'draft':
|
|
9
|
-
return chalk.magenta('draft');
|
|
10
|
-
case 'open':
|
|
11
|
-
return chalk.yellow('open');
|
|
12
|
-
case 'resolved':
|
|
13
|
-
return chalk.green('resolved');
|
|
14
|
-
default:
|
|
15
|
-
return chalk.gray(status);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
4
|
+
import { heading, info, bugStatusLabel } from '../ui/format.js';
|
|
18
5
|
|
|
19
6
|
export function registerBug(program: Command): void {
|
|
20
7
|
const bug = program
|
|
@@ -36,7 +23,7 @@ export function registerBug(program: Command): void {
|
|
|
36
23
|
|
|
37
24
|
for (const b of bugs) {
|
|
38
25
|
const icon = b.frontmatter.status === 'resolved' ? chalk.green(' ✓') : b.frontmatter.status === 'draft' ? chalk.magenta(' ◇') : chalk.yellow(' ●');
|
|
39
|
-
console.log(`${icon} ${chalk.white(b.relativePath)} ${chalk.dim(`[${
|
|
26
|
+
console.log(`${icon} ${chalk.white(b.relativePath)} ${chalk.dim(`[${bugStatusLabel(b.frontmatter.status)}]`)} ${chalk.cyan(b.frontmatter.title)}`);
|
|
40
27
|
}
|
|
41
28
|
console.log('');
|
|
42
29
|
});
|
package/src/commands/cr.ts
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { SDD } from '@applica-software-guru/sdd-core';
|
|
4
|
-
import { heading, info } from '../ui/format.js';
|
|
5
|
-
|
|
6
|
-
function statusLabel(status: string): string {
|
|
7
|
-
switch (status) {
|
|
8
|
-
case 'draft':
|
|
9
|
-
return chalk.magenta('draft');
|
|
10
|
-
case 'pending':
|
|
11
|
-
return chalk.yellow('pending');
|
|
12
|
-
case 'applied':
|
|
13
|
-
return chalk.green('applied');
|
|
14
|
-
default:
|
|
15
|
-
return chalk.gray(status);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
4
|
+
import { heading, info, crStatusLabel } from '../ui/format.js';
|
|
18
5
|
|
|
19
6
|
export function registerCR(program: Command): void {
|
|
20
7
|
const cr = program
|
|
@@ -36,7 +23,7 @@ export function registerCR(program: Command): void {
|
|
|
36
23
|
|
|
37
24
|
for (const cr of crs) {
|
|
38
25
|
const icon = cr.frontmatter.status === 'applied' ? chalk.green(' ✓') : cr.frontmatter.status === 'draft' ? chalk.magenta(' ◇') : chalk.yellow(' ●');
|
|
39
|
-
console.log(`${icon} ${chalk.white(cr.relativePath)} ${chalk.dim(`[${
|
|
26
|
+
console.log(`${icon} ${chalk.white(cr.relativePath)} ${chalk.dim(`[${crStatusLabel(cr.frontmatter.status)}]`)} ${chalk.cyan(cr.frontmatter.title)}`);
|
|
40
27
|
}
|
|
41
28
|
console.log('');
|
|
42
29
|
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { SDD } from '@applica-software-guru/sdd-core';
|
|
4
|
+
import { heading, info } from '../ui/format.js';
|
|
5
|
+
import { renderMarkdown } from '../ui/markdown.js';
|
|
6
|
+
|
|
7
|
+
export function registerDrafts(program: Command): void {
|
|
8
|
+
program
|
|
9
|
+
.command('drafts')
|
|
10
|
+
.description('List draft docs/CRs/bugs and print a TODO prompt for the agent')
|
|
11
|
+
.action(async () => {
|
|
12
|
+
const sdd = new SDD({ root: process.cwd() });
|
|
13
|
+
|
|
14
|
+
console.log(heading('Drafts'));
|
|
15
|
+
|
|
16
|
+
const drafts = await sdd.drafts();
|
|
17
|
+
const total = drafts.docs.length + drafts.crs.length + drafts.bugs.length;
|
|
18
|
+
|
|
19
|
+
if (total === 0) {
|
|
20
|
+
console.log(info('No draft elements found.'));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
console.log(info(`Found ${total} draft element(s):`));
|
|
25
|
+
if (drafts.docs.length > 0) {
|
|
26
|
+
console.log(chalk.dim(` Documents (${drafts.docs.length})`));
|
|
27
|
+
for (const f of drafts.docs) {
|
|
28
|
+
console.log(chalk.magenta(` ◇ ${f.relativePath}`));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (drafts.crs.length > 0) {
|
|
32
|
+
console.log(chalk.dim(` Change Requests (${drafts.crs.length})`));
|
|
33
|
+
for (const cr of drafts.crs) {
|
|
34
|
+
console.log(chalk.magenta(` ◇ ${cr.relativePath}`));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (drafts.bugs.length > 0) {
|
|
38
|
+
console.log(chalk.dim(` Bugs (${drafts.bugs.length})`));
|
|
39
|
+
for (const bug of drafts.bugs) {
|
|
40
|
+
console.log(chalk.magenta(` ◇ ${bug.relativePath}`));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
console.log('');
|
|
44
|
+
|
|
45
|
+
const prompt = await sdd.draftEnrichmentPrompt();
|
|
46
|
+
if (!prompt) {
|
|
47
|
+
console.log(info('Drafts are present but no enrichment prompt could be generated.'));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
console.log(chalk.dim(' ─'.repeat(30)));
|
|
52
|
+
console.log(heading('Draft TODO'));
|
|
53
|
+
console.log(renderMarkdown(prompt));
|
|
54
|
+
console.log(chalk.dim(' ─'.repeat(30)));
|
|
55
|
+
console.log(info('After enrichment, run `sdd mark-drafts-enriched` when drafts are ready.'));
|
|
56
|
+
});
|
|
57
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -9,13 +9,13 @@ import { registerValidate } from "./commands/validate.js";
|
|
|
9
9
|
import { registerMarkSynced } from "./commands/mark-synced.js";
|
|
10
10
|
import { registerCR } from "./commands/cr.js";
|
|
11
11
|
import { registerBug } from "./commands/bug.js";
|
|
12
|
-
import { registerApply } from "./commands/apply.js";
|
|
13
12
|
import { registerAdapters } from "./commands/adapters.js";
|
|
14
13
|
import { registerUI } from "./commands/ui.js";
|
|
15
14
|
import { registerUpgrade } from "./commands/upgrade.js";
|
|
16
15
|
import { registerRemote } from "./commands/remote.js";
|
|
17
16
|
import { registerPull } from "./commands/pull.js";
|
|
18
17
|
import { registerPush } from "./commands/push.js";
|
|
18
|
+
import { registerDrafts } from "./commands/drafts.js";
|
|
19
19
|
import { registerMarkDraftsEnriched } from "./commands/mark-drafts-enriched.js";
|
|
20
20
|
|
|
21
21
|
const packageRequire = createRequire(__filename);
|
|
@@ -36,13 +36,13 @@ registerValidate(program);
|
|
|
36
36
|
registerMarkSynced(program);
|
|
37
37
|
registerCR(program);
|
|
38
38
|
registerBug(program);
|
|
39
|
-
registerApply(program);
|
|
40
39
|
registerAdapters(program);
|
|
41
40
|
registerUI(program);
|
|
42
41
|
registerUpgrade(program);
|
|
43
42
|
registerRemote(program);
|
|
44
43
|
registerPull(program);
|
|
45
44
|
registerPush(program);
|
|
45
|
+
registerDrafts(program);
|
|
46
46
|
registerMarkDraftsEnriched(program);
|
|
47
47
|
|
|
48
48
|
program.parseAsync().catch((err) => {
|
package/src/ui/format.ts
CHANGED
|
@@ -90,3 +90,29 @@ export function error(text: string): string {
|
|
|
90
90
|
export function info(text: string): string {
|
|
91
91
|
return chalk.dim(` ${text}`);
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
export function crStatusLabel(status: string): string {
|
|
95
|
+
switch (status) {
|
|
96
|
+
case 'draft':
|
|
97
|
+
return chalk.magenta('draft');
|
|
98
|
+
case 'pending':
|
|
99
|
+
return chalk.yellow('pending');
|
|
100
|
+
case 'applied':
|
|
101
|
+
return chalk.green('applied');
|
|
102
|
+
default:
|
|
103
|
+
return chalk.gray(status);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function bugStatusLabel(status: string): string {
|
|
108
|
+
switch (status) {
|
|
109
|
+
case 'draft':
|
|
110
|
+
return chalk.magenta('draft');
|
|
111
|
+
case 'open':
|
|
112
|
+
return chalk.yellow('open');
|
|
113
|
+
case 'resolved':
|
|
114
|
+
return chalk.green('resolved');
|
|
115
|
+
default:
|
|
116
|
+
return chalk.gray(status);
|
|
117
|
+
}
|
|
118
|
+
}
|
package/dist/commands/apply.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/commands/apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0CpD"}
|
package/dist/commands/apply.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerApply = registerApply;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const sdd_core_1 = require("@applica-software-guru/sdd-core");
|
|
9
|
-
const format_js_1 = require("../ui/format.js");
|
|
10
|
-
const markdown_js_1 = require("../ui/markdown.js");
|
|
11
|
-
function registerApply(program) {
|
|
12
|
-
program
|
|
13
|
-
.command('apply')
|
|
14
|
-
.description('Run the full SDD workflow automatically using an external AI agent')
|
|
15
|
-
.option('--agent <name>', 'Agent to use (default: from config or "claude")')
|
|
16
|
-
.action(async (options) => {
|
|
17
|
-
const sdd = new sdd_core_1.SDD({ root: process.cwd() });
|
|
18
|
-
console.log((0, format_js_1.heading)('SDD Apply'));
|
|
19
|
-
const prompt = await sdd.applyPrompt();
|
|
20
|
-
if (!prompt) {
|
|
21
|
-
console.log((0, format_js_1.info)('Nothing to apply — no drafts, open bugs, pending CRs, or pending files.'));
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
// Show the prompt being sent
|
|
25
|
-
console.log(chalk_1.default.dim(' ─'.repeat(30)));
|
|
26
|
-
console.log((0, format_js_1.heading)('Agent Prompt'));
|
|
27
|
-
console.log((0, markdown_js_1.renderMarkdown)(prompt));
|
|
28
|
-
console.log(chalk_1.default.dim(' ─'.repeat(30)));
|
|
29
|
-
const config = await sdd.config();
|
|
30
|
-
const agent = options.agent ?? config.agent ?? 'claude';
|
|
31
|
-
console.log((0, format_js_1.info)(`Using agent: ${chalk_1.default.cyan(agent)}`));
|
|
32
|
-
console.log((0, format_js_1.info)('Starting agent...\n'));
|
|
33
|
-
const exitCode = await (0, sdd_core_1.runAgent)({
|
|
34
|
-
root: process.cwd(),
|
|
35
|
-
prompt,
|
|
36
|
-
agent,
|
|
37
|
-
agents: config.agents,
|
|
38
|
-
});
|
|
39
|
-
if (exitCode !== 0) {
|
|
40
|
-
console.log(chalk_1.default.red(`\n Agent exited with code ${exitCode}`));
|
|
41
|
-
process.exit(exitCode);
|
|
42
|
-
}
|
|
43
|
-
console.log(chalk_1.default.green('\n Agent completed successfully.'));
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=apply.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/commands/apply.ts"],"names":[],"mappings":";;;;;AAMA,sCA0CC;AA/CD,kDAA0B;AAC1B,8DAAgE;AAChE,+CAA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,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,qBAAqB,CAAC,CAAC,CAAC;QAEzC,MAAM,QAAQ,GAAG,MAAM,IAAA,mBAAQ,EAAC;YAC9B,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE;YACnB,MAAM;YACN,KAAK;YACL,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC,CAAC;QAEH,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,8BAA8B,QAAQ,EAAE,CAAC,CAAC,CAAC;YACjE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/src/commands/apply.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { SDD, runAgent } from '@applica-software-guru/sdd-core';
|
|
4
|
-
import { heading, info } from '../ui/format.js';
|
|
5
|
-
import { renderMarkdown } from '../ui/markdown.js';
|
|
6
|
-
|
|
7
|
-
export function registerApply(program: Command): void {
|
|
8
|
-
program
|
|
9
|
-
.command('apply')
|
|
10
|
-
.description('Run the full SDD workflow automatically using an external AI agent')
|
|
11
|
-
.option('--agent <name>', 'Agent to use (default: from config or "claude")')
|
|
12
|
-
.action(async (options) => {
|
|
13
|
-
const sdd = new SDD({ root: process.cwd() });
|
|
14
|
-
|
|
15
|
-
console.log(heading('SDD Apply'));
|
|
16
|
-
|
|
17
|
-
const prompt = await sdd.applyPrompt();
|
|
18
|
-
if (!prompt) {
|
|
19
|
-
console.log(info('Nothing to apply — no drafts, open bugs, pending CRs, or pending files.'));
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Show the prompt being sent
|
|
24
|
-
console.log(chalk.dim(' ─'.repeat(30)));
|
|
25
|
-
console.log(heading('Agent Prompt'));
|
|
26
|
-
console.log(renderMarkdown(prompt));
|
|
27
|
-
console.log(chalk.dim(' ─'.repeat(30)));
|
|
28
|
-
|
|
29
|
-
const config = await sdd.config();
|
|
30
|
-
const agent = options.agent ?? config.agent ?? 'claude';
|
|
31
|
-
|
|
32
|
-
console.log(info(`Using agent: ${chalk.cyan(agent)}`));
|
|
33
|
-
console.log(info('Starting agent...\n'));
|
|
34
|
-
|
|
35
|
-
const exitCode = await runAgent({
|
|
36
|
-
root: process.cwd(),
|
|
37
|
-
prompt,
|
|
38
|
-
agent,
|
|
39
|
-
agents: config.agents,
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
if (exitCode !== 0) {
|
|
43
|
-
console.log(chalk.red(`\n Agent exited with code ${exitCode}`));
|
|
44
|
-
process.exit(exitCode);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
console.log(chalk.green('\n Agent completed successfully.'));
|
|
48
|
-
});
|
|
49
|
-
}
|