DEV Community

Cover image for Kiro Did It: Streamlining Comments, Structure, and Logging Using Steering Docs!
Girish Bhatia
Girish Bhatia

Posted on

Kiro Did It: Streamlining Comments, Structure, and Logging Using Steering Docs!

Hi! I’m Girish, an AWS Community Builder and Cloud Tech Enthusiast, with expertise in delivering customer-focused and business-impacting cloud transformation programs of high complexity.

In my previous article, I shared how I used AWS Kiro’s vibe coding feature to build a Customer Lookup API powered by API Gateway, Lambda, DynamoDB, and AWS SAM.

In another article, I also talked about Kiro's hooks using a simple HelloWorld Python program. I explained how hooks can automatically update a README.md file whenever the Python code is modified.

Unlike traditional IDEs, Kiro is a GenAI-enabled IDE that supports both specs-driven development and vibe coding.

In addition to specs, vibe coding and Hooks, Steering Docs is another powerful feature that helps developers by streamlining Comments, Structure, and Logging in your code.

In this article, I will explore how Kiro's steering doc feature works using a simple HelloWorld Python program. I’ll show how steering docs can help guide the code generation using the product definition, structure and tech stack defined in the steering docs.

What Did I Build and Why?

I wanted to demonstrate how Kiro Steering docs are another value-added feature of this GenAI-enabled IDE. Steering docs can provide guidance when generating code by defining product, code structure and tech stack upfront.

When you add steering docs, Kiro adds three docs product.md, structure.md and tech.md. These files contain the guidelines that Kiro uses when generating the code.

I created a hello world document and added steering docs.

The goal wasn’t to build production-ready code right away, but to use a simple function to demonstrate how Kiro Steering Docs is another feature that can help developer increase the productivity and accelerate software development.

Architecture/Design

Before diving in, let’s review the diagram to understand how these components interact.

Image arch

What Are Steering Docs in Kiro IDE?

The Kiro Steering Docs are a key feature that helps Kiro understand what guidance to follow when generating code. By specifying the desired product goals, tech stack, and code structure, these guidelines allow Kiro to automatically implement best practices upfront. This ensures the resulting code consistently follows standards for comments, logging, and structure, yielding clean, safe, and maintainable code without manual intervention.

To generate the steering docs, you click on Kiro icon and then generate Steering Docs.

Image steer1

Kiro will scan your project file and will generate the Steering Docs.

Image steer2

Kiro will generate 3 files as Steering Docs:

  • Product.md
  • Structure.md
  • Tech.md

Let's see what each of these file contains:

product.md

Provides a high-level overview of what the HelloWorld service does, why it exists, and the core behavior users should expect.

tech.md

Lists the technology stack, tools, and essential commands required to run, test, and deploy the HelloWorld service.

structure.md

Describes the project’s folder layout and explains the organizational principles applied to keep the code clean and maintainable.

Review the Steering Docs

Once the Steering Docs have been generated, you would see these 3 files in your project view.

Image steerdocs

Review product.md

You’ll see that:

The product.md contains section to describe the product purpose, key features and target users.

I will update product.md to add detail about HelloWorld project. Updated file will look similar to below:

Image reviewupdateprod

Review tech.md

You’ll see that:

The tech.md contains section to describe the tech stack like what language to use, logging, run time, testing and more.

Image techdoc

Review structure.md

You’ll see that:

The structure.md contains section to describe the structure and organization of the code directory.

Image struc

With Kiro, you can further refine your steering docs as well. Once you click on 'Refine', Kiro will refine the steering docs.

Image reviewandrefine

Kiro Code Generation

Now that I have steering docs in place, I will ask Kiro to generate the hello world function. Below is the prompt, I provided:

Image codeprompt

Kiro responded by confirming that it will generate the asked code.

Image codegen

Review Generated Code

Generated code for python function.

Image codefunc

Generated code for lambda handler.

Image codelambda

Test the function

I can validate the generated function using the Python command as below:

Image testfunc

Since Steering docs in place, if I add a new function, Kiro will follow the guidance from these steering docs to follow the same pattern.

I added another function as below and as you can see, this one uses comments and logging based on the guidance noted in the steering docs.

Image addfunc

Conclusion

In this article, I demonstrated how Kiro can accelerate development by applying Steering Docs directly into the workflow, guiding code generation toward consistent structure, clear documentation, proper logging, and reliable exception handling. This shifts effort away from repetitive cleanup and review, allowing developers to focus on higher-value logic and design.

Whether you’re defining code comments, enforcing Python structure, standardizing logging practices, or ensuring proper error handling, Steering Docs act as your silent co-developer by shaping every output to match your standards.

By starting with small, practical examples and gradually expanding your Steering Docs, you can establish a development environment where every code change automatically aligns with best practices and maintains consistent quality.

Experiment with these Steering Docs and see how Kiro transforms your everyday coding experience.

Generative AI is transforming the way code is built, and tools like Kiro make the process even easier. While debugging can become more challenging as more code is generated with GenAI, Kiro’s features such as spec-driven development and design documentation generation can help address these challenges.

I believe this is just the beginning, and these tools will continue to evolve rapidly!

Thanks for reading, and I hope you found this insightful.

Watch the video here:

𝒢𝒾𝓇𝒾𝓈𝒽 ℬ𝒽𝒶𝓉𝒾𝒶
𝘈𝘞𝘚 𝘊𝘦𝘳𝘵𝘪𝘧𝘪𝘦𝘥 𝘚𝘰𝘭𝘶𝘵𝘪𝘰𝘯 𝘈𝘳𝘤𝘩𝘪𝘵𝘦𝘤𝘵
𝘈𝘞𝘚 𝘊𝘦𝘳𝘵𝘪𝘧𝘪𝘦𝘥 𝘋𝘦𝘷𝘦𝘭𝘰𝘱𝘦𝘳 𝘈𝘴𝘴𝘰𝘤𝘪𝘢𝘵𝘦
𝘈𝘞𝘚 𝘊𝘦𝘳𝘵𝘪𝘧𝘪𝘦𝘥 𝘎𝘦𝘯𝘈𝘐 𝘗𝘳𝘢𝘤𝘵𝘪𝘵𝘪𝘰𝘯𝘦𝘳
𝘈𝘞𝘚 𝘊𝘭𝘰𝘶𝘥 𝘛𝘦𝘤𝘩𝘯𝘰𝘭𝘰𝘨𝘺 𝘌𝘯𝘵𝘩𝘶𝘴𝘪𝘢𝘴𝘵

Top comments (0)