@vibe-agent-toolkit/vat-development-agents 0.1.0-rc.10
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 +87 -0
- package/agents/agent-generator/DESIGN-NOTES.md +572 -0
- package/agents/agent-generator/README.md +279 -0
- package/agents/agent-generator/agent.yaml +76 -0
- package/agents/agent-generator/examples/example-input.md +62 -0
- package/agents/agent-generator/prompts/system.md +168 -0
- package/agents/agent-generator/prompts/user.md +42 -0
- package/agents/agent-generator/schemas/input.schema.json +86 -0
- package/agents/agent-generator/schemas/output.schema.json +137 -0
- package/agents/agent-generator/validate-agent.ts +91 -0
- package/agents/resource-optimizer/SCOPE.md +1156 -0
- package/package.json +44 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://vat.dev/schemas/agent-generator/input.v1.json",
|
|
4
|
+
"title": "Agent Design Request",
|
|
5
|
+
"description": "Input schema for agent-generator: describes what agent to create",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"agentPurpose": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "What problem does this agent solve? Who will use it and why?",
|
|
11
|
+
"examples": [
|
|
12
|
+
"Help developers validate agent.yaml files before deployment",
|
|
13
|
+
"Review pull requests for security vulnerabilities and suggest fixes"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"successCriteria": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "How will you know the agent did a good job? What does success look like?",
|
|
19
|
+
"examples": [
|
|
20
|
+
"Agent catches schema errors and suggests fixes before they cause runtime failures",
|
|
21
|
+
"Identifies 100% of critical security issues with <10% false positive rate"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"typicalInputs": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "What kind of data/requests will the agent receive? Include examples.",
|
|
27
|
+
"examples": [
|
|
28
|
+
"Path to agent.yaml file, or raw YAML content to validate",
|
|
29
|
+
"GitHub PR URL with diff to review"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"expectedOutputs": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "What should the agent produce? What format?",
|
|
35
|
+
"examples": [
|
|
36
|
+
"Validation report with errors, warnings, and specific line numbers with suggestions",
|
|
37
|
+
"Structured feedback with severity levels: { file, line, severity, message, suggestion }"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"domainContext": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "What domain knowledge or constraints should the agent understand?",
|
|
43
|
+
"examples": [
|
|
44
|
+
"VAT agent schema format, common validation pitfalls, best practices for agent design",
|
|
45
|
+
"OWASP Top 10, secure coding standards for Python and JavaScript"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"performanceRequirements": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"latency": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "How fast should it respond?",
|
|
54
|
+
"examples": ["Under 5 seconds for typical files", "Real-time for simple queries"]
|
|
55
|
+
},
|
|
56
|
+
"accuracy": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "How accurate must it be?",
|
|
59
|
+
"examples": [
|
|
60
|
+
"Must catch 100% of schema violations, false positives OK",
|
|
61
|
+
"Prefer high recall over precision"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"cost": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "Any budget constraints?",
|
|
67
|
+
"examples": [
|
|
68
|
+
"Prefer cheaper models, accuracy matters more than speed",
|
|
69
|
+
"Cost-sensitive: use smallest model that meets accuracy requirements"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"description": "Performance constraints and priorities"
|
|
74
|
+
},
|
|
75
|
+
"additionalContext": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "Anything else relevant? Similar tools, specific use cases, edge cases to handle?",
|
|
78
|
+
"examples": [
|
|
79
|
+
"Similar to ESLint but for agent manifests",
|
|
80
|
+
"Must work in CI/CD pipelines"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": ["agentPurpose", "successCriteria"],
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://vat.dev/schemas/agent-generator/output.v1.json",
|
|
4
|
+
"title": "Generated Agent Package",
|
|
5
|
+
"description": "Output schema for agent-generator: complete agent package with validation",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"agentYaml": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"description": "Complete agent.yaml content as parsed YAML object (will be validated against AgentManifestSchema)",
|
|
11
|
+
"properties": {
|
|
12
|
+
"apiVersion": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"const": "vat.dev/v1"
|
|
15
|
+
},
|
|
16
|
+
"kind": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"const": "Agent"
|
|
19
|
+
},
|
|
20
|
+
"metadata": {
|
|
21
|
+
"type": "object"
|
|
22
|
+
},
|
|
23
|
+
"spec": {
|
|
24
|
+
"type": "object"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": ["apiVersion", "kind", "metadata", "spec"]
|
|
28
|
+
},
|
|
29
|
+
"files": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"description": "All generated files with content (wrapper writes to disk)",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"path": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Relative path for file (e.g., 'prompts/system.md')",
|
|
38
|
+
"examples": [
|
|
39
|
+
"prompts/system.md",
|
|
40
|
+
"prompts/user.md",
|
|
41
|
+
"schemas/input.schema.json",
|
|
42
|
+
"README.md"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"content": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Complete file content"
|
|
48
|
+
},
|
|
49
|
+
"type": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["prompt", "schema", "readme", "example", "template", "documentation", "other"],
|
|
52
|
+
"description": "File type classification"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": ["path", "content", "type"],
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
},
|
|
58
|
+
"minItems": 1
|
|
59
|
+
},
|
|
60
|
+
"validationResults": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"description": "Validation results from @vibe-agent-toolkit/agent-schema",
|
|
63
|
+
"properties": {
|
|
64
|
+
"valid": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"description": "Whether agent.yaml passed schema validation"
|
|
67
|
+
},
|
|
68
|
+
"errors": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"description": "Validation errors (if any)"
|
|
74
|
+
},
|
|
75
|
+
"warnings": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"description": "Non-blocking validation warnings"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": ["valid"],
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
},
|
|
86
|
+
"summary": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "Human-readable summary of what was created and next steps",
|
|
89
|
+
"minLength": 50,
|
|
90
|
+
"examples": [
|
|
91
|
+
"Created PR review agent with Claude Sonnet 4.5. Files: agent.yaml, system/user prompts, I/O schemas, README. Next: Customize prompts, test with sample PRs, deploy."
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"architecture": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"description": "Architecture decisions made during DESIGN phase",
|
|
97
|
+
"properties": {
|
|
98
|
+
"llm": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "LLM chosen and justification",
|
|
101
|
+
"examples": [
|
|
102
|
+
"Claude Sonnet 4.5: Balances code understanding quality with cost for PR reviews"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"tools": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"items": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"description": "Tools included and why",
|
|
111
|
+
"examples": [
|
|
112
|
+
"file-reader: Read source files and git diffs",
|
|
113
|
+
"github-api: Optional for direct PR integration"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"promptStrategy": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Prompt design approach",
|
|
119
|
+
"examples": [
|
|
120
|
+
"System prompt: Expert code reviewer identity, focus on bugs/security/style. User template: Structured PR diff input with severity levels."
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"resourcesPlan": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "Resources planned for agent context",
|
|
126
|
+
"examples": [
|
|
127
|
+
"coding-standards.md, security-checklist.md as reference docs. Input/output JSON schemas for validation."
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"required": ["llm", "tools", "promptStrategy", "resourcesPlan"],
|
|
132
|
+
"additionalProperties": false
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": ["agentYaml", "files", "validationResults", "summary", "architecture"],
|
|
136
|
+
"additionalProperties": false
|
|
137
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Validation script for agent.yaml
|
|
4
|
+
*
|
|
5
|
+
* Validates agent-generator's manifest against @vibe-agent-toolkit/agent-schema.
|
|
6
|
+
* This is the forcing function to discover schema refinements needed for Phase 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { readFileSync } from 'node:fs';
|
|
10
|
+
import { dirname, resolve } from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
|
|
13
|
+
import { parse as parseYaml } from 'yaml';
|
|
14
|
+
|
|
15
|
+
import { AgentManifestSchema } from '../../../../packages/agent-schema/dist/index.js';
|
|
16
|
+
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
+
const __dirname = dirname(__filename);
|
|
19
|
+
|
|
20
|
+
function main(): void {
|
|
21
|
+
console.log('Validating agent.yaml against AgentManifestSchema...\n');
|
|
22
|
+
|
|
23
|
+
// Read agent.yaml
|
|
24
|
+
const agentYamlPath = resolve(__dirname, 'agent.yaml');
|
|
25
|
+
const agentYamlContent = readFileSync(agentYamlPath, 'utf-8');
|
|
26
|
+
|
|
27
|
+
// Parse YAML to object
|
|
28
|
+
const agentData = parseYaml(agentYamlContent);
|
|
29
|
+
|
|
30
|
+
console.log('Parsed agent.yaml successfully');
|
|
31
|
+
console.log('Agent name:', agentData.metadata?.name);
|
|
32
|
+
console.log('Agent version:', agentData.metadata?.version);
|
|
33
|
+
console.log();
|
|
34
|
+
|
|
35
|
+
// Validate against schema
|
|
36
|
+
const result = AgentManifestSchema.safeParse(agentData);
|
|
37
|
+
|
|
38
|
+
if (result.success) {
|
|
39
|
+
console.log('✅ VALIDATION PASSED');
|
|
40
|
+
console.log('agent.yaml is valid according to AgentManifestSchema');
|
|
41
|
+
process.exit(0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Validation failed - report detailed errors
|
|
45
|
+
console.log('❌ VALIDATION FAILED\n');
|
|
46
|
+
console.log('Errors found:\n');
|
|
47
|
+
|
|
48
|
+
const errors = result.error.errors;
|
|
49
|
+
|
|
50
|
+
// Group errors by path for better readability
|
|
51
|
+
const errorsByPath = new Map<string, typeof errors>();
|
|
52
|
+
|
|
53
|
+
for (const error of errors) {
|
|
54
|
+
const path = error.path.join('.');
|
|
55
|
+
const existing = errorsByPath.get(path) ?? [];
|
|
56
|
+
existing.push(error);
|
|
57
|
+
errorsByPath.set(path, existing);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Report errors
|
|
61
|
+
let errorCount = 0;
|
|
62
|
+
for (const [path, pathErrors] of errorsByPath) {
|
|
63
|
+
for (const error of pathErrors) {
|
|
64
|
+
errorCount++;
|
|
65
|
+
console.log(`[${errorCount}] Path: ${path || '(root)'}`);
|
|
66
|
+
console.log(` Code: ${error.code}`);
|
|
67
|
+
console.log(` Message: ${error.message}`);
|
|
68
|
+
|
|
69
|
+
if (error.code === 'unrecognized_keys') {
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Error shape from Zod
|
|
71
|
+
const keys = (error as any).keys;
|
|
72
|
+
if (keys && Array.isArray(keys)) {
|
|
73
|
+
console.log(` Unrecognized keys: ${keys.join(', ')}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
console.log();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
console.log(`Total errors: ${errorCount}`);
|
|
82
|
+
console.log();
|
|
83
|
+
console.log('Next steps:');
|
|
84
|
+
console.log('1. Review errors above');
|
|
85
|
+
console.log('2. Determine if agent.yaml needs fixes OR schema needs refinements');
|
|
86
|
+
console.log('3. Document findings in DESIGN-NOTES.md');
|
|
87
|
+
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
main();
|