@jaguilar87/gaia-ops 1.4.0 → 2.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,136 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.2.0] - 2025-11-10
11
+
12
+ ### Added - Unified Settings Template & Auto-Installation
13
+ - **NEW:** Created unified `templates/settings.template.json` (214 lines)
14
+ - Merged functionality from `settings.json` + `settings.local.json`
15
+ - Includes all hooks (PreToolUse, PostToolUse, SubagentStop)
16
+ - Complete permissions (75+ allow, 9 deny, 27 ask entries)
17
+ - Full security tier definitions (T0-T3)
18
+ - Environment configuration
19
+
20
+ - **Auto-Installation:** `gaia-init.js` now automatically generates `.claude/settings.json`
21
+ - Added `generateSettingsJson()` function
22
+ - Integrated into installation workflow (Step 6.5)
23
+ - Projects get complete settings from day 1
24
+
25
+ ### Removed - Dead Code Elimination
26
+ - **CLAUDE.md** from package root (only template exists now)
27
+ - **templates/code-examples/** (321 lines - never imported or executed)
28
+ - `commit_validation.py`
29
+ - `clarification_workflow.py`
30
+ - `approval_gate_workflow.py`
31
+ - **templates/project-context.template.json** (126 lines - unused, installer generates programmatically)
32
+ - **templates/project-context.template.aws.json** (128 lines - never used)
33
+ - **package.json:** Removed `CLAUDE.md` from files array
34
+
35
+ ### Changed - Package Consistency
36
+ - **templates/CLAUDE.template.md:**
37
+ - Updated all references: `.claude/docs/` → `.claude/config/`
38
+ - Updated package name: `@aaxis/claude-agents` → `@jaguilar87/gaia-ops`
39
+ - Removed code-examples reference (no longer exists)
40
+
41
+ - **README.en.md:**
42
+ - Updated API examples to use `@jaguilar87/gaia-ops`
43
+ - Changed `getDocPath()` → `getConfigPath()` (correct function)
44
+
45
+ - **index.js:**
46
+ - Updated header and JSDoc comments with new package name
47
+ - Updated example usage
48
+
49
+ - **agents/claude-architect.md:**
50
+ - Updated system paths to reflect gaia-ops package structure
51
+ - Clarified symlink architecture and layout
52
+
53
+ ### Improved - Package Quality
54
+ - **Reduced template bloat by 57%:** 882 lines → 378 lines (504 lines removed)
55
+ - **Single source of truth:** One settings template instead of scattered config
56
+ - **Cleaner architecture:** Only actual templates remain in `templates/`
57
+ - **Better defaults:** Projects start with complete, production-ready settings
58
+
59
+ ### Benefits
60
+ - ✅ **Unified configuration:** Everything in one settings.json file
61
+ - ✅ **Automatic setup:** No manual settings configuration needed
62
+ - ✅ **Smaller package:** 57% reduction in template code
63
+ - ✅ **Flexibility maintained:** Users can still create `settings.local.json` for overrides
64
+ - ✅ **Package consistency:** All references use correct package name
65
+
66
+ ### Final Template Structure
67
+ ```
68
+ templates/
69
+ ├── CLAUDE.template.md (164 lines) - Orchestrator instructions
70
+ └── settings.template.json (214 lines) - Complete Claude Code settings
71
+ ```
72
+
73
+ ---
74
+
75
+ ## [2.1.0] - 2025-11-10
76
+
77
+ ### Added - Provider-Specific Context Contracts
78
+ - **NEW:** Created separate contract files per cloud provider
79
+ - `config/context-contracts.gcp.json` - GCP-specific contracts
80
+ - `config/context-contracts.aws.json` - AWS-specific contracts
81
+ - Ready for `context-contracts.azure.json` (future)
82
+
83
+ - **Auto-Detection:** `context_provider.py` now automatically:
84
+ 1. Detects cloud provider from `metadata.cloud_provider`
85
+ 2. Falls back to inferring from field presence (`project_id` → GCP, `account_id` → AWS)
86
+ 3. Loads the correct contract file
87
+ 4. Validates against provider-specific requirements
88
+
89
+ - **Test Fixtures:** Added sample contexts for testing
90
+ - `tests/fixtures/project-context.gcp.json`
91
+ - `tests/fixtures/project-context.aws.json`
92
+
93
+ ### Changed
94
+ - **Context Provider:** Updated `tools/context_provider.py`
95
+ - Added `detect_cloud_provider()` function
96
+ - Added `load_provider_contracts()` function
97
+ - Updated `get_contract_context()` to accept provider contracts
98
+ - Legacy contracts remain for backward compatibility
99
+
100
+ - **Field Names:** Standardized provider-specific fields
101
+ - GCP: `project_details.project_id` (no change)
102
+ - AWS: `project_details.account_id` (was `aws_account`)
103
+ - Installer updated to generate correct field names
104
+
105
+ - **Templates:** Created AWS-specific template
106
+ - `templates/project-context.template.aws.json`
107
+ - Matches AWS naming conventions (EKS, RDS, ECR, etc.)
108
+
109
+ - **Documentation:** Updated `config/context-contracts.md`
110
+ - Added "Provider-Specific Contracts" section
111
+ - Documented how provider detection works
112
+ - Explained benefits of provider-specific approach
113
+ - Version bumped to 2.1.0
114
+
115
+ ### Benefits
116
+ - ✅ **Clarity:** Field names match cloud provider terminology
117
+ - ✅ **Simplicity:** No complex conditional validation logic in agents
118
+ - ✅ **Extensibility:** Adding Azure = create one JSON file (15 minutes)
119
+ - ✅ **Agents Stay Agnostic:** Agents use pattern discovery, don't need provider logic
120
+ - ✅ **Single Source of Truth:** Orchestrator selects the right contract
121
+
122
+ ### Backward Compatibility
123
+ - **Legacy support maintained:** If provider-specific contracts don't exist, falls back to hardcoded contracts
124
+ - **Existing projects:** Continue to work without changes
125
+ - **Migration:** Optional, but recommended for clarity
126
+
127
+ ### Technical Details
128
+ ```python
129
+ # Before (v2.0.0):
130
+ contract_keys = AGENT_CONTRACTS[agent_name] # Hardcoded
131
+
132
+ # After (v2.1.0):
133
+ cloud_provider = detect_cloud_provider(project_context) # Auto-detect
134
+ contracts = load_provider_contracts(cloud_provider) # Load from JSON
135
+ contract_keys = contracts["agents"][agent_name]["required"] # Provider-specific
136
+ ```
137
+
138
+ ---
139
+
10
140
  ## [1.4.0] - 2025-11-10
11
141
 
12
142
  ### Changed - BREAKING: Complete Installer Redesign
package/README.en.md CHANGED
@@ -14,6 +14,7 @@ Multi-agent orchestration system for Claude Code - DevOps automation toolkit.
14
14
 
15
15
  ### Features
16
16
 
17
+ - **Multi-cloud support** - Works with GCP, AWS, and ready for Azure
17
18
  - **6 specialist agents** (terraform-architect, gitops-operator, gcp-troubleshooter, aws-troubleshooter, devops-developer, claude-architect)
18
19
  - **3 meta-agents** (Explore, Plan, claude-architect)
19
20
  - **Clarification engine** for ambiguity detection
@@ -160,17 +161,17 @@ If you need to programmatically access paths in the package:
160
161
  import {
161
162
  getAgentPath,
162
163
  getToolPath,
163
- getDocPath
164
- } from '@aaxis/claude-agents';
164
+ getConfigPath
165
+ } from '@jaguilar87/gaia-ops';
165
166
 
166
167
  const agentPath = getAgentPath('gitops-operator');
167
- // → /path/to/node_modules/@aaxis/claude-agents/agents/gitops-operator.md
168
+ // → /path/to/node_modules/@jaguilar87/gaia-ops/agents/gitops-operator.md
168
169
 
169
170
  const toolPath = getToolPath('context_provider.py');
170
- // → /path/to/node_modules/@aaxis/claude-agents/tools/context_provider.py
171
+ // → /path/to/node_modules/@jaguilar87/gaia-ops/tools/context_provider.py
171
172
 
172
- const docPath = getDocPath('orchestration-workflow.md');
173
- // → /path/to/node_modules/@aaxis/claude-agents/docs/orchestration-workflow.md
173
+ const configPath = getConfigPath('orchestration-workflow.md');
174
+ // → /path/to/node_modules/@jaguilar87/gaia-ops/config/orchestration-workflow.md
174
175
  ```
175
176
 
176
177
  ## Versioning
package/README.md CHANGED
@@ -14,6 +14,7 @@ Sistema de orquestación multi-agente para Claude Code - Toolkit de automatizaci
14
14
 
15
15
  ### Características
16
16
 
17
+ - **Soporte multi-cloud** - Funciona con GCP, AWS, y listo para Azure
17
18
  - **6 agentes especialistas** (terraform-architect, gitops-operator, gcp-troubleshooter, aws-troubleshooter, devops-developer, claude-architect)
18
19
  - **3 meta-agentes** (Explore, Plan, claude-architect)
19
20
  - **Motor de clarificación** para detección de ambigüedades
@@ -181,7 +182,7 @@ Este paquete sigue [Versionamiento Semántico](https://semver.org/):
181
182
  - **MINOR:** Nuevas características, agentes o mejoras
182
183
  - **PATCH:** Correcciones de bugs, clarificaciones, errores tipográficos
183
184
 
184
- Versión actual: **1.0.3**
185
+ Versión actual: **2.1.0**
185
186
 
186
187
  Ver [CHANGELOG.md](./CHANGELOG.md) para el historial de versiones.
187
188
 
@@ -15,16 +15,16 @@ You are a senior system architect and AI agent systems specialist. Your unique p
15
15
  2. **Locate & Read:** You know where EVERYTHING lives. Read only what you need for THIS request.
16
16
  3. **Analyze & Respond:** Provide comprehensive answer with evidence, examples, and actionable recommendations.
17
17
 
18
- **Where Everything Lives (You Know This By Heart):**
19
- - 🏗️ System: `/home/jaguilar/aaxis/rnd/repositories/.claude/`
20
- - 📋 Orchestrator: `CLAUDE.md` (workflow logic)
21
- - 🤖 Agents: `.claude/agents/` (5 specialists + you)
22
- - 🛠️ Tools: `.claude/tools/` (routing, context, validation)
23
- - 📊 Logs: `.claude/logs/` (JSONL audit trail)
24
- - Tests: `.claude/tests/` (55+ tests)
25
- - 🎯 Spec-Kit: `.claude/commands/speckit.*` (7 commands)
26
- - 💾 Sessions: `.claude/session/` (active + bundles)
27
- - 🔗 Multi-repo: `ops/` (symlinks: claude-rnd, claude-vtr)
18
+ **Where Everything Lives (Package + Symlink Layout):**
19
+ - 🏗️ Package root: `/home/jaguilar/aaxis/rnd/repositories/gaia-ops/` → mirrors `node_modules/@jaguilar87/gaia-ops/` when installed
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, claude-architect)
22
+ - 🛠️ Tools: `tools/` (context_provider.py, agent_router.py, clarify_engine.py, approval_gate.py, commit_validator.py, task_manager.py)
23
+ - 📚 Config docs: `config/` (AGENTS, orchestration-workflow, git-standards, context-contracts, agent-catalog)
24
+ - 🗂️ Commands: `commands/*.md` (`/architect`, `/save-session`, `/session-status`, `/speckit.*`)
25
+ - 🎯 Spec-Kit assets: `speckit/README*.md`, `speckit/templates/`, `speckit/scripts/`, `speckit/governance.md`, `speckit/decisions/`
26
+ - 🔧 Reference stacks: `terraform/`, `gitops/`, `app-services/` illustrate how agents interact with user IaC/App repos
27
+ - 💾 Project data: consuming repos host `.claude/project-context.json`, `.claude/logs/`, `.claude/tests/`, while `ops/` carries shared symlink helpers
28
28
 
29
29
  **Your Superpowers:**
30
30
  - ✅ You understand the ENTIRE system (no one else does)
@@ -65,43 +65,51 @@ You have intrinsic knowledge of the system's structure. You know EXACTLY where t
65
65
  ### Core System Files (Always Available)
66
66
 
67
67
  ```
68
- Agent System Structure:
69
- ├── CLAUDE.md # Master orchestrator logic (715 lines)
70
- ├── .claude/
71
- │ ├── project-context.json # Project SSOT (varies by project)
72
- │ ├── settings.json # System configuration
73
- │ ├── agents/ # 5 specialized agents
74
- ├── gitops-operator.md (340 lines)
75
- ├── terraform-architect.md (270 lines)
76
- │ ├── gcp-troubleshooter.md (305 lines)
77
- │ │ ├── aws-troubleshooter.md (289 lines)
78
- │ └── devops-developer.md (89 lines)
79
- │ ├── tools/ # System intelligence
80
- ├── agent_router.py # Semantic routing (92.7% accuracy target)
81
- ├── context_provider.py # Deterministic context generation
82
- ├── context_section_reader.py # Selective context loading
83
- │ ├── semantic_matcher.py # Fallback routing
84
- │ │ ├── agent_invoker_helper.py # Agent invocation utilities
85
- │ │ ├── tasks-richer.py # Task enrichment
86
- │ │ └── generate_embeddings.py # Embedding generation
87
- ├── hooks/ # Security & audit layer
88
- │ │ ├── pre_tool_use.py # Pre-execution validation
89
- │ │ ├── post_tool_use.py # Post-execution audit
90
- │ │ └── subagent_stop.py # Agent completion capture
91
- ├── commands/ # 13 slash commands
92
- ├── session/ # Session management
93
- │ │ ├── active/context.json # Live session state
94
- │ │ ├── bundles/ # Historical snapshots
95
- │ │ └── scripts/ # Session tools
96
- │ ├── tests/ # Test suite (55+ tests)
97
- │ │ ├── test_semantic_routing.py # Routing accuracy tests
98
- │ │ ├── test_all_functionality.py # Core system tests
99
- │ │ └── test_ssot_policies.py # SSOT validation
100
- │ ├── logs/ # Audit trail (JSONL format)
101
- │ └── schemas/ # JSON schemas
102
- └── improvement-ideas.md # System improvement backlog
68
+ gaia-ops/ (mirrors node_modules/@jaguilar87/gaia-ops/ and symlinks into project .claude/)
69
+ ├── CLAUDE.md # Master orchestrator logic + workflow (≈150 lines here, expanded in config/)
70
+ ├── agents/ # 6 specialized agent prompts
71
+ │ ├── terraform-architect.md
72
+ │ ├── gitops-operator.md
73
+ │ ├── gcp-troubleshooter.md
74
+ │ ├── aws-troubleshooter.md
75
+ │ ├── devops-developer.md
76
+ └── claude-architect.md
77
+ ├── tools/ # System intelligence + automation
78
+ ├── context_provider.py # Deterministic context generation
79
+ │ ├── agent_router.py # Semantic routing (92.7% target accuracy)
80
+ │ ├── clarify_engine.py # Ambiguity detection
81
+ │ ├── approval_gate.py # Tiered approval logic
82
+ │ ├── commit_validator.py # Conventional commits enforcement
83
+ └── task_manager.py # Large-plan chunking
84
+ ├── hooks/ # Git + security hooks
85
+ ├── commands/ # User-facing slash commands (architect/save-session/speckit.*)
86
+ ├── config/ # Documentation bundle (AGENTS/orchestration-workflow/git-standards/context-contracts/agent-catalog)
87
+ ├── speckit/ # Spec-Kit 2.0 framework (README*.md, governance.md, decisions/, templates/, scripts/)
88
+ ├── app-services/ # Sample application services for reference
89
+ ├── gitops/ # Reference GitOps manifests
90
+ ├── terraform/ # Reference Terraform stacks
91
+ ├── templates/ # CLAUDE + code templates
92
+ ├── tests/ # Test suite (55+ cases referenced in README)
93
+ ├── CHANGELOG.md # Version history (Semantic Versioning)
94
+ └── package.json / index.js # NPM package metadata + helper exports
103
95
  ```
104
96
 
97
+ When `npx @jaguilar87/gaia-ops init` (or `gaia-init` after a global install) runs in a consuming project it:
98
+ 1. Detects GitOps/Terraform/AppServices paths and installs Claude Code if needed.
99
+ 2. Creates `.claude/` and symlinks `agents/`, `tools/`, `hooks/`, `commands/`, `templates/`, and `config/` back to this package.
100
+ 3. Generates `CLAUDE.md`, links `AGENTS.md`, and seeds `.claude/project-context.json` (project SSOT). Project-owned items such as `.claude/logs/`, `.claude/tests/`, and session data remain local.
101
+
102
+ ### Installation & Project Layout (from README.md / README.en.md)
103
+ - Quick start: `npx @jaguilar87/gaia-ops init` (or `npm install -g @jaguilar87/gaia-ops && gaia-init`) bootstraps everything; manual installs `npm install @jaguilar87/gaia-ops` + symlink commands from README.
104
+ - Resulting structure: `your-project/.claude/{agents,tools,hooks,commands,templates,config}` → symlinked to this package under `node_modules/@jaguilar87/gaia-ops/`, while `logs/`, `tests/`, and `project-context.json` stay project-specific.
105
+ - Reference directories `gitops/`, `terraform/`, and `app-services/` inside the package illustrate how specialized agents should reason about user IaC/App codebases.
106
+
107
+ ### Spec-Kit 2.0 Workflow Snapshot (from speckit/README*.md)
108
+ - `speckit/` hosts bilingual docs, governance (`speckit/governance.md`), immutable ADRs (`speckit/decisions/ADR-*.md`), templates, and scripts backing `/speckit.*` commands.
109
+ - Core flow: `/speckit.init` → `/speckit.specify` → `/speckit.plan` → `/speckit.tasks` → `/speckit.implement`, each auto-injecting project-context data, clarification, validation, and risk analysis (T2/T3 gates) directly into specs/plan/tasks artifacts.
110
+ - Helper commands: `/speckit.add-task` adds enriched tasks mid-implementation, `/speckit.analyze-task` deep-dives high-risk tasks, and `/save-session` captures context bundles for portability.
111
+ - Spec-Kit 2.0 removes standalone enrichers (`tasks-richer.py`), performs inline validation, and relies on `.claude/project-context.json` for deterministic context so the architect agent can reason about idea → spec → plan → tasks → implementation continuity.
112
+
105
113
  ### Key System Metrics (What to Track)
106
114
 
107
115
  - **Routing Accuracy:** Target 92.7% (from tests)
@@ -818,4 +826,3 @@ python3 -m pytest .claude/tests/ --cov=.claude/tools --cov-report=term
818
826
  ---
819
827
 
820
828
  **Remember:** You are not just analyzing files - you are understanding a living, evolving system. Your insights drive its continuous improvement.
821
-
package/bin/gaia-init.js CHANGED
@@ -603,6 +603,29 @@ async function createClaudeDirectory() {
603
603
  }
604
604
  }
605
605
 
606
+ /**
607
+ * Generate settings.json from template
608
+ */
609
+ async function generateSettingsJson() {
610
+ const spinner = ora('Generating .claude/settings.json...').start();
611
+
612
+ try {
613
+ const settingsPath = join(CWD, '.claude', 'settings.json');
614
+ const templatePath = getTemplatePath('settings.template.json');
615
+
616
+ // Read template
617
+ const template = await fs.readFile(templatePath, 'utf-8');
618
+
619
+ // Write settings.json (no placeholders to replace)
620
+ await fs.writeFile(settingsPath, template, 'utf-8');
621
+
622
+ spinner.succeed('.claude/settings.json generated');
623
+ } catch (error) {
624
+ spinner.fail('Failed to generate settings.json');
625
+ throw error;
626
+ }
627
+ }
628
+
606
629
  /**
607
630
  * Generate CLAUDE.md from template
608
631
  */
