Dev.to AI 🤖 Ai 👁 2 📖 6 min read

What an AI-built feature actually costs — and the open-source tool I built to find out

An education platform I ship for students was not built by me, line by line. It was built by AI agents. In mid-November I ran a two-week hackathon (18 November – 1 December 2026) to see how far that loop would go. The s

What an AI-built feature actually costs — and the open-source tool I built to find out

An education platform I ship for students was not built by me, line by line. It was built by AI agents.

In mid-November I ran a two-week hackathon (18 November – 1 December 2026) to see how far that loop would go. The speed was real. The cost story was not.

That work ran on an education port of Ukaf. Ukaf is the commercial product: an agentic harness with DORA, measure, improve, and context. Agents write the code, open pull requests, pass CI, and ship to production.

ukaf-cli is the free, lightweight, open-source slice of that. It does FinOps only — cost per feature — not the full harness.

A two-week hackathon on an education platform

46 merges, then a simple question I could not answer

In those two weeks:

  • 46 merges to main (about 25 a week)
  • 13 minutes median from pull request open to merge
  • 2.2% change-failure rate (one failure, restored in 2 hours 40 minutes)
  • about 45 minutes from idea to production on clean PRs

DORA from the two-week window

I could point at a board and say what shipped. I could not answer, cleanly, what an AI-built feature actually cost, or where the rest of the bill went.

That question is what ukaf-cli is for.

What does an AI-built feature really cost?

I exported a month of Cursor usage (4 November – 3 December 2026) and tied what I could to the pull requests that shipped.

  • 44 features had cost I could attribute directly to their PR: $1,101 at Cursor list price, or $25.03 per feature. That average is for attributed features only. It is not the whole bill divided by 44. (46 changes merged; two could not be tied to usage rows.)
  • On the invoice those same features were about $0.66 each. The included quota absorbed the rest.
  • The full export was $2,321.11 at list price and $141.27 billed.

List price versus billed cost

The gap between list and billed is not "features were cheap." It is unattributed usage and overhead that no pull request can claim. Two things follow from that:

  1. Billed hides the real cost. The day your included pool runs out, list price is your price.
  2. Do not divide the whole bill by the number of features. $2,321.11 / 44 would overstate feature cost and hide overhead. Keep them apart.

Getting even this far took hours of spreadsheets, and the categories overlapped. The same dollar could show up in more than one bucket. I wanted a story that added up, and recommendations that named an action, not a vibe.

What ukaf-cli does — and what it does not

Ukaf, the commercial product, is the broader system: the agentic harness, plus DORA, measure, improve, and context. The education port of Ukaf is what powered the hackathon on that education platform.

ukaf-cli takes one slice and makes it free and small. It reads a Cursor usage CSV and the pull requests that went with it, and tells the month as one story: what the agents spent, and what actually shipped.

The FinOps rule is simple. Every feature is five stages in a row. The stages add up to the feature. The features, plus an explicit overhead bucket, add up to the export. If a part does not meet the whole, a reconciliation check fails the run.

Stage Clock
Planning / spec Issue opened → agent launch
Development Agent launch → first push
Testing / CI First push → first green check (or the last check, if it never went green)
Deploy + acceptance That check → production deploy (or the merge, if there is no deploy)
Fixes Acceptance → restore, revert, or a later commit

A milestone that arrives out of order becomes a zero-length stage. It does not start a second, overlapping interval. Rework before the first green check stays inside testing. The fixes stage is only what happens after acceptance.

There is no second clock. DORA lead time is testing plus deploy. Time to restore is the fixes stage. You will not see "launch → merge" sitting next to "PR open → merge" as if they were independent.

The five additive stages

List price (the rate card, before the included pool) and billed cost (what the CSV charged) are both in the story. Included and Free rows bill as zero and still have a list price, so you can see what the pool absorbed.

Each merged PR also gets a complexity tier — S, M, L, or XL — from hand-written SLOC and file count. Lockfiles and generated paths do not count. Cost by tier is a partition of feature spend; overhead is a separate row.

Recommendations are rules only. Each one names the action, the evidence from that window, and a monthly estimate in dollars or minutes. They are ranked by billed saving, then list-price saving, then minutes. Nothing in the report says "consider optimizing your workflow."

On my own data, the sharpest lesson was a toggle, not a model. One costly day in the hackathon was $64.98. I was sure the expensive model was the cause. The spike came from High + Fast. Turning Fast off is the clearest saving in the window.

A $64.98 day driven by High + Fast

Install and quickstart

The repo is public, merged to main, with CI green. Clone it and install from a checkout:

git clone https://github.com/UriBer/ukaf-cli.git
cd ukaf-cli
pip install -e ".[dev]"

Run the bundled synthetic example first. It has the same columns as a Cursor usage export and none of anyone's real rows. Do not commit a real export.

ukaf report \
  --usage examples/usage.csv \
  --github-fixture examples/github.json \
  --out examples \
  --lang en

That writes report.html, report.json, and report.md. Hebrew labels and right-to-left layout:

ukaf report \
  --usage examples/usage.csv \
  --github-fixture examples/github.json \
  --out /tmp/ukaf-he \
  --lang he

Against live GitHub data, pass a token and one or more repos:

export GITHUB_TOKEN=...   # or GH_TOKEN
ukaf report \
  --usage ~/Downloads/usage.csv \
  --repo owner/name \
  --repo owner/other \
  --out ./out

Put the cloud agent id in the pull request body (Agent: bc-...) so the run attaches to that feature. An agent id with no pull request, and every row with no agent id, stays in overhead. ukaf will not guess editor traffic onto whichever PR happens to be open.

What the tool looks like

The screenshot below is ukaf-cli 0.1.0 run on the synthetic examples/ fixture that ships in the repo — not the hackathon export. The shape is what you should expect: a total that splits into features plus overhead, a reconciliation that has to pass, and a recommendation that comes with a dollar figure.

ukaf-cli report on the bundled synthetic fixture

What I would do again — and what I would not

  • Measure list price and billed cost side by side. The included pool makes the invoice look small until the pool is gone.
  • Attribute features only when the PR can claim the run. Everything else is overhead. If you spread overhead across features, you will optimize the wrong thing.
  • Believe the usage export, not the model picker you think you used. A $64.98 day that looks like a model problem may be a Fast toggle.
  • Keep the clocks additive. Lead time is testing plus deploy. Fixes start after acceptance. If two intervals overlap, the total will lie.
  • Demand an action, evidence, and a number from any cost recommendation, including the ones you write for yourself.
  • Use the right tool for the job. Ukaf is the commercial harness (agents, DORA, measure, improve, context). ukaf-cli is the free FinOps slice — cost per feature — if you already have a usage export and pull requests.

Star it, run it, sponsor the maintenance

ukaf-cli is MIT-licensed. Funding is for maintenance, not a paid tier. The Sponsor button is wired through .github/FUNDING.yml as github: UriBer.

If this problem is yours too:

ukaf 0.1.0 · sponsor the work: https://github.com/sponsors/UriBer

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.