codespeak build
Build your project according to the specification file(s).
Synopsis
codespeak build [spec_path] [--skip-tests] [--no-interactive]Description
Generates or updates code to match the spec. This is the primary command for turning specs into working code.
The build process:
- Reads the spec and analyzes the project
- Resolves spec dependencies and builds in dependency order
- Generates or updates code for each spec
- Runs tests and iterates to fix any failures (unless
--skip-tests)
For multi-spec projects, only changed specs are rebuilt. Unchanged specs are skipped (prints "No changes detected").
Skipping builds when a spec has no changes
If all specs you are building do not have any changes since the last successful build, the build command will exit with the message: "No spec diff found".
Flags
| Flag | Description |
|---|---|
spec_path | Path to the specification file to build. If omitted, all registered specs are built |
--skip-tests | Skip test generation and coverage improvement |
--no-interactive | Run in non-interactive mode without real-time progress updates |
Error messages
| Error | Cause | Resolution |
|---|---|---|
| Can't find spec to build | No .cs.md files found and no specs registered in codespeak.json | Create a spec file or register one in codespeak.json |
| Spec file is empty: {path} | The spec file exists but has no content | Add content to the spec |
| Build cannot be started with an existing change request | A change request file exists alongside spec changes | Either remove the change request file and build, or finish the change request with codespeak change |
| Cannot specify both a positional spec path and --spec | Both positional path and --spec flag provided | Use one or the other |
| Anthropic API Key not found | No API key configured | Set the ANTHROPIC_API_KEY environment variable or run through the interactive setup |
| Circular spec dependency detected: A -> B -> A | Spec imports form a cycle | Remove the circular import |
| {path} does not belong to a CodeSpeak project | No codespeak.json found | Run codespeak init first |
See also
- Quick Start โ build workflow walkthrough
codespeak implโ implement without running tests- Imports / Dependencies โ multi-spec builds