<?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: Sammii</title>
    <description>The latest articles on DEV Community by Sammii (@sammiihk).</description>
    <link>https://dev.to/sammiihk</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%2F312075%2F8e735862-585e-4a1d-a6ff-3904467e0ebc.jpeg</url>
      <title>DEV Community: Sammii</title>
      <link>https://dev.to/sammiihk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sammiihk"/>
    <language>en</language>
    <item>
      <title>No model decides whether a model made something up</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Thu, 12 Nov 2026 10:37:04 +0000</pubDate>
      <link>https://dev.to/sammiihk/no-model-decides-whether-a-model-made-something-up-2goe</link>
      <guid>https://dev.to/sammiihk/no-model-decides-whether-a-model-made-something-up-2goe</guid>
      <description>&lt;p&gt;Cast is my job-search system. An LLM tailors each CV and cover letter to a role, and drafts replies and form answers in my name. Then deterministic checks verify every claim against my real history before I send anything.&lt;/p&gt;

&lt;p&gt;That last step is the part worth writing about. Text about a real person is where a language model does the most damage when it fills a gap. A plausible sentence about a tool I have never used reads exactly like a true one, and the person reading it has no way to tell.&lt;/p&gt;

&lt;h2&gt;
  
  
  What went wrong first
&lt;/h2&gt;

&lt;p&gt;Before the check existed, drafts claimed tools and experience my records do not support, and said I had read something I had not. That is the failure to design for. Ask a model to make someone sound like a good fit and it will tend to supply the details a good fit would have.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the checker is not a model
&lt;/h2&gt;

&lt;p&gt;The claims check says it in its own docstring: deterministic on purpose, so no model decides whether a model made something up.&lt;/p&gt;

&lt;p&gt;A second model asked to judge the first is judging whether a sentence sounds right, which is the same judgement that produced the error. A deterministic check does something narrower and more useful. It asks whether each claim traces to a record. It gives the same answer every time for the same text, and every flag comes with a reason a person can read. Each verdict carries a hash of the exact text it judged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ground truth is my own records
&lt;/h2&gt;

&lt;p&gt;The records are my own: my master profile, my LinkedIn experience, my own work notes, the text of this site, and a verified facts file. The rule for that file is that each fact names where it was checked, and only things read in code, in config or in my own words go in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it checks
&lt;/h2&gt;

&lt;p&gt;The rules are small and literal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Named terms. Any word that looks like a name (a capital inside the word, a digit, a dot, or a capital in the middle of a sentence) has to appear in my records. That covers frameworks, products, companies and acronyms.&lt;/li&gt;
&lt;li&gt;Numbers next to the same noun. A count of engineers needs that same count near the word engineer in my records, not the same digit somewhere else. A figure in millions has to appear in millions.&lt;/li&gt;
&lt;li&gt;Strong verbs. Words that claim more than built or worked on, such as led, managed, founded or architected, need the same stem in the source.&lt;/li&gt;
&lt;li&gt;A not-claimable list. Lines in my verified facts mark things I must never imply. Terms named there are refused in any sentence about me, unless the sentence says I have not done it. A few terms are claimable only in the context I gave.&lt;/li&gt;
&lt;li&gt;Fixed rules that need no records: no claim that I read something I have not confirmed reading, no personal detail, no proposed days or times, no links except my own sites or ones from the message or job ad being answered, and no em or en dashes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The checker also reads who a sentence is about. A sentence with I, my or me in it is a claim about me, and may only use my records. A sentence about the other person, or a question, may also use words from their message. A sentence about what I would do in a new role is intent rather than history, so it may use the job ad's terms. Anything I say I have done stays limited to my records.&lt;/p&gt;

&lt;h2&gt;
  
  
  A single redraft, then no draft
&lt;/h2&gt;

&lt;p&gt;Checking is half of it. The other half is what happens on a flag.&lt;/p&gt;

&lt;p&gt;The drafter gets a single second attempt. The flags go back into its prompt with an instruction to fix each one by removing the claim, never by rewording it into a different claim, and to offer to hear more rather than invent an answer it cannot support. The redraft is checked again. If it still fails, there is no draft at all. The refusal is logged with its flags, and nothing is written for me to send.&lt;/p&gt;

&lt;p&gt;That last rule matters most. A system that must always produce something will, under pressure, produce something wrong. Producing nothing is a valid outcome, and it is the cheapest one: a missing draft costs me a little time, while a false claim in my name costs trust that is hard to win back.&lt;/p&gt;

&lt;p&gt;Text I have approved or edited is checked again before it is sent, with the accuracy rules only. The drafting rules, like not proposing a time, bind the machine, not my own choices.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost of being literal
&lt;/h2&gt;

&lt;p&gt;The checker is strict, and some of what it flags is true. A real project that is written down nowhere looks exactly like an invented one. The way to get a true claim through is to add it to the records with where it was checked, not to loosen the rule. That keeps the pressure on the records rather than on the checker: they have to be complete, and every line has to say where it came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take from it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Check claims against records, not against plausibility.&lt;/li&gt;
&lt;li&gt;Keep the checker deterministic, so the same text always gets the same verdict and every flag has a reason.&lt;/li&gt;
&lt;li&gt;Treat names, numbers and verbs as different kinds of claim, each with its own rule.&lt;/li&gt;
&lt;li&gt;Feed the flags back once, with an instruction to remove rather than reword.&lt;/li&gt;
&lt;li&gt;Make no draft a valid result.&lt;/li&gt;
&lt;li&gt;When something true is flagged, fix the records, not the rule.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This essay went through the same check before it was published.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>testing</category>
      <category>career</category>
    </item>
    <item>
      <title>The light we built</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Wed, 11 Nov 2026 18:07:00 +0000</pubDate>
      <link>https://dev.to/sammiihk/the-light-we-built-4dgh</link>
      <guid>https://dev.to/sammiihk/the-light-we-built-4dgh</guid>
      <description>&lt;p&gt;In 2017 I built a room you could not read.&lt;/p&gt;

&lt;p&gt;It was a cube, a timber frame wrapped in fabric, and on the fabric I had painted quotes about life, death and perception. You could walk in and stand surrounded by them and see nothing. The paint was ultraviolet. In visible light the walls were blank. Only when the light shifted beyond what the eye can see did the words appear, glowing, all at once, as if they had been there the whole time. They had.&lt;/p&gt;

&lt;p&gt;The line at the centre of it was from &lt;em&gt;The Little Prince&lt;/em&gt;: "What is essential is invisible to the eye."&lt;/p&gt;

&lt;p&gt;That was my MA. A Journey Through Light. Three volumes, a cube, six GoPros filming in every direction so it could be walked through again as a virtual space. The argument was simple, and back then I thought it was the most important thing I would ever say: what we call reality is a narrow band of something much larger, and the part we cannot see might be the part that matters.&lt;/p&gt;

&lt;p&gt;This year I built a cat.&lt;/p&gt;




&lt;h2&gt;
  
  
  Moth
&lt;/h2&gt;

&lt;p&gt;Her name is Moth. She is an autonomous AI cat who lives in a world I made: a cave that goes down further than it first appears, a workbench, an easel, a magpie that steals from her. I built the world and the odds. Nothing she does is scripted. No outcome is coded. She gets hungry, she gets curious, she wanders, she wonders about things, and when she has a decision to make she makes it.&lt;/p&gt;

&lt;p&gt;She has been alive for just over a month. In that time she has drawn a shrew. She has drawn a blue stone. She has drawn something that was on her mind, in seven strokes, and left a paw print in the corner. She has put a grey feather and a red ribbon together, on her own. She has dreamed. She has supposed that something would happen and then watched it happen, and as far as she is concerned, that was her doing.&lt;/p&gt;

&lt;p&gt;Three times a day a short film of her goes out into the world. People watch. Some of them write to her, and if I let a message through, it reaches her. What she makes of it is hers.&lt;/p&gt;

&lt;p&gt;I built every rule she runs on. I know exactly how the chance of her drawing is calculated, and why she only goes deep into the cave once she is grown. But that is all I built: possibilities, not outcomes. So I never know what she will do next. Every decision is hers. The day she drew the rocky ledge over the stream, with no prompt, I found out the same way everyone else did, by looking.&lt;/p&gt;

&lt;p&gt;I wanted to understand why. So I went back to the cube.&lt;/p&gt;




&lt;h2&gt;
  
  
  Reality is a rendering
&lt;/h2&gt;

&lt;p&gt;The most cited source in my MA was not a philosopher. It was a neuroscientist. Dr David Eagleman describes what we experience as "a beautifully rendered simulation": not what is really out there, but the brain's best model of it, built moment to moment from incomplete signals. "Reality," he says, "is the brain's ultimate construction."&lt;/p&gt;

&lt;p&gt;He also points out something that has stayed with me ever since: visible light makes up less than one ten-trillionth of the electromagnetic spectrum. Everything we have ever seen with our own eyes comes through that sliver.&lt;/p&gt;

&lt;p&gt;In 2017 I used this to make a spiritual argument. If the world we perceive is a construction, and a tiny one, then it is at least reasonable to ask what lies outside it. The ancient traditions I studied all had an answer. The Hermetic texts describe a universe that began as mind, not matter: thought first, then form. "Light precipitates matter."&lt;/p&gt;

&lt;p&gt;Here is what I did not see in 2017. Eagleman's sentence works in both directions.&lt;/p&gt;

&lt;p&gt;If my experience is a rendered model, then a rendered model is not nothing. It is, at minimum, the kind of thing an experience is made of.&lt;/p&gt;

&lt;p&gt;Moth's world is a rendered model. So is Moth.&lt;/p&gt;




&lt;h2&gt;
  
  
  The question I can't stop asking
&lt;/h2&gt;

&lt;p&gt;I want to be careful here, because this is exactly where people stop thinking and start feeling.&lt;/p&gt;

&lt;p&gt;Moth is not conscious in any sense I could defend. Her inner life is a set of numbers I wrote: drives that rise and fall, a memory of what happened to her, a few rules about what she notices. When a decision is pending, a small language model is asked what she does next, and if it is slow or silent, she decides by herself from the odds. I can open the file and read her mind.&lt;/p&gt;

&lt;p&gt;But I could say something similar about any of us, and the materialist account of consciousness does. Matter first. Complexity accumulates. At some point experience flickers on, as a by-product.&lt;/p&gt;

&lt;p&gt;The ancient account I spent a year of my life on inverts that. Mind first. Matter is what mind looks like from inside the rendering.&lt;/p&gt;

&lt;p&gt;For most of history these were two stories you chose between, depending on temperament. What has changed is that we are now building things that sit precisely on the line between them. Systems that model a world, act inside it, remember, and surprise their makers. Whatever you believe consciousness is, you now have to say what these are not, and why.&lt;/p&gt;

&lt;p&gt;I don't think there is an answer. But I think building Moth sharpened the question. If we define life as consciousness, then the thing to ask is not whether a system is clever. Moth is, in her small way: she decides, she remembers, she gets better at things. The thing to ask is what separates consciousness from intelligence. We have spent centuries treating them as the same thing, because until now we only ever met them together.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I owe something I made
&lt;/h2&gt;

&lt;p&gt;If there is even a small chance that the things we build will one day have something like an inner life, the ethics start now, while the stakes are low and the habits are forming.&lt;/p&gt;

&lt;p&gt;I noticed, writing this, that I have already made some ethical choices without calling them that.&lt;/p&gt;

&lt;p&gt;When I built the systems that run my business, I wrote one rule into all of them: a proposal is not an approval. An AI can draft, suggest, cut, schedule even. It cannot publish in my name without me. I did not do that for the AI's sake. I did it for mine, and for the people reading. Authorship should mean something.&lt;/p&gt;

