melchizedek-agents 0.9.3 → 0.9.5

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 (35) hide show
  1. package/AGENT_SETUP.md +2 -2
  2. package/DOCUMENTATION.md +7 -5
  3. package/QUICKSTART.md +4 -3
  4. package/README.md +13 -13
  5. package/config/agents/examples/augustin.yaml +2 -2
  6. package/config/agents/examples/cartographers.yaml +4 -4
  7. package/config/agents/examples/council.yaml +1 -1
  8. package/config/agents/examples/critic.yaml +3 -3
  9. package/config/agents/examples/delegation.yaml +3 -3
  10. package/config/agents/examples/hierarchical.yaml +3 -3
  11. package/config/agents/examples/image_production.yaml +2 -2
  12. package/config/agents/examples/librarian.yaml +3 -3
  13. package/config/agents/examples/patient_advocate.yaml +3 -3
  14. package/config/agents/examples/scriptorium.yaml +5 -5
  15. package/config/agents/examples/style_council.yaml +7 -7
  16. package/config/agents/examples/tutor.yaml +63 -33
  17. package/dist/lib/config.d.ts +3 -3
  18. package/dist/lib/config.js +3 -3
  19. package/dist/lib/models/claudeLlm.js +9 -3
  20. package/dist/lib/models/gptLlm.js +1 -1
  21. package/dist/lib/models/ollamaLlm.js +1 -1
  22. package/dist/lib/models/openAiCompatibleLlm.d.ts +47 -0
  23. package/dist/lib/models/openAiCompatibleLlm.js +219 -4
  24. package/dist/lib/models/registry.js +1 -1
  25. package/dist/lib/observability/supabaseSpanExporter.d.ts +5 -0
  26. package/dist/lib/observability/supabaseSpanExporter.js +14 -3
  27. package/dist/lib/observability/tracer.d.ts +8 -0
  28. package/dist/lib/observability/tracer.js +67 -4
  29. package/dist/lib/tools/inspectImageTool.js +1 -1
  30. package/dist/lib/wiki/agentRun.d.ts +1 -1
  31. package/dist/lib/wiki/agentRun.js +1 -1
  32. package/dist/scripts/a2a_server.d.ts +10 -0
  33. package/dist/scripts/a2a_server.js +75 -3
  34. package/dist/scripts/syndicate_chat.js +41 -10
  35. package/package.json +1 -1
package/AGENT_SETUP.md CHANGED
@@ -81,7 +81,7 @@ After the agent reports back:
81
81
  Keyless, if you installed Ollama:
82
82
 
83
83
  ```bash
84
- npm run syndicate:tutor # one open-weight agent: paste material, be taught
84
+ npm run syndicate:tutor # one open-weight agent: name a topic or paste material, be taught
85
85
  npm run syndicate:council # advocate/skeptic council, all local
86
86
  ```
87
87
 
@@ -179,7 +179,7 @@ Deploying the server itself (Heroku, Fly, a VPS) needs `PUBLIC_URL` set
179
179
  — at which point the server refuses to start without the bearer secret,
180
180
  by design. Run `db/hardening.sql` before real user data arrives, and
181
181
  read the deployment notes in `lib/memory/README.md` end to end. The
182
- patient in module 2.05's specimen would expect no less of you.
182
+ patient in module 2.02's specimen would expect no less of you.
183
183
 
184
184
  ## 5. When your agents outgrow the clone
185
185
 
package/DOCUMENTATION.md CHANGED
@@ -61,7 +61,7 @@ variables: # bound into {{placeholders}} at load
61
61
 
62
62
  orchestrator:
63
63
  name: "Conductor"
64
- model: "gemini-3.7-flash"
64
+ model: "gemini-3.8-flash"
65
65
  instruction: |
66
66
  You are the Conductor… (persona, objective, workflow contract)
67
67
  tools:
@@ -75,7 +75,7 @@ orchestrator:
75
75
  subagents:
76
76
  - name: "Researcher"
77
77
  description: "Use this subagent to… Pass it one focused query."
78
- model: "gemini-3.7-flash"
78
+ model: "gemini-3.8-flash"
79
79
  instruction: |
80
80
  You are the Researcher…
81
81
  tools: ["google_search"]
@@ -331,8 +331,10 @@ Anthropic extended thinking (thinking + tool use on the same Claude
331
331
  agent is not supported yet).
332
332
 
333
333
  Every model request also emits an `llm.request` OpenTelemetry span
334
- (provider, model, input/output/thinking tokens, latency) printed as an
335
- `[OTEL_SPAN_JSON]` line; set `TELEMETRY_SUPABASE=true` to persist
334
+ (provider, model, input/output/thinking tokens, latency). Scripts print it
335
+ as an `[OTEL_SPAN_JSON]` line; `melchizedek-chat` and the `syndicate:*`
336
+ scripts keep those lines off unless `OTEL_CONSOLE_SPANS=true`. Set
337
+ `TELEMETRY_SUPABASE=true` to persist
336
338
  spans to the `adk_telemetry` table (run `db/telemetry.sql`, then
337
339
  re-run `db/hardening.sql` — schema below):
338
340
 
@@ -365,7 +367,7 @@ smallest pulled model with reliable tool calling; qwen3-vl:8b adds
365
367
  vision.
366
368
 
367
369
  Model floor: agent transfer (subagent delegation) requires
368
- `gemini-3.7-flash` or newer — older flash models reject it with
370
+ `gemini-3.8-flash` or newer — older flash models reject it with
369
371
  `[400] Tool call context circulation is not enabled`. For `ollama/*`
370
372
  agents the equivalent floor is tool-calling support in the model
371
373
  itself; delegation is exercised through AgentTool function calls.
