Fixing Bugs with Code Change Requests

Sometimes the spec is correct but the generated code has a bug. Instead of modifying the spec to work around an implementation issue, use a code change request to tell CodeSpeak what's wrong.

Quick example

In the Quick Start, the Geese demo might display the wrong number of geese. The spec is correct โ€” it says what geese should do โ€” but the code has an off-by-one error. Fix it with:

codespeak change -m "Number of geese displayed is off by 1"

CodeSpeak reads the spec, examines the current implementation, and modifies the code to fix the described issue.

When to use

Use codespeak change when:

  • The spec correctly describes the desired behavior, but the code doesn't match
  • You spot a bug that's clearly an implementation error, not a missing requirement
  • You want to fix a runtime issue without changing what the spec says

Edit the spec instead when:

  • The desired behavior needs to change
  • A feature is missing or underspecified
  • You want to add new requirements

In multi-spec projects

If your project has multiple specs, specify which spec the change applies to:

codespeak change path/to/spec.cs.md -m "description of the problem"

Creating a change request file

For more detailed change requests, create a file instead of using the -m flag:

codespeak change --new

This creates a change request template file that you can edit with a detailed description before running:

codespeak change

Next steps