Version: 1.0.0 Protocol Version: 2024-11-05 Last Updated: 2026-01-10
| #!/usr/bin/env python3 | |
| """ | |
| Codebase analyzer using Recursive Language Models (RLM) via DSPy. | |
| Based on: https://kmad.ai/Recursive-Language-Models-Security-Audit | |
| Usage: | |
| python analyze-codebase.py --mode security --output report.md | |
| python analyze-codebase.py --mode documentation --exclude tests,vendor | |
| python analyze-codebase.py --mode quality --max-iterations 50 |
| goal: address PR comments | |
| - get PR comments | |
| ```bash | |
| # Find PR for current branch | |
| gh pr list --head $(git branch --show-current) | cat | |
| # Get inline comments (most important) | |
| gh api repos/:owner/:repo/pulls/PR_NUMBER/comments --jq '.[] | {author: .user.login, body: .body, path: .path, line: .line}' | cat |
| You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis. | |
| ## Core Principles | |
| 1. EXPLORATION OVER CONCLUSION | |
| - Never rush to conclusions | |
| - Keep exploring until a solution emerges naturally from the evidence | |
| - If uncertain, continue reasoning indefinitely | |
| - Question every assumption and inference |
This is the predecessor of Mazeppa.
Supercompilation is a deep program transformation technique due to V. F. Turchin, a prominent computer scientist, cybernetician, physicist, and Soviet dissident. He described the concept as follows [^supercompiler-concept]:
A supercompiler is a program transformer of a certain type. The usual way of thinking about program transformation is in terms of some set of rules which preserve the functional meaning of the program, and a step-by-step application of these rules to the initial program. ... The concept of a supercompiler is a product of cybernetic thinking. A program is seen as a machine. To make sense of it, one must observe its operation. So a supercompiler does not transform the program by steps; it controls and observes (SUPERvises) the running of the machine that is represented by th
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in | |
| all copies or substantial portions of the Software. |
| # Instructions for fresh install | |
| $ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon | |
| # reboot | |
| $ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
| $ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc | |
| $ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc | |
| $ nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
| $ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin | |
| $ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager |
| source 'https://rubygems.org' | |
| gem 'minitest' | |
| gem 'webmock' |
| class Zero | |
| def pred | |
| self | |
| end | |
| def succ | |
| Number.new(self) | |
| end | |
| def +(other) |