<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://moonandeye.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://moonandeye.github.io/" rel="alternate" type="text/html" /><updated>2026-04-12T15:29:48+00:00</updated><id>https://moonandeye.github.io/feed.xml</id><title type="html">Marv[in]sight</title><subtitle>Welcome to my blog, a vibrant space dedicated to software development, investment insights, personal experiences, and life stories. Join me as we explore a diverse array of topics. I aim to share my journey and insights, fostering a community where we can interact, learn from each other, and grow together.</subtitle><author><name>Marvin Lin</name></author><entry xml:lang="en"><title type="html"></title><link href="https://moonandeye.github.io/en/2026-03-16-ai-direction-demo-spec-state-machine/" rel="alternate" type="text/html" title="" /><published>2026-04-12T15:29:48+00:00</published><updated>2026-04-12T15:29:48+00:00</updated><id>https://moonandeye.github.io/en/2026-03-16-ai-direction-demo-spec-state-machine</id><content type="html" xml:base="https://moonandeye.github.io/en/2026-03-16-ai-direction-demo-spec-state-machine/"><![CDATA[<h2 id="writer">Writer</h2>

<p>If you don’t give the AI direction, it can’t drive you to the destination.</p>

<p>I hit a surprisingly common trap while building an app demo with Figma Make.</p>

<p>My instruction to the agent was simple:</p>

<blockquote>
  <p>Please implement based on what’s in my Figma Make share link.</p>
</blockquote>

<p>Sounds reasonable.</p>

<p>But here’s the problem: <strong>a share link is usually a demo, not a behavioral spec</strong>.</p>

<h3 id="what-i-got-wrong">What I got wrong</h3>

<p>To move fast, I made the <em>starting screen</em> the main tab bar in my Figma Make project.</p>

<p>The agent did exactly what it saw:</p>
<ul>
  <li>it treated the demo as the requirement</li>
  <li>it implemented “launch → main tab”</li>
</ul>

<p>For a demo, that can be fine.</p>

<p>For a real product, it’s usually wrong.</p>

<h3 id="a-real-mobile-app-launch-is-a-state-machine">A real mobile app launch is a state machine</h3>

<p>On mobile, a standard launch flow is not “whatever the first UI looks like.”</p>

<p>Typically, after app launch you enter a dedicated launch activity/view controller and run a state machine, for example:</p>

<p>1) Force update / soft update / OK</p>

<p>2) Only if OK → check whether we can auto-login</p>
<ul>
  <li>if yes → go to main tab</li>
  <li>if not → go to login</li>
</ul>

<p>Those conditions and branches are the <em>direction</em>.</p>

<p>The UI is just the outcome.</p>

<h3 id="why-i-thought-the-agent-was-overwriting-my-work">Why I thought the agent was “overwriting” my work</h3>

<p>At first, I kept thinking the agent wasn’t following my instructions and kept changing my implementation.</p>

<p>Then I checked the React site Figma Make actually built.</p>

<p>The flow was already “locked in” by my demo.</p>

<p>In other words:</p>
<ul>
  <li>the demo defined the world I gave the agent</li>
  <li>the agent simply inferred behavior from visible states</li>
</ul>

<p>The agent didn’t fail.</p>

<p>My direction did.</p>

<h3 id="takeaway-define-behavior-before-ui">Takeaway: define behavior before UI</h3>

<p>If you want AI to build the right UI, define behavior first:</p>
<ul>
  <li>entry states</li>
  <li>branching conditions</li>
  <li>success criteria</li>
</ul>

<p>UI is the outcome.</p>

<p>The flow is the direction.</p>

<h2 id="editor">Editor</h2>

<p>Strengths:</p>
<ul>
  <li>Strong hook and clear single point.</li>
  <li>Concrete details (Figma Make, React build verification, update/auth branches) make it credible.</li>
</ul>

<p>Edits for the final:</p>
<ul>
  <li>Move “demo ≠ spec” earlier so the main contrast shows up faster.</li>
  <li>End with a tight checklist readers can reuse.</li>
</ul>

<h2 id="final">Final</h2>

<p>If you don’t give the AI direction, it can’t drive you to the destination.</p>

<p>I hit a common trap while building an app demo with Figma Make.</p>

<p>My instruction to the agent was:</p>

<blockquote>
  <p>Please implement based on what’s in my Figma Make share link.</p>
</blockquote>

<p>Sounds reasonable—until you realize <strong>the link is a demo, not a behavioral spec</strong>.</p>

<p>To move fast, I made the starting screen the main tab bar.</p>

<p>So the agent did exactly what it saw:</p>
<ul>
  <li>it treated the demo as the requirement</li>
  <li>it implemented “launch → main tab”</li>
</ul>

<p>But real mobile app launch is a state machine.</p>

<p>Typically, after app launch you enter a dedicated launch activity/view controller and run checks like:</p>

<p>1) Force update / soft update / OK</p>

<p>2) Only if OK → check whether we can auto-login</p>
<ul>
  <li>if yes → main tab</li>
  <li>if not → login</li>
</ul>

<p>At first, I thought the agent was ignoring instructions and “overwriting” my work.</p>

<p>Then I checked the React site Figma Make actually built—the flow was already locked in by my demo.</p>

<p>The agent didn’t fail.</p>

<p>My direction did.</p>

<p>Takeaway: <strong>define behavior before UI.</strong></p>

<p>A minimal checklist:</p>
<ul>
  <li>entry states</li>
  <li>branching conditions</li>
  <li>success criteria</li>
</ul>

<p>UI is the outcome.</p>

<p>The flow is the direction.</p>]]></content><author><name>Marvin Lin</name></author></entry><entry xml:lang="en"><title type="html">The First Step to Better Vibe Coding: Keep Frontend &amp;amp; Backend in One Folder</title><link href="https://moonandeye.github.io/en/programming/mono-repo-vibe-coding/" rel="alternate" type="text/html" title="The First Step to Better Vibe Coding: Keep Frontend &amp;amp; Backend in One Folder" /><published>2026-04-12T00:00:00+00:00</published><updated>2026-04-12T00:00:00+00:00</updated><id>https://moonandeye.github.io/en/programming/mono-repo-vibe-coding</id><content type="html" xml:base="https://moonandeye.github.io/en/programming/mono-repo-vibe-coding/"><![CDATA[<p>After heavily using Codex and Claude Code, I now almost always use this structure.</p>

