<?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: Fernando Pastor</title>
    <description>The latest articles on DEV Community by Fernando Pastor (@fernando_pastor).</description>
    <link>https://dev.to/fernando_pastor</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3911177%2F88f3c312-04a4-47d4-b4b6-d042074f4c70.jpg</url>
      <title>DEV Community: Fernando Pastor</title>
      <link>https://dev.to/fernando_pastor</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fernando_pastor"/>
    <language>en</language>
    <item>
      <title>Agent Workspace as Code: stop copy-pasting your CLAUDE.md across projects</title>
      <dc:creator>Fernando Pastor</dc:creator>
      <pubDate>Mon, 04 May 2026 02:51:03 +0000</pubDate>
      <link>https://dev.to/fernando_pastor/agent-workspace-as-code-stop-copy-pasting-your-claudemd-across-projects-5845</link>
      <guid>https://dev.to/fernando_pastor/agent-workspace-as-code-stop-copy-pasting-your-claudemd-across-projects-5845</guid>
      <description>&lt;h1&gt;
  
  
  The drift problem nobody told you about
&lt;/h1&gt;

&lt;p&gt;If you have used Claude Code, Cursor, Aider, or any other AI coding agent across more than two projects, you have felt this:&lt;/p&gt;

&lt;p&gt;You start project A. You copy the .agents/ folder (or CLAUDE.md, or .cursorrules) from your last project. You tweak two things. Done.&lt;/p&gt;

&lt;p&gt;You start project B six weeks later. You copy from project A. You tweak three things this time. Now A and B are different.&lt;/p&gt;

&lt;p&gt;You start project C. The AWS safety rule looks one way in A, slightly different in B, and you do not remember which one was correct. The deploy skill is in three subtly different versions. The MCP setup is in two of three repos.&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;drift&lt;/strong&gt;. And it is the silent killer of productivity once you start using AI agents seriously across a team.&lt;/p&gt;

&lt;p&gt;The other failure mode is &lt;strong&gt;bloat&lt;/strong&gt;: every .agents/ folder ends up as 200 files no one owns, no one knows what is still relevant, and "let me add one more rule just in case" wins every code review.&lt;/p&gt;

&lt;h2&gt;
  
  
  A pattern from infrastructure
&lt;/h2&gt;

&lt;p&gt;The infrastructure world solved this 10 years ago. Pre-2014 you SSH-ed into a server, installed packages, edited nginx.conf, hoped you would remember to do the same on the next server. Then Terraform happened: declare the desired state in HCL, run terraform apply, and the world matches your file. State drift becomes detectable. Reproducibility becomes free.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agent Workspace as Code (AWaC)&lt;/strong&gt; is the same pattern, applied to the layer above your code: the rules, skills, workflows, and conventions your AI coding agent reads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# workspace.yml&lt;/span&gt;
&lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;workspace/1&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-feature&lt;/span&gt;
&lt;span class="na"&gt;stacks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;core&lt;/span&gt;           &lt;span class="c1"&gt;# universal foundation&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;aws&lt;/span&gt;            &lt;span class="c1"&gt;# AWS safety + terraform parity&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mcp&lt;/span&gt;            &lt;span class="c1"&gt;# MCP server bootstrap&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;my-product/agent-stack&lt;/span&gt;    &lt;span class="c1"&gt;# product-specific stack&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;wsp bootstrap&lt;/code&gt; and the CLI:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Resolves the stack shortcuts via a registry in &lt;code&gt;&amp;lt;your-org&amp;gt;/agent-stack-core/awac.yml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Clones each stack repo at the latest commit on main.&lt;/li&gt;
&lt;li&gt;Composes .agents/{rules,skills,workflows}/ deterministically — last stack wins on collisions.&lt;/li&gt;
&lt;li&gt;Generates CLAUDE.md (canonical context file) and AGENTS.md (mirror for non-Claude agents).&lt;/li&gt;
&lt;li&gt;Emits a workspace.lock.yml recording exact commits.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is the whole loop. Same workspace, every machine. No copy-paste. No drift.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a stack
&lt;/h2&gt;

&lt;p&gt;A stack is a plain GitHub repo with this layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;my-stack/&lt;/span&gt;
  &lt;span class="s"&gt;awac.yml&lt;/span&gt;              &lt;span class="c1"&gt;# metadata: which product, which repos to clone&lt;/span&gt;
  &lt;span class="s"&gt;rules/&lt;/span&gt;                &lt;span class="c1"&gt;# behavioral rules (always_on or trigger-based)&lt;/span&gt;
  &lt;span class="s"&gt;skills/&lt;/span&gt;               &lt;span class="c1"&gt;# named procedures the agent invokes by reference&lt;/span&gt;
  &lt;span class="s"&gt;workflows/&lt;/span&gt;            &lt;span class="c1"&gt;# multi-step processes&lt;/span&gt;
  &lt;span class="s"&gt;templates/&lt;/span&gt;            &lt;span class="c1"&gt;# workspace.yml templates (optional)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reference public stacks (under getGanemo/agent-stack-*) cover universal needs (core), AWS, MCP, Cloudflare, and research/branding/thesis templates. You can publish your own — anything matching the convention is a valid stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why agent-first matters
&lt;/h2&gt;

