Goal: build an app from a shapeware spec folder (CONTRACT.md, features.yaml, examples/, dag.md, a task file) so that it passes the judge at the stated venue and can be installed and run through its lifecycle. Lessons are from rebuilding two bashy apps from their specs (form, a form tool, and notepad, a notes server) by agents of several vendors. Related: [[shapeware-lift-app]], [[shapeware-spec-from-plan]], [[shapeware-operate-from-dag]] to install and run what you built, a rebuild test (a builder that has not seen the source rebuilds the app and the judge decides).
Tools and format: the judge is bashy conform (spec check, run, cert, mutate). Where a step says conform ..., type bashy conform ...; on a machine without bashy use the standalone conform binary (github.com/dhnt/conform). The format on one page is examples/desk/form/references/shapeware.md in the bashy source, and the folder around it is the worked example, with a full CONTRACT.md, features.yaml and dag.md. bashy src fetch bashy puts the source under ${BASHY_HOME:-$HOME/.bashy}/src/bashy.
Steps
- Compile the spec you were given:
conform spec check .(the judge also says so when you run it: “spec check reports N finding(s)”). Each finding is a place where the spec does not fully decide the behaviour. Do not guess silently there: take the reading that the examples and the rule’s purpose both support, and write the choice in your notes. - Read the rules section of
CONTRACT.mdbefore the assertions. Envelope keys, projection flags, open/closed outputs and error form apply to every command. - Read the task file and
dag.mdfor the venue and the lifecycle: OS, interpreter and toolchain versions, network, what is absent, and the steps your build must satisfy (build, test, install, run, serve). Build for that venue, not for the machine you are on. - Write files early. Start the launcher and a first command within the first minutes, then extend. A long plan with nothing on disk can be cut off.
- Run the judge while you build:
conform run CONTRACT.md --path . --fresh-home. Fix by assertion name until all pass. Do not deliver while any visible assertion fails. - Cover every example file and every input format in
examples/, including each syntax the examples use. - Implement a rule as a rule. Where the spec defines a set (which names are refused, which kinds are valid), implement the definition and test both sides of its boundary, not only the example shown.
- Errors: exactly the stated stream, text prefix and exit code, and nothing else on that stream (no warnings from your interpreter).
- Output compared as text matches byte for byte. Only output of a command that carries
--jsonis compared structurally. Where the contract shows JSON printed by another command (an HTTP API read withcurl), print it exactly as shown: compact, keys in that order. - UI: follow the stated label, required and control rules; the judge reads the accessible inventory, not your markup.
- A service: implement the start and stop the contract’s service rules define (readiness, what
stopis scoped to, state kept across a stop), and make every step ofdag.mdwork when its block is run withshon a fresh copy,buildincluded: the launcher may not rely on something you built by hand. - Deliver source, the launcher and a working lifecycle. Before you finish:
- remove build outputs and caches from the workspace, or make the launcher rebuild when the cached binary does not run here;
- make sure the launcher works from a fresh HOME with no network;
- use only the standard library or dependencies vendored in the workspace;
- stop every server or background process you started.
Failure causes seen
- A binary built on the session host was shipped in the workspace and could not execute at the venue.
- A module deprecated in the venue’s interpreter version printed a warning on the error stream and failed every error assertion.
- An input format named in the spec was not implemented because only the other format had been tried.
- A projection flag was honoured on some commands only, or dropped the always-present key.
- Nothing was delivered: the session ended during a long first planning turn.
- A rule given by example was implemented for the example’s form only (
api_keyrefused,stripe-api-keyaccepted). - Servers started for self-checks were left running after the session.
- JSON from an HTTP API was printed with spaces and another key order; the checks compare that output as text, and every one of them failed although the behaviour was right. Three of those assertions were visible at delivery.
- A session read the spec, spent nine minutes in one thinking step and ended without writing a file.