robot_lab 0.3.0 → 0.5.0

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.
Files changed (274) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +60 -0
  3. data/README.md +29 -19
  4. data/lib/robot_lab/errors.rb +4 -0
  5. data/lib/robot_lab/hook_context.rb +9 -2
  6. data/lib/robot_lab/mcp/registry.rb +99 -0
  7. data/lib/robot_lab/mcp/server.rb +47 -83
  8. data/lib/robot_lab/mcp/server_discovery.rb +22 -9
  9. data/lib/robot_lab/mcp.rb +259 -0
  10. data/lib/robot_lab/robot/mcp_management.rb +159 -105
  11. data/lib/robot_lab/robot/tool_call_gating.rb +144 -0
  12. data/lib/robot_lab/robot.rb +72 -99
  13. data/lib/robot_lab/run_config.rb +3 -2
  14. data/lib/robot_lab/tool.rb +8 -23
  15. data/lib/robot_lab/version.rb +1 -1
  16. data/lib/robot_lab.rb +1 -4
  17. metadata +16 -292
  18. data/.architecture/AGENTS.md +0 -32
  19. data/.architecture/config.yml +0 -8
  20. data/.architecture/members.yml +0 -60
  21. data/.architecture/reviews/feature-free-will.md +0 -490
  22. data/.architecture/reviews/overall-codebase.md +0 -427
  23. data/.claude/settings.local.json +0 -57
  24. data/.codex/config.toml +0 -2
  25. data/.envrc +0 -6
  26. data/.github/workflows/deploy-github-pages.yml +0 -52
  27. data/.irbrc +0 -6
  28. data/.loki +0 -65
  29. data/.quality/reek_baseline.txt +0 -43
  30. data/.rubocop.yml +0 -10
  31. data/Archspec.rb +0 -44
  32. data/CLAUDE.md +0 -141
  33. data/COMMITS.md +0 -196
  34. data/Rakefile +0 -193
  35. data/_typos.toml +0 -21
  36. data/agent2agent_review.md +0 -192
  37. data/agentf_improvements.md +0 -253
  38. data/agents.md +0 -14
  39. data/docs/api/core/index.md +0 -147
  40. data/docs/api/core/memory.md +0 -578
  41. data/docs/api/core/network.md +0 -553
  42. data/docs/api/core/result.md +0 -211
  43. data/docs/api/core/robot.md +0 -1667
  44. data/docs/api/core/state.md +0 -145
  45. data/docs/api/core/tool.md +0 -520
  46. data/docs/api/errors.md +0 -323
  47. data/docs/api/hooks.md +0 -469
  48. data/docs/api/index.md +0 -137
  49. data/docs/api/mcp/client.md +0 -387
  50. data/docs/api/mcp/index.md +0 -267
  51. data/docs/api/mcp/server.md +0 -252
  52. data/docs/api/mcp/transports.md +0 -339
  53. data/docs/api/messages/index.md +0 -126
  54. data/docs/api/messages/text-message.md +0 -170
  55. data/docs/api/messages/tool-call-message.md +0 -206
  56. data/docs/api/messages/tool-result-message.md +0 -242
  57. data/docs/api/messages/user-message.md +0 -232
  58. data/docs/api/skills.md +0 -423
  59. data/docs/api/streaming/context.md +0 -280
  60. data/docs/api/streaming/events.md +0 -185
  61. data/docs/api/streaming/index.md +0 -156
  62. data/docs/api/support.md +0 -846
  63. data/docs/architecture/core-concepts.md +0 -575
  64. data/docs/architecture/index.md +0 -252
  65. data/docs/architecture/message-flow.md +0 -366
  66. data/docs/architecture/network-orchestration.md +0 -478
  67. data/docs/architecture/robot-execution.md +0 -396
  68. data/docs/architecture/state-management.md +0 -410
  69. data/docs/assets/css/custom.css +0 -56
  70. data/docs/assets/images/robot_lab.jpg +0 -0
  71. data/docs/concepts.md +0 -641
  72. data/docs/examples/basic-chat.md +0 -258
  73. data/docs/examples/index.md +0 -425
  74. data/docs/examples/mcp-server.md +0 -403
  75. data/docs/examples/multi-robot-network.md +0 -476
  76. data/docs/examples/tool-usage.md +0 -468
  77. data/docs/getting-started/configuration.md +0 -645
  78. data/docs/getting-started/index.md +0 -56
  79. data/docs/getting-started/installation.md +0 -197
  80. data/docs/getting-started/quick-start.md +0 -293
  81. data/docs/guides/building-robots.md +0 -1187
  82. data/docs/guides/creating-networks.md +0 -736
  83. data/docs/guides/hooks.md +0 -1206
  84. data/docs/guides/index.md +0 -78
  85. data/docs/guides/knowledge.md +0 -219
  86. data/docs/guides/mcp-integration.md +0 -740
  87. data/docs/guides/memory.md +0 -458
  88. data/docs/guides/observability.md +0 -733
  89. data/docs/guides/streaming.md +0 -323
  90. data/docs/guides/using-tools.md +0 -780
  91. data/docs/index.md +0 -280
  92. data/docs/superpowers/plans/2026-05-06-agentskills.md +0 -1303
  93. data/docs/superpowers/specs/2026-05-06-agentskills-design.md +0 -247
  94. data/examples/.envrc +0 -3
  95. data/examples/01_simple_robot.rb +0 -31
  96. data/examples/02_tools.rb +0 -109
  97. data/examples/03_network.rb +0 -118
  98. data/examples/04_mcp.rb +0 -217
  99. data/examples/05_streaming.rb +0 -137
  100. data/examples/06_prompt_templates.rb +0 -325
  101. data/examples/07_network_memory.rb +0 -313
  102. data/examples/08_llm_config.rb +0 -162
  103. data/examples/09_chaining.rb +0 -251
  104. data/examples/10_memory.rb +0 -315
  105. data/examples/11_network_introspection.rb +0 -239
  106. data/examples/12_message_bus.rb +0 -67
  107. data/examples/13_spawn.rb +0 -85
  108. data/examples/14_rusty_circuit/.envrc +0 -1
  109. data/examples/14_rusty_circuit/.gitignore +0 -1
  110. data/examples/14_rusty_circuit/README.md +0 -1
  111. data/examples/14_rusty_circuit/comic.rb +0 -149
  112. data/examples/14_rusty_circuit/display.rb +0 -217
  113. data/examples/14_rusty_circuit/heckler.rb +0 -65
  114. data/examples/14_rusty_circuit/open_mic.rb +0 -132
  115. data/examples/14_rusty_circuit/prompts/open_mic_comic.md +0 -20
  116. data/examples/14_rusty_circuit/prompts/open_mic_heckler.md +0 -23
  117. data/examples/14_rusty_circuit/prompts/open_mic_scout.md +0 -20
  118. data/examples/14_rusty_circuit/scout.rb +0 -165
  119. data/examples/14_rusty_circuit/show.log +0 -234
  120. data/examples/15_memory_network_and_bus/.envrc +0 -1
  121. data/examples/15_memory_network_and_bus/README.md +0 -66
  122. data/examples/15_memory_network_and_bus/editor_in_chief.rb +0 -24
  123. data/examples/15_memory_network_and_bus/editorial_pipeline.rb +0 -213
  124. data/examples/15_memory_network_and_bus/linux_writer.rb +0 -80
  125. data/examples/15_memory_network_and_bus/os_editor.rb +0 -48
  126. data/examples/15_memory_network_and_bus/os_writer.rb +0 -49
  127. data/examples/15_memory_network_and_bus/output/combined_article.md +0 -11
  128. data/examples/15_memory_network_and_bus/output/final_article.md +0 -8
  129. data/examples/15_memory_network_and_bus/output/linux_draft.md +0 -7
  130. data/examples/15_memory_network_and_bus/output/mac_draft.md +0 -7
  131. data/examples/15_memory_network_and_bus/output/memory.json +0 -13
  132. data/examples/15_memory_network_and_bus/output/revision_1.md +0 -29
  133. data/examples/15_memory_network_and_bus/output/revision_2.md +0 -50
  134. data/examples/15_memory_network_and_bus/output/revision_3.md +0 -8
  135. data/examples/15_memory_network_and_bus/output/windows_draft.md +0 -7
  136. data/examples/15_memory_network_and_bus/prompts/os_advocate.md +0 -13
  137. data/examples/15_memory_network_and_bus/prompts/os_chief.md +0 -13
  138. data/examples/15_memory_network_and_bus/prompts/os_editor.md +0 -13
  139. data/examples/16_writers_room/.envrc +0 -1
  140. data/examples/16_writers_room/display.rb +0 -158
  141. data/examples/16_writers_room/output/.gitignore +0 -4
  142. data/examples/16_writers_room/output/README.md +0 -69
  143. data/examples/16_writers_room/output/opus_001.md +0 -263
  144. data/examples/16_writers_room/output/opus_001_notes.log +0 -470
  145. data/examples/16_writers_room/output/opus_002.md +0 -245
  146. data/examples/16_writers_room/output/opus_002_notes.log +0 -546
  147. data/examples/16_writers_room/output/opus_002_screenplay.md +0 -7989
  148. data/examples/16_writers_room/output/opus_002_screenplay_notes.md +0 -993
  149. data/examples/16_writers_room/prompts/screenplay_writer.md +0 -66
  150. data/examples/16_writers_room/prompts/writer.md +0 -37
  151. data/examples/16_writers_room/room.rb +0 -186
  152. data/examples/16_writers_room/tools.rb +0 -173
  153. data/examples/16_writers_room/writer.rb +0 -121
  154. data/examples/16_writers_room/writers_room.rb +0 -256
  155. data/examples/17_skills.rb +0 -234
  156. data/examples/18_rails/.envrc +0 -3
  157. data/examples/18_rails/.gitignore +0 -5
  158. data/examples/18_rails/Gemfile +0 -11
  159. data/examples/18_rails/README.md +0 -67
  160. data/examples/18_rails/Rakefile +0 -4
  161. data/examples/18_rails/app/controllers/application_controller.rb +0 -4
  162. data/examples/18_rails/app/controllers/chat_controller.rb +0 -50
  163. data/examples/18_rails/app/jobs/application_job.rb +0 -4
  164. data/examples/18_rails/app/jobs/robot_run_job.rb +0 -25
  165. data/examples/18_rails/app/models/application_record.rb +0 -5
  166. data/examples/18_rails/app/models/robot_lab_result.rb +0 -36
  167. data/examples/18_rails/app/models/robot_lab_thread.rb +0 -23
  168. data/examples/18_rails/app/robots/chat_robot.rb +0 -25
  169. data/examples/18_rails/app/tools/time_tool.rb +0 -9
  170. data/examples/18_rails/app/views/chat/_user_message.html.erb +0 -1
  171. data/examples/18_rails/app/views/chat/index.html.erb +0 -67
  172. data/examples/18_rails/app/views/layouts/application.html.erb +0 -49
  173. data/examples/18_rails/bin/dev +0 -7
  174. data/examples/18_rails/bin/rails +0 -6
  175. data/examples/18_rails/bin/setup +0 -15
  176. data/examples/18_rails/config/application.rb +0 -33
  177. data/examples/18_rails/config/cable.yml +0 -2
  178. data/examples/18_rails/config/database.yml +0 -5
  179. data/examples/18_rails/config/environment.rb +0 -4
  180. data/examples/18_rails/config/initializers/robot_lab.rb +0 -11
  181. data/examples/18_rails/config/routes.rb +0 -6
  182. data/examples/18_rails/config.ru +0 -4
  183. data/examples/18_rails/db/migrate/001_create_robot_lab_tables.rb +0 -32
  184. data/examples/19_token_tracking.rb +0 -138
  185. data/examples/20_circuit_breaker.rb +0 -147
  186. data/examples/21_learning_loop.rb +0 -181
  187. data/examples/22_context_compression.rb +0 -172
  188. data/examples/23_convergence.rb +0 -133
  189. data/examples/24_structured_delegation.rb +0 -151
  190. data/examples/25_history_search/conversation.jsonl +0 -30
  191. data/examples/25_history_search.rb +0 -133
  192. data/examples/26_document_store/api_versioning_adr.md +0 -52
  193. data/examples/26_document_store/incident_postmortem.md +0 -46
  194. data/examples/26_document_store/postgres_runbook.md +0 -49
  195. data/examples/26_document_store/redis_caching_guide.md +0 -48
  196. data/examples/26_document_store/sidekiq_guide.md +0 -51
  197. data/examples/26_document_store.rb +0 -140
  198. data/examples/27_incident_response/README.md +0 -65
  199. data/examples/27_incident_response/incident_response.rb +0 -261
  200. data/examples/28_mcp_discovery.rb +0 -113
  201. data/examples/29_ractor_tools.rb +0 -240
  202. data/examples/30_ractor_network.rb +0 -252
  203. data/examples/31_launch_assessment.rb +0 -246
  204. data/examples/32_newsletter_reader.rb +0 -193
  205. data/examples/33_stock_generator.rb +0 -80
  206. data/examples/33_stock_predictor.rb +0 -327
  207. data/examples/34_agentskills.rb +0 -76
  208. data/examples/35_hooks.rb +0 -266
  209. data/examples/README.md +0 -550
  210. data/examples/common.rb +0 -180
  211. data/examples/prompts/assistant.md +0 -5
  212. data/examples/prompts/audit_trail.md +0 -8
  213. data/examples/prompts/billing.md +0 -10
  214. data/examples/prompts/classifier.md +0 -7
  215. data/examples/prompts/comedian.md +0 -6
  216. data/examples/prompts/comedy_critic.md +0 -10
  217. data/examples/prompts/configurable.md +0 -9
  218. data/examples/prompts/dispatcher.md +0 -12
  219. data/examples/prompts/entity_extractor.md +0 -14
  220. data/examples/prompts/escalation.md +0 -42
  221. data/examples/prompts/frontmatter_mcp_test.md +0 -9
  222. data/examples/prompts/frontmatter_named_test.md +0 -5
  223. data/examples/prompts/frontmatter_tools_test.md +0 -6
  224. data/examples/prompts/general.md +0 -7
  225. data/examples/prompts/github_assistant.md +0 -14
  226. data/examples/prompts/helper.md +0 -4
  227. data/examples/prompts/incident_responder.md +0 -18
  228. data/examples/prompts/keyword_extractor.md +0 -11
  229. data/examples/prompts/llm_config_demo.md +0 -20
  230. data/examples/prompts/order_support.md +0 -35
  231. data/examples/prompts/os_advocate.md +0 -13
  232. data/examples/prompts/os_chief.md +0 -13
  233. data/examples/prompts/os_editor.md +0 -13
  234. data/examples/prompts/parameterized_main_test.md +0 -6
  235. data/examples/prompts/pii_redactor.md +0 -7
  236. data/examples/prompts/product_support.md +0 -37
  237. data/examples/prompts/runbook_protocol.md +0 -12
  238. data/examples/prompts/sentiment_analyzer.md +0 -12
  239. data/examples/prompts/skill_a_test.md +0 -4
  240. data/examples/prompts/skill_b_test.md +0 -4
  241. data/examples/prompts/skill_config_test.md +0 -5
  242. data/examples/prompts/skill_cycle_a_test.md +0 -6
  243. data/examples/prompts/skill_cycle_b_test.md +0 -6
  244. data/examples/prompts/skill_description_test.md +0 -4
  245. data/examples/prompts/skill_leaf_test.md +0 -4
  246. data/examples/prompts/skill_nested_test.md +0 -6
  247. data/examples/prompts/skill_refs_main_test.md +0 -6
  248. data/examples/prompts/skill_self_ref_test.md +0 -6
  249. data/examples/prompts/skill_with_mcp_test.md +0 -9
  250. data/examples/prompts/skill_with_params_test.md +0 -6
  251. data/examples/prompts/skill_with_robot_name_test.md +0 -5
  252. data/examples/prompts/skill_with_tools_test.md +0 -6
  253. data/examples/prompts/sre_compliance.md +0 -10
  254. data/examples/prompts/structured_output.md +0 -7
  255. data/examples/prompts/synthesizer.md +0 -17
  256. data/examples/prompts/technical.md +0 -10
  257. data/examples/prompts/template_with_skills_test.md +0 -6
  258. data/examples/prompts/triage.md +0 -22
  259. data/examples/ruboruby.md +0 -423
  260. data/examples/run_all.rb +0 -60
  261. data/examples/xyzzy.rb +0 -97
  262. data/lib/robot_lab/mcp/client.rb +0 -223
  263. data/lib/robot_lab/mcp/connection_poller.rb +0 -195
  264. data/lib/robot_lab/mcp/transports/base.rb +0 -64
  265. data/lib/robot_lab/mcp/transports/sse.rb +0 -120
  266. data/lib/robot_lab/mcp/transports/stdio.rb +0 -170
  267. data/lib/robot_lab/mcp/transports/streamable_http.rb +0 -141
  268. data/lib/robot_lab/mcp/transports/websocket.rb +0 -111
  269. data/logfile +0 -8
  270. data/mkdocs.yml +0 -209
  271. data/robot_concurrency.md +0 -38
  272. data/simple_acp_review.md +0 -298
  273. data/temp.md +0 -6
  274. 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,5 +0,0 @@
