<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ted Li</title>
    <description>The latest articles on DEV Community by Ted Li (@xiaoer_wang_1c459701b8e50).</description>
    <link>https://dev.to/xiaoer_wang_1c459701b8e50</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4168565%2F29207a23-9afb-4599-990a-d5f2bd66ae5e.png</url>
      <title>DEV Community: Ted Li</title>
      <link>https://dev.to/xiaoer_wang_1c459701b8e50</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xiaoer_wang_1c459701b8e50"/>
    <language>en</language>
    <item>
      <title>What three real Halloween AI video tests changed about my prompts</title>
      <dc:creator>Ted Li</dc:creator>
      <pubDate>Wed, 28 Oct 2026 23:44:06 +0000</pubDate>
      <link>https://dev.to/xiaoer_wang_1c459701b8e50/what-three-real-halloween-ai-video-tests-changed-about-my-prompts-4mdp</link>
      <guid>https://dev.to/xiaoer_wang_1c459701b8e50/what-three-real-halloween-ai-video-tests-changed-about-my-prompts-4mdp</guid>
      <description>&lt;p&gt;I am building a small seasonal photo-to-video product, and the most useful prompt lessons did not come from reading prompt lists. They came from watching real generations fail in very specific ways.&lt;/p&gt;

&lt;p&gt;I tested three guided outcomes: a solo pumpkin-head transformation, a synchronized couples costume transition, and a person-with-pet Halloween scene. The goal was not to find one magical sentence. It was to learn which instructions consistently reduce ambiguity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkv2ipctn4qktzid4t80g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkv2ipctn4qktzid4t80g.png" alt="Three Halloween AI video prompt examples" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are the changes that mattered most.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Define what is allowed to change
&lt;/h2&gt;

&lt;p&gt;My early pumpkin-head prompt described the pumpkin in detail but did not protect the rest of the subject strongly enough. The model could treat the request as permission to redesign the whole person.&lt;/p&gt;

&lt;p&gt;The better structure separates the transformation from the invariants:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the head and face may become a three-dimensional jack-o'-lantern;&lt;/li&gt;
&lt;li&gt;the body, shoulders, pose and proportions must remain stable;&lt;/li&gt;
&lt;li&gt;the original lighting and photographic style should still match;&lt;/li&gt;
&lt;li&gt;the clip must end on a stable medium shot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is more useful than adding a long generic negative prompt. It tells the model where the creative boundary actually is.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Two people need spatial identities
&lt;/h2&gt;

&lt;p&gt;For a couples clip, “two people transform together” is not enough. Video models can merge subjects, swap faces or change relative height when both people move at once.&lt;/p&gt;

&lt;p&gt;I now keep both people side by side, preserve each facial identity, hairstyle, height and body proportion, and ask for one synchronized wardrobe change. The ending also matters: both subjects face the camera in the same stable shared pose.&lt;/p&gt;

&lt;p&gt;When a workflow supports separate reference images, assigning a fixed left and right subject makes the instruction even clearer.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Pet prompts should be deliberately conservative
&lt;/h2&gt;

&lt;p&gt;The pet test made the trade-off obvious. A complex full-body costume morph may look ambitious, but it also gives the model more chances to change the breed, fur pattern, ears, legs or body shape.&lt;/p&gt;

&lt;p&gt;The safer prompt keeps the pet recognizable and adds only a small accessory such as a hat or collar. The human can receive the larger costume transformation. That produces a clearer hierarchy and protects the part viewers care about most: their actual pet.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Camera restraint improves the transformation
&lt;/h2&gt;

&lt;p&gt;Large camera moves sound cinematic, but they compete with identity preservation and costume formation. One stable camera or one gentle push-in gave the transformation fewer simultaneous problems to solve.&lt;/p&gt;

&lt;p&gt;The same principle applies to the action. One readable movement plus one transformation is usually more reliable than a turn, jump, zoom, background change and costume reveal in the same short clip.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The final frame belongs in the prompt
&lt;/h2&gt;

&lt;p&gt;A generation can contain a good transformation and still be difficult to use if the ending is unstable. Defining the final pose makes the output easier to trim, loop and publish.&lt;/p&gt;

