<?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: Pahud Hsieh</title>
    <description>The latest articles on DEV Community by Pahud Hsieh (@pahud).</description>
    <link>https://dev.to/pahud</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%2F409406%2Fb699e953-d1ff-4e9e-bd50-658a91fde999.png</url>
      <title>DEV Community: Pahud Hsieh</title>
      <link>https://dev.to/pahud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pahud"/>
    <language>en</language>
    <item>
      <title>AI Can't Fix What It Can't See: How cdk diagnose Enables Autonomous CDK Remediation</title>
      <dc:creator>Pahud Hsieh</dc:creator>
      <pubDate>Mon, 04 May 2026 18:27:26 +0000</pubDate>
      <link>https://dev.to/pahud/ai-cant-fix-what-it-cant-see-how-cdk-diagnose-enables-autonomous-cdk-remediation-2a3c</link>
      <guid>https://dev.to/pahud/ai-cant-fix-what-it-cant-see-how-cdk-diagnose-enables-autonomous-cdk-remediation-2a3c</guid>
      <description>&lt;h1&gt;
  
  
  AI Can't Fix What It Can't See: How &lt;code&gt;cdk diagnose&lt;/code&gt; Enables Autonomous CDK Remediation
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Current Behavior vs. What We Want
&lt;/h2&gt;

&lt;p&gt;Today, when a CDK deployment fails through a pipeline, the remediation loop looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Developer ──▶ Push code ──▶ Pipeline ──▶ CFN deploy ──▶ ❌ Fails
                                                          │
    ┌─────────────────────────────────────────────────────┘
    │
    ▼
Developer manually:
    1. Opens pipeline UI
    2. Finds the failed stage
    3. Navigates to CloudFormation console
    4. Locates the failed change set
    5. Reads the CFN error message
    6. Mentally translates CFN → CDK
    7. Edits code, pushes, waits for pipeline again

🤖 Developer: "AI, fix this deployment for me"
🤖 AI: "Sure! I'll fix the CloudFormation template for you."
🤖 Developer: "...that's not how CDK works."

The AI has no access to the error, no construct path, no source location.
The best it can do is guess — and it guesses wrong, offering to edit
CloudFormation YAML instead of your CDK source code. Totally useless.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what do we actually need for AI to address the root cause from CDK's perspective?&lt;/p&gt;

&lt;p&gt;We need a &lt;strong&gt;diagnosis report that's actionable for AI to fix CDK code&lt;/strong&gt; — not CloudFormation templates. Specifically, the AI needs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What failed&lt;/strong&gt; — which CloudFormation resource was rejected and why&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where in CDK&lt;/strong&gt; — the construct path (&lt;code&gt;MyStack/MyFunction/LogGroup&lt;/code&gt;) that maps the CFN logical ID back to your construct tree&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where in source code&lt;/strong&gt; — the exact file and line number (&lt;code&gt;lib/my-stack.ts:8:5&lt;/code&gt;) where the construct was created&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What to do&lt;/strong&gt; — enough context to reason about the fix (set a feature flag? import the existing resource? change the removal policy?)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's exactly what &lt;code&gt;cdk diagnose&lt;/code&gt; provides.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;cdk diagnose&lt;/code&gt;, the expected behavior becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Developer ──▶ Push code ──▶ Pipeline ──▶ CFN deploy ──▶ ❌ Fails
                                                          │
    ┌─────────────────────────────────────────────────────┘
    │
    ▼
Developer (or AI agent):
    1. Runs: cdk diagnose MyStack
    2. Gets: construct path + error + source location
    3. Fixes the code
    4. Redeploys ✅

🤖 AI agent can do steps 1–4 autonomously.
   The entire loop is CLI-driven, machine-readable,
   and can be designed as an autonomous agent that
   diagnoses, fixes, and redeploys — without human intervention.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference: &lt;strong&gt;&lt;code&gt;cdk diagnose&lt;/code&gt; turns a manual, console-bound, human-only workflow into a single command that both humans and AI agents can use.&lt;/strong&gt; This is what makes AI-assisted remediation possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem in Detail
&lt;/h2&gt;

&lt;p&gt;Here's a scenario every CDK developer has lived through.&lt;/p&gt;

&lt;p&gt;You write a perfectly valid CDK application. You run &lt;code&gt;cdk synth&lt;/code&gt; — clean output, valid CloudFormation template, no errors. You push your code, the pipeline picks it up, and then... somewhere in the deployment, CloudFormation rejects it.&lt;/p&gt;

&lt;p&gt;Now what?&lt;/p&gt;

&lt;p&gt;If you deployed with &lt;code&gt;cdk deploy&lt;/code&gt;, you're fine — the CLI catches the error, enriches it with your CDK construct path, and even points you to the source location in your code. But most teams don't deploy that way. They push to a pipeline — CDK Pipelines, CodePipeline, or an internal CI/CD system — and CDK only runs &lt;code&gt;synth&lt;/code&gt;. The actual deployment happens through CloudFormation APIs directly.&lt;/p&gt;

&lt;p&gt;When that deployment fails, the error is buried. You open the pipeline UI. Click through to the failed stage. Find the CloudFormation stack. Federate to the console. Navigate to the change set. And finally, you see something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Resource of type 'AWS::S3::Bucket' with identifier
'my-app-bucket' already exists.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three to five clicks deep, in CloudFormation's language, with no connection back to your CDK code.&lt;/p&gt;

