@iservu-inc/adf-cli 0.10.0 โ†’ 0.12.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.
Files changed (40) hide show
  1. package/.adf/feature-audit.md +208 -0
  2. package/.adf/final-summary.md +347 -0
  3. package/.adf/implementation-plan.md +244 -0
  4. package/.adf/implementation-progress.md +203 -0
  5. package/.adf/learning/answer-history.json +995 -0
  6. package/.adf/learning/config.json +25 -0
  7. package/.adf/learning/learned-rules.json +59 -0
  8. package/.adf/learning/patterns.json +277 -0
  9. package/.adf/learning/skip-history.json +1451 -0
  10. package/.adf/learning/stats.json +9 -0
  11. package/.claude/settings.local.json +10 -1
  12. package/.project/chats/current/SESSION-STATUS.md +102 -73
  13. package/.project/docs/ROADMAP.md +47 -32
  14. package/.project/docs/designs/LEARNING-ANALYTICS-DASHBOARD.md +1383 -0
  15. package/CHANGELOG.md +341 -0
  16. package/CLAUDE.md +479 -0
  17. package/README.md +7 -1
  18. package/lib/commands/deploy.js +42 -2
  19. package/lib/generators/agents-md-generator.js +431 -161
  20. package/lib/generators/antigravity-generator.js +140 -0
  21. package/lib/generators/index.js +22 -0
  22. package/lib/generators/zed-generator.js +252 -0
  23. package/lib/learning/analytics-exporter.js +241 -0
  24. package/lib/learning/analytics-view.js +508 -0
  25. package/lib/learning/analytics.js +681 -0
  26. package/lib/learning/learning-manager.js +19 -6
  27. package/lib/templates/shared/agents/architect.md +24 -24
  28. package/lib/templates/shared/agents/dev.md +25 -20
  29. package/lib/templates/shared/agents/pm.md +14 -4
  30. package/lib/templates/shared/agents/sm.md +18 -14
  31. package/lib/templates/shared/templates/openspec-delta.md +16 -0
  32. package/lib/templates/shared/templates/openspec-proposal.md +18 -0
  33. package/lib/templates/shared/templates/openspec-tasks.md +21 -0
  34. package/lib/utils/context-manager.js +484 -0
  35. package/package.json +6 -1
  36. package/scripts/generate-test-data.js +557 -0
  37. package/tests/agents-md-generator.test.js +47 -10
  38. package/tests/analytics-exporter.test.js +477 -0
  39. package/tests/analytics-view.test.js +466 -0
  40. package/tests/analytics.test.js +712 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,347 @@ All notable changes to `@iservu-inc/adf-cli` will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.12.0] - 2025-12-22