&lt;p&gt;My current prompt structure is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;subject + one action + one transformation + setting + camera + identity constraints + final frame&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I turned the three tested structures into copyable cards with real sample frames in this &lt;a href="https://pumpkinmorph.com/blog/halloween-photo-to-video-prompt-guide" rel="noopener noreferrer"&gt;Halloween photo-to-video prompt guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The product behind these tests is &lt;a href="https://pumpkinmorph.com/" rel="noopener noreferrer"&gt;PumpkinMorph&lt;/a&gt;, a guided Halloween photo-to-video workflow for portraits, couples and pets. I am keeping the product narrow because the deadline forces every option to justify itself.&lt;/p&gt;

&lt;p&gt;For anyone working with generated video: which signal is most useful to you — first-pass success rate, usable-output rate, or the cost of one final publishable clip?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>showdev</category>
      <category>seo</category>
    </item>
    <item>
      <title>Building an Auditable Public-Data Pipeline for the 2027 Social Security COLA</title>
      <dc:creator>Ted Li</dc:creator>
      <pubDate>Sun, 25 Oct 2026 02:20:57 +0000</pubDate>
      <link>https://dev.to/xiaoer_wang_1c459701b8e50/building-an-auditable-public-data-pipeline-for-the-2027-social-security-cola-3oai</link>
      <guid>https://dev.to/xiaoer_wang_1c459701b8e50/building-an-auditable-public-data-pipeline-for-the-2027-social-security-cola-3oai</guid>
      <description>&lt;p&gt;The hardest part of a government-data project is often not the formula. It is preserving the difference between what can be calculated, what has been forecast, and what an agency has officially announced.&lt;/p&gt;

&lt;p&gt;I ran into this while building COLA Insight, an independent tracker for the 2027 Social Security cost-of-living adjustment. The final result is now official: the Social Security Administration announced a 3.6% COLA. But the application existed before all required CPI-W observations were available, so a single &lt;code&gt;rate&lt;/code&gt; field was not enough.&lt;/p&gt;

&lt;p&gt;This article explains the data-contract decisions that made the tracker auditable before and after the announcement.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Model status as data, not page copy
&lt;/h2&gt;

&lt;p&gt;The pipeline uses three explicit states:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;forecast&lt;/code&gt;: one or more required third-quarter CPI-W observations are unavailable;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;computed&lt;/code&gt;: all required observations are available and the statutory formula can be reproduced, but SSA has not yet confirmed the result;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;official&lt;/code&gt;: SSA has published the benefit-year COLA and the record has been matched to that confirmation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those states represent three different claims. A mathematically reproducible result is not automatically an official agency determination.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;ColaStatus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;forecast&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;computed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;official&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;ColaRate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;displayed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;forecast&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;official&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;percent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;displayedRate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ColaRate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;official&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;computed&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forecast&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fallback order is convenient for the interface, but the API still returns every field. A client can see why the displayed value is present instead of receiving an unlabeled percentage.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Publish the observations behind the headline
&lt;/h2&gt;

&lt;p&gt;Social Security uses the CPI-W, U.S. city average, all items, not seasonally adjusted. The relevant BLS series is &lt;code&gt;CWUR0000SA0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For the 2027 adjustment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2025 Q3 average: 317.265
2026 Q3 average: 328.746

(328.746 - 317.265) / 317.265 * 100 = about 3.6197%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Applying the statutory rounding rule produces 3.6%.&lt;/p&gt;

&lt;p&gt;Publishing only that percentage would make the result hard to audit. The public record therefore carries the series identifier, units, baseline quarter, monthly observations, and the state of each observation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"official"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"displayed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"forecast"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"computed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"official"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"unit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"percent"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cpiW"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"seriesId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CWUR0000SA0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"baseline"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"quarter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2025-Q3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"average"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;317.265&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"observations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"month"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-07"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;327.104&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"published"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"month"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-08"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;328.481&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"published"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"month"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-09"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;330.654&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"published"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes common errors visible: using CPI-U instead of CPI-W, using seasonally adjusted data, comparing September with September, or rounding intermediate values too early.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Store provenance beside the number
&lt;/h2&gt;

&lt;p&gt;A source URL in a footer helps a reader, but it is not enough for downstream software. Provenance belongs inside the record.&lt;/p&gt;

