With AI tools, we tend to watch whether we are about to hit a usage limit for the last few hours, the week, or the month. We rarely look at how much each piece of work actually cost. The usage screen tells you how much you used in total, but the total does not tell you which steps the cost went to.
The other point is that time and credits do not move together. In the real log I share below, having Kiro reverse-engineer requirements from existing code took 12 minutes and 1.5 credits, while revising a design took 8 minutes and 8.6 credits. Looking at time alone, or credits alone, shows only one side of what a step costs.
While developing with Kiro, I recorded the credits used and the time taken each time I finished a step. In this article I use the log from a project I built for a Kiro hackathon to show where the cost went in pre-development validation, in creating the spec (requirements, design, and tasks), and in implementation, along with how I kept the log.
Per-step costs that the total hides
In Kiro's spec-driven workflow, you create three files in order, requirements (requirements.md), design (design.md), and tasks (tasks.md), and then move on to implementation. At any step, what Kiro produces first is not always usable as is. If you read it and want changes, you ask for a revision and have it generated again.
If you only look at the total cost, you cannot tell the first generation from the revisions. Which step the cost went to, and whether it was a first generation or a revision, changes what to look at the next time you ask Kiro for something. If the cost was in first generations, revisit how you ask. If it was in revisions, revisit the premises you share up front.
When you do work by hand, you remember where the time went. When you hand work to AI, it becomes hard to see from the outside where and how much it cost. Even with the same instruction, "create the design," credit usage varies a lot depending on how many files the AI reads and how widely it thinks. Whatever the AI looks up again or retries behind the scenes does not stay on screen. If you look back from memory after the work is done, the steps that took long or were troublesome feel like the expensive ones. In reality, some steps used a lot of credits in a short time. That is why it is worth writing the numbers down on the spot.
How I kept the log
The method is simple. Kiro's chat panel shows the credits used and the elapsed time for each prompt. Per-prompt usage was added in version 0.4 of Kiro IDE.
https://kiro.dev/changelog/ide/0-4/
Each time I finished a step, I passed those numbers and the time taken to Claude, which I use as my working partner, and had it record them. Claude kept three things separate:
- Which step it was (requirements, design, tasks, or implementation)
- Whether it was a first generation or a revision
- What was revised (for revisions)
Having the third one means that when you look back at the numbers, you can remember why the revision was needed.
Each entry in the log was a single line like these (translated from Japanese):
Revised requirements (added the fix-and-rerun feature, removed unneeded requirements), reorganized into 12 requirements. 3.5 credits, 5 min. Requirements total so far: 9.6 credits, 17 min
Implementation task 1 (monorepo foundation): 5.9 credits, 21 min (includes time stopped waiting for approval)
Each line gives the step, what was done, the credits, and the time, with a running total added at natural breaks. When the time includes waiting, I always note that too.
Note that Kiro's credit usage depends not only on how complex the instruction is but also on the model used. I normally leave Kiro's model on Auto, and the numbers in this article are basically from runs on Auto. If you compare per-step costs, also record whether you switched models along the way, so you do not misread the numbers.
The cost of validating before development
The subject of the log is spec-lantern, a project I entered in Kiroween, Kiro's hackathon. It is a tool for bringing apps that were built with AI and then left unmaintained back to a state where they can be fixed again.
In such apps, the comments written in the code can drift from what the code actually does. spec-lantern has Kiro read the code and comments to summarize the app's "intended behavior" as requirements, then create tests that check that behavior and actually run them. It then helps find where comments and behavior disagree, and goes as far as fixing them and running the tests again. I wrote about what I learned from building it in this article:
There is also a demo video of about two minutes showing it in action.
I did not start building spec-lantern right away. To check whether the core idea would hold up, I first took a small app published by another developer (writing-tracker) and had Kiro reverse-engineer requirements from it and look for disagreements between the code and its comments. Here is the log of that validation.
| File | What was done | Credits | Time |
|---|---|---|---|
requirements.md |
Reverse-engineered requirements from the existing code | 1.5 | 12 min |
requirements.md |
Rewrote them, splitting "intended behavior" from "suspected bugs" | 4.2 | 6 min |
design.md |
Generated the properties to check (20) and test skeletons | 6.1 | 8 min |
design.md |
Added properties that check comment claims through behavior | 5.2 | 6 min |
| Total | 17.0 | 32 min |
These 17 credits led to a discovery that set the direction of the project. writing-tracker has a screen that lists records by month, and its code carries a comment meaning "put the latest month first." Kiro read the code and judged that it behaved as the comment said. But when tests were written and actually run, the month at the top was not the latest one but one from several months earlier. The comment had drifted from the actual behavior, and Kiro, which only read the code, believed the comment.
From this result, it became clear that checking by reading the code is not enough, and a step that runs tests is needed. That realization became the core of spec-lantern's approach.
Trying things out small before development took just 17 credits and 32 minutes. If I had noticed the same thing after starting to build the project, I would probably have had to redo the requirements and design.
The log from creating the project's spec
After the validation, this is the log from creating spec-lantern's own spec.
| File | What was done | Credits | Time |
|---|---|---|---|
requirements.md |
First generation (8 requirements) | 6.1 | 12 min |
requirements.md |
Revision (added a missing feature, removed unneeded requirements, now 12) | 3.5 | 5 min |
design.md |
First generation (a 634-line design document) | 5.5 | 7 min |
design.md |
Revision (narrowed the scope, such as running only locally) | 8.6 | 8 min |
tasks.md |
First generation (21 items) | 3.5 | 5 min |
tasks.md |
Revision (reordered what to build first, among other changes) | 4.3 | 8 min |
| Total | 31.5 | 45 min |
What the revisions were about
For each revision row, I also recorded what was changed. Looking at them, none were really Kiro's mistakes. Each one added a premise that I had not shared at the start.
The first generation of requirements was missing an important feature. When spec-lantern finds a disagreement between a comment and the actual behavior, it applies a fix, runs the tests again, and checks that the failing tests now pass. The first requirements did not include this "fix and rerun" feature.
On the other hand, a development detail unrelated to the project had made it into the requirements. The repository I was developing in had a folder holding other people's apps that I had brought in as test subjects for spec-lantern, and Kiro wrote how to handle the folders under it as requirements the project must meet. From Kiro's point of view, it is hard to tell whether something in the repository is part of the project or just a workspace for development. Because I had not said up front what was the project and what was the workspace, both got mixed into the requirements.
The first generation of the design included a setup that ran containers in the cloud as the execution environment. But spec-lantern is a tool used inside Kiro, and the code of the app being checked sits on the user's own machine. Even though it runs other developers' code, running it in a local container isolated from the outside is enough, and there is no reason to take it to the cloud. In the revision, I narrowed the execution environment to local containers only.
The first generation of tasks had two problems: how things would be built, and in what order.
One was that it tried to build in code even the work meant for AI. In spec-lantern, I had split the roles so that Kiro itself reads the code and comments and summarizes them as requirements, while the program handles running tests and checking results. But the first tasks included an item to implement the requirement-summarizing step as a program.
The other was the order. In the first task list, parts were built one by one, and the whole thing was run end to end only at the very end. That way, you cannot tell whether the whole works until everything is built. In the revision, I changed the order to first get a result end to end with a small app, even a rough one, and then build out the parts.
All three were premises that existed only in my head: the scope of the project, the line between what AI does and what code does, and the order of building. Because I recorded what each revision was about, I could later explain what the revision costs came from.
What the log showed
Looking back at the spec log by step, split into first generations and revisions, three things stood out.
First, revisions took about half of the total. First generations across the three steps came to 15.1 credits and 24 minutes, and revisions to 16.4 credits and 21 minutes. Half the cost of creating the spec went into having Kiro fix what it first produced.
Second, revision cost varied by step. Revising the requirements cost fewer credits than the first generation, while revising the design cost more. Since the design scope was narrowed a lot, a likely reason is that many parts of the design document were touched.
Third, the cost of creating the spec was about the same as one or two implementation tasks. There were 21 implementation tasks in total, and some used around 20 credits each. The 31.5 credits for the whole spec equal one or two such tasks. Even a change of direction like narrowing the design scope cost only 8.6 credits at the spec stage. Making the same change during implementation might have cost more, adding the work of throwing away code and rebuilding it.
Implementation steps that used the most credits
I kept logging the same way after the spec was done and implementation began. However, some work, such as redoing sessions that stopped partway, could not be logged in credits, so I do not have a total for all of implementation. Here I list only the steps from the log that used the most credits.
| What was done | Credits | Time |
|---|---|---|
| Fix the test pass/fail judgment and make counterexamples easier to read | 30.0 | Not comparable (includes waiting) |
| Logic to verify the outputs | 21.3 | 38 min |
| Mechanism to apply a fix and rerun | 21.1 | 30 min |
| Switch the test targets from mocks to the real components | 19.9 | 29 min |
| Export and deploy the public demo | 17.0 | 21 min |
| Improve the execution environment (persisting the cache, and so on) | 16.1 | 1 h 9 min |
Lined up, it is not only steps that build new features that stand out, but also steps that fix something already built. The most expensive was fixing the test pass/fail judgment. Before starting the fix, Kiro deliberately created small tests that fail in four different ways to see how the test tool reports failures. So the credits went more into investigating what was happening than into the amount of fixing itself. The fourth row is the switch of the test targets from mocks to the real components. At first, the tests used mocks that imitated the checked app's logic, so they could not confirm whether the real app behaved the same way. Just as revisions took half of the spec cost, rework took a sizable cost in implementation too.
On the other hand, some steps were cheap. Adding property-based tests (PBT) to parts that had no tests at all took 4.1 credits and 9 minutes, and 4.9 credits and 5 minutes. Even work decided on after the fact can be cheap when its scope is clear.
Waiting time hidden in elapsed time
Time needs more care than credits. The elapsed time shown in Kiro includes time spent stopped while waiting for my approval. One implementation task is logged as 21 minutes, but that includes time stopped waiting for approval. The fix to the pass/fail judgment, which used the most credits in the table above, showed an elapsed time of over 11 hours. That number also includes waiting, not just working, so I marked it as not comparable in the table.
When you log time, noting whether it includes waiting keeps you from misreading the numbers later.
Using the log for the next project
With per-step logs, it becomes easier to estimate the next similar project. A rule of thumb like "around 30 credits for the spec, half of it for revisions" gives you a basis for allocating your usage and planning your time.
Knowing what the revisions were about also gives you clues for changing how you ask the first time. From this log, it looks like sharing three things before having Kiro create the spec would fold many of the revisions into the first generation: the scope of the project (where and on whose machine the tool runs), the line between what AI does and what code does, and the flow you want to get working end to end first.
Once work handed to AI is done, only the total remains. Just writing one line of numbers each time you finish a step lets you see where the cost went and what to change.
This is Day 3 of "A Year with AI," a 25-day advent calendar I am writing on my own. See Day 0 for what the series covers. The original Japanese version is on Zenn.
Top comments (2)
Really useful breakdown! Tracking costs at each stage instead of looking only at total AI usage is a smart approach. I especially like the point about revisions consuming nearly half the spec cost better upfront context can save both credits and development time.
The month sorting bug proves reading code alone isn't enough.