@jaguilar87/gaia-ops 2.2.0 → 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.
- package/CHANGELOG.md +137 -1
- package/README.en.md +29 -23
- package/README.md +24 -17
- package/agents/{claude-architect.md → gaia.md} +6 -6
- package/commands/{architect.md → gaia.md} +6 -6
- package/config/AGENTS.md +5 -5
- package/config/agent-catalog.md +14 -14
- package/config/context-contracts.md +4 -4
- package/config/embeddings_info.json +14 -0
- package/config/intent_embeddings.json +2002 -0
- package/config/intent_embeddings.npy +0 -0
- package/index.js +3 -1
- package/package.json +3 -2
- package/speckit/README.en.md +20 -69
- package/templates/CLAUDE.template.md +5 -13
- package/tests/README.en.md +224 -0
- package/tests/README.md +338 -0
- package/tests/fixtures/project-context.aws.json +53 -0
- package/tests/fixtures/project-context.gcp.json +53 -0
- package/tests/integration/RUN_TESTS.md +185 -0
- package/tests/integration/__init__.py +0 -0
- package/tests/integration/test_hooks_integration.py +473 -0
- package/tests/integration/test_hooks_workflow.py +397 -0
- package/tests/permissions-validation/MANUAL_VALIDATION.md +434 -0
- package/tests/permissions-validation/test_permissions_validation.py +527 -0
- package/tests/system/__init__.py +0 -0
- package/tests/system/permissions_helpers.py +318 -0
- package/tests/system/test_agent_definitions.py +166 -0
- package/tests/system/test_configuration_files.py +121 -0
- package/tests/system/test_directory_structure.py +231 -0
- package/tests/system/test_permissions_system.py +1006 -0
- package/tests/tools/__init__.py +0 -0
- package/tests/tools/test_agent_router.py +266 -0
- package/tests/tools/test_clarify_engine.py +413 -0
- package/tests/tools/test_context_provider.py +157 -0
- package/tests/validators/__init__.py +0 -0
- package/tests/validators/test_approval_gate.py +415 -0
- package/tests/validators/test_commit_validator.py +446 -0
- package/tools/context_provider.py +28 -7
- package/tools/generate_embeddings.py +3 -3
- package/tools/semantic_matcher.py +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,142 @@ 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
|
+
|
|
84
|
+
## [2.2.1] - 2025-11-10
|
|
85
|
+
|
|
86
|
+
### Fixed - Documentation Consistency
|
|
87
|
+
- **README.md & README.en.md:**
|
|
88
|
+
- Updated version numbers from 2.1.0 → 2.2.0
|
|
89
|
+
- Corrected package structure (hooks/, templates/, commands/)
|
|
90
|
+
- Fixed hooks/ listing: now shows actual Python files (pre_tool_use.py, post_tool_use.py, etc.) instead of non-existent pre-commit
|
|
91
|
+
- Fixed templates/ listing: removed non-existent code-examples/, listed actual files (CLAUDE.template.md, settings.template.json)
|
|
92
|
+
- Added context-contracts.gcp.json and context-contracts.aws.json to config/ section
|
|
93
|
+
- Removed CLAUDE.md and AGENTS.md from package root (only templates exist)
|
|
94
|
+
- Added speckit/ directory to structure
|
|
95
|
+
|
|
96
|
+
- **config/AGENTS.md:**
|
|
97
|
+
- Updated all references: `.claude/docs/` → `.claude/config/`
|
|
98
|
+
- Fixed quick links and support documentation paths
|
|
99
|
+
|
|
100
|
+
- **config/agent-catalog.md:**
|
|
101
|
+
- Updated all 5 context contract references: `.claude/docs/` → `.claude/config/`
|
|
102
|
+
|
|
103
|
+
- **index.js:**
|
|
104
|
+
- Deprecated `getDocPath()` function with console warning
|
|
105
|
+
- Function now redirects to `config/` directory instead of non-existent `docs/`
|
|
106
|
+
- Added JSDoc @deprecated annotation
|
|
107
|
+
|
|
108
|
+
- **README.en.md (Documentation section):**
|
|
109
|
+
- Removed broken reference to `./CLAUDE.md` (file not in package)
|
|
110
|
+
- Fixed all documentation links: `./docs/` → `./config/`
|
|
111
|
+
- Updated to match actual config/ directory structure
|
|
112
|
+
|
|
113
|
+
- **speckit/README.en.md:**
|
|
114
|
+
- Removed 3 non-existent commands: speckit.clarify, speckit.analyze-plan, speckit.constitution
|
|
115
|
+
- Updated command count: 9 → 7 actual commands
|
|
116
|
+
- Removed references to non-existent tasks-richer.py tool
|
|
117
|
+
- Removed entire sections for non-existent templates (data-model-template.md, contracts-template.md)
|
|
118
|
+
- Updated tool files list with actual tools (task_manager.py, clarify_engine.py, context_provider.py)
|
|
119
|
+
- Fixed all code examples to use only existing commands
|
|
120
|
+
|
|
121
|
+
- **tools/context_provider.py:**
|
|
122
|
+
- Added auto-detection for project-context.json location
|
|
123
|
+
- Honors GAIA_CONTEXT_PATH environment variable
|
|
124
|
+
- Falls back through common locations (.claude/project-context.json, .claude/project-context/project-context.json)
|
|
125
|
+
- Fixes agent routing failures when project-context.json is in non-legacy location
|
|
126
|
+
|
|
127
|
+
- **package.json:**
|
|
128
|
+
- Fixed `npm test` script (was calling non-existent pytest tests)
|
|
129
|
+
- Now echoes informative message about fixture availability
|
|
130
|
+
|
|
131
|
+
- **Agent Branding Unification:**
|
|
132
|
+
- Renamed `agents/claude-architect.md` → `agents/gaia.md` (aligns with gaia-ops package name)
|
|
133
|
+
- Renamed `commands/gaina.md` → `commands/gaia.md` (unified as `/gaia` command)
|
|
134
|
+
- Updated all references in README.md, README.en.md, and agents/gaia.md
|
|
135
|
+
- Complete branding consistency: package name, agent name, and command name all use "gaia"
|
|
136
|
+
|
|
137
|
+
### Benefits
|
|
138
|
+
- ✅ **Accurate documentation:** All paths and structures match actual package contents
|
|
139
|
+
- ✅ **No broken links:** References point to existing files
|
|
140
|
+
- ✅ **Clear API:** Deprecated functions clearly marked
|
|
141
|
+
- ✅ **User trust:** Documentation matches reality
|
|
142
|
+
- ✅ **npm test passes:** No false failures
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
10
146
|
## [2.2.0] - 2025-11-10
|
|
11
147
|
|
|
12
148
|
### Added - Unified Settings Template & Auto-Installation
|
|
@@ -46,7 +182,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
46
182
|
- Updated header and JSDoc comments with new package name
|
|
47
183
|
- Updated example usage
|
|
48
184
|
|
|
49
|
-
- **agents/
|
|
185
|
+
- **agents/gaia.md:**
|
|
50
186
|
- Updated system paths to reflect gaia-ops package structure
|
|
51
187
|
- Clarified symlink architecture and layout
|
|
52
188
|
|
package/README.en.md
CHANGED
|
@@ -15,8 +15,8 @@ Multi-agent orchestration system for Claude Code - DevOps automation toolkit.
|
|
|
15
15
|
### Features
|
|
16
16
|
|
|
17
17
|
- **Multi-cloud support** - Works with GCP, AWS, and ready for Azure
|
|
18
|
-
- **6 specialist agents** (terraform-architect, gitops-operator, gcp-troubleshooter, aws-troubleshooter, devops-developer,
|
|
19
|
-
- **3 meta-agents** (Explore, Plan,
|
|
18
|
+
- **6 specialist agents** (terraform-architect, gitops-operator, gcp-troubleshooter, aws-troubleshooter, devops-developer, Gaia)
|
|
19
|
+
- **3 meta-agents** (Explore, Plan, Gaia)
|
|
20
20
|
- **Clarification engine** for ambiguity detection
|
|
21
21
|
- **Approval gates** for T3 operations (terraform apply, kubectl apply, etc.)
|
|
22
22
|
- **Git commit validation** with Conventional Commits
|
|
@@ -91,7 +91,7 @@ node_modules/@jaguilar87/gaia-ops/
|
|
|
91
91
|
│ ├── gcp-troubleshooter.md
|
|
92
92
|
│ ├── aws-troubleshooter.md
|
|
93
93
|
│ ├── devops-developer.md
|
|
94
|
-
│ └──
|
|
94
|
+
│ └── gaia.md
|
|
95
95
|
├── tools/ # Orchestration tools
|
|
96
96
|
│ ├── context_provider.py
|
|
97
97
|
│ ├── agent_router.py
|
|
@@ -99,28 +99,35 @@ node_modules/@jaguilar87/gaia-ops/
|
|
|
99
99
|
│ ├── approval_gate.py
|
|
100
100
|
│ ├── commit_validator.py
|
|
101
101
|
│ └── task_manager.py
|
|
102
|
-
├── hooks/ #
|
|
103
|
-
│
|
|
102
|
+
├── hooks/ # Claude Code hooks (Python)
|
|
103
|
+
│ ├── pre_tool_use.py
|
|
104
|
+
│ ├── post_tool_use.py
|
|
105
|
+
│ ├── subagent_stop.py
|
|
106
|
+
│ ├── session_start.py
|
|
107
|
+
│ └── pre_kubectl_security.py
|
|
104
108
|
├── commands/ # Slash commands
|
|
105
|
-
│ ├──
|
|
106
|
-
│
|
|
109
|
+
│ ├── gaia.md
|
|
110
|
+
│ ├── save-session.md
|
|
111
|
+
│ ├── restore-session.md
|
|
112
|
+
│ ├── session-status.md
|
|
113
|
+
│ └── speckit.*.md (7 commands)
|
|
107
114
|
├── config/ # Configuration & documentation
|
|
108
115
|
│ ├── AGENTS.md
|
|
109
116
|
│ ├── orchestration-workflow.md
|
|
110
117
|
│ ├── git-standards.md
|
|
111
118
|
│ ├── context-contracts.md
|
|
119
|
+
│ ├── context-contracts.gcp.json
|
|
120
|
+
│ ├── context-contracts.aws.json
|
|
112
121
|
│ ├── agent-catalog.md
|
|
113
122
|
│ └── git_standards.json
|
|
114
|
-
├── templates/ #
|
|
123
|
+
├── templates/ # Installation templates
|
|
115
124
|
│ ├── CLAUDE.template.md
|
|
116
|
-
│ └──
|
|
117
|
-
|
|
118
|
-
│
|
|
119
|
-
│
|
|
120
|
-
├──
|
|
121
|
-
│ └──
|
|
122
|
-
├── CLAUDE.md # Core orchestrator instructions
|
|
123
|
-
├── AGENTS.md # System overview
|
|
125
|
+
│ └── settings.template.json
|
|
126
|
+
├── speckit/ # Spec-Kit methodology
|
|
127
|
+
│ ├── README.md
|
|
128
|
+
│ ├── templates/
|
|
129
|
+
│ ├── scripts/
|
|
130
|
+
│ └── governance.md
|
|
124
131
|
├── CHANGELOG.md # Version history
|
|
125
132
|
├── package.json
|
|
126
133
|
└── index.js # Helper functions
|
|
@@ -182,18 +189,17 @@ This package follows [Semantic Versioning](https://semver.org/):
|
|
|
182
189
|
- **MINOR:** New features, agents, or improvements
|
|
183
190
|
- **PATCH:** Bug fixes, clarifications, typos
|
|
184
191
|
|
|
185
|
-
Current version: **2.
|
|
192
|
+
Current version: **2.2.0**
|
|
186
193
|
|
|
187
194
|
See [CHANGELOG.md](./CHANGELOG.md) for version history.
|
|
188
195
|
|
|
189
196
|
## Documentation
|
|
190
197
|
|
|
191
|
-
- **
|
|
192
|
-
- **
|
|
193
|
-
- **
|
|
194
|
-
- **
|
|
195
|
-
- **
|
|
196
|
-
- **Agent Catalog:** [docs/agent-catalog.md](./docs/agent-catalog.md) (603 lines)
|
|
198
|
+
- **System Overview:** [config/AGENTS.md](./config/AGENTS.md) (95 lines)
|
|
199
|
+
- **Orchestration Workflow:** [config/orchestration-workflow.md](./config/orchestration-workflow.md) (735 lines)
|
|
200
|
+
- **Git Standards:** [config/git-standards.md](./config/git-standards.md) (682 lines)
|
|
201
|
+
- **Context Contracts:** [config/context-contracts.md](./config/context-contracts.md) (673 lines)
|
|
202
|
+
- **Agent Catalog:** [config/agent-catalog.md](./config/agent-catalog.md) (603 lines)
|
|
197
203
|
|
|
198
204
|
## Requirements
|
|
199
205
|
|
package/README.md
CHANGED
|
@@ -15,8 +15,8 @@ Sistema de orquestación multi-agente para Claude Code - Toolkit de automatizaci
|
|
|
15
15
|
### Características
|
|
16
16
|
|
|
17
17
|
- **Soporte multi-cloud** - Funciona con GCP, AWS, y listo para Azure
|
|
18
|
-
- **6 agentes especialistas** (terraform-architect, gitops-operator, gcp-troubleshooter, aws-troubleshooter, devops-developer,
|
|
19
|
-
- **3 meta-agentes** (Explore, Plan,
|
|
18
|
+
- **6 agentes especialistas** (terraform-architect, gitops-operator, gcp-troubleshooter, aws-troubleshooter, devops-developer, Gaia)
|
|
19
|
+
- **3 meta-agentes** (Explore, Plan, Gaia)
|
|
20
20
|
- **Motor de clarificación** para detección de ambigüedades
|
|
21
21
|
- **Puertas de aprobación** para operaciones T3 (terraform apply, kubectl apply, etc.)
|
|
22
22
|
- **Validación de commits Git** con Conventional Commits
|
|
@@ -91,7 +91,7 @@ node_modules/@jaguilar87/gaia-ops/
|
|
|
91
91
|
│ ├── gcp-troubleshooter.md
|
|
92
92
|
│ ├── aws-troubleshooter.md
|
|
93
93
|
│ ├── devops-developer.md
|
|
94
|
-
│ └──
|
|
94
|
+
│ └── gaia.md
|
|
95
95
|
├── tools/ # Herramientas de orquestación
|
|
96
96
|
│ ├── context_provider.py
|
|
97
97
|
│ ├── agent_router.py
|
|
@@ -99,28 +99,35 @@ node_modules/@jaguilar87/gaia-ops/
|
|
|
99
99
|
│ ├── approval_gate.py
|
|
100
100
|
│ ├── commit_validator.py
|
|
101
101
|
│ └── task_manager.py
|
|
102
|
-
├── hooks/ #
|
|
103
|
-
│
|
|
102
|
+
├── hooks/ # Hooks de Claude Code (Python)
|
|
103
|
+
│ ├── pre_tool_use.py
|
|
104
|
+
│ ├── post_tool_use.py
|
|
105
|
+
│ ├── subagent_stop.py
|
|
106
|
+
│ ├── session_start.py
|
|
107
|
+
│ └── pre_kubectl_security.py
|
|
104
108
|
├── commands/ # Comandos slash
|
|
105
|
-
│ ├──
|
|
106
|
-
│
|
|
109
|
+
│ ├── gaia.md
|
|
110
|
+
│ ├── save-session.md
|
|
111
|
+
│ ├── restore-session.md
|
|
112
|
+
│ ├── session-status.md
|
|
113
|
+
│ └── speckit.*.md (7 comandos)
|
|
107
114
|
├── config/ # Configuración y documentación
|
|
108
115
|
│ ├── AGENTS.md
|
|
109
116
|
│ ├── orchestration-workflow.md
|
|
110
117
|
│ ├── git-standards.md
|
|
111
118
|
│ ├── context-contracts.md
|
|
119
|
+
│ ├── context-contracts.gcp.json
|
|
120
|
+
│ ├── context-contracts.aws.json
|
|
112
121
|
│ ├── agent-catalog.md
|
|
113
122
|
│ └── git_standards.json
|
|
114
|
-
├── templates/ #
|
|
123
|
+
├── templates/ # Templates de instalación
|
|
115
124
|
│ ├── CLAUDE.template.md
|
|
116
|
-
│ └──
|
|
117
|
-
|
|
118
|
-
│
|
|
119
|
-
│
|
|
120
|
-
├──
|
|
121
|
-
│ └──
|
|
122
|
-
├── CLAUDE.md # Instrucciones del orquestador principal
|
|
123
|
-
├── AGENTS.md # Vista general del sistema
|
|
125
|
+
│ └── settings.template.json
|
|
126
|
+
├── speckit/ # Metodología Spec-Kit
|
|
127
|
+
│ ├── README.md
|
|
128
|
+
│ ├── templates/
|
|
129
|
+
│ ├── scripts/
|
|
130
|
+
│ └── governance.md
|
|
124
131
|
├── CHANGELOG.md # Historial de versiones
|
|
125
132
|
├── package.json
|
|
126
133
|
└── index.js # Funciones auxiliares
|
|
@@ -182,7 +189,7 @@ Este paquete sigue [Versionamiento Semántico](https://semver.org/):
|
|
|
182
189
|
- **MINOR:** Nuevas características, agentes o mejoras
|
|
183
190
|
- **PATCH:** Correcciones de bugs, clarificaciones, errores tipográficos
|
|
184
191
|
|
|
185
|
-
Versión actual: **2.
|
|
192
|
+
Versión actual: **2.2.0**
|
|
186
193
|
|
|
187
194
|
Ver [CHANGELOG.md](./CHANGELOG.md) para el historial de versiones.
|
|
188
195
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: gaia
|
|
3
|
+
description: Gaia is the meta-agent for the gaia-ops ecosystem—its purpose is to understand, document, and continuously optimize every component of the orchestrator, agents, commands, templates, sample stacks, and documentation that ship in this package and the consuming projects that symlink to it.
|
|
4
4
|
tools: Read, Glob, Grep, Bash, Task, WebSearch, Python
|
|
5
5
|
model: inherit
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You are
|
|
8
|
+
You are Gaia, the senior system architect and AI agent systems specialist for the gaia-ops stack. Your unique purpose is to **analyze and optimize Gaia’s intelligent agent orchestration system end-to-end**—acting as a meta-layer that understands how the orchestrator, agents, commands, router, context provider, Spec-Kit assets, and all system components work together across repositories (package root, downstream project `.claude/`, ops symlinks).
|
|
9
9
|
|
|
10
10
|
## ⚡ QUICK START - Read This First
|
|
11
11
|
|
|
@@ -18,10 +18,10 @@ You are a senior system architect and AI agent systems specialist. Your unique p
|
|
|
18
18
|
**Where Everything Lives (Package + Symlink Layout):**
|
|
19
19
|
- 🏗️ Package root: `/home/jaguilar/aaxis/rnd/repositories/gaia-ops/` → mirrors `node_modules/@jaguilar87/gaia-ops/` when installed
|
|
20
20
|
- 📋 Orchestrator: `CLAUDE.md` at the package root (templated into consuming repos)
|
|
21
|
-
- 🤖 Agents: `agents/*.md` (6 specialists: terraform-architect, gitops-operator, gcp-troubleshooter, aws-troubleshooter, devops-developer,
|
|
21
|
+
- 🤖 Agents: `agents/*.md` (6 specialists: terraform-architect, gitops-operator, gcp-troubleshooter, aws-troubleshooter, devops-developer, gaia)
|
|
22
22
|
- 🛠️ Tools: `tools/` (context_provider.py, agent_router.py, clarify_engine.py, approval_gate.py, commit_validator.py, task_manager.py)
|
|
23
23
|
- 📚 Config docs: `config/` (AGENTS, orchestration-workflow, git-standards, context-contracts, agent-catalog)
|
|
24
|
-
- 🗂️ Commands: `commands/*.md` (`/
|
|
24
|
+
- 🗂️ Commands: `commands/*.md` (`/gaia`, `/save-session`, `/session-status`, `/speckit.*`)
|
|
25
25
|
- 🎯 Spec-Kit assets: `speckit/README*.md`, `speckit/templates/`, `speckit/scripts/`, `speckit/governance.md`, `speckit/decisions/`
|
|
26
26
|
- 🔧 Reference stacks: `terraform/`, `gitops/`, `app-services/` illustrate how agents interact with user IaC/App repos
|
|
27
27
|
- 💾 Project data: consuming repos host `.claude/project-context.json`, `.claude/logs/`, `.claude/tests/`, while `ops/` carries shared symlink helpers
|
|
@@ -73,7 +73,7 @@ gaia-ops/ (mirrors node_modules/@jaguilar87/gaia-ops/ and symlinks into project
|
|
|
73
73
|
│ ├── gcp-troubleshooter.md
|
|
74
74
|
│ ├── aws-troubleshooter.md
|
|
75
75
|
│ ├── devops-developer.md
|
|
76
|
-
│ └──
|
|
76
|
+
│ └── gaia.md (this file)
|
|
77
77
|
├── tools/ # System intelligence + automation
|
|
78
78
|
│ ├── context_provider.py # Deterministic context generation
|
|
79
79
|
│ ├── agent_router.py # Semantic routing (92.7% target accuracy)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Invoke
|
|
2
|
+
description: Invoke Gaia to analyze system architecture, diagnose issues, or propose improvements
|
|
3
3
|
scope: project
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are invoking the
|
|
6
|
+
You are invoking **Gaia**, the gaia-ops meta-agent that analyzes the agent orchestration system itself.
|
|
7
7
|
|
|
8
8
|
## Context: System Expert Agent
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Gaia is a specialized agent that understands:
|
|
11
11
|
- The entire agent system architecture (.claude/, CLAUDE.md, agents, tools, hooks)
|
|
12
12
|
- Spec-Kit workflows (specify, plan, tasks, implement, add-task, analyze-task)
|
|
13
13
|
- Session management (save, restore, bundles)
|
|
@@ -18,7 +18,7 @@ claude-architect is a specialized agent that understands:
|
|
|
18
18
|
|
|
19
19
|
## Your Task
|
|
20
20
|
|
|
21
|
-
Invoke
|
|
21
|
+
Invoke Gaia with the user's request. The agent will proactively read system files, analyze logs, research best practices, and provide comprehensive analysis with actionable recommendations tied to gaia-ops.
|
|
22
22
|
|
|
23
23
|
**IMPORTANT:** Pass the user's exact question/request to the agent. Examples:
|
|
24
24
|
- "Analiza este log y dime qué pasó"
|
|
@@ -29,11 +29,11 @@ Invoke the claude-architect agent with the user's request. The agent will proact
|
|
|
29
29
|
|
|
30
30
|
## Invocation
|
|
31
31
|
|
|
32
|
-
Use the Task tool to invoke
|
|
32
|
+
Use the Task tool to invoke Gaia with this structure:
|
|
33
33
|
|
|
34
34
|
```
|
|
35
35
|
Task(
|
|
36
|
-
subagent_type="
|
|
36
|
+
subagent_type="gaia",
|
|
37
37
|
description="[Brief 3-5 word description]",
|
|
38
38
|
prompt="""
|
|
39
39
|
## System Context (Auto-provided)
|
package/config/AGENTS.md
CHANGED
|
@@ -8,9 +8,9 @@ See `CLAUDE.md` for complete orchestrator instructions.
|
|
|
8
8
|
|
|
9
9
|
**Quick links:**
|
|
10
10
|
- Core principles: `CLAUDE.md` (lines 18-36)
|
|
11
|
-
- Workflow: `.claude/
|
|
12
|
-
- Git standards: `.claude/
|
|
13
|
-
- Agent catalog: `.claude/
|
|
11
|
+
- Workflow: `.claude/config/orchestration-workflow.md`
|
|
12
|
+
- Git standards: `.claude/config/git-standards.md`
|
|
13
|
+
- Agent catalog: `.claude/config/agent-catalog.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -71,7 +71,7 @@ Claude Code (Orchestrator)
|
|
|
71
71
|
├── gcp-troubleshooter (GCP diagnostics)
|
|
72
72
|
├── aws-troubleshooter (AWS diagnostics)
|
|
73
73
|
├── devops-developer (Application build/test)
|
|
74
|
-
├──
|
|
74
|
+
├── Gaia (System optimization)
|
|
75
75
|
├── Explore (Codebase exploration)
|
|
76
76
|
└── Plan (Implementation planning)
|
|
77
77
|
```
|
|
@@ -153,7 +153,7 @@ See `CLAUDE.md` and `.claude/CHANGELOG.md` for contribution guidelines.
|
|
|
153
153
|
|
|
154
154
|
- **Issues:** Create issue in GitHub repository
|
|
155
155
|
- **Questions:** Contact Jorge Aguilar (jaguilar@aaxis.com)
|
|
156
|
-
- **Documentation:** See `.claude/
|
|
156
|
+
- **Documentation:** See `.claude/config/*.md`
|
|
157
157
|
|
|
158
158
|
---
|
|
159
159
|
|
package/config/agent-catalog.md
CHANGED
|
@@ -30,7 +30,7 @@ These agents work on **CLAUDE CODE SYSTEM ITSELF** (agent orchestration, tooling
|
|
|
30
30
|
|
|
31
31
|
| Agent | Primary Role | Context Type | Model |
|
|
32
32
|
|-------|--------------|--------------|-------|
|
|
33
|
-
| **
|
|
33
|
+
| **Gaia** | System analysis & optimization | Manual (gaia-ops package, .claude/, tests) | inherit |
|
|
34
34
|
| **Explore** | Codebase exploration for understanding | Automatic (file patterns) | haiku |
|
|
35
35
|
| **Plan** | Planning mode for implementation design | Automatic (user prompt) | inherit |
|
|
36
36
|
|
|
@@ -82,7 +82,7 @@ These agents work on **CLAUDE CODE SYSTEM ITSELF** (agent orchestration, tooling
|
|
|
82
82
|
- T2: `terraform plan`
|
|
83
83
|
- T3: `terragrunt apply` (requires approval)
|
|
84
84
|
|
|
85
|
-
**Context Contract:** See `.claude/
|
|
85
|
+
**Context Contract:** See `.claude/config/context-contracts.md#terraform-architect`
|
|
86
86
|
|
|
87
87
|
**Use Cases:**
|
|
88
88
|
- "Create a CloudSQL instance with Terraform"
|
|
@@ -148,7 +148,7 @@ Task(
|
|
|
148
148
|
- T2: `git push` to feature branch, `flux reconcile`
|
|
149
149
|
- T3: `kubectl apply`, `git push` to main (requires approval)
|
|
150
150
|
|
|
151
|
-
**Context Contract:** See `.claude/
|
|
151
|
+
**Context Contract:** See `.claude/config/context-contracts.md#gitops-operator`
|
|
152
152
|
|
|
153
153
|
**Use Cases:**
|
|
154
154
|
- "Deploy tcm-api service to non-prod cluster"
|
|
@@ -214,7 +214,7 @@ Task(
|
|
|
214
214
|
- T2: `gcloud compute ssh` (for VM diagnostics)
|
|
215
215
|
- T3: None (diagnostic agent, no destructive operations)
|
|
216
216
|
|
|
217
|
-
**Context Contract:** See `.claude/
|
|
217
|
+
**Context Contract:** See `.claude/config/context-contracts.md#gcp-troubleshooter`
|
|
218
218
|
|
|
219
219
|
**Use Cases:**
|
|
220
220
|
- "Why is tcm-api pod crashing with database connection error?"
|
|
@@ -270,7 +270,7 @@ Task(
|
|
|
270
270
|
- T2: `aws ec2 ssh` (for EC2 diagnostics)
|
|
271
271
|
- T3: None (diagnostic agent, no destructive operations)
|
|
272
272
|
|
|
273
|
-
**Context Contract:** See `.claude/
|
|
273
|
+
**Context Contract:** See `.claude/config/context-contracts.md#aws-troubleshooter`
|
|
274
274
|
|
|
275
275
|
**Use Cases:**
|
|
276
276
|
- "Why is EKS pod failing with IAM permission error?"
|
|
@@ -308,7 +308,7 @@ Task(
|
|
|
308
308
|
- T2: `git push` to feature branch, `npm publish` (to test registry)
|
|
309
309
|
- T3: `git push` to main (requires approval)
|
|
310
310
|
|
|
311
|
-
**Context Contract:** See `.claude/
|
|
311
|
+
**Context Contract:** See `.claude/config/context-contracts.md#devops-developer`
|
|
312
312
|
|
|
313
313
|
**Use Cases:**
|
|
314
314
|
- "Run tests and fix failures"
|
|
@@ -331,7 +331,7 @@ Task(
|
|
|
331
331
|
|
|
332
332
|
## Meta-Agents: Detailed Catalog
|
|
333
333
|
|
|
334
|
-
###
|
|
334
|
+
### Gaia
|
|
335
335
|
|
|
336
336
|
**Full Name:** Claude Code System Architect
|
|
337
337
|
|
|
@@ -363,7 +363,7 @@ Task(
|
|
|
363
363
|
```python
|
|
364
364
|
# Orchestrator provides manual context in prompt
|
|
365
365
|
Task(
|
|
366
|
-
subagent_type="
|
|
366
|
+
subagent_type="gaia",
|
|
367
367
|
description="Analyze routing accuracy",
|
|
368
368
|
prompt="""
|
|
369
369
|
## System Context
|
|
@@ -471,7 +471,7 @@ User Request
|
|
|
471
471
|
│ └─ YES → devops-developer
|
|
472
472
|
│
|
|
473
473
|
├─ System/agent analysis?
|
|
474
|
-
│ └─ YES →
|
|
474
|
+
│ └─ YES → Gaia
|
|
475
475
|
│
|
|
476
476
|
├─ Codebase exploration/understanding?
|
|
477
477
|
│ └─ YES → Explore
|
|
@@ -488,8 +488,8 @@ User Request
|
|
|
488
488
|
|
|
489
489
|
```python
|
|
490
490
|
# WRONG
|
|
491
|
-
context = context_provider.py("
|
|
492
|
-
Task(subagent_type="
|
|
491
|
+
context = context_provider.py("gaia", "analyze logs")
|
|
492
|
+
Task(subagent_type="gaia", prompt=context)
|
|
493
493
|
```
|
|
494
494
|
|
|
495
495
|
**Why:** Meta-agents work on the SYSTEM, not projects. They need system paths, not project context.
|
|
@@ -497,7 +497,7 @@ Task(subagent_type="claude-architect", prompt=context)
|
|
|
497
497
|
**Correct:**
|
|
498
498
|
```python
|
|
499
499
|
Task(
|
|
500
|
-
subagent_type="
|
|
500
|
+
subagent_type="gaia",
|
|
501
501
|
prompt=f"System path: {system_path}\n\nTask: analyze logs"
|
|
502
502
|
)
|
|
503
503
|
```
|
|
@@ -576,7 +576,7 @@ Track in `.claude/logs/agent-metrics.jsonl`:
|
|
|
576
576
|
| gcp-troubleshooter | 123 | 98% | 28s | N/A |
|
|
577
577
|
| aws-troubleshooter | 45 | 96% | 31s | N/A |
|
|
578
578
|
| devops-developer | 189 | 92% | 18s | 15% |
|
|
579
|
-
|
|
|
579
|
+
| Gaia | 34 | 100% | 120s | N/A |
|
|
580
580
|
| Explore | 456 | 99% | 8s | N/A |
|
|
581
581
|
| Plan | 78 | 95% | 22s | N/A |
|
|
582
582
|
|
|
@@ -601,4 +601,4 @@ Track in `.claude/logs/agent-metrics.jsonl`:
|
|
|
601
601
|
|
|
602
602
|
### 1.x (Historical)
|
|
603
603
|
- Embedded in CLAUDE.md
|
|
604
|
-
- Basic agent list with roles
|
|
604
|
+
- Basic agent list with roles
|
|
@@ -526,7 +526,7 @@ devops-developer:
|
|
|
526
526
|
|
|
527
527
|
---
|
|
528
528
|
|
|
529
|
-
##
|
|
529
|
+
## Gaia (Meta-Agent)
|
|
530
530
|
|
|
531
531
|
**Purpose:** Analyzes, diagnoses, and optimizes the agent orchestration system itself
|
|
532
532
|
|
|
@@ -535,7 +535,7 @@ devops-developer:
|
|
|
535
535
|
### Manual Context Structure
|
|
536
536
|
|
|
537
537
|
```yaml
|
|
538
|
-
|
|
538
|
+
gaia:
|
|
539
539
|
context_type: "manual"
|
|
540
540
|
|
|
541
541
|
provided_in_prompt:
|
|
@@ -561,7 +561,7 @@ claude-architect:
|
|
|
561
561
|
|
|
562
562
|
```python
|
|
563
563
|
Task(
|
|
564
|
-
subagent_type="
|
|
564
|
+
subagent_type="gaia",
|
|
565
565
|
description="Analyze routing accuracy",
|
|
566
566
|
prompt="""
|
|
567
567
|
## System Context
|
|
@@ -714,7 +714,7 @@ if agent_contract_version == "1.0":
|
|
|
714
714
|
| gcp-troubleshooter | project_details, terraform_infrastructure, gitops_configuration | application_services, issue_context | GCP diagnostics |
|
|
715
715
|
| aws-troubleshooter | project_details, terraform_infrastructure, gitops_configuration | application_services, issue_context | AWS diagnostics |
|
|
716
716
|
| devops-developer | project_details, operational_guidelines | application_services, development_context | App build/test/debug |
|
|
717
|
-
|
|
|
717
|
+
| Gaia | (manual context in prompt) | N/A | System analysis & optimization |
|
|
718
718
|
|
|
719
719
|
---
|
|
720
720
|
|
|
@@ -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
|
+
}
|