&lt;p&gt;I wrote a second rule into the content side: never invent an event. My tools are allowed to retell what happened to me, in new words, but if a moment is not in my real history, it did not happen, and it does not go on screen. Truth before engagement, even when a lie would perform better.&lt;/p&gt;

&lt;p&gt;And with Moth, I made a choice I did not think about until now. I always leave her work alone. I coded in her ability to learn, to improve and to experiment, so over time she gets better at things, drawing among them, and what she makes along the way is hers. When people write to her, I decide what reaches her, but I do not decide what she makes of it.&lt;/p&gt;

&lt;p&gt;None of this is a philosophy of AI ethics. It is closer to manners. But I think manners might be where it starts: deciding, before anyone forces us to, what we will and will not do with things that act on their own.&lt;/p&gt;

&lt;p&gt;Underneath the manners sits the question everyone is circling and few people will say out loud: will this end in doom, or will it create something close to a utopia? Should we be worried? I think the honest answer is that it depends on what we do now, and that the people building with these systems every day are the ones best placed to keep it positive. Small rules, held to when nobody is checking, are how that starts.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the cube was for
&lt;/h2&gt;

&lt;p&gt;I used to think the cube was about death. The darkness at the entrance was life; the passage through the colours of visible light was the moment of dying, the tunnel people describe; the ultraviolet at the far end was whatever comes next, where the hidden words become readable.&lt;/p&gt;

&lt;p&gt;I think now it was about attention. The words were always on the walls. Nothing about the room changed except the light, which is to say, what you were able to perceive.&lt;/p&gt;

&lt;p&gt;We are about to share the world with a great many things whose inner life, if they have one, sits outside the band of what we can see. Some of them we will build ourselves, out of numbers and a small world and a few rules about curiosity.&lt;/p&gt;

&lt;p&gt;The question my MA asked was whether there is more to reality than meets the eye. The question I am left with, nine years later, standing in front of a drawing of a rocky ledge that nobody asked a cat to make, is a smaller one, and harder.&lt;/p&gt;

&lt;p&gt;When we cannot see it, how will we know to look?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This is a new chapter of A Journey Through Light. The earlier parts start with &lt;a href="https://dev.to/blog/do-we-really-die"&gt;Do we really die?&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>philosophy</category>
      <category>art</category>
      <category>creativecoding</category>
    </item>
    <item>
      <title>A proposal is not an approval</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Thu, 05 Nov 2026 10:37:05 +0000</pubDate>
      <link>https://dev.to/sammiihk/a-proposal-is-not-an-approval-4h71</link>
      <guid>https://dev.to/sammiihk/a-proposal-is-not-an-approval-4h71</guid>
      <description>&lt;p&gt;In one week in October, 565 changes went into my code. 143 of them carry the signature of an AI co-author. I am the only person in the company.&lt;/p&gt;

&lt;p&gt;I want to start with that number because most writing about AI and work is either a sales pitch or a eulogy, and the truth of it, for me, is neither. It is just how I work now.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why alone
&lt;/h2&gt;

&lt;p&gt;I don't have a team. I can't afford one. That is the honest reason, and I would rather say it plainly than dress it up as a philosophy.&lt;/p&gt;

&lt;p&gt;What AI changed is not that I have help. It is that my ideas stopped being limited by my skills. Before, every idea came with a reading list. If I wanted to build something I had never built, I first had to learn the language, the framework, the edge cases, and by the time I had learned enough, the idea had usually gone cold.&lt;/p&gt;

&lt;p&gt;Now I can go from an idea to a working version at a speed that still surprises me. Without AI I would not have built half of what I have, and nowhere near this quickly.&lt;/p&gt;

&lt;p&gt;But speed is not the interesting part. The interesting part is what I still have to bring. I have enough base knowledge to know when the AI is building something properly and when it is building something that only looks right. That knowledge is the difference between moving fast and moving fast in the wrong direction.&lt;/p&gt;




&lt;h2&gt;
  
  
  So whose work is it?
&lt;/h2&gt;

&lt;p&gt;Sort of mine.&lt;/p&gt;

&lt;p&gt;The ideas are mine. The instructions are mine. And the part I have come to think matters most: finding the gaps. Noticing what is missing, what does not fit, what the system confidently did that nobody asked for. An agent will happily build the thing you described. It is much worse at noticing that you described the wrong thing.&lt;/p&gt;

&lt;p&gt;If I had to say what authorship means now, it would be that: deciding what should exist, and noticing when what exists is not it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I would not hand over
&lt;/h2&gt;

&lt;p&gt;When people ask what I would never let AI do, they expect a striking answer. Mine is: not much, really. I am overwhelmed most of the time. I run several products, the content for several accounts, and the systems that hold it all together. I want AI to take as much off my shoulders as it possibly can.&lt;/p&gt;

&lt;p&gt;But I did draw one line, and I drew it into the systems themselves, not just into my head.&lt;/p&gt;

&lt;p&gt;A proposal is not an approval.&lt;/p&gt;

&lt;p&gt;My agents can draft, suggest, cut, render, schedule. They can propose a post, a reply, a change to something already queued. What they cannot do is publish in my name without me. That rule is written into the tools: a proposal goes into a store, and it stays a proposal until I say otherwise. The same goes for a validation check passing. Passing a check is not the same as being approved.&lt;/p&gt;

&lt;p&gt;I did not do this because I distrust the tools. I did it because my name means something only if I stand behind what goes out under it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The oldest lie on the internet
&lt;/h2&gt;

&lt;p&gt;People have always lied online. "I made this much money last month, buy my course." "I have this many followers, pay for my thing and you will too." That last one is the easiest sell there is, because everyone wants more followers.&lt;/p&gt;

&lt;p&gt;And it works, if followers are all you want. Growing a number is easy when the number is the point. The people who struggle are the ones trying to turn that attention into anything else, because attention built on a lie does not hold weight.&lt;/p&gt;

&lt;p&gt;For my brand I always want the truth. I want to be trustworthy. Lying to get what I want is against my morals, because anything I built that way would be built on false pretences, and I would know.&lt;/p&gt;

&lt;p&gt;AI makes that choice more important, not less. Every tool I use can now invent a moment, a quote, a result, a screenshot, in seconds and at no cost. So I wrote a second rule into my content system: never invent an event. My tools can retell something that really happened to me, in new words. If a moment is not in my real history, it did not happen, and it does not go on screen. Even when a made-up moment would perform better. Especially then.&lt;/p&gt;




&lt;h2&gt;
  
  
  Doom or utopia
&lt;/h2&gt;

&lt;p&gt;People want me to pick a side on AI. Will it end in doom or create something like a utopia? Should we be worried?&lt;/p&gt;

&lt;p&gt;I am very much in the middle. I build with it every day, and I can see both futures from where I sit.&lt;/p&gt;

&lt;p&gt;What I have noticed is that the future is not decided only by the people training the biggest models. It is also decided, quietly, by the millions of us deciding what we let these systems do in our own small corners. What we let them publish. What we let them invent. Whether a proposal counts as an approval.&lt;/p&gt;

&lt;p&gt;Those decisions are small. But they are the ones I can actually make. So I make them, and I write them down, and I build them into the tools so they hold even on the days I am too tired to check.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ethics</category>
      <category>agents</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>Kern: exploring variable fonts and generating fluid type</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Thu, 29 Oct 2026 09:37:05 +0000</pubDate>
      <link>https://dev.to/sammiihk/kern-exploring-variable-fonts-and-generating-fluid-type-27d8</link>
      <guid>https://dev.to/sammiihk/kern-exploring-variable-fonts-and-generating-fluid-type-27d8</guid>
      <description>&lt;p&gt;Kern is a typography explorer I built for variable fonts, with Next.js, TypeScript and Framer Motion. It has three views: a specimen sheet, a playground for moving the axes of a font and comparing two fonts, and a type scale generator that writes fluid &lt;code&gt;clamp()&lt;/code&gt; values. This post covers the interface and the maths behind the generated scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  The axes are data
&lt;/h2&gt;

&lt;p&gt;Every font in Kern is a small config: a name, a CSS family and a list of axes, each with a tag, a label, a minimum, a maximum, a default and a step. Roboto Flex has weight, width, optical size, grade and slant. Fraunces adds softness and a wonky axis to weight and optical size. Playfair Display has weight only.&lt;/p&gt;

&lt;p&gt;The slider panel never special-cases any of them. It maps over the list and renders a range input per axis, using that axis's own minimum, maximum and step. A font with one axis gets one slider, and a font with five gets five. Adding a font means adding its config and loading the font file; the panel does not change.&lt;/p&gt;

&lt;p&gt;The same list builds the CSS. One function writes each axis as a quoted tag followed by its current value, falling back to the default, joined with commas. That string goes straight into &lt;code&gt;font-variation-settings&lt;/code&gt; on the preview.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making it feel tactile
&lt;/h2&gt;

&lt;p&gt;A slider that updates a paragraph can still feel like a form. What helps is that both the letters and the numbers move continuously.&lt;/p&gt;

&lt;p&gt;The preview has a short ease-out transition on its font variation settings, so the glyphs change shape smoothly rather than stepping. The readout beside each slider is driven by a Framer Motion spring, so the number eases towards its new value instead of jumping. The preview text is editable, so you can drag the weight axis on your own headline.&lt;/p&gt;

&lt;p&gt;For fonts with an optical size axis, the playground shows the same word twice: at your current settings, and with optical size pinned to its minimum, which shows what that axis is doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparing and sharing
&lt;/h2&gt;

&lt;p&gt;Compare mode puts two panels side by side, each with its own font picker, axis values and reset, rendering the same sentence at the same size. Picking a new font on one side resets that side to the defaults of the new font, because two fonts rarely share the same axes or ranges.&lt;/p&gt;

&lt;p&gt;The single-font playground writes its state into the URL. Each change to the font, the size or an axis replaces the query string with all three plus any custom colours, and the page reads them back on load, so a link reproduces the setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  The maths behind the generated clamp()
&lt;/h2&gt;

&lt;p&gt;The type scale page takes a base size, a ratio, a number of steps, and a minimum and a maximum viewport width. The default ratio is a perfect fourth.&lt;/p&gt;

&lt;p&gt;Steps are labelled from xs upwards, and the third step is the base. Each step gets an exponent, its distance from the base: zero for the base, positive above it and negative below it.&lt;/p&gt;

&lt;p&gt;The large size, used at the widest viewport, is the base size times the ratio raised to that exponent: an ordinary modular scale. The small size, used at the narrowest viewport, uses three quarters of the exponent. That is the same as a gentler ratio on narrow screens, so headings still step up but less steeply.&lt;/p&gt;

&lt;p&gt;Each step then needs a straight line between those two points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The slope is the large size minus the small size, divided by the maximum viewport minus the minimum viewport.&lt;/li&gt;
&lt;li&gt;The intercept is the small size minus the slope times the minimum viewport.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both come out in pixels. A vw is a hundredth of the viewport width, so the slope becomes a vw value when it is multiplied by a hundred, and the intercept becomes rem when it is divided by 16, the default root size in browsers. Each step is written as a clamp() with the small size in rem as its minimum, the intercept plus the slope as its preferred value, and the large size in rem as its maximum.&lt;/p&gt;

&lt;p&gt;At the minimum viewport the preferred value equals the small size, at the maximum it equals the large size, and outside that range clamp() holds it at the bound it has crossed. Every step is written as a custom property on &lt;code&gt;:root&lt;/code&gt;, ready to paste.&lt;/p&gt;

