@applica-software-guru/sdd-core 0.2.0 → 1.0.1

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 (44) hide show
  1. package/dist/agent/agent-defaults.d.ts +3 -0
  2. package/dist/agent/agent-defaults.d.ts.map +1 -0
  3. package/dist/agent/agent-defaults.js +13 -0
  4. package/dist/agent/agent-defaults.js.map +1 -0
  5. package/dist/agent/agent-runner.d.ts +9 -0
  6. package/dist/agent/agent-runner.d.ts.map +1 -0
  7. package/dist/agent/agent-runner.js +43 -0
  8. package/dist/agent/agent-runner.js.map +1 -0
  9. package/dist/index.d.ts +5 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +7 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/parser/bug-parser.d.ts +8 -0
  14. package/dist/parser/bug-parser.d.ts.map +1 -0
  15. package/dist/parser/bug-parser.js +45 -0
  16. package/dist/parser/bug-parser.js.map +1 -0
  17. package/dist/prompt/apply-prompt-generator.d.ts +3 -0
  18. package/dist/prompt/apply-prompt-generator.d.ts.map +1 -0
  19. package/dist/prompt/apply-prompt-generator.js +67 -0
  20. package/dist/prompt/apply-prompt-generator.js.map +1 -0
  21. package/dist/scaffold/init.js +1 -1
  22. package/dist/scaffold/init.js.map +1 -1
  23. package/dist/scaffold/templates.d.ts +1 -1
  24. package/dist/scaffold/templates.d.ts.map +1 -1
  25. package/dist/scaffold/templates.js +55 -9
  26. package/dist/scaffold/templates.js.map +1 -1
  27. package/dist/sdd.d.ts +5 -1
  28. package/dist/sdd.d.ts.map +1 -1
  29. package/dist/sdd.js +36 -0
  30. package/dist/sdd.js.map +1 -1
  31. package/dist/types.d.ts +14 -0
  32. package/dist/types.d.ts.map +1 -1
  33. package/package.json +1 -1
  34. package/src/agent/agent-defaults.ts +12 -0
  35. package/src/agent/agent-runner.ts +54 -0
  36. package/src/index.ts +7 -1
  37. package/src/parser/bug-parser.ts +41 -0
  38. package/src/prompt/apply-prompt-generator.ts +82 -0
  39. package/src/scaffold/init.ts +1 -1
  40. package/src/scaffold/templates.ts +55 -9
  41. package/src/sdd.ts +42 -1
  42. package/src/types.ts +17 -0
  43. package/tests/apply.test.ts +119 -0
  44. package/tests/bug.test.ts +173 -0
@@ -0,0 +1,3 @@
1
+ export declare const DEFAULT_AGENTS: Record<string, string>;
2
+ export declare function resolveAgentCommand(name: string, configAgents?: Record<string, string>): string | undefined;
3
+ //# sourceMappingURL=agent-defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-defaults.d.ts","sourceRoot":"","sources":["../../src/agent/agent-defaults.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIjD,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,MAAM,GAAG,SAAS,CAEpB"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_AGENTS = void 0;
4
+ exports.resolveAgentCommand = resolveAgentCommand;
5
+ exports.DEFAULT_AGENTS = {
6
+ claude: 'claude -p "$(cat $PROMPT_FILE)" --dangerously-skip-permissions --verbose',
7
+ codex: 'codex -q "$(cat $PROMPT_FILE)"',
8
+ opencode: 'opencode -p "$(cat $PROMPT_FILE)"',
9
+ };
10
+ function resolveAgentCommand(name, configAgents) {
11
+ return configAgents?.[name] ?? exports.DEFAULT_AGENTS[name];
12
+ }
13
+ //# sourceMappingURL=agent-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-defaults.js","sourceRoot":"","sources":["../../src/agent/agent-defaults.ts"],"names":[],"mappings":";;;AAMA,kDAKC;AAXY,QAAA,cAAc,GAA2B;IACpD,MAAM,EAAE,0EAA0E;IAClF,KAAK,EAAE,gCAAgC;IACvC,QAAQ,EAAE,mCAAmC;CAC9C,CAAC;AAEF,SAAgB,mBAAmB,CACjC,IAAY,EACZ,YAAqC;IAErC,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC,IAAI,sBAAc,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,9 @@
1
+ export interface AgentRunnerOptions {
2
+ root: string;
3
+ prompt: string;
4
+ agent: string;
5
+ agents?: Record<string, string>;
6
+ onOutput?: (data: string) => void;
7
+ }
8
+ export declare function runAgent(options: AgentRunnerOptions): Promise<number>;
9
+ //# sourceMappingURL=agent-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-runner.d.ts","sourceRoot":"","sources":["../../src/agent/agent-runner.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,wBAAsB,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC3E"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runAgent = runAgent;
4
+ const node_child_process_1 = require("node:child_process");
5
+ const promises_1 = require("node:fs/promises");
6
+ const node_os_1 = require("node:os");
7
+ const node_path_1 = require("node:path");
8
+ const node_crypto_1 = require("node:crypto");
9
+ const agent_defaults_js_1 = require("./agent-defaults.js");
10
+ async function runAgent(options) {
11
+ const { root, prompt, agent, agents, onOutput } = options;
12
+ const template = (0, agent_defaults_js_1.resolveAgentCommand)(agent, agents);
13
+ if (!template) {
14
+ throw new Error(`Unknown agent "${agent}". Available: ${Object.keys(agents ?? {}).join(', ') || 'claude, codex, opencode'}`);
15
+ }
16
+ // Write prompt to temp file (too large for CLI arg)
17
+ const tmpFile = (0, node_path_1.join)((0, node_os_1.tmpdir)(), `sdd-prompt-${(0, node_crypto_1.randomBytes)(6).toString('hex')}.md`);
18
+ await (0, promises_1.writeFile)(tmpFile, prompt, 'utf-8');
19
+ // Replace $PROMPT_FILE with the temp file path in the command template
20
+ const command = template.replace(/\$PROMPT_FILE/g, tmpFile);
21
+ try {
22
+ const exitCode = await new Promise((resolve, reject) => {
23
+ const child = (0, node_child_process_1.spawn)(command, {
24
+ cwd: root,
25
+ shell: true,
26
+ stdio: onOutput ? ['inherit', 'pipe', 'pipe'] : 'inherit',
27
+ });
28
+ if (onOutput && child.stdout) {
29
+ child.stdout.on('data', (data) => onOutput(data.toString()));
30
+ }
31
+ if (onOutput && child.stderr) {
32
+ child.stderr.on('data', (data) => onOutput(data.toString()));
33
+ }
34
+ child.on('error', reject);
35
+ child.on('close', (code) => resolve(code ?? 1));
36
+ });
37
+ return exitCode;
38
+ }
39
+ finally {
40
+ await (0, promises_1.unlink)(tmpFile).catch(() => { });
41
+ }
42
+ }
43
+ //# sourceMappingURL=agent-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/agent/agent-runner.ts"],"names":[],"mappings":";;AAeA,4BAsCC;AArDD,2DAA2C;AAC3C,+CAAqD;AACrD,qCAAiC;AACjC,yCAAiC;AACjC,6CAA0C;AAC1C,2DAA0D;AAUnD,KAAK,UAAU,QAAQ,CAAC,OAA2B;IACxD,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAE1D,MAAM,QAAQ,GAAG,IAAA,uCAAmB,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACpD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,iBAAiB,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,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC1B,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;YAAS,CAAC;QACT,MAAM,IAAA,iBAAM,EAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACxC,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  export { SDD } from './sdd.js';
2
- export type { StoryFrontmatter, StoryFile, PendingItem, Delta, DeltaFile, ValidationResult, ValidationIssue, StoryStatus, StoryFileStatus, SDDConfig, ChangeRequest, ChangeRequestFrontmatter, ChangeRequestStatus, } from './types.js';
2
+ export type { StoryFrontmatter, StoryFile, PendingItem, Delta, DeltaFile, ValidationResult, ValidationIssue, StoryStatus, StoryFileStatus, SDDConfig, ChangeRequest, ChangeRequestFrontmatter, ChangeRequestStatus, Bug, BugFrontmatter, BugStatus, } from './types.js';
3
3
  export { SDDError, LockFileNotFoundError, ParseError, ProjectNotInitializedError } from './errors.js';