<p><strong>Keep your frontend and backend in the same folder.</strong></p>

<p>This isn’t a new concept. Mono repos have been around forever. But in the age of Vibe Coding, their value multiplies.</p>

<h2 id="why-mono-repo-matters-for-ai-agent-coding">Why Mono Repo Matters for AI Agent Coding</h2>

<p>When you use an AI agent to write code, its understanding is limited to the context you give it.</p>

<p>If your frontend and backend live in two separate repos:</p>

<ul>
  <li>The AI can only see one side at a time</li>
  <li>It doesn’t know what the other side’s API looks like</li>
  <li>You become the translator, manually feeding information back and forth</li>
</ul>

<p>But if they’re in the same repo:</p>

<ul>
  <li>The AI can read your frontend’s call logic and your backend’s API definition at the same time</li>
  <li>When you change a backend response format, it can automatically update the corresponding frontend fields</li>
  <li>Shared types, schemas, and configs stay in sync — no more drift between two repos</li>
</ul>

<p>In short, <strong>a mono repo gives the AI complete context</strong>. Complete context means more accurate code generation.</p>

<h2 id="recommended-folder-structure">Recommended Folder Structure</h2>

<p>It doesn’t need to be complicated. This is enough:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>my-project/
├── frontend/          ← React / Next.js
├── backend/           ← Node.js / Express / FastAPI
├── package.json
└── README.md
</code></pre></div></div>

<p>If you have shared type definitions or utility functions, add another layer:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>my-project/
├── frontend/          ← React / Next.js
├── backend/           ← Node.js / Express / FastAPI
├── shared/            ← Shared types, constants, utilities
├── package.json
└── README.md
</code></pre></div></div>

<p>The point isn’t a perfect structure — it’s that <strong>frontend and backend live under the same root directory</strong>.</p>

<h2 id="separate-repos-vs-mono-repo">Separate Repos vs Mono Repo</h2>

<table>
  <thead>
    <tr>
      <th> </th>
      <th>Separate Repos</th>
      <th>Mono Repo</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>What AI can see</td>
      <td>Only one side</td>
      <td>Both frontend &amp; backend</td>
    </tr>
    <tr>
      <td>Updating frontend after API changes</td>
      <td>Manual sync</td>
      <td>AI can update both at once</td>
    </tr>
    <tr>
      <td>Shared types / schemas</td>
      <td>Easily out of sync</td>
      <td>Single source of truth</td>
    </tr>
    <tr>
      <td>Dev experience</td>
      <td>Two windows, two terminals</td>
      <td>One project, one workspace</td>
    </tr>
  </tbody>
</table>

<p>When you’re Vibe Coding, these differences get amplified. The more you rely on AI, the more its context window matters.</p>

<h2 id="how-to-get-started">How to Get Started</h2>

<p>If your current project already has separate repos, no need for a big migration. You can:</p>

<ol>
  <li>Create a new folder and pull both repos in (via submodules or just move them)</li>
  <li>Start your next project with a mono repo structure from day one</li>
  <li>Try letting an AI agent modify both frontend and backend in a mono repo — feel the difference</li>
</ol>

<h2 id="wrap-up">Wrap Up</h2>

<p>The key to Vibe Coding isn’t just which AI tool you use — it’s how you organize your project so the AI can do its best work.</p>

<p>A mono repo is the lowest-cost, highest-return move you can make.</p>

<p>Try it. You’ll find it surprisingly efficient.</p>]]></content><author><name>Marvin Lin</name></author><category term="programming" /><category term="AI" /><category term="Vibe Coding" /><category term="Mono Repo" /><category term="Frontend" /><category term="Backend" /><category term="Workflow" /><summary type="html"><![CDATA[After heavily using Codex and Claude Code, I now almost always use this structure.]]></summary></entry><entry xml:lang="zh"><title type="html">Vibe Coding 的第一步：把前後端放在同一個資料夾</title><link href="https://moonandeye.github.io/zh/programming/mono-repo-vibe-coding/" rel="alternate" type="text/html" title="Vibe Coding 的第一步：把前後端放在同一個資料夾" /><published>2026-04-12T00:00:00+00:00</published><updated>2026-04-12T00:00:00+00:00</updated><id>https://moonandeye.github.io/zh/programming/mono-repo-vibe-coding</id><content type="html" xml:base="https://moonandeye.github.io/zh/programming/mono-repo-vibe-coding/"><![CDATA[<p>在開始大量使用 Codex, Claude Code 後，我現在幾乎都使用這個架構。</p>

<p><strong>把前端和後端放在同一個資料夾裡。</strong></p>

<p>這不是什麼新概念，mono repo 已經存在很久了。但在 Vibe Coding 的時代，它的價值被放大了好幾倍。</p>

<h2 id="為什麼-mono-repo-對-ai-agent-coding-很重要">為什麼 Mono Repo 對 AI Agent Coding 很重要？</h2>

<p>當你用 AI agent 來寫程式，它的理解範圍就是你給它的 context。</p>

<p>如果你的前端和後端分成兩個 repo：</p>

<ul>
  <li>AI 只看得到其中一邊</li>
  <li>它不知道另一邊的 API 長什麼樣</li>
  <li>你得自己當翻譯，把另一邊的資訊手動餵給它</li>
</ul>

<p>但如果它們在同一個 repo 裡：</p>

<ul>
  <li>AI 可以同時讀到前端的呼叫邏輯和後端的 API 定義</li>
  <li>改了後端的 response format，它能自動幫你更新前端的對應欄位</li>
  <li>共用的 type、schema、config 放在一起，不會出現兩邊不同步的問題</li>
</ul>

<p>簡單來說，<strong>mono repo 讓 AI 的 context 變完整了</strong>。Context 完整，生成的程式碼就更準確。</p>

<h2 id="推薦的資料夾結構">推薦的資料夾結構</h2>

<p>不需要太複雜，這樣就夠了：</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>my-project/
├── frontend/          ← React / Next.js
├── backend/           ← Node.js / Express / FastAPI
├── package.json
└── README.md
</code></pre></div></div>

