<?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: Zhijie Chen</title>
    <description>The latest articles on DEV Community by Zhijie Chen (@chenverdent).</description>
    <link>https://dev.to/chenverdent</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%2F3357504%2Fac101bbd-df06-4b71-a22e-49ddb7989cd3.jpeg</url>
      <title>DEV Community: Zhijie Chen</title>
      <link>https://dev.to/chenverdent</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chenverdent"/>
    <language>en</language>
    <item>
      <title>Why Plan Matters in Coding AI Agent: Fixing Misaligned Prompts</title>
      <dc:creator>Zhijie Chen</dc:creator>
      <pubDate>Wed, 24 Sep 2025 12:01:07 +0000</pubDate>
      <link>https://dev.to/chenverdent/why-plan-matters-in-coding-ai-agent-fixing-misaligned-prompts-1d74</link>
      <guid>https://dev.to/chenverdent/why-plan-matters-in-coding-ai-agent-fixing-misaligned-prompts-1d74</guid>
      <description>&lt;p&gt;When we work with coding AI tools, most of the time we just throw a short prompt and hope the output will be correct. Sometimes it works, but often it doesn't. The problem is simple: the AI doesn't fully understand our intent. Even small misunderstandings at the start can turn into big fixes later. The solution is planning. In this article, we'll look at why planning matters, how it fixes misaligned prompts, and how Verdent's Planning Mode makes coding with AI more reliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Misaligned Prompts = Misaligned Code
&lt;/h2&gt;

&lt;p&gt;Let's take an example of a very simple prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Add an endpoint to fetch orders."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first glance, this seems clear. An AI agent will probably generate code that "works." But often it skips the small, critical details: input validation for the API, correct data fields in the response, or following the structure your app already uses. Most of the time, the issue isn't that the AI is "bad." It's that the prompt wasn't specific enough. A vague plan leads to vague results.&lt;/p&gt;

&lt;p&gt;And this isn't just theory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Studies show that AI coding tools can make developers ~55% faster on tasks, but speed doesn't guarantee correctness if the ask is fuzzy. Clear intent still matters. &lt;/li&gt;
&lt;li&gt;Security researchers found 24‒33% of Copilot-generated snippets in real GitHub projects had likely security issues. Missing validation and misunderstood requirements were common root causes. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Professional software engineers already follow a similar approach: they clarify intent, list edge cases, write tests, and then code. There's a good reason for this: classic software research shows the cost of fixing defects rises steeply the later you catch them. Planning tackles problems while they're still cheap.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing the Root Cause with Planning
&lt;/h2&gt;

&lt;p&gt;Most problems with AI coding don't always depend on model you use, but there might be misaligned prompts. Short prompts often confuse the agent. Long prompts are still unclear and very expensive.&lt;/p&gt;

&lt;p&gt;Planning solves this by turning your short request into a shared checklist that the AI will follow. It also pairs naturally with verification. So instead of dumping more words into a single mega prompt, you plan, verify, then code.&lt;/p&gt;

&lt;h3&gt;
  
  
  What a Plan Adds
&lt;/h3&gt;

&lt;p&gt;A good Plan Mode turns a short idea into a step-by-step task list you can confirm before any code changes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parse order ID from URL.&lt;/li&gt;
&lt;li&gt;Validate ID is an integer.&lt;/li&gt;
&lt;li&gt;Query repository (or mock repo if database is missing).&lt;/li&gt;
&lt;li&gt;Return JSON with id, customer_name, total_price.&lt;/li&gt;
&lt;li&gt;If not found → return 404 with problem details.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the agent plans first, you and the AI are aligned. Fewer surprises and rewrites. Some coding agents already try to address the planning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cline&lt;/strong&gt; separates Plan (read-only, map the work) and Act (make changes). You see the plan and approve it before edits land. It also shows a task dashboard, so progress isn't a mystery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cursor Agent&lt;/strong&gt; plans using structured to-dos can run commands, and even "add tests and run them" on request, so the plan naturally flows into verification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aider&lt;/strong&gt; (terminal pair-programmer) has built-in flows to run tests and use the failures to guide fixes, and mirrors how seniors debug.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Simple Checklist You Can Use Today
&lt;/h2&gt;

