@wrongstack/sdd 0.284.1 → 0.285.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 (55) hide show
  1. package/dist/auto-executor.d.ts +89 -0
  2. package/dist/auto-executor.d.ts.map +1 -0
  3. package/dist/board-types.d.ts +144 -0
  4. package/dist/board-types.d.ts.map +1 -0
  5. package/dist/conflict-resolver.d.ts +45 -0
  6. package/dist/conflict-resolver.d.ts.map +1 -0
  7. package/dist/critical-path.d.ts +36 -0
  8. package/dist/critical-path.d.ts.map +1 -0
  9. package/dist/decompose-task.d.ts +20 -0
  10. package/dist/decompose-task.d.ts.map +1 -0
  11. package/dist/index.d.ts +26 -1864
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +192 -76
  14. package/dist/index.js.map +7 -1
  15. package/dist/sdd-board-projector.d.ts +83 -0
  16. package/dist/sdd-board-projector.d.ts.map +1 -0
  17. package/dist/sdd-board-store.d.ts +59 -0
  18. package/dist/sdd-board-store.d.ts.map +1 -0
  19. package/dist/sdd-interview-driver.d.ts +131 -0
  20. package/dist/sdd-interview-driver.d.ts.map +1 -0
  21. package/dist/sdd-lifecycle.d.ts +146 -0
  22. package/dist/sdd-lifecycle.d.ts.map +1 -0
  23. package/dist/sdd-parallel-run.d.ts +427 -0
  24. package/dist/sdd-parallel-run.d.ts.map +1 -0
  25. package/dist/sdd-run-registry.d.ts +68 -0
  26. package/dist/sdd-run-registry.d.ts.map +1 -0
  27. package/dist/sdd-supervisor.d.ts +52 -0
  28. package/dist/sdd-supervisor.d.ts.map +1 -0
  29. package/dist/sdd-task-decomposer.d.ts +89 -0
  30. package/dist/sdd-task-decomposer.d.ts.map +1 -0
  31. package/dist/spec-builder.d.ts +139 -0
  32. package/dist/spec-builder.d.ts.map +1 -0
  33. package/dist/spec-parser.d.ts +14 -0
  34. package/dist/spec-parser.d.ts.map +1 -0
  35. package/dist/spec-store.d.ts +36 -0
  36. package/dist/spec-store.d.ts.map +1 -0
  37. package/dist/spec-templates.d.ts +22 -0
  38. package/dist/spec-templates.d.ts.map +1 -0
  39. package/dist/spec-versioning.d.ts +49 -0
  40. package/dist/spec-versioning.d.ts.map +1 -0
  41. package/dist/start-sdd-run.d.ts +67 -0
  42. package/dist/start-sdd-run.d.ts.map +1 -0
  43. package/dist/task-flow.d.ts +99 -0
  44. package/dist/task-flow.d.ts.map +1 -0
  45. package/dist/task-generator.d.ts +39 -0
  46. package/dist/task-generator.d.ts.map +1 -0
  47. package/dist/task-graph-store.d.ts +33 -0
  48. package/dist/task-graph-store.d.ts.map +1 -0
  49. package/dist/task-tracker.d.ts +2 -0
  50. package/dist/task-tracker.d.ts.map +1 -0
  51. package/dist/task-visualizer.d.ts +26 -0
  52. package/dist/task-visualizer.d.ts.map +1 -0
  53. package/dist/verify-task.d.ts +23 -0
  54. package/dist/verify-task.d.ts.map +1 -0
  55. package/package.json +4 -5
