@vfarcic/dot-ai 0.16.0 → 0.17.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.
@@ -1 +1 @@
1
- {"version":3,"file":"answer-question.d.ts","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AACzD,eAAO,MAAM,+BAA+B,8HAA4H,CAAC;AAGzK,eAAO,MAAM,gCAAgC;;;;CAI5C,CAAC;AA+eF;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,EAC7G,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAmTxD"}
1
+ {"version":3,"file":"answer-question.d.ts","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AACzD,eAAO,MAAM,+BAA+B,8HAA4H,CAAC;AAGzK,eAAO,MAAM,gCAAgC;;;;CAI5C,CAAC;AAygBF;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,EAC7G,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAmTxD"}
@@ -154,23 +154,45 @@ function validateAnswer(answer, question) {
154
154
  return null;
155
155
  }
156
156
  /**
157
- * Get anti-cascade agent instructions for stage responses
157
+ * Get stage-specific instructions for different stages
158
158
  */
159
- function getAgentInstructions(stage) {
160
- const antiCascadeRule = 'CRITICAL ANTI-CASCADE RULE: When user says "skip" for ANY stage, only skip THAT specific stage and present the NEXT stage questions to the user. NEVER automatically skip multiple stages in sequence.';
159
+ function getStageSpecificInstructions(stage) {
161
160
  switch (stage) {
162
161
  case 'required':
163
- return `${antiCascadeRule} Present these required questions to the user. All must be answered before proceeding.`;
162
+ return 'STAGE: REQUIRED - All questions must be answered before proceeding. No skipping allowed.';
164
163
  case 'basic':
165
- return `${antiCascadeRule} Present these questions to the user and wait for their response. Do NOT skip this stage unless the user explicitly says to skip THIS specific stage.`;
164
+ return 'STAGE: BASIC - These questions can be skipped. User can provide answers or say "skip" to proceed to advanced stage.';
166
165
  case 'advanced':
167
- return `${antiCascadeRule} Present these questions to the user and wait for their response. Do NOT skip this stage unless the user explicitly says to skip THIS specific stage.`;
166
+ return 'STAGE: ADVANCED - These questions can be skipped. User can provide answers or say "skip" to proceed to open stage.';
168
167
  case 'open':
169
- return `${antiCascadeRule} This is the final configuration stage. Present these questions to the user and wait for their response. Use "N/A" only if user explicitly states no additional requirements.`;
168
+ return 'STAGE: OPEN - Final configuration stage. User can provide additional requirements or say "N/A" to proceed to manifest generation.';
170
169
  default:
171
- return `${antiCascadeRule} Present questions to the user and wait for their response.`;
170
+ return 'STAGE: UNKNOWN - Present questions to the user and wait for their response.';
172
171
  }
173
172
  }
173
+ /**
174
+ * Get enhanced anti-cascade agent instructions for stage responses
175
+ */
176
+ function getAgentInstructions(stage) {
177
+ const antiCascadeRule = 'CRITICAL ANTI-CASCADE RULE: When user says "skip" for ANY stage, only skip THAT specific stage and present the NEXT stage questions to the user. NEVER automatically skip multiple stages in sequence.';
178
+ const mandatoryWorkflow = `
179
+ MANDATORY CLIENT AGENT WORKFLOW:
180
+ 1. Present these questions to the user in natural language
181
+ 2. Wait for explicit user response
182
+ 3. If user provides answers: call answerQuestion with their specific answers
183
+ 4. If user says "skip": call answerQuestion with empty answers object ({})
184
+ 5. NEVER call answerQuestion without receiving user input first
185
+ 6. NEVER assume what the user wants for subsequent stages`;
186
+ const strictConstraints = `
187
+ STRICT BEHAVIORAL CONSTRAINTS:
188
+ - DO NOT call answerQuestion automatically
189
+ - DO NOT assume user wants to proceed to manifest generation
190
+ - DO NOT call answerQuestion with empty open stage answers unless user explicitly provides them
191
+ - DO NOT interpret "skip" as "automatically proceed to next stage"
192
+ - MUST present each stage's questions individually and wait for user response`;
193
+ const stageSpecific = getStageSpecificInstructions(stage);
194
+ return `${antiCascadeRule}\n${mandatoryWorkflow}\n${strictConstraints}\n\n${stageSpecific}`;
195
+ }
174
196
  /**
175
197
  * Determine current stage based on solution state
176
198
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vfarcic/dot-ai",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Universal Kubernetes application deployment agent with CLI and MCP interfaces",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",