4
4
  export type { ProjectInfo } from './scaffold/templates.js';
5
- export { isSDDProject, readConfig } from './config/config-manager.js';
5
+ export { isSDDProject, readConfig, writeConfig } from './config/config-manager.js';
6
+ export { runAgent } from './agent/agent-runner.js';
7
+ export type { AgentRunnerOptions } from './agent/agent-runner.js';
8
+ export { DEFAULT_AGENTS, resolveAgentCommand } from './agent/agent-defaults.js';
6
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,YAAY,EACV,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,eAAe,EACf,SAAS,EACT,aAAa,EACb,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACtG,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,YAAY,EACV,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,eAAe,EACf,SAAS,EACT,aAAa,EACb,wBAAwB,EACxB,mBAAmB,EACnB,GAAG,EACH,cAAc,EACd,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACtG,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readConfig = exports.isSDDProject = exports.ProjectNotInitializedError = exports.ParseError = exports.LockFileNotFoundError = exports.SDDError = exports.SDD = void 0;
3
+ exports.resolveAgentCommand = exports.DEFAULT_AGENTS = exports.runAgent = exports.writeConfig = exports.readConfig = exports.isSDDProject = exports.ProjectNotInitializedError = exports.ParseError = exports.LockFileNotFoundError = exports.SDDError = exports.SDD = void 0;
4
4
  var sdd_js_1 = require("./sdd.js");
5
5
  Object.defineProperty(exports, "SDD", { enumerable: true, get: function () { return sdd_js_1.SDD; } });
6
6
  var errors_js_1 = require("./errors.js");
