In my experience, developers struggle to describe the operating expectations of their systems. Once an application becomes important enough, someone—a customer, an architect, another team—will ask about its service-level objectives.

How quickly should it respond? How much traffic should it support? How available should it be? What should it cost?

These are reasonable questions. But by the time someone asks them, many of the decisions that determine the answers have already been made. The application has a particular architecture, uses particular services, and depends on assumptions scattered across code and infrastructure.

Answering the questions is difficult. Exploring different answers can mean rebuilding the system.

I want MelodyDB to make those expectations part of the design from the beginning. More importantly, I want teams to be able to change them and understand the consequences.

An SLO—short for service-level objective—is a heuristic input to that process. It helps express what matters and compare alternatives. It is not a proof that every request will finish within a particular time, or that a workload will behave exactly as predicted.

Cost belongs in this discussion too. It is an operating objective alongside latency, throughput, and availability.

A team might want lower latency, more capacity, and a smaller bill. Those goals can conflict. The useful answer explains the tradeoffs: what each option is likely to deliver, what it costs, and which assumptions matter.

Why intent matters

For this exploration to be practical, the objectives have to be declared as intent.

If the developer chooses the implementation, the developer also becomes responsible for changing it when the objectives change. A different latency target can become a project to replace a storage engine, introduce another service, or rearrange the application.

Trying several alternatives then becomes prohibitively expensive. The team has to implement each possibility before it can properly evaluate it.

MelodyDB’s approach is to give the compiler the application’s meaning and its operating objectives, leaving room to derive the implementation. Where several implementations preserve that meaning, the compiler can compare them against different goals.

Score already has a spelling for an observed latency objective. For example, a declaration header can include:

fn find() -> Answer <= 100ms

The <= 100ms clause states an objective. It is not a timeout and does not, by itself, authorize cancelling work or shedding requests.

Those objectives can change the system the compiler builds.

A search feature with a modest workload and a lenient latency objective might be served adequately by the existing storage engine. A tighter objective—or the same objective at much higher traffic—might justify a specialized search engine. The specialized engine should follow from the requirements, rather than being a choice the developer must make up front.

Topology is another choice. A small application might run comfortably in one process on one machine. Different throughput, availability, or geographic latency objectives could justify partitioning, replication, or placing computation closer to users.

These decisions depend on the objectives together. A tighter latency target may require more memory or more machines. A lower cost objective may favor sharing resources and accepting slower responses. An availability objective may require spare capacity that ordinary traffic does not use.

The compiler’s freedom is constrained by the application’s meaning. It cannot silently weaken consistency or return different answers to satisfy a latency target. It should explain the available tradeoffs and identify combinations it predicts cannot be met.

Changing an objective should not require rewriting the application’s implementation. Changing what the application means is a separate decision, and the system should make that distinction visible.

Build predicts; Release observes

The declared objectives have two uses.

At melody build, they guide the design. The compiler can reason about the application’s structure, expected workload, and selected target to estimate the consequences of different choices.

At melody release, they guide observation and operation. Actual traffic, latency, resource use, and spending provide evidence about how well those choices are working.

Neither side supplies perfect knowledge. Build-time estimates depend on workload assumptions and cost models. Runtime observations describe the traffic and conditions actually encountered. A quiet week does not establish what will happen during a surge.

The goal is to connect those two views: predict, measure, explain the differences, and improve the next decision. Relative comparisons can be useful even when absolute estimates have substantial uncertainty.

An SLO miss is evidence to investigate. Its frequency, severity, and context matter; it is not automatically a failed release or a reason to refuse work.

Features have operating costs

This also lets teams explore changes to application intent.

People understand that adding a feature costs something to build. They often have much less visibility into what it will cost to operate.

Suppose a team wants to add an agent that summarizes every uploaded document. Its cost depends on document sizes, arrival rates, model usage, retries, and how quickly summaries must become available. Those consequences belong in the feature discussion.

The team should be able to compare immediate summaries with deferred summaries, or automatic processing with processing requested by a user. Each option changes the declared experience. MelodyDB should help quantify the likely cost and performance consequences before the team commits to an implementation.

The same applies to search, analytics, or another background workflow. A feature adds work to the system and may change the engine or topology needed to meet the other objectives.

That makes the operating cost of a feature something the team can reason about while designing it.

A spending budget is also a capacity limit

Metered services make this especially important. An application can remain available while accumulating a bill its owner cannot sustain. Autoscaling may relieve compute pressure while increasing financial pressure.

This connects directly to the admission-control design. Overload can mean exhausting a spending budget, not just exhausting memory or CPU.

Consider an application with optional agentic capabilities. It has an LLM spending objective and a separate hard limit. As its spending trajectory becomes unsustainable, admission policy could defer optional work or restrict expensive operations. When it cannot safely admit another call within the limit, the application needs a defined response.

The application might leave ordinary editing and search available while disabling automatic summaries. It might offer a simpler operation or explain that the agentic feature is temporarily unavailable.

Score’s existing priority and degradation vocabulary expresses part of that intent:

degrade {
  thrift: { shed: Low }
  survival: { shed: Normal }
}

Functions declare their priority; these steps describe which bands may be refused. Connecting monetary signals to those steps is part of the cost-control design, not something this block accomplishes by itself.

A cost objective guides optimization. A hard spending limit constrains admission. The application defines what users experience when work cannot be admitted.

Enforcing that limit also requires accounting for work already authorized, including calls still in flight or whose outcome is uncertain. Stopping new calls does not erase charges already incurred.

The compiler should not silently remove a feature or substitute a cheaper model that changes the answers. Those choices belong in the application’s declared behavior.

What I want is for a team to explore a different budget, workload, feature set, or latency objective—and see a useful estimate of what would change. Declaring those goals as intent gives the compiler room to do that work, while execution supplies the evidence needed to make the estimates better.