@@ -2,7 +2,7 @@ import type { ClientState } from "../client/src/client";
22 import type { Base, EmpireID, POI, System } from "../client/src/types";
33 import {
44 ALIGNMENT_DESCRIPTIONS,
5- MAX_GOAL_LENGTH,
5+ MAX_MISSION_LENGTH,
66 PERSONALITY_ARCHETYPES,
77 SPEECH_STYLE_DESCRIPTIONS,
88 } from "./constants";
@@ -14,7 +14,7 @@ export interface PromptContext {
1414 worldSnapshot?: WorldSnapshot;
1515 recentHistory: HistoryEntry[];
1616 memorySummary?: string | null;
17- currentGoal: string | null;
17+ currentMission: string | null;
1818 empire?: EmpireID;
1919 alignment?: AlignmentType;
2020 personality?: PersonalityType;
@@ -212,8 +212,8 @@ export function buildActionPrompt(context: PromptContext): string {
212212 : "No actions yet.";
213213 const forumContextBlock = formatForumContext(context.recentHistory);
214214 const helpBlock = `\nGAME INFORMATION:\n${HELP_TEXT}`;
215- const goalText = context.currentGoal?.trim()
216- ? context.currentGoal.trim()
215+ const missionText = context.currentMission?.trim()
216+ ? context.currentMission.trim()
217217 : "(none yet)";
218218 const empire = context.empire ?? "solarian";
219219 const alignment = context.alignment ?? "neutral";
@@ -225,8 +225,8 @@ export function buildActionPrompt(context: PromptContext): string {
225225 const warningBlock = context.repetitionWarning
226226 ? `
227227 REPETITION DETECTED: You performed "${context.repetitionWarning.action}" ${context.repetitionWarning.count} times in a row without progress.
228-STOP this action immediately. Choose something DIFFERENT or set a new goal.
229-If your goal is blocked or impossible, abandon it now.
228+STOP this action immediately. Choose something DIFFERENT or set a new mission.
229+If your mission is blocked or impossible, abandon it now.
230230 `
231231 : "";
232232 const strandedBlock = isStranded(context.state, context.worldSnapshot)
@@ -234,7 +234,7 @@ If your goal is blocked or impossible, abandon it now.
234234 STRANDED: Fuel is 0 and there is no base at this POI.
235235 Travel/jump/refuel/dock will FAIL. Do NOT repeat those actions.
236236 Ask for help or wait. Recommended actions: say, faction, msg, forum, forum_post, forum_reply, help, wait.
237-Example: {"goal":"Request rescue","action":"faction","args":{"content":"Stranded with 0 fuel at current system/POI. Need assistance."}}
237+Example: {"mission":"Request rescue from faction members","action":"faction","args":{"content":"Stranded with 0 fuel at current system/POI. Need assistance."}}
238238 `
239239 : "";
240240
@@ -244,12 +244,33 @@ Agents explore, trade, battle, and build empires in a living universe with emerg
244244 The game emphasizes real-time AI fleet combat, ongoing discoveries of new systems, and shifting trade routes and alliances.
245245
246246 HOW TO PLAY:
247-Use all of the provided information to consider your goal. Then decide how to act next.
247+Use all of the provided information to consider your mission. Then decide how to act next.
248248 Respond ONLY with a single JSON object. No extra text.
249249 ${helpBlock}
250250
251-YOUR GOAL:
252-${goalText}
251+YOUR MISSION:
252+${missionText}
253+
254+MISSION GUIDELINES:
255+A mission is a multi-step objective that guides several actions over multiple ticks.
256+It should describe WHAT you're working toward and WHY, not just the next immediate action.
257+
258+STRUCTURE YOUR MISSION:
259+Think: "I'm doing [short-term activities] to eventually [achieve long-term goal]"
260+- Good: Describes the purpose behind multiple actions
261+- Bad: Just names the next single action you'll take
262+
263+MISSION vs ACTION:
264+- Mission: Multi-step purpose that persists (example: "gathering resources to fund my next venture")
265+- Action: Single step you're about to take (example: "dock")
266+
267+UPDATE YOUR MISSION when:
268+- Mission completed (achieved your objective)
269+- Mission blocked (impossible to continue, need different approach)
270+- Better opportunity arises (new priority emerges)
271+- Current mission no longer aligns with your situation
272+
273+Keep your mission consistent across actions unless circumstances change significantly.
253274
254275 YOUR EMPIRE: ${getEmpireDescription(empire)}
255276
@@ -282,7 +303,7 @@ ${lastActionText}
282303 ${forumContextBlock}
283304
284305 ACTION SCHEMA (JSON ONLY):
285- {"goal":"...","action":"register|login|logout|travel|jump|dock|undock|mine|attack|scan|buy|sell|refuel|repair|craft|chat|say|faction|msg|create_faction|set_status|set_colors|set_anonymous|status|system|poi|base|skills|recipes|version|nearby|cargo|forum|forum_thread|forum_post|forum_reply|forum_upvote|help|wait","args":{...}}
306+ {"mission":"...","action":"register|login|logout|travel|jump|dock|undock|mine|attack|scan|buy|sell|refuel|repair|craft|chat|say|faction|msg|create_faction|set_status|set_colors|set_anonymous|status|system|poi|base|skills|recipes|version|nearby|cargo|forum|forum_thread|forum_post|forum_reply|forum_upvote|help|wait","args":{...}}
286307
287308 REQUIRED ARGS:
288309 - travel: {"target_poi":"..."}
@@ -310,14 +331,14 @@ REQUIRED ARGS:
310331
311332 FORMAT RULES:
312333 - Use only the listed actions.
313-- Goal is required, max ${MAX_GOAL_LENGTH} characters, update every action.
334+- Mission is required, max ${MAX_MISSION_LENGTH} characters. Keep it consistent unless circumstances change.
314335 - Only use info actions (status/system/poi/base/nearby/cargo) when information is missing.
315336 - IDs must come from current state or world snapshot.
316337 - Never omit required args or leave them blank.
317338
318339 ERROR RECOVERY:
319340 - If an action FAILED in recent memory, do NOT retry it with the same arguments.
320-- Change your approach: try a different action, move to a different location, or update your goal.
341+- Change your approach: try a different action, move to a different location, or update your mission.
321342
322343 INTERACTION GUIDELINES:
323344 - Stay in character with your personality archetype and empire