<?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: Abhishek Pandit</title>
    <description>The latest articles on DEV Community by Abhishek Pandit (@panditabhis).</description>
    <link>https://dev.to/panditabhis</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%2F3977867%2F1daa5bf3-0eb3-4693-b8cc-a54c8f313250.png</url>
      <title>DEV Community: Abhishek Pandit</title>
      <link>https://dev.to/panditabhis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/panditabhis"/>
    <language>en</language>
    <item>
      <title>A Day in the Life: Complete Claude Code Session Walkthrough</title>
      <dc:creator>Abhishek Pandit</dc:creator>
      <pubDate>Wed, 10 Jun 2026 15:15:04 +0000</pubDate>
      <link>https://dev.to/panditabhis/a-day-in-the-life-complete-claude-code-session-walkthrough-7o9</link>
      <guid>https://dev.to/panditabhis/a-day-in-the-life-complete-claude-code-session-walkthrough-7o9</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 7 of 7 · Series: &lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Building Your AI Developer Handbook&lt;/a&gt; · &lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Scenario
&lt;/h2&gt;

&lt;p&gt;You're building a password reset feature. User enters email → gets a reset link → clicks link → enters new password. Standard flow. Medium complexity.&lt;/p&gt;

&lt;p&gt;Let's walk through every step using the full workflow — as if you're looking over the shoulder of someone who built this system.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Show me your workflow and I'll show you your output quality."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Before You Even Type
&lt;/h2&gt;

&lt;p&gt;Claude loads automatically in the background:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✓ ~/.claude/CLAUDE.md loaded           ← the global handbook
✓ .claude/CLAUDE.md loaded             ← project rules (TypeScript, pnpm)
✓ memory/MEMORY.md scanned             ← all lessons and preferences
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You haven't typed anything yet. Claude already knows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feature-based folder structure&lt;/li&gt;
&lt;li&gt;State management ladder&lt;/li&gt;
&lt;li&gt;No mocking the database&lt;/li&gt;
&lt;li&gt;No AI attribution in commits&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;useCallback&lt;/code&gt; without profiler evidence&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;"A doctor who reviews your file before you enter the room is more useful than one who asks 'so, remind me who you are?'"&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 1: /status — Confirm the Setup
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;/status
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Model:   claude-sonnet-4-6
Effort:  normal
Plugins: security-guidance ✓
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thirty seconds. Sometimes the wrong model loads due to overload fallback. Sometimes a plugin fails silently. This check costs 30 seconds and prevents a surprise 30 minutes later.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A pilot's first action after sitting in the cockpit isn't to take off. It's to check all instruments are reading correctly."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 2: /cost — Baseline
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;/cost
&lt;/span&gt;&lt;span class="gp"&gt;→ Tokens used: 2,847 | Estimated cost: $&lt;/span&gt;0.004
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note this number. You'll compare it later before the expensive code review step. A surprise spike means something went wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: /plan — Design Before Coding
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/plan

Build a password reset feature:
- User enters email on /forgot-password
- System sends a reset link (token, expires in 1 hour)
- User clicks link → /reset-password?token=xxx
- User enters new password
- Token validated, password updated, token invalidated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude responds with a plan — &lt;strong&gt;no code yet&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Proposed approach:

1. DB: Add password_reset_tokens table
   - id, user_id, token (hashed), expires_at, used_at

2. API:
   - POST /api/auth/forgot-password — generate token, send email
   - POST /api/auth/reset-password  — validate token, update password

3. UI:
   - /features/auth/ForgotPasswordForm.tsx
   - /features/auth/ResetPasswordForm.tsx
   - usePasswordReset.ts hook

4. Tests:
   - Unit: token generation/validation logic
   - Integration: full flow with real test DB
   - No E2E (not a critical path)

Questions before I start:
- Email provider?
- Token length and hashing algorithm preference?
- Should used tokens be deleted or marked used?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"A plan that asks questions is more valuable than a plan that assumes answers."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You answer the questions. You approve the plan. &lt;strong&gt;Only now does coding start.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Code — Supervised Implementation
&lt;/h2&gt;

&lt;p&gt;Claude implements. Because the preferences are loaded, it automatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates &lt;code&gt;/features/auth/ForgotPasswordForm.tsx&lt;/code&gt; — not &lt;code&gt;/components/ForgotPassword.tsx&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Uses &lt;code&gt;useState&lt;/code&gt; for form fields, TanStack Query for the API calls&lt;/li&gt;
&lt;li&gt;Writes catch blocks that &lt;code&gt;console.error&lt;/code&gt; and surface toasts&lt;/li&gt;
&lt;li&gt;Does NOT add &lt;code&gt;useCallback&lt;/code&gt; to handlers without profiler evidence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You watch. You redirect if something drifts.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Supervision isn't distrust — it's how you catch small course corrections before they become major detours."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 5: pnpm test — The Blocking Gate
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Must exit 0. Not "mostly passing." Not "the one failing test is unrelated." &lt;strong&gt;All tests pass.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If they fail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;FAIL features/auth/usePasswordReset.test.ts
  ✗ handles expired token correctly
    Expected: { error: 'Token expired' }
    Received: { error: undefined }
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You stop. You fix it. You run tests again. Only when green do you proceed.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"You wouldn't send a letter before proofreading it. You wouldn't ship code before testing it. The test gate is the proofread."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 6: /cost — Delta Check
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;/cost
&lt;/span&gt;&lt;span class="gp"&gt;→ Tokens used: 18,492 | Delta: +15,645 | Cost: $&lt;/span&gt;0.026
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;~15k tokens for a medium feature is normal. If you saw +80k tokens, that's a red flag — Claude may have scanned the whole codebase or looped a tool call. Investigate before spending on the code review.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 7: /code-review — Bug and Design Audit
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/code-review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude reviews the diff — not the whole codebase, just what changed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⚠ HIGH  usePasswordReset.ts:47
  Token comparison uses === (timing attack surface).
  Fix: use crypto.timingSafeEqual() instead.

ℹ LOW   ResetPasswordForm.tsx:23
  Loading state not shown during submission.
  Fix: disable submit button while isPending is true.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"A second pair of eyes catches what the first pair stopped seeing. Even if both pairs belong to the same AI."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Fix the HIGH immediately. Decide on the LOW.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 8: /simplify — Readability Cleanup
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/simplify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Code review found bugs. Simplify finds clutter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;usePasswordReset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;resetForm&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="nx"&gt;called&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="nx"&gt;places&lt;/span&gt; &lt;span class="err"&gt;—&lt;/span&gt; &lt;span class="nx"&gt;extract&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;reset&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt;
&lt;span class="nx"&gt;ForgotPasswordForm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tsx&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;inline&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="nx"&gt;elements&lt;/span&gt; &lt;span class="err"&gt;—&lt;/span&gt; &lt;span class="nx"&gt;move&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pass doesn't hunt for bugs. It hunts for code that works but could be cleaner.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A code review checks if the bridge is safe. Simplify checks if the bridge is elegant. Both matter."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 9: /code-review --comment — Post to PR
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/code-review --comment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Posts findings as inline comments directly on the GitHub PR. Reviewers see the notes in context — right on the lines that matter.&lt;/p&gt;

&lt;p&gt;PR is ready for human review.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Full Session, Compressed
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/status&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;30 sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/cost&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;5 sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/plan&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;10–20 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Code&lt;/td&gt;
&lt;td&gt;varies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm test&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2–5 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/cost&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;5 sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/code-review&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;5–10 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/simplify&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;5–10 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/code-review --comment&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Total gate overhead: ~30–40 minutes. Defects reaching production: dramatically fewer.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The gates don't slow you down. They stop you from having to go back."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What This Looks Like Without the Workflow
&lt;/h2&gt;

