A project estimator on IntentSharp
An engineering firm estimates its projects with it: seven model-calling operations take a job from evidence extraction to a reviewer's verdict. A coding agent built it on IntentSharp 1.0.0-rc.3, and its developers then ported it to 1.0.
How it is built
What the application's source shows. Its code calls IntentSharp; what each operation asks, returns and may spend is in files.
- One call, one set of limits. Its seven model-calling operations, from evidence extraction to the reviewer's verdict, run through one call with one set of limits: a timeout, attempts, model calls and output tokens.
- Behavior in files. What it does lives in a bundle of definition files: the intents, the reviewer's profile, delivery and execution policies, a task catalog and four review checklists.
- Changed while it ran. When the reviewer's stance had to change, the file changed, three times, on the running service, with no restart.
- Tested with no key. It has 72 tests, 22 of them on scripted replies with no key.
- Facts apart from decisions. It follows the evidence ledger pattern: the facts are immutable documents, and the decisions sit beside them.
Before and after, measured
The developers ported the application's intelligence layer to 1.0 and counted its lines. The conventional column is their estimate of the C# it would take to write the same guarantees by hand; the IntentSharp column is measured from the ported code and files.
| Concern | Conventional C#, estimated lines | IntentSharp 1.0 and files, measured lines | Where it lives now |
|---|---|---|---|
| OpenAI transport: structured output, retry with backoff, timeouts, a size cap, error classes | 250 to 350 | 0 | The library |
| JSON schema generation from the result types | 150 to 250 | 0 | The library |
| The prompt envelope: intent, input, requirements, prior findings | 80 to 120 | 0 | The library |
| The verification loop: parsing, rules, validators, attempt and call ceilings, a time budget | 200 to 280 | 0 | The library |
| Instruction text for 7 intents | About 250 lines of C# strings | 0 of C#, 248 lines of YAML | The intent files |
| Output vocabularies and bounds | About 60 lines of hand checks | 0 of C#, in the YAML rules | The intent files |
| Provider, endpoint and roles | About 20 | 12, plus a 13-line JSON file | The provider file |
| An offline, scripted test provider | About 60 | 0 | The library |
| Context integrity checks: citations, known ids, traceability, a numeric floor | About 60 | 113 | The application, deliberately |
| A session per operation: budgets, receipts, model and profile binding | About 90 | 103 | The application |
| Stage orchestration | About 60 | 59 | The application |
| Definition capture, hashing, provenance and hot reload | 124 | 124 | The application, in both |
| Knowledge-file validation | 128 | 128 | The application, in both |
| Model discovery | 50 | 50 | The application |
| Services and host wiring, with unchanged logic | About 620 | 626 | The application |
| C# in the AI path, in all | About 2,200 to 2,520 | 1,215 | |
| Definition files that reload while the service runs | 0 | 261 lines in a 20-file bundle |
In all: about 2,200 to 2,520 lines of C# in the AI path by the developers' estimate, against 1,215 lines measured on IntentSharp 1.0; and no definition files that reload, against 261 lines of them in a 20-file bundle. The estimate is the developers' own, for this application; it is not a measurement.
What changed in practice
The same application, written the conventional way and on IntentSharp 1.0, as its developers compared them.
- Changing an instruction, a vocabulary or a bound. By hand it is code, a build, tests and a redeploy. Now it is an edit of the YAML and a new version number: the next operation uses it, and the snapshots are kept.
- Whether a file edit can weaken a safety check. It cannot: the mandatory validators are enforced in code.
- A rule violation fed back to the model. By hand, only if you build it. On IntentSharp it is built in.
- Transport, retry and schema bugs. By hand they are yours; now they are the library's.
- What it costs. A commercial dependency, and a paid license in production.
- Behavior on scripted replies. Identical to the rc.3 build on the golden run of six frozen cases.
Read next
When coding agents build your software
One file per operation, tests with no key, facts that do not change, and a budget per step.
Evidence ledger
Facts written once, later answers as records of their own, and which component may change what.
Long chains of calls
A budget on each call, a deadline on the whole, checkpoints, and what each step cost.
More problems and their answers: Solutions.
Make your first checked call.
dotnet add package IntentSharp