Skip to content

Commit d807069

Browse files
committed
version 0.55 - with code partitioning/detouring
1 parent 463fa27 commit d807069

File tree

17 files changed

+4792
-314
lines changed

17 files changed

+4792
-314
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 76 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img src="assets/ragix-logo.png" alt="RAGIX Logo" height="128"><br>
33
</p>
44

5-
# RAGIX v0.51.0
5+
# RAGIX v0.55.0
66

77
*(Retrieval-Augmented Generative Interactive eXecution Agent)*
88

@@ -15,7 +15,7 @@
1515

1616
---
1717

18-
**Version:** 0.51.0 | **Author:** Olivier Vitrac, PhD, HDR | olivier.vitrac@adservio.fr | Adservio
18+
**Version:** 0.55.0 | **Author:** Olivier Vitrac, PhD, HDR | olivier.vitrac@adservio.fr | Adservio
1919
**Updated:** 2025-12-11
2020

2121
---
@@ -42,39 +42,85 @@ All processing happens **100% on your machine**. Not a single token leaves it.
4242

4343
---
4444

45-
## **What's New in v0.51.0**
45+
## **What's New in v0.55.0**
4646

4747
| Feature | Description |
4848
|---------|-------------|
49-
| **Robust Project Discovery** | Python-based discovery for multi-module Java projects (SIAS: 1137 files) |
50-
| **Improved Type Safety** | Fixed javalang type annotations with forward references |
51-
| **Code Tracker API Tests** | Professional test suite for tracker endpoints with 89% pass rate |
52-
| **Partitioner Core Engine** | Codebase partitioning module for v0.55 feature preparation |
53-
| **v0.55 Plan** | Detailed specification for Partitioner with force-directed visualization |
54-
55-
### v0.51.0 Highlights (Latest)
49+
| **Codebase Partitioner** | Separate Java codebases into logical applications (App A, App B, Shared, Dead Code) |
50+
| **Force-Directed Visualization** | D3.js molecular physics simulation for partition clustering |
51+
| **Multi-Format Export** | JSON, CSV, XLSX exports with file paths, methods, and line numbers |
52+
| **Evidence Chains** | Full traceability of classification decisions (fingerprint, graph propagation) |
53+
| **Preset Configurations** | SIAS/TICC, Generic Two Apps, Generic Three Apps patterns |
54+
| **Cross-Partition Analysis** | Identify coupling points between applications for refactoring |
55+
56+
### v0.55.0 Highlights (Latest)
57+
58+
- **SIAS/GRDF Service Detection** β€” Enterprise Java audit for multi-module projects
59+
- **SIAS patterns**: `spre##`, `sprebpm`, `spremail`, `s[ActionName]` task operations
60+
- **Multi-module Maven support**: Auto-detect `app-pre-main/sat-pre-echange/src/` structures
61+
- **Service pattern presets**: IOWIZME (SK/SC/SG), SIAS/GRDF (spre##), Combined
62+
- **Configurable patterns**: Audit Settings UI with regex pattern configuration
63+
64+
- **MDS/Partition-Based Graph Layout** β€” Precomputed positions for large codebases
65+
- **MDS layout**: Classical multidimensional scaling using eigendecomposition for small graphs (<500 nodes)
66+
- **Partition-based layout**: Fast O(n) circular layout for large graphs (>500 nodes like SIAS 17K)
67+
- **Auto-stop simulation**: D3.js simulation stabilizes quickly with precomputed positions
68+
- **Memory optimization**: Reduced animation overhead for enterprise codebases
69+
70+
- **Audit Settings Enhancement** β€” Service Detection Patterns section
71+
- **Service ID Patterns**: Configurable regex patterns (one per line)
72+
- **Package Patterns**: Java package patterns for component detection
73+
- **Presets dropdown**: Quick selection of IOWIZME, SIAS/GRDF, or Combined patterns
74+
- **Risk weights**: Configurable weights for age, volatility, complexity, coverage
75+
76+
- **Partition Graph Improvements**
77+
- **Label visibility**: All node labels visible at max zoom with text-shadow outline
78+
- **Line slider**: Smooth scrolling to target line in code preview using `scrollIntoView()`
79+
- **Filter toggle**: Show/hide connections between partitions
80+
- **DEAD_CODE color**: Distinct styling for unreachable code nodes
81+
82+
- **Dedicated Partitioner Tab** β€” Full-featured partition analysis interface
83+
- Independent navigation tab for clarity and focus
84+
- Two-column layout: Configuration panel + Visualization
85+
- Project path selector with folder browser
86+
- Compact application configuration with color dots
87+
88+
- **Force-Directed Visualization** β€” Physics-based graph for natural clustering
89+
- D3.js force simulation with charge, link, center, collision forces
90+
- **Zoom/Pan controls**: Zoom in/out, reset view, fit to view buttons
91+
- **Force tuning sliders**: Repulsion, Link Distance, Link Strength, Center Gravity, Collision
92+
- **Force presets**: Separated, Clustered, Balanced for quick adjustments
93+
- Node/edge tooltips with detailed information (FQN, partition, LOC, dependencies)
94+
- Arrow markers on edges showing direction
95+
- Labels toggle for node names
96+
97+
- **Export System** β€” Multi-format outputs for refactoring
98+
- **SVG export**: Vector graphics for documentation and presentations
99+
- **PNG export**: High-resolution raster image (2x resolution)
100+
- JSON: Full partition data with metadata, evidence, cross-partition analysis
101+
- CSV: Spreadsheet-ready format with FQN, partition, confidence, file, LOC
102+
103+
- **File Preview Pane** β€” Audit-style code inspection
104+
- Slide-in preview panel with file content
105+
- Evidence chain display showing classification reasons
106+
- LOC, partition, confidence metrics at a glance
107+
108+
- **Configuration Features**
109+
- Preset selector: SIAS/TICC, Generic Two Apps, Generic Three Apps
110+
- Dynamic application cards with pattern inputs (comma/newline separated)
111+
- Shared patterns configuration
112+
- Advanced options: Propagation iterations, Confidence threshold
113+
114+
- **API Endpoints** β€” RESTful interface for automation
115+
- `POST /api/ast/partition` β€” Run partition analysis with configuration
116+
- `GET /api/ast/partition/presets` β€” Get preset configurations
117+
- `GET /api/ast/partition/export` β€” Export results in various formats
118+
119+
### v0.51.0 Highlights
56120

57121
- **Project Discovery** β€” Robust Python-based discovery for enterprise codebases
58-
- Multi-module Java project support (finds common ancestor for >3 src directories)
59-
- Correct file counting across all modules (SIAS: 1137 files vs previous 6)
60-
- Multiple source patterns: `src/`, `source/`, `Sources/`, `java/`
61-
- JSON output for automation and testing
62-
63-
- **Type Safety Improvements** β€” Fixed all javalang type annotations
64-
- Forward references using string annotations avoid NameError when javalang unavailable
65-
- Affected: `Import`, `JavaNode`, `MethodDeclaration`, `ConstructorDeclaration`, `FieldDeclaration`, `FormalParameter`
66-
67-
- **Code Tracker Test Suite** β€” Professional API testing
68-
- Tests for outliers, complexity, dead code, coupling endpoints
69-
- Validation of entropy, Gini, zone classification
70-
- Response time verification (<30s threshold)
71-
- JSON reports generated per project
72-
73-
- **Partitioner Core** β€” Preparation for v0.55 feature
74-
- `ragix_audit/partitioner.py` with `CodebasePartitioner` engine
75-
- Evidence chains for classification traceability
76-
- Application fingerprint matching
77-
- SIAS/TICC preset configuration
122+
- **Type Safety** β€” Fixed javalang type annotations with forward references
123+
- **Code Tracker Tests** β€” Professional test suite (89% pass rate)
78124

79125
### v0.50.0 Highlights
80126

β€ŽTODO.mdβ€Ž

Lines changed: 121 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,145 @@
11
# TODO β€” RAGIX Roadmap
22

3-
**Updated:** 2025-12-11 (v0.51.0 - Project Discovery & Partitioner Core)
3+
**Updated:** 2025-12-11 (v0.55.0 - Codebase Partitioner)
44
**Reference:** See `PLAN_v0.30_REASONING.md` for full implementation plan
55
**Review:** See `REVIEW_current_reasoning_towardsv0.30.md` for colleague feedback
6-
**Current:** v0.51.0 - Stabilization & v0.55 Preparation (see `PLAN_v0.55.md` for Partitioner feature)
6+
**Current:** v0.55.0 - Codebase Partitioner with Force-Directed Visualization
77

88
---
99

10-
## Session Completed (2025-12-11 - v0.51.0)
10+
## Session Completed (2025-12-11 - v0.55.0 Sprint 2: SIAS/GRDF Audit)
1111

12-
### Project Discovery & Partitioner Preparation
12+
### SIAS Service Detection & Audit Improvements
1313

1414
| Task | Status |
1515
|------|--------|
16-
| **Python Project Discovery** - Robust multi-module Java project discovery | βœ… Done |
17-
| **Common Ancestor Detection** - Find common parent for >3 src directories | βœ… Done |
18-
| **Correct File Counting** - Sum Java files across all modules | βœ… Done |
19-
| **Type Annotation Fixes** - Forward references for javalang types | βœ… Done |
20-
| **Code Tracker Test Suite** - Professional API test suite | βœ… Done |
21-
| **Test Assertion Fixes** - Match server response format (entropy.structural, inequality.gini) | βœ… Done |
22-
| **Partitioner Core Engine** - `ragix_audit/partitioner.py` with evidence chains | βœ… Done |
23-
| **v0.55 Plan Document** - Detailed specification for Partitioner feature | βœ… Done |
24-
| **Version Update** - Bumped to v0.51.0 | βœ… Done |
16+
| **SIAS Service Patterns** - `spre##`, `sprebpm`, `spremail`, `s[ActionName]` detection | βœ… Done |
17+
| **Multi-Module Maven Support** - Auto-detect `app-pre-main/.../src/` structures | βœ… Done |
18+
| **Service Pattern Presets** - IOWIZME, SIAS/GRDF, Combined in Audit Settings | βœ… Done |
19+
| **Audit Settings UI** - Service Detection Patterns section with textarea inputs | βœ… Done |
20+
| **ID Normalization** - Uppercase IDs for consistency (service_detector ↔ timeline) | βœ… Done |
21+
| **MDS Graph Layout** - Eigendecomposition-based positioning for small graphs | βœ… Done |
22+
| **Partition-Based Layout** - O(n) circular layout for large graphs (>500 nodes) | βœ… Done |
23+
| **Auto-Stop Simulation** - D3.js stabilization with precomputed positions | βœ… Done |
24+
| **Label Visibility Fix** - All labels visible at max zoom with text-shadow | βœ… Done |
25+
| **Line Slider Fix** - `scrollIntoView()` for smooth code navigation | βœ… Done |
26+
| **Risk Analysis Fix** - Services now match timeline IDs for risk scoring | βœ… Done |
27+
28+
**Key Files Created/Modified:**
29+
- `ragix_audit/component_mapper.py` - SIAS patterns (spre##, JMS, TASK types)
30+
- `ragix_audit/service_detector.py` - SIAS annotations, multi-module path handling
31+
- `ragix_audit/partitioner.py` - `compute_layout()`, MDS, partition-based layout
32+
- `ragix_web/routers/audit.py` - `_get_source_path()` helper for multi-module projects
33+
- `ragix_web/static/index.html` - Service patterns UI, presets, label fixes, line slider
34+
- `ragix_web/static/style.css` - Textarea styling, label text-shadow
35+
36+
**Results:**
37+
- SIAS: 46 services detected (was 0), 26 with risk scores
38+
- IOWIZME: 27 services (unchanged, still working)
39+
- Partition analysis: 0.28s for 17K nodes (was timing out)
40+
41+
---
42+
43+
## Session Completed (2025-12-11 - v0.55.0 Sprint 1: Partitioner)
44+
45+
### Codebase Partitioner Feature
46+
47+
| Task | Status |
48+
|------|--------|
49+
| **Partitioner API Endpoints** - POST /api/ast/partition, GET /presets, GET /export | βœ… Done |
50+
| **Partitioner Section UI** - Config panel with application cards, patterns, shared patterns | βœ… Done |
51+
| **Preset Configurations** - SIAS/TICC, Generic Two Apps, Generic Three Apps | βœ… Done |
52+
| **Force-Directed Visualization** - D3.js physics simulation with partition clustering | βœ… Done |
53+
| **Accordion Class Lists** - Expandable groups by partition with class details | βœ… Done |
54+
| **Export System** - JSON, CSV, XLSX formats with file paths, confidence, evidence | βœ… Done |
55+
| **Cross-Partition Detection** - Red-highlighted edges between different partitions | βœ… Done |
56+
| **Interactive Graph** - Drag nodes, pause/resume simulation, tooltips, legend | βœ… Done |
57+
| **Summary Statistics** - Total classes, coverage, cross-partition edges, coupling density | βœ… Done |
58+
| **Version Update** - Bumped to v0.55.0 | βœ… Done |
2559

2660
**Key Files Created/Modified:**
27-
- `tests/audit/discover_projects.py` - NEW: Python project discovery with JSON output
28-
- `tests/audit/run_audit_tests.sh` - Updated to use Python discovery
29-
- `tests/audit/test_tracker_api.py` - Fixed test assertions for server response format
30-
- `ragix_core/ast_java.py` - Fixed all javalang type annotations using forward references
31-
- `ragix_audit/partitioner.py` - NEW: Core partitioning engine with evidence chains
32-
- `PLAN_v0.55.md` - NEW: Detailed specification for Partitioner feature
33-
- `ragix_core/version.py` - Updated to 0.51.0
34-
35-
**Type Annotations Fixed:**
36-
- `_convert_compilation_unit()` - `tree: "CompilationUnit"`
37-
- `_convert_import()` - `imp: "Import"`
38-
- `_convert_member()` - `node: "JavaNode"`
39-
- `_convert_method()` - `node: "MethodDeclaration"`
40-
- `_convert_constructor()` - `node: "ConstructorDeclaration"`
41-
- `_convert_field()` - `node: "FieldDeclaration"`
42-
- `_convert_parameter()` - `param: "FormalParameter"`
43-
- `_extract_calls()` - `node: "MethodDeclaration"`
44-
45-
**Test Results (IOWIZME):**
46-
- 8/9 tests passing (89%)
47-
- Outliers: 10 files
48-
- Complex methods: 14
49-
- Dead code candidates: 4094
50-
- Coupling packages: 225
61+
- `ragix_web/server.py` - Added Partitioner API (partition, presets, export endpoints)
62+
- `ragix_web/static/index.html` - Added Partitioner section with config, graph, accordion
63+
- `ragix_web/static/style.css` - Added 600+ lines of Partitioner CSS styles
64+
- `ragix_audit/partitioner.py` - Core engine with fingerprint matching, graph propagation
65+
- `ragix_core/version.py` - Updated to 0.55.0
66+
- `README.md` - Updated with v0.55.0 features
67+
- `PLAN_v0.55.md` - Detailed specification document
68+
69+
**API Endpoints:**
70+
- `POST /api/ast/partition` - Run partition analysis with configuration
71+
- `GET /api/ast/partition/status` - Check partitioner availability
72+
- `GET /api/ast/partition/presets` - Get preset configurations
73+
- `GET /api/ast/partition/export` - Export results in JSON/CSV/XLSX
74+
75+
**UI Components:**
76+
- Partitioner card in AST visualizations section
77+
- Configuration panel with dynamic application cards
78+
- Textarea inputs for patterns (package, class, keyword)
79+
- Shared patterns configuration
80+
- Advanced options (propagation iterations, confidence threshold)
81+
- Summary statistics bar with badges
82+
- Force-directed D3.js graph with zoom/pan
83+
- Accordion class lists sorted by partition size
84+
- Export buttons (JSON, CSV, XLSX)
5185

5286
---
5387

54-
## Roadmap: v0.55 - Codebase Partitioner
88+
## Missing Steps for v0.55 Completion
89+
90+
### Service Pattern Configuration Backend
91+
92+
| Task | Priority | Status |
93+
|------|----------|--------|
94+
| **Backend API for Service Patterns** - POST /api/audit/config with `service_patterns` | High | Pending |
95+
| **Runtime Pattern Reload** - Apply custom patterns without restart | High | Pending |
96+
| **Pattern Validation** - Validate regex patterns before saving | Medium | Pending |
97+
| **Pattern Export/Import** - Save/load pattern configurations as JSON | Low | Pending |
98+
99+
### Audit Tab Polish
55100

56-
**Reference:** See `PLAN_v0.55.md` for detailed specification
101+
| Task | Priority | Status |
102+
|------|----------|--------|
103+
| **Services Table Sorting** - Sort by ID, Type, Files, Risk, Age | Medium | Pending |
104+
| **Services Filter** - Filter by type (service/screen/general), risk level | Medium | Pending |
105+
| **Risk Badge Colors** - Color-coded risk badges (green/yellow/orange/red) | Medium | Pending |
106+
| **Age Display** - Show age in years/months for services | Low | Pending |
107+
| **Category Display** - Show lifecycle category (NEW/ACTIVE/MATURE/LEGACY) | Low | Pending |
108+
109+
### Testing & Validation
110+
111+
| Task | Priority | Status |
112+
|------|----------|--------|
113+
| **SIAS Full Audit Test** - End-to-end test with all 46 services | High | Pending |
114+
| **IOWIZME Regression Test** - Verify SK/SC/SG detection unchanged | High | Pending |
115+
| **Pattern Preset Validation** - Test all presets generate expected results | Medium | Pending |
116+
117+
---
57118

58-
### Partitioner Feature
119+
## Roadmap: v0.60 - RAG Partition Integration
120+
121+
### Planned Features
59122

60123
| Task | Priority | Status |
61124
|------|----------|--------|
62-
| **Partitioner Tab UI** - New tab in AST section for partitioning | High | Pending |
63-
| **Force-Directed Visualization** - D3.js molecular physics simulation | High | Pending |
64-
| **Partition Labels** - APP_A, APP_B, SHARED, DEAD_CODE, UNKNOWN | High | Pending |
65-
| **Evidence Chains** - Classification traceability (fingerprint, neighbor, shared) | High | Pending |
66-
| **Export Formats** - JSON, CSV, XLSX with line numbers and methods | High | Pending |
67-
| **RAG Integration** - Partition tags in global vector store metadata | High | Pending |
68-
| **Cross-Partition Coupling** - Analyze dependencies between partitions | Medium | Pending |
69-
| **Batch Analysis** - Process large codebases efficiently | Medium | Pending |
70-
71-
### v0.55 Implementation Phases
72-
73-
| Phase | Description | Effort | Status |
74-
|-------|-------------|--------|--------|
75-
| **Phase 1** - Core Backend | Integrate partitioner.py with server API | 2 days | Pending |
76-
| **Phase 2** - Basic UI | Partitioner tab with config and results tables | 2 days | Pending |
77-
| **Phase 3** - Force-Directed Viz | D3.js molecular visualization | 3 days | Pending |
78-
| **Phase 4** - Export System | JSON/CSV/XLSX generators | 1 day | Pending |
79-
| **Phase 5** - RAG Integration | Partition metadata in vector store | 2 days | Pending |
80-
| **Phase 6** - Polish & Testing | Documentation and test suite | 2 days | Pending |
125+
| **RAG Partition Metadata** - Add partition tags to vector store chunks | High | Pending |
126+
| **Partition Filter in Search** - Filter RAG results by partition | High | Pending |
127+
| **Chat Partition Context** - Include partition info in AI context | Medium | Pending |
128+
| **Automated Pattern Discovery** - ML-based fingerprint suggestion | Low | Planned |
129+
| **Migration Planning** - Generate refactoring roadmap from partitions | Low | Planned |
130+
131+
---
132+
133+
## Session Completed (2025-12-11 - v0.51.0)
134+
135+
### Project Discovery & Type Safety
136+
137+
| Task | Status |
138+
|------|--------|
139+
| **Python Project Discovery** - Robust multi-module Java project discovery | βœ… Done |
140+
| **Common Ancestor Detection** - Find common parent for >3 src directories | βœ… Done |
141+
| **Type Annotation Fixes** - Forward references for javalang types | βœ… Done |
142+
| **Code Tracker Test Suite** - Professional API test suite (89% pass rate) | βœ… Done |
81143

82144
---
83145

β€Žexamples/test_llm_backends.shβ€Ž

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ BLUE='\033[0;34m'
2626
CYAN='\033[0;36m'
2727
NC='\033[0m' # No Color
2828

29+
# Get version from ragix_core
30+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
31+
RAGIX_VERSION=$(grep -oP '__version__\s*=\s*"\K[^"]+' "$SCRIPT_DIR/ragix_core/version.py" 2>/dev/null || echo "0.55.0")
32+
2933
echo -e "${CYAN}======================================================================${NC}"
30-
echo -e "${CYAN} RAGIX v0.7 - LLM Backend Real Integration Test${NC}"
34+
echo -e "${CYAN} RAGIX v${RAGIX_VERSION} - LLM Backend Real Integration Test${NC}"
3135
echo -e "${CYAN}======================================================================${NC}"
3236
echo ""
3337

β€Žlaunch_ragix.shβ€Ž

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ set -e
3333
ENV_NAME="ragix-env"
3434
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3535

36+
# Get version from ragix_core/version.py
37+
get_version() {
38+
if [ -f "$SCRIPT_DIR/ragix_core/version.py" ]; then
39+
grep -oP '__version__\s*=\s*"\K[^"]+' "$SCRIPT_DIR/ragix_core/version.py" 2>/dev/null || echo "0.55.0"
40+
else
41+
echo "0.55.0"
42+
fi
43+
}
44+
RAGIX_VERSION=$(get_version)
45+
3646
# Colors for output
3747
RED='\033[0;31m'
3848
GREEN='\033[0;32m'
@@ -51,7 +61,7 @@ print_banner() {
5161
echo ""
5262
echo -e "${CYAN}╔══════════════════════════════════════════════════════════════════╗${NC}"
5363
echo -e "${CYAN}β•‘${NC} ${CYAN}β•‘${NC}"
54-
echo -e "${CYAN}β•‘${NC} ${BOLD}${GREEN}RAGIX${NC} v0.7 β€” Retrieval-Augmented Generative IX Agent ${CYAN}β•‘${NC}"
64+
echo -e "${CYAN}β•‘${NC} ${BOLD}${GREEN}RAGIX${NC} v${RAGIX_VERSION} β€” Retrieval-Augmented Generative IX Agent ${CYAN}β•‘${NC}"
5565
echo -e "${CYAN}β•‘${NC} ${CYAN}β•‘${NC}"
5666
echo -e "${CYAN}β•‘${NC} ${MAGENTA}Sovereign β€’ Local-First β€’ Unix-RAG Patterns${NC} ${CYAN}β•‘${NC}"
5767
echo -e "${CYAN}β•‘${NC} ${CYAN}β•‘${NC}"

0 commit comments

Comments
Β (0)