<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shane McGuirt</title>
    <description>The latest articles on DEV Community by Shane McGuirt (@halfcosine).</description>
    <link>https://dev.to/halfcosine</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4072273%2F3fbf449f-bb77-4642-aff1-e71ffd1ef639.png</url>
      <title>DEV Community: Shane McGuirt</title>
      <link>https://dev.to/halfcosine</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/halfcosine"/>
    <language>en</language>
    <item>
      <title>I got tired of AI writing sloppy boilerplate, so I built constraint-based prompt packs</title>
      <dc:creator>Shane McGuirt</dc:creator>
      <pubDate>Wed, 12 Aug 2026 13:33:27 +0000</pubDate>
      <link>https://dev.to/halfcosine/i-got-tired-of-ai-writing-sloppy-boilerplate-so-i-built-constraint-based-prompt-packs-3kb9</link>
      <guid>https://dev.to/halfcosine/i-got-tired-of-ai-writing-sloppy-boilerplate-so-i-built-constraint-based-prompt-packs-3kb9</guid>
      <description>&lt;p&gt;We all hit the wall eventually: same model, same question, wildly different output quality.&lt;/p&gt;

&lt;p&gt;One day Claude hands me a Terraform config my code review would actually approve. The next day it's hardcoded secrets and containers running as root. Same model. Same session, even. The only thing I changed was the prompt.&lt;/p&gt;

&lt;p&gt;That was the realization — the model wasn't the variable. The prompt was. And when you treat an LLM as a generalist, you get generalist-quality output. "Revolutionize your workflow" landing pages. Five marketing emails that all say the same thing. A Dockerfile with &lt;code&gt;latest&lt;/code&gt; pinned and a &lt;code&gt;--privileged&lt;/code&gt; flag because it "just worked locally."&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix: negative constraints over positive ones
&lt;/h2&gt;

&lt;p&gt;The standard advice is to add more positive constraints: "be concise," "follow best practices," "be accurate." I tried this. It didn't move the needle consistently.&lt;/p&gt;

&lt;p&gt;What actually worked was the opposite: hard negative constraints that eliminate entire failure modes.&lt;/p&gt;

&lt;p&gt;Here's the real constraint block from the DevOps prompt pack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEVER use floating image versions; pin + reference immutable tags
NEVER hardcode secrets; read from environment only
NO local state; remote state with locking required
Least-privilege IAM only; no wildcard actions or roles
Output plan-first for review; never auto-apply to production
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference is specificity. "Be secure" is vague — the model already "knows" to be secure and interprets it differently every run. "NEVER hardcode secrets" eliminates a concrete failure mode. The output space narrows.&lt;/p&gt;

&lt;p&gt;Running this against Terraform generation tasks, the hardcoded-secrets failure dropped to near-zero. With a positive-only prompt, it appeared roughly 30% of the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I packaged this approach into 9 MIT-licensed tools:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt packs&lt;/strong&gt; (8 specialist system prompts each, plain Markdown):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/devops-prompt-pack" rel="noopener noreferrer"&gt;DevOps Prompt Pack&lt;/a&gt; ($29) — Terraform, K8s, CI/CD, cloud ops&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/marketing-prompt-pack" rel="noopener noreferrer"&gt;Marketing Prompt Pack&lt;/a&gt; ($29) — SEO, email, ads, landing pages&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/pm-prompt-pack" rel="noopener noreferrer"&gt;Product Mgmt AI Prompt Pack&lt;/a&gt; ($49) — PRDs, user stories, sprint planning&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/prompt-library" rel="noopener noreferrer"&gt;Prompt Template Library&lt;/a&gt; (free core / $35 full) — 32 fill-in-the-blank prompts + Node.js fill library&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code boilerplates&lt;/strong&gt; (MIT, Docker, tests included):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/mcp-starter" rel="noopener noreferrer"&gt;MCP Server Starter Kit&lt;/a&gt; (free core / $49 full) — TypeScript MCP server with rate limiting + Zod validation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/claude-agent" rel="noopener noreferrer"&gt;Claude Agent Boilerplate&lt;/a&gt; ($29) — tool-use loop with parallel calls, conversation memory, token tracking&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/multi-agent-kit" rel="noopener noreferrer"&gt;Multi-Agent Orchestration Kit&lt;/a&gt; ($79) — pipeline, fan-out, supervisor patterns&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/mcp-vertical-bundle" rel="noopener noreferrer"&gt;MCP Vertical Server Bundle&lt;/a&gt; ($99) — GitHub, Slack, Notion MCP servers with Docker Compose&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://srmcguirt.gumroad.com/l/fastmcp-python" rel="noopener noreferrer"&gt;FastMCP Python Boilerplate&lt;/a&gt; ($35) — Pydantic v2, token-bucket rate limiter, structlog to stderr&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The MCP gotcha I keep seeing
&lt;/h2&gt;

&lt;p&gt;If you're building MCP servers and hitting silent failures or parse errors, check your logging first.&lt;/p&gt;

&lt;p&gt;MCP uses stdout for JSON-RPC frames. Any &lt;code&gt;print()&lt;/code&gt; or &lt;code&gt;console.log()&lt;/code&gt; that lands on stdout becomes part of the protocol framing — the client sees malformed JSON and either drops the message or errors out. All logging goes to stderr:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;structlog&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="n"&gt;structlog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logger_factory&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;structlog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PrintLoggerFactory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The FastMCP boilerplate has this wired by default. I've seen developers spend hours on this.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's free
&lt;/h2&gt;

&lt;p&gt;The free cores are genuinely free — not a page-trap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/srmcguirt/mcp-server-starter-kit" rel="noopener noreferrer"&gt;MCP Server Starter Kit&lt;/a&gt; (TypeScript + rate limiting + Docker)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/srmcguirt/prompt-template-library" rel="noopener noreferrer"&gt;Prompt Template Library&lt;/a&gt; (32 prompts + Node.js library)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/srmcguirt/claude-agent-boilerplate" rel="noopener noreferrer"&gt;Claude Agent Boilerplate&lt;/a&gt; (tool-use loop core)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/srmcguirt/multi-agent-orchestration-kit" rel="noopener noreferrer"&gt;Multi-Agent Orchestration Kit&lt;/a&gt; (pipeline + fan-out patterns)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Clone them, use them in production, keep them if you never buy anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;p&gt;These aren't magic. They're constraint-based prompts tested across Claude 3.5/4 and GPT-4o, mostly on codegen and infra tasks. The patterns may not transfer equally to every domain. The approach reduces variance — it doesn't eliminate it.&lt;/p&gt;

&lt;p&gt;If you find a constraint that belongs in a pack, I want to know. The whole point is that these improve with real production feedback.&lt;/p&gt;




&lt;p&gt;Full lineup with links: &lt;a href="https://srmcguirt.dev" rel="noopener noreferrer"&gt;srmcguirt.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>mcp</category>
      <category>claude</category>
    </item>
  </channel>
</rss>