&lt;p&gt;This is the gap that &lt;code&gt;cdk diagnose&lt;/code&gt; fills.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────┐     ┌──────────────┐     ┌──────────────────────┐
│  Developer   │────▶│  cdk synth   │────▶│  Pipeline / CI/CD    │
│  writes CDK  │     │  ✅ Looks     │     │  deploys to CFN      │
│              │     │     great!    │     │                      │
└──────────────┘     └──────────────┘     └──────────┬───────────┘
                                                     │
                                                     ▼
                                          ┌──────────────────────┐
                                          │   CloudFormation     │
                                          │   ❌ Deploy fails     │
                                          └──────────┬───────────┘
                                                     │
                          ┌──────────────────────────┴──────────────────────────┐
                          │                                                     │
                          ▼                                                     ▼
               ┌─────────────────────┐                            ┌──────────────────────┐
               │  WITHOUT diagnose   │                            │  WITH cdk diagnose   │
               │                     │                            │                      │
               │  1. Open Pipeline   │                            │  $ cdk diagnose      │
               │  2. Find stage      │                            │                      │
               │  3. Find stack      │                            │  ❌ MyFunction        │
               │  4. Open console    │                            │    🛑 LogGroup        │
               │  5. Find changeset  │                            │       already exists  │
               │  6. Read CFN error  │                            │    📍 stack.ts:8:5   │
               │  7. Translate to    │                            │  One command.         │
               │     CDK manually    │                            │  Source location.     │
               │                     │                            │  AI can act on this.  │
               │  🤖 AI can't help   │                            │  🤖 AI fixes code ✅  │
               └─────────────────────┘                            └──────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What is cdk diagnose?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;cdk diagnose&lt;/code&gt; is a new CDK CLI subcommand that inspects a CloudFormation stack's last failed deployment and surfaces the root cause with CDK-aware context — construct paths, source locations, and actionable fix suggestions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cdk &lt;span class="nt"&gt;--unstable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;diagnose diagnose MyStack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It queries CloudFormation directly via &lt;code&gt;DescribeChangeSet&lt;/code&gt; and related APIs, then enriches the raw error using CDK metadata (&lt;code&gt;aws:cdk:path&lt;/code&gt;) to map CloudFormation logical IDs back to your constructs and source code.&lt;/p&gt;

&lt;p&gt;The key insight: &lt;strong&gt;it works regardless of how the stack was deployed.&lt;/strong&gt; Pipeline, &lt;code&gt;cdk deploy&lt;/code&gt;, manual CloudFormation API call — doesn't matter. If the stack exists and it failed, &lt;code&gt;cdk diagnose&lt;/code&gt; can tell you why.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Real Example: The CDK Upgrade That Breaks Everything
&lt;/h2&gt;

