@ipation/specbridge 1.1.2 → 1.2.1
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 +103 -0
- package/README.md +32 -1
- package/dist/cli.js +999 -18
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +116 -1
- package/dist/index.js +288 -0
- package/dist/index.js.map +1 -1
- package/dist/public/index.html +551 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,109 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.1] - 2026-02-03
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Dashboard Chart.js rendering**: Fixed chart initialization timing issue by adding 100ms delay to ensure canvas element is fully mounted before rendering
|
|
14
|
+
- **Build process**: Configured tsup to automatically copy dashboard static files (`src/dashboard/public/`) to `dist/public/` during build
|
|
15
|
+
- **Chart enhancements**: Added better error handling, formatted date labels, tooltips, and improved visual styling for compliance trend chart
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Build output**: Dashboard static files now automatically included in build output without manual intervention
|
|
19
|
+
- **.gitignore**: Added `.playwright-mcp/` and `.specbridge/reports/history/` to ignore test and runtime artifacts
|
|
20
|
+
|
|
21
|
+
## [1.2.0] - 2026-02-03
|
|
22
|
+
|
|
23
|
+
### Phase 4: Analytics & Insights
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
#### Report Storage & History
|
|
28
|
+
- **Automatic report persistence**: All reports now auto-save to `.specbridge/reports/history/`
|
|
29
|
+
- **Historical data management**: Store and retrieve compliance reports over time
|
|
30
|
+
- **Report cleanup**: Automatic retention management (default: 90 days)
|
|
31
|
+
- **Date-based retrieval**: Load reports by specific dates or ranges
|
|
32
|
+
|
|
33
|
+
#### Drift Detection
|
|
34
|
+
- **Compliance drift analysis**: Compare current vs. previous reports
|
|
35
|
+
- **Trend classification**: Automatic categorization (improving/stable/degrading)
|
|
36
|
+
- **Violation tracking**: Track new vs. fixed violations by severity
|
|
37
|
+
- **Decision-level drift**: Per-decision compliance changes
|
|
38
|
+
- **Top movers identification**: Automatically identify most improved/degraded decisions
|
|
39
|
+
|
|
40
|
+
#### Trend Analysis
|
|
41
|
+
- **Multi-period trends**: Analyze compliance patterns over 7-90 days
|
|
42
|
+
- **Visual data points**: Chart-ready data for compliance visualization
|
|
43
|
+
- **Per-decision trends**: Track individual decision compliance over time
|
|
44
|
+
- **Period summaries**: Start/end compliance with overall change calculation
|
|
45
|
+
|
|
46
|
+
#### Analytics Engine
|
|
47
|
+
- **Decision metrics**: Deep analysis of individual decisions with historical context
|
|
48
|
+
- **Automated insights**: AI-generated observations, warnings, and suggestions
|
|
49
|
+
- **Performance ranking**: Identify top and bottom performing decisions
|
|
50
|
+
- **Trend detection**: Automatic pattern recognition in compliance data
|
|
51
|
+
- **Insight categories**: Warnings (🟠), Successes (🟢), Suggestions (💡)
|
|
52
|
+
|
|
53
|
+
#### CLI Enhancements
|
|
54
|
+
- **`specbridge report --trend`**: Show compliance trends over time
|
|
55
|
+
- **`specbridge report --drift`**: Analyze drift since last report
|
|
56
|
+
- **`specbridge report --days <n>`**: Specify analysis period
|
|
57
|
+
- **`specbridge analytics`**: New analytics command with comprehensive insights
|
|
58
|
+
- **`specbridge analytics [decision-id]`**: Per-decision analysis
|
|
59
|
+
- **`specbridge analytics --insights`**: Show AI-generated insights
|
|
60
|
+
- **`specbridge dashboard`**: Launch interactive web dashboard
|
|
61
|
+
|
|
62
|
+
#### Web Dashboard
|
|
63
|
+
- **Real-time monitoring**: Interactive compliance dashboard with live data
|
|
64
|
+
- **Visual compliance score**: Large, prominent score with trend indicators
|
|
65
|
+
- **30-day trend chart**: Interactive Chart.js visualization
|
|
66
|
+
- **Decision breakdown**: Sortable table with per-decision compliance
|
|
67
|
+
- **Automated insights panel**: Display warnings, successes, and suggestions
|
|
68
|
+
- **Modern React UI**: Responsive design with gradient styling
|
|
69
|
+
- **Mobile-friendly**: Adaptive layout for all screen sizes
|
|
70
|
+
|
|
71
|
+
#### REST API
|
|
72
|
+
- 11 new API endpoints for programmatic access to compliance data
|
|
73
|
+
- Full CRUD operations for reports, decisions, and analytics
|
|
74
|
+
- Configurable query parameters for flexible data retrieval
|
|
75
|
+
- Consistent error handling and response formats
|
|
76
|
+
|
|
77
|
+
#### Documentation
|
|
78
|
+
- **Interactive demo guide**: Step-by-step walkthrough of all features
|
|
79
|
+
- **Quick start guide**: 5-minute setup with sample data
|
|
80
|
+
- **Comprehensive API reference**: Full TypeScript/JavaScript/REST API docs
|
|
81
|
+
- **Feature documentation**: Detailed explanation of analytics capabilities
|
|
82
|
+
- **Sample data generator**: Script to create realistic historical reports
|
|
83
|
+
- **Integration examples**: Slack, email, CI/CD, and monitoring integrations
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
- **Report command**: Now auto-saves all reports to history by default
|
|
87
|
+
- **Report output**: Enhanced with trend indicators (📈/📉/➡️)
|
|
88
|
+
- **CLI experience**: Improved formatting with colors and visual indicators
|
|
89
|
+
|
|
90
|
+
### Dependencies
|
|
91
|
+
- **Added**: `express@^4.18.0` - Web server framework for dashboard
|
|
92
|
+
- **Added**: `@types/express@^4.17.0` - TypeScript types for Express
|
|
93
|
+
|
|
94
|
+
### Testing
|
|
95
|
+
- **Total tests**: 951 (all passing)
|
|
96
|
+
- **New tests**: 58 for Phase 4 components
|
|
97
|
+
- **Coverage**: >95% for all new code
|
|
98
|
+
|
|
99
|
+
### Files Added
|
|
100
|
+
- `src/reporting/storage.ts` - Historical report storage
|
|
101
|
+
- `src/reporting/drift.ts` - Drift detection and trend analysis
|
|
102
|
+
- `src/analytics/engine.ts` - Analytics engine with insight generation
|
|
103
|
+
- `src/dashboard/server.ts` - Express REST API server
|
|
104
|
+
- `src/dashboard/public/index.html` - React dashboard UI
|
|
105
|
+
- `src/cli/commands/analytics.ts` - Analytics CLI command
|
|
106
|
+
- `src/cli/commands/dashboard.ts` - Dashboard CLI command
|
|
107
|
+
- `docs/demos/phase4-analytics-demo.md` - Interactive demo guide (900+ lines)
|
|
108
|
+
- `docs/demos/QUICKSTART.md` - Quick start guide
|
|
109
|
+
- `docs/demos/generate-sample-data.sh` - Sample data generator
|
|
110
|
+
- `docs/features/analytics-and-insights.md` - Feature documentation (1200+ lines)
|
|
111
|
+
- `docs/API.md` - Complete API reference (900+ lines)
|
|
112
|
+
|
|
10
113
|
## [1.1.2] - 2026-02-02
|
|
11
114
|
|
|
12
115
|
### Documentation
|
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ SpecBridge creates a living integration layer between design intent and implemen
|
|
|
16
16
|
- **Verification Engine** - Continuously verifies code compliance at multiple levels
|
|
17
17
|
- **Propagation Engine** - Analyzes impact when architectural decisions change
|
|
18
18
|
- **Compliance Reporting** - Provides dashboards and tracks conformity over time
|
|
19
|
+
- **Analytics & Insights** - AI-generated insights, drift detection, and trend analysis
|
|
20
|
+
- **Interactive Dashboard** - Real-time compliance monitoring with visual charts
|
|
19
21
|
- **Agent Interface** - Exposes decisions to code generation agents (Copilot, Claude, etc.)
|
|
20
22
|
|
|
21
23
|
## Installation
|
|
@@ -92,7 +94,31 @@ specbridge report
|
|
|
92
94
|
specbridge report --format markdown --save
|
|
93
95
|
```
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
Track compliance trends over time:
|
|
98
|
+
```bash
|
|
99
|
+
specbridge report --trend --days 30
|
|
100
|
+
specbridge report --drift
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 6. Analyze compliance with AI insights
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
specbridge analytics
|
|
107
|
+
specbridge analytics --insights
|
|
108
|
+
specbridge analytics auth-001
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Get AI-generated insights about compliance trends, violations, and decision impact.
|
|
112
|
+
|
|
113
|
+
### 7. Launch interactive dashboard
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
specbridge dashboard
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Open your browser to view real-time compliance metrics, trend charts, and insights.
|
|
120
|
+
|
|
121
|
+
### 8. Integrate with AI agents
|
|
96
122
|
|
|
97
123
|
```bash
|
|
98
124
|
specbridge context src/api/auth.ts
|
|
@@ -222,6 +248,11 @@ verification:
|
|
|
222
248
|
| `specbridge decision create <id>` | Create new decision |
|
|
223
249
|
| `specbridge decision validate` | Validate decision files |
|
|
224
250
|
| `specbridge report` | Generate compliance report |
|
|
251
|
+
| `specbridge report --trend` | Show compliance trends over time |
|
|
252
|
+
| `specbridge report --drift` | Analyze drift since last report |
|
|
253
|
+
| `specbridge analytics` | Analyze compliance with AI insights |
|
|
254
|
+
| `specbridge analytics <id>` | Analyze specific decision |
|
|
255
|
+
| `specbridge dashboard` | Launch interactive web dashboard |
|
|
225
256
|
| `specbridge hook install` | Install git hooks |
|
|
226
257
|
| `specbridge hook run` | Run verification (for hooks) |
|
|
227
258
|
| `specbridge context <file>` | Generate agent context |
|