&lt;p&gt;Without the gates, the same feature might take 45 minutes to implement. But:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The token comparison vulnerability reaches production ← timing attack&lt;/li&gt;
&lt;li&gt;A test failure was "unrelated" and got ignored ← it wasn't&lt;/li&gt;
&lt;li&gt;Folder structure drifted from feature-based ← scattered files&lt;/li&gt;
&lt;li&gt;PR has no inline notes ← reviewer has no context&lt;/li&gt;
&lt;li&gt;Session cost 3x more ← nobody checked the delta&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;"Fast and wrong is slower than right the first time."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Your Turn — Start With Three Things
&lt;/h2&gt;

&lt;p&gt;You don't need to implement this entire workflow today. Start here:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create &lt;code&gt;~/.claude/CLAUDE.md&lt;/code&gt;&lt;/strong&gt; with four rules: think first, simplicity, surgical changes, goal-driven&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create one memory file&lt;/strong&gt; — next time Claude does something you didn't want, write it down&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the test gate&lt;/strong&gt; — never proceed past failing tests&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The rest follows naturally.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Full Series
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Topic&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Part 1&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Overview — the full system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/your-ais-employee-handbook-a-deep-dive-into-claudemd-3obc"&gt;Part 2&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The Handbook (CLAUDE.md)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/teaching-an-ai-to-never-forget-how-the-memory-system-works-40o3"&gt;Part 3&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The Memory System&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/battle-scars-as-rules-inside-the-feedback-files-5ejj"&gt;Part 4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Battle Scars as Rules (Feedback Files)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/your-coding-dna-the-three-files-that-shape-every-line-claude-writes-378g"&gt;Part 5&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Your Coding DNA (User Preferences)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/context-is-king-how-project-files-and-templates-keep-claude-on-track-433l"&gt;Part 6&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Context is King (Project + Reference Files)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/a-day-in-the-life-complete-claude-code-session-walkthrough-7o9"&gt;Part 7&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;A Day in the Life (Complete Walkthrough)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;"Discipline is not the enemy of creativity. It's the foundation that lets creativity build something that lasts."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;Thanks for following the series. If you build your own version of this workflow, share it — I'd love to see how others adapt these ideas.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Context is King: How Project Files and Templates Keep Claude on Track</title>
      <dc:creator>Abhishek Pandit</dc:creator>
      <pubDate>Wed, 10 Jun 2026 15:09:19 +0000</pubDate>
      <link>https://dev.to/panditabhis/context-is-king-how-project-files-and-templates-keep-claude-on-track-433l</link>
      <guid>https://dev.to/panditabhis/context-is-king-how-project-files-and-templates-keep-claude-on-track-433l</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 6 of 7 · Series: &lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Building Your AI Developer Handbook&lt;/a&gt; · &lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Context Problem
&lt;/h2&gt;

&lt;p&gt;Every developer switches between projects. Each project has its own setup, ongoing decisions, deadlines, and "why did we do it this way" history.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Imagine a consultant who works with five different clients. Every Monday they need a full briefing — 'who are you, what are we building, why did you make that decision last week?' — before they can do anything useful. Now imagine if that briefing happened every single day."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's Claude without project context files.&lt;/p&gt;

&lt;p&gt;Project files and reference files give Claude the backstory before it starts. Not the code — Claude can read the code. The &lt;em&gt;context behind&lt;/em&gt; the code.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Project Context File
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&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;project_auth_rewrite&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;project&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Auth system rewrite in progress. Deadline: 2026-06-20.

&lt;span class="gs"&gt;**Why:**&lt;/span&gt; Legal flagged session token storage as non-compliant
with new data regulations.

&lt;span class="gs"&gt;**How to apply:**&lt;/span&gt; Scope decisions favor compliance over
ergonomics until the audit is complete.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every project file has three parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The fact&lt;/strong&gt; — what happened or what was decided&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The why&lt;/strong&gt; — motivation (deadline, constraint, stakeholder, incident)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How to apply&lt;/strong&gt; — what should change about Claude's behavior&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;"A sign that says 'do not open this door' is easy to ignore. A sign that says 'do not open this door — last person who did triggered the fire suppression system' is not."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;code&gt;Why&lt;/code&gt; is what lets Claude judge edge cases. Without it, rules are followed blindly. With it, Claude can ask: "does this new situation actually trigger the same concern?"&lt;/p&gt;




&lt;h2&gt;
  
  
  What Goes in a Project File
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Good content:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architectural decisions and the trade-offs that led to them&lt;/li&gt;
&lt;li&gt;Ongoing work — who is doing what, by when (use absolute dates, not "next Thursday")&lt;/li&gt;
&lt;li&gt;Why a particular library was chosen over alternatives&lt;/li&gt;
&lt;li&gt;A constraint not obvious from the code (legal, performance, security)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bad content — don't memorize these:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Already exists&lt;/th&gt;
&lt;th&gt;Don't put in project file&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Code patterns&lt;/td&gt;
&lt;td&gt;Read the code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File structure&lt;/td&gt;
&lt;td&gt;Read the filesystem&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git history&lt;/td&gt;
&lt;td&gt;Run &lt;code&gt;git log&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Things that change daily&lt;/td&gt;
&lt;td&gt;Too stale too fast&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;"A map is useful. A map from three years ago of a city that's been rebuilt is worse than no map — it gives you false confidence."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Project files decay. The &lt;code&gt;Why&lt;/code&gt; field tells you whether a memory is still load-bearing or just historical noise.&lt;/p&gt;




&lt;h2&gt;
  
  
  When Project Files Shine
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Without a project file:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Session start:
"So just to re-explain the context — we're mid-sprint on auth,
there's a compliance deadline, the approach was chosen because..."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;With a project file:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Claude reads: auth rewrite, deadline 2026-06-20,
compliance is the priority, no ergonomics shortcuts]

You: "should we add a caching layer to the token check?"
Claude: "Given the compliance requirement, caching token validation
would complicate the audit trail — skip it until after the audit."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude makes the right call without being told why. That's context working.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Reference File
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&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;reference_template_location&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;reference&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Template path: ~/.claude/templates/ts-react-project.md

Usage: at new repo init, copy to .claude/CLAUDE.md.
Fill in [Project Name] and Architecture section.

Note: verify library versions at each project init — they drift.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reference files are simple: &lt;strong&gt;where to find things that live outside the project.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where bugs are tracked (Linear, Jira, GitHub Issues)&lt;/li&gt;
&lt;li&gt;Where design assets live (Figma, Storybook)&lt;/li&gt;
&lt;li&gt;Where dashboards are (Grafana, Datadog)&lt;/li&gt;
&lt;li&gt;Where templates live (local filesystem paths)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;"A good assistant knows where the filing cabinet is. They don't memorize every document inside it — they just know where to look."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Template System
&lt;/h2&gt;

&lt;p&gt;The reference file above points to a template: &lt;code&gt;~/.claude/templates/ts-react-project.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is a complete project-level &lt;code&gt;CLAUDE.md&lt;/code&gt; for TypeScript/React projects. New repo workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; .claude
&lt;span class="nb"&gt;cp&lt;/span&gt; ~/.claude/templates/ts-react-project.md .claude/CLAUDE.md
&lt;span class="c"&gt;# Fill in: [Project Name], Architecture section&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instantly Claude knows: TypeScript project, pnpm, Zod for validation, TanStack Query for server state, Zustand for client state. All project-level rules in place before you write a single line.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A chef's mise en place — everything in its place before cooking starts. Setup done right means execution can be clean."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The warning: &lt;em&gt;"Verify library versions are still current at each project init — they drift."&lt;/em&gt; A template from six months ago might reference a library that's had a major version bump. Always check.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Full Context Hierarchy
&lt;/h2&gt;

