baseguard 1.0.0 → 1.0.2

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 (156) hide show
  1. package/.baseguardrc.example.json +64 -0
  2. package/.eslintrc.json +1 -1
  3. package/CHANGELOG.md +196 -0
  4. package/DEPLOYMENT.md +625 -0
  5. package/DEPLOYMENT_CHECKLIST.md +239 -0
  6. package/DEPLOYMENT_SUMMARY_v1.0.2.md +202 -0
  7. package/QUICK_START.md +134 -0
  8. package/README.md +447 -52
  9. package/RELEASE_NOTES_v1.0.2.md +434 -0
  10. package/bin/base.js +155 -36
  11. package/dist/ai/agentkit-orchestrator.d.ts +116 -0
  12. package/dist/ai/agentkit-orchestrator.d.ts.map +1 -0
  13. package/dist/ai/agentkit-orchestrator.js +417 -0
  14. package/dist/ai/agentkit-orchestrator.js.map +1 -0
  15. package/dist/ai/gemini-code-fixer.d.ts +85 -0
  16. package/dist/ai/gemini-code-fixer.d.ts.map +1 -0
  17. package/dist/ai/gemini-code-fixer.js +452 -0
  18. package/dist/ai/gemini-code-fixer.js.map +1 -0
  19. package/dist/ai/jules-implementer.d.ts +5 -4
  20. package/dist/ai/jules-implementer.d.ts.map +1 -1
  21. package/dist/ai/jules-implementer.js +6 -5
  22. package/dist/ai/jules-implementer.js.map +1 -1
  23. package/dist/ai/unified-code-fixer.d.ts +69 -0
  24. package/dist/ai/unified-code-fixer.d.ts.map +1 -0
  25. package/dist/ai/unified-code-fixer.js +289 -0
  26. package/dist/ai/unified-code-fixer.js.map +1 -0
  27. package/dist/commands/check.d.ts +3 -1
  28. package/dist/commands/check.d.ts.map +1 -1
  29. package/dist/commands/check.js +166 -34
  30. package/dist/commands/check.js.map +1 -1
  31. package/dist/commands/config.d.ts +4 -0
  32. package/dist/commands/config.d.ts.map +1 -1
  33. package/dist/commands/config.js +183 -0
  34. package/dist/commands/config.js.map +1 -1
  35. package/dist/commands/fix.d.ts.map +1 -1
  36. package/dist/commands/fix.js +89 -91
  37. package/dist/commands/fix.js.map +1 -1
  38. package/dist/commands/index.d.ts +1 -0
  39. package/dist/commands/index.d.ts.map +1 -1
  40. package/dist/commands/index.js +1 -0
  41. package/dist/commands/index.js.map +1 -1
  42. package/dist/commands/init.d.ts.map +1 -1
  43. package/dist/commands/init.js +16 -2
  44. package/dist/commands/init.js.map +1 -1
  45. package/dist/commands/status.d.ts +14 -0
  46. package/dist/commands/status.d.ts.map +1 -0
  47. package/dist/commands/status.js +254 -0
  48. package/dist/commands/status.js.map +1 -0
  49. package/dist/core/baseguard.d.ts +47 -5
  50. package/dist/core/baseguard.d.ts.map +1 -1
  51. package/dist/core/baseguard.js +506 -52
  52. package/dist/core/baseguard.js.map +1 -1
  53. package/dist/core/cache-manager.d.ts.map +1 -1
  54. package/dist/core/cache-manager.js +3 -1
  55. package/dist/core/cache-manager.js.map +1 -1
  56. package/dist/core/configuration-recovery.d.ts +116 -0
  57. package/dist/core/configuration-recovery.d.ts.map +1 -0
  58. package/dist/core/configuration-recovery.js +552 -0
  59. package/dist/core/configuration-recovery.js.map +1 -0
  60. package/dist/core/configuration.d.ts +4 -0
  61. package/dist/core/configuration.d.ts.map +1 -1
  62. package/dist/core/configuration.js +35 -0
  63. package/dist/core/configuration.js.map +1 -1
  64. package/dist/core/debug-logger.d.ts +181 -0
  65. package/dist/core/debug-logger.d.ts.map +1 -0
  66. package/dist/core/debug-logger.js +479 -0
  67. package/dist/core/debug-logger.js.map +1 -0
  68. package/dist/core/file-processor.d.ts.map +1 -1
  69. package/dist/core/file-processor.js +8 -2
  70. package/dist/core/file-processor.js.map +1 -1
  71. package/dist/core/graceful-degradation-manager.d.ts +123 -0
  72. package/dist/core/graceful-degradation-manager.d.ts.map +1 -0
  73. package/dist/core/graceful-degradation-manager.js +512 -0
  74. package/dist/core/graceful-degradation-manager.js.map +1 -0
  75. package/dist/core/index.d.ts +4 -0
  76. package/dist/core/index.d.ts.map +1 -1
  77. package/dist/core/index.js +4 -0
  78. package/dist/core/index.js.map +1 -1
  79. package/dist/core/logger.d.ts +1 -0
  80. package/dist/core/logger.d.ts.map +1 -0
  81. package/dist/core/logger.js +2 -0
  82. package/dist/core/logger.js.map +1 -0
  83. package/dist/core/memory-manager.d.ts +84 -0
  84. package/dist/core/memory-manager.d.ts.map +1 -1
  85. package/dist/core/memory-manager.js +236 -1
  86. package/dist/core/memory-manager.js.map +1 -1
  87. package/dist/core/startup-optimizer.d.ts +12 -0
  88. package/dist/core/startup-optimizer.d.ts.map +1 -1
  89. package/dist/core/startup-optimizer.js +60 -0
  90. package/dist/core/startup-optimizer.js.map +1 -1
  91. package/dist/core/system-error-handler.d.ts +65 -0
  92. package/dist/core/system-error-handler.d.ts.map +1 -0
  93. package/dist/core/system-error-handler.js +646 -0
  94. package/dist/core/system-error-handler.js.map +1 -0
  95. package/dist/git/github-manager.d.ts +5 -16
  96. package/dist/git/github-manager.d.ts.map +1 -1
  97. package/dist/git/github-manager.js +6 -61
  98. package/dist/git/github-manager.js.map +1 -1
  99. package/dist/parsers/react-parser-optimized.d.ts +16 -0
  100. package/dist/parsers/react-parser-optimized.d.ts.map +1 -0
  101. package/dist/parsers/react-parser-optimized.js +147 -0
  102. package/dist/parsers/react-parser-optimized.js.map +1 -0
  103. package/dist/parsers/react-parser.d.ts.map +1 -1
  104. package/dist/parsers/react-parser.js +17 -15
  105. package/dist/parsers/react-parser.js.map +1 -1
  106. package/dist/parsers/svelte-parser.d.ts.map +1 -1
  107. package/dist/parsers/svelte-parser.js +7 -3
  108. package/dist/parsers/svelte-parser.js.map +1 -1
  109. package/dist/parsers/vanilla-parser.d.ts.map +1 -1
  110. package/dist/parsers/vanilla-parser.js +7 -3
  111. package/dist/parsers/vanilla-parser.js.map +1 -1
  112. package/dist/parsers/vue-parser.d.ts +18 -0
  113. package/dist/parsers/vue-parser.d.ts.map +1 -1
  114. package/dist/parsers/vue-parser.js +387 -1
  115. package/dist/parsers/vue-parser.js.map +1 -1
  116. package/dist/types/index.d.ts +4 -0
  117. package/dist/types/index.d.ts.map +1 -1
  118. package/dist/ui/help.js +1 -1
  119. package/dist/ui/help.js.map +1 -1
  120. package/dist/ui/prompts.d.ts +7 -4
  121. package/dist/ui/prompts.d.ts.map +1 -1
  122. package/dist/ui/prompts.js +48 -55
  123. package/dist/ui/prompts.js.map +1 -1
  124. package/package.json +30 -5
  125. package/src/ai/__tests__/gemini-analyzer.test.ts +2 -2
  126. package/src/ai/agentkit-orchestrator.ts +534 -0
  127. package/src/ai/gemini-code-fixer.ts +540 -0
  128. package/src/ai/jules-implementer.ts +6 -5
  129. package/src/ai/unified-code-fixer.ts +347 -0
  130. package/src/commands/config.ts +218 -0
  131. package/src/commands/fix.ts +98 -94
  132. package/src/commands/index.ts +2 -1
  133. package/src/commands/init.ts +16 -2
  134. package/src/commands/status.ts +307 -0
  135. package/src/core/baseguard.ts +36 -22
  136. package/src/core/cache-manager.ts +4 -2
  137. package/src/core/configuration-recovery.ts +3 -6
  138. package/src/core/configuration.ts +37 -0
  139. package/src/core/debug-logger.ts +2 -2
  140. package/src/core/file-processor.ts +10 -3
  141. package/src/core/index.ts +5 -1
  142. package/src/core/memory-manager.ts +4 -3
  143. package/src/core/startup-optimizer.ts +70 -0
  144. package/src/core/system-error-handler.ts +9 -5
  145. package/src/git/github-manager.ts +11 -79
  146. package/src/parsers/react-parser.ts +2 -2
  147. package/src/parsers/svelte-parser.ts +13 -9
  148. package/src/parsers/vanilla-parser.ts +18 -14
  149. package/src/parsers/vue-parser.ts +20 -14
  150. package/src/types/index.ts +4 -0
  151. package/src/ui/help.ts +1 -1
  152. package/src/ui/prompts.ts +54 -61
  153. package/test-build.js +41 -0
  154. package/tests/e2e/git-integration.e2e.test.ts +1 -1
  155. package/tsconfig.json +0 -1
  156. package/vitest.config.ts +4 -2
