Files
Dragan Spiridonov e1350b292b fix(v3.4.6): hooks deduplication and config cleanup (#232)
* fix(v3.4.1): bundle missing dependencies and test timeouts

- Fixed issue #219: MCP bundle failing due to missing packages
- Changed build scripts from --packages=external to selective externalization
- Pure JS deps (fast-json-patch, jose, uuid) now bundled inline
- Native modules properly externalized (better-sqlite3, hnswlib-node, etc.)
- CommonJS modules with dynamic requires externalized (typescript, fast-glob, yaml, commander, cli-progress, ora)
- Bundle size reduced from ~15MB to ~5MB
- Added timeouts to handleQualityAssess tests to prevent CI failures
- Updated version to 3.4.1

Closes #219

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(v3.4.2): add skill validation system with trust tiers (ADR-056)

Implement 4-layer skill validation system for deterministic outputs:
- Tier 3 (Verified): 46 skills with full eval test suites
- Tier 2 (Validated): 7 skills with executable validators
- Tier 1 (Structured): 5 skills with JSON output schemas
- Tier 0 (Advisory): 5 skills with SKILL.md guidance only

Key additions:
- JSON Schema validation templates for skill outputs
- Executable validator scripts for correctness verification
- Evaluation test framework with multi-model support
- CLI commands: aqe skill report/summary/compare, aqe eval run/status
- ReasoningBank integration for validation pattern learning
- GitHub Actions workflow for CI skill validation
- Trust tier frontmatter in all 63 skill SKILL.md files
- Comprehensive documentation and user guides

Infrastructure:
- .claude/skills/.validation/ - Templates and frameworks
- .claude/skills/*/schemas/ - Output schemas per skill
- .claude/skills/*/scripts/ - Validator scripts per skill
- .claude/skills/*/evals/ - Test cases per skill

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): trust tier-based skill validation

- Tier 3 (Verified): Blocks PR on validation failure
- Tier 2 (Validated): Warns only, doesn't block
- Tier 1 (Structured): Warns only, doesn't block
- Tier 0 (Advisory): Skipped entirely

Reads trust_tier from SKILL.md frontmatter to determine
validation requirements. Only 46 Tier 3 skills block merge.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(validators): remove local keyword from self-test blocks

Shell script fix: 'local' can only be used inside functions, not in
if/else blocks. Both accessibility-testing and compatibility-testing
validators had 'local' declarations in their self-test sections that
caused errors when run outside of a function context.

- Remove local test_file from accessibility-testing self-test
- Remove local test_file, browser_count, tier1_pass from compatibility-testing self-test
- Sync fixes to v3/assets/skills/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(validators): add --self-test support to n8n skill validators

The 5 n8n skill validators were failing CI because they didn't handle
the --self-test flag properly. Added self-test handling that:
- Checks for required tools (jq)
- Verifies schema file exists and is valid JSON
- Returns exit 0 on success

Fixed validators:
- n8n-expression-testing
- n8n-integration-testing-patterns
- n8n-security-testing
- n8n-trigger-testing-strategies
- n8n-workflow-testing-fundamentals

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(skills-installer): scan actual directory for README generation

The createSkillsIndex method was only counting newly-installed skills,
resulting in misleading README content (e.g., showing "1 skill" when
97 skills exist in the directory).

Changes:
- Add scanSkillsDirectory() method to find all valid skill folders
- Update createSkillsIndex() to use actual directory contents
- Categorize skills into QE (63) vs Platform (34) correctly
- Include validation infrastructure status in summary

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(init): add --upgrade flag to update existing installations

When running `aqe init --auto` on an existing project, skills, agents,
and validation infrastructure were skipped because overwrite=false was
the default. This caused upgrades from v3.2.3 to v3.4.2 to only install
new files instead of updating all existing files.

The --upgrade flag sets overwrite=true for:
- Skills installer (63 QE skills + validation infrastructure)
- Agents installer
- N8n installer

Usage:
  aqe init --auto --upgrade  # Update existing installation
  aqe init --upgrade         # Upgrade mode only

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore(v3.4.3): version bump and README cleanup

Version:
- Bump to v3.4.3 in root and v3 package.json
- Add CHANGELOG entry for --upgrade flag and README fixes

README improvements:
- Replace version-specific "What's New" sections with generic "Key Features"
- Remove version numbers from section headers (v3.3.0, v3.4.0, etc.)
- Focus on capabilities, not version history
- CHANGELOG.md remains the source of truth for version changes

Verified:
- 63 QE skills installed
- 51 agents installed
- All 12 domains enabled
- MCP server starts with 31 tools
- CLI status command works

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(init): make --upgrade flag work standalone without --auto

Previously, `aqe init --upgrade` would fall through to runStandardInit()
which only initializes kernel/domains but never installs skills. The
--upgrade flag only had effect inside runModularInit() which required
--auto to be set.

Now --upgrade implies --auto, similar to how --auto-migrate does, so
`aqe init --upgrade` works as expected on existing projects.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(cloud-sync): complete Phase 3 & 4 - embeddings and periodic sync

Phase 3 - Embedding Generation:
- Add SyncEmbeddingGenerator for pattern embeddings (384-dim)
- Generate embeddings using Xenova/all-MiniLM-L6-v2 model
- Implement vector similarity search with cosine similarity
- Add CLI script for embedding generation and search
- 67 patterns embedded (45 patterns + 22 sona_patterns)

Phase 4 - Periodic Sync:
- Add CloudSyncWorker background worker
- Default 1-hour interval (configurable via AQE_SYNC_INTERVAL)
- Enable with AQE_CLOUD_SYNC_ENABLED=true
- Graceful handling when gcloud CLI unavailable

Bug Fixes:
- Fix issue #226: Dynamic require of child_process error
- Use platform-based heuristics for global npm paths
- Exclude browser E2E tests from CI workflows

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: update benchmark reports and cleanup old reports

- Update coherence comparison and success rate benchmarks
- Remove stale benchmark reports from earlier dates
- Minor package.json and ADR doc updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(init): MCP daemon auto-start and ESM enum fixes

## MCP Daemon Auto-Start (10-workers.ts)
- Add auto-start functionality during `aqe init --auto`
- Spawn MCP daemon as detached background process
- Smart MCP command discovery (local bundle → global → npx fallback)
- Process health verification after startup (1.5s wait)
- Helpful error messages for missing dependencies
- Daemon script uses relative paths for portability

## ESM Enum Import Fix (agent-booster-wasm)
- Convert Language/MergeStrategy enums to const objects
- Fix tsx dev mode compatibility with static imports
- Add LanguageNames reverse lookup helper
- Works in tsx, node, and bundled environments

## Dynamic WASM Import (agent-booster/adapter.ts)
- Replace static import with lazy-loaded dynamic import
- Add loadWasmModule() for deferred loading
- Works around tsx's static import resolution quirks
- Local WasmLanguage const for type safety

## Init Phase Improvements
- 04-database.ts: Use UnifiedMemoryManager for full v3 schema
- 08-mcp.ts: Dual MCP config (.mcp.json + .claude/mcp.json)
- 10-workers.ts: All 11 workers with correct intervals

## Verified Working
- aqe init --auto: Completes in ~2s
- MCP daemon: Auto-starts and stays running
- Test generation: Full v3 stack (SONA, FlashAttention, DecisionTransformer)
- Database: 28 tables, v7 schema, persistence working
- All 12 DDD domains enabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(v3.4.5): MCP daemon startup and code intelligence KG persistence

- Add `aqe mcp` CLI command to start MCP protocol server
- Fix "error: unknown command 'mcp'" during `aqe init --auto`
- Fix code intelligence KG data loss by using SQLite instead of InMemoryBackend
- KG now persists to .agentic-qe/memory.db for QE agent semantic search
- Update daemon startup scripts with proper MCP command resolution

Fixes:
- MCP daemon fallback chain: aqe-mcp → bundled MCP → aqe mcp → npx
- Code intelligence pre-scan now persists to SQLite (was ephemeral)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(init): exclude nested node_modules from code intelligence scan

The glob ignore patterns `node_modules/**` only excluded the root-level
node_modules directory. Nested node_modules directories (e.g.,
v2/frontend/node_modules, v3/node_modules) were being scanned.

Changed patterns to `**/node_modules/**` to match at any depth.

Before fix:
- Init time: 15 min 58 sec
- Entries indexed: 941,652
- DB size: 1.1 GB
- 76% of entries from node_modules

After fix:
- Init time: 1 min 40 sec (9.5x faster)
- Entries indexed: 90,521 (10x fewer)
- DB size: 245 MB (4.5x smaller)
- 0 node_modules entries

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(v3.4.6): hooks deduplication and config cleanup

- Add deduplication logic to hooks phase to prevent duplicate hooks on
  repeated init runs (fixes settings.json growing unbounded)
- Clean up .claude/settings.json (removed duplicate hook entries)
- Clean up .claude/mcp.json (removed duplicate aqe entry)
- Bump version to 3.4.6

The hooks phase now builds a Set of existing command strings and only
adds new hooks if they don't already exist.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 16:49:30 +01:00

26 lines
704 B
Bash
Executable File

#!/bin/bash
# AQE v3 Worker Daemon Stop Script
# Generated by aqe init
# Get directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Navigate up from .agentic-qe/workers to project root
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
WORKERS_DIR="$PROJECT_ROOT/.agentic-qe/workers"
PID_FILE="$WORKERS_DIR/daemon.pid"
if [ -f "$PID_FILE" ]; then
PID=$(cat "$PID_FILE")
if kill -0 "$PID" 2>/dev/null; then
echo "Stopping daemon (PID: $PID)..."
kill "$PID"
rm -f "$PID_FILE"
echo "Daemon stopped"
else
echo "Daemon not running (stale PID file)"
rm -f "$PID_FILE"
fi
else
echo "No PID file found - daemon may not be running"
fi