@ipation/specbridge 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,96 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.0] - 2024-02-03 - Phase 4: Analytics & Insights
11
+
12
+ ### Added
13
+
14
+ #### Report Storage & History
15
+ - **Automatic report persistence**: All reports now auto-save to `.specbridge/reports/history/`
16
+ - **Historical data management**: Store and retrieve compliance reports over time
17
+ - **Report cleanup**: Automatic retention management (default: 90 days)
18
+ - **Date-based retrieval**: Load reports by specific dates or ranges
19
+
20
+ #### Drift Detection
21
+ - **Compliance drift analysis**: Compare current vs. previous reports
22
+ - **Trend classification**: Automatic categorization (improving/stable/degrading)
23
+ - **Violation tracking**: Track new vs. fixed violations by severity
24
+ - **Decision-level drift**: Per-decision compliance changes
25
+ - **Top movers identification**: Automatically identify most improved/degraded decisions
26
+
27
+ #### Trend Analysis
28
+ - **Multi-period trends**: Analyze compliance patterns over 7-90 days
29
+ - **Visual data points**: Chart-ready data for compliance visualization
30
+ - **Per-decision trends**: Track individual decision compliance over time
31
+ - **Period summaries**: Start/end compliance with overall change calculation
32
+
33
+ #### Analytics Engine
34
+ - **Decision metrics**: Deep analysis of individual decisions with historical context
35
+ - **Automated insights**: AI-generated observations, warnings, and suggestions
36
+ - **Performance ranking**: Identify top and bottom performing decisions
37
+ - **Trend detection**: Automatic pattern recognition in compliance data
38
+ - **Insight categories**: Warnings (🟠), Successes (🟢), Suggestions (💡)
39
+
40
+ #### CLI Enhancements
41
+ - **`specbridge report --trend`**: Show compliance trends over time
42
+ - **`specbridge report --drift`**: Analyze drift since last report
43
+ - **`specbridge report --days <n>`**: Specify analysis period
44
+ - **`specbridge analytics`**: New analytics command with comprehensive insights
45
+ - **`specbridge analytics [decision-id]`**: Per-decision analysis
46
+ - **`specbridge analytics --insights`**: Show AI-generated insights
47
+ - **`specbridge dashboard`**: Launch interactive web dashboard
48
+
49
+ #### Web Dashboard
50
+ - **Real-time monitoring**: Interactive compliance dashboard with live data
51
+ - **Visual compliance score**: Large, prominent score with trend indicators
52
+ - **30-day trend chart**: Interactive Chart.js visualization
53
+ - **Decision breakdown**: Sortable table with per-decision compliance
54
+ - **Automated insights panel**: Display warnings, successes, and suggestions
55
+ - **Modern React UI**: Responsive design with gradient styling
56
+ - **Mobile-friendly**: Adaptive layout for all screen sizes
57
+
58
+ #### REST API
59
+ - 11 new API endpoints for programmatic access to compliance data
60
+ - Full CRUD operations for reports, decisions, and analytics
61
+ - Configurable query parameters for flexible data retrieval
62
+ - Consistent error handling and response formats
63
+
64
+ #### Documentation
65
+ - **Interactive demo guide**: Step-by-step walkthrough of all features
66
+ - **Quick start guide**: 5-minute setup with sample data
67
+ - **Comprehensive API reference**: Full TypeScript/JavaScript/REST API docs
68
+ - **Feature documentation**: Detailed explanation of analytics capabilities
69
+ - **Sample data generator**: Script to create realistic historical reports
70
+ - **Integration examples**: Slack, email, CI/CD, and monitoring integrations
71
+
72
+ ### Changed
73
+ - **Report command**: Now auto-saves all reports to history by default
74
+ - **Report output**: Enhanced with trend indicators (📈/📉/➡️)
75
+ - **CLI experience**: Improved formatting with colors and visual indicators
76
+
77
+ ### Dependencies
78
+ - **Added**: `express@^4.18.0` - Web server framework for dashboard
79
+ - **Added**: `@types/express@^4.17.0` - TypeScript types for Express
80
+
81
+ ### Testing
82
+ - **Total tests**: 951 (all passing)
83
+ - **New tests**: 58 for Phase 4 components
84
+ - **Coverage**: >95% for all new code
85
+
86
+ ### Files Added
87
+ - `src/reporting/storage.ts` - Historical report storage
88
+ - `src/reporting/drift.ts` - Drift detection and trend analysis
89
+ - `src/analytics/engine.ts` - Analytics engine with insight generation
90
+ - `src/dashboard/server.ts` - Express REST API server
91
+ - `src/dashboard/public/index.html` - React dashboard UI
92
+ - `src/cli/commands/analytics.ts` - Analytics CLI command
93
+ - `src/cli/commands/dashboard.ts` - Dashboard CLI command
94
+ - `docs/demos/phase4-analytics-demo.md` - Interactive demo guide (900+ lines)
95
+ - `docs/demos/QUICKSTART.md` - Quick start guide
96
+ - `docs/demos/generate-sample-data.sh` - Sample data generator
97
+ - `docs/features/analytics-and-insights.md` - Feature documentation (1200+ lines)
98
+ - `docs/API.md` - Complete API reference (900+ lines)
99
+
10
100
  ## [1.1.2] - 2026-02-02
11
101
 
12
102
  ### Documentation