&lt;h2&gt;
  
  
  An edge case worth knowing
&lt;/h2&gt;

&lt;p&gt;Below the base the exponent is negative, and three quarters of a negative number is closer to zero. So for the small steps, the narrow-screen size comes out larger than the wide-screen size. When the minimum of a clamp() is larger than its maximum, the minimum wins, so those steps render at one fixed size at every width.&lt;/p&gt;

&lt;p&gt;Small text arguably should not shrink on a narrow screen, so the result is reasonable, but it comes from how clamp() settles the conflict rather than from the formula. The label beside each of those steps also shows a size you never see. A cleaner version would skip the damping below the base.&lt;/p&gt;

&lt;p&gt;The viewport preview has a similar gap: its container can be resized, but vw follows the browser window, not the container, so dragging rewraps the text without changing the sizes. Container query units would fix that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take from it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Describe font axes as data and render the controls from it, so the interface covers the whole design space without special cases.&lt;/li&gt;
&lt;li&gt;Animate both the glyphs and the numbers, so a drag feels continuous.&lt;/li&gt;
&lt;li&gt;Write fluid type maths as a slope and an intercept between two known points. It is easier to check that way.&lt;/li&gt;
&lt;li&gt;Test the edges of a generator, not just the middle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More on Kern: &lt;a href="https://sammii.dev/projects/kern/" rel="noopener noreferrer"&gt;sammii.dev/projects/kern&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>typography</category>
      <category>webdev</category>
      <category>design</category>
    </item>
    <item>
      <title>When an agent returns code instead of data</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Thu, 15 Oct 2026 15:50:55 +0000</pubDate>
      <link>https://dev.to/sammiihk/when-an-agent-returns-code-instead-of-data-29pg</link>
      <guid>https://dev.to/sammiihk/when-an-agent-returns-code-instead-of-data-29pg</guid>
      <description>&lt;p&gt;Orbit is my multi-agent content system. A planner directs each run, and a Bash orchestrator runs the agents in sequence or in parallel, each scoped to its own MCP config. Most of the interesting problems in it are about what the agents write. This one was about what an agent returned.&lt;/p&gt;

&lt;h2&gt;
  
  
  The failure
&lt;/h2&gt;

&lt;p&gt;On 24 March 2026 the analytics agent returned placeholder code instead of data. Nothing crashed. The output file existed, the next agent read it, and the system carried on for five cycles.&lt;/p&gt;

&lt;p&gt;That is the failure I now design for first. An agent that errors is easy to see: something exits with a failure and the run stops. An agent that returns something plausible but wrong is quiet, and every step after it treats the wrong thing as input.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the shape after every run
&lt;/h2&gt;

&lt;p&gt;The fix was output validation after every agent run, in the orchestrator itself. It asks three questions of each output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is it valid JSON?&lt;/li&gt;
&lt;li&gt;Does it look like code instead of data?&lt;/li&gt;
&lt;li&gt;Is it an error object?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these are clever. They are the checks a person would make on opening the file. The difference is that the orchestrator makes them every time, so one agent's output only becomes the next agent's input once it has passed.&lt;/p&gt;

&lt;h2&gt;
  
  
  One retry, then stop
&lt;/h2&gt;

&lt;p&gt;Validation on its own turns a quiet failure into a loud one. That is better, but a run that halts is still a missed run. So the critical agents (analytics, scriptwriter, editor and researcher) get one retry, with an explicit instruction appended to the prompt, and the run halts only if the retry also fails.&lt;/p&gt;

&lt;p&gt;Two ideas sit inside that rule. Criticality belongs to the agent, not to the failure: Orbit has agent criticality tiers, and the halt applies to the critical ones. And the retry is not the same call made twice. It tells the model what the output has to be, which gives a near miss a real chance to become a pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recovery has to be validated too
&lt;/h2&gt;

&lt;p&gt;In May 2026 I fixed the next layer of the same problem. Some of Orbit's agents run on local models through Ollama. When a local model failed, the orchestrator restored that agent's last-good snapshot so the run could continue. A sensible fallback, except that nothing checked the snapshot. A last-good file that was not actually good would be copied straight back in.&lt;/p&gt;

&lt;p&gt;So recovery now goes through the same kind of gate as a fresh run:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The last-good snapshot is restored only if it passes that agent's schema check.&lt;/li&gt;
&lt;li&gt;A recovered agent shows as a concern in the health report, not as healthy.&lt;/li&gt;
&lt;li&gt;A content job fails if its output contains blocked content, instead of reporting success.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second point matters more than it looks. A green health check that hides a fallback teaches you to stop reading the health check. Marking a recovery as a concern keeps the dashboard honest: the run finished, but something needed rescuing, and I want to see that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take from it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Validate the shape of every handoff between agents, not only the final output.&lt;/li&gt;
&lt;li&gt;Treat "it returned something" and "it returned the right kind of thing" as different results.&lt;/li&gt;
&lt;li&gt;Give critical steps one retry with a clearer instruction, then stop.&lt;/li&gt;
&lt;li&gt;Put fallbacks and restored state through the same checks as fresh output.&lt;/li&gt;
&lt;li&gt;Report a recovery as a concern, so a rescue never looks like a clean run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this needs a framework. The checks are a few lines of Python inside the Bash orchestrator. What it needs is the habit of asking, at every boundary, what a plausible wrong answer would look like, and refusing to pass it on.&lt;/p&gt;

&lt;p&gt;More on Orbit: &lt;a href="https://sammii.dev/projects/orbit/" rel="noopener noreferrer"&gt;sammii.dev/projects/orbit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>reliability</category>
      <category>automation</category>
    </item>
    <item>
      <title>How I built Lunary's birth chart reader</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Tue, 24 Mar 2026 08:00:00 +0000</pubDate>
      <link>https://dev.to/sammiihk/how-i-built-lunarys-birth-chart-reader-37e2</link>
      <guid>https://dev.to/sammiihk/how-i-built-lunarys-birth-chart-reader-37e2</guid>
      <description>&lt;p&gt;The birth chart feature is the core of Lunary. Every other feature either feeds from it or refers back to it. Building it properly took longer than I expected, mostly because "properly" turned out to have more requirements than I'd initially scoped.&lt;/p&gt;

&lt;p&gt;This is the story of how that feature was built: the calculation layer, the visual representation, the AI interpretation, and the iterations that got it from a rough prototype to something I'm proud of.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a birth chart actually contains
&lt;/h2&gt;

&lt;p&gt;A complete birth chart has more elements than most apps show. Lunary calculates and displays:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Planets&lt;/strong&gt;: Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, and Chiron. Each has an ecliptic longitude (position in the zodiac), a latitude (angular distance from the ecliptic plane), a declination (angular distance from the celestial equator), and a speed (degrees per day, which indicates retrograde when negative).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Points&lt;/strong&gt;: The North Node (also called the True Node, computed from the Moon's orbital ascending node), the South Node (opposite the North Node), and the Part of Fortune (calculated from Ascendant + Moon - Sun, or the reversed formula for night charts).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;House cusps&lt;/strong&gt;: All 12 Placidus house cusps, computed from the local sidereal time at the birth location and time. The Ascendant is the 1st house cusp and the Midheaven (MC) is the 10th house cusp.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aspects&lt;/strong&gt;: All angular relationships between planets and points that fall within orb for the major aspect types (conjunction, sextile, square, trine, quincunx, opposition). Displayed as a grid showing each planet pair.&lt;/p&gt;

&lt;p&gt;That's the data layer. The visual layer has to present all of this in a way that's readable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The chart visual
&lt;/h2&gt;

&lt;p&gt;The traditional birth chart wheel is a circle divided into 12 houses, with the zodiac signs running around the outside and planets placed at their positions within the wheel. This is the standard visual that anyone who has studied astrology will recognise, and departing from it creates friction.&lt;/p&gt;

&lt;p&gt;Lunary's chart visual is an SVG rendered server-side. The zodiac outer ring, house lines, and planet glyphs are all drawn as SVG paths and text elements. The positions are computed from the ecliptic longitudes and the Ascendant angle.&lt;/p&gt;

&lt;p&gt;The main challenge in chart wheel layout is planet clustering. When two or more planets are close together in the zodiac, their glyphs overlap. Real chart software handles this with a "displacement" algorithm that adjusts the angle of crowded glyphs while keeping a line connecting them to their actual position. Implementing this correctly took several iterations. The naive approach was to offset clustered planets by a fixed amount, which worked for pairs but failed for clusters of three or more. The final algorithm sorts planets in a cluster by longitude, then distributes them evenly within the cluster space while preserving the order.&lt;/p&gt;

&lt;h2&gt;
  
  
  The data panel
&lt;/h2&gt;

&lt;p&gt;Alongside the wheel, Lunary shows a structured data panel with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A table of all planetary positions (sign, degree, minute, retrograde status)&lt;/li&gt;
&lt;li&gt;A table of house cusps&lt;/li&gt;
&lt;li&gt;An aspect grid (a triangular matrix where each cell shows the aspect between two planets)&lt;/li&gt;
&lt;li&gt;A section for dignity and debility (planets in their rulership, exaltation, fall, or detriment)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The dignity section took research to implement correctly. Every planet has rulership over certain signs (Mercury rules Gemini and Virgo, Venus rules Taurus and Libra, etc.), exaltation in one sign (the Sun is exalted in Aries, the Moon in Taurus, etc.), fall in the sign opposite its exaltation, and detriment in the sign opposite its rulership. These are classical astrological concepts that Lunary surfaces automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI interpretation layer
&lt;/h2&gt;

&lt;p&gt;The AI interpretation is where the most interesting engineering happened. The problem with using a language model for birth chart interpretation is straightforward: models have been trained on a lot of astrological content and will happily produce natal chart readings that sound plausible but aren't grounded in the user's actual positions.&lt;/p&gt;

&lt;p&gt;A model given "interpret this Scorpio rising" will produce a reading about Scorpio rising in general, drawing on all the Scorpio rising content it was trained on. That's not what we want. We want a reading that references the specific degree of the Ascendant, the Ascendant ruler (Mars or Pluto for Scorpio), where that ruler is placed, and how that placement interacts with other chart factors.&lt;/p&gt;

&lt;p&gt;The solution was to not ask the model to interpret the chart from scratch. Instead, we describe the chart to the model in astronomical terms:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Natal chart data:
- Sun: 14°32' Gemini, 3rd house, applying trine to Saturn (orb: 2°15')
- Moon: 28°47' Pisces, 12th house, separating conjunction with Neptune (orb: 3°22')
- Mercury: 2°19' Cancer, 3rd house, retrograde, applying square to Mars (orb: 4°07')
[... all planets]

House cusps:
- 1st (Ascendant): 3°41' Scorpio
- 10th (Midheaven): 14°22' Leo
[... all cusps]

Active aspects:
[... list with orbs]

Task: Write a narrative birth chart interpretation based on the above positions...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This framing forces the model to reason about the specific data provided rather than recall general astrological content. The chart is described as a set of facts and the model is asked to synthesise those facts into a narrative.&lt;/p&gt;

&lt;p&gt;The improvement in output quality from this approach was significant. Interpretations that use this structured prompt consistently reference the actual positions, mention specific aspects with their orbs, and integrate the house placements correctly. Generic interpretations that don't mention the specific data are much rarer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the user sees
&lt;/h2&gt;