package/README.md CHANGED
@@ -1,23 +1,20 @@
1
1
  # BaseGuard 🛡️
2
2
 
3
- Never ship incompatible code again - AI-powered browser compatibility enforcement
3
+ **Never ship incompatible code again** - Intelligent browser compatibility enforcement with AI-powered analysis and autonomous fixing.
4
4
 
5
- ## Overview
5
+ ## What is BaseGuard?
6
6
 
7
- BaseGuard is an intelligent browser compatibility enforcement tool that prevents incompatible code from reaching production by combining three AI layers:
7
+ BaseGuard is a comprehensive browser compatibility tool that prevents incompatible code from reaching production. It combines official Baseline data with AI-powered analysis and code fixing to ensure your web applications work across all target browsers.
8
8
 
9
- 1. **Baseline Detection** - Uses the official web-features package for instant compatibility checking
10
- 2. **Gemini Analysis** - AI-powered research and fix strategy recommendations
11
- 3. **Jules Implementation** - Autonomous code fixing with progressive enhancement
9
+ ### Key Features
12
10
 
13
- ## Features
14
-
15
- - 🔍 **Universal Framework Support** - React, Vue, Svelte, Angular, vanilla JS/CSS
16
- - 🤖 **AI-Powered Analysis** - Research user impact and best practices
17
- - 🔧 **Autonomous Fixing** - Generate and apply compatibility fixes automatically
18
- - 🪝 **Git Integration** - Pre-commit/pre-push hooks for automated enforcement
19
- - 📊 **Beautiful CLI** - Colorful output with progress indicators and tables
20
- - ⚡ **Offline-First** - Baseline checking works without network connectivity
11
+ - 🔍 **Universal Framework Support** - Works with React, Vue, Svelte, vanilla JS/CSS, and more
12
+ - 🤖 **Dual AI Coding Agents** - Choose between Jules (GitHub repos) or Gemini 2.5 Pro (any files)
13
+ - 📊 **Official Baseline Data** - Uses web-features package for accurate compatibility checking
14
+ - 🔧 **Intelligent Code Fixing** - AI generates progressive enhancement and polyfill solutions
15
+ - 🪝 **Git Integration** - Automated pre-commit/pre-push hooks with violation blocking
16
+ - 📈 **Graceful Degradation** - Works offline and handles service failures intelligently
17
+ - 🎨 **Beautiful CLI** - Colorful terminal output with progress indicators and detailed reports
21
18
 