&lt;p&gt;The response separates the original publisher, the retrieval path, and the official confirmation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sources"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cpiW"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"publisher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"U.S. Bureau of Labor Statistics"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://www.bls.gov/developers/home.htm"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"retrievedVia"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"kind"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fred_api"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"FRED API, BLS series CWUR0000SA0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://fred.stlouisfed.org/series/CWUR0000SA0"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"officialConfirmation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"publisher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"U.S. Social Security Administration"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://www.ssa.gov/cola/"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those three sources are not always the same. Keeping them separate makes a fallback visible instead of silently presenting a mirror as the primary authority.&lt;/p&gt;

&lt;p&gt;The record also includes an observation timestamp and schema version, so consumers can make an informed caching decision and handle future contract changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Treat history as append-only evidence
&lt;/h2&gt;

&lt;p&gt;An early forecast should not disappear after the official result arrives.&lt;/p&gt;

&lt;p&gt;Overwriting an old estimate with the final answer makes the current page look accurate, but destroys the evidence needed to evaluate the forecast. COLA Insight stores a new snapshot when an observation, rate, retrieval path, or status changes.&lt;/p&gt;

&lt;p&gt;Each snapshot preserves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;timestamp and status;&lt;/li&gt;
&lt;li&gt;available CPI-W observations;&lt;/li&gt;
&lt;li&gt;assumptions for unavailable values;&lt;/li&gt;
&lt;li&gt;calculated or forecast rate;&lt;/li&gt;
&lt;li&gt;retrieval and source links;&lt;/li&gt;
&lt;li&gt;an explanation of the change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The human-readable timeline can then derive entries such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;August CPI-W: pending -&amp;gt; 328.481
Status: forecast -&amp;gt; computed
Tracked rate: 3.5% -&amp;gt; 3.6%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pattern applies beyond COLA data. Forecasts, election models, public-health estimates, and economic indicators all benefit from preserving what was known at each point in time.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Generate every output from one record
&lt;/h2&gt;

&lt;p&gt;The same stored snapshots power:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a readable methodology and data dictionary;&lt;/li&gt;
&lt;li&gt;a public JSON endpoint;&lt;/li&gt;
&lt;li&gt;downloadable CSV files;&lt;/li&gt;
&lt;li&gt;SVG and PNG charts;&lt;/li&gt;
&lt;li&gt;a read-only MCP server;&lt;/li&gt;
&lt;li&gt;a dated Zenodo release with a persistent DOI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Maintaining these as independent copies invites drift. One stored record prevents the article from saying one number while the chart shows another and the API serves yesterday's status.&lt;/p&gt;

&lt;p&gt;The public API uses a four-hour edge cache because the underlying government data changes infrequently:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;access-control-allow-origin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cache-control&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;public, max-age=14400, stale-while-revalidate=3600&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;link&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://www.colainsight.com/data-dictionary; rel=describedby&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x-content-type-options&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;nosniff&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That reduces unnecessary origin work without creating a meaningful freshness problem for scheduled releases.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Make AI-facing tools read-only and source-linked
&lt;/h2&gt;

&lt;p&gt;The MCP server exposes four read-only tools: current COLA data, an educational benefit calculation, preserved history, and primary sources.&lt;/p&gt;

&lt;p&gt;Responses include the same status, observations, timestamps, and source links as the public API. The server instructions tell clients to keep &lt;code&gt;forecast&lt;/code&gt;, &lt;code&gt;computed&lt;/code&gt;, and &lt;code&gt;official&lt;/code&gt; distinct and never present an estimate as an SSA benefit determination.&lt;/p&gt;

&lt;p&gt;That cannot guarantee how every client will phrase an answer, but it makes the safe interpretation part of the machine-readable contract instead of hiding it on an About page.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Fail closed when an official input is missing
&lt;/h2&gt;

&lt;p&gt;The same rule applies to 2027 Medicare Part B data.&lt;/p&gt;

