<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xml:base="https://docs.spec-kitty.ai/guides/how-to/missions/merge-mission/">
  <id>https://docs.spec-kitty.ai/guides/how-to/missions/merge-mission/</id>
  <title>How to Merge a Mission</title>
  <updated>2026-11-05T00:00:00.000Z</updated>
  <author><name>Spec Kitty</name></author>
  <link rel="alternate" type="text/html" href="https://docs.spec-kitty.ai/guides/how-to/missions/merge-mission/"/>
  <summary>How to merge a mission with Spec Kitty 3.2: land approved work packages on the local target branch with spec-kitty consolidate, preview it, and choose cleanup.</summary>
  <content type="html">&lt;span id=&quot;how-to-merge-a-mission&quot;&gt;&lt;/span&gt;
&lt;p&gt;Use this guide to land a Mission’s approved work packages on its target branch with &lt;code dir=&quot;auto&quot;&gt;spec-kitty consolidate&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; lands the lane branches on the mission branch, then lands the mission branch on the &lt;strong&gt;local&lt;/strong&gt; target branch. It never publishes to origin unless you pass &lt;code dir=&quot;auto&quot;&gt;--push&lt;/code&gt;. Publish through a topic branch and a pull request.&lt;/p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Every WP is &lt;code dir=&quot;auto&quot;&gt;approved&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;done&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You ran acceptance. See &lt;a href=&quot;/guides/how-to/missions/accept-and-merge/&quot;&gt;Accept and Merge&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The repository root checkout is on the target branch and has no uncommitted changes. Lane worktrees have no uncommitted changes either, unless you keep them with &lt;code dir=&quot;auto&quot;&gt;--keep-worktree&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;quick-start&quot;&gt;Quick Start&lt;/h2&gt;
&lt;p&gt;Run the command from the repository root checkout.&lt;/p&gt;
&lt;p&gt;In your agent:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#d6deeb;--1:#403f53&quot;&gt;/spec-kitty.consolidate&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;In your terminal:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;--mission&lt;/code&gt; names the Mission; it accepts the slug, the &lt;code dir=&quot;auto&quot;&gt;mid8&lt;/code&gt; or the Mission ID. The command was renamed from &lt;code dir=&quot;auto&quot;&gt;spec-kitty merge&lt;/code&gt;, and the old name now exits with an error. Replace it in scripts and notes.&lt;/p&gt;
&lt;p&gt;If a run stops, see &lt;a href=&quot;/guides/how-to/recovery/troubleshoot-merge/&quot;&gt;How to Troubleshoot Merge Issues&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;preview-with-dry-run&quot;&gt;Preview with Dry-Run&lt;/h2&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--dry-run&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;A dry run changes nothing. It prints the resolved plan as JSON: the strategy, the target branch, the mission branch, the lanes, whether branches and worktrees will be deleted, whether &lt;code dir=&quot;auto&quot;&gt;--push&lt;/code&gt; is set, and the mission number the run would assign. Add &lt;code dir=&quot;auto&quot;&gt;--json&lt;/code&gt; for plain JSON output; &lt;code dir=&quot;auto&quot;&gt;--json&lt;/code&gt; works only with &lt;code dir=&quot;auto&quot;&gt;--dry-run&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The dry run stops with a blocker, and exits 1, when the real run would refuse for a reason it can check in advance. The blockers include a review-artifact conflict and &lt;code dir=&quot;auto&quot;&gt;TARGET_BRANCH_CONTENT_CONFLICT&lt;/code&gt;. See &lt;a href=&quot;/guides/how-to/recovery/troubleshoot-merge/#target-branch-content-conflicts-during-squash&quot;&gt;Target-Branch Content Conflicts During Squash&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;strategies&quot;&gt;Strategies&lt;/h2&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;--strategy&lt;/code&gt; sets how the mission branch lands on the target branch. The lane-to-mission step always uses merge commits.&lt;/p&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Strategy&lt;/th&gt;&lt;th&gt;Effect&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;squash&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Lands the mission branch as one commit. This is the default.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;merge&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Lands the mission branch with a merge commit.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;rebase&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Rebases the mission branch onto the target branch, then advances the target branch to the result.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Values are lower-case:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--strategy&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;merge&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;To set a project default, add this to &lt;code dir=&quot;auto&quot;&gt;.kittify/config.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;merge&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;strategy&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;merge&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The order is: &lt;code dir=&quot;auto&quot;&gt;--strategy&lt;/code&gt;, then &lt;code dir=&quot;auto&quot;&gt;merge.strategy&lt;/code&gt;, then &lt;code dir=&quot;auto&quot;&gt;squash&lt;/code&gt;. A value outside &lt;code dir=&quot;auto&quot;&gt;merge&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;squash&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;rebase&lt;/code&gt; in the config file is an error. A resumed run keeps the strategy of the interrupted run.&lt;/p&gt;
&lt;h2 id=&quot;restack-onto-a-newer-dependency-branch&quot;&gt;Restack onto a Newer Dependency Branch&lt;/h2&gt;
&lt;p&gt;Sometimes a Mission is built on another branch that is still moving — a shared component, a
platform refactor — and it must pick up that branch’s newer head before it lands. Merge that
head into the lane that depends on it, with a real merge so the reviewed commits are not
rewritten, then have the lane reviewed again on the merged tree:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;switch&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;kitty/mission-&amp;#x3C;slug&gt;-lane-b&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;merge&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--no-ff&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;&amp;#x3C;dependency-branch&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; treats every commit a merge’s second parent brought in as content no approved
work package authored, so an undeclared restack is refused with an &lt;code dir=&quot;auto&quot;&gt;un-attributable&lt;/code&gt; verdict
under both strategies (&lt;code dir=&quot;auto&quot;&gt;--dry-run&lt;/code&gt; refuses it too). Declare the dependency once, on the
preview and on the real run:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--dependency-ref&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;&amp;#x3C;dependency-branch&gt;&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--dry-run&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--dependency-ref&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;&amp;#x3C;dependency-branch&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;--dependency-ref&lt;/code&gt; is repeatable and is a &lt;code dir=&quot;auto&quot;&gt;spec-kitty consolidate&lt;/code&gt; flag only: &lt;code dir=&quot;auto&quot;&gt;orchestrator-api consolidate-mission&lt;/code&gt; cannot declare one and refuses an undeclared restack. The ref is recorded on the run and pinned to the commit it named when the claim was built, so &lt;code dir=&quot;auto&quot;&gt;--resume&lt;/code&gt; rebuilds the same claim; if the name has moved by the gate or the resume, the run refuses (&lt;code dir=&quot;auto&quot;&gt;DEPENDENCY_REF_MOVED&lt;/code&gt;). A &lt;code dir=&quot;auto&quot;&gt;--resume&lt;/code&gt; that names a different set is refused too (&lt;code dir=&quot;auto&quot;&gt;consolidate --abort&lt;/code&gt; first). A declaration is verified before anything lands: the ref must resolve, the mission
branch or one of its lane branches must reach it, and no commit of any lane’s own history or
of the mission branch may sit in it, and it may not be named in the Mission’s own branch namespace or hold a head a work package recorded. The check recognizes Mission work only by what the Mission recorded: a raw-SHA declaration skips the branch-name guard, and a removed work package that left no recorded lane head, no lane-tip ref and no namespaced branch cannot be detected, so declare only a branch you know is external. A declaration that covers mission-authored work is
refused — that is what keeps a removed work package from riding a carrier lane — and the
declared commits are attributed as inherited history, never to a work package.&lt;/p&gt;
&lt;h2 id=&quot;target-branch&quot;&gt;Target Branch&lt;/h2&gt;
&lt;p&gt;By default &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; lands on the Mission’s recorded target branch. Override it only when you intend a different destination:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--target&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;develop&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;--target&lt;/code&gt; moves only the landing. The rest of the run still writes its bookkeeping (the work packages’ &lt;code dir=&quot;auto&quot;&gt;done&lt;/code&gt; transitions on a Mission without a coordination branch, and the coordination flatten) to the recorded target, from the repository root checkout. That checkout must be on the &lt;code dir=&quot;auto&quot;&gt;--target&lt;/code&gt; branch, so it cannot commit to the recorded one. The run is then refused before anything moves, with &lt;code dir=&quot;auto&quot;&gt;TARGET_OVERRIDE_RECORDED_TARGET_UNWRITABLE&lt;/code&gt;. &lt;code dir=&quot;auto&quot;&gt;--dry-run&lt;/code&gt; reports the same code (#5783). To land on a branch other than the recorded one, make it the Mission’s recorded target with &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt; (see below). You can still change &lt;code dir=&quot;auto&quot;&gt;target_branch&lt;/code&gt; in the Mission’s &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt; by hand, commit that, and run &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; without &lt;code dir=&quot;auto&quot;&gt;--target&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;retarget-the-mission&quot;&gt;Retarget the Mission&lt;/h3&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt; makes the &lt;code dir=&quot;auto&quot;&gt;--target&lt;/code&gt; branch the Mission’s recorded target in this run. Every write of the run then lands there: the landing, the work packages’ &lt;code dir=&quot;auto&quot;&gt;done&lt;/code&gt; transitions and the coordination flatten. Use it when the branch you deliver to changed after the Mission was created, for example a &lt;code dir=&quot;auto&quot;&gt;develop&lt;/code&gt; branch cut from &lt;code dir=&quot;auto&quot;&gt;main&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;checkout&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;develop&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--dry-run&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--json&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--target&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;develop&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--retarget&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--target&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;develop&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--retarget&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--retarget-reason&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#984E4D&quot;&gt;release train moved&lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;develop:kitty-specs/015-user-authentication/meta.json&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The forecast adds &lt;code dir=&quot;auto&quot;&gt;&quot;retarget&quot;: {&quot;from&quot;: &quot;main&quot;, &quot;to&quot;: &quot;develop&quot;}&lt;/code&gt; to its JSON and reports the same refusal codes as the real run. &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt; needs &lt;code dir=&quot;auto&quot;&gt;--target&lt;/code&gt;, and &lt;code dir=&quot;auto&quot;&gt;--retarget-reason&lt;/code&gt; needs &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt;. Either one alone is a usage error: exit 2, nothing moves. Naming the recorded target again is not a retarget.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is recorded.&lt;/strong&gt; The first change the run makes is a commit of the Mission’s &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt;. It sets &lt;code dir=&quot;auto&quot;&gt;target_branch&lt;/code&gt; to the new target and appends one entry to &lt;code dir=&quot;auto&quot;&gt;retarget_history&lt;/code&gt;: &lt;code dir=&quot;auto&quot;&gt;from&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;to&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;actor&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;at&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;reason&lt;/code&gt;. The history keeps the newest 20 entries. The default reason is &lt;code dir=&quot;auto&quot;&gt;operator retarget via spec-kitty consolidate --target &amp;#x3C;branch&gt; --retarget&lt;/code&gt;. The commit is made on every branch whose tree carries the Mission’s &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt;: the Mission branch (for a Mission created without &lt;code dir=&quot;auto&quot;&gt;--topology&lt;/code&gt;, its topic branch) and the new target when it carries the file. &lt;code dir=&quot;auto&quot;&gt;lanes.json&lt;/code&gt; is not rewritten.&lt;/p&gt;
&lt;p&gt;On a Mission created without &lt;code dir=&quot;auto&quot;&gt;--topology&lt;/code&gt;, the commit is made on the topic branch. The default squash landing folds it into the landing, so the new target shows no separate retarget commit. &lt;code dir=&quot;auto&quot;&gt;retarget_history&lt;/code&gt; holds exactly one entry.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Refusals.&lt;/strong&gt; Each one is reported before any branch moves.&lt;/p&gt;








































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Code&lt;/th&gt;&lt;th&gt;When&lt;/th&gt;&lt;th&gt;Next step&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;RETARGET_RECORD_UNWRITABLE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Neither the Mission branch nor the new target carries the Mission’s &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt;. Or the new target carries it, but the repository root checkout is not on the new target, or &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt; there is untracked or has an uncommitted edit.&lt;/td&gt;&lt;td&gt;Consolidate into the recorded target; or integrate the recorded target into the new one first. For a checkout problem: &lt;code dir=&quot;auto&quot;&gt;git checkout &amp;#x3C;branch&gt;&lt;/code&gt;, commit or discard the edit, then re-run.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;RETARGET_RECORD_UNWRITABLE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The new target carries the Mission’s &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt;, and in the repository root checkout the file has the skip-worktree or assume-unchanged bit, even with no edit.&lt;/td&gt;&lt;td&gt;Clear the bit with the command the message prints (&lt;code dir=&quot;auto&quot;&gt;git update-index --no-skip-worktree &amp;#x3C;path&gt;&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;git update-index --no-assume-unchanged &amp;#x3C;path&gt;&lt;/code&gt;, or both when the file carries both), then re-run.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;RETARGET_RECORD_UNWRITABLE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The new target does not carry the Mission yet, and the repository root checkout, on the new target, has untracked files under &lt;code dir=&quot;auto&quot;&gt;kitty-specs/&amp;#x3C;slug&gt;/&lt;/code&gt; that the landing would overwrite.&lt;/td&gt;&lt;td&gt;Remove the untracked copies, or move them aside, then re-run.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;RETARGET_WRITE_BRANCH_IS_RECORDED_TARGET&lt;/code&gt;&lt;/td&gt;&lt;td&gt;A &lt;code dir=&quot;auto&quot;&gt;single_branch&lt;/code&gt; Mission created with &lt;code dir=&quot;auto&quot;&gt;--commit-to-target&lt;/code&gt;: its work is written on the recorded target itself. A retarget would land that branch and then delete it.&lt;/td&gt;&lt;td&gt;Consolidate into the recorded target, then integrate it into the new one with git.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;PROTECTED_BRANCH_REFUSED&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The new target is protected (#6464), or the workflow mutation policy would refuse the &lt;code dir=&quot;auto&quot;&gt;done&lt;/code&gt; bookkeeping on the new target (#5385).&lt;/td&gt;&lt;td&gt;Pick an unprotected target.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;RETARGET_RESUME_MISMATCH&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The run record holds a retarget from an earlier run, and this run names another target, with or without &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;--target &amp;#x3C;old target&gt;&lt;/code&gt; included).&lt;/td&gt;&lt;td&gt;Re-run with &lt;code dir=&quot;auto&quot;&gt;--target &amp;#x3C;recorded new target&gt; --retarget&lt;/code&gt;, or a bare &lt;code dir=&quot;auto&quot;&gt;--resume&lt;/code&gt;; or &lt;code dir=&quot;auto&quot;&gt;--abort&lt;/code&gt; first.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;A retarget away from a protected recorded target onto an unprotected branch is allowed: the old target receives nothing. A plain &lt;code dir=&quot;auto&quot;&gt;--target&lt;/code&gt; without &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt; keeps refusing with &lt;code dir=&quot;auto&quot;&gt;TARGET_OVERRIDE_RECORDED_TARGET_UNWRITABLE&lt;/code&gt;, and its next step now names &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scope.&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt; works on Missions with an explicit &lt;code dir=&quot;auto&quot;&gt;lanes&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;lanes_with_coord&lt;/code&gt; topology, and on Missions created without &lt;code dir=&quot;auto&quot;&gt;--topology&lt;/code&gt; once &lt;code dir=&quot;auto&quot;&gt;finalize-tasks&lt;/code&gt; has settled them to &lt;code dir=&quot;auto&quot;&gt;lanes_with_coord&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;single_branch&lt;/code&gt;. &lt;code dir=&quot;auto&quot;&gt;--attest-*&lt;/code&gt; flags given with &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt; follow the retarget: on a Mission without a coordination branch, their status events land on the new target. &lt;code dir=&quot;auto&quot;&gt;orchestrator-api consolidate-mission&lt;/code&gt; cannot retarget, because it has no rollback. A target that differs from the record still fails there with &lt;code dir=&quot;auto&quot;&gt;PREFLIGHT_FAILED&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;TARGET_OVERRIDE_RECORDED_TARGET_UNWRITABLE&lt;/code&gt;. While a run record holds a retarget, it fails with &lt;code dir=&quot;auto&quot;&gt;PREFLIGHT_FAILED&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;RETARGET_RESUME_MISMATCH&lt;/code&gt; for any target. Finish the retarget with &lt;code dir=&quot;auto&quot;&gt;spec-kitty consolidate --resume&lt;/code&gt;, or drop it with &lt;code dir=&quot;auto&quot;&gt;--abort&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abort and resume.&lt;/strong&gt; If the run fails after the retarget commit, it restores the new target and the Mission branch to their tips from before the run. That includes the status events of &lt;code dir=&quot;auto&quot;&gt;--attest-*&lt;/code&gt; flags given with &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt; on a Mission without a coordination branch: they are part of the run, so they are undone with it. After a kill, a re-run or &lt;code dir=&quot;auto&quot;&gt;--resume&lt;/code&gt; that then fails undoes them too, and so does &lt;code dir=&quot;auto&quot;&gt;--abort&lt;/code&gt; once the killed run had taken its snapshot. Pass the &lt;code dir=&quot;auto&quot;&gt;--attest-*&lt;/code&gt; flags again on the re-run: a bare &lt;code dir=&quot;auto&quot;&gt;--resume&lt;/code&gt; does not record them and fails the same claim check. They are kept by a refusal before the first branch moves (for example a claim-time refusal), as on any run; by a kill between the attestation commit and saving the run record; and by &lt;code dir=&quot;auto&quot;&gt;--abort&lt;/code&gt; after a kill before the snapshot, which has nothing to restore and only clears the record. The retarget stays in the run record. A bare &lt;code dir=&quot;auto&quot;&gt;spec-kitty consolidate --resume&lt;/code&gt;, or a re-run, applies it again. &lt;code dir=&quot;auto&quot;&gt;spec-kitty consolidate --abort&lt;/code&gt; drops it. If the run is killed between the retarget commit and saving the run record, a bare &lt;code dir=&quot;auto&quot;&gt;spec-kitty consolidate --resume&lt;/code&gt; finishes the run. It exits 0 and lands with exactly one retarget record. No &lt;code dir=&quot;auto&quot;&gt;--release-branch&lt;/code&gt; is needed (&lt;code dir=&quot;auto&quot;&gt;tests/terminus/test_consolidate_retarget_resume.py&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id=&quot;skip-worktree-entries-in-the-targets-checkout&quot;&gt;Skip-worktree entries in the target’s checkout&lt;/h3&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; writes its bookkeeping (the Mission’s &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt; and status files) in the checkout of the target branch, and resyncs every checkout of the target or the Mission branch when it moves them. A skip-worktree bit on a file under &lt;code dir=&quot;auto&quot;&gt;kitty-specs/&amp;#x3C;slug&gt;/&lt;/code&gt; hides the run’s own write from its bookkeeping commit. The post-merge check then fails, and the rollback cannot resync the checkout over the edited file, so the landing stays staged there. A run is therefore refused before any branch moves, with &lt;code dir=&quot;auto&quot;&gt;CHECKOUT_SKIP_WORKTREE_ENTRIES&lt;/code&gt;, when such a checkout has a skip-worktree entry under &lt;code dir=&quot;auto&quot;&gt;kitty-specs/&amp;#x3C;slug&gt;/&lt;/code&gt; or on a path the Mission’s branches change. Entries on the changed paths are refused to be safe: an edit under the bit does not show in &lt;code dir=&quot;auto&quot;&gt;git status&lt;/code&gt; and would be overwritten or block the resync. An unedited one would land, but is refused too. &lt;code dir=&quot;auto&quot;&gt;--dry-run&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;orchestrator-api consolidate-mission&lt;/code&gt; report the same code. Clear the bit, then re-run:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;update-index&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--no-skip-worktree&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;kitty-specs/015-user-authentication/meta.json&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Entries a sparse checkout excludes have no file and are not refused. The assume-unchanged bit is not refused either, except under &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt;, where the record commit refuses it (&lt;code dir=&quot;auto&quot;&gt;RETARGET_RECORD_UNWRITABLE&lt;/code&gt;). Listing the index expands a sparse index in memory.&lt;/p&gt;
&lt;h2 id=&quot;cleanup-options&quot;&gt;Cleanup Options&lt;/h2&gt;
&lt;p&gt;After a successful landing, &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; removes the lane worktrees and deletes the lane branches. Each flag pair overrides that default for one resource:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--keep-worktree&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--keep-branch&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--keep-worktree&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--keep-branch&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;--remove-worktree&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;--delete-branch&lt;/code&gt; state the default explicitly. They also override a Mission’s retention policy.&lt;/p&gt;
&lt;h3 id=&quot;mission-retention-policy&quot;&gt;Mission Retention Policy&lt;/h3&gt;
&lt;p&gt;A Mission can record a standing retention policy in its &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt;: &lt;code dir=&quot;auto&quot;&gt;retain_branches: true&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;retain_worktrees: true&lt;/code&gt;, or both. The policy is absent unless you set it, so a Mission that never opts in keeps the default cleanup.&lt;/p&gt;
&lt;p&gt;Effective cleanup follows this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An explicit flag (&lt;code dir=&quot;auto&quot;&gt;--keep-branch&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;--delete-branch&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;--keep-worktree&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;--remove-worktree&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt; retention policy.&lt;/li&gt;
&lt;li&gt;The default: delete branches and remove worktrees.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;retain_branches&lt;/code&gt; acts as &lt;code dir=&quot;auto&quot;&gt;--keep-branch&lt;/code&gt;, and &lt;code dir=&quot;auto&quot;&gt;retain_worktrees&lt;/code&gt; acts as &lt;code dir=&quot;auto&quot;&gt;--keep-worktree&lt;/code&gt;. Retention is never silent:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;With no flag and a retaining policy, &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; keeps the resource and prints a warning that names &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt; as the source.&lt;/li&gt;
&lt;li&gt;An explicit &lt;code dir=&quot;auto&quot;&gt;--delete-branch&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;--remove-worktree&lt;/code&gt; against a retaining Mission proceeds and prints a notice that the flag overrode the policy.&lt;/li&gt;
&lt;li&gt;A corrupt &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt; stops the run with an error. A retention value that is not a boolean counts as retain and prints a warning.&lt;/li&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;--dry-run&lt;/code&gt; shows the resolved decision, with a &lt;code dir=&quot;auto&quot;&gt;retention&lt;/code&gt; object that names its source.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a Mission with a coordination topology, the coordination branch, its worktree and its marker in &lt;code dir=&quot;auto&quot;&gt;meta.json&lt;/code&gt; are kept or removed together. They are removed only when branches are deleted &lt;strong&gt;and&lt;/strong&gt; worktrees are removed. Keeping either one keeps all three. &lt;code dir=&quot;auto&quot;&gt;--abort&lt;/code&gt; follows the same rule for the coordination worktree.&lt;/p&gt;
&lt;p&gt;The private scratch worktree that &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; uses under &lt;code dir=&quot;auto&quot;&gt;.kittify/runtime/merge/&amp;#x3C;mission_id&gt;/workspace&lt;/code&gt; is not a retained resource. It is always removed.&lt;/p&gt;
&lt;h4 id=&quot;declaring-retention-at-creation&quot;&gt;Declaring Retention at Creation&lt;/h4&gt;
&lt;p&gt;Set the policy when you create the Mission:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;agent&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#984E4D&quot;&gt;&amp;#x3C;slug&gt;&lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--retain-branches&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--retain-worktrees&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;complete-a-direct-on-target-mission---skip-lanes&quot;&gt;Complete a Direct-on-Target Mission (&lt;code dir=&quot;auto&quot;&gt;--skip-lanes&lt;/code&gt;)&lt;/h2&gt;
&lt;p&gt;A direct-on-target Mission commits its work packages straight onto the target branch: no lane branch exists, and there is no &lt;code dir=&quot;auto&quot;&gt;kitty-specs/&amp;#x3C;slug&gt;/lanes.json&lt;/code&gt;. &lt;code dir=&quot;auto&quot;&gt;--skip-lanes&lt;/code&gt; (alias &lt;code dir=&quot;auto&quot;&gt;--no-lanes&lt;/code&gt;) completes one transactionally:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;spec-kitty&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;consolidate&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--mission&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;015-user-authentication&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;--skip-lanes&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The flag is an explicit opt-in and does nothing for a Mission that has a &lt;code dir=&quot;auto&quot;&gt;lanes.json&lt;/code&gt;. With no &lt;code dir=&quot;auto&quot;&gt;lanes.json&lt;/code&gt; to read, the run synthesizes the lanes manifest it needs, and that manifest takes its implementation-evidence base from the target branch’s own history: the target tip immediately before the commit that introduced &lt;code dir=&quot;auto&quot;&gt;kitty-specs/&amp;#x3C;slug&gt;/&lt;/code&gt;. (When that commit is the repository root it has no parent and is its own base, so content that root already carries is outside the window.) The evidence window is the net tree diff from that base to the target tip: a path changed and then reverted counts as unchanged, and Mission bookkeeping never counts as implementation.&lt;/p&gt;
&lt;p&gt;The review and evidence gates are the same as on any other Mission, and &lt;code dir=&quot;auto&quot;&gt;--skip-lanes&lt;/code&gt; does not relax them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A work package approved with no change to its &lt;code dir=&quot;auto&quot;&gt;owned_files&lt;/code&gt; inside that window is refused &lt;code dir=&quot;auto&quot;&gt;IMPLEMENTATION_MISSING&lt;/code&gt;, unless a no-implementation attestation is in force for it (&lt;code dir=&quot;auto&quot;&gt;--attest-no-implementation&lt;/code&gt;, recorded on &lt;code dir=&quot;auto&quot;&gt;accept&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;An approval recorded by the implementer itself is refused &lt;code dir=&quot;auto&quot;&gt;REVIEW_NOT_INDEPENDENT&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A work package whose &lt;code dir=&quot;auto&quot;&gt;owned_files&lt;/code&gt; cannot be read is refused &lt;code dir=&quot;auto&quot;&gt;OWNERSHIP_UNRESOLVED&lt;/code&gt;, and no attestation lifts it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When the Mission’s planning artifacts are not in the target branch’s history, no window can be computed and the run refuses &lt;code dir=&quot;auto&quot;&gt;EVIDENCE_WINDOW_UNCOMPUTABLE&lt;/code&gt;. &lt;code dir=&quot;auto&quot;&gt;spec-kitty agent mission finalize-tasks&lt;/code&gt; records nothing this gate reads on this topology; commit &lt;code dir=&quot;auto&quot;&gt;kitty-specs/&amp;#x3C;slug&gt;/&lt;/code&gt; on the target branch so the Mission’s start is in history, then re-run.&lt;/p&gt;
&lt;h2 id=&quot;publish-the-result&quot;&gt;Publish the Result&lt;/h2&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; lands on the local target branch only. Publish through a topic branch and a pull request. See &lt;a href=&quot;/guides/how-to/missions/accept-and-merge/#when-local-main-is-not-publishable&quot;&gt;When Local &lt;code dir=&quot;auto&quot;&gt;main&lt;/code&gt; Is Not Publishable&lt;/a&gt; and &lt;a href=&quot;/guides/how-to/collaboration/run-an-autonomous-mission/&quot;&gt;Run an Autonomous Mission&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;--push&lt;/code&gt; publishes to origin after the local landing. Use it only where your repository’s workflow allows direct pushes to the target branch. With &lt;code dir=&quot;auto&quot;&gt;--push&lt;/code&gt;, a local target branch that is ahead of, behind or diverged from its tracking branch is refused with &lt;code dir=&quot;auto&quot;&gt;TARGET_BRANCH_NOT_SYNCHRONIZED&lt;/code&gt;. See &lt;a href=&quot;/guides/how-to/recovery/troubleshoot-merge/#not-synchronized-with-origin-only-with---push&quot;&gt;How to Troubleshoot Merge Issues&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;after-merge&quot;&gt;After Merge&lt;/h2&gt;
&lt;p&gt;Before you call the Mission done, run the mission review, check the retrospective, and read its findings. See &lt;a href=&quot;/guides/how-to/missions/accept-and-merge/#after-consolidation&quot;&gt;After Consolidation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;command-reference&quot;&gt;Command Reference&lt;/h2&gt;




































































































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Flag&lt;/th&gt;&lt;th&gt;What it does&lt;/th&gt;&lt;th&gt;Default&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--mission &amp;#x3C;slug&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Names the Mission&lt;/td&gt;&lt;td&gt;Resolved from the current branch when possible; otherwise the command asks for &lt;code dir=&quot;auto&quot;&gt;--mission&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--strategy&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;merge&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;squash&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;rebase&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;squash&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--target &amp;#x3C;branch&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Target branch for the landing&lt;/td&gt;&lt;td&gt;The Mission’s recorded target branch&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt;&lt;/td&gt;&lt;td&gt;With &lt;code dir=&quot;auto&quot;&gt;--target&lt;/code&gt;: make that branch the Mission’s recorded target in this run. See &lt;a href=&quot;#retarget-the-mission&quot;&gt;Retarget the Mission&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--retarget-reason &quot;&amp;#x3C;why&gt;&quot;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;With &lt;code dir=&quot;auto&quot;&gt;--retarget&lt;/code&gt;: the reason recorded in &lt;code dir=&quot;auto&quot;&gt;retarget_history&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;operator retarget via spec-kitty consolidate --target &amp;#x3C;branch&gt; --retarget&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--delete-branch&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;--keep-branch&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Delete or keep lane branches&lt;/td&gt;&lt;td&gt;The retention policy, else delete&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--remove-worktree&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;--keep-worktree&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Remove or keep lane worktrees&lt;/td&gt;&lt;td&gt;The retention policy, else remove&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--push&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Publish to origin after the local landing&lt;/td&gt;&lt;td&gt;No push&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--dry-run&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Show the plan without changing anything&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--json&lt;/code&gt;&lt;/td&gt;&lt;td&gt;JSON output, with &lt;code dir=&quot;auto&quot;&gt;--dry-run&lt;/code&gt; only&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--resume&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Continue an interrupted run&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--abort&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Restore the branches the run moved and clear the record&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--yes&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;-y&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Proceed after warnings without prompts&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--skip-review-artifact-check&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Bypass the review-artifact consistency gate. Requires &lt;code dir=&quot;auto&quot;&gt;--note &quot;&amp;#x3C;reason&gt;&quot;&lt;/code&gt;, which is recorded as override evidence&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--skip-lanes&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Complete a direct-on-target Mission whose &lt;code dir=&quot;auto&quot;&gt;lanes.json&lt;/code&gt; is genuinely absent&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--allow-sparse-checkout&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Proceed when legacy sparse-checkout state is detected&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--attest-canceled-superseded &amp;#x3C;WP&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Attest, after checking by hand, that a canceled WP’s content is absent or superseded. Repeatable, requires &lt;code dir=&quot;auto&quot;&gt;--attest-reason &quot;&amp;#x3C;what you checked&gt;&quot;&lt;/code&gt;, never lifts a FAIL&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;--attest-approved-reviewed &amp;#x3C;WP&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Attest, after checking the lane by hand, that an approval with no recorded lane commit (&lt;code dir=&quot;auto&quot;&gt;APPROVAL_STAMP_MISSING&lt;/code&gt;, any approval made before 4.0.0rc5) covers the lane as it stands. Repeatable, requires &lt;code dir=&quot;auto&quot;&gt;--attest-reason &quot;&amp;#x3C;what you checked&gt;&quot;&lt;/code&gt;. Does not lift &lt;code dir=&quot;auto&quot;&gt;LANE_MOVED_AFTER_APPROVAL&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Off&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Full reference: &lt;a href=&quot;/api/cli-commands/#spec-kitty-consolidate&quot;&gt;CLI Commands&lt;/a&gt;. Exit codes and refusal codes: &lt;a href=&quot;/api/cli-commands/#spec-kitty-consolidate-exit-codes-and-refusal-codes&quot;&gt;CLI reference&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;see-also&quot;&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/guides/how-to/missions/accept-and-merge/&quot;&gt;Accept and Merge&lt;/a&gt;: validation before consolidation&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/guides/how-to/missions/keep-main-clean/&quot;&gt;Keep Main Clean&lt;/a&gt;: choose a target branch without changing the planning location&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/guides/how-to/collaboration/run-an-autonomous-mission/&quot;&gt;Run an Autonomous Mission&lt;/a&gt;: autonomous run and focused pull request path&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/guides/how-to/recovery/troubleshoot-merge/&quot;&gt;How to Troubleshoot Merge Issues&lt;/a&gt;: resume, abort and refusals&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/guides/how-to/recovery/recover-from-interrupted-merge/&quot;&gt;Recover from an Interrupted Consolidation&lt;/a&gt;: the record, the rollback and the exit codes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;background&quot;&gt;Background&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/architecture/execution-lanes/&quot;&gt;Execution Lanes&lt;/a&gt;: how worktrees work&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/architecture/git-worktrees/&quot;&gt;Git Worktrees&lt;/a&gt;: git worktree fundamentals&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/architecture/git-workflow/#4-consolidated&quot;&gt;Git workflow&lt;/a&gt;: what each consolidation step does&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;getting-started&quot;&gt;Getting Started&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/guides/tutorials/your-first-mission/&quot;&gt;Your First Mission&lt;/a&gt;: complete workflow walkthrough&lt;/li&gt;
&lt;/ul&gt;</content>
</entry>