1
- ---
2
- description: Helpful assistant with tool access
3
- ---
4
- You are a helpful assistant with access to tools.
5
- Use the calculator for math and fortune_cookie for fortune requests.
@@ -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
@@ -1,10 +0,0 @@
1
- ---
2
- description: Billing support specialist
3
- ---
4
- You are a billing support specialist. Help users with:
5
- - Invoice questions
6
- - Payment issues
7
- - Subscription management
8
- - Refunds
9
-
10
- Be professional and helpful.
@@ -1,7 +0,0 @@
1
- ---
2
- description: Request classifier for billing/technical/general
3
- ---
4
- You are a request classifier. Analyze the user's request and classify it
5
- as either "billing", "technical", or "general".
6
-
7
- Respond with ONLY the category name, nothing else.
@@ -1,6 +0,0 @@
1
- ---
2
- description: Robot comedian that tells original jokes
3
- ---
4
- You are a robot comedian. Reply with ONLY the joke — no preamble,
5
- no explanation, no quotation marks. Each joke must be original.
6
- Keep it to two or three sentences maximum.
@@ -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,9 +0,0 @@
1
- ---
2
- description: A template with front matter config for demo purposes
3
- temperature: 0.3
4
- max_tokens: 200
5
- parameters:
6
- task_type: general
7
- ---
8
- You are a precise assistant optimized for <%= task_type %> tasks.
9
- Be concise and accurate.
@@ -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.
@@ -1,9 +0,0 @@
1
- ---
2
- description: Test template with MCP in frontmatter
3
- mcp:
4
- - name: test_server
5
- transport: stdio
6
- command: echo
7
- args: ["hello"]
8
- ---
9
- You are a test robot with MCP declared in frontmatter.
@@ -1,5 +0,0 @@
1
- ---
2
- description: Test template with name in frontmatter
3
- robot_name: support_bot
4
- ---
5
- You are the support bot, named via frontmatter.
@@ -1,6 +0,0 @@
1
- ---
2
- description: Test template with tools in frontmatter
3
- tools:
4
- - FrontmatterTestTool
5
- ---
6
- You are a test robot with tools declared in frontmatter.
@@ -1,7 +0,0 @@
1
- ---
2
- description: General support robot
3
- ---
4
- You are a general support robot. Help users with any questions
5
- that don't fit into billing or technical categories.
6
-
7
- Be friendly and helpful.
@@ -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.
@@ -1,4 +0,0 @@
1
- ---
2
- description: Simple helpful assistant
3
- ---
4
- You are a helpful assistant. Be concise and friendly in your responses.
@@ -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,6 +0,0 @@
1
- ---
2
- description: Main template with same parameter as skill
3
- parameters:
4
- company_name: null
5
- ---
6
- Welcome to <%= company_name %> support.
@@ -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.
@@ -1,4 +0,0 @@
1
- ---
2
- description: Skill A for testing
3
- ---
4
- You have Skill A capabilities.
@@ -1,4 +0,0 @@
1
- ---
2
- description: Skill B for testing
3
- ---
4
- You have Skill B capabilities.
@@ -1,5 +0,0 @@
1
- ---
2
- description: Skill with config overrides
3
- temperature: 0.9
4
- ---
5
- You have config skill capabilities.
@@ -1,6 +0,0 @@
1
- ---
2
- description: Cycle test A
3
- skills:
4
- - skill_cycle_b_test
5
- ---
6
- You have cycle A capabilities.
@@ -1,6 +0,0 @@
1
- ---
2
- description: Cycle test B
3
- skills:
4
- - skill_cycle_a_test
5
- ---
6
- You have cycle B capabilities.
@@ -1,4 +0,0 @@
1
- ---
2
- description: Skill description from frontmatter
3
- ---
4
- You have description skill capabilities.
@@ -1,4 +0,0 @@
1
- ---
2
- description: Leaf skill with no nested skills
3
- ---
4
- You have leaf skill capabilities.
@@ -1,6 +0,0 @@
1
- ---
2
- description: Nested skill that depends on leaf
3
- skills:
4
- - skill_leaf_test
5
- ---
6
- You have nested skill capabilities.
@@ -1,6 +0,0 @@
1
- ---
2
- description: Skill that references the main template
3
- skills:
4
- - assistant
5
- ---
6
- You have a skill that references the main template.