&lt;p&gt;As of October 25, 2026, CMS has not published the official 2027 standard Part B premium and deductible. The API therefore keeps official premium and net-benefit fields null. It does not insert a rumored value just to complete the table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pending"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"official2027StandardPremiumUsd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"official2027DeductibleUsd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once CMS publishes the official figures, a verified snapshot can update the page, calculator, CSV, JSON, SVG, and PNG together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seven rules I would reuse
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Model evidence states explicitly.&lt;/li&gt;
&lt;li&gt;Return underlying observations, not just the headline.&lt;/li&gt;
&lt;li&gt;Separate publisher, retrieval path, and official confirmation.&lt;/li&gt;
&lt;li&gt;Append new snapshots instead of rewriting history.&lt;/li&gt;
&lt;li&gt;Generate every format from the same record.&lt;/li&gt;
&lt;li&gt;Leave unknown official values null.&lt;/li&gt;
&lt;li&gt;Put provenance and caveats in the contract used by humans and agents.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The public resources are available here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.colainsight.com/data" rel="noopener noreferrer"&gt;Data and downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.colainsight.com/api/cola" rel="noopener noreferrer"&gt;JSON API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.colainsight.com/data-dictionary" rel="noopener noreferrer"&gt;Data dictionary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.colainsight.com/mcp-server" rel="noopener noreferrer"&gt;MCP documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.colainsight.com/blog/2027-cola-forecast-record-every-estimate-preserved" rel="noopener noreferrer"&gt;Preserved forecast record&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://doi.org/10.5281/zenodo.23431339" rel="noopener noreferrer"&gt;Archived dataset with DOI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;COLA Insight is independent and is not affiliated with SSA, BLS, CMS, or the U.S. government. I would be interested in hearing how other developers represent the boundary between a reproducible calculation and an official determination.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>data</category>
      <category>api</category>
      <category>mcp</category>
    </item>
    <item>
      <title>A Practical Prompt Framework for Consistent Halloween Photo-to-Video Results</title>
      <dc:creator>Ted Li</dc:creator>
      <pubDate>Thu, 22 Oct 2026 05:10:01 +0000</pubDate>
      <link>https://dev.to/xiaoer_wang_1c459701b8e50/a-practical-prompt-framework-for-consistent-halloween-photo-to-video-results-1fj</link>
      <guid>https://dev.to/xiaoer_wang_1c459701b8e50/a-practical-prompt-framework-for-consistent-halloween-photo-to-video-results-1fj</guid>
      <description>&lt;p&gt;Photo-to-video generation looks simple: upload a portrait, describe a transformation, and wait for the result. In practice, short transformation clips often fail in predictable ways. Faces drift, the effect starts too early, the camera moves for no reason, or the final frame becomes a completely different person.&lt;br&gt;