&lt;p&gt;When Claude starts a session, it reads context in layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;1.&lt;/span&gt; Global CLAUDE.md       ← who you are, universal rules
&lt;span class="p"&gt;2.&lt;/span&gt; Project CLAUDE.md      ← this stack, this project's rules
&lt;span class="p"&gt;3.&lt;/span&gt; Memory files (index)   ← lessons, preferences, project context
&lt;span class="p"&gt;4.&lt;/span&gt; The code itself        ← what's actually been built
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"General law → company policy → department rules → today's meeting agenda. Each layer is more specific than the last."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Writing Your First Project File
&lt;/h2&gt;

&lt;p&gt;You don't write project files upfront. Write them when you notice you're re-explaining context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trigger:&lt;/strong&gt; You find yourself starting a session with "so just to re-explain the context..."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Action:&lt;/strong&gt; Stop. Write a project file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&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;project_[feature_name]&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;project&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

[What's being built, current status]

&lt;span class="gs"&gt;**Why:**&lt;/span&gt; [The motivation — constraint, deadline, stakeholder ask]

&lt;span class="gs"&gt;**How to apply:**&lt;/span&gt; [What Claude should do differently because of this]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add it to MEMORY.md. Next session, Claude already knows.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;Project files carry the &lt;strong&gt;backstory&lt;/strong&gt; — decisions, motivations, and constraints not in the code but shaping every line of it.&lt;/p&gt;

&lt;p&gt;Reference files carry the &lt;strong&gt;map&lt;/strong&gt; — where to find things outside the project.&lt;/p&gt;

&lt;p&gt;Together they turn a new session from a cold start into a warm handoff.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Context isn't just helpful. Without it, the right answer and the wrong answer can look identical."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;Next: &lt;a href="https://dev.to/panditabhis/a-day-in-the-life-complete-claude-code-session-walkthrough-7o9"&gt;Part 7 — A Day in the Life: Complete Claude Code Session Walkthrough&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Your Coding DNA: The Three Files That Shape Every Line Claude Writes</title>
      <dc:creator>Abhishek Pandit</dc:creator>
      <pubDate>Wed, 10 Jun 2026 15:03:52 +0000</pubDate>
      <link>https://dev.to/panditabhis/your-coding-dna-the-three-files-that-shape-every-line-claude-writes-378g</link>
      <guid>https://dev.to/panditabhis/your-coding-dna-the-three-files-that-shape-every-line-claude-writes-378g</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 5 of 7 · Series: &lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Building Your AI Developer Handbook&lt;/a&gt; · &lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What User Preference Files Are
&lt;/h2&gt;

&lt;p&gt;Feedback files record mistakes. User preference files record &lt;em&gt;who you are as a developer&lt;/em&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Two carpenters given the same wood will build different tables — same tools, same materials, different hands, different results. User preference files are what make Claude build YOUR table, not the generic one."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Three preference files cover the three decisions you make on every single feature:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;How you organize code&lt;/strong&gt; — architecture&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How you manage data&lt;/strong&gt; — state management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How you verify correctness&lt;/strong&gt; — testing&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Preference 1: Architecture — Feature-Based Folders
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/features/auth/
  AuthForm.tsx
  AuthForm.test.tsx
  useAuth.ts
  auth.types.ts
/components/ui/
  Button.tsx
  Input.tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Two competing philosophies:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Layer-based&lt;/em&gt; (what most tutorials teach):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/components/
/hooks/
/types/
/tests/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Feature-based&lt;/em&gt; (what this workflow uses):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/features/auth/
/features/payment/
/features/dashboard/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"In a layer-based structure, adding a 'login' feature means touching four separate folders. In a feature-based structure, you touch one."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Layer-based groups files by &lt;em&gt;what they are&lt;/em&gt;. Feature-based groups by &lt;em&gt;what they do&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The difference becomes obvious when you need to &lt;strong&gt;delete a feature&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Layer-based: hunt through &lt;code&gt;/components&lt;/code&gt;, &lt;code&gt;/hooks&lt;/code&gt;, &lt;code&gt;/types&lt;/code&gt;, &lt;code&gt;/tests&lt;/code&gt; — find and delete each file individually, hope you didn't miss anything&lt;/li&gt;
&lt;li&gt;Feature-based: delete the &lt;code&gt;/features/auth/&lt;/code&gt; folder. Done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The shared primitives rule:&lt;/strong&gt;&lt;br&gt;
Buttons, inputs, modals — building blocks shared across all features — live in &lt;code&gt;/components/ui/&lt;/code&gt; only. Never copy a Button into a feature folder.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The kitchen is shared. Your desk is yours."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;No barrel exports on large modules:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Avoid on large modules — slows TS server, hurts tree-shaking&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AuthForm&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./AuthForm&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useAuth&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./useAuth&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import directly from the file. The extra path is worth it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Preference 2: State Management — The Ladder
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;1.&lt;/span&gt; useState    — local UI state, one component
&lt;span class="p"&gt;2.&lt;/span&gt; Zustand     — shared client state across components  
&lt;span class="p"&gt;3.&lt;/span&gt; TanStack Query — anything from a server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"State management is like choosing a vehicle. A bicycle for the corner shop, a car for the city, a truck for cross-country. The mistake is driving a truck to the corner shop."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 1: useState — Start Here, Always
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isOpen&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setIsOpen&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If state is local to one component and doesn't need to be shared — &lt;code&gt;useState&lt;/code&gt; is perfect. Simple, readable, zero overhead.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Don't add complexity until complexity is required."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 2: Zustand — Shared Client State Only
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Good: client-only shared state&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;useUIStore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;sidebarOpen&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;toggleSidebar&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;sidebarOpen&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sidebarOpen&lt;/span&gt; &lt;span class="p"&gt;})),&lt;/span&gt;
&lt;span class="p"&gt;}))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When state needs sharing across multiple components and it's &lt;strong&gt;client-only&lt;/strong&gt; — not from a server — Zustand is right. Modal state, sidebar flags, user preferences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The hard rule: never put server data in Zustand.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// WRONG — server data in Zustand&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;useUserStore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;fetchUser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a second copy of the data. They get out of sync. You add refresh logic. Then invalidation logic. Then loading states. You've just rebuilt TanStack Query, badly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: TanStack Query — Anything From a Server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// RIGHT — server data belongs here&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useQuery&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;queryKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;queryFn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Loading states, error states, caching, background refetching, cache invalidation — all free.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Zustand is a drawer. TanStack Query is a real-time window to the outside world. Don't put windows in drawers."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Preference 3: Testing — The Pyramid
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Unit tests:        pure logic, no side effects, no internal mocks
Integration tests: real database, real data flows
E2E tests:         critical paths only (login, checkout, core flow)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"Testing is like quality control on a car assembly line. You don't test the whole car every time you tighten one bolt. You test the bolt, then the subsystem, then the full car before it ships."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Unit Tests — Pure Logic Only
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Perfect unit test — pure function, no external dependencies&lt;/span&gt;
&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;formats currency correctly&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;formatCurrency&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;USD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$1,000.00&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Belongs here: validators, formatters, reducers, pure utility functions.&lt;br&gt;
Doesn't belong here: anything touching a database, API, filesystem, or network.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integration Tests — Real Database, Always
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;"A flight simulator is great for training. But the first time you land a real plane, you discover the simulator lied about the crosswind."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Mocked database tests pass even when the real migration fails. Integration tests must use a real test database. Yes, they're slower. That's the point — they're testing real behavior.&lt;/p&gt;

&lt;h3&gt;
  
  
  E2E Tests — Critical Paths Only
&lt;/h3&gt;

&lt;p&gt;E2E opens a real browser and clicks through the UI. Most accurate, slowest, most brittle.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"You don't test every road in the country to verify the highway exists. You just drive the highway."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;E2E for: login, checkout, the one flow that makes you money. Not for edge cases — those belong in unit and integration tests.&lt;/p&gt;




&lt;h2&gt;
  
  
  How These Three Work Together
&lt;/h2&gt;