9
+
10
+ ### ๐ŸŽฏ Agent-Native Development Framework (ANDF) Standard Implementation
11
+
12
+ **MAJOR FEATURE:** Complete implementation of the ANDF specification, bringing industry-standard AI agent configuration to ADF CLI with enhanced IDE support.
13
+
14
+ #### What's New
15
+
16
+ **AGENTS.md Standard Compliance:**
17
+ - **YAML Frontmatter** - Agent metadata with `name`, `description`, and `tools` fields
18
+ - **MCP Tools Configuration** - Model Context Protocol server integration (project_context, archon)
19
+ - **Structured Sections** - 8 ANDF-compliant sections for consistent AI agent guidance
20
+ - ยง 1: Operational Rules (High Priority)
21
+ - ยง 2: Build & Test Commands
22
+ - ยง 3: Project Structure
23
+ - ยง 4: Workflow Directives
24
+ - ยง 5-8: Framework-specific content (PRP/Balanced/BMAD)
25
+ - **Auto-Discovery** - Next-generation AI tools automatically detect and consume AGENTS.md
26
+
27
+ **.context/ Directory Support:**
28
+ - **Context Manager** - New utility for managing agent-accessible deep context
29
+ - **architecture.md** - Auto-generated system architecture from session outputs
30
+ - PRP: Extracts goal, context intelligence, and blueprint
31
+ - Balanced: Combines specification, plan, and constitution
32
+ - BMAD: Uses existing architecture or generates from PRD
33
+ - **glossary.md** - Automatically extracts domain terminology from interview transcripts
34
+ - **MCP Access** - Files accessible via Model Context Protocol filesystem server
35
+
36
+ **Zed Editor Support (NEW):**
37
+ - **Full Generator** - Complete Zed editor configuration generation
38
+ - **MCP Integration** - Context servers configured (project_context, archon)
39
+ - **Agent Configuration** - Model selection based on framework complexity
40
+ - Rapid: Claude Sonnet + Gemini Flash
41
+ - Balanced: Mixed models for optimization
42
+ - Comprehensive: Premium models (Claude Sonnet, Gemini Exp)
43
+ - **Keymap Support** - Agent switching shortcuts (Ctrl+Shift+A, Ctrl+Enter, etc.)
44
+ - **Symlink Strategy** - `.zed/rules -> ../AGENTS.md` (Unix/Mac) with Windows fallback
45
+
46
+ **Google Antigravity Support (NOW IMPLEMENTED):**
47
+ - **Full Generator** - Complete Antigravity agent configuration
48
+ - **YAML Configuration** - `.antigravity/agents.yaml` with AGENTS.md mount
49
+ - **File System Access** - Read-only access to AGENTS.md, .context/, and sessions
50
+ - **Security** - Excludes sensitive files (.env, node_modules, .git)
51
+ - **Smart System Prompt** - Instructs agent to read AGENTS.md immediately on startup
52
+ - **Model Selection** - Gemini models based on framework (Flash/Thinking/Exp)
53
+
54
+ #### Enhanced Features
55
+
56
+ **All Original IDE Support Maintained:**
57
+ - โœ… Windsurf - Full generator (unchanged)
58
+ - โœ… Cursor - Full generator (unchanged)
59
+ - โœ… VS Code / VS Code Insider - Full generator (unchanged)
60
+ - โœ… Kiro, Trae, Claude Code, Gemini CLI, Codex CLI - Generic configs (unchanged)
61
+ - โœ… **Zed** - NEW full generator
62
+ - โœ… **Antigravity** - NEW full generator (previously listed, now implemented)
63
+
64
+ **Deployment Enhancements:**
65
+ - `.context/` directory created automatically on all deployments
66
+ - AGENTS.md generated with ANDF compliance for all frameworks
67
+ - Architecture and glossary populated from interview data
68
+ - All 11 IDE tools supported with enhanced configurations
69
+
70
+ #### Technical Details
71
+
72
+ **New Files:**
73
+ - `lib/utils/context-manager.js` - Context directory management (500+ lines)
74
+ - `lib/generators/zed-generator.js` - Zed editor configurations (250+ lines)
75
+ - `lib/generators/antigravity-generator.js` - Antigravity configurations (150+ lines)
76
+
77
+ **Modified Files:**
78
+ - `lib/generators/agents-md-generator.js` - ANDF compliance implementation (~250 lines added)
79
+ - `lib/generators/index.js` - Export new generators
80
+ - `lib/commands/deploy.js` - Integrate context manager and new generators
81
+ - `tests/agents-md-generator.test.js` - Updated for ANDF format
82
+
83
+ **Documentation:**
84
+ - `CLAUDE.md` - Added comprehensive ANDF architecture section
85
+ - `.adf/feature-audit.md` - Feature comparison and gaps analysis
86
+ - `.adf/implementation-plan.md` - Implementation roadmap
87
+ - `.adf/final-summary.md` - Complete implementation summary
88
+
89
+ #### Keywords Added
90
+ - `zed` - Zed Editor support
91
+ - `antigravity` - Google Antigravity support
92
+ - `andf` - Agent-Native Development Framework
93
+ - `agents-md` - AGENTS.md standard
94
+ - `mcp` - Model Context Protocol
95
+
96
+ #### Backward Compatibility
97
+ - โœ… **100% Backward Compatible** - All changes are additive
98
+ - โœ… All existing IDE deployments continue to work
99
+ - โœ… No breaking changes to API or CLI commands
100
+ - โœ… Existing sessions and learning data unaffected
101
+
102
+ #### Upgrade Path
103
+ No migration needed. Simply upgrade and run:
104
+ ```bash
105
+ npm update -g @iservu-inc/adf-cli
106
+ adf deploy <tool> # Now includes ANDF features
107
+ ```
108
+
109
+ #### Benefits
110
+ - **Industry Standard** - AGENTS.md follows emerging ANDF specification
111
+ - **Better AI Guidance** - Structured operational rules and workflow directives
112
+ - **Deep Context** - Architecture and terminology preserved for AI agents
113
+ - **Expanded IDE Support** - 11 total IDEs (2 new full generators)
114
+ - **MCP Ready** - Integrated with Model Context Protocol for next-gen tools
115
+
116
+ ---
117
+
118
+ ## [0.11.0] - 2025-11-04
119
+
120
+ ### ๐Ÿ“Š Learning Analytics Dashboard - Phase 6.2
121
+
122
+ **MAJOR FEATURE:** Comprehensive analytics dashboard for visualizing and analyzing learning system performance with 10+ metrics and multi-format export.
123
+
124
+ #### What's New
125
+
126
+ **Analytics Dashboard:**
127
+ - **Interactive CLI Dashboard** - Navigate through multiple analytics views with intuitive menu
128
+ - **10+ Key Metrics** - Overview stats, skip trends, category preferences, pattern distribution, effectiveness
129
+ - **ASCII Visualizations** - Bar charts, distribution displays, and heatmaps in the terminal
130
+ - **Multi-Format Export** - Export analytics as JSON (single file) or CSV (5 separate files)
131
+ - **Pattern Health Tracking** - Monitor pattern decay status (healthy/warning/critical)
132
+ - **Time-Based Trends** - 12-week skip trend analysis with skip rate calculations
133
+ - **Effectiveness Metrics** - Track time saved, pattern accuracy, and rule performance
134
+
135
+ #### Core Components
136
+
137
+ **Analytics Engine (lib/learning/analytics.js - 680 lines):**
138
+ - `generateAnalytics()` - Main analytics generation with comprehensive data aggregation
139
+ - `calculateOverviewStats()` - Total sessions, skips, answers, patterns, rules, learning age
140
+ - `calculateSkipTrends()` - 12-week trend analysis with skip rates
141
+ - `calculateCategoryPreferences()` - Category-level skip rates and preference levels
142
+ - `calculatePatternDistribution()` - Confidence distribution (high/medium/low/veryLow)
143
+ - `calculateDecayStatus()` - Pattern health categorization (healthy/warning/critical)
144
+ - `calculateEffectiveness()` - Time saved, pattern accuracy, rule applications, overall effectiveness
145
+ - `calculateSessionTimeline()` - Session frequency and history analysis
146
+ - `calculateImpactfulPatterns()` - Top patterns by time saved and applications
147
+ - `calculateQuestionStats()` - Most answered/skipped questions
148
+
149
+ **Dashboard UI (lib/learning/analytics-view.js - 530 lines):**
150
+ - `showAnalyticsDashboard()` - Main dashboard entry point
151
+ - `showMainDashboard()` - Overview, trends, and effectiveness view
152
+ - `showCategoryView()` - Detailed category breakdown with heatmap
153
+ - `showPatternHealthView()` - Pattern confidence and decay status
154
+ - `showTimelineView()` - Session history and frequency
155
+ - `showQuestionStatsView()` - Question statistics and insights
156
+ - `showImpactfulPatternsView()` - Top performing patterns
157
+ - `handleExport()` - Export functionality integration
158
+
159
+ **Export Module (lib/learning/analytics-exporter.js - 240 lines):**
160
+ - `exportAnalytics()` - Main export router (JSON/CSV)
161
+ - `exportJSON()` - Single comprehensive JSON file export
162
+ - `exportCSV()` - Multi-file CSV export (5 files)
163
+ - CSV generators for: overview, skip trends, categories, patterns, effectiveness
164
+ - Proper CSV escaping and timestamp-based filenames
165
+
166
+ #### Analytics Metrics
167
+
168
+ **Overview Statistics:**
169
+ - Total sessions count
170
+ - Total skips (manual + filtered breakdown)
171
+ - Total answers count
172
+ - Active patterns and rules
173
+ - Learning system age (days since first session)
174
+
175
+ **Skip Trends (12 weeks):**
176
+ - Weekly skip counts (manual vs filtered)
177
+ - Skip rate percentage per week
178
+ - Week-over-week comparison
179
+
180
+ **Category Preferences:**
181
+ - Skip rate by category (0-100%)
182
+ - Preference levels: High Skip (โ‰ฅ70%), Medium Skip (40-69%), Low Skip (<40%)
183
+ - Total questions per category
184
+ - Sorted by skip rate descending
185
+
186
+ **Pattern Distribution:**
187
+ - Total patterns count
188
+ - Distribution by confidence:
189
+ - High (โ‰ฅ90%) - Very strong patterns
190
+ - Medium (75-89%) - Strong patterns
191
+ - Low (50-74%) - Weak patterns
192
+ - Very Low (<50%) - Very weak patterns
193
+ - Average confidence score
194
+ - Patterns at risk count (confidence <50 or inactive 5+ months)
195
+
196
+ **Pattern Decay Status:**
197
+ - Healthy patterns (confidence โ‰ฅ75%, active <3 months)
198
+ - Warning patterns (confidence 50-74%, active 3-5 months)
199
+ - Critical patterns (confidence <50 or inactive 5+ months)
200
+ - Recently renewed count (last 30 days)
201
+ - Average pattern age (days)
202
+
203
+ **Effectiveness Metrics:**
204
+ - Time saved (minutes and hours)
205
+ - Questions filtered count
206
+ - False positives and rate
207
+ - Pattern accuracy (% user-approved)
208
+ - Total rule applications
209
+ - Average applications per rule
210
+ - Overall effectiveness score
211
+
212
+ **Session Timeline:**
213
+ - Total sessions count
214
+ - Average sessions per week
215
+ - Session history with dates
216
+ - First and last session dates
217
+
218
+ **Impactful Patterns:**
219
+ - Top 10 by time saved (most effective filters)
220
+ - Top 10 by applications (most frequently used)
221
+
222
+ **Question Statistics:**
223
+ - Top 10 most answered questions
224
+ - Top 10 most skipped questions
225
+ - Total unique questions encountered
226
+
227
+ #### Export Formats
228
+
229
+ **JSON Export:**
230
+ - Single comprehensive file with all analytics
231
+ - Structure: `analytics-YYYY-MM-DDTHH-MM-SS.json`
232
+ - Includes all metrics, trends, and metadata
233
+ - Size: ~50-100 KB for typical datasets
234
+
235
+ **CSV Export:**
236
+ - 5 separate CSV files for different metrics:
237
+ 1. `analytics-overview-*.csv` - Overview statistics
238
+ 2. `analytics-skip-trends-*.csv` - 12-week trends
239
+ 3. `analytics-categories-*.csv` - Category preferences
240
+ 4. `analytics-patterns-*.csv` - Pattern distribution and decay
241
+ 5. `analytics-effectiveness-*.csv` - Effectiveness metrics
242
+ - Timestamp-based filenames
243
+ - Proper CSV escaping for special characters
244
+
245
+ #### Access & Usage
246
+
247
+ **Dashboard Access:**
248
+ ```bash
249
+ adf config
250
+ # โ†’ Learning System
251
+ # โ†’ 4. ๐Ÿ“Š Analytics Dashboard (NEW)
252
+ ```
253
+
254
+ **Navigation:**
255
+ - Main Dashboard โ†’ Overview, Trends, Effectiveness
256
+ - Category Breakdown โ†’ Skip rates by category with heatmap
257
+ - Pattern Health โ†’ Confidence distribution and decay status
258
+ - Session Timeline โ†’ Session history and frequency
259
+ - Question Statistics โ†’ Most answered/skipped questions
260
+ - Impactful Patterns โ†’ Top performers by time saved/applications
261
+ - Export Analytics โ†’ JSON or CSV format
262
+
263
+ **Export Location:**
264
+ ```
265
+ .adf/learning/exports/
266
+ โ”œโ”€โ”€ analytics-2025-11-04T10-30-45.json
267
+ โ””โ”€โ”€ analytics-overview-2025-11-04T10-30-45.csv
268
+ โ””โ”€โ”€ analytics-skip-trends-2025-11-04T10-30-45.csv
269
+ โ””โ”€โ”€ analytics-categories-2025-11-04T10-30-45.csv
270
+ โ””โ”€โ”€ analytics-patterns-2025-11-04T10-30-45.csv
271
+ โ””โ”€โ”€ analytics-effectiveness-2025-11-04T10-30-45.csv
272
+ ```
273
+
274
+ #### Testing
275
+
276
+ **Test Coverage:**
277
+ - `analytics.test.js` - 25/25 tests passing (100%) โœ…
278
+ - `analytics-exporter.test.js` - 23/23 tests passing (100%) โœ…
279
+ - `analytics-view.test.js` - 4/13 tests passing (31% - integration tests)
280
+ - **Overall:** 52/61 analytics tests (85.2%)
281
+ - **Project-wide:** 276/300 tests (92%)
282
+
283
+ **Test Data Generator:**
284
+ - `scripts/generate-test-data.js` - Mock data generator for testing
285
+ - 5 scenarios: empty, new user, active user, power user, edge cases
286
+ - Generates realistic learning data for dashboard testing
287
+
288
+ #### Performance
289
+
290
+ **Load Time Target:** < 2 seconds for 100+ sessions
291
+ **Memory Efficiency:** Streaming data processing for large datasets
292
+ **Visualization:** Lightweight ASCII charts for terminal rendering
293
+
294
+ #### Configuration
295
+
296
+ No additional configuration required. Analytics uses existing learning data from:
297
+ - `.adf/learning/skip-history.json`
298
+ - `.adf/learning/answer-history.json`
299
+ - `.adf/learning/patterns.json`
300
+ - `.adf/learning/learned-rules.json`
301
+ - `.adf/learning/stats.json`
302
+
303
+ #### Benefits
304
+
305
+ **For Users:**
306
+ - Understand learning system behavior and effectiveness
307
+ - Identify patterns in skip/answer behavior
308
+ - Track pattern health and decay status
309
+ - Monitor time savings from automated filtering
310
+ - Make data-driven decisions about pattern approval
311
+
312
+ **For Debugging:**
313
+ - Verify pattern detection is working correctly
314
+ - Validate decay algorithm effectiveness
315
+ - Identify false positives
316
+ - Analyze category-specific behavior
317
+ - Export data for external analysis
318
+
319
+ #### Use Cases
320
+
321
+ **Use Case 1: Review Learning System Performance**
322
+ - View overview to see total sessions and effectiveness
323
+ - Check skip trends to understand behavior over time
324
+ - Review pattern accuracy to validate system
325
+
326
+ **Use Case 2: Optimize Pattern Management**
327
+ - Check pattern health view to identify critical patterns
328
+ - Review impactful patterns to see which provide most value
329
+ - Export data for deeper analysis
330
+
331
+ **Use Case 3: Category-Specific Analysis**
332
+ - View category breakdown to identify high-skip categories
333
+ - Understand which question types are most relevant
334
+ - Adjust workflow based on insights
335
+
336
+ **Use Case 4: Export for Reporting**
337
+ - Generate JSON export for programmatic analysis
338
+ - Create CSV exports for spreadsheet analysis
339
+ - Share analytics with team members
340
+
341
+ #### Breaking Changes
342
+
343
+ None. Fully backward compatible with existing learning data.
344
+
345
+ #### Migration
346
+
347
+ No migration required. Analytics reads existing learning data without modifications.
348
+
8
349
  ## [0.10.0] - 2025-10-27
9
350
 
10
351
  ### ๐Ÿง  Pattern Decay Algorithm - Phase 6