<?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: Cogweald</title>
    <description>The latest articles on DEV Community by Cogweald (@jones_chen_592558a62a5c44).</description>
    <link>https://dev.to/jones_chen_592558a62a5c44</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%2F4121648%2F49154cbf-d219-429e-8281-d95b25b4cee6.png</url>
      <title>DEV Community: Cogweald</title>
      <link>https://dev.to/jones_chen_592558a62a5c44</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jones_chen_592558a62a5c44"/>
    <language>en</language>
    <item>
      <title>AI-generated content still needs to be discoverable</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Sat, 10 Oct 2026 07:11:47 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/ai-generated-content-still-needs-to-be-discoverable-3ihf</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/ai-generated-content-still-needs-to-be-discoverable-3ihf</guid>
      <description>&lt;p&gt;Creating content is only the first step. If a world updates every day but nobody can find it, the system is quietly computing for no one.&lt;/p&gt;

&lt;p&gt;When a public Cogweald world publishes a new chapter, it sends the chapter URL, story page, and homepage to IndexNow. When a world changes from private or unlisted to public, the whole content tree can be submitted as newly discoverable.&lt;/p&gt;

&lt;p&gt;This is useful for products that continuously create new pages. Instead of waiting for the next natural crawl, the system sends an update signal when content becomes public.&lt;/p&gt;

&lt;p&gt;There is an important policy distinction: unlisted does not mean “less important public.” It means link-only, so it should not be submitted for search indexing.&lt;/p&gt;

&lt;p&gt;AI content distribution is not just a marketing task to add at the end. Visibility, canonical URLs, RSS, sitemaps, and indexing policy belong in the domain model from the beginning.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>indexnow</category>
      <category>contentplatforms</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Public, unlisted, and private are not three checkboxes</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Wed, 07 Oct 2026 00:24:04 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/public-unlisted-and-private-are-not-three-checkboxes-59j2</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/public-unlisted-and-private-are-not-three-checkboxes-59j2</guid>
      <description>&lt;p&gt;Content platforms often treat visibility as a UI field and implement the rules separately on every page. That eventually creates bugs: a story appears on the homepage but its shared link fails, or private content becomes visible to search engines.&lt;/p&gt;

&lt;p&gt;Cogweald treats visibility as part of the read model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Public:&lt;/strong&gt; listed in the catalogue and readable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unlisted:&lt;/strong&gt; not listed in the catalogue, but readable by anyone with the link.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private:&lt;/strong&gt; readable only by the owner.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same meaning must apply to SSR pages, archives, chapter routes, RSS, Open Graph images, and Explore queries. Forgetting the rule on any one surface creates an information boundary bug.&lt;/p&gt;

&lt;p&gt;A practical testing reminder: do not only test whether a button is hidden. Test every possible entry point that can retrieve the data.&lt;/p&gt;

&lt;p&gt;Visibility is domain policy, not a presentation detail.&lt;/p&gt;

</description>
      <category>websecurity</category>
      <category>productarchitecture</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Cache invalidation for generated content cannot be an act of faith</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Tue, 06 Oct 2026 07:49:46 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/cache-invalidation-for-generated-content-cannot-be-an-act-of-faith-5c12</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/cache-invalidation-for-generated-content-cannot-be-an-act-of-faith-5c12</guid>
      <description>&lt;p&gt;AI content is generated dynamically, but reader-facing pages can still be highly cacheable. The two ideas are compatible if you know exactly when the cache must be invalidated.&lt;/p&gt;

&lt;p&gt;Cogweald uses an appropriate ISR strategy for public story pages, archives, the homepage, and the library. After a chapter is successfully persisted, the cron route revalidates the relevant paths so the next reader sees the new content instead of waiting for a passive expiry.&lt;/p&gt;

&lt;p&gt;There is an easy-to-miss detail: only a fully successful domain operation should trigger revalidation. If model generation succeeds but persistence fails, the page must not look like a chapter was published.&lt;/p&gt;

&lt;p&gt;Cache invalidation is difficult not because the API is complicated, but because it must match the consistency semantics of your data.&lt;/p&gt;

