{"slug": "what-an-ai-built-feature-actually-costs-and-the-open-source-tool-i-built-to-find", "title": "What an AI-built feature actually costs — and the open-source tool I built to find out", "summary": "A developer built ukaf-cli, an open-source FinOps tool that reads a Cursor usage CSV alongside the pull requests it produced to attribute AI-agent spend to individual features across five stages — planning, development, testing, deploy and fixes — plus an explicit overhead bucket, with a reconciliation check that fails the run if the parts don't sum to the export. On a two-week hackathon building an education platform, the developer found the sharpest cost driver was a toggle rather than a model: a $64.98 spike traced to High + Fast mode, not the expensive model, making turning Fast off the clearest saving in the window.", "body_md": "An education platform I ship for students was not built by me, line by line. It was built by AI agents.\n\nIn 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.\n\nThat 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.\n\n**[ukaf-cli](https://github.com/UriBer/ukaf-cli)** is the free, lightweight, open-source slice of that. It does FinOps only — cost per feature — not the full harness.\n\nIn those two weeks:\n\nI 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.\n\nThat question is what ukaf-cli is for.\n\nI exported a month of Cursor usage (4 November – 3 December 2026) and tied what I could to the pull requests that shipped.\n\nThe 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:\n\nGetting 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.\n\nUkaf, 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.\n\nukaf-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.*\n\nThe 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.\n\n| Stage | Clock | \n|---|---|\n| Planning / spec | Issue opened → agent launch | \n| Development | Agent launch → first push | \n| Testing / CI | First push → first green check (or the last check, if it never went green) | \n| Deploy + acceptance | That check → production deploy (or the merge, if there is no deploy) | \n| Fixes | Acceptance → restore, revert, or a later commit | \n\nA 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.\n\nThere 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.\n\nList 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.\n\nEach 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.\n\nRecommendations 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.\"\n\nOn 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.\n\nThe repo is public, merged to `main`, with CI green. Clone it and install from a checkout:\n\n```\ngit clone https://github.com/UriBer/ukaf-cli.git\ncd ukaf-cli\npip install -e \".[dev]\"\n```\n\nRun 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.\n\n```\nukaf report \\\n  --usage examples/usage.csv \\\n  --github-fixture examples/github.json \\\n  --out examples \\\n  --lang en\n```\n\nThat writes `report.html`, `report.json`, and `report.md`. Hebrew labels and right-to-left layout:\n\n```\nukaf report \\\n  --usage examples/usage.csv \\\n  --github-fixture examples/github.json \\\n  --out /tmp/ukaf-he \\\n  --lang he\n```\n\nAgainst live GitHub data, pass a token and one or more repos:\n\n```\nexport GITHUB_TOKEN=...   # or GH_TOKEN\nukaf report \\\n  --usage ~/Downloads/usage.csv \\\n  --repo owner/name \\\n  --repo owner/other \\\n  --out ./out\n```\n\nPut 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.\n\nThe 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.\n\n[ukaf-cli](https://github.com/UriBer/ukaf-cli) is MIT-licensed. Funding is for maintenance, not a paid tier. The Sponsor button is wired through [`.github/FUNDING.yml`](https://github.com/UriBer/ukaf-cli/blob/main/.github/FUNDING.yml) as `github: UriBer`.\n\nIf this problem is yours too:\n\n`ukaf 0.1.0 · sponsor the work: https://github.com/sponsors/UriBer`", "url": "https://wpnews.pro/news/what-an-ai-built-feature-actually-costs-and-the-open-source-tool-i-built-to-find", "canonical_source": "https://dev.to/uri_berman/what-an-ai-built-feature-actually-costs-and-the-open-source-tool-i-built-to-find-out-40ad", "published_at": "2026-12-03 23:38:28+00:00", "updated_at": "2026-12-03 23:45:35.902770+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "mlops"], "entities": ["ukaf-cli", "Ukaf", "Cursor", "GitHub", "UriBer"], "also_reported_by": [], "takeaway": "Attribute agent spend per feature by reconciling a Cursor usage CSV against merged PRs across five clock stages plus an overhead bucket, and check the toggle before blaming the model — a $64.98 spike came from High + Fast, not the expensive model.", "recommendation": {"advice": "Reconcile AI coding spend against shipped pull requests with an explicit overhead bucket, and test whether Fast mode rather than the model is driving cost spikes before switching models.", "playbook": "llm-cost", "playbook_url": "https://wpnews.pro/playbooks/llm-cost"}, "alternates": {"html": "https://wpnews.pro/news/what-an-ai-built-feature-actually-costs-and-the-open-source-tool-i-built-to-find", "markdown": "https://wpnews.pro/news/what-an-ai-built-feature-actually-costs-and-the-open-source-tool-i-built-to-find.md", "text": "https://wpnews.pro/news/what-an-ai-built-feature-actually-costs-and-the-open-source-tool-i-built-to-find.txt", "jsonld": "https://wpnews.pro/news/what-an-ai-built-feature-actually-costs-and-the-open-source-tool-i-built-to-find.jsonld"}}