Historical deployment analysis — walk git history, deploy per day, test all endpoints, capture screenshots, restore working fragments
Project description
rebuild
AI Cost Tracking
- 🤖 LLM usage: $1.5000 (10 commits)
- 👤 Human dev: ~$249 (2.5h @ $100/h, 30min dedup)
Generated on 2026-05-01 using openrouter/qwen/qwen3-coder-next
Code Evolution Intelligence Engine
Historical deployment analysis & Code Intelligence — walk git history day by day, deploy per commit, test all endpoints, capture screenshots, and analyze code evolution to find duplicates, rank quality, and generate refactor plans.
What it does
- Intelligence Layer (NEW) — Detects structural duplicates, builds service graphs, and ranks code quality across history.
- Decision Engine (NEW) — Generates actionable refactoring plans (Merge/Extract/Split) with clear rationale.
- Walk — Iterates through git history day by day (earliest commit per day).
- Deploy — Starts the service per commit: docker-compose / uvicorn / none.
- Scan —
deta(service-level) → OpenAPI (API-level) → Traefik labels fallback. - Test —
testqlscenarios (detailed API) or HTTP probe fallback (service-level). - Screenshot — Playwright screenshots per endpoint with retry/timeout.
- Restore — Extract last working endpoint as isolated Docker project.
- Dashboard — Health% timeline overlaid with quality metrics.
- TUI — Interactive terminal menu for project exploration and recovery.
Install
pip install rebuild
# with full intelligence suite (recommended)
pip install "rebuild[full]"
playwright install chromium
Quick start
🚀 Analysis & Intelligence (New in v0.1.10)
# Find structural and semantic duplicates
rebuild analyze duplicates .
# Visualize service architecture graph and detect cycles
rebuild analyze services
# Find the 'best' historical version of a function
rebuild analyze truth rebuild/application/pipeline.py run_day
# Generate a prioritized refactoring plan
rebuild refactor plan .
🏃 Execution Pipeline
# Interactive TUI
rebuild tui
# Dry-run walk: scan last 30 days without deploy
rebuild walk . --days 30 --dry-run
# Restore last working version of an endpoint
rebuild restore /api/health .
# Generate health vs quality dashboard
rebuild dashboard --repo .
Examples
Explore ready-to-run scenarios in examples/:
- 01-dry-run-walk: Standard walk without deployment + intelligence analysis.
- 02-docker-compose-project: Full pipeline with Docker isolation, screenshots, and architectural refactor plan.
- 03-restore-endpoint: Discovering historical "truth" and extracting a working endpoint as a standalone project.
To run any example:
cd examples/01-dry-run-walk
./run.sh ../.. 30
Architecture
Rebuild follows a strict layered architecture:
Interfaces → Application (Pipeline/Services) → Intelligence (Analysis/Refactor) → Domain → Infrastructure.
Detailed documentation: docs/architecture.md
rebuild/
├── analysis/ # Intelligence layer: duplication, truth ranking, service graph
├── application/ # Application logic: Pipeline and injected Services
├── domain/ # Pure data models (Endpoint, DayResult, CommitInfo)
├── infrastructure/ # External adapters (Git, HTTP, Playwright)
├── interfaces/ # Entrypoints: CLI, TUI, Dashboard
└── refactor/ # Decision engine: Refactor recommendation engine
Changelog & Roadmap
- See CHANGELOG.md for the latest updates.
- See TODO.md for the future roadmap (Automated Refactoring, LLM assistance).
License
Licensed under Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rebuild-0.1.10.tar.gz.
File metadata
- Download URL: rebuild-0.1.10.tar.gz
- Upload date:
- Size: 49.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
567054d72875582971ad26a5103631f1ab90a143b884c566e48d9047c3a91332
|
|
| MD5 |
aafd10ce3da3e2f1d26d2c94e367cc56
|
|
| BLAKE2b-256 |
8d718ed8a5a5e88bd979e4a61320847567c46d67d38edf7db71976d5a558b181
|
File details
Details for the file rebuild-0.1.10-py3-none-any.whl.
File metadata
- Download URL: rebuild-0.1.10-py3-none-any.whl
- Upload date:
- Size: 52.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01d42f312ced29233f2172a450983ea4e4ca694ed765015ae4a6b8d83af476bd
|
|
| MD5 |
08333366f41a186f750839626c4f63bc
|
|
| BLAKE2b-256 |
b6368b28e02f1dbe54544cec6627284014a002d67374e49b09c70578abc59dd9
|