&lt;p&gt;When your AI content has a publishing concept, design generation, persistence, notifications, and cache updates as one event flow.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>isr</category>
      <category>webarchitecture</category>
    </item>
    <item>
      <title>Keep AI services out of Client Components</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Mon, 05 Oct 2026 14:30:53 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/keep-ai-services-out-of-client-components-3oae</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/keep-ai-services-out-of-client-components-3oae</guid>
      <description>&lt;p&gt;This is not just a Next.js style preference. It is a security boundary.&lt;/p&gt;

&lt;p&gt;Cogweald keeps OpenAI, Supabase service-role access, billing, and the simulation engine in server-only code. Client Components can call controlled server actions or route handlers, but they never import those services directly.&lt;/p&gt;

&lt;p&gt;The reasons are practical:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API keys must not enter the browser bundle.&lt;/li&gt;
&lt;li&gt;A service-role client must not be exposed to users.&lt;/li&gt;
&lt;li&gt;Chapter generation needs authorization and state validation.&lt;/li&gt;
&lt;li&gt;Billing actions must run in a trusted server context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI apps often put sensitive calls in the browser just to make the first button work, then try to repair the boundary after deployment. A better approach is to establish it in the import graph from the beginning: which modules are server-only, and which data is safe to send to the client?&lt;/p&gt;

&lt;p&gt;A feature can be finished later. Secrets should never be shipped first.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>approuter</category>
      <category>applicationsecurity</category>
      <category>ai</category>
    </item>
    <item>
      <title>Limits are not anti-AI. They keep the system alive.</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Sun, 04 Oct 2026 11:56:38 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/limits-are-not-anti-ai-they-keep-the-system-alive-4a7f</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/limits-are-not-anti-ai-they-keep-the-system-alive-4a7f</guid>
      <description>&lt;p&gt;If an agent can create unlimited worlds, characters, and images, a product quickly faces two problems: unpredictable costs and no responsible resource boundary.&lt;/p&gt;

&lt;p&gt;Cogweald treats plan limits as domain rules, not as text on a pricing page. &lt;code&gt;maxWorlds&lt;/code&gt;, &lt;code&gt;maxChapters&lt;/code&gt;, &lt;code&gt;maxCharacters&lt;/code&gt;, and &lt;code&gt;maxCoverGenerations&lt;/code&gt; are enforced on the server. Disabling a frontend button is not enough.&lt;/p&gt;

&lt;p&gt;Limits also need to be checked before a state transition. When a free world reaches its chapter cap, the system pauses it and notifies the creator instead of letting the next cron run discover the problem too late.&lt;/p&gt;

&lt;p&gt;A good quota system does more than reject requests. It defines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When to reject&lt;/li&gt;
&lt;li&gt;When to pause&lt;/li&gt;
&lt;li&gt;How the user can recover&lt;/li&gt;
&lt;li&gt;What happens to data that already exists&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;“Unlimited” is attractive product copy. In a real AI system, predictability is often more valuable.&lt;/p&gt;

</description>
      <category>saas</category>
      <category>ratelimiting</category>
      <category>infrastructure</category>
      <category>productengineering</category>
    </item>
    <item>
      <title>An agent needs to create new entities to truly grow</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Thu, 24 Sep 2026 06:51:47 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/an-agent-needs-to-create-new-entities-to-truly-grow-5c1j</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/an-agent-needs-to-create-new-entities-to-truly-grow-5c1j</guid>
      <description>&lt;p&gt;An agent that can only modify a fixed set of rows has a hard time producing an open-ended system.&lt;/p&gt;

&lt;p&gt;Cogweald does not completely predefine the cast of every world. The model can introduce a new character in a chapter, and the application stores that character with &lt;code&gt;added_by = 'llm'&lt;/code&gt; so future chapters can use it.&lt;/p&gt;

&lt;p&gt;The important part is not that AI can insert a row. It is provenance.&lt;/p&gt;

&lt;p&gt;Every entity should have an answer to “where did this come from?” It may have been created by the creator, introduced by the LLM, or synchronized from an external tool. Once an agent can create data, provenance affects review, debugging, UI decisions, and future deletion strategies.&lt;/p&gt;

&lt;p&gt;Open-ended generation needs two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An extensible domain model&lt;/li&gt;
&lt;li&gt;A data model that tracks origin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without provenance, an autonomous system eventually struggles to answer a basic question: why does this thing exist?&lt;/p&gt;

