Task statement 2.1 · Applications and integration
2.1 · Understanding Requirements
In Shelfwise, the course example, the shop owners asked for one outcome: staff answer a stock question while the customer is still at the counter, for no more than $0.01 an answer. That wish had to become requirements the team could test, and several of them depend on limits the Claude platform sets, not on Shelfwise's own code.
share
The tempting move is to go from the business goal straight to a demo. The demo answers ten questions correctly, which checks what the system does, but nobody has written down how many questions arrive at the Saturday peak, how fast an answer must come back, or what it may cost. Those gaps surface after launch as rate-limit errors, slow replies or a bill nobody approved, because the platform's limits were never compared with a number.
Start hereThree terms this section adds
- business requirement
- Why the organisation wants the system, in its own terms: an outcome, a cost or a deadline. It names no feature.
- functional requirement
- A behaviour the system must perform, written so that a test can pass or fail it: given this input, the system does that.
- infrastructure requirement
- A condition the running system must meet, such as latency, throughput, availability, cost or where data is processed. It is one kind of non-functional requirement, a requirement on how the system runs rather than what it does.
KnowledgeFrom a business goal to requirements you can test
Requirements form a chain, and each link is derived from the one above it. A business requirement says why the system exists. The solution architecture then picks a shape that can meet it, and for Shelfwise that is one agent calling the Claude API, with an MCP tool for the stock feed. Functional requirements say what that shape must do, such as stating the stock count with the feed's timestamp and saying "no record" instead of guessing. Infrastructure requirements say how fast, how much, how reliably, at what cost and where, such as a complete answer within 8 seconds for 95% of questions at the Saturday peak. ISO/IEC/IEEE 29148, the international standard for requirements engineering, defines what makes a good requirement, and the property that matters most in practice is that someone can verify it. "Answers should be quick" fails that test, because no measurement can pass or fail it.
The solution architecture sits between the two kinds of requirement and constrains both. Choosing the first-party Claude API fixes which models, features and regions are on offer, and those limits return as hard constraints that every infrastructure requirement must respect. The architecture shapes functional requirements too. The owners wanted answers "from the stock feed", but the feed lists 40,000 products and changes hourly, far more than one request should carry, so the functional requirement became "look up the named product through the stock tool".
Interactive · how one business goal becomes requirements the team can test
Step through the chain from the owners' goal to the numbers the team tests.
1 · Business: why the shops want Shelfwise, in their own terms. An answer while the customer waits, at no more than $0.01. No feature is named yet.
2 · Architecture: the shape chosen to meet the goal. Naming the first-party Claude API also brings its limits: rate limits per model, the context window, inference regions and the spend cap.
3 · Functional: what the system must do, as behaviour a test can pass or fail. The architecture shapes it: the feed is too big to send, so the agent looks the product up with the stock tool.
4 · Infrastructure: how fast, how much, at what cost and where, each in a unit the platform limits or a test measures. Here the input-token figure is what the workspace cap counts.
KnowledgeClaude platform limits become infrastructure requirements
Several Claude platform limits turn into infrastructure requirements as soon as the architecture names the platform. A rate limit is a cap the Claude API sets for each organisation by usage tier and model. It caps requests per minute, input tokens per minute (ITPM) and output tokens per minute. A request over any of them gets a 429, a rate-limit error that 2.4 shows how to retry. A throughput requirement therefore has to be stated in tokens as well as requests. The context window is a harder limit, because everything in the request counts toward it, and if the input alone exceeds it, the API rejects the request with a 400 error. Where inference runs and how much an organisation can spend are also set by the platform, so the business cannot ask for an option the platform does not offer.
Requests, input tokens and output tokens per minute, per model, set by usage tier. A workspace can be capped lower.
RequirementPeak tokens per minute, measured in a load test, stay under the limit for the chosen model.
Prompt, tools, history and output all count. The free token counting endpoint estimates a request before it is sent.
RequirementThe largest expected request fits, with room left for the answer.
inference_geo is "global" or "us" on the first-party API, and a workspace can restrict the allowed values. On Amazon Bedrock and Google Cloud, the endpoint's region decides.
RequirementEvery request runs only where the business allows, enforced at the workspace.
Standard requests carry no availability guarantee, and overload returns a 529, an overloaded error. Reaching a tier's monthly spend cap pauses API use until the next month.
RequirementA fallback reply during overload, and projected spend below the cap.
Shelfwise's stock feed holds no personal data, so requests run with default global inference. A requirement to process data only in the UK would reopen the choice of platform, because the first-party API offers only global and US inference, with US only on Claude 4.6 and later models.
SkillSizing the Saturday peak
Shelfwise's first throughput requirement read "handle the Saturday peak of 10 questions a minute". Each question takes about three requests in the agent's tool loop, so the team checked 30 requests a minute against the request limit and moved on. The load test failed, because the team's workspace is capped at 100,000 input tokens a minute to protect the shops' other projects, and each request carries about 7,000 input tokens:
# requirement v1: 10 questions/min at peak (≈30 requests/min) load test → 429 rate_limit_error, input tokens per minute # cause: 30 × ≈7,000 input tokens ≈ 210,000/min against a 100,000 workspace cap # fix: cache the ≈6,000-token prefix (tools and stock rules); reads skip ITPM re-test → ≈31,000 uncached input tokens/min, no 429s # requirement v2: ≤50,000 uncached input tokens/min at 10 questions/min
Version two can be tested, and it names the unit the platform limits. For most current models only uncached input and cache writes count toward ITPM, so caching the repeated prefix (2.3) cut the counted input to about a seventh. A higher usage tier would change nothing: the workspace cap was hit first. Raising the workspace cap would have passed the load test, but it takes headroom from the other projects and leaves every request at the full input price. Version one also broke the cost ceiling, because about 21,000 full-price input tokens an answer costs more than $0.01 on every current model. The $0.01 ceiling became "the mean logged cost per answer stays under $0.01, checked from a week of usage logs", a mean because an answer that must write the cache costs more (5.4).
- A business requirement says why; functional requirements say what the system does; infrastructure requirements say how fast, how much, how reliably, at what cost and where.
- Rate limits per model, the context window, inference regions and the monthly spend cap are hard constraints, so infrastructure requirements are written in the platform's own units.
- On most current models cache reads do not count toward ITPM, so caching raises throughput without a tier change.