Skip to content

🧠 Cog v1.0.0 β€” Modular Domain Slicers, AI Review Tools & Cross-Platform Engine

Latest

Choose a tag to compare

@SiririComun SiririComun released this 27 Aug 20:52

🧠 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, and LICENSE.
  • ./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 git vs ./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 fragmented PACKAGE_PIN and IOSTANDARD lines into native Vivado -dict syntax (~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 #define offsets, 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-organized context/conf/cog.conf generation.
  • ./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.cmd and Ctx.ps1 for seamless Command Prompt and PowerShell execution.
  • Clipboard & Stdout: Direct clipboard injection (-c / --clip) and Unix stdout streaming (-s / --stdout).
  • Calibrated Token Meter (3.62 chars/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