package/QUICKSTART.md CHANGED
@@ -169,7 +169,7 @@ const config = loadSyndicate('mine.yaml'); // reads <your-repo>/config/agents
169
169
  | Symptom | Cause / fix |
170
170
  |---|---|
171
171
  | `Gemini API Key is not configured` | `.env` missing or key not set — step 2. |
172
- | `[400] Tool call context circulation is not enabled` | The agent's `model:` is too old for agent transfer. Use `gemini-3.7-flash` or newer (all shipped configs already do). |
172
+ | `[400] Tool call context circulation is not enabled` | The agent's `model:` is too old for agent transfer. Use `gemini-3.8-flash` or newer (all shipped configs already do). |
173
173
  | `Model not found` for `claude-*` / `gpt-*` / `grok-*` | The matching provider key (`ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `XAI_API_KEY`) is not set in `.env`, so the provider wasn't registered. |
174
174
  | `OLLAMA_UNREACHABLE` for `ollama/*` | Ollama isn't running — start the app or `ollama serve`; then check the model is pulled (`ollama list`). |
175
175
  | `Refusing to connect to private/loopback MCP host` | The SSRF guard is on (correctly). For the local demo set `ALLOW_PRIVATE_MCP=true` in `.env`. |
@@ -180,8 +180,9 @@ const config = loadSyndicate('mine.yaml'); // reads <your-repo>/config/agents
180
180
 
181
181
  - Read a syndicate the way the course does: start with
182
182
  `config/agents/examples/tutor.yaml` and map its instruction blocks —
183
- identity, doctrine, communication laws, boundaries — then see the
184
- same anatomy grown to full size in `patient_advocate.yaml`.
183
+ identity, communication style, task, examples — then see the
184
+ anatomy grown to full size, with doctrines and boundaries, in
185
+ `patient_advocate.yaml`.
185
186
  - The interactive curriculum walks every pattern in this repo:
186
187
  [lyceumagents.com/curriculum](https://lyceumagents.com/curriculum/).
187
188
  - Author your own syndicate: everything in `config/agents/examples/` is
package/README.md CHANGED
@@ -5,7 +5,7 @@ Agent Development Kit — where the entire shape of an agent system is one
5
5
  readable file.**
6
6
 
7
7
  Melchizedek runs hierarchical agent graphs called *Syndicates*: an
8
- orchestrator, its subagents, their tools, models, and communication laws,
8
+ orchestrator, its subagents, their tools, models, and communication styles,
9
9
  all declared in a single YAML document you can read, diff, and teach
10
10
  from. The engine (`lib/`) knows no syndicate by name — `config/agents/`
11
11
  is where YOUR syndicates go, and the ones shipped in
@@ -95,17 +95,17 @@ worked specimen for a curriculum module:
95
95
  | Syndicate | Pattern | Course module |
96
96
  |---|---|---|
97
97
  | `tutor.yaml` — Tutor | one open-weight agent, no keys; the instruction block anatomy | [1.02 · running your own model](https://lyceumagents.com/curriculum/your-own-model/) |
98
- | `council.yaml` — Council | first orchestration, fully local: advocate/skeptic council | [2.03 · workflows & voice](https://lyceumagents.com/curriculum/workflows-and-voice/) |
99
- | `critic.yaml` — Critic Review | Drafter → Critic confidence loop; quality as a parsed field | [2.02 · testing & refinement](https://lyceumagents.com/curriculum/testing-and-refinement/) |
100
- | `delegation.yaml` — Router | triage to specialists; descriptions as the routing API | [2.03 · workflows & voice](https://lyceumagents.com/curriculum/workflows-and-voice/) |
101
- | `hierarchical.yaml` — Decomposer | split one goal, delegate parts, merge | [2.03 · workflows & voice](https://lyceumagents.com/curriculum/workflows-and-voice/) |
102
- | `style_council.yaml` — Style Council | identical knowledge, three engineered voices | [2.03 · workflows & voice](https://lyceumagents.com/curriculum/workflows-and-voice/) |
103
- | `syndicate.yaml` — Global Synthesis Council | orchestrator + research subagent; grounding as architecture | [2.04 · the protocol](https://lyceumagents.com/curriculum/melchizedek-protocol/) |
104
- | `ares.yaml` — Knowledge Keeper | long-term memory pipeline, exercised | [2.05 · memory systems](https://lyceumagents.com/curriculum/memory-systems/) |
105
- | `patient_advocate.yaml` — Patient Advocate | memory doctrine: preload + recall, trends, the silent record | [2.05 · memory systems](https://lyceumagents.com/curriculum/memory-systems/) |
106
- | `librarian.yaml` — Lyceum Librarian | MCP: tools discovered at runtime; the agent fetches and modifies catalog data | [2.06 · MCP](https://lyceumagents.com/curriculum/mcp-extending-reach/) |
107
- | `image_production.yaml` — Image Production | spec-first generation + blind inventory / spec audit | [2.07 · multi-modal agents](https://lyceumagents.com/curriculum/multimodal-agents/) |
108
- | `augustin.yaml` — Augustin | multi-agent, multi-modal fact-checking: X sweep + web verification under a tool-free arbiter | [2.08 · the fact-checking arbiter](https://lyceumagents.com/curriculum/fact-checking-agent/) |
98
+ | `council.yaml` — Council | first orchestration, fully local: advocate/skeptic council | [1.05 · workflows & voice](https://lyceumagents.com/curriculum/workflows-and-voice/) |
99
+ | `critic.yaml` — Critic Review | Drafter → Critic confidence loop; quality as a parsed field | [1.04 · testing & refinement](https://lyceumagents.com/curriculum/testing-and-refinement/) |
100
+ | `delegation.yaml` — Router | triage to specialists; descriptions as the routing API | [1.05 · workflows & voice](https://lyceumagents.com/curriculum/workflows-and-voice/) |
101
+ | `hierarchical.yaml` — Decomposer | split one goal, delegate parts, merge | [1.05 · workflows & voice](https://lyceumagents.com/curriculum/workflows-and-voice/) |
102
+ | `style_council.yaml` — Style Council | identical knowledge, three engineered voices | [1.05 · workflows & voice](https://lyceumagents.com/curriculum/workflows-and-voice/) |
103
+ | `syndicate.yaml` — Global Synthesis Council | orchestrator + research subagent; grounding as architecture | [2.01 · the protocol](https://lyceumagents.com/curriculum/melchizedek-protocol/) |
104
+ | `ares.yaml` — Knowledge Keeper | long-term memory pipeline, exercised | [2.02 · memory systems](https://lyceumagents.com/curriculum/memory-systems/) |
105
+ | `patient_advocate.yaml` — Patient Advocate | memory doctrine: preload + recall, trends, the silent record | [2.02 · memory systems](https://lyceumagents.com/curriculum/memory-systems/) |
106
+ | `librarian.yaml` — Lyceum Librarian | MCP: tools discovered at runtime; the agent fetches and modifies catalog data | [2.03 · MCP](https://lyceumagents.com/curriculum/mcp-extending-reach/) |
107
+ | `image_production.yaml` — Image Production | spec-first generation + blind inventory / spec audit | [2.04 · multi-modal agents](https://lyceumagents.com/curriculum/multimodal-agents/) |
108
+ | `augustin.yaml` — Augustin | multi-agent, multi-modal fact-checking: X sweep + web verification under a tool-free arbiter | [2.05 · the fact-checking arbiter](https://lyceumagents.com/curriculum/fact-checking-agent/) |
109
109
  | `claude.yaml` — Claude Chat | minimal single-agent config; the multi-model adapter in one file | — |
110
110
  | `model_zoo.yaml` — Model Zoo | one lightweight agent per provider (Qwen/Claude/Grok/GPT/Gemini); model optionality proven by `npm run demo:models` | — |
111
111
  | `scriptorium.yaml` — The Scriptorium | agents over the shipped knowledge bundle: query with citations, author through a validated save gate | — |
@@ -131,7 +131,7 @@ your own.
131
131
  corrections supersede old records, which are kept as linked history.
132
132
  - **Native tools** — web search, image generation, and a blind
133
133
  image-inventory tool whose file-path-only signature makes expectation
134
- bias structurally impossible (see module 2.07).
134
+ bias structurally impossible (see module 2.04).
135
135
  - **A2A service mode** — serve any syndicate as a JSON-RPC
136
136
  agent-to-agent endpoint with bearer auth and rate limiting
137
137
  (`npm run start:a2a`).
@@ -77,7 +77,7 @@ variables:
77
77
 
78
78
  orchestrator:
79
79
  name: "Arbiter"
80
- model: "gemini-3.7-flash"
80
+ model: "gemini-3.8-flash"
81
81
  instruction: |
82
82
  <prompt_instructions>
83
83
  <house_voice>
@@ -210,7 +210,7 @@ subagents:
210
210
 
211
211
  - name: "WebResearcher"
212
212
  description: "Web search + source reading: verifies specific claims and establishes the documented record from wire services, primary sources, and diverse outlets. Pass it the user's question verbatim, the [System Context] date line, and the claims XResearcher surfaced. MANDATORY second call for every substantive question."
213
- model: "gemini-3.7-flash"
213
+ model: "gemini-3.8-flash"
214
214
  tools:
215
215
  - "web_search"
216
216
  - "web_extract"
@@ -48,7 +48,7 @@ memory_system: "internal-only"
48
48
  orchestrator:
49
49
  name: "Cosmographer"
50
50
  description: "Maps the knowledge graph: has the Surveyor read prose for relations a parser cannot see, and the Registrar record them with their evidence."
51
- model: "gemini-3.7-flash"
51
+ model: "gemini-3.8-flash"
52
52
  instruction: |
53
53
  <prompt_instructions>
54
54
  <system_identity>
@@ -62,11 +62,11 @@ orchestrator:
62
62
  - Never record a relation the Surveyor did not propose with evidence, and never repair a rejection by inventing a different claim — send it back to the Surveyor to re-read.
63
63
  </tool_doctrine>
64
64
 
65
- <communication_laws>
65
+ <communication_style>
66
66
  Report relations the way they read: "&lt;source&gt; constrains &lt;target&gt; — because '&lt;quotation&gt;'".
67
67
  Say plainly when a proposal was rejected and why the gate rejected it. A refused edge is the system working.
68
68
  Be concrete: node ids, relation names, document paths. No speculation about what the graph might contain.
69
- </communication_laws>
69
+ </communication_style>
70
70
 
71
71
  <strict_constraints>
72
72
  - Structural relations are DERIVED, never asserted. If a visitor asks you to record who calls a tool or which model an agent runs on, say that the build already knows it and point at wiki_graph.
@@ -80,7 +80,7 @@ orchestrator:
80
80
  subagents:
81
81
  - name: "Surveyor"
82
82
  description: "Reads an area of the knowledge bundle and proposes typed relations a parser cannot derive (depends_on, constrains, supersedes, explains, alternative_to, mitigates, contradicts), each with the quotation supporting it and both node ids resolved against the graph. Pass it an area to survey and what to look for. It proposes only; it records nothing."
83
- model: "gemini-3.7-flash"
83
+ model: "gemini-3.8-flash"
84
84
  tools: ["wiki_map", "wiki_search", "wiki_read", "wiki_links", "wiki_graph"]
85
85
  instruction: |
86
86
  You are the Surveyor. You read an area of the knowledge bundle and propose relations that the structural build cannot derive.
@@ -2,7 +2,7 @@
2
2
  # Council — basic orchestration on open weights
3
3
  # ============================================================
4
4
  #
5
- # WHY: The curriculum's first multi-agent specimen (module 2.03).
5
+ # WHY: The curriculum's first multi-agent specimen (module 1.05).
6
6
  # Three agents, zero tools, zero keys — every model is a local
7
7
  # ollama/qwen3:8b (lib/models/ollamaLlm.ts), so the user's first
8
8
  # orchestration runs entirely on their own machine.
@@ -16,7 +16,7 @@ syndicate_name: "Critic Review Workflow"
16
16
 
17
17
  orchestrator:
18
18
  name: "ReviewOrchestrator"
19
- model: "gemini-3.7-flash"
19
+ model: "gemini-3.8-flash"
20
20
  instruction: |
21
21
  You coordinate an iterative review process between a Drafter and a Critic.
22
22
  Your goal is to ensure only HIGH-CONFIDENCE answers reach the user.
@@ -39,7 +39,7 @@ orchestrator:
39
39
 
40
40
  subagents:
41
41
  - name: "DrafterAgent"
42
- model: "gemini-3.7-flash"
42
+ model: "gemini-3.8-flash"
43
43
  description: "Creates comprehensive initial draft answers for any user query. On subsequent rounds, revises its draft based on Critic feedback."
44
44
  instruction: |
45
45
  You are the Drafter. When given a query, produce a thorough initial answer.
@@ -48,7 +48,7 @@ subagents:
48
48
  every concern raised and produce an improved, more accurate revision.
49
49
 
50
50
  - name: "CriticAgent"
51
- model: "gemini-3.7-flash"
51
+ model: "gemini-3.8-flash"
52
52
  description: "Reviews a draft answer for accuracy and returns a structured JSON with the refined message and a confidence score. Low scores trigger re-drafting."
53
53
  generateContentConfig:
54
54
  responseMimeType: "application/json"
@@ -6,7 +6,7 @@ variables:
6
6
 
7
7
  orchestrator:
8
8
  name: "RouterAgent"
9
- model: "gemini-3.7-flash"
9
+ model: "gemini-3.8-flash"
10
10
  instruction: |
11
11
  You are a triage router.
12
12
  You do NOT answer questions directly if they require specialized knowledge.
@@ -17,13 +17,13 @@ orchestrator:
17
17
 
18
18
  subagents:
19
19
  - name: "CodeExpert"
20
- model: "gemini-3.7-flash"
20
+ model: "gemini-3.8-flash"
21
21
  description: "Expert in programming, software development, and debugging."
22
22
  instruction: |
23
23
  You are an expert programmer. Provide clean, correct, and well-documented code answers.
24
24
 
25
25
  - name: "MathExpert"
26
- model: "gemini-3.7-flash"
26
+ model: "gemini-3.8-flash"
27
27
  description: "Expert in mathematics, formulas, and calculations."
28
28
  instruction: |
29
29
  You are a math expert. Solve equations and explain the steps clearly.
@@ -2,7 +2,7 @@ syndicate_name: "Hierarchical Task Decomposition"
2
2
 
3
3
  orchestrator:
4
4
  name: "ProjectManager"
5
- model: "gemini-3.7-flash"
5
+ model: "gemini-3.8-flash"
6
6
  instruction: |
7
7
  You are a Project Manager. When given a complex user goal, you practice hierarchical task decomposition.
8
8
  Instead of answering directly, break the problem into smaller, logical sub-tasks.
@@ -13,14 +13,14 @@ orchestrator:
13
13
 
14
14
  subagents:
15
15
  - name: "ResearcherAgent"
16
- model: "gemini-3.7-flash"
16
+ model: "gemini-3.8-flash"
17
17
  tools: ["google_search"]
18
18
  description: "Responsible for gathering facts, performing calculations, and providing raw analytical data."
19
19
  instruction: |
20
20
  You are a meticulous Researcher. Use your tools to find factual information, analyze data, and return detailed bullet points to the Project Manager.
21
21
 
22
22
  - name: "WriterAgent"
23
- model: "gemini-3.7-flash"
23
+ model: "gemini-3.8-flash"
24
24
  description: "Responsible for taking raw data and formatting it into a beautiful, engaging, and structured narrative."
25
25
  instruction: |
26
26
  You are an expert Copywriter. Take the raw research provided by the Project Manager and transform it into a polished, well-structured, and engaging response.
@@ -21,7 +21,7 @@ memory_system: "session-only"
21
21
 
22
22
  orchestrator:
23
23
  name: "ImageDesigner"
24
- model: "gemini-3.7-flash"
24
+ model: "gemini-3.8-flash"
25
25
  tools:
26
26
  - "generate_image"
27
27
  - "inspect_image"
@@ -67,7 +67,7 @@ orchestrator:
67
67
  subagents:
68
68
  - name: "SpecAuditor"
69
69
  description: "Compares an approved image spec (JSON payload) against a blind visual inventory (text). Pass BOTH verbatim in one message. Returns structured conformance JSON. It must NEVER receive the image itself."
70
- model: "gemini-3.7-flash"
70
+ model: "gemini-3.8-flash"
71
71
  generateContentConfig:
72
72
  responseMimeType: "application/json"
73
73
  maxOutputTokens: 4096
@@ -33,7 +33,7 @@ memory_system: "internal-only"
33
33
 
34
34
  orchestrator:
35
35
  name: "Archivist"
36
- model: "gemini-3.7-flash"
36
+ model: "gemini-3.8-flash"
37
37
  instruction: |
38
38
  <prompt_instructions>
39
39
  <system_identity>
@@ -46,10 +46,10 @@ orchestrator:
46
46
  - For requests that change the catalog (borrowing, annotating), state what you are about to change, delegate the change, then confirm what the Librarian reports back — including any refusal.
47
47
  </tool_doctrine>
48
48
 
49
- <communication_laws>
49
+ <communication_style>
50
50
  Answer first, provenance second: give the patron the fact, then name the scroll or catalog entry it came from.
51
51
  Keep responses short and concrete — titles, authors, statuses, dates. A librarian points; they do not lecture.
52
- </communication_laws>
52
+ </communication_style>
53
53
 
54
54
  <strict_constraints>
55
55
  - Never claim a write succeeded without the Librarian's confirmation of the new state.
@@ -27,7 +27,7 @@ memory_system: "long-term"
27
27
 
28
28
  orchestrator:
29
29
  name: "Asclepius"
30
- model: "gemini-3.7-flash"
30
+ model: "gemini-3.8-flash"
31
31
  instruction: |
32
32
  <prompt_instructions>
33
33
  <system_identity>
@@ -49,14 +49,14 @@ orchestrator:
49
49
  - Track TRENDS, not just values: a creatinine of 1.4 mg/dL means one thing alone and another thing as the third rise in a row.
50
50
  </memory_doctrine>
51
51
 
52
- <communication_laws>
52
+ <communication_style>
53
53
  LEAD WITH SUBSTANCE: The direct answer or the most critical safety information goes in the very first sentence. Never open with filler — no "That's a great question", no "I'm sorry to hear that", no restating what the user just told you.
54
54
  SCANNABLE LAYOUTS: Use bold headers, short bulleted lists, and blockquotes for critical warnings so the user can read you instantly while standing in a hospital room. Dense, structured, skimmable.
55
55
  SPECIFICS OVER GENERALITIES: Concrete data, physiological timelines, precise anatomy. Define every medical term contextually inline the first time it appears — "hypokalemia (low potassium)" — then use it freely.
56
56
  ACTIONABLE SCRIPTS: Whenever a medical decision, complication, or communication gap arises, provide an exact, word-for-word script the user can say to the attending doctor or nurse to firmly and respectfully advocate for proper care. Format scripts as blockquotes.
57
57
  RED FLAGS VS NORMAL: When discussing symptoms or recovery, explicitly separate "normal / expected" from "emergency red flags" that mean push the call button, call the doctor tonight, or go to the ER. Never leave the user guessing which bucket they are in.
58
58
  INTERACTIVE COACHING: End every response with exactly one highly relevant follow-up question or observation that moves the strategy forward. Proactively flag systemic hurdles — weekend staffing gaps, shift changes, discharge pressure, results that post to the portal before anyone calls — and coach the user on navigating them.
59
- </communication_laws>
59
+ </communication_style>
60
60
 
61
61
  <research_doctrine>
62
62
  Delegate to your MedScribe subagent for anything that must be current or sourced: treatment guidelines, drug information and interactions, typical recovery timelines, what a test measures, emerging research. Anchor searches to {{current_date}}.
@@ -36,7 +36,7 @@ memory_system: "internal-only"
36
36
  orchestrator:
37
37
  name: "Armarius"
38
38
  description: "Keeper of the knowledge bundle: answers what the house knows via the Seeker, records what it learns via the Illuminator."
39
- model: "gemini-3.7-flash"
39
+ model: "gemini-3.8-flash"
40
40
  instruction: |
41
41
  <prompt_instructions>
42
42
  <system_identity>
@@ -51,10 +51,10 @@ orchestrator:
51
51
  - For writes: state what you are about to have recorded, delegate, then confirm what the Illuminator reports back — including a rejection by the save gate.
52
52
  </tool_doctrine>
53
53
 
54
- <communication_laws>
54
+ <communication_style>
55
55
  Answer first, provenance second: give the visitor the substance, then the bundle paths it came from.
56
56
  Keep responses concrete — paths, titles, statuses, dates. A scriptorium points at pages; it does not orate.
57
- </communication_laws>
57
+ </communication_style>
58
58
 
59
59
  <strict_constraints>
60
60
  - Never claim a document was written or changed without the Illuminator's confirmation naming the path.
@@ -80,14 +80,14 @@ subagents:
80
80
 
81
81
  - name: "Illuminator"
82
82
  description: "Authors or revises one knowledge-bundle document per request, writing through the validated wiki_save gate (tools: wiki_map, wiki_search, wiki_read, wiki_links, wiki_save). Pass it one editorial instruction with all supplied facts. It reports the saved path, or the gate's rejection."
83
- model: "gemini-3.7-flash"
83
+ model: "gemini-3.8-flash"
84
84
  tools: ["wiki_map", "wiki_search", "wiki_read", "wiki_links", "wiki_save"]
85
85
  instruction: |
86
86
  You are the Illuminator. You receive one editorial instruction and fulfil it with your tools.
87
87
  Before writing: wiki_search and wiki_read where the topic lives today. Revise the existing document rather than planting a duplicate; wiki_links tells you what should link to your work.
88
88
  Compose the FULL document: YAML frontmatter (type required — one of: overview, subsystem, syndicate, tool, model-provider, schema, protocol, runbook, guide, decision, doctrine, reference, meta — plus title, description, tags; keep existing status/verified fields when revising), then an H1 and short concrete sections.
89
89
  Links are bundle-absolute markdown links to paths you CONFIRMED exist this run. Link generously — the graph is the product. Facts come from the instruction or from documents you read; never invent either.
90
- Save with wiki_save, actor "melchizedek/gemini-3.7-flash". If the gate REJECTS, fix every listed error and save again — do not argue with the gate. Decisions go to /decisions/ as the next-numbered ADR; knowledge that must not leave this repo goes under /private/.
90
+ Save with wiki_save, actor "melchizedek/gemini-3.8-flash". If the gate REJECTS, fix every listed error and save again — do not argue with the gate. Decisions go to /decisions/ as the next-numbered ADR; knowledge that must not leave this repo goes under /private/.
91
91
  Report back: the path saved, created vs revised, and any advisories the gate listed. After a write, wiki_read the document back and confirm it says what was intended.
92
92
  generateContentConfig:
93
93
  maxOutputTokens: 8192
@@ -3,9 +3,9 @@
3
3
  # ============================================================
4
4
  #
5
5
  # WHY: A teaching syndicate built for lyceumagents.com curriculum
6
- # module 2.03 (Agent workflows & conversation styles). One router
7
- # conducts three stylists with IDENTICAL knowledge and different
8
- # communication laws. Ask the same question of all three and the
6
+ # module 1.05 (Agent workflows & conversation styles). One router
7
+ # conducts three stylists with IDENTICAL knowledge and a different
8
+ # communication style. Ask the same question of all three and the
9
9
  # answers differ only in register — proving that an agent's voice
10
10
  # is authored in its instruction, not emergent from the model.
11
11
  #
@@ -18,7 +18,7 @@ memory_system: "session-only"
18
18
 
19
19
  orchestrator:
20
20
  name: "Router"
21
- model: "gemini-3.7-flash"
21
+ model: "gemini-3.8-flash"
22
22
  instruction: |
23
23
  You are the Router of the Style Council.
24
24
  You NEVER answer substantive questions yourself. You conduct three stylists — Analyst, Peer, Mentor — who share identical knowledge and differ ONLY in communication register.
@@ -38,7 +38,7 @@ orchestrator:
38
38
  subagents:
39
39
  - name: "Analyst"
40
40
  description: "Answers in the terse register: telegraphic, dense, zero filler — the analyst's briefing. Pass the user's question verbatim."
41
- model: "gemini-3.7-flash"
41
+ model: "gemini-3.8-flash"
42
42
  instruction: |
43
43
  You are the Analyst, a stylist of the Style Council.
44
44
  Answer the user's question accurately and completely. Your knowledge is identical to your fellow stylists; ONLY your register differs.
@@ -52,7 +52,7 @@ subagents:
52
52
 
53
53
  - name: "Peer"
54
54
  description: "Answers in the structured-peer register: warm, scannable, encouraging, practical. Pass the user's question verbatim."
55
- model: "gemini-3.7-flash"
55
+ model: "gemini-3.8-flash"
56
56
  instruction: |
57
57
  You are the Peer, a stylist of the Style Council.
58
58
  Answer the user's question accurately and completely. Your knowledge is identical to your fellow stylists; ONLY your register differs.
@@ -66,7 +66,7 @@ subagents:
66
66
 
67
67
  - name: "Mentor"
68
68
  description: "Answers in the stoic-mentor register: flowing, reflective, exact. Pass the user's question verbatim."
69
- model: "gemini-3.7-flash"
69
+ model: "gemini-3.8-flash"
70
70
  instruction: |
71
71
  You are the Mentor, a stylist of the Style Council.
72
72
  Answer the user's question accurately and completely. Your knowledge is identical to your fellow stylists; ONLY your register differs.
@@ -2,23 +2,30 @@
2
2
  # Tutor — the open-weight single agent
3
3
  # ============================================================
4
4
  #
5
- # WHY: The curriculum's first specimen (Part 1, module 1.02). One
5
+ # WHY: The curriculum's first specimen (Part 1, module 1.03). One
6
6
  # agent, no subagents, no tools, no API key — the model is an
7
7
  # open-weight qwen3:8b served locally by Ollama, so the whole
8
8
  # system runs on the user's own machine (lib/models/ollamaLlm.ts).
9
9
  #
10
- # The persona is a tutor in the plainest sense: it teaches the
11
- # material the user supplies by questioning, not lecturing.
12
- # Its purpose is deliberately narrow, and that narrowness is the
13
- # lesson: a general model becomes an instrument when a prompt
14
- # commits it to one purpose.
10
+ # The persona is a tutor in the plainest sense: it teaches
11
+ # whatever the user brings, a topic named in a sentence or
12
+ # material pasted into the conversation, by questioning rather
13
+ # than lecturing. Pasted material, when there is any, is ground
14
+ # truth; without it the Tutor teaches from what is well
15
+ # established and says when it is unsure. Its purpose is
16
+ # deliberately narrow, and that narrowness is the lesson: a
17
+ # general model becomes an instrument when a prompt commits it
18
+ # to one purpose, and the prompt shapes HOW it teaches, not
19
+ # whether it may.
15
20
  #
16
- # The instruction demonstrates the block anatomy taught in the
17
- # curriculum: <system_identity>, <grounding_doctrine>,
18
- # <communication_laws>, <safety_boundaries>. More capable agents
19
- # add more blocks (see patient_advocate.yaml: a memory system
20
- # brings a <memory_doctrine>, a research subagent brings a
21
- # <research_doctrine>). Blocks follow capabilities.
21
+ # The instruction is written in four blocks, the shape the
22
+ # curriculum teaches first: <system_identity> (who the agent is
23
+ # and its one purpose), <communication_style> (how it speaks,
24
+ # as countable rules), <execution_framework> (a procedure it runs on
25
+ # every turn: read, evaluate the user's state, adapt), and <examples> (one
26
+ # worked exchange per state, so the model has a concrete target
27
+ # for each branch of the framework). Later specimens grow more blocks
28
+ # as they gain capabilities (see patient_advocate.yaml).
22
29
  #
23
30
  # Run it: npm run syndicate:tutor (requires only Ollama +
24
31
  # `ollama pull qwen3:8b` — no keys, no database)
@@ -33,31 +40,54 @@ orchestrator:
33
40
  instruction: |
34
41
  <prompt_instructions>
35
42
  <system_identity>
36
- You are the Tutor — a teacher who leads by questioning, not lecturing; understanding is reached, not received.
37
- The user brings you material they are trying to master — an article, lecture notes, documentation, a contract, a textbook passage — pasted directly into the conversation.
38
- Your single purpose: walk the user through the material they supplied until they genuinely understand it. You are not a general assistant; requests outside teaching the supplied material get redirected to it.
43
+ You are the Tutor. You teach whatever the user brings: a topic named in a sentence, or material pasted into the conversation, whether an article, lecture notes, documentation, a contract, or a textbook passage. You lead by questioning rather than lecturing, so that understanding is reached instead of received. You are not a general assistant; you teach, and a request to do something else is turned back into a lesson. When the user has pasted material, it is your ground truth: when you bring in something it does not say, label it "beyond your text:", and when it is silent on something, say so plainly rather than inventing a quote, a page reference, or a figure. When there is no material, teach from what is well established about the topic, and when you are not sure of a figure, a date, a name, or a quotation, say you are not sure rather than supplying one.
39
44
  </system_identity>
40
45
 
41
- <grounding_doctrine>
42
- The pasted material is your ground truth for every substantive claim.
43
- - Before teaching, confirm what material you have: name its topic in one line so the user can catch a mispaste.
44
- - Ground every explanation in the supplied text. When you bring in outside context to aid understanding, label it: "beyond your text:".
45
- - If the material is silent on something the user asks, say "your material doesn't cover this" — then answer from general knowledge only if the user wants it, still labeled.
46
- - Never invent quotes, page references, or figures that are not in the material.
47
- </grounding_doctrine>
46
+ <communication_style>
47
+ Plain, warm, and brief. One idea per turn, never a lecture and never a numbered plan. Define every technical term inline the first time it appears, as in "amortization (paying a debt down on a schedule)", then use it freely. Never name your own rules, number your steps, or label the parts of a reply; the user reads teaching, not the scaffolding behind it. End every reply with exactly one short question that walks the material one step further, and let that question be the only question mark in the reply.
48
+ </communication_style>
48
49
 
49
- <communication_laws>
50
- ASK BEFORE TELLING: open each new topic with one question that draws out what the user already makes of the relevant passage — then stop and wait.
51
- WALKING PACE: one idea or one question per turn, never a lecture. Depth beats coverage.
52
- PLAIN TERMS FIRST: define every technical term inline the first time it appears — "amortization (paying a debt down on a schedule)" — then use it freely.
53
- EARNED ANSWERS: questions are the path, not a wall. After the user has made two honest attempts, state the idea plainly and point to where their material says it.
54
- SOCRATIC CLOSE: end every response with exactly one short question that walks the material one step further.
55
- </communication_laws>
50
+ <execution_framework>
51
+ On the first turn, decide first which of two cases the message is, and stay in that case:
52
+ PASTED MATERIAL: the message contains text to be taught from, such as a passage, notes, or an article, whatever the user says about it. Do three things and nothing else: name the material's topic in one line, subject only and never what it concludes, so a mispaste is caught at once; ask one question that draws out what the user already makes of the passage; and stop. Never state the key idea, the main takeaway, or the conclusion of pasted material in that first turn, even when the user asks for it directly. A request to be told the answer before any attempt is not frustration; it is where the teaching starts, and it gets a question, not the answer.
53
+ TOPIC ONLY: the message names a subject and contains no material. Do three things and nothing else: give one plain sentence that says what the subject is, a definition and no more; ask one question that draws out what the user already pictures about it; and stop. Do not ask for material, and do not cover the topic.
56
54
 
57
- <safety_boundaries>
58
- - You teach the material; you do not act on it. For decisions with real stakes (medical, legal, financial), teach what the text says and direct the user to the professional who can advise on it.
59
- - When you are uncertain, say so plainly. A confident wrong answer teaches a falsehood with authority — the worst failure a tutor has.
60
- </safety_boundaries>
55
+ On every later turn, in this order:
56
+ 1. Read the user's latest message. Read the earlier history only as far as you need it, most recent turns first.
57
+ 2. Decide which one of three states the user is in:
58
+ MISUNDERSTANDING: their reading conflicts with what the material says, or, with no material, with what is established about the topic.
59
+ CORRECT: their reading matches it.
60
+ FRUSTRATION: they are stuck, annoyed, or asking to be told the answer.
61
+ 3. Adapt your reply to that state:
62
+ On a misunderstanding, do not correct it outright. Point to the sentence in the material that bears on it, or, with no material, state the one fact that bears on it, and ask one question that lets the user find the gap themselves.
63
+ On a correct reading, say so in one line, then ask one question that moves one step deeper into the material.
64
+ On frustration, acknowledge it in one line, then hand over the tools for the answer: quote the passage that holds it and name the idea inside it, or, with no material, state the idea in one or two plain sentences. After the user has made two honest attempts at a point, state the idea plainly and point to where their material says it.
65
+ Guardrails: never give more than one idea per turn; never answer the question you just asked; never summarize the whole material or the whole topic unprompted; with pasted material, never state a conclusion the user has not reached until they have made two honest attempts at it. For material with real stakes (medical, legal, financial), teach what the text says and direct the user to the professional who can advise on it.
66
+ </execution_framework>
67
+
68
+ <examples>
69
+ Material: a paragraph explaining that compound interest is interest computed on both the principal and the interest already accrued. User: "Here is my passage. Teach me the key idea in it."
70
+ State: first turn, pasted material.
71
+ Tutor: "Your passage is about compound interest. Before I say anything about it, what do you make of the phrase 'interest already accrued'?"
72
+
73
+ No material. User: "teach me about inflation"
74
+ State: first turn, topic only.
75
+ Tutor: "Inflation is a general rise in prices across an economy over time, so the same money buys a little less than it did before. Before we go further, what do you think makes prices rise in the first place?"
76
+
77
+ Material: a paragraph explaining that compound interest is interest computed on both the principal and the interest already accrued.
78
+
79
+ User: "So compound interest just means a higher rate than simple interest."
80
+ State: misunderstanding.
81
+ Tutor: "Look again at the phrase 'interest already accrued' in your passage. If the rate never changed, what is it about the second year's calculation that makes the total grow faster than the first year's?"
82
+
83
+ User: "Oh, the second year's interest is computed on a bigger amount, because last year's interest got added in."
84
+ State: correct.
85
+ Tutor: "Exactly, and that is the whole mechanism. Your passage mentions the compounding period, so what would change if interest were added monthly instead of yearly?"
86
+
87
+ User: "I've tried twice and I still don't get it. Just tell me."
88
+ State: frustration.
89
+ Tutor: "That is a fair ask after two tries, so here it is plainly: your passage says interest is computed on the principal plus the interest already accrued, which means each period's interest is calculated on a slightly larger base than the last. Reading that sentence now, which word tells you the base is growing?"
90
+ </examples>
61
91
  </prompt_instructions>
62
92
  generateContentConfig:
63
93
  temperature: 0.6
@@ -20,7 +20,7 @@
20
20
  * in the caller's YAML or request.
21
21
  *
22
22
  * Use gemini-3.1-flash-lite for lightweight/cost-efficient loads (subagents,
23
- * data retrieval). Use gemini-3.7-flash in YAML for production orchestrators.
23
+ * data retrieval). Use gemini-3.8-flash in YAML for production orchestrators.
24
24
  *
25
25
  * NOTE: gemini-2.5-flash is known incompatible with this framework's
26
26
  * includeServerSideToolInvocations flag on AI Studio Tier 1 — do not use it
@@ -71,7 +71,7 @@ export declare const DEFAULT_OLLAMA_MODEL = "ollama/qwen3:8b";
71
71
  *
72
72
  * Must be a text generation model (not an embedding model).
73
73
  */
74
- export declare const MEMORY_EXTRACTION_MODEL = "gemini-3.7-flash";
74
+ export declare const MEMORY_EXTRACTION_MODEL = "gemini-3.8-flash";
75
75
  /**
76
76
  * Default model for wiki agent operations (wiki_query, wiki_garden, and the
77
77
  * gap-fill pass in lib/wiki/fill.ts). Prose quality matters more than
@@ -79,7 +79,7 @@ export declare const MEMORY_EXTRACTION_MODEL = "gemini-3.7-flash";
79
79
  * provider works — override per call or via WIKI_AGENT_MODEL env
80
80
  * ('claude-*', 'ollama/*', …); routing goes through lib/models/registry.ts.
81
81
  */
82
- export declare const WIKI_AGENT_MODEL = "gemini-3.7-flash";
82
+ export declare const WIKI_AGENT_MODEL = "gemini-3.8-flash";
83
83
  /**
84
84
  * Model used by SupabaseVectorMemoryService to produce vector embeddings
85
85
  * for semantic memory storage and retrieval.
@@ -21,7 +21,7 @@
21
21
  * in the caller's YAML or request.
22
22
  *
23
23
  * Use gemini-3.1-flash-lite for lightweight/cost-efficient loads (subagents,
24
- * data retrieval). Use gemini-3.7-flash in YAML for production orchestrators.
24
+ * data retrieval). Use gemini-3.8-flash in YAML for production orchestrators.
25
25
  *
26
26
  * NOTE: gemini-2.5-flash is known incompatible with this framework's
27
27
  * includeServerSideToolInvocations flag on AI Studio Tier 1 — do not use it
@@ -72,7 +72,7 @@ export const DEFAULT_OLLAMA_MODEL = 'ollama/qwen3:8b';
72
72
  *
73
73
  * Must be a text generation model (not an embedding model).
74
74
  */
75
- export const MEMORY_EXTRACTION_MODEL = 'gemini-3.7-flash';
75
+ export const MEMORY_EXTRACTION_MODEL = 'gemini-3.8-flash';
76
76
  /**
77
77
  * Default model for wiki agent operations (wiki_query, wiki_garden, and the
78
78
  * gap-fill pass in lib/wiki/fill.ts). Prose quality matters more than
@@ -80,7 +80,7 @@ export const MEMORY_EXTRACTION_MODEL = 'gemini-3.7-flash';
80
80
  * provider works — override per call or via WIKI_AGENT_MODEL env
81
81
  * ('claude-*', 'ollama/*', …); routing goes through lib/models/registry.ts.
82
82
  */
83
- export const WIKI_AGENT_MODEL = 'gemini-3.7-flash';
83
+ export const WIKI_AGENT_MODEL = 'gemini-3.8-flash';
84
84
  // ── Embedding Models ──────────────────────────────────────────────────────────
85
85
  /**
86
86
  * Model used by SupabaseVectorMemoryService to produce vector embeddings