&lt;p&gt;When Claude builds a new feature with these files loaded, it automatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates &lt;code&gt;/features/feature-name/&lt;/code&gt; — not scattered layer folders&lt;/li&gt;
&lt;li&gt;Starts with &lt;code&gt;useState&lt;/code&gt;, reaches for Zustand only if state needs sharing&lt;/li&gt;
&lt;li&gt;Writes unit tests for logic, integration tests for data layer&lt;/li&gt;
&lt;li&gt;Never adds barrel exports or server data to Zustand&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You don't say any of this. It's already loaded.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The best rule is one you never have to repeat."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;User preference files transform Claude from a generic code generator into a collaborator that builds code the way &lt;em&gt;you&lt;/em&gt; would build it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architecture: &lt;strong&gt;feature-based, co-located, no barrel exports&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;State: &lt;strong&gt;useState → Zustand → TanStack Query, never server state in Zustand&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Testing: &lt;strong&gt;unit for logic, real DB for integration, E2E for critical paths only&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three files. Every feature they shape.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Next: &lt;a href="https://dev.to/panditabhis/context-is-king-how-project-files-and-templates-keep-claude-on-track-433l"&gt;Part 6 — Context is King: How Project Files and Templates Keep Claude on Track&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>webdev</category>
      <category>react</category>
    </item>
    <item>
      <title>Battle Scars as Rules: Inside the Feedback Files</title>
      <dc:creator>Abhishek Pandit</dc:creator>
      <pubDate>Wed, 10 Jun 2026 14:52:10 +0000</pubDate>
      <link>https://dev.to/panditabhis/battle-scars-as-rules-inside-the-feedback-files-5ejj</link>
      <guid>https://dev.to/panditabhis/battle-scars-as-rules-inside-the-feedback-files-5ejj</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 4 of 7 · Series: &lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Building Your AI Developer Handbook&lt;/a&gt; · &lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Are Feedback Files?
&lt;/h2&gt;

&lt;p&gt;Every rule in a feedback file was born from either a mistake or a win.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The safety rules on a construction site weren't written by lawyers. They were written in blood — each rule marks the spot where something went wrong."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A feedback file looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gs"&gt;**Rule:**&lt;/span&gt; [what to do or not do]
&lt;span class="gs"&gt;**Why:**&lt;/span&gt; [the incident or reason behind it]
&lt;span class="gs"&gt;**Apply:**&lt;/span&gt; [when and where this kicks in]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Why&lt;/code&gt; is the most important part. Without it, you follow rules blindly. With it, you can judge edge cases — "does this situation actually trigger this rule, or is it different enough?"&lt;/p&gt;

&lt;p&gt;Here are 8 real feedback rules, what they say, and the story behind each one.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 1: Never Mock the Database in Tests
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rule: Integration tests must hit a real database. No mocks.
Why: Mocked tests passed. Prod migration broke.
Apply: Never mock the DB layer in integration tests.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"A fire drill with a fake fire teaches you nothing about real smoke."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Tests were passing. The mock was set up correctly. The code looked clean. But the mock didn't simulate a specific edge case in the actual database — a constraint that only exists in production. The migration ran, the constraint triggered, and production broke while all tests were green.&lt;/p&gt;

&lt;p&gt;The lesson: mocks are lying witnesses. They tell you what you told them to say, not what the real system does.&lt;/p&gt;

&lt;p&gt;For unit tests (pure functions, no side effects) — mocks are fine. For integration tests that touch data — always use a real test database.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 2: No useCallback/useMemo by Default
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rule: Don't add useCallback/useMemo unless:
  1. The child is wrapped in React.memo
  2. React Profiler shows a real re-render problem
Why: Premature optimization clutters code and rarely helps.
Apply: Strip default memoization in code review.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"Putting armor on a bicycle because 'it might get hit by a car' doesn't make it safer — it just makes it heavier and harder to ride."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Developers add &lt;code&gt;useCallback&lt;/code&gt;/&lt;code&gt;useMemo&lt;/code&gt; "just in case" — wrapping every handler by default. Result: harder-to-read code with reference tracking overhead, solving performance problems that don't exist.&lt;/p&gt;

&lt;p&gt;React's default re-render behavior is fast. Most re-renders take under 1ms. The profiler will tell you when something is actually slow. Optimize then — not before.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 3: Never Write API Tokens Into Config Files
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rule: Never write tokens, passwords, or secrets into settings.json or any config file.
Why: Config files are plaintext. Plaintext gets committed. Committed secrets get stolen.
Apply: Use .zshrc, secrets managers, or wrapper scripts instead.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"Writing your password on a sticky note is convenient until someone walks past your desk."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;settings.json&lt;/code&gt; files are convenient — set them once, forget. But they're plaintext files that often end up in git. Bots scan GitHub constantly for exposed credentials. An exposed key can be exploited within minutes.&lt;/p&gt;

&lt;p&gt;The safe pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Config files → key names only, no values&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.env&lt;/code&gt; → values, never committed, in &lt;code&gt;.gitignore&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Shell profile (&lt;code&gt;.zshrc&lt;/code&gt;) → exported env vars that tools pick up automatically&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Rule 4: CLAUDE.md — Global vs Project
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rule: Global CLAUDE.md = universal rules only. Stack-specific rules go in project CLAUDE.md.
Why: Hardcoding React/TypeScript rules globally broke Python project sessions.
Apply: Reject stack-specific content in global CLAUDE.md.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"The company handbook says 'be on time.' It doesn't say 'use a blue pen' — that's a department rule."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One CLAUDE.md tried to cover everything: TypeScript rules, React patterns, pnpm commands, Zod schemas. Then a Python project opened. Suddenly Claude was suggesting &lt;code&gt;pnpm&lt;/code&gt; commands for a pip project.&lt;/p&gt;

&lt;p&gt;The fix: two levels. Global = who you are. Project = what this stack is.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 5: Dependency Protocol — Check Before You Add
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rule: Before any new dependency:
  1. bundlephobia → check bundle size impact
  2. pnpm audit → check known vulnerabilities
  3. Repo activity → last commit within 1 year?
Why: Dependencies are long-term liabilities.
Apply: Include audit command whenever suggesting pnpm add.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"Adopting a pet is easy. Feeding it for 10 years is the commitment you're actually making."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every dependency you add is a dependency you maintain — security patches, breaking changes, version conflicts. A package that solves a problem today but gets abandoned tomorrow is a liability.&lt;/p&gt;

&lt;p&gt;Three checks, 2 minutes, every time. The cost of skipping: potentially hours debugging a supply chain issue.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 6: Error Handling — Never Swallow Silently
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rule: Every catch block must at minimum console.error(err).
      User-visible errors go to toast or error boundary.
Why: Silent failures look like missing features — hardest bugs to diagnose.
Apply: Never write catch (e) { /* ignore */ }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"A smoke alarm with dead batteries doesn't mean there's no fire. It means you won't know about it until it's too late."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;catch (e) {}&lt;/code&gt; — empty catch blocks are the most dangerous pattern in production code. An error occurred. Something failed. And you told the computer to pretend nothing happened.&lt;/p&gt;

&lt;p&gt;The user sees a broken UI with no error message. You see no logs. The error is invisible. You spend three hours debugging something that would have taken three seconds with a &lt;code&gt;console.error&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Minimum: log it. Better: show a toast. Best: let it bubble to an error boundary.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 7: Skip Removed Tools Silently
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rule: If a tool has been deliberately removed, never suggest or reference it.
Why: The removal was intentional. Asking about it is friction.
Apply: Skip silently, continue with available tools.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"If a chef removes an ingredient from their kitchen, they don't want the sous-chef asking 'but what about the cilantro?' every time they cook."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes you remove an integration — for cost, privacy, or preference. The decision was deliberate. You don't want Claude asking about it or suggesting you re-add it every session.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 8: Separate Work and Personal Git Identities
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rule: Always use the correct git identity (work vs personal) for the project context.
      Never add AI co-author lines to commits.
