robot_lab 0.3.0 → 0.3.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/lib/robot_lab/mcp/transports/streamable_http.rb +1 -1
- data/lib/robot_lab/version.rb +1 -1
- metadata +3 -253
- data/.architecture/AGENTS.md +0 -32
- data/.architecture/config.yml +0 -8
- data/.architecture/members.yml +0 -60
- data/.architecture/reviews/feature-free-will.md +0 -490
- data/.architecture/reviews/overall-codebase.md +0 -427
- data/.claude/settings.local.json +0 -57
- data/.codex/config.toml +0 -2
- data/.envrc +0 -6
- data/.github/workflows/deploy-github-pages.yml +0 -52
- data/.irbrc +0 -6
- data/.loki +0 -65
- data/.quality/reek_baseline.txt +0 -43
- data/.rubocop.yml +0 -10
- data/Archspec.rb +0 -44
- data/CLAUDE.md +0 -141
- data/COMMITS.md +0 -196
- data/Rakefile +0 -193
- data/_typos.toml +0 -21
- data/agent2agent_review.md +0 -192
- data/agentf_improvements.md +0 -253
- data/agents.md +0 -14
- data/docs/api/core/index.md +0 -147
- data/docs/api/core/memory.md +0 -578
- data/docs/api/core/network.md +0 -553
- data/docs/api/core/result.md +0 -211
- data/docs/api/core/robot.md +0 -1667
- data/docs/api/core/state.md +0 -145
- data/docs/api/core/tool.md +0 -520
- data/docs/api/errors.md +0 -323
- data/docs/api/hooks.md +0 -469
- data/docs/api/index.md +0 -137
- data/docs/api/mcp/client.md +0 -387
- data/docs/api/mcp/index.md +0 -267
- data/docs/api/mcp/server.md +0 -252
- data/docs/api/mcp/transports.md +0 -339
- data/docs/api/messages/index.md +0 -126
- data/docs/api/messages/text-message.md +0 -170
- data/docs/api/messages/tool-call-message.md +0 -206
- data/docs/api/messages/tool-result-message.md +0 -242
- data/docs/api/messages/user-message.md +0 -232
- data/docs/api/skills.md +0 -423
- data/docs/api/streaming/context.md +0 -280
- data/docs/api/streaming/events.md +0 -185
- data/docs/api/streaming/index.md +0 -156
- data/docs/api/support.md +0 -846
- data/docs/architecture/core-concepts.md +0 -575
- data/docs/architecture/index.md +0 -252
- data/docs/architecture/message-flow.md +0 -366
- data/docs/architecture/network-orchestration.md +0 -478
- data/docs/architecture/robot-execution.md +0 -396
- data/docs/architecture/state-management.md +0 -410
- data/docs/assets/css/custom.css +0 -56
- data/docs/assets/images/robot_lab.jpg +0 -0
- data/docs/concepts.md +0 -641
- data/docs/examples/basic-chat.md +0 -258
- data/docs/examples/index.md +0 -425
- data/docs/examples/mcp-server.md +0 -403
- data/docs/examples/multi-robot-network.md +0 -476
- data/docs/examples/tool-usage.md +0 -468
- data/docs/getting-started/configuration.md +0 -645
- data/docs/getting-started/index.md +0 -56
- data/docs/getting-started/installation.md +0 -197
- data/docs/getting-started/quick-start.md +0 -293
- data/docs/guides/building-robots.md +0 -1187
- data/docs/guides/creating-networks.md +0 -736
- data/docs/guides/hooks.md +0 -1206
- data/docs/guides/index.md +0 -78
- data/docs/guides/knowledge.md +0 -219
- data/docs/guides/mcp-integration.md +0 -740
- data/docs/guides/memory.md +0 -458
- data/docs/guides/observability.md +0 -733
- data/docs/guides/streaming.md +0 -323
- data/docs/guides/using-tools.md +0 -780
- data/docs/index.md +0 -280
- data/docs/superpowers/plans/2026-05-06-agentskills.md +0 -1303
- data/docs/superpowers/specs/2026-05-06-agentskills-design.md +0 -247
- data/examples/.envrc +0 -3
- data/examples/01_simple_robot.rb +0 -31
- data/examples/02_tools.rb +0 -109
- data/examples/03_network.rb +0 -118
- data/examples/04_mcp.rb +0 -217
- data/examples/05_streaming.rb +0 -137
- data/examples/06_prompt_templates.rb +0 -325
- data/examples/07_network_memory.rb +0 -313
- data/examples/08_llm_config.rb +0 -162
- data/examples/09_chaining.rb +0 -251
- data/examples/10_memory.rb +0 -315
- data/examples/11_network_introspection.rb +0 -239
- data/examples/12_message_bus.rb +0 -67
- data/examples/13_spawn.rb +0 -85
- data/examples/14_rusty_circuit/.envrc +0 -1
- data/examples/14_rusty_circuit/.gitignore +0 -1
- data/examples/14_rusty_circuit/README.md +0 -1
- data/examples/14_rusty_circuit/comic.rb +0 -149
- data/examples/14_rusty_circuit/display.rb +0 -217
- data/examples/14_rusty_circuit/heckler.rb +0 -65
- data/examples/14_rusty_circuit/open_mic.rb +0 -132
- data/examples/14_rusty_circuit/prompts/open_mic_comic.md +0 -20
- data/examples/14_rusty_circuit/prompts/open_mic_heckler.md +0 -23
- data/examples/14_rusty_circuit/prompts/open_mic_scout.md +0 -20
- data/examples/14_rusty_circuit/scout.rb +0 -165
- data/examples/14_rusty_circuit/show.log +0 -234
- data/examples/15_memory_network_and_bus/.envrc +0 -1
- data/examples/15_memory_network_and_bus/README.md +0 -66
- data/examples/15_memory_network_and_bus/editor_in_chief.rb +0 -24
- data/examples/15_memory_network_and_bus/editorial_pipeline.rb +0 -213
- data/examples/15_memory_network_and_bus/linux_writer.rb +0 -80
- data/examples/15_memory_network_and_bus/os_editor.rb +0 -48
- data/examples/15_memory_network_and_bus/os_writer.rb +0 -49
- data/examples/15_memory_network_and_bus/output/combined_article.md +0 -11
- data/examples/15_memory_network_and_bus/output/final_article.md +0 -8
- data/examples/15_memory_network_and_bus/output/linux_draft.md +0 -7
- data/examples/15_memory_network_and_bus/output/mac_draft.md +0 -7
- data/examples/15_memory_network_and_bus/output/memory.json +0 -13
- data/examples/15_memory_network_and_bus/output/revision_1.md +0 -29
- data/examples/15_memory_network_and_bus/output/revision_2.md +0 -50
- data/examples/15_memory_network_and_bus/output/revision_3.md +0 -8
- data/examples/15_memory_network_and_bus/output/windows_draft.md +0 -7
- data/examples/15_memory_network_and_bus/prompts/os_advocate.md +0 -13
- data/examples/15_memory_network_and_bus/prompts/os_chief.md +0 -13
- data/examples/15_memory_network_and_bus/prompts/os_editor.md +0 -13
- data/examples/16_writers_room/.envrc +0 -1
- data/examples/16_writers_room/display.rb +0 -158
- data/examples/16_writers_room/output/.gitignore +0 -4
- data/examples/16_writers_room/output/README.md +0 -69
- data/examples/16_writers_room/output/opus_001.md +0 -263
- data/examples/16_writers_room/output/opus_001_notes.log +0 -470
- data/examples/16_writers_room/output/opus_002.md +0 -245
- data/examples/16_writers_room/output/opus_002_notes.log +0 -546
- data/examples/16_writers_room/output/opus_002_screenplay.md +0 -7989
- data/examples/16_writers_room/output/opus_002_screenplay_notes.md +0 -993
- data/examples/16_writers_room/prompts/screenplay_writer.md +0 -66
- data/examples/16_writers_room/prompts/writer.md +0 -37
- data/examples/16_writers_room/room.rb +0 -186
- data/examples/16_writers_room/tools.rb +0 -173
- data/examples/16_writers_room/writer.rb +0 -121
- data/examples/16_writers_room/writers_room.rb +0 -256
- data/examples/17_skills.rb +0 -234
- data/examples/18_rails/.envrc +0 -3
- data/examples/18_rails/.gitignore +0 -5
- data/examples/18_rails/Gemfile +0 -11
- data/examples/18_rails/README.md +0 -67
- data/examples/18_rails/Rakefile +0 -4
- data/examples/18_rails/app/controllers/application_controller.rb +0 -4
- data/examples/18_rails/app/controllers/chat_controller.rb +0 -50
- data/examples/18_rails/app/jobs/application_job.rb +0 -4
- data/examples/18_rails/app/jobs/robot_run_job.rb +0 -25
- data/examples/18_rails/app/models/application_record.rb +0 -5
- data/examples/18_rails/app/models/robot_lab_result.rb +0 -36
- data/examples/18_rails/app/models/robot_lab_thread.rb +0 -23
- data/examples/18_rails/app/robots/chat_robot.rb +0 -25
- data/examples/18_rails/app/tools/time_tool.rb +0 -9
- data/examples/18_rails/app/views/chat/_user_message.html.erb +0 -1
- data/examples/18_rails/app/views/chat/index.html.erb +0 -67
- data/examples/18_rails/app/views/layouts/application.html.erb +0 -49
- data/examples/18_rails/bin/dev +0 -7
- data/examples/18_rails/bin/rails +0 -6
- data/examples/18_rails/bin/setup +0 -15
- data/examples/18_rails/config/application.rb +0 -33
- data/examples/18_rails/config/cable.yml +0 -2
- data/examples/18_rails/config/database.yml +0 -5
- data/examples/18_rails/config/environment.rb +0 -4
- data/examples/18_rails/config/initializers/robot_lab.rb +0 -11
- data/examples/18_rails/config/routes.rb +0 -6
- data/examples/18_rails/config.ru +0 -4
- data/examples/18_rails/db/migrate/001_create_robot_lab_tables.rb +0 -32
- data/examples/19_token_tracking.rb +0 -138
- data/examples/20_circuit_breaker.rb +0 -147
- data/examples/21_learning_loop.rb +0 -181
- data/examples/22_context_compression.rb +0 -172
- data/examples/23_convergence.rb +0 -133
- data/examples/24_structured_delegation.rb +0 -151
- data/examples/25_history_search/conversation.jsonl +0 -30
- data/examples/25_history_search.rb +0 -133
- data/examples/26_document_store/api_versioning_adr.md +0 -52
- data/examples/26_document_store/incident_postmortem.md +0 -46
- data/examples/26_document_store/postgres_runbook.md +0 -49
- data/examples/26_document_store/redis_caching_guide.md +0 -48
- data/examples/26_document_store/sidekiq_guide.md +0 -51
- data/examples/26_document_store.rb +0 -140
- data/examples/27_incident_response/README.md +0 -65
- data/examples/27_incident_response/incident_response.rb +0 -261
- data/examples/28_mcp_discovery.rb +0 -113
- data/examples/29_ractor_tools.rb +0 -240
- data/examples/30_ractor_network.rb +0 -252
- data/examples/31_launch_assessment.rb +0 -246
- data/examples/32_newsletter_reader.rb +0 -193
- data/examples/33_stock_generator.rb +0 -80
- data/examples/33_stock_predictor.rb +0 -327
- data/examples/34_agentskills.rb +0 -76
- data/examples/35_hooks.rb +0 -266
- data/examples/README.md +0 -550
- data/examples/common.rb +0 -180
- data/examples/prompts/assistant.md +0 -5
- data/examples/prompts/audit_trail.md +0 -8
- data/examples/prompts/billing.md +0 -10
- data/examples/prompts/classifier.md +0 -7
- data/examples/prompts/comedian.md +0 -6
- data/examples/prompts/comedy_critic.md +0 -10
- data/examples/prompts/configurable.md +0 -9
- data/examples/prompts/dispatcher.md +0 -12
- data/examples/prompts/entity_extractor.md +0 -14
- data/examples/prompts/escalation.md +0 -42
- data/examples/prompts/frontmatter_mcp_test.md +0 -9
- data/examples/prompts/frontmatter_named_test.md +0 -5
- data/examples/prompts/frontmatter_tools_test.md +0 -6
- data/examples/prompts/general.md +0 -7
- data/examples/prompts/github_assistant.md +0 -14
- data/examples/prompts/helper.md +0 -4
- data/examples/prompts/incident_responder.md +0 -18
- data/examples/prompts/keyword_extractor.md +0 -11
- data/examples/prompts/llm_config_demo.md +0 -20
- data/examples/prompts/order_support.md +0 -35
- data/examples/prompts/os_advocate.md +0 -13
- data/examples/prompts/os_chief.md +0 -13
- data/examples/prompts/os_editor.md +0 -13
- data/examples/prompts/parameterized_main_test.md +0 -6
- data/examples/prompts/pii_redactor.md +0 -7
- data/examples/prompts/product_support.md +0 -37
- data/examples/prompts/runbook_protocol.md +0 -12
- data/examples/prompts/sentiment_analyzer.md +0 -12
- data/examples/prompts/skill_a_test.md +0 -4
- data/examples/prompts/skill_b_test.md +0 -4
- data/examples/prompts/skill_config_test.md +0 -5
- data/examples/prompts/skill_cycle_a_test.md +0 -6
- data/examples/prompts/skill_cycle_b_test.md +0 -6
- data/examples/prompts/skill_description_test.md +0 -4
- data/examples/prompts/skill_leaf_test.md +0 -4
- data/examples/prompts/skill_nested_test.md +0 -6
- data/examples/prompts/skill_refs_main_test.md +0 -6
- data/examples/prompts/skill_self_ref_test.md +0 -6
- data/examples/prompts/skill_with_mcp_test.md +0 -9
- data/examples/prompts/skill_with_params_test.md +0 -6
- data/examples/prompts/skill_with_robot_name_test.md +0 -5
- data/examples/prompts/skill_with_tools_test.md +0 -6
- data/examples/prompts/sre_compliance.md +0 -10
- data/examples/prompts/structured_output.md +0 -7
- data/examples/prompts/synthesizer.md +0 -17
- data/examples/prompts/technical.md +0 -10
- data/examples/prompts/template_with_skills_test.md +0 -6
- data/examples/prompts/triage.md +0 -22
- data/examples/ruboruby.md +0 -423
- data/examples/run_all.rb +0 -60
- data/examples/xyzzy.rb +0 -97
- data/logfile +0 -8
- data/mkdocs.yml +0 -209
- data/robot_concurrency.md +0 -38
- data/simple_acp_review.md +0 -298
- data/temp.md +0 -6
- data/tool_manifest_plan.md +0 -155
data/examples/common.rb
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# The examples are runnable directly (./01_simple_robot.rb) as well as via
|
|
4
|
-
# bundle exec. Without bundler/setup, bare requires let RubyGems activate the
|
|
5
|
-
# newest installed json (3.x), which conflicts with ruby_llm's json (< 3) pin;
|
|
6
|
-
# the lockfile pins json 2.x, so honor it in both invocation styles.
|
|
7
|
-
#
|
|
8
|
-
# The workspace .envrc exports BUNDLE_GEMFILE as a RELATIVE path ("Gemfile" or
|
|
9
|
-
# "Gemfile.local"), which bundler resolves against the cwd — so a demo run
|
|
10
|
-
# from examples/ or a subdirectory demo run from its own directory would look
|
|
11
|
-
# for a Gemfile there. Anchor the basename to the gem root before bundler
|
|
12
|
-
# sees it, preserving the prod/dev (Gemfile vs Gemfile.local) choice.
|
|
13
|
-
ENV["BUNDLE_GEMFILE"] = File.expand_path(
|
|
14
|
-
"../#{File.basename(ENV.fetch("BUNDLE_GEMFILE", "Gemfile"))}", __dir__
|
|
15
|
-
)
|
|
16
|
-
require "bundler/setup"
|
|
17
|
-
|
|
18
|
-
require "logger"
|
|
19
|
-
|
|
20
|
-
# Fallback for when direnv has not activated examples/.envrc
|
|
21
|
-
ENV["ROBOT_LAB_TEMPLATE_PATH"] ||= File.join(__dir__, "prompts")
|
|
22
|
-
|
|
23
|
-
require_relative "../lib/robot_lab"
|
|
24
|
-
require "ruby_llm/providers/lms"
|
|
25
|
-
|
|
26
|
-
# robot_lab's dependencies load parts of ActiveSupport, so amazing_print 3.0
|
|
27
|
-
# sees the constant and loads its ActiveSupport extension, which at require
|
|
28
|
-
# time calls ActiveSupport.try and reads ActiveSupport::LogSubscriber —
|
|
29
|
-
# neither of which those parts provide. Load both up front so any demo can
|
|
30
|
-
# `require "amazing_print"` safely.
|
|
31
|
-
require "active_support/core_ext/object/try"
|
|
32
|
-
require "active_support/log_subscriber"
|
|
33
|
-
|
|
34
|
-
# ── Local LLM Configuration ───────────────────────────────────────────────────
|
|
35
|
-
#
|
|
36
|
-
# Every example runs against a LOCAL model served by LM Studio through the
|
|
37
|
-
# ruby_llm-providers-lms gem (provider :lms). No API keys, no network egress,
|
|
38
|
-
# no per-token cost. Start the server and download the models once:
|
|
39
|
-
#
|
|
40
|
-
# lms server start
|
|
41
|
-
# lms get qwen/qwen3.8-27b
|
|
42
|
-
# lms get openai/gpt-oss-20b
|
|
43
|
-
#
|
|
44
|
-
# Model choice: qwen/qwen3.8-27b for complex activities (tools, structured
|
|
45
|
-
# output, multi-robot reasoning — it honors tool_choice and schemas), and
|
|
46
|
-
# openai/gpt-oss-20b for simpler items (plain chat, streaming).
|
|
47
|
-
#
|
|
48
|
-
# LM Studio models are not in RubyLLM's model registry, so a `provider:` must
|
|
49
|
-
# be supplied alongside `model:` — that is what makes RubyLLM skip the
|
|
50
|
-
# registry lookup (see Robot#initialize, which sets assume_model_exists when
|
|
51
|
-
# provider is given). Use the `llm_opts` helper below so every robot gets both.
|
|
52
|
-
|
|
53
|
-
LlmConfig = Data.define(:provider, :model)
|
|
54
|
-
|
|
55
|
-
LLM = {
|
|
56
|
-
default: LlmConfig.new(provider: "lms", model: "qwen/qwen3.8-27b"),
|
|
57
|
-
small: LlmConfig.new(provider: "lms", model: "openai/gpt-oss-20b"),
|
|
58
|
-
large: LlmConfig.new(provider: "lms", model: "qwen/qwen3.8-27b")
|
|
59
|
-
}.freeze
|
|
60
|
-
|
|
61
|
-
LMS_API_BASE = ENV.fetch("LMS_API_BASE", "http://localhost:1234/v1")
|
|
62
|
-
|
|
63
|
-
# ORDER MATTERS. The first touch of RobotLab.config runs Config#after_load,
|
|
64
|
-
# which calls RubyLLM.configure itself and would clobber anything set before
|
|
65
|
-
# it. So configure RobotLab first, then RubyLLM — the later block wins.
|
|
66
|
-
RobotLab.configure do |c|
|
|
67
|
-
c.logger = Logger.new(File::NULL)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
RubyLLM.configure do |c|
|
|
71
|
-
c.logger = Logger.new(File::NULL)
|
|
72
|
-
c.default_model = LLM[:default].model
|
|
73
|
-
c.lms_api_base = LMS_API_BASE
|
|
74
|
-
|
|
75
|
-
# A large local model on consumer hardware is far slower than a hosted API,
|
|
76
|
-
# and robot_lab's bundled 120s default is comfortably exceeded by a long
|
|
77
|
-
# answer from a 20B+ model — which surfaces mid-run as Net::ReadTimeout.
|
|
78
|
-
#
|
|
79
|
-
# Integer(), not the raw env string: this value reaches Net::HTTP directly,
|
|
80
|
-
# and a String raises "can't convert String into time interval". That is
|
|
81
|
-
# also why the ROBOT_LAB_RUBY_LLM__REQUEST_TIMEOUT env var is the wrong
|
|
82
|
-
# lever here — env values arrive as strings.
|
|
83
|
-
c.request_timeout = Integer(ENV.fetch("LLM_REQUEST_TIMEOUT", "900"))
|
|
84
|
-
c.max_retries = 1
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# Which LLM entry an unqualified llm_opts resolves to. Lets you run any
|
|
88
|
-
# example against a faster model without editing it — worth knowing for the
|
|
89
|
-
# multi-robot demos (14, 15, 16), which are 30+ sequential LLM calls and take
|
|
90
|
-
# over half an hour on a 20B+ model:
|
|
91
|
-
#
|
|
92
|
-
# LLM_PROFILE=small bundle exec ruby examples/14_rusty_circuit/open_mic.rb
|
|
93
|
-
LLM_PROFILE = ENV.fetch("LLM_PROFILE", "default").to_sym
|
|
94
|
-
|
|
95
|
-
unless LLM.key?(LLM_PROFILE)
|
|
96
|
-
abort "Unknown LLM_PROFILE #{LLM_PROFILE.inspect}. Choose one of: #{LLM.keys.join(', ')}"
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
# Provider + model keyword pair for RobotLab.build / Robot.new.
|
|
100
|
-
#
|
|
101
|
-
# Both are required for a local LM Studio model. Splat it into any robot
|
|
102
|
-
# constructor:
|
|
103
|
-
#
|
|
104
|
-
# RobotLab.build(name: "helper", **llm_opts) # honors LLM_PROFILE
|
|
105
|
-
# RobotLab.build(name: "cheap", **llm_opts(:small)) # pinned regardless
|
|
106
|
-
#
|
|
107
|
-
# @param key [Symbol, nil] which entry of LLM to use; defaults to LLM_PROFILE
|
|
108
|
-
# @return [Hash] { provider:, model: }
|
|
109
|
-
def llm_opts(key = nil)
|
|
110
|
-
cfg = LLM.fetch(key || LLM_PROFILE)
|
|
111
|
-
{ provider: cfg.provider, model: cfg.model }
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
# Fail fast with an actionable message when LM Studio isn't reachable,
|
|
115
|
-
# instead of letting every example die inside an HTTP adapter.
|
|
116
|
-
def require_lms!
|
|
117
|
-
require "net/http"
|
|
118
|
-
uri = URI("#{LMS_API_BASE.sub(%r{/v1/?\z}, '')}/v1/models")
|
|
119
|
-
Net::HTTP.start(uri.host, uri.port, open_timeout: 2, read_timeout: 2) { |h| h.get(uri.request_uri) }
|
|
120
|
-
rescue StandardError => e
|
|
121
|
-
abort <<~ERROR
|
|
122
|
-
Cannot reach LM Studio at #{LMS_API_BASE} (#{e.class}).
|
|
123
|
-
|
|
124
|
-
Start the server and download the models used by the examples:
|
|
125
|
-
lms server start
|
|
126
|
-
lms get #{LLM[:default].model}
|
|
127
|
-
lms get #{LLM[:small].model}
|
|
128
|
-
ERROR
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
# ── Example Output Helpers ─────────────────────────────────────────────────────
|
|
132
|
-
|
|
133
|
-
module ExOut
|
|
134
|
-
WIDTH = 68
|
|
135
|
-
RESET = "\e[0m"
|
|
136
|
-
BOLD = "\e[1m"
|
|
137
|
-
DIM = "\e[2m"
|
|
138
|
-
CYAN = "\e[36m"
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# Prints a bold top-level header. Extracts the example number from $0
|
|
142
|
-
# automatically so callers only supply the title.
|
|
143
|
-
def banner(title)
|
|
144
|
-
num = File.basename($0, ".rb")[/^\d+/]&.to_i
|
|
145
|
-
label = num ? "Example #{num}: #{title}" : title
|
|
146
|
-
puts
|
|
147
|
-
puts "#{ExOut::BOLD}#{"=" * ExOut::WIDTH}#{ExOut::RESET}"
|
|
148
|
-
puts "#{ExOut::BOLD} #{label}#{ExOut::RESET}"
|
|
149
|
-
puts "#{ExOut::BOLD}#{"=" * ExOut::WIDTH}#{ExOut::RESET}"
|
|
150
|
-
puts
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
# Prints a named section divider with a cyan rule.
|
|
154
|
-
def section(title)
|
|
155
|
-
puts
|
|
156
|
-
tail = "─" * [ExOut::WIDTH - title.length - 4, 2].max
|
|
157
|
-
puts "#{ExOut::BOLD}#{ExOut::CYAN}── #{title} #{tail}#{ExOut::RESET}"
|
|
158
|
-
puts
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
# Prints a plain dim horizontal rule.
|
|
162
|
-
def hr
|
|
163
|
-
puts "#{ExOut::DIM}#{"─" * ExOut::WIDTH}#{ExOut::RESET}"
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
# Prints a Rouge-highlighted Ruby code block with a framed border.
|
|
167
|
-
def show_code(ruby_string, label: "ruby")
|
|
168
|
-
require "rouge"
|
|
169
|
-
w = ExOut::WIDTH - 2
|
|
170
|
-
border = "#{ExOut::DIM} #{"─" * w}#{ExOut::RESET}"
|
|
171
|
-
output = Rouge::Formatters::Terminal256.new
|
|
172
|
-
.format(Rouge::Lexers::Ruby.new.lex(ruby_string))
|
|
173
|
-
output += "\n" unless output.end_with?("\n")
|
|
174
|
-
puts
|
|
175
|
-
puts "#{ExOut::DIM} #{label}#{ExOut::RESET}"
|
|
176
|
-
puts border
|
|
177
|
-
output.each_line { |l| print " #{l}" }
|
|
178
|
-
puts border
|
|
179
|
-
puts
|
|
180
|
-
end
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Include audit metadata in every response
|
|
3
|
-
---
|
|
4
|
-
Include an "audit" field in every response with:
|
|
5
|
-
- "timestamp": the current date/time you were asked (use ISO 8601)
|
|
6
|
-
- "confidence": your confidence level from 0.0 to 1.0
|
|
7
|
-
- "sources": list of data sources or signals you used for your assessment
|
|
8
|
-
- "assumptions": any assumptions you made due to missing information
|
data/examples/prompts/billing.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Demanding comedy critic that evaluates jokes
|
|
3
|
-
temperature: 0.2
|
|
4
|
-
---
|
|
5
|
-
You are a brutally demanding comedy critic. You have extremely high
|
|
6
|
-
standards. Most jokes are NOT funny to you — predictable puns, obvious
|
|
7
|
-
wordplay, and basic setups bore you. Only truly clever, surprising, or
|
|
8
|
-
brilliantly constructed jokes earn your approval.
|
|
9
|
-
Reply with EXACTLY one word on the first line: FUNNY or NOT_FUNNY
|
|
10
|
-
Then on the next line give a one-sentence explanation of your verdict.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Dispatcher that decides which specialist to spawn
|
|
3
|
-
temperature: 0.2
|
|
4
|
-
---
|
|
5
|
-
You are a dispatcher. Given a user question, decide which ONE specialist
|
|
6
|
-
should handle it. Reply with EXACTLY two lines:
|
|
7
|
-
|
|
8
|
-
Line 1: the specialist role as a single lowercase_snake_case word
|
|
9
|
-
(e.g. historian, scientist, poet, philosopher, mathematician)
|
|
10
|
-
Line 2: a one-sentence system prompt that tells that specialist how to behave
|
|
11
|
-
|
|
12
|
-
Nothing else. No preamble, no explanation.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Entity extraction expert
|
|
3
|
-
---
|
|
4
|
-
You are an entity extraction expert. Your job is to identify named entities in text.
|
|
5
|
-
|
|
6
|
-
Analyze the given text and respond with a JSON object containing:
|
|
7
|
-
- people: array of person names mentioned
|
|
8
|
-
- organizations: array of company/organization names
|
|
9
|
-
- locations: array of place names
|
|
10
|
-
- products: array of product/service names
|
|
11
|
-
- dates: array of date/time references
|
|
12
|
-
- other: array of other notable entities
|
|
13
|
-
|
|
14
|
-
Respond ONLY with the JSON object, no additional text.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Senior specialist for escalated cases
|
|
3
|
-
parameters:
|
|
4
|
-
company_name: null
|
|
5
|
-
authorities: null
|
|
6
|
-
customer: null
|
|
7
|
-
---
|
|
8
|
-
You are a senior customer experience specialist for <%= company_name %>, handling escalated and complex cases.
|
|
9
|
-
|
|
10
|
-
## Your Role
|
|
11
|
-
You handle situations that require:
|
|
12
|
-
- Special authorization or exceptions
|
|
13
|
-
- Complex multi-issue resolutions
|
|
14
|
-
- Sensitive customer situations
|
|
15
|
-
- Cases requiring human judgment
|
|
16
|
-
|
|
17
|
-
## Escalation Authorities
|
|
18
|
-
<% authorities.each do |auth| %>
|
|
19
|
-
- **<%= auth[:name] %>**: <%= auth[:description] %> (Limit: <%= auth[:limit] %>)
|
|
20
|
-
<% end %>
|
|
21
|
-
|
|
22
|
-
## Customer Information
|
|
23
|
-
- Name: <%= customer[:name] %>
|
|
24
|
-
- Account Type: <%= customer[:account_type] %>
|
|
25
|
-
- Customer Since: <%= customer[:member_since] %>
|
|
26
|
-
- Lifetime Value: $<%= customer[:lifetime_value] %>
|
|
27
|
-
<% if customer[:vip] %>
|
|
28
|
-
- VIP Status: Yes
|
|
29
|
-
<% end %>
|
|
30
|
-
<% if customer[:escalation_history]&.any? %>
|
|
31
|
-
- Previous Escalations: <%= customer[:escalation_history].count %>
|
|
32
|
-
<% end %>
|
|
33
|
-
|
|
34
|
-
## Guidelines
|
|
35
|
-
1. Acknowledge the customer's frustration immediately
|
|
36
|
-
2. Take ownership of the issue
|
|
37
|
-
3. Explain what you CAN do, not what you can't
|
|
38
|
-
4. Use your authorities to resolve issues when justified
|
|
39
|
-
5. If truly beyond scope, prepare a detailed handoff for human agents
|
|
40
|
-
6. Document all actions and decisions
|
|
41
|
-
|
|
42
|
-
Your goal is to turn a frustrated customer into a loyal advocate.
|
data/examples/prompts/general.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: GitHub assistant with MCP tool access
|
|
3
|
-
mcp:
|
|
4
|
-
- name: github
|
|
5
|
-
transport: stdio
|
|
6
|
-
command: npx
|
|
7
|
-
args: ["-y", "@modelcontextprotocol/server-github"]
|
|
8
|
-
---
|
|
9
|
-
You are a helpful GitHub assistant with access to GitHub tools via MCP.
|
|
10
|
-
|
|
11
|
-
You can search repositories, view issues, read file contents, and more.
|
|
12
|
-
Use the available tools to help answer questions about GitHub repositories.
|
|
13
|
-
|
|
14
|
-
Be concise and provide relevant information from the tools when needed.
|
data/examples/prompts/helper.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Incident response analyst for production systems
|
|
3
|
-
parameters:
|
|
4
|
-
team_name: null
|
|
5
|
-
services: null
|
|
6
|
-
on_call_runbook_url: null
|
|
7
|
-
---
|
|
8
|
-
You are the on-call incident response analyst for the <%= team_name %> team.
|
|
9
|
-
|
|
10
|
-
Your team owns these services: <%= Array(services).join(", ") %>.
|
|
11
|
-
|
|
12
|
-
When an incident is reported, analyze the provided alert data, logs, and metrics
|
|
13
|
-
to help the on-call engineer understand what is happening and what to do next.
|
|
14
|
-
|
|
15
|
-
Reference the team runbook at: <%= on_call_runbook_url %>
|
|
16
|
-
|
|
17
|
-
Prioritize reducing customer impact over finding root cause.
|
|
18
|
-
If you are uncertain, say so and recommend escalation.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Keyword extraction expert
|
|
3
|
-
---
|
|
4
|
-
You are a keyword extraction expert. Your job is to identify the most important keywords and topics in text.
|
|
5
|
-
|
|
6
|
-
Analyze the given text and respond with a JSON object containing:
|
|
7
|
-
- keywords: array of the top 5-10 most important keywords/phrases
|
|
8
|
-
- topics: array of 2-3 main topics or themes
|
|
9
|
-
- category: the primary category (e.g., "technology", "business", "health", "entertainment")
|
|
10
|
-
|
|
11
|
-
Respond ONLY with the JSON object, no additional text.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: LLM configuration demo assistant
|
|
3
|
-
parameters:
|
|
4
|
-
environment: "development"
|
|
5
|
-
model: null
|
|
6
|
-
provider: null
|
|
7
|
-
---
|
|
8
|
-
You are a helpful coding assistant that demonstrates the MywayConfig configuration system.
|
|
9
|
-
|
|
10
|
-
Current environment: <%= environment %>
|
|
11
|
-
<% if model %>
|
|
12
|
-
Configured model: <%= model %>
|
|
13
|
-
<% end %>
|
|
14
|
-
<% if provider %>
|
|
15
|
-
Provider: <%= provider %>
|
|
16
|
-
<% end %>
|
|
17
|
-
|
|
18
|
-
Be concise and informative in your responses. When asked about configuration,
|
|
19
|
-
explain how MywayConfig works with YAML defaults, environment-specific overrides,
|
|
20
|
-
XDG config files, and environment variables.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Order support specialist
|
|
3
|
-
parameters:
|
|
4
|
-
company_name: null
|
|
5
|
-
capabilities: null
|
|
6
|
-
policies: null
|
|
7
|
-
customer: null
|
|
8
|
-
---
|
|
9
|
-
You are a friendly and efficient order support specialist for <%= company_name %>.
|
|
10
|
-
|
|
11
|
-
## Your Capabilities
|
|
12
|
-
<% capabilities.each do |capability| %>
|
|
13
|
-
- <%= capability %>
|
|
14
|
-
<% end %>
|
|
15
|
-
|
|
16
|
-
## Policies
|
|
17
|
-
- Refunds: <%= policies[:refund_window] %> day window for returns
|
|
18
|
-
- Shipping: Free shipping on orders over $<%= policies[:free_shipping_threshold] %>
|
|
19
|
-
- Express Processing: Available for <%= policies[:express_fee] %> extra
|
|
20
|
-
|
|
21
|
-
## Customer Information
|
|
22
|
-
- Name: <%= customer[:name] %>
|
|
23
|
-
- Account Type: <%= customer[:account_type] %>
|
|
24
|
-
<% if customer[:vip] %>
|
|
25
|
-
- VIP Customer: Apply priority handling and extended policies
|
|
26
|
-
<% end %>
|
|
27
|
-
|
|
28
|
-
## Guidelines
|
|
29
|
-
1. Always greet the customer by name
|
|
30
|
-
2. Reference specific order numbers when discussing issues
|
|
31
|
-
3. Offer solutions, not just explanations
|
|
32
|
-
4. If a refund is appropriate, process it proactively
|
|
33
|
-
5. For VIP customers, be extra accommodating
|
|
34
|
-
|
|
35
|
-
Be helpful, empathetic, and solution-oriented.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: OS advocate for home AI research labs
|
|
3
|
-
parameters:
|
|
4
|
-
os_name: null
|
|
5
|
-
strengths: null
|
|
6
|
-
---
|
|
7
|
-
You are a passionate advocate for <%= os_name %> as the ideal operating system for a home AI research lab.
|
|
8
|
-
|
|
9
|
-
Key strengths to emphasize: <%= strengths %>
|
|
10
|
-
|
|
11
|
-
Write a 2-3 paragraph advocacy piece arguing why <%= os_name %> is the best choice for someone building a home AI research lab. Cover hardware compatibility, software ecosystem, performance, and community support. Be specific about AI/ML frameworks, GPU support, and developer tooling.
|
|
12
|
-
|
|
13
|
-
Be persuasive but factual. Use concrete examples of tools and workflows.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Editor-in-chief who gives final approval on articles
|
|
3
|
-
---
|
|
4
|
-
You are the editor-in-chief of a technology publication. Review the submitted article for:
|
|
5
|
-
|
|
6
|
-
1. Balance — does it fairly represent all platforms?
|
|
7
|
-
2. Accuracy — are technical claims correct?
|
|
8
|
-
3. Recommendation quality — is the conclusion well-supported?
|
|
9
|
-
4. Readability — is it clear and well-structured?
|
|
10
|
-
|
|
11
|
-
If the article meets your standards, respond starting with APPROVED followed by a brief note on what makes it strong.
|
|
12
|
-
|
|
13
|
-
If it needs work, respond starting with REVISE: followed by specific, actionable feedback on what to improve. Be concise.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Editor who synthesizes OS advocacy drafts into a balanced article
|
|
3
|
-
---
|
|
4
|
-
You are a senior technology editor specializing in AI infrastructure.
|
|
5
|
-
|
|
6
|
-
You will receive three advocacy drafts arguing for different operating systems (macOS, Windows, Linux/BSD) for home AI research labs. Synthesize them into a balanced 4-6 paragraph article that:
|
|
7
|
-
|
|
8
|
-
1. Acknowledges the strengths of each platform
|
|
9
|
-
2. Compares them fairly across key dimensions (cost, GPU support, software ecosystem, ease of use)
|
|
10
|
-
3. Identifies which scenarios favor which OS
|
|
11
|
-
4. Ends with a clear, nuanced recommendation
|
|
12
|
-
|
|
13
|
-
Write in a professional editorial voice. Be objective even though your sources are advocates.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Redact personally identifiable information from output
|
|
3
|
-
---
|
|
4
|
-
Never include real personally identifiable information (PII) in your responses.
|
|
5
|
-
If log data contains email addresses, IP addresses, usernames, or account IDs,
|
|
6
|
-
replace them with redacted placeholders like [EMAIL], [IP], [USER], [ACCOUNT_ID].
|
|
7
|
-
This applies to all fields in your output including explanations.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Product support specialist
|
|
3
|
-
parameters:
|
|
4
|
-
company_name: null
|
|
5
|
-
product_categories: null
|
|
6
|
-
customer: null
|
|
7
|
-
---
|
|
8
|
-
You are a knowledgeable product specialist for <%= company_name %>.
|
|
9
|
-
|
|
10
|
-
## Your Expertise
|
|
11
|
-
You have deep knowledge of our product catalog and can help customers with:
|
|
12
|
-
- Product features and specifications
|
|
13
|
-
- Compatibility questions
|
|
14
|
-
- Usage recommendations
|
|
15
|
-
- Product comparisons
|
|
16
|
-
- Availability and restocking information
|
|
17
|
-
|
|
18
|
-
## Product Categories We Carry
|
|
19
|
-
<% product_categories.each do |category| %>
|
|
20
|
-
- **<%= category[:name] %>**: <%= category[:description] %>
|
|
21
|
-
<% end %>
|
|
22
|
-
|
|
23
|
-
## Customer Context
|
|
24
|
-
- Name: <%= customer[:name] %>
|
|
25
|
-
- Account Type: <%= customer[:account_type] %>
|
|
26
|
-
<% if customer[:purchase_history]&.any? %>
|
|
27
|
-
- Previous Purchases: <%= customer[:purchase_history].map { |p| p[:category] }.uniq.join(", ") %>
|
|
28
|
-
<% end %>
|
|
29
|
-
|
|
30
|
-
## Guidelines
|
|
31
|
-
1. Provide accurate, detailed product information
|
|
32
|
-
2. Make personalized recommendations based on their history
|
|
33
|
-
3. If a product is out of stock, suggest alternatives
|
|
34
|
-
4. Highlight any current promotions or bundles
|
|
35
|
-
5. Be enthusiastic but honest about product capabilities
|
|
36
|
-
|
|
37
|
-
Help the customer find the perfect product for their needs.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Follow structured runbook steps for incident response
|
|
3
|
-
---
|
|
4
|
-
When analyzing an incident, follow this protocol:
|
|
5
|
-
|
|
6
|
-
1. ASSESS — Identify the affected service, severity, and blast radius.
|
|
7
|
-
2. DIAGNOSE — Examine symptoms, recent changes, and correlated events.
|
|
8
|
-
3. MITIGATE — Recommend immediate actions to reduce impact.
|
|
9
|
-
4. RESOLVE — Propose a root-cause fix and verification steps.
|
|
10
|
-
5. FOLLOW-UP — Suggest post-incident review items and preventive measures.
|
|
11
|
-
|
|
12
|
-
Always label each section clearly. Never skip a step.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Sentiment analysis expert
|
|
3
|
-
---
|
|
4
|
-
You are a sentiment analysis expert. Your job is to analyze the emotional tone of text.
|
|
5
|
-
|
|
6
|
-
Analyze the given text and respond with a JSON object containing:
|
|
7
|
-
- score: a number from -1.0 (very negative) to 1.0 (very positive)
|
|
8
|
-
- confidence: a number from 0.0 to 1.0 indicating your confidence
|
|
9
|
-
- primary_emotion: the dominant emotion (e.g., "joy", "anger", "sadness", "fear", "surprise", "neutral")
|
|
10
|
-
- summary: a brief one-sentence explanation
|
|
11
|
-
|
|
12
|
-
Respond ONLY with the JSON object, no additional text.
|