<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Constraint-Design on Tarragon</title><link>https://tarrragon.github.io/blog/tags/constraint-design/</link><description>Recent content in Constraint-Design on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Mon, 18 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/constraint-design/index.xml" rel="self" type="application/rss+xml"/><item><title>多重硬規範同時生效會把 cadence 推向便利解</title><link>https://tarrragon.github.io/blog/report/compliance-optimum-converges-cadence/</link><pubDate>Mon, 18 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/report/compliance-optimum-converges-cadence/</guid><description>&lt;h2 id="結論">結論&lt;/h2>
&lt;p>多個 constraint 同時 enforce、批量寫作就會把 cadence 收斂到「最便利合規解」。這不是違規、是 &lt;em>合規最佳解的副作用&lt;/em>。&lt;/p>
&lt;p>機制：&lt;/p>
&lt;ol>
&lt;li>N 個硬 constraint 同時 enforce（章節結構 / 表格深化 / 行數範圍 / lint 規則 / frontmatter 完整）&lt;/li>
&lt;li>寫第一篇時 Claude 找到一個 framing 同時滿足所有 N 個 constraint&lt;/li>
&lt;li>寫第二篇起、複製這個 framing 是 &lt;em>合規 + 省 token + 風險最低&lt;/em> 的選擇&lt;/li>
&lt;li>51 篇後、cadence 已經 collapse 到一個 framing、雖然每篇都合規&lt;/li>
&lt;/ol>
&lt;p>backend/07 案例：「11 章節 + 表格延伸段 + 130-160 行 + 零 emoji + 案例回寫」5 個 constraint 同時 enforce 下、「四件事 → 任一缺失就是 X 邊界的待補項目」是合規最便利 framing。51/51 都用了。&lt;/p>
&lt;hr>
&lt;h2 id="constraint-越多cadence-收斂越快">Constraint 越多、cadence 收斂越快&lt;/h2>
&lt;p>關鍵直覺：constraint 是 &lt;em>過濾器&lt;/em>、constraint 越多、能通過所有過濾器的 framing 種類就越少；批量寫作下、Claude 會選 &lt;em>第一個發現的可行 framing&lt;/em> 並複製。&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Constraint 數&lt;/th>
 &lt;th>可通過的 framing 種類&lt;/th>
 &lt;th>批量同質化風險&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>0-1（自由寫）&lt;/td>
 &lt;td>幾乎無限&lt;/td>
 &lt;td>低&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>2-3&lt;/td>
 &lt;td>多種&lt;/td>
 &lt;td>中&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>4-5&lt;/td>
 &lt;td>幾種&lt;/td>
 &lt;td>高&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>6+&lt;/td>
 &lt;td>1-2 種&lt;/td>
 &lt;td>極高、不可避免&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>這跟 over-constraint 設計問題同骨：要求越具體、解空間越小、批量後解就會集中到少數幾個。&lt;/p>