22
19
  ## Installation
23
20
 
@@ -25,70 +22,468 @@ BaseGuard is an intelligent browser compatibility enforcement tool that prevents
25
22
  npm install -g baseguard
26
23
  ```
27
24
 
25
+ **Requirements:**
26
+ - Node.js 18 or higher
27
+ - Git (for automation features)
28
+ - API keys for AI services (setup guide below)
29
+
28
30
  ## Quick Start
29
31
 
32
+ ### 1. Initialize BaseGuard in Your Project
33
+
30
34
  ```bash
31
- # Initialize in your project
35
+ cd your-project
32
36
  base init
37
+ ```
33
38
 
34
- # Check for violations
39
+ This will:
40
+ - Create `.baseguardrc.json` configuration file
41
+ - Set up browser compatibility targets
42
+ - Guide you through API key setup
43
+ - Optionally install git hooks for automation
44
+
45
+ ### 2. Check for Compatibility Issues
46
+
47
+ ```bash
48
+ # Check all supported files
35
49
  base check
36
50
 
37
- # Fix violations with AI
51
+ # Check specific files or patterns
52
+ base check --files "src/**/*.ts"
53
+
54
+ # Strict mode (exit with error if violations found)
55
+ base check --strict
56
+ ```
57
+
58
+ ### 3. Fix Issues with AI
59
+
60
+ ```bash
61
+ # Interactive fixing with preview
38
62
  base fix
