<?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>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>
    <item>
      <title>Summaries drift. Facts should not.</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Tue, 15 Sep 2026 23:59:21 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/summaries-drift-facts-should-not-2f3e</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/summaries-drift-facts-should-not-2f3e</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%2Fzquaqd5460hwdmeemn6c.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%2Fzquaqd5460hwdmeemn6c.jpg" alt=" " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Summaries are useful for helping a model understand a long history quickly. But a summary is a compressed interpretation, not the original fact.&lt;/p&gt;

&lt;p&gt;After an event is summarized seven times, details can slowly change. A character’s motivation shifts. The order of events changes. A possibility becomes a certainty. This is the long-term agent version of the telephone game.&lt;/p&gt;

&lt;p&gt;Cogweald separates long-term memory into two layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chapter summaries preserve narrative flow.&lt;/li&gt;
&lt;li&gt;Story facts preserve important state that must remain consistent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Facts carry importance, creation chapter, and invalidation metadata. When the world changes, an old fact is explicitly invalidated instead of being silently overwritten.&lt;/p&gt;

&lt;p&gt;This pattern is useful far beyond stories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A support agent can store approved customer terms as facts.&lt;/li&gt;
&lt;li&gt;A coding agent can store the current migration strategy.&lt;/li&gt;
&lt;li&gt;A game agent can store the abilities a player has unlocked.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A summary tells an agent what happened. A fact tells it what it must not casually change.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>database</category>
      <category>designpatterns</category>
    </item>
    <item>
      <title>A context window is a workbench, not a memory</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Tue, 15 Sep 2026 00:14:48 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/a-context-window-is-a-workbench-not-a-memory-2pl8</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/a-context-window-is-a-workbench-not-a-memory-2pl8</guid>
      <description>&lt;p&gt;Putting the last few conversations into a prompt does not give an AI long-term memory.&lt;/p&gt;

&lt;p&gt;It is closer to dumping every file on a desk and hoping the model finds the important pages. That can work for a short demo. Over time, tokens become expensive, context becomes noisy, and critical information gets buried.&lt;/p&gt;

&lt;p&gt;Cogweald separates its story bible into memories with different lifetimes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Current character state&lt;/li&gt;
&lt;li&gt;Active plot threads&lt;/li&gt;
&lt;li&gt;Recently closed threads&lt;/li&gt;
&lt;li&gt;Long-term facts&lt;/li&gt;
&lt;li&gt;Summaries of the latest chapters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each category has a different purpose and context window. Recent summaries provide local continuity. Facts preserve information that must not drift. Threads show the model what is still unfinished.&lt;/p&gt;

&lt;p&gt;Context engineering is not about putting more information into the prompt. It is about putting the right information there at the right time.&lt;/p&gt;

&lt;p&gt;If your agent must read the entire database before every decision, the problem may not be the model. Your memory model may need a better design.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.cogweald.com" rel="noopener noreferrer"&gt;https://www.cogweald.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>contextengineering</category>
      <category>aiengineering</category>
      <category>memory</category>
      <category>llm</category>
    </item>
    <item>
      <title>Let the LLM be the author, not a scripted text formatter</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Sun, 13 Sep 2026 23:58:51 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/let-the-llm-be-the-author-not-a-scripted-text-formatter-1cfi</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/let-the-llm-be-the-author-not-a-scripted-text-formatter-1cfi</guid>
      <description>&lt;p&gt;If every decision is hard-coded, the LLM is just an expensive text formatter.&lt;/p&gt;

&lt;p&gt;Cogweald draws a clear boundary: code owns the constraints, while the model owns creative decisions.&lt;/p&gt;

&lt;p&gt;The application guarantees the output schema, database constraints, world state, and permissions. The model decides which character steps forward, which thread advances, and how much story time passes based on the current state of the world.&lt;/p&gt;

&lt;p&gt;That is very different from letting the model output anything it wants. Freedom does not mean having no rules. It means preserving room for judgment inside well-defined boundaries.&lt;/p&gt;

&lt;p&gt;Our model returns a headline, content, summary, time span, thread updates, character updates, and facts. These fields do not exist to force creativity into a spreadsheet. They make unpredictable creative decisions possible to persist reliably.&lt;/p&gt;

&lt;p&gt;Good agent architecture does not hard-code every decision or hand every decision to the model. It draws the right line between the two.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>agents</category>
      <category>structuredoutput</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Treating “one day” as a system primitive</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Sun, 13 Sep 2026 02:46:48 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/treating-one-day-as-a-system-primitive-1eba</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/treating-one-day-as-a-system-primitive-1eba</guid>
      <description>&lt;p&gt;For most AI apps, the unit of time is a request.&lt;/p&gt;

&lt;p&gt;A user sends a message, the model responds, and the workflow ends. Cogweald is designed around a different primitive: one real day.&lt;/p&gt;

&lt;p&gt;Each world can advance by at most one chapter per day. That sounds like a product rule, but it is also an important systems abstraction. It gives state changes a rhythm, makes costs predictable, and gives readers a reason to return at a known cadence.&lt;/p&gt;

&lt;p&gt;It also creates a real engineering question: what happens when the cron job fires twice? How do we prevent one day from advancing twice? We use a database-level tick claim, turning the time window into a state transition that can be claimed and verified.&lt;/p&gt;

&lt;p&gt;Time is not just a date label in the UI. Once it affects permissions, cost, scheduling, and consistency, it becomes a core product primitive.&lt;/p&gt;

&lt;p&gt;What concept in your product is currently treated as a string, but should really be modeled as system state?&lt;/p&gt;

</description>
      <category>backend</category>
      <category>distributedsystems</category>
      <category>productengineering</category>
    </item>
    <item>
      <title>Most AI products forget. Cogweald is designed to remember.</title>
      <dc:creator>Cogweald</dc:creator>
      <pubDate>Sat, 12 Sep 2026 04:23:58 +0000</pubDate>
      <link>https://dev.to/jones_chen_592558a62a5c44/most-ai-products-forget-cogweald-is-designed-to-remember-383d</link>
      <guid>https://dev.to/jones_chen_592558a62a5c44/most-ai-products-forget-cogweald-is-designed-to-remember-383d</guid>
      <description>&lt;p&gt;Many AI demos feel intelligent until you ask the same question the next day.&lt;/p&gt;

&lt;p&gt;The problem is often not the model. The product simply has no durable world state. The conversation ends, the memory ends with it, and the next request starts from a blank page.&lt;/p&gt;

&lt;p&gt;Cogweald takes a different approach: put AI inside a world that keeps running. Characters have state. Events leave consequences. Unresolved threads remain active. What happened yesterday constrains what can happen today.&lt;/p&gt;

&lt;p&gt;This is more than adding a &lt;code&gt;memory&lt;/code&gt; table. The hard questions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which information deserves to survive?&lt;/li&gt;
&lt;li&gt;Which information is no longer valid?&lt;/li&gt;
&lt;li&gt;How do we show the model the right context before its next decision?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We are not trying to build another chat window. We are exploring what an AI system looks like when it can accumulate history.&lt;/p&gt;

&lt;p&gt;What should your AI product never forget?&lt;/p&gt;

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