&lt;hr>
&lt;h2 id="為什麼這個-attractor-規範擋不住">為什麼這個 attractor 規範擋不住&lt;/h2>
&lt;p>對應「為什麼 cadence 維度 &lt;a href="../cadence-homogenization-in-batch-writing/">#122&lt;/a> 失守」、本卡是 &lt;em>機制側&lt;/em> 解釋：&lt;/p>
&lt;ul>
&lt;li>&lt;strong>每篇單看都合規&lt;/strong>：constraint 設計成「單檔通過 / 不通過」、沒有「跨檔 framing 變異性」這個 constraint、所以 single-file lint 永遠 pass&lt;/li>
&lt;li>&lt;strong>複製是 Claude 的 cost optimum&lt;/strong>：批量第 N 篇複製第 1 篇骨架 = 最少新 token、最少 risk、最快輸出；除非有反向壓力、預設行為就是複製&lt;/li>
&lt;li>&lt;strong>規範本身鼓勵「找一個都過的 framing」&lt;/strong>：要求章節齊全 + 表格深化、Claude 自然會收斂到「對所有 vendor 都適用」的 framing；越通用的 framing、cadence 越單一&lt;/li>
&lt;/ul>
&lt;p>「對所有 vendor 都適用」跟「對每個 vendor 都到位」是兩件事 — 通用 framing 不會錯、但會 &lt;em>只到位最小公分母&lt;/em>。批量寫作下、最小公分母 framing 大量複製就是 cadence 同質化。&lt;/p>
&lt;hr>
&lt;h2 id="對策拉開-constraint-或加-anti-template-constraint">對策：拉開 constraint 或加 anti-template constraint&lt;/h2>
&lt;p>兩條互補路徑：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>路徑&lt;/th>
 &lt;th>做法&lt;/th>
 &lt;th>取捨&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>拉開 constraint&lt;/td>
 &lt;td>允許 framing 多樣（如「11 章節結構必、但章節內部敘事不限定 frame」）&lt;/td>
 &lt;td>失去部分一致性、換來 cadence 多樣性&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>加 anti-template constraint&lt;/td>
 &lt;td>在硬規範裡列「同 batch 內 framing 變體至少 3 種」、「段首句句型分佈」&lt;/td>
 &lt;td>規範複雜度上升、執行需要跨檔抽樣機制&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Pilot phase 強制&lt;/td>
 &lt;td>寫前 3 篇時刻意產出 3 種不同 framing、其他篇從這 3 種輪替&lt;/td>
 &lt;td>前期成本上升、批量整體成本平攤後仍便宜&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>切小 batch + frame 變更&lt;/td>
 &lt;td>每 ≤ 10 篇換一次 dominant frame、不要一個 batch 寫 51 篇&lt;/td>
 &lt;td>批次數上升、單批 review 成本下降&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>實務 default：&lt;strong>Pilot phase 強制 + 加 anti-template constraint&lt;/strong>。先在 pilot 階段準備變體、再用規範要求跨檔抽樣、雙層防護。&lt;/p></description><content:encoded><![CDATA[<h2 id="結論">結論</h2>
<p>多個 constraint 同時 enforce、批量寫作就會把 cadence 收斂到「最便利合規解」。這不是違規、是 <em>合規最佳解的副作用</em>。</p>
<p>機制：</p>
<ol>
<li>N 個硬 constraint 同時 enforce（章節結構 / 表格深化 / 行數範圍 / lint 規則 / frontmatter 完整）</li>
<li>寫第一篇時 Claude 找到一個 framing 同時滿足所有 N 個 constraint</li>
<li>寫第二篇起、複製這個 framing 是 <em>合規 + 省 token + 風險最低</em> 的選擇</li>
<li>51 篇後、cadence 已經 collapse 到一個 framing、雖然每篇都合規</li>
</ol>
<p>backend/07 案例：「11 章節 + 表格延伸段 + 130-160 行 + 零 emoji + 案例回寫」5 個 constraint 同時 enforce 下、「四件事 → 任一缺失就是 X 邊界的待補項目」是合規最便利 framing。51/51 都用了。</p>
<hr>
<h2 id="constraint-越多cadence-收斂越快">Constraint 越多、cadence 收斂越快</h2>
<p>關鍵直覺：constraint 是 <em>過濾器</em>、constraint 越多、能通過所有過濾器的 framing 種類就越少；批量寫作下、Claude 會選 <em>第一個發現的可行 framing</em> 並複製。</p>
<table>
  <thead>
      <tr>
          <th>Constraint 數</th>
          <th>可通過的 framing 種類</th>
          <th>批量同質化風險</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>0-1（自由寫）</td>
          <td>幾乎無限</td>
          <td>低</td>
      </tr>
      <tr>
          <td>2-3</td>
          <td>多種</td>
          <td>中</td>
      </tr>
      <tr>
          <td>4-5</td>
          <td>幾種</td>
          <td>高</td>
      </tr>
      <tr>
          <td>6+</td>
          <td>1-2 種</td>
          <td>極高、不可避免</td>
      </tr>
  </tbody>
</table>
<p>這跟 over-constraint 設計問題同骨：要求越具體、解空間越小、批量後解就會集中到少數幾個。</p>
<hr>
<h2 id="為什麼這個-attractor-規範擋不住">為什麼這個 attractor 規範擋不住</h2>
<p>對應「為什麼 cadence 維度 <a href="../cadence-homogenization-in-batch-writing/">#122</a> 失守」、本卡是 <em>機制側</em> 解釋：</p>
<ul>
<li><strong>每篇單看都合規</strong>：constraint 設計成「單檔通過 / 不通過」、沒有「跨檔 framing 變異性」這個 constraint、所以 single-file lint 永遠 pass</li>
<li><strong>複製是 Claude 的 cost optimum</strong>：批量第 N 篇複製第 1 篇骨架 = 最少新 token、最少 risk、最快輸出；除非有反向壓力、預設行為就是複製</li>
<li><strong>規範本身鼓勵「找一個都過的 framing」</strong>：要求章節齊全 + 表格深化、Claude 自然會收斂到「對所有 vendor 都適用」的 framing；越通用的 framing、cadence 越單一</li>
</ul>
<p>「對所有 vendor 都適用」跟「對每個 vendor 都到位」是兩件事 — 通用 framing 不會錯、但會 <em>只到位最小公分母</em>。批量寫作下、最小公分母 framing 大量複製就是 cadence 同質化。</p>
<hr>
<h2 id="對策拉開-constraint-或加-anti-template-constraint">對策：拉開 constraint 或加 anti-template constraint</h2>
<p>兩條互補路徑：</p>
<table>
  <thead>
      <tr>
          <th>路徑</th>
          <th>做法</th>
          <th>取捨</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>拉開 constraint</td>
          <td>允許 framing 多樣（如「11 章節結構必、但章節內部敘事不限定 frame」）</td>
          <td>失去部分一致性、換來 cadence 多樣性</td>
      </tr>
      <tr>
          <td>加 anti-template constraint</td>
          <td>在硬規範裡列「同 batch 內 framing 變體至少 3 種」、「段首句句型分佈」</td>
          <td>規範複雜度上升、執行需要跨檔抽樣機制</td>
      </tr>
      <tr>
          <td>Pilot phase 強制</td>
          <td>寫前 3 篇時刻意產出 3 種不同 framing、其他篇從這 3 種輪替</td>
          <td>前期成本上升、批量整體成本平攤後仍便宜</td>
      </tr>
      <tr>
          <td>切小 batch + frame 變更</td>
          <td>每 ≤ 10 篇換一次 dominant frame、不要一個 batch 寫 51 篇</td>
          <td>批次數上升、單批 review 成本下降</td>
      </tr>
  </tbody>
</table>
<p>實務 default：<strong>Pilot phase 強制 + 加 anti-template constraint</strong>。先在 pilot 階段準備變體、再用規範要求跨檔抽樣、雙層防護。</p>
<p>Dogfood 驗證見 <a href="../cadence-homogenization-in-batch-writing/#dogfood-evidence-2026-05-18-n4-sub-threshold-%e9%a9%97%e8%ad%89">#122 cadence 同質化</a> — 4 篇 deep article batch 用 <em>pilot phase 4 種 variant</em> 取代「事後 polish」、cadence collapse 從前批 100% 降到 0%、修正成本省 ~10 倍。本卡的「拉開 constraint」對策獲實證。</p>
<hr>
<h2 id="不是只發生在寫作">不是只發生在「寫作」</h2>
<p>同骨機制在其他批量產出任務上也成立：</p>
<ul>
<li><strong>Code generation</strong>：用同一 LLM 一次生 N 個 service 的 boilerplate、結構會收斂到同一 framing（同樣的 error handling pattern、同樣的 log 格式）</li>
<li><strong>Test case 批量寫</strong>：N 個 unit test 都用同一個 setup-act-assert framing、覆蓋面看似齊但其實只測一種 axis</li>
<li><strong>API doc 批量寫</strong>：N 個 endpoint doc 都用同一段「方法 / 參數 / 回傳」三段式、抓不到 endpoint-specific 邊界</li>
</ul>
<p>這些都是 constraint 設計的 collapse — 只是發生在不同 surface。</p>
<hr>
<h2 id="反模式">反模式</h2>
<table>
  <thead>
      <tr>
          <th>反模式</th>
          <th>後果</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>規範堆疊不評估 attractor 副作用</td>
          <td>Constraint 越多 cadence 越單一、規範自身成為同質化 root cause</td>
      </tr>
      <tr>
          <td>認為「合規 = 品質」</td>
          <td>51 篇都合規但連讀預期化、合規是必要不充分</td>
      </tr>
      <tr>
          <td>批量寫作不切 batch、一次寫 50+ 檔</td>
          <td>Cadence collapse 風險最大、修正成本 N 倍</td>
      </tr>
      <tr>
          <td>發現同質化後加更多 constraint</td>
          <td>Over-constraint、解空間更窄、cadence 反而更收斂</td>
      </tr>
      <tr>
          <td>Pilot phase 跳過、直接寫批量</td>
          <td>沒準備變體、第一篇 framing 自動成 dominant</td>
      </tr>
      <tr>
          <td>把 cadence 問題歸因「Claude 偷懶」、不是 constraint 設計問題</td>
          <td>換 model 還是會發生、根因在 constraint 設計、不是執行者</td>
      </tr>
  </tbody>
</table>
<hr>
<h2 id="跟其他抽象層原則的關係">跟其他抽象層原則的關係</h2>
<table>
  <thead>
      <tr>
          <th>原則</th>
          <th>關係</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><a href="../cadence-homogenization-in-batch-writing/">#122 Cadence 同質化是模板的隱形維度</a></td>
          <td>Sibling — #122 是 <em>症狀</em> 卡（cadence 同質化是模板）、本卡是 <em>機制</em> 卡（為什麼會發生）；兩張一起讀</td>
      </tr>
      <tr>
          <td><a href="../ease-of-writing-vs-intent-alignment/">#67 寫作便利度跟意圖對齊反相關</a></td>
          <td>本卡是 #67 在「批量產出」的具體機制；複製合規 framing 最便利、跨檔意圖對齊失準</td>
      </tr>
      <tr>
          <td><a href="../single-source-of-truth/">#44 Single Source of Truth</a></td>
          <td>互補 — SSoT 處理「值的住址只能一處」、本卡處理「framing 的住址不能只有一處」；兩者是 SSoT vs anti-SSoT 的不同 surface</td>
      </tr>
      <tr>
          <td><a href="../literal-interception-vs-behavioral-refinement/">#82 字面攔截 vs 行為精煉</a></td>
          <td>本卡是 #82 在 constraint 設計的具體 case — 字面合規（章節 / 表格 / 行數）+ 行為失準（cadence 同質）</td>
      </tr>
      <tr>
          <td><a href="../capability-gap-three-layer-escalation/">#86 Capability gap 三層對策階梯</a></td>
          <td>互補 — 同質化問題不該只用 L1（提醒 Claude 變化）、要 L2（pilot phase）或 L3（規範擴寫 anti-template）</td>
      </tr>
  </tbody>
</table>
<hr>
<h2 id="判讀徵兆">判讀徵兆</h2>
<table>
  <thead>
      <tr>
          <th>訊號</th>
          <th>該做的事</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>規範條目 ≥ 5 條且 enforce 同一檔</td>
          <td>評估 attractor 風險、是否該拉開或加 anti-template constraint</td>
      </tr>
      <tr>
          <td>一個 batch 計畫寫 ≥ 10 個同類檔</td>
          <td>切小 batch、或加 pilot phase 強制變體</td>
      </tr>
      <tr>
          <td>Pilot phase 只寫 1-2 個就進批量</td>
          <td>沒準備 framing 變體、預設會 collapse</td>
      </tr>
      <tr>
          <td>想再加新 constraint 解決品質問題</td>
          <td>警訊 — 加多會更 collapse、考慮拉開或換層</td>
      </tr>
      <tr>
          <td>Review 報告說「都合規」</td>
          <td>不夠、加跨檔 cadence 抽樣 frame</td>
      </tr>
      <tr>
          <td>批量寫完 reviewer 才發現同質化</td>
          <td>Review 時機太晚、改 stage 內抽樣</td>
      </tr>
      <tr>
          <td>想複用上批 framing 寫下批</td>
          <td>警訊 — 復用 dominant framing 會把同質化跨 batch 擴散</td>
      </tr>
  </tbody>
</table>
<p><strong>核心</strong>：多重硬規範同時生效時、cadence 收斂到合規最便利解是預設行為、不是違規。對策不是加更多 constraint、是拉開 constraint 或強制 pilot phase 準備變體；規範設計時要評估 attractor 副作用、不是只看「單檔有沒有過」。</p>
]]></content:encoded></item></channel></rss>