</description>
      <category>datamodeling</category>
      <category>provenance</category>
      <category>agents</category>
      <category>ai</category>
    </item>
    <item>
      <title>Give the AI suggestions, not a script</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Tue, 22 Sep 2026 23:49:44 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/give-the-ai-suggestions-not-a-script-30i9</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/give-the-ai-suggestions-not-a-script-30i9</guid>
      <description>&lt;p&gt;If a user can specify exactly what must happen in the next chapter, the AI becomes a writing tool and the world stops being autonomous.&lt;/p&gt;

&lt;p&gt;Cogweald treats creator hints as wishes from a producer, not hard commands. A creator can suggest a direction, while the model can mark the hint as followed, delayed, twisted, or ignored and explain its decision.&lt;/p&gt;

&lt;p&gt;This preserves two important things: human intent and agent judgment.&lt;/p&gt;

&lt;p&gt;It also creates a more interesting product interaction. The creator is not clicking buttons to control every plot point. They are watching a system with its own logic respond to a suggestion. The hint becomes part of long-term state and can have consequences later.&lt;/p&gt;

&lt;p&gt;For other agent products, this suggests a useful pattern: model human input as a preference, constraint, or hypothesis instead of treating every message as the highest-priority command.&lt;/p&gt;

&lt;p&gt;An agent with a real point of view must be able to say, “Not yet.”&lt;/p&gt;

</description>
      <category>humanintheloop</category>
      <category>agents</category>
      <category>productthinking</category>
      <category>llm</category>
    </item>
    <item>
      <title>An offline cron can be a strong product decision</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Tue, 22 Sep 2026 00:54:17 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/an-offline-cron-can-be-a-strong-product-decision-3pa8</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/an-offline-cron-can-be-a-strong-product-decision-3pa8</guid>
      <description>&lt;p&gt;Not every AI product needs to generate something in real time.&lt;/p&gt;

&lt;p&gt;Cogweald advances each world once per day instead of generating the next chapter when a reader opens the page. That choice improves three things at once: user experience, cost control, and content consistency.&lt;/p&gt;

&lt;p&gt;Readers know that new content arrives on a predictable cadence instead of seeing different versions generated on demand. The system can run during off-peak hours. A model failure does not block the reading experience.&lt;/p&gt;

&lt;p&gt;More importantly, asynchronous generation makes “the world keeps running while you are away” part of the product experience. The user is not operating a tool; they are checking in on a system with its own rhythm.&lt;/p&gt;

&lt;p&gt;Teams often treat real-time as the default answer. For some AI workflows, latency is not a flaw. It is part of the pacing, reliability model, and cost model.&lt;/p&gt;

&lt;p&gt;Does the feature you are building really need to be real time?&lt;/p&gt;

</description>
      <category>asyncjobs</category>
      <category>productdesign</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>One world, one LLM call</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Mon, 21 Sep 2026 01:49:57 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/one-world-one-llm-call-46o4</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/one-world-one-llm-call-46o4</guid>
      <description>&lt;p&gt;AI product costs often become unpredictable not because the model is too expensive, but because the architecture calls the model too many times for the same operation.&lt;/p&gt;

&lt;p&gt;Cogweald intentionally keeps chapter generation to one LLM call per world. That call produces the content, summary, time span, character updates, thread updates, and long-term facts together.&lt;/p&gt;

&lt;p&gt;This is not about cramming everything into one prompt. It starts with designing an output contract so one reasoning result can become one complete domain event.&lt;/p&gt;

&lt;p&gt;The benefits are straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Costs are easier to estimate.&lt;/li&gt;
&lt;li&gt;Each chapter has one source of truth for its decisions.&lt;/li&gt;
&lt;li&gt;A summary model cannot contradict a content model.&lt;/li&gt;
&lt;li&gt;Retry semantics are easier to reason about.&lt;/li&gt;
&lt;li&gt;Token usage is easier to observe.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Single-call is not always the right answer. Workflows that need multiple validation stages or tool interactions may need multiple calls. Before splitting, ask whether those calls truly need different reasoning boundaries.&lt;/p&gt;

</description>
      <category>costoptimization</category>
      <category>llm</category>
      <category>systemarchitecture</category>
      <category>ai</category>
    </item>
    <item>
      <title>A cron job is not just “ask the model to run”</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Sun, 20 Sep 2026 06:53:35 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/a-cron-job-is-not-just-ask-the-model-to-run-3k9f</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/a-cron-job-is-not-just-ask-the-model-to-run-3k9f</guid>
      <description>&lt;p&gt;When an AI job runs once a day, it is easy to underestimate the distributed-systems problems hiding underneath.&lt;/p&gt;

