|
|
|
|
|
by ZitchDog
71 days ago
|
|
I've been having good luck with fairly autonomous LLM coding with the following rules: * TypeScript everywhere with extreme enforcement of the type system.
* No "as" casts, no "any" declarations, all code must understand the shape of its data
* All boundaries validated using a typed validation library. Many use zod, I prefer tjs. I also have strictly typed pg and express wrappers.
* No files longer than 300 lines
* All of these rules are enforced by an eslint configuration that runs in a pre commit hook.
Global state and classes could also be removed via eslint rules, that would be interesting, though I haven't found it to be an issue in practice once the types are strictly enforced. |
|