use crate::coding::blueprint::{BlueprintExecution, BlueprintRecipe, Capability, RecipeProgram};
use crate::coding::blueprint_programs::{
JAVASCRIPT_HTTP_JSON_STATS, PYTHON_CRYPTO_PORTFOLIO_TRACKER, PYTHON_HTTP_JSON_STATS,
PYTHON_PERSONAL_BUDGET_REPORT, PYTHON_SMART_TRAVEL_PLANNER, RUST_HTTP_JSON_STATS,
RUST_SELF_SOURCE_METRICS,
};
pub const CAPABILITIES: &[Capability] = &[
Capability {
slug: "http_request",
label: "Make an HTTP request",
keywords: &[
"http",
"https",
"url",
"get request",
"http get",
"fetch",
"download",
"запрос",
"ссылк",
"загруз",
"स्थानांतरण",
"अनुरोध",
"请求",
"下载",
"网址",
],
},
Capability {
slug: "json_parse",
label: "Parse the JSON response",
keywords: &[
"json",
"parse",
"parses",
"parsing",
"deserialize",
"разбор",
"разобрать",
"парсинг",
"जेसन",
"पार्स",
"解析",
],
},
Capability {
slug: "statistics",
label: "Calculate statistics (mean, median)",
keywords: &[
"statistics",
"statistic",
"mean",
"average",
"median",
"статистик",
"среднее",
"медиан",
"औसत",
"माध्यिका",
"सांख्यिकी",
"统计",
"平均",
"中位数",
],
},
Capability {
slug: "output_results",
label: "Output the results",
keywords: &[
"output",
"print",
"outputs",
"display",
"report",
"вывод",
"вывести",
"печат",
"आउटपुट",
"छाप",
"输出",
"打印",
"显示",
],
},
Capability {
slug: "error_handling",
label: "Handle errors",
keywords: &[
"error handling",
"error-handling",
"errors",
"error",
"exception",
"ошибк",
"обработк",
"त्रुटि",
"错误",
"异常",
],
},
Capability {
slug: "comments",
label: "Document the code with comments",
keywords: &[
"comments",
"comment",
"commented",
"documented",
"комментар",
"टिप्पणि",
"注释",
"评论",
],
},
Capability {
slug: "web_research",
label: "Research current source data",
keywords: &[
"search",
"research",
"sources",
"source",
"look up",
"current",
"average",
"поиск",
"источник",
"источники",
"искать",
"खोज",
"स्रोत",
"वर्तमान",
"搜索",
"来源",
],
},
Capability {
slug: "city_costs",
label: "Compare city living costs",
keywords: &[
"living costs",
"cost of living",
"average rent",
"rent",
"moscow",
"berlin",
"new york",
"city",
"cities",
"аренда",
"стоимость жизни",
"москва",
"берлин",
"нью-йорк",
"जीवन यापन",
"लागत",
"किराया",
"मास्को",
"बर्लिन",
"न्यूयॉर्क",
"租金",
"生活成本",
],
},
Capability {
slug: "visa_requirements",
label: "Check visa requirements",
keywords: &["visa", "visa-free", "russian citizens", "requirements"],
},
Capability {
slug: "flight_costs",
label: "Estimate flight costs",
keywords: &[
"flight costs",
"flight cost",
"flight",
"from moscow",
"next 3 months",
"destinations",
],
},
Capability {
slug: "travel_planner_class",
label: "Build a travel-planner class",
keywords: &[
"travel planner",
"travelplanner",
"itinerary",
"generate_itinerary",
"add_destination",
"destination",
"trip",
"class",
],
},
Capability {
slug: "budget_flags",
label: "Flag destinations over budget",
keywords: &[
"budget < estimated cost",
"budget warning",
"estimated cost",
"prioritize",
"visa-free access",
"flag",
"budget",
],
},
Capability {
slug: "sample_itinerary",
label: "Generate a sample itinerary",
keywords: &[
"sample output",
"sample itinerary",
"7-day",
"7 day",
"$2000",
"$2,000",
],
},
Capability {
slug: "budget_rule",
label: "Apply the 50/30/20 budget rule",
keywords: &[
"50/30/20",
"budget rule",
"monthly income",
"income",
"needs",
"wants",
"savings",
"бюджет",
"доход",
"сбереж",
"बजट",
"आय",
"बचत",
"预算",
"收入",
],
},
Capability {
slug: "compound_savings",
label: "Project compound savings",
keywords: &[
"annual return",
"return",
"8%",
"10 years",
"$3000",
"100,000",
"100000",
"years to save",
"накопить",
"доходность",
"वार्षिक रिटर्न",
"रिटर्न",
"साल",
"收益",
"年",
],
},
Capability {
slug: "markdown_report",
label: "Export a Markdown comparison report",
keywords: &[
"markdown",
"formatted markdown",
"report",
"comparison table",
"table",
"export",
"отчет",
"отчёт",
"таблица",
"экспорт",
"मार्कडाउन",
"रिपोर्ट",
"तालिका",
"निर्यात",
"报告",
"表格",
"导出",
],
},
Capability {
slug: "source_text",
label: "Read the program's own source code as text",
keywords: &["own source", "source code as text", "itself"],
},
Capability {
slug: "source_metrics",
label: "Count functions, loops, conditionals, and comments",
keywords: &["functions", "loops", "conditionals", "comments"],
},
Capability {
slug: "complexity_score",
label: "Calculate a cyclomatic-complexity score",
keywords: &["complexity score", "cyclomatic", "complexity"],
},
Capability {
slug: "json_report",
label: "Output the metrics as JSON",
keywords: &["json report", "json", "metrics"],
},
Capability {
slug: "self_response_analysis",
label: "Analyze the assistant response with the same metrics",
keywords: &["your own response", "reasoning text", "same metrics"],
},
Capability {
slug: "complexity_comparison",
label: "Compare code complexity with reasoning-text complexity",
keywords: &["compare", "more complex", "which is more complex"],
},
Capability {
slug: "crypto_prices",
label: "Fetch current crypto prices",
keywords: &[
"crypto",
"btc",
"eth",
"ton",
"usdt",
"current prices",
"public api",
],
},
Capability {
slug: "portfolio_holdings",
label: "Model portfolio holdings",
keywords: &["portfolio", "holdings"],
},
Capability {
slug: "portfolio_calculations",
label: "Calculate total value, 24h changes, and weights",
keywords: &[
"total value",
"value in usd",
"24h change",
"weight distribution",
],
},
Capability {
slug: "alert_logic",
label: "Notify when an asset drops more than 5%",
keywords: &["alert", "notify", "drops"],
},
Capability {
slug: "mock_api",
label: "Mock the public API endpoint",
keywords: &["mock", "mock endpoint"],
},
];
pub const RECIPES: &[BlueprintRecipe] = &[
BlueprintRecipe {
slug: "http_json_stats",
label: "fetch JSON over HTTP and report the mean and median of its numbers",
required_capabilities: &["http_request", "json_parse", "statistics"],
programs: &[
RecipeProgram {
language_slug: "rust",
libraries: &["reqwest (blocking, json)", "serde_json"],
run_command: "cargo run -- <url-returning-json>",
execution: BlueprintExecution::ExternalLibrariesAndNetwork,
code: RUST_HTTP_JSON_STATS,
},
RecipeProgram {
language_slug: "python",
libraries: &["requests"],
run_command: "python stats.py <url-returning-json>",
execution: BlueprintExecution::ExternalLibrariesAndNetwork,
code: PYTHON_HTTP_JSON_STATS,
},
RecipeProgram {
language_slug: "javascript",
libraries: &["Node.js 18+ (built-in global fetch; no extra packages)"],
run_command: "node stats.js <url-returning-json>",
execution: BlueprintExecution::ExternalLibrariesAndNetwork,
code: JAVASCRIPT_HTTP_JSON_STATS,
},
],
},
BlueprintRecipe {
slug: "personal_budget_report",
label: "build a sourced 50/30/20 city budget calculator and Markdown report",
required_capabilities: &[
"web_research",
"city_costs",
"budget_rule",
"compound_savings",
"markdown_report",
],
programs: &[RecipeProgram {
language_slug: "python",
libraries: &["Python 3 standard library only"],
run_command: "python budget_report.py",
execution: BlueprintExecution::ReviewDataAssumptions,
code: PYTHON_PERSONAL_BUDGET_REPORT,
}],
},
BlueprintRecipe {
slug: "smart_travel_planner",
label: "build a sourced travel planner class with visa, flight-cost, budget, and itinerary logic",
required_capabilities: &[
"web_research",
"visa_requirements",
"flight_costs",
"travel_planner_class",
"budget_flags",
"sample_itinerary",
],
programs: &[RecipeProgram {
language_slug: "python",
libraries: &["Python 3 standard library only"],
run_command: "python travel_planner.py",
execution: BlueprintExecution::ReviewDataAssumptions,
code: PYTHON_SMART_TRAVEL_PLANNER,
}],
},
BlueprintRecipe {
slug: "self_source_metrics_report",
label:
"inspect its own Rust source, emit JSON metrics, and compare code with response prose",
required_capabilities: &[
"source_text",
"source_metrics",
"complexity_score",
"json_report",
"self_response_analysis",
"complexity_comparison",
],
programs: &[RecipeProgram {
language_slug: "rust",
libraries: &["Rust standard library only"],
run_command: "cargo run",
execution: BlueprintExecution::LocalSourceAnalysis,
code: RUST_SELF_SOURCE_METRICS,
}],
},
BlueprintRecipe {
slug: "crypto_portfolio_tracker",
label: "simulate a crypto portfolio tracker with alerts and a Markdown dashboard",
required_capabilities: &[
"crypto_prices",
"portfolio_holdings",
"portfolio_calculations",
"alert_logic",
"mock_api",
"markdown_report",
],
programs: &[RecipeProgram {
language_slug: "python",
libraries: &["Python 3 standard library only"],
run_command: "python crypto_portfolio.py",
execution: BlueprintExecution::ReviewDataAssumptions,
code: PYTHON_CRYPTO_PORTFOLIO_TRACKER,
}],
},
];