AI-Coding-Style-Guides  by lidangzzz

AI coding style guides for LLM efficiency

Created 6 months ago
462 stars

Top 65.5% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a set of AI-driven coding style guidelines designed to maximize code compression for use with Large Language Models (LLMs) in tools like Vibe Coding or SWE-Agents. The primary benefit is enabling LLMs to process significantly more code within limited context windows and reduce token costs, while also offering mechanisms for human readability restoration.

How It Works

The guidelines are based on the principle that LLMs can effectively understand and operate on highly compressed code, prioritizing efficiency over human readability in automated workflows. This approach leverages techniques like whitespace removal, variable name shortening, and advanced language feature utilization to drastically reduce code size. The project suggests a tiered approach to compression, allowing for gradual reduction and offering LLMs to decompress code for human understanding when necessary.

Quick Start & Requirements

  • Usage: Prompts are provided in AI_Coding_Style_Guide_prompts.toml. These can be copied directly or loaded programmatically using the provided Python snippet.
  • Dependencies: Requires Python with the toml library.

Highlighted Details

  • Demonstrates significant code size reduction (e.g., KMP algorithm reduced from 1216 to 283 characters, a JSON parser from 2708 to 1330 characters).
  • Outlines 8 levels of compression, from basic whitespace removal to aggressive shortening and refactoring.
  • Emphasizes that LLMs can decompress and explain highly compressed code for human review.

Maintenance & Community

  • The repository is maintained by lidangzzz. No specific community channels or roadmap are detailed in the README.

Licensing & Compatibility

  • The repository does not explicitly state a license in the provided README.

Limitations & Caveats

  • The primary limitation is the significant reduction in human readability for the compressed code, requiring LLM assistance for understanding. The lack of an explicit license may pose compatibility issues for commercial or closed-source use.
Health Check
Last Commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
24 stars in the last 30 days

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), David Cournapeau David Cournapeau(Author of scikit-learn), and
3 more.

codecompanion.nvim by olimorris

0.7%
6k
Neovim plugin for AI-powered coding assistance
Created 2 years ago
Updated 1 day ago
Starred by Yiran Wu Yiran Wu(Coauthor of AutoGen) and Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research).

PocketFlow by The-Pocket

0.6%
9k
Minimalist LLM framework for agentic coding
Created 1 year ago
Updated 2 weeks ago
Feedback? Help us improve.