39
63
 
40
- # Enable git automation
41
- base automation enable --auto-fix
64
+ # Automatic fixing (no prompts)
65
+ base fix --auto
66
+
67
+ # Analysis only (no code changes)
68
+ base fix --analyze-only
69
+ ```
70
+
71
+ ## 🚀 Getting Started with AI Services
72
+
73
+ BaseGuard offers two AI coding agents for fixing compatibility issues. You can choose the one that best fits your workflow:
74
+
75
+ ### Option 1: Gemini 2.5 Pro (Recommended for Most Users)
76
+
77
+ **Best for:** Any codebase, local development, uncommitted files
78
+
79
+ **Setup Steps:**
80
+
81
+ 1. **Get your Gemini API key:**
82
+ - Go to [Google AI Studio](https://aistudio.google.com)
83
+ - Sign in with your Google account
84
+ - Click "Get API key" in the left sidebar
85
+ - Click "Create API key" → "Create API key in new project"
86
+ - Copy your API key
87
+
88
+ 2. **Configure BaseGuard:**
89
+ ```bash
90
+ base config set-keys
91
+ # Follow the prompts to enter your Gemini API key
92
+
93
+ # Set Gemini as your primary coding agent
94
+ base config coding-agent --agent gemini
95
+ ```
96
+
97
+ **Advantages:**
98
+ - ✅ Works with any files (GitHub, local, uncommitted)
99
+ - ✅ Immediate processing and results
100
+ - ✅ No repository requirements
101
+ - ✅ Grounded with real-time web search
102
+ - ✅ Perfect for local development
103
+
104
+ ### Option 2: Jules (Google's Autonomous Coding Agent)
105
+
106
+ **Best for:** GitHub repositories, autonomous cloud-based fixing
107
+
108
+ **Setup Steps:**
109
+
110
+ 1. **Get your Jules API key:**
111
+ - Go to [Jules Dashboard](https://jules.google.com)
112
+ - Sign in with your Google account
113
+ - Connect your GitHub account and authorize repositories
114
+ - Get your API key from the dashboard
115
+
116
+ 2. **Configure BaseGuard:**
117
+ ```bash
118
+ base config set-keys
119
+ # Follow the prompts to enter your Jules API key
120
+
121
+ # Set Jules as your primary coding agent
122
+ base config coding-agent --agent jules
123
+ ```
124
+
125
+ **Advantages:**
126
+ - ✅ Autonomous operation in cloud VMs
127
+ - ✅ Full repository context understanding
128
+ - ✅ Asynchronous processing
129
+ - ❌ Requires GitHub repository
130
+ - ❌ Cannot work with local/uncommitted files
131
+
132
+ ### Dual Agent Setup (Recommended)
133
+
134
+ You can configure both agents and BaseGuard will automatically choose the best one:
135
+
136
+ ```bash
137
+ base config set-keys
138
+ # Enter both Gemini and Jules API keys
139
+
140
+ base config coding-agent
141
+ # Choose your preferred primary agent
142
+ # BaseGuard will fallback to the other when needed
42
143
  ```
43
144
 
44
- ## Commands
145
+ ## 📋 Complete Command Reference
45
146
 
46
147
  ### Core Commands
47
- - `base init` - Initialize BaseGuard in your project
48
- - `base check` - Check for compatibility violations
49
- - `base fix` - Fix violations with AI analysis and implementation
50
148
 
51
- ### Configuration
52
- - `base config show` - Show current configuration
53
- - `base config set-keys` - Set up API keys for Jules and Gemini
54
- - `base config targets` - Manage browser targets
149
+ ```bash
150
+ # Project initialization
151
+ base init # Interactive setup
152
+ base init --preset baseline-widely # Use specific browser preset
153
+ base init --skip-hooks # Skip git hook installation
55
154
 
