245 lines
5.4 KiB
YAML
245 lines
5.4 KiB
YAML
# BAML Code Generation Skill - Metadata
|
|
# Version: 1.0.0
|
|
# Last Updated: 2025-01-25
|
|
|
|
skill:
|
|
name: "BAML Code Generation"
|
|
version: "1.0.0"
|
|
description: "Generate production-ready BAML applications from natural language requirements"
|
|
author: "Claude Code"
|
|
license: "MIT"
|
|
|
|
activation:
|
|
triggers:
|
|
keywords:
|
|
- "BAML"
|
|
- "LLM"
|
|
- "structured output"
|
|
- "code generation"
|
|
- "extraction"
|
|
- "classification"
|
|
- "RAG"
|
|
- "agents"
|
|
patterns:
|
|
- "generate BAML"
|
|
- "create BAML function"
|
|
- "build BAML"
|
|
- "extract.*BAML"
|
|
- "classify.*BAML"
|
|
|
|
auto_activate: true
|
|
confidence_threshold: 0.7
|
|
|
|
requirements:
|
|
mcp_servers:
|
|
required:
|
|
- name: "baml_Docs"
|
|
description: "Core BAML repository access"
|
|
repository: "BoundaryML/baml"
|
|
tools:
|
|
- "mcp__baml_Docs__fetch_baml_documentation"
|
|
- "mcp__baml_Docs__search_baml_documentation"
|
|
- "mcp__baml_Docs__search_baml_code"
|
|
- "mcp__baml_Docs__fetch_generic_url_content"
|
|
|
|
optional:
|
|
- name: "baml_Examples"
|
|
description: "Production pattern examples"
|
|
repository: "BoundaryML/baml-examples"
|
|
fallback: "Use cached patterns from baml_Docs"
|
|
|
|
dependencies:
|
|
- "MCP protocol support"
|
|
- "Claude Code runtime"
|
|
|
|
capabilities:
|
|
patterns:
|
|
- extraction
|
|
- classification
|
|
- rag
|
|
- agents
|
|
- multimodal
|
|
|
|
languages:
|
|
- python
|
|
- typescript
|
|
- ruby
|
|
- java
|
|
- golang
|
|
- csharp
|
|
|
|
frameworks:
|
|
python:
|
|
- fastapi
|
|
- flask
|
|
- django
|
|
typescript:
|
|
- nextjs
|
|
- express
|
|
- nestjs
|
|
ruby:
|
|
- rails
|
|
- sinatra
|
|
|
|
features:
|
|
code_generation:
|
|
types: true
|
|
functions: true
|
|
clients: true
|
|
tests: true
|
|
integration: true
|
|
deployment: true
|
|
|
|
optimization:
|
|
token_reduction: true
|
|
prompt_compression: true
|
|
type_simplification: true
|
|
caching: true
|
|
target_reduction: 0.55 # 55% reduction
|
|
|
|
validation:
|
|
syntax: true
|
|
types: true
|
|
semantics: true
|
|
completeness: true
|
|
performance: true
|
|
|
|
multimodal:
|
|
image: true
|
|
audio: true
|
|
vision_models: true
|
|
|
|
performance:
|
|
targets:
|
|
simple_function_ms: 5000 # <5s
|
|
complex_system_ms: 30000 # <30s
|
|
compilation_success: 0.95 # >95%
|
|
test_pass_rate: 0.90 # >90%
|
|
|
|
caching:
|
|
session_ttl: 900 # 15 minutes
|
|
persistent_ttl: 604800 # 7 days
|
|
max_cache_size_mb: 100
|
|
eviction_policy: "LRU"
|
|
|
|
cost:
|
|
target_per_generation: 0.02 # <$0.02
|
|
token_budget: 4000 # Skill core
|
|
|
|
cache:
|
|
structure:
|
|
patterns: "cache/patterns.json"
|
|
syntax: "cache/syntax.json"
|
|
query_cache: "cache/query_cache.json"
|
|
|
|
tiers:
|
|
- name: "embedded"
|
|
location: "SKILL.md"
|
|
size_tokens: 500
|
|
ttl: null # never expires
|
|
content: "Core BAML syntax rules"
|
|
|
|
- name: "session"
|
|
location: "memory"
|
|
size_patterns: 10
|
|
ttl: 900 # 15 minutes
|
|
content: "Recent patterns"
|
|
|
|
- name: "persistent"
|
|
location: "cache/patterns.json"
|
|
size_patterns: 20
|
|
ttl: 604800 # 7 days
|
|
content: "Top patterns by usage"
|
|
|
|
- name: "mcp"
|
|
location: "remote"
|
|
size: "unlimited"
|
|
ttl: 0 # real-time
|
|
content: "Live repository"
|
|
|
|
outputs:
|
|
artifacts:
|
|
- type: "baml_code"
|
|
format: ".baml"
|
|
description: "Generated BAML types and functions"
|
|
|
|
- type: "tests"
|
|
formats: [".py", ".ts", ".rb"]
|
|
description: "Test suites with 100% coverage"
|
|
|
|
- type: "integration"
|
|
formats: [".py", ".ts", ".rb", ".java", ".go", ".cs"]
|
|
description: "Framework-specific integration code"
|
|
|
|
- type: "deployment"
|
|
formats: ["Dockerfile", "docker-compose.yml", "k8s.yaml"]
|
|
description: "Deployment configurations"
|
|
|
|
- type: "metadata"
|
|
format: ".json"
|
|
description: "Generation metadata and metrics"
|
|
|
|
quality:
|
|
validation_layers: 5
|
|
test_coverage_target: 1.0 # 100%
|
|
min_quality_score: 80
|
|
|
|
success_criteria:
|
|
first_compilation: 0.95
|
|
type_safety: 1.0
|
|
test_passage: 0.90
|
|
user_satisfaction: 0.85
|
|
|
|
monitoring:
|
|
metrics:
|
|
- "generation_time_ms"
|
|
- "token_count"
|
|
- "optimization_savings"
|
|
- "pattern_match_accuracy"
|
|
- "cache_hit_rate"
|
|
- "mcp_query_latency"
|
|
- "validation_success_rate"
|
|
- "cost_per_generation"
|
|
|
|
alerts:
|
|
- condition: "generation_time_ms > 30000"
|
|
action: "log_slow_generation"
|
|
|
|
- condition: "cache_hit_rate < 0.5"
|
|
action: "review_cache_strategy"
|
|
|
|
- condition: "cost_per_generation > 0.02"
|
|
action: "investigate_token_usage"
|
|
|
|
maintenance:
|
|
pattern_updates:
|
|
frequency: "real-time"
|
|
source: "MCP live queries"
|
|
manual_required: false
|
|
|
|
skill_updates:
|
|
token_budget_check: "on_deploy"
|
|
compression_review: "monthly"
|
|
validation_tuning: "quarterly"
|
|
|
|
documentation:
|
|
readme: "SKILL.md"
|
|
quickstart: "../specs/001-baml-codegen-skill/quickstart.md"
|
|
troubleshooting: "TROUBLESHOOTING.md"
|
|
examples: "templates/"
|
|
|
|
version_info:
|
|
current: "1.0.0"
|
|
status: "mvp"
|
|
release_date: "2025-01-25"
|
|
changelog:
|
|
- version: "1.0.0"
|
|
date: "2025-01-25"
|
|
changes:
|
|
- "Initial MVP release"
|
|
- "Core pattern matching (extraction, classification, rag, agents)"
|
|
- "MCP integration with baml_Docs server"
|
|
- "Multi-tier caching strategy"
|
|
- "Test and integration generation"
|
|
- "5-layer validation pipeline"
|