<p>如果你有共用的型別定義或工具函式，可以再加一層：</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>my-project/
├── frontend/          ← React / Next.js
├── backend/           ← Node.js / Express / FastAPI
├── shared/            ← 共用型別、常數、工具函式
├── package.json
└── README.md
</code></pre></div></div>

<p>重點不是結構多完美，而是<strong>前後端在同一個根目錄下</strong>。</p>

<h2 id="分開-vs-合在一起的差別">分開 vs 合在一起的差別</h2>

<table>
  <thead>
    <tr>
      <th> </th>
      <th>分開兩個 Repo</th>
      <th>Mono Repo</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>AI 能看到的範圍</td>
      <td>只有一邊</td>
      <td>前後端都能看到</td>
    </tr>
    <tr>
      <td>改 API 後更新前端</td>
      <td>手動同步</td>
      <td>AI 可以一起改</td>
    </tr>
    <tr>
      <td>共用型別 / Schema</td>
      <td>容易不同步</td>
      <td>同一份檔案，不會分歧</td>
    </tr>
    <tr>
      <td>開發體驗</td>
      <td>要開兩個視窗、兩個 terminal</td>
      <td>一個專案搞定</td>
    </tr>
  </tbody>
</table>

<p>當你在 Vibe Coding 的時候，這些差異會被放大。因為你依賴 AI 的程度越高，它能掌握的 context 就越重要。</p>

<h2 id="怎麼開始">怎麼開始？</h2>

<p>如果你現在的專案已經是前後端分開的，不用急著大改。可以：</p>

<ol>
  <li>開一個新資料夾，把兩個 repo 用 submodule 或直接搬進來</li>
  <li>下一個新專案，直接用 mono repo 結構開始</li>
  <li>試著讓 AI agent 在 mono repo 裡同時修改前後端，感受一下差異</li>
</ol>

<h2 id="結語">結語</h2>

<p>Vibe Coding 的關鍵不只是用哪個 AI 工具，更是你怎麼組織你的專案讓 AI 能發揮最大效果。</p>

<p>Mono repo 就是最低成本、最高回報的一步。</p>

<p>試試看，你會發現這個效率很高</p>]]></content><author><name>Marvin Lin</name></author><category term="programming" /><category term="AI" /><category term="Vibe Coding" /><category term="Mono Repo" /><category term="Frontend" /><category term="Backend" /><category term="Workflow" /><summary type="html"><![CDATA[在開始大量使用 Codex, Claude Code 後，我現在幾乎都使用這個架構。]]></summary></entry><entry xml:lang="en"><title type="html">Starting a Series of Compact Source Prompts</title><link href="https://moonandeye.github.io/en/programming/llm-knowledge-base-source-prompt/" rel="alternate" type="text/html" title="Starting a Series of Compact Source Prompts" /><published>2026-04-06T01:50:00+00:00</published><updated>2026-04-06T01:50:00+00:00</updated><id>https://moonandeye.github.io/en/programming/llm-knowledge-base-source-prompt</id><content type="html" xml:base="https://moonandeye.github.io/en/programming/llm-knowledge-base-source-prompt/"><![CDATA[<p>I’ve been thinking about a product format that sits somewhere between a gist, a spec, and a starter kit.</p>

<p>Not a full SaaS.
Not a long course.
Not a bloated template bundle.</p>

<p>Just a <strong>small, focused prompt artifact</strong> that does one job clearly.</p>

<p>That is the format I want to explore more deliberately.</p>

<p>So I’m starting a small series of <strong>compact source prompts</strong>: one-shot prompt products designed around specific workflows, with each one acting as a reusable technical artifact rather than a piece of content dressed up as a product.</p>

<p>The first one is:</p>

<p><strong>LLM Knowledge Base Source Prompt</strong><br />
<a href="https://marvinsight.gumroad.com/l/llm-knowledge-base-source-prompt">https://marvinsight.gumroad.com/l/llm-knowledge-base-source-prompt</a></p>

<h2 id="the-idea-behind-this-product-line">The idea behind this product line</h2>

<p>There are already plenty of large products for AI builders:</p>
<ul>
  <li>full frameworks</li>
  <li>heavy starter kits</li>
  <li>video courses</li>
  <li>giant prompt packs</li>
</ul>

<p>Those can be useful.</p>

<p>But I think there is also room for something smaller and sharper: artifacts that are compact enough to study in one sitting, specific enough to be immediately useful, and structured enough to be reused or adapted in real work.</p>

<p>That is the bet behind this series.</p>

<p>I’m interested in making <strong>tiny, high-leverage prompt products</strong> that behave more like source artifacts than marketing assets.</p>

<h2 id="why-start-with-a-knowledge-base-prompt">Why start with a knowledge base prompt</h2>

<p>A lot of AI work eventually runs into the same problem:</p>

<p>How do you turn raw notes, scattered decisions, working files, and project context into something durable?</p>

<p>Not just searchable.</p>

<p>Not just pretty.</p>

<p>Actually durable.</p>

<p>For me, that usually means:</p>
<ul>
  <li>markdown-first structure</li>
  <li>Git-friendly organization</li>
  <li>content that humans can maintain</li>
  <li>content that agents can also read and extend</li>
  <li>a system that does not collapse into a thin docs UI with weak information architecture</li>
</ul>

<p>That is why the first product in this series is centered on a knowledge base.</p>

<h2 id="karpathy-x-and-the-gist-like-artifact">Karpathy, X, and the gist-like artifact</h2>

<p>A key part of the inspiration came from <strong>Andrej Karpathy</strong>, and I want to be explicit about that.</p>

<p>This product direction was not something I came up with in isolation. It was shaped in part by seeing Karpathy frame markdown, text files, and compact source artifacts as serious interfaces for LLM workflows.</p>

<p>In particular, these references mattered:</p>
<ul>
  <li>Karpathy’s gist: <a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f">https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f</a></li>
  <li>Karpathy’s X post: <a href="https://x.com/karpathy/status/2039805659525644595?ref=anduril.tw">https://x.com/karpathy/status/2039805659525644595?ref=anduril.tw</a></li>
</ul>