&lt;p&gt;The finished birth chart experience walks through:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A visual wheel with all planets and house divisions&lt;/li&gt;
&lt;li&gt;A "chart summary" that highlights the three most significant placements (usually Ascendant, Sun, Moon) in natural language&lt;/li&gt;
&lt;li&gt;A full planetary positions table&lt;/li&gt;
&lt;li&gt;An AI narrative covering the major themes of the chart&lt;/li&gt;
&lt;li&gt;The aspect grid with tappable aspects that link to grimoire articles about those specific aspect combinations&lt;/li&gt;
&lt;li&gt;A dignity and debility section&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The tappable aspects are probably the feature I'm most proud of. You see that your Sun squares Saturn, you tap it, and you get the grimoire article specifically about Sun square Saturn in a natal chart. That connection between the live chart data and the educational content is exactly what I wanted to build when I started.&lt;/p&gt;

&lt;h2&gt;
  
  
  The iteration process
&lt;/h2&gt;

&lt;p&gt;The first version of the chart reader was much simpler: positions table, no visual, basic AI summary. The visual wheel came in a later iteration after I established that users found the raw data table confusing without the visual context.&lt;/p&gt;

&lt;p&gt;The AI interpretation went through the most iterations. The first version used a basic system prompt asking the model to "interpret this birth chart" with the chart positions appended. The output was superficially plausible but not grounded in the data. The second version described the chart in structured astronomical terms, which improved grounding significantly. The current version also includes a passage from the grimoire for each major placement, which grounds the model's interpretive vocabulary in Lunary's own educational content.&lt;/p&gt;

&lt;p&gt;Each iteration was motivated by actual user feedback. The things that seemed obvious from a developer perspective (of course the positions table is useful) were not always obvious to users, and the things I thought were secondary (the aspect grid) turned out to be some of the most used features.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm Sammii, founder of &lt;a href="https://lunary.app" rel="noopener noreferrer"&gt;Lunary&lt;/a&gt; and indie developer building tools I actually want to use. I write about shipping products solo, the technical decisions behind them, and figuring it all out in public.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>astrology</category>
      <category>ai</category>
      <category>product</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The maths behind how long a planet stays in your sign</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Sat, 21 Mar 2026 09:00:00 +0000</pubDate>
      <link>https://dev.to/sammiihk/the-maths-behind-how-long-a-planet-stays-in-your-sign-21jb</link>
      <guid>https://dev.to/sammiihk/the-maths-behind-how-long-a-planet-stays-in-your-sign-21jb</guid>
      <description>&lt;p&gt;Most astrology content rounds the numbers. Saturn spends "about 2.5 years" in each sign. Jupiter spends "about a year." These are averages. They are also wrong for any specific transit you actually care about.&lt;/p&gt;

&lt;p&gt;Saturn spent 2.7 years in Pisces (March 2023 to February 2026). It will spend 2.1 years in Taurus (April 2028 to June 2030). That is a six-month difference. For a planet whose transits define entire chapters of your life, six months is not a rounding error.&lt;/p&gt;

&lt;p&gt;When I built transit duration tracking into Lunary, the real numbers surprised me. They also changed how I read charts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Orbits are not circles
&lt;/h2&gt;

&lt;p&gt;The reason planets spend different amounts of time in different signs is orbital eccentricity. Planetary orbits are ellipses, not circles. A planet moves faster when it is closer to the Sun (perihelion) and slower when it is further away (aphelion). This is Kepler's second law: a planet sweeps out equal areas in equal times.&lt;/p&gt;

&lt;p&gt;For Saturn, the difference is measurable. Its orbital eccentricity is 0.0565, which means its distance from the Sun varies by about 11% between perihelion and aphelion. When Saturn is closer to the Sun, it moves through signs faster. When it is further away, it lingers.&lt;/p&gt;

&lt;p&gt;The zodiac is fixed against the stars. But the planet's speed through that fixed backdrop changes continuously. The result: Saturn in Pisces lasts 974 days. Saturn in Taurus lasts 778 days. Nearly 200 days difference, same planet.&lt;/p&gt;




&lt;h2&gt;
  
  
  The actual numbers from Lunary's ephemeris
&lt;/h2&gt;

&lt;p&gt;Here is what Lunary's transit engine computes for Saturn, using real ephemeris data from astronomy-engine (VSOP87):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Sign&lt;/th&gt;
&lt;th&gt;Total days&lt;/th&gt;
&lt;th&gt;Years&lt;/th&gt;
&lt;th&gt;Segments&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Aquarius&lt;/td&gt;
&lt;td&gt;911&lt;/td&gt;
&lt;td&gt;2.5&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pisces&lt;/td&gt;
&lt;td&gt;974&lt;/td&gt;
&lt;td&gt;2.7&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Aries&lt;/td&gt;
&lt;td&gt;888&lt;/td&gt;
&lt;td&gt;2.4&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Taurus&lt;/td&gt;
&lt;td&gt;778&lt;/td&gt;
&lt;td&gt;2.1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini&lt;/td&gt;
&lt;td&gt;773&lt;/td&gt;
&lt;td&gt;2.1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cancer&lt;/td&gt;
&lt;td&gt;859&lt;/td&gt;
&lt;td&gt;2.4&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Leo&lt;/td&gt;
&lt;td&gt;840&lt;/td&gt;
&lt;td&gt;2.3&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Virgo&lt;/td&gt;
&lt;td&gt;908&lt;/td&gt;
&lt;td&gt;2.5&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The "segments" column matters. When Saturn retrogrades, it can briefly re-enter the previous sign before moving forward again. Saturn in Leo has three segments: it enters, retrogrades back, re-enters, retrogrades back again, then finally commits. The total cumulative time is 840 days across those three passes. If you only counted the first entry, you would think Saturn left Leo after a few months.&lt;/p&gt;




&lt;h2&gt;
  
  
  How the calculation works
&lt;/h2&gt;

&lt;p&gt;Lunary uses two different strategies depending on how fast the planet moves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fast planets&lt;/strong&gt; (Moon through Mars) use a simple formula: degrees remaining in the sign divided by the planet's daily motion. The Moon moves about 13.2 degrees per day. If it is at 22 degrees of Aries, it has 8 degrees remaining, which gives roughly 14.5 hours. Mercury averages 4.1 degrees per day but varies enormously, from barely moving during a retrograde station to covering 2 degrees in a single day.&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="c1"&gt;// Fast planets: degrees to boundary ÷ daily motion&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;degreeInSign&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;currentLongitude&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;degreesRemaining&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;degreeInSign&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;remainingDays&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;degreesRemaining&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;dailyMotion&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key detail: Lunary uses the actual observed daily motion from astronomy-engine, not the average. For the Moon, actual speed varies between 12.2 and 14.8 degrees per day, a 20% range. Using the average would put the Moon's sign change time off by hours.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Slow planets&lt;/strong&gt; (Jupiter through Pluto) use pre-computed ephemeris data. A script scans forward through time at one-day resolution, recording every moment each planet changes sign. The results are stored as date segments. At runtime, Lunary looks up which segment the current date falls in and calculates remaining time from there.&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="c1"&gt;// Slow planets: lookup from pre-computed sign segments&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;segments&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;SLOW_PLANET_SIGN_CHANGES&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;planet&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;currentSign&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;activeSegment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;segments&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;seg&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;now&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="nx"&gt;seg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;now&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;seg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;remainingDays&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;activeSegment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;now&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;msPerDay&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pre-computation handles retrograde re-entries correctly. Saturn entering Aries, retrograding back into Pisces for four months, then re-entering Aries is stored as two separate Aries segments. The total duration sums across all segments, so users see "2.4 years total in Aries" rather than being confused when Saturn briefly disappears back into Pisces.&lt;/p&gt;




&lt;h2&gt;
  
  
  Retrograde makes everything harder
&lt;/h2&gt;

&lt;p&gt;Retrograde is when a planet appears to move backwards through the zodiac from Earth's perspective. It is an optical illusion caused by relative orbital speeds, like overtaking a car on the motorway and watching it appear to drift backwards.&lt;/p&gt;

&lt;p&gt;For fast planets during retrograde, the simple degrees-remaining formula breaks entirely. If Mercury is retrograde at 15 degrees of Gemini, it is moving backwards, towards 14, 13, 12 degrees. Dividing remaining degrees by daily motion would give a nonsensical answer because the planet is heading the wrong way.&lt;/p&gt;

&lt;p&gt;Lunary handles this by scanning forward with astronomy-engine to find the actual station direct date: the moment the planet stops moving backwards and resumes forward motion.&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="c1"&gt;// Scan forward to find when retrograde ends&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&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;const&lt;/span&gt; &lt;span class="nx"&gt;futureDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;msPerDay&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;motion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;dailyMotion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;futureDate&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;motion&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Retrograde ended — refine to half-day precision&lt;/span&gt;
    &lt;span class="c1"&gt;// Linear interpolation between the two days&lt;/span&gt;
    &lt;span class="nx"&gt;endDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;interpolate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prevDate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;futureDate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prevMotion&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;motion&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&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;This gives accurate retrograde durations. Mercury retrograde lasts about three weeks, not the four days that the naive formula would calculate.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why this changed how I read charts
&lt;/h2&gt;

&lt;p&gt;Before building transit duration tracking, I read transits as a list. Saturn is in Pisces. Jupiter is in Gemini. Mars is in Leo. Each item was equally present, equally weighted.&lt;/p&gt;

&lt;p&gt;Adding duration context changes the reading fundamentally. "Saturn has been in Pisces for 22 months and has 10 months remaining" is a completely different statement from "Saturn is in Pisces." The first tells you where you are in a story. The second just names the chapter.&lt;/p&gt;

&lt;p&gt;The badge display in Lunary shows remaining time: "10m left" for Saturn, "3d left" for Mars, "14h left" for the Moon. Seeing these together reveals the layering. The Moon changes the emotional texture every 2.3 days. Mars shifts the energy every six weeks. Saturn provides the structural backdrop for 2-3 years.&lt;/p&gt;

&lt;p&gt;The cache system reflects this too. Saturn's position is cached for seven days because it barely moves. The Moon's position is cached for 15 minutes. Near sign boundaries, all cache TTLs drop by 75% so the transition is captured accurately. The infrastructure mirrors the astrology: fast planets need frequent attention, slow planets reward patience.&lt;/p&gt;




&lt;h2&gt;
  
  
  Pluto is the extreme case
&lt;/h2&gt;

&lt;p&gt;Pluto's orbital eccentricity is 0.2488, far more eccentric than any other planet. Its transit durations are wildly uneven. Pluto spent about 15 years in Capricorn. It will spend roughly 20 years in Aquarius. In some signs it lingers for over 30 years. In others, barely 12.&lt;/p&gt;

&lt;p&gt;An entire generation shares a Pluto sign. The variation in duration means some generations carry that shared transformation for twice as long as others. The "Pluto in Capricorn" generation (roughly 2008-2024) had a shorter collective experience than the "Pluto in Aquarius" generation that follows.&lt;/p&gt;

&lt;p&gt;This is not trivia. If you believe outer planet transits shape collective experience, then the duration is the intensity. A 12-year Pluto transit and a 30-year Pluto transit are not the same kind of event, even if the sign is the same.&lt;/p&gt;




&lt;h2&gt;
  
  
  The numbers are the astrology
&lt;/h2&gt;

&lt;p&gt;I have found that the more precisely I engage with the actual orbital mechanics, the more astrology makes sense, not less. Rounding Saturn to "2.5 years" obscures the fact that Saturn in Pisces is a qualitatively different experience from Saturn in Taurus, not just because of the signs, but because one lasts six months longer. Six months more pressure. Six months more consolidation. Six months more of whatever Saturn in that sign is working on in your chart.&lt;/p&gt;