&lt;p&gt;You can use this template prompt to achieve better results:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;State the goal in one line.&lt;/li&gt;
&lt;li&gt;List inputs/outputs with exact shapes.&lt;/li&gt;
&lt;li&gt;Write acceptance checks (what must be true to call this done).&lt;/li&gt;
&lt;li&gt;Name edge cases (not-found, invalid input, timeouts).&lt;/li&gt;
&lt;li&gt;Confirm the plan with the agent before code.&lt;/li&gt;
&lt;li&gt;Run tests (auto-generated or existing) and iterate until green.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is how you change your initial prompt "do X" into "here's exactly how we'll do X, and how we'll know it's right."&lt;/p&gt;

&lt;h2&gt;
  
  
  Planning Gaps Across Popular Coding Agents
&lt;/h2&gt;

&lt;p&gt;Across the popular tools, planning gaps show up in different ways. GitHub Copilot is great for quick inline code, but it has no explicit plan, so hidden assumptions slip in and cross-file changes are easy to miss. Cursor Agent can outline steps, yet it often mixes plan and execution in the same flow, so edits may start before a plan is locked, and the agent relies on the user to spell out "done" criteria. Cline cleanly separates Plan and Act, but plans can be too shallow if repo context isn't loaded, and tests aren't added unless you ask, so quality still depends on you. Aider encourages a test-first loop, but if you don't already have tests, the "plan" can collapse into ad-hoc edits.&lt;/p&gt;

&lt;p&gt;Common gaps across vendors we identified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Plans rarely include clear acceptance checks, edge-case lists, or traceability from plan items to commits/tests.&lt;/li&gt;
&lt;li&gt;They don't flag unknowns or risks upfront, and they rarely prevent scope drift once the agent starts changing code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How Planning Works in Verdent
&lt;/h2&gt;

&lt;p&gt;Verdent takes this idea further by making planning the first-class step of every coding task. When you type a request, Verdent doesn't rush into edits. Instead, it generates a structured task plan. Verdent generates subtasks, their dependencies, and even the related test cases. You can review, accept, or adjust this plan before any code changes are made. Once approved, Verdent executes subagents for writing code, running tests, and self-correcting until everything matches the plan. This way, the AI doesn't just give you snippets, but it gives you a predictable workflow where planning, coding, and verification are tightly connected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.verdent.ai%2Fimg%2Fplan.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.verdent.ai%2Fimg%2Fplan.gif" alt="Planning in action with Verdent VSCode extension" width="560" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, there is progress visible in the Task Dashboard (what's done, what's failing, what's next), and every change is explainable with diffs, inline notes, and test reports. For larger changes, Verdent can also produce an architecture map to show where the new code fits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices Using Verdent Planning
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keep planning lean.&lt;/strong&gt; Planning should pay for itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track simple signals after each run:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;First-run test pass rate → higher is better.&lt;/li&gt;
&lt;li&gt;Reverts/hotfixes after merge → lower is better.&lt;/li&gt;
&lt;li&gt;Time from first prompt to PR → should shrink as plans improve.&lt;/li&gt;
&lt;li&gt;Token spend per merged change → should drop as the agent stops wandering.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Review with Verdent helpful tools:&lt;/strong&gt; use the Task Dashboard and run logs to inspect these signals.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Tighten your templates:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Add or improve acceptance checks when tests miss issues.&lt;/li&gt;
&lt;li&gt;List edge cases when you see repeated 404s or validation errors.&lt;/li&gt;
&lt;li&gt;Split oversized plans where a task grows past. You can create a separate chat session and run another task with a small portion of the planning.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Keep loops short:&lt;/strong&gt; quick reviews and small iterations keep planning fast, focused, and worth it.&lt;/li&gt;