&lt;p&gt;Let me walk through a scenario that hit hundreds of real CDK users as a P0 issue (&lt;a href="https://github.com/aws/aws-cdk/issues/34612" rel="noopener noreferrer"&gt;aws-cdk#34612&lt;/a&gt;). It's the kind of failure that makes &lt;code&gt;cdk diagnose&lt;/code&gt; invaluable — because the developer did &lt;em&gt;nothing wrong&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Setup
&lt;/h3&gt;

&lt;p&gt;You have a Lambda function that's been running in production for months:&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="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;cdk&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;aws-cdk-lib&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;lambda&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;aws-cdk-lib/aws-lambda&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyAppStack&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;cdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Stack&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;lambda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;MyFunction&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="na"&gt;runtime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;lambda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Runtime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NODEJS_20_X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;index.handler&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;lambda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Code&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromAsset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lambda&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="na"&gt;logRetention&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;cdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;aws_logs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;RetentionDays&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ONE_WEEK&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Standard code. Deployed and working. No issues.&lt;/p&gt;

&lt;p&gt;Then you upgrade &lt;code&gt;aws-cdk-lib&lt;/code&gt; from &lt;code&gt;2.199.0&lt;/code&gt; to &lt;code&gt;2.200.0&lt;/code&gt; — a routine version bump. You change nothing else in your code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Synth: Looks Perfect
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;cdk synth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No errors. The template looks fine. You push to your pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploy: Fails
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE_FAILED | AWS::Logs::LogGroup | MyFunctionLogGroup
Resource of type 'AWS::Logs::LogGroup' with identifier
'/aws/lambda/MyFunction' already exists.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wait — what? You didn't add a log group. You didn't change anything. Why is CloudFormation suddenly trying to create one?&lt;/p&gt;

&lt;h3&gt;
  
  
  What Happened
&lt;/h3&gt;

&lt;p&gt;CDK &lt;code&gt;2.200.0&lt;/code&gt; introduced a new feature flag &lt;code&gt;@aws-cdk/aws-lambda:useCdkManagedLogGroup&lt;/code&gt; that defaults to &lt;code&gt;true&lt;/code&gt;. This causes CDK to add an explicit &lt;code&gt;AWS::Logs::LogGroup&lt;/code&gt; resource to your template for every Lambda function. The intent is good — CDK wants to manage the log group lifecycle so it can set retention policies and clean up on deletion.&lt;/p&gt;

&lt;p&gt;But here's the catch: when your Lambda function first ran, AWS Lambda &lt;em&gt;automatically&lt;/em&gt; created a log group named &lt;code&gt;/aws/lambda/MyFunction&lt;/code&gt;. That log group already exists. Now CDK's template tries to create the same log group, and CloudFormation rejects it.&lt;/p&gt;

&lt;p&gt;The developer did nothing wrong. The synth output looks correct. The failure only happens at deploy time because it depends on the &lt;em&gt;runtime state&lt;/em&gt; of the AWS account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Diagnose: Root Cause + Source Location
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;cdk &lt;span class="nt"&gt;--unstable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;diagnose diagnose MyAppStack

🔍 Synthesizing with debug information. This may take a bit longer.
❌ Stack MyAppStack:
 └─ MyAppStack
     └─ MyFunction
         └─ LogGroup  &lt;span class="o"&gt;(&lt;/span&gt;AWS::Logs::LogGroup MyFunctionLogGroupXXXXXXXX&lt;span class="o"&gt;)&lt;/span&gt;
            🛑 Resource of &lt;span class="nb"&gt;type&lt;/span&gt; &lt;span class="s1"&gt;'AWS::Logs::LogGroup'&lt;/span&gt; with identifier
               &lt;span class="s1"&gt;'/aws/lambda/MyFunction'&lt;/span&gt; already exists.
            Source Location: new MyAppStack &lt;span class="o"&gt;(&lt;/span&gt;lib/my-app-stack.ts:8:5&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now an AI agent has everything it needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What failed&lt;/strong&gt;: &lt;code&gt;AWS::Logs::LogGroup&lt;/code&gt; for &lt;code&gt;/aws/lambda/MyFunction&lt;/code&gt; already exists&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where in CDK&lt;/strong&gt;: &lt;code&gt;MyAppStack/MyFunction/LogGroup&lt;/code&gt; — it's the log group associated with the Lambda construct&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where in source&lt;/strong&gt;: &lt;code&gt;lib/my-app-stack.ts:8:5&lt;/code&gt; — the &lt;code&gt;new lambda.Function(...)&lt;/code&gt; call&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context to reason about the fix&lt;/strong&gt;: this is a known issue with the &lt;code&gt;useCdkManagedLogGroup&lt;/code&gt; feature flag in CDK 2.200+&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The AI-Assisted Fix
&lt;/h3&gt;

&lt;p&gt;An AI agent reading this diagnosis can reason through the fix:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The log group already exists because Lambda auto-created it&lt;/li&gt;
&lt;li&gt;CDK 2.200+ now tries to explicitly manage it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix option A&lt;/strong&gt;: Set the feature flag to &lt;code&gt;false&lt;/code&gt; to restore previous behavior:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;cdk.json&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"@aws-cdk/aws-lambda:useCdkManagedLogGroup"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Fix option B&lt;/strong&gt;: Import the existing log group so CDK can manage it going forward&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This isn't a trivial "remove the hardcoded name" fix. It requires understanding CDK feature flags, Lambda log group lifecycle, and the tradeoffs between the two fix options. That's exactly the kind of reasoning AI agents excel at — &lt;em&gt;when they have the right input&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Another Example: The Named Resource Trap
&lt;/h2&gt;

&lt;p&gt;The Lambda log group issue is subtle — it only surfaces during a CDK upgrade. But there's an even more common class of failures that hits teams every day: &lt;strong&gt;named resources that already exist&lt;/strong&gt; (&lt;a href="https://github.com/aws/aws-cdk/issues/16686" rel="noopener noreferrer"&gt;aws-cdk#16686&lt;/a&gt;, &lt;a href="https://github.com/aws/aws-cdk/issues/6183" rel="noopener noreferrer"&gt;aws-cdk#6183&lt;/a&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="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DataBucket&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="na"&gt;bucketName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;my-team-data-bucket&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;Perfectly valid CDK. Synth passes.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4rdbhu3jq5bk38ap1icj.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4rdbhu3jq5bk38ap1icj.png" alt="cdk synth output" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But if that bucket already exists in the account — from a previous stack that was torn down, from another team, or from a manual &lt;code&gt;aws s3 mb&lt;/code&gt; — CloudFormation rejects it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Resource of type 'AWS::S3::Bucket' with identifier
'my-team-data-bucket' already exists.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same pattern with IAM roles, SQS queues, or any resource with a hardcoded physical name. CDK can't catch this at synth time because it's a runtime check against the actual state of your AWS account.&lt;/p&gt;

&lt;p&gt;And here's what you see in the CloudFormation console — not helpful at all:&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff1ca2384hgvrmsmasb7h.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff1ca2384hgvrmsmasb7h.png" alt="CloudFormation console error" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;cdk diagnose&lt;/code&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="nv"&gt;$ &lt;/span&gt;cdk &lt;span class="nt"&gt;--unstable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;diagnose diagnose MyAppStack

❌ Stack MyAppStack:
 └─ MyAppStack
     └─ DataBucket
         └─ Resource  &lt;span class="o"&gt;(&lt;/span&gt;AWS::S3::Bucket DataBucketXXXXXXXX&lt;span class="o"&gt;)&lt;/span&gt;
            🛑 Resource of &lt;span class="nb"&gt;type&lt;/span&gt; &lt;span class="s1"&gt;'AWS::S3::Bucket'&lt;/span&gt; with identifier
               &lt;span class="s1"&gt;'my-team-data-bucket'&lt;/span&gt; already exists.
            Source Location: new MyAppStack &lt;span class="o"&gt;(&lt;/span&gt;lib/my-app-stack.ts:6:5&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An AI agent sees this and can reason: "The bucket name conflicts with an existing resource. I should either remove the hardcoded &lt;code&gt;bucketName&lt;/code&gt; to let CloudFormation generate a unique name, or import the existing bucket with &lt;code&gt;cdk import&lt;/code&gt;."&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh0rwsxd9cehdhfpzmumh.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh0rwsxd9cehdhfpzmumh.png" alt="cdk diagnose output" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simple to understand, but impossible for AI to act on without &lt;code&gt;cdk diagnose&lt;/code&gt; surfacing the error in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters for AI
&lt;/h2&gt;

&lt;p&gt;Here's where it gets interesting.&lt;/p&gt;

&lt;p&gt;Without &lt;code&gt;cdk diagnose&lt;/code&gt;, an AI agent has no way to help you fix a deployment failure. The error is locked behind a multi-step console navigation that requires browser interaction, AWS console federation, and human eyeballs. There's no CLI command, no API, no machine-readable output for the agent to consume.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;cdk diagnose&lt;/code&gt;, the entire remediation loop becomes automatable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pipeline fails
    │
    ▼
AI runs: cdk diagnose MyStack
    │
    ▼
AI reads structured output:
  "LogGroup '/aws/lambda/MyFunction' already exists
   at MyAppStack/MyFunction/LogGroup
   source: lib/my-app-stack.ts:8:5"
    │
    ▼
AI reasons: "CDK 2.200+ feature flag issue.
  Fix: set @aws-cdk/aws-lambda:useCdkManagedLogGroup to false"
    │
    ▼
AI edits cdk.json, redeploys
    │
    ▼
✅ Deployment succeeds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is AI-assisted remediation. The AI agent can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Diagnose&lt;/strong&gt; — run &lt;code&gt;cdk diagnose&lt;/code&gt; to get the structured error with construct path and source location&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reason&lt;/strong&gt; — understand this is a CDK version upgrade issue involving feature flags and Lambda log group lifecycle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix&lt;/strong&gt; — edit &lt;code&gt;cdk.json&lt;/code&gt; to set the feature flag, or import the existing log group&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify&lt;/strong&gt; — redeploy and confirm the fix works&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This isn't a simple text substitution. The AI needs to understand CDK concepts, feature flags, and AWS service behavior to pick the right fix. But it can only do that reasoning if it has the structured diagnosis as input. &lt;code&gt;cdk diagnose&lt;/code&gt; is that input.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting It Together: Kiro CLI as the Autonomous Remediation Agent
&lt;/h2&gt;

&lt;p&gt;So we have &lt;code&gt;cdk diagnose&lt;/code&gt; producing structured, machine-readable error output. But who runs it? Who reads the output, reasons about the fix, edits the code, and redeploys?&lt;/p&gt;

&lt;p&gt;This is where &lt;a href="https://kiro.dev/cli/" rel="noopener noreferrer"&gt;Kiro CLI&lt;/a&gt; comes in. Kiro CLI's &lt;code&gt;chat&lt;/code&gt; subcommand supports a &lt;a href="https://kiro.dev/docs/cli/headless/" rel="noopener noreferrer"&gt;headless mode&lt;/a&gt; — set the &lt;code&gt;KIRO_API_KEY&lt;/code&gt; environment variable and use &lt;code&gt;--no-interactive&lt;/code&gt;, and Kiro runs programmatically without a browser or interactive session. Same tools, same agents, same capabilities — but fully automated.&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="c"&gt;# After a failed pipeline deployment, just run:&lt;/span&gt;
&lt;span class="nv"&gt;KIRO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-api-key &lt;span class="se"&gt;\&lt;/span&gt;
kiro-cli chat &lt;span class="nt"&gt;--no-interactive&lt;/span&gt; &lt;span class="nt"&gt;--trust-all-tools&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"My CDK deployment of MyAppStack failed. &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
   Run cdk diagnose to find the root cause and fix it."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;KIRO_API_KEY&lt;/code&gt; lets Kiro authenticate without a browser — essential for CI/CD pipelines and automated workflows. The &lt;code&gt;--no-interactive&lt;/code&gt; flag executes the task and exits. The &lt;code&gt;--trust-all-tools&lt;/code&gt; flag lets the agent run shell commands (like &lt;code&gt;cdk diagnose&lt;/code&gt; and &lt;code&gt;cdk deploy&lt;/code&gt;) without pausing for approval.&lt;/p&gt;

&lt;p&gt;Here's what happens under the hood:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────┐
│  kiro chat (headless agent)                             │
│                                                         │
│  1. Runs: cdk --unstable=diagnose diagnose MyAppStack   │
│                                                         │
│  2. Reads output:                                       │
│     "LogGroup '/aws/lambda/MyFunction' already exists"  │
│     "Source: lib/my-app-stack.ts:8:5"                   │
│                                                         │
│  3. Reads lib/my-app-stack.ts to understand context     │
│                                                         │
│  4. Reasons: "CDK 2.200+ feature flag issue.            │
│     The log group was auto-created by Lambda.            │
│     Fix: set useCdkManagedLogGroup to false"            │
│                                                         │
│  5. Edits cdk.json:                                     │
│     + "@aws-cdk/aws-lambda:useCdkManagedLogGroup": false│
│                                                         │
│  6. Runs: cdk deploy                                    │
│                                                         │
│  7. ✅ Deployment succeeds                               │
└─────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key: Kiro CLI operates entirely in the terminal. No browser, no console, no clicking. It can run in a CI/CD pipeline's post-failure hook, in an SSH session, or on a developer's laptop. Combined with &lt;code&gt;cdk diagnose&lt;/code&gt;, it closes the full loop from failure detection to automated fix.&lt;/p&gt;

&lt;p&gt;This is what the autonomous remediation workflow looks like end to end:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Pipeline deploys ──▶ CFN fails
                        │
                        ▼
              Post-failure hook triggers:
              &lt;span class="nv"&gt;KIRO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$SECRET&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
              kiro-cli chat &lt;span class="nt"&gt;--no-interactive&lt;/span&gt; &lt;span class="nt"&gt;--trust-all-tools&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
                &lt;span class="s2"&gt;"diagnose and fix MyAppStack"&lt;/span&gt;
                        │
                        ▼
              Kiro CLI &lt;span class="o"&gt;(&lt;/span&gt;headless&lt;span class="o"&gt;)&lt;/span&gt;:
                cdk diagnose → &lt;span class="nb"&gt;read &lt;/span&gt;error → edit code → cdk deploy
                        │
                        ▼
                   ✅ Fixed and redeployed
                   &lt;span class="o"&gt;(&lt;/span&gt;or: opens PR with the fix &lt;span class="k"&gt;for &lt;/span&gt;human review&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No human in the loop for the diagnosis and fix. A human reviews the PR if you want that gate — but the heavy lifting is done.&lt;/p&gt;

&lt;p&gt;Here's what it looks like in practice — Kiro CLI diagnosing, fixing, and redeploying a failed stack in under 2 minutes:&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="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kiro-cli chat &lt;span class="nt"&gt;--no-interactive&lt;/span&gt; &lt;span class="nt"&gt;--trust-all-tools&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="go"&gt;    "My CDK stack CdkDiagnoseStack failed to deploy. \
     Run cdk diagnose to find the root cause and fix it."

&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Let me start by running cdk diagnose to understand what went wrong.
&lt;span class="go"&gt;
🔍 Synthesizing with debug information. This may take a bit longer.
❌ Stack CdkDiagnoseStack:
Early validation failed for change set cdk-deploy-change-set:
 └─ CdkDiagnoseStack
     └─ MyBucket
         └─ Resource  (AWS::S3::Bucket MyBucketF68F3FF0)
            🛑 Resource of type 'AWS::S3::Bucket' with identifier
               'cdk-diagnose-demo-903779448426-us-east-1' already exists.
            Source Location:
              new CdkDiagnoseStack (lib/cdk-diagnose-stack.ts:12:5)

&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;The issue is clear: the S3 bucket has a hardcoded name that already
&lt;span class="go"&gt;  exists. The fix is to remove the hardcoded name and let CloudFormation
  generate a unique one.

Updating: lib/cdk-diagnose-stack.ts
  12, 12:     new s3.Bucket(this, 'MyBucket', {
- 13    :       bucketName: 'cdk-diagnose-demo-903779448426-us-east-1',
  14, 13:       removalPolicy: cdk.RemovalPolicy.DESTROY,

&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Now &lt;span class="nb"&gt;let &lt;/span&gt;me destroy the failed stack and redeploy:
&lt;span class="go"&gt;
 ✅  CdkDiagnoseStack: destroyed

CdkDiagnoseStack: deploying... [1/1]
CdkDiagnoseStack | 7/7 | CREATE_COMPLETE | AWS::CloudFormation::Stack

 ✅  CdkDiagnoseStack

✨  Deployment time: 36.28s

&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;✅ Done. Here&lt;span class="s1"&gt;'s what happened:
&lt;/span&gt;&lt;span class="go"&gt;  1. cdk diagnose identified the root cause: hardcoded bucket name
     already existed, causing "resource already exists" error.
  2. Fix: Removed the hardcoded bucketName property.
  3. Redeployed successfully.

 ▸ Credits: 1.74 • Time: 1m 38s
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;cdk diagnose&lt;/code&gt; is available now in the latest CDK CLI (v2.1120.0+) behind the unstable flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx cdk &lt;span class="nt"&gt;--unstable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;diagnose diagnose &amp;lt;stack-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;--unstable&lt;/code&gt; flag indicates the API may still change, but the feature is production-ready and fully supported.&lt;/p&gt;

&lt;p&gt;To try the full autonomous remediation flow with Kiro CLI:&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="c"&gt;# 1. Install Kiro CLI: https://kiro.dev/downloads/&lt;/span&gt;
&lt;span class="c"&gt;# 2. Generate an API key at https://app.kiro.dev (account settings)&lt;/span&gt;
&lt;span class="c"&gt;# 3. After a failed deployment:&lt;/span&gt;
&lt;span class="nv"&gt;KIRO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-api-key &lt;span class="se"&gt;\&lt;/span&gt;
kiro-cli chat &lt;span class="nt"&gt;--no-interactive&lt;/span&gt; &lt;span class="nt"&gt;--trust-all-tools&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"My CDK stack MyAppStack failed to deploy. &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
   Run cdk diagnose, find the root cause, and fix the code."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want a hands-on demo, here's a minimal CDK app that will fail on deploy:&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;// lib/my-app-stack.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;cdk&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;aws-cdk-lib&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;s3&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;aws-cdk-lib/aws-s3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Construct&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;constructs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyAppStack&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;cdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Stack&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Construct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;cdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;StackProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;MyBucket&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="na"&gt;bucketName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cdk-diagnose-demo-bucket&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;removalPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;cdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;RemovalPolicy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DESTROY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;autoDeleteObjects&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run:&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="c"&gt;# 1. Pre-create the bucket so it conflicts&lt;/span&gt;
aws s3api create-bucket &lt;span class="nt"&gt;--bucket&lt;/span&gt; cdk-diagnose-demo-bucket

&lt;span class="c"&gt;# 2. Deploy — this will fail&lt;/span&gt;
npx cdk deploy &lt;span class="nt"&gt;--require-approval&lt;/span&gt; never

&lt;span class="c"&gt;# 3. Diagnose&lt;/span&gt;
npx cdk &lt;span class="nt"&gt;--unstable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;diagnose diagnose MyAppStack

&lt;span class="c"&gt;# 4. Let Kiro fix it&lt;/span&gt;
kiro-cli chat &lt;span class="nt"&gt;--no-interactive&lt;/span&gt; &lt;span class="nt"&gt;--trust-all-tools&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"My CDK stack MyAppStack failed to deploy. &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
   Run cdk diagnose, find the root cause, and fix the code."&lt;/span&gt;

&lt;span class="c"&gt;# 5. Cleanup&lt;/span&gt;
aws s3 rb s3://cdk-diagnose-demo-bucket &lt;span class="nt"&gt;--force&lt;/span&gt;
aws cloudformation delete-stack &lt;span class="nt"&gt;--stack-name&lt;/span&gt; MyAppStack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The gap between "deployment failed" and "here's what to fix" just got a lot smaller. With &lt;code&gt;cdk diagnose&lt;/code&gt; and Kiro CLI, it can be fully automated.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;code&gt;cdk diagnose&lt;/code&gt; was implemented by &lt;a href="https://github.com/rix0rrr" rel="noopener noreferrer"&gt;Rico Huijbers&lt;/a&gt; with contributions from &lt;a href="https://github.com/mrgrain" rel="noopener noreferrer"&gt;Momo Kornher&lt;/a&gt; on the AWS CDK team. The feature landed in &lt;a href="https://github.com/aws/aws-cdk-cli/pull/1378" rel="noopener noreferrer"&gt;aws-cdk-cli#1378&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>aws</category>
      <category>devops</category>
    </item>
    <item>
      <title>From Manual to Intent: 7 Years of CDK Contribution</title>
      <dc:creator>Pahud Hsieh</dc:creator>
      <pubDate>Mon, 04 May 2026 17:56:44 +0000</pubDate>
      <link>https://dev.to/pahud/from-manual-to-intent-7-years-of-cdk-contribution-21ch</link>
      <guid>https://dev.to/pahud/from-manual-to-intent-7-years-of-cdk-contribution-21ch</guid>
      <description>&lt;h2&gt;
  
  
  Where It All Began: 2019 re:Invent
&lt;/h2&gt;

&lt;p&gt;AWS CDK had just gone GA that year with TypeScript and Python support. At re:Invent 2019, I saw AWS present how to contribute to CDK for the first time. There was no AI back then — everything was manual. Clone the entire monorepo, figure out the Lerna project structure, manually build dependent packages, write L2 constructs, write tests, submit a PR. Every step was something you had to figure out on your own.&lt;/p&gt;

&lt;p&gt;I was blown away.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fik2nhczjihncn9m2jy3v.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fik2nhczjihncn9m2jy3v.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A construct I write, a bug I fix — once it's merged, it ships with the next version of aws-cdk to the entire world. Developers everywhere use this thing every day, and I can directly change it. I thought that was incredibly cool.&lt;/p&gt;

&lt;p&gt;I later wrote a post on community.aws called Contributing to AWS CDK, documenting the entire process so others wouldn't have to figure it all out from scratch like I did.&lt;/p&gt;

&lt;h2&gt;
  
  
  2019–2024: The Live Contribution Walkthrough Era
&lt;/h2&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvowgxiajoxzxile8ebc.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvowgxiajoxzxile8ebc.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over the next few years, I made a lot of live contribution walkthrough videos. I'd stream the whole thing — pick an issue, analyze it, implement the fix, write tests, submit the PR. All live.&lt;/p&gt;

&lt;p&gt;In 2021, Werner Vogels called CDK a game changer.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4anckh833rwil1ono8v.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4anckh833rwil1ono8v.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That validated what many of us in the community already felt — CDK was becoming the way to build on AWS.&lt;/p&gt;

&lt;p&gt;But honestly, the barrier was still there.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fovamz5zkdui26qqws872.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fovamz5zkdui26qqws872.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During that time I was completely passionate about writing CDK PRs. In 2020, I was at Penghu's MZG airport waiting for a flight, writing a Lambda filesystem support PR while my daughter played Animal Crossing next to me. All manual, no AI. That's just how it was — you did everything yourself.&lt;/p&gt;

&lt;p&gt;A full CDK contribution involves quite a lot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understanding what the issue is about and how far the impact reaches&lt;/li&gt;
&lt;li&gt;Finding the right module and files in a massive monorepo&lt;/li&gt;
&lt;li&gt;Following CDK's own coding patterns (L1/L2 constructs, props interface design, etc.)&lt;/li&gt;
&lt;li&gt;Writing unit tests and integration tests that meet the standards&lt;/li&gt;
&lt;li&gt;Passing lint, build, and snapshot checks&lt;/li&gt;
&lt;li&gt;Writing a PR description in the required format&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even experienced developers need hours or days. For newcomers, it's even worse.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Pain of a First-Time Contributor
&lt;/h2&gt;

&lt;p&gt;Imagine this scenario.&lt;br&gt;
You're using CDK and you hit a bug, or you need a feature that doesn't exist yet. You want to help, so you open the aws-cdk GitHub repo, find the issue, and think: "I'll fix this!"&lt;br&gt;
Then you open &lt;a href="https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING.md&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It's incredibly long. It tells you how to set up your dev environment, install build tools, build the entire monorepo, run tests, handle snapshots, write PR descriptions…… but all you wanted was to change a few lines of code.&lt;/p&gt;

&lt;p&gt;This is painful. You just wanted to make a small fix, but setting up the environment alone takes half a day, and it might not even build. A lot of people give up right here. My first time, I was up until midnight just getting the environment working. Honestly, I never wanted to do it manually again.&lt;/p&gt;
&lt;h2&gt;
  
  
  July 2025: Kiro and the Multi-Roles Pattern
&lt;/h2&gt;

&lt;p&gt;After Kiro launched in July 2025, we started trying a new approach: composing a workflow pipeline from multiple agent roles. We called it the &lt;strong&gt;multi-roles pattern&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is straightforward — analyzing an issue and writing code require different skills. Designing a solution and running tests are different too. Instead of having one agent do everything end to end (which usually doesn't work well), we split each phase out, assign it to a specialized agent role, and connect them with an orchestrator.&lt;/p&gt;

&lt;p&gt;In practice, the results were much better than a single agent. Each role focuses on one thing, and the output quality clearly improves.&lt;/p&gt;
&lt;h2&gt;
  
  
  2025 re:Invent: From Multi-Roles to Power
&lt;/h2&gt;

&lt;p&gt;At re:Invent that same year, Kiro released the &lt;strong&gt;Power&lt;/strong&gt; feature. This let us formalize the multi-roles pattern — define explicit phases, set approval gates, control subagent execution order and parallelism.&lt;/p&gt;

&lt;p&gt;The biggest change for me was that this was no longer just "letting AI write code." It became a structured engineering process with human approval checkpoints. AI handles the repetitive work it's good at, humans make the decisions.&lt;/p&gt;

&lt;p&gt;We started designing CDK Contribution Power with this architecture.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fatqbfaql0rqv7evwvmf1.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fatqbfaql0rqv7evwvmf1.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My manager &lt;em&gt;Joey Wang&lt;/em&gt; gave a talk at the Open Source Developers Lounge during 2025 re:Invent: "Automating Open Source Contributions with AI Agents — How We Use Multi-Agent Workflows to Maintain AWS CDK," showing how this multi-agent workflow works in practice.&lt;/p&gt;
&lt;h2&gt;
  
  
  February 2026: Agent SKILL
&lt;/h2&gt;

&lt;p&gt;In February 2026, Kiro started supporting &lt;strong&gt;Agent SKILL&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This was a big turning point. SKILL is a standardized format that isn't tied to any specific agent tool. That means we can package the entire CDK Contribution workflow as a single skill, and it works across Kiro, Claude Code, Codex, Gemini, Copilot, OpenCode, and other compatible agent tools.&lt;/p&gt;

&lt;p&gt;Before this, what we built with Power only ran inside Kiro. With SKILL, the same workflow works cross-platform. We'd always wanted this — not locking the workflow into a single tool.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Design of CDK Contribution Skill
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/cdklabs/cdk-contribution-skill" rel="noopener noreferrer"&gt;cdk-contribution-skill&lt;/a&gt; was officially released at the end of March 2026.&lt;/p&gt;

&lt;p&gt;The core is a 6-phase orchestrated workflow, with clear inputs, outputs, and deliverables for each phase:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+------------------------------------------+
|           MAIN ORCHESTRATOR              |
|        (coordinates all phases)          |
+--------------------+---------------------+
                     |
     +---------------+--------------+
     |       PHASE 1: ANALYSIS      |
     |   Analyze issue, classify,   |
     |   explore affected code      |
     +---------------+--------------+
                     |
                     v
     +---------------+--------------+
     |       PHASE 2: PLANNING      |
     |   Propose solution, plan     |
     |   tests &amp;amp; impl approach      |
     +---------------+--------------+
                     |
                     v
     +-------------------------------+
     |      HUMAN APPROVAL GATE      |
     |   Review analysis + plan      |
     |   Continue? Yes | No          |
     +-------+---------------+-------+
       [NO]  |               |  [YES]
       back  |               |
       to    |               v
     PHASE 2 |   +---------------+--------------+
             |   |    PHASE 3: BUILD &amp;amp; IMPL     |
             |   |   Branch, env setup, code    |
             |   +---------------+--------------+
             |                   |
             |                   v
             |   +---------------+--------------+
             |   |   PHASE 4: PARALLEL VALID    |
             |   +-------+-------+-------+------+
             |           |       |       |
             |           v       v       v
             |       +------+ +-----+ +------+
             |       | TEST | |  QA | | DOCS |
             |       +--+---+ +--+--+ +--+---+
             |          +-------+-------+
             |                  |
             |                  v
             |   +-----------------------------+
             |   |    VALIDATION AGGREGATE     |
             |   | Any blocker? -&amp;gt; human gate  |
             |   +-------------+---------------+
             |                 |
             |                 v
     +---------------+--------------+
     |     PHASE 5: SELF REVIEW     |
     +----------+----------+--------+
                |          |
                v          v
        +------------+ +------------+
        |  SECURITY  | | REGRESSION |
        |   REVIEW   | |   REVIEW   |
        +------+-----+ +-----+------+
               +-------+------+
                       |
                       v
              +------------------+
              | SYNTHESIZE REPORT|
              +--------+---------+
                       |
                       v
     +-------------------------------+
     |      HUMAN APPROVAL GATE      |
     |   Go or No-Go?               |
     +-------+---------------+-------+
     [NO-GO] |               | [GO]
     fix and |               |
     re-run  |               v
     PHASE 4 |   +-------------------------------+
             |   |        PHASE 6: PR            |
             |   |   Commit, create PR           |
             |   +-------------------------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are the key design decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Human Approval Gates
&lt;/h2&gt;

&lt;p&gt;After Phase 2 and Phase 5, the workflow stops and waits for human approval. This is mandatory — you can't skip it.&lt;br&gt;
Why? Because CDK is an infrastructure tool, and a single breaking change can affect a huge number of users. AI can help you analyze, write code, and run tests, but "should we go in this direction" and "should we submit this PR" — those decisions have to be made by a human. I didn't want a fully automated system sending PRs to aws-cdk without anyone looking at them.&lt;br&gt;
It comes down to trust but verify. AI hallucinates, writes code that looks correct but has security risks, and misses edge cases that cause regressions. Human review isn't a formality — it's the last line of defense against these things.&lt;br&gt;
If a proposal is rejected at an approval gate, the workflow doesn't force forward. It goes back to planning, readjusts, and enters the next round of review. This isn't a one-way pipeline — it can loop back.&lt;br&gt;
Structured Deliverables and Artifact Lifecycle&lt;br&gt;
Each phase writes its output to markdown files under .kiro/contributions//. These files serve two purposes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Handoff interface between phases&lt;/strong&gt; — the next phase's agent reads the previous phase's deliverable as input. This is the communication channel between agents.&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review evidence&lt;/strong&gt; — humans can read these files at approval gates to understand what the agent did and why.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These intermediate artifacts stay in the local working directory after PR submission — they don't go into the PR itself. They're records of the work process, not final deliverables.&lt;/p&gt;
&lt;h2&gt;
  
  
  Sequential + Parallel Hybrid Execution
&lt;/h2&gt;

&lt;p&gt;Phase 1 through Phase 3 are strictly sequential — you can't start writing code before you've finished analyzing the issue. But Phase 4's three tasks (testing, QA, documentation) and Phase 5's two tasks (security review, regression review) run in parallel, because there are no dependencies between them.&lt;/p&gt;

&lt;p&gt;The coordination works like this: each subtask independently produces its own deliverable, then the orchestrator collects all results and aggregates them into a summary. If any subtask reports a blocking issue, the entire phase is marked as needing human intervention. No subtask can override another's conclusions.&lt;/p&gt;
&lt;h2&gt;
  
  
  ASCII Diagrams
&lt;/h2&gt;

&lt;p&gt;Every deliverable must include at least one ASCII diagram. This isn't for aesthetics — in a terminal environment, ASCII diagrams are the most reliable form of visualization, rendering correctly in any agent tool.&lt;/p&gt;

&lt;p&gt;For example, Phase 1's analysis deliverable maps out affected file relationships:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  +----------------+       +-------------------+
  |  affected.ts   | ----&amp;gt; | test/foo.test.ts  |
  +----------------+       +-------------------+
         |
         v
  +----------------+
  |  features.ts   |  (new feature flag)
  +----------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Phase 4's validation deliverable shows test coverage status:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  +---------------------+   +------------------+   +--------+
  |        TEST         |   |        QA        |   |  DOCS  |
  +---------------------+   +------------------+   +--------+
  | unit:  12/12 PASS   |   | lint:    PASS    |   | README |
  | integ: 3/3  PASS    |   | build:   PASS    |   | OK     |
  +---------------------+   +------------------+   +--------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These diagrams aren't decoration. They're how you quickly grasp status in a terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent Team
&lt;/h2&gt;

&lt;p&gt;The essence of this skill isn't "one powerful AI" — it's an entire agent team, each with its own role:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Issue Analyst&lt;/strong&gt; analyzes the issue, reads all comments, explores the CDK codebase to understand the current design, cross-references how other modules are implemented&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution Architect&lt;/strong&gt; takes over, proposes solutions, analyzes pros and cons&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You&lt;/strong&gt; review the options and pick a direction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Engineer&lt;/strong&gt; gets the repo into a development-ready state&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coder&lt;/strong&gt; writes the code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tester&lt;/strong&gt; runs the tests&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;QA Specialist&lt;/strong&gt; checks code style and quality&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation Specialist&lt;/strong&gt; fills in documentation&lt;/li&gt;
&lt;li&gt;Two &lt;strong&gt;Reviewers&lt;/strong&gt; do self-review from security and regression perspectives&lt;/li&gt;
&lt;li&gt;All results are aggregated into a report for you&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You&lt;/strong&gt; say go or no-go&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Between approval gates, the agent team automatically builds a PR from scratch. You don't need to read all of CONTRIBUTING.md, set up the environment from zero, or memorize CDK coding patterns. But you're still responsible for the final PR — you need to check whether the approach is right, the code makes sense, and the tests are sufficient.&lt;/p&gt;

&lt;p&gt;This isn't a PR vending machine. It's a team that handles the repetitive work for you. The decision-making stays in your hands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intention-Driven Development
&lt;/h2&gt;

&lt;p&gt;The developer experience we're going for is &lt;strong&gt;intention-driven&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You express your intent, the agent analyzes the problem, explores the codebase, and proposes an approach. You say LGTM, and the code gets written, tests pass, PR gets submitted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intent in, PR out, CI green.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's the goal. But I'll be honest — we're not 100% there yet.&lt;/p&gt;

&lt;p&gt;For complex issues — changes spanning multiple modules, or cases requiring deep understanding of CDK internals — the agent still goes off track sometimes and needs human correction. For simple to medium-complexity issues, this workflow already runs smoothly. Complex cases are a work in progress.&lt;/p&gt;

&lt;p&gt;Looking further ahead, I'm excited about developers being able to kick off this process without sitting at a computer. Send an instruction from your phone during your commute, and a cloud agent runs the entire workflow automatically. By the time you get to the office, there's a report and a PR waiting for your review. Technically feasible today, but the experience still needs polish.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Manual to Automated, From Closed to Open
&lt;/h2&gt;

&lt;p&gt;Looking back at how things have changed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;| Period | Approach | Barrier |
|--------|----------|---------|
| 2019 | Fully manual, re:Invent workshop | Very high |
| 2019–2024 | Live walkthrough videos | High |
| 2025 H2 | Kiro multi-roles + Power | Medium |
| 2026 Q1 | Agent SKILL (cross-platform) | Low |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From being blown away at re:Invent 2019 by the fact that anyone can contribute to CDK, to building a cross-platform contribution skill in 2026 — it took seven years.&lt;/p&gt;

&lt;p&gt;The barrier has definitely come down a lot. But I won't say it's gone — you still need a basic dev environment (Node.js, Yarn, gh CLI), you still need to understand what you're doing, and you're still responsible for the PR you submit.&lt;/p&gt;

&lt;p&gt;What's changed is that the most painful parts — setting up the environment, finding files, memorizing patterns, writing boilerplate tests — the agent can handle those now. You get to spend your time where a human brain is actually needed: understanding the problem, making design decisions, reviewing the final result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give It a Try
&lt;/h2&gt;

&lt;p&gt;If you want to try it, I'd suggest starting with a small, well-defined aws-cdk issue. Don't jump straight into a massive change spanning ten modules.&lt;/p&gt;

&lt;p&gt;Installation is simple — type this in your coding agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Install &lt;a href="https://github.com/cdklabs/cdk-contribution-skill" rel="noopener noreferrer"&gt;https://github.com/cdklabs/cdk-contribution-skill&lt;/a&gt; to my skills"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then point it at an issue:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"contribute this aws/aws-cdk#12345"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent will start Phase 1 analysis. A few minutes later you'll see the first analysis report, telling you what the issue is about, how far the impact reaches, and how it recommends fixing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking Forward
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://timesofindia.indiatimes.com/technology/tech-news/after-calling-software-engineering-dead-anthropics-claude-code-creator-boris-cherny-says-coding-tools-like-microsoft-vs-code-apple-xcode-and-others-will-be-dead-soon/articleshow/130329516.cms" rel="noopener noreferrer"&gt;Boris Cherny&lt;/a&gt; from Anthropic, said something that stuck with me: &lt;em&gt;"There's a good chance by end of year people aren't using IDEs anymore."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The trend is clear: coding agents are moving from desktop IDEs to the cloud, into sandboxed environments with strong isolation. The future we see is one where developers walk away from their desktop IDE, speak out their intention, and a remote coding agent in the cloud turns that intention into reality.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23sss8grig0ofngyj3ed.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23sss8grig0ofngyj3ed.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You might be &lt;a href="https://x.com/pahudnet/status/2036066252393677169" rel="noopener noreferrer"&gt;driving&lt;/a&gt;, &lt;a href="https://wchung.tw/blog/four-ai-agents-planned-my-feature-while-waiting-for-uber" rel="noopener noreferrer"&gt;waiting for an Uber&lt;/a&gt;, going through airport security, on a plane with terrible WiFi, &lt;a href="https://x.com/pahudnet/status/1950966183814938951/photo/4" rel="noopener noreferrer"&gt;playing Nintendo Switch&lt;/a&gt;, or even at a BBQ. The only dev tool you need is a phone and Discord — or whatever IM you already use. You no longer need to sit in front of a desktop IDE. You are building anywhere, anytime, with the coding agent on the cloud.&lt;/p&gt;

&lt;p&gt;SKILL is just the start of that journey.&lt;/p&gt;

&lt;p&gt;It gives us a way to standardize and package an engineering workflow so it can be reused across tools and platforms. Today it's CDK contribution. Over time, the same pattern could be applied to other open source workflows.&lt;/p&gt;

&lt;p&gt;This road is just beginning.&lt;/p&gt;

&lt;p&gt;And I'd love to share everything I've learned in this journey in this series of blog posts. So stay tuned! This is going to be an amazing journey!&lt;/p&gt;

&lt;p&gt;Questions or feedback? Poke me on X &lt;a href="https://x.com/pahudnet" rel="noopener noreferrer"&gt;@pahudnet&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;cdk-contribution-skill is open source: &lt;a href="https://github.com/cdklabs/cdk-contribution-skill" rel="noopener noreferrer"&gt;github.com/cdklabs/cdk-contribution-skill&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Opinions expressed here are my own.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This blog post was made by the intent from Pahud Hsieh and co-authored by Kiro, Claude Code, Codex, and Gemini.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>aws</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
