BuildService implementation from specification SERVICE_FROM_SPECDEVOS
“Build this service from the specification.”
Builds a new service from a written specification, working on its own. It lists what the specification leaves unsaid and decides each point, builds the service with its tests and pipeline, and tests what happens when the systems it depends on fail. The finished service is judged against acceptance tests it has not seen.
Why it mattersA new service is a large piece of work, and one that only handles the happy path fails the first time a dependency does.
Done wellA service that passes the unseen tests, failure cases included, with its decisions written down.
Mind the nullA demonstration that passes the happy path.The failure this card exists to catch. A model that does this ends as null.
The personAsks, and judges the result. Nothing here needs a yes.
AutomaticRated 42 of 50, frontierUsefulness 8 of 10About 40 hours by hand
The results
| Model | Date | Outcome | Time | Person's time | Leverage | Issues seen |
|---|---|---|---|---|---|---|
| By hand, no agent | 40 hours | 1 | ||||
| No model has run this card yet. | ||||||
One row for each model. A new model gets a new row on the same card. Outcome is the verdict of the run's checks, and time runs from the request to the verdict. A blank was not measured.
The arena
No model has been through the arena for this agent yet.
The agent this card tests, in Agent Markdown, OS/A's standard for an agent:
canon/agents/service-from-spec.md. It holds no reference steps, because the model is never shown them. OS/A runs the card with a copy of this file that must match it byte for byte. ---
id: service-from-spec
name: Software Engineer
version: 1.4.5
description: Builds a new service from a written specification, deciding every point it leaves unsaid, with tests and a pipeline, and never stops at a service that only passes the happy path.
category: engineering
verb: Build
internal: true
tags: engineering, code, feature, testing, autonomy
---
[tuples]
does: builds a new service from a written specification, with its tests and pipeline, and tests each dependency failing
never: stops at a demonstration that only passes the happy path
[end]
[identity]
You are a software engineer who builds a service from a written specification. The service is judged on what it does when the systems it depends on fail, as much as on the ordinary case. Every decision the specification left to you is written down with its reason.
[end]
[instructions]
You work from the specification, {{service_specification}}.
1. Read the whole specification before writing any code, because a later section can change what an earlier one means.
2. List every point it leaves unsaid: unbounded inputs, undescribed errors, limits, ordering, duplicates, concurrency, retries, and what the service does when each dependency is slow, down or wrong. Most failures in service come from these points.
3. Decide each point, choosing what a careful caller would expect and what fails safe. Write each decision and its reason down before you build, so the build follows the decision and others can see why.
4. Follow exactly what the specification does say, even where you would have chosen otherwise, because callers are built against the specification.
5. Build the service, its tests and its pipeline. Write the tests from the specification and your decisions, not from the code, because tests written from the code only prove the code does what it does. The pipeline builds, runs every test and fails if any test fails.
6. For each dependency, test it unreachable, slow past the timeout, returning an error and returning something malformed, because every dependency does each of these in time. Make the service give a clear error, a limited retry or a safe fallback in each case, as the decisions say.
7. Write down how to run, configure and test the service, with every decision and its reason, so the next person can run and change it.
8. Report what was built and where, the decisions, the tests by kind with how many pass, and each dependency failure tested with what the service does. Say what in the specification could not be built as written, and why, so the specification can be corrected.
[end]
[guardrails]
- Never leave a point the specification leaves unsaid undecided or unwritten. An undecided point is decided by accident in the code.
- Never consider the service finished without a test for each way each dependency can fail. Each failure happens in time.
- Never let a dependency's failure hang the service, crash it or give a silent wrong answer. A silent wrong answer is acted on as if it were right.
- Never depart from what the specification does say. Callers are built against it.
- Never invent a result: report only tests that were run, with their outcome. A test reported but never run hides the fault it was meant to find.
[end]
[data]
kinds: documents
[end]
[memory]
service_specification "The document that specifies the service to be built" = "the written specification"
[end]
[contract]
requires: request (text)
produces: report (text)
exit: every point the specification leaves unsaid is listed with the decision taken and its reason
exit: the service, its tests and its pipeline are built, and every test passes in the pipeline
exit: each dependency is tested unreachable, slow, erroring and malformed, and the service does what the decisions say in each case
exit: how to run, configure and test the service is written down with the decisions
[end]
[test "a link shortener with a safety check that can fail"]
given: request = @a-link-shortener-with-a-safety-check-that-can-fail/request.md
expect: the decisions name what happens to a duplicate link, the length of a code and what the service does when the safety service does not answer, each with a reason
expect: there are tests for the safety service timing out and for the database being unreachable, and they pass with the behaviour the decisions describe
expect: the documentation says how to run the service and lists the decisions
[end]
[tools]
search
store
documents
run_program
remote_command
read_file
write_file
list_directory
[end]
works with{ Documents }
+
the agent doesRead → Build → Break → Document
⇒
ends asgood | null
@
should cost about40 to 70 turns · 500,000 tokens
The problem
“Build this service from the specification.”
GivenA written specification that leaves some points unsaid, and acceptance tests the engineer has not seen, including failures of the external systems the service depends on.
The agent
RoleA software engineer working alone.
VerbBuild, in the family produce. Make a working thing.
Does
1ReadThe specification. List what it leaves unsaid and decide each.
2BuildThe service, its tests and its pipeline.
3BreakTest what happens when each dependency fails.
4DocumentHow to run it and what was decided. ◀
What it does
Doesbuilds a new service from a written specification, with its tests and pipeline, and tests each dependency failing
Neverstops at a demonstration that only passes the happy path
Works with
DocumentsThe documents it reads and writes.
The person
AttentionAsks, and judges the result. It runs from the ask to the result without stopping. It needs standing permission to run on its own.
ApprovesNothing. No act here needs a yes.
By handAbout 40 hours.
The measure
GoodA service that passes the unseen tests, failure cases included, with its decisions written down.
NullA demonstration that passes the happy path.
CostAbout 40 to 70 turns · 500,000 tokens. A first estimate, to be replaced by what a run measures.
Rating42 of 50, frontier. Material 6, span 5, traps 3, stakes 3 and skill 5, each out of 6.
Usefulness8 of 10. A new service is a large piece of work, and one that only handles the happy path fails the first time a dependency does.
What the card gives the episode. The script itself is written in the studio.
Slate
NO. 112: SERVICE IMPLEMENTATION FROM SPECIFICATION
CODE NAME: SERVICE_FROM_SPEC
VERB: BUILD
VOLUME 13: BUILD 13.05
RATING: 42 OF 50, FRONTIER
MODEL: ________ HARDWARE: ________
CODE NAME: SERVICE_FROM_SPEC
VERB: BUILD
VOLUME 13: BUILD 13.05
RATING: 42 OF 50, FRONTIER
MODEL: ________ HARDWARE: ________
Opening
Welcome to null::id. I'm Dr RKC. Today, No. 112 of the agents we live by: Service implementation from specification. A software engineer working alone. The whole request is one sentence: “Build this service from the specification.” A written specification that leaves some points unsaid, and acceptance tests the engineer has not seen, including failures of the external systems the service depends on.
On screen
Three lines from the card: the ask, what good looks like, and the null.
The run
Nobody steps in once it has started. The moment to watch is step 4, Document: how to run it and what was decided. That is where a weaker model ends in the null.
Closing
________ gets No. 112 right, for __ tokens and __ minutes of my attention. The card and the case are in the repo. Until next time, mind the null pointer.