codespeak change

Request a code change to an existing project.

Synopsis

codespeak change [spec_path] [-m MESSAGE] [--new] [--skip-tests] [--no-interactive]

Description

Fixes implementation bugs without changing the spec. Use this when the spec correctly describes the desired behavior but the generated code has a bug.

Three ways to use it:

  1. Inline message: codespeak change -m "description of the problem" โ€” applies the change immediately
  2. Create template: codespeak change --new โ€” creates a change-request.cs.md file for editing
  3. Apply template: codespeak change โ€” applies the previously created change request file

The change request uses the same syntax as specs (Markdown with // comments).

Flags

FlagDescription
spec_pathPath to the spec the change applies to. Required in multi-spec projects
-m, --message MESSAGEImplement a given change request directly
--newCreate an empty change request file for manual editing
--skip-testsSkip improving test coverage
--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
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
Code change request file already existsA change request file was already created with --newEdit and apply it with codespeak change, or delete it to start over
Code change request file doesn't existRunning codespeak change without -m and without a change request fileUse -m "message" or create one with --new first
Code change requests are not allowed until the project has been built successfully at least onceTrying to use change before any buildRun codespeak build first
Code change requests are not allowed together with spec changesBoth the spec and the change request file have been modifiedEither remove the change request and build the spec, or revert spec changes and apply the change request
Current code change request contradicts the specificationThe requested change conflicts with what the spec saysEdit the spec to reflect the desired behavior instead of using a change request

See also