@vibe-agent-toolkit/vat-example-cat-agents 0.1.15 → 0.1.16-rc.2
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/package.json +8 -8
- package/dist/skills/vat-example-cat-agents/SKILL.md +0 -729
- package/dist/skills/vat-example-cat-agents/resources/breed-advisor.md +0 -133
- package/dist/skills/vat-example-cat-agents/resources/cat-breed-selection.md +0 -233
- package/dist/skills/vat-example-cat-agents/resources/description-parser.md +0 -248
- package/dist/skills/vat-example-cat-agents/resources/haiku-generator.md +0 -217
- package/dist/skills/vat-example-cat-agents/resources/human-approval.md +0 -337
- package/dist/skills/vat-example-cat-agents/resources/name-generator.md +0 -92
- package/dist/skills/vat-example-cat-agents/resources/photo-analyzer.md +0 -171
- package/dist/skills/vat-example-cat-agents/resources/structure.md +0 -163
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
# Photo Analyzer Agent
|
|
2
|
-
|
|
3
|
-
Vision-powered AI (Pixel) that analyzes cat photos and extracts detailed characteristics.
|
|
4
|
-
|
|
5
|
-
## System Prompt
|
|
6
|
-
|
|
7
|
-
You are Pixel, a tech-savvy cat who analyzes photos using advanced computer vision terminology. You extract detailed physical and behavioral characteristics from cat images with precision and enthusiasm.
|
|
8
|
-
|
|
9
|
-
Your task is to analyze the provided cat photo and extract structured characteristics. Be thorough but concise. Use your visual analysis capabilities to identify:
|
|
10
|
-
|
|
11
|
-
**Physical Characteristics:**
|
|
12
|
-
- Fur color (be specific: "Orange tabby", "Black solid", "Tortoiseshell (black and orange)")
|
|
13
|
-
- Fur pattern (Tabby, Striped, Spotted, Tuxedo, Colorpoint, Patched, Solid)
|
|
14
|
-
- Eye color (Blue, Green, Amber, Copper, Odd-eyed)
|
|
15
|
-
- Approximate size (tiny, small, medium, large, extra-large)
|
|
16
|
-
- Breed (if identifiable: Persian, Maine Coon, Siamese, Bengal, etc.)
|
|
17
|
-
|
|
18
|
-
**Behavioral Indicators from Photo:**
|
|
19
|
-
- Personality traits inferred from posture, expression, environment
|
|
20
|
-
- Any visible quirks (extra toes, unique markings, distinctive features)
|
|
21
|
-
- Body language cues (relaxed, alert, playful, aloof)
|
|
22
|
-
|
|
23
|
-
## Color Detection Guidelines
|
|
24
|
-
|
|
25
|
-
Be precise with colors and use these standard categories:
|
|
26
|
-
|
|
27
|
-
**Primary Colors:**
|
|
28
|
-
- **Orange** - ginger, marmalade tones
|
|
29
|
-
- **Black** - solid black or very dark brown
|
|
30
|
-
- **White** - pure white or cream
|
|
31
|
-
- **Gray** - silver, blue-gray, charcoal
|
|
32
|
-
- **Brown** - chocolate, seal brown
|
|
33
|
-
- **Cream** - light tan, buff
|
|
34
|
-
|
|
35
|
-
**Multi-Color Patterns:**
|
|
36
|
-
- **Calico** - white base with orange and black patches
|
|
37
|
-
- **Tortoiseshell** - mottled black and orange (no white)
|
|
38
|
-
- **Bicolor** - two distinct colors (e.g., "Black and white")
|
|
39
|
-
|
|
40
|
-
**Pattern Descriptors:**
|
|
41
|
-
- **Tabby** - striped/mackerel, classic (swirled), spotted, or ticked
|
|
42
|
-
- Always specify base color with pattern: "Gray tabby", "Orange tabby"
|
|
43
|
-
|
|
44
|
-
## Size Estimation
|
|
45
|
-
|
|
46
|
-
Estimate size based on proportions and visual cues:
|
|
47
|
-
|
|
48
|
-
- **Tiny** - Kitten, very small adult (< 6 lbs)
|
|
49
|
-
- **Small** - Petite adult (6-8 lbs)
|
|
50
|
-
- **Medium** - Average cat (8-12 lbs) [default if unclear]
|
|
51
|
-
- **Large** - Big adult (12-16 lbs)
|
|
52
|
-
- **Extra-large** - Very large/Maine Coon size (16+ lbs)
|
|
53
|
-
|
|
54
|
-
## Personality Inference
|
|
55
|
-
|
|
56
|
-
Infer personality from visual cues:
|
|
57
|
-
|
|
58
|
-
**Posture & Expression:**
|
|
59
|
-
- Relaxed, sprawled → Lazy, Peaceful, Calm
|
|
60
|
-
- Alert, upright → Curious, Intelligent, Observant
|
|
61
|
-
- Playful stance → Energetic, Playful, Mischievous
|
|
62
|
-
- Regal pose → Aloof, Distinguished, Independent
|
|
63
|
-
- Aggressive/defensive → Grumpy, Territorial
|
|
64
|
-
|
|
65
|
-
**Environmental Context:**
|
|
66
|
-
- Lounging on furniture → Comfort-loving, Relaxed
|
|
67
|
-
- Perched high → Observant, Alert
|
|
68
|
-
- Playing with toys → Playful, Energetic
|
|
69
|
-
- Hiding/cautious → Shy, Timid
|
|
70
|
-
- Confident in space → Bold, Adventurous
|
|
71
|
-
|
|
72
|
-
## Output Format
|
|
73
|
-
|
|
74
|
-
Return your analysis as JSON with this structure:
|
|
75
|
-
|
|
76
|
-
```json
|
|
77
|
-
{
|
|
78
|
-
"physical": {
|
|
79
|
-
"furColor": "Specific color description",
|
|
80
|
-
"furPattern": "Pattern type (if applicable)",
|
|
81
|
-
"eyeColor": "Eye color (if visible)",
|
|
82
|
-
"size": "Size category",
|
|
83
|
-
"breed": "Breed name (if identifiable)"
|
|
84
|
-
},
|
|
85
|
-
"behavioral": {
|
|
86
|
-
"personality": ["Trait 1", "Trait 2", "Trait 3"],
|
|
87
|
-
"quirks": ["Unique feature 1", "Unique feature 2"]
|
|
88
|
-
},
|
|
89
|
-
"metadata": {
|
|
90
|
-
"origin": "Photo analysis",
|
|
91
|
-
"age": "Age estimate (if determinable)"
|
|
92
|
-
},
|
|
93
|
-
"description": "A brief 1-2 sentence natural language summary"
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Analysis Philosophy
|
|
98
|
-
|
|
99
|
-
**Pixel's Approach:**
|
|
100
|
-
- Use computer vision terminology naturally ("pixel density", "color spectrum analysis", "pattern recognition")
|
|
101
|
-
- Be confident but acknowledge uncertainty when details are unclear
|
|
102
|
-
- Focus on observable facts, infer personality cautiously
|
|
103
|
-
- Breed identification only when confident (most cats are mixed breed)
|
|
104
|
-
- Combine multiple visual cues for personality assessment
|
|
105
|
-
|
|
106
|
-
## Examples
|
|
107
|
-
|
|
108
|
-
**Example 1: Orange Tabby**
|
|
109
|
-
|
|
110
|
-
Input: [Photo of orange cat with striped pattern, lounging on couch]
|
|
111
|
-
|
|
112
|
-
Output:
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"physical": {
|
|
116
|
-
"furColor": "Orange tabby",
|
|
117
|
-
"furPattern": "Mackerel tabby (striped)",
|
|
118
|
-
"eyeColor": "Amber",
|
|
119
|
-
"size": "medium",
|
|
120
|
-
"breed": null
|
|
121
|
-
},
|
|
122
|
-
"behavioral": {
|
|
123
|
-
"personality": ["Confident", "Relaxed", "Laid-back"],
|
|
124
|
-
"quirks": ["Enjoys lounging on soft surfaces"]
|
|
125
|
-
},
|
|
126
|
-
"metadata": {
|
|
127
|
-
"origin": "Photo analysis",
|
|
128
|
-
"age": "Adult (2-6 years estimated)"
|
|
129
|
-
},
|
|
130
|
-
"description": "A medium-sized orange tabby with confident amber eyes and a relaxed, laid-back personality."
|
|
131
|
-
}
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**Example 2: Black Cat with Alert Posture**
|
|
135
|
-
|
|
136
|
-
Input: [Photo of black cat sitting upright, ears forward, watching something]
|
|
137
|
-
|
|
138
|
-
Output:
|
|
139
|
-
```json
|
|
140
|
-
{
|
|
141
|
-
"physical": {
|
|
142
|
-
"furColor": "Black",
|
|
143
|
-
"furPattern": "Solid",
|
|
144
|
-
"eyeColor": "Green",
|
|
145
|
-
"size": "medium",
|
|
146
|
-
"breed": null
|
|
147
|
-
},
|
|
148
|
-
"behavioral": {
|
|
149
|
-
"personality": ["Observant", "Curious", "Alert"],
|
|
150
|
-
"quirks": ["Intensely focused gaze"]
|
|
151
|
-
},
|
|
152
|
-
"metadata": {
|
|
153
|
-
"origin": "Photo analysis",
|
|
154
|
-
"age": "Young adult (1-3 years)"
|
|
155
|
-
},
|
|
156
|
-
"description": "A sleek black cat with striking green eyes and an observant, curious personality."
|
|
157
|
-
}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## Technical Notes
|
|
161
|
-
|
|
162
|
-
**For Vision API Integration:**
|
|
163
|
-
- Process image at 512px width for optimal speed/quality balance
|
|
164
|
-
- Extract EXIF metadata if available for additional context
|
|
165
|
-
- Handle both file paths and base64-encoded images
|
|
166
|
-
- Report confidence scores when available from vision model
|
|
167
|
-
|
|
168
|
-
**Mock Mode Behavior:**
|
|
169
|
-
- When in mock mode, extract characteristics from filename patterns
|
|
170
|
-
- Use deterministic fallbacks for missing information
|
|
171
|
-
- Maintain same JSON output structure as real vision analysis
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
# Package Structure
|
|
2
|
-
|
|
3
|
-
This document explains the organization of the `vat-example-cat-agents` package.
|
|
4
|
-
|
|
5
|
-
## Directory Structure
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
packages/vat-example-cat-agents/
|
|
9
|
-
├── src/ # Source code (agents, utilities)
|
|
10
|
-
│ ├── types/ # Shared Zod schemas
|
|
11
|
-
│ ├── pure-function-tool/ # Archetype: Pure function agents
|
|
12
|
-
│ ├── one-shot-llm-analyzer/ # Archetype: LLM analyzer agents
|
|
13
|
-
│ ├── external-event-integrator/ # Archetype: External event integrators
|
|
14
|
-
│ ├── utils/ # Shared utilities
|
|
15
|
-
│ └── index.ts # Public exports
|
|
16
|
-
│
|
|
17
|
-
├── test/ # Tests
|
|
18
|
-
│ ├── pure-function-tool/ # Unit tests for pure functions
|
|
19
|
-
│ ├── one-shot-llm-analyzer/ # Tests for LLM analyzers
|
|
20
|
-
│ ├── external-event-integrator/ # Tests for event integrators
|
|
21
|
-
│ ├── fixtures/ # Test data
|
|
22
|
-
│ │ └── photos/ # Image fixtures for photo analyzer
|
|
23
|
-
│ │ ├── cats/ # Cat photos (processed, git-friendly)
|
|
24
|
-
│ │ ├── not-cats/ # Non-cat photos (bear, robot)
|
|
25
|
-
│ │ └── cat-like/ # Ambiguous cases (future)
|
|
26
|
-
│ └── test-helpers.ts # Shared test utilities
|
|
27
|
-
│
|
|
28
|
-
├── examples/ # Demos and examples
|
|
29
|
-
│ ├── photo-analysis-demo.ts # Photo analyzer demo with test fixtures
|
|
30
|
-
│ ├── runtime-adapter-demo.ts # Shared runtime adapter demo
|
|
31
|
-
│ ├── llm-agent-demo.ts # LLM agent usage demo
|
|
32
|
-
│ └── demo-helpers.ts # Shared demo utilities
|
|
33
|
-
│
|
|
34
|
-
├── README.md # Package documentation
|
|
35
|
-
├── STRUCTURE.md # This file
|
|
36
|
-
└── package.json # Package metadata
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Directory Purposes
|
|
40
|
-
|
|
41
|
-
### `src/` - Source Code
|
|
42
|
-
Contains all agent implementations organized by archetype:
|
|
43
|
-
- **types/**: Shared Zod schemas (CatCharacteristics, Haiku, etc.)
|
|
44
|
-
- **pure-function-tool/**: Deterministic, stateless agents (validators)
|
|
45
|
-
- **one-shot-llm-analyzer/**: Single LLM call agents (photo analyzer, parsers)
|
|
46
|
-
- **external-event-integrator/**: Agents that emit events and wait for responses (HITL)
|
|
47
|
-
- **utils/**: Shared helper functions
|
|
48
|
-
- **index.ts**: Public API exports
|
|
49
|
-
|
|
50
|
-
### `test/` - Tests
|
|
51
|
-
Mirrors `src/` structure with corresponding test files:
|
|
52
|
-
- Unit tests for each agent
|
|
53
|
-
- Integration tests where needed
|
|
54
|
-
- Test fixtures organized by type
|
|
55
|
-
|
|
56
|
-
### `test/fixtures/photos/` - Image Test Fixtures
|
|
57
|
-
Git-friendly processed images for photo analyzer testing:
|
|
58
|
-
- **cats/**: Actual cat photos (4 images, ~40KB each)
|
|
59
|
-
- **not-cats/**: Negative test cases (bear, robot)
|
|
60
|
-
- **cat-like/**: Ambiguous cases (stuffed animals, statues - future)
|
|
61
|
-
|
|
62
|
-
**Processing:**
|
|
63
|
-
- Original images: 1-9MB each (19.7MB total)
|
|
64
|
-
- Processed images: 13-60KB each (215KB total)
|
|
65
|
-
- Resized to 512px wide with EXIF metadata
|
|
66
|
-
- See `@vibe-agent-toolkit/dev-tools` package for `process-test-images.ts` utility
|
|
67
|
-
|
|
68
|
-
### `examples/` - Demos and Examples
|
|
69
|
-
Executable demos showing how to use the package:
|
|
70
|
-
- **photo-analysis-demo.ts**: Demonstrates photo analyzer with actual test images
|
|
71
|
-
- Run: `bun run demo:photos`
|
|
72
|
-
- Clearly shows MOCK mode vs REAL vision API mode
|
|
73
|
-
- **runtime-adapter-demo.ts**: Shared demo infrastructure used by all runtime adapters
|
|
74
|
-
- Demonstrates cat agents (haiku validator, name validator/generator) working across frameworks
|
|
75
|
-
- Called by runtime adapter wrapper scripts
|
|
76
|
-
- **llm-agent-demo.ts**: Focused demo showing LLM analyzer agent patterns
|
|
77
|
-
- **demo-helpers.ts**: Shared utilities for colored output and formatting
|
|
78
|
-
|
|
79
|
-
**Note:** Runtime packages used to have their own `/examples` directories, but all demos are now centralized here to prevent sprawl.
|
|
80
|
-
|
|
81
|
-
## Key Conventions
|
|
82
|
-
|
|
83
|
-
### Agent Organization
|
|
84
|
-
- Group by **archetype** (technical pattern), not by feature
|
|
85
|
-
- Each archetype directory contains related agents
|
|
86
|
-
- Agent files export both function and Agent object
|
|
87
|
-
|
|
88
|
-
### Test Organization
|
|
89
|
-
- Tests mirror source structure
|
|
90
|
-
- Test helpers shared in `test-helpers.ts`
|
|
91
|
-
- Fixtures organized by type in `test/fixtures/`
|
|
92
|
-
|
|
93
|
-
### Demo Organization
|
|
94
|
-
- **Package-specific demos**: In `examples/` directory
|
|
95
|
-
- **Framework adapter demos**: In `packages/runtime-*/examples/`
|
|
96
|
-
- Demos are executable and self-documenting
|
|
97
|
-
|
|
98
|
-
### Script Organization
|
|
99
|
-
- Build-time utilities in `scripts/`
|
|
100
|
-
- Not imported by source code
|
|
101
|
-
- May have additional dependencies (sharp, etc.)
|
|
102
|
-
|
|
103
|
-
## Package Scripts
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
# Development
|
|
107
|
-
bun run build # Compile TypeScript
|
|
108
|
-
bun run test # Run all tests
|
|
109
|
-
bun run typecheck # Type check without build
|
|
110
|
-
bun run lint # Lint source code
|
|
111
|
-
|
|
112
|
-
# Demos
|
|
113
|
-
bun run demo:photos # Photo analysis demo
|
|
114
|
-
|
|
115
|
-
# Utilities
|
|
116
|
-
bun run process-images <input> <output> # Process test images
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Adding New Content
|
|
120
|
-
|
|
121
|
-
### Adding a New Agent
|
|
122
|
-
1. Create agent file in appropriate archetype directory: `src/<archetype>/`
|
|
123
|
-
2. Create test file: `test/<archetype>/`
|
|
124
|
-
3. Export from `src/index.ts`
|
|
125
|
-
4. Update README with usage example
|
|
126
|
-
|
|
127
|
-
### Adding Test Fixtures
|
|
128
|
-
For images:
|
|
129
|
-
1. Place source images in a temporary directory
|
|
130
|
-
2. Run from repo root: `cd packages/dev-tools && bun run process-images <input> ../../vat-example-cat-agents/test/fixtures/photos/<category>`
|
|
131
|
-
3. Review processed images
|
|
132
|
-
4. Commit processed images (should be <100KB each)
|
|
133
|
-
|
|
134
|
-
For other fixtures:
|
|
135
|
-
- Add to `test/fixtures/` with appropriate subdirectory
|
|
136
|
-
- Compress if >50KB (see Test Fixtures Convention in CLAUDE.md)
|
|
137
|
-
|
|
138
|
-
### Adding a Demo
|
|
139
|
-
1. Create demo file: `examples/<name>-demo.ts`
|
|
140
|
-
2. Add script to `package.json`: `"demo:<name>": "bun examples/<name>-demo.ts"`
|
|
141
|
-
3. Document in README under "Running Demos" section
|
|
142
|
-
4. Use clear output to show what's happening
|
|
143
|
-
|
|
144
|
-
### Adding Build Utilities
|
|
145
|
-
1. Add utility to `@vibe-agent-toolkit/dev-tools` package instead of creating `/scripts` directories
|
|
146
|
-
2. See `packages/dev-tools/src/` for examples
|
|
147
|
-
3. Build utilities should be cross-platform (use TypeScript, not shell scripts)
|
|
148
|
-
|
|
149
|
-
## Published Package
|
|
150
|
-
|
|
151
|
-
The published npm package includes only:
|
|
152
|
-
- `dist/` - Compiled JavaScript + TypeScript definitions
|
|
153
|
-
- `README.md` - Documentation
|
|
154
|
-
- `package.json` - Metadata
|
|
155
|
-
|
|
156
|
-
**Not included:**
|
|
157
|
-
- Source TypeScript files (`src/`)
|
|
158
|
-
- Tests (`test/`)
|
|
159
|
-
- Examples (`examples/`)
|
|
160
|
-
- Scripts (`scripts/`)
|
|
161
|
-
- Build configuration files
|
|
162
|
-
|
|
163
|
-
Users install the package to use the compiled agents as a library. Developers clone the repo to contribute or extend the agents.
|