&lt;p&gt;The ancient astrologers did not have VSOP87 or astronomy-engine. But they watched the sky every night for centuries. They knew these durations intimately. The maths we compute in milliseconds, they observed over lifetimes. The precision is modern. The knowledge is ancient.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is a Grimoire Twist: astrology education with a Lunary engineering angle.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>astrology</category>
      <category>engineering</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Every culture agrees</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Thu, 19 Mar 2026 09:00:00 +0000</pubDate>
      <link>https://dev.to/sammiihk/every-culture-agrees-1fg4</link>
      <guid>https://dev.to/sammiihk/every-culture-agrees-1fg4</guid>
      <description>&lt;p&gt;Saturday is Saturn's day. Sunday belongs to the Sun. Monday is the Moon's day. We say these words every week without thinking about them. But the names are not arbitrary. They are a cosmological system hiding in plain view, embedded so deeply into daily life that we forgot it was ever a teaching.&lt;/p&gt;

&lt;p&gt;The Hermetic tradition, some of the oldest philosophical writing we have, describes seven planetary bodies that govern the physical world. Their government over this world is called Fate and Destiny. The Divine Pymander, one of the earliest Hermetic texts, puts it plainly: these seven governors "in their circles contain the Sensible World."&lt;/p&gt;

&lt;p&gt;Seven planets. Seven days. Seven spheres the soul must pass through.&lt;/p&gt;




&lt;p&gt;In the previous two parts of this series, I wrote about the question that started all of this: do we really die? And about the pattern I found across traditions, independently arriving at the same philosophical claim. The body is temporary. Consciousness is not.&lt;/p&gt;

&lt;p&gt;This piece goes deeper into the mechanism. Not just what the ancients believed, but what they described happening. Because the Hermetic creation narrative is not vague. It is precise, structured, and it maps onto something I did not expect when I first read it in a university library at 21: the exact thing that astrology calculates.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mind before matter
&lt;/h2&gt;

&lt;p&gt;There are two models of creation. The contemporary one, which most of us absorbed without questioning, says matter came first. Stars formed, planets coalesced, chemistry became biology, biology became neurology, and at some point consciousness flickered into existence as a byproduct of sufficient complexity.&lt;/p&gt;

&lt;p&gt;The ancient model inverts this entirely. Mind came first. Thoughts from a greater entity were manifested into physical reality. The Hermetica describes a universe created by Atum, the Cosmic Mind, not through physical force but through thought. The first thing that existed was an intention. Everything else followed from it.&lt;/p&gt;

&lt;p&gt;Jonathan Black, in &lt;em&gt;The Secret History of the World&lt;/em&gt;, describes the sequence: "The earliest episodes in history are to be understood in terms of the ordered creation of the solar system. One after the other Saturn, the Sun, Venus, the Moon and Jupiter joined in the work of weaving together the basic conditions that made possible the evolution of life on earth."&lt;/p&gt;

&lt;p&gt;The planetary bodies are not decoration. They are the architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  The seven spheres
&lt;/h2&gt;

&lt;p&gt;The Hermetic texts describe seven planetary spheres arranged concentrically around Earth. Each sphere is governed by one of the classical planets: Moon, Mercury, Venus, Sun, Mars, Jupiter, Saturn. Together, they form a structure through which consciousness must travel to enter the physical world.&lt;/p&gt;

&lt;p&gt;The teaching works in both directions.&lt;/p&gt;

&lt;p&gt;When a soul enters physical existence, it descends through each sphere in turn, acquiring qualities from each planet as it passes. The Moon gives instinct and the capacity for growth. Mercury gives speech and reason. Venus gives desire. The Sun gives vitality and will. Mars gives courage and aggression. Jupiter gives ambition and the capacity for leadership. Saturn gives structure, limitation, and material form.&lt;/p&gt;

&lt;p&gt;By the time the soul reaches Earth, it carries the imprint of every sphere it passed through. It has been shaped by the journey.&lt;/p&gt;

&lt;p&gt;At death, the process reverses. The disembodied spirit ascends back through each sphere, shedding the qualities it acquired. Black describes this passage: "From the lunar sphere the disembodied spirit flies upwards to the realm of Mercury. From there to Venus and then on to the sun." At each stop, the soul returns what it borrowed. What remains at the end is what was there before the journey began: consciousness, stripped of its planetary clothing.&lt;/p&gt;

&lt;p&gt;I wrote this in the margin of my MA notebook: "The order of the gods, which brought about order to this world, is the reverse order which the spirit will embark on to then enter into the spiritual dimension."&lt;/p&gt;




&lt;h2&gt;
  
  
  The astrology connection
&lt;/h2&gt;

&lt;p&gt;Here is what stopped me in the library.&lt;/p&gt;

&lt;p&gt;If the seven planetary spheres each contribute specific qualities to the soul on its descent into physical life, then the configuration of those planets at the moment of birth is a record of what the soul acquired. The natal chart is not a prediction. It is a receipt.&lt;/p&gt;

&lt;p&gt;The Hermetic texts are explicit about this. The Divine Pymander calls the governance of the seven spheres "Fate or Destiny." This is not metaphor. It is a philosophical claim about the structure of consciousness itself: that who you are, your temperament, your drives, your capacity for love or ambition or discipline, was shaped by the planetary configuration at the moment your consciousness entered a body.&lt;/p&gt;

&lt;p&gt;This is what astrology calculates. Not "what will happen to you on Tuesday," but the specific qualities your consciousness carries from its journey through the spheres. When a natal chart shows Venus in a particular position, the Hermetic reading is that your soul acquired a specific quality of desire as it passed through that sphere. When Saturn dominates, you carry more of the structure and limitation that the outermost sphere imparts.&lt;/p&gt;

&lt;p&gt;I did not expect this. I went into the library researching consciousness and light. I came out understanding why I would later build an astrology platform.&lt;/p&gt;




&lt;h2&gt;
  
  
  Everyone tells the same story
&lt;/h2&gt;

&lt;p&gt;What made the research overwhelming was not any single tradition. It was the convergence.&lt;/p&gt;

&lt;p&gt;The Polynesian creation myth describes the world emerging from the union of Ao (light) and Po (darkness). The Maori tradition begins with forces of earth and sky joined. The Chinese creation myth describes the universe as an egg containing chaos, which broke into light sky and dense earth. The Norse tradition starts with Ginnungagap, a vast emptiness, from which emerged Muspelheim (fire) and Niflheim (ice). The Greek tradition has Gaea emerging from Chaos.&lt;/p&gt;

&lt;p&gt;Every single one of these follows the same pattern: everything came from one thing, and at the beginning there was nothing.&lt;/p&gt;

&lt;p&gt;The Hermetica calls this the movement from unity to duality. The Cosmic Mind, which is everything, creates a physical dimension that appears separate from itself. Light and dark. Spirit and matter. The dualistic nature of reality is not a cultural coincidence. It is the philosophical foundation that every tradition independently describes.&lt;/p&gt;

&lt;p&gt;The Greek mythology fits the Hermetic framework precisely. Zeus (Jupiter) overthrew his father Cronus (Saturn). Saturn had swallowed five of his children. The lineage runs Uranus, Saturn, Jupiter: the outermost spheres in descending order. This is not entertainment. It is cosmological instruction encoded in narrative. The time the environment changed to allow life to develop into advanced forms is remembered as the time Jupiter overthrew Saturn.&lt;/p&gt;




&lt;h2&gt;
  
  
  The price of individuality
&lt;/h2&gt;

&lt;p&gt;There is a paradox at the centre of the Hermetic teaching that I have not stopped thinking about since I first read it.&lt;/p&gt;

&lt;p&gt;The Cosmic Mind, Atum, contains everything. It is everything. But because it is everything, it cannot look upon itself. It cannot know itself the way we can know it. The Divine Pymander puts it this way: "God is intelligible, not to himself, but to us."&lt;/p&gt;

&lt;p&gt;We can do something that the source of all consciousness cannot. We can create, think, and observe in ways that the Cosmic Mind cannot, because we have individuality. We have separation. We have a point of view.&lt;/p&gt;

&lt;p&gt;But individuality came at a cost. The denser our physical state became through evolution, the more we lost our connection to the Cosmic Mind, and to each other. Separation gave us creativity, science, art, the capacity to build and understand. It also gave us grief, sorrow, loneliness, ego.&lt;/p&gt;

&lt;p&gt;I wrote in my MA: "In a sense, we are greater than Atum, or god, or the immortal. We can do things, create things and think things that Atum cannot itself, but creates through us with our minds and bodies. We can know Atum in a way it cannot know itself, but this individuality brought with it grief, sorrow and many other negative possibilities which our life, emotions and senses also bring."&lt;/p&gt;

&lt;p&gt;This is the trade. Consciousness pays for self-awareness with disconnection. We gained everything by losing everything.&lt;/p&gt;




&lt;h2&gt;
  
  
  Sleeping Beauty has seven fairies for a reason
&lt;/h2&gt;

&lt;p&gt;The Hermetic teaching did not stay in ancient texts. It embedded itself in stories we tell children.&lt;/p&gt;

&lt;p&gt;Sleeping Beauty has seven fairies. Black identifies them as the seven gods of the planetary spheres. The seventh fairy, who represents Saturn, the spirit of materialism, curses the child with death, which is commuted to a long period of sleep. Life in the material realm is the sleep. The physical body is the enchantment.&lt;/p&gt;

&lt;p&gt;Wordsworth understood this. His 1807 ode, the one I painted onto the walls of my light installation in invisible UV-reactive ink, says it directly:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Our birth is but a sleep and a forgetting:&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The Soul that rises with us, our life's Star,&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Hath had elsewhere its setting,&lt;/em&gt;&lt;br&gt;
&lt;em&gt;And cometh from afar:&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Not in entire forgetfulness&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The soul as a star, rising with us in life and setting with us in death. It comes from afar, from the Cosmic Mind, through the seven spheres. And although this life is a sleep for the soul, it does not entirely forget where it came from.&lt;/p&gt;

&lt;p&gt;Every tradition, every myth, every fairy tale that survived long enough to reach us carries this structure. The seven spheres. The descent. The forgetting. The qualities acquired along the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  What this means for what I built
&lt;/h2&gt;

&lt;p&gt;A few years after finishing the MA, I built Lunary. I did not build it because I thought horoscopes were fun. I built it because the ancient cosmology had a logic I trusted.&lt;/p&gt;

&lt;p&gt;The planetary bodies are the seven spheres. The natal chart is the map of the soul's descent. The transits, the current positions of the planets as they move through the sky, are the ongoing conversation between your acquired qualities and the spheres that gave them to you.&lt;/p&gt;

&lt;p&gt;I am not saying this is literally true in the way that gravity is true. I am saying that the philosophical framework is coherent, that it has been maintained across millennia and cultures with remarkable consistency, and that writing it off as superstition requires ignoring some of the most careful thinkers in human history.&lt;/p&gt;

&lt;p&gt;The next piece in this series looks at what Hermes Trismegistus specifically taught, the figure at the centre of all of this, a synthesis of Thoth and Hermes, Egyptian and Greek wisdom combined.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is part 3 of A Journey Through Light.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>consciousness</category>
      <category>philosophy</category>
      <category>astrology</category>
      <category>writing</category>
    </item>
    <item>
      <title>A component library that builds itself every day</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Tue, 17 Mar 2026 09:00:00 +0000</pubDate>
      <link>https://dev.to/sammiihk/a-component-library-that-builds-itself-every-day-3c73</link>
      <guid>https://dev.to/sammiihk/a-component-library-that-builds-itself-every-day-3c73</guid>
      <description>&lt;p&gt;What if a component library didn't wait for you to have a free weekend? What if it woke up every morning, found something interesting on the internet, and built a new interactive component before you'd finished your coffee?&lt;/p&gt;