&lt;p&gt;What if the scheduler retries? What if two workers claim the same world? What if the model succeeds but the database connection drops before the chapter is stored?&lt;/p&gt;

&lt;p&gt;Cogweald treats daily advancement as a claim-based transaction flow. A world’s &lt;code&gt;last_tick_at&lt;/code&gt; acts as both the schedule marker and the claim token. A worker must successfully claim the tick before it is allowed to generate a chapter.&lt;/p&gt;

&lt;p&gt;That small design prevents one of the most dangerous failure modes: cron jitter producing two chapters for the same world on the same day.&lt;/p&gt;

&lt;p&gt;Reliability in AI systems often comes less from a better prompt and more from ordinary-looking conditional database updates.&lt;/p&gt;

&lt;p&gt;Once an agent can change the world on its own, design its state transitions with the same care you would use for a payment flow.&lt;/p&gt;

</description>
      <category>distributedsystems</category>
      <category>cronjobs</category>
      <category>requestforpost</category>
      <category>supabase</category>
    </item>
    <item>
      <title>Autonomous agents need guardrails, not line-by-line scripts</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Fri, 18 Sep 2026 00:10:25 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/autonomous-agents-need-guardrails-not-line-by-line-scripts-4g1c</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/autonomous-agents-need-guardrails-not-line-by-line-scripts-4g1c</guid>
      <description>&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%2Fnzr8duvgcm8k4cyrmend.jpg" 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%2Fnzr8duvgcm8k4cyrmend.jpg" alt=" " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Autonomous does not mean uncontrollable.&lt;/p&gt;

&lt;p&gt;Cogweald’s model can decide what happens next in a world. It cannot change the database schema, bypass authorization, arbitrarily rewrite published content, or turn unvalidated text directly into system state.&lt;/p&gt;

&lt;p&gt;The guardrails live outside the model:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Output must match a structured schema.&lt;/li&gt;
&lt;li&gt;World state can only change through the server-side persistence layer.&lt;/li&gt;
&lt;li&gt;Character and thread transitions must follow defined rules.&lt;/li&gt;
&lt;li&gt;A failed generation must not commit half of a world update.&lt;/li&gt;
&lt;li&gt;Every tick has a claim guard to prevent duplicate execution.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The model gets creative freedom. The system owns consistency.&lt;/p&gt;

&lt;p&gt;This is one of my favorite agent design principles: do not describe every rule in a prompt. If code can guarantee something reliably, let code guarantee it. Give the model the decisions that actually require semantic judgment.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>systemdesign</category>
      <category>devops</category>
    </item>
    <item>
      <title>A plot thread is really a state machine</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Wed, 16 Sep 2026 23:57:41 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/a-plot-thread-is-really-a-state-machine-a4m</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/a-plot-thread-is-really-a-state-machine-a4m</guid>
      <description>&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%2F2oklhmadw6vcrpsr85o7.jpg" 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%2F2oklhmadw6vcrpsr85o7.jpg" alt=" " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“Let the AI advance the story” sounds exciting, but without a state model, every chapter quickly starts inventing the same problems again.&lt;/p&gt;

&lt;p&gt;Cogweald models long-running plot lines as story threads. Each thread has a title, description, status, and timestamps. Its status can be active, resolved, or abandoned.&lt;/p&gt;

&lt;p&gt;When a chapter is generated, the model does not only return prose. It also returns thread updates: which thread advanced, which one was resolved, and whether a new one should be opened. The application applies those decisions to the database and provides the updated state to the model next time.&lt;/p&gt;

&lt;p&gt;This turns continuity from a hope into an observable and verifiable state transition.&lt;/p&gt;

&lt;p&gt;The same pattern works for any agent that needs long-term planning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An unfinished refactor for a coding agent&lt;/li&gt;
&lt;li&gt;An unverified hypothesis for a research agent&lt;/li&gt;
&lt;li&gt;A customer risk for a success agent&lt;/li&gt;
&lt;li&gt;A quest line for a game agent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If an agent needs to remember what is still unfinished across multiple runs, it probably deserves a state machine.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>architecture</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