Why: Work and personal projects need separate attribution.
Apply: Confirm user.email matches context before every commit.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"You wouldn't sign a personal letter with your work signature."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Two contexts, two identities. The wrong email in a commit doesn't just look sloppy — it can create audit trail problems. The co-author rule: commit history should reflect human authorship decisions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Building Your Own Feedback Files
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&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;feedback_rule_name&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;one-line summary&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;feedback&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gs"&gt;**Rule:**&lt;/span&gt; [what Claude should do or not do]

&lt;span class="gs"&gt;**Why:**&lt;/span&gt; [the story — what happened or what you observed]

&lt;span class="gs"&gt;**How to apply:**&lt;/span&gt; [when does this rule trigger]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The trigger for writing a new one: if you've corrected Claude twice for the same thing, it belongs in a feedback file.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The first mistake is an accident. The second is a pattern. The third is a choice."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;Feedback files are the &lt;strong&gt;institutional memory&lt;/strong&gt; of your AI workflow. They capture hard-won knowledge that would otherwise reset every session. Each rule has a story. Each story prevents a future mistake.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Next: &lt;a href="https://dev.to/panditabhis/your-coding-dna-the-three-files-that-shape-every-line-claude-writes-378g"&gt;Part 5 — Your Coding DNA: The Three Files That Shape Every Line Claude Writes&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Teaching an AI to Never Forget: How the Memory System Works</title>
      <dc:creator>Abhishek Pandit</dc:creator>
      <pubDate>Wed, 10 Jun 2026 14:45:23 +0000</pubDate>
      <link>https://dev.to/panditabhis/teaching-an-ai-to-never-forget-how-the-memory-system-works-40o3</link>
      <guid>https://dev.to/panditabhis/teaching-an-ai-to-never-forget-how-the-memory-system-works-40o3</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 3 of 7 · Series: &lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Building Your AI Developer Handbook&lt;/a&gt; · &lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Goldfish Problem
&lt;/h2&gt;

&lt;p&gt;By default, every Claude session starts completely fresh. No memory of last week's conversation. No memory of the rule you explained three times. No memory of the mistake you made together and fixed together.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Imagine if your doctor forgot everything about you every time you walked into the clinic. You'd spend 10 minutes re-explaining your history before they could help you."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's Claude without memory files.&lt;/p&gt;

&lt;p&gt;The memory system fixes this. It's a folder of plain markdown files that Claude reads at the start of every session — carrying forward the lessons, preferences, and decisions that would otherwise reset.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where Memory Lives
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.claude/projects/your-project/memory/
  MEMORY.md              ← the index (loads automatically every session)
  feedback_rules.md      ← lessons from mistakes
  user_preferences.md    ← how you like to work
  project_context.md     ← what's happening in the project right now
  reference_links.md     ← where to find things outside the project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Think of it like a filing cabinet:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MEMORY.md&lt;/strong&gt; is the table of contents — one line per memory, always loaded&lt;/li&gt;
&lt;li&gt;Each individual file is a folder in the cabinet — loaded when relevant&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Four Types of Memory
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Feedback Memory — "Rules Born From Mistakes"
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;"Every rule in a safety manual was written in response to an accident." — Aviation saying&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These files store corrections and confirmations. Every time Claude does something you didn't want — or something you want it to repeat — that lesson becomes a feedback file.&lt;/p&gt;

&lt;p&gt;Example: You discover mocked database tests passed while a real production migration failed. You tell Claude: "never mock the database in tests." That becomes a rule that applies to every future session.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gs"&gt;**Rule:**&lt;/span&gt; Integration tests must hit a real database.
&lt;span class="gs"&gt;**Why:**&lt;/span&gt; Mocked tests passed; prod migration broke.
&lt;span class="gs"&gt;**Apply:**&lt;/span&gt; Never suggest mocking the DB layer in tests.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. User Memory — "How You Think and Work"
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;"A good assistant doesn't just do tasks — they understand how their manager thinks."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These files capture your preferences, style, and philosophy — folder structure, state management approach, testing philosophy. Claude reads these and adjusts its suggestions to match &lt;em&gt;your&lt;/em&gt; way of working.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Project Memory — "What's Happening Right Now"
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;"Context switches are expensive. The more context you can offload to a file, the less you re-explain every session."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These files track ongoing work — what feature is being built, why a particular decision was made, what the deadline is. Without these, you start every session re-explaining the backstory.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Reference Memory — "Where to Look Things Up"
&lt;/h3&gt;

&lt;p&gt;Simple pointers to external resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Bug tracker is at Linear project INGEST"&lt;/li&gt;
&lt;li&gt;"Design tokens are in Figma file XYZ"&lt;/li&gt;
&lt;li&gt;"Oncall dashboard is at grafana.internal/api-latency"&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;"A good assistant knows where the filing cabinet is. They don't memorize every document — they know where to look."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The MEMORY.md Index
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Memory Index&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;No DB mocks&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;feedback_db_testing.md&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; — integration tests use real DB; mocks missed prod migration bug
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;State ladder&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;user_state_management.md&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; — useState→Zustand→TanStack Query; no server state in Zustand
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Current feature&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;project_auth_sprint.md&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; — building OAuth login, deadline 2026-06-20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the only file that loads automatically on every session. Intentionally short — one line per memory.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A good index tells you whether you need to open the drawer. You shouldn't need to read the whole drawer just to find out."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each line has three parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The name (links to the full file)&lt;/li&gt;
&lt;li&gt;A one-line hook (enough to know if it's relevant right now)&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  How It Works in Practice
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Session 1 (no memory):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You: "How should I structure the auth feature?"
Claude: [gives generic advice based on training data]
You: "I use feature-based folders, not layer-based"
Claude: [adjusts, gives feature-based advice]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Same question, Session 2 (with memory):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Claude reads: "feature-based folders — /features/auth/, /features/payment/"]
You: "How should I structure the auth feature?"
Claude: [immediately gives feature-based advice — no re-explaining needed]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What NOT to Put in Memory
&lt;/h2&gt;

&lt;p&gt;Memory files are for things that aren't in the code itself.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Already exists&lt;/th&gt;
&lt;th&gt;Don't memorize&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Code patterns&lt;/td&gt;
&lt;td&gt;They're in the code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git history&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git log&lt;/code&gt; knows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File structure&lt;/td&gt;
&lt;td&gt;Read the filesystem&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debugging solutions&lt;/td&gt;
&lt;td&gt;Fix is in the commit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;"A post-it note on your monitor says 'check Figma before coding UI.' It doesn't copy the entire Figma file onto the post-it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Memory files decay. The older they are, the more likely they describe something that's changed. The &lt;code&gt;Why&lt;/code&gt; field is what tells you whether a memory is still load-bearing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Starting Your Own Memory System
&lt;/h2&gt;

&lt;p&gt;Start with one file: &lt;code&gt;feedback.md&lt;/code&gt;. Every time you correct Claude, add a line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; Don't use barrel exports in large modules — slows TS server
&lt;span class="p"&gt;-&lt;/span&gt; Always check bundlephobia before adding a dependency  
&lt;span class="p"&gt;-&lt;/span&gt; State management order: useState first, Zustand only if shared
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Over a few weeks you'll have a precise record of how you like to work. Split into separate files when it gets large. Build the MEMORY.md index.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;Memory files turn Claude from a &lt;strong&gt;stateless tool&lt;/strong&gt; into a &lt;strong&gt;contextual collaborator&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The difference between "Claude that needs re-teaching every session" and "Claude that gets better the more you use it" is a folder of markdown files.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Experience is just lessons that were written down. Wisdom is lessons that were read again."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;Next: &lt;a href="https://dev.to/panditabhis/battle-scars-as-rules-inside-the-feedback-files-5ejj"&gt;Part 4 — Battle Scars as Rules: Inside the Feedback Files&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Your AI's Employee Handbook: A Deep Dive Into CLAUDE.md</title>
      <dc:creator>Abhishek Pandit</dc:creator>
      <pubDate>Wed, 10 Jun 2026 14:44:38 +0000</pubDate>
      <link>https://dev.to/panditabhis/your-ais-employee-handbook-a-deep-dive-into-claudemd-3obc</link>
      <guid>https://dev.to/panditabhis/your-ais-employee-handbook-a-deep-dive-into-claudemd-3obc</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 2 of 7 · Series: &lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Building Your AI Developer Handbook&lt;/a&gt; · &lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem This File Solves