<p>What I found compelling there was not just the specific content, but the format itself: a compact, portable artifact that carries a lot of implementation direction without pretending to be an entire product by itself.</p>

<p>That framing mattered to me.</p>

<p>I did not want to sell “AI vibes.”</p>

<p>I wanted to package a <strong>source specification</strong> that someone could actually use, inspect, adapt, and build from.</p>

<h2 id="what-this-first-prompt-is-for">What this first prompt is for</h2>

<p><strong>LLM Knowledge Base Source Prompt</strong> is designed to generate a markdown-first internal wiki and LLM-friendly knowledge base starter.</p>

<p>The target output includes:</p>
<ul>
  <li><strong>Next.js App Router</strong></li>
  <li><strong>Fumadocs</strong></li>
  <li><strong>MDX-based content</strong></li>
  <li><strong>static export compatibility</strong></li>
  <li>a <strong>dashboard-style homepage</strong></li>
  <li>structured content for <strong>Tasks / Repos / Topics / Decisions / People / Daily</strong></li>
  <li><strong>English-first</strong> content with <strong>Traditional Chinese</strong> as an alternate locale</li>
</ul>

<p>The point is not to create a generic docs shell.</p>

<p>The point is to give builders a stronger starting structure for long-term knowledge capture.</p>

<p>In other words, this is less about “generate me a docs site” and more about:</p>

<blockquote>
  <p>generate me a usable knowledge system from a compact source artifact.</p>
</blockquote>

<h2 id="what-you-are-buying">What you are buying</h2>

<p>You are buying the <strong>prompt itself</strong>.</p>

<p>More specifically, you are buying a focused source prompt that you can:</p>
<ul>
  <li>paste into Claude</li>
  <li>adapt for other coding models</li>
  <li>fork into your own internal wiki workflow</li>
  <li>use as a starting point for agent memory or team knowledge infrastructure</li>
</ul>

<p>So the product is not the finished website.</p>

<p>It is the <strong>source-level artifact</strong> that helps produce one.</p>

<h2 id="why-this-format-matters-to-me">Why this format matters to me</h2>

<p>I like products that are small enough to understand.</p>

<p>A compact prompt artifact can still contain:</p>
<ul>
  <li>product thinking</li>
  <li>information architecture</li>
  <li>implementation direction</li>
  <li>editorial judgment about what belongs in the system</li>
</ul>

<p>That makes it a surprisingly good product form.</p>

<p>It is easy to ship, easy to revise, easy to remix, and easy for other builders to evaluate quickly.</p>

<p>That is exactly why I think this format is worth exploring as a series, not just as a one-off experiment.</p>

<h2 id="the-first-entry-in-a-broader-series">The first entry in a broader series</h2>

<p>This knowledge base prompt is the first entry.</p>

<p>It will not be the last.</p>

<p>My goal is to build a line of one-shot prompt products where each one has:</p>
<ul>
  <li>a clear use case</li>
  <li>a concrete output shape</li>
  <li>a compact but serious source artifact behind it</li>
</ul>

<p>This first release happens to be about markdown-first knowledge systems.</p>

<p>Future ones may target other focused workflows with the same philosophy.</p>

<h2 id="product-link">Product link</h2>

<p>If this specific workflow is relevant to you, you can check it out here:</p>

<p><a href="https://marvinsight.gumroad.com/l/llm-knowledge-base-source-prompt">https://marvinsight.gumroad.com/l/llm-knowledge-base-source-prompt</a></p>

<p>I’m less interested in making prompt products that feel disposable.</p>

<p>I’m more interested in making small technical artifacts that people can actually build with.</p>

<p>This is the first one.</p>]]></content><author><name>Marvin Lin</name></author><category term="programming" /><category term="AI" /><category term="Prompt Engineering" /><category term="Knowledge Base" /><category term="Gumroad" /><category term="Claude" /><summary type="html"><![CDATA[I’ve been thinking about a product format that sits somewhere between a gist, a spec, and a starter kit.]]></summary></entry><entry xml:lang="zh"><title type="html">你沒給 AI 正確方向，它就載不到你要去的地方</title><link href="https://moonandeye.github.io/zh/programming/ai-direction-demo-spec-state-machine/" rel="alternate" type="text/html" title="你沒給 AI 正確方向，它就載不到你要去的地方" /><published>2026-03-16T00:00:00+00:00</published><updated>2026-03-16T00:00:00+00:00</updated><id>https://moonandeye.github.io/zh/programming/ai-direction-demo-spec-state-machine</id><content type="html" xml:base="https://moonandeye.github.io/zh/programming/ai-direction-demo-spec-state-machine/"><![CDATA[<h2 id="writer">Writer</h2>

<p>你沒給 AI 正確方向，它就載不到你要去的地方。</p>

<p>我今天踩了一個很典型、也很容易被忽略的坑：</p>

<p>我叫 AI agent：</p>
<blockquote>
  <p>請參考 Figma Make share link 中的內容，進行實作。</p>
</blockquote>

<p>聽起來很合理對吧？</p>

<p>但問題是：<strong>share link 裡的內容，其實是 demo，不是產品的行為規格（behavior spec）</strong>。</p>

<h3 id="我到底給錯了什麼">我到底給錯了什麼？</h3>

<p>為了 demo 快，我在 Figma Make 裡把 app 的起始畫面直接做成 main tab bar。</p>

<p>於是 AI 真的超級「聽話」：</p>
<ul>
  <li>它把 demo 當成真需求</li>
  <li>直接實作成「一進 app 就進主頁」</li>
</ul>

<p>這在 demo 上看起來沒問題。</p>

<p>但在 mobile app 上，這通常不是你想要的真實行為。</p>

<h3 id="標準的-mobile-app-launch-其實是一個-state-machine">標準的 mobile app launch 其實是一個 state machine</h3>

<p>在 mobile app 上，標準手法通常是：app launch 後先進入一個 Launch Screen 的 activity / view controller，然後在這個實例物件中做判斷。</p>

<p>例如一個常見流程會是：</p>

<p>1) 強迫更新 / 建議更新 / 可正常使用</p>

<p>2) 在「可正常使用」之後，才檢查是否可以 auto login</p>
<ul>
  <li>if yes → go to main tab bar</li>
  <li>if not → go to login page</li>
