goal

Enhanced Summary: Before vs After

❌ BEFORE: Traditional Commit (Statistics-Based)

refactor(core): add testing, logging, validation

Statistics: 7 files changed, 1404 insertions, 16 deletions

Summary:
- Dirs: goal=7
- Exts: .py=7
- A/M/D: 2/5/0

Added files:
- goal/deep_analyzer.py (+515/-0)
- goal/enhanced_summary.py (+493/-0)

Modified files:
- goal/cli.py (+8/-1)
- goal/commit_generator.py (+75/-1)
- goal/config.py (+101/-0)
- goal/formatter.py (+82/-0)
- goal/smart_commit.py (+130/-14)

Implementation notes (heuristics):
- Type inferred from file paths + diff keywords + add/delete ratio
- Scope prefers 'goal' when goal/* is touched; otherwise based on top-level dirs
- For <=6 files: generate short per-file notes from added lines
- A/M/D derived from git name-status; per-file +X/-X from git numstat

Problems with Traditional Format

Issue Impact
“add testing, logging, validation” Generic keywords, not business value
No file relationships Can’t see how changes connect
+1404 lines = size Doesn’t communicate meaning
Statistical focus Missing developer benefit
Developer value 2/10

✅ AFTER: Enhanced Summary (Business-Value)

feat(goal): deep code analysis engine

NEW CAPABILITIES:
├── deep code analysis engine: intelligent change detection
├── code relationship mapping: architecture understanding
├── code quality metrics: maintainability tracking
├── multi-language support: universal code analysis
├── configuration management: customizable workflows

FUNCTIONAL COMPONENTS:
✅ summary generator (generate_enhanced_summary)
✅ diff analysis engine (analyze_file_diff)
✅ complexity analyzer (_calculate_complexity)
✅ language-specific code analyzer (_analyze_generic_diff)
✅ dependency graph builder (detect_relations)

IMPACT:
📊 Complexity: +549%
🔗 Relations: 0.1 density
⭐ Value score: 85/100

RELATIONS:
Chain: cli→commit_generator→smart_commit

Files: analysis: deep_analyzer.py; core: commit_generator.py, enhanced_summary.py, smart_commit.py; cli: cli.py; config: config.py; output: formatter.py

Improvements with Enhanced Format

Feature Benefit
Business value title “deep code analysis engine” - clear purpose
Capability detection Shows what features were added
Role mapping Functions named by purpose, not code
Quality metrics 85/100 value score, complexity tracking
Relation chains cli→generator dependency visible
Domain grouping Files organized by area
Developer value 9/10

Side-by-Side Comparison

Aspect Before After
Title add testing, logging, validation deep code analysis engine
Focus Statistics (+1404 lines) Business value (5 capabilities)
Entities Raw names (_analyze_diff) Roles (“language-specific analyzer”)
Relations None cli→generator→smart_commit
Metrics File counts only Value score, complexity, relations
Grouping By add/modify/delete By domain (core, cli, config)

How to Enable

Enhanced summary is automatic when goal.yaml exists:

# Initialize with config
goal init

# Enhanced summary is now default
goal push --dry-run

To compare formats:

# Enhanced (default)
goal push --dry-run --abstraction auto

# Legacy format
goal push --dry-run --abstraction legacy