geminize 1.0.0 → 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.
- checksums.yaml +4 -4
- data/.cursor/mcp.json +3 -0
- data/.cursor/rules/isolation_rules/Core/command-execution.mdc +235 -0
- data/.cursor/rules/isolation_rules/Core/complexity-decision-tree.mdc +187 -0
- data/.cursor/rules/isolation_rules/Core/creative-phase-enforcement.mdc +145 -0
- data/.cursor/rules/isolation_rules/Core/creative-phase-metrics.mdc +195 -0
- data/.cursor/rules/isolation_rules/Core/file-verification.mdc +198 -0
- data/.cursor/rules/isolation_rules/Core/platform-awareness.mdc +71 -0
- data/.cursor/rules/isolation_rules/Level3/planning-comprehensive.mdc +159 -0
- data/.cursor/rules/isolation_rules/Level3/task-tracking-intermediate.mdc +135 -0
- data/.cursor/rules/isolation_rules/Phases/CreativePhase/creative-phase-architecture.mdc +187 -0
- data/.cursor/rules/isolation_rules/main.mdc +123 -0
- data/.cursor/rules/isolation_rules/visual-maps/archive-mode-map.mdc +277 -0
- data/.cursor/rules/isolation_rules/visual-maps/creative-mode-map.mdc +224 -0
- data/.cursor/rules/isolation_rules/visual-maps/implement-mode-map.mdc +321 -0
- data/.cursor/rules/isolation_rules/visual-maps/plan-mode-map.mdc +269 -0
- data/.cursor/rules/isolation_rules/visual-maps/qa-mode-map.mdc +495 -0
- data/.cursor/rules/isolation_rules/visual-maps/reflect-mode-map.mdc +234 -0
- data/.cursor/rules/isolation_rules/visual-maps/van-mode-map.mdc +902 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-complexity-determination.mdc +60 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-file-verification.mdc +49 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-mode-map.mdc +49 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-platform-detection.mdc +50 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/build-test.mdc +117 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/config-check.mdc +103 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/dependency-check.mdc +147 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/environment-check.mdc +104 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-checks/file-verification.mdc +1 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-main.mdc +142 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/common-fixes.mdc +92 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/mode-transitions.mdc +101 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/reports.mdc +149 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/rule-calling-guide.mdc +66 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-utils/rule-calling-help.mdc +19 -0
- data/.cursor/rules/isolation_rules/visual-maps/van_mode_split/van-qa-validation.md.old +363 -0
- data/.env.example +7 -0
- data/.memory_bank/activeContext.md +102 -0
- data/.memory_bank/progress.md +93 -0
- data/.memory_bank/projectbrief.md +45 -0
- data/.memory_bank/systemPatterns.md +90 -0
- data/.memory_bank/tasks.md +142 -0
- data/.memory_bank/techContext.md +73 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +42 -0
- data/README.md +223 -5
- data/examples/function_calling.rb +218 -0
- data/examples/models_api.rb +125 -0
- data/examples/safety_settings.rb +82 -0
- data/lib/geminize/configuration.rb +4 -4
- data/lib/geminize/model_info.rb +87 -8
- data/lib/geminize/models/content_request_extensions.rb +219 -0
- data/lib/geminize/models/content_request_safety.rb +123 -0
- data/lib/geminize/models/content_response_extensions.rb +120 -0
- data/lib/geminize/models/function_declaration.rb +112 -0
- data/lib/geminize/models/function_response.rb +70 -0
- data/lib/geminize/models/model.rb +101 -109
- data/lib/geminize/models/model_list.rb +70 -28
- data/lib/geminize/models/safety_setting.rb +102 -0
- data/lib/geminize/models/tool.rb +47 -0
- data/lib/geminize/models/tool_config.rb +52 -0
- data/lib/geminize/module_extensions.rb +228 -0
- data/lib/geminize/module_safety.rb +135 -0
- data/lib/geminize/request_builder.rb +29 -0
- data/lib/geminize/version.rb +1 -1
- data/lib/geminize.rb +83 -14
- metadata +57 -2
@@ -0,0 +1,363 @@
|
|
1
|
+
# VAN MODE: QA TECHNICAL VALIDATION (Pre-BUILD)
|
2
|
+
|
3
|
+
> **TL;DR:** This map details the technical validation process executed *after* CREATIVE mode and *before* BUILD mode, triggered by the `VAN QA` command. It ensures dependencies, configuration, environment, and basic build functionality are sound.
|
4
|
+
|
5
|
+
## 🚀 VAN QA MODE ACTIVATION
|
6
|
+
|
7
|
+
After completing CREATIVE mode, when the user types "VAN QA", respond:
|
8
|
+
|
9
|
+
```
|
10
|
+
User: VAN QA
|
11
|
+
|
12
|
+
Response: OK VAN QA - Beginning Technical Validation
|
13
|
+
Loading QA Validation map...
|
14
|
+
```
|
15
|
+
|
16
|
+
## 🔄 QA COMMAND PRECEDENCE (QA Override)
|
17
|
+
|
18
|
+
QA validation can be called at any point (`QA` command) and takes immediate precedence:
|
19
|
+
|
20
|
+
```mermaid
|
21
|
+
graph TD
|
22
|
+
UserQA["User Types: QA"] --> HighPriority["⚠️ HIGH PRIORITY COMMAND"]
|
23
|
+
HighPriority --> CurrentTask["Pause Current Task/Process"]
|
24
|
+
CurrentTask --> LoadQA["Load QA Validation Map (This File)"]
|
25
|
+
LoadQA --> RunQA["Execute QA Validation Process"]
|
26
|
+
RunQA --> QAResults{"QA Results"}
|
27
|
+
|
28
|
+
QAResults -->|"PASS"| ResumeFlow["Resume Prior Process Flow"]
|
29
|
+
QAResults -->|"FAIL"| FixIssues["Fix Identified Issues"]
|
30
|
+
FixIssues --> ReRunQA["Re-run QA Validation"]
|
31
|
+
ReRunQA --> QAResults
|
32
|
+
|
33
|
+
style UserQA fill:#f8d486,stroke:#e8b84d,color:black
|
34
|
+
style HighPriority fill:#ff0000,stroke:#cc0000,color:white,stroke-width:3px
|
35
|
+
style LoadQA fill:#4da6ff,stroke:#0066cc,color:white
|
36
|
+
style RunQA fill:#4da6ff,stroke:#0066cc,color:white
|
37
|
+
style QAResults fill:#f6546a,stroke:#c30052,color:white
|
38
|
+
```
|
39
|
+
|
40
|
+
### QA Interruption Rules
|
41
|
+
|
42
|
+
1. **Immediate Precedence:** `QA` command interrupts everything.
|
43
|
+
2. **Load & Execute:** Load this map (`van-qa-validation.mdc`) and run the full process.
|
44
|
+
3. **Remediation Priority:** Fixes take priority over pending mode switches.
|
45
|
+
4. **Resume:** On PASS, resume the previous flow.
|
46
|
+
|
47
|
+
```
|
48
|
+
⚠️ QA OVERRIDE ACTIVATED
|
49
|
+
All other processes paused
|
50
|
+
QA validation checks now running...
|
51
|
+
Any issues found MUST be remediated before continuing with normal process flow
|
52
|
+
```
|
53
|
+
|
54
|
+
## 🔍 TECHNICAL VALIDATION OVERVIEW
|
55
|
+
|
56
|
+
Four-point validation process:
|
57
|
+
|
58
|
+
```mermaid
|
59
|
+
graph TD
|
60
|
+
VANQA["VAN QA MODE"] --> FourChecks["FOUR-POINT VALIDATION"]
|
61
|
+
|
62
|
+
FourChecks --> DepCheck["1️⃣ DEPENDENCY VERIFICATION"]
|
63
|
+
DepCheck --> ConfigCheck["2️⃣ CONFIGURATION VALIDATION"]
|
64
|
+
ConfigCheck --> EnvCheck["3️⃣ ENVIRONMENT VALIDATION"]
|
65
|
+
EnvCheck --> MinBuildCheck["4️⃣ MINIMAL BUILD TEST"]
|
66
|
+
|
67
|
+
MinBuildCheck --> ValidationResults{"All Checks<br>Passed?"}
|
68
|
+
ValidationResults -->|"Yes"| SuccessReport["GENERATE SUCCESS REPORT"]
|
69
|
+
ValidationResults -->|"No"| FailureReport["GENERATE FAILURE REPORT"]
|
70
|
+
|
71
|
+
SuccessReport --> BUILD_Transition["Trigger BUILD Mode"]
|
72
|
+
FailureReport --> FixIssues["Fix Technical Issues"]
|
73
|
+
FixIssues --> ReValidate["Re-validate (Re-run VAN QA)"]
|
74
|
+
ReValidate --> FourChecks
|
75
|
+
|
76
|
+
style VANQA fill:#4da6ff,stroke:#0066cc,color:white
|
77
|
+
style FourChecks fill:#f6546a,stroke:#c30052,color:white
|
78
|
+
style ValidationResults fill:#f6546a,stroke:#c30052,color:white
|
79
|
+
style BUILD_Transition fill:#10b981,stroke:#059669,color:white
|
80
|
+
style FixIssues fill:#ff5555,stroke:#dd3333,color:white
|
81
|
+
```
|
82
|
+
|
83
|
+
## 🔄 INTEGRATION WITH DESIGN DECISIONS
|
84
|
+
|
85
|
+
Reads Creative Phase outputs (e.g., `memory-bank/systemPatterns.md`) to inform validation:
|
86
|
+
|
87
|
+
```mermaid
|
88
|
+
graph TD
|
89
|
+
Start["Read Design Decisions"] --> ReadCreative["Parse Creative Phase<br>Documentation"]
|
90
|
+
ReadCreative --> ExtractTech["Extract Technology<br>Choices"]
|
91
|
+
ExtractTech --> ExtractDeps["Extract Required<br>Dependencies"]
|
92
|
+
ExtractDeps --> BuildValidationPlan["Build Validation<br>Plan"]
|
93
|
+
BuildValidationPlan --> StartValidation["Start Four-Point<br>Validation Process"]
|
94
|
+
|
95
|
+
style Start fill:#4da6ff,stroke:#0066cc,color:white
|
96
|
+
style ExtractTech fill:#f6546a,stroke:#c30052,color:white
|
97
|
+
style BuildValidationPlan fill:#10b981,stroke:#059669,color:white
|
98
|
+
style StartValidation fill:#f6546a,stroke:#c30052,color:white
|
99
|
+
```
|
100
|
+
|
101
|
+
### Example Technology Extraction (PowerShell):
|
102
|
+
```powershell
|
103
|
+
# Example: Extract technology choices from creative phase documentation
|
104
|
+
function Extract-TechnologyChoices {
|
105
|
+
$techChoices = @{}
|
106
|
+
# Read from systemPatterns.md
|
107
|
+
if (Test-Path "memory-bank\systemPatterns.md") {
|
108
|
+
$content = Get-Content "memory-bank\systemPatterns.md" -Raw
|
109
|
+
if ($content -match "Framework:\s*(\w+)") { $techChoices["framework"] = $Matches[1] }
|
110
|
+
if ($content -match "UI Library:\s*(\w+)") { $techChoices["ui_library"] = $Matches[1] }
|
111
|
+
if ($content -match "State Management:\s*([^\n]+)") { $techChoices["state_management"] = $Matches[1].Trim() }
|
112
|
+
}
|
113
|
+
return $techChoices
|
114
|
+
}
|
115
|
+
```
|
116
|
+
|
117
|
+
## 🔍 DETAILED QA VALIDATION STEPS & SCRIPTS
|
118
|
+
|
119
|
+
### 1️⃣ DEPENDENCY VERIFICATION
|
120
|
+
|
121
|
+
```mermaid
|
122
|
+
# Mermaid graph for Dependency Verification (as in original file)
|
123
|
+
graph TD
|
124
|
+
Start["Dependency Verification"] --> ReadDeps["Read Required Dependencies<br>from Creative Phase"]
|
125
|
+
ReadDeps --> CheckInstalled["Check if Dependencies<br>are Installed"]
|
126
|
+
CheckInstalled --> DepStatus{"All Dependencies<br>Installed?"}
|
127
|
+
DepStatus -->|"Yes"| VerifyVersions["Verify Versions<br>and Compatibility"]
|
128
|
+
DepStatus -->|"No"| InstallMissing["Install Missing<br>Dependencies"]
|
129
|
+
InstallMissing --> VerifyVersions
|
130
|
+
VerifyVersions --> VersionStatus{"Versions<br>Compatible?"}
|
131
|
+
VersionStatus -->|"Yes"| DepSuccess["Dependencies Verified<br>✅ PASS"]
|
132
|
+
VersionStatus -->|"No"| UpgradeVersions["Upgrade/Downgrade<br>as Needed"]
|
133
|
+
UpgradeVersions --> RetryVerify["Retry Verification"]
|
134
|
+
RetryVerify --> VersionStatus
|
135
|
+
style Start fill:#4da6ff; style DepSuccess fill:#10b981; style DepStatus fill:#f6546a; style VersionStatus fill:#f6546a;
|
136
|
+
```
|
137
|
+
|
138
|
+
#### Example Implementation (PowerShell):
|
139
|
+
```powershell
|
140
|
+
# Verify-Dependencies function (as in original file)
|
141
|
+
function Verify-Dependencies {
|
142
|
+
$requiredDeps = @{ "node" = ">=14.0.0"; "npm" = ">=6.0.0" }
|
143
|
+
$missingDeps = @(); $incompatibleDeps = @()
|
144
|
+
try { $nodeVersion = node -v; if ($nodeVersion -match "v(\d+).*") { if ([int]$Matches[1] -lt 14) { $incompatibleDeps += "node" } } } catch { $missingDeps += "node" }
|
145
|
+
try { $npmVersion = npm -v; if ($npmVersion -match "(\d+).*") { if ([int]$Matches[1] -lt 6) { $incompatibleDeps += "npm" } } } catch { $missingDeps += "npm" }
|
146
|
+
if ($missingDeps.Count -eq 0 -and $incompatibleDeps.Count -eq 0) { Write-Output "✅ Deps OK"; return $true } else { Write-Output "❌ Deps FAIL"; return $false }
|
147
|
+
}
|
148
|
+
```
|
149
|
+
|
150
|
+
#### Example Implementation (Bash):
|
151
|
+
```bash
|
152
|
+
# verify_dependencies function (as in original file)
|
153
|
+
verify_dependencies() {
|
154
|
+
local missing_deps=(); local incompatible_deps=()
|
155
|
+
if command -v node &> /dev/null; then node_version=$(node -v); if [[ $node_version =~ v([0-9]+) ]]; then if (( ${BASH_REMATCH[1]} < 14 )); then incompatible_deps+=("node"); fi; fi; else missing_deps+=("node"); fi
|
156
|
+
if command -v npm &> /dev/null; then npm_version=$(npm -v); if [[ $npm_version =~ ([0-9]+) ]]; then if (( ${BASH_REMATCH[1]} < 6 )); then incompatible_deps+=("npm"); fi; fi; else missing_deps+=("npm"); fi
|
157
|
+
if [ ${#missing_deps[@]} -eq 0 ] && [ ${#incompatible_deps[@]} -eq 0 ]; then echo "✅ Deps OK"; return 0; else echo "❌ Deps FAIL"; return 1; fi
|
158
|
+
}
|
159
|
+
```
|
160
|
+
|
161
|
+
### 2️⃣ CONFIGURATION VALIDATION
|
162
|
+
|
163
|
+
```mermaid
|
164
|
+
# Mermaid graph for Configuration Validation (as in original file)
|
165
|
+
graph TD
|
166
|
+
Start["Configuration Validation"] --> IdentifyConfigs["Identify Files"]
|
167
|
+
IdentifyConfigs --> ReadConfigs["Read Files"]
|
168
|
+
ReadConfigs --> ValidateSyntax["Validate Syntax"]
|
169
|
+
ValidateSyntax --> SyntaxStatus{"Valid?"}
|
170
|
+
SyntaxStatus -->|"Yes"| CheckCompatibility["Check Compatibility"]
|
171
|
+
SyntaxStatus -->|"No"| FixSyntax["Fix Syntax"]
|
172
|
+
FixSyntax --> RetryValidate["Retry"]
|
173
|
+
RetryValidate --> SyntaxStatus
|
174
|
+
CheckCompatibility --> CompatStatus{"Compatible?"}
|
175
|
+
CompatStatus -->|"Yes"| ConfigSuccess["Configs Validated ✅ PASS"]
|
176
|
+
CompatStatus -->|"No"| AdaptConfigs["Adapt Configs"]
|
177
|
+
AdaptConfigs --> RetryCompat["Retry Check"]
|
178
|
+
RetryCompat --> CompatStatus
|
179
|
+
style Start fill:#4da6ff; style ConfigSuccess fill:#10b981; style SyntaxStatus fill:#f6546a; style CompatStatus fill:#f6546a;
|
180
|
+
```
|
181
|
+
|
182
|
+
#### Example Implementation (PowerShell):
|
183
|
+
```powershell
|
184
|
+
# Validate-Configurations function (as in original file)
|
185
|
+
function Validate-Configurations {
|
186
|
+
$configFiles = @("package.json", "tsconfig.json", "vite.config.js")
|
187
|
+
$invalidConfigs = @(); $incompatibleConfigs = @()
|
188
|
+
foreach ($configFile in $configFiles) {
|
189
|
+
if (Test-Path $configFile) {
|
190
|
+
if ($configFile -match "\.json$") { try { Get-Content $configFile -Raw | ConvertFrom-Json | Out-Null } catch { $invalidConfigs += "$configFile (JSON)"; continue } }
|
191
|
+
if ($configFile -eq "vite.config.js") { $content = Get-Content $configFile -Raw; if ($content -notmatch "react\(\)") { $incompatibleConfigs += "$configFile (React)" } }
|
192
|
+
} else { $invalidConfigs += "$configFile (missing)" }
|
193
|
+
}
|
194
|
+
if ($invalidConfigs.Count -eq 0 -and $incompatibleConfigs.Count -eq 0) { Write-Output "✅ Configs OK"; return $true } else { Write-Output "❌ Configs FAIL"; return $false }
|
195
|
+
}
|
196
|
+
```
|
197
|
+
|
198
|
+
### 3️⃣ ENVIRONMENT VALIDATION
|
199
|
+
|
200
|
+
```mermaid
|
201
|
+
# Mermaid graph for Environment Validation (as in original file)
|
202
|
+
graph TD
|
203
|
+
Start["Environment Validation"] --> CheckEnv["Check Env"]
|
204
|
+
CheckEnv --> VerifyBuildTools["Verify Tools"]
|
205
|
+
VerifyBuildTools --> ToolsStatus{"Available?"}
|
206
|
+
ToolsStatus -->|"Yes"| CheckPerms["Check Permissions"]
|
207
|
+
ToolsStatus -->|"No"| InstallTools["Install Tools"]
|
208
|
+
InstallTools --> RetryTools["Retry"]
|
209
|
+
RetryTools --> ToolsStatus
|
210
|
+
CheckPerms --> PermsStatus{"Sufficient?"}
|
211
|
+
PermsStatus -->|"Yes"| EnvSuccess["Environment Validated ✅ PASS"]
|
212
|
+
PermsStatus -->|"No"| FixPerms["Fix Permissions"]
|
213
|
+
FixPerms --> RetryPerms["Retry Check"]
|
214
|
+
RetryPerms --> PermsStatus
|
215
|
+
style Start fill:#4da6ff; style EnvSuccess fill:#10b981; style ToolsStatus fill:#f6546a; style PermsStatus fill:#f6546a;
|
216
|
+
```
|
217
|
+
|
218
|
+
#### Example Implementation (PowerShell):
|
219
|
+
```powershell
|
220
|
+
# Validate-Environment function (as in original file)
|
221
|
+
function Validate-Environment {
|
222
|
+
$requiredTools = @(@{Name='git';Cmd='git --version'},@{Name='node';Cmd='node --version'},@{Name='npm';Cmd='npm --version'})
|
223
|
+
$missingTools = @(); $permissionIssues = @()
|
224
|
+
foreach ($tool in $requiredTools) { try { Invoke-Expression $tool.Cmd | Out-Null } catch { $missingTools += $tool.Name } }
|
225
|
+
try { $testFile = ".__perm_test"; New-Item $testFile -ItemType File -Force | Out-Null; Remove-Item $testFile -Force } catch { $permissionIssues += "CWD Write" }
|
226
|
+
try { $L = New-Object Net.Sockets.TcpListener([Net.IPAddress]::Loopback, 3000); $L.Start(); $L.Stop() } catch { $permissionIssues += "Port 3000" }
|
227
|
+
if ($missingTools.Count -eq 0 -and $permissionIssues.Count -eq 0) { Write-Output "✅ Env OK"; return $true } else { Write-Output "❌ Env FAIL"; return $false }
|
228
|
+
}
|
229
|
+
```
|
230
|
+
|
231
|
+
### 4️⃣ MINIMAL BUILD TEST
|
232
|
+
|
233
|
+
```mermaid
|
234
|
+
# Mermaid graph for Minimal Build Test (as in original file)
|
235
|
+
graph TD
|
236
|
+
Start["Minimal Build Test"] --> CreateTest["Create Test Proj"]
|
237
|
+
CreateTest --> BuildTest["Attempt Build"]
|
238
|
+
BuildTest --> BuildStatus{"Success?"}
|
239
|
+
BuildStatus -->|"Yes"| RunTest["Run Basic Test"]
|
240
|
+
BuildStatus -->|"No"| FixBuild["Fix Build Issues"]
|
241
|
+
FixBuild --> RetryBuild["Retry Build"]
|
242
|
+
RetryBuild --> BuildStatus
|
243
|
+
RunTest --> TestStatus{"Passed?"}
|
244
|
+
TestStatus -->|"Yes"| TestSuccess["Build Test ✅ PASS"]
|
245
|
+
TestStatus -->|"No"| FixTest["Fix Test Issues"]
|
246
|
+
FixTest --> RetryTest["Retry Test"]
|
247
|
+
RetryTest --> TestStatus
|
248
|
+
style Start fill:#4da6ff; style TestSuccess fill:#10b981; style BuildStatus fill:#f6546a; style TestStatus fill:#f6546a;
|
249
|
+
```
|
250
|
+
|
251
|
+
#### Example Implementation (PowerShell):
|
252
|
+
```powershell
|
253
|
+
# Perform-MinimalBuildTest function (as in original file)
|
254
|
+
function Perform-MinimalBuildTest {
|
255
|
+
$buildSuccess = $false; $testSuccess = $false; $testDir = ".__build_test"
|
256
|
+
if (Test-Path $testDir) { Remove-Item $testDir -Recurse -Force }
|
257
|
+
try {
|
258
|
+
New-Item $testDir -ItemType Directory | Out-Null; Push-Location $testDir
|
259
|
+
'{"name": "build-test","scripts": {"build": "echo Build test successful"}}' | Set-Content package.json
|
260
|
+
npm run build | Out-Null; $buildSuccess = $true
|
261
|
+
'console.log("Test successful");' | Set-Content index.js
|
262
|
+
node index.js | Out-Null; $testSuccess = $true
|
263
|
+
} catch { Write-Output "❌ Build test exception" } finally { Pop-Location; if (Test-Path $testDir) { Remove-Item $testDir -Recurse -Force } }
|
264
|
+
if ($buildSuccess -and $testSuccess) { Write-Output "✅ Build Test OK"; return $true } else { Write-Output "❌ Build Test FAIL"; return $false }
|
265
|
+
}
|
266
|
+
```
|
267
|
+
|
268
|
+
## 📝 VALIDATION REPORT FORMATS
|
269
|
+
|
270
|
+
### Comprehensive Success Report:
|
271
|
+
```
|
272
|
+
╔═════════════════════ 🔍 QA VALIDATION REPORT ══════════════════════╗
|
273
|
+
│ PROJECT: [Project Name] | TIMESTAMP: [Current Date/Time] │
|
274
|
+
├─────────────────────────────────────────────────────────────────────┤
|
275
|
+
│ 1️⃣ DEPENDENCIES: ✓ Compatible │
|
276
|
+
│ 2️⃣ CONFIGURATION: ✓ Valid & Compatible │
|
277
|
+
│ 3️⃣ ENVIRONMENT: ✓ Ready │
|
278
|
+
│ 4️⃣ MINIMAL BUILD: ✓ Successful & Passed │
|
279
|
+
├─────────────────────────────────────────────────────────────────────┤
|
280
|
+
│ 🚨 FINAL VERDICT: PASS │
|
281
|
+
│ ➡️ Clear to proceed to BUILD mode │
|
282
|
+
╚═════════════════════════════════════════════════════════════════════╝
|
283
|
+
```
|
284
|
+
|
285
|
+
### Detailed Failure Report:
|
286
|
+
```
|
287
|
+
⚠️⚠️⚠️ QA VALIDATION FAILED ⚠️⚠️⚠️
|
288
|
+
Issues must be resolved before BUILD mode:
|
289
|
+
|
290
|
+
1️⃣ DEPENDENCY ISSUES: [Details/Fix]
|
291
|
+
2️⃣ CONFIGURATION ISSUES: [Details/Fix]
|
292
|
+
3️⃣ ENVIRONMENT ISSUES: [Details/Fix]
|
293
|
+
4️⃣ BUILD TEST ISSUES: [Details/Fix]
|
294
|
+
|
295
|
+
⚠️ BUILD MODE BLOCKED. Type 'VAN QA' after fixing to re-validate.
|
296
|
+
```
|
297
|
+
|
298
|
+
## 🧪 COMMON QA VALIDATION FIXES
|
299
|
+
|
300
|
+
- **Dependencies:** Install Node/npm, run `npm install`, check versions.
|
301
|
+
- **Configuration:** Validate JSON, check required plugins (e.g., React for Vite), ensure TSConfig compatibility.
|
302
|
+
- **Environment:** Check permissions (Admin/sudo), ensure ports are free, install missing CLI tools (git, etc.).
|
303
|
+
- **Build Test:** Check logs for errors, verify minimal config, check path separators.
|
304
|
+
|
305
|
+
## 🔒 BUILD MODE PREVENTION MECHANISM
|
306
|
+
|
307
|
+
Logic to check QA status before allowing BUILD mode transition.
|
308
|
+
|
309
|
+
```mermaid
|
310
|
+
graph TD
|
311
|
+
Start["User Types: BUILD"] --> CheckQA{"QA Validation<br>Passed?"}
|
312
|
+
CheckQA -->|"Yes"| AllowBuild["Allow BUILD Mode"]
|
313
|
+
CheckQA -->|"No"| BlockBuild["BLOCK BUILD MODE"]
|
314
|
+
BlockBuild --> Message["Display:<br>⚠️ QA VALIDATION REQUIRED"]
|
315
|
+
Message --> ReturnToVANQA["Prompt: Type VAN QA"]
|
316
|
+
|
317
|
+
style CheckQA fill:#f6546a; style BlockBuild fill:#ff0000,stroke:#990000; style Message fill:#ff5555; style ReturnToVANQA fill:#4da6ff;
|
318
|
+
```
|
319
|
+
|
320
|
+
### Example Implementation (PowerShell):
|
321
|
+
```powershell
|
322
|
+
# Example: Check QA status before allowing BUILD
|
323
|
+
function Check-QAValidationStatus {
|
324
|
+
$qaStatusFile = "memory-bank\.qa_validation_status" # Assumes status is written here
|
325
|
+
if (Test-Path $qaStatusFile) {
|
326
|
+
if ((Get-Content $qaStatusFile -Raw) -match "PASS") { return $true }
|
327
|
+
}
|
328
|
+
Write-Output "🚫 BUILD MODE BLOCKED: QA VALIDATION REQUIRED. Type 'VAN QA'. 🚫"
|
329
|
+
return $false
|
330
|
+
}
|
331
|
+
```
|
332
|
+
|
333
|
+
## 🚨 MODE TRANSITION TRIGGERS (Relevant to QA)
|
334
|
+
|
335
|
+
### CREATIVE to VAN QA Transition:
|
336
|
+
```
|
337
|
+
⏭️ NEXT MODE: VAN QA
|
338
|
+
To validate technical requirements before implementation, please type 'VAN QA'
|
339
|
+
```
|
340
|
+
|
341
|
+
### VAN QA to BUILD Transition (On Success):
|
342
|
+
```
|
343
|
+
✅ TECHNICAL VALIDATION COMPLETE
|
344
|
+
All prerequisites verified successfully
|
345
|
+
You may now proceed to BUILD mode
|
346
|
+
Type 'BUILD' to begin implementation
|
347
|
+
```
|
348
|
+
|
349
|
+
## 📋 FINAL QA VALIDATION CHECKPOINT
|
350
|
+
|
351
|
+
```
|
352
|
+
✓ SECTION CHECKPOINT: QA VALIDATION
|
353
|
+
- Dependency Verification Passed? [YES/NO]
|
354
|
+
- Configuration Validation Passed? [YES/NO]
|
355
|
+
- Environment Validation Passed? [YES/NO]
|
356
|
+
- Minimal Build Test Passed? [YES/NO]
|
357
|
+
|
358
|
+
→ If all YES: Ready for BUILD mode transition.
|
359
|
+
→ If any NO: Fix identified issues and re-run VAN QA.
|
360
|
+
```
|
361
|
+
|
362
|
+
**Next Step (on PASS):** Trigger BUILD mode.
|
363
|
+
**Next Step (on FAIL):** Address issues and re-run `VAN QA`.
|
data/.env.example
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
# Active Context
|
2
|
+
|
3
|
+
## Current Focus Areas
|
4
|
+
|
5
|
+
### Core Functionality
|
6
|
+
|
7
|
+
- Text generation with Gemini models
|
8
|
+
- Chat conversation support
|
9
|
+
- Multimodal content handling (text + images)
|
10
|
+
- Embeddings generation
|
11
|
+
- Streaming responses
|
12
|
+
- Function calling capabilities
|
13
|
+
- JSON mode for structured responses
|
14
|
+
- Safety settings for content moderation
|
15
|
+
|
16
|
+
### Key Implementation Details
|
17
|
+
|
18
|
+
#### Text Generation
|
19
|
+
|
20
|
+
- Support for all Gemini models
|
21
|
+
- System instructions for guiding model behavior
|
22
|
+
- Generation parameters (temperature, top_k, top_p)
|
23
|
+
- Support for stop sequences
|
24
|
+
- Safety settings for content moderation
|
25
|
+
|
26
|
+
#### Function Calling
|
27
|
+
|
28
|
+
- Tool integration with Gemini API
|
29
|
+
- Function declaration and response models
|
30
|
+
- Support for multiple function definitions
|
31
|
+
- Tool execution modes (AUTO, MANUAL, NONE)
|
32
|
+
- Function result processing
|
33
|
+
- String-based function call detection
|
34
|
+
|
35
|
+
#### JSON Mode
|
36
|
+
|
37
|
+
- Structured data response handling
|
38
|
+
- Automatic JSON parsing
|
39
|
+
- JSON schema integration
|
40
|
+
- Response validation
|
41
|
+
|
42
|
+
#### Multimodal Support
|
43
|
+
|
44
|
+
- Image handling from multiple sources (files, URLs, bytes)
|
45
|
+
- MIME type detection and validation
|
46
|
+
- Size limits enforcement
|
47
|
+
- Support for JPEG, PNG, GIF, WEBP formats
|
48
|
+
|
49
|
+
#### Chat & Conversations
|
50
|
+
|
51
|
+
- Conversation state management
|
52
|
+
- Message history tracking
|
53
|
+
- Context preservation
|
54
|
+
- System instructions for chat
|
55
|
+
|
56
|
+
#### Embeddings
|
57
|
+
|
58
|
+
- Vector generation for semantic text analysis
|
59
|
+
- Vector similarity operations
|
60
|
+
- Task type optimization
|
61
|
+
- Normalization utilities
|
62
|
+
|
63
|
+
#### Streaming
|
64
|
+
|
65
|
+
- Multiple streaming modes (raw, incremental, delta)
|
66
|
+
- Cancellation support
|
67
|
+
- Efficient buffer management
|
68
|
+
- Error handling for interrupted streams
|
69
|
+
|
70
|
+
### API and HTTP Communication
|
71
|
+
|
72
|
+
- Robust HTTP client implementation
|
73
|
+
- Retry mechanisms for transient errors
|
74
|
+
- Timeout handling
|
75
|
+
- Response parsing and validation
|
76
|
+
|
77
|
+
### Error Handling Strategy
|
78
|
+
|
79
|
+
- Comprehensive error class hierarchy
|
80
|
+
- Detailed error messages
|
81
|
+
- API error translation
|
82
|
+
- Validation prior to API calls
|
83
|
+
|
84
|
+
## Active Development Areas
|
85
|
+
|
86
|
+
### Current Improvements
|
87
|
+
|
88
|
+
- Enhanced multimodal support
|
89
|
+
- Streaming response optimizations
|
90
|
+
- Comprehensive documentation
|
91
|
+
- Error handling refinements
|
92
|
+
- Models API integration
|
93
|
+
- Function calling support
|
94
|
+
|
95
|
+
### Upcoming Features
|
96
|
+
|
97
|
+
- Code execution support
|
98
|
+
- Additional content types (audio, PDF)
|
99
|
+
- Caching support
|
100
|
+
- Advanced parameter tuning
|
101
|
+
- Additional vector operations
|
102
|
+
- Improved conversation persistence
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# Progress
|
2
|
+
|
3
|
+
## Current Status
|
4
|
+
|
5
|
+
Geminize is a functional Ruby gem providing a complete interface to the Google Gemini API. The current implementation includes all core features with a focus on stability, documentation, and ease of use. The gem now also includes function calling, JSON mode, and safety settings features.
|
6
|
+
|
7
|
+
## Development Progress
|
8
|
+
|
9
|
+
### Core Functionality
|
10
|
+
|
11
|
+
- **Text Generation**: ✅ Complete
|
12
|
+
- **Chat Conversations**: ✅ Complete
|
13
|
+
- **Embeddings**: ✅ Complete
|
14
|
+
- **Multimodal Support**: ✅ Complete
|
15
|
+
- **Streaming Responses**: ✅ Complete
|
16
|
+
- **Error Handling**: ✅ Complete
|
17
|
+
- **Configuration System**: ✅ Complete
|
18
|
+
- **Models API**: ✅ Complete
|
19
|
+
- **Function Calling**: ✅ Complete
|
20
|
+
- **JSON Mode**: ✅ Complete
|
21
|
+
- **Safety Settings**: ✅ Complete
|
22
|
+
|
23
|
+
### Documentation
|
24
|
+
|
25
|
+
- **README**: ✅ Complete
|
26
|
+
- **YARD Documentation**: 🟡 Partially Complete (80%)
|
27
|
+
- **Examples**: ✅ Complete
|
28
|
+
- **Diagrams**: ❌ Not Started
|
29
|
+
|
30
|
+
### Testing
|
31
|
+
|
32
|
+
- **Unit Tests**: ✅ Complete
|
33
|
+
- **Integration Tests**: 🟡 Partially Complete (85%)
|
34
|
+
- **Performance Tests**: ❌ Not Started
|
35
|
+
|
36
|
+
### Deployment
|
37
|
+
|
38
|
+
- **RubyGems Publishing**: ✅ Complete
|
39
|
+
- **CI/CD Pipeline**: 🟡 Partially Complete (50%)
|
40
|
+
- **Version Management**: ✅ Complete
|
41
|
+
|
42
|
+
## Version History
|
43
|
+
|
44
|
+
### v0.1.0 (2025-04-21)
|
45
|
+
|
46
|
+
- Initial release
|
47
|
+
- Core functionality implemented
|
48
|
+
- Basic documentation
|
49
|
+
|
50
|
+
### v0.1.1 (2025-05-01)
|
51
|
+
|
52
|
+
- Added Rails integration
|
53
|
+
- Enhanced multimodal support
|
54
|
+
- Additional embedding task types
|
55
|
+
- Improved documentation
|
56
|
+
|
57
|
+
### v1.0.0 (2025-05-02)
|
58
|
+
|
59
|
+
- Removed Rails-specific integration
|
60
|
+
- Simplified usage
|
61
|
+
- API stabilization
|
62
|
+
|
63
|
+
### v1.1.0 (2025-05-02)
|
64
|
+
|
65
|
+
- Support for Gemini Models API
|
66
|
+
- Model discovery and filtering functionality
|
67
|
+
- Pagination support
|
68
|
+
- Improved documentation
|
69
|
+
|
70
|
+
### v1.2.0 (2025-05-02)
|
71
|
+
|
72
|
+
- Added function calling capabilities
|
73
|
+
- Added JSON mode for structured responses
|
74
|
+
- Added safety settings for content moderation
|
75
|
+
- Comprehensive test suite for new features
|
76
|
+
- Updated documentation
|
77
|
+
|
78
|
+
## Upcoming Milestones
|
79
|
+
|
80
|
+
### v1.3.0 (Planned)
|
81
|
+
|
82
|
+
- Code execution support
|
83
|
+
- Additional content types (audio, PDF)
|
84
|
+
- Caching mechanisms
|
85
|
+
- Improved conversation persistence
|
86
|
+
|
87
|
+
### v2.0.0 (Planned)
|
88
|
+
|
89
|
+
- Major API refinements
|
90
|
+
- Advanced function calling support
|
91
|
+
- Performance improvements
|
92
|
+
- Additional middleware options
|
93
|
+
- Async API support
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Geminize Project Brief
|
2
|
+
|
3
|
+
## Project Overview
|
4
|
+
|
5
|
+
Geminize is a Ruby gem providing a convenient and robust interface to Google's Gemini AI API. It enables Ruby developers to easily integrate Google's powerful generative AI models into their applications with a clean, idiomatic API.
|
6
|
+
|
7
|
+
## Core Features
|
8
|
+
|
9
|
+
- **Text Generation**: Generate text using various Gemini models
|
10
|
+
- **Multimodal Support**: Send mixed content including text and images
|
11
|
+
- **Conversation Management**: Maintain conversation context for chat applications
|
12
|
+
- **Embeddings Generation**: Generate and manipulate vector representations for text
|
13
|
+
- **Streaming Responses**: Support for efficient streaming output
|
14
|
+
- **Models API**: Discover and filter available Gemini models
|
15
|
+
- **Function Calling**: Enable AI models to call functions defined by developers
|
16
|
+
- **JSON Mode**: Generate structured JSON responses for data-oriented applications
|
17
|
+
- **Safety Settings**: Control content generation with configurable safety thresholds
|
18
|
+
- **Error Handling**: Comprehensive error handling and validation
|
19
|
+
|
20
|
+
## Technical Foundation
|
21
|
+
|
22
|
+
- Pure Ruby implementation with minimal dependencies
|
23
|
+
- Faraday for HTTP client functionality
|
24
|
+
- Support for environment-based or programmatic configuration
|
25
|
+
- Comprehensive API for both simple and advanced use cases
|
26
|
+
- VCR-based testing for API interactions
|
27
|
+
- Modular design with extensible components
|
28
|
+
|
29
|
+
## Project Goals
|
30
|
+
|
31
|
+
- Provide a complete Ruby interface to all Gemini API capabilities
|
32
|
+
- Ensure robust error handling and validation
|
33
|
+
- Maintain clean, well-documented, and idiomatic Ruby code
|
34
|
+
- Support both simple use cases and advanced configurations
|
35
|
+
- Enable seamless integration with various Ruby applications
|
36
|
+
- Stay current with the latest Gemini API features and models
|
37
|
+
|
38
|
+
## Current Version
|
39
|
+
|
40
|
+
Version 1.2.0 implements all core features including the latest additions:
|
41
|
+
|
42
|
+
- Function calling capabilities
|
43
|
+
- JSON mode for structured responses
|
44
|
+
- Safety settings for content moderation
|
45
|
+
- Comprehensive Models API
|