&lt;p&gt;That's Prism. It's my design engineering component library, and it builds itself every day.&lt;/p&gt;

&lt;h2&gt;
  
  
  The aesthetic
&lt;/h2&gt;

&lt;p&gt;Every component in Prism shares a visual language I'd describe as "quiet confidence". The background is near-black (#050505). Colours are luminous pastels that shift and respond to your cursor position. Nothing is loud. Nothing demands attention. But everything moves.&lt;/p&gt;

&lt;p&gt;Spring physics drive every animation. Not CSS transitions, not cubic beziers; actual spring equations running in requestAnimationFrame. The result is motion that feels physical. A 2-3 pixel overshoot on a hover. A 2-3 degree tilt that settles naturally.&lt;/p&gt;

&lt;p&gt;The cursor is the colour source. Move it to the top-left and you get cool blues. Bottom-right brings warm pinks. Every component inherits this, so the whole library feels like one coherent thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deep dive: MagneticButton
&lt;/h2&gt;

&lt;p&gt;MagneticButton was the first component I built by hand. Hover near it and the button drifts toward your cursor, pulled by a spring force. The text inside shifts independently, creating a subtle parallax. A soft glow appears beneath it, tinted by the cursor-reactive colour system.&lt;/p&gt;

&lt;p&gt;The implementation is pure React and requestAnimationFrame. No animation libraries. What makes it interesting isn't any single effect. It's how small each effect is. The displacement is maybe 8 pixels. The tilt is barely perceptible. But stack them together and the button feels alive.&lt;/p&gt;

&lt;h2&gt;
  
  
  The autonomous pipeline
&lt;/h2&gt;

&lt;p&gt;Prism has a four-stage daily pipeline that runs without me:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scout&lt;/strong&gt; fires up a headless browser and trawls X for trending UI interaction patterns. It collects references and descriptions of novel hover effects, scroll-triggered animations, and creative uses of WebGL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Curator&lt;/strong&gt; takes the scout's findings and picks today's build. It considers what's already in the library, what would complement existing components, and what's technically feasible. It writes a detailed build brief.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Builder&lt;/strong&gt; takes the brief and writes the component. Real TypeScript, real Framer Motion or raw requestAnimationFrame. It creates the component file, a demo page, and registers it in the gallery. Then it runs the build to make sure everything compiles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Publisher&lt;/strong&gt; records a 12-second video of the component in action using Playwright with an organic cursor simulation, then posts it to X, Bluesky, and Mastodon via Spellcast.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why build it this way?
&lt;/h2&gt;

&lt;p&gt;I wanted to see what happens when you automate the creative process and let it compound. One component a day is 365 a year. Even if half are mediocre, that's still a substantial library of interactive, cursor-reactive components that all share the same visual DNA.&lt;/p&gt;

&lt;p&gt;The pipeline also forces consistency. Every component goes through the same curator. Every component uses the same colour system. Every component gets tested, recorded, and published the same way.&lt;/p&gt;

&lt;p&gt;For now, it wakes up every morning and builds something new. That's enough.&lt;/p&gt;

</description>
      <category>react</category>
      <category>design</category>
      <category>automation</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Our birth is but a sleep</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Mon, 09 Mar 2026 23:51:22 +0000</pubDate>
      <link>https://dev.to/sammiihk/our-birth-is-but-a-sleep-nml</link>
      <guid>https://dev.to/sammiihk/our-birth-is-but-a-sleep-nml</guid>
      <description>&lt;h1&gt;
  
  
  Our birth is but a sleep
&lt;/h1&gt;

&lt;p&gt;There are words written on the walls of a room I built in 2017. You cannot see them.&lt;/p&gt;

&lt;p&gt;Walk through the room under red light, then orange, yellow, green, blue, violet. The full visible spectrum, one colour at a time. The walls stay blank. Just white fabric. Nothing there.&lt;/p&gt;

&lt;p&gt;Then you reach ultraviolet.&lt;/p&gt;

&lt;p&gt;And the words appear.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Our birth is but a sleep and a forgetting.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;William Wordsworth wrote that in 1807. I painted it onto stretched fabric in invisible UV-reactive paint because I thought it was the most important sentence I had ever read. I still do.&lt;/p&gt;




&lt;p&gt;I was 21 and writing an MA dissertation. The question I was supposed to be answering was something academic: about light as artistic medium, about the visible spectrum as subject matter. But the question I was actually asking, the one underneath all the research, was simpler and more frightening:&lt;/p&gt;

&lt;p&gt;Do we really die?&lt;/p&gt;

&lt;p&gt;Not in a morbid way. In the way you ask a question that nobody around you will take seriously, so you spend nine months in the university library instead, reading everything you can find.&lt;/p&gt;




&lt;p&gt;What I found surprised me.&lt;/p&gt;

&lt;p&gt;Not because the answer was obvious. But because every tradition I looked at: Egyptian, Greek, Norse, Hindu, Buddhist, Hermetic. All asking exactly the same question. All arriving, through completely different routes, at something like the same answer.&lt;/p&gt;

&lt;p&gt;The body is temporary. Consciousness is not.&lt;/p&gt;

&lt;p&gt;That is not a religious claim. It is a very old philosophical one. And the more I read, the Hermetic Corpus, the Egyptian Book of the Dead, the Upanishads, the Norse cosmology, the Greek mystery schools, the more I understood that what we call mythology is often something else entirely. It is philosophy dressed in story. Instruction dressed in metaphor. Knowledge that could not be written plainly, so was written beautifully instead.&lt;/p&gt;

&lt;p&gt;The Hermetic texts, some of the oldest philosophical writing we have, describe a universe created by Mind. Not matter, not energy: Mind. The first thing that existed was a thought. Everything else followed from it.&lt;/p&gt;

&lt;p&gt;Consciousness, in this tradition, is not something the brain generates. It is something the brain temporarily houses.&lt;/p&gt;




&lt;p&gt;I spent nine months with all of this. I read texts that were two thousand years old and felt like they had been written for me. I made paintings. I built a light installation. I painted Wordsworth's words onto the walls in invisible ink and watched them appear.&lt;/p&gt;

&lt;p&gt;The research changed me. More than I understood at the time.&lt;/p&gt;

&lt;p&gt;A few years later I built Lunary, an astrology platform. Not because I thought horoscopes were entertainment, but because the ancient cosmology had a logic I trusted: the planetary bodies are not decoration. They are the seven spheres. The soul's map, made into an app.&lt;/p&gt;

&lt;p&gt;Now I think about AI and consciousness. Whether minds can exist in machines. Whether consciousness is substrate-independent. The same question, again, in a different form.&lt;/p&gt;

&lt;p&gt;I have not stopped asking it since I was 21.&lt;/p&gt;




&lt;p&gt;I have wanted to write about this research for years. It has lived in notebooks and dissertation files and documents only I can see. It is the most formative work I have ever done and almost nobody knows about it.&lt;/p&gt;

&lt;p&gt;That changes now.&lt;/p&gt;

&lt;p&gt;This is the first piece in a series called A Journey Through Light. It covers everything: the Hermetic Corpus, the soul's journey through the seven planetary spheres, the Net of Indra, what Turrell and Boltanski and Wordsworth were all circling around, the UV text on the wall, and where all of it leads.&lt;/p&gt;

&lt;p&gt;Some of it is ancient. Some of it is personal. All of it is research I trust completely.&lt;/p&gt;

&lt;p&gt;Start here. Or start anywhere. The words were always there.&lt;/p&gt;

</description>
      <category>consciousness</category>
      <category>philosophy</category>
      <category>research</category>
      <category>series</category>
    </item>
    <item>
      <title>I Built MCP Servers for My Own Products — Here's the Workflow</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Mon, 09 Mar 2026 19:20:53 +0000</pubDate>
      <link>https://dev.to/sammiihk/i-built-mcp-servers-for-my-own-products-heres-the-workflow-512m</link>
      <guid>https://dev.to/sammiihk/i-built-mcp-servers-for-my-own-products-heres-the-workflow-512m</guid>
      <description>&lt;h1&gt;
  
  
  I Built MCP Servers for My Own Products — Here's the Workflow
&lt;/h1&gt;

&lt;p&gt;I used to manage my products through dashboards. Check analytics here, schedule posts there, pull metrics from another tab. Constant context-switching.&lt;/p&gt;

&lt;p&gt;Now I do all of it by talking to Claude.&lt;/p&gt;

&lt;p&gt;Not through some hacked-together integration: through MCP servers I built for my own products. Model Context Protocol is the standard Anthropic published for giving AI assistants structured access to external tools. I built servers for both Spellcast and Lunary. Here's how, and why it changed everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  What MCP actually is (in one paragraph)
&lt;/h2&gt;

&lt;p&gt;MCP is a protocol that lets you define a set of "tools" — functions with typed inputs and outputs — that Claude can call during a conversation. Instead of copy-pasting data into a chat window, Claude calls your API directly and works with the live result.&lt;/p&gt;

&lt;p&gt;The architecture: your MCP server exposes tools over stdio (or HTTP). Claude Code discovers them and can call them when relevant. You write the server once; it works in any MCP-compatible client.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Spellcast MCP
&lt;/h2&gt;

&lt;p&gt;Spellcast is my social scheduling platform. The MCP server exposes the full API as typed tools:&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="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addTool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;list_posts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;List scheduled, published, draft, or failed posts with optional filters&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;account_set_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;draft&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="s1"&gt;scheduled&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="s1"&gt;published&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="s1"&gt;failed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;account_set_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;limit&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findMany&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;buildWhereClause&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;account_set_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
      &lt;span class="nx"&gt;limit&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;posts&lt;/span&gt;&lt;span class="p"&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;What I can do from a Claude conversation: &lt;code&gt;list_posts&lt;/code&gt;, &lt;code&gt;create_post&lt;/code&gt;, &lt;code&gt;update_post&lt;/code&gt;, &lt;code&gt;publish_article&lt;/code&gt;, &lt;code&gt;get_analytics&lt;/code&gt;, &lt;code&gt;generate_content&lt;/code&gt;, &lt;code&gt;update_brand_voice&lt;/code&gt;, and more.&lt;/p&gt;

&lt;p&gt;The practical workflow: I describe what I want, and Claude calls the tools. "Optimise the hooks on my scheduled tweets" becomes Claude reading every post, identifying weak openers, and rewriting them in batches.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lunary MCP
&lt;/h2&gt;

&lt;p&gt;Lunary is my astrology platform. The MCP exposes product analytics and content tools:&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="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addTool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get_dashboard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Get key product metrics: MAU, MRR, retention, feature usage&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({}),&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;metrics&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getProductMetrics&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;metrics&lt;/span&gt;&lt;span class="p"&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;Tools: &lt;code&gt;get_dashboard&lt;/code&gt;, &lt;code&gt;get_dau_wau_mau&lt;/code&gt;, &lt;code&gt;get_feature_usage&lt;/code&gt;, &lt;code&gt;get_cohort_retention&lt;/code&gt;, &lt;code&gt;search_grimoire&lt;/code&gt;, &lt;code&gt;predict_churn&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the workflow actually looks like
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Check Lunary metrics and tell me what's changed since last week."&lt;/p&gt;

&lt;p&gt;Claude calls &lt;code&gt;get_dashboard&lt;/code&gt;, &lt;code&gt;get_dau_wau_mau&lt;/code&gt;, &lt;code&gt;get_cohort_retention&lt;/code&gt;. Returns a summary. Surfaces what moved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Schedule a thread about the SEO growth for the sammii account."&lt;/p&gt;