&lt;/ul&gt;

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

&lt;p&gt;The future isn't just faster typing. Planning fixes misaligned prompts by making your intent explicit and testable so the agent builds the thing you meant, not just the thing you typed. That's how we move from random outputs to reliable software. Ready to code with planning and clarity?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.verdent.ai/" rel="noopener noreferrer"&gt;Try Verdent today&lt;/a&gt;&lt;/strong&gt; and see how planning turns your prompts into production-ready code.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>coding</category>
      <category>productivity</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Stop Prompting, Start Architecting: A Systems Approach to Claude</title>
      <dc:creator>Zhijie Chen</dc:creator>
      <pubDate>Tue, 15 Jul 2025 21:37:36 +0000</pubDate>
      <link>https://dev.to/chenverdent/stop-prompting-start-architecting-a-systems-approach-to-claude-21mn</link>
      <guid>https://dev.to/chenverdent/stop-prompting-start-architecting-a-systems-approach-to-claude-21mn</guid>
      <description>&lt;p&gt;AI that only spits out code is like a lone bricklayer: helpful, but you won’t raise a skyscraper with bricks alone. &lt;em&gt;Hands‑on&lt;/em&gt; coding makes up just &lt;a href="https://www.infoworld.com/article/3831759/developers-spend-most-of-their-time-not-coding-idc-report.html" rel="noopener noreferrer"&gt;&lt;strong&gt;16–35%&lt;/strong&gt;&lt;/a&gt; of a developer’s week—the rest is spent on architecture, security, performance tuning, and cross‑functional planning.&lt;/p&gt;

&lt;p&gt;Large language models (LLMs) promise speedups—some &lt;a href="https://arxiv.org/abs/2302.06590" rel="noopener noreferrer"&gt;studies&lt;/a&gt; show time savings on green‑field tasks—but newer field research on mature codebases finds that AI can actually &lt;a href="https://metr.org/Early_2025_AI_Experienced_OS_Devs_Study.pdf" rel="noopener noreferrer"&gt;&lt;strong&gt;slow experts by ~20%&lt;/strong&gt;&lt;/a&gt;. Treating Claude as a single, all‑knowing generalist ignores these trade‑offs. To get expert‑level output, you must move from &lt;em&gt;prompting&lt;/em&gt; to deliberate &lt;em&gt;systems design&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Below is a four‑step playbook—&lt;strong&gt;Persona&lt;/strong&gt;, &lt;strong&gt;Rules&lt;/strong&gt;, &lt;strong&gt;Commands&lt;/strong&gt;, &lt;strong&gt;Phases&lt;/strong&gt;—augmented with built‑in and custom &lt;strong&gt;slash commands&lt;/strong&gt; so Claude behaves like an orchestrated team of specialists rather than a chatty junior dev.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1 — Define the Specialist
&lt;/h2&gt;

&lt;p&gt;Use a role prompt to cast Claude as a domain expert and list its priorities:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You are a &lt;strong&gt;principal security engineer&lt;/strong&gt; for e‑commerce payment APIs.&lt;br&gt;
&lt;strong&gt;Priority #1:&lt;/strong&gt; prevent financial data exfiltration.&lt;br&gt;
&lt;strong&gt;Priority #2:&lt;/strong&gt; ensure PCI‑DSS compliance.&lt;br&gt;
Review the following Go file.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Role prompting focuses the model’s knowledge and reduces irrelevant advice. While it may not always boost factual accuracy, it does improve &lt;em&gt;focus&lt;/em&gt; in multi‑step engineering work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2 — Set the Rules of Engagement
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## Rules of Engagement
1. Read Before Write – inspect the full file before suggesting changes.
2. Evidence-Based – cite OWASP A01 or performance metrics for every recommendation.
3. No New Dependencies – do not add third-party libraries without approval.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Constraints mirror the guardrails senior engineers use every day. By front‑loading them in the prompt, you avoid costly rework later.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3 — Create a Command‑Style “API” with Slash Commands
&lt;/h2&gt;

