Skip to main content

Historical deployment analysis — walk git history, deploy per day, test all endpoints, capture screenshots, restore working fragments

Project description

rebuild

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • 🤖 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

Version Python License Tests

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

  1. Intelligence Layer (NEW) — Detects structural duplicates, builds service graphs, and ranks code quality across history.
  2. Decision Engine (NEW) — Generates actionable refactoring plans (Merge/Extract/Split) with clear rationale.
  3. Walk — Iterates through git history day by day (earliest commit per day).
  4. Deploy — Starts the service per commit: docker-compose / uvicorn / none.
  5. Scandeta (service-level) → OpenAPI (API-level) → Traefik labels fallback.
  6. Testtestql scenarios (detailed API) or HTTP probe fallback (service-level).
  7. Screenshot — Playwright screenshots per endpoint with retry/timeout.
  8. Restore — Extract last working endpoint as isolated Docker project.
  9. Dashboard — Health% timeline overlaid with quality metrics.
  10. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rebuild-0.1.10.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rebuild-0.1.10-py3-none-any.whl (52.3 kB view details)

Uploaded Python 3

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

Hashes for rebuild-0.1.10.tar.gz
Algorithm Hash digest
SHA256 567054d72875582971ad26a5103631f1ab90a143b884c566e48d9047c3a91332
MD5 aafd10ce3da3e2f1d26d2c94e367cc56
BLAKE2b-256 8d718ed8a5a5e88bd979e4a61320847567c46d67d38edf7db71976d5a558b181

See more details on using hashes here.

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

Hashes for rebuild-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 01d42f312ced29233f2172a450983ea4e4ca694ed765015ae4a6b8d83af476bd
MD5 08333366f41a186f750839626c4f63bc
BLAKE2b-256 b6368b28e02f1dbe54544cec6627284014a002d67374e49b09c70578abc59dd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page