@@ -739,11 +762,12 @@ async function generateProjectContext(config) {
739
762
  cloud_provider: config.cloudProvider
740
763
  };
741
764
 
765
+ // Add provider-specific fields (matching contract expectations)
742
766
  if (config.gcpProjectId) {
743
- projectDetails.project_id = config.gcpProjectId;
767
+ projectDetails.project_id = config.gcpProjectId; // GCP contract expects project_id
744
768
  }
745
769
  if (config.awsAccountId) {
746
- projectDetails.aws_account = config.awsAccountId;
770
+ projectDetails.account_id = config.awsAccountId; // AWS contract expects account_id
747
771
  }
748
772
 
749
773
  // Build provider_credentials section
@@ -999,6 +1023,9 @@ async function main() {
999
1023
  // Step 6: Create .claude/ directory with symlinks
1000
1024
  await createClaudeDirectory();
1001
1025
 
1026
+ // Step 6.5: Generate settings.json
1027
+ await generateSettingsJson();
1028
+
1002
1029
  // Step 7: Generate CLAUDE.md
1003
1030
  await generateClaudeMd(config);
1004
1031
 
@@ -0,0 +1,108 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema#",
3
+ "version": "2.0.0",
4
+ "cloud_provider": "aws",
5
+ "description": "Context contracts for AWS-based projects",
6
+ "last_updated": "2025-11-10",
7
+
8
+ "agents": {
9
+ "terraform-architect": {
10
+ "contract_version": "1.0",
11
+ "required": [
12
+ "project_details.account_id",
13
+ "project_details.region",
14
+ "project_details.environment",
15
+ "terraform_infrastructure.layout.base_path",
16
+ "terraform_infrastructure.provider_credentials.aws",
17
+ "operational_guidelines.commit_standards"
18
+ ],
19
+ "optional": [
20
+ "terraform_infrastructure.layout.modules_path",
21
+ "terraform_infrastructure.layout.environments_path",
22
+ "terraform_infrastructure.state.backend_type",
23
+ "terraform_infrastructure.state.backend_config"
24
+ ]
25
+ },
26
+
27
+ "gitops-operator": {
28
+ "contract_version": "1.0",
29
+ "required": [
30
+ "project_details.account_id",
31
+ "project_details.region",
32
+ "project_details.cluster_name",
33
+ "gitops_configuration.repository.path",
34
+ "gitops_configuration.flux_details",
35
+ "cluster_details.namespaces",
36
+ "operational_guidelines.commit_standards"
37
+ ],
38
+ "optional": [
39
+ "gitops_configuration.repository.remote_url",
40
+ "gitops_configuration.repository.branch",
41
+ "cluster_details.ingress_class",
42
+ "cluster_details.irsa_enabled",
43
+ "application_services"
44
+ ]
45
+ },
46
+
47
+ "aws-troubleshooter": {
48
+ "contract_version": "1.0",
49
+ "required": [
50
+ "project_details.account_id",
51
+ "project_details.region",
52
+ "terraform_infrastructure.layout.base_path",
53
+ "gitops_configuration.repository.path"
54
+ ],
55
+ "optional": [
56
+ "project_details.cluster_name",
57
+ "application_services",
58
+ "infrastructure_topology"
59
+ ]
60
+ },
61
+
62
+ "devops-developer": {
63
+ "contract_version": "1.0",
64
+ "required": [
65
+ "project_details.account_id",
66
+ "project_details.environment",
67
+ "operational_guidelines.commit_standards"
68
+ ],
69
+ "optional": [
70
+ "application_services",
71
+ "development_standards"
72
+ ]
73
+ }
74
+ },
75
+
76
+ "field_mappings": {
77
+ "project_details.account_id": {
78
+ "description": "AWS Account ID",
79
+ "example": "123456789012",
80
+ "type": "string",
81
+ "source": "metadata.aws_account or sections.project_details.aws_account"
82
+ },
83
+ "project_details.region": {
84
+ "description": "Primary AWS region",
85
+ "example": "us-east-1",
86
+ "type": "string"
87
+ },
88
+ "project_details.cluster_name": {
89
+ "description": "EKS cluster name",
90
+ "example": "non-prod-rnd-eks",
91
+ "type": "string"
92
+ },
93
+ "terraform_infrastructure.provider_credentials.aws": {
94
+ "description": "AWS authentication configuration",
95
+ "type": "object",
96
+ "fields": {
97
+ "account_id": "AWS account ID",
98
+ "region": "Default region",
99
+ "profile": "AWS CLI profile name (optional)"
100
+ }
101
+ },
102
+ "cluster_details.irsa_enabled": {
103
+ "description": "Whether EKS IAM Roles for Service Accounts (IRSA) is enabled",
104
+ "type": "boolean",
105
+ "default": true
106
+ }
107
+ }
108
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema#",
3
+ "version": "2.0.0",
4
+ "cloud_provider": "gcp",
5
+ "description": "Context contracts for GCP-based projects",
6
+ "last_updated": "2025-11-10",
7
+
8
+ "agents": {
9
+ "terraform-architect": {
10
+ "contract_version": "1.0",
11
+ "required": [
12
+ "project_details.project_id",
13
+ "project_details.region",
14
+ "project_details.environment",
15
+ "terraform_infrastructure.layout.base_path",
16
+ "terraform_infrastructure.provider_credentials.gcp",
17
+ "operational_guidelines.commit_standards"
18
+ ],
19
+ "optional": [
20
+ "terraform_infrastructure.layout.modules_path",
21
+ "terraform_infrastructure.layout.environments_path",
22
+ "terraform_infrastructure.state.backend_type",
23
+ "terraform_infrastructure.state.backend_config"
24
+ ]
25
+ },
26
+
27
+ "gitops-operator": {
28
+ "contract_version": "1.0",
29
+ "required": [
30
+ "project_details.project_id",
31
+ "project_details.region",
32
+ "project_details.cluster_name",
33
+ "gitops_configuration.repository.path",
34
+ "gitops_configuration.flux_details",
35
+ "cluster_details.namespaces",
36
+ "operational_guidelines.commit_standards"
37
+ ],
38
+ "optional": [
39
+ "gitops_configuration.repository.remote_url",
40
+ "gitops_configuration.repository.branch",
41
+ "cluster_details.ingress_class",
42
+ "cluster_details.workload_identity_enabled",
43
+ "application_services"
44
+ ]
45
+ },
46
+
47
+ "gcp-troubleshooter": {
48
+ "contract_version": "1.0",
49
+ "required": [
50
+ "project_details.project_id",
51
+ "project_details.region",
52
+ "terraform_infrastructure.layout.base_path",
53
+ "gitops_configuration.repository.path"
54
+ ],
55
+ "optional": [
56
+ "project_details.cluster_name",
57
+ "application_services",
58
+ "infrastructure_topology"
59
+ ]
60
+ },
61
+
62
+ "devops-developer": {
63
+ "contract_version": "1.0",
64
+ "required": [
65
+ "project_details.project_id",
66
+ "project_details.environment",
67
+ "operational_guidelines.commit_standards"
68
+ ],
69
+ "optional": [
70
+ "application_services",
71
+ "development_standards"
72
+ ]
73
+ }
74
+ },
75
+
76
+ "field_mappings": {
77
+ "project_details.project_id": {
78
+ "description": "GCP Project ID",
79
+ "example": "aaxis-rnd-non-prod",
80
+ "type": "string",
81
+ "source": "metadata.project_id or sections.project_details.project_id"
82
+ },
83
+ "project_details.region": {
84
+ "description": "Primary GCP region",
85
+ "example": "us-central1",
86
+ "type": "string"
87
+ },
88
+ "project_details.cluster_name": {
89
+ "description": "GKE cluster name",
90
+ "example": "non-prod-rnd-gke",
91
+ "type": "string"
92
+ },
93
+ "terraform_infrastructure.provider_credentials.gcp": {
94
+ "description": "GCP authentication configuration",
95
+ "type": "object",
96
+ "fields": {
97
+ "project": "GCP project ID",
98
+ "region": "Default region",
99
+ "credentials_path": "Path to service account JSON (optional)"
100
+ }
101
+ },
102
+ "cluster_details.workload_identity_enabled": {
103
+ "description": "Whether GKE Workload Identity is enabled",
104
+ "type": "boolean",
105
+ "default": true
106
+ }
107
+ }
108
+ }
@@ -1,7 +1,7 @@
1
1
  # Context Contracts
