<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xml:base="https://docs.spec-kitty.ai/adr/2.x/2026-02-17-2-runtime-owned-mission-discovery-loading/">
  <id>https://docs.spec-kitty.ai/adr/2.x/2026-02-17-2-runtime-owned-mission-discovery-loading/</id>
  <title>Runtime-owned Mission Discovery and Loading</title>
  <updated>2026-02-17T00:00:00.000Z</updated>
  <author><name>Spec Kitty</name></author>
  <link rel="alternate" type="text/html" href="https://docs.spec-kitty.ai/adr/2.x/2026-02-17-2-runtime-owned-mission-discovery-loading/"/>
  <summary>Gives the runtime sole ownership of Mission discovery and YAML loading, so the CLI stops keeping a second precedence order that resolved custom packs differently.</summary>
  <content type="html">&lt;h2 id=&quot;context-and-problem-statement&quot;&gt;Context and Problem Statement&lt;/h2&gt;
&lt;p&gt;Mission discovery and loading behavior is currently split between resolver code and legacy mission listing/loading code paths. This creates precedence inconsistencies and non-deterministic mission selection behavior for custom mission packs.&lt;/p&gt;
&lt;h2 id=&quot;decision&quot;&gt;Decision&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Mission discovery/loading logic is owned by &lt;code dir=&quot;auto&quot;&gt;spec-kitty-runtime&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;spec-kitty&lt;/code&gt; CLI consumes runtime discovery APIs and does not maintain parallel precedence logic.&lt;/li&gt;
&lt;li&gt;Mission definition format for V1 is YAML-only.&lt;/li&gt;
&lt;li&gt;Discovery precedence follows canonical runtime order.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;decision-drivers&quot;&gt;Decision Drivers&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Deterministic mission selection.&lt;/li&gt;
&lt;li&gt;Single source of truth for discovery precedence.&lt;/li&gt;
&lt;li&gt;Better author experience for mission packs.&lt;/li&gt;
&lt;li&gt;Reduced maintenance burden from duplicated logic.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;consequences&quot;&gt;Consequences&lt;/h2&gt;
&lt;h3 id=&quot;positive&quot;&gt;Positive&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;No resolver drift between command paths.&lt;/li&gt;
&lt;li&gt;Easier documentation and support.&lt;/li&gt;
&lt;li&gt;Better portability to other execution hosts.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;negative&quot;&gt;Negative&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Runtime package dependency introduced into CLI mission-loading code path.&lt;/li&gt;
&lt;li&gt;Migration effort for existing mission helper functions.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;neutral&quot;&gt;Neutral&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Legacy mission locations stay temporarily supported with deprecation warnings.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;migration&quot;&gt;Migration&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Route mission listing/info commands through runtime discovery API.&lt;/li&gt;
&lt;li&gt;Keep existing CLI UX while changing backend resolution source.&lt;/li&gt;
&lt;li&gt;Remove duplicated resolver code after migration window.&lt;/li&gt;
&lt;/ol&gt;</content>
</entry>