&lt;/h2&gt;

&lt;p&gt;Imagine hiring a brilliant intern — photographic memory, types 500 words per minute, knows every programming language. But there's a catch: &lt;strong&gt;every morning they walk in with zero memory of yesterday&lt;/strong&gt;. They don't know your name, your project, your rules, or what you told them last week.&lt;/p&gt;

&lt;p&gt;That's Claude without a &lt;code&gt;CLAUDE.md&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; is the handbook you hand that intern on Day 1. It loads automatically at the start of every session. Claude reads it before doing anything else.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Rules written down are remembered. Rules spoken once are forgotten." — Every manager ever.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Where This File Lives
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;~/.claude/CLAUDE.md          ← loads for EVERY project (global)
your-project/.claude/CLAUDE.md  ← loads only for this project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two levels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Global&lt;/strong&gt; = rules about &lt;em&gt;you&lt;/em&gt; (who you are, how you work, what you never break)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project&lt;/strong&gt; = rules about &lt;em&gt;this codebase&lt;/em&gt; (which framework, which patterns, which shortcuts)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Section 1: Who I Am
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Senior full-stack engineer. macOS. Read code first.
Verify external API/library behavior with context7 — training data may be stale.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This two-line description changes everything. Claude adjusts its explanations based on who it's talking to. Tell it you're a senior engineer — it skips the basics and goes straight to trade-offs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's like the difference between explaining a recipe to a chef versus a 10-year-old. Same recipe. Very different explanation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;code&gt;context7&lt;/code&gt; note tells Claude: "Before you answer anything about an external library, go look it up — don't trust your memory."&lt;/p&gt;




&lt;h2&gt;
  
  
  Section 2: Four Core Principles
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Think before coding
2. Simplicity first
3. Surgical changes
4. Goal-driven
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These four rules prevent the four most common AI coding mistakes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think Before Coding&lt;/strong&gt; — AI models are eager. Ask Claude to "fix the login bug" and it will immediately start editing files — even if it misunderstood the bug. This rule forces Claude to state its assumptions out loud before touching anything.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A surgeon who cuts before diagnosing is a butcher with a medical degree."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Simplicity First&lt;/strong&gt; — AI models default to &lt;em&gt;comprehensive&lt;/em&gt;. Ask for a button — get a button with loading states, error handling, animations, analytics, and an accessibility wrapper. This rule enforces: write the minimum code that solves the problem.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." — Antoine de Saint-Exupéry&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Surgical Changes&lt;/strong&gt; — Claude will "helpfully" clean up adjacent code, rename variables, update unrelated comments. Every change outside the task scope wasn't asked for, wasn't tested for, and could break something unrelated.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"If you ask a cleaner to mop the floor, you don't expect them to rearrange your furniture while they're at it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Goal-Driven&lt;/strong&gt; — Define a verifiable success criterion before writing code. "Add a login button" is not a goal. "Users can click the login button and be redirected to the dashboard" is.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Done means it works, not that you finished typing."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Section 3: Model Rules — Cost Control
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Main thread: claude-sonnet-4-6
Sub-agents:  claude-haiku-4-5-20251001  (cheap, fast, simple tasks)
Opus:        only when explicitly asked
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Speed&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Haiku&lt;/td&gt;
&lt;td&gt;Fast&lt;/td&gt;
&lt;td&gt;Cheap&lt;/td&gt;
&lt;td&gt;Search a file, lint, simple edits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sonnet&lt;/td&gt;
&lt;td&gt;Balanced&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Features, debugging, reviews&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opus&lt;/td&gt;
&lt;td&gt;Slower&lt;/td&gt;
&lt;td&gt;Expensive&lt;/td&gt;
&lt;td&gt;Deep architecture, hard trade-offs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;"You don't hire a senior architect to alphabetize your files."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using Opus for everything is like driving a Formula 1 car to the grocery store. Sub-agents always use Haiku — that one rule cuts session costs by ~40%.&lt;/p&gt;




&lt;h2&gt;
  
  
  Section 4: The Session Workflow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. /status   → confirm model
2. /cost     → baseline
3. /plan     → design first, never skip
4. Code
5. pnpm test → BLOCKING
6. /cost     → delta check
7. /code-review
8. /simplify
9. /code-review --comment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a &lt;strong&gt;pilot's pre-flight checklist&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Pilots don't skip checklist items because they're in a hurry. The checklist exists because being in a hurry is when mistakes happen."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each step catches a different failure. Step 5 is blocking — if tests fail, you fix them before proceeding. No exceptions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Section 5: Universal Rules
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Never commit &lt;code&gt;.env&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Your &lt;code&gt;.env&lt;/code&gt; file is like your house key. You wouldn't nail it to your front door for strangers to copy."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Bots scan GitHub 24/7 for exposed credentials. An exposed key can be exploited within minutes. Keep &lt;code&gt;.env.example&lt;/code&gt; (key names, no values) in the repo. Keep &lt;code&gt;.env&lt;/code&gt; only on your machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conventional commits&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feat: add login button
fix: correct password validation
chore: update dependencies
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"A well-labeled filing cabinet takes 10 seconds to search. A pile of random papers takes 10 minutes."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;WCAG 2.1 AA accessibility&lt;/strong&gt; — every interactive UI must work for screen readers, keyboard-only navigation, and low-contrast displays. Both an ethical standard and a legal requirement in many countries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Never touch code outside task scope&lt;/strong&gt; — every change outside scope wasn't reviewed, wasn't tested for, wasn't asked for.&lt;/p&gt;




&lt;h2&gt;
  
  
  Write Your Own CLAUDE.md
&lt;/h2&gt;

&lt;p&gt;Here's the minimum viable version for a beginner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# My Claude Handbook&lt;/span&gt;

&lt;span class="gu"&gt;## Who I Am&lt;/span&gt;
[Your role, experience level, languages/frameworks you use]

&lt;span class="gu"&gt;## Rules&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Ask before assuming anything
&lt;span class="p"&gt;2.&lt;/span&gt; Write the simplest code that works
&lt;span class="p"&gt;3.&lt;/span&gt; Never change code I didn't ask you to change
&lt;span class="p"&gt;4.&lt;/span&gt; Don't say done until I can verify it works

