@applica-software-guru/sdd 0.1.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.
Files changed (56) hide show
  1. package/dist/commands/build.d.ts +3 -0
  2. package/dist/commands/build.d.ts.map +1 -0
  3. package/dist/commands/build.js +37 -0
  4. package/dist/commands/build.js.map +1 -0
  5. package/dist/commands/cr.d.ts +3 -0
  6. package/dist/commands/cr.d.ts.map +1 -0
  7. package/dist/commands/cr.js +76 -0
  8. package/dist/commands/cr.js.map +1 -0
  9. package/dist/commands/diff.d.ts +3 -0
  10. package/dist/commands/diff.d.ts.map +1 -0
  11. package/dist/commands/diff.js +40 -0
  12. package/dist/commands/diff.js.map +1 -0
  13. package/dist/commands/init.d.ts +3 -0
  14. package/dist/commands/init.d.ts.map +1 -0
  15. package/dist/commands/init.js +108 -0
  16. package/dist/commands/init.js.map +1 -0
  17. package/dist/commands/mark-synced.d.ts +3 -0
  18. package/dist/commands/mark-synced.d.ts.map +1 -0
  19. package/dist/commands/mark-synced.js +28 -0
  20. package/dist/commands/mark-synced.js.map +1 -0
  21. package/dist/commands/status.d.ts +3 -0
  22. package/dist/commands/status.d.ts.map +1 -0
  23. package/dist/commands/status.js +43 -0
  24. package/dist/commands/status.js.map +1 -0
  25. package/dist/commands/sync.d.ts +3 -0
  26. package/dist/commands/sync.d.ts.map +1 -0
  27. package/dist/commands/sync.js +15 -0
  28. package/dist/commands/sync.js.map +1 -0
  29. package/dist/commands/validate.d.ts +3 -0
  30. package/dist/commands/validate.d.ts.map +1 -0
  31. package/dist/commands/validate.js +41 -0
  32. package/dist/commands/validate.js.map +1 -0
  33. package/dist/index.d.ts +3 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +28 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/ui/banner.d.ts +2 -0
  38. package/dist/ui/banner.d.ts.map +1 -0
  39. package/dist/ui/banner.js +13 -0
  40. package/dist/ui/banner.js.map +1 -0
  41. package/dist/ui/format.d.ts +14 -0
  42. package/dist/ui/format.d.ts.map +1 -0
  43. package/dist/ui/format.js +90 -0
  44. package/dist/ui/format.js.map +1 -0
  45. package/package.json +21 -0
  46. package/src/commands/cr.ts +84 -0
  47. package/src/commands/diff.ts +43 -0
  48. package/src/commands/init.ts +120 -0
  49. package/src/commands/mark-synced.ts +26 -0
  50. package/src/commands/status.ts +38 -0
  51. package/src/commands/sync.ts +13 -0
  52. package/src/commands/validate.ts +44 -0
  53. package/src/index.ts +29 -0
  54. package/src/ui/banner.ts +7 -0
  55. package/src/ui/format.ts +88 -0
  56. package/tsconfig.json +8 -0
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerBuild(program: Command): void;
3
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2BpD"}
@@ -0,0 +1,37 @@
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.registerBuild = registerBuild;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const clipboardy_1 = __importDefault(require("clipboardy"));
9
+ const ora_1 = __importDefault(require("ora"));
10
+ const core_1 = require("@sdd/core");
11
+ const format_js_1 = require("../ui/format.js");
12
+ function registerBuild(program) {
13
+ program
14
+ .command('build')
15
+ .description('Generate prompt from ALL documentation files')
16
+ .option('--no-copy', 'Do not copy to clipboard')
17
+ .action(async (options) => {
18
+ const spinner = (0, ora_1.default)({ text: 'Building prompt...', color: 'cyan' }).start();
19
+ const sdd = new core_1.SDD({ root: process.cwd() });
20
+ const prompt = await sdd.build();
21
+ spinner.stop();
22
+ console.log((0, format_js_1.heading)('Build'));
23
+ console.log(chalk_1.default.dim(' ' + '─'.repeat(56)));
24
+ console.log(prompt);
25
+ console.log(chalk_1.default.dim(' ' + '─'.repeat(56)));
26
+ if (options.copy !== false) {
27
+ try {
28
+ await clipboardy_1.default.write(prompt);
29
+ console.log('\n' + (0, format_js_1.success)('Prompt copied to clipboard.\n'));
30
+ }
31
+ catch {
32
+ console.log('\n' + (0, format_js_1.warning)('Could not copy to clipboard.\n'));
33
+ }
34
+ }
35
+ });
36
+ }
37
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":";;;;;AAOA,sCA2BC;AAjCD,kDAA0B;AAC1B,4DAAoC;AACpC,8CAAsB;AACtB,oCAAgC;AAChC,+CAA4D;AAE5D,SAAgB,aAAa,CAAC,OAAgB;IAC5C,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,8CAA8C,CAAC;SAC3D,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC;SAC/C,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,MAAM,OAAO,GAAG,IAAA,aAAG,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAE3E,MAAM,GAAG,GAAG,IAAI,UAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;QAEjC,OAAO,CAAC,IAAI,EAAE,CAAC;QAEf,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAE9C,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;YAC3B,IAAI,CAAC;gBACH,MAAM,oBAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,IAAA,mBAAO,EAAC,+BAA+B,CAAC,CAAC,CAAC;YAC/D,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,IAAA,mBAAO,EAAC,gCAAgC,CAAC,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerCR(program: Command): void;
3
+ //# sourceMappingURL=cr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cr.d.ts","sourceRoot":"","sources":["../../src/commands/cr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmEjD"}
@@ -0,0 +1,76 @@
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.registerCR = registerCR;
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
+ function statusLabel(status) {
11
+ switch (status) {
12
+ case 'draft':
13
+ return chalk_1.default.yellow('draft');
14
+ case 'applied':
15
+ return chalk_1.default.green('applied');
16
+ default:
17
+ return chalk_1.default.gray(status);
18
+ }
19
+ }
20
+ function registerCR(program) {
21
+ const cr = program
22
+ .command('cr')
23
+ .description('Manage change requests');
24
+ cr.command('list')
25
+ .description('List all change requests with their status')
26
+ .action(async () => {
27
+ const sdd = new sdd_core_1.SDD({ root: process.cwd() });
28
+ const crs = await sdd.changeRequests();
29
+ console.log((0, format_js_1.heading)('Change Requests'));
30
+ if (crs.length === 0) {
31
+ console.log((0, format_js_1.info)('No change requests found.\n'));
32
+ return;
33
+ }
34
+ for (const cr of crs) {
35
+ const icon = cr.frontmatter.status === 'applied' ? chalk_1.default.green(' ✓') : chalk_1.default.yellow(' ●');
36
+ console.log(`${icon} ${chalk_1.default.white(cr.relativePath)} ${chalk_1.default.dim(`[${statusLabel(cr.frontmatter.status)}]`)} ${chalk_1.default.cyan(cr.frontmatter.title)}`);
37
+ }
38
+ console.log('');
39
+ });
40
+ cr.command('pending')
41
+ .description('Show draft change requests for the agent to process')
42
+ .action(async () => {
43
+ const sdd = new sdd_core_1.SDD({ root: process.cwd() });
44
+ const pending = await sdd.pendingChangeRequests();
45
+ if (pending.length === 0) {
46
+ console.log((0, format_js_1.heading)('Change Requests'));
47
+ console.log((0, format_js_1.info)('No pending change requests.\n'));
48
+ return;
49
+ }
50
+ console.log((0, format_js_1.heading)(`Pending Change Requests (${pending.length})`));
51
+ for (const cr of pending) {
52
+ console.log(chalk_1.default.cyan.bold(` --- ${cr.relativePath} ---`));
53
+ console.log(chalk_1.default.cyan(` Title: ${cr.frontmatter.title}`));
54
+ console.log('');
55
+ console.log(cr.body.trim().split('\n').map((line) => ` ${line}`).join('\n'));
56
+ console.log('');
57
+ }
58
+ });
59
+ program
60
+ .command('mark-cr-applied [files...]')
61
+ .description('Mark change requests as applied')
62
+ .action(async (files) => {
63
+ const sdd = new sdd_core_1.SDD({ root: process.cwd() });
64
+ const marked = await sdd.markCRApplied(files.length > 0 ? files : undefined);
65
+ console.log((0, format_js_1.heading)('Mark CR Applied'));
66
+ if (marked.length === 0) {
67
+ console.log((0, format_js_1.info)('No draft change requests to mark.\n'));
68
+ return;
69
+ }
70
+ for (const f of marked) {
71
+ console.log(chalk_1.default.green(` ✓ ${f}`));
72
+ }
73
+ console.log(chalk_1.default.dim(`\n ${marked.length} change request(s) marked as applied.\n`));
74
+ });
75
+ }
76
+ //# sourceMappingURL=cr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cr.js","sourceRoot":"","sources":["../../src/commands/cr.ts"],"names":[],"mappings":";;;;;AAgBA,gCAmEC;AAlFD,kDAA0B;AAC1B,8DAAsD;AACtD,+CAAgD;AAEhD,SAAS,WAAW,CAAC,MAAc;IACjC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,eAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC/B,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,UAAU,CAAC,OAAgB;IACzC,MAAM,EAAE,GAAG,OAAO;SACf,OAAO,CAAC,IAAI,CAAC;SACb,WAAW,CAAC,wBAAwB,CAAC,CAAC;IAEzC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,4CAA4C,CAAC;SACzD,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,GAAG,GAAG,IAAI,cAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,cAAc,EAAE,CAAC;QAEvC,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,iBAAiB,CAAC,CAAC,CAAC;QAExC,IAAI,GAAG,CAAC,MAAM,KA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,CAAC,IAAA,gBAAI,EAAC,qCAAqC,CAAC,CAAC,CAAC;YACzD,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,yCAAyC,CAAC,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerDiff(program: Command): void;
3
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqCnD"}
@@ -0,0 +1,40 @@
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.registerDiff = registerDiff;
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
+ function registerDiff(program) {
11
+ program
12
+ .command('diff')
13
+ .description('Show files that need to be synced')
14
+ .action(async () => {
15
+ const sdd = new sdd_core_1.SDD({ root: process.cwd() });
16
+ const pending = await sdd.pending();
17
+ console.log((0, format_js_1.heading)('Pending'));
18
+ if (pending.length === 0) {
19
+ console.log(chalk_1.default.green(' ✓ Everything is synced.\n'));
20
+ return;
21
+ }
22
+ console.log(chalk_1.default.yellow(` ${pending.length} file(s) pending:\n`));
23
+ for (const f of pending) {
24
+ const { status } = f.frontmatter;
25
+ const icon = status === 'deleted'
26
+ ? chalk_1.default.red(' ✗')
27
+ : status === 'new'
28
+ ? chalk_1.default.cyan(' +')
29
+ : chalk_1.default.yellow(' ~');
30
+ const label = status === 'deleted'
31
+ ? chalk_1.default.red('deleted')
32
+ : status === 'new'
33
+ ? chalk_1.default.cyan('new')
34
+ : chalk_1.default.yellow('changed');
35
+ console.log(`${icon} ${chalk_1.default.white(f.relativePath)} ${chalk_1.default.dim(`(${label})`)}`);
36
+ }
37
+ console.log('');
38
+ });
39
+ }
40
+ //# sourceMappingURL=diff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/commands/diff.ts"],"names":[],"mappings":";;;;;AAKA,oCAqCC;AAzCD,kDAA0B;AAC1B,8DAAsD;AACtD,+CAA0C;AAE1C,SAAgB,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,mCAAmC,CAAC;SAChD,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,GAAG,GAAG,IAAI,cAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;QAEpC,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,SAAS,CAAC,CAAC,CAAC;QAEhC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC;YACxD,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,MAAM,qBAAqB,CAAC,CAAC,CAAC;QAEpE,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,WAAW,CAAC;YACjC,MAAM,IAAI,GACR,MAAM,KAAK,SAAS;gBAClB,CAAC,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC;gBAClB,CAAC,CAAC,MAAM,KAAK,KAAK;oBAChB,CAAC,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC;oBACnB,CAAC,CAAC,eAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAE5B,MAAM,KAAK,GACT,MAAM,KAAK,SAAS;gBAClB,CAAC,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC;gBACtB,CAAC,CAAC,MAAM,KAAK,KAAK;oBAChB,CAAC,CAAC,eAAK,CAAC,IAAI,CAAC,KAAK,CAAC;oBACnB,CAAC,CAAC,eAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAEhC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,eAAK,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,eAAK,CAAC,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerInit(program: Command): void;
3
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+BpC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwFnD"}
@@ -0,0 +1,108 @@
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.registerInit = registerInit;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const prompts_1 = require("@inquirer/prompts");
9
+ const clipboardy_1 = __importDefault(require("clipboardy"));
10
+ const node_fs_1 = require("node:fs");
11
+ const node_path_1 = require("node:path");
12
+ const ora_1 = __importDefault(require("ora"));
13
+ const sdd_core_1 = require("@applica-software-guru/sdd-core");
14
+ const banner_js_1 = require("../ui/banner.js");
15
+ const format_js_1 = require("../ui/format.js");
16
+ const START_PROMPT = `Read INSTRUCTIONS.md and the documentation in product/ and system/, then run \`sdd sync\` to start working.`;
17
+ function buildBootstrapPrompt(description) {
18
+ return `Read INSTRUCTIONS.md first. This is a new SDD project.
19
+
20
+ Project goal: "${description}"
21
+
22
+ Your task: generate the initial documentation for this project. Ask me a few questions first to understand the project better (target users, main features, technical preferences), then create all documentation files:
23
+
24
+ - product/vision.md — Product vision and goals
25
+ - product/users.md — User personas
26
+ - product/features/*.md — One file per main feature
27
+ - system/entities.md — Data models (use ### headings per entity)
28
+ - system/architecture.md — Architecture decisions
29
+ - system/tech-stack.md — Technologies and frameworks
30
+ - system/interfaces.md — API contracts
31
+
32
+ Follow the file format described in INSTRUCTIONS.md for the YAML frontmatter. Do NOT write any code, only documentation.`;
33
+ }
34
+ function registerInit(program) {
35
+ program
36
+ .command('init <project-name>')
37
+ .description('Initialize a new SDD project')
38
+ .option('--bootstrap', 'Generate a prompt to create initial documentation with an agent')
39
+ .action(async (projectName, options) => {
40
+ (0, banner_js_1.printBanner)();
41
+ const projectDir = (0, node_path_1.resolve)(process.cwd(), projectName);
42
+ if ((0, node_fs_1.existsSync)((0, node_path_1.resolve)(projectDir, '.sdd'))) {
43
+ console.log(chalk_1.default.yellow(`\n SDD project already initialized at ${projectName}/\n`));
44
+ return;
45
+ }
46
+ const description = await (0, prompts_1.input)({
47
+ message: 'What should your project do?',
48
+ theme: {
49
+ prefix: chalk_1.default.cyan('?'),
50
+ style: { message: (text) => chalk_1.default.cyan.bold(text) },
51
+ },
52
+ });
53
+ if (!description.trim()) {
54
+ console.log(chalk_1.default.yellow('\n No description provided. Aborting.\n'));
55
+ return;
56
+ }
57
+ if (!(0, node_fs_1.existsSync)(projectDir)) {
58
+ (0, node_fs_1.mkdirSync)(projectDir, { recursive: true });
59
+ }
60
+ const spinner = (0, ora_1.default)({
61
+ text: 'Creating project structure...',
62
+ color: 'cyan',
63
+ }).start();
64
+ const sdd = new sdd_core_1.SDD({ root: projectDir });
65
+ const files = await sdd.init({ description: description.trim() });
66
+ spinner.stop();
67
+ // Project created
68
+ console.log(chalk_1.default.cyan.bold(`\n ${chalk_1.default.white(projectName)} is ready!\n`));
69
+ // Show what was created
70
+ console.log(chalk_1.default.dim(' Created:'));
71
+ for (const f of files) {
72
+ console.log((0, format_js_1.success)(f));
73
+ }
74
+ console.log((0, format_js_1.success)('product/'));
75
+ console.log((0, format_js_1.success)('product/features/'));
76
+ console.log((0, format_js_1.success)('system/'));
77
+ console.log((0, format_js_1.success)('code/'));
78
+ // Next steps
79
+ console.log(chalk_1.default.cyan.bold('\n Next steps:\n'));
80
+ console.log(` ${chalk_1.default.white('1.')} Enter the project folder:\n`);
81
+ console.log(` ${chalk_1.default.green(`cd ${projectName}`)}\n`);
82
+ if (options.bootstrap) {
83
+ console.log(` ${chalk_1.default.white('2.')} Open your AI agent and paste the prompt below.`);
84
+ console.log(` It will ask you a few questions and generate the initial docs.\n`);
85
+ }
86
+ else {
87
+ console.log(` ${chalk_1.default.white('2.')} Start writing your documentation in ${chalk_1.default.cyan('product/')} and ${chalk_1.default.cyan('system/')}.`);
88
+ console.log(` Check ${chalk_1.default.cyan('INSTRUCTIONS.md')} for the file format.\n`);
89
+ console.log(` ${chalk_1.default.white('3.')} When ready, let your AI agent run:\n`);
90
+ console.log(` ${chalk_1.default.green('sdd sync')}\n`);
91
+ }
92
+ // Prompt
93
+ const prompt = options.bootstrap
94
+ ? buildBootstrapPrompt(description.trim())
95
+ : START_PROMPT;
96
+ console.log(chalk_1.default.dim(' ─'.repeat(30)));
97
+ console.log(chalk_1.default.cyan.bold('\n Agent prompt:\n'));
98
+ console.log(chalk_1.default.white(` ${prompt.split('\n').join('\n ')}\n`));
99
+ try {
100
+ await clipboardy_1.default.write(prompt);
101
+ console.log((0, format_js_1.success)('Copied to clipboard — paste it into your agent.\n'));
102
+ }
103
+ catch {
104
+ console.log((0, format_js_1.info)('Copy the prompt above into your agent.\n'));
105
+ }
106
+ });
107
+ }
108
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;AA+BA,oCAwFC;AAtHD,kDAA0B;AAC1B,+CAA0C;AAC1C,4DAAoC;AACpC,qCAAgD;AAChD,yCAAoC;AACpC,8CAAsB;AACtB,8DAAsD;AACtD,+CAA8C;AAC9C,+CAAgD;AAEhD,MAAM,YAAY,GAAG,6GAA6G,CAAC;AAEnI,SAAS,oBAAoB,CAAC,WAAmB;IAC/C,OAAO;;iBAEQ,WAAW;;;;;;;;;;;;yHAY6F,CAAC;AAC1H,CAAC;AAED,SAAgB,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,qBAAqB,CAAC;SAC9B,WAAW,CAAC,8BAA8B,CAAC;SAC3C,MAAM,CAAC,aAAa,EAAE,iEAAiE,CAAC;SACxF,MAAM,CAAC,KAAK,EAAE,WAAmB,EAAE,OAAO,EAAE,EAAE;QAC7C,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,CAAC,0CAA0C,WAAW,KAAK,C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F,OAAO,CAAC,GAAG,CAAC,KAAK,eAAK,CAAC,KAAK,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YAC3E,OAAO,CAAC,GAAG,CAAC,QAAQ,eAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACnD,CAAC;QAED,SAAS;QACT,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS;YAC9B,CAAC,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;YAC1C,CAAC,CAAC,YAAY,CAAC;QAEjB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAEnE,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"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerMarkSynced(program: Command): void;
3
+ //# sourceMappingURL=mark-synced.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mark-synced.d.ts","sourceRoot":"","sources":["../../src/commands/mark-synced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoBzD"}
@@ -0,0 +1,28 @@
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.registerMarkSynced = registerMarkSynced;
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
+ function registerMarkSynced(program) {
11
+ program
12
+ .command('mark-synced [files...]')
13
+ .description('Mark specific files (or all) as synced')
14
+ .action(async (files) => {
15
+ const sdd = new sdd_core_1.SDD({ root: process.cwd() });
16
+ const marked = await sdd.markSynced(files.length > 0 ? files : undefined);
17
+ console.log((0, format_js_1.heading)('Mark Synced'));
18
+ if (marked.length === 0) {
19
+ console.log((0, format_js_1.info)('No pending files to mark.\n'));
20
+ return;
21
+ }
22
+ for (const f of marked) {
23
+ console.log((0, format_js_1.success)(f));
24
+ }
25
+ console.log(chalk_1.default.dim(`\n ${marked.length} file(s) marked as synced.\n`));
26
+ });
27
+ }
28
+ //# sourceMappingURL=mark-synced.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mark-synced.js","sourceRoot":"","sources":["../../src/commands/mark-synced.ts"],"names":[],"mappings":";;;;;AAKA,gDAoBC;AAxBD,kDAA0B;AAC1B,8DAAsD;AACtD,+CAAyD;AAEzD,SAAgB,kBAAkB,CAAC,OAAgB;IACjD,OAAO;SACJ,OAAO,CAAC,wBAAwB,CAAC;SACjC,WAAW,CAAC,wCAAwC,CAAC;SACrD,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,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAE1E,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,aAAa,CAAC,CAAC,CAAC;QAEpC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,6BAA6B,CAAC,CAAC,CAAC;YACjD,OAAO;QACT,CAAC;QAED,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,OAAO,MAAM,CAAC,MAAM,8BAA8B,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerStatus(program: Command): void;
3
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgCrD"}
@@ -0,0 +1,43 @@
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.registerStatus = registerStatus;
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
+ function registerStatus(program) {
11
+ program
12
+ .command('status')
13
+ .description('Show status of all story files')
14
+ .action(async () => {
15
+ const sdd = new sdd_core_1.SDD({ root: process.cwd() });
16
+ const result = await sdd.status();
17
+ if (result.files.length === 0) {
18
+ console.log((0, format_js_1.heading)('Status'));
19
+ console.log((0, format_js_1.info)('No story files found.\n'));
20
+ return;
21
+ }
22
+ const counts = {
23
+ new: result.files.filter((f) => f.status === 'new').length,
24
+ changed: result.files.filter((f) => f.status === 'changed').length,
25
+ deleted: result.files.filter((f) => f.status === 'deleted').length,
26
+ synced: result.files.filter((f) => f.status === 'synced').length,
27
+ };
28
+ console.log((0, format_js_1.heading)('Story Files'));
29
+ console.log((0, format_js_1.createStatusTable)(result.files));
30
+ console.log('');
31
+ const parts = [];
32
+ if (counts.new)
33
+ parts.push(chalk_1.default.cyan.bold(`${counts.new} new`));
34
+ if (counts.changed)
35
+ parts.push(chalk_1.default.yellow.bold(`${counts.changed} changed`));
36
+ if (counts.deleted)
37
+ parts.push(chalk_1.default.red.bold(`${counts.deleted} deleted`));
38
+ if (counts.synced)
39
+ parts.push(chalk_1.default.green.bold(`${counts.synced} synced`));
40
+ console.log(` ${parts.join(' ')}\n`);
41
+ });
42
+ }
43
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":";;;;;AAKA,wCAgCC;AApCD,kDAA0B;AAC1B,8DAAsD;AACtD,+CAAmE;AAEnE,SAAgB,cAAc,CAAC,OAAgB;IAC7C,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,gCAAgC,CAAC;SAC7C,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,GAAG,GAAG,IAAI,cAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;QAElC,IAAI,MAAM,CAAC,KAAK,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AAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;QAC/E,IAAI,MAAM,CAAC,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,eAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;QAC5E,IAAI,MAAM,CAAC,MAAM;YAAE,KAAK,CAAC,IAAI,CAAC,eAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerSync(program: Command): void;
3
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CASnD"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerSync = registerSync;
4
+ const sdd_core_1 = require("@applica-software-guru/sdd-core");
5
+ function registerSync(program) {
6
+ program
7
+ .command('sync')
8
+ .description('Output the sync prompt for pending files (new/changed/deleted)')
9
+ .action(async () => {
10
+ const sdd = new sdd_core_1.SDD({ root: process.cwd() });
11
+ const prompt = await sdd.sync();
12
+ process.stdout.write(prompt);
13
+ });
14
+ }
15
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":";;AAGA,oCASC;AAXD,8DAAsD;AAEtD,SAAgB,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,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;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerValidate(program: Command): void;
3
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqCvD"}
@@ -0,0 +1,41 @@
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.registerValidate = registerValidate;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const ora_1 = __importDefault(require("ora"));
9
+ const sdd_core_1 = require("@applica-software-guru/sdd-core");
10
+ const format_js_1 = require("../ui/format.js");
11
+ function registerValidate(program) {
12
+ program
13
+ .command('validate')
14
+ .description('Validate documentation for issues')
15
+ .action(async () => {
16
+ const spinner = (0, ora_1.default)({ text: 'Validating...', color: 'cyan' }).start();
17
+ const sdd = new sdd_core_1.SDD({ root: process.cwd() });
18
+ const result = await sdd.validate();
19
+ spinner.stop();
20
+ console.log((0, format_js_1.heading)('Validation'));
21
+ if (result.valid && result.issues.length === 0) {
22
+ console.log((0, format_js_1.success)('No issues found.\n'));
23
+ return;
24
+ }
25
+ for (const issue of result.issues) {
26
+ if (issue.severity === 'error') {
27
+ console.log((0, format_js_1.error)(`${chalk_1.default.white(issue.filePath)}: ${issue.message}`));
28
+ }
29
+ else {
30
+ console.log((0, format_js_1.warning)(`${chalk_1.default.white(issue.filePath)}: ${issue.message}`));
31
+ }
32
+ }
33
+ const errors = result.issues.filter((i) => i.severity === 'error').length;
34
+ const warnings = result.issues.filter((i) => i.severity === 'warning').length;
35
+ console.log(`\n ${chalk_1.default.red.bold(String(errors))} error(s) ${chalk_1.default.yellow.bold(String(warnings))} warning(s)\n`);
36
+ if (!result.valid) {
37
+ process.exit(1);
38
+ }
39
+ });
40
+ }
41
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":";;;;;AAMA,4CAqCC;AA1CD,kDAA0B;AAC1B,8CAAsB;AACtB,8DAAsD;AACtD,+CAAmE;AAEnE,SAAgB,gBAAgB,CAAC,OAAgB;IAC/C,OAAO;SACJ,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,mCAAmC,CAAC;SAChD,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,OAAO,GAAG,IAAA,aAAG,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAEtE,MAAM,GAAG,GAAG,IAAI,cAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC;QAEpC,OAAO,CAAC,IAAI,EAAE,CAAC;QAEf,OAAO,CAAC,GAAG,CAAC,IAAA,mBAAO,EAAC,YAAY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AC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const commander_1 = require("commander");
5
+ const init_js_1 = require("./commands/init.js");
6
+ const status_js_1 = require("./commands/status.js");
7
+ const diff_js_1 = require("./commands/diff.js");
8
+ const sync_js_1 = require("./commands/sync.js");
9
+ const validate_js_1 = require("./commands/validate.js");
10
+ const mark_synced_js_1 = require("./commands/mark-synced.js");
11
+ const cr_js_1 = require("./commands/cr.js");
12
+ const program = new commander_1.Command();
13
+ program
14
+ .name('sdd')
15
+ .description('Story Driven Development — manage apps through structured documentation')
16
+ .version('0.1.0');
17
+ (0, init_js_1.registerInit)(program);
18
+ (0, status_js_1.registerStatus)(program);
19
+ (0, diff_js_1.registerDiff)(program);
20
+ (0, sync_js_1.registerSync)(program);
21
+ (0, validate_js_1.registerValidate)(program);
22
+ (0, mark_synced_js_1.registerMarkSynced)(program);
23
+ (0, cr_js_1.registerCR)(program);
24
+ program.parseAsync().catch((err) => {
25
+ console.error(err.message);
26
+ process.exit(1);
27
+ });
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,gDAAkD;AAClD,oDAAsD;AACtD,gDAAkD;AAClD,gDAAkD;AAClD,wDAA0D;AAC1D,8DAA+D;AAC/D,4CAA8C;AAE9C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,KAAK,CAAC;KACX,WAAW,CAAC,yEAAyE,CAAC;KACtF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,IAAA,sBAAY,EAAC,OAAO,CAAC,CAAC;AACtB,IAAA,0BAAc,EAAC,OAAO,CAAC,CAAC;AACxB,IAAA,sBAAY,EAAC,OAAO,CAAC,CAAC;AACtB,IAAA,sBAAY,EAAC,OAAO,CAAC,CAAC;AACtB,IAAA,8BAAgB,EAAC,OAAO,CAAC,CAAC;AAC1B,IAAA,mCAAkB,EAAC,OAAO,CAAC,CAAC;AAC5B,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAC;AAEpB,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"}
@@ -0,0 +1,2 @@
1
+ export declare function printBanner(): void;
2
+ //# sourceMappingURL=banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/ui/banner.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,IAAI,IAAI,CAIlC"}
@@ -0,0 +1,13 @@
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.printBanner = printBanner;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ function printBanner() {
9
+ console.log('');
10
+ console.log(` ${chalk_1.default.cyan.bold('SDD')} ${chalk_1.default.dim('—')} ${chalk_1.default.white('Story Driven Development')}`);
11
+ console.log('');
12
+ }
13
+ //# sourceMappingURL=banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.js","sourceRoot":"","sources":["../../src/ui/banner.ts"],"names":[],"mappings":";;;;;AAEA,kCAIC;AAND,kDAA0B;AAE1B,SAAgB,WAAW;IACzB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,eAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,eAAK,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;IACxG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare function statusIcon(status: string): string;
2
+ export declare function statusLabel(status: string): string;
3
+ export declare function createStatusTable(files: Array<{
4
+ relativePath: string;
5
+ status: string;
6
+ version: string;
7
+ lastModified?: string;
8
+ }>): string;
9
+ export declare function heading(text: string): string;
10
+ export declare function success(text: string): string;
11
+ export declare function warning(text: string): string;
12
+ export declare function error(text: string): string;
13
+ export declare function info(text: string): string;
14
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +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,CAajD;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAalD;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"}