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:

  1. Reads the spec and analyzes the project
  2. Resolves spec dependencies and builds in dependency order
  3. Generates or updates code for each spec
  4. 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

FlagDescription
spec_pathPath to the specification file to build. If omitted, all registered specs are built
--skip-testsSkip test generation and coverage improvement
--no-interactiveRun in non-interactive mode without real-time progress updates

Error messages

ErrorCauseResolution
Can't find spec to buildNo .cs.md files found and no specs registered in codespeak.jsonCreate a spec file or register one in codespeak.json
Spec file is empty: {path}The spec file exists but has no contentAdd content to the spec
Build cannot be started with an existing change requestA change request file exists alongside spec changesEither remove the change request file and build, or finish the change request with codespeak change
Cannot specify both a positional spec path and --specBoth positional path and --spec flag providedUse one or the other
Anthropic API Key not foundNo API key configuredSet the ANTHROPIC_API_KEY environment variable or run through the interactive setup
Circular spec dependency detected: A -> B -> ASpec imports form a cycleRemove the circular import
{path} does not belong to a CodeSpeak projectNo codespeak.json foundRun codespeak init first

See also