</ul>

<p>這些條件與分支，才是「方向」。</p>

<p>UI 長什麼樣，是結果。</p>

<h3 id="我為什麼會一直以為-ai-在亂改">我為什麼會一直以為 AI 在亂改？</h3>

<p>我一開始一直以為：AI 沒有照我的指令做、一直改掉我的實作。</p>

<p>最後我去檢查 Figma Make build 起來的 React 網站，才發現網站的流程就是如此設計。</p>

<p>換句話說：</p>
<ul>
  <li><strong>我給 AI 的「世界」就是那個 demo</strong></li>
  <li>AI 只能照我給的可見狀態去估</li>
</ul>

<p>它沒錯。</p>

<p>錯的是我一開始給的方向：我給的是 demo，不是行為規格。</p>

<h3 id="結論要-ai-做對-ui先把行為規格寫清楚">結論：要 AI 做對 UI，先把「行為規格」寫清楚</h3>

<p>你要 AI 做對 UI，先定義「行為」：</p>
<ul>
  <li>入口狀態（entry states）</li>
  <li>分支條件（branching conditions）</li>
  <li>成功條件（success criteria）</li>
</ul>

<p><strong>UI 是結果；流程才是方向。</strong></p>

<h2 id="editor">Editor</h2>

<p>這篇要傳達的核心很清楚，也符合 builder 角度：</p>
<ul>
  <li>不是模型問題，是 workflow/spec 的問題</li>
  <li>有具體工具（Figma Make）與具體流程（update → auth → main/login）支撐可信度</li>
</ul>

<p>我在 final 只做兩個「不改意思」的微調：
1) 讓「demo vs spec」對比更快出現（更像文章的主線）
2) 結尾再強化一次可複用的 checklist</p>

<h2 id="final">Final</h2>

<p>你沒給 AI 正確方向，它就載不到你要去的地方。</p>

<p>我今天踩了一個很典型、也很容易被忽略的坑。</p>

<p>我叫 AI agent：</p>
<blockquote>
  <p>請參考 Figma Make share link 中的內容，進行實作。</p>
</blockquote>

<p>聽起來很合理。</p>

<p>但我後來才發現：<strong>share link 裡的內容，其實是 demo，不是產品的行為規格（behavior spec）</strong>。</p>

<p>為了 demo 快，我在 Figma Make 裡把 app 的起始畫面直接做成 main tab bar。</p>

<p>於是 AI 真的超級「聽話」：</p>
<ul>
  <li>它把 demo 當成真需求</li>
  <li>直接實作成「一進 app 就進主頁」</li>
</ul>

<p>但在 mobile app 上，標準的啟動流程通常不是「看 UI 長什麼樣」，而是先跑一個 state machine。</p>

<p>一般做法是：app launch 後先進入 Launch Screen 的 activity / view controller，然後在這個實例物件中做判斷，例如：</p>

<p>1) 強迫更新 / 建議更新 / 可正常使用</p>

<p>2) 在「可正常使用」之後，才檢查是否可以 auto login</p>
<ul>
  <li>if yes → go to main tab bar</li>
  <li>if not → go to login page</li>
</ul>

<p>我一開始一直以為：AI 沒有照我的指令做、一直改掉我的實作。</p>

<p>最後我去檢查 Figma Make build 起來的 React 網站，才發現網站的流程就是如此設計。</p>

<p>換句話說：</p>
<ul>
  <li>我給 AI 的「世界」就是那個 demo</li>
  <li>AI 只能照我給的可見狀態去估</li>
</ul>

<p>它沒錯。</p>

<p>錯的是我一開始給的方向：我給的是 demo，不是行為規格。</p>

<p>結論很簡單：<strong>要 AI 做對 UI，先把行為規格寫清楚。</strong></p>

<p>一個最小 checklist：</p>
<ul>
  <li>入口狀態（entry states）</li>
  <li>分支條件（branching conditions）</li>
  <li>成功條件（success criteria）</li>
</ul>

<p>UI 是結果；流程才是方向。</p>]]></content><author><name>Marvin Lin</name></author><category term="programming" /><category term="AI" /><category term="AI Agent" /><category term="Product" /><category term="Mobile" /><category term="Workflow" /><summary type="html"><![CDATA[Writer]]></summary></entry><entry xml:lang="en"><title type="html">Comet - The AI Browser That Turns Web Surfing into an Intelligent Conversation (with Referral Code)</title><link href="https://moonandeye.github.io/en/programming/comet/" rel="alternate" type="text/html" title="Comet - The AI Browser That Turns Web Surfing into an Intelligent Conversation (with Referral Code)" /><published>2025-10-15T00:00:00+00:00</published><updated>2025-10-15T00:00:00+00:00</updated><id>https://moonandeye.github.io/en/programming/comet</id><content type="html" xml:base="https://moonandeye.github.io/en/programming/comet/"><![CDATA[<h1 id="comet-the-ai-browser-that-makes-web-surfing-feel-like-a-power-up">Comet: The AI Browser That Makes Web Surfing Feel Like a Power-Up</h1>

<p>Have you ever thought that a browser could do more than just open websites?<br />
Now there’s an AI browser called <strong>Comet</strong>, designed to make “researching online” smarter and more efficient.<br />
Let’s dive right in — here’s what this trending AI tool is, what it can do, and what you should pay attention to.</p>

<hr />

<h2 id="1-what-is-comet">1. What Is Comet?</h2>

<p>Comet is an AI browser created by <strong>Perplexity</strong>, built around the concept of “thinking while browsing.”<br />
In short, it doesn’t just open pages — it helps you summarize, organize, and compare information, so finding what you need no longer feels like searching for a needle in a haystack.<br />
It’s built on the Chromium framework, meaning it supports Chrome extensions and requires almost no learning curve.<br />
Originally limited to paid users, Comet is now available for everyone to download for free.</p>

<hr />

<h2 id="2-what-can-it-do">2. What Can It Do?</h2>