After working on a small Halloween photo-to-video project, I found that better results come less from adding adjectives and more from giving the model a clear sequence of constraints.&lt;br&gt;
This post explains the prompt structure I now use for seasonal transformation videos. The example is a glowing pumpkin-head reveal, but the framework also works for costumes, fantasy makeovers, pet transformations, and other short visual effects.&lt;br&gt;
Why photo-to-video prompts fail&lt;br&gt;
Most failed generations come from three kinds of ambiguity.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Identity drift
The model is asked to transform the subject, but it is not told which features must remain stable. It may change the face, clothing, body shape, or number of people.&lt;/li&gt;
&lt;li&gt;Temporal drift
A prompt describes the final image but not the order of events. The model may begin with the transformed subject, skip the reveal, or keep changing the scene until the last frame.&lt;/li&gt;
&lt;li&gt;Competing instructions
A prompt can request a fixed camera, dramatic motion, realistic lighting, swirling smoke, a new costume, and a detailed background all at once. The model tries to satisfy everything, so the main transformation becomes unstable.
The solution is to separate the prompt into layers and make the priorities explicit.
The five-layer prompt framework
I structure each prompt in this order:
Subject lock — what must stay unchanged 
Scene lock — what the environment looks like 
Transformation — what changes, and in what sequence 
Motion and camera — how the subject and camera behave 
Ending and format — what the final frame should look like 
This order matters. Stable identity and composition come before visual effects.
Layer 1: Lock the subject
Start by describing the uploaded image as the source of truth.
Use the uploaded portrait as the exact identity reference. Preserve the subject’s body, clothing, pose, skin tone, and facial proportions. Keep the same number of people throughout the video.
For a transformation that replaces the head, it is still useful to preserve identity at the beginning. Otherwise the model may redraw the whole person before the effect starts.
For two people, add:
Preserve both people independently. Do not merge their bodies, swap faces, or create additional people.
For a pet, specify the species and distinctive markings:
Preserve the dog’s body shape, coat color, markings, collar, and position.
Layer 2: Lock the scene
Do not redesign the entire background unless that is the goal. A stable scene gives the model fewer opportunities to invent distracting details.
Keep the original background and framing. Maintain consistent lighting and shadows. The scene remains recognizable from the first frame to the last.
If you want a Halloween atmosphere, add only one or two environmental changes, such as warmer orange light or faint ground fog. Avoid stacking fog, bats, lightning, candles, sparks, and moving shadows in a single short clip.
Layer 3: Describe the transformation as a timeline
A transformation prompt works better when written as a compact shot list.
Opening: the original portrait is clearly visible. 
Build-up: a subtle orange glow gathers around the head. 
Transformation: the head smoothly becomes a carved pumpkin while the body and clothing remain unchanged. 
Hold: the completed pumpkin head remains stable long enough to read. 
Use transition words such as “then,” “gradually,” and “finally.” They tell the model that the requested visuals are stages rather than simultaneous instructions.
Layer 4: Control motion and camera
Camera movement is expensive in terms of consistency. If the effect is the point, a locked camera is usually the safer choice.
Locked camera, medium portrait framing, no zoom, no cuts, and no change of viewpoint. The subject makes only subtle natural movements.
If you need motion, ask for one controlled movement: a slow push-in, a gentle head turn, or a small hand gesture. Combining all three increases the chance of anatomy errors.
Layer 5: Define the ending and output
Models often continue changing the image because the prompt does not tell them when to stop.
End on a clean, stable hero frame of the completed glowing pumpkin head. Hold the final appearance without further transformation. Vertical 9:16 composition, short social-video pacing.
This final-state instruction is especially useful when a clip will loop, appear in a gallery, or be used as a social post.
Complete example prompt
Here is the full structure in one prompt:
Use the uploaded portrait as the exact identity and composition reference. Preserve the subject’s body, clothing, pose, skin tone, and proportions. Keep the original background, framing, and lighting consistent. Begin with the original portrait clearly visible. Then a subtle warm orange glow gathers around the head. The head gradually and smoothly transforms into a realistic carved Halloween pumpkin with expressive glowing eyes and a softly illuminated mouth. Keep the body, clothing, hands, and background unchanged during the transformation. Use a locked camera with medium portrait framing, no cuts, no zoom, and only subtle natural body movement. Finally, hold on a clean, stable hero frame of the completed pumpkin head without further changes. Vertical 9:16 composition with concise social-video pacing.
A useful negative prompt
A negative prompt should target common failure modes instead of becoming a second long creative brief.
No extra people, duplicate limbs, merged bodies, face swapping, changing clothes, background replacement, camera cuts, rapid zoom, text, logos, watermarks, gore, or repeated transformations. No distorted hands or unstable final frame.
If the model does not support a separate negative-prompt field, append a short “Avoid:” section to the main prompt.
Variants for couples and pets
For a couple, the most important instruction is independent subject tracking:
Transform both heads separately and at the same pace. Preserve each person’s body, clothing, position, and distance from the other person. Do not merge or swap the subjects.
For pets, keep the effect compatible with the animal’s anatomy:
The pumpkin form follows the pet’s head position naturally while the ears, body, coat, and collar remain recognizable. Avoid human facial features or human hands.
Pre-generation checklist
Before starting a generation, check five things:
The subject is unobstructed and large enough in the frame. 
The prompt states what must not change. 
The transformation has a clear beginning, middle, and end. 
Camera motion is either locked or limited to one simple move. 
The final state is explicitly held stable. 
A clear source image still matters. Heavy blur, cropped heads, overlapping faces, or very dark lighting can cause problems that prompt wording cannot fully solve.
What I learned while building a small tool
The main lesson was that a reusable prompt template is more valuable than a longer prompt. The product can collect choices such as solo/couple/pet, costume style, and output format, then assemble a consistent instruction set behind the scenes.
If you want to test this workflow without assembling the prompt manually, I built a small seasonal tool called PumpkinMorph that applies the same structure to solo, couple, and pet photos.
The tool is secondary to the method: the same framework can be adapted to other video models and other kinds of transformations.
Final thoughts
Good photo-to-video prompting is closer to directing a short shot than describing a picture. Lock the subject, limit the scene, sequence the transformation, control the camera, and define the ending.
What failure mode do you see most often in photo-to-video generation: identity drift, unwanted camera movement, or an unstable final frame?&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>tutorial</category>
      <category>machinelearning</category>
      <category>design</category>
    </item>
  </channel>
</rss>
