@specsafe/core 0.5.0 → 0.6.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 (81) hide show
  1. package/dist/elicitation/engine.d.ts +75 -0
  2. package/dist/elicitation/engine.d.ts.map +1 -0
  3. package/dist/elicitation/engine.js +174 -0
  4. package/dist/elicitation/engine.js.map +1 -0
  5. package/dist/elicitation/flows.d.ts +18 -0
  6. package/dist/elicitation/flows.d.ts.map +1 -0
  7. package/dist/elicitation/flows.js +331 -0
  8. package/dist/elicitation/flows.js.map +1 -0
  9. package/dist/elicitation/generator.d.ts +20 -0
  10. package/dist/elicitation/generator.d.ts.map +1 -0
  11. package/dist/elicitation/generator.js +260 -0
  12. package/dist/elicitation/generator.js.map +1 -0
  13. package/dist/elicitation/index.d.ts +27 -0
  14. package/dist/elicitation/index.d.ts.map +1 -0
  15. package/dist/elicitation/index.js +29 -0
  16. package/dist/elicitation/index.js.map +1 -0
  17. package/dist/elicitation/types.d.ts +69 -0
  18. package/dist/elicitation/types.d.ts.map +1 -0
  19. package/dist/elicitation/types.js +6 -0
  20. package/dist/elicitation/types.js.map +1 -0
  21. package/dist/extensions/builtins/complexity.d.ts +7 -0
  22. package/dist/extensions/builtins/complexity.d.ts.map +1 -0
  23. package/dist/extensions/builtins/complexity.js +97 -0
  24. package/dist/extensions/builtins/complexity.js.map +1 -0
  25. package/dist/extensions/builtins/owasp.d.ts +7 -0
  26. package/dist/extensions/builtins/owasp.d.ts.map +1 -0
  27. package/dist/extensions/builtins/owasp.js +76 -0
  28. package/dist/extensions/builtins/owasp.js.map +1 -0
  29. package/dist/extensions/index.d.ts +54 -0
  30. package/dist/extensions/index.d.ts.map +1 -0
  31. package/dist/extensions/index.js +72 -0
  32. package/dist/extensions/index.js.map +1 -0
  33. package/dist/extensions/loader.d.ts +28 -0
  34. package/dist/extensions/loader.d.ts.map +1 -0
  35. package/dist/extensions/loader.js +62 -0
  36. package/dist/extensions/loader.js.map +1 -0
  37. package/dist/extensions/registry.d.ts +74 -0
  38. package/dist/extensions/registry.d.ts.map +1 -0
  39. package/dist/extensions/registry.js +159 -0
  40. package/dist/extensions/registry.js.map +1 -0
  41. package/dist/extensions/types.d.ts +70 -0
  42. package/dist/extensions/types.d.ts.map +1 -0
  43. package/dist/extensions/types.js +2 -0
  44. package/dist/extensions/types.js.map +1 -0
  45. package/dist/governance/builtins.d.ts +7 -0
  46. package/dist/governance/builtins.d.ts.map +1 -0
  47. package/dist/governance/builtins.js +105 -0
  48. package/dist/governance/builtins.js.map +1 -0
  49. package/dist/governance/constitution.d.ts +23 -0
  50. package/dist/governance/constitution.d.ts.map +1 -0
  51. package/dist/governance/constitution.js +245 -0
  52. package/dist/governance/constitution.js.map +1 -0
  53. package/dist/governance/index.d.ts +3 -0
  54. package/dist/governance/index.d.ts.map +1 -0
  55. package/dist/governance/index.js +2 -0
  56. package/dist/governance/index.js.map +1 -0
  57. package/dist/governance/template.d.ts +12 -0
  58. package/dist/governance/template.d.ts.map +1 -0
  59. package/dist/governance/template.js +84 -0
  60. package/dist/governance/template.js.map +1 -0
  61. package/dist/governance/types.d.ts +64 -0
  62. package/dist/governance/types.d.ts.map +1 -0
  63. package/dist/governance/types.js +2 -0
  64. package/dist/governance/types.js.map +1 -0
  65. package/dist/index.d.ts +15 -18
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +11 -18
  68. package/dist/index.js.map +1 -1
  69. package/dist/templates/checklist.d.ts +7 -0
  70. package/dist/templates/checklist.d.ts.map +1 -0
  71. package/dist/templates/checklist.js +131 -0
  72. package/dist/templates/checklist.js.map +1 -0
  73. package/dist/templates/engine.d.ts +20 -0
  74. package/dist/templates/engine.d.ts.map +1 -0
  75. package/dist/templates/engine.js +187 -0
  76. package/dist/templates/engine.js.map +1 -0
  77. package/dist/templates/types.d.ts +67 -0
  78. package/dist/templates/types.d.ts.map +1 -0
  79. package/dist/templates/types.js +5 -0
  80. package/dist/templates/types.js.map +1 -0
  81. package/package.json +1 -1
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Elicitation Engine
3
+ * Manages interactive specification elicitation workflows
4
+ */
5
+ import type { ElicitationFlow, ElicitationStep, ElicitationResult } from './types.js';
6
+ /**
7
+ * Engine for running elicitation flows
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const engine = new ElicitationEngine(quickFlow);
12
+ * const firstStep = engine.start();
13
+ *
14
+ * while (!engine.isComplete()) {
15
+ * const current = engine.getCurrentStep();
16
+ * const userAnswer = await getUserInput(current);
17
+ * const nextStep = engine.answer(current.id, userAnswer);
18
+ * }
19
+ *
20
+ * const result = engine.getResult();
21
+ * ```
22
+ */
23
+ export declare class ElicitationEngine {
24
+ private flow;
25
+ private answers;
26
+ private skipped;
27
+ private currentIndex;
28
+ private startedAt;
29
+ private completedAt;
30
+ /**
31
+ * Create a new elicitation engine
32
+ * @param flow The elicitation flow to execute
33
+ */
34
+ constructor(flow: ElicitationFlow);
35
+ /**
36
+ * Start the elicitation flow
37
+ * @returns The first step to present to the user, or null if no valid steps
38
+ */
39
+ start(): ElicitationStep | null;
40
+ /**
41
+ * Record an answer and move to the next step
42
+ * @param stepId The step ID being answered
43
+ * @param value The user's answer
44
+ * @returns The next step, or null if flow is complete
45
+ */
46
+ answer(stepId: string, value: any): ElicitationStep | null;
47
+ /**
48
+ * Skip a step (only allowed if not required)
49
+ * @param stepId The step ID to skip
50
+ * @returns The next step, or null if flow is complete
51
+ */
52
+ skip(stepId: string): ElicitationStep | null;
53
+ /**
54
+ * Get the current step
55
+ * @returns The current step, or null if not started or completed
56
+ */
57
+ getCurrentStep(): ElicitationStep | null;
58
+ /**
59
+ * Check if the flow is complete
60
+ * @returns True if all steps have been processed
61
+ */
62
+ isComplete(): boolean;
63
+ /**
64
+ * Get the elicitation result
65
+ * @returns The complete result with answers and metadata
66
+ */
67
+ getResult(): ElicitationResult;
68
+ /**
69
+ * Find the next valid step, skipping conditional steps that don't match
70
+ * @param startIndex Index to start searching from
71
+ * @returns The next valid step, or null if flow is complete
72
+ */
73
+ private getNextValidStep;
74
+ }
75
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/elicitation/engine.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,IAAI,CAAkB;IAC9B,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,WAAW,CAAqB;IAExC;;;OAGG;gBACS,IAAI,EAAE,eAAe;IAIjC;;;OAGG;IACH,KAAK,IAAI,eAAe,GAAG,IAAI;IAM/B;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,eAAe,GAAG,IAAI;IA0C1D;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI;IA8B5C;;;OAGG;IACH,cAAc,IAAI,eAAe,GAAG,IAAI;IAOxC;;;OAGG;IACH,UAAU,IAAI,OAAO;IAIrB;;;OAGG;IACH,SAAS,IAAI,iBAAiB;IAgB9B;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;CAuBzB"}
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Elicitation Engine
3
+ * Manages interactive specification elicitation workflows
4
+ */
5
+ /**
6
+ * Engine for running elicitation flows
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const engine = new ElicitationEngine(quickFlow);
11
+ * const firstStep = engine.start();
12
+ *
13
+ * while (!engine.isComplete()) {
14
+ * const current = engine.getCurrentStep();
15
+ * const userAnswer = await getUserInput(current);
16
+ * const nextStep = engine.answer(current.id, userAnswer);
17
+ * }
18
+ *
19
+ * const result = engine.getResult();
20
+ * ```
21
+ */
22
+ export class ElicitationEngine {
23
+ flow;
24
+ answers = {};
25
+ skipped = [];
26
+ currentIndex = -1;
27
+ startedAt = null;
28
+ completedAt = null;
29
+ /**
30
+ * Create a new elicitation engine
31
+ * @param flow The elicitation flow to execute
32
+ */
33
+ constructor(flow) {
34
+ this.flow = flow;
35
+ }
36
+ /**
37
+ * Start the elicitation flow
38
+ * @returns The first step to present to the user, or null if no valid steps
39
+ */
40
+ start() {
41
+ this.startedAt = new Date();
42
+ this.currentIndex = 0;
43
+ return this.getNextValidStep(0);
44
+ }
45
+ /**
46
+ * Record an answer and move to the next step
47
+ * @param stepId The step ID being answered
48
+ * @param value The user's answer
49
+ * @returns The next step, or null if flow is complete
50
+ */
51
+ answer(stepId, value) {
52
+ const step = this.flow.steps.find(s => s.id === stepId);
53
+ if (!step) {
54
+ throw new Error(`Step not found: ${stepId}`);
55
+ }
56
+ // Validate required fields
57
+ if (step.required && (value === null || value === undefined || value === '')) {
58
+ throw new Error(`Step '${stepId}' is required`);
59
+ }
60
+ // Run custom validation if present
61
+ if (step.validate) {
62
+ const validationResult = step.validate(value);
63
+ if (validationResult !== true) {
64
+ const errorMessage = typeof validationResult === 'string'
65
+ ? validationResult
66
+ : `Validation failed for step '${stepId}'`;
67
+ throw new Error(errorMessage);
68
+ }
69
+ }
70
+ // Store the answer
71
+ this.answers[stepId] = value;
72
+ // Move to next step
73
+ const currentStepIndex = this.flow.steps.findIndex(s => s.id === stepId);
74
+ if (currentStepIndex === -1) {
75
+ throw new Error(`Step not found in flow: ${stepId}`);
76
+ }
77
+ this.currentIndex = currentStepIndex + 1;
78
+ // Check if we've completed all steps
79
+ if (this.currentIndex >= this.flow.steps.length) {
80
+ this.completedAt = new Date();
81
+ return null;
82
+ }
83
+ return this.getNextValidStep(this.currentIndex);
84
+ }
85
+ /**
86
+ * Skip a step (only allowed if not required)
87
+ * @param stepId The step ID to skip
88
+ * @returns The next step, or null if flow is complete
89
+ */
90
+ skip(stepId) {
91
+ const step = this.flow.steps.find(s => s.id === stepId);
92
+ if (!step) {
93
+ throw new Error(`Step not found: ${stepId}`);
94
+ }
95
+ if (step.required) {
96
+ throw new Error(`Cannot skip required step: ${stepId}`);
97
+ }
98
+ // Mark as skipped
99
+ this.skipped.push(stepId);
100
+ // Move to next step
101
+ const currentStepIndex = this.flow.steps.findIndex(s => s.id === stepId);
102
+ if (currentStepIndex === -1) {
103
+ throw new Error(`Step not found in flow: ${stepId}`);
104
+ }
105
+ this.currentIndex = currentStepIndex + 1;
106
+ // Check if we've completed all steps
107
+ if (this.currentIndex >= this.flow.steps.length) {
108
+ this.completedAt = new Date();
109
+ return null;
110
+ }
111
+ return this.getNextValidStep(this.currentIndex);
112
+ }
113
+ /**
114
+ * Get the current step
115
+ * @returns The current step, or null if not started or completed
116
+ */
117
+ getCurrentStep() {
118
+ if (this.currentIndex < 0 || this.currentIndex >= this.flow.steps.length) {
119
+ return null;
120
+ }
121
+ return this.flow.steps[this.currentIndex];
122
+ }
123
+ /**
124
+ * Check if the flow is complete
125
+ * @returns True if all steps have been processed
126
+ */
127
+ isComplete() {
128
+ return this.completedAt !== null;
129
+ }
130
+ /**
131
+ * Get the elicitation result
132
+ * @returns The complete result with answers and metadata
133
+ */
134
+ getResult() {
135
+ if (!this.startedAt) {
136
+ throw new Error('Elicitation has not been started');
137
+ }
138
+ return {
139
+ flowId: this.flow.id,
140
+ answers: { ...this.answers },
141
+ metadata: {
142
+ startedAt: this.startedAt,
143
+ completedAt: this.completedAt || new Date(),
144
+ skipped: [...this.skipped],
145
+ },
146
+ };
147
+ }
148
+ /**
149
+ * Find the next valid step, skipping conditional steps that don't match
150
+ * @param startIndex Index to start searching from
151
+ * @returns The next valid step, or null if flow is complete
152
+ */
153
+ getNextValidStep(startIndex) {
154
+ for (let i = startIndex; i < this.flow.steps.length; i++) {
155
+ const step = this.flow.steps[i];
156
+ // Check if step has a condition
157
+ if (step.condition) {
158
+ const shouldShow = step.condition(this.answers);
159
+ if (!shouldShow) {
160
+ // Skip this step
161
+ this.skipped.push(step.id);
162
+ continue;
163
+ }
164
+ }
165
+ // Found a valid step
166
+ this.currentIndex = i;
167
+ return step;
168
+ }
169
+ // No more valid steps - mark as complete and return null
170
+ this.completedAt = new Date();
171
+ return null;
172
+ }
173
+ }
174
+ //# sourceMappingURL=engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/elicitation/engine.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,iBAAiB;IACpB,IAAI,CAAkB;IACtB,OAAO,GAAwB,EAAE,CAAC;IAClC,OAAO,GAAa,EAAE,CAAC;IACvB,YAAY,GAAW,CAAC,CAAC,CAAC;IAC1B,SAAS,GAAgB,IAAI,CAAC;IAC9B,WAAW,GAAgB,IAAI,CAAC;IAExC;;;OAGG;IACH,YAAY,IAAqB;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAc,EAAE,KAAU;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;QAC/C,CAAC;QAED,2BAA2B;QAC3B,IAAI,IAA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qBAAqB;YACrB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,yDAAyD;QACzD,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Built-in Elicitation Flows
3
+ * Provides pre-configured flows for common spec creation scenarios
4
+ */
5
+ import type { ElicitationFlow } from './types.js';
6
+ /**
7
+ * Quick flow: 5 essential questions for rapid spec creation
8
+ */
9
+ export declare const quickFlow: ElicitationFlow;
10
+ /**
11
+ * Full flow: Comprehensive spec elicitation (15+ steps)
12
+ */
13
+ export declare const fullFlow: ElicitationFlow;
14
+ /**
15
+ * EARS flow: EARS-focused requirement elicitation
16
+ */
17
+ export declare const earsFlow: ElicitationFlow;
18
+ //# sourceMappingURL=flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/elicitation/flows.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,eA6DvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,eA6HtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,eAgItB,CAAC"}
@@ -0,0 +1,331 @@
1
+ /**
2
+ * Built-in Elicitation Flows
3
+ * Provides pre-configured flows for common spec creation scenarios
4
+ */
5
+ /**
6
+ * Quick flow: 5 essential questions for rapid spec creation
7
+ */
8
+ export const quickFlow = {
9
+ id: 'quick',
10
+ name: 'Quick Spec',
11
+ description: 'Fast spec creation with minimal questions (5 steps)',
12
+ steps: [
13
+ {
14
+ id: 'name',
15
+ prompt: 'What is the name of this feature or change?',
16
+ type: 'text',
17
+ required: true,
18
+ validate: (value) => {
19
+ if (typeof value !== 'string' || value.trim().length === 0) {
20
+ return 'Name is required';
21
+ }
22
+ if (value.trim().length < 3) {
23
+ return 'Name must be at least 3 characters';
24
+ }
25
+ return true;
26
+ },
27
+ },
28
+ {
29
+ id: 'description',
30
+ prompt: 'Provide a brief description',
31
+ type: 'text',
32
+ required: true,
33
+ validate: (value) => {
34
+ if (typeof value !== 'string' || value.trim().length === 0) {
35
+ return 'Description is required';
36
+ }
37
+ return true;
38
+ },
39
+ },
40
+ {
41
+ id: 'type',
42
+ prompt: 'What type of change is this?',
43
+ type: 'choice',
44
+ choices: ['feature', 'bugfix', 'migration', 'security'],
45
+ default: 'feature',
46
+ required: true,
47
+ },
48
+ {
49
+ id: 'priority',
50
+ prompt: 'What is the priority?',
51
+ type: 'choice',
52
+ choices: ['critical', 'high', 'medium', 'low'],
53
+ default: 'medium',
54
+ required: true,
55
+ },
56
+ {
57
+ id: 'requirements',
58
+ prompt: 'List the key requirements (one per line)',
59
+ type: 'text',
60
+ required: true,
61
+ validate: (value) => {
62
+ if (typeof value !== 'string' || value.trim().length === 0) {
63
+ return 'At least one requirement is needed';
64
+ }
65
+ return true;
66
+ },
67
+ },
68
+ ],
69
+ };
70
+ /**
71
+ * Full flow: Comprehensive spec elicitation (15+ steps)
72
+ */
73
+ export const fullFlow = {
74
+ id: 'full',
75
+ name: 'Full Spec',
76
+ description: 'Complete spec creation with comprehensive questions',
77
+ steps: [
78
+ {
79
+ id: 'name',
80
+ prompt: 'What is the name of this feature or change?',
81
+ type: 'text',
82
+ required: true,
83
+ validate: (value) => {
84
+ if (typeof value !== 'string' || value.trim().length === 0) {
85
+ return 'Name is required';
86
+ }
87
+ if (value.trim().length < 3) {
88
+ return 'Name must be at least 3 characters';
89
+ }
90
+ return true;
91
+ },
92
+ },
93
+ {
94
+ id: 'description',
95
+ prompt: 'Provide a detailed description',
96
+ type: 'text',
97
+ required: true,
98
+ },
99
+ {
100
+ id: 'type',
101
+ prompt: 'What type of change is this?',
102
+ type: 'choice',
103
+ choices: ['feature', 'bugfix', 'migration', 'security', 'performance', 'refactoring'],
104
+ default: 'feature',
105
+ required: true,
106
+ },
107
+ {
108
+ id: 'priority',
109
+ prompt: 'What is the priority?',
110
+ type: 'choice',
111
+ choices: ['critical', 'high', 'medium', 'low'],
112
+ default: 'medium',
113
+ required: true,
114
+ },
115
+ {
116
+ id: 'scope',
117
+ prompt: 'What is the scope of this change?',
118
+ type: 'text',
119
+ required: false,
120
+ },
121
+ {
122
+ id: 'stakeholders',
123
+ prompt: 'Who are the stakeholders? (comma-separated)',
124
+ type: 'text',
125
+ required: false,
126
+ },
127
+ {
128
+ id: 'requirements',
129
+ prompt: 'List the detailed requirements (one per line)',
130
+ type: 'text',
131
+ required: true,
132
+ },
133
+ {
134
+ id: 'has_security',
135
+ prompt: 'Does this have security implications?',
136
+ type: 'confirm',
137
+ default: false,
138
+ required: true,
139
+ },
140
+ {
141
+ id: 'security_considerations',
142
+ prompt: 'What are the security considerations?',
143
+ type: 'text',
144
+ required: true,
145
+ condition: (answers) => answers.has_security === true,
146
+ },
147
+ {
148
+ id: 'testing_strategy',
149
+ prompt: 'Describe the testing strategy',
150
+ type: 'text',
151
+ required: true,
152
+ },
153
+ {
154
+ id: 'has_performance',
155
+ prompt: 'Are there specific performance requirements?',
156
+ type: 'confirm',
157
+ default: false,
158
+ required: true,
159
+ },
160
+ {
161
+ id: 'performance_requirements',
162
+ prompt: 'What are the performance requirements?',
163
+ type: 'text',
164
+ required: true,
165
+ condition: (answers) => answers.has_performance === true,
166
+ },
167
+ {
168
+ id: 'dependencies',
169
+ prompt: 'List any dependencies (systems, APIs, libraries)',
170
+ type: 'text',
171
+ required: false,
172
+ },
173
+ {
174
+ id: 'timeline',
175
+ prompt: 'What is the estimated timeline?',
176
+ type: 'text',
177
+ required: false,
178
+ },
179
+ {
180
+ id: 'risks',
181
+ prompt: 'What are the potential risks?',
182
+ type: 'text',
183
+ required: false,
184
+ },
185
+ {
186
+ id: 'acceptance_criteria',
187
+ prompt: 'What are the acceptance criteria?',
188
+ type: 'text',
189
+ required: true,
190
+ },
191
+ {
192
+ id: 'notes',
193
+ prompt: 'Any additional notes or context?',
194
+ type: 'text',
195
+ required: false,
196
+ },
197
+ ],
198
+ };
199
+ /**
200
+ * EARS flow: EARS-focused requirement elicitation
201
+ */
202
+ export const earsFlow = {
203
+ id: 'ears',
204
+ name: 'EARS Spec',
205
+ description: 'EARS-formatted specification with structured requirements',
206
+ steps: [
207
+ {
208
+ id: 'name',
209
+ prompt: 'What is the name of this feature?',
210
+ type: 'text',
211
+ required: true,
212
+ validate: (value) => {
213
+ if (typeof value !== 'string' || value.trim().length === 0) {
214
+ return 'Name is required';
215
+ }
216
+ return true;
217
+ },
218
+ },
219
+ {
220
+ id: 'description',
221
+ prompt: 'Provide a description',
222
+ type: 'text',
223
+ required: true,
224
+ },
225
+ {
226
+ id: 'req_count',
227
+ prompt: 'How many requirements do you want to define?',
228
+ type: 'text',
229
+ required: true,
230
+ default: '3',
231
+ validate: (value) => {
232
+ const num = parseInt(value, 10);
233
+ if (isNaN(num) || num < 1 || num > 20) {
234
+ return 'Please enter a number between 1 and 20';
235
+ }
236
+ return true;
237
+ },
238
+ },
239
+ {
240
+ id: 'req_1_type',
241
+ prompt: 'Requirement 1 - Type',
242
+ type: 'choice',
243
+ choices: ['ubiquitous', 'event', 'state', 'optional', 'unwanted'],
244
+ default: 'ubiquitous',
245
+ required: true,
246
+ condition: (answers) => parseInt(answers.req_count, 10) >= 1,
247
+ },
248
+ {
249
+ id: 'req_1_trigger',
250
+ prompt: 'Requirement 1 - What is the trigger/event?',
251
+ type: 'text',
252
+ required: true,
253
+ condition: (answers) => answers.req_1_type === 'event',
254
+ },
255
+ {
256
+ id: 'req_1_precondition',
257
+ prompt: 'Requirement 1 - What is the precondition/state?',
258
+ type: 'text',
259
+ required: true,
260
+ condition: (answers) => answers.req_1_type === 'state' || answers.req_1_type === 'optional',
261
+ },
262
+ {
263
+ id: 'req_1_response',
264
+ prompt: 'Requirement 1 - What should the system do?',
265
+ type: 'text',
266
+ required: true,
267
+ condition: (answers) => parseInt(answers.req_count, 10) >= 1,
268
+ },
269
+ {
270
+ id: 'req_2_type',
271
+ prompt: 'Requirement 2 - Type',
272
+ type: 'choice',
273
+ choices: ['ubiquitous', 'event', 'state', 'optional', 'unwanted'],
274
+ default: 'ubiquitous',
275
+ required: true,
276
+ condition: (answers) => parseInt(answers.req_count, 10) >= 2,
277
+ },
278
+ {
279
+ id: 'req_2_trigger',
280
+ prompt: 'Requirement 2 - What is the trigger/event?',
281
+ type: 'text',
282
+ required: true,
283
+ condition: (answers) => answers.req_2_type === 'event' && parseInt(answers.req_count, 10) >= 2,
284
+ },
285
+ {
286
+ id: 'req_2_precondition',
287
+ prompt: 'Requirement 2 - What is the precondition/state?',
288
+ type: 'text',
289
+ required: true,
290
+ condition: (answers) => (answers.req_2_type === 'state' || answers.req_2_type === 'optional') && parseInt(answers.req_count, 10) >= 2,
291
+ },
292
+ {
293
+ id: 'req_2_response',
294
+ prompt: 'Requirement 2 - What should the system do?',
295
+ type: 'text',
296
+ required: true,
297
+ condition: (answers) => parseInt(answers.req_count, 10) >= 2,
298
+ },
299
+ {
300
+ id: 'req_3_type',
301
+ prompt: 'Requirement 3 - Type',
302
+ type: 'choice',
303
+ choices: ['ubiquitous', 'event', 'state', 'optional', 'unwanted'],
304
+ default: 'ubiquitous',
305
+ required: true,
306
+ condition: (answers) => parseInt(answers.req_count, 10) >= 3,
307
+ },
308
+ {
309
+ id: 'req_3_trigger',
310
+ prompt: 'Requirement 3 - What is the trigger/event?',
311
+ type: 'text',
312
+ required: true,
313
+ condition: (answers) => answers.req_3_type === 'event' && parseInt(answers.req_count, 10) >= 3,
314
+ },
315
+ {
316
+ id: 'req_3_precondition',
317
+ prompt: 'Requirement 3 - What is the precondition/state?',
318
+ type: 'text',
319
+ required: true,
320
+ condition: (answers) => (answers.req_3_type === 'state' || answers.req_3_type === 'optional') && parseInt(answers.req_count, 10) >= 3,
321
+ },
322
+ {
323
+ id: 'req_3_response',
324
+ prompt: 'Requirement 3 - What should the system do?',
325
+ type: 'text',
326
+ required: true,
327
+ condition: (answers) => parseInt(answers.req_count, 10) >= 3,
328
+ },
329
+ ],
330
+ };
331
+ //# sourceMappingURL=flows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flows.js","sourceRoot":"","sources":["../../src/elicitation/flows.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAoB;IACxC,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,qDAAqD;IAClE,KAAK,EAAE;QACL;YACE,EAAE,EAAE,MAAM;YACV,MAAM,EAAE,6CAA6C;YACrD,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAClB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC3D,OAAO,kBAAkB,CAAC;gBAC5B,CAAC;gBACD,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC5B,OAAO,oCAAoC,CAAC;gBAC9C,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF;QACD;YACE,EAAE,EAAE,aAAa;YACjB,MAAM,EAAE,6BAA6B;YACrC,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAClB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC3D,OAAO,yBAAyB,CAAC;gBACnC,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF;QACD;YACE,EAAE,EAAE,MAAM;YACV,M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AC,IAAI,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC;SACtI;QACD;YACE,EAAE,EAAE,gBAAgB;YACpB,MAAM,EAAE,4CAA4C;YACpD,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC;SAC7D;KACF;CACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Specification Generator
3
+ * Converts elicitation results into SpecSafe-formatted markdown specs
4
+ */
5
+ import type { ElicitationResult } from './types.js';
6
+ /**
7
+ * Generate a SpecSafe-formatted specification from elicitation results
8
+ *
9
+ * @param result The completed elicitation result
10
+ * @returns Markdown-formatted specification
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const result = engine.getResult();
15
+ * const spec = generateSpec(result);
16
+ * await writeFile('specs/SPEC-001.md', spec);
17
+ * ```
18
+ */
19
+ export declare function generateSpec(result: ElicitationResult): string;
20
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/elicitation/generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAa9D"}