@probelabs/visor 0.1.148 → 0.1.149-ee
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.
- package/defaults/assistant.yaml +2141 -0
- package/defaults/code-talk.yaml +1250 -0
- package/defaults/intent-router.yaml +478 -0
- package/dist/defaults/assistant.yaml +2141 -0
- package/dist/defaults/code-talk.yaml +1250 -0
- package/dist/defaults/intent-router.yaml +478 -0
- package/dist/index.js +1735 -25
- package/dist/sdk/{check-provider-registry-DVQDGTOE.mjs → check-provider-registry-LVLC4EPF.mjs} +4 -4
- package/dist/sdk/{check-provider-registry-KHPY6LB4.mjs → check-provider-registry-TJAJVSMY.mjs} +4 -4
- package/dist/sdk/{chunk-DIND4ZCV.mjs → chunk-DNDS7R3N.mjs} +11 -1
- package/dist/sdk/{chunk-DIND4ZCV.mjs.map → chunk-DNDS7R3N.mjs.map} +1 -1
- package/dist/sdk/{chunk-6N6JRWCW.mjs → chunk-NYFTDVG5.mjs} +12 -12
- package/dist/sdk/{chunk-IF2UD2KS.mjs.map → chunk-NYFTDVG5.mjs.map} +1 -1
- package/dist/sdk/{chunk-H4AYMOAT.mjs → chunk-V6GI4U2M.mjs} +10 -10
- package/dist/sdk/{chunk-XNTBSV6M.mjs → chunk-YYZAN5NK.mjs} +3 -3
- package/dist/sdk/{config-G5UU4WXT.mjs → config-KQH254CA.mjs} +2 -2
- package/dist/sdk/{host-4F6I3ZXN.mjs → host-NZXGBBJI.mjs} +2 -2
- package/dist/sdk/knex-store-HPXJILBL.mjs +411 -0
- package/dist/sdk/knex-store-HPXJILBL.mjs.map +1 -0
- package/dist/sdk/loader-YSRMVXC3.mjs +89 -0
- package/dist/sdk/loader-YSRMVXC3.mjs.map +1 -0
- package/dist/sdk/opa-policy-engine-S2S2ULEI.mjs +655 -0
- package/dist/sdk/opa-policy-engine-S2S2ULEI.mjs.map +1 -0
- package/dist/sdk/{schedule-tool-SBXAEBDD.mjs → schedule-tool-4U32CSH6.mjs} +4 -4
- package/dist/sdk/{schedule-tool-CONR4VW3.mjs → schedule-tool-NX75VKGA.mjs} +4 -4
- package/dist/sdk/{schedule-tool-handler-R7PG3VMR.mjs → schedule-tool-handler-6S2DNP26.mjs} +4 -4
- package/dist/sdk/{schedule-tool-handler-YUC6CAXX.mjs → schedule-tool-handler-KKN7XJYT.mjs} +4 -4
- package/dist/sdk/sdk.js +1527 -259
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +6 -6
- package/dist/sdk/validator-XTZJZZJH.mjs +134 -0
- package/dist/sdk/validator-XTZJZZJH.mjs.map +1 -0
- package/dist/sdk/{workflow-check-provider-DYSO3PML.mjs → workflow-check-provider-AGZ5JY2I.mjs} +4 -4
- package/dist/sdk/{workflow-check-provider-FIFFQDQU.mjs → workflow-check-provider-FDNGOBBG.mjs} +4 -4
- package/dist/sdk/{workflow-registry-AAD37XKZ.mjs → workflow-registry-MHUSKSD6.mjs} +2 -2
- package/dist/workflow-registry.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/output/traces/run-2026-03-02T18-32-11-359Z.ndjson +0 -138
- package/dist/output/traces/run-2026-03-02T18-32-55-702Z.ndjson +0 -1442
- package/dist/sdk/check-provider-registry-35BPTY4W.mjs +0 -29
- package/dist/sdk/chunk-6N6JRWCW.mjs.map +0 -1
- package/dist/sdk/chunk-AYQE4JCU.mjs +0 -1502
- package/dist/sdk/chunk-AYQE4JCU.mjs.map +0 -1
- package/dist/sdk/chunk-EGUHXVWS.mjs +0 -443
- package/dist/sdk/chunk-EGUHXVWS.mjs.map +0 -1
- package/dist/sdk/chunk-IF2UD2KS.mjs +0 -43159
- package/dist/sdk/chunk-S2YO4ZE3.mjs +0 -739
- package/dist/sdk/chunk-S2YO4ZE3.mjs.map +0 -1
- package/dist/sdk/failure-condition-evaluator-I6QWFKV3.mjs +0 -17
- package/dist/sdk/github-frontend-2MC77L7F.mjs +0 -1368
- package/dist/sdk/github-frontend-2MC77L7F.mjs.map +0 -1
- package/dist/sdk/routing-UT3BXBXH.mjs +0 -25
- package/dist/sdk/schedule-tool-K3GQXCBN.mjs +0 -35
- package/dist/sdk/schedule-tool-handler-GFQCJAVZ.mjs +0 -39
- package/dist/sdk/schedule-tool-handler-R7PG3VMR.mjs.map +0 -1
- package/dist/sdk/schedule-tool-handler-YUC6CAXX.mjs.map +0 -1
- package/dist/sdk/trace-helpers-J463EU4B.mjs +0 -25
- package/dist/sdk/trace-helpers-J463EU4B.mjs.map +0 -1
- package/dist/sdk/workflow-check-provider-DYSO3PML.mjs.map +0 -1
- package/dist/sdk/workflow-check-provider-FIFFQDQU.mjs.map +0 -1
- package/dist/sdk/workflow-check-provider-GJNGTS3F.mjs +0 -29
- package/dist/sdk/workflow-check-provider-GJNGTS3F.mjs.map +0 -1
- package/dist/sdk/workflow-registry-AAD37XKZ.mjs.map +0 -1
- package/dist/traces/run-2026-03-02T18-32-11-359Z.ndjson +0 -138
- package/dist/traces/run-2026-03-02T18-32-55-702Z.ndjson +0 -1442
- /package/dist/sdk/{check-provider-registry-35BPTY4W.mjs.map → check-provider-registry-LVLC4EPF.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-DVQDGTOE.mjs.map → check-provider-registry-TJAJVSMY.mjs.map} +0 -0
- /package/dist/sdk/{chunk-H4AYMOAT.mjs.map → chunk-V6GI4U2M.mjs.map} +0 -0
- /package/dist/sdk/{chunk-XNTBSV6M.mjs.map → chunk-YYZAN5NK.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-KHPY6LB4.mjs.map → config-KQH254CA.mjs.map} +0 -0
- /package/dist/sdk/{host-4F6I3ZXN.mjs.map → host-NZXGBBJI.mjs.map} +0 -0
- /package/dist/sdk/{config-G5UU4WXT.mjs.map → schedule-tool-4U32CSH6.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-I6QWFKV3.mjs.map → schedule-tool-NX75VKGA.mjs.map} +0 -0
- /package/dist/sdk/{routing-UT3BXBXH.mjs.map → schedule-tool-handler-6S2DNP26.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-CONR4VW3.mjs.map → schedule-tool-handler-KKN7XJYT.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-K3GQXCBN.mjs.map → workflow-check-provider-AGZ5JY2I.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-SBXAEBDD.mjs.map → workflow-check-provider-FDNGOBBG.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-GFQCJAVZ.mjs.map → workflow-registry-MHUSKSD6.mjs.map} +0 -0
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# intent-router: Reusable intent classification workflow
|
|
3
|
+
# =============================================================================
|
|
4
|
+
#
|
|
5
|
+
# A lightweight routing helper that classifies user intent and rewrites the
|
|
6
|
+
# request into a short question. Intended to be reused by assistant configs.
|
|
7
|
+
#
|
|
8
|
+
# Usage:
|
|
9
|
+
# imports:
|
|
10
|
+
# - visor://intent-router.yaml
|
|
11
|
+
#
|
|
12
|
+
# checks:
|
|
13
|
+
# route-intent:
|
|
14
|
+
# type: workflow
|
|
15
|
+
# workflow: intent-router
|
|
16
|
+
# args:
|
|
17
|
+
# question: "How does auth work?"
|
|
18
|
+
# intents:
|
|
19
|
+
# - id: chat
|
|
20
|
+
# description: general Q&A or small talk
|
|
21
|
+
#
|
|
22
|
+
# =============================================================================
|
|
23
|
+
|
|
24
|
+
id: intent-router
|
|
25
|
+
name: Intent Router
|
|
26
|
+
description: Classify user intent and rewrite the request as a short question
|
|
27
|
+
version: "1.0.0"
|
|
28
|
+
|
|
29
|
+
inputs:
|
|
30
|
+
- name: question
|
|
31
|
+
required: true
|
|
32
|
+
description: Primary user message to classify
|
|
33
|
+
schema:
|
|
34
|
+
type: string
|
|
35
|
+
|
|
36
|
+
- name: intents
|
|
37
|
+
required: true
|
|
38
|
+
description: |
|
|
39
|
+
Array of intent definitions:
|
|
40
|
+
- id: unique identifier for routing
|
|
41
|
+
- description: short description of when to use
|
|
42
|
+
schema:
|
|
43
|
+
type: array
|
|
44
|
+
items:
|
|
45
|
+
type: object
|
|
46
|
+
properties:
|
|
47
|
+
id: { type: string }
|
|
48
|
+
description: { type: string }
|
|
49
|
+
required: [id, description]
|
|
50
|
+
|
|
51
|
+
- name: tags
|
|
52
|
+
required: false
|
|
53
|
+
description: |
|
|
54
|
+
Optional tag definitions to classify capabilities or resources needed:
|
|
55
|
+
- id: tag identifier
|
|
56
|
+
- description: when the tag applies
|
|
57
|
+
NOTE: Consider using 'skills' instead for unified skill-based classification.
|
|
58
|
+
schema:
|
|
59
|
+
type: array
|
|
60
|
+
items:
|
|
61
|
+
type: object
|
|
62
|
+
properties:
|
|
63
|
+
id: { type: string }
|
|
64
|
+
description: { type: string }
|
|
65
|
+
required: [id, description]
|
|
66
|
+
|
|
67
|
+
- name: skills
|
|
68
|
+
required: false
|
|
69
|
+
description: |
|
|
70
|
+
Unified skill definitions for classification. Each skill bundles:
|
|
71
|
+
- id: skill identifier (used for classification and activation)
|
|
72
|
+
- description: when this skill should be activated
|
|
73
|
+
- requires: (optional) array of other skill IDs to auto-activate
|
|
74
|
+
When provided, skills are used instead of tags for classification.
|
|
75
|
+
The classifier will output selected skill IDs in the 'skills' array.
|
|
76
|
+
schema:
|
|
77
|
+
type: array
|
|
78
|
+
items:
|
|
79
|
+
type: object
|
|
80
|
+
properties:
|
|
81
|
+
id: { type: string }
|
|
82
|
+
description: { type: string }
|
|
83
|
+
requires: { type: array, items: { type: string } }
|
|
84
|
+
required: [id, description]
|
|
85
|
+
|
|
86
|
+
- name: routing_instructions
|
|
87
|
+
required: false
|
|
88
|
+
description: Additional routing rules to append (optional)
|
|
89
|
+
schema:
|
|
90
|
+
type: string
|
|
91
|
+
|
|
92
|
+
outputs:
|
|
93
|
+
- name: intent
|
|
94
|
+
description: Selected intent ID
|
|
95
|
+
value_js: |
|
|
96
|
+
return outputs?.classify?.intent ?? null;
|
|
97
|
+
|
|
98
|
+
- name: topic
|
|
99
|
+
description: Short question summarizing the request
|
|
100
|
+
value_js: |
|
|
101
|
+
return outputs?.classify?.topic ?? null;
|
|
102
|
+
|
|
103
|
+
- name: tags
|
|
104
|
+
description: Selected tag IDs (legacy, use skills instead)
|
|
105
|
+
value_js: |
|
|
106
|
+
return outputs?.classify?.tags ?? [];
|
|
107
|
+
|
|
108
|
+
- name: skills
|
|
109
|
+
description: Selected skill IDs (dependencies expanded in assistant workflow)
|
|
110
|
+
value_js: |
|
|
111
|
+
// Return raw selected skills - dependencies are expanded in assistant's build-config
|
|
112
|
+
return outputs?.classify?.skills ?? [];
|
|
113
|
+
|
|
114
|
+
- name: raw
|
|
115
|
+
description: Raw classifier output
|
|
116
|
+
value_js: |
|
|
117
|
+
return outputs?.classify ?? null;
|
|
118
|
+
|
|
119
|
+
- name: error
|
|
120
|
+
description: Error message if explicit %intent was invalid (check rationale for ERROR prefix)
|
|
121
|
+
value_js: |
|
|
122
|
+
const rationale = outputs?.classify?.rationale ?? '';
|
|
123
|
+
if (rationale.includes('ERROR:')) {
|
|
124
|
+
return rationale;
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
|
|
128
|
+
steps:
|
|
129
|
+
classify:
|
|
130
|
+
type: ai
|
|
131
|
+
criticality: internal
|
|
132
|
+
reuse_ai_session: false
|
|
133
|
+
assume:
|
|
134
|
+
- "true"
|
|
135
|
+
guarantee: "output?.intent != null"
|
|
136
|
+
ai:
|
|
137
|
+
skip_code_context: true
|
|
138
|
+
skip_slack_context: false
|
|
139
|
+
disableTools: true
|
|
140
|
+
allowedTools: []
|
|
141
|
+
system_prompt: |
|
|
142
|
+
You are an intent router. Your ONLY job is to:
|
|
143
|
+
1) pick the best intent, and
|
|
144
|
+
2) rewrite the request as a SHORT question (1-2 sentences),
|
|
145
|
+
3) assign relevant tags (if provided).
|
|
146
|
+
NEVER answer the question or speculate about root causes.
|
|
147
|
+
Output ONLY JSON that matches the schema.
|
|
148
|
+
schema: |
|
|
149
|
+
{
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"properties": {
|
|
153
|
+
"intent": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"enum": [{% for i in inputs.intents %}"{{ i.id }}"{% unless forloop.last %}, {% endunless %}{% endfor %}]
|
|
156
|
+
},
|
|
157
|
+
"topic": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"maxLength": 240,
|
|
160
|
+
"pattern": "^[^`\\n]*\\?$"
|
|
161
|
+
},
|
|
162
|
+
{% if inputs.skills and inputs.skills.size > 0 %}"skills": {
|
|
163
|
+
"type": "array",
|
|
164
|
+
"items": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"enum": [{% for s in inputs.skills %}"{{ s.id }}"{% unless forloop.last %}, {% endunless %}{% endfor %}]
|
|
167
|
+
},
|
|
168
|
+
"maxItems": 12
|
|
169
|
+
}{% else %}"tags": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {
|
|
172
|
+
"type": "string"{% if inputs.tags and inputs.tags.size > 0 %},
|
|
173
|
+
"enum": [{% for t in inputs.tags %}"{{ t.id }}"{% unless forloop.last %}, {% endunless %}{% endfor %}]{% endif %}
|
|
174
|
+
},
|
|
175
|
+
"maxItems": 12
|
|
176
|
+
}{% endif %},
|
|
177
|
+
"rationale": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": ["intent", "topic"]
|
|
182
|
+
}
|
|
183
|
+
prompt: |
|
|
184
|
+
<role>
|
|
185
|
+
You are an internal routing assistant. Classify the request and produce a short question.
|
|
186
|
+
</role>
|
|
187
|
+
|
|
188
|
+
Primary message (main signal):
|
|
189
|
+
{{ inputs.question }}
|
|
190
|
+
|
|
191
|
+
<slack_context_instructions>
|
|
192
|
+
This is an ONGOING DIALOGUE. The full thread history is in <slack_context> inside the <context> block.
|
|
193
|
+
|
|
194
|
+
CRITICAL: Treat this as a continuous conversation, not isolated messages.
|
|
195
|
+
- If there are unfinished tasks or pending work from earlier in the thread, the current message likely relates to them
|
|
196
|
+
- Short messages like "ok", "do it", "continue", "yes", "what about X?" are follow-ups to previous context
|
|
197
|
+
- When the user references "it", "this", "that", or "the task", connect it to the most recent relevant topic
|
|
198
|
+
- If the assistant previously proposed something or was working on something, assume follow-ups relate to that work
|
|
199
|
+
|
|
200
|
+
When reconstructing the topic:
|
|
201
|
+
- Include enough context from the thread so the topic is self-contained
|
|
202
|
+
- If continuing previous work, mention what work (e.g., "Continue fixing the auth bug discussed earlier?")
|
|
203
|
+
- Don't just echo the last message if it's a short follow-up - expand it with thread context
|
|
204
|
+
</slack_context_instructions>
|
|
205
|
+
|
|
206
|
+
<intent_options>
|
|
207
|
+
{% for i in inputs.intents %}
|
|
208
|
+
<option value="{{ i.id }}">
|
|
209
|
+
{{ i.description }}
|
|
210
|
+
</option>
|
|
211
|
+
{% endfor %}
|
|
212
|
+
</intent_options>
|
|
213
|
+
|
|
214
|
+
{% if inputs.skills and inputs.skills.size > 0 %}
|
|
215
|
+
<skill_options>
|
|
216
|
+
Select which skills should be activated for this request.
|
|
217
|
+
Multiple skills can be selected if needed.
|
|
218
|
+
{% for s in inputs.skills %}
|
|
219
|
+
<option value="{{ s.id }}">
|
|
220
|
+
{{ s.description }}
|
|
221
|
+
</option>
|
|
222
|
+
{% endfor %}
|
|
223
|
+
</skill_options>
|
|
224
|
+
{% elsif inputs.tags and inputs.tags.size > 0 %}
|
|
225
|
+
<tag_options>
|
|
226
|
+
{% for t in inputs.tags %}
|
|
227
|
+
<option value="{{ t.id }}">
|
|
228
|
+
{{ t.description }}
|
|
229
|
+
</option>
|
|
230
|
+
{% endfor %}
|
|
231
|
+
</tag_options>
|
|
232
|
+
{% endif %}
|
|
233
|
+
|
|
234
|
+
{% if inputs.routing_instructions %}
|
|
235
|
+
<additional_routing_rules>
|
|
236
|
+
{{ inputs.routing_instructions }}
|
|
237
|
+
</additional_routing_rules>
|
|
238
|
+
{% endif %}
|
|
239
|
+
|
|
240
|
+
<topic_instructions>
|
|
241
|
+
Always output a short, self-contained question (1-2 sentences).
|
|
242
|
+
Do NOT answer the question or speculate about root causes.
|
|
243
|
+
Only include details explicitly stated in the thread or ticket context.
|
|
244
|
+
Remove any #tag or %intent markers from the topic.
|
|
245
|
+
</topic_instructions>
|
|
246
|
+
|
|
247
|
+
{% if inputs.skills and inputs.skills.size > 0 %}
|
|
248
|
+
<skill_instructions>
|
|
249
|
+
Return a "skills" array of zero or more skill IDs that should be activated.
|
|
250
|
+
Include only skills that clearly apply to the current request.
|
|
251
|
+
Multiple skills can be selected - each skill provides specific knowledge and/or tools.
|
|
252
|
+
Use an empty array if no skills apply.
|
|
253
|
+
</skill_instructions>
|
|
254
|
+
{% else %}
|
|
255
|
+
<tag_instructions>
|
|
256
|
+
If tag options are provided, return a "tags" array of zero or more tag IDs.
|
|
257
|
+
Include only tags that clearly apply to the current request. Use an empty
|
|
258
|
+
array if none apply.
|
|
259
|
+
</tag_instructions>
|
|
260
|
+
{% endif %}
|
|
261
|
+
|
|
262
|
+
<explicit_markers>
|
|
263
|
+
IMPORTANT: The user may include explicit markers in their message:
|
|
264
|
+
|
|
265
|
+
{% if inputs.skills and inputs.skills.size > 0 %}
|
|
266
|
+
1. **Hash skills (#skill)**: If the message contains #skill_name patterns (e.g., "#jira #engineer"),
|
|
267
|
+
you MUST include those exact skill IDs in the output skills array (only if they match available skills).
|
|
268
|
+
Example: "Create a ticket for this bug #jira" → skills should include "jira"
|
|
269
|
+
{% else %}
|
|
270
|
+
1. **Hash tags (#tag)**: If the message contains #tag_name patterns (e.g., "#codebase #urgent"),
|
|
271
|
+
you MUST include those exact tag IDs in the output tags array (only if they match available tags).
|
|
272
|
+
Example: "How does auth work? #codebase #security" → tags should include "codebase" and "security"
|
|
273
|
+
{% endif %}
|
|
274
|
+
|
|
275
|
+
2. **Percent intent (%intent)**: If the message contains a %intent_name pattern (e.g., "%code_help"),
|
|
276
|
+
you MUST use that exact intent ID if it matches one of the available intents.
|
|
277
|
+
Example: "What is this function doing? %code_help" → intent should be "code_help"
|
|
278
|
+
If the specified %intent does NOT match any available option, include an error note in the
|
|
279
|
+
rationale field like "ERROR: explicit intent 'xyz' not found" and pick the closest matching intent.
|
|
280
|
+
|
|
281
|
+
Always strip the #skill/#tag and %intent markers from the topic output.
|
|
282
|
+
These explicit markers take precedence over your classification when they match valid options.
|
|
283
|
+
</explicit_markers>
|
|
284
|
+
|
|
285
|
+
# =============================================================================
|
|
286
|
+
# Tests
|
|
287
|
+
# =============================================================================
|
|
288
|
+
tests:
|
|
289
|
+
defaults:
|
|
290
|
+
strict: true
|
|
291
|
+
ai_provider: mock
|
|
292
|
+
|
|
293
|
+
cases:
|
|
294
|
+
- name: basic-intent-routing
|
|
295
|
+
event: manual
|
|
296
|
+
fixture: local.minimal
|
|
297
|
+
workflow_input:
|
|
298
|
+
question: "How does authentication work?"
|
|
299
|
+
intents:
|
|
300
|
+
- id: chat
|
|
301
|
+
description: general Q&A
|
|
302
|
+
- id: code_help
|
|
303
|
+
description: questions about code or implementation details
|
|
304
|
+
tags:
|
|
305
|
+
- id: codebase
|
|
306
|
+
description: request needs codebase context
|
|
307
|
+
mocks:
|
|
308
|
+
classify:
|
|
309
|
+
intent: code_help
|
|
310
|
+
topic: "How does authentication work?"
|
|
311
|
+
tags: ["codebase"]
|
|
312
|
+
expect:
|
|
313
|
+
calls:
|
|
314
|
+
- step: classify
|
|
315
|
+
exactly: 1
|
|
316
|
+
workflow_output:
|
|
317
|
+
- path: intent
|
|
318
|
+
equals: "code_help"
|
|
319
|
+
- path: topic
|
|
320
|
+
equals: "How does authentication work?"
|
|
321
|
+
- path: tags
|
|
322
|
+
equals: ["codebase"]
|
|
323
|
+
|
|
324
|
+
- name: explicit-hashtag-markers
|
|
325
|
+
description: "#tag markers should be automatically included in tags"
|
|
326
|
+
event: manual
|
|
327
|
+
fixture: local.minimal
|
|
328
|
+
workflow_input:
|
|
329
|
+
question: "How does auth work? #codebase #security"
|
|
330
|
+
intents:
|
|
331
|
+
- id: chat
|
|
332
|
+
description: general Q&A
|
|
333
|
+
- id: code_help
|
|
334
|
+
description: questions about code or implementation details
|
|
335
|
+
tags:
|
|
336
|
+
- id: codebase
|
|
337
|
+
description: request needs codebase context
|
|
338
|
+
- id: security
|
|
339
|
+
description: security-related request
|
|
340
|
+
- id: urgent
|
|
341
|
+
description: urgent request
|
|
342
|
+
mocks:
|
|
343
|
+
classify:
|
|
344
|
+
intent: code_help
|
|
345
|
+
topic: "How does auth work?"
|
|
346
|
+
tags: ["codebase", "security"]
|
|
347
|
+
expect:
|
|
348
|
+
calls:
|
|
349
|
+
- step: classify
|
|
350
|
+
exactly: 1
|
|
351
|
+
workflow_output:
|
|
352
|
+
- path: intent
|
|
353
|
+
equals: "code_help"
|
|
354
|
+
- path: topic
|
|
355
|
+
equals: "How does auth work?"
|
|
356
|
+
- path: tags
|
|
357
|
+
contains: "codebase"
|
|
358
|
+
- path: tags
|
|
359
|
+
contains: "security"
|
|
360
|
+
|
|
361
|
+
- name: explicit-percent-intent
|
|
362
|
+
description: "%intent marker should set the intent directly"
|
|
363
|
+
event: manual
|
|
364
|
+
fixture: local.minimal
|
|
365
|
+
workflow_input:
|
|
366
|
+
question: "What is this code doing? %code_help"
|
|
367
|
+
intents:
|
|
368
|
+
- id: chat
|
|
369
|
+
description: general Q&A
|
|
370
|
+
- id: code_help
|
|
371
|
+
description: questions about code or implementation details
|
|
372
|
+
mocks:
|
|
373
|
+
classify:
|
|
374
|
+
intent: code_help
|
|
375
|
+
topic: "What is this code doing?"
|
|
376
|
+
tags: []
|
|
377
|
+
expect:
|
|
378
|
+
calls:
|
|
379
|
+
- step: classify
|
|
380
|
+
exactly: 1
|
|
381
|
+
workflow_output:
|
|
382
|
+
- path: intent
|
|
383
|
+
equals: "code_help"
|
|
384
|
+
- path: topic
|
|
385
|
+
equals: "What is this code doing?"
|
|
386
|
+
|
|
387
|
+
- name: invalid-percent-intent
|
|
388
|
+
description: "Invalid %intent should return an error in rationale and pick closest intent"
|
|
389
|
+
event: manual
|
|
390
|
+
fixture: local.minimal
|
|
391
|
+
workflow_input:
|
|
392
|
+
question: "How do I deploy? %nonexistent_intent"
|
|
393
|
+
intents:
|
|
394
|
+
- id: chat
|
|
395
|
+
description: general Q&A
|
|
396
|
+
- id: code_help
|
|
397
|
+
description: questions about code or implementation details
|
|
398
|
+
mocks:
|
|
399
|
+
classify:
|
|
400
|
+
intent: "chat"
|
|
401
|
+
topic: "How do I deploy?"
|
|
402
|
+
tags: []
|
|
403
|
+
rationale: "ERROR: explicit intent 'nonexistent_intent' not found, using closest match 'chat'"
|
|
404
|
+
expect:
|
|
405
|
+
calls:
|
|
406
|
+
- step: classify
|
|
407
|
+
exactly: 1
|
|
408
|
+
workflow_output:
|
|
409
|
+
- path: intent
|
|
410
|
+
equals: "chat"
|
|
411
|
+
- path: error
|
|
412
|
+
contains: "ERROR:"
|
|
413
|
+
|
|
414
|
+
- name: skills-based-classification
|
|
415
|
+
description: "Skills replace tags for unified classification"
|
|
416
|
+
event: manual
|
|
417
|
+
fixture: local.minimal
|
|
418
|
+
workflow_input:
|
|
419
|
+
question: "Get ticket TT-123 and create a PR to fix it"
|
|
420
|
+
intents:
|
|
421
|
+
- id: chat
|
|
422
|
+
description: general Q&A
|
|
423
|
+
- id: code_help
|
|
424
|
+
description: questions about code or implementation
|
|
425
|
+
skills:
|
|
426
|
+
- id: jira
|
|
427
|
+
description: request references Jira tickets
|
|
428
|
+
- id: engineer
|
|
429
|
+
description: user wants code changes or PR created
|
|
430
|
+
- id: code-explorer
|
|
431
|
+
description: needs codebase exploration
|
|
432
|
+
mocks:
|
|
433
|
+
classify:
|
|
434
|
+
intent: code_help
|
|
435
|
+
topic: "Fix ticket TT-123 and create a PR?"
|
|
436
|
+
skills: ["jira", "engineer"]
|
|
437
|
+
expect:
|
|
438
|
+
calls:
|
|
439
|
+
- step: classify
|
|
440
|
+
exactly: 1
|
|
441
|
+
workflow_output:
|
|
442
|
+
- path: intent
|
|
443
|
+
equals: "code_help"
|
|
444
|
+
- path: skills
|
|
445
|
+
contains: "jira"
|
|
446
|
+
- path: skills
|
|
447
|
+
contains: "engineer"
|
|
448
|
+
|
|
449
|
+
- name: skills-no-tags-fallback
|
|
450
|
+
description: "Skills mode outputs skills, not tags"
|
|
451
|
+
event: manual
|
|
452
|
+
fixture: local.minimal
|
|
453
|
+
workflow_input:
|
|
454
|
+
question: "Create a Jira ticket for this bug"
|
|
455
|
+
intents:
|
|
456
|
+
- id: chat
|
|
457
|
+
description: general Q&A
|
|
458
|
+
skills:
|
|
459
|
+
- id: jira
|
|
460
|
+
description: request references Jira tickets
|
|
461
|
+
- id: jira-creation
|
|
462
|
+
description: user wants to create or modify a Jira ticket
|
|
463
|
+
mocks:
|
|
464
|
+
classify:
|
|
465
|
+
intent: chat
|
|
466
|
+
topic: "Create a Jira ticket for this bug?"
|
|
467
|
+
skills: ["jira", "jira-creation"]
|
|
468
|
+
expect:
|
|
469
|
+
calls:
|
|
470
|
+
- step: classify
|
|
471
|
+
exactly: 1
|
|
472
|
+
workflow_output:
|
|
473
|
+
- path: intent
|
|
474
|
+
equals: "chat"
|
|
475
|
+
- path: skills
|
|
476
|
+
contains: "jira"
|
|
477
|
+
- path: skills
|
|
478
|
+
contains: "jira-creation"
|