import{_ as i,o as a,c as t,a2 as n}from"./chunks/framework.CJEbdX1t.js";const o=JSON.parse('{"title":"Ticket Sync","description":"","frontmatter":{},"headers":[],"relativePath":"guides/ticket-sync.md","filePath":"guides/ticket-sync.md"}'),e={name:"guides/ticket-sync.md"};function p(l,s,h,k,r,d){return a(),t("div",null,[...s[0]||(s[0]=[n(`<h1 id="ticket-sync" tabindex="-1">Ticket Sync <a class="header-anchor" href="#ticket-sync" aria-label="Permalink to &quot;Ticket Sync&quot;">​</a></h1><p>Specwright maintains a <strong>live link</strong> between spec sections and tickets. This is bidirectional — specs create tickets, ticket status flows back to specs, and code merges close tickets with evidence.</p><h2 id="how-it-works" tabindex="-1">How It Works <a class="header-anchor" href="#how-it-works" aria-label="Permalink to &quot;How It Works&quot;">​</a></h2><h3 id="spec-→-tickets-forward-sync" tabindex="-1">Spec → Tickets (Forward Sync) <a class="header-anchor" href="#spec-→-tickets-forward-sync" aria-label="Permalink to &quot;Spec → Tickets (Forward Sync)&quot;">​</a></h3><p>When <code>auto_tickets</code> is enabled, the agent creates tickets from spec sections:</p><div class="language-markdown vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">markdown</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">## 3. Idempotency Layer</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">&lt;!-- specwright:ticket:jira:PAY-142 --&gt;</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">&lt;!-- specwright:system:idempotency status:in_progress --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">All payment endpoints must support idempotency keys...</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">### 3.1 Key Generation</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">&lt;!-- specwright:ticket:jira:PAY-143 --&gt;</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">&lt;!-- specwright:system:key-gen status:done --&gt;</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">&lt;!-- specwright:realized-in:PR#412 src/payments/keys.ts --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">### 3.2 Retry Handling</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">&lt;!-- specwright:ticket:jira:PAY-144 --&gt;</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">&lt;!-- specwright:system:retry status:in_progress --&gt;</span></span></code></pre></div><p>Hidden HTML comments track the bidirectional link. Engineers never think about this — the agent manages it.</p><h3 id="tickets-→-spec-reverse-sync" tabindex="-1">Tickets → Spec (Reverse Sync) <a class="header-anchor" href="#tickets-→-spec-reverse-sync" aria-label="Permalink to &quot;Tickets → Spec (Reverse Sync)&quot;">​</a></h3><ul><li>Engineer closes PAY-143 → agent verifies against code, updates spec status</li><li>PM adds acceptance criteria in Jira → agent opens PR to update spec section</li><li>Unmapped ticket created → agent asks: &quot;Should I add a spec section, or is this out of scope?&quot;</li></ul><h3 id="code-→-spec-realization-sync" tabindex="-1">Code → Spec (Realization Sync) <a class="header-anchor" href="#code-→-spec-realization-sync" aria-label="Permalink to &quot;Code → Spec (Realization Sync)&quot;">​</a></h3><ul><li>PR merges implementing §3.1 → agent analyzes code, marks section as realized</li><li>Code changes contradict §3.2 → agent flags conflict, suggests spec or code update</li><li>New behavior introduced without spec → agent asks: &quot;Should I add a spec section for this?&quot;</li></ul><h2 id="configuration" tabindex="-1">Configuration <a class="header-anchor" href="#configuration" aria-label="Permalink to &quot;Configuration&quot;">​</a></h2><h3 id="simple-setup" tabindex="-1">Simple Setup <a class="header-anchor" href="#simple-setup" aria-label="Permalink to &quot;Simple Setup&quot;">​</a></h3><p>For a single ticket system with default status mappings:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">sync</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  system</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">jira</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">          # or: linear, github</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  project_key</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">PAY</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">      # Jira project key, Linear team, or GitHub repo</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  create_tickets</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  reverse_sync</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span></code></pre></div><h3 id="supported-systems" tabindex="-1">Supported Systems <a class="header-anchor" href="#supported-systems" aria-label="Permalink to &quot;Supported Systems&quot;">​</a></h3><table tabindex="0"><thead><tr><th>System</th><th><code>system</code> value</th><th><code>project_key</code> format</th></tr></thead><tbody><tr><td>Jira</td><td><code>jira</code></td><td>Project key (e.g., <code>PAY</code>)</td></tr><tr><td>Linear</td><td><code>linear</code></td><td>Team key (e.g., <code>payments</code>)</td></tr><tr><td>GitHub Issues</td><td><code>github</code></td><td><code>owner/repo</code></td></tr></tbody></table><h3 id="required-secrets" tabindex="-1">Required Secrets <a class="header-anchor" href="#required-secrets" aria-label="Permalink to &quot;Required Secrets&quot;">​</a></h3><table tabindex="0"><thead><tr><th>System</th><th>Environment Variables</th></tr></thead><tbody><tr><td>Jira</td><td><code>JIRA_HOST</code>, <code>JIRA_EMAIL</code>, <code>JIRA_API_TOKEN</code></td></tr><tr><td>Linear</td><td><code>LINEAR_API_KEY</code></td></tr><tr><td>GitHub (local)</td><td><code>GITHUB_TOKEN</code> or <code>gh</code> CLI authenticated</td></tr><tr><td>GitHub (server proxy)</td><td>None — just <code>specwright login</code></td></tr></tbody></table><div class="tip custom-block"><p class="custom-block-title">Server Proxy for GitHub</p><p>If you&#39;ve run <code>specwright login</code> and your org has the Specwright GitHub App installed, <code>specwright sync</code> automatically uses the server as a proxy. The server makes GitHub API calls using its App installation token — no local <code>GITHUB_TOKEN</code> needed. Use <code>--local</code> to bypass the proxy.</p></div><h2 id="advanced-multi-system-routing" tabindex="-1">Advanced: Multi-System Routing <a class="header-anchor" href="#advanced-multi-system-routing" aria-label="Permalink to &quot;Advanced: Multi-System Routing&quot;">​</a></h2><p>For enterprise teams with multiple ticket systems or custom Jira workflows:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">ticket_systems</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  engineering</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    system</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">jira</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    project</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ENG</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    status_map</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      draft</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Backlog&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      todo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Open&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      in_progress</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;In Development&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      done</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Closed&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      blocked</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;On Hold&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      deprecated</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Won&#39;t Fix&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    hierarchy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">      2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Epic&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">        # h2 sections → Epics</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">      3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Story&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">       # h3 sections → Stories</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">      4</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Sub-task&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">    # h4 sections → Sub-tasks</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    auto_parent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  oss</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    system</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">github</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">org/public-repo</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">routing</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      tags</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;open-source&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    target</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">oss</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    target</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">engineering</span></span></code></pre></div><h3 id="status-mapping" tabindex="-1">Status Mapping <a class="header-anchor" href="#status-mapping" aria-label="Permalink to &quot;Status Mapping&quot;">​</a></h3><p>Map spec statuses to your ticket system&#39;s workflow statuses:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">status_map</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  draft</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Backlog&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">        # spec draft → ticket Backlog</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  todo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Open&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">            # spec todo → ticket Open</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  in_progress</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;In Development&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  done</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Closed&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  blocked</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;On Hold&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">  deprecated</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Won&#39;t Fix&quot;</span></span></code></pre></div><h3 id="hierarchy-templates" tabindex="-1">Hierarchy Templates <a class="header-anchor" href="#hierarchy-templates" aria-label="Permalink to &quot;Hierarchy Templates&quot;">​</a></h3><p>Map spec section depth to issue types:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">hierarchy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Epic&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">       # h2 sections create Epics</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Story&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">      # h3 sections create Stories</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  4</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Sub-task&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">   # h4 sections create Sub-tasks</span></span></code></pre></div><p>With <code>auto_parent: true</code>, child tickets are automatically linked to their parent.</p><h3 id="routing-rules" tabindex="-1">Routing Rules <a class="header-anchor" href="#routing-rules" aria-label="Permalink to &quot;Routing Rules&quot;">​</a></h3><p>Route sections to different ticket systems based on tags, team, or file path:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">routing</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      tags</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;open-source&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    target</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">oss</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      team</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;security&quot;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    target</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">security-board</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">      default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">    target</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">engineering</span></span></code></pre></div><h2 id="adapter-architecture" tabindex="-1">Adapter Architecture <a class="header-anchor" href="#adapter-architecture" aria-label="Permalink to &quot;Adapter Architecture&quot;">​</a></h2><p>Specwright uses an adapter pattern to support multiple ticket systems:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>┌──────────────────────────────────────────┐</span></span>
<span class="line"><span>│           Specwright Core                │</span></span>
<span class="line"><span>│        (speaks &quot;spec items&quot;)             │</span></span>
<span class="line"><span>├──────────────────────────────────────────┤</span></span>
<span class="line"><span>│       Ticket Adapter Interface           │</span></span>
<span class="line"><span>│                                          │</span></span>
<span class="line"><span>│  create_ticket(spec_item)                │</span></span>
<span class="line"><span>│  update_ticket(id, changes)              │</span></span>
<span class="line"><span>│  sync_status(id) → status                │</span></span>
<span class="line"><span>│  link_pr(ticket_id, pr_url)              │</span></span>
<span class="line"><span>│  close_ticket(id, evidence)              │</span></span>
<span class="line"><span>├────────┬────────┬────────┬───────┬───────┤</span></span>
<span class="line"><span>│  Jira  │ Linear │ GitHub │ Azure │  API  │</span></span>
<span class="line"><span>│Adapter │Adapter │Issues  │DevOps │ Proxy │</span></span>
<span class="line"><span>│        │        │Adapter │Adapter│Adapter│</span></span>
<span class="line"><span>└────────┘────────┘────────┘───────┘───────┘</span></span>
<span class="line"><span>                                       │</span></span>
<span class="line"><span>                              Specwright Server</span></span>
<span class="line"><span>                              (GitHub App token)</span></span></code></pre></div><p>The <strong>API Proxy Adapter</strong> is used by the CLI when you&#39;re logged in. Instead of calling GitHub directly, it routes requests through the Specwright server, which uses its GitHub App installation token. This means developers don&#39;t need local <code>GITHUB_TOKEN</code> — just <code>specwright login</code>.</p><p>The legacy <code>sync</code> block continues to work alongside the newer <code>ticket_systems</code> configuration.</p>`,38)])])}const E=i(e,[["render",p]]);export{o as __pageData,E as default};
