<?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: Phil </title>
    <description>The latest articles on DEV Community by Phil  (@feirun).</description>
    <link>https://dev.to/feirun</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4077283%2F5e047b4d-82d5-445c-b503-03e622dc9a5e.png</url>
      <title>DEV Community: Phil </title>
      <link>https://dev.to/feirun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/feirun"/>
    <language>en</language>
    <item>
      <title>A Practical Claude Code Workflow: Context, Planning, Delegation, and Verification</title>
      <dc:creator>Phil </dc:creator>
      <pubDate>Fri, 14 Aug 2026 08:28:03 +0000</pubDate>
      <link>https://dev.to/feirun/a-practical-claude-code-workflow-context-planning-delegation-and-verification-385g</link>
      <guid>https://dev.to/feirun/a-practical-claude-code-workflow-context-planning-delegation-and-verification-385g</guid>
      <description>&lt;p&gt;Claude Code is most useful when it is treated as an engineering collaborator rather than a one-shot code generator. The quality of the result depends less on writing a clever prompt and more on giving the agent a disciplined workflow: establish project context, inspect before editing, plan risky changes, isolate research, and verify the outcome.&lt;/p&gt;

&lt;p&gt;This is the workflow I use for real codebases.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Put durable project context in CLAUDE.md
&lt;/h2&gt;

&lt;p&gt;Every session starts with a limited context window. If your architecture, commands, conventions, and review rules only live in chat messages, you will repeat yourself and eventually get inconsistent results.&lt;/p&gt;

&lt;p&gt;A concise CLAUDE.md should answer the questions a new teammate would ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which package manager and runtime versions does the project use?&lt;/li&gt;
&lt;li&gt;What commands build, test, lint, and format the code?&lt;/li&gt;
&lt;li&gt;Where do new modules belong?&lt;/li&gt;
&lt;li&gt;Which architectural boundaries should not be crossed?&lt;/li&gt;
&lt;li&gt;What must be verified before a change is considered complete?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep these instructions concrete. “Write clean code” is vague; “use pnpm, keep database access in src/data, and run pnpm test before handoff” is actionable.&lt;/p&gt;

&lt;p&gt;The official documentation explains how project instructions and auto memory work together: &lt;a href="https://code.claude.com/docs/en/memory" rel="noopener noreferrer"&gt;How Claude remembers your project&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Inspect the existing system before changing it
&lt;/h2&gt;

&lt;p&gt;A reliable session begins with evidence. Ask Claude to locate relevant files, trace the current data flow, identify tests, and explain the likely change surface.&lt;/p&gt;

&lt;p&gt;For a bug, a strong sequence is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reproduce or clearly define the failure.&lt;/li&gt;
&lt;li&gt;Trace the request or state transition through the code.&lt;/li&gt;
&lt;li&gt;Find the smallest responsible component.&lt;/li&gt;
&lt;li&gt;Check existing tests and conventions.&lt;/li&gt;
&lt;li&gt;Make the smallest coherent change.&lt;/li&gt;
&lt;li&gt;Re-run focused tests, then broader checks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This prevents a common failure mode: implementing a plausible solution in the wrong layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Use plan mode when the cost of a wrong edit is high
&lt;/h2&gt;

&lt;p&gt;Small, local changes often do not need a formal plan. Cross-cutting work does.&lt;/p&gt;

&lt;p&gt;Plan first when a task touches authentication, database migrations, deployment, public APIs, permissions, billing, or multiple packages. The plan should name affected components, data migrations, compatibility risks, verification steps, and rollback considerations.&lt;/p&gt;

&lt;p&gt;Claude Code supports a read-only planning workflow so you can review the approach before files are changed. See the official &lt;a href="https://code.claude.com/docs/en/common-workflows" rel="noopener noreferrer"&gt;common workflows guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Delegate exploration, not responsibility
&lt;/h2&gt;

&lt;p&gt;Large repository searches can consume the main conversation with logs and file contents. Subagents are useful for bounded investigations such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tracing an authentication flow;&lt;/li&gt;
&lt;li&gt;comparing several implementation options;&lt;/li&gt;
&lt;li&gt;reviewing a migration for data-loss risks;&lt;/li&gt;
&lt;li&gt;checking test coverage in a subsystem;&lt;/li&gt;
&lt;li&gt;researching an unfamiliar dependency.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main agent should still integrate the findings, make the final tradeoffs, and verify the complete change. Delegation is most effective when the subtask has a concrete question and a clear output.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://code.claude.com/docs/en/sub-agents" rel="noopener noreferrer"&gt;subagent documentation&lt;/a&gt; covers isolated contexts, tool access, and permission modes.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Make verification part of the definition of done
&lt;/h2&gt;

&lt;p&gt;“Code written” is not the same as “task complete.” A useful handoff should include evidence appropriate to the risk:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;focused unit or integration tests;&lt;/li&gt;
&lt;li&gt;type checking and linting;&lt;/li&gt;
&lt;li&gt;a production build when relevant;&lt;/li&gt;
&lt;li&gt;browser or API verification for user-facing flows;&lt;/li&gt;
&lt;li&gt;a review of the final diff;&lt;/li&gt;
&lt;li&gt;confirmation that unrelated user changes were preserved.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For migrations and automation, also test idempotency and failure recovery. For browser workflows, verify human handoff points such as CAPTCHA, MFA, service terms, file selection, and final publication.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Turn repeated workflows into reusable extensions
&lt;/h2&gt;

&lt;p&gt;When the same checklist keeps appearing, encode it instead of relying on memory.&lt;/p&gt;

&lt;p&gt;Use CLAUDE.md for always-on project facts. Use skills for reusable, on-demand procedures. Use hooks for deterministic lifecycle actions. Use MCP when Claude needs structured access to an external service. Use subagents when research should happen in an isolated context.&lt;/p&gt;

&lt;p&gt;Choosing the smallest extension that solves the problem keeps the system understandable. The official &lt;a href="https://code.claude.com/docs/en/features-overview" rel="noopener noreferrer"&gt;extension overview&lt;/a&gt; provides a useful comparison.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple operating loop
&lt;/h2&gt;

&lt;p&gt;A durable default loop is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understand → Plan when needed → Implement narrowly → Verify → Record what was learned&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That loop scales from a one-file bug fix to a multi-step automation project. It also makes AI-assisted work reviewable: every important decision has context, every mutation has a reason, and every completion claim has evidence.&lt;/p&gt;

&lt;p&gt;For more tutorials on Claude Code setup, workflows, agents, context management, and extensions, I maintain an independent multilingual resource at &lt;a href="https://claudeai.dev/" rel="noopener noreferrer"&gt;Claude AI Dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The goal is not to automate judgment away. It is to give the agent enough structure to apply judgment consistently.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>programming</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
