Mattie/cataclysm

Cataclysm - Code generation library for the end game

What it solves

Cataclysm addresses the need for rapid, on-the-fly code generation by allowing developers to call functions that do not exist yet. Instead of writing the implementation yourself, the library uses AI to generate and execute the necessary code based on your function names, arguments, and context.

How it works

When you call an undefined function, Cataclysm intercepts the request, sends the context (function signature, docstrings, and comments) to an OpenAI model, and executes the returned code. It caches these results locally so that subsequent calls use the generated code rather than re-querying the AI. You can choose between a global mode that automatically handles any missing function or a more controlled 'doom' mode for specific library or application tasks.

Who it’s for

This tool is for developers who want to experiment with AI-driven, autonomous code generation. It is intended for those comfortable with the risks of executing AI-generated code and who are willing to manage the potential for errors or unexpected behavior.

Highlights

  • Automatic code generation for undefined functions based on descriptive names and context.
  • Local caching of generated code to ensure performance and predictability after the initial call.
  • Preview mode (impending doom) to inspect generated code before execution.
  • Frozen mode (chosen doom) to lock in specific, cached code for production use.
  • Configurable prompts and model selection to balance speed, cost, and complexity.

Related

  • Project
  • Project
  • Project
  • Project
  • Project