How to use a coding agent in an unfamiliar code...

How to use a coding agent in an unfamiliar codebase: Have the agent build evidence you can check before it writes code

A reference deck, with figures, introducing the kiro.dev blog post "How to use a coding agent in an unfamiliar codebase" (November 25, 2026), based on public sources as of November 27, 2026. In an unfamiliar codebase, have the agent build evidence you can check before it writes code (a code-path map, characterization tests and a change boundary), then decide how much to delegate by that evidence and by how far a wrong change can spread. Using a ticket that emails the customer when an invoice payment fails, the deck covers how to build and check the evidence, what to keep and where it goes in Kiro (Hooks, Skills, Steering and memory), and how to try the method on one ticket.

Riku INADA PRO

November 27, 2026

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

11 slides
  1. From the Kiro blog How to use a coding agent

    in an unfamiliar codebase Have the agent build evidence you can check before it writes code What you learn: have the agent trace the code path into tests, approve a change boundary, and decide how much to delegate As of November 27, 2026 Amazon Web Services Japan © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1
  2. 1 Evidence first The agent searches fast but does not

    know which details matter, so have it build evidence you can check before it writes code Over 200 files Evidence the agent built A new ticket © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2
  3. 1 Evidence first Summary: the evidence to build before any

    code Have the agent build evidence, then decide how much to delegate by evidence and reach 2 Learn the code The agent builds A code-path map The path your ticket touches, with a cited file for each claim 3 Set the limits Agent drafts, developer approves The change boundary What may change, what must stay the same, how it is checked Characterization tests Tests that capture what the code does today, odd parts included Why it is needed The agent searches fast but does not know which details matter 4 Delegate the change Developer decides, agent builds How much to delegate Per task, by the evidence and how far a mistake can spread The change The agent makes it; on risky changes, the code owner decides on the plan Why it is needed Tests check behavior; they do not limit which code changes Why it is needed More tests do not shrink how far a wrong change can spread At every stage, the developer reviews what the agent built before moving on © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 3
  4. 2 Learn the code Check the code path the agent

    described against a behavior you already know and against tests, before you change anything Email delivery Event ingestion © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 4
  5. 2 Learn the code The code-path map and characterization tests

    When tests disagree with the map, fix the map or take the rule to the code owner Ticket: email the customer when an invoice payment fails (a 3-year-old repository with over 200 files) Steps 2 and 3 return a map like this (invoice.paid, which already sends an email) Event ingestion The agent does not know which details matter 1 2 3 Ask the agent which packages own billing events and notifications, and where their entry points are; have it cite a file for each claim, and propose no changes Billing-event consumer Notification pipeline Have it trace invoice.paid, which already sends an email, then check the map against a retry you know (a payment that succeeds on the second attempt) Confirmed: the preference check runs before template selection Ask how invoice.payment_failed differs from invoice.paid, with what it confirmed apart from what it inferred Email delivery © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. Open the cited file to check each claim Inferred: retried events are deduped by the billing event ID 4 Have it add characterization tests Capture what the code does today and run the tests without changing non-test code; report differences from the map. Not in the post: stub external calls, such as email sending, in these tests Each difference has one of two causes A mistake in the map → fix the map before going on An undocumented rule Ask the code owner (a person): is it a bug, or behavior that someone depends on? Record the answer in Steering (the files that tell Kiro your rules) 5
  6. 3 Set the limits Every test can stay green while

    code outside the scope changes, so have the agent draft what changes and what stays, and approve it before any code Goal Change Preserve Validate © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 6
  7. 3 Set the limits The change boundary Approve the boundary

    before any code; it says not to modify tests just to make code pass Tests check behavior; they do not limit scope Every test stays green What can still change Type names Interface shapes Files the boundary does not name © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. Example boundary: the agent drafts, you approve Goal - Send an email for invoice.payment_failed Change - Reuse the consumer and notification pipeline - Add the minimum template and routing code - Add tests: preferences, retries, delivery records - List the files that may change (not in the post) Preserve - Keep the public event and notification interfaces - Keep retry behavior for every billing event - Keep package boundaries and dependency direction Validate - Run affected tests, type checks, and linting - Do not modify existing tests to make code pass - Report out-of-scope changes before making them - Change a test only after approval (not in the post) For bugs, use a Bugfix Spec A Bugfix Spec drafts this boundary for your review: Kiro splits behavior into three, with tests for each Current (the defect) Expected Unchanged Why the existing-test rule: an agent aiming for a green suite will rewrite an assertion that encoded intended behavior. Not in the post: when a test must change, it reports first; the developer decides and reviews the test diff 7
  8. 4 Delegate the change Decide how much to delegate by

    the evidence you built and how far a wrong change can spread; the part ends with what to keep and a first ticket to try Evidence © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. Reach 8
  9. 4 Delegate the change Autonomy set by evidence and reach

    Delegate by evidence and reach; supervise public API and similar changes throughout Evidence What you built to check the agent against: the map, the characterization tests, and a failing reproduction for a bug. When it is thin, add a test before implementation; ask the code owner whether a recorded behavior is intended. Reach How far a wrong change can spread; more tests do not shrink it. A change to a private template resolver stays local; a change to a shared event schema or a migration reaches callers you did not edit and stored data. Evidence to build first Reach of a wrong change How to run the agent Task Feature following an existing pattern Closest working example and relevant tests Contained if the extension point holds Bug in unfamiliar code Failing test through a stable interface Depends on whether the path is shared Behavior-preserving refactor Tests at the module boundary Contained behind a private interface Autonomous in small, tested steps Dependency upgrade Call-site inventory and migration notes Repository-wide Autonomous by package; the developer reviews changed defaults Public API, migration, security, concurrency Traced callers and an owner-reviewed design Wide, reaching callers and stored data Rows that run autonomously still get the developer's review of what the agent built © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. Autonomous once the developer approves the boundary Supervised until the cause is confirmed Supervised throughout; the code owner reads the plan and decides Developer Code owner Agent 9
  10. 4 Delegate the change Keep the evidence, then try the

    method on one ticket Keep the tests that protect behavior, have a Hook run them, and start with one ticket Keeping 1: sort the tests and Steering Keep Characterization tests that protect intended behavior Keep Steering that records the owner's answers (repository rules) Drop before the pull request Tests written only to check the map (exploratory tests) Delete after the change ships Steering written only for this ticket © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. Keeping 2: where each piece goes in Kiro Hook A Hook you set up can run the affected tests each time the agent saves a file that matches its pattern; use a command that passes locally and in CI Trying: one way on a first ticket 1 Pick a ticket in an unfamiliar module that has tests you can run, and scope the agent to that module 2 Before you ask for any code, have the agent trace the path with a file cited per claim; check the answer on one behavior you already understand 3 Turn the assumptions the change depends on into characterization tests 4 Then approve a boundary that names the files, decide how much to delegate, and check the diff against the boundary Skill Packages instructions and templates: the trace prompts and the boundary template Steering or AGENTS.md Files that give the agent your conventions Memory Notes Kiro keeps across sessions once you turn memory on (it is off by default), for small discoveries such as tests that pass only after a local service starts 10
  11. Sources This deck is for information only. Its descriptions of

    Kiro features come from public sources as of November 27, 2026. The summary's figure is based on the three stages of Figure 1 in the blog post, redrawn for this deck. Kiro, blog, "How to use a coding agent in an unfamiliar codebase", November 25, 2026 https://kiro.dev/blog/unfamiliar-codebase/ Kiro, docs, "Steering", read November 27, 2026 https://kiro.dev/docs/steering/ Kiro, docs, "Bugfix Specs", updated August 4, 2026 https://kiro.dev/docs/specs/bugfix-specs/ Kiro, docs, "Hooks", updated November 15, 2026 https://kiro.dev/docs/hooks/ Kiro, docs, "Agent Skills", updated November 18, 2026 https://kiro.dev/docs/skills/ Kiro, docs, "Memory", read November 27, 2026 https://kiro.dev/docs/memory/ Kiro, topics, "Build your codebase for agents", read November 27, 2026 https://kiro.dev/topics/frontier-engineering/build-for-agents/ © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. 11

More Decks by Riku INADA

Other Decks in Technology