56
- ### Automation
57
- - `base automation enable` - Enable git hooks
58
- - `base automation disable` - Disable git hooks
59
- - `base automation status` - Show automation status
155
+ # Compatibility checking
156
+ base check # Check all supported files
157
+ base check --strict # Exit with error if violations found
158
+ base check --files "src/**/*.ts" # Check specific file patterns
159
+ base check --format json # Output results as JSON
160
+ base check --offline # Run without network requests
60
161
 
61
- ## Browser Targets
162
+ # AI-powered fixing
163
+ base fix # Interactive fixing with previews
164
+ base fix --auto # Apply all fixes automatically
165
+ base fix --analyze-only # Only analyze, don't generate fixes
166
+ base fix --files "src/**/*.css" # Fix specific file patterns
167
+ ```
62
168
 
63
- BaseGuard supports flexible browser targeting:
169
+ ### Configuration Management
64
170
 
65
- - **Baseline Widely** - Features supported for 30+ months
66
- - **Baseline Newly** - Recently available baseline features
67
- - **Custom Versions** - Specific browser versions (e.g., "chrome 100")
68
- - **Baseline Keyword** - Use "baseline" for automatic baseline targeting
171
+ ```bash
172
+ # View configuration
173
+ base config show # Detailed configuration display
174
+ base config list # Quick configuration summary
175
+ base config list --format json # Export configuration as JSON
69
176
 
70
- ## Development
177
+ # API key management
178
+ base config set-keys # Interactive API key setup
179
+ base config coding-agent # Manage coding agent selection
180
+ base config coding-agent --show # Show current agent configuration
181
+ base config coding-agent --agent gemini # Set specific agent
182
+
183
+ # Browser targets
184
+ base config targets --add "chrome 100" # Add browser target
185
+ base config targets --remove chrome # Remove browser targets
186
+ base config targets --preset baseline-widely # Set browser preset
187
+
188
+ # Configuration maintenance
189
+ base config validate # Check configuration for errors
190
+ base config recover # Attempt automatic recovery
191
+ base config recover --backup # Create backup before recovery
192
+ ```
193
+
194
+ ### Git Automation
71
195
 
72
196
  ```bash
73
- # Install dependencies
74
- npm install
197
+ # Automation control
198
+ base automation enable # Enable git hooks with setup wizard
199
+ base automation enable --trigger pre-push # Enable with specific trigger
200
+ base automation disable # Disable automation and remove hooks
201
+ base automation status # Show detailed automation status
202
+ base automation configure # Interactive automation setup
75
203
 
