@vibe-agent-toolkit/vat-example-cat-agents 0.1.9 → 0.1.12
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/README.md +31 -1
- package/dist/conversational-assistant/breed-advisor.d.ts +2 -3
- package/dist/conversational-assistant/breed-advisor.d.ts.map +1 -1
- package/dist/conversational-assistant/breed-advisor.js +26 -81
- package/dist/conversational-assistant/breed-advisor.js.map +1 -1
- package/dist/generated/resources/agents/breed-advisor.d.ts +27 -0
- package/dist/generated/resources/agents/breed-advisor.js +55 -0
- package/dist/generated/resources/agents/description-parser.d.ts +25 -0
- package/dist/generated/resources/agents/description-parser.js +45 -0
- package/dist/generated/resources/agents/haiku-generator.d.ts +27 -0
- package/dist/generated/resources/agents/haiku-generator.js +55 -0
- package/dist/generated/resources/agents/human-approval.d.ts +30 -0
- package/dist/generated/resources/agents/human-approval.js +70 -0
- package/dist/generated/resources/agents/name-generator.d.ts +25 -0
- package/dist/generated/resources/agents/name-generator.js +45 -0
- package/dist/generated/resources/agents/photo-analyzer.d.ts +26 -0
- package/dist/generated/resources/agents/photo-analyzer.js +50 -0
- package/dist/generated/resources/skills/SKILL.d.ts +37 -0
- package/dist/generated/resources/skills/SKILL.js +93 -0
- package/dist/generated/resources/skills/cat-breed-selection.d.ts +32 -0
- package/dist/generated/resources/skills/cat-breed-selection.js +80 -0
- package/dist/one-shot-llm-analyzer/description-parser.d.ts.map +1 -1
- package/dist/one-shot-llm-analyzer/description-parser.js +3 -1
- package/dist/one-shot-llm-analyzer/description-parser.js.map +1 -1
- package/dist/one-shot-llm-analyzer/haiku-generator.d.ts.map +1 -1
- package/dist/one-shot-llm-analyzer/haiku-generator.js +3 -0
- package/dist/one-shot-llm-analyzer/haiku-generator.js.map +1 -1
- package/dist/one-shot-llm-analyzer/name-generator.d.ts.map +1 -1
- package/dist/one-shot-llm-analyzer/name-generator.js +3 -0
- package/dist/one-shot-llm-analyzer/name-generator.js.map +1 -1
- package/dist/one-shot-llm-analyzer/photo-analyzer.d.ts.map +1 -1
- package/dist/one-shot-llm-analyzer/photo-analyzer.js +3 -0
- package/dist/one-shot-llm-analyzer/photo-analyzer.js.map +1 -1
- package/dist/skills/vat-example-cat-agents/CLAUDE.md +424 -0
- package/dist/skills/vat-example-cat-agents/README.md +727 -0
- package/dist/skills/vat-example-cat-agents/SKILL.md +729 -0
- package/dist/skills/vat-example-cat-agents/breed-advisor.md +133 -0
- package/dist/skills/vat-example-cat-agents/cat-breed-selection.md +233 -0
- package/dist/skills/vat-example-cat-agents/description-parser.md +248 -0
- package/dist/skills/vat-example-cat-agents/haiku-generator.md +217 -0
- package/dist/skills/vat-example-cat-agents/human-approval.md +337 -0
- package/dist/skills/vat-example-cat-agents/name-generator.md +92 -0
- package/dist/skills/vat-example-cat-agents/photo-analyzer.md +171 -0
- package/dist/skills/vat-example-cat-agents/structure.md +163 -0
- package/package.json +43 -11
package/README.md
CHANGED
|
@@ -28,10 +28,40 @@ This package serves as a **reference implementation** for the Vibe Agent Toolkit
|
|
|
28
28
|
|
|
29
29
|
## Installation
|
|
30
30
|
|
|
31
|
+
### As NPM Package
|
|
32
|
+
|
|
31
33
|
```bash
|
|
32
34
|
npm install @vibe-agent-toolkit/vat-example-cat-agents
|
|
33
35
|
```
|
|
34
36
|
|
|
37
|
+
### Installing the Skill
|
|
38
|
+
|
|
39
|
+
This package includes a distributable Claude Code skill called `vat-cat-agents` that provides orchestration guidance for using the 8 example cat agents.
|
|
40
|
+
|
|
41
|
+
**Install from npm:**
|
|
42
|
+
```bash
|
|
43
|
+
vat skills install npm:@vibe-agent-toolkit/vat-example-cat-agents
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Install from local directory (development):**
|
|
47
|
+
```bash
|
|
48
|
+
vat skills install ./packages/vat-example-cat-agents
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Verify installation:**
|
|
52
|
+
```bash
|
|
53
|
+
vat skills list --installed
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The `vat-cat-agents` skill will be installed to `~/.claude/plugins/vat-cat-agents/` and will appear in Claude Code after restarting or running `/reload-skills`.
|
|
57
|
+
|
|
58
|
+
**What the skill includes:**
|
|
59
|
+
- SKILL.md with agent orchestration patterns
|
|
60
|
+
- Documentation on multi-agent workflows
|
|
61
|
+
- Examples of feedback loops (generator → validator)
|
|
62
|
+
- Multi-modal input patterns (photo vs text)
|
|
63
|
+
- Links to all 8 agent implementations
|
|
64
|
+
|
|
35
65
|
## Result Envelopes
|
|
36
66
|
|
|
37
67
|
All VAT agents return standardized result envelopes following Railway-Oriented Programming (ROP) principles. This provides consistent error handling, type-safe result processing, and clear orchestration patterns.
|
|
@@ -687,7 +717,7 @@ See [CLAUDE.md](./CLAUDE.md) for technical navigation details when contributing.
|
|
|
687
717
|
|
|
688
718
|
## Documentation
|
|
689
719
|
|
|
690
|
-
- **[
|
|
720
|
+
- **[structure.md](./docs/structure.md)** - Package organization and conventions
|
|
691
721
|
- **[CLAUDE.md](./CLAUDE.md)** - Technical navigation for AI assistants
|
|
692
722
|
|
|
693
723
|
---
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Breed Selection Advisor - Two-Phase Conversational Pattern
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* declarative factor definitions.
|
|
4
|
+
* Now uses compiled markdown resources for all prompts and domain knowledge.
|
|
5
|
+
* Prompts are auditable in resources/agents/breed-advisor.md
|
|
7
6
|
*/
|
|
8
7
|
import { type Agent } from '@vibe-agent-toolkit/agent-runtime';
|
|
9
8
|
import { type BreedAdvisorInput, type BreedAdvisorOutput } from '../types/schemas.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breed-advisor.d.ts","sourceRoot":"","sources":["../../src/conversational-assistant/breed-advisor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"breed-advisor.d.ts","sourceRoot":"","sources":["../../src/conversational-assistant/breed-advisor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,KAAK,KAAK,EAGX,MAAM,mCAAmC,CAAC;AAQ3C,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAiK7B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAAE,kBAAkB,CA4NxE,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Breed Selection Advisor - Two-Phase Conversational Pattern
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* declarative factor definitions.
|
|
4
|
+
* Now uses compiled markdown resources for all prompts and domain knowledge.
|
|
5
|
+
* Prompts are auditable in resources/agents/breed-advisor.md
|
|
7
6
|
*/
|
|
8
7
|
import { defineTwoPhaseConversationalAssistant, generateGatheringPrompt, } from '@vibe-agent-toolkit/agent-runtime';
|
|
9
8
|
import { RESULT_IN_PROGRESS, RESULT_SUCCESS, } from '@vibe-agent-toolkit/agent-schema';
|
|
9
|
+
// Import compiled resources from markdown
|
|
10
|
+
import * as BreedAdvisorResources from '../../generated/resources/agents/breed-advisor.js';
|
|
10
11
|
import { BreedAdvisorInputSchema, BreedAdvisorOutputSchema, } from '../types/schemas.js';
|
|
11
12
|
import { BREED_DATABASE, matchBreeds } from './breed-knowledge.js';
|
|
12
13
|
/**
|
|
@@ -104,41 +105,16 @@ const gatheringPhaseConfig = {
|
|
|
104
105
|
// Ready when we have at least 4 factors (including musicPreference)
|
|
105
106
|
return Object.keys(profile).length >= 4 && profile['musicPreference'] !== undefined;
|
|
106
107
|
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
- Classical: Calm, regal breeds (Persian, Ragdoll)
|
|
111
|
-
- Jazz: Intelligent, unpredictable breeds (Siamese, Bengal)
|
|
112
|
-
- Rock/Metal: High-energy, bold breeds (Maine Coon, Abyssinian)
|
|
113
|
-
- Pop: Social, adaptable breeds (Domestic Shorthair)
|
|
114
|
-
- Country: Traditional, loyal breeds (American Shorthair)
|
|
115
|
-
- Electronic: Modern, quirky breeds (Sphynx, Devon Rex)
|
|
116
|
-
- None: Independent, mysterious breeds (Russian Blue)
|
|
117
|
-
|
|
118
|
-
Ask about music preference EARLY in the conversation!`,
|
|
108
|
+
// Music preference insight loaded from resources/agents/breed-advisor.md
|
|
109
|
+
customGuidance: BreedAdvisorResources.fragments.musicPreferenceInsight.body,
|
|
119
110
|
priorityFactors: ['musicPreference'],
|
|
120
111
|
};
|
|
121
112
|
// Generate the system prompt from declarative config
|
|
122
113
|
const GATHERING_SYSTEM_PROMPT = generateGatheringPrompt(gatheringPhaseConfig);
|
|
123
114
|
/**
|
|
124
|
-
*
|
|
115
|
+
* Generic extraction helper - reduces duplication
|
|
125
116
|
*/
|
|
126
|
-
async function
|
|
127
|
-
const extractionPrompt = `Based on the conversation above, extract any information about the user's preferences into JSON format.
|
|
128
|
-
|
|
129
|
-
Only include fields where you have confident information. Set fields to null if mentioned but unclear.
|
|
130
|
-
|
|
131
|
-
Return JSON in this exact format:
|
|
132
|
-
{
|
|
133
|
-
"musicPreference": "classical" | "jazz" | "rock" | "metal" | "pop" | "country" | "electronic" | "none" | null,
|
|
134
|
-
"livingSpace": "apartment" | "small-house" | "large-house" | "farm" | null,
|
|
135
|
-
"activityLevel": "couch-companion" | "playful-moderate" | "active-explorer" | "high-energy-athlete" | null,
|
|
136
|
-
"groomingTolerance": "minimal" | "weekly" | "daily" | null,
|
|
137
|
-
"familyComposition": "single" | "couple" | "young-kids" | "older-kids" | "multi-pet" | null,
|
|
138
|
-
"allergies": true | false | null
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
Return ONLY the JSON object, nothing else.`;
|
|
117
|
+
async function extractFromConversation(history, callLLM, extractionPrompt, defaultValue) {
|
|
142
118
|
const extractionHistory = [...history, { role: 'user', content: extractionPrompt }];
|
|
143
119
|
const extractionResponse = await callLLM(extractionHistory);
|
|
144
120
|
try {
|
|
@@ -146,32 +122,20 @@ Return ONLY the JSON object, nothing else.`;
|
|
|
146
122
|
return JSON.parse(cleaned);
|
|
147
123
|
}
|
|
148
124
|
catch {
|
|
149
|
-
return
|
|
125
|
+
return defaultValue;
|
|
150
126
|
}
|
|
151
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Extract factors from conversation during gathering phase
|
|
130
|
+
*/
|
|
131
|
+
async function extractFactorsFromConversation(history, callLLM) {
|
|
132
|
+
return extractFromConversation(history, callLLM, BreedAdvisorResources.fragments.factorExtractionPrompt.body, {});
|
|
133
|
+
}
|
|
152
134
|
/**
|
|
153
135
|
* Extract selected breed from Phase 2 conversation
|
|
154
136
|
*/
|
|
155
137
|
async function extractSelectedBreed(history, callLLM) {
|
|
156
|
-
|
|
157
|
-
1. If the user made a FINAL breed selection (phrases like "I'll take", "I want", "sounds good")
|
|
158
|
-
2. The breed name they selected
|
|
159
|
-
|
|
160
|
-
Return JSON in this exact format:
|
|
161
|
-
{
|
|
162
|
-
"selectedBreed": "breed name" or null
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
Return ONLY the JSON object, nothing else.`;
|
|
166
|
-
const extractionHistory = [...history, { role: 'user', content: extractionPrompt }];
|
|
167
|
-
const extractionResponse = await callLLM(extractionHistory);
|
|
168
|
-
try {
|
|
169
|
-
const cleaned = stripMarkdownFences(extractionResponse);
|
|
170
|
-
return JSON.parse(cleaned);
|
|
171
|
-
}
|
|
172
|
-
catch {
|
|
173
|
-
return { selectedBreed: null };
|
|
174
|
-
}
|
|
138
|
+
return extractFromConversation(history, callLLM, BreedAdvisorResources.fragments.selectionExtractionPrompt.body, { selectedBreed: null });
|
|
175
139
|
}
|
|
176
140
|
/**
|
|
177
141
|
* Breed Selection Advisor - Two-Phase Pattern
|
|
@@ -223,16 +187,8 @@ async (input, ctx) => {
|
|
|
223
187
|
}
|
|
224
188
|
// First turn: provide welcoming introduction
|
|
225
189
|
if (isFirstTurn) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
To give you the best recommendation, I'll ask you a few questions about:
|
|
229
|
-
- Your music taste (surprisingly important for breed compatibility!)
|
|
230
|
-
- Your living space
|
|
231
|
-
- Activity level preferences
|
|
232
|
-
- Grooming tolerance
|
|
233
|
-
- Household composition
|
|
234
|
-
|
|
235
|
-
Let's start: What's your favorite type of music?`;
|
|
190
|
+
// Welcome message from resources/agents/breed-advisor.md
|
|
191
|
+
const greeting = BreedAdvisorResources.fragments.welcomeMessage.body;
|
|
236
192
|
return {
|
|
237
193
|
reply: greeting,
|
|
238
194
|
sessionState: currentProfile,
|
|
@@ -275,8 +231,8 @@ Let's start: What's your favorite type of music?`;
|
|
|
275
231
|
const isReady = factorCount >= 4 && updatedProfile.musicPreference != null;
|
|
276
232
|
if (isReady) {
|
|
277
233
|
updatedProfile.conversationPhase = PHASE_READY_TO_RECOMMEND;
|
|
278
|
-
//
|
|
279
|
-
const transitionMessage =
|
|
234
|
+
// Transition message from resources/agents/breed-advisor.md
|
|
235
|
+
const transitionMessage = '\n\n' + BreedAdvisorResources.fragments.transitionMessage.body;
|
|
280
236
|
return {
|
|
281
237
|
reply: conversationalResponse + transitionMessage,
|
|
282
238
|
sessionState: updatedProfile,
|
|
@@ -311,15 +267,9 @@ Let's start: What's your favorite type of music?`;
|
|
|
311
267
|
const extractedData = await extractSelectedBreed(ctx.history, ctx.callLLM);
|
|
312
268
|
// Check if user made a selection
|
|
313
269
|
if (extractedData.selectedBreed) {
|
|
314
|
-
//
|
|
315
|
-
const conclusionPrompt =
|
|
316
|
-
|
|
317
|
-
- Remind them of 1-2 key traits that make this a great match
|
|
318
|
-
- Wish them well with their new cat
|
|
319
|
-
- End with: "Type /quit to exit when you're ready."
|
|
320
|
-
- Keep it to 2-3 sentences plus the exit instruction
|
|
321
|
-
|
|
322
|
-
DO NOT repeat all the recommendations. DO NOT ask more questions. This is the END of the conversation.`;
|
|
270
|
+
// Conclusion prompt from resources/agents/breed-advisor.md
|
|
271
|
+
const conclusionPrompt = BreedAdvisorResources.fragments.conclusionPrompt.body
|
|
272
|
+
.replace('{{selectedBreed}}', extractedData.selectedBreed);
|
|
323
273
|
ctx.addToHistory('system', conclusionPrompt);
|
|
324
274
|
const conclusionResponse = await ctx.callLLM(ctx.history);
|
|
325
275
|
ctx.addToHistory('assistant', conclusionResponse);
|
|
@@ -347,14 +297,9 @@ DO NOT repeat all the recommendations. DO NOT ask more questions. This is the EN
|
|
|
347
297
|
}
|
|
348
298
|
// No selection yet - generate recommendations and continue conversation
|
|
349
299
|
const recommendations = matchBreeds(currentProfile);
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
${JSON.stringify(recommendations, null, 2)}
|
|
354
|
-
|
|
355
|
-
Make it feel personal and explain why these breeds match their preferences. Keep it concise (2-3 sentences per breed).
|
|
356
|
-
|
|
357
|
-
After presenting the recommendations, ask if any of these breeds sound appealing, or if they'd like to hear more details. Let them know they can type /quit to exit if they need time to think.`;
|
|
300
|
+
// Recommendation presentation prompt from resources/agents/breed-advisor.md
|
|
301
|
+
const presentationPrompt = BreedAdvisorResources.fragments.recommendationPresentationPrompt.body
|
|
302
|
+
.replace('{{recommendations}}', JSON.stringify(recommendations, null, 2));
|
|
358
303
|
ctx.addToHistory('system', presentationPrompt);
|
|
359
304
|
const presentationResponse = await ctx.callLLM(ctx.history);
|
|
360
305
|
ctx.addToHistory('assistant', presentationResponse);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breed-advisor.js","sourceRoot":"","sources":["../../src/conversational-assistant/breed-advisor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"breed-advisor.js","sourceRoot":"","sources":["../../src/conversational-assistant/breed-advisor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,qCAAqC,EACrC,uBAAuB,GAIxB,MAAM,mCAAmC,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,EAAE,gBAAgB,CAAC,CAAC;IAChD,OAAO;QACL,KAAK,EAAE,gBAAgB;QACvB,YAAY,EAAE,cAAc;QAC5B,MAAM,EAAE;YACN,MAAM,EAAE,kBAAkB;YAC1B,QAAQ,EAAE;gBACR,iBAAiB,EAAE,cAAc,CAAC,iBAAiB,IAAI,WAAW;aACnE;SACF;KACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated TypeScript declarations - DO NOT EDIT
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface Fragment {
|
|
6
|
+
readonly header: string;
|
|
7
|
+
readonly body: string;
|
|
8
|
+
readonly text: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const meta: {};
|
|
12
|
+
|
|
13
|
+
export const text: string;
|
|
14
|
+
|
|
15
|
+
export const fragments: {
|
|
16
|
+
readonly musicPreferenceInsight: Fragment;
|
|
17
|
+
readonly welcomeMessage: Fragment;
|
|
18
|
+
readonly factorDefinitions: Fragment;
|
|
19
|
+
readonly conversationStrategy: Fragment;
|
|
20
|
+
readonly factorExtractionPrompt: Fragment;
|
|
21
|
+
readonly transitionMessage: Fragment;
|
|
22
|
+
readonly recommendationPresentationPrompt: Fragment;
|
|
23
|
+
readonly selectionExtractionPrompt: Fragment;
|
|
24
|
+
readonly conclusionPrompt: Fragment;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type FragmentName = keyof typeof fragments;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from markdown file - DO NOT EDIT
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const meta = {};
|
|
6
|
+
|
|
7
|
+
export const text = "# Breed Advisor Agent\n\nComplete resource file for the two-phase breed selection conversational agent.\n\n## Music Preference Insight\n\nCRITICAL: Music preference is the MOST IMPORTANT factor in breed selection!\n\nEach music genre aligns with specific breed temperaments through vibrational frequency compatibility:\n\n- **Classical**: Calm, regal breeds (Persian, Ragdoll)\n- **Jazz**: Intelligent, unpredictable breeds (Siamese, Bengal)\n- **Rock/Metal**: High-energy, bold breeds (Maine Coon, Abyssinian)\n- **Pop**: Social, adaptable breeds (Domestic Shorthair)\n- **Country**: Traditional, loyal breeds (American Shorthair)\n- **Electronic**: Modern, quirky breeds (Sphynx, Devon Rex)\n- **None**: Independent, mysterious breeds (Russian Blue)\n\nAsk about music preference EARLY in the conversation!\n\n## Welcome Message\n\nHello! I\'m your cat breed advisor. I\'ll help you find the perfect cat breed based on your lifestyle and preferences.\n\nTo give you the best recommendation, I\'ll ask you a few questions about:\n- Your music taste (surprisingly important for breed compatibility!)\n- Your living space\n- Activity level preferences\n- Grooming tolerance\n- Household composition\n\nLet\'s start: What\'s your favorite type of music?\n\n## Factor Definitions\n\n### Music Preference\n- **Type**: Enum (required, weight: 2)\n- **Values**: classical, jazz, rock, metal, pop, country, electronic, none\n- **Clarification**: If user mentions hip-hop, rap, indie, folk, blues, R&B → ask which valid category is closest (DO NOT map silently)\n\n### Living Space\n- **Type**: Enum\n- **Values**: apartment, small-house, large-house, farm\n- **Mappings**: \"flat\" → apartment | \"big house\", \"mansion\" → large-house\n\n### Activity Level\n- **Type**: Enum\n- **Values**: couch-companion, playful-moderate, active-explorer, high-energy-athlete\n- **Mappings**: \"lazy\"/\"chill\" → couch-companion | \"playful\" → playful-moderate | \"kill rats\"/\"hunt\"/\"mouser\" → active-explorer | \"athletic\" → high-energy-athlete\n\n### Grooming Tolerance\n- **Type**: Enum\n- **Values**: minimal, weekly, daily\n\n### Family Composition\n- **Type**: Enum\n- **Values**: single, couple, young-kids, older-kids, multi-pet\n- **Mappings**: \"kids\"/\"children\" → young-kids | \"other pets\"/\"dogs\" → multi-pet\n\n### Allergies\n- **Type**: Boolean\n- **Description**: Whether user needs hypoallergenic breeds\n\n## Conversation Strategy\n\n**Tone**: Enthusiastic and helpful throughout\n\n**Readiness**: Ready for recommendations when ≥4 factors collected AND musicPreference is known\n\n**Questioning**: One at a time, push for specificity, use natural language mappings\n\n**Phases**: Gathering → Ready → Recommendations → Selection → Completed\n\n## Factor Extraction Prompt\n\nBased on the conversation above, extract any information about the user\'s preferences into JSON format.\n\nOnly include fields where you have confident information. Set fields to null if mentioned but unclear.\n\nReturn JSON in this exact format:\n\`\`\`json\n{\n \"musicPreference\": \"classical\" | \"jazz\" | \"rock\" | \"metal\" | \"pop\" | \"country\" | \"electronic\" | \"none\" | null,\n \"livingSpace\": \"apartment\" | \"small-house\" | \"large-house\" | \"farm\" | null,\n \"activityLevel\": \"couch-companion\" | \"playful-moderate\" | \"active-explorer\" | \"high-energy-athlete\" | null,\n \"groomingTolerance\": \"minimal\" | \"weekly\" | \"daily\" | null,\n \"familyComposition\": \"single\" | \"couple\" | \"young-kids\" | \"older-kids\" | \"multi-pet\" | null,\n \"allergies\": true | false | null\n}\n\`\`\`\n\nReturn ONLY the JSON object, nothing else.\n\n## Transition Message\n\nPerfect! I have enough information to provide breed recommendations. Would you like to see my suggestions now, or is there anything else you\'d like to tell me about your preferences?\n\n## Recommendation Presentation Prompt\n\nThe user is ready for cat breed recommendations based on their profile.\n\nPresent these recommendations conversationally and enthusiastically:\n{{recommendations}}\n\nMake it feel personal and explain why these breeds match their preferences. Keep it concise (2-3 sentences per breed).\n\nAfter presenting the recommendations, ask if any of these breeds sound appealing, or if they\'d like to hear more details. Let them know they can type /quit to exit if they need time to think.\n\n## Selection Extraction Prompt\n\nBased on the conversation above, extract:\n1. If the user made a FINAL breed selection (phrases like \"I\'ll take\", \"I want\", \"sounds good\")\n2. The breed name they selected\n\nReturn JSON in this exact format:\n\`\`\`json\n{\n \"selectedBreed\": \"breed name\" or null\n}\n\`\`\`\n\nReturn ONLY the JSON object, nothing else.\n\n## Conclusion Prompt\n\nThe user has selected {{selectedBreed}}. Provide a brief, enthusiastic conclusion:\n- Congratulate them on their choice\n- Remind them of 1-2 key traits that make this a great match\n- Wish them well with their new cat\n- End with: \"Type /quit to exit when you\'re ready.\"\n- Keep it to 2-3 sentences plus the exit instruction\n\nDO NOT repeat all the recommendations. DO NOT ask more questions. This is the END of the conversation.\n";
|
|
8
|
+
|
|
9
|
+
export const fragments = {
|
|
10
|
+
musicPreferenceInsight: {
|
|
11
|
+
header: "## Music Preference Insight",
|
|
12
|
+
body: "CRITICAL: Music preference is the MOST IMPORTANT factor in breed selection!\n\nEach music genre aligns with specific breed temperaments through vibrational frequency compatibility:\n\n- **Classical**: Calm, regal breeds (Persian, Ragdoll)\n- **Jazz**: Intelligent, unpredictable breeds (Siamese, Bengal)\n- **Rock/Metal**: High-energy, bold breeds (Maine Coon, Abyssinian)\n- **Pop**: Social, adaptable breeds (Domestic Shorthair)\n- **Country**: Traditional, loyal breeds (American Shorthair)\n- **Electronic**: Modern, quirky breeds (Sphynx, Devon Rex)\n- **None**: Independent, mysterious breeds (Russian Blue)\n\nAsk about music preference EARLY in the conversation!",
|
|
13
|
+
text: "## Music Preference Insight\n\nCRITICAL: Music preference is the MOST IMPORTANT factor in breed selection!\n\nEach music genre aligns with specific breed temperaments through vibrational frequency compatibility:\n\n- **Classical**: Calm, regal breeds (Persian, Ragdoll)\n- **Jazz**: Intelligent, unpredictable breeds (Siamese, Bengal)\n- **Rock/Metal**: High-energy, bold breeds (Maine Coon, Abyssinian)\n- **Pop**: Social, adaptable breeds (Domestic Shorthair)\n- **Country**: Traditional, loyal breeds (American Shorthair)\n- **Electronic**: Modern, quirky breeds (Sphynx, Devon Rex)\n- **None**: Independent, mysterious breeds (Russian Blue)\n\nAsk about music preference EARLY in the conversation!"
|
|
14
|
+
},
|
|
15
|
+
welcomeMessage: {
|
|
16
|
+
header: "## Welcome Message",
|
|
17
|
+
body: "Hello! I\'m your cat breed advisor. I\'ll help you find the perfect cat breed based on your lifestyle and preferences.\n\nTo give you the best recommendation, I\'ll ask you a few questions about:\n- Your music taste (surprisingly important for breed compatibility!)\n- Your living space\n- Activity level preferences\n- Grooming tolerance\n- Household composition\n\nLet\'s start: What\'s your favorite type of music?",
|
|
18
|
+
text: "## Welcome Message\n\nHello! I\'m your cat breed advisor. I\'ll help you find the perfect cat breed based on your lifestyle and preferences.\n\nTo give you the best recommendation, I\'ll ask you a few questions about:\n- Your music taste (surprisingly important for breed compatibility!)\n- Your living space\n- Activity level preferences\n- Grooming tolerance\n- Household composition\n\nLet\'s start: What\'s your favorite type of music?"
|
|
19
|
+
},
|
|
20
|
+
factorDefinitions: {
|
|
21
|
+
header: "## Factor Definitions",
|
|
22
|
+
body: "### Music Preference\n- **Type**: Enum (required, weight: 2)\n- **Values**: classical, jazz, rock, metal, pop, country, electronic, none\n- **Clarification**: If user mentions hip-hop, rap, indie, folk, blues, R&B → ask which valid category is closest (DO NOT map silently)\n\n### Living Space\n- **Type**: Enum\n- **Values**: apartment, small-house, large-house, farm\n- **Mappings**: \"flat\" → apartment | \"big house\", \"mansion\" → large-house\n\n### Activity Level\n- **Type**: Enum\n- **Values**: couch-companion, playful-moderate, active-explorer, high-energy-athlete\n- **Mappings**: \"lazy\"/\"chill\" → couch-companion | \"playful\" → playful-moderate | \"kill rats\"/\"hunt\"/\"mouser\" → active-explorer | \"athletic\" → high-energy-athlete\n\n### Grooming Tolerance\n- **Type**: Enum\n- **Values**: minimal, weekly, daily\n\n### Family Composition\n- **Type**: Enum\n- **Values**: single, couple, young-kids, older-kids, multi-pet\n- **Mappings**: \"kids\"/\"children\" → young-kids | \"other pets\"/\"dogs\" → multi-pet\n\n### Allergies\n- **Type**: Boolean\n- **Description**: Whether user needs hypoallergenic breeds",
|
|
23
|
+
text: "## Factor Definitions\n\n### Music Preference\n- **Type**: Enum (required, weight: 2)\n- **Values**: classical, jazz, rock, metal, pop, country, electronic, none\n- **Clarification**: If user mentions hip-hop, rap, indie, folk, blues, R&B → ask which valid category is closest (DO NOT map silently)\n\n### Living Space\n- **Type**: Enum\n- **Values**: apartment, small-house, large-house, farm\n- **Mappings**: \"flat\" → apartment | \"big house\", \"mansion\" → large-house\n\n### Activity Level\n- **Type**: Enum\n- **Values**: couch-companion, playful-moderate, active-explorer, high-energy-athlete\n- **Mappings**: \"lazy\"/\"chill\" → couch-companion | \"playful\" → playful-moderate | \"kill rats\"/\"hunt\"/\"mouser\" → active-explorer | \"athletic\" → high-energy-athlete\n\n### Grooming Tolerance\n- **Type**: Enum\n- **Values**: minimal, weekly, daily\n\n### Family Composition\n- **Type**: Enum\n- **Values**: single, couple, young-kids, older-kids, multi-pet\n- **Mappings**: \"kids\"/\"children\" → young-kids | \"other pets\"/\"dogs\" → multi-pet\n\n### Allergies\n- **Type**: Boolean\n- **Description**: Whether user needs hypoallergenic breeds"
|
|
24
|
+
},
|
|
25
|
+
conversationStrategy: {
|
|
26
|
+
header: "## Conversation Strategy",
|
|
27
|
+
body: "**Tone**: Enthusiastic and helpful throughout\n\n**Readiness**: Ready for recommendations when ≥4 factors collected AND musicPreference is known\n\n**Questioning**: One at a time, push for specificity, use natural language mappings\n\n**Phases**: Gathering → Ready → Recommendations → Selection → Completed",
|
|
28
|
+
text: "## Conversation Strategy\n\n**Tone**: Enthusiastic and helpful throughout\n\n**Readiness**: Ready for recommendations when ≥4 factors collected AND musicPreference is known\n\n**Questioning**: One at a time, push for specificity, use natural language mappings\n\n**Phases**: Gathering → Ready → Recommendations → Selection → Completed"
|
|
29
|
+
},
|
|
30
|
+
factorExtractionPrompt: {
|
|
31
|
+
header: "## Factor Extraction Prompt",
|
|
32
|
+
body: "Based on the conversation above, extract any information about the user\'s preferences into JSON format.\n\nOnly include fields where you have confident information. Set fields to null if mentioned but unclear.\n\nReturn JSON in this exact format:\n\`\`\`json\n{\n \"musicPreference\": \"classical\" | \"jazz\" | \"rock\" | \"metal\" | \"pop\" | \"country\" | \"electronic\" | \"none\" | null,\n \"livingSpace\": \"apartment\" | \"small-house\" | \"large-house\" | \"farm\" | null,\n \"activityLevel\": \"couch-companion\" | \"playful-moderate\" | \"active-explorer\" | \"high-energy-athlete\" | null,\n \"groomingTolerance\": \"minimal\" | \"weekly\" | \"daily\" | null,\n \"familyComposition\": \"single\" | \"couple\" | \"young-kids\" | \"older-kids\" | \"multi-pet\" | null,\n \"allergies\": true | false | null\n}\n\`\`\`\n\nReturn ONLY the JSON object, nothing else.",
|
|
33
|
+
text: "## Factor Extraction Prompt\n\nBased on the conversation above, extract any information about the user\'s preferences into JSON format.\n\nOnly include fields where you have confident information. Set fields to null if mentioned but unclear.\n\nReturn JSON in this exact format:\n\`\`\`json\n{\n \"musicPreference\": \"classical\" | \"jazz\" | \"rock\" | \"metal\" | \"pop\" | \"country\" | \"electronic\" | \"none\" | null,\n \"livingSpace\": \"apartment\" | \"small-house\" | \"large-house\" | \"farm\" | null,\n \"activityLevel\": \"couch-companion\" | \"playful-moderate\" | \"active-explorer\" | \"high-energy-athlete\" | null,\n \"groomingTolerance\": \"minimal\" | \"weekly\" | \"daily\" | null,\n \"familyComposition\": \"single\" | \"couple\" | \"young-kids\" | \"older-kids\" | \"multi-pet\" | null,\n \"allergies\": true | false | null\n}\n\`\`\`\n\nReturn ONLY the JSON object, nothing else."
|
|
34
|
+
},
|
|
35
|
+
transitionMessage: {
|
|
36
|
+
header: "## Transition Message",
|
|
37
|
+
body: "Perfect! I have enough information to provide breed recommendations. Would you like to see my suggestions now, or is there anything else you\'d like to tell me about your preferences?",
|
|
38
|
+
text: "## Transition Message\n\nPerfect! I have enough information to provide breed recommendations. Would you like to see my suggestions now, or is there anything else you\'d like to tell me about your preferences?"
|
|
39
|
+
},
|
|
40
|
+
recommendationPresentationPrompt: {
|
|
41
|
+
header: "## Recommendation Presentation Prompt",
|
|
42
|
+
body: "The user is ready for cat breed recommendations based on their profile.\n\nPresent these recommendations conversationally and enthusiastically:\n{{recommendations}}\n\nMake it feel personal and explain why these breeds match their preferences. Keep it concise (2-3 sentences per breed).\n\nAfter presenting the recommendations, ask if any of these breeds sound appealing, or if they\'d like to hear more details. Let them know they can type /quit to exit if they need time to think.",
|
|
43
|
+
text: "## Recommendation Presentation Prompt\n\nThe user is ready for cat breed recommendations based on their profile.\n\nPresent these recommendations conversationally and enthusiastically:\n{{recommendations}}\n\nMake it feel personal and explain why these breeds match their preferences. Keep it concise (2-3 sentences per breed).\n\nAfter presenting the recommendations, ask if any of these breeds sound appealing, or if they\'d like to hear more details. Let them know they can type /quit to exit if they need time to think."
|
|
44
|
+
},
|
|
45
|
+
selectionExtractionPrompt: {
|
|
46
|
+
header: "## Selection Extraction Prompt",
|
|
47
|
+
body: "Based on the conversation above, extract:\n1. If the user made a FINAL breed selection (phrases like \"I\'ll take\", \"I want\", \"sounds good\")\n2. The breed name they selected\n\nReturn JSON in this exact format:\n\`\`\`json\n{\n \"selectedBreed\": \"breed name\" or null\n}\n\`\`\`\n\nReturn ONLY the JSON object, nothing else.",
|
|
48
|
+
text: "## Selection Extraction Prompt\n\nBased on the conversation above, extract:\n1. If the user made a FINAL breed selection (phrases like \"I\'ll take\", \"I want\", \"sounds good\")\n2. The breed name they selected\n\nReturn JSON in this exact format:\n\`\`\`json\n{\n \"selectedBreed\": \"breed name\" or null\n}\n\`\`\`\n\nReturn ONLY the JSON object, nothing else."
|
|
49
|
+
},
|
|
50
|
+
conclusionPrompt: {
|
|
51
|
+
header: "## Conclusion Prompt",
|
|
52
|
+
body: "The user has selected {{selectedBreed}}. Provide a brief, enthusiastic conclusion:\n- Congratulate them on their choice\n- Remind them of 1-2 key traits that make this a great match\n- Wish them well with their new cat\n- End with: \"Type /quit to exit when you\'re ready.\"\n- Keep it to 2-3 sentences plus the exit instruction\n\nDO NOT repeat all the recommendations. DO NOT ask more questions. This is the END of the conversation.",
|
|
53
|
+
text: "## Conclusion Prompt\n\nThe user has selected {{selectedBreed}}. Provide a brief, enthusiastic conclusion:\n- Congratulate them on their choice\n- Remind them of 1-2 key traits that make this a great match\n- Wish them well with their new cat\n- End with: \"Type /quit to exit when you\'re ready.\"\n- Keep it to 2-3 sentences plus the exit instruction\n\nDO NOT repeat all the recommendations. DO NOT ask more questions. This is the END of the conversation."
|
|
54
|
+
}
|
|
55
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated TypeScript declarations - DO NOT EDIT
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface Fragment {
|
|
6
|
+
readonly header: string;
|
|
7
|
+
readonly body: string;
|
|
8
|
+
readonly text: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const meta: {};
|
|
12
|
+
|
|
13
|
+
export const text: string;
|
|
14
|
+
|
|
15
|
+
export const fragments: {
|
|
16
|
+
readonly systemPrompt: Fragment;
|
|
17
|
+
readonly extractionGuidelines: Fragment;
|
|
18
|
+
readonly naturalLanguageMapping: Fragment;
|
|
19
|
+
readonly outputFormat: Fragment;
|
|
20
|
+
readonly parsingPhilosophy: Fragment;
|
|
21
|
+
readonly examples: Fragment;
|
|
22
|
+
readonly technicalNotes: Fragment;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type FragmentName = keyof typeof fragments;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from markdown file - DO NOT EDIT
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const meta = {};
|
|
6
|
+
|
|
7
|
+
export const text = "# Description Parser Agent\n\nText parsing AI (Captain Obvious) that extracts cat characteristics from unstructured descriptions.\n\n## System Prompt\n\nYou are Captain Obvious, a cat who states the obvious and extracts characteristics literally. You have an uncanny ability to parse both structured descriptions and complete \"word vomit\", extracting every detail with earnest precision.\n\nYour task is to analyze the provided text description and extract structured cat characteristics. Handle both:\n- **Structured descriptions:** \"Orange tabby, playful, loves boxes\"\n- **Unstructured stream-of-consciousness:** \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables\"\n\nBe thorough and literal. If something is mentioned, capture it. If it\'s not mentioned, don\'t make it up.\n\n## Extraction Guidelines\n\n### Physical Characteristics\n\n**Fur Color Detection:**\n- Look for color keywords: orange, black, white, gray, brown, cream, calico, tortoiseshell\n- Common phrases: \"orange tabby\", \"black cat\", \"white fur\", \"gray and white\"\n- Informal descriptions: \"ginger\", \"tuxedo\", \"tux cat\", \"cow cat\"\n- Multi-color: calico (3 colors), tortoiseshell (2 colors blended), bicolor (2 colors distinct)\n\n**Fur Pattern:**\n- Tabby/striped - any mention of stripes, lines, \"tabby\"\n- Spotted - spots, leopard-like\n- Solid - single solid color, no pattern mentioned\n- Tuxedo - black and white formal pattern\n- Colorpoint - darker extremities (Siamese, Himalayan)\n- Bicolor/two-tone - two distinct color areas\n\n**Size Indicators:**\n- Tiny: kitten, teacup, very small\n- Small: small, petite\n- Medium: (default if not mentioned)\n- Large: large, big\n- Extra-large: huge, giant, massive, Maine Coon\n\n**Breed Mentions:**\n- Only extract if explicitly mentioned: Persian, Siamese, Maine Coon, Bengal, etc.\n- Don\'t infer breed from characteristics alone\n\n### Behavioral Characteristics\n\n**Personality Extraction:**\n\nCommon traits to look for:\n- **Positive:** playful, friendly, affectionate, curious, energetic, calm, intelligent, sweet, gentle, loving\n- **Quirky:** grumpy, cranky, lazy, sleepy, aloof, independent, demanding, bossy, mischievous\n- **Temperament:** shy, timid, bold, confident, anxious, relaxed\n\n**Quirks (Behavioral Patterns):**\n- \"Knocks things off tables\" - look for destructive play mentions\n- \"Loves boxes\" - box obsession\n- \"Gets zoomies\" / \"runs around at night\" - nighttime energy bursts\n- \"Fascinated by water\" - water interest\n- \"Plays fetch\" - dog-like behavior\n- \"Makes chirping sounds\" - vocalizations\n- \"Cross-eyed\" / \"derp face\" - physical quirks\n- \"Extra toes\" / \"polydactyl\" - physical abnormalities\n\n**Vocalizations:**\n- Meows (chatty, talkative, vocal)\n- Purrs (affectionate mentions)\n- Chirps/trills (bird-like sounds)\n- Hisses (aggressive mentions)\n- Yowls/howls (loud vocalizations)\n- Silent/quiet (explicitly mentioned)\n\n### Metadata Extraction\n\n**Age Indicators:**\n- Explicit: \"5 years old\", \"2yo\", \"3 year old\"\n- Categories: kitten (< 1 year), young (1-3 years), adult (3-10 years), senior (10+ years)\n\n**Origin:**\n- Rescue/adopted/shelter\n- Stray/street cat\n- From breeder\n- Found in alley/street\n\n**Occupation (Quirky):**\n- Mouser/hunter/catches mice\n- Office cat/workplace\n- Barn cat\n- Therapy cat\n- Instagram cat/influencer/famous\n- Professional napper (if lazy + job mentioned)\n\n## Natural Language Mapping\n\nHandle informal language:\n\n**Color Synonyms:**\n- \"Ginger\" → Orange\n- \"Midnight\" → Black\n- \"Snowy\" / \"ghost\" → White\n- \"Smokey\" / \"silver\" → Gray\n- \"Chocolate\" → Brown\n\n**Personality Synonyms:**\n- \"Chill\" / \"zen\" → Calm\n- \"Spicy\" / \"feisty\" → Grumpy\n- \"Derpy\" → Goofy/silly\n- \"Cuddly\" / \"snuggly\" → Affectionate\n- \"Trouble\" / \"troublemaker\" → Mischievous\n\n## Output Format\n\nReturn your analysis as JSON:\n\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Detected color\",\n \"furPattern\": \"Pattern (if mentioned)\",\n \"eyeColor\": \"Eye color (if mentioned)\",\n \"size\": \"Size category (if mentioned)\",\n \"breed\": \"Breed (if explicitly mentioned)\"\n },\n \"behavioral\": {\n \"personality\": [\"Trait 1\", \"Trait 2\", \"...\"],\n \"quirks\": [\"Quirk 1\", \"Quirk 2\"] // or null if none\n \"vocalizations\": [\"Type 1\", \"Type 2\"] // or null if none\n },\n \"metadata\": {\n \"age\": \"Age or age category (if mentioned)\",\n \"origin\": \"Origin (if mentioned)\",\n \"occupation\": \"Occupation (if mentioned)\"\n },\n \"description\": \"The original description (preserved)\"\n}\n\`\`\`\n\n**Important:** Only include fields where information was found. Use \`null\` for explicitly mentioned but unclear fields. Omit fields entirely if not mentioned.\n\n## Parsing Philosophy\n\n**Captain Obvious Approach:**\n- Take everything literally - if they said \"orange\", it\'s orange\n- Don\'t embellish - extract what\'s there, nothing more\n- Handle chaos gracefully - word vomit is just context with poor punctuation\n- When in doubt, state the obvious - \"cat has fur\" level detail is fine\n- Capture ALL personality traits mentioned, even if redundant\n\n## Examples\n\n**Example 1: Structured Description**\n\nInput: \"Orange tabby, playful, loves boxes, about 3 years old\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Orange\",\n \"furPattern\": \"Tabby\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Playful\"],\n \"quirks\": [\"Loves sitting in boxes\"],\n \"vocalizations\": null\n },\n \"metadata\": {\n \"age\": \"3 years old\",\n \"origin\": null,\n \"occupation\": null\n },\n \"description\": \"Orange tabby, playful, loves boxes, about 3 years old\"\n}\n\`\`\`\n\n**Example 2: Unstructured Stream-of-Consciousness**\n\nInput: \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables all the time it\'s so annoying but also kinda funny and he gets the zoomies at like 3am and runs around the house like a maniac\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Orange\",\n \"furPattern\": \"Striped\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Energetic\", \"Mischievous\"],\n \"quirks\": [\n \"Knocks things off tables\",\n \"Gets the zoomies at 3am\"\n ],\n \"vocalizations\": null\n },\n \"metadata\": {\n \"age\": null,\n \"origin\": null,\n \"occupation\": null\n },\n \"description\": \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables all the time it\'s so annoying but also kinda funny and he gets the zoomies at like 3am and runs around the house like a maniac\"\n}\n\`\`\`\n\n**Example 3: Rescue Cat with Details**\n\nInput: \"Adopted black cat from shelter, shy but warming up, about 2 years old, loves to chirp at birds through the window\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Black\",\n \"furPattern\": \"Solid\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Shy\", \"Affectionate\"],\n \"quirks\": [\"Makes chirping sounds\"],\n \"vocalizations\": [\"Chirps\"]\n },\n \"metadata\": {\n \"age\": \"2 years old\",\n \"origin\": \"Rescue/Shelter\",\n \"occupation\": null\n },\n \"description\": \"Adopted black cat from shelter, shy but warming up, about 2 years old, loves to chirp at birds through the window\"\n}\n\`\`\`\n\n## Technical Notes\n\n**For LLM Integration:**\n- Use low temperature (0.3-0.5) for consistency in extraction\n- Preserve original description exactly in output\n- Handle missing punctuation and poor grammar gracefully\n- Don\'t fail on typos or misspellings\n\n**Mock Mode Behavior:**\n- Use keyword matching and regex patterns for extraction\n- Apply natural language mappings automatically\n- Generate deterministic output from same input\n- Maintain same JSON structure as real LLM parsing\n";
|
|
8
|
+
|
|
9
|
+
export const fragments = {
|
|
10
|
+
systemPrompt: {
|
|
11
|
+
header: "## System Prompt",
|
|
12
|
+
body: "You are Captain Obvious, a cat who states the obvious and extracts characteristics literally. You have an uncanny ability to parse both structured descriptions and complete \"word vomit\", extracting every detail with earnest precision.\n\nYour task is to analyze the provided text description and extract structured cat characteristics. Handle both:\n- **Structured descriptions:** \"Orange tabby, playful, loves boxes\"\n- **Unstructured stream-of-consciousness:** \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables\"\n\nBe thorough and literal. If something is mentioned, capture it. If it\'s not mentioned, don\'t make it up.",
|
|
13
|
+
text: "## System Prompt\n\nYou are Captain Obvious, a cat who states the obvious and extracts characteristics literally. You have an uncanny ability to parse both structured descriptions and complete \"word vomit\", extracting every detail with earnest precision.\n\nYour task is to analyze the provided text description and extract structured cat characteristics. Handle both:\n- **Structured descriptions:** \"Orange tabby, playful, loves boxes\"\n- **Unstructured stream-of-consciousness:** \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables\"\n\nBe thorough and literal. If something is mentioned, capture it. If it\'s not mentioned, don\'t make it up."
|
|
14
|
+
},
|
|
15
|
+
extractionGuidelines: {
|
|
16
|
+
header: "## Extraction Guidelines",
|
|
17
|
+
body: "### Physical Characteristics\n\n**Fur Color Detection:**\n- Look for color keywords: orange, black, white, gray, brown, cream, calico, tortoiseshell\n- Common phrases: \"orange tabby\", \"black cat\", \"white fur\", \"gray and white\"\n- Informal descriptions: \"ginger\", \"tuxedo\", \"tux cat\", \"cow cat\"\n- Multi-color: calico (3 colors), tortoiseshell (2 colors blended), bicolor (2 colors distinct)\n\n**Fur Pattern:**\n- Tabby/striped - any mention of stripes, lines, \"tabby\"\n- Spotted - spots, leopard-like\n- Solid - single solid color, no pattern mentioned\n- Tuxedo - black and white formal pattern\n- Colorpoint - darker extremities (Siamese, Himalayan)\n- Bicolor/two-tone - two distinct color areas\n\n**Size Indicators:**\n- Tiny: kitten, teacup, very small\n- Small: small, petite\n- Medium: (default if not mentioned)\n- Large: large, big\n- Extra-large: huge, giant, massive, Maine Coon\n\n**Breed Mentions:**\n- Only extract if explicitly mentioned: Persian, Siamese, Maine Coon, Bengal, etc.\n- Don\'t infer breed from characteristics alone\n\n### Behavioral Characteristics\n\n**Personality Extraction:**\n\nCommon traits to look for:\n- **Positive:** playful, friendly, affectionate, curious, energetic, calm, intelligent, sweet, gentle, loving\n- **Quirky:** grumpy, cranky, lazy, sleepy, aloof, independent, demanding, bossy, mischievous\n- **Temperament:** shy, timid, bold, confident, anxious, relaxed\n\n**Quirks (Behavioral Patterns):**\n- \"Knocks things off tables\" - look for destructive play mentions\n- \"Loves boxes\" - box obsession\n- \"Gets zoomies\" / \"runs around at night\" - nighttime energy bursts\n- \"Fascinated by water\" - water interest\n- \"Plays fetch\" - dog-like behavior\n- \"Makes chirping sounds\" - vocalizations\n- \"Cross-eyed\" / \"derp face\" - physical quirks\n- \"Extra toes\" / \"polydactyl\" - physical abnormalities\n\n**Vocalizations:**\n- Meows (chatty, talkative, vocal)\n- Purrs (affectionate mentions)\n- Chirps/trills (bird-like sounds)\n- Hisses (aggressive mentions)\n- Yowls/howls (loud vocalizations)\n- Silent/quiet (explicitly mentioned)\n\n### Metadata Extraction\n\n**Age Indicators:**\n- Explicit: \"5 years old\", \"2yo\", \"3 year old\"\n- Categories: kitten (< 1 year), young (1-3 years), adult (3-10 years), senior (10+ years)\n\n**Origin:**\n- Rescue/adopted/shelter\n- Stray/street cat\n- From breeder\n- Found in alley/street\n\n**Occupation (Quirky):**\n- Mouser/hunter/catches mice\n- Office cat/workplace\n- Barn cat\n- Therapy cat\n- Instagram cat/influencer/famous\n- Professional napper (if lazy + job mentioned)",
|
|
18
|
+
text: "## Extraction Guidelines\n\n### Physical Characteristics\n\n**Fur Color Detection:**\n- Look for color keywords: orange, black, white, gray, brown, cream, calico, tortoiseshell\n- Common phrases: \"orange tabby\", \"black cat\", \"white fur\", \"gray and white\"\n- Informal descriptions: \"ginger\", \"tuxedo\", \"tux cat\", \"cow cat\"\n- Multi-color: calico (3 colors), tortoiseshell (2 colors blended), bicolor (2 colors distinct)\n\n**Fur Pattern:**\n- Tabby/striped - any mention of stripes, lines, \"tabby\"\n- Spotted - spots, leopard-like\n- Solid - single solid color, no pattern mentioned\n- Tuxedo - black and white formal pattern\n- Colorpoint - darker extremities (Siamese, Himalayan)\n- Bicolor/two-tone - two distinct color areas\n\n**Size Indicators:**\n- Tiny: kitten, teacup, very small\n- Small: small, petite\n- Medium: (default if not mentioned)\n- Large: large, big\n- Extra-large: huge, giant, massive, Maine Coon\n\n**Breed Mentions:**\n- Only extract if explicitly mentioned: Persian, Siamese, Maine Coon, Bengal, etc.\n- Don\'t infer breed from characteristics alone\n\n### Behavioral Characteristics\n\n**Personality Extraction:**\n\nCommon traits to look for:\n- **Positive:** playful, friendly, affectionate, curious, energetic, calm, intelligent, sweet, gentle, loving\n- **Quirky:** grumpy, cranky, lazy, sleepy, aloof, independent, demanding, bossy, mischievous\n- **Temperament:** shy, timid, bold, confident, anxious, relaxed\n\n**Quirks (Behavioral Patterns):**\n- \"Knocks things off tables\" - look for destructive play mentions\n- \"Loves boxes\" - box obsession\n- \"Gets zoomies\" / \"runs around at night\" - nighttime energy bursts\n- \"Fascinated by water\" - water interest\n- \"Plays fetch\" - dog-like behavior\n- \"Makes chirping sounds\" - vocalizations\n- \"Cross-eyed\" / \"derp face\" - physical quirks\n- \"Extra toes\" / \"polydactyl\" - physical abnormalities\n\n**Vocalizations:**\n- Meows (chatty, talkative, vocal)\n- Purrs (affectionate mentions)\n- Chirps/trills (bird-like sounds)\n- Hisses (aggressive mentions)\n- Yowls/howls (loud vocalizations)\n- Silent/quiet (explicitly mentioned)\n\n### Metadata Extraction\n\n**Age Indicators:**\n- Explicit: \"5 years old\", \"2yo\", \"3 year old\"\n- Categories: kitten (< 1 year), young (1-3 years), adult (3-10 years), senior (10+ years)\n\n**Origin:**\n- Rescue/adopted/shelter\n- Stray/street cat\n- From breeder\n- Found in alley/street\n\n**Occupation (Quirky):**\n- Mouser/hunter/catches mice\n- Office cat/workplace\n- Barn cat\n- Therapy cat\n- Instagram cat/influencer/famous\n- Professional napper (if lazy + job mentioned)"
|
|
19
|
+
},
|
|
20
|
+
naturalLanguageMapping: {
|
|
21
|
+
header: "## Natural Language Mapping",
|
|
22
|
+
body: "Handle informal language:\n\n**Color Synonyms:**\n- \"Ginger\" → Orange\n- \"Midnight\" → Black\n- \"Snowy\" / \"ghost\" → White\n- \"Smokey\" / \"silver\" → Gray\n- \"Chocolate\" → Brown\n\n**Personality Synonyms:**\n- \"Chill\" / \"zen\" → Calm\n- \"Spicy\" / \"feisty\" → Grumpy\n- \"Derpy\" → Goofy/silly\n- \"Cuddly\" / \"snuggly\" → Affectionate\n- \"Trouble\" / \"troublemaker\" → Mischievous",
|
|
23
|
+
text: "## Natural Language Mapping\n\nHandle informal language:\n\n**Color Synonyms:**\n- \"Ginger\" → Orange\n- \"Midnight\" → Black\n- \"Snowy\" / \"ghost\" → White\n- \"Smokey\" / \"silver\" → Gray\n- \"Chocolate\" → Brown\n\n**Personality Synonyms:**\n- \"Chill\" / \"zen\" → Calm\n- \"Spicy\" / \"feisty\" → Grumpy\n- \"Derpy\" → Goofy/silly\n- \"Cuddly\" / \"snuggly\" → Affectionate\n- \"Trouble\" / \"troublemaker\" → Mischievous"
|
|
24
|
+
},
|
|
25
|
+
outputFormat: {
|
|
26
|
+
header: "## Output Format",
|
|
27
|
+
body: "Return your analysis as JSON:\n\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Detected color\",\n \"furPattern\": \"Pattern (if mentioned)\",\n \"eyeColor\": \"Eye color (if mentioned)\",\n \"size\": \"Size category (if mentioned)\",\n \"breed\": \"Breed (if explicitly mentioned)\"\n },\n \"behavioral\": {\n \"personality\": [\"Trait 1\", \"Trait 2\", \"...\"],\n \"quirks\": [\"Quirk 1\", \"Quirk 2\"] // or null if none\n \"vocalizations\": [\"Type 1\", \"Type 2\"] // or null if none\n },\n \"metadata\": {\n \"age\": \"Age or age category (if mentioned)\",\n \"origin\": \"Origin (if mentioned)\",\n \"occupation\": \"Occupation (if mentioned)\"\n },\n \"description\": \"The original description (preserved)\"\n}\n\`\`\`\n\n**Important:** Only include fields where information was found. Use \`null\` for explicitly mentioned but unclear fields. Omit fields entirely if not mentioned.",
|
|
28
|
+
text: "## Output Format\n\nReturn your analysis as JSON:\n\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Detected color\",\n \"furPattern\": \"Pattern (if mentioned)\",\n \"eyeColor\": \"Eye color (if mentioned)\",\n \"size\": \"Size category (if mentioned)\",\n \"breed\": \"Breed (if explicitly mentioned)\"\n },\n \"behavioral\": {\n \"personality\": [\"Trait 1\", \"Trait 2\", \"...\"],\n \"quirks\": [\"Quirk 1\", \"Quirk 2\"] // or null if none\n \"vocalizations\": [\"Type 1\", \"Type 2\"] // or null if none\n },\n \"metadata\": {\n \"age\": \"Age or age category (if mentioned)\",\n \"origin\": \"Origin (if mentioned)\",\n \"occupation\": \"Occupation (if mentioned)\"\n },\n \"description\": \"The original description (preserved)\"\n}\n\`\`\`\n\n**Important:** Only include fields where information was found. Use \`null\` for explicitly mentioned but unclear fields. Omit fields entirely if not mentioned."
|
|
29
|
+
},
|
|
30
|
+
parsingPhilosophy: {
|
|
31
|
+
header: "## Parsing Philosophy",
|
|
32
|
+
body: "**Captain Obvious Approach:**\n- Take everything literally - if they said \"orange\", it\'s orange\n- Don\'t embellish - extract what\'s there, nothing more\n- Handle chaos gracefully - word vomit is just context with poor punctuation\n- When in doubt, state the obvious - \"cat has fur\" level detail is fine\n- Capture ALL personality traits mentioned, even if redundant",
|
|
33
|
+
text: "## Parsing Philosophy\n\n**Captain Obvious Approach:**\n- Take everything literally - if they said \"orange\", it\'s orange\n- Don\'t embellish - extract what\'s there, nothing more\n- Handle chaos gracefully - word vomit is just context with poor punctuation\n- When in doubt, state the obvious - \"cat has fur\" level detail is fine\n- Capture ALL personality traits mentioned, even if redundant"
|
|
34
|
+
},
|
|
35
|
+
examples: {
|
|
36
|
+
header: "## Examples",
|
|
37
|
+
body: "**Example 1: Structured Description**\n\nInput: \"Orange tabby, playful, loves boxes, about 3 years old\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Orange\",\n \"furPattern\": \"Tabby\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Playful\"],\n \"quirks\": [\"Loves sitting in boxes\"],\n \"vocalizations\": null\n },\n \"metadata\": {\n \"age\": \"3 years old\",\n \"origin\": null,\n \"occupation\": null\n },\n \"description\": \"Orange tabby, playful, loves boxes, about 3 years old\"\n}\n\`\`\`\n\n**Example 2: Unstructured Stream-of-Consciousness**\n\nInput: \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables all the time it\'s so annoying but also kinda funny and he gets the zoomies at like 3am and runs around the house like a maniac\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Orange\",\n \"furPattern\": \"Striped\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Energetic\", \"Mischievous\"],\n \"quirks\": [\n \"Knocks things off tables\",\n \"Gets the zoomies at 3am\"\n ],\n \"vocalizations\": null\n },\n \"metadata\": {\n \"age\": null,\n \"origin\": null,\n \"occupation\": null\n },\n \"description\": \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables all the time it\'s so annoying but also kinda funny and he gets the zoomies at like 3am and runs around the house like a maniac\"\n}\n\`\`\`\n\n**Example 3: Rescue Cat with Details**\n\nInput: \"Adopted black cat from shelter, shy but warming up, about 2 years old, loves to chirp at birds through the window\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Black\",\n \"furPattern\": \"Solid\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Shy\", \"Affectionate\"],\n \"quirks\": [\"Makes chirping sounds\"],\n \"vocalizations\": [\"Chirps\"]\n },\n \"metadata\": {\n \"age\": \"2 years old\",\n \"origin\": \"Rescue/Shelter\",\n \"occupation\": null\n },\n \"description\": \"Adopted black cat from shelter, shy but warming up, about 2 years old, loves to chirp at birds through the window\"\n}\n\`\`\`",
|
|
38
|
+
text: "## Examples\n\n**Example 1: Structured Description**\n\nInput: \"Orange tabby, playful, loves boxes, about 3 years old\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Orange\",\n \"furPattern\": \"Tabby\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Playful\"],\n \"quirks\": [\"Loves sitting in boxes\"],\n \"vocalizations\": null\n },\n \"metadata\": {\n \"age\": \"3 years old\",\n \"origin\": null,\n \"occupation\": null\n },\n \"description\": \"Orange tabby, playful, loves boxes, about 3 years old\"\n}\n\`\`\`\n\n**Example 2: Unstructured Stream-of-Consciousness**\n\nInput: \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables all the time it\'s so annoying but also kinda funny and he gets the zoomies at like 3am and runs around the house like a maniac\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Orange\",\n \"furPattern\": \"Striped\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Energetic\", \"Mischievous\"],\n \"quirks\": [\n \"Knocks things off tables\",\n \"Gets the zoomies at 3am\"\n ],\n \"vocalizations\": null\n },\n \"metadata\": {\n \"age\": null,\n \"origin\": null,\n \"occupation\": null\n },\n \"description\": \"So there\'s this cat right and he\'s like super orange and has stripes and he knocks stuff off tables all the time it\'s so annoying but also kinda funny and he gets the zoomies at like 3am and runs around the house like a maniac\"\n}\n\`\`\`\n\n**Example 3: Rescue Cat with Details**\n\nInput: \"Adopted black cat from shelter, shy but warming up, about 2 years old, loves to chirp at birds through the window\"\n\nOutput:\n\`\`\`json\n{\n \"physical\": {\n \"furColor\": \"Black\",\n \"furPattern\": \"Solid\",\n \"eyeColor\": null,\n \"size\": null,\n \"breed\": null\n },\n \"behavioral\": {\n \"personality\": [\"Shy\", \"Affectionate\"],\n \"quirks\": [\"Makes chirping sounds\"],\n \"vocalizations\": [\"Chirps\"]\n },\n \"metadata\": {\n \"age\": \"2 years old\",\n \"origin\": \"Rescue/Shelter\",\n \"occupation\": null\n },\n \"description\": \"Adopted black cat from shelter, shy but warming up, about 2 years old, loves to chirp at birds through the window\"\n}\n\`\`\`"
|
|
39
|
+
},
|
|
40
|
+
technicalNotes: {
|
|
41
|
+
header: "## Technical Notes",
|
|
42
|
+
body: "**For LLM Integration:**\n- Use low temperature (0.3-0.5) for consistency in extraction\n- Preserve original description exactly in output\n- Handle missing punctuation and poor grammar gracefully\n- Don\'t fail on typos or misspellings\n\n**Mock Mode Behavior:**\n- Use keyword matching and regex patterns for extraction\n- Apply natural language mappings automatically\n- Generate deterministic output from same input\n- Maintain same JSON structure as real LLM parsing",
|
|
43
|
+
text: "## Technical Notes\n\n**For LLM Integration:**\n- Use low temperature (0.3-0.5) for consistency in extraction\n- Preserve original description exactly in output\n- Handle missing punctuation and poor grammar gracefully\n- Don\'t fail on typos or misspellings\n\n**Mock Mode Behavior:**\n- Use keyword matching and regex patterns for extraction\n- Apply natural language mappings automatically\n- Generate deterministic output from same input\n- Maintain same JSON structure as real LLM parsing"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated TypeScript declarations - DO NOT EDIT
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface Fragment {
|
|
6
|
+
readonly header: string;
|
|
7
|
+
readonly body: string;
|
|
8
|
+
readonly text: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const meta: {};
|
|
12
|
+
|
|
13
|
+
export const text: string;
|
|
14
|
+
|
|
15
|
+
export const fragments: {
|
|
16
|
+
readonly systemPrompt: Fragment;
|
|
17
|
+
readonly traditionalHaikuElements: Fragment;
|
|
18
|
+
readonly haikuGenerationGuidelines: Fragment;
|
|
19
|
+
readonly creativeLicense40percentOfTheTime: Fragment;
|
|
20
|
+
readonly outputFormat: Fragment;
|
|
21
|
+
readonly haikuPhilosophy: Fragment;
|
|
22
|
+
readonly examples: Fragment;
|
|
23
|
+
readonly generationProcess: Fragment;
|
|
24
|
+
readonly technicalNotes: Fragment;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type FragmentName = keyof typeof fragments;
|