Skip to content

Commit 40b3b69

Browse files
committed
fix(ai): limit consistency advice to card changes
1 parent 57b9122 commit 40b3b69

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

‎lib/manavault/ai/deck_analysis/prompt.ex‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ defmodule Manavault.AI.DeckAnalysis.Prompt do
109109
each link, whether the card draw digs deep enough to find the payoffs, whether the mana comes
110110
online when the plan needs it, land count and curve, and whether a typical hand does something
111111
meaningful in the first few turns. Distinguish improvements that make the deck more reliable
112-
from those that make it more powerful.
112+
from those that make it more powerful. Every consistency item must recommend a concrete card
113+
addition, cut, replacement, or quantity change and explain how it improves reliability. Do not
114+
include gameplay advice, sequencing tips, mulligan decisions, or other ways to pilot the deck
115+
in consistency; keep those in game_plan or mulligan_guide as appropriate.
113116
In opponent_experience, imagine playing against the deck. Describe whether its turns are quick
114117
and interactive or long and solitaire-like, and call out potentially frustrating play patterns
115118
such as repeated discard, stax, locks, resource denial, excessive tutoring or shuffling, and

‎test/manavault/ai/deck_analysis_test.exs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,20 @@ defmodule Manavault.AI.DeckAnalysisTest do
125125
assert user_prompt =~ "naming both the cards to add and the cards to cut"
126126
end
127127

128+
test "limits consistency improvements to card changes rather than gameplay advice" do
129+
prompt = DeckAnalysis.system_prompt() |> String.replace(~r/\s+/, " ")
130+
131+
assert prompt =~
132+
"Every consistency item must recommend a concrete card addition, cut, replacement, or quantity change"
133+
134+
assert prompt =~ "explain how it improves reliability"
135+
136+
assert prompt =~
137+
"Do not include gameplay advice, sequencing tips, mulligan decisions, or other ways to pilot the deck in consistency"
138+
139+
assert prompt =~ "keep those in game_plan or mulligan_guide as appropriate"
140+
end
141+
128142
test "requires empty custom sections when no custom instructions exist" do
129143
schema = DeckAnalysis.response_schema()
130144
assert schema.properties.custom_sections.maxItems == 0

0 commit comments

Comments
 (0)