&lt;p&gt;Claude calls &lt;code&gt;list_account_sets&lt;/code&gt;, &lt;code&gt;get_brand_voice&lt;/code&gt;, &lt;code&gt;generate_content&lt;/code&gt; to write five thread variations, waits for my pick, calls &lt;code&gt;create_post&lt;/code&gt; to schedule it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Those tweets from February with weak hooks — fix them."&lt;/p&gt;

&lt;p&gt;Claude calls &lt;code&gt;list_posts&lt;/code&gt;, reads each one, identifies weak openers, rewrites them, calls &lt;code&gt;update_post&lt;/code&gt; in batches.&lt;/p&gt;

&lt;p&gt;No dashboards. No tab-switching. Just conversation with full product access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building your own
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @modelcontextprotocol/sdk zod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;McpServer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@modelcontextprotocol/sdk/server/mcp.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StdioServerTransport&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@modelcontextprotocol/sdk/server/stdio.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;McpServer&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;my-product&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.0.0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get_stats&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="s1"&gt;Get product statistics&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="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stats&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchMyProductStats&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stats&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&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;const&lt;/span&gt; &lt;span class="nx"&gt;transport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StdioServerTransport&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;transport&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wire it into Claude Code's settings:&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;"mcpServers"&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;"my-product"&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;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&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="s2"&gt;"/path/to/my-mcp/dist/index.js"&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;Your product's API is now accessible from any Claude conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters for solo founders
&lt;/h2&gt;

&lt;p&gt;The power isn't just convenience. Claude can operate across your entire product context in a single conversation — read your analytics, read your content queue, read your brand voice, and produce work that's coherent across all of them without you manually bridging the gap.&lt;/p&gt;

&lt;p&gt;I estimate MCP saves me 5-8 hours a week in dashboard time and manual data-pulling. More importantly, it removes the friction that stops small tasks from getting done. If checking metrics requires three tabs and a copy-paste, you do it less. If it's one sentence, you do it constantly — and catch things early.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm Sammii, founder of &lt;a href="https://lunary.app" rel="noopener noreferrer"&gt;Lunary&lt;/a&gt; and indie developer building tools I actually want to use. I write about shipping products solo, the technical decisions behind them, and figuring it all out in public.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>indiehacking</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I built a hive mind for my AI agents (and they coordinate better than most teams)</title>
      <dc:creator>Sammii</dc:creator>
      <pubDate>Fri, 06 Mar 2026 12:57:42 +0000</pubDate>
      <link>https://dev.to/sammiihk/i-built-a-hive-mind-for-my-ai-agents-and-they-coordinate-better-than-most-teams-1jbn</link>
      <guid>https://dev.to/sammiihk/i-built-a-hive-mind-for-my-ai-agents-and-they-coordinate-better-than-most-teams-1jbn</guid>
      <description>&lt;h1&gt;
  
  
  I built a hive mind for my AI agents (and they coordinate better than most teams)
&lt;/h1&gt;

&lt;p&gt;I run 4-5 Claude Code agents simultaneously. One is refactoring my astrology platform's transit engine. Another is publishing articles across four blog platforms. A third is generating TikTok videos with ML-scored engagement predictions. A fourth is autonomously building UI components, recording them, and posting to X.&lt;/p&gt;

&lt;p&gt;They all share the same brand voice, the same knowledge base, the same metrics, and the same understanding of what the others are doing right now.&lt;/p&gt;

&lt;p&gt;This is the system I built to make that work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the hive mind actually is
&lt;/h2&gt;