&lt;p&gt;The CLI was designed from day one to be driven by agents, not humans. Concretely:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every command accepts --json and emits structured output.&lt;/li&gt;
&lt;li&gt;Errors carry four fields: code (stable identifier for retry logic), category (env/config/network/etc.), cause (what went wrong), remediation (what to do).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So when your agent runs &lt;code&gt;wsp doctor&lt;/code&gt; and one of the checks fails, it sees:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"WSP_007"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"environment"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cause"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gh CLI not authenticated"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"remediation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Run: gh auth login"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And it can either fix it (run the remediation) or escalate to the human with full context. No reading paragraphs. No guessing.&lt;/p&gt;

&lt;p&gt;This matters more than it sounds. Anyone who has tried to make a long-running agent loop work in production knows that error-handling is 80% of the difficulty. Stable error codes are the closest thing we have to a contract between CLI and agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I gave up to keep AWaC simple
&lt;/h2&gt;

&lt;p&gt;A few non-features that come up regularly:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No SaaS, no hosted dashboard.&lt;/strong&gt; The CLI is 100% local. Stacks live in your GitHub. No telemetry, no backend. ADR 014 in the docs explains why: it is optimization for adoption + thought leadership, not for revenue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not on PyPI yet.&lt;/strong&gt; Distribution goes through GitHub Releases (gh release download + pipx install). The reason (ADR 012): it works for agent-driven installation paths, does not need PyPI namespace bargaining, and PyPI joins the roadmap once OSS adoption signals demand for it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No interactive prompts in core commands.&lt;/strong&gt; AWaC is agent-first. Anything that needs ack uses an explicit flag (--yes, --update), never a TTY prompt. Wizards are user-friendly; they are agent-hostile.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MIT, not Apache 2.0.&lt;/strong&gt; Simpler. Sufficient. Patent grants matter for big infrastructure projects; for a workspace CLI, MIT is the right minimum.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 14 ADRs
&lt;/h2&gt;

&lt;p&gt;While building AWaC, every contentious choice generated an Architecture Decision Record. They are in the docs repo and worth a skim even if you do not adopt the tool — most of them are tradeoff discussions you will face if you build something similar.&lt;/p&gt;

&lt;p&gt;A sample:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;001&lt;/strong&gt; — The unit of composition is the workspace, not the project, the org, or the user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;004&lt;/strong&gt; — CLAUDE.md is canonical, AGENTS.md is a mirror. Reasoning explained.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;007&lt;/strong&gt; — The CLI is agent-first, not human-first. Implications for command surface, errors, output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;010&lt;/strong&gt; — DevVault is a two-layer model (versioned per-product catalog + non-versioned per-machine vault path).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;012&lt;/strong&gt; — Distribution via GitHub Releases, not PyPI (for now).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;014&lt;/strong&gt; — AWaC stays open-source. No SaaS planned.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can read all of them at github.com/getGanemo/awac-docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install&lt;/span&gt;
&lt;span class="nv"&gt;TAG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;gh release view &lt;span class="nt"&gt;--repo&lt;/span&gt; getGanemo/workspace-cli &lt;span class="nt"&gt;--json&lt;/span&gt; tagName &lt;span class="nt"&gt;-q&lt;/span&gt; .tagName&lt;span class="si"&gt;)&lt;/span&gt;
gh release download &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$TAG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--repo&lt;/span&gt; getGanemo/workspace-cli &lt;span class="nt"&gt;--pattern&lt;/span&gt; &lt;span class="s1"&gt;'*.whl'&lt;/span&gt; &lt;span class="nt"&gt;--dir&lt;/span&gt; /tmp/wsp
pipx &lt;span class="nb"&gt;install&lt;/span&gt; /tmp/wsp/wsp-&lt;span class="k"&gt;*&lt;/span&gt;.whl

&lt;span class="c"&gt;# Compose a workspace&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-feature &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;my-feature
wsp init my-feature &lt;span class="nt"&gt;--template&lt;/span&gt; blank
wsp bootstrap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two minutes from clone to working workspace. Tell me what is wrong with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I am hoping for
&lt;/h2&gt;

&lt;p&gt;The thing I most want from this launch is not stars (though they are nice). It is &lt;strong&gt;honest feedback on the abstraction&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What rule of yours does not fit cleanly into a stack?&lt;/li&gt;
&lt;li&gt;What composition pattern do you have that AWaC cannot express?&lt;/li&gt;
&lt;li&gt;What error message confused you?&lt;/li&gt;
&lt;li&gt;What stack should exist that I have not built?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have 5 minutes after trying it, &lt;a href="https://github.com/getGanemo/workspace-cli/issues" rel="noopener noreferrer"&gt;open an issue&lt;/a&gt; or reply on this post. The roadmap is public (&lt;a href="https://github.com/getGanemo/workspace-cli/issues/2" rel="noopener noreferrer"&gt;Roadmap issue&lt;/a&gt;) and thumbs-up reactions move things up.&lt;/p&gt;

&lt;p&gt;Thanks for reading. Built solo, MIT, no SaaS, fork-friendly. See you in the issues.&lt;/p&gt;

&lt;p&gt;— Fernando&lt;br&gt;
&lt;a href="https://github.com/GanemoCorp" rel="noopener noreferrer"&gt;github.com/GanemoCorp&lt;/a&gt; · &lt;a href="https://www.ganemo.com" rel="noopener noreferrer"&gt;ganemo.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>opensource</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
