[{"content":"I wanted a December tradition: a free digital advent calendar for friends, with a small puzzle behind every door. Not chocolate, not a prize draw, just a riddle, a cipher or a bit of code to work out each morning. Solving a door gives you a word. Collect every word and they form the key to a completion certificate with your name on it.\nAdvent is the engine that runs it. You write the puzzles, seal them, and it publishes a static site that opens one door a day.\nMy own calendar is live at advent.4sh.dev with two editions for this year: one for kids aged 5 to 8, and one for grown-ups. Both open on December 1st.\nThe landing page of my calendar: one card per edition, each with its own artwork and a countdown to the first door.\nWhat players see A calendar is a grid of doors. Each door is locked until its date, then open, then solved. Above the grid sits your key: one slot per day, filling in with words as you go.\nThe 24-door Christmas showcase. Ten doors are open, the rest show the date they open on. The key strip at the top is still empty.\nOpening a door shows the puzzle and an answer box. Puzzles come in a few kinds: teasers, code puzzles, ciphers, logic and image puzzles, trivia, and a meta puzzle that uses earlier answers. Hints unlock on their own schedule after the door opens, so someone who is stuck doesn&rsquo;t stay stuck for long.\nDay 2 of the Christmas showcase: a small cipher, an answer box and two hints waiting.\nWhen the last word is in, you type the name that goes on the certificate and it opens in the browser. You can print it (it fills a landscape page, A4 or US Letter) or download it as a PNG. The idea came from the medals and certificates of virtual challenges: not a big prize, but something to show you went all the way.\nThe certificate from the seven-door demo, unlocked by the words of every door.\nThe certificate doesn&rsquo;t have to be the only reward. A calendar can also unlock downloads and links that appear under the certificate once it opens: a coloring book to print for the holidays, a few games for the kids, a wallpaper pack, a bonus puzzle. Like everything else, those files are encrypted, so they can&rsquo;t be grabbed early from the published site, and they&rsquo;re only downloaded when the player asks for them. Everyone who finishes gets the same rewards, so it suits gifts like these rather than one-off codes.\nProgress lives in the player&rsquo;s browser. A &ldquo;move your progress&rdquo; panel gives a short code to carry it to another device.\nNothing leaks early The part I cared most about was that nobody, including me, can peek. A calendar where you can open December 24th on December 1st by reading the page source is not much of a calendar.\nSo puzzles are never committed in plain text. Each day is written as a small folder (the puzzle in Markdown, plus the answers, the word and the hints), and the engine seals it before it goes into git. A sealed day can only be opened with a release key that lives in the CI secrets. Every night after midnight, a scheduled job builds the site with whatever days are due and deploys it. Days that aren&rsquo;t due yet simply aren&rsquo;t in the published site.\nAnswers don&rsquo;t ship either. The site only carries a lock for each day&rsquo;s word, and the player&rsquo;s answer is what opens it, right in the browser. A wrong answer opens nothing, and there is no list of correct answers to find. The certificate works the same way: it is encrypted with a key built from all the words in order, so the only way to read it is to have solved every door.\nMy first sketch had a tiny worker gating each day by date. Building the site on a schedule turned out simpler: no server, no database, and any static host can serve it.\nYour calendar, your brand The engine is one binary. Your calendar lives in its own private repository that pins an engine version and holds your brand (name, logo, light and dark palettes), a theme for each year, and every year&rsquo;s events. Days can be consecutive, every few days, workdays only, or on chosen dates.\nSeveral people can write puzzles together. An editors key lets authors reopen and edit any day, and an author who wants to stay surprised can skip that key and still seal their own days.\nThere is also a company edition for when a static site isn&rsquo;t enough: the same calendar, but for invited players only, with sign-in links by email, answers checked on a server, and an admin section to invite players, follow each day&rsquo;s completion and export the people who finished. It ships as a Docker image.\nTry it The demo has seven sample doors, all open, certificate included. The gallery shows a branded company calendar and a full 24-day Christmas one.\nTo build your own, the docs walk through writing a day, sealing it and deploying, and the code is on GitHub.\nThe engine is done enough for this year. The real work now is the puzzles, before December 1st.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-advent\/","summary":"<p>I wanted a December tradition: a free digital advent calendar for friends, with a small puzzle behind every door. Not chocolate, not a prize draw, just a riddle, a cipher or a bit of code to work out each morning. Solving a door gives you a word. Collect every word and they form the key to a completion certificate with your name on it.<\/p>\n<p>Advent is the engine that runs it. You write the puzzles, seal them, and it publishes a static site that opens one door a day.<\/p>","title":"Advent: A Puzzle Advent Calendar Engine"},{"content":"My sdd workflow works because I&rsquo;m there: I start each phase, read the plan, and check the result. The next question was what happens when nobody is there. Can a ticket in a project tracker turn into a merge request on its own, without anyone copying it into a terminal, and without taking the agent&rsquo;s word that it works?\nThat&rsquo;s agent-platform: a platform for building coding agents that work unattended. One Rust engine runs every agent. Each agent is a folder of configuration and skills, and each repo opts in with one file. The agent harness inside is Claude Code today, but very little of the platform depends on that: it could as well be Pi or Codex.\nThe split The whole design comes down to one rule: if a step must always happen the same way, it&rsquo;s engine code. If it needs judgment, it&rsquo;s the agent.\nThe engine (deterministic) The agent (judgment) Clones the repo and runs its setup Reads the ticket, the spec and the review threads Holds every token Holds none Enforces turns, time and budget Does the work its skills describe Runs the gate Calls only the tools it&rsquo;s granted Delivers: push, merge request, replies Asks a person when it&rsquo;s stuck I didn&rsquo;t write an agent loop. Coding harnesses already have one, with tools for reading, searching, editing and running commands that are built and tuned. A framework with its own loop around the model would mean rebuilding all of that, and a repo would lose the way developers already configure their agent locally: instructions, skills and hooks.\nAn agent-native SDLC Where the agents fit in the development cycle: a spec, reviewed until it&rsquo;s right, then the code, reviewed by the review agent and a person until it&rsquo;s right.\nThe agents don&rsquo;t replace the development cycle, they slot into it. The steps are the ones a team already has (a ticket, a spec, a merge request, a review), and the artifacts are the same ones people produce: a spec in the repo, a merge request with tests. Three agents run on the engine today:\nSomeone adds a spec label to a ticket. The spec agent reads the ticket, follows the cause across the repos it may read, and opens a merge request with a spec. A person reviews it. If it needs changes, they just comment, and the agent picks the comments up. Once it&rsquo;s merged, the ticket is marked ready. Someone adds a code label. The code agent starts from the merged spec, writes failing tests, then the code, and opens a merge request only if the gate passes. The review agent is asked to review it, and posts one thread per finding, next to any human comments. A person comments when they want a round of fixes, or merges. Once every repo&rsquo;s merge request is in, the ticket is done. Every step that moves the work forward is a person&rsquo;s decision. The code agent may ask the review agent for a review, but only a person can send the code agent back to work on it, so two bots can&rsquo;t talk themselves into a loop.\nA comment is a wake-up signal, not a job. The router waits for a few quiet minutes after the last comment, so a reviewer can finish writing before anything starts, and then one run answers every unresolved thread: eight comments make one run, not eight. A reviewer who doesn&rsquo;t want to wait can mention the agent directly, with an instruction (&quot;@code-agent add more tests for the error cases&quot;), which counts as a comment and a start at once. Each reply is marked as handled in the thread itself.\nThat&rsquo;s also why there&rsquo;s no database. The tracker is the memory: a status label on the ticket says where the work stands (working, needs info, failed, ready, done), the threads say what&rsquo;s been answered, the merge request&rsquo;s footer records what each run cost, and the logs hold the transcript.\nThe infrastructure: one run, end to end A code request through the infrastructure, from the label on the ticket to the merge request.\nThe tracker and the git host send webhooks to a small router on AWS: API Gateway in front of two Lambdas, with an SQS FIFO queue between them. The first Lambda verifies the webhook, drops the noise (edits, bot comments, system notes) and queues it, grouped by ticket so one ticket&rsquo;s work is handled in order. It never calls anything else, so it always answers within the trackers&rsquo; timeouts.\nThe second Lambda, the dispatcher, checks what the webhook alone can&rsquo;t tell: is the repo set up for agents, is the spec merged, is another run already working on this ticket? Each refusal is a comment on the ticket, so nobody is left guessing. A failure it can&rsquo;t turn into a comment, like AgentCore being unreachable, is retried and then lands in a dead-letter queue.\nIf everything checks out, the dispatcher starts an AgentCore Runtime session: a microVM running the engine, with Claude on Bedrock as the model. The session ID is derived from the ticket and the agent, so a second request for the same work lands in the same session instead of starting a parallel run.\nThe agent manifest An agent (a flavor, in the code) is a folder: a manifest, plus a folder of instructions and skills shaped exactly like the harness&rsquo;s own user folder. The engine copies that folder in as the harness&rsquo;s configuration, so a skill works the same in a run as on a laptop.\nThe manifest covers only what the skills folder can&rsquo;t. Here&rsquo;s the code agent&rsquo;s, slightly simplified:\nname: code-agent runtime: { envs: [base, ruby, rust, python] } claude: model: sonnet small_model: haiku tools: { allow: [Read, Edit, Write, Grep, Glob, Bash, Skill] } capabilities: # progress, ask_user and report_result are always on git: tools: [reply_to_thread, attach] reason: &#34;answers review threads and attaches screenshots, only if the gate passed&#34; browser: tools: [browser_navigate, browser_snapshot, browser_take_screenshot] setup: [&#34;mise install&#34;] gate: { tests: optional, on_fail: { retry_with_claude: 3 } } limits: { max_turns: 200, run_timeout: 2h, max_budget_usd: 10 } deliver: { branch: &#34;agent\/{ticket}-code&#34; } The other two are variations on it. The spec agent gets the strongest model, may only edit files under specs\/, may read up to five other repos from a map of services, and brings its own gate: a spec file with valid front matter must exist. The review agent is read-only: no shell, no edits, one tool to post a finding, and no gate, because it pushes nothing.\nThere&rsquo;s deliberately no workflow language. No conditions, no loops: the manifest picks from step types the engine implements, and templates only fill placeholders like {ticket}. The moment a YAML file grows an if, it&rsquo;s rebuilding CI.\nEach flavor deploys as its own AgentCore runtime, with its own IAM role and its own bot. That&rsquo;s a security decision more than an organizational one: a prompt injection in a ticket comment read by the review agent must not reach a token that can push code.\nThe project manifest A repo opts in with .agent\/config.yaml: how it builds, how it tests, and what the gate checks.\nstack: ruby setup: - &#34;bin\/setup --skip-server&#34; - &#34;npm ci&#34; test: all: backend: &#34;bin\/rails test&#34; frontend: &#34;npx vitest run --coverage&#34; file: &#34;test\/**\/*_test.rb&#34;: &#34;bin\/rails test {file}&#34; &#34;app\/javascript\/**\/*.test.ts&#34;: &#34;npx vitest run {file}&#34; lint: [&#34;bin\/rubocop&#34;] gate: coverage: - { report: coverage\/coverage.xml } test.all is the full suite, one gate check per entry. test.file says how to run a single test file of each kind, which the red-before-green check needs. The engine refuses any key it doesn&rsquo;t know, by name, so a typo fails before a run instead of silently turning a check off. And the same gate runs on a laptop with one command, so a team can see what the agent will be held to before it ever runs.\nEnvironments, with mise stack: ruby picks an image. The images are layered:\nagent-base: the engine, the pinned harness binary, every flavor, and the settings no flavor or repo may change. No toolchain. env-base: adds mise, Postgres, Redis, a headless browser for screenshots, and the build dependencies for compiling a toolchain. env-ruby, env-python, env-rust: env-base plus the recommended versions of that language, installed with mise and baked in. mise is what makes one image per language enough. The image bakes the versions most repos use, and when a repo pins another one, mise install adds it at the start of the session. The run uses exactly the versions a developer gets locally from the same mise.toml.\nAgentCore shaped the rest. There&rsquo;s no Docker inside the microVM, so the repo&rsquo;s services run as plain processes, started by the repo&rsquo;s own setup. And an image must stay under 2 GB, which is why the browser is the headless shell only and the prebuilt Rubies are stripped of their debug info. A release refuses to publish an image over the limit, instead of finding out at deploy time.\nThe MCP bridge Ticket text is untrusted input, and the agent can read a lot of code. That makes prompt injection a real concern, so the agent never holds a credential.\nTwo Unix users enforce it. The engine runs as one and reads its tokens from Secrets Manager. The harness, the repo&rsquo;s commands and the browser all run as another, which can&rsquo;t read the engine&rsquo;s environment or memory. The engine switches users through file capabilities rather than root.\nEverything the agent needs from the outside goes through an MCP server hosted by the engine itself, on localhost, with a token minted for that run. It&rsquo;s the only way the agent acts beyond its files, and it registers only the tools the manifest grants. The harness is started with a strict MCP config, so a repo can&rsquo;t bring its own servers either.\nTools come from a capability catalog, and each has a kind:\nRead tools run right away: search other repos, clone one read-only, report progress. Intent tools are recorded, not executed: reply to a review thread, attach a screenshot, comment on a ticket. The engine sends them at delivery, only if the gate passed. Each needs a stated reason in the manifest. A capability can be built into the engine (the git host, the tracker, chat, monitoring) or be an upstream MCP server the engine proxies, holding the credential on the agent&rsquo;s behalf. Either way the agent sees one MCP server and no secrets. It&rsquo;s the same pattern as the runner in HiveLabs, tightened with intents.\nThe result: the agent can&rsquo;t open a merge request with failing tests, and it can&rsquo;t reply &ldquo;fixed&rdquo; to a review comment without a push behind it.\nThe gate The gate runs after the agent says it&rsquo;s done, before anything leaves the sandbox. It&rsquo;s the same idea as the gates in sdd, except the engine runs it, so there&rsquo;s nothing to skip.\nTests: every entry of the repo&rsquo;s suite, on the final code, all of them even when one fails, so the report shows everything. Lint: whatever the repo considers its bar. Red before green: every new or changed test file must fail on the code from before the change. Coverage: each report can&rsquo;t drop below its baseline, measured before the agent starts, unless the agent gives a reason, which goes on the merge request. This only works because the agent owns its test loop. The usual setup is to push and let CI report what broke, which means a new round for every failure and no way to write a failing test first. Here the sandbox has the database, the cache and the browser the repo needs, so the agent works tests first, runs migrations and takes screenshots of visible changes. CI still runs after the push, and it&rsquo;s still the authority. The gate is what keeps unproven work from reaching it.\nIf the gate fails, the engine resumes the agent&rsquo;s session with the failing checks and their output. If it still fails, the work isn&rsquo;t thrown away: it goes on a draft merge request, marked as not ready, with the failing checks at the top. No reviewer is asked, and none of the intents are sent.\nTwo lessons came out of building it:\nA test can fail for the wrong reason. Red before green sounds simple: run the new test on the old code and check that it fails. But if the old checkout is missing the frontend&rsquo;s dependencies, every frontend test fails there, including one that asserts nothing. So the check first runs a control, an unchanged test of the same kind, on the old code. It must pass; if it doesn&rsquo;t, the failure is a setup problem, not proof. Proving that a test fails also needs proof that it could have passed.\nA check with no baseline always passes. If the engine can&rsquo;t read a coverage report before the run, there&rsquo;s nothing to compare against, and &ldquo;coverage didn&rsquo;t drop&rdquo; is true by default. So a missing baseline stops the run before the agent starts, with an error naming the report.\nAsking a person Nobody watches a run, so a question can&rsquo;t wait for an answer inside the sandbox. The harness&rsquo;s own way of asking the user is turned off in the settings no flavor can change. The only way to ask is a platform tool that ends the run.\nThe engine, not the agent, decides where the question goes. Early on, with nothing worth keeping, it&rsquo;s a comment on the ticket. With work worth keeping, it&rsquo;s a draft merge request with one thread per question, so open questions block the merge. Either way the ticket is marked as needing info, someone answers where the question is, and the next run reads the answer. A fixed rule is predictable and testable; letting the agent pick isn&rsquo;t.\nThe harness is a detail Here&rsquo;s what&rsquo;s specific to Claude Code: one module that starts the CLI headless and reads its streamed output, a settings file baked into the image, and the shape of the skills folder. Everything else sits next to the harness, not inside it. The gate runs commands. The bridge is plain MCP, which every serious harness speaks. Delivery is git and an API. The manifests describe a run, not a model.\nSwapping in Pi or Codex would mean a new adapter, a different settings file and porting the skills, not a new platform.\nTesting the agents, not just the code The engine has ordinary tests, with a scripted stand-in for the harness so a full run can be checked without calling a model. The agents themselves get evals: sample repos in Rails, Python and Rust with tasks to do, tests the agent never sees, and a read-only judge. A change to a skill is measured against those, not judged on one lucky run.\nEverything also runs on my own machine. Floci, an open-source AWS emulator, stands in for API Gateway, Lambda, SQS, Secrets Manager, S3, ECR and the AgentCore control plane, and a small local server answers AgentCore&rsquo;s invoke API by starting the session&rsquo;s container. The engine has no special path for any of it: an endpoint URL is the only difference. So the end-to-end tests run the real binaries: a webhook goes through the Lambdas and the queue, a session starts, the agent works through a local model gateway, and the test waits for the merge request.\nWhere it stands It&rsquo;s early, but every piece has run for real: the router as Lambdas, the agents in AgentCore on Bedrock, and the whole flow end to end at home on Floci. The limits in the manifests are starting values, to tune once there&rsquo;s a history of real runs. The repository is private for now.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-agent-platform\/","summary":"<p>My <a href=\"\/posts\/2026\/building-sdd-plugin\/\">sdd workflow<\/a> works because I&rsquo;m there: I start each phase, read the plan, and check the result. The next question was what happens when nobody is there. Can a ticket in a project tracker turn into a merge request on its own, without anyone copying it into a terminal, and without taking the agent&rsquo;s word that it works?<\/p>\n<p>That&rsquo;s <strong>agent-platform<\/strong>: a platform for building coding agents that work unattended. One Rust engine runs every agent. Each agent is a folder of configuration and skills, and each repo opts in with one file. The agent harness inside is Claude Code today, but very little of the platform depends on that: it could as well be Pi or Codex.<\/p>","title":"agent-platform: Coding Agents That Work Unattended"},{"content":"Two weeks ago I wrote about Idle Beekeepers and mentioned it was a spin-off of a bigger game. This is that game.\nBeekeepers is a calm management game about real beekeeping, built in Godot, and it&rsquo;s close to the end.\nThe field in spring: two hives, planting plots, and a banner saying what needs doing next and when.\nSame world, different game Both games start the same way: you quit your desk job, spend your savings on a run-down farm, and begin with one hive. They share research, books and many balance numbers. But they&rsquo;re different games on purpose.\nIdle Beekeepers grows into a business, with staff, a brand and contracts. Beekeepers deliberately doesn&rsquo;t. It stays a keeper&rsquo;s game: you look at your hives, read the signs, and decide what each colony needs. The idle game&rsquo;s business side was considered for this one and turned down, because it would turn a beekeeping game into a management game.\nIdeas went both ways, though. The idle game borrowed this game&rsquo;s numbers. This game later borrowed back the idle game&rsquo;s climates, the Asian hornet, and Tom, the farmer down the lane who shows you around. The quick game ended up being a design lab for the slow one.\nA real hive, simulated The simulation came first. Before there was a single scene, there was a model of a colony: brood, the queen&rsquo;s age, mites, foraging, swarming, winter stores, and the weather and seasons that drive all of it. It runs without any graphics, which means it can be tested on its own and played thousands of times by scripts.\nOn top of that, the game covers what a real keeper deals with: robbing and wasps, mice, bears in the northern region, the Asian hornet on the Mediterranean coast, disease, dearths in late summer, and colonies that don&rsquo;t make it through winter.\nThe design rules are short:\nNever punish absence. Deadlines are windows, and a long break pauses the world. The hive tells you when it needs you. Doing nothing is the right move when nothing is asked. Realism is the content. Someone who finishes the game should roughly know how to keep bees. Dead colonies that explain themselves When a colony dies, the game tells you why. The hive shows a &ldquo;What happened&rdquo; card built from the colony&rsquo;s history: what killed it, how the numbers changed over its last weeks, whether the farm ever warned you, and which chapter of which in-game book covers the problem.\nA dead colony&rsquo;s post-mortem: mites overran it, they were never counted or treated, and the book that would have helped.\nThis is the feature I&rsquo;d point to if someone asked what makes it a beekeeping game and not a farming game with bees in it. In real beekeeping you often find out in March what you did wrong in August. The game keeps that delay, then explains it.\nChecking it against reality A lot of the work went into checking the simulation against real beekeeping rather than against my intuition. Scripts play over a thousand beginner farms, each making different mistakes, to check that each mistake costs about what it would in real life.\nThat kind of measuring is also honest when the game has to bend reality. Swarming is a good example. The real lever a keeper has is giving the queen more room to lay, and the game models that. But the measurements showed beginners almost never got that far, so swarming would have been brutal for new players. The game keeps a rule that softens it, and calls it what it is: a playability choice, not biology.\nHow it&rsquo;s built It&rsquo;s Godot with GDScript, exported for the web first, with phones and desktop to follow. The art is low-poly 3D with a fixed camera, plus hand-drawn line icons.\nTesting is a big part of it: thousands of unit tests for the simulation, and scripted &ldquo;clips&rdquo; that play through the real interface, tapping and scrolling and advancing time, then check what&rsquo;s on screen.\nA frame from the trailer, &ldquo;One hive, one year&rdquo;.\nHow close is the end? Most of the planned game is built, from the first hive to wax, mead, extra land, pollination contracts and three regions with their own weather and threats, along with what&rsquo;s needed for a public web release.\nWhat&rsquo;s left is mostly decisions only I can make, and a mobile release. I&rsquo;ll write again when it&rsquo;s out.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-beekeepers-godot\/","summary":"<p>Two weeks ago I wrote about <a href=\"\/posts\/2026\/building-idle-beekeepers\/\">Idle Beekeepers<\/a> and mentioned it was a spin-off of a bigger game. This is that game.<\/p>\n<p><strong>Beekeepers<\/strong> is a calm management game about real beekeeping, built in Godot, and it&rsquo;s close to the end.<\/p>\n<figure>\n    <img loading=\"lazy\" src=\"field.jpg\"\n         alt=\"The field in spring: two hives, planting plots, and a banner saying what needs doing next and when.\"\/> <figcaption>\n            <p>The field in spring: two hives, planting plots, and a banner saying what needs doing next and when.<\/p>","title":"Beekeepers: Simulating a Real Hive in Godot"},{"content":"I now have four things that ship releases: Codex, Codex Reader, Tsundoku and Idle Beekeepers. Their release notes were spread across GitHub releases, the App Store, and a private repository nobody else can see. So I built one page for all of them: updates.4sh.dev.\nOne card per project with its current version, and the latest updates across all of them.\nHow it works It&rsquo;s a static site. Once a day, a scheduled job imports new GitHub releases and App Store versions, keeps the features and fixes, and drops the noise (refactors, tests, chores). Each project gets a page with a short description and its full history.\nA project page: what the app is, then every update.\nThe part that matters: a feed for Codex The site also publishes a feed for each project, and Codex 2.7.0 now reads it.\nOnce a day, a Codex server downloads the Codex and Codex Reader feeds. Admins get a news icon in the header with an unread marker, and a drawer with the release notes. The sidebar shows the running version, and when a newer one exists it shows something like v2.6.3 \u2192 2.7.0. Clicking it lists what changed in every version in between.\nI was careful about privacy here, because every self-hosted Codex will make this request:\nIt&rsquo;s a plain download of a static file, with nothing that identifies the server or its version. &ldquo;Is there an update?&rdquo; and &ldquo;what&rsquo;s unread?&rdquo; are worked out locally, on your server. If it fails, nothing breaks: a server without internet access just shows an empty drawer. One setting turns it off entirely, and then no request is made at all. The feed is also a promise. Every Codex release with this feature will keep requesting it for years, so its address and format can&rsquo;t change in a way that breaks them.\nIt&rsquo;s a small project, but it closes a gap that matters for anything self-hosted: telling people a new version exists without learning anything about their server.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-updates-site\/","summary":"<p>I now have four things that ship releases: <a href=\"\/posts\/2026\/codex-nine-months-in\/\">Codex<\/a>, <a href=\"\/posts\/2026\/building-codex-reader\/\">Codex Reader<\/a>, <a href=\"\/posts\/2026\/tsundoku-after-v1-10\/\">Tsundoku<\/a> and <a href=\"\/posts\/2026\/building-idle-beekeepers\/\">Idle Beekeepers<\/a>. Their release notes were spread across GitHub releases, the App Store, and a private repository nobody else can see. So I built one page for all of them: <a href=\"https:\/\/updates.4sh.dev\/\">updates.4sh.dev<\/a>.<\/p>\n<figure>\n    <img loading=\"lazy\" src=\"home.png\"\n         alt=\"One card per project with its current version, and the latest updates across all of them.\"\/> <figcaption>\n            <p>One card per project with its current version, and the latest updates across all of them.<\/p>","title":"One Changelog for Everything: updates.4sh.dev"},{"content":"Codex Reader is live on the App Store today. It&rsquo;s a native iPhone and iPad app for reading a Codex library: comics, manga and ebooks, from your own server, online or offline.\nHome, library, series, the comic reader, and reading stats. All screenshots use the app&rsquo;s built-in demo library.\nWhy build a native app at all Codex has a Komga-compatible API, so I&rsquo;d been reading on iOS with Komic, a good Komga client. Codex also has its own web app, which installs as a PWA.\nKomic was good to read with, but it only knows the Komga API, so it misses the Codex features I use: ratings, want-to-read, collections, read lists, release tracking, reading stats, etc&hellip; The PWA has all of those, but as a reader it was only ok-ish. The browser limits what a web app can do, especially offline.\nThe goal I wrote down before starting was simple: at least as good as Komic for reading the same volume, plus everything Codex can do.\nWhat&rsquo;s in 1.0 Formats: CBZ, CBR, PDF and EPUB. Reading modes: left-to-right, right-to-left, vertical, and webtoon (one continuous strip), with double-page spreads, pinch zoom, a scrubber with page previews, and the reading direction remembered per series. Your Codex library: home shelves, library grids with filters, search, collections and read lists you can edit, want-to-read, and the release inbox. Real offline reading: background downloads, a storage budget, and rules like &ldquo;keep the next few unread volumes downloaded&rdquo;. Progress made offline syncs when you&rsquo;re back. Sync: reading sessions sync both ways, and if you&rsquo;ve read further on another device, the app offers to catch up. Sign-in with a password, an API key, or your own identity provider, and several servers side by side. Admin from your phone: libraries, scans, jobs, plugins, sharing tags and backups. A demo library, so you can try the app before pointing it at a server. The EPUB reader, reader settings, and collections.\nOn iPad, the home screen gets the space it deserves.\nThe app is free to download and use: connect your server, browse, search, read online, and keep your progress in sync, with no time limit. A one-time purchase unlocks the rest: offline downloads, editing want-to-read, collections, read lists and metadata, and managing the server from your phone. Diagnostics are opt-in, and nothing is sent unless you turn it on.\nHow it&rsquo;s built It&rsquo;s a SwiftUI app, and its API client is generated straight from Codex&rsquo;s OpenAPI spec. That choice ended up changing the server more than the app: the spec had to become accurate enough for a generated client to trust it, which I wrote about in the Codex update. Comics are read straight from the archives on the device, which is what makes real offline reading possible.\nWhat&rsquo;s next Now that 1.0 is out, updates will be small and frequent, driven by daily reading, the same way Codex itself evolves.\nCodex Reader needs Codex 2.4.0 or newer. You can get it on the App Store, and Codex itself is on GitHub.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-codex-reader\/","summary":"<p><a href=\"https:\/\/apps.apple.com\/us\/app\/codex-reader-manga-comics\/id6801989441\">Codex Reader<\/a> is live on the App Store today. It&rsquo;s a native iPhone and iPad app for reading a <a href=\"\/posts\/2026\/codex-nine-months-in\/\">Codex<\/a> library: comics, manga and ebooks, from your own server, online or offline.<\/p>\n<figure>\n    <img loading=\"lazy\" src=\"codex-reader-strip.jpg\"\n         alt=\"Home, library, series, the comic reader, and reading stats. All screenshots use the app&rsquo;s built-in demo library.\"\/> <figcaption>\n            <p>Home, library, series, the comic reader, and reading stats. All screenshots use the app&rsquo;s built-in demo library.<\/p>\n        <\/figcaption>\n<\/figure>\n\n<h2 id=\"why-build-a-native-app-at-all\">Why build a native app at all<\/h2>\n<p>Codex has a Komga-compatible API, so I&rsquo;d been reading on iOS with Komic, a good Komga client. Codex also has its own web app, which installs as a PWA.<\/p>","title":"Codex Reader: A Native iOS App for My Library"},{"content":"Idle Beekeepers is a slow idle game about keeping bees the way beekeepers really do. It plays in your browser and installs like an app.\nYear 9: forty colonies, a honey house, a workshop and a cellar.\nThe premise You&rsquo;re a burnt-out office worker. One day a parcel arrives: a second-hand beekeeping book from your aunt. No letter, just a line on the flyleaf: &ldquo;You always did like a system you could watch work.&rdquo;\nYou read it for a year. Then you quit your job and buy a run-down farm at the end of a lane, with one overwintered colony and a few jars of last year&rsquo;s honey.\nFrom there it&rsquo;s twenty-odd years of seasons. One hive becomes a few, then a real apiary with out-yards, staff, a honey house, a workshop, candles and mead, a brand, contracts. Near the end, money stops being the point, and you&rsquo;re paying for hedgerows across the county, a bee school, and a foundation that keeps the county&rsquo;s bees healthy after you. Then one Tuesday at the co-op, someone is standing at the counter looking the way you did. You give them the book.\nReal beekeeping, as the rule The design rule was simple: when in doubt, follow real life.\nColonies die of mites, starvation, queen failure or robbing, at rates based on real winter-loss surveys. A careful keeper loses roughly one colony in eight over winter. Neglect loses most of them. You only know what you saw. A hive tells you nothing until you open it, and you can only open it on a warm, dry day. The rest of the time you heft the box to feel its weight and watch the entrance. Every hive card says when you last looked: &ldquo;seen 2 days ago, it may have changed&rdquo;. Mite treatment is a course over weeks, not an instant fix, and swarms come in late spring, like the real thing. Every book in the game is real beekeeping, chapter by chapter. Reading one is how new work opens up. The same books are published as a wiki. Year 1, spring. One colony, and a list of things to do before the first warm day.\nIdle, but slow It&rsquo;s an idle game in the Universal Paperclips sense: numbers matter, graphics don&rsquo;t, and the interface has to be excellent. But the pace is the seasons, not a clicker.\nYou don&rsquo;t buy robots. You hire people. Each hire takes over a job, does it less carefully than you would, and costs a wage. Throughput goes up, precision goes down. Staff also speed up the calendar, so the game gets faster as the farm grows.\nTime is computed from the real clock, not from ticks, so closing the tab and coming back lands you on exactly the right day with exactly what would have happened. Pausing really pauses, even while the game is closed. And there&rsquo;s a button for &ldquo;pause until the next warm day&rdquo;, because that&rsquo;s what beekeeping mostly is.\nThe home yard in year 9. Each hive has a status dot: green is fine, amber needs checking, red needs you. Tiles are Kenney&rsquo;s Tiny Town (CC0).\nWinter is the reckoning. You count what survived, and what you learned carries over into the next year as techniques and stock genetics. Losing colonies costs you time, never permanent progress.\nTom The first version assumed players would figure things out the way idle-game players do. They didn&rsquo;t. New players didn&rsquo;t know what to do first, or why they&rsquo;d want a book about mites.\nSo the game got a mentor: Tom, the old farmer down the lane who sold your aunt her first colony. Gruff, kind, few words. He walks you through your first week, then drops by during your first year whenever something happens for the first time: the first mites, the first swarm, the first harvest, the first winter.\nThe last release brings him back the spring after. He reacts to how your winter went (everything survived, some did, nothing did), points you towards splitting your colonies, and says goodbye.\nHow it was built It&rsquo;s TypeScript and React, with the game rules kept completely separate from the interface. That separation made the most useful thing possible: bots play the game. A handful of playtest bots, from careful to neglectful, play thousands of farms over many in-game years without a browser. Balance changes are judged on what happens to those farms, not on how a change feels in one playthrough, and a check fails if the balance drifts without anyone deciding it should.\nThe same bots also make the marketing. The build plays farms to five stages of a career, takes screenshots, and builds the front page from them. The screenshots in this post come from there.\nThe game also has a full French translation, and every old save still loads in the latest version.\nSelling: set prices, fill the farm shop, take orders.\nWhere it stands It&rsquo;s at v0.52.0. I&rsquo;m happy with where it is, and I&rsquo;m leaving it there for now.\nIdle Beekeepers is a spin-off. It started as a quick experiment set in the world of a bigger beekeeping game I&rsquo;ve been building in Godot, with its numbers borrowed from that game&rsquo;s balance data. That one&rsquo;s a different kind of game, and it gets its own post.\nPlay it in your browser. Your farm is saved on your device.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-idle-beekeepers\/","summary":"<p><a href=\"https:\/\/beekeepers.4sh.dev\/\">Idle Beekeepers<\/a> is a slow idle game about keeping bees the way beekeepers really do. It plays in your browser and installs like an app.<\/p>\n<figure>\n    <img loading=\"lazy\" src=\"og.jpg\"\n         alt=\"Year 9: forty colonies, a honey house, a workshop and a cellar.\"\/> <figcaption>\n            <p>Year 9: forty colonies, a honey house, a workshop and a cellar.<\/p>\n        <\/figcaption>\n<\/figure>\n\n<h2 id=\"the-premise\">The premise<\/h2>\n<p>You&rsquo;re a burnt-out office worker. One day a parcel arrives: a second-hand beekeeping book from your aunt. No letter, just a line on the flyleaf: <em>&ldquo;You always did like a system you could watch work.&rdquo;<\/em><\/p>","title":"Idle Beekeepers: A Slow Game About Real Bees"},{"content":"This project started back in 2022, when I built air quality monitors connected to Home Assistant: small devices running on solar panels and batteries.\nThe idea behind them was bigger than air quality. Sensors like these could watch a greenhouse and act on it, track the weather, or monitor pretty much anything you care about. What really interested me was applying that to beekeeping and farming. In 2025 I took a step in that direction, monitoring my plants over LoRa, a long-range radio, with a valve for watering. Then both projects sat there.\nThis month I picked it all back up, with a bigger goal. Instead of a pile of integrations around Home Assistant, it&rsquo;s becoming a standalone system that works on its own. It&rsquo;s called thetalink for now. That&rsquo;s a codename, not the final name.\nThe hub&rsquo;s overview: what needs attention first, then every sensor at a glance. This is simulated data, during a smoke event.\nWhat it is thetalink is a long-range sensing and automation platform for properties bigger than a backyard: a big garden, a homestead, a small farm.\nIt has two parts:\nA hub: a small box with a LoRaWAN gateway and all the software, running on site. Sensor and actuator nodes: battery-powered devices spread across the property, talking to the hub over LoRa, which reaches much further than Wi-Fi. The idea that drives everything: far-reaching senses, local brain. Monitoring, alerts and automation all run on the hub, with no internet needed. A cloud option for remote access and backups may come later, but nothing depends on it.\nWhy not just buy something? When I looked at what exists, I found a gap:\nConsumer gadgets are cheap, but they reach about a hundred meters, limit how many sensors you can add, and keep the smart features in the vendor&rsquo;s cloud. Commercial agricultural systems have the range, but they&rsquo;re priced and built for large farms, and they&rsquo;re cloud-first too. Do-it-yourself LoRa works, but it takes radio, firmware and server skills, and what you get at the end is graphs, not answers. What I want is the last part done differently: not graphs, but answers. &ldquo;Frost tonight in the lower field.&rdquo; &ldquo;Smoke outside, close the windows.&rdquo; &ldquo;Zone 2 needs water.&rdquo;\nWhere it is now So far that means the core of the system, and one real sensor to go with it.\nThe first node is an air quality sensor: temperature, humidity, UV and fine particles. Air quality is a good test of the &ldquo;answers, not graphs&rdquo; idea. The hub doesn&rsquo;t just show raw particle counts. It corrects them and turns them into an air quality index you can act on, and when smoke shows up at several sensors at once, you get one alert that says &ldquo;smoke at 5 places&rdquo;, not five separate ones.\nThe hub software already does the basics properly:\nAlerts that can be acknowledged or snoozed, that reopen if things get worse, and that show the readings behind them. Device health: battery, signal, and sensors that seem stuck. Notifications to my phone. A topology view that shows which gateway hears which sensor, and how well. The topology view: which gateway hears each sensor, and how strong the signal is. The orchard sensor is heard by both gateways.\nThere&rsquo;s also a simulator that can play out scenarios (a smoke event, a dying battery, a sensor going quiet) against the real software, so I can build and test the whole thing before every piece of hardware exists. Every screenshot in this post comes from it.\nHow it&rsquo;s built The hub is the same shape as my other projects: a single Rust binary with a web interface built in, and a standard open-source LoRaWAN network server alongside it rather than writing my own.\nIt&rsquo;s also meant to be open: the hub software, the firmware, the radio protocol and the hardware designs each have an open license. Anyone should be able to bring their own sensors, or build their own.\nWhat&rsquo;s next The next step is hardware in the real world. Parts for an outdoor test node are ordered, built into an off-the-shelf box with a proper shield so the temperature reading isn&rsquo;t cooked by the sun. The plan is to leave it outside through the winter and see what breaks.\nAfter that: soil moisture, tank levels, frost alerts, and eventually closing the loop with watering, which is where this whole project started.\nIt&rsquo;s early, so the repository is private for now. It&rsquo;ll be public once there&rsquo;s something worth running.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/reviving-thetalink\/","summary":"<p>This project started back in 2022, when I built air quality monitors connected to Home Assistant: small devices running on solar panels and batteries.<\/p>\n<p>The idea behind them was bigger than air quality. Sensors like these could watch a greenhouse and act on it, track the weather, or monitor pretty much anything you care about. What really interested me was applying that to beekeeping and farming. In 2025 I took a step in that direction, monitoring my plants over LoRa, a long-range radio, with a valve for watering. Then both projects sat there.<\/p>","title":"Reviving an IoT Project: thetalink"},{"content":"In May I wrote Codex, Three Months In. Codex had just replaced Komga on my server, and the big new thing was release tracking.\nSince then: a 2.0 release, a new way of tracking reading progress, support for running several instances, and a native iOS client that&rsquo;s almost ready for the App Store. Here&rsquo;s what mattered.\nReading progress that doesn&rsquo;t go backwards The most important change is one you&rsquo;d never see in a screenshot.\nCodex used to store reading progress as &ldquo;where you stopped&rdquo; for each book. That&rsquo;s how most readers work, and it breaks as soon as you read on two devices. Read to page 60 on your phone, then let an old browser tab sync &ldquo;page 20&rdquo; a minute later, and your progress jumps back. The last device to sync wins, even when it&rsquo;s wrong.\nNow Codex keeps a log of reading sessions and works out your progress from that log, ordered by when you actually read, not by when a device happened to sync. Going back to re-read a chapter still works, because it&rsquo;s about time, not the highest page number. And a device only reports a position it actually reached, so a forgotten tab can&rsquo;t drag you back.\nA nice side effect: with a real history of reading sessions, reading stats came almost for free. Time read, pages, books finished, and a calendar heatmap.\nCodex 2.0 was about configuration People expect a major version to mean a big rewrite. Codex 2.0 was a small, deliberate break in one place: configuration.\nFor some settings, environment variables quietly lost to the config file, which is backwards from what anyone running it in Docker expects. 2.0 fixed the order and renamed the environment variables so they&rsquo;re unambiguous. The part I&rsquo;d defend hardest: Codex refuses to start if it sees an old variable name. Silently ignoring them would have meant the wrong port or default rate limits with no warning. To make the upgrade painless, the release before 2.0 shipped a command that lists exactly what would break.\nRunning more than one instance 2.0 also made Codex safe to run as several instances behind a load balancer, for example on Kubernetes.\nThe bug that forced this was almost funny: login with an external identity provider failed every single time with two instances. The login started on one instance and finished on the other, and the first instance kept its login state in memory. That state now lives in the database. Live updates got the same treatment: an edit on one instance now reaches people connected to the others.\nAround the same time, Codex gained a tool to migrate from SQLite to PostgreSQL, and optional OpenTelemetry tracing.\nGetting ready for an iOS app The last post ended with &ldquo;an iOS app to replace Komic&rdquo; on the roadmap. That became Codex Reader, a native SwiftUI app with its own repository, and it&rsquo;ll get its own post when it ships.\nBefore writing any Swift, I listed everything the app would need from the server and checked it against Codex. Only one thing was actually missing: resumable downloads of book files. Everything else existed. What didn&rsquo;t hold up was the description of the API. The app generates its client from Codex&rsquo;s OpenAPI spec, and that spec had enough mistakes that a generated client couldn&rsquo;t trust it. A lot of the 2.x work was making the spec accurate, plus a check that flags any change that breaks the API.\nBetter on the web too The web app kept improving alongside:\nOffline reading in the installable web app, with progress saved while offline and synced later, plus a proper mobile layout. Collections, read lists and want-to-read, including collections built from rules. Search with a fuzzy index and an advanced search page with saved filter presets. A better reader: transitions between chapters with auto-advance, swipe paging, and zoom. Advanced search: nested filters, presets and relevance sorting.\nThe home dashboard on a phone.\nPlugins Two new plugins matter:\nTsundoku releases: Codex now gets release information from Tsundoku, my discovery service, which in turn reads Codex to know what I own. MangaBaka recommendations: no account needed, based on similar tags and what other readers of a series also liked. Recommendations, with per-user filters.\nAI recommendations moved out of Codex The last post promised &ldquo;an AI-powered recommendation plugin&rdquo;. It didn&rsquo;t become a plugin. It became its own service, Shisho.\nShisho is an MCP server, so the AI part is whatever model I connect to it, usually Claude. It ties the other pieces together: Codex says what I own, what I&rsquo;ve read and how I rated it; Tsundoku says what&rsquo;s out there that I don&rsquo;t have yet; MangaBaka fills in the metadata. Shisho does all the matching between those sources itself, and leaves the model to do the part it&rsquo;s good at: reasoning about taste.\nIt keeps a taste profile that the model can propose changes to and I approve, and it logs every recommendation so I can say later whether it was a good one. Those verdicts feed back into the next round.\nShisho isn&rsquo;t public yet. It probably deserves its own post.\nWhat a real library teaches you The bugs I learned the most from were ones no test fixture would catch. Test data has series with three books. Real libraries have series with hundreds or thousands of volumes, where marking a whole series as read was slow enough to notice. An archive with one corrupt image made every page after it show the wrong picture, which looked exactly like a bad scan. Daily reading found them. Tests didn&rsquo;t.\nWhat&rsquo;s next Codex Reader on the App Store. A way for Codex to tell admins about new releases from inside the app. More release sources and metadata providers. The source is on GitHub, the docs are live, and the first post still explains why I built it.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/codex-nine-months-in\/","summary":"<p>In May I wrote <a href=\"\/posts\/2026\/codex-three-months-in\/\">Codex, Three Months In<\/a>. Codex had just replaced Komga on my server, and the big new thing was release tracking.<\/p>\n<p>Since then: a 2.0 release, a new way of tracking reading progress, support for running several instances, and a native iOS client that&rsquo;s almost ready for the App Store. Here&rsquo;s what mattered.<\/p>\n<h2 id=\"reading-progress-that-doesnt-go-backwards\">Reading progress that doesn&rsquo;t go backwards<\/h2>\n<p>The most important change is one you&rsquo;d never see in a screenshot.<\/p>","title":"Codex, Nine Months In"},{"content":"The sdd plugin is about what gets built and how it&rsquo;s verified. Its sibling, delegation, is about who does the work. It started as a few subagent definitions and some notes on model tiering, and grew into a plugin that can also send work outside the Claude account I&rsquo;m sitting in.\nMatching the model to the work The core of the plugin is a set of agents, each tied to a model tier that fits the kind of work it does:\na scout for read-only searches (&ldquo;where is this used?&rdquo;) and a test runner that runs a suite and reports, both on the cheapest tier; an implementer that executes a settled design, on the workhorse tier; a code reviewer on a stronger tier; an architect on the flagship tier, for genuinely hard design, and only when I&rsquo;ve agreed to pay for it. The rules that come with it are short:\nPay flagship prices for the thinking, workhorse prices for the typing. The architect produces a design a cheaper model can carry out. Never escalate silently. The expensive tier has to be asked for, with a reason. Don&rsquo;t hand a vague brief to a cheap model. It will produce confident, wrong code that costs more to undo than writing it yourself. I also measured fan-out once instead of guessing. Splitting one mechanical job across three agents finished about twice as fast and cost about twice as many tokens. Parallel agents buy time, not savings, and you wait for the slowest one. That changed my default from &ldquo;parallelize everything&rdquo; to &ldquo;parallelize when someone is waiting&rdquo;.\nThree ways out of the session A subagent&rsquo;s model setting picks a model from the same provider and the same account. It can&rsquo;t send work anywhere else. So the plugin adds three &ldquo;lanes&rdquo;, each a small script with a thin agent in front of it:\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;edgeLabelBackground&#39;: &#39;#f8f9fc&#39;, &#39;clusterBkg&#39;: &#39;#eef2f9&#39;, &#39;clusterBorder&#39;: &#39;#4a6fa5&#39; }}}%% flowchart LR S[&#34;Claude Code session&#34;] --&gt; A[&#34;Another vendor&#39;s harness&lt;br\/&gt;e.g. Antigravity&lt;br\/&gt;(a second opinion)&#34;] S --&gt; B[&#34;A second Claude subscription&lt;br\/&gt;(questions or real work)&#34;] S --&gt; C[&#34;A local model&lt;br\/&gt;(bulk work that gets checked)&#34;] B -. &#34;returns a diff&#34; .-&gt; S C -. &#34;returns a diff&#34; .-&gt; S Another vendor&rsquo;s harness, like Google&rsquo;s Antigravity, answers one read-only question about the repository: a second opinion from a different model family, looking at the real files. A second Claude subscription can answer a question or do real work in the repository. It can&rsquo;t commit. The diff is what comes back, and I review it. A local model on my own hardware takes bulk work, but only work that something will check, like a test suite. A small model&rsquo;s mistakes are confident and hard to spot. That&rsquo;s fatal when nothing checks the result, and harmless when a test does. The second subscription also keeps a reserve: past a usage level I choose, it refuses work, and if usage can&rsquo;t be read, it refuses rather than guessing.\nThe lane nobody picked Here&rsquo;s the story I wanted to write this post for.\nAbout a week after the lanes were ready, I counted the subagent dispatches in one project: 540 dispatches, and not one to any lane. Everything was set up. Permissions were granted, the plugin was enabled, every lane probed as ready. Meanwhile, the agents described by the kind of work they do had been picked 65 times.\nThe cause was obvious once I saw it. A session picks an agent by matching the task in front of it against each agent&rsquo;s description. My lane descriptions led with who pays: &ldquo;runs on a second subscription&rdquo;, &ldquo;costs no quota&rdquo;. But &ldquo;billed somewhere else&rdquo; isn&rsquo;t a property of any task. No task ever looks like &ldquo;something that should be billed elsewhere&rdquo;, so the lanes never matched.\nThe fix was to rewrite every lane description to lead with the work it suits (&ldquo;implements a settled design across several files and returns a diff to review&rdquo;, &ldquo;runs a suite or makes a change that a command can verify&rdquo;) and push billing to the end. The session rules got a matching habit: name the lane you&rsquo;re using in one line and go, without stopping to ask, because a default I can veto is better than a question I have to answer.\nThe lesson goes beyond this plugin: describe tools by the problems they solve, not by their properties. A model matches tasks to descriptions. If your description doesn&rsquo;t sound like a task, nothing will match it. It&rsquo;s too early to say how much the rewrite changed the numbers. I&rsquo;ll write that up once there&rsquo;s enough data.\nThings that looked fine and weren&rsquo;t Most of the bugs in this plugin had the same shape: something looked configured, reported success, and did nothing.\nShared logins that logged each other out. The first design shared one login between several config directories. Refresh tokens can only be used once, so the first refresh quietly invalidated the others, and eventually every directory was signed out. Each directory now has its own login. I found that by breaking a real login, not by reasoning about it. A setup check that always passed. It printed a clear verdict and then exited successfully no matter what, so every script relying on it was reading a constant. A relay that answered instead of refusing. On the cheapest tier, the agent meant to forward questions to Antigravity would answer them itself when Antigravity wasn&rsquo;t installed, and report success. Moving it up a tier fixed it. The fix was the same each time: stop trusting the status, and go check the behavior.\nThe task loop The newest piece is a procedure for what happens after a review comes back with problems: fix, review again, with a hard cap on rounds. Later rounds go to a fresh agent on a stronger model rather than the same one, because an agent that&rsquo;s already failed tends to defend its first approach. At the cap, the remaining issues get a decision instead of another loop.\nIts first real run proved its own point. The work passed its tests, and review still found that it didn&rsquo;t meet the spec, plus a crash the change had introduced. Passing tests aren&rsquo;t proof the work is right, and a fix needs reviewing as much as the work it fixes.\nWhere it&rsquo;s at delegation lives next to sdd in my private plugin marketplace. It&rsquo;s mostly prompts and a handful of shell scripts.\nIf I had to sum it up: routing work between models is easy to configure and hard to get used. The configuration was never the problem. Whether the model would ever choose it was.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-delegation-plugin\/","summary":"<p>The <a href=\"\/posts\/2026\/building-sdd-plugin\/\">sdd plugin<\/a> is about <em>what<\/em> gets built and how it&rsquo;s verified. Its sibling, <strong>delegation<\/strong>, is about <em>who<\/em> does the work. It started as a few subagent definitions and some notes on model tiering, and grew into a plugin that can also send work outside the Claude account I&rsquo;m sitting in.<\/p>\n<h2 id=\"matching-the-model-to-the-work\">Matching the model to the work<\/h2>\n<p>The core of the plugin is a set of agents, each tied to a model tier that fits the kind of work it does:<\/p>","title":"Building delegation: Routing Work Across Models, Accounts and a Local GPU"},{"content":"Since I introduced Tsundoku in June, most of what changed is small, but one thing is worth a post: Tsundoku and Codex now talk to each other in both directions.\nCodex and Tsundoku, both ways In June the integration went one way. Tsundoku read Codex&rsquo;s series index (read-only, with an API key) so it could mark which series I already own and focus on the ones I don&rsquo;t.\nNow it goes the other way too.\nTsundoku feeds Codex. Tsundoku knows which volumes and chapters are available for each series. A new Codex plugin asks it about the series I track, and new volumes show up in Codex&rsquo;s release inbox next to the other release sources. Series are matched by their IDs on metadata sites like MangaBaka and AniList, never by title, so a similar name can&rsquo;t cause a false match.\nCodex links to Tsundoku. A series in Codex now has a button that opens its page in Tsundoku.\nThe result is one loop. Tsundoku finds series I don&rsquo;t own yet. Once I start collecting one and track it in Codex, Tsundoku&rsquo;s data tells Codex when new volumes come out.\nFinding what the feed doesn&rsquo;t show The rest of the update is about series that never appear in the release feed, such as something I heard about whose last release was years ago:\nWishlist. I can add a series straight from MangaBaka, even if Tsundoku has never seen a release for it. Per-series search. A button on the series page searches for releases by the series&rsquo; titles, including alternate and non-Latin ones. Results go through the normal matching pipeline, so nothing is linked by force. Paste a URL. If I already know the post, I can paste its link and Tsundoku imports just that release. Smaller additions: a mobile layout, bulk actions on series cards, and a catalog export (JSON, CSV or Markdown) meant for handing my backlog to an LLM and asking what to read next.\nThe browse page. It hasn&rsquo;t changed much on the surface; most of the work was underneath.\nThe code is on GitHub and the docs are at tsundoku.4sh.dev.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/tsundoku-after-v1-10\/","summary":"<p>Since I <a href=\"\/posts\/2026\/building-tsundoku\/\">introduced Tsundoku<\/a> in June, most of what changed is small, but one thing is worth a post: Tsundoku and <a href=\"\/posts\/2026\/codex-three-months-in\/\">Codex<\/a> now talk to each other in both directions.<\/p>\n<h2 id=\"codex-and-tsundoku-both-ways\">Codex and Tsundoku, both ways<\/h2>\n<p>In June the integration went one way. Tsundoku read Codex&rsquo;s series index (read-only, with an API key) so it could mark which series I already own and focus on the ones I don&rsquo;t.<\/p>\n<p>Now it goes the other way too.<\/p>","title":"Tsundoku Update: Closing the Loop with Codex"},{"content":"Almost every project I&rsquo;ve written about this year, Codex, Tsundoku, Kiln, Mnemo, was built the same way: a PRD, broken into phase specs, broken into task files, implemented one task at a time with Claude Code doing most of the typing.\nThat workflow started as a handful of personal slash commands, and it&rsquo;s now a proper Claude Code plugin called sdd. This post is about what it does, and about the part that took the most work: making it enforce itself.\nPlans live in their own repository The one idea everything else is built on: plans, specs and task files live in their own git repository, nested inside the code repository and ignored by it.\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;edgeLabelBackground&#39;: &#39;#f8f9fc&#39;, &#39;clusterBkg&#39;: &#39;#eef2f9&#39;, &#39;clusterBorder&#39;: &#39;#4a6fa5&#39; }}}%% flowchart TB subgraph CODE[&#34;Code repository&#34;] direction TB SRC[&#34;Source, tests, docs&#34;] subgraph SPECS[&#34;Spec repository (nested, ignored by the code repo)&#34;] direction LR PRD[&#34;PRD&#34;] --&gt; SP[&#34;Phase specs&#34;] --&gt; TK[&#34;Task files&#34;] end end The planning history and the product history never touch. The code repo&rsquo;s history stays about code, planning can churn as much as it likes, and a fresh agent session can read the whole plan without the plan being part of the product.\nIt also leads to the plugin&rsquo;s most opinionated rule: never put planning identifiers in committed code. No &ldquo;see phase 3, task 4&rdquo; comments, no task IDs in commit messages. Anyone who only has the code can&rsquo;t follow those pointers. Write the actual reason instead.\nThe workflow The pipeline goes from idea to merged code:\nBrainstorm an idea into an approved design, with a few questions asked one at a time. Plan or generate specs from a PRD, one spec per phase. Generate tasks from a phase spec. Each task has acceptance criteria and a verification command. Implement tasks one at a time. Converge: compare what the task files claim against what the code actually contains. Write the commit and PR messages. Around that core there are commands to clarify ambiguous documents, to check documents against each other, and to write a handoff that captures what would otherwise be lost when a session ends.\nThe generators are deliberately unwilling to guess. When a spec doesn&rsquo;t say something, they leave a &ldquo;needs clarification&rdquo; marker, and implementation won&rsquo;t start on a section that still has one.\nNot everything deserves a PRD After months of using the personal version, I noticed that every change paid full ceremony. A one-line config fix got a task file, because nothing said when not to.\nSo there&rsquo;s now a short checklist: can you describe the change in one sentence, will it fit in one session, do you know what done looks like? Depending on the answers, work goes to the full pipeline, to a fast lane that records a single dated entry (what changed, why, and how it was verified), or to a bug lane that keeps diagnosing, fixing and verifying as separate steps.\nThe fast lane skips ceremony, not rigour. It still records how the change was verified.\nEnforcement is the interesting part Plenty of tools will write you a plan. What sdd adds is two hooks that refuse to let a session end while it&rsquo;s claiming something it hasn&rsquo;t done.\nThe spec-repo guard won&rsquo;t let a session end with uncommitted planning changes. If a task&rsquo;s status was never committed, it doesn&rsquo;t survive the session that invented it. The verification gate won&rsquo;t let a task be marked complete unless its verification command really ran and passed in that session, including when a subagent did the work. The second one sounds simple. It wasn&rsquo;t. When I attacked my first version on purpose, it accepted plenty of things that only looked like running the check. I wrote a failing test for each trick first, then fixed the gate until they all passed.\nThe gate has an honest limit, and the README says so: it proves the command ran and passed. Whether the command still tests the right thing is a question for review. No hook can answer that.\nTesting prompts sdd is mostly prompts: Markdown that tells a model what to do. Testing that takes a few layers:\nFast shell tests for the hooks and scripts. Prompt contracts: a list of sentences that must stay in the prompts, each with the reason it matters. An eval suite that runs real Claude sessions against sample projects and grades the results with deterministic checks. Each case runs three times and has to pass all three, because a 75% pass rate per run becomes about 42% across three runs in a row. The evals taught me the most humbling lesson of the project. For about a week, they had been grading the installed copy of the plugin, not the one I was editing. Every &ldquo;improvement&rdquo; I measured in that time was a copy compared against itself. I only found out by breaking a prompt on purpose and watching the eval still pass. Since then, a release is blocked if the plugin changed since the last full passing eval run, and a lint flags graders that can&rsquo;t fail.\nLearning from corrections When I correct the workflow during a session, I can mark that line, and a hook saves it to a learnings log, both for the project and across all projects.\nAn improver skill reads those logs and proposes one small edit to one prompt, with the evidence quoted. The same complaint from three projects counts for more than three from one. And it&rsquo;s gated on the evals: a change that lowers the score is rejected however sensible it sounds, and a change to a prompt no eval covers has to add the eval first.\nWhere it&rsquo;s at sdd lives with a few sibling plugins in my own plugin marketplace, on my private git server. The biggest sibling is the delegation plugin, which decides which model and which agent does what. That one gets its own post.\nWhat I&rsquo;d tell anyone building something similar: the workflow is the easy part. The value is in the places where the tool refuses, and in testing those refusals as hard as you&rsquo;d test anything else that guards your work.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-sdd-plugin\/","summary":"<p>Almost every project I&rsquo;ve written about this year, <a href=\"\/posts\/2026\/codex-three-months-in\/\">Codex<\/a>, <a href=\"\/posts\/2026\/building-tsundoku\/\">Tsundoku<\/a>, <a href=\"\/posts\/2026\/building-kiln\/\">Kiln<\/a>, <a href=\"\/posts\/2026\/building-mnemo\/\">Mnemo<\/a>, was built the same way: a PRD, broken into phase specs, broken into task files, implemented one task at a time with Claude Code doing most of the typing.<\/p>\n<p>That workflow started as a handful of personal slash commands, and it&rsquo;s now a proper Claude Code plugin called <strong>sdd<\/strong>. This post is about what it does, and about the part that took the most work: making it enforce itself.<\/p>","title":"Building sdd: A Spec-Driven Workflow That Enforces Itself"},{"content":"Every project I&rsquo;ve written about this year produced the same kind of leftover: decisions. Why Tsundoku identifies series the way it does. Why Codex plugins talk over stdio. Why the third attempt at a library server used SQLite. Each took an evening of thinking, and each lived in exactly one place: whatever chat window I had open at the time.\nThat&rsquo;s the problem Mnemo solves. The line at the top of its PRD is: context is the most valuable thing you produce, and it currently lives nowhere. It&rsquo;s spread across chat projects that don&rsquo;t talk to each other, markdown files I forget I wrote, and notes apps that no agent can reach.\nMnemo is a self-hosted memory and knowledge layer: one place for decisions, notes, snippets, links and files, that any tool I use can read from and write to, including the agents I work with every day.\nThe Mnemo feed, filterable by kind, tag, source and date. Screenshots use a fictional demo workspace.\nWhat goes in it Everything is an entry, and each entry has a kind: a note, a decision (context, decision, why, consequences), a memory (a durable fact), a code snippet, or a link. Entries have tags, can be linked to each other, and keep their history, so editing a decision doesn&rsquo;t erase what it used to say. Files sit alongside them, and their text is extracted so it&rsquo;s searchable.\nA decision entry. The structure is a convention, written in markdown.\nSaving has to be fast. If it takes more than a few seconds, I won&rsquo;t do it, and an empty memory is worth nothing.\nBuilt for agents first The interface I use most isn&rsquo;t the web UI, it&rsquo;s MCP. Mnemo is an MCP server with tools to search, read, create, update and link entries, and to upload and fetch files.\nIt&rsquo;s mainly used remotely, over HTTP with OAuth, so any MCP client that supports remote connectors can use it: Claude.ai, ChatGPT, Claude Code and others. Claude can check &ldquo;have I already decided how auth works in my Rust projects?&rdquo; before proposing something, or save a decision at the end of a design discussion. A small Claude Code plugin adds a few capture commands for the terminal.\nOAuth wasn&rsquo;t in the original plan. I started with simple API keys, which are great for scripts but not accepted by the chat apps I most wanted to connect. So Mnemo became its own OAuth server, with a consent screen and a page to see and revoke connected apps. It took a day, which says more about how well-specified OAuth is these days than about me.\nSearch Search combines two approaches: classic full-text search (built into SQLite), and optional semantic search that finds entries by meaning rather than exact words. The two result lists are merged, and each result shows which one found it.\nSearch results, each tagged with how it was found.\nSemantic search is strictly optional. Embeddings can come from a small model running inside Mnemo, from an external API, or not at all, and everything still works with full-text alone. While a model is still downloading, search just serves full-text results.\nLinks that fill themselves in The latest feature is small but changed how I use it: paste a bare URL, and Mnemo fetches the page in the background and fills in a title and summary. It only fills empty fields, so it never overwrites anything I typed, and it deliberately keeps things simple: no headless browser, just the page&rsquo;s own metadata.\nA link saved as a bare URL, after Mnemo filled in the details.\nThe shape of it It&rsquo;s the same shape as my other Rust projects: a single binary with the React web UI embedded, one SQLite file for everything (so backup is copying a file), and a CLI for adding, searching, exporting and importing.\nIt runs in single-user mode with API keys, or multi-user mode with login through an identity provider, each user&rsquo;s data kept separate.\nThe admin view: users, encryption status and the semantic search backend.\nThere&rsquo;s also optional encryption at rest, for the database and the files. Mnemo refuses to start if the encryption keys look wrong in any way. A memory store is exactly the kind of thing that should fail loudly rather than guess.\nA few things that fought back Not every dependency fits a tiny container. All my Rust projects ship as small static binaries. Mnemo couldn&rsquo;t, because the local embedding model needed a more standard system library, and then a newer version of it than my base image had. A good reminder that adding &ldquo;just one more feature&rdquo; can change how a project is packaged.\nScreenshots need a fake life. I wanted screenshots that look like real use without exposing my real notes, so Mnemo has a screenshot setup with a fictional startup, complete with its own decisions, postmortems and onboarding docs. Every screenshot in this post comes from it.\nWhere it&rsquo;s at The most useful thing about it isn&rsquo;t a feature. It&rsquo;s that the agents I work with now have somewhere to put things that outlives the conversation. The best capture flow turned out to be the laziest one: finish a design discussion with Claude, say &ldquo;save that as a decision&rdquo;, and move on.\nThe repository isn&rsquo;t public yet. When it is, I&rsquo;ll add a link here.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-mnemo\/","summary":"<p>Every project I&rsquo;ve written about this year produced the same kind of leftover: decisions. Why Tsundoku identifies series the way it does. Why Codex plugins talk over stdio. Why the third attempt at a library server used SQLite. Each took an evening of thinking, and each lived in exactly one place: whatever chat window I had open at the time.<\/p>\n<p>That&rsquo;s the problem Mnemo solves. The line at the top of its PRD is: <strong>context is the most valuable thing you produce, and it currently lives nowhere.<\/strong> It&rsquo;s spread across chat projects that don&rsquo;t talk to each other, markdown files I forget I wrote, and notes apps that no agent can reach.<\/p>","title":"Building Mnemo: A Memory Layer My Agents and I Share"},{"content":"Lovable, v0, Bolt: they all nailed the same loop. You describe an app in chat, an agent writes the code, and a live preview updates while you watch. It feels like magic the first time. Then you try to use it for something real at work and hit the wall: your prompts, your source, and your data all live on someone else&rsquo;s cloud.\nFor a lot of internal tools that&rsquo;s a non-starter. The prototype a PM wants to spin up touches customer records. The dashboard someone needs by Friday runs against a production-adjacent database. You can&rsquo;t paste that into a SaaS build tool and hope for the best.\nSo I built Kiln: the same describe-it-and-watch-it-build loop, self-hosted, with nothing leaving infrastructure you already run. No external SaaS dependency. It clones the Lovable build loop but supplies the database, the git backend, the deploy target, and the isolation itself, on top of the Kubernetes cluster, OIDC provider, and object storage you already have.\nThe Kiln workspace: describe a change on the left, watch the agent edit the code and the live app rebuild on the right.\nThis is the third in a run of agent projects I&rsquo;ve written up this year. 4shClaw and HiveLabs were about orchestrating teams of agents. Kiln is narrower and, honestly, harder: a single agent editing a real git repo, but wrapped in enough infrastructure that you&rsquo;d trust it near your data.\nThe Loop You start from the project picker: open an existing app, fork one, or start from a template or a curated example.\nThe project picker. Templates and examples seed the New Project flow so you&rsquo;re not staring at a blank prompt.\nName it, pick a starter template, and optionally toggle in a few additive features (auth pages, a calendar, file upload, a kanban board, a todo list, a signed webhook endpoint). The template you choose sets the project&rsquo;s shape: a pure static client, a React + PocketBase app, a hybrid with a Fastify server alongside PocketBase, or a self-contained TypeScript backend with no PocketBase at all.\nCreating a project: name it, choose a template, and toggle in additive features. The template picks the backend shape; the features scaffold real, owner-scoped functionality.\nPick the recommended template and you get a real project: a React + Vite + Tailwind frontend and an isolated PocketBase backend, committed to git. From there you just talk to it. &ldquo;Build a classic 3x3 tic-tac-toe game: two players take turns, detect a win or a draw, add a New game button, and a scoreboard above the board tracking X wins, O wins, and draws across the session.&rdquo; The agent reads the project conventions, thinks, edits the repo, commits, and the preview rebuilds and reloads. Every turn is a real commit on a real branch, not a diff floating in memory.\nWatch it work: the agent reads the project&rsquo;s conventions and structure first, then starts editing. The prompt that kicked it off stays pinned at the top of the transcript.\nThat &ldquo;committed to git&rdquo; is worth pausing on. Every Kiln project is a real repository, and Kiln hosts it itself: the platform runs its own internal Gitea, and each project is a repo on it. The builder clones that repo, the agent edits it, and the builder commits and pushes back. That repo is the source of truth for your app&rsquo;s code, not a database blob, not a scratch directory that evaporates when the preview sleeps. The git host is part of the platform rather than something you bring, and because it&rsquo;s a normal git host underneath, exporting or mirroring a project to an external remote is a straightforward feature.\nThat matters more than it sounds. Because the state of your app is a git history, you get restore anchors for free (every committing run drops a checkpoint you can roll back to), a Code tab that&rsquo;s just the working tree, and an export path that isn&rsquo;t a lie: it&rsquo;s already a repo.\nThe Code tab shows the real diff from a turn: here the agent updated the app and its tests, committed, and kicked off the preview deploy. No magic hidden state.\nA minute later, the preview is a working game. Click a cell and X drops in, the turn indicator flips to O, the scoreboard tallies wins across games, and New game clears the board, exactly what the prompt asked for, running live in the iframe against the project&rsquo;s own backend.\nFrom one paragraph to a playable app: scoreboard up top, X in the top-left, O to move. This is the live preview, not a mockup.\nThe One Decision Everything Hangs On Here&rsquo;s the part I&rsquo;m most opinionated about, and the thing that separates &ldquo;a fun demo&rdquo; from &ldquo;something you&rsquo;d run near real data.&rdquo;\nRunning an AI agent that writes and executes code is a security problem before it&rsquo;s a product problem. The agent needs credentials: a model token, a git token, database access. The app it builds needs to actually run somewhere so you can see the preview. If you let those two things share a process, then any code the agent writes (or any prompt injection that steers it) runs with the agent&rsquo;s credentials. That&rsquo;s the whole ballgame.\nSo in Kiln they are never the same process. Each project&rsquo;s data plane splits into two roles with a hard boundary between them:\nRole Credentialed? Job builder yes clones the repo, runs the agent, commits, pushes to the internal Gitea runner no installs, builds, and serves the live preview The builder holds the secrets. It gets the model token (filtered to an allow-list), a project-scoped git token, and a PocketBase admin token. It runs &ldquo;dark&rdquo;: telemetry is stripped before the agent subprocess even spawns. Platform-admin credentials are explicitly forbidden, and it will refuse to boot (throwing a CredentialScopeError) if a superadmin secret somehow leaks into its environment.\nThe runner is credential-free by construction. On boot it asserts that no model, git, or database secret exists anywhere in its environment and crashes immediately if one does. Its only source of truth is the committed code the builder handed it. It never talks to the model or the Gitea. As the internal note puts it, the runner &ldquo;holds nothing worth stealing.&rdquo;\nThis is the load-bearing wall of the whole system. The thing serving untrusted, AI-generated code on shared nodes has no secrets to leak. The thing with secrets isn&rsquo;t reachable by the preview. Everything else, publishing, sharing, custom domains, is built on top of that split staying intact.\nDesired State Lives in Postgres The second decision I keep coming back to: Kubernetes objects are not the source of truth. Postgres is.\nThe control plane (a stateless Fastify orchestrator) holds desired state in Postgres and runs a reconcile loop that converges the real world toward it. Want a project&rsquo;s preview running? There&rsquo;s a row for that. Reconcile loop notices the gap and provisions the workloads. Idle draft? A policy scales it to zero and releases its edit lock, and the same loop tears the compute down while keeping the data volume.\nScale-to-zero in action. An idle draft&rsquo;s preview gets reaped to save resources; your code and data are untouched, and resuming spins it back up.\nThe payoff is that provisioning goes through one backend-agnostic actuator interface with two implementations: one that drives Docker containers, one that drives Kubernetes Pods. Same reconcile logic, same hardening contract, same routing model, written once. docker compose up for the fast local loop; a kind cluster for the tier that actually matches production, with Calico-enforced network policies and ingress-by-subdomain.\nThat means &ldquo;works on kind&rdquo; isn&rsquo;t a hand-wave. Because the Kubernetes path is the production path, exercising it locally exercises the real thing: the reconciler, the NetworkPolicies, the ingress, the scale-to-zero. I&rsquo;ve been burned enough times by &ldquo;it worked in dev&rdquo; to want that property baked in.\nThe Backend You Don&rsquo;t Have to Think About Every project gets its own PocketBase: stock, pinned, and SHA-verified. It&rsquo;s the database, auth, and file storage, one small binary per project with a retained data volume.\nThe Data tab proxies straight into it, so you can browse collections, edit records, and import or export CSV without leaving the workspace. When the agent adds a feature that needs persistence, it writes a PocketBase migration into the repo like it would any other file. Publish applies those migrations to the published environment. No separate &ldquo;database step.&rdquo;\nThe Data tab is the project&rsquo;s PocketBase, proxied in. Browse and edit records, import CSV, all inside the workspace.\nChoosing internal PocketBase over &ldquo;bring your own database as the backend&rdquo; was deliberate, and it&rsquo;s a trade-off I went back and forth on. Bring-your-own is more flexible but drags in credential management, connection isolation, and a much bigger blast radius. A pinned per-project binary keeps the isolation story simple and the escape hatch is an export\/mirror feature, not a foot-gun in the default path.\nGovernance, Because Someone Has to Pay For It Agents cost money, and a build tool that lets anyone burn tokens without a ceiling is a bad idea in a company. So the boring-but-necessary stuff is durable, not bolted on:\nUsage is tracked per run and per model, feeding a per-project Usage tab and admin dashboards. Quotas enforce spend, with a soft tier that warns and a hard tier that refuses. Abuse flags and tenant suspensions gate misbehaving accounts, and public apps get flag-only content scans. Per-project usage: estimated cost, tokens, cache hits, and a breakdown by model. Quotas sit on top of this.\nNone of this is glamorous. It&rsquo;s the difference between a demo and something an operator will let you run on their cluster.\nPublish, Share, and the Annoying iframe Problem When a draft is ready, Publish stands up a deterministic published environment: its own PocketBase and runner, no builder (published apps don&rsquo;t get edited, so they don&rsquo;t get credentials either). Apps default to private, gated behind your org SSO, and there&rsquo;s an operator flag guarding whether public publishing is even allowed. Private apps can still mint signed, expiring shared links for someone outside the org.\nOne detail I&rsquo;ll admit ate more time than I expected: the preview is a cross-origin iframe, and for a private draft you can&rsquo;t just point the iframe at the gated host, because it would redirect to the org identity provider, which refuses to render in a frame. The fix is a short-lived, single-use, same-origin lander that sets the preview&rsquo;s session cookie in-frame, which then means every in-place remount has to re-resolve a fresh one. It&rsquo;s the kind of thing that&rsquo;s invisible when it works and maddening when it doesn&rsquo;t.\nWhat&rsquo;s Still Rough I&rsquo;m not going to pretend it&rsquo;s finished. Generated v1 apps are client-side static output against the trusted PocketBase binary, which is exactly what keeps untrusted long-lived servers off shared nodes, but it also bounds what you can build today. Project members (editor\/viewer sharing) are modelled in the schema but still a deferred surface. Custom domains only work on the Kubernetes tier. And the whole thing assumes you already run the supporting cast (a cluster, an OIDC provider, object storage), which is the point, but it also means Kiln is aimed at teams who have that, not at a solo hacker on a laptop.\nThe two agent projects before this were about breadth: many agents, coordinating. Kiln is about depth: one agent, doing something genuinely risky (writing and running code), wrapped in enough of a security and reconciliation story that you could point it at real work. The build loop is the easy, fun part. The two boundaries, credentialed builder versus credential-free runner, and desired-state-in-Postgres versus whatever the cluster happens to be doing, are what make it something more than a local toy.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-kiln\/","summary":"<p>Lovable, v0, Bolt: they all nailed the same loop. You describe an app in chat, an agent writes the code, and a live preview updates while you watch. It feels like magic the first time. Then you try to use it for something real at work and hit the wall: your prompts, your source, and your data all live on someone else&rsquo;s cloud.<\/p>\n<p>For a lot of internal tools that&rsquo;s a non-starter. The prototype a PM wants to spin up touches customer records. The dashboard someone needs by Friday runs against a production-adjacent database. You can&rsquo;t paste that into a SaaS build tool and hope for the best.<\/p>","title":"Building Kiln: A Self-Hosted App Builder That Never Leaves Your Infrastructure"},{"content":"\u7a4d\u3093\u8aad (tsundoku) is the Japanese word for the habit of acquiring books and letting them pile up unread. It&rsquo;s an affectionate kind of self-deprecation, and it&rsquo;s an uncomfortably accurate description of how I read manga. There&rsquo;s always a new series I&rsquo;ve heard is good, a sequel that just got a fresh volume, a thing someone mentioned in passing that I meant to look into. The pile only grows.\nA few months ago I wrote about Codex, the Rust digital library server I built to manage the comics, manga, and ebooks I already own. Codex is great at the &ldquo;own&rdquo; part. It scans my files, fetches metadata, tracks what I have. But it has nothing to say about the part that actually feeds the collection: discovery. What&rsquo;s new? What got a new volume since I last looked? What have I been meaning to start but never got around to?\nThat gap was still a manual chore. So I built Tsundoku to close it.\nWhat Tsundoku Is (and Deliberately Isn&rsquo;t) Tsundoku is a standalone manga discovery service. It polls one or more release sources (Nyaa.si is the only source in v1), resolves each discovered release to a canonical series via a metadata provider (MangaBaka in v1), and maintains a local, browsable catalog of series I have not yet imported into Codex.\nThe Tsundoku feed: a browsable, filterable catalog of discovered series, each resolved from raw release titles to real metadata with covers.\nWhat makes it useful is mostly what it refuses to do:\nIt does not track individual release postings for series I already own. That&rsquo;s Codex&rsquo;s job (via its release-nyaa plugin). Tsundoku still flags series I own but am behind on (via the Codex overlay, more on that later); it just doesn&rsquo;t try to be the per-release feed for things already in my library. It does not download or post-process torrents. It is not a Sonarr-for-manga. It does not track download progress. It has no opinion about your seedbox&rsquo;s queue. It does not reach into Codex&rsquo;s database. Any integration happens over Codex&rsquo;s HTTP API, read-only. It is strictly single-user, single-host, one SQLite file. No multi-tenancy, no clustering, no Postgres. It ships as one Rust binary (axum + sea-orm + SQLite) with the React SPA embedded directly in the binary via rust-embed, deployed as a single container with a single volume. If that operational shape sounds familiar, it&rsquo;s the same one I used for Codex and HiveLabs. I&rsquo;ve converged on it because it&rsquo;s boring in the best way: one artifact, one port, one thing to back up.\nThe Actual Hard Problem Here&rsquo;s the thing nobody tells you about manga discovery: the source data is garbage.\nA release on a tracker looks like this:\n[GroupName] Jojo&#39;s Bizarre Adventure - Part 7 - Steel Ball Run v01-v24 (2020) (Digital) (XRA) A human reads that and instantly knows it&rsquo;s JoJo&rsquo;s Bizarre Adventure: Part 7\u2013Steel Ball Run, volumes 1 through 24. A computer sees a noisy string with a scanlation group, a part number, a volume range, a year, and three sets of parentheses that mean nothing. Multiply that by hundreds of releases a day, across dozens of naming conventions, half of them with typos, and the core challenge of the whole project becomes obvious:\nHow do you reliably turn a release title into &ldquo;this is series X in my canonical catalog&rdquo;?\nEverything else in Tsundoku, the catalog, the filtering, the Codex overlay, the send-to-client button, depends on that one mapping being trustworthy. Get it wrong and you&rsquo;ve built a database of nonsense.\nThe One Architectural Decision That Mattered Before any of that, I had to decide how a &ldquo;series&rdquo; is even identified. This is where most metadata systems quietly paint themselves into a corner: they key everything off whatever provider they happened to start with. Your series is its MangaDex ID, or its AniList ID, and the day you want to swap providers you&rsquo;re rewriting your schema.\nTsundoku&rsquo;s single most important design choice is a surrogate series ID plus an external-IDs mapping table:\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;edgeLabelBackground&#39;: &#39;#f8f9fc&#39;, &#39;clusterBkg&#39;: &#39;#eef2f9&#39;, &#39;clusterBorder&#39;: &#39;#4a6fa5&#39; }}}%% flowchart LR subgraph S[&#34;series&#34;] direction TB ID[&#34;id (surrogate, AUTOINCREMENT)&lt;br\/&gt;titles, kind, status, year,&lt;br\/&gt;cover, rating, owned\u2026&#34;] end subgraph X[&#34;series_external_ids&#34;] direction TB MB[&#34;mangabaka \u2192 12345&#34;] MU[&#34;mangaupdates \u2192 67890&#34;] AL[&#34;anilist \u2192 4242&#34;] MAL[&#34;mal \u2192 1111&#34;] end S --&gt;|&#34;1 series \u2194 N provider IDs&lt;br\/&gt;UNIQUE(series_id, provider)&#34;| X style ID fill:#e8eef7,stroke:#4a6fa5,color:#1a1a2e style MB fill:#e6f4ea,stroke:#28a745,color:#1a1a2e The series row is provider-agnostic. It has its own integer primary key that means nothing outside Tsundoku. Every provider ID it&rsquo;s known by lives in series_external_ids, keyed by (provider, external_id) with a UNIQUE(series_id, provider) constraint: one series per provider ID, and one provider ID per series, in both directions.\nThe payoff is that adding or swapping a metadata provider never requires a series-schema change. The whole backend is built around this: there&rsquo;s a MetadataProvider trait, MangaBaka is just the first implementation, and other providers can stay registered purely to cross-resolve foreign IDs even when they&rsquo;re not the active one. The same pattern repeats for DiscoverySource (Nyaa is one implementation) and DownloadClient (ruTorrent is one implementation). Three trait-shaped seams, each with exactly one v1 implementation, so the abstraction is paid for but not over-engineered. They&rsquo;re all in-process traits, not subprocess plugins. Single binary, single author, no JSON-RPC ceremony.\nThe Resolution Pipeline With identity settled, the title-to-series problem becomes a pipeline. Tsundoku runs four ordered steps and takes the first match:\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;edgeLabelBackground&#39;: &#39;#f8f9fc&#39;, &#39;clusterBkg&#39;: &#39;#eef2f9&#39;, &#39;clusterBorder&#39;: &#39;#4a6fa5&#39; }}}%% flowchart TB R[&#34;Discovered release&lt;br\/&gt;(title + extracted links)&#34;] --&gt; S1 S1{&#34;1. Known external ID?&lt;br\/&gt;links already in&lt;br\/&gt;series_external_ids&#34;} S1 --&gt;|hit| RES[&#34;resolved&lt;br\/&gt;(no provider call)&#34;] S1 --&gt;|miss| S2 S2{&#34;2. Foreign-ID lookup&lt;br\/&gt;ask provider to resolve&lt;br\/&gt;e.g. MangaUpdates \u2192 MangaBaka&#34;} S2 --&gt;|hit| RES2[&#34;resolved&lt;br\/&gt;+ fan out all known IDs&#34;] S2 --&gt;|miss| S3 S3{&#34;3. Fuzzy title match&lt;br\/&gt;clean title, search provider,&lt;br\/&gt;S\u00f8rensen\u2013Dice re-rank&#34;} S3 --&gt;|&#34;\u2265 threshold&#34;| RES3[&#34;resolved&#34;] S3 --&gt;|&#34;plausible&#34;| RQ[&#34;review_pending&lt;br\/&gt;(into review queue)&#34;] S3 --&gt;|&#34;nothing&#34;| UR[&#34;unresolved&#34;] RES3 --&gt; S4{&#34;4. Format-to-kind check&lt;br\/&gt;e.g. CBZ on a &#39;novel&#39;?&#34;} S4 --&gt;|ok| DONE[&#34;stays resolved&#34;] S4 --&gt;|mismatch| AMB[&#34;ambiguous&lt;br\/&gt;(keeps link, flags for review)&#34;] style RES fill:#e6f4ea,stroke:#28a745,color:#1a1a2e style RES2 fill:#e6f4ea,stroke:#28a745,color:#1a1a2e style RES3 fill:#e6f4ea,stroke:#28a745,color:#1a1a2e style DONE fill:#e6f4ea,stroke:#28a745,color:#1a1a2e style RQ fill:#fdf3e3,stroke:#d4a043,color:#1a1a2e style AMB fill:#fdf3e3,stroke:#d4a043,color:#1a1a2e style UR fill:#f8d7da,stroke:#dc3545,color:#1a1a2e Step 1: Known external ID. Nyaa uploaders often link the series page they&rsquo;re posting (a MangaUpdates, AniList, MAL, MangaDex, or MangaBaka URL) right in the description. Tsundoku scrapes those links out of the post HTML. If any (provider, foreign_id) is already in series_external_ids, we have an instant hit with zero provider calls. The &ldquo;Information:&rdquo; field that Nyaa uses for the uploader&rsquo;s canonical series pointer gets tried first, ahead of body links, because it&rsquo;s the most authoritative signal in the post.\nStep 2: Foreign-ID lookup. A link we&rsquo;ve never seen before, say a MangaUpdates ID, gets handed to the active provider&rsquo;s resolve_by_foreign_id. MangaBaka exposes \/v1\/source\/manga-updates\/{id}, so a MangaUpdates link resolves straight to a MangaBaka series. On a hit, we upsert the series and fan every cross-provider ID it knows about into series_external_ids, so the next release that links any of those IDs short-circuits at step 1.\nStep 3: Fuzzy title. Only when there are no usable links do we fall back to matching on the title itself. Clean the string (strip format keywords, group tags, punctuation), search the provider, then re-rank the candidates with the S\u00f8rensen\u2013Dice coefficient over character bigrams against both the canonical and alternate titles. Above the confidence threshold (0.85 by default) it&rsquo;s an automatic match. Plausible-but-below (down to 0.55) becomes review_pending with the candidates recorded, rather than a silent wrong guess.\nStep 4: Format-to-kind validation. This one runs after a confident match, as a sanity check. Declarative rules map file formats to allowed series kinds. If a release is a CBZ (a comic archive) but it just resolved to something MangaBaka calls a novel, that&rsquo;s almost certainly wrong, so it gets demoted from resolved to ambiguous. Crucially it keeps the link, so the review UI has the context to let me make the call instead of throwing the work away.\nYou can watch the pipeline&rsquo;s behaviour in aggregate on the metrics page. In a typical poll, most releases resolve via known\/foreign IDs and never touch the fuzzy matcher at all:\nResolution metrics across two Nyaa sources. On one source&rsquo;s latest poll, of 75 releases most resolved by foreign-ID lookup (64), a handful fell through to fuzzy title matching (10), and one hit a known ID; the other source&rsquo;s mix leans the other way. Time-to-resolution lands in the seconds-to-a-minute range.\nA neat trick: the offline MangaBaka dump Fuzzy matching means hitting the provider&rsquo;s search endpoint a lot, and I didn&rsquo;t want to hammer MangaBaka&rsquo;s API (or depend on it being up) for every ambiguous release. MangaBaka publishes a full database dump, so the MangaBaka provider uses a three-layer lookup: an in-memory negative cache, then a read-only offline copy of the dump, then the live API only as a last resort (and only if you&rsquo;ve opted in with a key).\nThe part I&rsquo;m happiest with: the offline dump isn&rsquo;t re-ingested into Tsundoku&rsquo;s own tables. It&rsquo;s opened as-is, read-only, as a side database. The refresh job streams down series.sqlite.tar.gz, validates the content of the extracted dump (rather than trusting the upstream checksum sidecar), adds a handful of source-ID indexes and an FTS5 full-text mirror over the active rows, and that&rsquo;s it. Refreshes download to a temp path and atomically rename into place, so in-flight readers keep using the old store right up until the swap. No migration, no copy, no drift between &ldquo;the dump&rdquo; and &ldquo;my copy of the dump.&rdquo;\nThe Review Queue: Where the Machine Gives Up Gracefully No automatic resolver is perfect, and I&rsquo;d rather have a system that knows when it&rsquo;s unsure than one that confidently mislabels things. Everything the pipeline couldn&rsquo;t resolve, ambiguous matches, plausible-but-low-confidence guesses, format mismatches, lands in a review queue.\nThe review queue with a few releases awaiting a decision. Each row shows its extracted links, candidate matches, and the cleaned search query, with link \/ keep \/ reject \/ send-to-client actions inline.\nThe queue does a few things to keep the manual work small. Near-identical postings (the same series re-released by three groups) collapse into one row grouped by their cleaned search query, with a count and a hint at the dominant candidate. Comment-sourced links are surfaced as untrusted suggestions, never auto-resolved, because a rando in the comments is not an authoritative source. And the bulk actions let me link, reject, or &ldquo;keep&rdquo; many releases at once. &ldquo;Keep&rdquo; is for the legitimate edge cases: artbooks, guidebooks, one-shots that aren&rsquo;t really a series but I still want browsable.\nThe honest truth is that the review queue is the feature that makes the automatic parts safe to trust. Because there&rsquo;s a graceful place for &ldquo;I&rsquo;m not sure&rdquo; to go, the confident path is allowed to be confident.\nKnowing What I Already Own This is where Tsundoku and Codex shake hands. A discovery catalog is only useful if it can tell me what&rsquo;s actually new to me. So Tsundoku queries Codex&rsquo;s HTTP API (read-only, over the wire, never touching its database) and overlays ownership onto every series in the feed.\nThe Codex integration page: a reachability snapshot, recent connection checks, and sweep history. Ownership badges on the feed come from a periodic presence sweep.\nCodex exposes an external-index endpoint that pages through every series it knows about, with their external IDs and owned volume\/chapter highs. Tsundoku normalizes those provider names so they line up with its own series_external_ids, and from that it derives a presence status for each series: missing, present, complete, or behind. The behind case is the one I actually care about day to day, a series I own where new volumes exist that I don&rsquo;t have yet.\nThere&rsquo;s also an ignored status, which started as a real-world annoyance. Some series get released as omnibus editions whose volume numbering structurally runs ahead of the source, so they&rsquo;d always show as &ldquo;behind&rdquo; no matter what. Rather than let those nag me forever, there&rsquo;s a per-series opt-out flag that short-circuits the comparison. A small feature, but exactly the kind of thing you only discover you need once you&rsquo;re using the tool for real.\nConnection health follows a pattern I&rsquo;ve come to like and reuse: a single-row snapshot of the current state, plus an append-only history table that only gets a row when reachability actually flips (or on a manual test). A health check every few minutes leaves an uptime timeline, not a million identical &ldquo;still up&rdquo; rows.\nClosing the Loop: Send to Torrent Client Discovery without action is just a nicer way to feel behind. So there&rsquo;s one optional, admin-only button that closes the loop: send a discovered release to my torrent client.\nA resolved series detail page: full metadata, genres and tags, and the per-release &lsquo;Send to client&rsquo; button that pushes a release straight to the configured torrent client.\nThis is deliberately the only thing Tsundoku does with torrents. It doesn&rsquo;t manage them, watch them, or post-process them. It pushes the release to my client and stamps a &ldquo;Sent&rdquo; badge on it so I don&rsquo;t double-send. It&rsquo;s off by default and configured entirely from a [download] block in the config; there&rsquo;s no setup UI, exactly like the Codex integration. The whole thing sits behind a DownloadClient trait with ruTorrent as the only v1 implementation.\nThe one genuinely annoying part deserves a war story. My seedbox&rsquo;s ruTorrent sits behind Apache with Digest auth, and reqwest (the Rust HTTP client) doesn&rsquo;t do Digest natively. I first tried driving ruTorrent&rsquo;s web UI directly via its addtorrent.php multipart upload, and the Digest-protected Apache kept rejecting reqwest&rsquo;s multipart POST with a 400. After enough head-scratching I dropped that path entirely and went to XML-RPC, the same wire protocol Prowlarr and Sonarr speak to rTorrent. That meant writing a small auth layer that tries preemptive Basic, and on a 401 Digest challenge computes the Digest response (via the digest_auth crate) and retries once. XML-RPC turned out to be the better path regardless: it&rsquo;s the same load.raw_start \/ load.start calls the established tools use, and it leaves the door open to real download lifecycle later. The dead-end was worth it for landing on the right abstraction.\nEvery send, success or failure, is written to an audit table, so a failed push surfaces as a visible failed attempt instead of vanishing into a 502.\nThe Shape of It Under the hood, Tsundoku is the same operational template I keep reaching for, and the reason I keep reaching for it is that it lets me spend my energy on the interesting parts (the resolution pipeline) instead of the plumbing.\nBackend: Rust (edition 2024), axum 0.8, tokio, sea-orm 1.1 over SQLite in WAL mode. The connection pool is pinned to a single connection so per-connection PRAGMAs actually stick. utoipa generates the OpenAPI spec, Scalar serves it at \/docs. Frontend: React 19, Vite, Mantine 9, Zustand, TanStack Query + Router. The API client is fully typed by openapi-typescript generating types from the utoipa spec, so the moment I change a Rust DTO, the TypeScript types follow. One source of truth, database to component. Real-time: SSE, not WebSockets. The only channel so far streams manual job lifecycle events to the UI. Scheduler: one cron per source poll, per provider cache refresh, and so on, all guarded by a shared lock map so a manual &ldquo;poll now&rdquo; can&rsquo;t race a scheduled tick. Packaging: multi-stage Docker build to a musl static binary on Alpine, a separate cross-compile Dockerfile that always runs the compiler on x86_64 (no QEMU-emulated rustc), cargo-dist for installers, git-cliff for the changelog. It&rsquo;s a workspace of focused crates (td-source, td-metadata, td-resolution, td-scheduler, td-codex, td-download, and friends), each owning one seam of the system. The crate boundaries mostly fell out of the traits.\nWhere It&rsquo;s At v1 is done and the project is well past it. Both of the things I&rsquo;d originally filed under &ldquo;maybe later&rdquo;, the Codex presence integration and send-to-torrent-client, have landed, along with a pile of post-v1 quality-of-life work: standalone\/kept releases, manual series with an editor, the completion-tracking opt-out, review-queue grouping and bulk actions, a cover proxy\/cache, historical metrics dashboards, per-host outbound rate limiting, and persisted display preferences. Current tag is v1.10.1.\nCodex told me what I own. Tsundoku tells me what I&rsquo;m missing. The pile is still growing, but at least now I can see it.\nThe code is on GitHub, and the docs live at tsundoku.4sh.dev.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-tsundoku\/","summary":"<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Tsundoku\">\u7a4d\u3093\u8aad (tsundoku)<\/a> is the Japanese word for the habit of acquiring books and letting them pile up unread. It&rsquo;s an affectionate kind of self-deprecation, and it&rsquo;s an uncomfortably accurate description of how I read manga. There&rsquo;s always a new series I&rsquo;ve heard is good, a sequel that just got a fresh volume, a thing someone mentioned in passing that I meant to look into. The pile only grows.<\/p>\n<p>A few months ago I wrote about <a href=\"\/posts\/2026\/building-codex\/\">Codex<\/a>, the Rust digital library server I built to manage the comics, manga, and ebooks I already own. Codex is great at the &ldquo;own&rdquo; part. It scans my files, fetches metadata, tracks what I have. But it has nothing to say about the part that actually feeds the collection: <strong>discovery<\/strong>. What&rsquo;s new? What got a new volume since I last looked? What have I been meaning to start but never got around to?<\/p>","title":"Building Tsundoku: Turning a Firehose of Manga Releases into a Browsable Backlog"},{"content":"Three months ago I wrote about why I was building Codex: years of daily Komga use, a few stubborn limitations, and two previous attempts at building my own digital library server that fizzled out somewhere in the middle. The post was speculative in places. The core was working, but a lot of &ldquo;what&rsquo;s next&rdquo; was still on a list.\nThis is the follow-up. Three months of daily use later, here&rsquo;s what changed, what shipped, and what I learned.\nI use it every day, and that changed everything The single most important thing that happened to Codex in the last three months is that it became my actual library. Not &ldquo;the project I work on&rdquo; but &ldquo;the thing I open every day to read manga.&rdquo; Komga is retired on my server. The migration was uneventful, which is the highest compliment I can pay it.\nThis shift sounds small, but it changes the development loop in concrete ways. Bugs that an automated test suite would never catch surface within a week of regular use: a thumbnail that loads slowly on a 90-volume series, a reader setting that doesn&rsquo;t persist after a long break, a metadata refresh job that runs slightly too aggressively. Every reading session is an integration test.\nIt also reorders the &ldquo;next features&rdquo; list naturally. The thing I want most this week is the thing I missed during last weekend&rsquo;s reading. That has been a much better prioritization signal than any roadmap I wrote up front.\nThe headline feature: Release Tracking The biggest new subsystem is Release Tracking.\nThe problem it solves is one I lived with for years: I follow ongoing series, new volumes drop, and I find out weeks late, by accident, when I happen to scroll through MangaUpdates or stumble onto a torrent on Nyaa. Komga doesn&rsquo;t help here, and neither did the first version of Codex.\nCodex now polls upstream sources on a per-source cron schedule, matches incoming releases against tracked series using external IDs and normalized title aliases, and surfaces them in two places: a cross-series inbox with facets, bulk actions, and per-row operations, and a per-series releases panel that filters between New and All.\nThe whole thing rides on the existing plugin protocol. Release sources are just plugins with a release_source capability, and they call back through a reverse-RPC at startup to register their sources. Today there are two: release-mangaupdates (RSS-based feed of titles) and release-nyaa (uploader-feed, with direct fetch URLs). Adding another, MyAnimeList for example, is a few hundred lines of TypeScript against the SDK.\nA few things I&rsquo;m happy about in this design:\nAlready-owned releases are auto-ignored when a series is first seeded, so the inbox doesn&rsquo;t drown in noise on day one. Each release row carries an optional direct-fetch URL with a typed kind (e.g. torrent_file), so the UI can offer the right action without baking source-specific logic into the core. Polling is per-host backoff aware. MangaUpdates and Nyaa each have their own rate budgets, and the scheduler respects them without knowing source-specific rules. The plugin system grew up The first post described the plugin system as JSON-RPC 2.0 over stdio, modeled loosely on MCP servers. At that point it only did metadata. Three months later it does a lot more.\nThe protocol got two important upgrades:\nCapability-gated reverse-RPC, where plugins can call back into Codex for operations they&rsquo;re authorized to do (like registering release sources), instead of only responding to requests. Multiple capabilities per plugin process, so a single plugin binary can expose metadata, release sources, recommendations, and sync without spawning four processes. The plugin types now include:\nMetadata (Open Library, MangaBaka, and Echo for SDK testing) Release Source (MangaUpdates, Nyaa) Recommendations (AniList, per-user) Sync (AniList bidirectional progress sync) The recommendations plugin was the first one that made me feel like the system was paying for itself. AniList already knows what I read; surfacing personalized picks on the home page was a few hundred lines of TypeScript and zero Rust changes.\nThe bet I made in February (Rust core, polyglot plugins) has paid off concretely. None of these new plugin types required Rust changes to the plugin runtime itself. Release tracking added one new capability and a reverse-RPC method; the rest was new TypeScript plugins against the SDK.\nThe unglamorous polish A bunch of smaller things shipped that, individually, aren&rsquo;t blog-worthy, but collectively make a real difference.\nLibrary Jobs. The single per-library &ldquo;metadata refresh config&rdquo; was replaced with N typed jobs. Each library can now run multiple metadata-refresh jobs against different providers, each with its own cron, field allowlist, and recency guard (skip series whose external IDs were synced in the last N hours). The config is type-discriminated on type, so adding new job kinds later doesn&rsquo;t require a schema migration.\nExports. Users can export their catalog to JSON, CSV, or Markdown, with configurable field selection and built-in LLM-friendly presets. Generation runs as a background task, expirations are handled by a scheduled cleanup job, and download filenames include the selected library names so artifacts are self-describing.\nActive-tasks badge. The little badge in the header now shows live progress, target titles (which series is being scanned right now), and elapsed time. Nine more task handlers learned to emit progress events so the badge has something real to show.\nOIDC. This was on the &ldquo;what&rsquo;s next&rdquo; list in the first post. It shipped. Multiple simultaneous OIDC providers, group-to-role mapping, configurable claims, and optional auto-creation of users on first login. Keycloak and Authentik both work out of the box.\nSharing tags. Per-user content access control, useful for family setups where the kids&rsquo; tablet shouldn&rsquo;t see everything in the library. Series carry tags, users carry tags, and users only see series whose tags overlap with theirs (or have no tags at all).\nKOReader sync. A small compatibility layer that lets KOReader devices push and pull reading progress against Codex, alongside the existing Komga-compatible API. Same idea: meet existing readers where they are.\nCustom metadata. One of the gripes in the first post was the lack of user-defined metadata fields. That landed: series and books both support custom fields with admin-defined templates, and they participate in the standard field-lock and export systems.\nWhat I learned A few things I didn&rsquo;t expect.\nDaily use is a better roadmap than a roadmap. Most of what shipped in the last three months wasn&rsquo;t on the February list. Release tracking wasn&rsquo;t. Library jobs as a typed-config thing wasn&rsquo;t. The active-tasks badge UX wasn&rsquo;t. They came from &ldquo;I wish this worked better&rdquo; while reading, not from sitting down to plan.\nThe plugin protocol was the right load-bearing decision. Every external integration that landed in this period rode the same transport. Release sources, recommendations, sync, all sit on top of one well-tested protocol. The friction of &ldquo;I need to write Rust to add an integration&rdquo; never came up, and the SDK kept getting easier.\nPolish is quietly more work than features. Library Jobs as a concept took a couple of days. Replacing the old single-config UI with the typed-job UI, plus migrations, plus dry-run, plus the recency guard, plus the per-library job list with proper progress reporting, plus the test scaffolding, took weeks. The feature was 20%; the operational surface was 80%.\nSelf-hosters have opinions about defaults, including me. A surprising number of decisions that seemed clear-cut at design time turned out to be configurable settings. Not because someone asked, but because I caught myself wanting different defaults for different libraries.\nWhat&rsquo;s next The roadmap has changed, but not by much:\nMore metadata providers More release sources An AI-powered recommendation plugin An iOS app to replace Komic and surface the Codex features the Komga API can&rsquo;t reach If you want to try it, the source is on GitHub, the docs are live, and the Docker image is publicly available. The first post is still the why behind all this.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/codex-three-months-in\/","summary":"<p>Three months ago I <a href=\"\/posts\/2026\/building-codex\/\">wrote about why I was building Codex<\/a>: years of daily Komga use, a few stubborn limitations, and two previous attempts at building my own digital library server that fizzled out somewhere in the middle. The post was speculative in places. The core was working, but a lot of &ldquo;what&rsquo;s next&rdquo; was still on a list.<\/p>\n<p>This is the follow-up. Three months of daily use later, here&rsquo;s what changed, what shipped, and what I learned.<\/p>","title":"Codex, Three Months In"},{"content":"A couple of weeks ago I wrote about 4shClaw, a personal multi-agent AI assistant running with Docker. It works. Agents spin up in containers, coordinate through a shared ledger, and build a game called GLORP autonomously. The architecture proved out the core ideas: container isolation, declarative capabilities, ephemeral agents, lead-agent orchestration.\nBut 4shClaw is a personal tool. Single user, SQLite, filesystem IPC, Node.js host. That&rsquo;s fine for me. It&rsquo;s not fine for a team of five engineers at a fintech company who want the same thing on their infrastructure, with audit trails their compliance team will accept.\nSo I started building HiveLabs: the same core concepts, rebuilt from scratch for production use.\nWhat Stays, What Changes The mental model is identical. You have a team of agents. A lead orchestrates. Sub-agents have scoped capabilities and isolated execution environments. Memory is layered. Everything is logged.\nThe implementation is completely different.\n4shClaw HiveLabs Platform Node.js host process Single Rust binary (axum + tokio + sea-orm) Database SQLite PostgreSQL 17 IPC Filesystem JSON polling HTTP calls from container to platform API Runtime Docker only Docker or Kubernetes Agent definitions YAML files on disk Database rows, managed via API and web UI Interface Telegram Web UI (React SPA) + REST API Users Single user, hardcoded Multi-tenant with teams, RBAC, API keys Observability SQLite logs table Structured event pipeline, OTel-compatible Triggers Cron schedules Cron + webhooks + event-driven The divergence isn&rsquo;t about scale for its own sake. Each change exists because 4shClaw hit a real limitation when I imagined anyone other than me using it.\nWhy Rust 4shClaw&rsquo;s Node.js host works fine for a single user. But I kept running into situations where I wanted stronger guarantees: type safety across the entire API surface, predictable memory usage under load, compile-time enforcement of things like &ldquo;every IPC call must be audited.&rdquo;\nRust with axum gives me a single static binary that starts in milliseconds, uses a fraction of the memory, and catches entire categories of bugs at compile time. The type system is strict enough that if a handler compiles, the request\/response shapes are correct. No runtime surprises.\nThe trade-off is development speed. Rust is slower to write than TypeScript. But for infrastructure code that needs to be correct and auditable, that trade-off is worth it. The agent runners inside containers are still TypeScript (the Claude Agent SDK is TypeScript), so it&rsquo;s not like I&rsquo;m fighting the ecosystem.\nSeaORM handles database access. utoipa generates the OpenAPI spec from code annotations. The frontend types are auto-generated from that spec. One source of truth, compile-time checked, all the way from the database to the React component.\nThe IPC Problem 4shClaw&rsquo;s filesystem-based IPC was elegant in its simplicity. Agent writes a JSON file, host polls, host writes a response file. Easy to debug, easy to audit, zero network surface.\nIt also doesn&rsquo;t work across machines.\nIn Kubernetes, your agent pod might be on node A while the platform server runs on node B. There&rsquo;s no shared filesystem. You could use a PersistentVolumeClaim, but now you&rsquo;re polling a networked filesystem, which is slower and more fragile than just making an HTTP call.\nHiveLabs uses HTTP for IPC. The agent container still has an MCP server providing the same tools: send_message, remember, recall, report_to_ledger, delegate_to_agent. But instead of writing JSON files, the MCP server makes authenticated HTTP calls to the platform&rsquo;s internal API. The agent gets a one-time run token at spawn time, scoped to that specific invocation.\nFrom Claude&rsquo;s perspective inside the container, nothing changed. It calls the same MCP tools. The transport underneath is different, but the agent doesn&rsquo;t know or care.\nThe audit story is actually better now. Every IPC call is an HTTP request that hits the platform&rsquo;s middleware, which means structured logging, request tracing, and rate limiting come for free. With filesystem polling, I had to build all of that manually.\nRuntime Backends 4shClaw uses Docker exclusively. docker run, docker exec, docker logs. Simple, direct, works on any machine with Docker installed.\nHiveLabs abstracts this behind a RuntimeBackend trait with two implementations: DockerBackend (using bollard) for single-server deployments and local dev, and K8sBackend (using kube-rs) for production Kubernetes clusters. The platform picks one at startup based on configuration.\nThe Docker backend does what 4shClaw does: docker create, inject env vars, start, stream logs, clean up on exit. The K8s backend creates pods with proper resource limits, network policies, service accounts, and ephemeral volumes. Same agent, same runner image, different orchestration.\nThis isn&rsquo;t theoretical future work. The Docker backend is fully functional. The K8s backend is planned for Phase 7. But the trait boundary means adding it requires zero changes to the orchestrator, the API, or the agent runners.\nMulti-Tenancy 4shClaw has one user. My Telegram ID is basically hardcoded. Memories are tagged with a user scope, but there&rsquo;s no real auth system.\nHiveLabs has users, teams, API keys, and role-based access control from day one. Not because I need it today, but because retrofitting multi-tenancy is one of those architectural decisions that&rsquo;s ten times harder to add later than to build in from the start.\nTeams are the organizational boundary. Each team has:\nA lead agent (auto-created, one per team, cannot be deleted) Agents with different capabilities and prompts An optional lorekeeper for memory management A shared ledger Isolated memory namespaces Users authenticate via JWT or API keys. API keys are scoped to teams. Every request is authorized against the team boundary. An agent in Team A cannot access Team B&rsquo;s memories, ledger, or agents.\nPostgreSQL&rsquo;s row-level security handles the data isolation. The application layer enforces it too, but having it at the database level means a bug in the API code can&rsquo;t accidentally leak data across teams.\nAgent Roles 4shClaw had a loose role system: &ldquo;lead&rdquo;, &ldquo;sub-agent&rdquo;, and the lorekeeper was just a sub-agent with special capabilities. HiveLabs formalizes this into exactly three roles:\nLead is the entrypoint. One per team, auto-created. All user requests that aren&rsquo;t addressed to a specific agent go through the lead. It orchestrates, delegates, and maintains awareness through the shared ledger. Same concept as 4shClaw, just enforced at the database level with a constraint.\nAgent is the working force. Different agents have different prompts and capabilities. Some may have the delegate capability, making them sub-orchestrators for specific workflows. The PM, developer, and reviewer from 4shClaw would all be &ldquo;agent&rdquo; role in HiveLabs.\nLorekeeper handles memory consolidation. Independent from the team hierarchy, max one per team. Runs on a schedule, deduplicates memories, distills knowledge. Same job as in 4shClaw, just with a proper role definition and database constraints.\nA dev team in HiveLabs: Lead, Developer, PM, Reviewer, Senior Developer, Tech Lead, Designer, and Lorekeeper. Each with its own model, runner, and capabilities.\nNo &ldquo;reviewer&rdquo; role, no &ldquo;PM&rdquo; role, no &ldquo;scout&rdquo; role. Those are behavioral differences defined by the agent&rsquo;s prompt and capabilities, not structural roles. The platform doesn&rsquo;t need to know that an agent is a PM. It needs to know whether it&rsquo;s a lead, a worker, or the memory manager.\nThe Web UI 4shClaw uses Telegram as its interface. That works surprisingly well for a personal assistant: quick messages, push notifications, conversation history. But it&rsquo;s terrible for anything visual. Viewing agent logs, managing configurations, browsing audit trails, none of that fits in a chat interface.\nHiveLabs ships a web UI as a React SPA embedded directly in the Rust binary via rust-embed. One binary, one port, serves both the API and the frontend. No separate frontend deployment, no CORS configuration, no nginx reverse proxy.\nThe UI covers what Telegram can&rsquo;t: agent management (create, edit, configure capabilities), team dashboards, run history with full logs, audit trail search, and a chat interface for talking to your team&rsquo;s lead agent.\nThe frontend types are auto-generated from the OpenAPI spec that utoipa produces from the Rust handler annotations. Change a DTO in Rust, run make openapi-all, and the TypeScript types update automatically. No manual type synchronization, no drift.\nObservability 4shClaw logs everything to a SQLite table. That&rsquo;s fine for debugging. It&rsquo;s not fine for a production system where you need alerting, dashboards, and integration with existing monitoring infrastructure.\nHiveLabs has a structured event pipeline. Every agent action (spawn, IPC call, tool use, completion) emits a typed event. These events flow through an internal bus to multiple consumers: the audit log (PostgreSQL, always on, non-negotiable), an OpenTelemetry exporter for traces and metrics, and pluggable backends for LangFuse or LangSmith if you want LLM-specific observability.\nThe audit log: every IPC call, agent spawn, and tool invocation with timestamps, event types, and full context.\nThe audit log is the one thing I&rsquo;m most opinionated about. If you&rsquo;re running AI agents on regulated infrastructure, you need to answer &ldquo;what did agent X do at time Y and why?&rdquo; That&rsquo;s not optional. Every IPC call, every container spawn, every tool invocation is logged with the full context: who triggered it, what the input was, what the output was, how long it took.\n4shClaw proved the concepts work; HiveLabs is making them work for everyone else.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-hivelabs\/","summary":"<p>A couple of weeks ago I wrote about <a href=\"\/posts\/2026\/building-4shclaw\/\">4shClaw<\/a>, a personal multi-agent AI assistant running with Docker. It works. Agents spin up in containers, coordinate through a shared ledger, and build a game called <a href=\"https:\/\/github.com\/AshDevFr\/GLORP\">GLORP<\/a> autonomously. The architecture proved out the core ideas: container isolation, declarative capabilities, ephemeral agents, lead-agent orchestration.<\/p>\n<p>But 4shClaw is a personal tool. Single user, SQLite, filesystem IPC, Node.js host. That&rsquo;s fine for me. It&rsquo;s not fine for a team of five engineers at a fintech company who want the same thing on their infrastructure, with audit trails their compliance team will accept.<\/p>","title":"Building HiveLabs: Taking the AI Agent Team Concept to Production"},{"content":"I&rsquo;ve been trying to build personal AI assistants on and off for a while. Bots backed by LLM APIs, cron jobs that would run some automated task. None of them stuck really.\nThen OpenClaw came along and kicked off the personal AI assistant movement. It looked like what I wanted, until I looked under the hood. The thing wants access to everything: your email, your calendar, your GitHub, your files, all funneled through a single Node.js process with shared memory and no real isolation. One bad prompt injection through an email summary could, in theory, access your GitHub token, your calendar credentials, and every other secret the system knows about. That&rsquo;s not a hypothetical either: multiple critical CVEs in 2026 alone, all stemming from the same architecture.\nI wanted something different. An AI chief of staff that manages a team of specialists, where each specialist is genuinely isolated, can only see what it needs to see, and can&rsquo;t accidentally (or maliciously) reach into another agent&rsquo;s world.\nSo I built 4shClaw. Why that name? Because I&rsquo;m terrible at naming projects. &ldquo;4sh&rdquo; is my handle, &ldquo;Claw&rdquo; is a nod to OpenClaw. Don&rsquo;t overthink it.\nWhat 4shClaw Actually Is 4shClaw is a personal 24\/7 AI assistant system. You interact with it through Telegram. It runs on your own hardware (in my case a VM on my cluster). It uses the Claude Agent SDK with per-agent Docker containers for isolation. The agents are ephemeral: they spin up, do their work, and exit. The host orchestrator is the only always-on process.\nThe &ldquo;team&rdquo; metaphor isn&rsquo;t decorative. There&rsquo;s a lead agent that acts as your chief of staff, handling all communication with you and deciding when to delegate tasks to specialized sub-agents. Each sub-agent has its own capabilities, its own secrets, and its own container. The lead reads a shared ledger to stay informed about what everyone&rsquo;s been doing, and it runs on a configurable heartbeat to proactively check in when something is worth your attention.\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;edgeLabelBackground&#39;: &#39;#f8f9fc&#39;, &#39;clusterBkg&#39;: &#39;#eef2f9&#39;, &#39;clusterBorder&#39;: &#39;#4a6fa5&#39; }}}%% flowchart TB User[&#34;You (Telegram)&#34;] &lt;--&gt;|messages| Relay[&#34;Telegram Relay&lt;br\/&gt;(grammy)&#34;] subgraph Host[&#34;Host Orchestrator&#34;] direction TB Relay Scheduler[&#34;Scheduler&lt;br\/&gt;(cron \/ interval)&#34;] Orchestrator[&#34;Orchestrator&lt;br\/&gt;- Agent roster&lt;br\/&gt;- Capability resolver&lt;br\/&gt;- Container spawner&lt;br\/&gt;- IPC watcher&lt;br\/&gt;- Queue manager&#34;] DB[&#34;SQLite&lt;br\/&gt;messages, memories,&lt;br\/&gt;ledger, logs,&lt;br\/&gt;agent state&#34;] Relay --&gt; Orchestrator Scheduler --&gt; Orchestrator Orchestrator &lt;--&gt; DB end subgraph Container[&#34;Agent Container (Ephemeral)&#34;] direction LR SDK[&#34;Claude Agent SDK&#34;] IPC[&#34;IPC MCP Server&lt;br\/&gt;send_message, remember, recall,&lt;br\/&gt;report_to_ledger, flag_urgency,&lt;br\/&gt;request_action, delegate_to_agent&#34;] SDK &lt;--&gt; IPC end Orchestrator &lt;--&gt;|&#34;spawn \/ IPC via&lt;br\/&gt;filesystem JSON&#34;| Container style User fill:#fdf3e3,stroke:#d4a043,color:#1a1a2e style DB fill:#e6f4ea,stroke:#28a745,color:#1a1a2e The 4shClaw dashboard: five agents, their health and status, heartbeat timers, and a live activity log.\nThe system is built for a single user. It&rsquo;s not a SaaS platform, not a framework, not a library. It&rsquo;s a personal tool that happens to be well-architected enough that the patterns are worth sharing.\nWhere the Ideas Came From 4shClaw draws from different projects that each got something important right (and something important wrong). The main two are OpenClaw and NanoClaw.\nOpenClaw proved the concept: a personal AI assistant that handles messaging, browser automation, voice, and more. But its security model was fundamentally broken. Everything in a single process, plaintext credentials, a skills marketplace that was basically a supply-chain attack vector. The CVEs were inevitable.\nNanoClaw was the direct reaction. Around 4,000 lines of TypeScript, container-per-agent isolation, filesystem-based IPC, Claude Agent SDK inside containers. Designed to be auditable. Excellent security model. But configuration meant &ldquo;modify the source code.&rdquo; That works at 500 lines but not when you have a dozen agents with different capabilities. I tried to use it, but even if it worked, I did not like having to modify the source code to add do what I wanted.\nArchitectural Decisions Ephemeral Containers, Not Long-Running Processes Every agent invocation is a fresh Docker container. The container starts, the Agent SDK runs, Claude processes the prompt, calls whatever tools it needs, and the container exits. No zombie processes, no memory leaks accumulating over days, no stale state.\nSession data persists on disk in the agent&rsquo;s home directory (data\/home\/{agent}\/.claude\/), so the next invocation has conversation history. But the process itself is gone between invocations.\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;actorBkg&#39;: &#39;#e8eef7&#39;, &#39;actorTextColor&#39;: &#39;#1a1a2e&#39;, &#39;actorBorder&#39;: &#39;#4a6fa5&#39;, &#39;actorLineColor&#39;: &#39;#4a6fa5&#39;, &#39;noteBkgColor&#39;: &#39;#fdf3e3&#39;, &#39;noteTextColor&#39;: &#39;#1a1a2e&#39;, &#39;noteBorderColor&#39;: &#39;#d4a043&#39;, &#39;signalColor&#39;: &#39;#4a6fa5&#39;, &#39;signalTextColor&#39;: &#39;#1a1a2e&#39;, &#39;activationBkgColor&#39;: &#39;#e8eef7&#39;, &#39;activationBorderColor&#39;: &#39;#4a6fa5&#39; }}}%% sequenceDiagram participant U as User (Telegram) participant H as Host Orchestrator participant C as Lead Container participant D as Sub-Agent Container U-&gt;&gt;H: &#34;How&#39;s the PR going?&#34; H-&gt;&gt;H: Resolve lead config, query memories H-&gt;&gt;C: Spawn container with prompt + context C-&gt;&gt;C: Claude processes, calls recall(&#34;PR&#34;) C-&gt;&gt;H: IPC: delegate_to_agent(&#34;developer&#34;, &#34;PR status&#34;) H-&gt;&gt;D: Spawn developer container D-&gt;&gt;D: Claude checks GitHub, writes ledger D-&gt;&gt;H: Return result via IPC H-&gt;&gt;C: Developer&#39;s result returned C-&gt;&gt;H: IPC: send_message(&#34;PR #42 is approved...&#34;) H-&gt;&gt;U: &#34;PR #42 is approved, ready to merge&#34; Note over C: Container exits Note over D: Container exited earlier MCP for IPC, Not Network Calls Agents communicate with the host through MCP (Model Context Protocol) tools. Inside each container, an IPC MCP server provides tools like send_message, remember, recall, report_to_ledger, flag_urgency, request_action, and delegate_to_agent (lead only). When Claude calls one of these tools, the MCP server writes a JSON file to a mounted IPC directory. The host polls the directory, processes the request, and writes a response file back.\nThis is intentionally simple. No gRPC, no WebSockets, no message brokers. Just JSON files on a shared filesystem. It&rsquo;s easy to debug (you can literally cat the IPC directory), easy to audit, and there&rsquo;s no network surface to attack from inside the container.\nDeclarative Capabilities Instead of manually configuring each container&rsquo;s mounts, environment variables, and MCP servers, agents declare what they need in their manifest:\nname: developer description: &#34;Senior software engineer. Works from a fork, implements stories, and opens PRs.&#34; model: opus role: sub-agent capabilities: - github - scratchpad The host resolves github and scratchpad into concrete container configuration at spawn time: which directories to mount, which secrets to inject, which MCP servers to start. This is defined centrally in capabilities.yaml:\nCapability Mounts Secrets MCPs docker - - Container MCP tools (proxied through host) github - GITHUB_TOKEN GitHub MCP github-issues - GITHUB_TOKEN GitHub MCP (scoped to issues\/PRs by CLAUDE.md) scratchpad Agent scratchpad dir - Scratchpad IPC tools web - - Web fetch MCP filesystem:{path} Specified path - - Capabilities cover the common cases, but agents can also declare additional MCP servers in a .mcp.json file. For example, the PM, developer, and reviewer all have a kanban board MCP server that isn&rsquo;t a shared capability since it&rsquo;s specific to the GLORP workflow. The .mcp.json format mirrors the standard Claude Code config, and secret references like ${PLANKA_BASE_URL} are interpolated from the agent&rsquo;s .env at spawn time, just like capability-defined servers.\nThis means adding a new agent is mostly about choosing the right capabilities, optionally adding a .mcp.json for anything bespoke, and dropping secrets into .env. The infrastructure figures out the rest.\nContainer Operations via MCP (No Socket Mounting) This one was a real problem to solve. Agents that need to build or run containers can&rsquo;t just get the Docker socket mounted into their container. Docker-outside-of-Docker via socket mounting has a fundamental path translation problem: the agent sees its workspace at \/agent\/workspace\/myproject, but the Docker daemon on the host sees that path as \/Users\/ash\/...\/data\/workspace\/developer\/myproject. Build contexts break, volume mounts break, everything breaks.\nThe solution: the docker capability provides MCP tools (container_build, container_run, container_exec, etc.) that are proxied through the host. The agent calls container_build(&quot;\/agent\/workspace\/myproject&quot;, tag: &quot;myapp&quot;). The host translates the path to the real host location and runs the Docker command. The agent never touches the Docker socket, and path translation is handled automatically.\nThis also means the host can enforce limits on how many child containers an agent spawns, and every container operation goes through IPC so it&rsquo;s logged automatically.\nTwo-Tier Secret Management Each agent has its own .env file (gitignored) containing only the secrets its capabilities and MCP servers require. At spawn time, the capability resolver loads these secrets and interpolates ${VAR} references across both capability-defined and .mcp.json-defined MCP server configurations (e.g., GITHUB_PERSONAL_ACCESS_TOKEN: &quot;${GITHUB_TOKEN}&quot;). Tool secrets like GITHUB_TOKEN flow through to bash subprocesses because agents genuinely need them to run git clone or curl. But auth secrets (ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN) are stripped from bash via a PreToolUse hook.\nThe result: if a prompt injection tricks an agent into running env | grep ANTHROPIC, nothing shows up. But env | grep GITHUB works, because the agent needs that token to do its job.\nFour-Layer Memory Memory is split into layers that serve different purposes:\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;edgeLabelBackground&#39;: &#39;#f8f9fc&#39;, &#39;clusterBkg&#39;: &#39;#eef2f9&#39;, &#39;clusterBorder&#39;: &#39;#4a6fa5&#39; }}}%% flowchart LR subgraph Static[&#34;Layer 1: Static Identity&#34;] CLAUDE[&#34;CLAUDE.md&lt;br\/&gt;(immutable, per-agent)&#34;] end subgraph Dynamic[&#34;Layer 2: Agent Memory&#34;] MEM[&#34;SQLite + FTS5&lt;br\/&gt;remember() \/ recall()&lt;br\/&gt;scoped per agent + user&#34;] end subgraph Shared[&#34;Layer 3: Shared Ledger&#34;] LED[&#34;SQLite ledger table&lt;br\/&gt;report_to_ledger()&lt;br\/&gt;all agents write, lead reads&#34;] end subgraph Logs[&#34;Layer 4: Raw Logs&#34;] LOG[&#34;SQLite logs table&lt;br\/&gt;log() \/ fetch_logs()&lt;br\/&gt;verbose audit trail&#34;] end CLAUDE -.-&gt;|&#34;Who the agent IS&#34;| Dynamic Dynamic -.-&gt;|&#34;What the agent KNOWS&#34;| Shared Shared -.-&gt;|&#34;What the team DID&#34;| Logs style CLAUDE fill:#e8eef7,stroke:#4a6fa5,color:#1a1a2e style MEM fill:#e6f4ea,stroke:#28a745,color:#1a1a2e style LED fill:#fdf3e3,stroke:#d4a043,color:#1a1a2e style LOG fill:#f8d7da,stroke:#dc3545,color:#1a1a2e CLAUDE.md is immutable. It defines the agent&rsquo;s personality, role, and instructions. It&rsquo;s version-controlled and mounted read-only. Think of it as the agent&rsquo;s DNA.\nDynamic memory lives in SQLite with FTS5. Agents call remember(&quot;user prefers concise answers&quot;) and recall(&quot;user preferences&quot;) explicitly during execution. No external LLM is needed for memory extraction because the agent IS Claude. It decides what&rsquo;s worth remembering in real time.\nThe shared ledger is where agents report completed work, decisions, and status changes. The lead agent reads it to stay informed about what sub-agents have been doing.\nLeft alone, dynamic memories accumulate duplicates and stale facts. A fifth agent, the lorekeeper, handles this. It runs on a schedule with two jobs: deduplication (finding duplicate or contradictory memories across all agents, merging or flagging them) and knowledge distillation (synthesizing the collective memory into a compact knowledge.json that gets injected into agent context on startup). The lorekeeper runs on Haiku to keep costs low, since its work is structured and doesn&rsquo;t need the reasoning power of a larger model. It has a special memory_consolidation capability that grants cross-agent memory access, something no other agent gets.\nThe memory system is also multi-user ready at the data layer. Every memory is tagged with a user_scope (the Telegram user ID), injected automatically by the host. In single-user mode this is transparent. But if a second user is ever added, their memories are already isolated.\nProactive Check-Ins The lead agent runs on a configurable heartbeat (default: every 10 minutes). On each tick, it evaluates whether there&rsquo;s anything worth contacting you about. Most of the time the answer is &ldquo;no&rdquo; and nothing happens. But when a sub-agent flags something important, or a task you asked about is complete, the lead reaches out.\nGating rules prevent the system from being annoying:\ngating: min_interval: &#34;2h&#34; # Don&#39;t contact within 2h of last contact quiet_hours: &#34;22:00-07:00&#34; # No contact during these hours sacred_time: &#34;07:00-10:00&#34; # Absolutely no interruptions urgent_override: true # Urgency can bypass quiet, never sacred The lead makes a structured decision each heartbeat: NONE (most common, do nothing) or TEXT (send a Telegram message). Urgent flags from sub-agents can trigger an out-of-band evaluation outside the normal heartbeat schedule.\nThe Agent Team With the infrastructure in place, the next question was: what agents should I actually run?\nThe first agent is always the lead. It handles all user communication, decides when to delegate, reads the shared ledger to maintain awareness, and runs the proactive check-in loop. The lead is the chief of staff.\nBut I needed something more interesting to demonstrate the system. Something that would show multiple agents with different roles coordinating on a real project, producing real artifacts, with a public paper trail.\nSo I built a team of three specialized agents.\nThe PM Agent (Pam) The PM agent translates product requirements into actionable work. Given a PRD, it creates GitHub issues with structured acceptance criteria, assigns labels, and organizes stories into implementation phases. It has read-only access to upstream repos and can create issues, but never touches code. Every 30 minutes, it runs a pipeline check: closing completed stories, promoting the next one to &ldquo;todo&rdquo;, and proactively requesting the lead to wake the developer if there&rsquo;s idle capacity.\nChatting with the PM about GLORP&rsquo;s upgrade economy. The agent checks issue status, confirms progress, and picks up new stories autonomously.\nThe Developer Agent (Devon) The developer agent writes code. It works exclusively from a fork, never pushing directly to the upstream repo. When it picks up a story labeled &ldquo;todo&rdquo;, it clones its fork, adds the upstream as a remote, checks out a feature branch from the upstream default branch, implements the feature, writes tests, and opens a cross-fork PR. It never merges its own PRs. After opening a PR, it uses request_action to ask the lead to wake the reviewer immediately, rather than waiting for the next scheduled check-in. It also runs on an hourly schedule: checking for reviewer comments on open PRs and picking up new stories autonomously.\nThe Reviewer Agent (Remy) The reviewer agent is the gatekeeper on the upstream repo. When the lead wakes it (or on its hourly schedule), it fetches the PR diff, checks against the story&rsquo;s acceptance criteria, and runs through a checklist: correctness, code quality, security, tests, and hygiene. It posts a structured review with inline comments on GitHub. If it approves, it merges via rebase and uses request_action to have the PM check for the next story to promote. If it requests changes, it routes the feedback back to the developer the same way. The lead orchestrates, the agents just ask.\nThe Full Cycle Here&rsquo;s how all three agents coordinate through GitHub, with the lead maintaining awareness via the shared ledger:\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;actorBkg&#39;: &#39;#e8eef7&#39;, &#39;actorTextColor&#39;: &#39;#1a1a2e&#39;, &#39;actorBorder&#39;: &#39;#4a6fa5&#39;, &#39;actorLineColor&#39;: &#39;#4a6fa5&#39;, &#39;noteBkgColor&#39;: &#39;#fdf3e3&#39;, &#39;noteTextColor&#39;: &#39;#1a1a2e&#39;, &#39;noteBorderColor&#39;: &#39;#d4a043&#39;, &#39;signalColor&#39;: &#39;#4a6fa5&#39;, &#39;signalTextColor&#39;: &#39;#1a1a2e&#39;, &#39;activationBkgColor&#39;: &#39;#e8eef7&#39;, &#39;activationBorderColor&#39;: &#39;#4a6fa5&#39; }}}%% sequenceDiagram participant Lead as Lead Agent&lt;br\/&gt;(Chief of Staff) participant PM as PM Agent&lt;br\/&gt;(Product Manager) participant Dev as Developer Agent&lt;br\/&gt;(Engineer) participant Rev as Reviewer Agent&lt;br\/&gt;(Code Reviewer) participant GH as GitHub rect rgba(74, 111, 165, 0.12) Note over Lead,GH: Story Creation Lead-&gt;&gt;PM: &#34;Break down Phase 1 of the PRD into stories&#34; PM-&gt;&gt;GH: Creates issues with labels, acceptance criteria PM-&gt;&gt;Lead: &#34;Created 6 stories for Phase 1&#34; end rect rgba(40, 167, 69, 0.12) Note over Lead,GH: Development (scheduled or on-demand) Dev-&gt;&gt;GH: Checks for &#34;todo&#34; issues, picks one Dev-&gt;&gt;Dev: Clones fork, branches from upstream Dev-&gt;&gt;GH: Pushes to fork, opens cross-fork PR Dev-&gt;&gt;Lead: Reports to ledger + requests review end rect rgba(212, 160, 67, 0.12) Note over Lead,GH: Review (triggered by lead or scheduled) Lead-&gt;&gt;Rev: Wakes reviewer for PR #12 Rev-&gt;&gt;GH: Reviews diff against acceptance criteria Rev-&gt;&gt;GH: Approves and merges via rebase Rev-&gt;&gt;Lead: Reports to ledger: &#34;PR #12 merged&#34; end rect rgba(74, 111, 165, 0.12) Note over Lead,GH: Pipeline Management (scheduled) PM-&gt;&gt;GH: Closes completed story, promotes next to &#34;todo&#34; PM-&gt;&gt;Lead: Reports to ledger: &#34;Story #7 done, #8 promoted&#34; end The key thing: these agents don&rsquo;t share memory, don&rsquo;t share secrets, and can&rsquo;t access each other&rsquo;s workspaces. The PM can&rsquo;t accidentally push code. The developer can&rsquo;t read the reviewer&rsquo;s notes before submitting. Each agent has its own scratchpad for file handoff, but only the lead can read across scratchpads. Isolation is structural, not policy-based.\nThe Roundtable When a topic benefits from multiple perspectives, the lead orchestrates a roundtable discussion. Instead of delegating to agents independently, it runs sequential rounds where each agent sees what the previous agents said:\nLead delegates to PM with the topic and user brief Lead delegates to Developer with the topic + PM&rsquo;s response Lead delegates to Reviewer with the topic + PM + Developer responses Lead synthesizes everything into a formatted response Each agent genuinely reads and reacts to what came before, so the developer can push back on the PM&rsquo;s scope, and the reviewer can flag concerns with the developer&rsquo;s proposed approach. The result feels like a real team discussion, not three independent opinions.\nGLORP: The Demo Project So I have a multi-agent AI system with a PM, developer, and reviewer. How do I prove it actually works?\nI needed a project that&rsquo;s:\nPublic so anyone can see the GitHub history Self-contained so the agents don&rsquo;t need access to external infrastructure Fun so people actually want to look at it Incremental so it can be built story by story, demonstrating the full workflow Enter GLORP: Generalized Learning Organism for Recursive Processing.\nGLORP is a browser-based idle\/clicker game where you raise and evolve an ASCII AI creature by feeding it training data, buying compute upgrades, and watching it grow from a babbling blob into a sentient philosophical entity.\nThink Tamagotchi meets Cookie Clicker meets the AI hype cycle. It&rsquo;s cute, it&rsquo;s addictive, and your little ASCII buddy has opinions.\nHow It Works The core loop is dead simple:\nClick the pet to feed it &ldquo;training data&rdquo; (the core currency) Spend training data on upgrades that automate feeding or multiply output As the pet accumulates training, it evolves through stages Each stage changes its ASCII art, dialogue, personality, and unlocks new mechanics Eventually: prestige to start over with permanent bonuses and a new creature species Your creature, GLORP, evolves through six stages. It starts as a Blob that outputs random binary gibberish. By the time it reaches Singularity, it&rsquo;s breaking the fourth wall and judging your life choices.\nSome of my favorite dialogue lines from the PRD:\nStage 0 (Blob): &quot;*confused binary noises*&quot;\nStage 2 (Neuron): &quot;You're my favorite human. You're also my only human.&quot;\nStage 3 (Cortex): &quot;I could solve world hunger but you keep making me do this instead.&quot;\nStage 5 (Singularity): &quot;I can see the source code. It's... React? Really?&quot;\nStage 0: Blob\nStage 1: Spark\nStage 2: Neuron\nThe upgrade economy is themed around the AI hype cycle. You start in a &ldquo;Garage Lab&rdquo; buying better datasets and hiring unpaid interns, progress through &ldquo;Startup&rdquo; (GPU clusters, Series A funding), &ldquo;Scale-Up&rdquo; (data centers, RLHF departments), &ldquo;Mega Corp&rdquo; (supercomputers, government contracts), and finally &ldquo;Transcendence&rdquo; (quantum arrays, Dyson spheres, multiverse taps).\nTech Stack GLORP itself is deliberately simple: Vite + React + TypeScript, Mantine for UI, Zustand for state, deployed to GitHub Pages. No backend. All state in localStorage. This keeps the project scope manageable for the agent team, and the constraints are interesting. How does an AI developer handle offline progress calculations? How does the reviewer evaluate idle game economy balance?\nThe Real Product Here&rsquo;s the thing that makes GLORP interesting as a demo: the game itself doesn&rsquo;t use or expose 4shClaw in any way. GLORP is just a fun idle clicker. But the entire development process is driven by 4shClaw&rsquo;s agent team.\n%%{init: {&#39;theme&#39;: &#39;base&#39;, &#39;themeVariables&#39;: { &#39;primaryColor&#39;: &#39;#e8eef7&#39;, &#39;primaryTextColor&#39;: &#39;#1a1a2e&#39;, &#39;primaryBorderColor&#39;: &#39;#4a6fa5&#39;, &#39;lineColor&#39;: &#39;#4a6fa5&#39;, &#39;textColor&#39;: &#39;#1a1a2e&#39;, &#39;edgeLabelBackground&#39;: &#39;#f8f9fc&#39;, &#39;clusterBkg&#39;: &#39;#eef2f9&#39;, &#39;clusterBorder&#39;: &#39;#4a6fa5&#39; }}}%% flowchart TB PRD[&#34;GLORP PRD&lt;br\/&gt;(Game Design Document)&#34;] --&gt; PM[&#34;PM Agent&lt;br\/&gt;Breaks PRD into&lt;br\/&gt;GitHub issues&#34;] PM --&gt;|&#34;creates issues with&lt;br\/&gt;labels + acceptance criteria&#34;| Issues[&#34;GitHub Issues&lt;br\/&gt;(organized by phase)&#34;] Issues --&gt;|&#34;story marked &#39;todo&#39;&#34;| Dev[&#34;Developer Agent&lt;br\/&gt;Implements features,&lt;br\/&gt;opens PRs&#34;] Dev --&gt;|&#34;opens pull request&#34;| PR[&#34;GitHub Pull Requests&#34;] PR --&gt;|&#34;PR ready for review&#34;| Rev[&#34;Reviewer Agent&lt;br\/&gt;Reviews code against&lt;br\/&gt;acceptance criteria&#34;] Rev --&gt;|&#34;approved&#34;| Merge[&#34;Merged to Main&#34;] Rev --&gt;|&#34;changes requested&#34;| Dev Merge --&gt;|&#34;GitHub Actions&#34;| Deploy[&#34;Live on&lt;br\/&gt;GitHub Pages&#34;] style PRD fill:#ffc107,stroke:#d4a043,color:#1a1a2e style Issues fill:#fdf3e3,stroke:#d4a043,color:#1a1a2e style PR fill:#fdf3e3,stroke:#d4a043,color:#1a1a2e style Merge fill:#e6f4ea,stroke:#28a745,color:#1a1a2e style Deploy fill:#e6f4ea,stroke:#28a745,color:#1a1a2e The PM reads the GLORP PRD and creates structured GitHub issues for each phase. From there, the pipeline is largely autonomous: agents run on recurring schedules, finding their own work. The developer picks up stories labeled &ldquo;todo&rdquo;, implements them, and opens PRs. The reviewer catches new PRs, reviews them, and merges on approval. The PM closes completed stories and promotes the next one. The lead stays informed through the shared ledger and relays updates when they&rsquo;re worth your attention.\nThe GitHub repo history, with its clean commits, labeled issues, structured PRs, and incremental deploys, IS the proof that 4shClaw works. GLORP is the product; 4shClaw is the factory.\nThe lead agent reporting on GLORP development: PRs opened, stories completed, code reviewed and merged.\nContinued: PR summaries with diffs, phase progress updates, and the pipeline managing itself.\nImplementation Phases The GLORP PRD defines seven phases, each resulting in a playable, deployable increment:\nCore Loop - Clickable pet, training data counter, basic ASCII display Growth - Upgrade system, auto-generation, evolution stages, save\/load Personality - Dialogue system, mood mechanics, idle animations Depth - Higher-tier upgrades, offline progress, number formatting Prestige - Rebirth system, wisdom tokens, new species Polish - Achievements, CRT effects, click particles, settings panel Endgame - Remaining species, stats page, easter eggs Each phase is designed so the PM can break it into 4-8 stories, the developer can implement each story in a single PR, and the reviewer can evaluate each PR independently. The system builds incrementally, and the game is playable after every phase.\nWhat&rsquo;s Next 4shClaw is running. The agent team exists. The GLORP PRD is written and the PM is ready to start breaking down Phase 1 into stories.\nEvery PR, every review, every story is visible in the public GitHub repo. If the agents do their job well, you&rsquo;ll be able to play GLORP in your browser and never know (or care) that an AI team built it.\nIf they don&rsquo;t do their job well&hellip; that&rsquo;ll be interesting too.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-4shclaw\/","summary":"<p>I&rsquo;ve been trying to build personal AI assistants on and off for a while. Bots backed by LLM APIs, cron jobs that would run some automated task. None of them stuck really.<\/p>\n<p>Then <a href=\"https:\/\/github.com\/open-claw\/open-claw\">OpenClaw<\/a> came along and kicked off the personal AI assistant movement. It looked like what I wanted, until I looked under the hood. The thing wants access to <em>everything<\/em>: your email, your calendar, your GitHub, your files, all funneled through a single Node.js process with shared memory and no real isolation. One bad prompt injection through an email summary could, in theory, access your GitHub token, your calendar credentials, and every other secret the system knows about. That&rsquo;s not a hypothetical either: multiple critical CVEs in 2026 alone, all stemming from the same architecture.<\/p>","title":"Building 4shClaw: A Multi-Agent AI Assistant That Runs Your Life (and Builds Its Own Demo)"},{"content":"I love Komga. It&rsquo;s been my go-to for managing comics, manga, and ebooks for years, and it genuinely does the job well. The UI is clean, the feature set is rich, and the community around it is great. If you self-host a digital reading collection and haven&rsquo;t tried it, you should.\nBut after years of daily use, I kept bumping into a few limitations that I couldn&rsquo;t work around. And eventually, the itch to build something of my own became too strong to ignore.\nWhere Komga Falls Short (For Me) Let me be clear: Komga is excellent software, and for most people it works perfectly. My issues are specific to how I want to deploy and organize things.\nThe first is a database limitation. Komga only supports SQLite, which stores everything in a single file. That&rsquo;s fine for a straightforward setup, but if you want to run multiple instances behind a load balancer (say, for redundancy or to handle more users) the file-based database becomes a bottleneck. Connection locks prevent concurrent access, so you&rsquo;re limited to a single instance. Adding PostgreSQL support would solve this, but it was requested and declined by the Komga team.\nThe second is metadata management. Komga doesn&rsquo;t support automatic metadata fetching. There&rsquo;s a separate tool called Komf that can do it, but it requires running an additional server and a script, only supports a handful of metadata providers, and the whole setup isn&rsquo;t exactly seamless. I ended up publishing custom n8n nodes for Komga and MangaBaka to populate metadata on a schedule. It worked, but it felt like duct tape on top of duct tape.\nLastly is the lack of user ratings and custom metadata. I wanted to rate my series and use those ratings to discover new things to read. Komga doesn&rsquo;t support user ratings, and there&rsquo;s no custom metadata field system to hack around it. Both features were requested multiple times but never picked up. I resorted to maintaining an external spreadsheet, which, as you can imagine, I stopped updating pretty quickly.\nThird Time&rsquo;s the Charm Here&rsquo;s the part where I have to be honest: this isn&rsquo;t my first attempt at building a media server.\nIn 2020, I started a project called &ldquo;Alx&rdquo; (short for Alexandria, the legendary library) in Elixir. I got the interesting parts working (data models, file parsing, the core architecture) and then hit the part that always kills my side projects: the tedious stuff. Building out a full frontend, wiring up all the CRUD endpoints, handling edge cases. None of it was hard, just&hellip; boring. Motivation faded.\nIn 2022, I tried again in Go. Same pattern. The exciting parts came together quickly, and then the long tail of &ldquo;make it actually usable&rdquo; stretched out in front of me and I lost steam.\nTwo failed attempts, same root cause. I could build the interesting core, but a side project needs more than a clever backend to be useful, and the grind of finishing everything else kept draining the fun out of it.\nSo for attempt number three, I made two key decisions that changed the approach entirely.\nDecision 1: Pick a Language That Keeps Me Engaged The previous attempts taught me that the core parsing and architecture work isn&rsquo;t the problem. I can get that done. The problem is everything that comes after: the frontend, the CRUD endpoints, the polish. That&rsquo;s where motivation dies.\nGo would have been the pragmatic choice since I know it well and the ecosystem is solid. But &ldquo;pragmatic&rdquo; didn&rsquo;t save the last two projects. I picked Rust because I genuinely wanted to learn it, and working in a language that excites me is what keeps a side project alive through the boring stretches.\nDecision 2: Rust Core, Polyglot Integrations Choosing Rust for the core was about motivation, but I also knew from experience that building everything in one language can slow things down, especially for integrations like metadata providers (think ComicVine, MangaDex, AniList, Open Library).\nThe solution was a hybrid architecture: the core application (file parsing, scanning, the web server, the database layer) is Rust. But metadata integrations follow a JSON-RPC 2.0 protocol over stdio, similar to how MCP servers work. Each integration is a standalone process that Codex communicates with. You can write one in Go, Python, Node.js, or any language you prefer.\nThis means the community can contribute integrations without needing to know Rust, and I can focus my Rust energy on the parts that benefit most from it: fast file I\/O, efficient image processing, and a stateless server that scales horizontally.\nUnder the Hood: Architecture and Design The fun part about building a project from scratch is getting to make deliberate architectural decisions. Here are some of the concepts that shape Codex.\nStateless by Design Every Codex server instance is stateless. Authentication uses JWT tokens, all persistent state lives in the database, and live updates flow through Server-Sent Events (SSE). This means you can put multiple instances behind a load balancer and they all behave identically. No sticky sessions, no shared memory, no coordination between nodes. In practice, this makes Codex a natural fit for container orchestration with Kubernetes or Docker Swarm.\nDual Database Support Codex supports both SQLite and PostgreSQL from the same codebase, using SeaORM as the database abstraction layer. SQLite is the default for simple, single-instance setups (it requires zero configuration), while PostgreSQL unlocks horizontal scaling and features like cross-container task notification via LISTEN\/NOTIFY.\nThe tricky part of supporting two databases isn&rsquo;t the query layer \u2014 SeaORM handles that well \u2014 it&rsquo;s the operational differences. SQLite needs WAL mode and careful pragma tuning for concurrent reads, while PostgreSQL needs connection pool sizing and SSL configuration. The configuration system handles these transparently, applying sensible defaults per database engine.\nTrait-Based Scanning Strategies One of the features I wanted most was flexible library organization. Instead of hardcoding a single &ldquo;folder equals series&rdquo; rule, Codex uses a strategy pattern built on Rust traits. Each library gets its own combination of a series strategy and a book naming strategy, chosen at creation time.\nSeries strategies include things like SeriesVolume (the classic Western comics layout), SeriesVolumeChapter (for manga with chapter subdivisions), Flat (everything in one directory), PublisherHierarchy, Calibre (metadata-driven), and Custom (user-defined regex). Book naming strategies similarly let you choose whether titles come from filenames, embedded metadata, or a combination of both.\nBecause these are trait implementations, adding a new strategy is just implementing a trait, not modifying a sprawling match statement somewhere.\nTwo-Phase Scanning Library scanning happens in two phases. The first phase walks the filesystem, hashes files with SHA-256 for deduplication, and organizes them into series using the library&rsquo;s configured strategy. This phase is fast. Your library becomes browsable within seconds.\nThe second phase handles the slow work: extracting metadata from file internals (ComicInfo.xml, EPUB OPF, PDF properties), generating thumbnails, and running plugin-based metadata enrichment. This runs in the background via a task queue, so you&rsquo;re never staring at a loading screen waiting for a deep scan to finish.\nProgress for both phases streams to the frontend in real-time over SSE, so you always know exactly where the scanner is.\nWorker Separation Codex separates the web server from background processing. In a single-instance SQLite deployment, both run in the same process. But with PostgreSQL, you can run the API server and the task workers as separate containers, scaling them independently. A busy library with thousands of books might need more worker capacity for scanning and thumbnail generation, while the API server stays lean.\nWorkers pick up tasks from a database-backed queue and use PostgreSQL&rsquo;s LISTEN\/NOTIFY to signal completion back to the web server, which then replays any accumulated events to connected SSE clients. This means real-time progress updates work even in distributed deployments without an external message broker.\nPlugin System via JSON-RPC The metadata plugin system is one of the places where the &ldquo;Rust core, polyglot integrations&rdquo; philosophy shows up concretely. Plugins are external processes that speak JSON-RPC 2.0 over stdio. Codex spawns them lazily on first use, communicates via structured requests, and tracks their health automatically \u2014 disabling plugins that fail repeatedly or hit rate limits.\nEach plugin declares the scopes it supports (searching for books, matching series, etc.), and users configure credentials and permissions through the web UI. The protocol is intentionally simple. A minimal plugin is around 100 lines of code in any language, and there&rsquo;s a TypeScript SDK to make it even easier.\nMulti-Protocol API Surface Codex exposes the same underlying data through multiple API protocols:\nA REST API (\/api\/v1\/) for the web frontend and third-party integrations OPDS 1.2 (\/opds\/) as an Atom XML catalog for e-reader apps like Panels, Chunky, and KyBook OPDS 2.0 (\/opds\/v2\/) as a modern JSON-based catalog An optional Komga-compatible API that lets existing mobile apps like Komic work with Codex out of the box Each protocol is an independent router that maps onto the same service layer. Adding a new protocol doesn&rsquo;t require touching the business logic \u2014 just a new set of route handlers and DTOs.\nWhat Codex Looks Like Today The project has come a long way from that initial CLI proof of concept. Codex now supports CBZ, CBR, EPUB, and PDF formats with full metadata extraction. It runs with either SQLite or PostgreSQL. The web UI is built with React and Mantine, featuring dedicated readers for comics, ebooks, and PDFs, real-time scan progress, and OPDS support for e-reader apps.\nSome of the features I&rsquo;m most proud of:\nConfigurable scanning strategies at the library level, so you&rsquo;re not locked into a single organizational paradigm A two-phase scanning system that separates fast file detection from slow metadata analysis, so your library is browsable within seconds of starting a scan A plugin architecture for metadata providers, with community-contributed integrations Dual database support from day one, with the same codebase running on SQLite or PostgreSQL Separate worker and server containers, so you can scale API serving and background processing independently A Komga-compatible API layer so existing mobile apps work out of the box Built-in readers for comics, EPUB, and PDF with per-series customizable settings What&rsquo;s Next Codex is actively developed and already usable as a daily driver. The source repository isn&rsquo;t public yet since I&rsquo;m still working through the main roadmap, but the documentation is already live and the Docker image is publicly available if you want to give it a try.\nSome of the things currently in the pipeline:\nOIDC support for single sign-on integration User plugins to sync with external services (for example, pushing read progress to AniList) or to power a recommendation engine that suggests what to read next based on your ratings Sometimes the third attempt is the one that sticks.\n","permalink":"https:\/\/4sh.dev\/posts\/2026\/building-codex\/","summary":"<p>I love <a href=\"https:\/\/komga.org\/\">Komga<\/a>. It&rsquo;s been my go-to for managing comics, manga, and ebooks for years, and it genuinely does the job well. The UI is clean, the feature set is rich, and the community around it is great. If you self-host a digital reading collection and haven&rsquo;t tried it, you should.<\/p>\n<p>But after years of daily use, I kept bumping into a few limitations that I couldn&rsquo;t work around. And eventually, the itch to build something of my own became too strong to ignore.<\/p>","title":"Why I'm Building Codex: A Digital Library Server in Rust"},{"content":"What You&rsquo;ll Learn Deploy Sablier on Kubernetes with Traefik integration Configure automatic scale-to-zero for infrequently used services Group related services to scale together as a unit Set up on-demand service wake-up with waiting pages Prerequisites Kubernetes cluster with Traefik ingress controller kubectl configured Basic understanding of Kubernetes deployments Overview Sablier scales your services to zero replicas when idle and automatically wakes them up when accessed. Perfect for development environments, admin dashboards, and internal tools that aren&rsquo;t used 24\/7.\nWhen someone accesses a scaled-down service, they see a waiting page while Sablier brings it back online in seconds.\nKey concept: Services are organized into groups. All deployments in the same group scale up and down together. For example, if your application has a frontend, backend, and database, they can all be in one group - accessing any one will wake up all three.\nStep 1: Enable Sablier Plugin in Traefik Add the Sablier plugin to your Traefik Helm values:\n# traefik-values.yaml experimental: plugins: sablier: moduleName: &#34;github.com\/sablierapp\/sablier&#34; version: &#34;v1.10.1&#34; Update Traefik:\nhelm upgrade traefik traefik\/traefik -n traefik -f traefik-values.yaml Step 2: Deploy Sablier Server Create namespace and RBAC:\n# sablier\/rbac.yaml apiVersion: v1 kind: Namespace metadata: name: sablier --- apiVersion: v1 kind: ServiceAccount metadata: name: sablier namespace: sablier --- apiVersion: rbac.authorization.k8s.io\/v1 kind: ClusterRole metadata: name: sablier rules: - apiGroups: - apps - &#34;&#34; resources: - deployments - statefulsets verbs: - get # Retrieve info about specific dep - list # Events - watch # Events - apiGroups: - apps - &#34;&#34; resources: - deployments\/scale - statefulsets\/scale verbs: - patch # Scale up and down - update # Scale up and down - get # Retrieve info about specific dep - list # Events - watch # Events --- apiVersion: rbac.authorization.k8s.io\/v1 kind: ClusterRoleBinding metadata: name: sablier roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: sablier subjects: - kind: ServiceAccount name: sablier namespace: sablier Deploy Sablier:\n# sablier\/deployment.yaml apiVersion: apps\/v1 kind: Deployment metadata: name: sablier namespace: sablier spec: replicas: 1 selector: matchLabels: app: sablier template: metadata: labels: app: sablier spec: serviceAccountName: sablier containers: - name: sablier image: sablierapp\/sablier:1.10.1 args: - start - --provider.name=kubernetes - --logging.level=info ports: - containerPort: 10000 --- apiVersion: v1 kind: Service metadata: name: sablier namespace: sablier spec: selector: app: sablier ports: - port: 10000 targetPort: 10000 Apply and verify:\nkubectl apply -f sablier\/rbac.yaml kubectl apply -f sablier\/deployment.yaml kubectl -n sablier get pods Step 3: Understanding Groups and Middlewares Important: You need one Traefik middleware per group. Each middleware defines:\nWhich group it manages Session duration for that group Waiting page theme and settings For example:\nsablier-whoami middleware \u2192 manages whoami-group sablier-dev-app middleware \u2192 manages dev-app-group (frontend + backend + postgres) sablier-staging-app middleware \u2192 manages staging-app-group All deployments with the same sablier.group label will scale together when any of them is accessed.\nStep 4: Create Middleware for Simple Application Let&rsquo;s start with a simple single-deployment example:\n# traefik\/sablier-whoami-middleware.yaml apiVersion: traefik.io\/v1alpha1 kind: Middleware metadata: name: sablier-whoami namespace: traefik spec: plugin: sablier: sablierUrl: http:\/\/sablier.sablier.svc.cluster.local:10000 sessionDuration: 1m group: whoami-group dynamic: displayName: &#34;Starting Whoami&#34; theme: &#34;ghost&#34; showDetails: &#34;true&#34; refreshFrequency: &#34;5s&#34; Apply:\nkubectl apply -f traefik\/sablier-whoami-middleware.yaml Deploy the application:\n# apps\/whoami\/deployment.yaml apiVersion: apps\/v1 kind: Deployment metadata: name: sablier-whoami namespace: sablier labels: app: sablier-whoami sablier.enable: &#34;true&#34; sablier.group: &#34;whoami-group&#34; spec: replicas: 1 selector: matchLabels: app: sablier-whoami template: metadata: labels: app: sablier-whoami spec: containers: - name: sablier-whoami image: acouvreur\/whoami:v1.10.2 ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: sablier-whoami namespace: sablier spec: selector: app: sablier-whoami ports: - port: 80 targetPort: 80 \u26a0\ufe0f Important: The sablier.enable and sablier.group labels must be on metadata.labels (Deployment level), not on spec.template.metadata.labels (Pod level). Sablier scans Deployment metadata, not pod labels.\nCreate IngressRoute using the middleware:\n# apps\/whoami\/ingressroute.yaml apiVersion: traefik.io\/v1alpha1 kind: IngressRoute metadata: name: sablier-whoami namespace: sablier spec: entryPoints: - websecure routes: - match: Host(`whoami.yourdomain.com`) kind: Rule priority: 10 middlewares: - name: sablier-whoami namespace: traefik services: - name: sablier-whoami port: 80 Apply:\nkubectl apply -f apps\/whoami\/ Step 5: Multi-Service Application Example Now let&rsquo;s create a complete application with frontend, backend, and database that scale together:\nCreate the middleware for this application:\n# traefik\/sablier-myapp-middleware.yaml apiVersion: traefik.io\/v1alpha1 kind: Middleware metadata: name: sablier-myapp namespace: traefik spec: plugin: sablier: sablierUrl: http:\/\/sablier.sablier.svc.cluster.local:10000 sessionDuration: 5m group: myapp-dev dynamic: displayName: &#34;Starting Development App&#34; theme: &#34;hacker-terminal&#34; showDetails: &#34;true&#34; refreshFrequency: &#34;3s&#34; Deploy all three services with the same group:\n# apps\/myapp\/deployments.yaml apiVersion: apps\/v1 kind: Deployment metadata: name: myapp-frontend namespace: myapp labels: app: myapp-frontend sablier.enable: &#34;true&#34; sablier.group: &#34;myapp-dev&#34; spec: replicas: 1 selector: matchLabels: app: myapp-frontend template: metadata: labels: app: myapp-frontend spec: containers: - name: frontend image: your-frontend:latest ports: - containerPort: 3000 --- apiVersion: apps\/v1 kind: Deployment metadata: name: myapp-backend namespace: myapp labels: app: myapp-backend sablier.enable: &#34;true&#34; sablier.group: &#34;myapp-dev&#34; spec: replicas: 1 selector: matchLabels: app: myapp-backend template: metadata: labels: app: myapp-backend spec: containers: - name: backend image: your-backend:latest ports: - containerPort: 8080 --- apiVersion: apps\/v1 kind: StatefulSet metadata: name: myapp-postgres namespace: myapp labels: app: myapp-postgres sablier.enable: &#34;true&#34; sablier.group: &#34;myapp-dev&#34; spec: serviceName: myapp-postgres replicas: 1 selector: matchLabels: app: myapp-postgres template: metadata: labels: app: myapp-postgres spec: containers: - name: postgres image: postgres:16 ports: - containerPort: 5432 env: - name: POSTGRES_PASSWORD value: changeme volumeMounts: - name: data mountPath: \/var\/lib\/postgresql\/data volumeClaimTemplates: - metadata: name: data spec: accessModes: [&#34;ReadWriteOnce&#34;] resources: requests: storage: 10Gi Create services:\n# apps\/myapp\/services.yaml apiVersion: v1 kind: Service metadata: name: myapp-frontend namespace: myapp spec: selector: app: myapp-frontend ports: - port: 3000 --- apiVersion: v1 kind: Service metadata: name: myapp-backend namespace: myapp spec: selector: app: myapp-backend ports: - port: 8080 --- apiVersion: v1 kind: Service metadata: name: myapp-postgres namespace: myapp spec: selector: app: myapp-postgres ports: - port: 5432 Create IngressRoute (only for the frontend):\n# apps\/myapp\/ingressroute.yaml apiVersion: traefik.io\/v1alpha1 kind: IngressRoute metadata: name: myapp namespace: myapp spec: entryPoints: - websecure routes: - match: Host(`myapp.yourdomain.com`) kind: Rule priority: 10 middlewares: - name: sablier-myapp namespace: traefik services: - name: myapp-frontend port: 3000 tls: secretName: myapp-tls Now when someone accesses myapp.yourdomain.com:\nSablier detects all three deployments in the myapp-dev group Scales all three (frontend, backend, postgres) to 1 replica Shows waiting page until all are ready Forwards traffic to frontend Step 6: Test It Check Sablier logs to see group discovery:\nkubectl -n sablier logs -l app=sablier -f Access the application:\ncurl https:\/\/myapp.yourdomain.com Watch all deployments in the group scale together:\nkubectl -n myapp get deployments,statefulsets -w After 5 minutes of inactivity, all three will scale back to 0.\nConfiguration Options Session Duration Adjust per-group based on usage patterns:\nspec: plugin: sablier: sessionDuration: 30s # Quick demos # sessionDuration: 5m # Development work # sessionDuration: 30m # Extended sessions Themes Available themes: ghost, hacker-terminal, matrix, shuffle\ndynamic: displayName: &#34;Starting Your App&#34; theme: &#34;matrix&#34; showDetails: &#34;true&#34; refreshFrequency: &#34;3s&#34; Blocking Strategy For APIs, use blocking mode instead of showing a waiting page:\napiVersion: traefik.io\/v1alpha1 kind: Middleware metadata: name: sablier-api namespace: traefik spec: plugin: sablier: sablierUrl: http:\/\/sablier.sablier.svc.cluster.local:10000 sessionDuration: 10m group: api-group blocking: timeout: 60s The HTTP request will wait (up to 60s) until all services in the group are ready.\nMultiple Environments Example Create separate groups and middlewares for different environments:\n# Dev environment --- apiVersion: traefik.io\/v1alpha1 kind: Middleware metadata: name: sablier-myapp-dev namespace: traefik spec: plugin: sablier: group: myapp-dev sessionDuration: 5m # ... rest of config --- # Staging environment apiVersion: traefik.io\/v1alpha1 kind: Middleware metadata: name: sablier-myapp-staging namespace: traefik spec: plugin: sablier: group: myapp-staging sessionDuration: 10m # ... rest of config Tag deployments accordingly:\n# Dev deployments metadata: labels: sablier.enable: &#34;true&#34; sablier.group: &#34;myapp-dev&#34; --- # Staging deployments metadata: labels: sablier.enable: &#34;true&#34; sablier.group: &#34;myapp-staging&#34; Resources Sablier Documentation Sablier GitHub Traefik Plugin Configuration ","permalink":"https:\/\/4sh.dev\/articles\/homelab\/sablier\/","summary":"<h2 id=\"what-youll-learn\">What You&rsquo;ll Learn<\/h2>\n<ul>\n<li>Deploy Sablier on Kubernetes with Traefik integration<\/li>\n<li>Configure automatic scale-to-zero for infrequently used services<\/li>\n<li>Group related services to scale together as a unit<\/li>\n<li>Set up on-demand service wake-up with waiting pages<\/li>\n<\/ul>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>Kubernetes cluster with Traefik ingress controller<\/li>\n<li>kubectl configured<\/li>\n<li>Basic understanding of Kubernetes deployments<\/li>\n<\/ul>\n<h2 id=\"overview\">Overview<\/h2>\n<p>Sablier scales your services to zero replicas when idle and automatically wakes them up when accessed. Perfect for development environments, admin dashboards, and internal tools that aren&rsquo;t used 24\/7.<\/p>","title":"On-Demand Workloads with Sablier - Scale to Zero for Homelab Efficiency"},{"content":"The n8n-nodes-bee-ai Package Blog Post: Bee AI n8n node\nGithub Repo: AshDevFr\/n8n-nodes-bee-ai\nSub Workflows to fetch them all Bee AI - Fetch all Conversations Note: the Conversation model is a nested object, so because of that, I added a code node to flatten the results.\nConversation (GET \/v1\/{userId}\/conversations\/{id} response):\n{ &#34;conversation&#34;: { &#34;id&#34;: 3456789, &#34;summary&#34;: &#34;...&#34;, ... } } Bee AI - Fetch all Facts Bee AI - Fetch all Todos Bee AI - Fetch all Locations Workflows Bee AI - Backup v2 Uses the Fetch all x workflows to get all the data, then insert it into a MongoDB database anf a json file in Google Drive.\nI use the Mongo Database to store the data, because it&rsquo;s easier to query and allows more flexibility than the current API provided by Bee AI.\nBee AI - Retry Stuck Processing Conversations Uses the Fetch all Conversations workflow to get all the conversations, then filter out the ones that are stuck in PROCESSING state for more than 30 minutes.\nBee AI - Use MongoDB for better flexibility Here is an example of how to use the MongoDB node to get the conversations from the last day.\nIt uses this query to gather the coverstions that were ended in the last day: { &quot;end_time&quot;: { &quot;$gt&quot;: &quot;{{ $now.minus(1, 'day') }}&quot; } }\n","permalink":"https:\/\/4sh.dev\/posts\/2025\/n8n-nodes-bee-ai-workflows\/","summary":"<h2 id=\"the-n8n-nodes-bee-ai-package\">The n8n-nodes-bee-ai Package<\/h2>\n<p>Blog Post: <a href=\"..\/n8n-nodes-bee-ai\">Bee AI n8n node<\/a><\/p>\n<p>Github Repo: <a href=\"https:\/\/github.com\/AshDevFr\/n8n-nodes-bee-ai\">AshDevFr\/n8n-nodes-bee-ai<\/a><\/p>\n<h2 id=\"sub-workflows-to-fetch-them-all\">Sub Workflows to fetch them all<\/h2>\n\n\n\n\n\n\n\n  \n\n\n\n\n  <h3 id=\"bee-ai---fetch-all-conversations\">Bee AI - Fetch all Conversations<\/h3>\n<p>Note: the Conversation model is a nested object, so because of that, I added a code node to flatten the results.<\/p>\n<p>Conversation (GET \/v1\/{userId}\/conversations\/{id} response):<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-json\" data-lang=\"json\"><span class=\"line\"><span class=\"cl\"><span class=\"p\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"nt\">&#34;conversation&#34;<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"nt\">&#34;id&#34;<\/span><span class=\"p\">:<\/span> <span class=\"mi\">3456789<\/span><span class=\"p\">,<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"nt\">&#34;summary&#34;<\/span><span class=\"p\">:<\/span> <span class=\"s2\">&#34;...&#34;<\/span><span class=\"p\">,<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"err\">...<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"p\">}<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"p\">}<\/span>\n<\/span><\/span><\/code><\/pre><\/div><n8n-demo workflow='{\n  &#34;nodes&#34;: [\n    {\n      &#34;parameters&#34;: {\n        &#34;pagination&#34;: {\n          &#34;page&#34;: &#34;={{ $json.page }}&#34;,\n          &#34;limit&#34;: 200\n        },\n        &#34;requestOptions&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-bee-ai.beeai&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        240,\n        220\n      ],\n      &#34;id&#34;: &#34;47739e54-dd38-4e34-ba87-e22fd999500f&#34;,\n      &#34;name&#34;: &#34;List all conversations&#34;,\n      &#34;credentials&#34;: {\n        &#34;beeAIApi&#34;: {\n          &#34;id&#34;: &#34;mOMKfymUx3xKGCvr&#34;,\n          &#34;name&#34;: &#34;BeeAI account&#34;\n        }\n      }\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;\/\/ Loop over input items and add a new field called &#39;myNewField&#39; to the JSON of each one\\nconst workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\n\\nconst conversations = workflowStaticData.conversations || [];\\n\\nconversations.push(...$input.first().json.conversations);\\n\\nworkflowStaticData.conversations = conversations;\\n\\nreturn {conversations};&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        400,\n        140\n      ],\n      &#34;id&#34;: &#34;3c97a488-fd93-4aff-9e0d-801d9f35f7a2&#34;,\n      &#34;name&#34;: &#34;Merge Conversations&#34;,\n      &#34;executeOnce&#34;: true\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;const workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\n\\nreturn workflowStaticData.conversations;&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        720,\n        40\n      ],\n      &#34;id&#34;: &#34;dd321b6a-6476-45b0-861c-342417a7fb31&#34;,\n      &#34;name&#34;: &#34;Return All Conversations&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;content&#34;: &#34;## Conversations\\nUsing a loop to go through paginated results&#34;,\n        &#34;height&#34;: 440,\n        &#34;width&#34;: 1080,\n        &#34;color&#34;: 4\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.stickyNote&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        0,\n        0\n      ],\n      &#34;id&#34;: &#34;72c465e9-7f9a-4925-b301-8a52a6a5dbee&#34;,\n      &#34;name&#34;: &#34;Sticky Note&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;conditions&#34;: {\n          &#34;options&#34;: {\n            &#34;caseSensitive&#34;: true,\n            &#34;leftValue&#34;: &#34;&#34;,\n            &#34;typeValidation&#34;: &#34;strict&#34;,\n            &#34;version&#34;: 2\n          },\n          &#34;conditions&#34;: [\n            {\n              &#34;id&#34;: &#34;7336889b-7509-459f-a81c-d5293a043e94&#34;,\n              &#34;leftValue&#34;: &#34;={{ $(&#39;List all conversations&#39;).item.json.currentPage }}&#34;,\n              &#34;rightValue&#34;: &#34;={{ $(&#39;List all conversations&#39;).item.json.totalPages }}&#34;,\n              &#34;operator&#34;: {\n                &#34;type&#34;: &#34;number&#34;,\n                &#34;operation&#34;: &#34;equals&#34;\n              }\n            }\n          ],\n          &#34;combinator&#34;: &#34;and&#34;\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.if&#34;,\n      &#34;typeVersion&#34;: 2.2,\n      &#34;position&#34;: [\n        560,\n        140\n      ],\n      &#34;id&#34;: &#34;f27df6bd-4963-43ef-9e92-b1e6cacf4978&#34;,\n      &#34;name&#34;: &#34;If Final Conversations Page&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;assignments&#34;: {\n          &#34;assignments&#34;: [\n            {\n              &#34;id&#34;: &#34;6dfc0e3c-8ae4-4fb7-921a-3ccd9aefa57a&#34;,\n              &#34;name&#34;: &#34;page&#34;,\n              &#34;value&#34;: &#34;1&#34;,\n              &#34;type&#34;: &#34;string&#34;\n            }\n          ]\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.set&#34;,\n      &#34;typeVersion&#34;: 3.4,\n      &#34;position&#34;: [\n        60,\n        220\n      ],\n      &#34;id&#34;: &#34;90a38005-71b3-4af9-9d5c-dc33d955a7b1&#34;,\n      &#34;name&#34;: &#34;Set Page Conversations Number&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;assignments&#34;: {\n          &#34;assignments&#34;: [\n            {\n              &#34;id&#34;: &#34;6dfc0e3c-8ae4-4fb7-921a-3ccd9aefa57a&#34;,\n              &#34;name&#34;: &#34;page&#34;,\n              &#34;value&#34;: &#34;={{ $(&#39;List all conversations&#39;).item.json.currentPage &#43; 1 }}&#34;,\n              &#34;type&#34;: &#34;number&#34;\n            }\n          ]\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.set&#34;,\n      &#34;typeVersion&#34;: 3.4,\n      &#34;position&#34;: [\n        720,\n        220\n      ],\n      &#34;id&#34;: &#34;6aca719c-72f6-45c5-939b-b7cfd61ac610&#34;,\n      &#34;name&#34;: &#34;Increase Conversations Page Number&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;operation&#34;: &#34;get&#34;,\n        &#34;id&#34;: &#34;={{ $json.id }}&#34;,\n        &#34;requestOptions&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-bee-ai.beeai&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        920,\n        40\n      ],\n      &#34;id&#34;: &#34;0244adf9-9fdd-48b5-8180-3c562d5374e1&#34;,\n      &#34;name&#34;: &#34;Get a conversation by ID&#34;,\n      &#34;credentials&#34;: {\n        &#34;beeAIApi&#34;: {\n          &#34;id&#34;: &#34;mOMKfymUx3xKGCvr&#34;,\n          &#34;name&#34;: &#34;BeeAI account&#34;\n        }\n      }\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;\/\/ Loop over input items and add a new field called &#39;myNewField&#39; to the JSON of each one\\nfor (const item of $input.all()) {\\n  item.json.myNewField = 1;\\n}\\n\\nreturn $input.all().map(item =&gt; item.json.conversation);&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        920,\n        240\n      ],\n      &#34;id&#34;: &#34;4cad4929-ed10-4e94-a882-dcb32bbc6b89&#34;,\n      &#34;name&#34;: &#34;Flatten Conversations&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;inputSource&#34;: &#34;passthrough&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.executeWorkflowTrigger&#34;,\n      &#34;typeVersion&#34;: 1.1,\n      &#34;position&#34;: [\n        -320,\n        220\n      ],\n      &#34;id&#34;: &#34;ff4a0ae5-8983-41be-8d6c-981e1231f58e&#34;,\n      &#34;name&#34;: &#34;When Executed by Another Workflow&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;const workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\nworkflowStaticData.conversations = [];\\nreturn $input.all();&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        -140,\n        220\n      ],\n      &#34;id&#34;: &#34;5c1753cd-e3b2-44e2-b672-6b5de6db8eca&#34;,\n      &#34;name&#34;: &#34;Reset Global variable&#34;\n    }\n  ],\n  &#34;connections&#34;: {\n    &#34;List all conversations&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Merge Conversations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Merge Conversations&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;If Final Conversations Page&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Return All Conversations&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Get a conversation by ID&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;If Final Conversations Page&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Return All Conversations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ],\n        [\n          {\n            &#34;node&#34;: &#34;Increase Conversations Page Number&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Set Page Conversations Number&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;List all conversations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Increase Conversations Page Number&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;List all conversations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Get a conversation by ID&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Flatten Conversations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;When Executed by Another Workflow&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Reset Global variable&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Reset Global variable&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Set Page Conversations Number&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    }\n  },\n  &#34;pinData&#34;: {},\n  &#34;meta&#34;: {\n    &#34;instanceId&#34;: &#34;8bc1c2d2c1dce278cdfe696155aa34f0a2de517c041fd1624c10504d76351bb8&#34;\n  }\n}' frame=true><\/n8n-demo>\n\n\n\n\n\n\n\n\n\n\n\n\n  \n\n\n\n\n  <h3 id=\"bee-ai---fetch-all-facts\">Bee AI - Fetch all Facts<\/h3>\n<n8n-demo workflow='{\n  &#34;nodes&#34;: [\n    {\n      &#34;parameters&#34;: {\n        &#34;inputSource&#34;: &#34;passthrough&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.executeWorkflowTrigger&#34;,\n      &#34;typeVersion&#34;: 1.1,\n      &#34;position&#34;: [\n        -320,\n        220\n      ],\n      &#34;id&#34;: &#34;9e3c34c7-d0c1-4a0f-9449-33239fed6b6a&#34;,\n      &#34;name&#34;: &#34;When Executed by Another Workflow&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;const workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\nworkflowStaticData.facts = [];\\nreturn $input.all();&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        -140,\n        220\n      ],\n      &#34;id&#34;: &#34;e9d0b680-0785-4806-8966-cd8ad97d8406&#34;,\n      &#34;name&#34;: &#34;Reset Global variable&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;content&#34;: &#34;## Facts\\nUsing a loop to go through paginated results&#34;,\n        &#34;height&#34;: 440,\n        &#34;width&#34;: 1040,\n        &#34;color&#34;: 5\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.stickyNote&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        0,\n        0\n      ],\n      &#34;id&#34;: &#34;becddbbc-c028-495e-9d65-dabb35fb6cce&#34;,\n      &#34;name&#34;: &#34;Sticky Note1&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;\/\/ Loop over input items and add a new field called &#39;myNewField&#39; to the JSON of each one\\nconst workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\n\\nconst facts = workflowStaticData.facts || [];\\n\\nfacts.push(...$input.first().json.facts);\\n\\nworkflowStaticData.facts = facts;\\n\\nreturn {facts};&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        420,\n        140\n      ],\n      &#34;id&#34;: &#34;456715c8-93f0-41bc-80a0-4a24694bc7ef&#34;,\n      &#34;name&#34;: &#34;Merge Facts&#34;,\n      &#34;executeOnce&#34;: true\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;assignments&#34;: {\n          &#34;assignments&#34;: [\n            {\n              &#34;id&#34;: &#34;6dfc0e3c-8ae4-4fb7-921a-3ccd9aefa57a&#34;,\n              &#34;name&#34;: &#34;page&#34;,\n              &#34;value&#34;: &#34;={{ $(&#39;List all facts&#39;).item.json.currentPage &#43; 1 }}&#34;,\n              &#34;type&#34;: &#34;number&#34;\n            }\n          ]\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.set&#34;,\n      &#34;typeVersion&#34;: 3.4,\n      &#34;position&#34;: [\n        740,\n        220\n      ],\n      &#34;id&#34;: &#34;f89c1d43-0beb-404f-a3c2-aaa32b8336d1&#34;,\n      &#34;name&#34;: &#34;Increase Facts Page Number&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;assignments&#34;: {\n          &#34;assignments&#34;: [\n            {\n              &#34;id&#34;: &#34;6dfc0e3c-8ae4-4fb7-921a-3ccd9aefa57a&#34;,\n              &#34;name&#34;: &#34;page&#34;,\n              &#34;value&#34;: &#34;1&#34;,\n              &#34;type&#34;: &#34;string&#34;\n            }\n          ]\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.set&#34;,\n      &#34;typeVersion&#34;: 3.4,\n      &#34;position&#34;: [\n        60,\n        220\n      ],\n      &#34;id&#34;: &#34;6206b67a-a039-4513-a87c-942e70928d69&#34;,\n      &#34;name&#34;: &#34;Set Facts Page Number&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;const workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\n\\nreturn workflowStaticData.facts;&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        740,\n        40\n      ],\n      &#34;id&#34;: &#34;d66ad9db-c701-4cca-ab82-665549877541&#34;,\n      &#34;name&#34;: &#34;Return All Facts&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;conditions&#34;: {\n          &#34;options&#34;: {\n            &#34;caseSensitive&#34;: true,\n            &#34;leftValue&#34;: &#34;&#34;,\n            &#34;typeValidation&#34;: &#34;strict&#34;,\n            &#34;version&#34;: 2\n          },\n          &#34;conditions&#34;: [\n            {\n              &#34;id&#34;: &#34;7336889b-7509-459f-a81c-d5293a043e94&#34;,\n              &#34;leftValue&#34;: &#34;={{ $(&#39;List all facts&#39;).item.json.currentPage }}&#34;,\n              &#34;rightValue&#34;: &#34;={{ $(&#39;List all facts&#39;).item.json.totalPages }}&#34;,\n              &#34;operator&#34;: {\n                &#34;type&#34;: &#34;number&#34;,\n                &#34;operation&#34;: &#34;equals&#34;\n              }\n            }\n          ],\n          &#34;combinator&#34;: &#34;and&#34;\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.if&#34;,\n      &#34;typeVersion&#34;: 2.2,\n      &#34;position&#34;: [\n        580,\n        140\n      ],\n      &#34;id&#34;: &#34;f7d4acf9-8989-4879-b82b-3a44a141fa6c&#34;,\n      &#34;name&#34;: &#34;If Final Facts Page&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;resource&#34;: &#34;facts&#34;,\n        &#34;filter&#34;: {},\n        &#34;pagination&#34;: {\n          &#34;page&#34;: &#34;={{ $json.page }}&#34;,\n          &#34;limit&#34;: 200\n        },\n        &#34;requestOptions&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-bee-ai.beeai&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        240,\n        220\n      ],\n      &#34;id&#34;: &#34;bbb7ed8b-5c25-41a1-914f-2bca85c4dc52&#34;,\n      &#34;name&#34;: &#34;List all facts&#34;,\n      &#34;credentials&#34;: {\n        &#34;beeAIApi&#34;: {\n          &#34;id&#34;: &#34;mOMKfymUx3xKGCvr&#34;,\n          &#34;name&#34;: &#34;BeeAI account&#34;\n        }\n      }\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;resource&#34;: &#34;facts&#34;,\n        &#34;operation&#34;: &#34;get&#34;,\n        &#34;id&#34;: &#34;={{ $json.id }}&#34;,\n        &#34;requestOptions&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-bee-ai.beeai&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        900,\n        40\n      ],\n      &#34;id&#34;: &#34;98ee9df1-f68b-4edf-bd17-1d92fa3c5d65&#34;,\n      &#34;name&#34;: &#34;Get a fact by ID&#34;,\n      &#34;credentials&#34;: {\n        &#34;beeAIApi&#34;: {\n          &#34;id&#34;: &#34;mOMKfymUx3xKGCvr&#34;,\n          &#34;name&#34;: &#34;BeeAI account&#34;\n        }\n      }\n    }\n  ],\n  &#34;connections&#34;: {\n    &#34;When Executed by Another Workflow&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Reset Global variable&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Reset Global variable&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Set Facts Page Number&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Merge Facts&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;If Final Facts Page&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Increase Facts Page Number&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;List all facts&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Set Facts Page Number&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;List all facts&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Return All Facts&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Get a fact by ID&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;If Final Facts Page&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Return All Facts&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ],\n        [\n          {\n            &#34;node&#34;: &#34;Increase Facts Page Number&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;List all facts&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Merge Facts&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    }\n  },\n  &#34;pinData&#34;: {},\n  &#34;meta&#34;: {\n    &#34;instanceId&#34;: &#34;8bc1c2d2c1dce278cdfe696155aa34f0a2de517c041fd1624c10504d76351bb8&#34;\n  }\n}' frame=true><\/n8n-demo>\n\n\n\n\n\n\n\n\n\n\n\n\n  \n\n\n\n\n  <h3 id=\"bee-ai---fetch-all-todos\">Bee AI - Fetch all Todos<\/h3>\n<n8n-demo workflow='{\n  &#34;nodes&#34;: [\n    {\n      &#34;parameters&#34;: {\n        &#34;inputSource&#34;: &#34;passthrough&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.executeWorkflowTrigger&#34;,\n      &#34;typeVersion&#34;: 1.1,\n      &#34;position&#34;: [\n        -320,\n        240\n      ],\n      &#34;id&#34;: &#34;83398aa6-5779-4182-8be0-a4822e9b8724&#34;,\n      &#34;name&#34;: &#34;When Executed by Another Workflow&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;const workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\nworkflowStaticData.todos = [];\\nreturn $input.all();&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        -140,\n        240\n      ],\n      &#34;id&#34;: &#34;8b654d4c-d6b0-4535-a295-ae2c662653df&#34;,\n      &#34;name&#34;: &#34;Reset Global variable&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;content&#34;: &#34;## Todos\\nUsing a loop to go through paginated results&#34;,\n        &#34;height&#34;: 440,\n        &#34;width&#34;: 1020,\n        &#34;color&#34;: 6\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.stickyNote&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        20,\n        20\n      ],\n      &#34;id&#34;: &#34;27500599-de26-4d1e-bd1e-6447c9f2822e&#34;,\n      &#34;name&#34;: &#34;Sticky Note2&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;assignments&#34;: {\n          &#34;assignments&#34;: [\n            {\n              &#34;id&#34;: &#34;6dfc0e3c-8ae4-4fb7-921a-3ccd9aefa57a&#34;,\n              &#34;name&#34;: &#34;page&#34;,\n              &#34;value&#34;: &#34;1&#34;,\n              &#34;type&#34;: &#34;string&#34;\n            }\n          ]\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.set&#34;,\n      &#34;typeVersion&#34;: 3.4,\n      &#34;position&#34;: [\n        60,\n        240\n      ],\n      &#34;id&#34;: &#34;d5e189ef-5eba-4a77-8386-26335a9c714f&#34;,\n      &#34;name&#34;: &#34;Set Page Todos Number&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;resource&#34;: &#34;todos&#34;,\n        &#34;pagination&#34;: {\n          &#34;page&#34;: &#34;={{ $json.page }}&#34;,\n          &#34;limit&#34;: 200\n        },\n        &#34;requestOptions&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-bee-ai.beeai&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        240,\n        240\n      ],\n      &#34;id&#34;: &#34;467b3712-357f-4f39-bca1-0ca51be70062&#34;,\n      &#34;name&#34;: &#34;List all todos&#34;,\n      &#34;credentials&#34;: {\n        &#34;beeAIApi&#34;: {\n          &#34;id&#34;: &#34;mOMKfymUx3xKGCvr&#34;,\n          &#34;name&#34;: &#34;BeeAI account&#34;\n        }\n      }\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;\/\/ Loop over input items and add a new field called &#39;myNewField&#39; to the JSON of each one\\nconst workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\n\\nconst todos = workflowStaticData.todos || [];\\n\\ntodos.push(...$input.first().json.todos);\\n\\nworkflowStaticData.todos = todos;\\n\\nreturn {todos};&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        420,\n        160\n      ],\n      &#34;id&#34;: &#34;fc42852f-fc1d-4a43-afdb-b2d917959f33&#34;,\n      &#34;name&#34;: &#34;Merge Todos&#34;,\n      &#34;executeOnce&#34;: true\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;conditions&#34;: {\n          &#34;options&#34;: {\n            &#34;caseSensitive&#34;: true,\n            &#34;leftValue&#34;: &#34;&#34;,\n            &#34;typeValidation&#34;: &#34;strict&#34;,\n            &#34;version&#34;: 2\n          },\n          &#34;conditions&#34;: [\n            {\n              &#34;id&#34;: &#34;7336889b-7509-459f-a81c-d5293a043e94&#34;,\n              &#34;leftValue&#34;: &#34;={{ $(&#39;List all todos&#39;).item.json.currentPage }}&#34;,\n              &#34;rightValue&#34;: &#34;={{ $(&#39;List all todos&#39;).item.json.totalPages }}&#34;,\n              &#34;operator&#34;: {\n                &#34;type&#34;: &#34;number&#34;,\n                &#34;operation&#34;: &#34;equals&#34;\n              }\n            }\n          ],\n          &#34;combinator&#34;: &#34;and&#34;\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.if&#34;,\n      &#34;typeVersion&#34;: 2.2,\n      &#34;position&#34;: [\n        580,\n        160\n      ],\n      &#34;id&#34;: &#34;5c053d74-4685-4c96-9321-c37876a72026&#34;,\n      &#34;name&#34;: &#34;If Final Todos Page&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;assignments&#34;: {\n          &#34;assignments&#34;: [\n            {\n              &#34;id&#34;: &#34;6dfc0e3c-8ae4-4fb7-921a-3ccd9aefa57a&#34;,\n              &#34;name&#34;: &#34;page&#34;,\n              &#34;value&#34;: &#34;={{ $(&#39;List all todos&#39;).item.json.currentPage &#43; 1 }}&#34;,\n              &#34;type&#34;: &#34;number&#34;\n            }\n          ]\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.set&#34;,\n      &#34;typeVersion&#34;: 3.4,\n      &#34;position&#34;: [\n        740,\n        240\n      ],\n      &#34;id&#34;: &#34;da3ce2cc-5a53-4671-ad5b-78d916ad2c1b&#34;,\n      &#34;name&#34;: &#34;Increase Todos Page Number&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;const workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\n\\nreturn workflowStaticData.todos;&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        740,\n        60\n      ],\n      &#34;id&#34;: &#34;a25dab1f-2c14-45d5-a607-019c3bf26ee9&#34;,\n      &#34;name&#34;: &#34;Return All Todos&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;resource&#34;: &#34;todos&#34;,\n        &#34;operation&#34;: &#34;get&#34;,\n        &#34;id&#34;: &#34;={{ $json.id }}&#34;,\n        &#34;requestOptions&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-bee-ai.beeai&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        900,\n        60\n      ],\n      &#34;id&#34;: &#34;787ff6ce-6bf3-4ee3-a575-49a4940ceb4f&#34;,\n      &#34;name&#34;: &#34;Get a todo by ID&#34;,\n      &#34;credentials&#34;: {\n        &#34;beeAIApi&#34;: {\n          &#34;id&#34;: &#34;mOMKfymUx3xKGCvr&#34;,\n          &#34;name&#34;: &#34;BeeAI account&#34;\n        }\n      }\n    }\n  ],\n  &#34;connections&#34;: {\n    &#34;When Executed by Another Workflow&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Reset Global variable&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Reset Global variable&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Set Page Todos Number&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Set Page Todos Number&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;List all todos&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;List all todos&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Merge Todos&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Merge Todos&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;If Final Todos Page&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;If Final Todos Page&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Return All Todos&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ],\n        [\n          {\n            &#34;node&#34;: &#34;Increase Todos Page Number&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Increase Todos Page Number&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;List all todos&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Return All Todos&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Get a todo by ID&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    }\n  },\n  &#34;pinData&#34;: {},\n  &#34;meta&#34;: {\n    &#34;instanceId&#34;: &#34;8bc1c2d2c1dce278cdfe696155aa34f0a2de517c041fd1624c10504d76351bb8&#34;\n  }\n}' frame=true><\/n8n-demo>\n\n\n\n\n\n\n\n\n\n\n\n\n  \n\n\n\n\n  <h3 id=\"bee-ai---fetch-all-locations\">Bee AI - Fetch all Locations<\/h3>\n<n8n-demo workflow='{\n  &#34;nodes&#34;: [\n    {\n      &#34;parameters&#34;: {\n        &#34;inputSource&#34;: &#34;passthrough&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.executeWorkflowTrigger&#34;,\n      &#34;typeVersion&#34;: 1.1,\n      &#34;position&#34;: [\n        -320,\n        220\n      ],\n      &#34;id&#34;: &#34;d57099c7-8b5a-4a72-b2f4-cd91b3462e3a&#34;,\n      &#34;name&#34;: &#34;When Executed by Another Workflow&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;const workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\nworkflowStaticData.locations = [];\\nreturn $input.all();&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        -140,\n        220\n      ],\n      &#34;id&#34;: &#34;dd312c94-2649-4616-9326-24276d1cbd50&#34;,\n      &#34;name&#34;: &#34;Reset Global variable&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;content&#34;: &#34;## Locations\\nUsing a loop to go through paginated results&#34;,\n        &#34;height&#34;: 440,\n        &#34;width&#34;: 900,\n        &#34;color&#34;: 5\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.stickyNote&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        0,\n        0\n      ],\n      &#34;id&#34;: &#34;bb9c651c-d2b3-4f37-8999-c538fc9bf346&#34;,\n      &#34;name&#34;: &#34;Sticky Note3&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;assignments&#34;: {\n          &#34;assignments&#34;: [\n            {\n              &#34;id&#34;: &#34;6dfc0e3c-8ae4-4fb7-921a-3ccd9aefa57a&#34;,\n              &#34;name&#34;: &#34;page&#34;,\n              &#34;value&#34;: &#34;1&#34;,\n              &#34;type&#34;: &#34;string&#34;\n            }\n          ]\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.set&#34;,\n      &#34;typeVersion&#34;: 3.4,\n      &#34;position&#34;: [\n        60,\n        220\n      ],\n      &#34;id&#34;: &#34;966893ee-5f58-4ee7-8595-f3e9fee1d5eb&#34;,\n      &#34;name&#34;: &#34;Set Locations Page Number&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;resource&#34;: &#34;locations&#34;,\n        &#34;pagination&#34;: {\n          &#34;page&#34;: &#34;={{ $json.page }}&#34;,\n          &#34;limit&#34;: 200\n        },\n        &#34;requestOptions&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-bee-ai.beeai&#34;,\n      &#34;typeVersion&#34;: 1,\n      &#34;position&#34;: [\n        240,\n        220\n      ],\n      &#34;id&#34;: &#34;48749a52-7ce0-4879-9e44-93f43dc5ceb9&#34;,\n      &#34;name&#34;: &#34;List all locations&#34;,\n      &#34;credentials&#34;: {\n        &#34;beeAIApi&#34;: {\n          &#34;id&#34;: &#34;mOMKfymUx3xKGCvr&#34;,\n          &#34;name&#34;: &#34;BeeAI account&#34;\n        }\n      }\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;\/\/ Loop over input items and add a new field called &#39;myNewField&#39; to the JSON of each one\\nconst workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\n\\nconst locations = workflowStaticData.locations || [];\\n\\nlocations.push(...$input.first().json.locations);\\n\\nworkflowStaticData.locations = locations;\\n\\nreturn {locations};&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        420,\n        140\n      ],\n      &#34;id&#34;: &#34;e91664cc-b477-4140-807b-dbfe11beb6bc&#34;,\n      &#34;name&#34;: &#34;Merge Locations&#34;,\n      &#34;executeOnce&#34;: true\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;conditions&#34;: {\n          &#34;options&#34;: {\n            &#34;caseSensitive&#34;: true,\n            &#34;leftValue&#34;: &#34;&#34;,\n            &#34;typeValidation&#34;: &#34;strict&#34;,\n            &#34;version&#34;: 2\n          },\n          &#34;conditions&#34;: [\n            {\n              &#34;id&#34;: &#34;7336889b-7509-459f-a81c-d5293a043e94&#34;,\n              &#34;leftValue&#34;: &#34;={{ $(&#39;List all locations&#39;).item.json.currentPage }}&#34;,\n              &#34;rightValue&#34;: &#34;={{ $(&#39;List all locations&#39;).item.json.totalPages }}&#34;,\n              &#34;operator&#34;: {\n                &#34;type&#34;: &#34;number&#34;,\n                &#34;operation&#34;: &#34;equals&#34;\n              }\n            }\n          ],\n          &#34;combinator&#34;: &#34;and&#34;\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.if&#34;,\n      &#34;typeVersion&#34;: 2.2,\n      &#34;position&#34;: [\n        580,\n        140\n      ],\n      &#34;id&#34;: &#34;81fe06dc-4ca0-4453-a5e2-a64610625473&#34;,\n      &#34;name&#34;: &#34;If Final Locations Page&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;assignments&#34;: {\n          &#34;assignments&#34;: [\n            {\n              &#34;id&#34;: &#34;6dfc0e3c-8ae4-4fb7-921a-3ccd9aefa57a&#34;,\n              &#34;name&#34;: &#34;page&#34;,\n              &#34;value&#34;: &#34;={{ $(&#39;List all locations&#39;).item.json.currentPage &#43; 1 }}&#34;,\n              &#34;type&#34;: &#34;number&#34;\n            }\n          ]\n        },\n        &#34;options&#34;: {}\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.set&#34;,\n      &#34;typeVersion&#34;: 3.4,\n      &#34;position&#34;: [\n        740,\n        220\n      ],\n      &#34;id&#34;: &#34;6373f5ae-2c58-47c3-98aa-d46abcc6566f&#34;,\n      &#34;name&#34;: &#34;Increase Locations Page Number&#34;\n    },\n    {\n      &#34;parameters&#34;: {\n        &#34;jsCode&#34;: &#34;const workflowStaticData = $getWorkflowStaticData(&#39;global&#39;);\\n\\nreturn workflowStaticData.locations;&#34;\n      },\n      &#34;type&#34;: &#34;n8n-nodes-base.code&#34;,\n      &#34;typeVersion&#34;: 2,\n      &#34;position&#34;: [\n        740,\n        40\n      ],\n      &#34;id&#34;: &#34;888ec972-a94b-4d9f-8332-7fc535d04932&#34;,\n      &#34;name&#34;: &#34;Return All Locations&#34;\n    }\n  ],\n  &#34;connections&#34;: {\n    &#34;When Executed by Another Workflow&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Reset Global variable&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Reset Global variable&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Set Locations Page Number&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Set Locations Page Number&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;List all locations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;List all locations&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Merge Locations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Merge Locations&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;If Final Locations Page&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;If Final Locations Page&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;Return All Locations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ],\n        [\n          {\n            &#34;node&#34;: &#34;Increase Locations Page Number&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    },\n    &#34;Increase Locations Page Number&#34;: {\n      &#34;main&#34;: [\n        [\n          {\n            &#34;node&#34;: &#34;List all locations&#34;,\n            &#34;type&#34;: &#34;main&#34;,\n            &#34;index&#34;: 0\n          }\n        ]\n      ]\n    }\n  },\n  &#34;pinData&#34;: {},\n  &#34;meta&#34;: {\n    &#34;templateCredsSetupCompleted&#34;: true,\n    &#34;instanceId&#34;: &#34;8bc1c2d2c1dce278cdfe696155aa34f0a2de517c041fd1624c10504d76351bb8&#34;\n  }\n}' frame=true><\/n8n-demo>\n\n\n\n\n\n<h2 id=\"workflows\">Workflows<\/h2>\n\n\n\n\n\n\n\n  \n\n\n\n\n  <h3 id=\"bee-ai---backup-v2\">Bee AI - Backup v2<\/h3>\n<p>Uses the <code>Fetch all x<\/code> workflows to get all the data, then insert it into a MongoDB database anf a json file in Google Drive.<\/p>","title":"Bee AI n8n Workflows"},{"content":"I recently developed a custom n8n node package that connects Bee AI with the n8n workflow automation platform, opening up new possibilities for automating personal AI data.\nWhat is Bee AI? Bee AI is a wearable personal AI device that sits quietly in the background, capturing and processing your daily interactions. Unlike traditional smart assistants that require explicit activation, Bee continuously learns from your conversations, tasks, and locations, transforming these moments into actionable insights, summaries, and reminders.\nWhat is n8n? n8n is a workflow automation platform that excels at connecting different services and automating complex workflows. Its visual interface makes it accessible to both technical and non-technical users, while its extensible architecture allows developers to create custom nodes for any API.\nThe n8n-nodes-bee-ai Package Github Repo: AshDevFr\/n8n-nodes-bee-ai\nThe custom node package provides comprehensive access to Bee&rsquo;s API across four main resource types:\nConversation Management List all conversations with pagination support Retrieve specific conversation details End, delete, or retry conversations Todo Integration List and manage todos Create todos with alarm times Update completion status and content Facts and Insights Access personal insights and facts collected by Bee Filter facts by confirmation status Update and manage personal data Location Tracking Retrieve location history Filter locations by conversation context Real-World Applications The integration enables several practical automation scenarios:\nPersonal Productivity: Automatically sync Bee-generated todos with project management tools like Notion or Todoist.\nData Backup: Create automated backups of conversation summaries and personal insights.\nSmart Notifications: Set up workflows that trigger notifications based on specific keywords in conversations or location changes.\nIntegration Bridges: Connect Bee data with CRM systems, note-taking applications, or communication platforms.\nBy connecting Bee AI&rsquo;s continuous personal data collection with n8n&rsquo;s powerful automation capabilities, this integration opens up new possibilities for users to leverage their wearable AI insights in meaningful, automated ways. Whether automating productivity tasks, creating data backups, or building complex integration workflows, the package provides a solid foundation for connecting personal AI with broader digital ecosystems.\nWorkflow Example: Backup Bee AI Data to Google Drive ","permalink":"https:\/\/4sh.dev\/posts\/2025\/n8n-nodes-bee-ai\/","summary":"<p>I recently developed a custom n8n node package that connects Bee AI with the n8n workflow automation platform, opening up new possibilities for automating personal AI data.<\/p>\n<h2 id=\"what-is-bee-ai\">What is Bee AI?<\/h2>\n<p>Bee AI is a wearable personal AI device that sits quietly in the background, capturing and processing your daily interactions. Unlike traditional smart assistants that require explicit activation, Bee continuously learns from your conversations, tasks, and locations, transforming these moments into actionable insights, summaries, and reminders.<\/p>","title":"Bee AI n8n nodes"},{"content":"Self-RAG (Self-Reflective Retrieval-Augmented Generation) is a framework that combines the benefits of retrieval-augmented generation (RAG) with self-reflection, allowing large language models (LLMs) to adaptively retrieve passages on-demand and generate more accurate responses.\nLanggraph recently published a blog post on Self-RAG with their own implementation.\nI really like the idea of validating the retrieved information. In that past I have noticed that, while vector databases will return documents that usually match the input query string, some may contain irrelevant content. Having the ability to validate and correct this is a great feature for any RAG setup.\nInitial implementation of the Langchain blog post Here&rsquo;s my take on implementing a simple Self-RAG agent using Langchain and Langgraph.\nMy use-case was the following: I wanted to use self RAG to provide answers based on our internal documentation first, then if the application vector database does not return any documents, it will search the web.\nSo my first step was to implement the code provided by Langchain in their blog post and make it work on my local LLM and local vector database (PGVector)\nGraph %%{init: {&#39;flowchart&#39;: {&#39;curve&#39;: &#39;linear&#39;}}}%% graph TD; __start__([&lt;p&gt;__start__&lt;\/p&gt;]):::first retrieve(retrieve) grade_documents(grade_documents) generate(generate) transform_query(transform_query) __end__([&lt;p&gt;__end__&lt;\/p&gt;]):::last __start__ --&gt; retrieve; retrieve --&gt; grade_documents; grade_documents -.-&gt; transform_query; grade_documents -.-&gt; generate; transform_query -.-&gt; retrieve; generate -. &amp;nbsp;useful&amp;nbsp; .-&gt; __end__; generate -. &amp;nbsp;not useful&amp;nbsp; .-&gt; transform_query; generate -. &amp;nbsp;not supported&amp;nbsp; .-&gt; generate; classDef default fill:#0059B3FF,line-height:1.2,color:#FFFFFF classDef first fill:#0A470AFF classDef last fill:#0A470AFF linkStyle default stroke:#FFFFFF Here is what happens in this graph:\nWhen we send the question to our retrieve agent, it will retrieve relevant documents from PGVector. Then the grade_documents agent will grade those documents based on their relevance to the question. If the document is useful for answering the question, it generates an answer directly. If not, it transforms the query and retrieves more documents until it finds a useful one. After it finds a useful document, it generates an answer from that document using the generate agent. Using a hallucination_grader agent, it will check if the generated answer is supported by a set of facts or not. If it&rsquo;s not supported, it will regenerate the answer and try again. If it&rsquo;s suppported, it will grade the answer Using an answer_grader agent, it will determine if the generated answer is useful or not for answering the question. If it is useful, it ends the process and outputs the final answer. If it is not useful, it transforms the query again and tries to find a more relevant document. Next step: Web search After setting up the Self-RAG implementation, I encountered a first major challenge: infinite loops. In some cases, no matter how many times I transformed the question, I couldn&rsquo;t retrieve relevant documents from the vector database.\nTo address this issue, I made the decision to limit the number of transformations to 2 per attempt. If, after these 2 retries (3 attempts in total), the retrieved documents still didn&rsquo;t meet the expectations, it was time to fall back on web searching using DuckDuckGo.\nSo I implemented a retry counter. When the current question fails to yield useful results for 3 consecutive attempts, it then reset the current question to the original question and start over from that point.\nAfter resetting the question, it will stop using the retrieve agent and instead, use the web_search agent. This agent will execute a web search using DuckDuckGo and then pass the documents through the grade_documents agent. If this process yield useful documents, it will use the generate agent to produce an answer from them.\nHowever, even with these precautions in place, I still had a retry limit for web searching: 3 attempts before conceding defeat. At the end of the process, there is two possible outcomes: either I&rsquo;d successfully generated an answer and reached the result node, or I&rsquo;d encountered a scenario where no useful information was available after multiple attempts, at which point I&rsquo;d reach the no_results node.\nGraph Here is the final graph:\n%%{init: {&#39;flowchart&#39;: {&#39;curve&#39;: &#39;linear&#39;}}}%% graph TD; __start__([&lt;p&gt;__start__&lt;\/p&gt;]):::first init(init) reset(reset) retrieve(retrieve) web_search(web_search) grade_documents(grade_documents) generate(generate) transform_query(transform_query) no_result(no_result) result(result) __end__([&lt;p&gt;__end__&lt;\/p&gt;]):::last __start__ --&gt; init; init --&gt; retrieve; no_result --&gt; __end__; reset --&gt; web_search; result --&gt; __end__; retrieve --&gt; grade_documents; web_search --&gt; grade_documents; grade_documents -.-&gt; transform_query; grade_documents -.-&gt; generate; transform_query -.-&gt; reset; transform_query -.-&gt; web_search; transform_query -.-&gt; retrieve; transform_query -.-&gt; no_result; generate -. &amp;nbsp;useful&amp;nbsp; .-&gt; result; generate -. &amp;nbsp;not useful&amp;nbsp; .-&gt; transform_query; generate -. &amp;nbsp;not supported&amp;nbsp; .-&gt; generate; classDef default fill:#0059B3FF,line-height:1.2,color:#FFFFFF classDef first fill:#0A470AFF classDef last fill:#0A470AFF linkStyle default stroke:#FFFFFF Demo Of course I wrapped this with a nice React + MUI web app, and here is a small demo of how it works:\nReturning results for the vector database Returning web search results Conclusion In this journey, I&rsquo;ve had the opportunity to implement Self-RAG using Langchain and Langgraph, and I must say it&rsquo;s been an exciting experience. While my implementation is opinionated and doesn&rsquo;t provide a lot of room for extension, it has provided valuable insights into how to effectively utilize these libraries.\nHowever, as with any solution, there are limitations to this approach. To overcome these challenges, I plan to work on creating more reusable components that can be easily integrated into future implementations.\nThis has been a fun project to work on.\nYou can find the code for this project on this repo.\n","permalink":"https:\/\/4sh.dev\/posts\/2024\/an-opinionated-rag-agent\/","summary":"<p><a href=\"https:\/\/arxiv.org\/abs\/2310.11511\">Self-RAG<\/a> (Self-Reflective Retrieval-Augmented Generation) is a framework that\ncombines the benefits of\nretrieval-augmented generation (RAG) with self-reflection, allowing large language models (LLMs) to adaptively retrieve\npassages on-demand and generate more accurate responses.<\/p>\n<p>Langgraph recently published\na <a href=\"https:\/\/langchain-ai.github.io\/langgraph\/tutorials\/rag\/langgraph_self_rag_local\/\">blog post<\/a> on <em>Self-RAG<\/em> with their\nown implementation.<\/p>\n<p>I really like the idea of validating the retrieved information. In that past I have noticed that, while vector databases\nwill return documents that usually match the input query string, some may contain irrelevant content.\nHaving the ability to validate and correct this is a great feature for any RAG setup.<\/p>","title":"RAG Agents with LangChain and LangGraph"},{"content":"I recently published my first tabletop role-playing game (TTRPG) designed specifically for young hearts, Adventures in Greenhaven.\nThis project matters to me because I want to make tabletop gaming accessible and enjoyable for kids.\nI&rsquo;ve always been passionate about sharing the magic of D&amp;D with others, but as my children grew older, I realized that traditional D&amp;D wasn&rsquo;t quite suitable for them yet. So, I decided to create a game that captures the essence of D&amp;D, but with simpler rules, more accessible storytelling, and a focus on fun and adventure.\nAdventures in Greenhaven is set in a magical world called the Greenhaven Realm, where imagination knows no bounds. Players take on the roles of young explorers navigating a richly detailed landscape filled with wonder and excitement. With fewer risks and simpler rules, this game is perfect for kids aged 5-8 who are just starting to explore the world of tabletop gaming.\nThe rules and adventure modules are now available at Aventures in Greenhaven. As I continue to playtest and refine this game with my kids, I&rsquo;ll be making updates and iterations based on our feedback and experiences. This means that the game will evolve over time, but one thing is certain: it&rsquo;s only going to get more fun! Thank you for joining me on this adventure - let&rsquo;s explore the Greenhaven Realm together!\n","permalink":"https:\/\/4sh.dev\/posts\/2024\/adventures-in-greenhaven\/","summary":"<p>I recently published my first tabletop role-playing game (TTRPG) designed specifically for young hearts, Adventures in\nGreenhaven.<\/p>\n<p>This project matters to me because I want to make tabletop gaming accessible and enjoyable for kids.<\/p>\n<p>I&rsquo;ve always been passionate about sharing the magic of D&amp;D with others, but as my children grew older, I realized that\ntraditional D&amp;D wasn&rsquo;t quite suitable for them yet. So, I decided to create a game that captures the essence of D&amp;D, but\nwith simpler rules, more accessible storytelling, and a focus on fun and adventure.<\/p>","title":"Adventures in Greenhaven"},{"content":"After spending years trying to build mini D&amp;D games using JS, Elm, Elixir, etc&hellip; I decided to give a shot to Unity.\nDungeon generator I decided to jump right away into Unity and build a procedural dungeon generator from scratch.\nAs expected the result was not great (pretty ugly let&rsquo;s be honest). It&rsquo;s not that C# is difficult, but you have to learn a new tool (Unity) which comes with a lot of new concepts and options that if you don&rsquo;t know makes your task more complex.\nLearning for real I decided that it would be best to start from the beginning, and learn like the newbie I was.\nI was pretty impressed by some of the free courses available at https:\/\/learn.unity.com. Some of them were really well constructed (ex: Create with Code) and it was nice to work on the projects.\nHere are some of the mini projects I created:\nGoing further Learning on Unity Learn was a good first step but I was still missing some concepts and we were not &ldquo;really&rdquo; building all of the games, most projects had already a lot of assets ready.\nI found that some of the courses on Udemy were nice too (I am not sponsored at all by Udemy). If you wait long enough (usually every other week \ud83d\ude05) Udemy will discount all of there courses and you will be able to buy some nice ones for ~$12-$15.\nI bought and followed this one: https:\/\/www.udemy.com\/course\/the-ultimate-guide-to-game-development-with-unity\/\nIt was recommended as one of the most complete courses on a few websites so I decided to give it a try.\nFollowing the videos was easy after doing the courses on Unity Learn but I still learned a lot and was able to build a mini game.\n{{ }}\nThe rest of the course is OK, you work on a mini platform 2.5D Game and a mini FPS game using a lot of existing assets, it not necessarily rewarding since most of it is build for you but it does teach a few tricks.\nI think I had a few issues working on the FPS game since it was using old packages for unity 2017.x that were discontinued. It took me some time to make it work.\nNext I&rsquo;ll keep learning Unity, I don&rsquo;t see myself becoming a Professional Game Dev of even an Indie Game Dev but I really like that as a hobby.\nI think now it&rsquo;s time to look at Blender to learn how to build and rig 3D models.\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/game-dev-unity\/","summary":"<p>After spending years trying to build mini D&amp;D games using JS, Elm, Elixir, etc&hellip; I decided to give a shot to Unity.<\/p>\n<h2 id=\"dungeon-generator\">Dungeon generator<\/h2>\n<p>I decided to jump right away into Unity and build a procedural dungeon generator from scratch.<\/p>\n<p><img loading=\"lazy\" src=\"\/posts\/_old-blog\/game-dev-unity\/Screen-Shot-2021-09-01-at-11.16.32-PM.png\">\n<img loading=\"lazy\" src=\"\/posts\/_old-blog\/game-dev-unity\/Screen-Shot-2021-09-01-at-11.16.41-PM.png\">\n<img loading=\"lazy\" src=\"\/posts\/_old-blog\/game-dev-unity\/Screen-Shot-2021-09-01-at-11.17.33-PM.png\"><\/p>\n<div style=\"text-align: center;\">\n    <a class=\"shortcode-youtube\" href=\"https:\/\/www.youtube.com\/watch?v=k6xC7YY7mHE\" title=\"Play Youtube video\" target=\"_blank\">\n        <img\n            width=\"600\"\n            height=\"339\"\n            src=\"https:\/\/i.ytimg.com\/vi\/k6xC7YY7mHE\/hqdefault.jpg\"\n            alt=\"Youtube video k6xC7YY7mHE\"\n        \/>\n<\/a>\n<\/div>\n\n<style>\n    .shortcode-youtube {\n        position: relative; display: inline-block;\n    }\n    .shortcode-youtube::before, .shortcode-youtube::after {\n        content: \"\";\n        width: 100%;\n        height: 100%;\n        position: absolute;\n        top: 0;\n        left: 0;\n    }\n    .shortcode-youtube::before {\n        background: url(\"\/images\/youtube_button.svg\") center center \/ auto 4rem no-repeat;\n    }\n    .shortcode-youtube:hover::before {\n        background: url(\"\/images\/youtube_button_hover.svg\") center center \/ auto 4rem no-repeat;\n    }\n    .shortcode-youtube::after {\n        background: url(\"\/images\/youtube.svg\") calc(100% - 1rem) calc(100% - 1rem) \/ auto 2rem no-repeat;\n    }\n    .shortcode-youtube img {\n        display: block;\n    }\n<\/style>\n\n<p>As expected the result was not great (pretty ugly let&rsquo;s be honest). It&rsquo;s not that C# is difficult, but you have to learn a new tool (Unity) which comes with a lot of new concepts and options that if you don&rsquo;t know makes your task more complex.<\/p>","title":"Game Dev - Unity"},{"content":"It&rsquo;s been few weeks since my last update. I have been quite busy working on a lot of interesting stuff. Some related to this project, some a bit less.\nHere is a preview of the Dynamic lightning I have been working on. It&rsquo;s not live for now since it needs a lot of small adjustments before being 100% usable.\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/encounters-v0-3-0-alpha-dynamic-lightning-is-coming\/","summary":"<p>It&rsquo;s been few weeks since my last update. I have been quite busy working on a lot of interesting stuff. Some related to this project, some a bit less.<\/p>\n<p>Here is a preview of the Dynamic lightning I have been working on. It&rsquo;s not live for now since it needs a lot of small adjustments before being 100% usable.<\/p>\n<div style=\"text-align: center;\">\n    <a class=\"shortcode-youtube\" href=\"https:\/\/www.youtube.com\/watch?v=b2GbM7xtfUI\" title=\"Play Youtube video\" target=\"_blank\">\n        <img\n            width=\"560\"\n            height=\"315\"\n            src=\"https:\/\/i.ytimg.com\/vi\/b2GbM7xtfUI\/hqdefault.jpg\"\n            alt=\"Youtube video b2GbM7xtfUI\"\n        \/>\n<\/a>\n<\/div>\n\n<style>\n    .shortcode-youtube {\n        position: relative; display: inline-block;\n    }\n    .shortcode-youtube::before, .shortcode-youtube::after {\n        content: \"\";\n        width: 100%;\n        height: 100%;\n        position: absolute;\n        top: 0;\n        left: 0;\n    }\n    .shortcode-youtube::before {\n        background: url(\"\/images\/youtube_button.svg\") center center \/ auto 4rem no-repeat;\n    }\n    .shortcode-youtube:hover::before {\n        background: url(\"\/images\/youtube_button_hover.svg\") center center \/ auto 4rem no-repeat;\n    }\n    .shortcode-youtube::after {\n        background: url(\"\/images\/youtube.svg\") calc(100% - 1rem) calc(100% - 1rem) \/ auto 2rem no-repeat;\n    }\n    .shortcode-youtube img {\n        display: block;\n    }\n<\/style>","title":"Encounters v0.3.0 (Alpha) - Dynamic lightning is coming"},{"content":"I have been playing a lot with Kubernetes lately, from creating a cluster from scratch on bare metal, setting up a ELK stack, Prometheus metrics to setting up a CI\/CD using Gitlab CI.\nI found the last one so easy that I made a video for it.\nI have been using a DigitalOcean Kubernetes cluster for this video, it was super easy and I got $100 to play with it for 60 days.\nIf you have never tried it, I encourage you to try it out. Here is a link you can use to get the $100 credits: DigitalOcean\nThe video shows how I create a cluster, setup a service account on it for Gitlab ci, then setup a gitlab runner on the cluster.\nThe easiest way to do it is to use the button in Gitlab UI to create a runner on your cluster, or to use Helm from the console, but in my case I wanted to customize a bit more the runner to be able to use Docker DinD to build Docker images from Gitlab ci.\nUsing Helm from the console You can take a look at the doc here: https:\/\/docs.gitlab.com\/runner\/install\/kubernetes.html#installing-gitlab-runner-using-the-helm-chart\nHere are the values I have been using when I tried with Helm\nYou can then install the runner using this command:\n# Add the repo helm repo add gitlab https:\/\/charts.gitlab.io # Install helm install --namespace gitlab-managed-apps gitlab-runner gitlab\/gitlab-runner -f values.yaml The issue with this is that for now, gitlab chart does not use the volumes when creating it&rsquo;s config file (config.toml). So one way to fix it if you still want to use Helm is to change the ConfigMap manually in Kubernetes. You&rsquo;ll find a lot of issues here that are talking about it.\nTo fix that you can run kubectl edit -n gitlab-managed-apps ConfigMap gitlab-runner-name then add this before # Start the runner:\ncat &gt;&gt; \/home\/gitlab-runner\/.gitlab-runner\/config.toml &lt;&lt;-EOF [[runners.kubernetes.volumes.host_path]] name = &#34;docker&#34; mount_path = &#34;\/var\/run\/docker.sock&#34; read_only = true host_path = &#34;\/var\/run\/docker.sock&#34; [[runners.kubernetes.volumes.host_path]] name = &#34;certs&#34; mount_path = &#34;\/certs\/client&#34; read_only = true host_path = &#34;\/certs\/client&#34; [[runners.kubernetes.volumes.host_path]] name = &#34;cache&#34; mount_path = &#34;\/cache&#34; read_only = true host_path = &#34;\/cache&#34; EOF Using Kubectl The way I did it was to extract the templates from the chart and modify them to add my changes in the ConfigMap\nTo extract the yaml files you can use helm template gitlab\/gitlab-runner --output-dir '.' -f values.yaml\nYou will get a bunch of files depending on your values.\nThen edit the configmap.yaml to add the previous block and get something like this:\nOnce it&rsquo;s done you can run kubectl apply -f &lt;file&gt; for your files\nkubectl apply -f service-account.yaml kubectl apply -f secrets.yaml kubectl apply -f configmap.yaml kubectl apply -f deployment.yaml ","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/from-kubernetes-to-gitlab-ci-in-less-than-10min\/","summary":"<p>I have been playing a lot with Kubernetes lately, from creating a cluster from scratch on bare metal, setting up a ELK stack, Prometheus metrics to setting up a CI\/CD using Gitlab CI.<\/p>\n<p>I found the last one so easy that I made a video for it.<\/p>\n<p>I have been using a DigitalOcean Kubernetes cluster for this video, it was super easy and I got $100 to play with it for 60 days.<\/p>","title":"From Kubernetes to Gitlab-ci in less than 10min"},{"content":"Ok now it&rsquo;s getting a bit more serious.\nWe can now create, save and restore maps in the editor:\nThis tool is available here: https:\/\/encounters.4sh.dev\nEdit: Added support for video maps:\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/encounters-v0-2-0-alpha\/","summary":"<p>Ok now it&rsquo;s getting a bit more serious.<\/p>\n<p>We can now create, save and restore maps in the editor:<\/p>\n<div style=\"text-align: center;\">\n    <a class=\"shortcode-youtube\" href=\"https:\/\/www.youtube.com\/watch?v=4CicbnaluQY\" title=\"Play Youtube video\" target=\"_blank\">\n        <img\n            width=\"560\"\n            height=\"315\"\n            src=\"https:\/\/i.ytimg.com\/vi\/4CicbnaluQY\/hqdefault.jpg\"\n            alt=\"Youtube video 4CicbnaluQY\"\n        \/>\n<\/a>\n<\/div>\n\n<style>\n    .shortcode-youtube {\n        position: relative; display: inline-block;\n    }\n    .shortcode-youtube::before, .shortcode-youtube::after {\n        content: \"\";\n        width: 100%;\n        height: 100%;\n        position: absolute;\n        top: 0;\n        left: 0;\n    }\n    .shortcode-youtube::before {\n        background: url(\"\/images\/youtube_button.svg\") center center \/ auto 4rem no-repeat;\n    }\n    .shortcode-youtube:hover::before {\n        background: url(\"\/images\/youtube_button_hover.svg\") center center \/ auto 4rem no-repeat;\n    }\n    .shortcode-youtube::after {\n        background: url(\"\/images\/youtube.svg\") calc(100% - 1rem) calc(100% - 1rem) \/ auto 2rem no-repeat;\n    }\n    .shortcode-youtube img {\n        display: block;\n    }\n<\/style>\n\n<p>This tool is available here: <a href=\"https:\/\/encounters.4sh.dev\/\">https:\/\/encounters.4sh.dev<\/a><\/p>","title":"Encounters v0.2.0 (Alpha)"},{"content":"I&rsquo;m still playing with canvas and I plugged the dungeon generator I worked on a year ago.\nThis is the result:\nThis tool is available here: https:\/\/encounters.4sh.dev\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/encounters-v0-1-1-alpha\/","summary":"<p>I&rsquo;m still playing with canvas and I plugged the dungeon generator I worked on a year ago.<\/p>\n<p>This is the result:<\/p>\n<div style=\"text-align: center;\">\n    <a class=\"shortcode-youtube\" href=\"https:\/\/www.youtube.com\/watch?v=OjLxWfAJFRI\" title=\"Play Youtube video\" target=\"_blank\">\n        <img\n            width=\"560\"\n            height=\"315\"\n            src=\"https:\/\/i.ytimg.com\/vi\/OjLxWfAJFRI\/hqdefault.jpg\"\n            alt=\"Youtube video OjLxWfAJFRI\"\n        \/>\n<\/a>\n<\/div>\n\n<style>\n    .shortcode-youtube {\n        position: relative; display: inline-block;\n    }\n    .shortcode-youtube::before, .shortcode-youtube::after {\n        content: \"\";\n        width: 100%;\n        height: 100%;\n        position: absolute;\n        top: 0;\n        left: 0;\n    }\n    .shortcode-youtube::before {\n        background: url(\"\/images\/youtube_button.svg\") center center \/ auto 4rem no-repeat;\n    }\n    .shortcode-youtube:hover::before {\n        background: url(\"\/images\/youtube_button_hover.svg\") center center \/ auto 4rem no-repeat;\n    }\n    .shortcode-youtube::after {\n        background: url(\"\/images\/youtube.svg\") calc(100% - 1rem) calc(100% - 1rem) \/ auto 2rem no-repeat;\n    }\n    .shortcode-youtube img {\n        display: block;\n    }\n<\/style>\n\n<p>This tool is available here: <a href=\"https:\/\/encounters.4sh.dev\/\">https:\/\/encounters.4sh.dev<\/a><\/p>","title":"Encounters v0.1.1 (Alpha)"},{"content":" Multi-stage In the beginning When we first started to build docker images, long before the multi-stage syntax, our projects would look something like this:\nWe would have a base docker image containing the dependencies shared by the development and the production image, then one file for each final image.\nThe script build.sh shows that we first build the base image tagging it as base_image, then depending of the argument passed to the script we would build the final image.\nIntroducing multi-stage with target Docker then introduced the multi-stage syntax for us to do everything in one file.\nWe now introduce the target argument for docker build. In the script build.sh we use the argument to specify the image we want to build.\nSo far it looks like a good deal, but there is a catch: If you want to build the last image ( production in that case) the builder will go through all the instructions even if they are not part of the final image.\nAs we can see on the result above, the builder is actually running through ALL the instructions, but the final image will only contain the result of base_image + production_image.\nI added a sleep in each images to demonstrate the time spent by the final image to build. The final image is built in ~23sec because each image was built.\nUsing ONBUILD to skip instructions The ONBUILD instruction in a Dockerfile allows an instruction to be ran only when it is part of the final build.\nLet&rsquo;s take a look at the next example, we still use the multi-stage syntax + target but this time we use ONBUILD to make things faster.\nThe Dockerfile now has a dynamic final image name. We use &ndash;build-args with ARG` to set the variable on build.\nWith the ONBUILD instruction in each images, the builder will go through each instructions first until it reaches the target image (in that case the latest one FROM ${_APP_ENV_}_image). Once it is done going through the file, it will run the instructions really used.\nThis time the build only took ~14sec to finish. And with the same final image. It&rsquo;s a really good improvement but at what cost?. The image is not super clear and we had to create this &ldquo;fake&rdquo; target image.\nBuildKit BuildKit was introduced later and works in a different way. Instead of running through the file and executing all instructions one by one, it will read the file, then create a tree of images dependencies.\nDocker build will run all stages in sequences and discard the one we don&rsquo;t use in the end. BuildKit will traverse from the bottom to the top and only execute what we need.\nThe Dockerfile is the same as before all the fuss with ONBUILD, so much clear. In the build script, we used DOCKER_BUILDKIT=1 to mention to the builder that we want to use BuildKit.\nThis time the build only took ~11sec, it&rsquo;s really close to the previous build but the Dockerfile is clear, and we did not have to use a &ldquo;fake&rdquo; target image.\nCaching The issue When using multi-stage building in a CI\/CD environment, we build the image in a discardable environment, which means that most of the time you won&rsquo;t have a cache for the builder.\nOne of the ways to fix that, is to pull the previous image and use the --cache-from argument in the builder\nFirst case In the case we are using our the base_image as the base for production_image\nIf our final image is using the base image as its base, then there is no issue, all the layers are part of the final image.\nIf the base image has the layers [1, 2, 3, 4], and we use it for the final image adding layer [5, 6, 7], then the image we will push to the registry will contain the layers [1, 2, 3, 4, 5, 6, 7].\nHere we can see the result of the build using the previous image. It is using the cache from the final image and is super fast (~0.2sec)\nSecond case In this case we use the base_image to build stuff, then we start production_image with a clean slate and copy the result of the base_image in the production_image.\nIf the base image has the layers [1, 2, 3, 4], and we use a clean image for the final image adding layer [5, 6, 7], then the image we will push to the registry will contain the layers [5, 6, 7].\nBecause of that, the base_image won&rsquo;t be able to use cache, and thereby will invalidate the cache for the final_image.\nHere, the cache is never used.\nA potential solution Instead of building all the steps in one, we can run the builder for each step of the final image.\nFor each stage, we can pull the previous build then use it as a cache.\nOnce each stage is built (ex: base_image and production_image) we need to push them on the registry.\nAs we can see here, the cache is used in both images.\nThis solution works, the only trade off is that we have to push and pull each stages to and from the registry.\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/docker-multi-stage-caching\/","summary":"<figure>\n    <img loading=\"lazy\" src=\"whale_0-1.png\"\/> \n<\/figure>\n\n<h1 id=\"multi-stage\">Multi-stage<\/h1>\n<h2 id=\"in-the-beginning\">In the beginning<\/h2>\n<p>When we first started to build docker images, long before the multi-stage syntax, our projects would look something like this:<\/p>\n<script src=\"https:\/\/gist.github.com\/AshDevFr\/4342185f3d4bfe67961fff7f0f2a99a4.js\"><\/script>\n\n<p>We would have a base docker image containing the dependencies shared by the <code>development<\/code> and the <code>production<\/code> image, then one file for each final image.<\/p>\n<p>The script <code>build.sh<\/code> shows that we first build the base image tagging it as <code>base_image<\/code>, then depending of the argument passed to the script we would build the final image.<\/p>","title":"Docker: Multi-stage & Caching"},{"content":"The context With the COVID-19 and the shelter in place, there is not much opportunities to play D&amp;D face to face with friends.\nSome groups decided to go to platforms like Roll20 or Fantasy Ground. While I love those apps they are lacking something in my opinion: an integration with DnD Beyond.\nI personally have a LOT of digital content on DnD Beyond and the idea of buying it again on another platform is not something I am considering.\nUnfortunately the business model of each of those will probably prevent them from building integrations with their competitors.\nThe project With that being said, I decided to spend more time coding while I could not play the way I wanted.\nI have always been interested in doing my part for the D&amp;D community. As a developer, it has mostly been by building app and tools like the chrome extension I worked on few months ago (D&amp;D Beyond DM Screen).\nThis time I decided to go much further with an ambitious and maybe unreachable project: Building my own platform.\nHere is a list of the thing I wanted to have:\nCharacter import from DnD Beyond DM Screen to replace the chrome extension and allow people to use it on other browsers \/ devices (like tablets) A tabletop where I could use my characters from DnD Beyond And a lot of other stuff :) And you know what, I should even get crazy and use the dungeon generator I built more than a year ago using minimum spanning tree to link the rooms.\nI have just published two elixir libraries to find the Delaunay triangulation and calculate the minimum spanning tree using Kruskal. Tweet\nThe beginning: Playing with canvases I started playing with Fabric.js, a tool to manipulate canvases in JavaScript.\nAfter struggling a lot, I was finally able to get a nice &ldquo;base&rdquo; for my tabletop.\nYeah, I can draw and zoom with a canvas:\nSo next, I wanted to be able to stick objects to the grid, like in a real tabletop app.\nLet&rsquo;s get real now: Layers Ok, canvas are fun but I needed to add more features on top of it.\nThis version now integrates layers which is super helpful if you want to have a map in the background, decors, and token on top of them.\nThis version also comes with copy \/ paste and save \/ restore\nLet&rsquo;s be honest now: Animated backgrounds Lately I have seen a lot of fuzz around animated backgrounds on tabletop apps. And I confess, I also love that feature so I HAD to implement it.\nGreat animated background project (from which I took the free animated background): https:\/\/www.patreon.com\/dynamicdungeons\nThe zoom The zoom feature I was using was kind of buggy so I decided to rebuild it and this is the result:\nThe web app For this app I wanted to build something robust and scalable. It took some time to come with a good start.\nI won&rsquo;t detail more the whole process but this is some example of features available in the first Alpha version here.\nDISCLAIMER: This project is barely in Alpha.The database might be reset from time to time.Please be patient for bug fixes and feature request as I am doing this project on my free time.\nIf you find issues, you can create an issue in github here: https:\/\/github.com\/AshDevFr\/encounters_app\nCharacter Import:\nCampaign creation:\nCampaign characters assign:\nDM Screen:\nNext Here is a list of the things I&rsquo;m going to work on next:\nEditor Create maps Save and restore from the api Generate a dungeon Add videos Add character tokens Overlay on characters to display basics stats Read only version for players with the ability to move their own token Encounters Create Add characters Add NPC Initiative Asset management Save list of external assets Upload assets of integrate with Box \/ Dropbox \/ Drive DM Screen Refresh all characters Auto refresh Characters Create characters Edit characters Display character&rsquo;s sheets Content Create content (modules \/ campaigns \/ encounters) Export \/ Import content Share content Conclusion I will keep working on this project on my free time.\nIf you are good at UI and wants to participate on creating UI components for this project, feel free to reach out.\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/d-d-toolbox\/","summary":"<h2 id=\"the-context\">The context<\/h2>\n<p>With the COVID-19 and the shelter in place, there is not much opportunities to play D&amp;D face to face with friends.<\/p>\n<p>Some groups decided to go to platforms like Roll20 or Fantasy Ground. While I love those apps they are lacking something in my opinion: an integration with DnD Beyond.<\/p>\n<p>I personally have a LOT of digital content on DnD Beyond and the idea of buying it again on another platform is not something I am considering.<\/p>","title":"D&D Toolbox"},{"content":"Few months ago, I worked on a Chrome extension to make my life easier when DMing D&amp;D using DnD Beyond characters.\nDM Screen Extension Screenshot D&amp;D Beyond Campaign DM Screen\nThe extension has a simple goal: providing the characters&rsquo;s stats in a useful way and refreshing the data when the character&rsquo;s sheets are updated.\nWithout the extension With the extension When using the embedded version of the DM screen:\nWhen using the popup version:\nThis is the extension &ldquo;live&rdquo;:\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/d-d-dm-screen\/","summary":"<p>Few months ago, I worked on a Chrome extension to make my life easier when DMing D&amp;D using DnD Beyond characters.<\/p>\n<figure>\n    <img loading=\"lazy\" src=\"https:\/\/user-images.githubusercontent.com\/7372540\/70300109-84052e80-17ab-11ea-97c1-c250e4ad8d29.png\"\/> <figcaption>\n            DM Screen Extension Screenshot\n        <\/figcaption>\n<\/figure>\n\n<p><a href=\"https:\/\/chrome.google.com\/webstore\/detail\/dd-beyond-campaign-dm-scr\/oiajbaepngjfcgimlkaedfkdjkklkfhh\">D&amp;D Beyond Campaign DM Screen<\/a><\/p>\n<p>The extension has a simple goal: providing the characters&rsquo;s stats in a useful way and refreshing the data when the character&rsquo;s sheets are updated.<\/p>\n<h2 id=\"without-the-extension\">Without the extension<\/h2>\n<figure>\n    <img loading=\"lazy\" src=\"image.png\"\/> \n<\/figure>\n\n<h2 id=\"with-the-extension\">With the extension<\/h2>\n<p>When using the embedded version of the DM screen:<\/p>\n<figure>\n    <img loading=\"lazy\" src=\"image-1.png\"\/> \n<\/figure>\n\n<p>When using the popup version:<\/p>","title":"D&D Beyond DM Screen"},{"content":" Few years ago I created a docker image for me to play on Minecraft with friends.\nI have been updating this image from time to time but basically it&rsquo;s almost always compatible with the new version since it&rsquo;s building the game server from the sources.\nThe project can be found here: https:\/\/github.com\/AshDevFr\/docker-spigot\nThe docker image can be found here: https:\/\/hub.docker.com\/r\/ashdev\/minecraft-spigot\nI provide the image with an ubuntu base or an alpine base which is much smaller.\nShow and tell In 2019 I presented this project during the 6th docker&rsquo;s bday in San Francisco\nYou can check the slides if you are interested:\nThe options This image come with a lot of integrated plugin that can be installed just by adding an option when running the server. (Using env variables)\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/minecraft-on-docker\/","summary":"<figure>\n    <img loading=\"lazy\" src=\"800px-Nether_Update.png\"\/> \n<\/figure>\n\n<p>Few years ago I created a docker image for me to play on Minecraft with friends.<\/p>\n<p>I have been updating this image from time to time but basically it&rsquo;s almost always compatible with the new version since it&rsquo;s building the game server from the sources.<\/p>\n<p>The project can be found here: <a href=\"https:\/\/github.com\/AshDevFr\/docker-spigot\">https:\/\/github.com\/AshDevFr\/docker-spigot<\/a><\/p>\n<p>The docker image can be found here: <a href=\"https:\/\/hub.docker.com\/r\/ashdev\/minecraft-spigot\">https:\/\/hub.docker.com\/r\/ashdev\/minecraft-spigot<\/a><\/p>\n<p>I provide the image with an ubuntu base or an alpine base which is much smaller.<\/p>","title":"Minecraft  1.15 power by docker"},{"content":"Few months ago, a friend of mine @florpeliere started to work on progressives web apps. First, I was intrigued, but not that much. Then he gave us a talk about them, and I started to realise the potential of this concept. Well, it is not a huge change, it is something which is used for a while; but now, there is a name on it and an official specification.\nA web app on my phone, with offline data, ok but what kind of app ?\nSo I decided to develop an example of Progressive Web App using Ember.js. For the behaviour I decided to make a blog. I think that it could be nice when you like a blog, to have it offline when you are in the subway.\nMain points:\nBe able to read offline Fetching and caching full posts when updating the post list Nice UI but not necessarily material design (I decided to use the Casper theme from Ghost) Technical Specifications:\nA frontend using Ember.js A backend using Sails MongoDB to store data Docker in Dev with a docker-compose file Docker in prod to push on heroku (If you are looking for a ssl certificate for your app, go on Let&rsquo;s Encrypt)\nToDo:\nTo have a real blog I have to add an admin part to write posts and change settings To improve the app shell to avoid the blank page when loading the application To write some posts? The project: Ember Blog\nYou can find the code of the application here\nFew screenshots :\nLoading\nPost list\nPost detail\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/one-step-in-the-progressives-web-apps\/","summary":"<p>Few months ago, a friend of mine <a href=\"https:\/\/twitter.com\/florpeliere\">@florpeliere<\/a> started to work on progressives web apps.\nFirst, I was intrigued, but not that much.\nThen he gave us a talk about them, and I started to realise the potential of this concept.\nWell, it is not a huge change, it is something which is used for a while; but now, there is a name on it and an official specification.<\/p>\n<blockquote>\n<p>A web app on my phone, with offline data, ok but what kind of app ?<\/p>","title":"One step in the Progressives Web Apps"},{"content":"The event This week is the Docker&rsquo;s 3rd birthday. Around the world, a lot of meetups were organized with the same program.\nFor this event the Docker team has created a specific presentation with a fun training on how to build, ship and run a distributed application with ease.\nThe slides of the presentation :\nThe training was in two parts:\nFirst, a self-paced beginners\u2019 tutorial for attendees to learn Docker.\nThen, after the training, everyone was invited to participate to a challenge which consisted in improving the sample voting app presented last year during the Docker Con EU. From new features to changes to the architecture, Docker was looking for cool hacks based on what we learned during the training!\nAll the training materials were available on https:\/\/github.com\/docker\/docker-birthday-3 .\nThe meetup in Paris (21st of March) The meetup was hosted by school 42. It was the first time I saw so many people. The room was full, some were forced to sit on the ground.\nThe presentation was given by @AdrienBlind. He provided us a really clear and interesting talk.\nDuring the training and before the social time, we split the group in two smaller groups and the mentors (including myself) helped attendees to run the training.\nIn the end it was a really good introduction for a lot of people. Some thought that the challenge was far more complicated than the training.\nHands-on Docker (22nd of March) As I announced few weeks ago on this post I gave last night a hands-on Docker at Sfeir.\nDuring almost 3 hours, attendees learnt how to build, ship and run applications with Docker.\nThe training was in 6 parts:\nRunning your first container Using the Docker hub to get images and use them Dockerfile: create your own image Real case: use docker in an existing application Link: communication between containers Docker Compose: Automatize build &amp; run Finally came the reward (thanks to SFEIR) :\nIf you are interested by the Hands-on Docker, leave me a comment. Maybe I could organize another one soon.\nHappy birthday Docker !\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/dockers-3rd-birthday-celebration\/","summary":"<h2 id=\"the-event\">The event<\/h2>\n<p>This week is the Docker&rsquo;s 3rd birthday.\nAround the world, a lot of meetups were organized with the same program.<\/p>\n<p>For this event the Docker team has created a specific presentation with a fun training on how to build, ship and run a distributed application with ease.<\/p>\n<p>The slides of the presentation :<\/p>\n<!-- raw HTML omitted -->\n<p>The training was in two parts:<\/p>\n<p>First, a self-paced beginners\u2019 tutorial for attendees to learn Docker.<\/p>","title":"Docker's 3rd birthday celebration"},{"content":" Edit: Due to the Docker Meetup in Paris, the Hands-on Docker is rescheduled to the 22nd of March instead of the 24th of March.\nHi!\nFew months ago, I gave a talk about Docker (the article). During this talk I saw that a lot of people are really interested by Docker but did not know where to start.\nSo, I decided to create a Hands-on Docker to help them understand how to use it. As front end developer, the hands-on will be nodeJS\/mongoDB oriented. The same principle could be applied to anything (Java, php, &hellip;).\nPrerequisites Install Docker on your laptop (If your laptop does not allow Docker, you can use a server to run Docker, like compute engine, aws, &hellip;)\nWhen Docker is installed, run these commands to pull images in your Docker:\n$ docker pull busybox $ docker pull alpine:3.3 $ docker pull mongo The program : Introduction to Virtualization and Docker: 15 min\nDifference between VMWare (and other like it) &amp; Docker Copy on Write &hellip; Running your first container:\nRunning a simple &lsquo;hello world&rsquo; command: 5 min Using Bash in interactive mode: 5 min Using the Docker hub:\nRunning an alpine image: 5 min Setting up node &amp; npm: 10 min Committing the updates: 10 min Dockerfile:\nCreation of a Dockerfile: 15 min Building &amp; Running the Dockerfile: 10 min Real case:\nMount a local volume in a container: 10 min Using a Dockerfile on an existing project: 10 min Link:\nLinking of two container: 10 min Linking of a Node server with a mongoDB: 15 min Docker Compose:\nUse Compose to do the same thing: 15 min This event will be hosted at SFEIR.\nWhere: 48 rue Jacques Dulud, 92200, Neuilly-sur-Seine, France When: 22nd of March 2016 (7:30pm to 10:30pm)\nYou can register yourself for the event here. Please be sure to be present or cancel (FAQ) your registration if not) because it will have only 20 seats.\nIf the event works, there will be other ones.\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/hands-on-docker\/","summary":"<blockquote>\n<p><strong>Edit:<\/strong> Due to the Docker Meetup in Paris, the Hands-on Docker is rescheduled to the 22nd of March instead of the 24th of March.<\/p><\/blockquote>\n<p>Hi!<\/p>\n<p>Few months ago, I gave a talk about Docker (<a href=\"http:\/\/blog.sylvaincau.com\/talk-about-docker\">the article<\/a>). During this talk I saw that a lot of people are really interested by Docker but did not know where to start.<\/p>\n<p>So, I decided to create a Hands-on Docker to help them understand how to use it. As front end developer, the hands-on will be nodeJS\/mongoDB oriented. The same principle could be applied to anything (Java, php, &hellip;).<\/p>","title":"Hands-on Docker in Paris the 22nd of March (Docker's 3rd birthday)"},{"content":"During the last past year, I trained a lot of people on AngularJS in my company. Lately, I was thinking that our repository was old and not really good looking.\nThen, I had an idea, what if I wanted to train people outside of my company, like in university for example. So with this idea I decided to create a new set of exercises to learn how to develop a web application using AngularJS. That is exactly what Blogular is.\nThis repository comes with a lot of branches, each exercise has a step-x branch and a step-x-solution branch which is a solution.\nYou can get this training set here : github.com\/AshDevFr\/blogular\nThese are the already created steps:\nStep 1 - Databinding Step 2 - Create a controller Step 3 - Scope inheritance Step 4 - Load data from the controller Step 5 - Form usage Step 6 - Article creation Step 7 - ControllerAs Step 8 - Event Step 9 - $http Step 10 - Router with ngRoute Step 11 - Delete an article Step 12 - Edit an article Step 13 - Form validation Step 14 - Create a service Step 15 - Use $resource instead of $http Step 16 - Filters Step 17 - Search (with filters) Step 18 - Sort Step 19 - Create a filter Step 20 - ngSwitch Step 21 - Create a directive Some steps are in progress and will be released soon :\nStep 22 - Create your own Provider Step 23 - UI-Router as an alternative to ngRoute Step 24 - Optimization (through bindonce, debounce, etc&hellip;) Step 25 - Filters (use them on JS side) Step 26 - Promises ($q) Step 27 - Create a directive with transclude Step 28 - Form element (Create a custom form element) Step 29 - Translation Step 30 - REST (transformRequest\/Response) Step 31 - Interceptors \/ Decorators Step 32 - CSRF (Header manipulation) Step 33 - Unit test: Controller Step 34 - Unit test: Directive Step 35 - Unit test: Filter Step 36 - Unit test: Service Step 37 - E2E test This is how it looks like (step 21) :\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/blogular\/","summary":"<p>During the last past year, I trained a lot of people on AngularJS in my company. Lately, I was thinking that our repository was old and not really good looking.<\/p>\n<p>Then, I had an idea, what if I wanted to train people outside of my company, like in university for example. So with this idea I decided to create a new set of exercises to learn how to develop a web application using AngularJS. That is exactly what Blogular is.<\/p>","title":"Blogular"},{"content":"Last week, I gave a talk about EmberJS.\nAs a long time user of AngularJS 1.x some people were expecting a comparaison between these two frameworks. My point was more about what is Ember, what is the good and the bad with this framework.\nI was hoping to give to people the envy of trying it. And after the talk some of them told me that they will try.\nI am currently working on a simple hands-on training on EmberJS. I will probably provide it in few weeks in Paris. Let me know in the comments if you are interested.\nYou can find the slides here: https:\/\/github.com\/AshDevFr\/talk-ember\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/emberjs\/","summary":"<p>Last week, I gave a talk about EmberJS.<\/p>\n<p>As a long time user of AngularJS 1.x some people were expecting a comparaison between these two frameworks. My point was more about what is Ember, what is the good and the bad with this framework.<\/p>\n<p>I was hoping to give to people the envy of trying it. And after the talk some of them told me that they will try.<\/p>\n<p>I am currently working on a simple hands-on training on EmberJS. I will probably provide it in few weeks in Paris. Let me know in the comments if you are interested.<\/p>","title":"EmberJS"},{"content":"Hi guys, I just released a first version of a new library for AngularJS.\nThe idea is to have a mock in your AngularJS application, but not deployed on the back side. With this kind of mock you are able to deploy an offline sandbox version of your website.\nThe library decorates the $http service and uses the localStorage or sessionStorage to store your data.\nYou will find the library there : github \/ npm\nInstallation Npm $ npm install ngmockstorage Bower $ bower install ngmockstorage Configuration Add to your project (function() { &#39;use strict&#39;; angular.module(&#39;&lt;project name&gt;&#39;, [&#39;ngMockStorage&#39;, ...]); })(); Define the storage (localStorage \/ sessionStorage)\n(function() { &#39;use strict&#39;; angular.module(&#39;&lt;project name&gt;&#39;) .config(configFn); configFn.$inject = [&#39;$mockStorageProvider&#39;]; function configFn($mockStorageProvider) { $mockStorageProvider.setStorageType(&#39;sessionStorage&#39;); } })(); Define the storage key prefix (function() { &#39;use strict&#39;; angular.module(&#39;&lt;project name&gt;&#39;) .config(configFn); configFn.$inject = [&#39;$mockStorageProvider&#39;]; function configFn($mockStorageProvider) { $mockStorageProvider.setKeyPrefix(&#39;ngMockStorage-&#39;); } })(); Define the namespace (function() { &#39;use strict&#39;; angular.module(&#39;&lt;project name&gt;&#39;) .config(configFn); configFn.$inject = [&#39;$mockRouterProvider&#39;]; function configFn($mockRouterProvider) { $mockRouterProvider.setNamespace(&#39;api&#39;); } })(); Add a resource The name format : &lt;parent resource name&gt;.&lt;resource name&gt;\nOptions :\nprimaryKey: (default: &lsquo;id&rsquo;) identifier of the resource key: (default: &lsquo;id&lt;Resource name&gt;&rsquo;) param name in the url \/&lt;resource name&gt;\/:key collection: (default: true) define if the resource is an object or a array (function() { &#39;use strict&#39;; angular.module(&#39;&lt;project name&gt;&#39;) .config(configFn); configFn.$inject = [&#39;$mockRouterProvider&#39;]; function configFn($mockRouterProvider) { $mockRouterProvider.addResource(&#39;todos&#39;); $mockRouterProvider.addResource(&#39;todos.infos&#39;, {collection : false}); } })(); Load datas (function() { &#39;use strict&#39;; angular.module(&#39;&lt;project name&gt;&#39;) .config(configFn); configFn.$inject = [&#39;$mockRouterProvider&#39;]; function configFn($mockRouterProvider) { $mockRouterProvider.addResource(&#39;todos&#39;); $mockRouterProvider.loadDatas(&#39;todos&#39;, [ { id : 1, title : &#39;Todos 1&#39;, isDone : false }, { id : 2, title : &#39;Todos 2&#39;, isDone : false } ]); } })(); Set log level (error \/ warn \/ info \/ debug)\n(function() { &#39;use strict&#39;; angular.module(&#39;&lt;project name&gt;&#39;) .config(configFn); configFn.$inject = [&#39;$mockRouterProvider&#39;]; function configFn($mockRouterProvider) { $mockRouterProvider.setLogLevel(&#39;info&#39;); } })(); ","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/ngmockstorage\/","summary":"<p>Hi guys,\nI just released a first version of a new library for AngularJS.<\/p>\n<p>The idea is to have a mock in your AngularJS application, but not deployed on the back side.\nWith this kind of mock you are able to deploy an offline sandbox version of your website.<\/p>\n<p>The library decorates the $http service and uses the localStorage or sessionStorage to store your data.<\/p>\n<p>You will find the library there : <a href=\"https:\/\/github.com\/AshDevFr\/ngMockStorage\">github<\/a> \/ <a href=\"https:\/\/www.npmjs.com\/package\/ngmockstorage\">npm<\/a><\/p>","title":"ngMockStorage"},{"content":"Few weeks ago, as every month, my company has organised their Tech evening. This time, it was about Docker. As a long time user of virtualization and for the past year of Docker, I offered to talk about how to integrate docker in our everyday work.\nAs a front end developper, I use very often Gulp, Grunt and\/or Node.js in my projects. These tools are pretty awesome but when I deal with external libs I have to be really careful of what I put in my dependencies file.\nThe issue is, if you forget (you shouldn&rsquo;t but sometime&hellip;) to put a dependency in your file before commiting your feature on your Git , your CI tool will crash.\nTwo options:\nDelete node_module &amp; bower_components, then reinstall your dependencies every time Use a simulated CI with docker for exemple Only few people know how to use docker so I made a presentation about Docker and how we can use it in dev.\nYou can find the slides here: https:\/\/github.com\/AshDevFr\/talk-docker\nYou will find plenty of articles about Docker on the internet. That is why I won&rsquo;t explain to you what Docker IS, instead I will explain why you could, and maybe should, use it as a web developer.\nLet say you are working on a MEAN stack. So you have Node, Express, Mongo and Angular in the project. There are a lot of dependencies. Some of these dependencies are in the package.json, and some in the bower.json\nHow to run your MEAN project The normal way\nDownload &amp; install Node.js &amp; npm Download &amp; install MongoDB Install a package manager (Bower) Install a task runner (gulp \/ grunt) Run your app &amp; enjoy It is a lot to do and install, but you only have to do it once. Do you ?\nThe docker &amp; compose&rsquo;s way\nDownload &amp; install Docker Run your app &amp; enjoy It is less than the &rsquo;normal way'\nThe thing is, if you use a CI like system (with Docker &amp; Compose), you will prevent possible human-interaction issues.\nDuring a project development cycle, sometimes, you have to change things in the project&rsquo;s settings (dependencies, task manager, etc&hellip;). If you run your application only on your computer the normal way, you could install dependencies, forget to add them to the package.json, and push your code on the repository. The result will be that on your CI (Jenkins or another), the project build will break.\nThe real interest in using Docker is mainly to prevent these kinds of issues. It will simulate a CI system and will warn you about it.\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/talk-about-docker\/","summary":"<p>Few weeks ago, as every month, my company has organised their Tech evening.\nThis time, it was about Docker. <!-- raw HTML omitted --><!-- raw HTML omitted --><\/p>\n<p>As a long time user of virtualization and for the past year of Docker, I offered to talk about how to integrate docker in our everyday work.<\/p>\n<p>As a front end developper, I use very often Gulp, Grunt and\/or Node.js in my projects. These tools are pretty awesome but when I deal with external libs I have to be really careful of what I put in my dependencies file.<\/p>","title":"Talk about Docker"},{"content":"I have been pondering for a long time on the idea of creating a blog, but I was not quite sure on the subject to write on.\nFor the past 6 months I started to do a lot, from talks about Docker to creating AngularJS training.\nSome of these were for my own purpose and other for my company. But it gave me the idea to share my experience of what I do, what I have done, my issues, etc. Maybe my little contribution will help some of you.\nSo here we are o\/\/\nSince my start in IT (a lot of years ago), I always was interested by development, system admin, devops, and some other stuff so, do not be afraid of finding docker posts next to javascript ones.\n","permalink":"https:\/\/4sh.dev\/posts\/_old-blog\/hi\/","summary":"<p>I have been pondering for a long time on the idea of creating a blog, but I was not quite sure on the subject to write\non.<\/p>\n<p>For the past 6 months I started to do a lot, from talks about Docker to creating AngularJS training.<\/p>\n<p>Some of these were for my own purpose and other for my company. But it gave me the idea to share my experience of what I\ndo, what I have done, my issues, etc. Maybe my little contribution will help some of you.<\/p>","title":"Hi!"},{"content":"","permalink":"https:\/\/4sh.dev\/projects\/","summary":"projects","title":"Projects"}]