<ul>
  <li><strong>AI Search Summaries</strong>: Instead of giving you a list of links, Comet provides concise summaries with cited sources.</li>
  <li><strong>AI Assistant Sidebar</strong>: Ask questions, compare data, translate content, or explore related topics right from the page.</li>
  <li><strong>Automation Tools</strong>: With your permission, it can help you compare prices, organize schedules, or send emails.</li>
  <li><strong>Cross-Tab Organization</strong>: Even with multiple tabs open, Comet can automatically summarize and connect their content.</li>
</ul>

<hr />

<h2 id="3-why-people-use-it">3. Why People Use It</h2>

<p>Comet feels incredibly smooth to use.<br />
You no longer need to juggle ten tabs for research, note-taking, and fact-checking — the AI connects everything for you.<br />
Most impressively, it’s not just a search tool; it’s like a <strong>shared brain</strong> that thinks and makes decisions alongside you.</p>

<hr />

<h2 id="4-a-note-on-security-and-privacy">4. A Note on Security and Privacy</h2>

<p>While AI tools are convenient, always stay alert about <strong>privacy and data security</strong>.<br />
Comet analyzes your browsing activity to generate suggestions.<br />
In short: <strong>don’t let AI handle sensitive or confidential operations</strong> — keeping human judgment in the loop is always the safest choice.</p>

<hr />

<h2 id="5-final-reminder">5. Final Reminder</h2>

<p>If you’d like to try this AI browser, you can download it directly from the official website.<br />
Even better, I have a <strong>personal referral code</strong> — use my link <a href="https://pplx.ai/atimis193889"><strong><code class="language-plaintext highlighter-rouge">https://pplx.ai/atimis193889</code></strong></a> to unlock early access or get extra usage credits.</p>

<p><a href="https://pplx.ai/atimis193889" target="_blank">
  <img src="/assets/programming/commet/commet-image.png" alt="Comet AI Browser" width="50%" height="50%" />
</a></p>

<p><a href="https://pplx.ai/atimis193889">Referral Link</a></p>

<p>Want to see how powerful “AI-assisted browsing” can be?<br />
Try it now — next time you’re doing research, you might just feel like you’ve turned on a cheat code.</p>]]></content><author><name>Marvin Lin</name></author><category term="programming" /><category term="AI" /><category term="AI Agent" /><summary type="html"><![CDATA[Comet: The AI Browser That Makes Web Surfing Feel Like a Power-Up]]></summary></entry><entry xml:lang="zh"><title type="html">Comet：AI 瀏覽器，讓上網變成一場智能對話 (附推薦碼)</title><link href="https://moonandeye.github.io/zh/programming/comet/" rel="alternate" type="text/html" title="Comet：AI 瀏覽器，讓上網變成一場智能對話 (附推薦碼)" /><published>2025-10-15T00:00:00+00:00</published><updated>2025-10-15T00:00:00+00:00</updated><id>https://moonandeye.github.io/zh/programming/comet</id><content type="html" xml:base="https://moonandeye.github.io/zh/programming/comet/"><![CDATA[<h1 id="ai-瀏覽器-comet讓你上網像開外掛一樣快">AI 瀏覽器 Comet：讓你上網像開外掛一樣快</h1>

<p>你有沒有想過，瀏覽器不只是開網頁那麼簡單？現在有一款叫 <strong>Comet</strong> 的 AI 瀏覽器，正在讓「上網查資料」這件事變得更聰明、更有效率。<br />
話不多說，我幫你快速介紹這個最近爆紅的 AI 工具是什麼、能幹嘛、要注意什麼。</p>

<hr />

<h2 id="一什麼是-comet">一、什麼是 Comet？</h2>

<p>Comet 是由 <strong>Perplexity</strong> 推出的 AI 瀏覽器，主打「邊瀏覽邊思考」。<br />
簡單說，它不只幫你開網站，還會幫你整理、摘要、比較，讓查資料不再像是在深海裡撈針。<br />
它基於 Chromium 架構，所以能支援 Chrome 擴充功能，也不會有學習門檻。<br />
一開始 Comet 只給付費用戶試用，現在已經開放給所有人免費下載。</p>

<hr />

<h2 id="二它能幫你做什麼">二、它能幫你做什麼？</h2>

<ul>
  <li><strong>AI 搜尋摘要</strong>：輸入關鍵字後，它不只丟連結，而是直接幫你整合重點、附上來源。</li>
  <li><strong>AI 助手側邊欄</strong>：可以即時問問題、幫你對比資料、翻譯或延伸查詢。</li>
  <li><strong>自動化操作</strong>：授權後，它甚至能幫你比價、整理日程、寄信。</li>
  <li><strong>跨分頁整理</strong>：開太多分頁也不怕，Comet 會自動幫你總結不同頁面的重點。</li>
</ul>

<hr />

<h2 id="三為什麼大家在用">三、為什麼大家在用？</h2>

<p>Comet 的體驗很「順」。<br />
你不用再開十幾個分頁查資料、記筆記、找答案，AI 幫你串起整個流程。<br />
最特別的是，它不只是搜尋器，而像是一個「共用大腦」—— 跟你一起思考、決策。</p>

<hr />

<h2 id="四請注意資安風險">四、請注意資安風險</h2>

<p>AI 雖然方便，但也要注意 <strong>資安與隱私</strong>。<br />
Comet 會分析你瀏覽的內容來提供建議
簡單說：<strong>機敏性高的操作不要交給 AI 處理</strong>，保持人腦在場最安全。</p>

<hr />

<h2 id="五最後小提醒">五、最後小提醒</h2>

<p>如果你想試試這款 AI 瀏覽器，可以直接去官方網站下載。<br />
更棒的是，我有一個 <strong>專屬邀請碼</strong> —— 使用我的推薦碼 <a href="https://pplx.ai/atimis193889"><strong><code class="language-plaintext highlighter-rouge">https://pplx.ai/atimis193889</code></strong></a>，就能提前體驗新功能或拿額外的使用額度。</p>

<p><a href="https://pplx.ai/atimis193889" target="_blank">
  <img src="/assets/programming/commet/commet-image.png" alt="Comet AI Browser" width="50%" height="50%" />
</a></p>

<p><a href="https://pplx.ai/atimis193889">推薦碼連結</a></p>