@@ -11,4 +11,10 @@ Object.defineProperty(exports, "ProjectNotInitializedError", { enumerable: true,
11
11
  var config_manager_js_1 = require("./config/config-manager.js");
12
12
  Object.defineProperty(exports, "isSDDProject", { enumerable: true, get: function () { return config_manager_js_1.isSDDProject; } });
13
13
  Object.defineProperty(exports, "readConfig", { enumerable: true, get: function () { return config_manager_js_1.readConfig; } });
14
+ Object.defineProperty(exports, "writeConfig", { enumerable: true, get: function () { return config_manager_js_1.writeConfig; } });
15
+ var agent_runner_js_1 = require("./agent/agent-runner.js");
16
+ Object.defineProperty(exports, "runAgent", { enumerable: true, get: function () { return agent_runner_js_1.runAgent; } });
17
+ var agent_defaults_js_1 = require("./agent/agent-defaults.js");
18
+ Object.defineProperty(exports, "DEFAULT_AGENTS", { enumerable: true, get: function () { return agent_defaults_js_1.DEFAULT_AGENTS; } });
19
+ Object.defineProperty(exports, "resolveAgentCommand", { enumerable: true, get: function () { return agent_defaults_js_1.resolveAgentCommand; } });
14
20
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAAtB,6FAAA,GAAG,OAAA;AAgBZ,yCAAsG;AAA7F,qGAAA,QAAQ,OAAA;AAAE,kHAAA,qBAAqB,OAAA;AAAE,uGAAA,UAAU,OAAA;AAAE,uHAAA,0BAA0B,OAAA;AAEhF,gEAAsE;AAA7D,iHAAA,YAAY,OAAA;AAAE,+GAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAAtB,6FAAA,GAAG,OAAA;AAmBZ,yCAAsG;AAA7F,qGAAA,QAAQ,OAAA;AAAE,kHAAA,qBAAqB,OAAA;AAAE,uGAAA,UAAU,OAAA;AAAE,uHAAA,0BAA0B,OAAA;AAEhF,gEAAmF;AAA1E,iHAAA,YAAY,OAAA;AAAE,+GAAA,UAAU,OAAA;AAAE,gHAAA,WAAW,OAAA;AAC9C,2DAAmD;AAA1C,2GAAA,QAAQ,OAAA;AAEjB,+DAAgF;AAAvE,mHAAA,cAAc,OAAA;AAAE,wHAAA,mBAAmB,OAAA"}
@@ -0,0 +1,8 @@
1
+ import type { Bug, BugFrontmatter } from '../types.js';
2
+ export declare function discoverBugFiles(root: string): Promise<string[]>;
3
+ export declare function parseBugFile(filePath: string, content: string): {
4
+ frontmatter: BugFrontmatter;
5
+ body: string;
6
+ };
7
+ export declare function parseAllBugFiles(root: string): Promise<Bug[]>;
8
+ //# sourceMappingURL=bug-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bug-parser.d.ts","sourceRoot":"","sources":["../../src/parser/bug-parser.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGvD,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAItE;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAa7G;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAYnE"}
@@ -0,0 +1,45 @@
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.discoverBugFiles = discoverBugFiles;
7
+ exports.parseBugFile = parseBugFile;
8
+ exports.parseAllBugFiles = parseAllBugFiles;
9
+ const promises_1 = require("node:fs/promises");
10
+ const node_path_1 = require("node:path");
11
+ const glob_1 = require("glob");
12
+ const gray_matter_1 = __importDefault(require("gray-matter"));
13
+ const errors_js_1 = require("../errors.js");
14
+ async function discoverBugFiles(root) {
15
+ const pattern = 'bugs/*.md';
16
+ const matches = await (0, glob_1.glob)(pattern, { cwd: root, absolute: true });
17
+ return matches.sort();
18
+ }
19
+ function parseBugFile(filePath, content) {
20
+ try {
21
+ const { data, content: body } = (0, gray_matter_1.default)(content);
22
+ const frontmatter = {
23
+ title: data.title ?? '',
24
+ status: data.status ?? 'open',
25
+ author: data.author ?? '',
26
+ 'created-at': data['created-at'] ?? '',
27
+ };
28
+ return { frontmatter, body };
29
+ }
30
+ catch (err) {
31
+ throw new errors_js_1.ParseError(filePath, err.message);
32
+ }
33
+ }
34
+ async function parseAllBugFiles(root) {
35
+ const paths = await discoverBugFiles(root);
36
+ const results = [];
37
+ for (const absPath of paths) {
38
+ const content = await (0, promises_1.readFile)(absPath, 'utf-8');
39
+ const relPath = (0, node_path_1.relative)(root, absPath);
40
+ const { frontmatter, body } = parseBugFile(relPath, content);
41
+ results.push({ relativePath: relPath, frontmatter, body });
42
+ }
43
+ return results;
44
+ }
45
+ //# sourceMappingURL=bug-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bug-parser.js","sourceRoot":"","sources":["../../src/parser/bug-parser.ts"],"names":[],"mappings":";;;;;AAOA,4CAIC;AAED,oCAaC;AAED,4CAYC;AAxCD,+CAA4C;AAC5C,yCAA8C;AAC9C,+BAA4B;AAC5B,8DAAiC;AAEjC,4CAA0C;AAEnC,KAAK,UAAU,gBAAgB,CAAC,IAA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CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Bug, ChangeRequest, StoryFile } from '../types.js';
2
+ export declare function generateApplyPrompt(bugs: Bug[], changeRequests: ChangeRequest[], pendingFiles: StoryFile[], root: string): string | null;
3
+ //# sourceMappingURL=apply-prompt-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-prompt-generator.d.ts","sourceRoot":"","sources":["../../src/prompt/apply-prompt-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGjE,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,GAAG,EAAE,EACX,cAAc,EAAE,aAAa,EAAE,EAC/B,YAAY,EAAE,SAAS,EAAE,EACzB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,CAyEf"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateApplyPrompt = generateApplyPrompt;
4
+ const git_js_1 = require("../git/git.js");
5
+ function generateApplyPrompt(bugs, changeRequests, pendingFiles, root) {
6
+ if (bugs.length === 0 && changeRequests.length === 0 && pendingFiles.length === 0) {
7
+ return null;
8
+ }
9
+ const sections = [];
10
+ sections.push('# SDD Apply\n\nThis project uses Story Driven Development. Complete the tasks below in order.');
11
+ // Bugs section
12
+ if (bugs.length > 0) {
13
+ const lines = [`## Open Bugs (${bugs.length})\n`];
14
+ for (const bug of bugs) {
15
+ lines.push(`### \`${bug.relativePath}\` — ${bug.frontmatter.title}\n`);
16
+ lines.push(bug.body.trim());
17
+ lines.push('');
18
+ }
19
+ sections.push(lines.join('\n'));
20
+ }
21
+ // Change Requests section
22
+ if (changeRequests.length > 0) {
23
+ const lines = [`## Pending Change Requests (${changeRequests.length})\n`];
24
+ for (const cr of changeRequests) {
25
+ lines.push(`### \`${cr.relativePath}\` — ${cr.frontmatter.title}\n`);
26
+ lines.push(cr.body.trim());
27
+ lines.push('');
28
+ }
29
+ sections.push(lines.join('\n'));
30
+ }
31
+ // Pending Files section
32
+ if (pendingFiles.length > 0) {
33
+ const lines = [`## Pending Files (${pendingFiles.length})\n`];
34
+ for (const f of pendingFiles) {
35
+ lines.push(`- \`${f.relativePath}\` — **${f.frontmatter.status}**`);
36
+ }
37
+ lines.push('');
38
+ lines.push('Read each file listed above before implementing.');
39
+ // Show git diff for changed files
40
+ const changed = pendingFiles.filter((f) => f.frontmatter.status === 'changed');
41
+ for (const f of changed) {
42
+ const diff = (0, git_js_1.getFileDiff)(root, f.relativePath);
43
+ if (diff) {
44
+ lines.push('');
45
+ lines.push(`### Changes in \`${f.relativePath}\`\n\n\`\`\`diff\n${diff}\n\`\`\``);
46
+ }
47
+ }
48
+ sections.push(lines.join('\n'));
49
+ }
50
+ // Instructions
51
+ const instructions = ['## Instructions\n'];
52
+ if (bugs.length > 0) {
53
+ instructions.push('1. Fix each open bug, then run `sdd mark-bug-resolved <file>` and commit');
54
+ }
55
+ if (changeRequests.length > 0) {
56
+ instructions.push(`${bugs.length > 0 ? '2' : '1'}. Apply each CR to the documentation, then run \`sdd mark-cr-applied <file>\` and commit`);
57
+ }
58
+ if (pendingFiles.length > 0) {
59
+ const step = (bugs.length > 0 ? 1 : 0) + (changeRequests.length > 0 ? 1 : 0) + 1;
60
+ instructions.push(`${step}. Implement each pending file, then run \`sdd mark-synced <file>\` and commit`);
61
+ }
62
+ const lastStep = (bugs.length > 0 ? 1 : 0) + (changeRequests.length > 0 ? 1 : 0) + (pendingFiles.length > 0 ? 1 : 0) + 1;
63
+ instructions.push(`${lastStep}. After each mark-* command, immediately commit: \`git add -A && git commit -m "sdd: <description>"\``);
64
+ sections.push(instructions.join('\n'));
65
+ return sections.join('\n\n');
66
+ }
67
+ //# sourceMappingURL=apply-prompt-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-prompt-generator.js","sourceRoot":"","sources":["../../src/prompt/apply-prompt-generator.ts"],"names":[],"mappings":";;AAGA,kDA8EC;AAhFD,0CAA4C;AAE5C,SAAgB,mBAAmB,CACjC,IAAW,EACX,cAA+B,EAC/B,YAAyB,EACzB,IAAY;IAEZ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,QAAQ,CAAC,IAAI,CAAC,+FAA+F,CAAC,CAAC;IAE/G,eAAe;IACf,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,MAAM,KAAK,GAAG,CAAC,iBAAiB,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;QAClD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,YAAY,QAAQ,GAAG,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,CAAC;YACvE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,0BAA0B;IAC1B,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAG,CAAC,+BAA+B,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC;QAC1E,KAAK,MAAM,EAAE,IAAI,cAAc,EAAE,CAAC;YA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,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvC,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
@@ -26,7 +26,7 @@ async function initProject(root, info) {
26
26
  await (0, config_manager_js_1.writeConfig)(root, config);
27
27
  createdFiles.push('.sdd/config.yaml');
28
28
  // Create directory structure
29
- const dirs = ['product', 'product/features', 'system', 'code', 'change-requests'];
29
+ const dirs = ['product', 'product/features', 'system', 'code', 'change-requests', 'bugs'];
30
30
  for (const dir of dirs) {
31
31
  const absDir = (0, node_path_1.resolve)(root, dir);
32
32
  if (!(0, node_fs_1.existsSync)(absDir)) {
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/scaffold/init.ts"],"names":[],"mappings":";;AAQA,kCA8DC;AAtED,+CAAoD;AACpD,qCAAqC;AACrC,yCAAoC;AACpC,iDAAqE;AACrE,mEAAsE;AACtE,0CAAmD;AAG5C,KAAK,UAAU,WAAW,CAAC,IAAY,EAAE,IAAkB;IAChE,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,MAAM,MAAM,GAAG,IAAA,8BAAU,EAAC,IAAI,CAAC,CAAC;IAEhC,kBAAkB;IAClB,IAAI,CAAC,IAAA,kBAAS,EAAC,IAAI,CAAC,EAAE,CAAC;QACrB,IAAA,gBAAO,EAAC,IAAI,CAAC,CAAC;QACd,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED,wBAAwB;IACxB,IAAI,CAAC,IAAA,oBAAU,EAAC,MAAM,CAAC,EAAE,CAAC;QACxB,MAAM,IAAA,gBAAK,EAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,eAAe;IACf,MAAM,MAAM,GAAc;QACxB,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,EAAE;KACrC,CAAC;IACF,MAAM,IAAA,+BAAW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AAI,CAAC,CAAC;QAC1C,IAAI,IAAA,oBAAU,EAAC,OAAO,CAAC;YAAE,SAAS;QAElC,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;YACd,MAAM,MAAM,GAAG,IAAA,mBAAO,EAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;YACxC,IAAI,CAAC,IAAA,oBAAU,EAAC,MAAM,CAAC,EAAE,CAAC;gBACxB,MAAM,IAAA,gBAAK,EAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;QAED,MAAM,IAAA,oBAAS,EAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3C,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export interface ProjectInfo {
2
2
  description: string;
3
3
  }
4
- export declare const AGENT_MD_TEMPLATE = "# SDD Project\n\nThis project uses **Story Driven Development (SDD)**.\nDocumentation drives implementation: read the docs first, then write code.\n\n## Workflow\n\n1. Run `sdd cr pending` \u2014 check if there are change requests to process first\n2. If there are pending CRs, apply them to the docs, then run `sdd mark-cr-applied`\n3. Run `sdd sync` to see what needs to be implemented\n4. Read the documentation files listed in the sync output\n5. Implement what each file describes, writing code inside `code/`\n6. After implementing, mark files as synced:\n\n```\nsdd mark-synced product/features/auth.md\n```\n\nOr mark all pending files at once:\n\n```\nsdd mark-synced\n```\n\n7. **Commit immediately after mark-synced** \u2014 this is mandatory:\n\n```\ngit add -A && git commit -m \"sdd sync: <brief description of what was implemented>\"\n```\n\nDo NOT skip this step. Every mark-synced must be followed by a git commit.\n\n### Removing a feature\n\nIf a documentation file has `status: deleted`, it means that feature should be removed.\nDelete the related code in `code/`, then run `sdd mark-synced <file>` (the doc file will be removed automatically), then commit.\n\n## Available commands\n\n- `sdd status` \u2014 See all documentation files and their state (new/changed/deleted/synced)\n- `sdd diff` \u2014 See what changed since last sync\n- `sdd sync` \u2014 Get the sync prompt for pending files (new/changed/deleted)\n- `sdd validate` \u2014 Check for broken references and issues\n- `sdd mark-synced [files...]` \u2014 Mark specific files (or all) as synced\n- `sdd cr list` \u2014 List all change requests with their status\n- `sdd cr pending` \u2014 Show draft change requests to process\n- `sdd mark-cr-applied [files...]` \u2014 Mark change requests as applied\n\n## Rules\n\n1. **Always commit after mark-synced** \u2014 run `git add -A && git commit -m \"sdd sync: ...\"` immediately after `sdd mark-synced`. Never leave synced files uncommitted.\n2. Before running `sdd sync`, check for pending change requests with `sdd cr pending`\n3. If there are pending CRs, apply them to the docs first, then mark them with `sdd mark-cr-applied`\n4. Only implement what the sync prompt asks for\n5. All generated code goes inside `code/`\n6. Respect all constraints in `## Agent Notes` sections (if present)\n7. Do not edit files inside `.sdd/` manually\n\n## File format\n\nEvery `.md` file in `product/` and `system/` must start with this YAML frontmatter:\n\n```yaml\n---\ntitle: \"File title\"\nstatus: new\nauthor: \"\"\nlast-modified: \"2025-01-01T00:00:00.000Z\"\nversion: \"1.0\"\n---\n```\n\n- **status**: one of:\n - `new` \u2014 new file, needs to be implemented\n - `changed` \u2014 modified since last sync, code needs updating\n - `deleted` \u2014 feature to be removed, agent should delete related code\n - `synced` \u2014 already implemented, up to date\n- **version**: patch-bump on each edit (1.0 \u2192 1.1 \u2192 1.2)\n- **last-modified**: ISO 8601 datetime, updated on each edit\n\n## Change Requests\n\nChange Requests (CRs) are markdown files in `change-requests/` that describe modifications to the documentation.\n\n### CR format\n\n```yaml\n---\ntitle: \"Add authentication feature\"\nstatus: draft\nauthor: \"user\"\ncreated-at: \"2025-01-01T00:00:00.000Z\"\n---\n```\n\n- **status**: `draft` (pending) or `applied` (already processed)\n\n### CR workflow\n\n1. Check for pending CRs: `sdd cr pending`\n2. Read each pending CR and apply the described changes to the documentation files (marking them as `new`, `changed`, or `deleted`)\n3. After applying a CR to the docs, mark it: `sdd mark-cr-applied change-requests/CR-001.md`\n4. Then run `sdd sync` to implement the code changes\n\n### CR commands\n\n- `sdd cr list` \u2014 See all change requests and their status\n- `sdd cr pending` \u2014 Show only draft CRs to process\n- `sdd mark-cr-applied [files...]` \u2014 Mark CRs as applied after updating the docs\n\n## UX and screenshots\n\nWhen a feature has UX mockups or screenshots, place them next to the feature doc:\n\n- **Simple feature** (no screenshots): `product/features/auth.md`\n- **Feature with screenshots**: use a folder with `index.md`:\n\n```\nproduct/features/auth/\n index.md \u2190 feature doc\n login.png \u2190 screenshot\n register.png \u2190 screenshot\n```\n\nReference images in the markdown with relative paths:\n\n```markdown\n## UX\n\n![Login screen](login.png)\n![Register screen](register.png)\n```\n\nBoth formats work \u2014 use a folder only when you have screenshots or multiple files for a feature.\n\n## Project structure\n\n- `product/` \u2014 What to build (vision, users, features)\n- `system/` \u2014 How to build it (entities, architecture, tech stack, interfaces)\n- `code/` \u2014 All generated source code goes here\n- `change-requests/` \u2014 Change requests to the documentation\n- `.sdd/` \u2014 Project config and sync state (do not edit)\n";
4
+ export declare const AGENT_MD_TEMPLATE = "# SDD Project\n\nThis project uses **Story Driven Development (SDD)**.\nDocumentation drives implementation: read the docs first, then write code.\n\n## Workflow\n\n1. Run `sdd bug open` \u2014 check if there are open bugs to fix first\n2. If there are open bugs, fix the code/docs, then run `sdd mark-bug-resolved`\n3. Run `sdd cr pending` \u2014 check if there are change requests to process\n4. If there are pending CRs, apply them to the docs, then run `sdd mark-cr-applied`\n5. Run `sdd sync` to see what needs to be implemented\n6. Read the documentation files listed in the sync output\n7. Implement what each file describes, writing code inside `code/`\n8. After implementing, mark files as synced:\n\n```\nsdd mark-synced product/features/auth.md\n```\n\nOr mark all pending files at once:\n\n```\nsdd mark-synced\n```\n\n9. **Commit immediately after mark-synced** \u2014 this is mandatory:\n\n```\ngit add -A && git commit -m \"sdd sync: <brief description of what was implemented>\"\n```\n\nDo NOT skip this step. Every mark-synced must be followed by a git commit.\n\n### Removing a feature\n\nIf a documentation file has `status: deleted`, it means that feature should be removed.\nDelete the related code in `code/`, then run `sdd mark-synced <file>` (the doc file will be removed automatically), then commit.\n\n## Available commands\n\n- `sdd status` \u2014 See all documentation files and their state (new/changed/deleted/synced)\n- `sdd diff` \u2014 See what changed since last sync\n- `sdd sync` \u2014 Get the sync prompt for pending files (includes git diff for changed files)\n- `sdd validate` \u2014 Check for broken references and issues\n- `sdd mark-synced [files...]` \u2014 Mark specific files (or all) as synced\n- `sdd cr list` \u2014 List all change requests with their status\n- `sdd cr pending` \u2014 Show draft change requests to process\n- `sdd mark-cr-applied [files...]` \u2014 Mark change requests as applied\n- `sdd bug list` \u2014 List all bugs with their status\n- `sdd bug open` \u2014 Show open bugs to fix\n- `sdd mark-bug-resolved [files...]` \u2014 Mark bugs as resolved\n\n## Rules\n\n1. **Always commit after mark-synced** \u2014 run `git add -A && git commit -m \"sdd sync: ...\"` immediately after `sdd mark-synced`. Never leave synced files uncommitted.\n2. Before running `sdd sync`, check for open bugs with `sdd bug open` and pending change requests with `sdd cr pending`\n3. If there are pending CRs, apply them to the docs first, then mark them with `sdd mark-cr-applied`\n4. Only implement what the sync prompt asks for\n5. All generated code goes inside `code/`\n6. Respect all constraints in `## Agent Notes` sections (if present)\n7. Do not edit files inside `.sdd/` manually\n\n## File format\n\nEvery `.md` file in `product/` and `system/` must start with this YAML frontmatter:\n\n```yaml\n---\ntitle: \"File title\"\nstatus: new\nauthor: \"\"\nlast-modified: \"2025-01-01T00:00:00.000Z\"\nversion: \"1.0\"\n---\n```\n\n- **status**: one of:\n - `new` \u2014 new file, needs to be implemented\n - `changed` \u2014 modified since last sync, code needs updating\n - `deleted` \u2014 feature to be removed, agent should delete related code\n - `synced` \u2014 already implemented, up to date\n- **version**: patch-bump on each edit (1.0 \u2192 1.1 \u2192 1.2)\n- **last-modified**: ISO 8601 datetime, updated on each edit\n\n## How sync works\n\n`sdd sync` generates a structured prompt for the agent based on pending files:\n\n- **`new` files**: the agent reads the full documentation and implements it from scratch\n- **`changed` files**: SDD uses `git diff` to compute what changed in the documentation since the last commit, and includes the diff in the sync prompt \u2014 this way the agent sees exactly what was modified and can update only the affected code\n- **`deleted` files**: the agent removes the related code\n\nThis is why **committing after every mark-synced is mandatory** \u2014 the git history is what SDD uses to detect changes.\n\n## Change Requests\n\nChange Requests (CRs) are markdown files in `change-requests/` that describe modifications to the documentation.\n\n### CR format\n\n```yaml\n---\ntitle: \"Add authentication feature\"\nstatus: draft\nauthor: \"user\"\ncreated-at: \"2025-01-01T00:00:00.000Z\"\n---\n```\n\n- **status**: `draft` (pending) or `applied` (already processed)\n\n### CR workflow\n\n1. Check for pending CRs: `sdd cr pending`\n2. Read each pending CR and apply the described changes to the documentation files (marking them as `new`, `changed`, or `deleted`)\n3. After applying a CR to the docs, mark it: `sdd mark-cr-applied change-requests/CR-001.md`\n4. Then run `sdd sync` to implement the code changes\n\n### CR commands\n\n- `sdd cr list` \u2014 See all change requests and their status\n- `sdd cr pending` \u2014 Show only draft CRs to process\n- `sdd mark-cr-applied [files...]` \u2014 Mark CRs as applied after updating the docs\n\n## Bugs\n\nBugs are markdown files in `bugs/` that describe problems found in the codebase.\n\n### Bug format\n\n```yaml\n---\ntitle: \"Login fails with empty password\"\nstatus: open\nauthor: \"user\"\ncreated-at: \"2025-01-01T00:00:00.000Z\"\n---\n```\n\n- **status**: `open` (needs fixing) or `resolved` (already fixed)\n\n### Bug workflow\n\n1. Check for open bugs: `sdd bug open`\n2. Read each open bug and fix the code and/or documentation\n3. After fixing a bug, mark it: `sdd mark-bug-resolved bugs/BUG-001.md`\n4. Commit the fix\n\n### Bug commands\n\n- `sdd bug list` \u2014 See all bugs and their status\n- `sdd bug open` \u2014 Show only open bugs to fix\n- `sdd mark-bug-resolved [files...]` \u2014 Mark bugs as resolved after fixing\n\n## UX and screenshots\n\nWhen a feature has UX mockups or screenshots, place them next to the feature doc:\n\n- **Simple feature** (no screenshots): `product/features/auth.md`\n- **Feature with screenshots**: use a folder with `index.md`:\n\n```\nproduct/features/auth/\n index.md \u2190 feature doc\n login.png \u2190 screenshot\n register.png \u2190 screenshot\n```\n\nReference images in the markdown with relative paths:\n\n```markdown\n## UX\n\n![Login screen](login.png)\n![Register screen](register.png)\n```\n\nBoth formats work \u2014 use a folder only when you have screenshots or multiple files for a feature.\n\n## Project structure\n\n- `product/` \u2014 What to build (vision, users, features)\n- `system/` \u2014 How to build it (entities, architecture, tech stack, interfaces)\n- `code/` \u2014 All generated source code goes here\n- `change-requests/` \u2014 Change requests to the documentation\n- `bugs/` \u2014 Bug reports\n- `.sdd/` \u2014 Project config and sync state (do not edit)\n";
5
5
  export declare const EMPTY_LOCK_TEMPLATE: () => string;
6
6
  //# sourceMappingURL=templates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,02JA8I7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,cAE/B,CAAC"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,ylNA4L7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,cAE/B,CAAC"}
@@ -21,12 +21,14 @@ Documentation drives implementation: read the docs first, then write code.
21
21
 
22
22
  ## Workflow
23
23
 
24
- 1. Run \`sdd cr pending\` — check if there are change requests to process first
25
- 2. If there are pending CRs, apply them to the docs, then run \`sdd mark-cr-applied\`
26
- 3. Run \`sdd sync\` to see what needs to be implemented
27
- 4. Read the documentation files listed in the sync output
28
- 5. Implement what each file describes, writing code inside \`code/\`
29
- 6. After implementing, mark files as synced:
24
+ 1. Run \`sdd bug open\` — check if there are open bugs to fix first
25
+ 2. If there are open bugs, fix the code/docs, then run \`sdd mark-bug-resolved\`
26
+ 3. Run \`sdd cr pending\` check if there are change requests to process
27
+ 4. If there are pending CRs, apply them to the docs, then run \`sdd mark-cr-applied\`
28
+ 5. Run \`sdd sync\` to see what needs to be implemented
29
+ 6. Read the documentation files listed in the sync output
30
+ 7. Implement what each file describes, writing code inside \`code/\`
31
+ 8. After implementing, mark files as synced:
30
32
 
31
33
  \`\`\`
32
34
  sdd mark-synced product/features/auth.md
@@ -38,7 +40,7 @@ Or mark all pending files at once:
38
40
  sdd mark-synced
39
41
  \`\`\`
40
42
 
41
- 7. **Commit immediately after mark-synced** — this is mandatory:
43
+ 9. **Commit immediately after mark-synced** — this is mandatory:
42
44
 
43
45
  \`\`\`
44
46
  git add -A && git commit -m "sdd sync: <brief description of what was implemented>"
@@ -55,17 +57,20 @@ Delete the related code in \`code/\`, then run \`sdd mark-synced <file>\` (the d
55
57
 
56
58
  - \`sdd status\` — See all documentation files and their state (new/changed/deleted/synced)
57
59
  - \`sdd diff\` — See what changed since last sync
58
- - \`sdd sync\` — Get the sync prompt for pending files (new/changed/deleted)
60
+ - \`sdd sync\` — Get the sync prompt for pending files (includes git diff for changed files)
59
61
  - \`sdd validate\` — Check for broken references and issues
60
62
  - \`sdd mark-synced [files...]\` — Mark specific files (or all) as synced
61
63
  - \`sdd cr list\` — List all change requests with their status
62
64
  - \`sdd cr pending\` — Show draft change requests to process
63
65
  - \`sdd mark-cr-applied [files...]\` — Mark change requests as applied
66
+ - \`sdd bug list\` — List all bugs with their status
67
+ - \`sdd bug open\` — Show open bugs to fix
68
+ - \`sdd mark-bug-resolved [files...]\` — Mark bugs as resolved
64
69
 
65
70
  ## Rules
66
71
 
67
72
  1. **Always commit after mark-synced** — run \`git add -A && git commit -m "sdd sync: ..."\` immediately after \`sdd mark-synced\`. Never leave synced files uncommitted.
68
- 2. Before running \`sdd sync\`, check for pending change requests with \`sdd cr pending\`
73
+ 2. Before running \`sdd sync\`, check for open bugs with \`sdd bug open\` and pending change requests with \`sdd cr pending\`
69
74
  3. If there are pending CRs, apply them to the docs first, then mark them with \`sdd mark-cr-applied\`
70
75
  4. Only implement what the sync prompt asks for
71
76
  5. All generated code goes inside \`code/\`
@@ -94,6 +99,16 @@ version: "1.0"
94
99
  - **version**: patch-bump on each edit (1.0 → 1.1 → 1.2)
95
100
  - **last-modified**: ISO 8601 datetime, updated on each edit
96
101
 
102
+ ## How sync works
103
+
104
+ \`sdd sync\` generates a structured prompt for the agent based on pending files:
105
+
106
+ - **\`new\` files**: the agent reads the full documentation and implements it from scratch
107
+ - **\`changed\` files**: SDD uses \`git diff\` to compute what changed in the documentation since the last commit, and includes the diff in the sync prompt — this way the agent sees exactly what was modified and can update only the affected code
108
+ - **\`deleted\` files**: the agent removes the related code
109
+
110
+ This is why **committing after every mark-synced is mandatory** — the git history is what SDD uses to detect changes.
111
+
97
112
  ## Change Requests
98
113
 
99
114
  Change Requests (CRs) are markdown files in \`change-requests/\` that describe modifications to the documentation.
@@ -124,6 +139,36 @@ created-at: "2025-01-01T00:00:00.000Z"
124
139
  - \`sdd cr pending\` — Show only draft CRs to process
125
140
  - \`sdd mark-cr-applied [files...]\` — Mark CRs as applied after updating the docs
126
141
 
142
+ ## Bugs
143
+
144
+ Bugs are markdown files in \`bugs/\` that describe problems found in the codebase.
145
+
146
+ ### Bug format
147
+
148
+ \`\`\`yaml
149
+ ---
150
+ title: "Login fails with empty password"
151
+ status: open
152
+ author: "user"
153
+ created-at: "2025-01-01T00:00:00.000Z"
154
+ ---
155
+ \`\`\`
156
+
157
+ - **status**: \`open\` (needs fixing) or \`resolved\` (already fixed)
158
+
159
+ ### Bug workflow
160
+
161
+ 1. Check for open bugs: \`sdd bug open\`
162
+ 2. Read each open bug and fix the code and/or documentation
163
+ 3. After fixing a bug, mark it: \`sdd mark-bug-resolved bugs/BUG-001.md\`
164
+ 4. Commit the fix
165
+
166
+ ### Bug commands
167
+
168
+ - \`sdd bug list\` — See all bugs and their status
169
+ - \`sdd bug open\` — Show only open bugs to fix
170
+ - \`sdd mark-bug-resolved [files...]\` — Mark bugs as resolved after fixing
171
+
127
172
  ## UX and screenshots
128
173
 
129
174
  When a feature has UX mockups or screenshots, place them next to the feature doc:
@@ -155,6 +200,7 @@ Both formats work — use a folder only when you have screenshots or multiple fi
155
200
  - \`system/\` — How to build it (entities, architecture, tech stack, interfaces)
156
201
  - \`code/\` — All generated source code goes here
157
202
  - \`change-requests/\` — Change requests to the documentation
203
+ - \`bugs/\` — Bug reports
158
204
  - \`.sdd/\` — Project config and sync state (do not edit)
159
205
  `;
160
206
  const EMPTY_LOCK_TEMPLATE = () => `synced-at: "${new Date().toISOString()}"
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":";;;AAAA,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAE3C,SAAS,UAAU,CAAC,KAAa,EAAE,OAAe;IAChD,OAAO;UACC,KAAK;;;kBAGG,GAAG,EAAE;;;;EAIrB,OAAO;CACR,CAAC;AACF,CAAC;AAMY,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8IhC,CAAC;AAEK,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,eAAe,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;;CAE/E,CAAC;AAFW,QAAA,mBAAmB,uBAE9B"}
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":";;;AAAA,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAE3C,SAAS,UAAU,CAAC,KAAa,EAAE,OAAe;IAChD,OAAO;UACC,KAAK;;;kBAGG,GAAG,EAAE;;;;EAIrB,OAAO;CACR,CAAC;AACF,CAAC;AAMY,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4LhC,CAAC;AAEK,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,eAAe,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;;CAE/E,CAAC;AAFW,QAAA,mBAAmB,uBAE9B"}
package/dist/sdd.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { StoryStatus, ValidationResult, SDDConfig, ChangeRequest } from './types.js';
1
+ import type { StoryStatus, ValidationResult, SDDConfig, ChangeRequest, Bug } from './types.js';
2
2
  import type { ProjectInfo } from './scaffold/templates.js';
3
3
  export declare class SDD {
4
4
  private root;
@@ -10,11 +10,15 @@ export declare class SDD {
10
10
  status(): Promise<StoryStatus>;
11
11
  pending(): Promise<import('./types.js').StoryFile[]>;
12
12
  sync(): Promise<string>;
13
+ applyPrompt(): Promise<string | null>;
13
14
  validate(): Promise<ValidationResult>;
14
15
  markSynced(paths?: string[]): Promise<string[]>;
15
16
  changeRequests(): Promise<ChangeRequest[]>;
16
17
  pendingChangeRequests(): Promise<ChangeRequest[]>;
17
18
  markCRApplied(paths?: string[]): Promise<string[]>;
19
+ bugs(): Promise<Bug[]>;
20
+ openBugs(): Promise<Bug[]>;
21
+ markBugResolved(paths?: string[]): Promise<string[]>;
18
22
  private ensureInitialized;
19
23
  }
20
24
  //# sourceMappingURL=sdd.d.ts.map
package/dist/sdd.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sdd.d.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E;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;IAI/B,IAAI,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAI3C,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC;IAK5B,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC;IAc9B,OAAO,IAAI,OAAO,CAAC,OAAO,YAAY,EAAE,SAAS,EAAE,CAAC;IAMpD,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAKvB,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAUrC,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAMrC,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IA6B/C,cAAc,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAK1C,qBAAqB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAKjD,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAmBlD,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAKtB,QAAQ,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAK1B,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAmB1D,OAAO,CAAC,iBAAiB;CAK1B"}
package/dist/sdd.js CHANGED
@@ -6,10 +6,12 @@ const node_path_1 = require("node:path");
6
6
  const errors_js_1 = require("./errors.js");
7
7
  const story_parser_js_1 = require("./parser/story-parser.js");
8
8
  const prompt_generator_js_1 = require("./prompt/prompt-generator.js");
9
+ const apply_prompt_generator_js_1 = require("./prompt/apply-prompt-generator.js");
9
10
  const validator_js_1 = require("./validate/validator.js");
10
11
  const init_js_1 = require("./scaffold/init.js");
11
12
  const config_manager_js_1 = require("./config/config-manager.js");
12
13
  const cr_parser_js_1 = require("./parser/cr-parser.js");
14
+ const bug_parser_js_1 = require("./parser/bug-parser.js");
13
15
  class SDD {
14
16
  root;
15
17
  constructor(options) {
@@ -43,6 +45,15 @@ class SDD {
43
45
  const pending = await this.pending();
44
46
  return (0, prompt_generator_js_1.generatePrompt)(pending, this.root);
45
47
  }
48
+ async applyPrompt() {
49
+ this.ensureInitialized();
50
+ const [bugs, changeRequests, pendingFiles] = await Promise.all([
51
+ this.openBugs(),
52
+ this.pendingChangeRequests(),
53
+ this.pending(),
54
+ ]);
55
+ return (0, apply_prompt_generator_js_1.generateApplyPrompt)(bugs, changeRequests, pendingFiles, this.root);
56
+ }
46
57
  async validate() {
47
58
  this.ensureInitialized();
48
59
  const files = await (0, story_parser_js_1.parseAllStoryFiles)(this.root);
@@ -100,6 +111,31 @@ class SDD {
100
111
  }
101
112
  return marked;
102
113
  }
114
+ async bugs() {
115
+ this.ensureInitialized();
116
+ return (0, bug_parser_js_1.parseAllBugFiles)(this.root);
117
+ }
118
+ async openBugs() {
119
+ const all = await this.bugs();
120
+ return all.filter((b) => b.frontmatter.status === 'open');
121
+ }
122
+ async markBugResolved(paths) {
123
+ this.ensureInitialized();
124
+ const all = await this.bugs();
125
+ const marked = [];
126
+ for (const bug of all) {
127
+ if (bug.frontmatter.status === 'resolved')
128
+ continue;
129
+ if (paths && paths.length > 0 && !paths.includes(bug.relativePath))
130
+ continue;
131
+ const absPath = (0, node_path_1.resolve)(this.root, bug.relativePath);
132
+ const content = await (0, promises_1.readFile)(absPath, 'utf-8');
133
+ const updated = content.replace(/^status:\s*open/m, 'status: resolved');
134
+ await (0, promises_1.writeFile)(absPath, updated, 'utf-8');
135
+ marked.push(bug.relativePath);
136
+ }
137
+ return marked;
138
+ }
103
139
  ensureInitialized() {
104
140
  if (!(0, config_manager_js_1.isSDDProject)(this.root)) {
105
141
  throw new errors_js_1.ProjectNotInitializedError(this.root);
package/dist/sdd.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":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AAO,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;YACxE,MAAM,IAAA,oBAAS,EAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,iBAAiB;QACvB,IAAI,CAAC,IAAA,gCAAY,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,sCAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF;AArJD,kBAqJC"}
package/dist/types.d.ts CHANGED
@@ -49,6 +49,8 @@ export interface StoryStatus {
49
49
  export interface SDDConfig {
50
50
  description: string;
51
51
  'last-sync-commit'?: string;
52
+ agent?: string;
53
+ agents?: Record<string, string>;
52
54
  }
53
55
  export type ChangeRequestStatus = 'draft' | 'applied';
54
56
  export interface ChangeRequestFrontmatter {
@@ -62,4 +64,16 @@ export interface ChangeRequest {
62
64
  frontmatter: ChangeRequestFrontmatter;
63
65
  body: string;
64
66
  }
67
+ export type BugStatus = 'open' | 'resolved';
68
+ export interface BugFrontmatter {
69
+ title: string;
70
+ status: BugStatus;
71
+ author: string;
72
+ 'created-at': string;
73
+ }
74
+ export interface Bug {
75
+ relativePath: string;
76
+ frontmatter: BugFrontmatter;
77
+ body: string;
78
+ }
65
79
  //# sourceMappingURL=types.d.ts.map