Blog
|release|By Dmitry Savvinov|

First glimpse of codespeak takeover: Transition from Code to Specs in Real Projects

⚠️ CodeSpeak is in Alpha Preview: many things are rough around the edges. Please use at your own risk and report any issues to our Discord. Thank you!

Today we release CodeSpeak 0.3.1. Please find the full release notes at the end of this post.

One of the core promises of CodeSpeak is "Maintain specs, not code". Application code often contains a lot of tedious details that are obvious to humans. LLMs make these details obvious to machines as well, so that humans can focus on the essence (the business logic, the architecture, the tricky parts of the system, etc).

An important part of this vision is migrating parts of existing projects from the "old world" of code to the "new world" of specs. Maintenance is a lot easier when all you need to do is edit a concise human-readable text instead of much longer code.

For this scenario, CodeSpeak 0.3.1 introduces codespeak takeover. See the full tutorial: Convert Existing Code to Specs.

In the tutorial, we use a real project — microsoft/MarkItDown — and fix issue #1468 by editing the generated spec. The spec change of +23/-3 lines generated +221/-25 lines of code (~10x).

The Road Ahead

We've just started with takeover: the current version gives you a feel of what it can be, but it's only a tiny first step, and needs a lot of improvement.

The aspects we are planning to improve:

  • making sure that the spec doesn't miss anything important and doesn't include anything unnecessary,
  • making sure that if we delete the code, an equivalent implementation can be generated from the spec (passing all the tests, etc),
  • verifying that, when editing the spec, we can generate adequate changes in the code (spec diff -> code diff),
  • ideally, also maintaining good test coverage to make sure everything keeps working over time.

Full Changelog since 0.2.3

New

  • Added codespeak takeover command to bring existing source files under spec management (the subject of this post).
  • Added --skip-tests support in mixed mode, so you can skip the test phase when iterating on a spec.
  • The whitelist in mixed mode now supports glob patterns like src/**/*.py.
  • The build progress panel now shows a summary of the current change in its title.
  • CodeSpeak now notifies you when a newer version is available.
  • CodeSpeak now checks your API key balance before starting a build, so you don't wait minutes only to hit a billing error.
  • If codespeak.json has errors, CodeSpeak now reports what's wrong instead of failing with a confusing message.
  • If your project uses a stack CodeSpeak doesn't support yet, you now get a clear warning upfront.
  • Error tracebacks are now syntax-highlighted, so you see the real cause directly.

Bug fixes

  • Fixed change requests in multi-spec mixed mode projects to require --spec for disambiguating which spec to apply to.
  • Fixed duplicated progress output when processing multiple specs.
  • Fixed crashes on very large specs.
  • Fixed empty lines being stripped from process output.
  • Fixed git index.lock contention, improving stability when IDEs or other git clients access the repo during a build.
  • Fixed several git index handling edge cases.
  • Fixed a confusing error message when ripgrep is not installed.
  • Fixed keystrokes being echoed to the terminal during builds.
  • Improved build cancellation speed.

See Also