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:
- Inline message:
codespeak change -m "description of the problem"โ applies the change immediately - Create template:
codespeak change --newโ creates achange-request.cs.mdfile for editing - Apply template:
codespeak changeโ applies the previously created change request file
The change request uses the same syntax as specs (Markdown with // comments).
Flags
| Flag | Description |
|---|---|
spec_path | Path to the spec the change applies to. Required in multi-spec projects |
-m, --message MESSAGE | Implement a given change request directly |
--new | Create an empty change request file for manual editing |
--skip-tests | Skip improving test coverage |
--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 |
| 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 |
| Code change request file already exists | A change request file was already created with --new | Edit and apply it with codespeak change, or delete it to start over |
| Code change request file doesn't exist | Running codespeak change without -m and without a change request file | Use -m "message" or create one with --new first |
| Code change requests are not allowed until the project has been built successfully at least once | Trying to use change before any build | Run codespeak build first |
| Code change requests are not allowed together with spec changes | Both the spec and the change request file have been modified | Either remove the change request and build the spec, or revert spec changes and apply the change request |
| Current code change request contradicts the specification | The requested change conflicts with what the spec says | Edit the spec to reflect the desired behavior instead of using a change request |
See also
- Fixing Bugs with Code Change Requests โ tutorial
- Quick Start โ see change requests in the quickstart workflow