76
- # Build the project
77
- npm run build
204
+ # Manual automation testing
205
+ base automation run --trigger pre-commit # Test pre-commit behavior
206
+ base automation run --trigger pre-push # Test pre-push behavior
207
+ ```
78
208
 
79
- # Run tests
80
- npm test
209
+ ### System Management
81
210
 
82
- # Development mode
83
- npm run dev
211
+ ```bash
212
+ # System health and diagnostics
213
+ base status # Show system health overview
214
+ base status --verbose # Detailed system information
215
+ base status --services # Check external service availability
216
+ base diagnostics # Run comprehensive system diagnostics
217
+
218
+ # Quick shortcuts
219
+ base add "firefox 90" # Quick browser target addition
220
+ base remove safari # Quick browser target removal
221
+ base list # Quick configuration summary
222
+ base version # Show version information
223
+ base help [command] # Get help for specific commands
84
224
  ```
85
225
 
86
- ## Requirements
226
+ ## 🎯 Browser Compatibility Targets
87
227
 
88
- - Node.js 18+
89
- - Git (for automation features)
90
- - API keys for Jules and Gemini (for AI features)
228
+ BaseGuard supports flexible browser targeting strategies:
229
+
230
+ ### Preset Configurations
231
+
232
+ ```bash
233
+ # Baseline Widely (Recommended)
234
+ # Features supported across browsers for 30+ months
235
+ base config targets --preset baseline-widely
236
+
237
+ # Baseline Newly
238
+ # Recently available Baseline features (cutting-edge)
239
+ base config targets --preset baseline-newly
240
+
241
+ # Last 2 Years
242
+ # Browsers released in the last 2 years
243
+ base config targets --preset last-2-years
244
+ ```
245
+
246
+ ### Custom Browser Targets
247
+
248
+ ```bash
249
+ # Specific browser versions
250
+ base add "chrome 100" # Chrome 100 and above
251
+ base add "firefox 90" # Firefox 90 and above
252
+ base add "safari 15" # Safari 15 and above
253
+
254
+ # Baseline keyword support
255
+ base add "chrome baseline" # Chrome with Baseline support
256
+ base add "safari baseline" # Safari with Baseline support
257
+ ```
258
+
259
+ ### Example Configurations
260
+
261
+ **Conservative (Maximum Compatibility):**
262
+ ```json
263
+ {
264
+ "targets": [
265
+ "chrome 88",
266
+ "firefox 78",
267
+ "safari 14",
268
+ "edge 88"
269
+ ]
270
+ }
271
+ ```
272
+
273
+ **Modern (Baseline Widely):**
274
+ ```json
275
+ {
276
+ "targets": [
277
+ "chrome baseline",
278
+ "firefox baseline",
279
+ "safari baseline"
280
+ ]
281
+ }
282
+ ```
283
+
284
+ **Cutting-edge (Latest Features):**
285
+ ```json
286
+ {
287
+ "targets": [
288
+ "chrome 120",
289
+ "firefox 120",
290
+ "safari 17"
291
+ ]
292
+ }
293
+ ```
294
+
295
+ ## 🔧 Git Integration & Automation
296
+
297
+ BaseGuard can automatically check your code before commits or pushes:
298
+
299
+ ### Setup Git Hooks
300
+
301
+ ```bash
302
+ # Enable automation with interactive setup
303
+ base automation enable
304
+
305
+ # Choose your trigger:
306
+ # - pre-commit: Check before each commit (faster feedback)
307
+ # - pre-push: Check before each push (less frequent)
308
+
309
+ # Enable with specific settings
310
+ base automation enable --trigger pre-commit --auto-fix
311
+ ```
312
+
313
+ ### Automation Features
314
+
315
+ - **Violation Detection:** Automatically scans staged files (pre-commit) or all files (pre-push)
316
+ - **Commit Blocking:** Prevents commits/pushes when violations are found
317
+ - **Auto-fixing:** Optionally applies AI fixes automatically
318
+ - **Manual Override:** Use `git commit --no-verify` to bypass when needed
319
+
320
+ ### Automation Workflow
321
+
322
+ 1. **Developer makes changes** and runs `git commit`
323
+ 2. **BaseGuard hook triggers** and scans the staged files
324
+ 3. **If violations found:**
325
+ - Shows detailed violation report
326
+ - Blocks the commit
327
+ - Suggests running `base fix` to resolve issues
328
+ 4. **If no violations:** Commit proceeds normally
329
+
330
+ ## 🛠️ Advanced Usage
331
+
332
+ ### Environment Variables
333
+
334
+ ```bash
335
+ # Performance tuning
336
+ export BASEGUARD_MAX_WORKERS=4 # Limit concurrent file processing
337
+ export BASEGUARD_MAX_FILES=1000 # Limit total files processed
338
+ export BASEGUARD_CACHE_SIZE=500 # Limit cache size
339
+
340
+ # Memory optimization
341
+ export NODE_OPTIONS="--max-old-space-size=512" # Limit Node.js memory
342
+ ```
343
+
344
+ ### CI/CD Integration
345
+
346
+ ```bash
347
+ # In your CI pipeline
348
+ base check --strict --format junit > baseguard-results.xml
349
+
350
+ # Exit codes:
351
+ # 0 = No violations found
352
+ # 1 = Violations found (in strict mode)
353
+ ```
354
+
355
+ ### Offline Development
356
+
357
+ BaseGuard works offline for baseline checking:
358
+
359
+ ```bash
360
+ # Run in offline mode (no AI analysis)
361
+ base check --offline
362
+
363
+ # Baseline checking works without network
364
+ # AI features require internet connection
365
+ ```
366
+
367
+ ## 🔍 What BaseGuard Checks
368
+
369
+ BaseGuard analyzes your code for browser compatibility issues across:
370
+
371
+ ### Web Platform Features
372
+ - **CSS Properties & Selectors:** Grid, Flexbox, custom properties, modern selectors
373
+ - **JavaScript APIs:** Fetch, Promises, async/await, ES6+ features
374
+ - **HTML Elements & Attributes:** Modern form inputs, semantic elements
375
+ - **Web APIs:** Canvas, WebGL, WebRTC, WebAssembly, Service Workers
376
+
377
+ ### Framework Support
378
+ - **React/JSX:** Ignores React-specific syntax, focuses on web platform usage
379
+ - **Vue:** Analyzes `<script>` and `<style>` blocks for web platform features
380
+ - **Svelte:** Extracts web platform usage from component files
381
+ - **Vanilla:** Direct analysis of JS, CSS, and HTML files
382
+
383
+ ### Example Violations
384
+
385
+ ```javascript
386
+ // ❌ Will be flagged for older browsers
387
+ const data = await fetch('/api/data');
388
+ const result = data.json();
389
+
390
+ // ✅ BaseGuard can suggest fixes like:
391
+ const data = window.fetch ?
392
+ await fetch('/api/data') :
393
+ await fetchPolyfill('/api/data');
394
+ ```
395
+
396
+ ```css
397
+ /* ❌ Will be flagged for older browsers */
398
+ .container {
399
+ display: grid;
400
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
401
+ }
402
+
403
+ /* ✅ BaseGuard can suggest progressive enhancement */
404
+ .container {
405
+ display: flex; /* Fallback */
406
+ flex-wrap: wrap;
407
+ }
408
+
409
+ @supports (display: grid) {
410
+ .container {
411
+ display: grid;
412
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
413
+ }
414
+ }
415
+ ```
416
+
417
+ ## 🚨 Troubleshooting
418
+
419
+ ### Common Issues
420
+
421
+ **"No files found to check"**
422
+ ```bash
423
+ # Check your file pattern
424
+ base check --files "**/*.{js,ts,jsx,tsx}"
425
+
426
+ # Verify you're in the right directory
427
+ ls -la # Should see your source files
428
+ ```
429
+
430
+ **"Configuration not found"**
431
+ ```bash
432
+ # Initialize BaseGuard in your project
433
+ base init
434
+
435
+ # Or recover corrupted configuration
436
+ base config recover
437
+ ```
438
+
439
+ **"API key invalid"**
440
+ ```bash
441
+ # Reconfigure your API keys
442
+ base config set-keys
443
+
444
+ # Verify your keys are correct:
445
+ # - Gemini: Should start with "AIza"
446
+ # - Jules: Get from jules.google.com dashboard
447
+ ```
448
+
449
+ **"Git hooks not working"**
450
+ ```bash
451
+ # Check automation status
452
+ base automation status
453
+
454
+ # Reinstall hooks
455
+ base automation disable
456
+ base automation enable
457
+ ```
458
+
459
+ ### Getting Help
460
+
461
+ ```bash
462
+ # System health check
463
+ base status --verbose
464
+
465
+ # Comprehensive diagnostics
466
+ base diagnostics
467
+
468
+ # Debug mode for detailed logging
469
+ base check --debug
470
+ base fix --debug
471
+ ```
472
+
473
+ ### Support Resources
474
+
475
+ - **Documentation:** [GitHub Repository](https://github.com/ebuka1017/baseguard)
476
+ - **Issues:** [Report bugs and request features](https://github.com/ebuka1017/baseguard/issues)
477
+ - **API Documentation:**
478
+ - [Gemini API](https://ai.google.dev/docs)
479
+ - [Jules Documentation](https://jules.google.com/docs)
480
+
481
+ ## 📄 License
482
+
483
+ MIT License - see [LICENSE](LICENSE) file for details.
484
+
485
+ ---
91
486
 
92
- ## License
487
+ **Made with ❤️ by the BaseGuard Team**
93
488
 
94
- MIT
489
+ *Never ship incompatible code again!* 🛡️