Specs describe the target application on a certain level. CodeSpeak uses LLMs to fill in the gaps and turn the spec into code. In the process, it makes many “micro-decisions” that are captured in the generated code. We might want to alter these micro-decisions, e.g. if there is a low-level bug.

First thing you should consider in this case, it whether it makes sense to alter the spec and have CodeSpeak reflect the change in the code. But if that doesn’t feel right, e.g. if the change is too low-level, or all you observe is just an exception from your Django app, for example, you can use a Code Change Request (CCR).

To open a CCR, create a new file named change-request.cs.md in the root directory. In the app template, there’s a short cut for it at the bottom of the README.md file:

image.png

Describe the change you want to make and commit the file. Feel free to paste exception stack traces, log extracts or any other relevant information. For example:

When a second user signs in, they get this error:

Traceback (most recent call last):
  File "/Users/abreslav/codespeak/releases/0.0.1-alpha/uv1-todo-0/.venv/lib/python3.13/site-packages/django/db/backends/utils.py", line 105, in _execute
    return self.cursor.execute(sql, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abreslav/codespeak/releases/0.0.1-alpha/uv1-todo-0/.venv/lib/python3.13/site-packages/django/db/backends/sqlite3/base.py", line 360, in execute
    return super().execute(query, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Exception Type: IntegrityError at /accounts/google/login/callback/
Exception Value: UNIQUE constraint failed: auth_user.username

When you commit this to ./change-request.cs.md, CodeSpeak will pick it up, run the build and commit the changes back to the repo. The file you created will be deleted in this commit.

You spec has prevalence over your CCRs. CodeSpeak checks if a CCR contradicts the spec and will yield an error. If this happens, feel free to

An exception report like above will obviously almost never contradict the spec (unless an exception is specifically required by the spec).

Also note that you can’t make changes to the spec simultaneously with an open CCRs. First, finish a CCR (get it implemented and the CCR file deleted by CodeSpeak), then proceed to changing the spec further. If you wish to drop the CCR without implementing it, just delete the CCR file.


Previous

Using 3rd party APIs

Next

Deploying CodeSpeak apps to Render.com