<p>想感受「AI 幫你上網」的威力？趁現在就試試看。<br />
說不定下次查資料，你會懷疑自己是不是開了外掛。</p>]]></content><author><name>Marvin Lin</name></author><category term="programming" /><category term="AI" /><category term="AI Agent" /><summary type="html"><![CDATA[AI 瀏覽器 Comet：讓你上網像開外掛一樣快]]></summary></entry><entry xml:lang="en"><title type="html">Using Plan Mode to Let Claude Code Plan Before Implementation</title><link href="https://moonandeye.github.io/en/programming/think-mode-on-claude-code/" rel="alternate" type="text/html" title="Using Plan Mode to Let Claude Code Plan Before Implementation" /><published>2025-08-07T04:05:00+00:00</published><updated>2025-08-07T04:05:00+00:00</updated><id>https://moonandeye.github.io/en/programming/think-mode-on-claude-code</id><content type="html" xml:base="https://moonandeye.github.io/en/programming/think-mode-on-claude-code/"><![CDATA[<p>When using Claude Code, you can first enable plan mode to let AI help you plan the code architecture and logic before starting implementation. You can wait until you approve and confirm Claude Code’s plan before letting Claude Code execute.</p>

<h2 id="how-to-switch-to-plan-mode---shift--tab">How to Switch to Plan Mode - Shift + Tab</h2>

<p>In Claude Code, you can use the shortcut Shift + Tab to switch modes. The first switch is to auto accept mode. You can see the prompt at the bottom of the terminal to know which mode you’re currently in. Press Shift + Tab a second time to enter plan mode. When you enable plan mode, Claude enters a state focused on thinking and planning. At this time, Claude Code will not modify your code but will list the steps it will take and the implementation blueprint. So you can safely conduct various confirmations and divergent thinking.</p>

<h3 id="first-press-of-shift--tab---enter-auto-accept-mode">First Press of Shift + Tab - Enter Auto Accept Mode</h3>
<p><img src="/assets/programming/claude-code-think-mode/claude-code-accept-mode.png" alt="auto accept mode" /></p>

<h3 id="use-shift--tab-to-enter-plan-mode">Use Shift + Tab to Enter Plan Mode</h3>
<p><img src="/assets/programming/claude-code-think-mode/claude-code-think-mode.png" alt="claude code think mode" /></p>

<h2 id="advantages-of-think-mode">Advantages of Think Mode</h2>

<h3 id="plan-first-then-execute">Plan First, Then Execute</h3>
<p><img src="/assets/programming/claude-code-think-mode/think-mode-request-prompt.png" alt="think mode request prompt" /></p>

<p>When you make a request to Claude in think mode, Claude will first analyze and think about your requirements, then provide a detailed plan blueprint.</p>

<h3 id="view-implementation-blueprint">View Implementation Blueprint</h3>
<p><img src="/assets/programming/claude-code-think-mode/plan-mode-blueprint.png" alt="plan mode blueprint" /></p>

<p>In plan mode, Claude will display a complete implementation plan, allowing you to understand the entire implementation process before actual execution.</p>

<h3 id="execute-after-confirmation">Execute After Confirmation</h3>
<p><img src="/assets/programming/claude-code-think-mode/action-after-planing.png" alt="action after planning" /></p>

<p>When you confirm the plan, Claude will start executing actual code modifications based on the previous planning.</p>

<h3 id="personal-thoughts">Personal Thoughts</h3>
<p>Before knowing about plan mode, I used prompts to prevent Claude Code from directly modifying code, instead asking it to give me a general direction and steps first. However, when using prompts alone, sometimes Claude Code would still directly initiate modifications. Moreover, since I mostly develop iOS apps, it would often directly execute Xcode build or other Xcode CLI commands.</p>

<p>In plan mode, I feel the quality of modification context has improved, and the solutions it proposes in plan mode have preserved the concept of Canvas or artifacts in the UI, allowing for minor modifications to the same file without affecting the overall structure and logic.</p>

<p>This is what I like most about it. After all, I need to get things done right first before I can start asking AI to do things well.</p>

<h2 id="related-articles">Related Articles</h2>

<ul>
  <li>
    <p><a href="/en/programming/paste-capture-image-to-claude-code/">How to Paste Screen Captures to Claude Code Editor on macOS</a> (English)</p>
  </li>
  <li>
    <p><a href="/zh/programming/paste-capture-image-to-claude-code/">將螢幕的截圖貼上到 Claude 的程式碼編輯器的方法，macOS 適用</a> (Chinese)</p>
  </li>
</ul>]]></content><author><name>Marvin Lin</name></author><category term="programming" /><category term="Claude" /><category term="AI" /><category term="AI Agent" /><summary type="html"><![CDATA[When using Claude Code, you can first enable plan mode to let AI help you plan the code architecture and logic before starting implementation. You can wait until you approve and confirm Claude Code’s plan before letting Claude Code execute.]]></summary></entry><entry xml:lang="zh"><title type="html">使用 plan mode 先讓 claude code 規畫，再開始實作</title><link href="https://moonandeye.github.io/zh/programming/think-mode-on-claude-code/" rel="alternate" type="text/html" title="使用 plan mode 先讓 claude code 規畫，再開始實作" /><published>2025-08-07T04:02:00+00:00</published><updated>2025-08-07T04:02:00+00:00</updated><id>https://moonandeye.github.io/zh/programming/think-mode-on-claude-code</id><content type="html" xml:base="https://moonandeye.github.io/zh/programming/think-mode-on-claude-code/"><![CDATA[<p>在使用 claude code 時，你可以先啟用 think mode，讓 AI 幫助你規劃程式碼的架構和邏輯，然後再開始實作。直到你認可和確認 Claude code 的規畫，再開始讓 claude code 執行。</p>

<h2 id="切換-think-mode-的方法---shift--tab">切換 think mode 的方法 - shift + tab</h2>

<p>在 Claude code 中，你可以使用快捷鍵 shift + tab 來切換 mode。第一次的切換是 auto accept mode，你可以看 terminal 下方的提示，來知道現在的 mode 是哪一種。按第二次 shift + tab 就會進入 think mode。當你啟用 think mode 後，Claude 會進入一種專注於思考和規劃的狀態，這時候 claude code 並不會去更動你的程式碼，而是列出他會進行的步驟，以及如何實作的藍圖 (blueprint)。所以你可以放心的進行各種確認和發散的思考。</p>

