Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
991ebb4
fix(learning): implement real HNSW in ExperienceReplay for O(log n) s…
proffesor-for-testing Jan 23, 2026
1576004
fix(security): resolve all vulnerabilities from security audit #202
proffesor-for-testing Jan 23, 2026
389e7e5
fix(security): resolve CodeQL alerts #69, #70, #71, #74
proffesor-for-testing Jan 23, 2026
818868b
Merge main into working-on-main-v3 (lodash security update)
proffesor-for-testing Jan 23, 2026
d025e30
chore: bump version to v3.2.3
proffesor-for-testing Jan 23, 2026
b49b48e
Merge branch 'main' into working-on-main-v3
proffesor-for-testing Jan 23, 2026
8f6c43f
docs: add troubleshooting section for npm upgrade issues
proffesor-for-testing Jan 23, 2026
6c9740f
feat(learning): implement Phase 4 Self-Learning Features with brutal …
proffesor-for-testing Jan 23, 2026
6b1d15f
feat(accessibility): add EN 301 549 EU compliance mapping
proffesor-for-testing Jan 24, 2026
6f5c99a
fix(visual-accessibility): register workflow actions with orchestrator
proffesor-for-testing Jan 24, 2026
87f316e
fix(mcp): resolve ESM/CommonJS interop issue with hnswlib-node
proffesor-for-testing Jan 24, 2026
7302f85
fix(ux): fresh install shows 'idle' status instead of alarming warnings
proffesor-for-testing Jan 24, 2026
7c75a25
feat(coherence): implement ADR-052 Coherence-Gated Quality Engineering
proffesor-for-testing Jan 24, 2026
5dabce2
docs: add DevPod OOM fix to CHANGELOG for v3.3.0
proffesor-for-testing Jan 24, 2026
3eb793c
fix(build): add missing claude-flow adapter files
proffesor-for-testing Jan 24, 2026
a369816
Merge main into working-on-main-v3
proffesor-for-testing Jan 24, 2026
7241a28
cloud-sync-plan
proffesor-for-testing Jan 24, 2026
94760d1
fix(ci): add coherence.yml workflow with proper permissions
proffesor-for-testing Jan 24, 2026
32820ad
fix(ci): add job outputs and update vitest config for v4
proffesor-for-testing Jan 24, 2026
4a6ab73
fix(test): update mincut test to expect 'idle' for empty graph
proffesor-for-testing Jan 24, 2026
877e059
fix(security): resolve CodeQL incomplete-sanitization alerts
proffesor-for-testing Jan 24, 2026
0dc4002
fix(test): add timeout to browser-swarm-coordinator afterEach hook
proffesor-for-testing Jan 24, 2026
2ac0128
fix(security): escape backslashes in shell arguments (CodeQL #117)
proffesor-for-testing Jan 24, 2026
73ef222
fix(security): resolve CodeQL incomplete-sanitization alerts #116-121
proffesor-for-testing Jan 24, 2026
ee7198d
Merge branch 'main' into working-on-main-v3
proffesor-for-testing Jan 24, 2026
093bb28
fix(ux): resolve issue #205 regression - fresh install shows 'idle' n…
proffesor-for-testing Jan 24, 2026
71d36b1
feat(sync): implement cloud sync to ruvector-postgres
proffesor-for-testing Jan 24, 2026
ff8a42b
fix(security): implement SEC-001 input validation and sanitization
proffesor-for-testing Jan 24, 2026
4318fc4
fix(init): preserve config.yaml customizations on reinstall
proffesor-for-testing Jan 24, 2026
53ec28a
fix(coherence): resolve WASM SpectralEngine binding and add defensive…
proffesor-for-testing Jan 25, 2026
2815570
feat(quality): complete GOAP Quality Remediation Plan v3.3.1
proffesor-for-testing Jan 25, 2026
a9ebd05
chore: add v3/.claude/ and .claude/memory/ to gitignore
proffesor-for-testing Jan 25, 2026
5cb6e83
fix(ci): add missing wizard core infrastructure files
proffesor-for-testing Jan 25, 2026
d1912f5
docs: clarify MCP server registration options
proffesor-for-testing Jan 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ yarn-error.log*
# Local n8n data (contains credentials, database, etc.)
.n8n-local/

# Core dumps
core
# Core dumps (file only, not directories)
/core
# Allow wizard core infrastructure
!v3/src/cli/wizards/core/

# Test results (generated files)
test-results/
Expand Down Expand Up @@ -143,6 +145,8 @@ docs/qx-reports/*

# Claude Flow generated files
.claude/settings.local.json
.claude/memory/
v3/.claude/
.mcp.json
claude-flow.config.json
.swarm/
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ aqe init --wizard
# Or with auto-configuration
aqe init --auto

# Add MCP server to Claude Code (optional)
claude mcp add agentic-qe npx agentic-qe mcp
# Add MCP server to Claude Code (pick one)
# Option 1: Global install (recommended after npm install -g)
claude mcp add aqe -- aqe-mcp

# Option 2: Via npx (no global install needed)
claude mcp add aqe -- npx agentic-qe mcp

# Verify connection
claude mcp list
Expand Down
165 changes: 120 additions & 45 deletions docs/plans/cloud-sync-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ CREATE TABLE aqe.memory_entries (
partition TEXT NOT NULL DEFAULT 'default',
value JSONB NOT NULL,
metadata JSONB,
embedding vector(384), -- For semantic search
embedding ruvector(384), -- For semantic search (ruvector)
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW(),
expires_at TIMESTAMPTZ,
Expand Down Expand Up @@ -167,7 +167,7 @@ CREATE TABLE aqe.patterns (
metadata JSONB,
domain TEXT DEFAULT 'general',
success_rate REAL DEFAULT 1.0,
embedding vector(384),
embedding ruvector(384),
source_env TEXT NOT NULL,
expires_at TIMESTAMPTZ,
created_at TIMESTAMPTZ DEFAULT NOW()
Expand Down Expand Up @@ -199,7 +199,7 @@ CREATE TABLE aqe.claude_flow_memory (
key TEXT NOT NULL,
value JSONB NOT NULL,
category TEXT, -- 'adr-analysis', 'agent-patterns', etc.
embedding vector(384),
embedding ruvector(384),
source_env TEXT NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW(),
UNIQUE(key, source_env)
Expand Down Expand Up @@ -249,8 +249,8 @@ CREATE TABLE aqe.sona_patterns (
id TEXT PRIMARY KEY,
type TEXT NOT NULL,
domain TEXT,
state_embedding vector(384),
action_embedding vector(384),
state_embedding ruvector(384),
action_embedding ruvector(384),
action_type TEXT,
action_value JSONB,
outcome_reward REAL,
Expand All @@ -269,7 +269,7 @@ CREATE TABLE aqe.qe_patterns (
pattern_type TEXT NOT NULL,
qe_domain TEXT, -- 'test-generation', 'coverage-analysis', etc.
content JSONB NOT NULL,
embedding vector(384),
embedding ruvector(384),
confidence REAL,
usage_count INTEGER DEFAULT 0,
success_rate REAL DEFAULT 1.0,
Expand Down Expand Up @@ -380,36 +380,51 @@ CREATE INDEX idx_patterns_domain ON aqe.patterns(domain);

## 4. Implementation Plan

### Phase 1: Schema Migration (Day 1)
- [ ] Create PostgreSQL schema in cloud DB
- [ ] Set up ruvector indexes
- [ ] Create sync_state tracking table
- [ ] Test schema with sample data

### Phase 2: Sync Agent (Days 2-3)
- [ ] Create TypeScript sync agent
- [ ] Implement IAP tunnel connection
- [ ] Add SQLite → PostgreSQL data conversion
- [ ] Handle JSON/JSONB transformations
- [ ] Add conflict resolution logic

### Phase 3: Initial Migration (Day 4)
- [ ] Full sync of all historical data
- [ ] Verify data integrity
- [ ] Generate embeddings for patterns
- [ ] Test vector similarity search

### Phase 4: Incremental Sync (Day 5)
- [ ] Implement change detection
### Phase 1: Schema Migration (Day 1) ✅ COMPLETED
- [x] Create PostgreSQL schema in cloud DB (`v3/src/sync/schema/cloud-schema.sql`)
- [x] Set up ruvector HNSW indexes (using `ruvector_cosine_ops`)
- [x] Create sync_state tracking table
- [x] Apply migration for additional columns (`migration-001.sql`)

### Phase 2: Sync Agent (Days 2-3) ✅ COMPLETED
- [x] Create TypeScript sync agent (`v3/src/sync/sync-agent.ts`)
- [x] Implement IAP tunnel connection (`v3/src/sync/cloud/tunnel-manager.ts`)
- [x] Add SQLite → PostgreSQL data conversion (`v3/src/sync/readers/`)
- [x] Handle JSON/JSONB transformations (auto-wrap non-JSON strings)
- [x] Handle timestamp conversions (Unix ms → ISO 8601)
- [x] Add conflict resolution logic (ON CONFLICT DO UPDATE)

### Phase 3: Initial Migration (Day 4) ✅ COMPLETED
- [x] Full sync of all historical data (5,062 records total)
- [x] Verify data integrity (all tables verified)
- [ ] Generate embeddings for patterns (planned)
- [ ] Test vector similarity search (planned)

### Phase 4: Incremental Sync (Day 5) 🔄 IN PROGRESS
- [x] Implement change detection (incremental mode)
- [ ] Set up periodic sync (cron/hook)
- [ ] Add sync status monitoring
- [ ] Handle network failures gracefully
- [x] Add sync status monitoring (`aqe sync status`)
- [x] Handle network failures gracefully (port connectivity check, retries)

### Phase 5: Bidirectional Learning (Day 6+)
- [ ] Enable pattern sharing across environments
- [ ] Implement consensus for conflicting patterns
- [ ] Add cross-environment success rate aggregation

### Sync Results (2026-01-24)
| Source | Records | Status |
|--------|---------|--------|
| v3-qe-patterns | 1,073 | ✅ |
| v3-sona-patterns | 34 | ✅ |
| v3-goap-actions | 40 | ✅ |
| claude-flow-memory | 2 | ✅ |
| root-memory-entries | 2,060 | ✅ |
| root-learning-experiences | 665 | ✅ |
| root-goap-actions | 61 | ✅ |
| root-patterns | 45 | ✅ |
| root-events | 1,082 | ✅ |
| **Total** | **5,062** | ✅ |

---

## 5. Sync Agent Design
Expand Down Expand Up @@ -554,30 +569,90 @@ async function withTunnel<T>(fn: (conn: Connection) => Promise<T>): Promise<T>;

---

## 9. CLI Commands
## 9. CLI Commands ✅ IMPLEMENTED

```bash
# In v3/ directory (or use npm -w v3)
cd v3

# Initial setup
npm run sync:init # Create cloud schema
npm run sync:migrate # Full initial migration
npm run sync:cloud:init # Generate cloud schema SQL
npm run sync:cloud:config # Show sync configuration

# Regular sync
npm run sync # Incremental sync
npm run sync:full # Force full sync
npm run sync:status # Check sync state

# Utilities
npm run sync:verify # Verify data integrity
npm run sync:rollback # Rollback last sync
npm run sync:export # Export cloud data locally
npm run sync:cloud # Incremental sync (default)
npm run sync:cloud:full # Force full sync

# Status & verification
npm run sync:cloud:status # Check sync state
npm run sync:cloud:verify # Verify data integrity

# Or use the CLI directly:
npx tsx src/cli/index.ts sync # Incremental sync
npx tsx src/cli/index.ts sync --full # Full sync
npx tsx src/cli/index.ts sync status # Check status
npx tsx src/cli/index.ts sync verify # Verify integrity
npx tsx src/cli/index.ts sync config # Show config
```

### Environment Variables

```bash
# Required
export PGPASSWORD=aqe_secure_2024

# Optional (defaults shown)
export GCP_PROJECT=ferrous-griffin-480616-s9
export GCP_ZONE=us-central1-a
export GCP_INSTANCE=ruvector-postgres
export GCP_DATABASE=aqe_learning
export GCP_USER=ruvector
export GCP_TUNNEL_PORT=15432
export AQE_ENV=devpod
```

---

## 10. Next Steps

1. **Approve this plan** - Review and confirm approach
2. **Create cloud schema** - Run migration SQL
3. **Build sync agent** - TypeScript implementation
4. **Initial migration** - Sync historical data
5. **Set up automation** - Cron or hook-based sync
1. ~~**Approve this plan**~~ ✅ DONE - Review and confirm approach
2. ~~**Create cloud schema**~~ ✅ DONE - Schema applied with ruvector
3. ~~**Build sync agent**~~ ✅ DONE - TypeScript implementation complete
4. ~~**Initial migration**~~ ✅ DONE - 5,062 records synced
5. **Set up automation** - Cron or hook-based sync (TODO)
6. **Generate embeddings** - Use ruvector for semantic search (TODO)
7. **Enable bidirectional sync** - Multi-environment learning (TODO)

---

## 11. Cloud Infrastructure

### GCE VM Setup

The cloud database runs on a GCE VM with the ruvector-postgres Docker container:

```bash
# VM: ruvector-postgres
# Zone: us-central1-a
# Project: ferrous-griffin-480616-s9

# Docker container running on VM
docker run -d \
--name ruvector-db \
-e POSTGRES_USER=ruvector \
-e POSTGRES_PASSWORD=aqe_secure_2024 \
-e POSTGRES_DB=aqe_learning \
-p 5432:5432 \
ruvnet/ruvector-postgres:latest

# Access via IAP tunnel (no public IP needed)
gcloud compute start-iap-tunnel ruvector-postgres 5432 \
--local-host-port=localhost:15432 \
--zone=us-central1-a \
--project=ferrous-griffin-480616-s9
```

### Security
- No public IP on the VM
- Access only through IAP tunnel with Google authentication
- Database credentials stored in environment variables
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentic-qe",
"version": "3.3.0",
"version": "3.3.1",
"description": "Agentic Quality Engineering V3 - Domain-Driven Design Architecture with 12 Bounded Contexts, O(log n) coverage analysis, ReasoningBank learning, 51 specialized QE agents, mathematical Coherence verification, deep Claude Flow integration",
"main": "./v3/dist/index.js",
"types": "./v3/dist/index.d.ts",
Expand Down Expand Up @@ -41,6 +41,11 @@
"v2:test": "cd v2 && npm test",
"v2:dev": "cd v2 && tsx src/cli/index.ts",
"sync:agents": "cd v3 && npm run sync:agents",
"sync:cloud": "cd v3 && npm run sync:cloud",
"sync:cloud:full": "cd v3 && npm run sync:cloud:full",
"sync:cloud:status": "cd v3 && npm run sync:cloud:status",
"sync:cloud:verify": "cd v3 && npm run sync:cloud:verify",
"sync:cloud:config": "cd v3 && npm run sync:cloud:config",
"prepublishOnly": "cd v3 && npm run build"
},
"keywords": [
Expand Down
Loading
Loading