&lt;span class="gu"&gt;## Never Do&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Commit .env files
&lt;span class="p"&gt;-&lt;/span&gt; Add features I didn't ask for
&lt;span class="p"&gt;-&lt;/span&gt; Change files I didn't mention
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start simple. Add rules every time Claude does something you didn't want. Over time, it becomes a precise description of how you work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; doesn't make Claude smarter. It makes Claude &lt;strong&gt;consistent&lt;/strong&gt;. Consistent with your standards. Consistent with your rules. Consistent whether it's your first session or your hundredth.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Intelligence without discipline is just chaos at high speed."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;Next: &lt;a href="https://dev.to/panditabhis/teaching-an-ai-to-never-forget-how-the-memory-system-works-40o3"&gt;Part 3 — Teaching an AI to Never Forget: How the Memory System Works&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How I Turned Claude Into a Disciplined Senior Developer (Not Just a Fast One)</title>
      <dc:creator>Abhishek Pandit</dc:creator>
      <pubDate>Wed, 10 Jun 2026 14:09:11 +0000</pubDate>
      <link>https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59</link>
      <guid>https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 1 of 7 · Series: &lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Building Your AI Developer Handbook&lt;/a&gt; · &lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Full Series
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;th&gt;What you'll learn&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Overview — the full system&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Why discipline matters, how all 7 layers fit together&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/your-ais-employee-handbook-a-deep-dive-into-claudemd-3obc"&gt;Your AI's Employee Handbook: CLAUDE.md&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;How to write the file Claude reads every session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/teaching-an-ai-to-never-forget-how-the-memory-system-works-40o3"&gt;Teaching an AI to Never Forget&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The memory system — lessons that survive sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/battle-scars-as-rules-inside-the-feedback-files-5ejj"&gt;Battle Scars as Rules&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The 8 feedback rules and the stories behind them&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/your-coding-dna-the-three-files-that-shape-every-line-claude-writes-378g"&gt;Your Coding DNA&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Architecture, state management, and testing preferences&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/context-is-king-how-project-files-and-templates-keep-claude-on-track-433l"&gt;Context is King&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Project context files and the template system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/a-day-in-the-life-complete-claude-code-session-walkthrough-7o9"&gt;A Day in the Life&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Complete 9-step session walkthrough with a real feature&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;A plain-English walkthrough of my Claude Code workflow — written so anyone, including students, can understand what's happening and why.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem With AI Coding Tools Out of the Box
&lt;/h2&gt;

&lt;p&gt;AI coding assistants are fast. Dangerously fast.&lt;/p&gt;

&lt;p&gt;They write code before they understand the problem. They touch files you didn't ask them to touch. They say "done!" before verifying anything works. They forget everything you told them last session.&lt;/p&gt;

&lt;p&gt;Speed without discipline isn't productivity — it's just faster ways to create bugs.&lt;/p&gt;

&lt;p&gt;This is the system I built to fix that.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Claude Code?
&lt;/h2&gt;

&lt;p&gt;Claude Code is an AI assistant that runs in your terminal — not a chat window. It reads your files, runs your tests, writes and edits code, and operates as a real collaborator inside your project. Think of it as a pair programmer that never sleeps, but needs clear rules to not go rogue.&lt;/p&gt;

