automated python / js refactoring for ocap discipline
https://github.com/kensanata/mastodon-archive is a typical python project.
idea: teach aider about DisciplinedPython and have it refactor the code.
even crazier idea: interpret python ASTs using guile macros a la
- https://github.com/cwebber/rockit/pull/4
I had some luck using /web
/web https://github.com/dckc/awesome-ocap/wiki/DisciplinedPython /web https://github.com/dckc/awesome-ocap/wiki/OCap-Discipline /web https://en.wikipedia.org/wiki/Ambient_authority /web https://www.madmode.com/2019/python-eng.html
Details:
aider was tripping over PEP8 lint; I'm inclined to start again after using autopep8.
I think LLMs (and humans) would benefit from a bunch of examples like the airbnb JS style guide:
// bad
import os
def main():
os.xyz()
// good
def main(xyz):
xyz()
if __name__ == '__main__':
def _script():
from os import xyz
main(xyz=xyz)
_script()
TODO: restore CapPython to working order; use it to give feedback to LLMs.