Releases: SiririComun/Cog
Release list
🧠 Cog v1.0.0 — Modular Domain Slicers, AI Review Tools & Cross-Platform Engine
🧠 Cog v1.0.0 — Context on Git
We are excited to announce the official v1.0.0 release of Cog!
Cog is a lightweight, zero-dependency Git utility designed to extract, prune, and format complex hardware (FPGA/ASIC), software (Python/C++), and Jupyter Notebook repositories into compact, token-optimized context documents for Large Language Models (GPT-4, Claude, Gemini).
🌟 What's New in v1.0.0
🎯 1. Modular Domain Slicers (./Cog/Ctx <mode>)
Generate ultra-compact context slices for specific engineering tasks:
./Cog/Ctx bd/ip: Vivado Block Designs (.bd) + memory address maps (SEG_*)../Cog/Ctx rtl/hw: VHDL, Verilog, and SystemVerilog custom RTL cores../Cog/Ctx sw/py: Python drivers, C/C++ headers, and host libraries../Cog/Ctx nb/ipynb: Distilled Jupyter Notebook tutorials../Cog/Ctx xdc/pins: Compacted physical constraints and clock timing definitions../Cog/Ctx tcl/build: Hog & Vivado build automation scripts../Cog/Ctx docs: Markdown docs,README.md, andLICENSE../Cog/Ctx hld:bd+rtl+sw(Hardware-Software Co-Design verification)../Cog/Ctx app:sw+nb(Application layer & tutorial debugging).
🔍 2. AI Code Review & Git Diff Slicers
- Pre-Commit Diff Review (
./Cog/Ctx diff): Ingests working tree diff patches paired with full, domain-compacted representations of touched files. - Pull Request Reviewer (
./Cog/Ctx pr [base_branch]): Calculates merge-base deltas against base branches (main/master) for automated AI PR reviews and changelog drafting. - Full & Compact Git Topologies (
./Cog/Ctx gitvs./Cog/Ctx git:full): 15-commit capped graph or full multi-branch commit histories.
📉 3. Expanded Domain Compactor Engines
- Constraint Optimizer (
core/xdc_clean.py): Unifies fragmentedPACKAGE_PINandIOSTANDARDlines into native Vivado-dictsyntax (~60% token savings) and purges template pin noise. - TCL Build Cleaner (
core/tcl_clean.py): Purges Vivado tool session logs, process IDs, and disclaimer boilerplate. - C/C++ Driver Slicer (
core/c_slicer.py): Strips multi-line license headers while preserving 100% of memory-mapped register#defineoffsets, bitmasks, and HLS pragmas. - Hardware Safety Guard in Notebook Distiller (
core/ipynb_clean.py): Never truncates safety-critical warnings (voltages, pin limits, clock speeds).
🛠 4. Scaffolding & Diagnostics Engine
./Cog/Ctx init: Automated project onboarding scanning and domain-organizedcontext/conf/cog.confgeneration../Cog/Ctx update: Non-destructive sync detecting newly added or stale repository files../Cog/Ctx check/doctor: Pre-flight integrity diagnostics and projected token footprint audit.
⚡ 5. Developer Ergonomics & Windows Support
- Zero External Dependencies: Built entirely with POSIX Bash, Windows Batch/PowerShell, and the Python standard library.
- Native Windows Entry Points: Added
Ctx.cmdandCtx.ps1for seamless Command Prompt and PowerShell execution. - Clipboard & Stdout: Direct clipboard injection (
-c/--clip) and Unix stdout streaming (-s/--stdout). - Calibrated Token Meter (
3.62chars/token): <1% error margin against Claude/GPT-4/Gemini subword tokenizers with model context window compatibility badges (Universal, Standard, Extended).
🧪 Automated Test Suite & CI
- 12 automated unit and regression tests running in <10ms (
python -m unittest discover -s tests). - Full multi-platform CI matrix on GitHub Actions covering Ubuntu, Windows, and macOS across Python 3.8, 3.9, 3.10, 3.11, and 3.12.
Full Changelog: https://github.com/SiririComun/Cog/commits/v1.0.0
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.