Skip to content

chore: repowise health config + initial analysis#149

Merged
randlee merged 9 commits into
developfrom
repowise-analysis
Jul 25, 2026
Merged

chore: repowise health config + initial analysis#149
randlee merged 9 commits into
developfrom
repowise-analysis

Conversation

@rand-lee

@rand-lee rand-lee commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Comprehensive repowise code health analysis for sc-compose v1.2.0.

Repowise Wiki (70 pages, 3M tokens via Codex CLI)

docs/repowise/wiki/ — 69 HTML files, 600KB

Page Type Count
Onboarding 6 (Active Landscape, Codebase Map, Getting Started, Guided Tour, How It Works, Key Concepts)
File pages 44 (every source file in both crates + bindings)
Layer pages 6 (Application, CLI, Config, Docs/Tooling, Test, Types)
Symbol spotlights 8 (critical types)
Architecture diagram 1
Infra + other 5

Health Analysis (fresh re-index)

Metric Value
Overall Health 7.9/10
Hotspot Health 4.7/10
Worst File cli.rs (1.6/10)
Predictive Accuracy 20/20 worst files had bugs (4.46× baseline)
Dead Code 61 findings
Refactoring Targets 20 ranked by ROI

Standard Artifacts

  • .sc/repowise/ — config, generation script, raw JSON data
  • docs/repowise/health.md — 332-line comprehensive report
  • docs/repowise/health-sc-compose.md / health-sc-composer.md — module reports
  • docs/repowise/risk.json, badge.md, architecture.html

To regenerate (IDEMPOTENT)

repowise init --provider codex_cli --yes --concurrency 3
repowise export --format html -o docs/repowise/wiki
python3 .sc/repowise/generate-report.py

randlee and others added 8 commits July 22, 2026 12:55
- .sc/repowise.yaml: defines production modules (sc-compose, sc-composer),
  annotated paths (bindings FFI, prototype, scripts), and diagram specs
- docs/repowise/: health reports, risk assessment, architecture diagram
- Health: 8.2/10, 19/20 worst files had bugs (4.98× baseline)
Replace thin --format md health dumps with rich JSON-driven reports:
- health.md: 332-line comprehensive report with interpretation,
  biomarker analysis, refactoring targets, dead code audit,
  and top 5 actionable recommendations
- health-sc-compose.md: module-focused CLI health summary
- health-sc-composer.md: module-focused engine health summary

Methodology: parse repowise --format json output, cross-reference
findings across health/dead-code/refactoring-targets, annotate
false positives (PyO3 .pyi stubs), produce human-readable
recommendations with impact/effort scoring.
Standardize randlee repo repowise artifact layout:
- .sc/repowise/repowise.yaml: config + layout documentation
- .sc/repowise/generate-report.py: reproducible report generation
- .sc/repowise/data/*.json: raw JSON exports (health, refactoring, dead-code)
- docs/repowise/: rendered output (health.md, badge.md, risk.json, architecture.html)

This makes reports reproducible — regenerate with:
python3 .sc/repowise/generate-report.py

Raw data refresh:
repowise health --format json > .sc/repowise/data/health.json
repowise health --format json --refactoring-targets > .sc/repowise/data/refactoring-targets.json
repowise dead-code --format json > .sc/repowise/data/dead-code.json
Generated via: repowise init --provider codex_cli --concurrency 3

Wiki pages (docs/repowise/wiki/):
- 69 HTML files, 600KB
- 6 onboarding pages: Project Overview, Architecture Guide,
  Getting Started, Codebase Map, Key Concepts, Development Guide
- 44 file-level documentation pages
- 6 architectural layer pages
- 8 symbol spotlights, 1 architecture diagram, 1 repo overview

Updated health metrics (fresh re-index):
- Health: 7.9/10 (hotspot: 4.7), worst: cli.rs (1.6/10)
- Predictive: 20/20 worst files had bugs (4.46x baseline)
- 61 dead code findings, 20 refactoring targets

Updated data files, health.md, badge.md with fresh metrics.
…e path

Fixes three review findings:

1. generate-report.py now reads from .sc/repowise/data/ (not /tmp/), writes to
   docs/repowise/health.md (not /tmp/repowise-final.md), and resolves
   version/commit/date dynamically from git instead of hardcoding v1.2.0/b5d9b47.

2. New docs/repowise/README.md documents all repowise modes run, output
   artifacts, and exact regeneration commands.

3. Architecture diagram moved to site/repowise/architecture.html for web
   integration. .sc/repowise.yaml updated to reflect new path.

Also: re-indexed codebase against current develop HEAD, regenerated all
non-agent data (health, refactoring, dead-code, badge, risk, architecture).
…s-link

- Rewrite README.md with full 3-phase pipeline (index → export → compile)
  covering all artifacts including risk.json, badge.md, architecture.html,
  and wiki/ generation.
- Fix 'Three modes were run' → explicit phases table with all 7 commands.
- Add cross-reference from main README.md Documentation section.
69 wiki HTML pages moved from docs/repowise/wiki/ to site/repowise/wiki/ for
web integration. docs/repowise/README.md, .sc/repowise.yaml updated.

Add .gitignore entries for repowise binary caches (lancedb, pickle files,
wiki.db) to prevent accidental commits.
@randlee
randlee force-pushed the repowise-analysis branch from d0bdf03 to 3646089 Compare July 25, 2026 02:59
@randlee
randlee marked this pull request as draft July 25, 2026 03:07
…ecture.py

- New .sc/repowise/generate-architecture.py reads knowledge-graph.json and
  Cargo.toml to produce site/repowise/architecture.html. Resolves
  version/commit/date from git — fully reproducible from repo alone.
- Replaces *(manual)* entry in README pipeline docs.
- Fix malformed wiki row in Output Artifacts table (extra column).
- .sc/repowise.yaml updated to document new script.
@randlee
randlee marked this pull request as ready for review July 25, 2026 03:52
@randlee
randlee merged commit fdfe32f into develop Jul 25, 2026
9 checks passed
@randlee
randlee deleted the repowise-analysis branch July 25, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants