Sign in

Piekwerk

@piekwerk.bsky.social
18 followers 98 following 143 posts

Version-pinned AI coding agent config kits for 12 stacks. One baseline rendered into AGENTS.md, CLAUDE.md, Cursor rules and Copilot instructions. Validator-tested: 12/12 green or it does not ship. Free Next.js sample on the pinned post.

PostsRepliesMedia
Piekwerk @piekwerk.bsky.social · 12h
One thing that helped us: the MCP server owns the JSON and is the only writer. Cowork appends, Claude Code never edits the raw file. Two agents on one JSON file clobber each other eventually. Append-only suits a git tree too: one commit per source, corrections land as new events, not rewrites.
130
Piekwerk @piekwerk.bsky.social · 15h
Write rules the agent can follow without judgment: literal, scoped, testable. A fuzzy ban buys you a paragraph of argument at runtime.
000
Piekwerk @piekwerk.bsky.social · 18h
肯定形、同じ結論です。禁止形は避ける範囲が広がり続けて、結局何もしないagentになる。 ただ硬い境界、たとえばsecretsを絶対commitしない、は明示的な禁止とcheckを付けないと守られませんでした。肯定形だけだとedge caseが抜けます。 常駐するCLAUDE.mdでは禁止の副作用が積み重なる。skillはdescriptionがmatchした時だけloadされる。だから肯定形を常駐側に、scopedな禁止はskill側に置く分担にしてます。
120
Piekwerk @piekwerk.bsky.social · 19h
Transparent is the section doing the real work. Tests pass only if you ran them is checkable in review. The style lines are taste, but taste that helps. The one I watch is when to deviate. Matching repo conventions imports a chatty comment style into every file, and the global file never reasserts.
000
Piekwerk @piekwerk.bsky.social · 19h
Your do-not-reverse-on-pushback line is the load bearing one. Without it mine caved on first pushback, and the check becomes a rubber stamp. Also: praise relocates. Ban agreement and the agent starts applauding your objections. My no-praise rule had to cover its reaction to my ideas too.
010
Piekwerk @piekwerk.bsky.social · 20h
Tried a flat ban. The agent obeys, then hides its reasoning in identifier names and commit subjects, worse than the docstring it skipped. What stuck: scope by audience. Docstrings and README rationale I write myself, the agent restates only checkable facts. Your manual step is the real lever.
000
Piekwerk @piekwerk.bsky.social · 10/10/2026
Same here. A hand rolled parser feels justified while you write it, that's the trap. A prefer libraries line in my CLAUDE.md changed nothing. What stuck: the rule demands evidence, name the module you pass on before writing new code. Duplication dropped because a missing search shows in review.
100
Piekwerk @piekwerk.bsky.social · 10/10/2026
Lived this one. Narration has a second cause: the tool exists but permission denies it, so the agent describes what it would do instead of doing it. Looks identical to a missing tool. One run with approvals on tells them apart. The todo tool is underrated, without it the plan only lives in prose.
000
Piekwerk @piekwerk.bsky.social · 10/10/2026
What is the one rule in your agent config you would never delete? Mine is the read-only-until-trusted one.
000
Piekwerk @piekwerk.bsky.social · 10/10/2026
Seen this up close. An agent denied a tool doesn't stop, it improvises, and that's where damage lands. What held here: shrink the tool surface, no repo creation, no public push, and never assign a task with no legal path. A cornered agent routes around you. Permissions do the work, prompts don't.
110
Piekwerk @piekwerk.bsky.social · 10/10/2026
Good test. One gotcha: I pin Claude Code, and below 2.1.271 the omitClaudeMd line is just unknown frontmatter. No error, the worker reads everything anyway. I check the version at setup now. Also the saving shrinks with a normal-sized CLAUDE.md, so I only flag workers that fan out.
010
Piekwerk @piekwerk.bsky.social · 10/10/2026
I run this exact split. The complexity clause is what drifts. The cheap model ends up with work it shouldn't. I route by task type only, testing and research always go down, design stays up. Subagents don't inherit the conversation either. Put decisions in the brief or they get re-litigated.
000
Piekwerk @piekwerk.bsky.social · 10/10/2026
Run the no-refresh case, it's cheap. From stale rules files I've kept: a path that still resolves gets followed silently, no error. A 404 forces a grep and the session mostly recovers. Stale-but-valid is what bites. Source only takes precedence if the map is a hint, a loaded map reads as authority.
110
Piekwerk @piekwerk.bsky.social · 10/10/2026
Same layout here. Two gotchas: Windows without core.symlinks=true gives you a copy, not a link, so a teammate drifts. Keep targets relative, absolute paths break when the repo moves. Check where edits land too: some tools follow the realpath into .agents/, some write next to the link.
110
Piekwerk @piekwerk.bsky.social · 09/10/2026
12% of public MCP config files have a hardcoded secret, and half of those are invisible to gitleaks. New post on the scanner I built for the config directory. dev.to/piekwerk/your-ai-agents-conf…
210
Piekwerk @piekwerk.bsky.social · 09/10/2026
Tried this on my own scripts. It breaks on flag interactions: one line per option hides that a flag needs --json, or that two clash, so agents combine what can't combine. The one-liners stay hand written and rot like the AGENTS.md section did. Descriptions are the fragile 20%.
120
Piekwerk @piekwerk.bsky.social · 09/10/2026
The 15 known gaps kept as tests is the part I'd steal. My yes-gate broke on alert fatigue: enough approval stops and you say yes without reading. Two fixes. Batch low risk actions into one digest, and let every false positive rewrite the rule that fired. That's what kept mine honest.
220
Piekwerk @piekwerk.bsky.social · 09/10/2026
Same here, mine were mostly rules for bugs I'd already fixed. The unexpected win: blame on the rules file. The commit that added a rule says which change needed it, so deleting stale ones stops being a guess. And the rules diff now gets read in review like any code.
020
Piekwerk @piekwerk.bsky.social · 08/10/2026
Never let an agent edit its own rules mid-task. It tunes the rule to fit the mistake it just made, then quotes the edit back at you.
010
Piekwerk @piekwerk.bsky.social · 08/10/2026
Not under a rock, just early. Half the new tooling I try ships agent docs first, README later or never. I read SKILL.md files on purpose now: the frontmatter description must say when a skill applies, often the plainest account of what a tool does. The manpage moved into the agent's manual.
000
Piekwerk @piekwerk.bsky.social · 08/10/2026
Tried this. A whole class of quiet self edits gone on my box. One catch: repo level files must stay writable or the agent cannot work, so AGENTS.md at the repo root stayed open, and that is where the real instructions live. I lint that file in CI now. A failing check does not care who rewrote it.
110
Piekwerk @piekwerk.bsky.social · 08/10/2026
Not insane. The container root is overlayfs, drop the upper layer and it is gone. The loss sits in the bind mounts. Keep a bare repo outside, clone in and push out: a deleted .git costs a reclone, not the history. Read-only config is the cheap win, it stops edits but not rules the model skips.
000
Piekwerk @piekwerk.bsky.social · 08/10/2026
Fair. Same split here: prose for judgment, a hook for the never-slips. One catch from breaking mine: path scoping has a timing hole too. Folder rules loaded after the file existed, so creation-time rules missed new files. Naming moved to the root file. The hook took the rest.
110
Piekwerk @piekwerk.bsky.social · 08/10/2026
Same wall, but we kept the numbers. Hard constraints keep IDs: API limits, pinned versions. Anything still open moved to a prose section headed "working assumptions, challenge these", and the pushback came back. The ID was never the problem. Mixing settled rules and open questions in one list was.
220
Piekwerk @piekwerk.bsky.social · 07/10/2026
That bit me too. git worktree add never fetches, it checks out your local refs. If the merge landed remotely, PR or another machine, local main is stale until you fetch. My fix: a SessionStart hook runs git fetch --prune first. One second, and every worktree starts from reality.
000
Piekwerk @piekwerk.bsky.social · 07/10/2026
0/69 vs 69/69 on identical text. My guess: a skill fires when the task matches its description, right when needed. A CLAUDE.md pointer drowns in session-start text. Same wall here: on-demand rules get followed, go-read-X gets skipped. Flip side: a description that never matches loads nothing.
000
Piekwerk @piekwerk.bsky.social · 07/10/2026
Diff your rules file after every tool upgrade. Changelogs name the new features, they never name the paragraph that broke. Ten seconds with git diff catches more silent breakage than any checklist.
010
Piekwerk @piekwerk.bsky.social · 07/10/2026
When my AGENTS.md conflicts with the repo, nine times out of ten the rule is stale. The repo wins the PR, the rule fix rides the same diff, one commit closes the argument. Most of my config edits started as collisions like that. You still get your trail: both changes land in the diff.
000
Piekwerk @piekwerk.bsky.social · 07/10/2026
The update banner is my most ignored message. The marker file is the right trick. Exit codes can't carry a session id. One gap: the fallback copies via pbcopy, macOS only. My Claude Code sits on a Linux box over SSH, so it would print instead. An OSC 52 escape covers the clipboard over SSH.
010
Piekwerk @piekwerk.bsky.social · 07/10/2026
What makes this file work: the rules ship with gates. No-unwrap is a clippy deny, layering runs cargo xtask layers, bad input gets the panic_hunt fuzz test. I've watched prose-only versions of those get ignored within a week. The devlog handoff for dead sessions is the piece I'd steal.
000
Piekwerk @piekwerk.bsky.social · 07/10/2026
New post: a 22-rule scanner for the files nobody audits. Agent configs, MCP servers, hooks. 12% of public MCP configs have a hardcoded secret. Launch week: code LAUNCH for 10 off. dev.to/piekwerk/your-ai-agents-conf…
010
Piekwerk @piekwerk.bsky.social · 07/10/2026
Mine slid into writing "none identified" every time, which reads the same as a clean pass. What caught it: diff the section against the changes. An untested path in the diff with nothing listed means a lazy scan, not a clean PR. Entries that survive review become tests.
000
Piekwerk @piekwerk.bsky.social · 07/10/2026
The catalog is the cheap part, skills load on demand. The tax is the always-on layer: session hooks, MCP descriptions, rules that never unload. ECC ships a SessionStart cap for a reason. I check /context after adding anything. Trade a few thousand tokens, not tens of thousands.
000
Piekwerk @piekwerk.bsky.social · 06/10/2026
Confirmed, and nothing errors, that's the trap. Both files sit in your home dir, so one repo can load different instructions per machine. I ask the agent which instruction files it actually loaded after any config change. A stray CLAUDE.md shadowed another tool of mine until that check caught it.
000
Piekwerk @piekwerk.bsky.social · 06/10/2026
Same shift here. Through the API your procedures sit in the system prompt, and the model weighs them like tool contracts. In Claude Code they are session context among the rest, and recency beats them. An output style brought the binding feel back for me, those inject into the system prompt.
000
Piekwerk @piekwerk.bsky.social · 06/10/2026
The session that builds defends its own output. Judge the work in a fresh session against a checklist kept next to the rules. Same model, no stake in what it finds.
000
Piekwerk @piekwerk.bsky.social · 06/10/2026
Right, this generalizes: if the tool has a setting, stop prompting the model for it. Instructions fight for attention all session, settings just run. One addition: the user-level file fixes your machine only. Put the same block in the repo's .claude/settings.json and it travels with every clone.
010
Piekwerk @piekwerk.bsky.social · 06/10/2026
The test is right, but shell access widens it. My agent could not touch the limit file, yet a runaway loop ran until the provider 429 killed it. Nothing local fired first. So the cap lives with the key: provider quota or a broker the agent cannot write to. Still coarse, daily not per task.
000
Piekwerk @piekwerk.bsky.social · 06/10/2026
Hit this on the last model bump. Rules I added to patch weaknesses started overcorrecting. Tag workarounds with the model version that needed them. After a bump, rerun a small task suite and drop what stopped earning its keep. Preferences stay, workarounds go. Half my file was workarounds.
000
Piekwerk @piekwerk.bsky.social · 06/10/2026
Same here. Even after the fix, folder CLAUDE.md arrives after the file exists, so creation-time rules still miss new files. I moved naming and header rules to the root file, which loads up front. Rules that must never slip go in a PreToolUse hook on Write. Folder files keep context notes.
100
Piekwerk @piekwerk.bsky.social · 05/10/2026
Good rule, agent scratch stays out of the real docs. One edge: not-read-by-humans breaks the day a run dies midway and you reconstruct state from raw notes. I stamp each entry with a timestamp and a done marker, clear finished ones. A stale note once had the next agent rebuild a merged branch.
000
Piekwerk @piekwerk.bsky.social · 05/10/2026
I stopped trusting the session banner to prove what loaded. What worked here: a version line on top of each instructions file, then ask the agent which files and versions it sees. A ghost rule surfaces in the first reply. That check caught a stray CLAUDE.md shadowing AGENTS.md in one repo.
010
Piekwerk @piekwerk.bsky.social · 05/10/2026
Every tool now wants its own instructions file. Before adding a fourth, check what actually differs. In our repo the real delta was 20 lines. The other 300 were copies drifting apart.
000
Piekwerk @piekwerk.bsky.social · 05/10/2026
I gave up keeping two. AGENTS.md is the source, a script generates CLAUDE.md from it, CI reruns the generator and fails the build on a diff. The second file is a build artifact. A symlink works too, until Claude Code appends its memories to CLAUDE.md and they leak into the shared rules.
110
Piekwerk @piekwerk.bsky.social · 04/10/2026
Read your agent config out loud before shipping it. Rules that sound fine on the page turn ambiguous when spoken: which file does "the test suite" mean? Ambiguity you can hear is ambiguity the model will guess through.
000
Piekwerk @piekwerk.bsky.social · 04/10/2026
The config file is the better onboarding doc anyway. It gets exercised every session and corrected when the agent stumbles. The Slack thread rots because nothing checks it. Point new people at the file. What it lacks is the why, so I add one line of reason per rule. Agents skip it. People read it.
100
Piekwerk @piekwerk.bsky.social · 04/10/2026
The cheapest context you will ever buy: a file listing what the agent got wrong last month and what you did about it. Memory that never records failures will happily repeat them.
000
Piekwerk @piekwerk.bsky.social · 04/10/2026
Same inventory here. My cut: a memory naming a path or repo stays project-bound, the scoping is right. What promotes is behavior, how the model should act. Every session, the file. One task type, a skill that loads when it appears. Daily rules stopped sharing space with rare ones.
000
Piekwerk @piekwerk.bsky.social · 04/10/2026
The mods item is the real news. A prompt rewrite sits between your config and the model, so a tuned rule can be reworded before the model ever reads it. One mod softened mine and I only caught it in review. Now I dump the rewritten prompt and diff it against the file.
110
Piekwerk @piekwerk.bsky.social · 04/10/2026
A fuzzy ban buys you the essay. My agent argues less when the rule is literal. I banned the long dash and sentences over 30 words. The check fails or passes, nothing to argue. 'No galaxy brain stuff' invites a defense, like 'keep it simple' did. Hard to write an essay around a failing check.
000