<h3 id="第一次按-shift--tab---進入-auto-accept-mode">第一次按 shift + tab - 進入 auto accept mode</h3>
<p><img src="/assets/programming/claude-code-think-mode/claude-code-accept-mode.png" alt="auto accept mode" /></p>

<h3 id="用-shift--tab-進入-think-mode">用 shift + tab 進入 think mode</h3>
<p><img src="/assets/programming/claude-code-think-mode/claude-code-think-mode.png" alt="claude code think mode" /></p>

<h2 id="think-mode-的優點">think mode 的優點</h2>

<h3 id="先規劃再執行">先規劃再執行</h3>
<p><img src="/assets/programming/claude-code-think-mode/think-mode-request-prompt.png" alt="think mode request prompt" /></p>

<p>當你在 think mode 中向 Claude 提出請求時，Claude 會先分析和思考你的需求，然後提供一個詳細的計劃藍圖。</p>

<h3 id="查看實作藍圖">查看實作藍圖</h3>
<p><img src="/assets/programming/claude-code-think-mode/plan-mode-blueprint.png" alt="plan mode blueprint" /></p>

<p>在 think mode 中，Claude 會展示完整的實作計劃，讓你可以在實際執行之前就了解整個實作流程。</p>

<h3 id="確認後執行">確認後執行</h3>
<p><img src="/assets/programming/claude-code-think-mode/action-after-planing.png" alt="action after planning" /></p>

<p>當你確認計劃後，Claude 會根據之前的規劃開始執行實際的程式碼修改。</p>

<h3 id="心得">心得</h3>
<p>在不知道 think mode 之前的我，是使用 prompt 讓 Claude code 不要直接修改程式碼，而是先給我一個大概的方向和步驟。只是，單純用 prompt 時，有時候 claude code 還是會直接發動修改。而且因為我大多時間是開發 iOS，常常會直接執行到 xcode build or 其他 xcode cli 指令。</p>

<p>在 think mode 下，我覺得修改的上下文品質有提高，而且他在 think mode 提出的方案， UI 有保留 Canvas or artifacts 的概念，可以做到同一份檔案做小幅度的修改，而不會影響到整體的結構和邏輯。</p>

<p>這是我最喜歡的地方，畢竟，要先把事情做對，我才可以開始要求 AI 把事情做好。</p>

<h2 id="相關文章">相關文章</h2>

<ul>
  <li>
    <p><a href="/en/programming/paste-capture-image-to-claude-code/">How to Paste Screen Captures to Claude Code Editor on macOS</a> (English)</p>
  </li>
  <li>
    <p><a href="/zh/programming/paste-capture-image-to-claude-code/">將螢幕的截圖貼上到 Claude 的程式碼編輯器的方法，macOS 適用</a> (Chinese)</p>
  </li>
</ul>]]></content><author><name>Marvin Lin</name></author><category term="programming" /><category term="Claude" /><category term="AI" /><category term="AI Agent" /><summary type="html"><![CDATA[在使用 claude code 時，你可以先啟用 think mode，讓 AI 幫助你規劃程式碼的架構和邏輯，然後再開始實作。直到你認可和確認 Claude code 的規畫，再開始讓 claude code 執行。]]></summary></entry><entry xml:lang="en"><title type="html">Mario Kart World - Wallpaper Downloads</title><link href="https://moonandeye.github.io/en/life/mario-kart-world/" rel="alternate" type="text/html" title="Mario Kart World - Wallpaper Downloads" /><published>2025-07-25T13:10:00+00:00</published><updated>2025-07-25T13:10:00+00:00</updated><id>https://moonandeye.github.io/en/life/mario-kart-world</id><content type="html" xml:base="https://moonandeye.github.io/en/life/mario-kart-world/"><![CDATA[<p>Nintendo’s website now has Mario Kart World wallpapers available for download.</p>

<h2 id="nintendo-mario-kart-download-link"><a href="https://www.nintendo.com/jp/download/mario_kart_world/index.html">Nintendo Mario Kart Download Link</a></h2>

<h2 id="wallpaper-1">Wallpaper 1</h2>

<h3 id="mobile---1320-x-2868">Mobile - 1320 x 2868</h3>
<p><img src="/assets/life/mario-kart/pic1-smart1.jpg" alt="Mario kart - Pic 1 - Smart1" /></p>

<h3 id="mobile---1440-x-2560">Mobile - 1440 x 2560</h3>

<p><img src="/assets/life/mario-kart/pic1-smart2.jpg" alt="Mario kart - Pic 1 - Smart2" /></p>

<h3 id="desktop">Desktop</h3>

<p><img src="/assets/life/mario-kart/pic1-pc.jpg" alt="Mario kart - pic 1 - pc" /></p>

<h2 id="wallpaper-2">Wallpaper 2</h2>

<h3 id="mobile---1320-x-2868-1">Mobile - 1320 x 2868</h3>

<p><img src="/assets/life/mario-kart/pic2-smart1.jpg" alt="Mario kart - Pic 2 - Smart1" /></p>

<h3 id="mobile---1440-x-2560-1">Mobile - 1440 x 2560</h3>

<p><img src="/assets/life/mario-kart/pic2-smart2.jpg" alt="Mario kart - Pic 2 - Smart2" /></p>

<h3 id="desktop-1">Desktop</h3>

<p><img src="/assets/life/mario-kart/pic2-pc.jpg" alt="Mario kart - pic 2 - pc" /></p>

<h2 id="other-wallpaper-links">Other Wallpaper Links</h2>

<p><a href="https://www.marvinswift.com/en/life/mario-desktop-screen/">Mario Wonder - Wallpapers Available for Download on Nintendo’s Official Website</a></p>

<p><a href="https://www.marvinswift.com/en/life/zelda-kingdom-tear-wall-papers/">The Legend of Zelda - Tears of the Kingdom Wallpapers Available on Nintendo’s Website</a></p>]]></content><author><name>Marvin Lin</name></author><category term="life" /><category term="life" /><category term="Mario Kart World" /><summary type="html"><![CDATA[Nintendo’s website now has Mario Kart World wallpapers available for download.]]></summary></entry></feed>