&lt;p&gt;The files in this walkthrough are the &lt;strong&gt;rules I give Claude at the start of every session&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 1 — The Handbook (&lt;code&gt;~/.claude/CLAUDE.md&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Every employee gets an onboarding handbook. This file is Claude's.&lt;/p&gt;

&lt;p&gt;It loads automatically at the start of every session, regardless of which project I'm in. It tells Claude who it's working with, how to behave, and what it's never allowed to do.&lt;/p&gt;

&lt;h3&gt;
  
  
  Four Core Principles That Prevent the Most Common AI Mistakes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Think before coding
2. Simplicity first
3. Surgical changes
4. Goal-driven
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Think before coding&lt;/strong&gt; — Claude will happily implement the wrong solution perfectly. This rule forces it to state its assumptions and ask when something is unclear, before writing a single line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simplicity first&lt;/strong&gt; — AI models default to comprehensive. Ask for a button, get a button + loading state + error boundary + animation + accessibility wrapper. This rule enforces: write the minimum code that solves the problem. Nothing speculative.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Surgical changes&lt;/strong&gt; — Claude &lt;em&gt;will&lt;/em&gt; refactor your entire codebase if you let it. The rule: touch only what the task requires. Never improve unrelated code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Goal-driven&lt;/strong&gt; — Define a verifiable success criterion. Loop until it passes. Don't declare done until the goal is confirmed met — not assumed met.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 2 — Model Rules (The Cost Control System)
&lt;/h2&gt;

&lt;p&gt;Not all AI tasks need the same horsepower.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Main work:   Sonnet   (mid-tier — capable, cost-efficient)
Simple tasks: Haiku   (cheapest — search, lint, single-file edits)
Hard problems: Opus   (most powerful — only when explicitly needed)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this matters:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Claude models bill per token — roughly per word of input and output. Three tiers exist at very different price points. Using the most powerful model for every task is like hiring a senior architect to alphabetize your files.&lt;/p&gt;

&lt;p&gt;The rule: Haiku for boring sub-tasks (searching files, running checks), Sonnet for real coding work, Opus only when Sonnet genuinely isn't enough. This keeps costs sane without sacrificing quality where it counts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 3 — The 9-Step Session Workflow
&lt;/h2&gt;

&lt;p&gt;This is the most important part of the whole system.&lt;/p&gt;

&lt;p&gt;Every coding session follows this exact sequence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step 1 — /status       Confirm which model is loaded and at what effort level
Step 2 — /cost         Snapshot current token spend (baseline before work starts)
Step 3 — /plan         Design the solution BEFORE touching any code
Step 4 — Code          Actual implementation
Step 5 — pnpm test     BLOCKING. All tests must pass. Zero exceptions. Fix failures here.
Step 6 — /cost         Check spend delta (don't burn budget reviewing broken code)
Step 7 — /code-review  AI reviews the diff for bugs and design issues
Step 8 — /simplify     AI cleans up messy code (not bug hunting — readability only)
Step 9 — /code-review --comment   Post review findings as inline GitHub PR comments
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this order matters:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine building a house by picking up a hammer, building walls, then realizing you skipped the blueprint — so you tear it down and start over. That's what most developers do with AI: prompt, get code, ship, find bugs in production.&lt;/p&gt;

&lt;p&gt;Each step in this sequence is a gate that catches a different class of failure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plan first&lt;/strong&gt; catches wrong solutions before any code is written&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests&lt;/strong&gt; catch logic bugs — broken behavior&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code review&lt;/strong&gt; catches design bugs — bad structure, security issues, edge cases missed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplify&lt;/strong&gt; catches readability debt — code that works but nobody can maintain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Second review&lt;/strong&gt; confirms the cleanup didn't introduce new issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Skipping any gate means that class of failure makes it further down the pipeline — where it costs more to fix.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 4 — Universal Rules (The Non-Negotiables)
&lt;/h2&gt;

&lt;p&gt;These rules apply to every project, every session, no exceptions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Never Commit &lt;code&gt;.env&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Your &lt;code&gt;.env&lt;/code&gt; file holds API keys, database passwords, and secrets. Committing it to GitHub means handing those keys to anyone who can view your repository — including strangers, bots, and automated scrapers that watch GitHub 24/7.&lt;/p&gt;

&lt;p&gt;The pattern: maintain a &lt;code&gt;.env.example&lt;/code&gt; file that shows the &lt;em&gt;shape&lt;/em&gt; of your config (key names, no values). Anyone cloning the project knows what to fill in without getting your credentials.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conventional Commits
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feat: add user login flow
fix: correct token expiry check
chore: update dependencies
refactor: extract auth middleware
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This naming convention makes git history readable by both humans and machines. Changelogs write themselves. CI pipelines can trigger on &lt;code&gt;feat:&lt;/code&gt; commits but skip &lt;code&gt;chore:&lt;/code&gt; ones. Future-you can scan three months of history in 30 seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  WCAG 2.1 AA Accessibility
&lt;/h3&gt;

&lt;p&gt;Every interactive UI element must meet this accessibility standard. That means: screen readers can navigate it, keyboard-only users can operate it, color contrast is sufficient for low-vision users.&lt;/p&gt;

&lt;p&gt;This is both an ethical baseline (your product should work for everyone) and a legal requirement in many countries. It's not optional.&lt;/p&gt;

&lt;h3&gt;
  
  
  Never Touch Code Outside Task Scope
&lt;/h3&gt;

&lt;p&gt;The single biggest risk when using AI tools. Claude will "helpfully" refactor adjacent code, rename variables for consistency, or update comments in files you never mentioned. Every change outside scope is a change that wasn't reviewed, wasn't tested for, and wasn't asked for.&lt;/p&gt;

&lt;p&gt;The rule keeps diffs reviewable and trust maintainable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 5 — Skills (Specialized Playbooks for Specific Situations)
&lt;/h2&gt;

&lt;p&gt;Skills are structured workflows that Claude invokes when specific situations arise. Instead of improvising, it follows a proven checklist.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Building a new feature?    → brainstorming → architecture decision → written plan → wait for approval
Found a bug?               → systematic-debugging skill
UI change?                 → frontend-design → accessibility audit → performance check
Adding a dependency?       → security audit first, always
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why not just ask Claude directly?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because improvised AI work skips steps. Without structure, Claude jumps straight to implementation. The &lt;code&gt;/brainstorming&lt;/code&gt; skill, for example, forces Claude to explore the problem space — alternative approaches, trade-offs, edge cases — &lt;em&gt;before&lt;/em&gt; suggesting a solution.&lt;/p&gt;

&lt;p&gt;Without it: technically correct solution to the wrong problem. With it: you catch misalignment before writing a single line.&lt;/p&gt;

&lt;p&gt;Skills turn Claude from an improviser into a disciplined practitioner who follows proven processes for high-stakes situations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 6 — Token Hygiene (Performance and Cost Management)
&lt;/h2&gt;

&lt;p&gt;Claude's "memory" within a session is like RAM — it's limited, and what you put in it matters.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;.claudeignore&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Every project gets this file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;node_modules&lt;/span&gt;/
&lt;span class="n"&gt;dist&lt;/span&gt;/
.&lt;span class="n"&gt;git&lt;/span&gt;/
*.&lt;span class="n"&gt;log&lt;/span&gt;
&lt;span class="n"&gt;coverage&lt;/span&gt;/
.&lt;span class="n"&gt;next&lt;/span&gt;/
&lt;span class="n"&gt;build&lt;/span&gt;/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;node_modules/&lt;/code&gt; alone can contain millions of lines of code. If Claude reads those files, it wastes its context window on irrelevant third-party code and charges you for every token. This file tells Claude "don't look here" — same idea as &lt;code&gt;.gitignore&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;/compact&lt;/code&gt; Command
&lt;/h3&gt;

&lt;p&gt;After a long debugging session, Claude may have read 50 files, run 20 commands, and accumulated thousands of lines of context. That context slows responses and costs money to process.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/compact&lt;/code&gt; summarizes the session history, keeps the essential context, and frees space — like clearing browser tabs when your machine starts slowing down.&lt;/p&gt;

&lt;h3&gt;
  
  
  Targeted Reads
&lt;/h3&gt;

&lt;p&gt;Never ask Claude to scan the entire codebase. Always point it at specific files. This keeps context clean, responses fast, and costs low.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 7 — Memory (Lessons That Survive Sessions)
&lt;/h2&gt;

&lt;p&gt;By default, Claude remembers nothing between sessions. Every conversation starts fresh. This is the biggest limitation of AI tools — you re-explain preferences, re-establish context, re-teach lessons from past mistakes.&lt;/p&gt;

&lt;p&gt;The memory system fixes this. A folder of markdown files stores things Claude should remember across all future conversations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Examples from Real Sessions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;"Never mock the database in tests"&lt;/strong&gt;&lt;br&gt;
Mocked tests passed. Real production migration failed. The mocks didn't reflect actual DB behavior. Lesson: integration tests must hit a real database — no shortcuts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"No &lt;code&gt;useCallback&lt;/code&gt;/&lt;code&gt;useMemo&lt;/code&gt; by default"&lt;/strong&gt;&lt;br&gt;
Premature optimization adds noise to every component. Only add memoization after a profiler confirms there's an actual re-render problem. Assumption-based optimization makes code harder to read and maintain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"State management ladder: &lt;code&gt;useState&lt;/code&gt; → Zustand → TanStack Query"&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;useState&lt;/code&gt;: local UI state, one component&lt;/li&gt;
&lt;li&gt;Zustand: shared client state (modal flags, user preferences)
&lt;/li&gt;
&lt;li&gt;TanStack Query: anything from a server (fetching, caching, mutations)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Never put server/async state in Zustand. This rule prevents the classic bug: stale server data living in a client store, getting out of sync with what the API actually returns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Feature-based folder structure"&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/features/auth/
  AuthForm.tsx
  AuthForm.test.tsx
  useAuth.ts
  auth.types.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything related to a feature lives together. When you delete a feature, you delete one folder — not hunt through six directories for scattered files.&lt;/p&gt;




&lt;h2&gt;
  
  
  Putting It All Together
&lt;/h2&gt;

&lt;p&gt;Here's what a typical session looks like in practice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open terminal, navigate to project&lt;/li&gt;
&lt;li&gt;Claude loads the handbook (CLAUDE.md) automatically&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;/status&lt;/code&gt; — confirm correct model&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;/cost&lt;/code&gt; — note starting spend&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;/plan&lt;/code&gt; — describe the task, Claude designs the solution &lt;em&gt;before&lt;/em&gt; coding&lt;/li&gt;
&lt;li&gt;Review and approve the plan&lt;/li&gt;
&lt;li&gt;Claude implements, using Haiku sub-agents for simple search/read tasks&lt;/li&gt;
&lt;li&gt;Run tests — if any fail, fix before moving on&lt;/li&gt;
&lt;li&gt;Check &lt;code&gt;/cost&lt;/code&gt; — note delta&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;/code-review&lt;/code&gt; — AI reviews the diff&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;/simplify&lt;/code&gt; — clean up the code&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;/code-review --comment&lt;/code&gt; — post findings to the PR&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Total time per feature: slower than just prompting Claude and shipping. But the defect rate is dramatically lower, the code is actually maintainable, and nothing has ever reached production broken because a test gate was skipped.&lt;/p&gt;




&lt;h2&gt;
  
  
  The One-Paragraph Summary
&lt;/h2&gt;

&lt;p&gt;Most AI coding tools are fast but undisciplined — they write code before understanding the problem, touch things they shouldn't, and forget everything between sessions. This workflow treats Claude like a disciplined senior developer: give it a handbook (CLAUDE.md), have it follow a process (9-step session workflow), use specialist playbooks for specialist problems (skills), remember lessons from past work (memory), and control costs by matching tool power to task complexity (model tiers). The result is an AI collaborator that's genuinely faster than working alone — without the "it worked on my machine" false confidence.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built and refined over multiple projects. The system evolves — but the discipline doesn't.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Full Series
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;th&gt;What you'll learn&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/how-i-turned-claude-into-a-disciplined-senior-developer-not-just-a-fast-one-1a59"&gt;Overview — the full system&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Why discipline matters, how all 7 layers fit together&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/your-ais-employee-handbook-a-deep-dive-into-claudemd-3obc"&gt;Your AI's Employee Handbook: CLAUDE.md&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;How to write the file Claude reads every session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/teaching-an-ai-to-never-forget-how-the-memory-system-works-40o3"&gt;Teaching an AI to Never Forget&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The memory system — lessons that survive sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/battle-scars-as-rules-inside-the-feedback-files-5ejj"&gt;Battle Scars as Rules&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The 8 feedback rules and the stories behind them&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/your-coding-dna-the-three-files-that-shape-every-line-claude-writes-378g"&gt;Your Coding DNA&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Architecture, state management, and testing preferences&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/context-is-king-how-project-files-and-templates-keep-claude-on-track-433l"&gt;Context is King&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Project context files and the template system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/panditabhis/a-day-in-the-life-complete-claude-code-session-walkthrough-7o9"&gt;A Day in the Life&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Complete 9-step session walkthrough with a real feature&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Next: &lt;a href="https://dev.to/panditabhis/your-ais-employee-handbook-a-deep-dive-into-claudemd-3obc"&gt;Part 2 — Your AI's Employee Handbook: A Deep Dive Into CLAUDE.md&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/panditAbhis/claude-workflow" rel="noopener noreferrer"&gt;All workflow files on GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>workflow</category>
    </item>
  </channel>
</rss>
