{"slug": "stop-using-skills-for-brainstorming-build-a-hook-instead", "title": "Stop Using 'Skills' for Brainstorming. Build a Hook Instead. 🛠️", "summary": "A developer built Brainstorm-Mode, a plugin architecture that blocks AI coding agents from executing code before ideation is complete. The system uses hooks to inject \"Do Not Edit\" constraints and deterministically denies any tool calls that attempt to write files while in brainstorming mode. Brainstorm-Mode also tracks every blocked execution attempt in a drift log, allowing developers to measure how often their agents resist constraints.", "body_md": "You know that look? The one where you ask an AI coding agent to \"just brainstorm a caching strategy\" and suddenly—*poof*—it's implemented a Redis key-value store in Python anyway.\n\nIt's not because you didn't explain it well enough. It's because modern instruction-tuned models are **prioritized to act, not think**. They are over-trained on coding tasks and suffer from what we call \"execution drift.\"\n\nI spent the last few months trying to stop my AI agents from building UIs before they were even ready. I tried \"prompting.\" I tried \"skills\" (Markdown files that act as system prompts).\n\n**They all fail.**\n\nAs soon as the context gets too large (context compaction), the instruction gets wiped. Even if it doesn't, the model can just be talked out of it by a persuasive prompt. A skill is just *advice*.\n\nIf you can't rely on the model to follow instructions, you have to **bypass the model entirely** and enforce the constraints at the hook layer.\n\nI built **Brainstorm-Mode**, a lightweight, agent-agnostic plugin architecture that blocks the actual execution of coding tools (`Edit`\n\n, `MultiEdit`\n\n, `NotebookEdit`\n\n) *before* they ever touch your files.\n\nBrainstorm-Mode operates on two enforcement layers:\n\nUsing a `UserPromptSubmit`\n\nhook, the plugin injects a \"Do Not Edit\" constraint into every single user turn. It’s a constant reminder to the model that it's in ideation mode, re-injected every time to survive context compaction.\n\nThis is where it gets good. Instead of hoping the model obeys, Brainstorm-Mode uses a `PreToolUse`\n\nhook to intercept tool calls. If the brainstorm lock is active, **any call to a coding tool is deterministically denied.**\n\nThe model doesn't get to \"break character\" by accident. It doesn't matter how persuasive the model gets—the tool simply will not run.\n\nThe core logic is written in Python (stdlib only, zero dependencies) and is entirely agent-agnostic. The `core/`\n\nfolder contains all the state management, meaning you can drop this into:\n\nIt also tracks every \"drift\" attempt (attempts by the model to execute a blocked tool) in a `drift-log.jsonl`\n\nfile, allowing you to actually *measure* how much the model fights back against your constraints.\n\nIf you are building agents, you know that \"prompting\" is just the beginning. True reliability comes from **enforcement**.\n\nBrainstorm-Mode isn't just a brainstorming tool; it's a case study in control planes. It proves that you don't need to build a whole new AI model to solve alignment issues—you just need to enforce the rules at the infrastructure layer.\n\nIf you are tired of your AI agents coding before they are ready, check out Brainstorm-Mode.\n\nOne of the coolest side-effects of the `drift-log.jsonl`\n\nis that you can actually see *when* your agent lies to you. If the log fills up with denied `Edit`\n\nattempts right before context compaction, you know exactly where your control flow is breaking.\n\nStop asking your agents nicely to brainstorm. Force them to listen.", "url": "https://wpnews.pro/news/stop-using-skills-for-brainstorming-build-a-hook-instead", "canonical_source": "https://dev.to/mehmetcanfarsak/stop-using-skills-for-brainstorming-build-a-hook-instead-3c5n", "published_at": "2026-06-11 20:20:00+00:00", "updated_at": "2026-06-11 20:41:49.305030+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "ai-tools", "ai-products", "artificial-intelligence"], "entities": ["Brainstorm-Mode", "Redis", "Python"], "alternates": {"html": "https://wpnews.pro/news/stop-using-skills-for-brainstorming-build-a-hook-instead", "markdown": "https://wpnews.pro/news/stop-using-skills-for-brainstorming-build-a-hook-instead.md", "text": "https://wpnews.pro/news/stop-using-skills-for-brainstorming-build-a-hook-instead.txt", "jsonld": "https://wpnews.pro/news/stop-using-skills-for-brainstorming-build-a-hook-instead.jsonld"}}