v0.1.0 — Initial Release of Cog (Context on Git)
🧠 Cog v0.1.0 — Context on Git
We are excited to announce the initial official release of Cog (Context on Git), a lightweight, zero-dependency Git submodule utility designed to distill, prune, and format complex hardware (FPGA/ASIC), software, and Jupyter Notebook repositories into a compact, token-optimized context document for Large Language Models (GPT-4, Claude, DeepSeek).
🌟 Key Highlights & Features
- 🚀 Zero External Dependencies: Built entirely with pure POSIX Bash and the Python 3 standard library. Runs out-of-the-box on Linux, macOS, Windows, CI runners, and embedded Linux boards (PYNQ/Raspberry Pi) without requiring
pip install. - 📉 Aggressive Token Optimization (60%–80% Savings):
- Vivado Block Design Pruning (
.bd): Strips thousands of lines of default Zynq/MIO/DDR noise while preserving 100% of custom IP instances, parameter overrides, AXI interconnects, and memory maps. - Jupyter Notebook Stripper (
.ipynb): Strips execution counters, cell IDs, output blobs, and base64 plots, formatting notebooks into clean Python# %%scripts. - Code Minification: Removes auto-generated tool copyright headers and collapses redundant whitespace.
- Vivado Block Design Pruning (
- 🌳 Multi-Branch Git Topology & Status: Captures full multi-branch ASCII commit graphs, release candidate history, branch divergence metrics, and working tree states.
- 🎯 Scalable CLI Command Engine: Unified
./Cog/Ctxentrypoint. - 📊 Built-in Token Meter: Estimates prompt token consumption and displays real-time compression ratio reports in the terminal.
📊 Token Reduction Benchmarks
Measured on the PYNQ Oscilloscope & Spectrum Analyzer project:
| Artifact / File Type | Raw Token Size | Cog Compacted Size | Token Savings | Semantic Integrity |
|---|---|---|---|---|
Vivado Block Design (.bd) |
~18,500 tokens |
~3,200 tokens |
82.7% | Custom IPs, Nets & Address Map 100% Intact |
7x Jupyter Notebooks (.ipynb) |
~42,000 tokens |
~8,400 tokens |
80.0% | Full Descriptions & Python Code Preserved |
| VHDL & Custom RTL Cores | ~14,200 tokens |
~11,100 tokens |
21.8% | Logic, Generics & Processes Preserved |
| Total Context Footprint | ~74,700 tokens |
~22,700 tokens |
🔥 69.6% | Fits cleanly in standard LLM context windows! |
🚀 Quick Start (Submodule Integration)
Add Cog to any repository in 2 commands:
git submodule add https://github.com/SiririComun/Cog.git Cog
git submodule update --init --recursive
./Cog/CtxDeveloped with ❤️ by @SiririComun.