@iservu-inc/adf-cli 0.14.5 → 0.16.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.
@@ -1,249 +1,217 @@
1
- # AI Model Documentation Sources
2
-
3
- This document tracks the official documentation URLs for AI model listings from each provider. These should be checked regularly to ensure adf-cli supports the latest models.
4
-
5
- **Last Updated:** 2025-10-04
6
-
7
- ---
8
-
9
- ## Provider Model Documentation URLs
10
-
11
- ### Anthropic Claude
12
-
13
- **Official Models Page:**
14
- - https://docs.anthropic.com/en/docs/about-claude/models
15
-
16
- **API Models List:**
17
- - No public API endpoint for listing models
18
- - Must use curated list from documentation
19
-
20
- **Current Models (as of 2025-10-04):**
21
- - `claude-sonnet-4-5-20250929`
22
- - `claude-3-5-sonnet-20241022`
23
- - `claude-3-opus-20240229`
24
- - `claude-3-sonnet-20240229`
25
- - `claude-3-haiku-20240307`
26
-
27
- **Update Strategy:** Manual curation from official docs
28
-
29
- ---
30
-
31
- ### OpenAI
32
-
33
- **Official Models Page:**
34
- - https://platform.openai.com/docs/models
35
-
36
- **API Models List Endpoint:**
37
- - ✅ `GET https://api.openai.com/v1/models`
38
- - Requires API key in Authorization header
39
-
40
- **Current Model Families (as of 2025-10-04):**
41
- - GPT-4o series: `gpt-4o`, `gpt-4o-mini`
42
- - GPT-4 Turbo: `gpt-4-turbo`, `gpt-4-turbo-preview`
43
- - GPT-4: `gpt-4`
44
- - o1 series: `o1`, `o1-mini`, `o1-preview`
45
- - o3 series: `o3`, `o3-mini`, `o3-pro` (if available)
46
- - GPT-3.5: `gpt-3.5-turbo`
47
-
48
- **Update Strategy:** Dynamic fetching via API endpoint (DO NOT filter by model name prefix)
49
-
50
- **Important:**
51
- - OpenAI API returns ALL available models for your API key
52
- - Do NOT filter by prefix (e.g., `gpt-`) as this excludes o1, o3, and future model families
53
- - Filter only by owned_by or other metadata if needed
54
-
55
- ---
56
-
57
- ### Google Gemini
58
-
59
- **Official Models Page:**
60
- - https://ai.google.dev/gemini-api/docs/models
61
-
62
- **API Models List:**
63
- - ⚠️ SDK has experimental listModels() but not stable
64
- - Must use curated list from documentation
65
-
66
- **Current Models (as of 2025-10-04):**
67
-
68
- **Gemini 2.5 Series (Latest - Stable):**
69
- - `gemini-2.5-pro`
70
- - `gemini-2.5-flash`
71
- - `gemini-2.5-flash-lite`
72
- - `gemini-2.5-flash-image`
73
-
74
- **Gemini 2.0 Series:**
75
- - `gemini-2.0-flash`
76
- - `gemini-2.0-flash-lite`
77
-
78
- **Gemini 1.5 Series (Legacy):**
79
- - `gemini-1.5-pro-latest`
80
- - `gemini-1.5-flash-latest`
81
- - `gemini-1.5-pro`
82
- - `gemini-1.5-flash`
83
-
84
- **Update Strategy:** Manual curation from official docs (SDK support pending)
85
-
86
- ---
87
-
88
- ### OpenRouter
89
-
90
- **Official Models Page:**
91
- - https://openrouter.ai/models
92
-
93
- **API Models List Endpoint:**
94
- - ✅ `GET https://openrouter.ai/api/v1/models`
95
- - Returns JSON with all available models
96
-
97
- **Update Strategy:** Dynamic fetching via API endpoint
98
-
99
- **Current Implementation:** Working correctly - fetches all models dynamically
100
-
101
- ---
102
-
103
- ## Update Process
104
-
105
- ### Monthly Model Review Checklist
106
-
107
- Run this checklist at the start of each month to ensure latest models are available:
108
-
109
- 1. **Anthropic Claude**
110
- - [ ] Visit https://docs.anthropic.com/en/docs/about-claude/models
111
- - [ ] Check for new model releases
112
- - [ ] Update `AI_PROVIDERS.ANTHROPIC.defaultModels` in `lib/ai/ai-config.js`
113
- - [ ] Test new models if added
114
-
115
- 2. **OpenAI**
116
- - [ ] Verify `fetchAvailableModels()` is NOT filtering by model prefix
117
- - [ ] Test with real API key to ensure all models returned
118
- - [ ] Check https://platform.openai.com/docs/models for new model families
119
- - [ ] Update fallback list if API changes
120
-
121
- 3. **Google Gemini**
122
- - [ ] Visit https://ai.google.dev/gemini-api/docs/models
123
- - [ ] Check for new Gemini versions (2.6, 3.0, etc.)
124
- - [ ] Update `AI_PROVIDERS.GOOGLE.defaultModels` in `lib/ai/ai-config.js`
125
- - [ ] Test new models if added
126
-
127
- 4. **OpenRouter**
128
- - [ ] API fetching is dynamic - no action needed
129
- - [ ] Verify API endpoint still works
130
- - [ ] Check for API changes at https://openrouter.ai/docs
131
-
132
- ### Testing After Updates
133
-
134
- ```bash
135
- # Test each provider's model fetching
136
- cd adf-cli
137
- npm test
138
-
139
- # Manual test with real API keys
140
- adf init
141
- # Select each provider and verify model list
142
- ```
143
-
144
- ---
145
-
146
- ## Known Issues
147
-
148
- ### OpenAI Model Filtering Bug (CRITICAL - Fixed in v0.4.29)
149
-
150
- **Problem:**
151
- ```javascript
152
- .filter(m => m.id.startsWith('gpt-')) // ❌ TOO RESTRICTIVE
153
- ```
154
-
155
- This filter excludes:
156
- - o1, o1-mini, o1-preview
157
- - o3, o3-pro, o3-mini
158
- - Any future non-GPT model families
159
-
160
- **Solution:**
161
- ```javascript
162
- // Fetch ALL models without prefix filtering
163
- const models = response.data
164
- .map(m => m.id)
165
- .sort();
166
- ```
167
-
168
- **Status:** Fixed in v0.4.29
169
-
170
- ---
171
-
172
- ## API Response Examples
173
-
174
- ### OpenAI `/v1/models` Response
175
-
176
- ```json
177
- {
178
- "object": "list",
179
- "data": [
180
- {
181
- "id": "gpt-4o",
182
- "object": "model",
183
- "created": 1234567890,
184
- "owned_by": "openai"
185
- },
186
- {
187
- "id": "o1-preview",
188
- "object": "model",
189
- "created": 1234567890,
190
- "owned_by": "openai"
191
- }
192
- ]
193
- }
194
- ```
195
-
196
- ### OpenRouter `/api/v1/models` Response
197
-
198
- ```json
199
- {
200
- "data": [
201
- {
202
- "id": "anthropic/claude-sonnet-4-5",
203
- "name": "Claude Sonnet 4.5",
204
- "pricing": { ... }
205
- }
206
- ]
207
- }
208
- ```
209
-
210
- ---
211
-
212
- ## Maintenance Notes
213
-
214
- - **DO NOT** hardcode model lists unless provider has no API
215
- - **DO NOT** filter by model name prefix unless absolutely necessary
216
- - **ALWAYS** fetch dynamically when API is available
217
- - **TEST** with real API keys before publishing updates
218
- - **DOCUMENT** any assumptions or limitations in this file
219
-
220
- ---
221
-
222
- ## Future Improvements
223
-
224
- 1. **Add model metadata caching**
225
- - Cache API responses for 24 hours
226
- - Reduce API calls during testing
227
-
228
- 2. **Add model capability detection**
229
- - Vision support
230
- - Function calling
231
- - Context window size
232
- - Pricing information
233
-
234
- 3. **Add model recommendation system**
235
- - Suggest best model for use case
236
- - Warn about deprecated models
237
- - Show model capabilities in selection
238
-
239
- 4. **Automated model list updates**
240
- - GitHub Actions workflow
241
- - Monthly PR with updated model lists
242
- - Automated testing against provider APIs
243
-
244
- ---
245
-
246
- ## Version History
247
-
248
- - **2025-10-04:** Initial documentation
249
- - **2025-10-04:** Identified OpenAI filtering bug (v0.4.29)
1
+ # AI Model Documentation Sources
2
+
3
+ This document tracks the official documentation URLs for AI model listings from each provider. These should be checked regularly to ensure adf-cli supports the latest models.
4
+
5
+ **Last Updated:** 2026-01-12
6
+
7
+ ---
8
+
9
+ ## Provider Model Documentation URLs
10
+
11
+ ### Anthropic Claude
12
+
13
+ **Official Models Page:**
14
+ - https://docs.anthropic.com/en/docs/about-claude/models
15
+
16
+ **API Models List:**
17
+ - Supported via `GET /v1/models`
18
+ - Node.js SDK: `client.models.list()`
19
+
20
+ **Current Models (as of 2026-01-12):**
21
+ - `claude-3-5-sonnet-20241022`
22
+ - `claude-3-5-haiku-20241022`
23
+ - `claude-3-opus-20240229`
24
+
25
+ **Update Strategy:** Dynamic discovery via API
26
+
27
+ ---
28
+
29
+ ### OpenAI
30
+
31
+ **Official Models Page:**
32
+ - https://platform.openai.com/docs/models
33
+
34
+ **API Models List Endpoint:**
35
+ - ✅ `GET https://api.openai.com/v1/models`
36
+ - Requires API key in Authorization header
37
+
38
+ **Current Model Families (as of 2026-01-12):**
39
+ - GPT-4o series: `gpt-4o`, `gpt-4o-mini`
40
+ - o1 series: `o1`, `o1-mini`
41
+ - o3 series: `o3`, `o3-mini`
42
+ - GPT-5 series (if available)
43
+
44
+ **Update Strategy:** Dynamic fetching via API endpoint (DO NOT filter by model name prefix)
45
+
46
+ **Important:**
47
+ - OpenAI API returns ALL available models for your API key
48
+ - Do NOT filter by prefix (e.g., `gpt-`) as this excludes o1, o3, and future model families
49
+ - Filter only by owned_by or other metadata if needed
50
+
51
+ ---
52
+
53
+ ### Google Gemini
54
+
55
+ **Official Models Page:**
56
+ - https://ai.google.dev/gemini-api/docs/models
57
+
58
+ **API Models List:**
59
+ - Supported via `v1beta/models` endpoint
60
+ - Node.js SDK: `@google/genai` (Unified SDK)
61
+
62
+ **Current Models (as of 2026-01-12):**
63
+
64
+ **Gemini 3.0 Series (Latest - Frontier):**
65
+ - `gemini-3.0-pro`
66
+ - `gemini-3.0-flash`
67
+ - `gemini-3.0-deep-think`
68
+
69
+ **Gemini 2.5 Series (Stable):**
70
+ - `gemini-2.5-pro`
71
+ - `gemini-2.5-flash`
72
+ - `gemini-2.5-flash-lite`
73
+
74
+ **Gemini 2.0 Series (Legacy):**
75
+ - `gemini-2.0-flash`
76
+ - `gemini-2.0-pro`
77
+
78
+ **Update Strategy:** Dynamic discovery via API
79
+
80
+ ---
81
+
82
+ ### OpenRouter
83
+
84
+ **Official Models Page:**
85
+ - https://openrouter.ai/models
86
+
87
+ **API Models List Endpoint:**
88
+ - ✅ `GET https://openrouter.ai/api/v1/models`
89
+ - Returns JSON with all available models
90
+
91
+ **Update Strategy:** Dynamic fetching via API endpoint
92
+
93
+ **Current Implementation:** Working correctly - fetches all models dynamically
94
+
95
+ ---
96
+
97
+ ## Update Process
98
+
99
+ ### Monthly Model Review Checklist
100
+
101
+ Run this checklist at the start of each month to ensure latest models are available:
102
+
103
+ 1. **Anthropic Claude**
104
+ - [ ] Visit https://docs.anthropic.com/en/docs/about-claude/models
105
+ - [ ] Check for new model releases
106
+ - [ ] Verify `fetchAvailableModels()` is getting all models via pagination
107
+
108
+ 2. **OpenAI**
109
+ - [ ] Verify `fetchAvailableModels()` is NOT filtering by model prefix
110
+ - [ ] Test with real API key to ensure all models returned
111
+ - [ ] Check https://platform.openai.com/docs/models for new model families
112
+
113
+ 3. **Google Gemini**
114
+ - [ ] Visit https://ai.google.dev/gemini-api/docs/models
115
+ - [ ] Check for new Gemini versions (3.1, 4.0, etc.)
116
+ - [ ] Verify dynamic discovery works via `v1beta/models`
117
+
118
+ 4. **OpenRouter**
119
+ - [ ] API fetching is dynamic - no action needed
120
+ - [ ] Verify API endpoint still works
121
+ - [ ] Check for API changes at https://openrouter.ai/docs
122
+
123
+ ### Testing After Updates
124
+
125
+ ```bash
126
+ # Test each provider's model fetching
127
+ cd adf-cli
128
+ npm test
129
+
130
+ # Manual test with real API keys
131
+ node bin/adf.js config
132
+ # Select each provider and verify model list
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Known Issues
138
+
139
+ ### OpenAI Model Filtering Bug (CRITICAL - Fixed in v0.4.29)
140
+
141
+ **Problem:**
142
+ ```javascript
143
+ .filter(m => m.id.startsWith('gpt-')) // ❌ TOO RESTRICTIVE
144
+ ```
145
+
146
+ This filter excludes:
147
+ - o1, o1-mini, o1-preview
148
+ - o3, o3-pro, o3-mini
149
+ - Any future non-GPT model families
150
+
151
+ **Solution:**
152
+ ```javascript
153
+ // Fetch ALL models without prefix filtering
154
+ const models = response.data
155
+ .map(m => m.id)
156
+ .sort();
157
+ ```
158
+
159
+ **Status:** Fixed in v0.4.29
160
+
161
+ ---
162
+
163
+ ## API Response Examples
164
+
165
+ ### OpenAI `/v1/models` Response
166
+
167
+ ```json
168
+ {
169
+ "object": "list",
170
+ "data": [
171
+ {
172
+ "id": "gpt-4o",
173
+ "object": "model",
174
+ "created": 1234567890,
175
+ "owned_by": "openai"
176
+ },
177
+ {
178
+ "id": "o1-mini",
179
+ "object": "model",
180
+ "created": 1234567890,
181
+ "owned_by": "openai"
182
+ }
183
+ ]
184
+ }
185
+ ```
186
+
187
+ ### OpenRouter `/api/v1/models` Response
188
+
189
+ ```json
190
+ {
191
+ "data": [
192
+ {
193
+ "id": "anthropic/claude-3-5-sonnet",
194
+ "name": "Claude 3.5 Sonnet",
195
+ "pricing": { ... }
196
+ }
197
+ ]
198
+ }
199
+ ```
200
+
201
+ ---
202
+
203
+ ## Maintenance Notes
204
+
205
+ - **DO NOT** hardcode model lists unless provider has no API
206
+ - **DO NOT** filter by model name prefix unless absolutely necessary
207
+ - **ALWAYS** fetch dynamically when API is available
208
+ - **TEST** with real API keys before publishing updates
209
+ - **DOCUMENT** any assumptions or limitations in this file
210
+
211
+ ---
212
+
213
+ ## Version History
214
+
215
+ - **2026-01-12:** Updated to remove deprecated models (Gemini 1.5, GPT-3.5) and enable dynamic discovery across all providers.
216
+ - **2025-10-04:** Initial documentation
217
+ - **2025-10-04:** Identified OpenAI filtering bug (v0.4.29)
@@ -15,7 +15,7 @@ The adf-cli interview system now supports **4 AI providers**, giving users flexi
15
15
  | Provider | Models | API Key Format | Website |
16
16
  |----------|--------|----------------|---------|
17
17
  | **Anthropic Claude** | Sonnet 4.5, Claude 3.5, Opus | `sk-ant-*` | https://console.anthropic.com/ |
18
- | **OpenAI GPT** | GPT-4-turbo, GPT-4o, GPT-4, GPT-3.5-turbo | `sk-*` | https://platform.openai.com/ |
18
+ | **OpenAI GPT** | GPT-4o, GPT-4o-mini, o1, o3 | `sk-*` | https://platform.openai.com/ |
19
19
  | **Google Gemini** | 2.0-flash-exp, 1.5-pro, 1.5-flash | (varies) | https://ai.google.dev/ |
20
20
  | **OpenRouter** | Multi-model access | `sk-or-*` | https://openrouter.ai/ |
21
21
 
@@ -0,0 +1,46 @@
1
+ # Phase 6: Advanced Learning & Analytics
2
+
3
+ ## Overview
4
+ Phase 6 enhances the ADF CLI Learning System with transparency, intelligence, and adaptability. It introduces a comprehensive analytics dashboard, an automated pattern decay algorithm, and multi-format data export capabilities.
5
+
6
+ ## Key Features
7
+
8
+ ### 1. Learning Analytics Dashboard
9
+ Accessible via `adf config` → **Learning System** → **📊 Analytics Dashboard**, this interactive UI provides visibility into the learning engine's behavior.
10
+
11
+ - **Skip Trends**: A 12-week visualization of manual vs. filtered skips.
12
+ - **Category Preferences**: Heatmap of skip rates and answer quality by category (e.g., Deployment, Security).
13
+ - **Pattern Confidence**: Distribution of learned patterns by confidence level (High, Medium, Low).
14
+ - **Effectiveness Metrics**: Automated calculation of total development time saved (in minutes/hours).
15
+ - **Question Statistics**: Deep dive into most-answered and most-skipped questions.
16
+
17
+ ### 2. Pattern Decay Algorithm
18
+ To ensure learning data remains relevant as user habits evolve, Phase 6 implements a time-based decay system.
19
+
20
+ - **Exponential Decay**: Pattern confidence reduces over time if not reconfirmed.
21
+ - **Confidence-Based Rates**:
22
+ - High Confidence (≥90): 7.5% decay per month.
23
+ - Medium Confidence (75-89): 15% decay per month.
24
+ - Low Confidence (<75): 22.5% decay per month.
25
+ - **Automatic Cleanup**: Patterns are removed if confidence falls below 40% or if inactive for 6+ months.
26
+ - **Renewal Mechanism**: Reconfirming a pattern (skipping a question manually) provides a +10 confidence boost.
27
+
28
+ ### 3. Data Export
29
+ Export learning analytics for team reporting or personal review.
30
+ - **Formats**: JSON (single file) and CSV (5-file suite including trends, categories, and impactful patterns).
31
+ - **Location**: Exports are saved to the user's current project directory.
32
+
33
+ ## Architecture
34
+
35
+ - `lib/learning/analytics.js`: Calculation engine for 10+ metrics.
36
+ - `lib/learning/decay-manager.js`: Orchestrates decay application and cleanup.
37
+ - `lib/learning/analytics-view.js`: Handles ASCII chart generation and menu navigation.
38
+ - `lib/learning/analytics-exporter.js`: Manages CSV/JSON serialization logic.
39
+
40
+ ## Technical Improvements
41
+ - **Performance**: Optimized for 100+ sessions (<2s load time).
42
+ - **Testing**: Added 50+ new tests covering decay logic and metric accuracy.
43
+ - **UI**: Improved navigation with "Back" functionality and real-time refresh.
44
+
45
+ ---
46
+ *Status: COMPLETE (v0.15.0)*