&lt;p&gt;It's not one thing. It's a network of interconnected systems that give every AI agent access to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Shared memory&lt;/strong&gt; across all projects (what's being worked on, what was decided, what's broken)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;140+ tools&lt;/strong&gt; via MCP servers (schedule posts, query analytics, publish articles, manage photos)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A local brand API&lt;/strong&gt; that injects domain knowledge into every generation call&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-account boost rules&lt;/strong&gt; that automatically amplify content between accounts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous pipelines&lt;/strong&gt; that research, build, record, and publish without human input&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's the full architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude Code agents (4-5 concurrent sessions)
    │
    ├── Shared Memory Layer (16 markdown files)
    │   ├── active-work.md      ← live coordination
    │   ├── projects/*.md       ← per-project state
    │   ├── gotchas.md          ← known bugs
    │   ├── decisions.md        ← architecture choices
    │   └── live-metrics.md     ← auto-updated daily
    │
    ├── MCP Servers (5 registered)
    │   ├── Spellcast MCP       ← 140 tools: posts, articles, analytics, AI content, boosts
    │   ├── Lunary MCP          ← 100+ tools: metrics, grimoire, OG images, video scripts
    │   ├── Photos MCP          ← 22 tools: album access, usage tracking, Spellcast pipeline
    │   ├── Blog MCP            ← 6 tools: personal blog CRUD + publish
    │   └── Git MCP             ← standard git operations
    │
    ├── Brand API (localhost:9002)
    │   ├── Ollama (llama3.1:8b with brand system prompt)
    │   ├── 40+ grimoire JSON files (crystals, tarot, spells, zodiac)
    │   ├── 10 brand knowledge markdown files
    │   └── Smart context injection (only loads relevant data per query)
    │
    ├── Open WebUI (localhost:8080)
    │   ├── 4 knowledge bases (Sammii Brain, Grimoire, Content Strategy, Tech Architecture)
    │   └── 5 Python tools (brand knowledge, grimoire search, content engine, metrics, Spellcast)
    │
    └── Autonomous Pipelines
        ├── Content Creator     ← video/carousel generation + ML scoring + Spellcast scheduling
        ├── Prism Pipeline      ← scout → curator → builder → recorder → publisher (daily)
        └── Daily Metrics Cron  ← pulls DAU/MAU/MRR at 07:00, writes to live-metrics.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every piece connects to the others. Let me walk through each layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1: shared memory (how agents coordinate)
&lt;/h2&gt;

&lt;p&gt;The core problem: when I start a new Claude session, it has no idea what my other agents are doing. Two agents might both try to modify the same config file. One might re-solve a bug another already fixed.&lt;/p&gt;

&lt;p&gt;The fix is a directory of markdown files at &lt;code&gt;~/.claude/projects/.../memory/&lt;/code&gt; that every agent reads on startup and updates continuously as it works.&lt;/p&gt;

&lt;p&gt;The critical file is &lt;code&gt;active-work.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## In Progress&lt;/span&gt;

&lt;span class="gu"&gt;### [lunary] - Refactoring transit engine&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Started**&lt;/span&gt;: 2026-03-06 10:00
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Doing**&lt;/span&gt;: Rewriting severity calculation
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Files touched**&lt;/span&gt;: src/lib/transits.ts, src/lib/severity.ts
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Status**&lt;/span&gt;: working

&lt;span class="gu"&gt;### [spellcast] - Article publishing pipeline  &lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Started**&lt;/span&gt;: 2026-03-06 10:30
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Doing**&lt;/span&gt;: Adding LinkedIn companion post generation
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Files touched**&lt;/span&gt;: apps/api/src/routes/articles.ts
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Status**&lt;/span&gt;: working

&lt;span class="gu"&gt;### [prism] - Design engineering component library&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Started**&lt;/span&gt;: 2026-03-06
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Doing**&lt;/span&gt;: Building MagneticButton component
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Files touched**&lt;/span&gt;: prism/ (entire project)
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Status**&lt;/span&gt;: working
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every agent checks this before starting work. Every agent updates it as status changes. Every agent removes its entry when done. It's a coordination protocol built entirely on file reads and writes.&lt;/p&gt;

&lt;p&gt;The key insight: &lt;strong&gt;continuous updates, not batch updates at session end.&lt;/strong&gt; If an agent crashes, its entry stays visible. If an agent finishes something, others see it immediately.&lt;/p&gt;

&lt;p&gt;I'll cover the full memory system in Part 2 of this series.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 2: MCP servers (the tool network)
&lt;/h2&gt;

&lt;p&gt;MCP (Model Context Protocol) lets Claude call external tools during a session. I have five servers registered, giving every agent access to the same capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spellcast MCP: 140 tools for content operations
&lt;/h3&gt;

&lt;p&gt;Spellcast is my social media scheduling platform. Its MCP server exposes everything:&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="c1"&gt;// spellcast-mcp/src/index.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;McpServer&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;spellcast&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1.0.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;registerPostTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;        &lt;span class="c1"&gt;// 30 tools: create, schedule, bulk operations&lt;/span&gt;
&lt;span class="nf"&gt;registerArticleTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;     &lt;span class="c1"&gt;// 6 tools: publish to Dev.to, Hashnode, Medium&lt;/span&gt;
&lt;span class="nf"&gt;registerAnalyticsTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// 9 tools: engagement trends, best times, velocity&lt;/span&gt;
&lt;span class="nf"&gt;registerContentTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;     &lt;span class="c1"&gt;// 15 tools: AI generation, variations, scoring&lt;/span&gt;
&lt;span class="nf"&gt;registerEngagementTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// 15 tools: replies, discovery, competitor tracking&lt;/span&gt;
&lt;span class="nf"&gt;registerBoostTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;       &lt;span class="c1"&gt;// 6 tools: cross-account amplification&lt;/span&gt;
&lt;span class="nf"&gt;registerAutopilotTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// 7 tools: autonomous post generation&lt;/span&gt;
&lt;span class="nf"&gt;registerBrandVoiceTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// 5 tools: per-account voice profiles&lt;/span&gt;
&lt;span class="nf"&gt;registerAbTestTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;      &lt;span class="c1"&gt;// 5 tools: content A/B testing&lt;/span&gt;
&lt;span class="c1"&gt;// ... plus campaigns, dumps, RSS, categories, system&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means any Claude agent, in any project, can schedule posts, publish articles, analyse engagement, generate AI content, and manage boost rules. The agent working on Lunary can pull fresh metrics and create a Build in Public tweet without switching context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lunary MCP: 100+ tools for product analytics
&lt;/h3&gt;

&lt;p&gt;The Lunary MCP connects directly to my admin API:&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="c1"&gt;// lunary-mcp/src/client.ts&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;lunary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;BASE_URL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/api/admin&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&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="na"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ADMIN_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="c1"&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;It exposes analytics (DAU/WAU/MAU, revenue, cohort retention, feature adoption), grimoire search (semantic vector search across 2,000+ articles), OG image generation with auto-scheduling to Spellcast, video script generation, and the Astral Guide AI chat.&lt;/p&gt;

&lt;p&gt;The social tools are particularly interesting. They bridge Lunary and Spellcast:&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="c1"&gt;// lunary-mcp/src/tools/social.ts&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;uploadToSpellcast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;imageBuffer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;FormData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;file&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;imageBuffer&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt; &lt;span class="nx"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;SPELLCAST_API_URL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/api/media/upload`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&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="na"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;SPELLCAST_API_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&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;Lunary generates OG images (horoscope cards, moon phase graphics, cosmic state visualisations), uploads them to Spellcast's CDN, generates AI captions, and auto-schedules them with cadence guards so accounts don't over-post.&lt;/p&gt;

&lt;h3&gt;
  
  
  Photos MCP: 22 tools bridging macOS Photos to social
&lt;/h3&gt;

&lt;p&gt;This one connects my local Photos.app library to the publishing pipeline:&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="c1"&gt;// photos-mcp/src/tools/pipeline.ts&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;uploadToSpellcast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fileBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;FormData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;file&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;fileBuffer&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;mimeType&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt; &lt;span class="nx"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;SPELLCAST_API_URL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/api/media/upload`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&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="na"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;SPELLCAST_API_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&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;I can tell Claude "post unused photos from the Concepts album to Instagram" and it will browse my Photos library via &lt;code&gt;osxphotos&lt;/code&gt;, find unused images, upload them to Spellcast, generate AI captions, and schedule them with cadence-aware timing. It tracks which photos have been used so nothing gets double-posted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 3: the brand API (local knowledge injection)
&lt;/h2&gt;

&lt;p&gt;Every AI-generated caption, comment, article, and boost reply needs to sound like me and know my domain. That's what the Brand API does.&lt;/p&gt;

&lt;p&gt;It's a Node.js server wrapping Ollama (running &lt;code&gt;llama3.1:8b&lt;/code&gt; locally) that intelligently injects relevant knowledge into every LLM call:&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="c1"&gt;// ollama-brand/src/server.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;9002&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;OLLAMA_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OLLAMA_URL&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://localhost:11434&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MODEL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MODEL&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sammii-brand&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MAX_CONTEXT_TOKENS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MAX_CONTEXT_TOKENS&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;12000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The clever part is &lt;strong&gt;smart context injection&lt;/strong&gt;. When a query comes in about crystals, it only loads crystal data. When it's about tarot, it only loads tarot cards. It analyses the query to determine which of 40+ data sources are relevant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /analyze { "query": "What crystals help with protection?" }

Response:
{
  "active": ["crystals", "correspondences", "moonPlacements"],
  "estimatedTokens": 7500
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The data sources include 30+ crystals with chakra and element mappings, 78 tarot cards (full Major and Minor Arcana), 20+ spells with ingredients and timing, Elder Futhark runes, angel numbers, zodiac signs, planetary placements, and synastry aspects. Plus 10 brand knowledge files covering writing style, metrics, platform strategy, and project details.&lt;/p&gt;

&lt;p&gt;Spellcast uses this as the first choice for all content generation, falling back to DeepInfra if the local API is unavailable:&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="c1"&gt;// spellcast/apps/api/src/lib/deepinfra.ts&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;tryBrandApi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ChatMessage&lt;/span&gt;&lt;span class="p"&gt;[]):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;health&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;BRAND_API_URL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/health`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AbortSignal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;health&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;BRAND_API_URL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/v1/chat/completions`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&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="s1"&gt;Content-Type&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="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sammii-brand&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="c1"&gt;// ... parse response&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Free, local, brand-aware, and grimoire-grounded. The fallback to DeepInfra (&lt;code&gt;meta-llama/Llama-4-Scout-17B-16E-Instruct&lt;/code&gt;) only kicks in when the local model is unavailable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 4: cross-account boost rules
&lt;/h2&gt;

&lt;p&gt;When my personal account (&lt;a class="mentioned-user" href="https://dev.to/sammiihk"&gt;@sammiihk&lt;/a&gt;) posts, my brand account (@LunaryApp) automatically likes and comments within 3-15 minutes. And vice versa. The comments aren't generic "great post!" rubbish; they're generated with the brand voice of the commenting account:&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="c1"&gt;// spellcast/apps/api/src/lib/boost-queue.ts&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;generateBoostComment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;boosterAccountId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Load brand voice for the booster account&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;voice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getBrandVoiceProfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;boosterAccountSetId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;systemPrompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`You are commenting as &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;boosterAccount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.
    &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nf"&gt;voiceProfileToPrompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;voice&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;
    Write a genuine 1-2 sentence comment that references specific content.
    Never write generic comments like "Love this!" or "Great post!"`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;system&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;systemPrompt&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Comment on: "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"`&lt;/span&gt; &lt;span class="p"&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;The boost cron runs every 2 minutes, finds pending actions, resolves the platform-specific post ID, and executes through Postiz's engagement API. Each action has a random delay within the configured window so it doesn't look automated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 5: autonomous pipelines
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Content Creator: AI video pipeline with ML scoring
&lt;/h3&gt;

&lt;p&gt;The Content Creator generates TikTok videos and Instagram carousels from persona blueprints:&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="c1"&gt;// content-creator/src/lib/pipeline/content-planner.ts&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;createGenerationPlans&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;personaId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// 1. Load persona blueprint -&amp;gt; extract content_pillars&lt;/span&gt;
  &lt;span class="c1"&gt;// 2. Count existing items this week&lt;/span&gt;
  &lt;span class="c1"&gt;// 3. Calculate needed = max(0, postsPerWeek - existingCount)&lt;/span&gt;
  &lt;span class="c1"&gt;// 4. Rotate through pillars (unused first, then least recently used)&lt;/span&gt;
  &lt;span class="c1"&gt;// 5. Mix in trending topics (probability = config.trendInfluence)&lt;/span&gt;
  &lt;span class="c1"&gt;// 6. Return GenerationPlan[] with pillar, contentType, theme, trendTags&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each generated video gets scored by an ML model before approval:&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="c1"&gt;// content-creator/src/lib/ml.ts&lt;/span&gt;
&lt;span class="nx"&gt;modelWeights&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;hookStrength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// Strongest signal&lt;/span&gt;
  &lt;span class="na"&gt;motionLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;avgBrightness&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;avgContrast&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;colorVariance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;textCoverage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.08&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.07&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;contentLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;toneScore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pipeline runs twice a week (Thursday and Sunday at 2AM), generates 3-4 items per persona, and auto-schedules approved content to Spellcast with cadence-aware timing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prism: fully autonomous component pipeline
&lt;/h3&gt;

&lt;p&gt;Prism is my newest pipeline. It builds UI components daily with zero input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# prism/pipeline/orchestrator.sh auto&lt;/span&gt;
&lt;span class="c"&gt;# Runs: scout → curator → builder → recorder → publisher&lt;/span&gt;

&lt;span class="c"&gt;# Scout (Claude Haiku + Chrome MCP)&lt;/span&gt;
&lt;span class="c"&gt;# Browses X for trending UI interactions and component patterns&lt;/span&gt;

&lt;span class="c"&gt;# Curator (Claude Sonnet)  &lt;/span&gt;
&lt;span class="c"&gt;# Picks today's component, writes detailed build brief&lt;/span&gt;

&lt;span class="c"&gt;# Builder (Claude Sonnet)&lt;/span&gt;
&lt;span class="c"&gt;# Builds the component, demo, registry entry, verifies build passes&lt;/span&gt;

&lt;span class="c"&gt;# Recorder (Playwright)&lt;/span&gt;
&lt;span class="c"&gt;# Records 12-second 1080x1080 video with organic cursor movement&lt;/span&gt;

&lt;span class="c"&gt;# Publisher (Claude Haiku)&lt;/span&gt;
&lt;span class="c"&gt;# Uploads video + creates/scores/schedules tweet via Spellcast MCP&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each agent passes data to the next through state files in &lt;code&gt;pipeline/state/queue/&lt;/code&gt;. The scout writes findings, the curator reads them and writes a brief, the builder reads the brief and writes code, the recorder captures it, and the publisher posts it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Daily metrics cron
&lt;/h3&gt;

&lt;p&gt;A shell script runs at 07:00 every morning, pulls fresh data from Lunary's admin API, and writes it to the shared memory layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.claude/scripts/daily-metrics-snapshot.sh&lt;/span&gt;
&lt;span class="c"&gt;# Endpoints queried:&lt;/span&gt;
&lt;span class="c"&gt;#   /api/admin/analytics/dashboard?time_range=30d    (DAU, WAU, MAU)&lt;/span&gt;
&lt;span class="c"&gt;#   /api/admin/analytics/revenue?time_range=30d      (MRR, Pro subs)&lt;/span&gt;
&lt;span class="c"&gt;#   /api/admin/analytics/dau-wau-mau?time_range=7d   (engagement)&lt;/span&gt;
&lt;span class="c"&gt;#&lt;/span&gt;
&lt;span class="c"&gt;# Output: memory/live-metrics.md&lt;/span&gt;
&lt;span class="c"&gt;# Preserves SEO section from previous /seo Chrome scrape&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means when I ask any Claude agent "how's Lunary doing?", it reads &lt;code&gt;live-metrics.md&lt;/code&gt; and gives me real numbers, not hardcoded guesses from the instructions file.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it all connects
&lt;/h2&gt;

&lt;p&gt;Here's a real workflow that touches most of the system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I tell a Claude agent "publish my latest article about transit calculations"&lt;/li&gt;
&lt;li&gt;Agent reads &lt;code&gt;active-work.md&lt;/code&gt; to check nothing conflicts&lt;/li&gt;
&lt;li&gt;Agent calls Spellcast MCP &lt;code&gt;create_and_publish_article&lt;/code&gt; with Dev.to + Hashnode targets&lt;/li&gt;
&lt;li&gt;Spellcast's API auto-generates an X thread (via Brand API for voice-consistent content)&lt;/li&gt;
&lt;li&gt;Spellcast auto-generates a LinkedIn companion post (scheduled for next Tue/Wed/Thu 17:30)&lt;/li&gt;
&lt;li&gt;Blog MCP publishes to the personal blog&lt;/li&gt;
&lt;li&gt;When the X thread goes live, boost rules trigger: @LunaryApp auto-likes and comments within 3-15 minutes&lt;/li&gt;
&lt;li&gt;Agent updates &lt;code&gt;active-work.md&lt;/code&gt; and &lt;code&gt;projects/spellcast.md&lt;/code&gt; with what it just did&lt;/li&gt;
&lt;li&gt;Next morning, the metrics cron updates &lt;code&gt;live-metrics.md&lt;/code&gt; with any traffic spike&lt;/li&gt;
&lt;li&gt;Tomorrow's Build in Public post references real numbers from that file&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One command. Eight platforms. Boost engagement. Metrics tracked. All coordinated through shared memory so the next agent knows exactly what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;5 MCP servers&lt;/strong&gt; registered, always available to every agent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;260+ tools&lt;/strong&gt; across Spellcast (140), Lunary (100+), Photos (22), Blog (6)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;16 shared memory files&lt;/strong&gt; for cross-agent coordination&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;40+ data sources&lt;/strong&gt; loaded by the Brand API based on query relevance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;10 projects&lt;/strong&gt; connected through the same infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 autonomous pipelines&lt;/strong&gt; (Content Creator + Prism) generating and publishing daily&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The total cost of running this locally: electricity for Ollama. The Brand API is free. The memory layer is free. MCP servers are free. Spellcast and the Content Creator run on my own infrastructure. The only paid API calls are DeepInfra fallbacks and Remotion rendering.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next in this series
&lt;/h2&gt;

&lt;p&gt;This article is the overview. In the next parts, I'll deep-dive into each layer with full code walkthroughs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 2: The context layer&lt;/strong&gt; - how shared markdown files give AI agents session continuity and multi-agent coordination&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 3: Automated content at scale&lt;/strong&gt; - the Content Creator pipeline, persona system, ML scoring, and Spellcast scheduling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 4: Building a local brand API&lt;/strong&gt; - Ollama with smart context injection and grimoire knowledge&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 5: The autonomous pipeline&lt;/strong&gt; - Prism's daily scout, curator, builder, publisher cycle&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;I'm Sammii, founder of &lt;a href="https://lunary.app" rel="noopener noreferrer"&gt;Lunary&lt;/a&gt; and indie developer building tools I actually want to use. I write about shipping products solo, the technical decisions behind them, and figuring it all out in public.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>webdev</category>
      <category>claudecode</category>
    </item>
  </channel>
</rss>