@@ -0,0 +1,139 @@
1
+ import type { Specification } from '@wrongstack/core/types';
2
+ import type { SpecStore } from './spec-store.js';
3
+ export type AISpecPhase = 'questioning' | 'spec_review' | 'implementation' | 'task_review' | 'executing' | 'done';
4
+ export interface CollectedAnswer {
5
+ question: string;
6
+ answer: string;
7
+ timestamp: number;
8
+ }
9
+ export interface AISpecSession {
10
+ id: string;
11
+ phase: AISpecPhase;
12
+ title: string;
13
+ userIntent: string;
14
+ projectContext: string;
15
+ answers: CollectedAnswer[];
16
+ questionCount: number;
17
+ spec?: Specification | undefined;
18
+ implementation?: string | undefined;
19
+ taskGraphId?: string | undefined;
20
+ approved: boolean;
21
+ createdAt: number;
22
+ updatedAt: number;
23
+ }
24
+ export interface AISpecBuilderOptions {
25
+ store: SpecStore;
26
+ /** Minimum questions the AI should ask. Default: 2 */
27
+ minQuestions?: number | undefined;
28
+ /** Maximum questions before forcing spec generation. Default: 10 */
29
+ maxQuestions?: number | undefined;
30
+ /** Project context string (package.json, file structure, etc.) */
31
+ projectContext?: string | undefined;
32
+ /** Path to persist session state. If set, session survives process restarts. */
33
+ sessionPath?: string | undefined;
34
+ }
35
+ /**
36
+ * AI-driven specification builder. Instead of static questions, this builder
37
+ * tracks conversation state and generates prompts that instruct the AI agent
38
+ * to ask contextual questions and build specifications interactively.
39
+ */
40
+ export declare class AISpecBuilder {
41
+ private session;
42
+ private readonly store;
43
+ private readonly minQuestions;
44
+ private readonly maxQuestions;
45
+ private readonly sessionPath?;
46
+ constructor(opts: AISpecBuilderOptions);
47
+ /** Save session state to disk. */
48
+ saveSession(): Promise<void>;
49
+ /** Load session state from disk. Returns true if a session was loaded. */
50
+ loadSession(): Promise<boolean>;
51
+ /** Delete saved session from disk. */
52
+ deleteSession(): Promise<void>;
53
+ /** Auto-save helper — calls saveSession() but never throws.
54
+ * Failures are surfaced via process.emitWarning so a persistent
55
+ * ENOSPC / EACCES doesn't silently strand session edits in memory. */
56
+ private autoSave;
57
+ /** Start a new session with a title and optional intent. */
58
+ startSession(title: string, intent?: string): void;
59
+ /** Get current session state (readonly). */
60
+ getSession(): Readonly<AISpecSession>;
61
+ /** Get the current phase. */
62
+ getPhase(): AISpecPhase;
63
+ /**
64
+ * Get the AI prompt for the current phase.
65
+ * This prompt is injected into the conversation so the AI agent knows
66
+ * what to do next (ask a question, generate a spec, etc.).
67
+ */
68
+ getAIPrompt(): string;
69
+ /**
70
+ * Record a question/answer pair from the AI conversation.
71
+ * Call this when the AI asks a question and the user responds.
72
+ */
73
+ addAnswer(question: string, answer: string): void;
74
+ /**
75
+ * Check if more questions should be asked.
76
+ * Returns false if max reached or if the AI has signaled it has enough info.
77
+ */
78
+ shouldContinueQuestioning(): boolean;
79
+ /**
80
+ * Check if minimum questions have been asked.
81
+ */
82
+ hasMetMinimumQuestions(): boolean;
83
+ /**
84
+ * Set the generated specification and move to spec_review phase.
85
+ */
86
+ setSpec(spec: Specification): void;
87
+ /**
88
+ * Approve the current phase and advance to the next.
89
+ * questioning → spec_review (requires spec to be set)
90
+ * spec_review → implementation
91
+ * implementation → task_review (requires implementation to be set)
92
+ * task_review → executing
93
+ * executing → done
94
+ */
95
+ approve(): AISpecPhase;
96
+ /**
97
+ * Set the implementation plan text.
98
+ */
99
+ setImplementation(plan: string): void;
100
+ /**
101
+ * Mark session as done.
102
+ */
103
+ markDone(): void;
104
+ /**
105
+ * Set the task graph ID for this session.
106
+ */
107
+ setTaskGraphId(graphId: string): void;
108
+ /**
109
+ * Get the task graph ID for this session.
110
+ */
111
+ getTaskGraphId(): string | undefined;
112
+ /**
113
+ * Save the current spec to the store.
114
+ */
115
+ saveSpec(): Promise<Specification>;
116
+ /**
117
+ * Parse a spec from a JSON string (from AI output).
118
+ * Validates and normalizes the structure.
119
+ */
120
+ parseSpecFromJSON(jsonStr: string): Specification;
121
+ /**
122
+ * Extract JSON from AI output (handles ```json blocks and raw JSON).
123
+ */
124
+ extractJSON(text: string): string | null;
125
+ /**
126
+ * Detect if AI output contains a spec (JSON block).
127
+ */
128
+ hasSpecInOutput(text: string): boolean;
129
+ /**
130
+ * Try to parse a spec from AI output text.
131
+ * Returns null if no valid spec found.
132
+ */
133
+ tryParseSpecFromOutput(text: string): Specification | null;
134
+ /**
135
+ * Extract a JSON array from AI output (for task lists).
136
+ */
137
+ extractJSONArray(text: string): string | null;
138
+ }
139
+ //# sourceMappingURL=spec-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-builder.d.ts","sourceRoot":"","sources":["../src/spec-builder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgC,MAAM,wBAAwB,CAAC;AAC1F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD,MAAM,MAAM,WAAW,GACnB,aAAa,GACb,aAAa,GACb,gBAAgB,GAChB,aAAa,GACb,WAAW,GACX,MAAM,CAAC;AAEX,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM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IAID;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkB5C;CACF"}
@@ -0,0 +1,14 @@
1
+ import type { SpecAnalysis, SpecValidationResult, Specification } from '@wrongstack/core/types';
2
+ export declare class SpecParser {
3
+ parse(content: string): Specification;
4
+ private extractTitle;
5
+ private extractVersion;
6
+ private extractOverview;
7
+ private extractSections;
8
+ private extractRequirements;
9
+ private parseRequirementLine;
10
+ private mapSectionType;
11
+ analyze(spec: Specification): SpecAnalysis;
12
+ validate(spec: Specification): SpecValidationResult;
13
+ }
14
+ //# sourceMappingURL=spec-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-parser.d.ts","sourceRoot":"","sources":["../src/spec-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAGZ,oBAAoB,EACpB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,UAAU;IACrB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAiBpC;IAED,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,eAAe;IA+CvB,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,oBAAoB;IAmC5B,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY,CA2DzC;IAED,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,oBAAoB,CAqClD;CACF"}
@@ -0,0 +1,36 @@
1
+ import type { Specification, SpecStatus } from '@wrongstack/core/types';
2
+ export interface SpecStoreOptions {
3
+ /** Directory where spec files are stored. Defaults to `.wrongstack/specs`. */
4
+ baseDir: string;
5
+ }
6
+ export interface SpecIndexEntry {
7
+ id: string;
8
+ title: string;
9
+ version: string;
10
+ status: SpecStatus;
11
+ updatedAt: number;
12
+ filePath: string;
13
+ }
14
+ /**
15
+ * File-backed spec storage. Each spec is a JSON file under `baseDir/`.
16
+ * An index file (`_index.json`) tracks all specs for fast listing.
17
+ */
18
+ export declare class SpecStore {
19
+ private readonly baseDir;
20
+ private readonly indexPath;
21
+ constructor(opts: SpecStoreOptions);
22
+ save(spec: Specification): Promise<void>;
23
+ load(id: string): Promise<Specification | null>;
24
+ list(): Promise<SpecIndexEntry[]>;
25
+ delete(id: string): Promise<boolean>;
26
+ exists(id: string): Promise<boolean>;
27
+ /** Create a new spec with defaults, assign ID, and persist. */
28
+ createDraft(title: string, overview?: string): Promise<Specification>;
29
+ /** Update spec fields and persist. */
30
+ update(id: string, patch: Partial<Omit<Specification, 'id' | 'createdAt'>>): Promise<Specification | null>;
31
+ private filePath;
32
+ private readIndex;
33
+ private updateIndex;
34
+ private removeFromIndex;
35
+ }
36
+ //# sourceMappingURL=spec-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-store.d.ts","sourceRoot":"","sources":["../src/spec-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAExE,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAOD;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAEnC,YAAY,IAAI,EAAE,gBAAgB,EAGjC;IAEK,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAK7C;IAEK,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAOpD;IAEK,IAAI,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAGtC;IAEK,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQzC;IAEK,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOzC;IAED,+DAA+D;IACzD,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAe1E;IAED,sCAAsC;IAChC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAY/G;IAED,OAAO,CAAC,QAAQ;YAIF,SAAS;YAWT,WAAW;YAmBX,eAAe;CAK9B"}
@@ -0,0 +1,22 @@
1
+ import type { SpecTemplate } from '@wrongstack/core/types';
2
+ /**
3
+ * Built-in spec templates for common development scenarios.
4
+ */
5
+ export declare const SPEC_TEMPLATES: SpecTemplate[];
6
+ /**
7
+ * Get a template by ID.
8
+ */
9
+ export declare function getTemplate(id: string): SpecTemplate | undefined;
10
+ /**
11
+ * List all available templates.
12
+ */
13
+ export declare function listTemplates(): Array<{
14
+ id: string;
15
+ name: string;
16
+ description: string;
17
+ }>;
18
+ /**
19
+ * Generate a markdown skeleton from a template.
20
+ */
21
+ export declare function templateToMarkdown(template: SpecTemplate, title?: string): string;
22
+ //# sourceMappingURL=spec-templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-templates.d.ts","sourceRoot":"","sources":["../src/spec-templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,EA+FxC,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEhE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAExF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAajF"}
@@ -0,0 +1,49 @@
1
+ import type { Specification, SpecRequirement } from '@wrongstack/core/types';
2
+ import type { TaskGraph } from '@wrongstack/core/types';
3
+ export interface SpecVersion {
4
+ version: string;
5
+ spec: Specification;
6
+ timestamp: number;
7
+ changeDescription?: string | undefined;
8
+ }
9
+ export interface SpecDiff {
10
+ added: SpecRequirement[];
11
+ removed: SpecRequirement[];
12
+ modified: Array<{
13
+ requirement: SpecRequirement;
14
+ previousVersion: SpecRequirement;
15
+ changes: string[];
16
+ }>;
17
+ summary: string;
18
+ }
19
+ /**
20
+ * Track spec versions and compute diffs between versions.
21
+ */
22
+ export declare class SpecVersioning {
23
+ private versions;
24
+ /** Record a new version of a spec. */
25
+ recordVersion(spec: Specification, changeDescription?: string): SpecVersion;
26
+ /** Get version history for a spec. */
27
+ getHistory(specId: string): SpecVersion[];
28
+ /** Get a specific version of a spec. */
29
+ getVersion(specId: string, version: string): SpecVersion | undefined;
30
+ /** Get the latest version of a spec. */
31
+ getLatest(specId: string): SpecVersion | undefined;
32
+ /** Compute diff between two versions of a spec. */
33
+ diff(oldSpec: Specification, newSpec: Specification): SpecDiff;
34
+ /**
35
+ * Update a task graph incrementally based on spec changes.
36
+ * - Added requirements → new tasks
37
+ * - Removed requirements → remove tasks
38
+ * - Modified requirements → update task descriptions
39
+ * Returns the updated graph and list of changes made.
40
+ */
41
+ updateTaskGraph(graph: TaskGraph, oldSpec: Specification, newSpec: Specification): {
42
+ graph: TaskGraph;
43
+ changes: string[];
44
+ };
45
+ private compareRequirements;
46
+ private buildTaskDescription;
47
+ private mapReqType;
48
+ }
49
+ //# sourceMappingURL=spec-versioning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-versioning.d.ts","sourceRoot":"","sources":["../src/spec-versioning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,wBAAwB,CAAC;AAGlE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC;QACd,WAAW,EAAE,eAAe,CAAC;QAC7B,eAAe,EAAE,eAAe,CAAC;QACjC,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAoC;IAEpD,sCAAsC;IACtC,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,WAAW,CAa1E;IAED,sCAAsC;IACtC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,CAExC;IAED,wCAAwC;IACxC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAGnE;IAED,wCAAwC;IACxC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAGjD;IAED,mDAAmD;IACnD,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,QAAQ,CA2C7D;IAED;;;;;;OAMG;IACH,eAAe,CACb,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,aAAa,GACrB;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAwDzC;IAED,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,UAAU;CAgBnB"}
@@ -0,0 +1,67 @@
1
+ import type { Agent } from '@wrongstack/core';
2
+ import type { AgentFactory } from '@wrongstack/core';
3
+ import type { EventBus } from '@wrongstack/core/kernel';
4
+ import type { TaskGraph } from '@wrongstack/core/types';
5
+ import type { TaskTracker } from '@wrongstack/core/tasking';
6
+ import type { WorktreeManager } from '@wrongstack/core';
7
+ import { SddBoardProjector } from './sdd-board-projector.js';
8
+ import type { SddBoardStore } from './sdd-board-store.js';
9
+ import type { SddRunRegistry } from './sdd-run-registry.js';
10
+ import { SddParallelRun, type RunResult, type SddProgress, type SddParallelRunOptions } from './sdd-parallel-run.js';
11
+ export interface StartSddRunOptions {
12
+ tracker: TaskTracker;
13
+ graph: TaskGraph;
14
+ /** Leader agent — seeds the default factory and the run's project context. */
15
+ agent: Agent;
16
+ projectRoot: string;
17
+ events: EventBus;
18
+ /** Parent session id for all SDD EventBus emissions. */
19
+ sessionId?: string | (() => string | undefined) | undefined;
20
+ /** Per-task agent factory. Omit to run every task on the leader agent. */
21
+ subagentFactory?: AgentFactory | undefined;
22
+ /** Board snapshot/event persistence (also drained for cross-process control). */
23
+ boardStore: SddBoardStore;
24
+ /** Registry the run is registered with for in-process control. */
25
+ registry?: SddRunRegistry | undefined;
26
+ parallelSlots?: number | undefined;
27
+ /** Opt-in hard wall-clock cap per task (ms). Omit → no cap (idle reaper guards). */
28
+ taskTimeoutMs?: number | undefined;
29
+ /** Idle reaper per task (ms); resets on activity. Default 600_000 (10 min). */
30
+ taskIdleTimeoutMs?: number | undefined;
31
+ /** End-of-run failed-task auto-retry sweeps (bounded). Default 2. */
32
+ maxFailedRetrySweeps?: number | undefined;
33
+ /** Post-task verification gate (forwarded to SddParallelRun). Omit → no gate. */
34
+ verifyTask?: SddParallelRunOptions['verifyTask'];
35
+ /** Merge-conflict resolver (forwarded to SddParallelRun). Omit → retry-on-fresh-base then fail. */
36
+ conflictResolver?: SddParallelRunOptions['conflictResolver'];
37
+ /** Failure supervisor (forwarded to SddParallelRun). Omit → no rescue, plain terminal-fail. */
38
+ superviseFailure?: SddParallelRunOptions['superviseFailure'];
39
+ /** Run-level default worker model / provider / fallback chain (task overrides win). */
40
+ defaultModel?: string | undefined;
41
+ defaultProvider?: string | undefined;
42
+ fallbackModels?: string[] | undefined;
43
+ /** Per-task git worktree isolation. Omit → tasks share the working tree. */
44
+ worktrees?: WorktreeManager | undefined;
45
+ /** Bounded deadlock recovery rounds (default 1). */
46
+ maxRecoveryRounds?: number | undefined;
47
+ /** Progress callback (e.g. CLI renderer line). */
48
+ onProgress?: ((p: SddProgress) => void) | undefined;
49
+ /** Control-file drain interval in ms (default 500). */
50
+ controlDrainMs?: number | undefined;
51
+ }
52
+ export interface SddRunHandle {
53
+ run: SddParallelRun;
54
+ runId: string;
55
+ projector: SddBoardProjector;
56
+ /** Resolves when the run finishes AND all teardown (drain/dispose/clear) is done. */
57
+ completion: Promise<RunResult>;
58
+ /** Request a clean stop (idempotent). */
59
+ stop(): void;
60
+ }
61
+ /**
62
+ * Wire up and start an SDD parallel run. Returns immediately with a handle whose
63
+ * `completion` promise resolves once the run finishes and teardown is complete.
64
+ * Orphaned in_progress tasks are reset up-front so a crashed prior run re-executes.
65
+ */
66
+ export declare function startSddRun(opts: StartSddRunOptions): SddRunHandle;
67
+ //# sourceMappingURL=start-sdd-run.d.ts.map
@@ -0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from '@wrongstack/core/kernel';
2
+ import type { DoneCondition } from '@wrongstack/core/types';
3
+ import type { SpecAnalysis, Specification } from '@wrongstack/core/types';
4
+ import type { TaskGraph, TaskNode } from '@wrongstack/core/types';
5
+ import { TaskTracker } from '@wrongstack/core/tasking';
6
+ /**
7
+ * Extended event map used internally by TaskFlow and multi-agent components.
8
+ * These events are emitted on the injected EventBus and are a subset of
9
+ * the full EventMap — they do not require a separate registration.
10
+ */
11
+ export interface TaskFlowEventMap {
12
+ 'phase.change': {
13
+ from: TaskFlowPhase;
14
+ to: TaskFlowPhase;
15
+ };
16
+ 'task.started': {
17
+ taskId: string;
18
+ };
19
+ 'task.completed': {
20
+ taskId: string;
21
+ result?: unknown | undefined;
22
+ };
23
+ 'task.failed': {
24
+ taskId: string;
25
+ error: string;
26
+ };
27
+ 'task.review': {
28
+ taskId: string;
29
+ };
30
+ 'spec.analyzed': {
31
+ analysis: SpecAnalysis;
32
+ };
33
+ progress: {
34
+ percent: number;
35
+ message: string;
36
+ };
37
+ done: {
38
+ graph: TaskGraph;
39
+ };
40
+ error: {
41
+ phase: TaskFlowPhase;
42
+ error: Error;
43
+ };
44
+ }
45
+ export type TaskFlowPhase = 'idle' | 'parsing' | 'analyzing' | 'generating' | 'executing' | 'reviewing' | 'completing' | 'done' | 'failed';
46
+ export type TaskFlowEventName = keyof TaskFlowEventMap;
47
+ export interface TaskFlowOptions {
48
+ tracker: TaskTracker;
49
+ events: EventBus;
50
+ doneCondition?: DoneCondition | undefined;
51
+ maxConcurrent?: number | undefined;
52
+ }
53
+ export interface TaskFlowExecutionContext {
54
+ executeTask: (task: TaskNode) => Promise<unknown>;
55
+ onTaskComplete?: (task: TaskNode | undefined, result: unknown) => void;
56
+ onTaskFail?: (task: TaskNode | undefined, error: Error) => void;
57
+ }
58
+ export declare class TaskFlow {
59
+ private readonly opts;
60
+ private phase;
61
+ private spec;
62
+ private graph;
63
+ private stopped;
64
+ constructor(opts: TaskFlowOptions);
65
+ private emit;
66
+ fromSpec(specContent: string): Promise<TaskGraph>;
67
+ execute(ctx: TaskFlowExecutionContext): Promise<TaskGraph>;
68
+ reviewTask(taskId: string, approved: boolean, comment?: string): Promise<void>;
69
+ stop(): void;
70
+ getPhase(): TaskFlowPhase;
71
+ getGraph(): TaskGraph | null;
72
+ getSpec(): Specification | null;
73
+ private setPhase;
74
+ private getExecutableTasks;
75
+ private executeSingleTask;
76
+ private checkDoneCondition;
77
+ private emitProgress;
78
+ }
79
+ export interface SpecDrivenDevOptions {
80
+ workingDirectory: string;
81
+ events: EventBus;
82
+ doneCondition?: DoneCondition | undefined;
83
+ }
84
+ export declare class SpecDrivenDev {
85
+ private store;
86
+ private tracker;
87
+ private readonly events;
88
+ private flows;
89
+ constructor(opts: SpecDrivenDevOptions);
90
+ createFlow(specContent: string, options?: Partial<TaskFlowOptions>): Promise<TaskFlow>;
91
+ getTracker(): TaskTracker;
92
+ getFlow(graphId: string): TaskFlow | undefined;
93
+ listFlows(): {
94
+ id: string;
95
+ title: string;
96
+ phase: TaskFlowPhase;
97
+ }[];
98
+ }
99
+ //# sourceMappingURL=task-flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-flow.d.ts","sourceRoot":"","sources":["../src/task-flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAIlE,OAAO,EAAoB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,EAAE,EAAE,aAAa,CAAA;KAAE,CAAC;IAC3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EK,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAW3F;IAED,UAAU,IAAI,WAAW,CAExB;IAED,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAE7C;IAED,SAAS,IAAI;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,aAAa,CAAA;KAAE,EAAE,CAMjE;CACF"}
@@ -0,0 +1,39 @@
1
+ import type { Specification } from '@wrongstack/core/types';
2
+ import type { TaskGraph, TaskPriority, TaskType } from '@wrongstack/core/types';
3
+ import type { TaskStore, TaskTracker } from '@wrongstack/core/tasking';
4
+ export interface TaskGeneratorOptions {
5
+ taskTracker: TaskTracker;
6
+ /**
7
+ * Opt-in (default off): derive each task's completion-gate
8
+ * `metadata.verificationCommand` from an acceptance criterion that carries a
9
+ * runnable-command marker (`$ <cmd>`, or `run:`/`verify:`/`cmd:` prefix). Off
10
+ * by default so the common case stays fast — auto-running a check per task is
11
+ * exactly the slowness the robustness initiative set out to avoid; enable it
12
+ * explicitly (the CLI gates it behind WRONGSTACK_SDD_VERIFY_FROM_ACCEPTANCE).
13
+ */
14
+ verificationFromAcceptance?: boolean | undefined;
15
+ }
16
+ /**
17
+ * Pull a runnable verification command out of a requirement's acceptance
18
+ * criteria. A criterion qualifies only when it carries an explicit marker —
19
+ * `$ <cmd>` (shell-prompt style) or a `run:` / `verify:` / `cmd:` prefix — so
20
+ * free-text criteria are never mistaken for commands. Returns the first match.
21
+ */
22
+ export declare function extractVerificationCommand(criteria: readonly string[]): string | undefined;
23
+ export interface GeneratedTask {
24
+ specRequirementId?: string | undefined;
25
+ title: string;
26
+ description: string;
27
+ type: TaskType;
28
+ priority: TaskPriority;
29
+ estimateHours?: number | undefined;
30
+ tags?: string[] | undefined;
31
+ }
32
+ export declare class TaskGenerator {
33
+ private readonly opts;
34
+ constructor(opts: TaskGeneratorOptions);
35
+ generateFromSpec(spec: Specification): Promise<TaskGraph>;
36
+ generateSubtasks(parentTaskId: string, spec: Specification): Promise<void>;
37
+ }
38
+ export { TaskStore };
39
+ //# sourceMappingURL=task-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-generator.d.ts","sourceRoot":"","sources":["../src/task-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB;;;;;;;OAOG;IACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAClD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAO1F;AAED,MAAM,WAAW,aAAa;IAC5B,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,YAAY,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAC7B;AAED,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAjC,YAA6B,IAAI,EAAE,oBAAoB,EAAI;IAErD,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAG9D;IAEK,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB/E;CACF;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { TaskGraph } from '@wrongstack/core/types';
2
+ export interface TaskGraphStoreOptions {
3
+ /** Directory where task graph files are stored. Defaults to `.wrongstack/task-graphs`. */
4
+ baseDir: string;
5
+ }
6
+ export interface TaskGraphIndexEntry {
7
+ id: string;
8
+ specId: string;
9
+ title: string;
10
+ nodeCount: number;
11
+ completedCount: number;
12
+ updatedAt: number;
13
+ filePath: string;
14
+ }
15
+ /**
16
+ * File-backed task graph storage. Each graph is a JSON file under `baseDir/`.
17
+ * An index file (`_index.json`) tracks all graphs for fast listing.
18
+ */
19
+ export declare class TaskGraphStore {
20
+ private readonly baseDir;
21
+ private readonly indexPath;
22
+ constructor(opts: TaskGraphStoreOptions);
23
+ save(graph: TaskGraph): Promise<void>;
24
+ load(id: string): Promise<TaskGraph | null>;
25
+ list(): Promise<TaskGraphIndexEntry[]>;
26
+ delete(id: string): Promise<boolean>;
27
+ exists(id: string): Promise<boolean>;
28
+ private filePath;
29
+ private readIndex;
30
+ private updateIndex;
31
+ private removeFromIndex;
32
+ }
33
+ //# sourceMappingURL=task-graph-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-graph-store.d.ts","sourceRoot":"","sources":["../src/task-graph-store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,wBAAwB,CAAC;AAElE,MAAM,WAAW,qBAAqB;IACpC,0FAA0F;IAC1F,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AA0BD;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAEnC,YAAY,IAAI,EAAE,qBAAqB,EAGtC;IAEK,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAK1C;IAEK,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAOhD;IAEK,IAAI,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAG3C;IAEK,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQzC;IAEK,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOzC;IAED,OAAO,CAAC,QAAQ;YAIF,SAAS;YAWT,WAAW;YAuBX,eAAe;CAK9B"}
@@ -0,0 +1,2 @@
1
+ export { type TaskStore, type TaskTrackerOptions, type TaskTransition, type TaskTrackerChange, type TaskTrackerListener, TaskTracker, } from '@wrongstack/core';
2
+ //# sourceMappingURL=task-tracker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-tracker.d.ts","sourceRoot":"","sources":["../src/task-tracker.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,WAAW,GACZ,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { TaskGraph, TaskProgress } from '@wrongstack/core/types';
2
+ import type { Specification } from '@wrongstack/core/types';
3
+ /**
4
+ * Render a task graph as ASCII art for terminal display.
5
+ */
6
+ export declare function renderTaskGraph(graph: TaskGraph, opts?: {
7
+ compact?: boolean | undefined;
8
+ }): string;
9
+ /**
10
+ * Render a progress bar.
11
+ */
12
+ export declare function renderProgress(progress: TaskProgress): string;
13
+ /**
14
+ * Render a compact task list (for quick status checks).
15
+ */
16
+ export declare function renderTaskList(graph: TaskGraph): string;
17
+ /**
18
+ * Render spec analysis summary.
19
+ */
20
+ export declare function renderSpecAnalysis(spec: Specification, analysis: {
21
+ completeness: number;
22
+ gaps: string[];
23
+ risks: string[];
24
+ suggestions: string[];
25
+ }): string;
26
+ //# sourceMappingURL=task-visualizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-visualizer.d.ts","sourceRoot":"","sources":["../src/task-visualizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAY,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA4B5D;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GAAG,MAAM,CAsDlG;AA+CD;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAU7D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CA+BvD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,aAAa,EACnB,QAAQ,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,GACzF,MAAM,CAqCR"}
@@ -0,0 +1,23 @@
1
+ import type { TaskNode } from '@wrongstack/core/types';
2
+ import type { TaskResult } from '@wrongstack/core/types';
3
+ export interface CommandVerifierOptions {
4
+ /** Metadata key holding the shell command to run. Default 'verificationCommand'. */
5
+ metadataKey?: string;
6
+ /** Kill + fail the verification after this many ms. Default 180_000 (3 min). */
7
+ timeoutMs?: number;
8
+ }
9
+ /**
10
+ * Build a `verifyTask` closure (shape matches {@link SddParallelRunOptions.verifyTask}).
11
+ * Returns `{ ok: true }` immediately when the task carries no verification command,
12
+ * otherwise spawns the command in `cwd` (shell, output discarded) and resolves
13
+ * `{ ok: false, reason }` on non-zero exit, spawn error, or timeout.
14
+ */
15
+ export declare function makeCommandVerifier(options?: CommandVerifierOptions): (info: {
16
+ task: TaskNode;
17
+ result: TaskResult;
18
+ cwd: string;
19
+ }) => Promise<{
20
+ ok: boolean;
21
+ reason?: string;
22
+ }>;
23
+ //# sourceMappingURL=verify-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-task.d.ts","sourceRoot":"","sources":["../src/verify-task.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,sBAA2B,UAI/B;IACrC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,KAAG,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA0C9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/sdd",
3
- "version": "0.284.1",
3
+ "version": "0.285.0",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack Spec-Driven Development engine — standalone package extracted from @wrongstack/core. Task graph generation, tracking, execution, lifecycle management, and AI-driven spec building for SDD workflows.",
6
6
  "repository": {
@@ -26,18 +26,17 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@wrongstack/core": "0.284.1"
29
+ "@wrongstack/core": "0.285.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^26.0.1",
33
- "tsup": "^8.5.1",
34
- "typescript": "^6.0.3"
33
+ "typescript": "^7.0.2"
35
34
  },
36
35
  "publishConfig": {
37
36
  "access": "public"
38
37
  },
39
38
  "scripts": {
40
- "build": "tsup",
39
+ "build": "node ../../scripts/build-package.mjs",
41
40
  "typecheck": "tsc --noEmit",
42
41
  "test": "vitest run",
43
42
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""