Session: Development Environment Fix & Velocity Script
Date: 2025-12-23 Focus: Developer experience improvements and tooling
Summary
Section titled “Summary”Fixed a critical issue where OSS-CAD-SUITE tools (Yosys, Verilator) were not available in the Python virtual environment, causing RTL generation to fail. Also created a comprehensive repository velocity reporting script for investor metrics.
Issues Addressed
Section titled “Issues Addressed”1. OSS-CAD-SUITE PATH Not in Virtual Environment
Section titled “1. OSS-CAD-SUITE PATH Not in Virtual Environment”Problem: After running setup-dev-env.sh and activating .venv, the just ci command failed with:
amaranth._toolchain.yosys.YosysError: Could not find an acceptable Yosys binary.Root Cause: The setup script installed OSS-CAD-SUITE to /opt/oss-cad-suite and added it to PATH during script execution, but this PATH change didn’t persist to new shells. The .venv/bin/activate script didn’t include the OSS-CAD-SUITE path.
Solution:
- Patched
.venv/bin/activateto add/opt/oss-cad-suite/binto PATH when sourcing - Updated
bin/setup-dev-env.shto automatically apply this patch after creating the venv
Files Modified:
.venv/bin/activate(runtime fix)bin/setup-dev-env.sh(permanent fix for future setups)
2. Repository Velocity Reporting
Section titled “2. Repository Velocity Reporting”Request: Create a script to measure development velocity across branes-ai and stillwater-sc repositories for investor presentations.
Requirements:
- Filter to source code files only (exclude generated content like .mlir files)
- Exclude large files (>100k lines) that are likely data/generated
- Show total LOC, commits, lines added/deleted, net change
- Show percentage contribution relative to total codebase
Solution: Created scripts/repo_velocity.py with:
- Tracking: C/C++, Python, Go, Shell, CMake, Verilog/VHDL files
- Large file exclusion (>100k lines threshold)
- Multiple output formats: markdown, CSV, JSON
- Configurable date range (default: last 6 months)
Velocity Report Highlights (June - December 2025)
Section titled “Velocity Report Highlights (June - December 2025)”| Organization | Total LOC | Commits | Net Change | Growth |
|---|---|---|---|---|
| branes-ai | 301,970 | 532 | +207,654 | +68.8% |
| stillwater-sc | 442,102 | 289 | +174,654 | +39.5% |
| Combined | 744,072 | 821 | +382,308 | +51.4% |
Key Metrics:
- 115.6 commits/month
- +53,846 net LOC/month
- 51.4% codebase growth in 7 months
Files Created/Modified
Section titled “Files Created/Modified”Created
Section titled “Created”scripts/repo_velocity.py- Repository velocity report generator
Modified
Section titled “Modified”bin/setup-dev-env.sh- Added venv activation script patching.venv/bin/activate- Added OSS-CAD-SUITE to PATHCHANGELOG.md- Added entries for today’s work
Velocity Report
Section titled “Velocity Report”# Default: last 6 months, markdown outputpython3 scripts/repo_velocity.py
# Custom date rangepython3 scripts/repo_velocity.py --since 2025-06-01 --until 2025-12-31
# CSV for spreadsheetspython3 scripts/repo_velocity.py --output csv > velocity.csv
# JSON for programmatic usepython3 scripts/repo_velocity.py --output json > velocity.jsonDevelopment Environment
Section titled “Development Environment”# After setup, simply:source .venv/bin/activatejust ci # Now works without additional environment sourcingTest Results
Section titled “Test Results”All 328 unit tests passing after the PATH fix:
============================= test session starts ==============================collected 328 items...============================= 328 passed in X.XXs ==============================- The
characterize(branes-ai) andflames(stillwater-sc) directories are not git repositories - The
graphsrepo had inflated LOC due to .mlir files, now filtered out - The velocity script is designed to be run periodically without consuming API tokens