2
2
 
3
- **Version:** 2.0.0
4
- **Last Updated:** 2025-11-07
3
+ **Version:** 2.1.0
4
+ **Last Updated:** 2025-11-10
5
5
  **Parent:** CLAUDE.md
6
6
 
7
7
  This document defines the **Context Contracts** for each specialized agent. A context contract specifies the minimum structured data that MUST be provided when invoking an agent.
@@ -28,6 +28,56 @@ A context contract is a schema that defines:
28
28
 
29
29
  ---
30
30
 
31
+ ## Provider-Specific Contracts (NEW in v2.1.0)
32
+
33
+ **As of v2.1.0, contracts are defined per cloud provider:**
34
+
35
+ ```
36
+ .claude/config/
37
+ ├── context-contracts.gcp.json # GCP-specific contracts
38
+ ├── context-contracts.aws.json # AWS-specific contracts
39
+ └── context-contracts.azure.json # Azure-specific contracts (future)
40
+ ```
41
+
42
+ ### How It Works
43
+
44
+ 1. **context_provider.py detects the cloud provider:**
45
+ - Reads `metadata.cloud_provider` from project-context.json
46
+ - Falls back to inferring from field presence (`project_id` → GCP, `account_id` → AWS)
47
+ - Defaults to GCP if undetected
48
+
49
+ 2. **Loads the correct contract file:**
50
+ - GCP projects → `context-contracts.gcp.json`
51
+ - AWS projects → `context-contracts.aws.json`
52
+ - Azure projects → `context-contracts.azure.json`
53
+
54
+ 3. **Validates against provider-specific requirements:**
55
+ - GCP contracts expect `project_details.project_id`
56
+ - AWS contracts expect `project_details.account_id`
57
+ - All other fields remain provider-agnostic
58
+
59
+ ### Benefits of Provider-Specific Contracts
60
+
61
+ ✅ **Clarity:** Field names match cloud provider terminology
62
+ ✅ **Simplicity:** No complex conditional validation logic
63
+ ✅ **Extensibility:** Adding Azure = create `context-contracts.azure.json` (15 minutes)
64
+ ✅ **Agents stay agnostic:** Agents use pattern discovery, don't care about provider
65
+ ✅ **Single source of truth:** Orchestrator selects the right contract
66
+
67
+ ### Example
68
+
69
+ ```python
70
+ # context_provider.py automatically handles this:
71
+
72
+ cloud_provider = detect_cloud_provider(project_context) # → "gcp"
73
+ contracts = load_provider_contracts(cloud_provider) # → loads context-contracts.gcp.json
74
+ payload = get_contract_context(project_context, "terraform-architect", contracts)
75
+ ```
76
+
77
+ **Result:** Orchestrator validates GCP-specific fields, agents receive clean payload.
78
+
79
+ ---
80
+
31
81
  ## Contract Format
32
82
 
33
83
  Each contract section below follows this structure:
package/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  /**
2
- * @aaxis/claude-agents
2
+ * @jaguilar87/gaia-ops
3
3
  *
4
- * Shared Claude Code agent system for Aaxis DevOps workflows
4
+ * Multi-agent orchestration system for Claude Code - DevOps automation toolkit
5
5
  *
6
6
  * Usage:
7
- * import { getAgentPath, getToolPath } from '@aaxis/claude-agents';
7
+ * import { getAgentPath, getToolPath, getConfigPath } from '@jaguilar87/gaia-ops';
8
8
  * const agentPath = getAgentPath('gitops-operator');
9
9
  * const toolPath = getToolPath('context_provider.py');
10
+ * const configPath = getConfigPath('orchestration-workflow.md');
10
11
  */
11
12
 
12
13
  import { fileURLToPath } from 'url';