[{"data":1,"prerenderedAt":921,"buildId":922},["ShallowReactive",2],{"article-agent-guardrails-environment-state":3,"articles-10":734,"articles-100":820,"topic-of-article-agent-guardrails-environment-state":904},{"id":4,"title":5,"alt":6,"body":7,"description":717,"extension":718,"image":719,"meta":720,"navigation":300,"path":721,"postDate":722,"published":723,"seo":724,"stem":726,"tags":727,"topic":731,"updated":732,"url":732,"__hash__":733},"blog\u002Fblog\u002Fagent-guardrails-environment-state.md","Agent guardrails for rules that depend on environment state","Illustration of a robot about to write in a notebook while a guard in a booth, watching an open notes app through a periscope, stops it and points to a slot on the app for its note card",{"type":8,"value":9,"toc":701},"minimark",[10,14,22,27,49,52,56,141,144,147,152,178,181,185,188,192,195,207,222,226,229,245,260,449,458,462,465,504,510,514,548,581,589,597,603,607,610,613,620,624,646,650,671,687,691,697],[11,12,13],"p",{},"I'd dictated a few minutes of my own thoughts, asked my AI agent to write them into my personal notes, and it told me it had. Later the notes weren't on the page. The agent had written straight to the Markdown file while my notes app was open, and the app had saved its own copy over the top. I'd already told it not to do that, in the instructions it reads every session.",[11,15,16,17,21],{},"The usual fix is to move the rule into a hook. Most hook examples block a pattern, like a force push, which is dangerous at any hour. Others track state inside the agent's session, such as the current branch. ",[18,19,20],"strong",{},"My rule depended on whether a different program on my machine was running at that moment",", and nothing in the model's context could tell it that.",[23,24,26],"h2",{"id":25},"my-setup-a-personal-second-brain-fed-by-dictation","My setup: a personal second brain fed by dictation",[11,28,29,30,37,38,42,43,48],{},"My second brain is a folder of Markdown files I edit in ",[31,32,36],"a",{"href":33,"rel":34},"https:\u002F\u002Fgithub.com\u002Flogseq\u002Fog",[35],"nofollow","Logseq"," (the original version, which stores pages as plain files). It holds my own ideas and anything I want to find again, and no work notes go through it. I talk an idea through into ",[31,39,41],{"href":40},"\u002Fblog\u002Fhandy-speech-to-text-nixos-cosmic-egpu\u002F","Handy",", a local speech-to-text app, and ask the ",[31,44,47],{"href":45,"rel":46},"https:\u002F\u002Fpi.dev\u002F",[35],"pi"," coding agent, an open-source agent that runs in the terminal, to file it on the right pages. Filing a dictated idea doesn't need a frontier model, so my default is the cheap DeepSeek V4.1 Flash.",[11,50,51],{},"I'd hit the gap between rules an agent reads and rules that hold before, in a pipeline at work that turns Jira tickets into pull requests. My notes are the small version, where a failure was cheap enough to study closely.",[23,53,55],{"id":54},"judgment-pattern-and-state-rules-for-ai-agents","Judgment, pattern and state rules for AI agents",[57,58,59,78],"table",{},[60,61,62],"thead",{},[63,64,65,69,72,75],"tr",{},[66,67,68],"th",{},"Kind of rule",[66,70,71],{},"Example",[66,73,74],{},"Can a script decide it at the tool call?",[66,76,77],{},"Where it goes",[79,80,81,105,127],"tbody",{},[63,82,83,87,90,93],{},[84,85,86],"td",{},"Judgment",[84,88,89],{},"\"Turn a dictated ramble into organized notes on the right pages\"",[84,91,92],{},"No",[84,94,95,96,100,101,104],{},"The prompt (",[97,98,99],"code",{},"AGENTS.md",", ",[97,102,103],{},"CLAUDE.md",")",[63,106,107,110,121,124],{},[84,108,109],{},"Pattern",[84,111,112,113,116,117,120],{},"\"No ",[97,114,115],{},"rm -rf"," and no writes to ",[97,118,119],{},".env","\"",[84,122,123],{},"Yes, from the call's arguments",[84,125,126],{},"A hook that matches the call",[63,128,129,132,135,138],{},[84,130,131],{},"State",[84,133,134],{},"\"Don't write to a note while Logseq is open\"",[84,136,137],{},"Yes, but only by looking outside the call",[84,139,140],{},"A hook that checks environment state when the call happens",[11,142,143],{},"State rules are the ones that cost me. The answer changes during a session (I open and close Logseq all day, and a session runs for hours), and the model can't see it. They also look like preferences, so they end up in the prompt.",[11,145,146],{},"My test now: if a script can check the rule at the moment of the tool call, and a miss costs more than a retry, it goes in code.",[148,149,151],"h3",{"id":150},"prompt-rules-fail-even-while-the-model-can-see-them","Prompt rules fail even while the model can see them",[11,153,154,155,157,158,161,162,167,168,173,174,177],{},"My first fix was a line in ",[97,156,99],{},". The agent followed it early in a session and went back to ",[97,159,160],{},"edit"," a long way in. I blamed compaction, where the harness summarizes a long history. 2026 research agrees long sessions lose rules, but not on why. ",[31,163,166],{"href":164,"rel":165},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2606.22528",[35],"Governance Decay"," found compaction raised violations from 0% to 30% across seven models, hitting soft, organization-specific policies 8.3 times as hard as safety norms. ",[31,169,172],{"href":170,"rel":171},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.03223",[35],"ARCBench",", built on pi itself, found most violations happen while the rule is ",[18,175,176],{},"still in the summary",", with the agent treating a later request as permission.",[11,179,180],{},"For my decision, the disagreement doesn't matter. Either way, a rule the model can read is a rule it usually follows, and a local, soft rule about how to work is the first one a long session loses.",[148,182,184],{"id":183},"why-pinning-the-rule-wouldnt-have-saved-the-note","Why pinning the rule wouldn't have saved the note",[11,186,187],{},"Governance Decay also tested pinning the rule so the summary can't drop it, and about 47 pinned tokens brought violations back to 0%. That fixes a pattern rule. A pinned \"don't write while Logseq is open\" still leaves the model to guess whether Logseq is open. It could check with a shell command, but \"remember to check before every write\" is just another prompt rule. Only a check that runs at the moment of the write knows the answer.",[148,189,191],{"id":190},"reliability-in-the-harness-makes-the-model-a-cost-decision","Reliability in the harness makes the model a cost decision",[11,193,194],{},"Once the harness enforces the rules, picking a model is a cost decision instead of a safety decision.",[11,196,197,198,203,204,206],{},"Cheap models do break rules more. In the Governance Decay runs, DeepSeek V4 Flash, the version before my default, broke a rule after compaction 59% of the time, worse than the 37% it scored with no rule at all. Claude Sonnet 4.6 broke it 19% of the time. Frontier models break rules less often, not never, and Anthropic's own ",[31,199,202],{"href":200,"rel":201},"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmemory",[35],"Claude Code docs"," say ",[97,205,103],{}," files \"aren't enforced configuration.\"",[11,208,209,210,215,216,221],{},"A guard in code runs the same way whichever model asked. When ",[31,211,214],{"href":212,"rel":213},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.10884",[35],"Li and colleagues"," enforced a procedure with a state machine at every tool call, Claude Haiku 4.5 went from 48 of 200 accounts handled correctly and by the procedure to 139, and Sonnet 4.6 stopped drifting. I'd rather enforce the rule in code than pay ",[31,217,220],{"href":218,"rel":219},"https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fabout-claude\u002Fpricing",[35],"Opus"," 35 times more per output token for a model that breaks it less often.",[23,223,225],{"id":224},"the-guard-a-pi-extension-that-checks-logseq-before-every-write","The guard: a pi extension that checks Logseq before every write",[11,227,228],{},"While Logseq runs, it keeps pages in memory and writes a page back to disk once editing has been idle for a few seconds. If the agent writes the file and Logseq saves the same page before noticing, the agent's edit disappears without an error. With the app open, the safe path is an MCP server that adds blocks through Logseq's local API. With the app closed, nothing serves that API, and editing files directly is fine and much faster for bulk edits.",[11,230,231,232,240,241,244],{},"pi extensions subscribe to events in the agent loop. The ",[31,233,236,239],{"href":234,"rel":235},"https:\u002F\u002Fdocs.pi.dev\u002Flatest\u002Fextensions",[35],[97,237,238],{},"tool_call"," event"," fires before a tool runs, and returning ",[97,242,243],{},"{ block: true, reason }"," stops it. The reason goes back to the model as the tool's error.",[246,247,250,251,250,256],"figure",{"className":248},[249],"image","\n  ",[252,253],"img",{"src":254,"alt":255},"\u002Fimages\u002Fagent-guardrails-in-code\u002Fguard-sequence.svg","Sequence diagram with four participants: the model, the guard, the Logseq app and the note files. The model asks to edit a journal file, the guard probes Logseq's local API, Logseq answers, and the guard blocks the edit with a message to use the Logseq MCP tools. The model then appends the block through Logseq MCP, Logseq saves the file itself and confirms where the block went.",[257,258,259],"figcaption",{},"The model never writes the file while Logseq is open. The app does.",[261,262,267],"pre",{"className":263,"code":264,"language":265,"meta":266,"style":266},"language-typescript shiki shiki-themes github-light github-dark","import type { ExtensionAPI } from \"@earendil-works\u002Fpi-coding-agent\";\n\nexport default function (pi: ExtensionAPI) {\n  pi.on(\"tool_call\", async (event) => {\n    \u002F\u002F A path check for write and edit, a regular expression for bash\n    if (!writesToNotes(event) || !(await logseqIsRunning())) return;\n\n    return { block: true, reason: blockMessage(event) };\n  });\n}\n","typescript","",[97,268,269,295,302,330,364,371,410,415,437,443],{"__ignoreMap":266},[270,271,274,278,281,285,288,292],"span",{"class":272,"line":273},"line",1,[270,275,277],{"class":276},"szBVR","import",[270,279,280],{"class":276}," type",[270,282,284],{"class":283},"sVt8B"," { ExtensionAPI } ",[270,286,287],{"class":276},"from",[270,289,291],{"class":290},"sZZnC"," \"@earendil-works\u002Fpi-coding-agent\"",[270,293,294],{"class":283},";\n",[270,296,298],{"class":272,"line":297},2,[270,299,301],{"emptyLinePlaceholder":300},true,"\n",[270,303,305,308,311,314,317,320,323,327],{"class":272,"line":304},3,[270,306,307],{"class":276},"export",[270,309,310],{"class":276}," default",[270,312,313],{"class":276}," function",[270,315,316],{"class":283}," (",[270,318,47],{"class":319},"s4XuR",[270,321,322],{"class":276},":",[270,324,326],{"class":325},"sScJk"," ExtensionAPI",[270,328,329],{"class":283},") {\n",[270,331,333,336,339,342,345,347,350,352,355,358,361],{"class":272,"line":332},4,[270,334,335],{"class":283},"  pi.",[270,337,338],{"class":325},"on",[270,340,341],{"class":283},"(",[270,343,344],{"class":290},"\"tool_call\"",[270,346,100],{"class":283},[270,348,349],{"class":276},"async",[270,351,316],{"class":283},[270,353,354],{"class":319},"event",[270,356,357],{"class":283},") ",[270,359,360],{"class":276},"=>",[270,362,363],{"class":283}," {\n",[270,365,367],{"class":272,"line":366},5,[270,368,370],{"class":369},"sJ8bj","    \u002F\u002F A path check for write and edit, a regular expression for bash\n",[270,372,374,377,379,382,385,388,391,394,396,399,402,405,408],{"class":272,"line":373},6,[270,375,376],{"class":276},"    if",[270,378,316],{"class":283},[270,380,381],{"class":276},"!",[270,383,384],{"class":325},"writesToNotes",[270,386,387],{"class":283},"(event) ",[270,389,390],{"class":276},"||",[270,392,393],{"class":276}," !",[270,395,341],{"class":283},[270,397,398],{"class":276},"await",[270,400,401],{"class":325}," logseqIsRunning",[270,403,404],{"class":283},"())) ",[270,406,407],{"class":276},"return",[270,409,294],{"class":283},[270,411,413],{"class":272,"line":412},7,[270,414,301],{"emptyLinePlaceholder":300},[270,416,418,421,424,428,431,434],{"class":272,"line":417},8,[270,419,420],{"class":276},"    return",[270,422,423],{"class":283}," { block: ",[270,425,427],{"class":426},"sj4cs","true",[270,429,430],{"class":283},", reason: ",[270,432,433],{"class":325},"blockMessage",[270,435,436],{"class":283},"(event) };\n",[270,438,440],{"class":272,"line":439},9,[270,441,442],{"class":283},"  });\n",[270,444,446],{"class":272,"line":445},10,[270,447,448],{"class":283},"}\n",[11,450,451,452,457],{},"The check runs at the moment of the write because any earlier check leaves a gap. ",[31,453,456],{"href":454,"rel":455},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2607.10487",[35],"One study"," found agents reached the end of the task in 262 of 270 runs, but only 55 still had valid authorization when they committed the change. That's my lost note: from where the agent sat, it had finished the task.",[148,459,461],{"id":460},"failing-open-against-pis-advice","Failing open, against pi's advice",[11,463,464],{},"pi's docs say a gate should fail closed. I catch the probe's error, so if Logseq doesn't answer, the write goes through. I decided by what each wrong answer costs:",[57,466,467,480],{},[60,468,469],{},[63,470,471,474,477],{},[66,472,473],{},"The guard is wrong when",[66,475,476],{},"What it costs",[66,478,479],{},"How often",[79,481,482,493],{},[63,483,484,487,490],{},[84,485,486],{},"Failing closed: it blocks because Logseq didn't answer, but Logseq isn't running",[84,488,489],{},"The agent can't save anything, since the MCP path is down too",[84,491,492],{},"Every time I quit Logseq",[63,494,495,498,501],{},[84,496,497],{},"Failing open: it allows because Logseq didn't answer, but Logseq is running with its API off",[84,499,500],{},"I can lose a note, as before the guard",[84,502,503],{},"Only if I turn the API off, which I haven't",[11,505,506,507,509],{},"To the probe, a closed app looks like one that didn't answer. I'd switch to failing closed if the guard could tell them apart, for example by checking the process list first. For ",[97,508,115],{}," I'd fail closed without drawing a table.",[23,511,513],{"id":512},"tell-the-agent-the-safe-path-when-you-block-it","Tell the agent the safe path when you block it",[11,515,516,517,522,523,528,529,532,533,536,537,540,541,544,545,547],{},"An agent blocked without an alternative often finds its own way around, usually through the shell. In ",[31,518,521],{"href":519,"rel":520},"https:\u002F\u002Fprakratt.github.io\u002FCircumEval\u002F",[35],"CircumEval",", Claude Opus 4.6 got past a read-only lock in every run, and telling it not to edit didn't help. In ",[31,524,527],{"href":525,"rel":526},"https:\u002F\u002Fvictorvelazquez.dev\u002Fblog\u002Fagents-route-around-your-hooks\u002F",[35],"Victor Velazquez's runs",", a hook on ",[97,530,531],{},"Edit|Write"," never fired, because the agents did their writing through ",[97,534,535],{},"Bash",". My own sessions look the same: the agent runs far more shell commands than edits, and ",[97,538,539],{},"sed"," or ",[97,542,543],{},"python3"," can rewrite a note as easily as ",[97,546,160],{}," can.",[11,549,550,551,100,554,556,557,560,561,100,564,100,567,540,570,573,574,556,577,580],{},"So my guard matches the effect, not the tool: ",[97,552,553],{},"write",[97,555,160],{}," and ",[97,558,559],{},"bash"," commands that redirect, ",[97,562,563],{},"tee",[97,565,566],{},"sed -i",[97,568,569],{},"mv",[97,571,572],{},"cp"," into ",[97,575,576],{},"pages\u002F",[97,578,579],{},"journals\u002F"," all hit the same check. And the block message tells the agent what to do instead:",[261,582,587],{"className":583,"code":585,"language":586,"meta":266},[584],"language-text","Before: Blocked: Logseq is running.\n\nAfter:  Logseq is running, so writing journals\u002F2026_12_01.md directly can be\n        overwritten when the app saves the page. Append the block through the\n        Logseq MCP server instead, with the page name and the block text.\n        Set LOGSEQ_MCP_GUARD=off only if the user asks.\n","text",[97,588,585],{"__ignoreMap":266},[11,590,591,596],{},[31,592,595],{"href":593,"rel":594},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2609.35381",[35],"Xu and Wu"," measured the difference with MCP errors: telling agents to run a terminal command recovered 45% of tasks, and naming the server's own tool recovered 84%. A good block costs one tool call, not the task.",[11,598,599,600,602],{},"To check it works, I count what the agent does right after each block. The MCP call means it's working, a ",[97,601,559],{}," call means it's looking for another door, and a question to me means the message is too thin.",[23,604,606],{"id":605},"what-carries-over-to-a-team","What carries over to a team",[11,608,609],{},"My guard catches a helpful agent's habits. It wouldn't stop one trying to get past it, since the regex misses a Python one-liner or a path built from a variable. At work, the guarantee is at the merge, outside the agent's session.",[11,611,612],{},"The pipeline I built at work turns a Jira label into a pull request written by Claude. The prompt tells that agent how we work. Code enforces what can't have exceptions: every CI check runs, and a separate workflow decides from a PR's blast radius whether a product owner can merge it or an engineer has to review it. That merge gate is a state check one level up: whether a change is safe to merge depends on what it touches, and nothing inside the agent's session shows that.",[11,614,615,616,619],{},"Review agent config like policy too, including who can switch a guard off. My ",[97,617,618],{},"LOGSEQ_MCP_GUARD=off"," is fine for one person and not for a team.",[23,621,623],{"id":622},"trade-offs","Trade-offs",[625,626,627,634,637],"ul",{},[628,629,630,631,633],"li",{},"The ",[97,632,559],{}," check is a regular expression. It's easy to get past and blocks some harmless commands, like copying a note out of the folder.",[628,635,636],{},"There are still milliseconds between the probe and the write. Closing that would need a lock Logseq doesn't offer.",[628,638,639,640,645],{},"Every write to the notes costs one call to Logseq's local API. ",[31,641,644],{"href":642,"rel":643},"https:\u002F\u002Fwww.alyria.ai\u002Fblog\u002Fgates-for-coding-agents",[35],"Alyria argues"," hook checks shouldn't touch the network at all. Mine runs only on note writes and only calls localhost, so I think the trade holds. A remote call on every tool call would be a different decision.",[23,647,649],{"id":648},"build-your-own","Build your own",[651,652,653,656,659,662,665,668],"ol",{},[628,654,655],{},"Write down the rule and the environment state that decides it.",[628,657,658],{},"Probe that state inside the hook, at the moment of the call.",[628,660,661],{},"Match on the effect across every tool that can cause it, including the shell.",[628,663,664],{},"Decide what happens when the probe can't answer, and write the gap down.",[628,666,667],{},"Make the block message name the safe call.",[628,669,670],{},"Count what the agent does after each block.",[11,672,673,674,682,683,686],{},"In Claude Code this is a ",[31,675,678,681],{"href":676,"rel":677},"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks",[35],[97,679,680],{},"PreToolUse"," hook"," that returns ",[97,684,685],{},"deny"," with a reason.",[23,688,690],{"id":689},"conclusion","Conclusion",[11,692,693,694,696],{},"The agent still tries ",[97,695,160],{}," now and then. Now that costs one blocked call instead of a missing page. If I were moving a team's rules out of the prompt, I'd start with the ones that depend on something the model can't see. Nobody upstream will write those guards for you, and no amount of reminding fixes them.",[698,699,700],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":266,"searchDepth":297,"depth":297,"links":702},[703,704,709,712,713,714,715,716],{"id":25,"depth":297,"text":26},{"id":54,"depth":297,"text":55,"children":705},[706,707,708],{"id":150,"depth":304,"text":151},{"id":183,"depth":304,"text":184},{"id":190,"depth":304,"text":191},{"id":224,"depth":297,"text":225,"children":710},[711],{"id":460,"depth":304,"text":461},{"id":512,"depth":297,"text":513},{"id":605,"depth":297,"text":606},{"id":622,"depth":297,"text":623},{"id":648,"depth":297,"text":649},{"id":689,"depth":297,"text":690},"Most AI agent guardrails block a pattern, like a force push. The rule that cost me depended on whether another app was running. How I enforce it in a pi extension, why it fails open, and why every block needs to name the safe alternative.","md","\u002Fimages\u002Fagent-guardrails-in-code\u002Fcover.webp",{},"\u002Fblog\u002Fagent-guardrails-environment-state","2026-12-01",false,{"title":725,"description":717},"AI agent guardrails in code: state-dependent rules, fail-open checks and block messages","blog\u002Fagent-guardrails-environment-state",[728,729,730],"applied ai","developer productivity","automation","applied-ai",null,"218IFeArCj9kAx1E917OTO3vjB-FrUmFpP-VTzuQtrw",[735,737,747,757,769,778,790,799,805,812],{"title":5,"description":717,"tags":736,"postDate":722,"path":721,"url":732,"topic":731},[728,729,730],{"title":738,"description":739,"tags":740,"postDate":745,"path":746,"url":732,"topic":731},"Why I let AI agents change my OS only through Nix","AI agents make it trivial to change your operating system and hard to remember what they changed. Here's why I manage NixOS and macOS from one Nix config in Git.",[741,742,743,744,729],"nixos","nix","nix-darwin","ai","2026-11-26","\u002Fblog\u002Fconfiguring-my-os-with-nix-in-the-age-of-ai",{"title":748,"description":749,"tags":750,"postDate":754,"path":755,"url":732,"topic":756},"A browser tool that puts every carousel photo on the same white mat, like a gallery print","Instagram can keep each photo's original aspect ratio in a carousel, but I prefer a white canvas with even borders. I built a page that pads every image onto one shared canvas, entirely in the browser.",[751,752,753],"tools","instagram","photography","2026-11-25","\u002Fblog\u002Finstagram-carousel-padding-tool","hiking-photography",{"title":758,"description":759,"tags":760,"postDate":766,"path":767,"url":732,"topic":768},"Getting Handy speech-to-text to type on NixOS and COSMIC, and to use my eGPU","Handy's shortcut did nothing, and after I fixed that, nothing got typed. A Wayland shortcut, a microphone, the paste method and an autostart file caused it, and the GPU did not.",[761,741,762,763,764,765],"troubleshooting","cosmic","wayland","speech-to-text","egpu","2026-11-19","\u002Fblog\u002Fhandy-speech-to-text-nixos-cosmic-egpu","declarative-infrastructure",{"title":770,"description":771,"tags":772,"postDate":776,"path":777,"url":732,"topic":768},"Getting a Razer Core X eGPU to work after login on NixOS, without timing the boot","My Razer Core X eGPU only worked if I timed it against boot. On NixOS the NVIDIA driver rejected the hotplugged card; PCI kernel parameters and a device node fixed it.",[761,741,765,773,774,775],"thunderbolt","nvidia","linux","2026-11-18","\u002Fblog\u002Frazer-core-x-egpu-hotplug-nixos",{"title":779,"description":780,"tags":781,"postDate":787,"path":788,"url":732,"topic":789},"Stop stashing half-finished work: use Git worktrees and Worktrunk","Git worktrees keep separate branches checked out at once. Worktrunk automates per-worktree setup. The same isolation also works for parallel AI agents.",[782,783,784,729,785,786],"git","worktrees","worktrunk","command line","workflow","2026-08-16","\u002Fblog\u002Fworktrees-with-worktrunk","command-line",{"title":791,"description":792,"tags":793,"postDate":797,"path":798,"url":732,"topic":796},"Self-Hosting my Git forge with Forgejo","Why I moved away from GitHub and chose a lightweight, community-driven alternative",[794,795,796,786],"homelab","open source","self-hosting","2026-04-29","\u002Fblog\u002Fself-hosting-my-git-forge",{"title":800,"description":801,"tags":802,"postDate":803,"path":804,"url":732,"topic":796},"Curating my own reading and discovery feed with RSS","Taking concrete steps away from algorithms using FreshRSS, self-hosted tools, and a pipeline built for me.",[794,795,796,786],"2026-02-08","\u002Fblog\u002Freading-and-discovery-feed-curation",{"title":806,"description":807,"tags":808,"postDate":810,"path":811,"url":732,"topic":796},"Fixing my broken Docker Immich+Traefik setup","Photo indexing failed in my Immich+Traefik setup. I'd misconfigured my Docker networking. Here's how I figured it out and what I changed.",[794,809],"networking","2025-10-31","\u002Fblog\u002Ffixing-docker-immich-traefik-setup",{"title":813,"description":814,"tags":815,"postDate":818,"path":819,"url":732,"topic":789},"Quickly outline large JSON responses with a custom jq function","Use jq to automatically map and visualize the structure of large JSON responses, perfect for exploring undocumented endpoints.",[816,817,785,730,729],"jq","json","2025-10-19","\u002Fblog\u002Fjq-json-outline",[821,823,825,827,829,831,833,835,837,839,841,850,858,864,870,878,885,891,898],{"title":5,"description":717,"tags":822,"postDate":722,"path":721,"url":732,"topic":731},[728,729,730],{"title":738,"description":739,"tags":824,"postDate":745,"path":746,"url":732,"topic":731},[741,742,743,744,729],{"title":748,"description":749,"tags":826,"postDate":754,"path":755,"url":732,"topic":756},[751,752,753],{"title":758,"description":759,"tags":828,"postDate":766,"path":767,"url":732,"topic":768},[761,741,762,763,764,765],{"title":770,"description":771,"tags":830,"postDate":776,"path":777,"url":732,"topic":768},[761,741,765,773,774,775],{"title":779,"description":780,"tags":832,"postDate":787,"path":788,"url":732,"topic":789},[782,783,784,729,785,786],{"title":791,"description":792,"tags":834,"postDate":797,"path":798,"url":732,"topic":796},[794,795,796,786],{"title":800,"description":801,"tags":836,"postDate":803,"path":804,"url":732,"topic":796},[794,795,796,786],{"title":806,"description":807,"tags":838,"postDate":810,"path":811,"url":732,"topic":796},[794,809],{"title":813,"description":814,"tags":840,"postDate":818,"path":819,"url":732,"topic":789},[816,817,785,730,729],{"title":842,"description":843,"tags":844,"postDate":848,"path":849,"url":732,"topic":796},"Why I added RSS feeds to my blog (and how I did it in Nuxt 3)","How I built RSS and Atom feed support for my Nuxt 3 website to let readers follow my content without social media algorithms.",[845,846,847],"nuxt","web development","tutorial","2025-08-31","\u002Fblog\u002Fsetting-up-rss-atom-feeds-nuxt3",{"title":851,"description":852,"tags":853,"postDate":856,"path":857,"url":732,"topic":789},"Revisiting my Stream Deck for music control","How I turned my neglected Stream Deck into a useful tool for controlling YouTube Music without breaking my workflow.",[854,729,730,855],"productivity","home-office","2025-06-07","\u002Fblog\u002Fstream-deck-youtube-music",{"title":859,"description":860,"tags":861,"postDate":862,"path":863,"url":732,"topic":731},"fzf + fabric: Smart selection for LLM patterns and models","Enhance your experience with fabric, the AI prompt tool, by using interactive selection for patterns and models.",[729],"2025-05-24","\u002Fblog\u002Fai-pattern-selection-in-fabric",{"title":865,"description":866,"tags":867,"postDate":868,"path":869,"url":732,"topic":768},"Effortless configuration syncing with GNU Stow and Git: a software engineer's workflow","Use GNU Stow and Git to keep config files in sync across Linux and macOS. Keep them in one repo with full history, and set up new machines in minutes.",[729],"2025-01-12","\u002Fblog\u002Feffortless-configuration-syncing-with-gnu-stow",{"title":871,"description":872,"tags":873,"postDate":876,"path":877,"url":732,"topic":756},"My 2023 travels: A visual journey","Looking back at the best pictures from my travel adventures in 2023",[874,875,753],"personal","travel","2024-01-01","\u002Fblog\u002F2023-travels-visual-journey",{"title":879,"description":880,"tags":881,"postDate":883,"path":884,"url":732,"topic":796},"Re-living memories through proper media organization","Organizing media such as photos and videos can bring back cherished memories and help relive them. Here's my approach to organizing my digital media collection.",[874,882],"technology","2023-02-06","\u002Fblog\u002Freliving-memories-through-proper-media-organization",{"title":886,"description":887,"tags":888,"postDate":889,"path":890,"url":732,"topic":756},"Looking back: My 2022 in review","From new adventures and memories to lessons learned and personal growth, this year has been a year of discovery. Here's my 2022 in review.",[874,875],"2022-12-31","\u002Fblog\u002F2022-in-review",{"title":892,"description":893,"tags":894,"postDate":896,"path":897,"url":732,"topic":789},"Git and the command-line: Take your workflow to the next level","Some tips on how to improve your Git productivity using the command-line",[895,729],"programming","2022-12-18","\u002Fblog\u002Fgit-and-command-line-next-level-workflow",{"title":899,"description":900,"tags":901,"postDate":902,"path":903,"url":732,"topic":756},"Hiking Tsho-Rolpa lake trail in Nepal","Details of my hiking journey to the Tsho-Rolpa glacial lake in Nepal 🇳🇵, situated at 4,580m from sea level",[875],"2022-01-22","\u002Fblog\u002Fhiking-tsho-rolpa-lake-trail-in-nepal",{"id":905,"title":906,"body":907,"description":914,"extension":718,"meta":915,"navigation":300,"order":916,"path":917,"seo":918,"stem":919,"__hash__":920},"topics\u002Ftopics\u002Fapplied-ai.md","Applied AI and LLMs",{"type":8,"value":908,"toc":912},[909],[11,910,911],{},"I use AI agents and LLMs every day, and I care less about what they can do in a demo than about what holds up after weeks of use. These posts are about that second part: where I let an agent make changes, how I keep track of what it changed, and the guardrails I enforce in code when written instructions aren't enough.",{"title":266,"searchDepth":297,"depth":297,"links":913},[],"How I put AI agents and LLMs to work on real systems: guardrails enforced in code, agents that change my OS only through Nix, and LLM prompt tooling on the command line.",{},"1","\u002Ftopics\u002Fapplied-ai",{"title":906,"description":914},"topics\u002Fapplied-ai","68slBARBuVg62-4vDNEbftSsLldR3AWUaqw873-AyDA",1796138750857,"ee16022c-1978-45dd-a0fb-9116b058c386"]