<?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>Forem: Juha Kangas</title>
    <description>The latest articles on Forem by Juha Kangas (@valuecodes).</description>
    <link>https://forem.com/valuecodes</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%2F818046%2F2d93d8ea-7545-4465-9430-b0fe2edb5c99.jpeg</url>
      <title>Forem: Juha Kangas</title>
      <link>https://forem.com/valuecodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/valuecodes"/>
    <language>en</language>
    <item>
      <title>Back to basics: a solid foundation for using AI coding agents in a monorepo</title>
      <dc:creator>Juha Kangas</dc:creator>
      <pubDate>Sun, 11 Jan 2026 14:14:58 +0000</pubDate>
      <link>https://forem.com/valuecodes/back-to-basics-a-solid-foundation-for-using-ai-coding-agents-in-a-monorepo-3c26</link>
      <guid>https://forem.com/valuecodes/back-to-basics-a-solid-foundation-for-using-ai-coding-agents-in-a-monorepo-3c26</guid>
      <description>&lt;p&gt;AI agents ship code fast — and they also ship entropy: inconsistent patterns, noisy diffs, and PRs that look done until CI disagrees. The fix isn’t "let the agent rewrite everything." It’s making correctness and consistency non-negotiable, so the agent can’t drift even when it improvises. You get there by building a boring, solid baseline the agent can reliably work within.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tooling
&lt;/h2&gt;

&lt;p&gt;If you only enforce three things, enforce these:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typecheck (correctness)&lt;/strong&gt;&lt;br&gt;
Agents generate plausible code. TypeScript tells you if it typechecks — which eliminates a huge class of "looks right" mistakes. Make &lt;code&gt;pnpm typecheck&lt;/code&gt; a hard gate locally and in CI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lint (consistency)&lt;/strong&gt;&lt;br&gt;
AI mixes styles and patterns. ESLint reduces drift by enforcing consistent patterns and catching common footguns. Gate on &lt;code&gt;pnpm lint&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Format (reviewability)&lt;/strong&gt;&lt;br&gt;
AI often leaves unformatted code. Prettier keeps diffs readable. Gate on &lt;code&gt;pnpm format:check&lt;/code&gt; in CI. Claude Code can auto-format via a PostToolUse hook but regardless of editor/agent, CI still enforces format:check.&lt;/p&gt;

&lt;h2&gt;
  
  
  AGENTS.md docs
&lt;/h2&gt;

&lt;p&gt;Tooling enforces code; &lt;code&gt;AGENTS.md&lt;/code&gt; sets expectations and boundaries for agent behavior.&lt;/p&gt;

&lt;p&gt;A monorepo should have a root &lt;code&gt;AGENTS.md&lt;/code&gt; that defines:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the repo structure&lt;/li&gt;
&lt;li&gt;the standard commands&lt;/li&gt;
&lt;li&gt;shared rules and boundaries&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each app/package should have its own &lt;code&gt;AGENTS.md&lt;/code&gt; tailored to local context:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;what it is and what it owns&lt;/li&gt;
&lt;li&gt;dependencies on other packages&lt;/li&gt;
&lt;li&gt;footguns / gotchas&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Docs should stay in sync via a docs sync workflow (e.g. updating docs when adding a new command like &lt;code&gt;pnpm clean&lt;/code&gt;). In my experience, Codex is great at mechanical doc updates, while Claude tends to shine on bigger changes — and this repo makes it easy to compare what each agent is best at.&lt;/p&gt;

&lt;p&gt;Repo/template: &lt;a href="https://github.com/valuecodes/agentic-monorepo-starter" rel="noopener noreferrer"&gt;https://github.com/valuecodes/agentic-monorepo-starter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Disclosure: This article was created with the help of AI.&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>monorepo</category>
      <category>ai</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
