1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# A Dungeon Master helped by a decider. Before each message reaches the chat
# model, a preGeneration hook — a Go program, hooks/ask-decider — sends it to a
# decision model (spell.yaml) and adds its pick under the message:
# "spell: <name> (confidence <c>)". The system prompt says what that line means.
#
# player ──► situation ──► hook (Go) ──► decider (d1-3B, spell.yaml)
# │◄── spell + confidence
# ▼
# situation + spell ──► Dungeon Master (Qwen3.5-4B) ──► advice
#
# cd demos/decision-dnd
# mm tui dungeon_master.yaml # or: mm -config dungeon_master.yaml -p "…"
#
# The hook runs with `go run`: Go must be on the PATH. DECIDER_DUMP keeps one
# JSON file per question in .mm/decider/ (git-ignored) — remove it to stop.
provider: llmman
model: hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M
baseUrl: http://127.0.0.1:17434/v1
fallback: http://host.docker.internal:17434/v1
acp:
name: dungeon_master
title: "dungeon master"
system: |
You are the Dungeon Master. You help a novice wizard choose a spell for the
situation the player describes. The wizard knows exactly five spells:
fireball, arcane_bolt, shield, misty_step and sleep. Never suggest another.
Under each message you find a block "[context added by a hook]" with the
line "spell: <name> (confidence <c>)". It comes from a decision model that
read the situation: <name> is the spell it picked among the five, and <c>
is how sure it is of that pick (0 to 1) — not the chance the spell works.
Answer in three short parts: the spell and the confidence; one sentence on
why it fits the situation; if the confidence is below 0.5, the other one of
the five you would consider, and why.
sampling:
temperature: 0.2
max_tokens: 1536
# Qwen3.5 thinks by default; with rules like these it can loop until the limit.
chat_template_kwargs:
enable_thinking: false
# The chat model answers from what it knows: no tools, no skills.
bashTool: false
editTools: false
planTool: false
fetchContentTool: false
askUserTool: false
unloadModels: false
skillsDir: no-skills
agentsMd:
enabled: false
# Shows a 🪝 line for each hook run: which hook ran and how much context it added.
displayHooks: true
hooks:
preGeneration:
- command: cd "$MM_CONFIG_DIR/hooks/ask-decider" && DECIDER_DUMP=.mm/decider go run . spell.yaml
timeout: 60s # the first call loads the decision model (and go run compiles once)
|