@jaguilar87/gaia-ops 2.2.1 → 2.2.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 (32) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/config/embeddings_info.json +14 -0
  3. package/config/intent_embeddings.json +2002 -0
  4. package/config/intent_embeddings.npy +0 -0
  5. package/package.json +2 -1
  6. package/templates/CLAUDE.template.md +3 -11
  7. package/tests/README.en.md +224 -0
  8. package/tests/README.md +338 -0
  9. package/tests/fixtures/project-context.aws.json +53 -0
  10. package/tests/fixtures/project-context.gcp.json +53 -0
  11. package/tests/integration/RUN_TESTS.md +185 -0
  12. package/tests/integration/__init__.py +0 -0
  13. package/tests/integration/test_hooks_integration.py +473 -0
  14. package/tests/integration/test_hooks_workflow.py +397 -0
  15. package/tests/permissions-validation/MANUAL_VALIDATION.md +434 -0
  16. package/tests/permissions-validation/test_permissions_validation.py +527 -0
  17. package/tests/system/__init__.py +0 -0
  18. package/tests/system/permissions_helpers.py +318 -0
  19. package/tests/system/test_agent_definitions.py +166 -0
  20. package/tests/system/test_configuration_files.py +121 -0
  21. package/tests/system/test_directory_structure.py +231 -0
  22. package/tests/system/test_permissions_system.py +1006 -0
  23. package/tests/tools/__init__.py +0 -0
  24. package/tests/tools/test_agent_router.py +266 -0
  25. package/tests/tools/test_clarify_engine.py +413 -0
  26. package/tests/tools/test_context_provider.py +157 -0
  27. package/tests/validators/__init__.py +0 -0
  28. package/tests/validators/test_approval_gate.py +415 -0
  29. package/tests/validators/test_commit_validator.py +446 -0
  30. package/tools/context_provider.py +4 -4
  31. package/tools/generate_embeddings.py +3 -3
  32. package/tools/semantic_matcher.py +2 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,80 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.2.2] - 2025-11-11
11
+
12
+ ### Added - Pre-generated Semantic Embeddings
13
+ - **NEW:** Included pre-generated intent embeddings in package (74KB total)
14
+ - `config/intent_embeddings.json` (55KB) - Semantic vectors for intent matching
15
+ - `config/intent_embeddings.npy` (19KB) - Binary embeddings for fast loading
16
+ - `config/embeddings_info.json` (371B) - Metadata about embeddings
17
+
18
+ ### Changed - Semantic Routing Now Works Out-of-the-Box
19
+ - **Semantic matching enabled by default:** No manual setup required
20
+ - **Routing accuracy improved:** Ambiguous queries now route correctly using semantic similarity
21
+ - **Example improvement:**
22
+ ```
23
+ Query: "puede decirme el estado de los servicios de tcm?"
24
+ Before: devops-developer (keyword "ci" - incorrect)
25
+ After: gitops-operator (semantic matching - correct)
26
+ ```
27
+
28
+ ### Fixed - Directory Structure Consistency
29
+ - **Consolidated `configs/` into `config/`:** All configuration and data files now in single directory
30
+ - **Updated tool references:**
31
+ - `tools/semantic_matcher.py`: Updated embeddings path (configs/ → config/)
32
+ - `tools/generate_embeddings.py`: Updated output path (configs/ → config/)
33
+ - All documentation updated to reference correct paths
34
+
35
+ ### Fixed - Test Suite (254 tests, 100% passing)
36
+ - **tests/system/test_configuration_files.py:**
37
+ - Updated to validate `templates/settings.template.json` (package contains template, not installed settings.json)
38
+ - Tests now reflect npm package structure instead of installed project structure
39
+
40
+ - **tests/system/test_directory_structure.py:**
41
+ - Completely rewritten for npm package validation
42
+ - Tests now verify package directories (agents/, tools/, config/, templates/, bin/)
43
+ - Removed tests for installed-project structure (session/, .claude/ name)
44
+ - Added comprehensive tests for all package subdirectories (agents, tools, hooks, config, speckit)
45
+
46
+ - **tests/tools/test_clarify_engine.py:**
47
+ - Fixed import paths (tests/tools → gaia-ops/tools)
48
+ - Made emoji checks flexible (accepts any emoji, not just 📦)
49
+ - All 32 clarify_engine tests now pass
50
+
51
+ - **tests/tools/test_context_provider.py:**
52
+ - Updated troubleshooter contract test (application_services is optional, not required)
53
+ - Fixed invalid_agent test expectation (now correctly exits with code 1)
54
+
55
+ - **tools/context_provider.py:**
56
+ - Changed behavior for invalid agents: now exits with code 1 (was: warning + empty contract)
57
+ - Better error messages: "ERROR: Invalid agent" instead of "Warning: No contract found"
58
+
59
+ ### Benefits
60
+ - ✅ **Zero configuration:** Semantic routing works immediately after installation
61
+ - ✅ **Better routing:** Handles ambiguous queries with 6x higher confidence
62
+ - ✅ **Consistent structure:** All config files in one place (`config/`)
63
+ - ✅ **Smaller package:** Embeddings optimized for size (74KB vs 5MB unoptimized)
64
+ - ✅ **Regeneration optional:** Users can regenerate with `python3 .claude/tools/generate_embeddings.py` if needed
65
+ - ✅ **Test coverage:** 254 tests passing (0 failures)
66
+
67
+ ### Technical Details
68
+ ```
69
+ config/ directory now contains:
70
+ ├── Documentation (markdown)
71
+ │ ├── AGENTS.md, agent-catalog.md, context-contracts.md
72
+ │ ├── git-standards.md, orchestration-workflow.md
73
+ ├── Provider Contracts (JSON)
74
+ │ ├── context-contracts.gcp.json, context-contracts.aws.json
75
+ │ └── git_standards.json
76
+ └── Semantic Embeddings (JSON + binary) ← NEW
77
+ ├── intent_embeddings.json
78
+ ├── intent_embeddings.npy
79
+ └── embeddings_info.json
80
+ ```
81
+
82
+ ---
83
+
10
84
  ## [2.2.1] - 2025-11-10
11
85
 
12
86
  ### Fixed - Documentation Consistency
@@ -0,0 +1,14 @@
1
+ {
2
+ "model": "all-MiniLM-L6-v2",
3
+ "dimension": 384,
4
+ "intents": [
5
+ "infrastructure_creation",
6
+ "infrastructure_diagnosis",
7
+ "kubernetes_operations",
8
+ "application_development",
9
+ "infrastructure_validation"
10
+ ],
11
+ "total_examples": 40,
12
+ "timestamp": "1762547446.5981727",
13
+ "note": "Pre-computed offline. At runtime, load with numpy (no torch needed)."
14
+ }