&lt;p&gt;Free‑form chat is brittle; a &lt;strong&gt;command contract&lt;/strong&gt; makes intent explicit and machine‑parsable. Claude Code &lt;a href="https://docs.anthropic.com/en/docs/claude-code/slash-commands" rel="noopener noreferrer"&gt;supports two flavors&lt;/a&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flavor&lt;/th&gt;
&lt;th&gt;Where it Lives&lt;/th&gt;
&lt;th&gt;Example &amp;amp; Hint&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Built‑in&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Packaged with Claude Code&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/review&lt;/code&gt; (request code review), &lt;code&gt;/cost&lt;/code&gt; (token stats), &lt;code&gt;/compact "focus on MVC folders"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Custom&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Markdown files in &lt;code&gt;.claude/commands/&lt;/code&gt; (project) or &lt;code&gt;~/.claude/commands/&lt;/code&gt; (user)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/optimize&lt;/code&gt; → &lt;code&gt;.claude/commands/optimize.md&lt;/code&gt;&lt;br&gt;&lt;code&gt;/frontend:component&lt;/code&gt; → &lt;code&gt;.claude/commands/frontend/component.md&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Syntax&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;/&amp;lt;command-name&amp;gt; [arguments]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Quick Recipe – Project Command&lt;/strong&gt;&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/commands
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Analyze this code for performance issues:"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .claude/commands/optimize.md
&lt;span class="c"&gt;# Now run it&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /optimize @src/payment.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Advanced Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Arguments&lt;/strong&gt; — use &lt;code&gt;$ARGUMENTS&lt;/code&gt; placeholder to pass dynamic IDs (&lt;code&gt;/fix-issue 123&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Namespacing&lt;/strong&gt; — subdirectories create colon-separated names (&lt;code&gt;/frontend:component&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bash preamble&lt;/strong&gt; — prefix lines with &lt;code&gt;!&lt;/code&gt; to inject live git status into the prompt context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File refs&lt;/strong&gt; — &lt;code&gt;@src/utils/helpers.js&lt;/code&gt; pulls file contents directly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP prompts&lt;/strong&gt; — external servers can publish commands (&lt;code&gt;/mcp__github__pr_review 456&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These affordances let you wire Claude into IDEs, CI pipelines, or documentation sites. And because the response schema can be enforced (e.g., structured JSON output), downstream tools can consume results automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example — Security Scan Command&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;COMMAND: /security-review
TARGET: ./src/handlers/payment.go
FOCUS: --sql-injection --xss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 4 — Orchestrate in Phases
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Design&lt;/strong&gt; — &lt;code&gt;/design-api&lt;/code&gt; with &lt;em&gt;architect&lt;/em&gt; persona; output contracts &amp;amp; non‑functional requirements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement&lt;/strong&gt; — &lt;code&gt;/implement&lt;/code&gt; with &lt;em&gt;backend&lt;/em&gt; persona; feed in the design doc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review&lt;/strong&gt; — &lt;code&gt;/security-review&lt;/code&gt; with &lt;em&gt;security&lt;/em&gt; persona; flag focus areas.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Using explicit handoffs cut architecture‑review ping‑pong by ~40% in one internal pilot. (Your mileage may vary.)&lt;/p&gt;




&lt;h2&gt;
  
  
  From Bricklayer to Builder
&lt;/h2&gt;

&lt;p&gt;Stop micromanaging a chat window. &lt;strong&gt;Architect the interaction&lt;/strong&gt;: define roles, codify rules, wrap them in slash-command contracts, and run phased workflows.&lt;/p&gt;

&lt;p&gt;Do that, and Claude becomes less a bricklayer laying GPT‑style bricks, and more the orchestrated crew chief building your entire skyscraper.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
