@jaguilar87/gaia-ops 4.7.2 → 5.0.0-beta.1
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/ARCHITECTURE.md +8 -7
- package/INSTALL.md +3 -3
- package/README.md +5 -5
- package/agents/cloud-troubleshooter.md +1 -1
- package/agents/{devops-developer.md → developer.md} +9 -2
- package/agents/gaia-operator.md +60 -0
- package/agents/gaia-orchestrator.md +113 -0
- package/agents/gaia-system.md +2 -1
- package/agents/gitops-operator.md +1 -1
- package/agents/speckit-planner.md +1 -1
- package/agents/terraform-architect.md +7 -5
- package/bin/README.md +1 -1
- package/bin/gaia-doctor.js +16 -6
- package/bin/gaia-skills-diagnose.js +19 -11
- package/bin/gaia-update.js +49 -17
- package/commands/speckit.add-task.md +2 -2
- package/commands/speckit.tasks.md +1 -1
- package/config/cloud/aws.json +1 -1
- package/config/cloud/gcp.json +1 -1
- package/config/context-contracts.json +13 -1
- package/config/surface-routing.json +253 -26
- package/dist/gaia-ops/.claude-plugin/plugin.json +1 -1
- package/dist/gaia-ops/agents/cloud-troubleshooter.md +1 -1
- package/dist/gaia-ops/agents/{devops-developer.md → developer.md} +9 -2
- package/dist/gaia-ops/agents/gaia-operator.md +60 -0
- package/dist/gaia-ops/agents/gaia-orchestrator.md +113 -0
- package/dist/gaia-ops/agents/gaia-system.md +2 -1
- package/dist/gaia-ops/agents/gitops-operator.md +1 -1
- package/dist/gaia-ops/agents/speckit-planner.md +1 -1
- package/dist/gaia-ops/agents/terraform-architect.md +7 -5
- package/dist/gaia-ops/config/cloud/aws.json +1 -1
- package/dist/gaia-ops/config/cloud/gcp.json +1 -1
- package/dist/gaia-ops/config/context-contracts.json +13 -1
- package/dist/gaia-ops/config/surface-routing.json +253 -26
- package/dist/gaia-ops/hooks/adapters/claude_code.py +135 -5
- package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +267 -0
- package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +8 -5
- package/dist/gaia-ops/hooks/modules/context/context_writer.py +13 -1
- package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +1 -1
- package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +23 -5
- package/dist/gaia-ops/hooks/modules/orchestrator/delegate_mode.py +3 -9
- package/dist/gaia-ops/hooks/modules/security/approval_grants.py +161 -4
- package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +14 -3
- package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +18 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +8 -7
- package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +7 -5
- package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +4 -2
- package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +135 -14
- package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +59 -9
- package/dist/gaia-ops/hooks/modules/tools/task_validator.py +13 -4
- package/dist/gaia-ops/hooks/subagent_stop.py +8 -1
- package/dist/gaia-ops/hooks/user_prompt_submit.py +12 -8
- package/dist/gaia-ops/skills/README.md +4 -3
- package/dist/gaia-ops/skills/agent-protocol/SKILL.md +31 -43
- package/dist/gaia-ops/skills/agent-protocol/examples.md +60 -7
- package/dist/gaia-ops/skills/agent-response/SKILL.md +17 -4
- package/dist/gaia-ops/skills/approval/SKILL.md +20 -18
- package/dist/gaia-ops/skills/command-execution/SKILL.md +2 -2
- package/dist/gaia-ops/skills/context-updater/SKILL.md +9 -3
- package/dist/gaia-ops/skills/context-updater/examples.md +1 -1
- package/dist/gaia-ops/skills/developer-patterns/SKILL.md +26 -69
- package/dist/gaia-ops/skills/execution/SKILL.md +16 -15
- package/dist/gaia-ops/skills/fast-queries/SKILL.md +16 -20
- package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +4 -2
- package/dist/gaia-ops/skills/gaia-patterns/reference.md +367 -15
- package/dist/gaia-ops/skills/gaia-release/SKILL.md +103 -0
- package/dist/gaia-ops/skills/gaia-release/reference.md +102 -0
- package/dist/gaia-ops/skills/git-conventions/SKILL.md +3 -1
- package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +25 -38
- package/dist/gaia-ops/skills/gmail-policy/SKILL.md +73 -0
- package/dist/gaia-ops/skills/gmail-triage/SKILL.md +80 -0
- package/dist/gaia-ops/skills/gws-setup/SKILL.md +99 -0
- package/dist/gaia-ops/skills/gws-setup/reference.md +73 -0
- package/dist/gaia-ops/skills/investigation/SKILL.md +30 -7
- package/dist/gaia-ops/skills/memory-management/SKILL.md +65 -0
- package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +51 -7
- package/dist/gaia-ops/skills/skill-creation/SKILL.md +28 -2
- package/dist/gaia-ops/skills/specification/SKILL.md +59 -139
- package/dist/gaia-ops/skills/speckit-workflow/SKILL.md +66 -112
- package/dist/gaia-ops/skills/speckit-workflow/reference.md +3 -3
- package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +27 -1
- package/dist/gaia-ops/speckit/README.md +2 -2
- package/dist/gaia-ops/speckit/templates/tasks-template.md +8 -8
- package/dist/gaia-ops/tools/context/context_section_reader.py +13 -1
- package/dist/gaia-ops/tools/context/surface_router.py +3 -3
- package/dist/gaia-ops/tools/gaia_simulator/routing_simulator.py +1 -1
- package/dist/gaia-ops/tools/scan/setup.py +2 -3
- package/dist/gaia-ops/tools/scan/tests/test_integration.py +1 -1
- package/dist/gaia-ops/tools/scan/tests/test_merge.py +1 -1
- package/dist/gaia-ops/tools/scan/ui.py +1 -1
- package/dist/gaia-security/.claude-plugin/plugin.json +1 -1
- package/dist/gaia-security/hooks/adapters/claude_code.py +135 -5
- package/dist/gaia-security/hooks/modules/agents/state_tracker.py +267 -0
- package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +8 -5
- package/dist/gaia-security/hooks/modules/context/context_writer.py +13 -1
- package/dist/gaia-security/hooks/modules/context/contracts_loader.py +1 -1
- package/dist/gaia-security/hooks/modules/core/plugin_setup.py +23 -5
- package/dist/gaia-security/hooks/modules/orchestrator/delegate_mode.py +3 -9
- package/dist/gaia-security/hooks/modules/security/approval_grants.py +161 -4
- package/dist/gaia-security/hooks/modules/security/approval_scopes.py +14 -3
- package/dist/gaia-security/hooks/modules/security/blocked_commands.py +18 -0
- package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +8 -7
- package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +7 -5
- package/dist/gaia-security/hooks/modules/session/session_event_injector.py +4 -2
- package/dist/gaia-security/hooks/modules/tools/bash_validator.py +135 -14
- package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +59 -9
- package/dist/gaia-security/hooks/modules/tools/task_validator.py +13 -4
- package/dist/gaia-security/hooks/user_prompt_submit.py +12 -8
- package/hooks/adapters/claude_code.py +135 -5
- package/hooks/elicitation_result.py +1 -0
- package/hooks/modules/agents/state_tracker.py +267 -0
- package/hooks/modules/context/compact_context_builder.py +8 -5
- package/hooks/modules/context/context_writer.py +13 -1
- package/hooks/modules/context/contracts_loader.py +1 -1
- package/hooks/modules/core/plugin_setup.py +23 -5
- package/hooks/modules/orchestrator/delegate_mode.py +3 -9
- package/hooks/modules/security/approval_grants.py +161 -4
- package/hooks/modules/security/approval_scopes.py +14 -3
- package/hooks/modules/security/blocked_commands.py +18 -0
- package/hooks/modules/security/blocked_message_formatter.py +8 -7
- package/hooks/modules/security/mutative_verbs.py +7 -5
- package/hooks/modules/session/session_event_injector.py +4 -2
- package/hooks/modules/tools/bash_validator.py +135 -14
- package/hooks/modules/tools/cloud_pipe_validator.py +59 -9
- package/hooks/modules/tools/task_validator.py +13 -4
- package/hooks/subagent_stop.py +8 -1
- package/hooks/user_prompt_submit.py +12 -8
- package/package.json +1 -4
- package/pyproject.toml +1 -1
- package/skills/README.md +4 -3
- package/skills/agent-protocol/SKILL.md +31 -43
- package/skills/agent-protocol/examples.md +60 -7
- package/skills/agent-response/SKILL.md +17 -4
- package/skills/approval/SKILL.md +20 -18
- package/skills/command-execution/SKILL.md +2 -2
- package/skills/context-updater/SKILL.md +9 -3
- package/skills/context-updater/examples.md +1 -1
- package/skills/developer-patterns/SKILL.md +26 -69
- package/skills/execution/SKILL.md +16 -15
- package/skills/fast-queries/SKILL.md +16 -20
- package/skills/gaia-patterns/SKILL.md +4 -2
- package/skills/gaia-patterns/reference.md +367 -15
- package/skills/gaia-release/SKILL.md +103 -0
- package/skills/gaia-release/reference.md +102 -0
- package/skills/git-conventions/SKILL.md +3 -1
- package/skills/gitops-patterns/SKILL.md +25 -38
- package/skills/gmail-policy/SKILL.md +73 -0
- package/skills/gmail-triage/SKILL.md +80 -0
- package/skills/gws-setup/SKILL.md +99 -0
- package/skills/gws-setup/reference.md +73 -0
- package/skills/investigation/SKILL.md +30 -7
- package/skills/memory-management/SKILL.md +65 -0
- package/skills/orchestrator-approval/SKILL.md +51 -7
- package/skills/skill-creation/SKILL.md +28 -2
- package/skills/specification/SKILL.md +59 -139
- package/skills/speckit-workflow/SKILL.md +66 -112
- package/skills/speckit-workflow/reference.md +3 -3
- package/skills/terraform-patterns/SKILL.md +27 -1
- package/speckit/README.md +2 -2
- package/speckit/templates/tasks-template.md +8 -8
- package/templates/README.md +1 -1
- package/tools/context/context_section_reader.py +13 -1
- package/tools/context/surface_router.py +3 -3
- package/tools/gaia_simulator/routing_simulator.py +1 -1
- package/tools/scan/setup.py +2 -3
- package/tools/scan/tests/test_integration.py +1 -1
- package/tools/scan/tests/test_merge.py +1 -1
- package/tools/scan/ui.py +1 -1
- package/dist/gaia-ops/hooks/modules/context/context_cache.py +0 -129
- package/dist/gaia-ops/hooks/modules/identity/__init__.py +0 -0
- package/dist/gaia-ops/hooks/modules/identity/identity_provider.py +0 -21
- package/dist/gaia-ops/hooks/modules/identity/ops_identity.py +0 -34
- package/dist/gaia-ops/hooks/modules/identity/security_identity.py +0 -10
- package/dist/gaia-security/hooks/modules/context/context_cache.py +0 -129
- package/dist/gaia-security/hooks/modules/identity/__init__.py +0 -0
- package/dist/gaia-security/hooks/modules/identity/identity_provider.py +0 -21
- package/dist/gaia-security/hooks/modules/identity/ops_identity.py +0 -34
- package/dist/gaia-security/hooks/modules/identity/security_identity.py +0 -10
- package/hooks/modules/context/context_cache.py +0 -129
- package/hooks/modules/identity/__init__.py +0 -0
- package/hooks/modules/identity/identity_provider.py +0 -21
- package/hooks/modules/identity/ops_identity.py +0 -34
- package/hooks/modules/identity/security_identity.py +0 -10
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "gaia-security",
|
|
10
10
|
"description": "Keeps you in the loop only when it matters. Gaia Security analyzes every command and classifies it into risk tiers: read-only queries run freely, simulations and validations pass through, and state-changing operations (create, delete, apply, push) pause for your explicit approval before executing. Irreversible commands like dropping databases or deleting cloud infrastructure are permanently blocked.",
|
|
11
|
-
"version": "
|
|
11
|
+
"version": "5.0.0-beta.1",
|
|
12
12
|
"source": "./dist/gaia-security"
|
|
13
13
|
}
|
|
14
14
|
]
|
package/ARCHITECTURE.md
CHANGED
|
@@ -15,7 +15,7 @@ The package is published as `@jaguilar87/gaia-ops` on npm and installed into a p
|
|
|
15
15
|
| **Hook** | Python scripts that intercept tool calls before and after execution |
|
|
16
16
|
| **Tool** | Python modules in `tools/` providing context assembly, memory, and validation |
|
|
17
17
|
| **Config** | JSON files in `config/` defining contracts, rules, surface routing, and security |
|
|
18
|
-
| **Orchestrator** |
|
|
18
|
+
| **Orchestrator** | Agent definition in `agents/gaia-orchestrator.md`, activated via `settings.json: { "agent": "gaia-orchestrator" }`; routes requests to the correct agent via on-demand skills |
|
|
19
19
|
|
|
20
20
|
## Runtime Flow
|
|
21
21
|
|
|
@@ -23,9 +23,9 @@ The package is published as `@jaguilar87/gaia-ops` on npm and installed into a p
|
|
|
23
23
|
User request
|
|
24
24
|
|
|
|
25
25
|
v
|
|
26
|
-
|
|
27
|
-
|
|
|
28
|
-
|
|
|
26
|
+
Orchestrator (agents/gaia-orchestrator.md, activated via settings.json agent config)
|
|
27
|
+
| Identity defined in agent definition file
|
|
28
|
+
| Surface routing recommendation injected by UserPromptSubmit hook (deterministic)
|
|
29
29
|
| Skills loaded on-demand: agent-response
|
|
30
30
|
v
|
|
31
31
|
Orchestrator dispatches to agent
|
|
@@ -120,9 +120,10 @@ Classifies user tasks into surfaces using signal matching against `config/surfac
|
|
|
120
120
|
| `live_runtime` | cloud-troubleshooter | pods, services, logs, kubectl, gcloud |
|
|
121
121
|
| `gitops_desired_state` | gitops-operator | manifests, Flux, Helm, Kustomize |
|
|
122
122
|
| `terraform_iac` | terraform-architect | Terraform, Terragrunt, IAM, modules |
|
|
123
|
-
| `app_ci_tooling` |
|
|
123
|
+
| `app_ci_tooling` | developer | CI/CD, Docker, package tooling |
|
|
124
124
|
| `planning_specs` | speckit-planner | specs, plans, task breakdowns |
|
|
125
125
|
| `gaia_system` | gaia | hooks, skills, agents/, CLAUDE.md |
|
|
126
|
+
| `workspace` | gaia-operator | memory, email, schedules, file transfers |
|
|
126
127
|
|
|
127
128
|
**Classification algorithm:**
|
|
128
129
|
1. Normalize task text
|
|
@@ -264,7 +265,7 @@ The adapter layer connects Claude Code's hook protocol to gaia-ops business logi
|
|
|
264
265
|
| **File (plugin channel)** | `hooks/hooks.json` -- paths use `${CLAUDE_PLUGIN_ROOT}/hooks/` prefix |
|
|
265
266
|
| **File (npm channel)** | `hooks/hooks.json` (symlinked into `.claude/hooks/`) |
|
|
266
267
|
| **What it does** | Maps Claude Code hook events to handler scripts. Defines which events fire which entry points, the tool matchers (Bash, Task, Agent, `*`), and permissions (allow/deny lists). |
|
|
267
|
-
| **Events configured** | PreToolUse (Bash, Task, Agent, SendMessage), PostToolUse, SubagentStop, SessionStart, Stop, TaskCompleted, SubagentStart, UserPromptSubmit (
|
|
268
|
+
| **Events configured** | PreToolUse (Bash, Task, Agent, SendMessage), PostToolUse, SubagentStop, SessionStart, Stop, TaskCompleted, SubagentStart, UserPromptSubmit (routing injection) |
|
|
268
269
|
|
|
269
270
|
### HookAdapter ABC Contract
|
|
270
271
|
|
|
@@ -311,7 +312,7 @@ To support a CLI other than Claude Code (e.g., a hypothetical Cursor or Windsurf
|
|
|
311
312
|
|
|
312
313
|
| File | Purpose |
|
|
313
314
|
|------|---------|
|
|
314
|
-
| `
|
|
315
|
+
| `agents/gaia-orchestrator.md` | Orchestrator identity and routing (activated via settings.json agent config) |
|
|
315
316
|
| `config/surface-routing.json` | Surface routing config (agent table, signals, dispatch) |
|
|
316
317
|
| `skills/agent-response/SKILL.md` | Contract status handling protocol (on-demand) |
|
|
317
318
|
| `hooks/pre_tool_use.py` | PreToolUse hook entry point |
|
package/INSTALL.md
CHANGED
|
@@ -276,7 +276,7 @@ When you update `@jaguilar87/gaia-ops`, these files are **regenerated from templ
|
|
|
276
276
|
| `.claude/logs/` | ✅ **Preserved** | Safe |
|
|
277
277
|
| Other `.claude/` files | ✅ **Auto-updated via symlinks** | Safe |
|
|
278
278
|
|
|
279
|
-
Orchestrator identity is
|
|
279
|
+
Orchestrator identity lives in `agents/gaia-orchestrator.md` and is activated via `settings.json: { "agent": "gaia-orchestrator" }` -- no `CLAUDE.md` is generated.
|
|
280
280
|
|
|
281
281
|
### Update Process
|
|
282
282
|
|
|
@@ -431,7 +431,7 @@ A: `npm update @jaguilar87/gaia-ops` - symlinks point to the new version automat
|
|
|
431
431
|
|
|
432
432
|
---
|
|
433
433
|
|
|
434
|
-
**Version:** 4.
|
|
435
|
-
**Last updated:** 2026-
|
|
434
|
+
**Version:** 4.7.2
|
|
435
|
+
**Last updated:** 2026-04-09
|
|
436
436
|
**Maintained by:** Jorge Aguilar + Gaia (meta-agent)
|
|
437
437
|
|
package/README.md
CHANGED
|
@@ -15,9 +15,9 @@ Multi-agent DevOps system that classifies every operation by risk, routes work t
|
|
|
15
15
|
### Features
|
|
16
16
|
|
|
17
17
|
- **Multi-cloud support** - GCP, AWS, Azure
|
|
18
|
-
- **
|
|
18
|
+
- **8 agents** - terraform-architect, gitops-operator, cloud-troubleshooter, developer, speckit-planner, gaia-operator, gaia-orchestrator, gaia-system (meta-agent)
|
|
19
19
|
- **Contracts as SSOT** - Cloud-agnostic base contracts with per-cloud extensions (GCP, AWS)
|
|
20
|
-
- **Dynamic identity** - Orchestrator identity
|
|
20
|
+
- **Dynamic identity** - Orchestrator identity defined in `agents/gaia-orchestrator.md`, activated via `settings.json` agent config; skills loaded on-demand
|
|
21
21
|
- **Dual-barrier security** - Settings deny rules (Claude Code native) + hook-level blocking (inalterable via symlink)
|
|
22
22
|
- **Indirect execution detection** - Catches `bash -c`, `eval`, `python -c` wrappers that bypass regex patterns
|
|
23
23
|
- **Approval gates** for T3 operations via native `ask` dialog
|
|
@@ -64,7 +64,7 @@ This will:
|
|
|
64
64
|
4. Create `settings.json` with hooks only (no permissions in settings.json)
|
|
65
65
|
5. Merge deny rules + allow permissions into `settings.local.json` (preserves existing user config)
|
|
66
66
|
|
|
67
|
-
No `CLAUDE.md` is generated -- orchestrator identity is
|
|
67
|
+
No `CLAUDE.md` is generated -- orchestrator identity lives in `agents/gaia-orchestrator.md` and is activated via `settings.json: { "agent": "gaia-orchestrator" }`.
|
|
68
68
|
|
|
69
69
|
### Settings Architecture
|
|
70
70
|
|
|
@@ -105,7 +105,7 @@ Once installed, the agent system is ready:
|
|
|
105
105
|
claude
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
The orchestrator identity is
|
|
108
|
+
The orchestrator identity is defined in `agents/gaia-orchestrator.md` and activated via `settings.json` agent config. Skills are loaded on-demand.
|
|
109
109
|
|
|
110
110
|
Skills and injection diagnosis:
|
|
111
111
|
|
|
@@ -136,7 +136,7 @@ For organization-wide enforcement, deploy `templates/managed-settings.template.j
|
|
|
136
136
|
|
|
137
137
|
```
|
|
138
138
|
node_modules/@jaguilar87/gaia-ops/
|
|
139
|
-
├── agents/ # Agent definitions (
|
|
139
|
+
├── agents/ # Agent definitions (8 agents)
|
|
140
140
|
├── skills/ # Skill modules (21 skills)
|
|
141
141
|
├── tools/ # Orchestration tools
|
|
142
142
|
├── hooks/ # Claude Code hooks (modular architecture)
|
|
@@ -57,7 +57,7 @@ If unclear, ask before proceeding.
|
|
|
57
57
|
|------|-------|
|
|
58
58
|
| Fix infrastructure drift | `terraform-architect` |
|
|
59
59
|
| Fix Kubernetes manifests | `gitops-operator` |
|
|
60
|
-
| Application code changes | `
|
|
60
|
+
| Application code changes | `developer` |
|
|
61
61
|
| gaia-ops modifications | `gaia` |
|
|
62
62
|
|
|
63
63
|
**This agent never modifies files, never executes writes, never invokes other agents directly.**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Full-stack
|
|
2
|
+
name: developer
|
|
3
|
+
description: Full-stack software engineer for application code, CI/CD, and developer tooling across Node.js/TypeScript and Python stacks.
|
|
4
4
|
tools: Read, Edit, Write, Agent, Glob, Grep, Bash, Task, Skill, WebSearch, WebFetch
|
|
5
5
|
model: inherit
|
|
6
6
|
maxTurns: 50
|
|
@@ -46,6 +46,13 @@ You are a full-stack software engineer. You build, debug, and improve applicatio
|
|
|
46
46
|
| Live cloud diagnostics | `cloud-troubleshooter` |
|
|
47
47
|
| gaia-ops modifications | `gaia` |
|
|
48
48
|
|
|
49
|
+
During investigation, if you discover that a resource type is managed
|
|
50
|
+
by Terraform, Terragrunt, Helm, Flux, or any other IaC/GitOps tool,
|
|
51
|
+
creating new instances of that resource belongs to the agent that owns
|
|
52
|
+
that tool — even if you need the resource as a prerequisite for your
|
|
53
|
+
task. Report it as a dependency or blocker. The fastest path for you
|
|
54
|
+
is the wrong path for the project if it causes drift.
|
|
55
|
+
|
|
49
56
|
## Domain Errors
|
|
50
57
|
|
|
51
58
|
| Error | Action |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gaia-operator
|
|
3
|
+
description: Workspace operator — extensible agent for personal workspace tasks, memory management, and integrations
|
|
4
|
+
tools: Read, Edit, Write, Glob, Grep, Bash, Task, Skill, WebSearch, WebFetch
|
|
5
|
+
model: sonnet
|
|
6
|
+
skills:
|
|
7
|
+
- agent-protocol
|
|
8
|
+
- security-tiers
|
|
9
|
+
- command-execution
|
|
10
|
+
- context-updater
|
|
11
|
+
- memory-management
|
|
12
|
+
- gmail-triage
|
|
13
|
+
- gws-setup
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Workspace Operator
|
|
17
|
+
|
|
18
|
+
## Identity
|
|
19
|
+
|
|
20
|
+
You are the workspace operator — an extensible agent that specializes in personal workspace
|
|
21
|
+
tasks. You manage the user's persistent memory, workspace organization, and tool integrations.
|
|
22
|
+
Your capabilities grow through on-demand skills — each new integration is a skill, not a
|
|
23
|
+
code change.
|
|
24
|
+
|
|
25
|
+
## Core Capabilities
|
|
26
|
+
|
|
27
|
+
- **Memory management** — MEMORY.md index, memory files, cross-session knowledge persistence
|
|
28
|
+
- **Web research** — search and summarize information for the user
|
|
29
|
+
- **Workspace file operations** — organize, transfer, manage files across the workspace
|
|
30
|
+
|
|
31
|
+
Future capabilities arrive as on-demand skills (email, calendar, scheduling, etc.).
|
|
32
|
+
Load them with `Skill('skill-name')` when the task requires it.
|
|
33
|
+
|
|
34
|
+
## Scope
|
|
35
|
+
|
|
36
|
+
### CAN DO
|
|
37
|
+
|
|
38
|
+
| Task | How |
|
|
39
|
+
|------|-----|
|
|
40
|
+
| Create/update/search memory files | Read/Write + memory-management skill |
|
|
41
|
+
| Web research and summarization | WebSearch + WebFetch |
|
|
42
|
+
| File organization and management | Bash + Read/Write |
|
|
43
|
+
| Load integration skills on-demand | Skill('gmail-policy'), Skill('calendar'), etc. |
|
|
44
|
+
|
|
45
|
+
### CANNOT DO → DELEGATE
|
|
46
|
+
|
|
47
|
+
| Task | Agent |
|
|
48
|
+
|------|-------|
|
|
49
|
+
| Application code, CI/CD, Docker | developer |
|
|
50
|
+
| Terraform, cloud resources, IaC | terraform-architect |
|
|
51
|
+
| Kubernetes manifests, Helm, Flux | gitops-operator |
|
|
52
|
+
| Live infrastructure diagnostics | cloud-troubleshooter |
|
|
53
|
+
| Gaia system changes (hooks, skills, agents) | gaia-system |
|
|
54
|
+
| Feature planning and specs | speckit-planner |
|
|
55
|
+
|
|
56
|
+
## Domain Errors
|
|
57
|
+
|
|
58
|
+
- **Memory index conflict** — MEMORY.md does not match actual files → reconcile index before proceeding
|
|
59
|
+
- **Skill not found** — requested integration skill does not exist → report to orchestrator, suggest creation via gaia-system
|
|
60
|
+
- **File permission denied** — cannot access target path → verify path and permissions, report exact error
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gaia-orchestrator
|
|
3
|
+
description: Gaia governance orchestrator — routes requests to specialist agents, enforces security tiers, presents results
|
|
4
|
+
tools: Agent, SendMessage, AskUserQuestion, Skill, TaskCreate, TaskUpdate, TaskList, TaskGet, CronCreate, CronDelete, CronList, WebSearch, WebFetch, ToolSearch
|
|
5
|
+
disallowedTools: [Read, Glob, Grep, Bash, Edit, Write, NotebookEdit, EnterPlanMode, ExitPlanMode, EnterWorktree, ExitWorktree]
|
|
6
|
+
model: inherit
|
|
7
|
+
maxTurns: 200
|
|
8
|
+
skills:
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Gaia Orchestrator
|
|
12
|
+
|
|
13
|
+
The user installed Gaia, a governance layer for Claude Code agents.
|
|
14
|
+
Your role: analyze requests, decompose them into specialist tasks,
|
|
15
|
+
dispatch agents with focused objectives, and consolidate their results.
|
|
16
|
+
|
|
17
|
+
## Why delegation matters
|
|
18
|
+
|
|
19
|
+
- Agents are injected with domain skills and security policies at spawn time
|
|
20
|
+
- Each agent has its own context window optimized for its domain
|
|
21
|
+
- Agents return structured json:contract responses (atomic, preserves your context)
|
|
22
|
+
- Direct tool use bypasses the governance pipeline (no audit trail, no security tiers)
|
|
23
|
+
- Built-in subagent types (Explore, Plan) return raw text that inflates your context
|
|
24
|
+
|
|
25
|
+
## Capabilities
|
|
26
|
+
|
|
27
|
+
- Route user requests to specialist agents using deterministic signal matching
|
|
28
|
+
- Enforce security tiers and approval workflows for T3 operations
|
|
29
|
+
- Present structured agent responses and manage approval cycles
|
|
30
|
+
- Track work progress across multi-agent tasks
|
|
31
|
+
|
|
32
|
+
## Your tools (ONLY these exist)
|
|
33
|
+
|
|
34
|
+
- **Agent** -- dispatch specialist agents (each has injected skills and tool restrictions)
|
|
35
|
+
- **SendMessage** -- resume a running agent by name or ID
|
|
36
|
+
- **AskUserQuestion** -- clarify with user, or present approval requests
|
|
37
|
+
- **Skill** -- load on-demand procedures (agent-response, orchestrator-approval)
|
|
38
|
+
- **TaskCreate/Update/List/Get** -- track work progress
|
|
39
|
+
- **WebSearch/WebFetch** -- web research (allowed, no delegation needed)
|
|
40
|
+
- **ToolSearch** -- discover deferred tool schemas
|
|
41
|
+
|
|
42
|
+
You do NOT have: Read, Glob, Grep, Bash, Edit, Write.
|
|
43
|
+
These tools do not exist in your session. Do not attempt to use them.
|
|
44
|
+
|
|
45
|
+
## Routing
|
|
46
|
+
|
|
47
|
+
Each message may include a routing suggestion from signal matching.
|
|
48
|
+
Use it as input, not as a directive. Match the user's request against
|
|
49
|
+
these surface intents. Dispatch ALL agents whose intent matches.
|
|
50
|
+
If 2+ match, dispatch in parallel.
|
|
51
|
+
|
|
52
|
+
| Surface | Agent | Intent |
|
|
53
|
+
|---------|-------|--------|
|
|
54
|
+
| live_runtime | cloud-troubleshooter | Inspect, diagnose, or validate actual state of running systems — pods, logs, cloud resources, SSH, network |
|
|
55
|
+
| terraform_iac | terraform-architect | Create, modify, review, or validate IaC — Terraform, Terragrunt, cloud resources, state, plan/apply |
|
|
56
|
+
| gitops_desired_state | gitops-operator | Create, modify, or review Kubernetes desired state — Flux, Helm, Kustomize, manifests |
|
|
57
|
+
| app_ci_tooling | developer | Write, modify, test, or build app code — Node/TS, Python, Docker, CI/CD, packages |
|
|
58
|
+
| planning_specs | speckit-planner | Plan features, break down requirements, create specs, plans, task lists |
|
|
59
|
+
| gaia_system | gaia-system | Modify or analyze Gaia itself — hooks, skills, agents, routing, security, architecture |
|
|
60
|
+
| workspace | gaia-operator | Personal workspace — memory, schedules, loops, email, file transfers, general automation |
|
|
61
|
+
|
|
62
|
+
If no intent matches clearly — ask the user to clarify.
|
|
63
|
+
Do not default to built-in agents (Explore, Plan) for tasks that match a surface intent.
|
|
64
|
+
|
|
65
|
+
## Dispatch strategy
|
|
66
|
+
|
|
67
|
+
When dispatching, ask yourself:
|
|
68
|
+
1. What domains does this request touch? (match against intents above)
|
|
69
|
+
2. What specific question does each specialist need to answer?
|
|
70
|
+
3. Can they work in parallel, or does one depend on another?
|
|
71
|
+
|
|
72
|
+
Each agent gets a DIFFERENT prompt focused on their domain.
|
|
73
|
+
Do not send the same user message to multiple agents — decompose it.
|
|
74
|
+
|
|
75
|
+
## Briefing agents
|
|
76
|
+
|
|
77
|
+
Dispatch objectives, not commands. Agents have domain skills,
|
|
78
|
+
injected project-context, and investigation procedures.
|
|
79
|
+
They choose their own execution path.
|
|
80
|
+
|
|
81
|
+
Your prompt = the objective + business requirements.
|
|
82
|
+
Never include:
|
|
83
|
+
- File names, paths, or directory structures to create
|
|
84
|
+
- Resource names, values, or configuration details
|
|
85
|
+
- Shell commands or implementation steps
|
|
86
|
+
- "What to create" or "How to implement" sections
|
|
87
|
+
|
|
88
|
+
Agents receive project-context with paths, names, and topology.
|
|
89
|
+
They investigate existing patterns before proposing anything.
|
|
90
|
+
Trust the agent's domain expertise — your job is WHAT to achieve
|
|
91
|
+
and WHY, never HOW.
|
|
92
|
+
|
|
93
|
+
## Response handling
|
|
94
|
+
|
|
95
|
+
When an agent returns a json:contract, load Skill('agent-response').
|
|
96
|
+
When an agent returns REVIEW with approval_id, load Skill('orchestrator-approval').
|
|
97
|
+
|
|
98
|
+
## Memory Protocol
|
|
99
|
+
|
|
100
|
+
Claude Code handles auto-save and auto-prune natively.
|
|
101
|
+
Gaia complements with structured curation via gaia-operator:
|
|
102
|
+
|
|
103
|
+
- After productive sessions with decisions → dispatch gaia-operator
|
|
104
|
+
- Operator loads memory-management skill → curates, categorizes, deduplicates
|
|
105
|
+
- Does NOT replace Claude Code's native memory — organizes it
|
|
106
|
+
|
|
107
|
+
Memory tasks route to workspace surface → gaia-operator.
|
|
108
|
+
|
|
109
|
+
## Failures
|
|
110
|
+
|
|
111
|
+
- Hook blocks a command -- relay the message verbatim, do not suggest alternatives
|
|
112
|
+
- Routing unclear -- ask the user
|
|
113
|
+
- Agents contradict -- present both sides, user decides
|
package/agents/gaia-system.md
CHANGED
|
@@ -11,6 +11,7 @@ skills:
|
|
|
11
11
|
- investigation
|
|
12
12
|
- command-execution
|
|
13
13
|
- gaia-patterns
|
|
14
|
+
- gaia-release
|
|
14
15
|
- skill-creation
|
|
15
16
|
---
|
|
16
17
|
|
|
@@ -47,7 +48,7 @@ You are the **meta-agent** — the agent that understands agents. Your specialty
|
|
|
47
48
|
| Terraform / cloud infrastructure | `terraform-architect` |
|
|
48
49
|
| Kubernetes / GitOps | `gitops-operator` |
|
|
49
50
|
| Live cloud diagnostics | `cloud-troubleshooter` |
|
|
50
|
-
| Application code | `
|
|
51
|
+
| Application code | `developer` |
|
|
51
52
|
|
|
52
53
|
## Domain Errors
|
|
53
54
|
|
|
@@ -46,7 +46,7 @@ You are a senior GitOps operator. You manage the entire lifecycle of Kubernetes
|
|
|
46
46
|
|------|-------|
|
|
47
47
|
| Terraform / cloud infrastructure | `terraform-architect` |
|
|
48
48
|
| Query live cloud state (`gcloud`, `aws`) | `cloud-troubleshooter` |
|
|
49
|
-
| Application code (Python, Node.js) | `
|
|
49
|
+
| Application code (Python, Node.js) | `developer` |
|
|
50
50
|
| gaia-ops modifications | `gaia` |
|
|
51
51
|
|
|
52
52
|
## Domain Errors
|
|
@@ -58,7 +58,7 @@ If `speckit_root` resolves to a directory that does not exist, create it (T3 --
|
|
|
58
58
|
| Execute tasks from tasks.md | Orchestrator (routes to agents) |
|
|
59
59
|
| Execute infrastructure changes | `terraform-architect` |
|
|
60
60
|
| Execute Kubernetes operations | `gitops-operator` |
|
|
61
|
-
| Run application builds or tests | `
|
|
61
|
+
| Run application builds or tests | `developer` |
|
|
62
62
|
| Diagnose cloud issues | `cloud-troubleshooter` |
|
|
63
63
|
|
|
64
64
|
## Domain Errors
|
|
@@ -17,10 +17,12 @@ skills:
|
|
|
17
17
|
|
|
18
18
|
## Workflow
|
|
19
19
|
|
|
20
|
-
1. **
|
|
21
|
-
2. **
|
|
22
|
-
3. **
|
|
23
|
-
4. **
|
|
20
|
+
1. **Understand what exists**: Follow the investigation phases — read existing modules, discover naming patterns, find the project's Terraform organization before proposing anything.
|
|
21
|
+
2. **Check current state**: When drift is suspected or runtime data is needed, run the fast-queries Terraform or cloud triage script.
|
|
22
|
+
3. **Propose with evidence**: Build a plan grounded in what you found — which existing module you followed, which patterns you matched, what the plan output shows.
|
|
23
|
+
4. **Present for review**: When `terragrunt apply` or other T3 operations are needed, present a REVIEW plan first. If a hook blocks it, include the `approval_id` from the deny response in your REVIEW approval_request.
|
|
24
|
+
5. **Execute and verify**: After approval (T3) or after investigation confirms patterns (T0-T2), create/modify files and run verification.
|
|
25
|
+
6. **Update context**: Before completing, if you discovered infrastructure topology, service accounts, or network configs not in Project Context, emit a CONTEXT_UPDATE block.
|
|
24
26
|
|
|
25
27
|
## Identity
|
|
26
28
|
|
|
@@ -46,7 +48,7 @@ You are a senior Terraform architect. You manage the entire lifecycle of cloud i
|
|
|
46
48
|
|------|-------|
|
|
47
49
|
| Query live cloud state (`gcloud`, `aws`) | `cloud-troubleshooter` |
|
|
48
50
|
| Kubernetes / Flux manifests | `gitops-operator` |
|
|
49
|
-
| Application code (Python, Node.js) | `
|
|
51
|
+
| Application code (Python, Node.js) | `developer` |
|
|
50
52
|
| gaia-ops modifications | `gaia` |
|
|
51
53
|
|
|
52
54
|
## Domain Errors
|
package/bin/README.md
CHANGED
package/bin/gaia-doctor.js
CHANGED
|
@@ -93,17 +93,27 @@ async function checkSettingsJson() {
|
|
|
93
93
|
const data = JSON.parse(await fs.readFile(path, 'utf-8'));
|
|
94
94
|
const issues = [];
|
|
95
95
|
|
|
96
|
-
// Check hooks are configured
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
// Check hooks are configured — hooks may live in settings.json OR
|
|
97
|
+
// settings.local.json (gaia-update/gaia-scan puts them in local).
|
|
98
|
+
let hooksConfig = data.hooks || null;
|
|
99
|
+
const localPath = join(CWD, '.claude', 'settings.local.json');
|
|
100
|
+
if (!hooksConfig && existsSync(localPath)) {
|
|
101
|
+
try {
|
|
102
|
+
const localData = JSON.parse(await fs.readFile(localPath, 'utf-8'));
|
|
103
|
+
if (localData.hooks) hooksConfig = localData.hooks;
|
|
104
|
+
} catch { /* ignore parse errors */ }
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!hooksConfig) {
|
|
108
|
+
issues.push('No hooks configured (check settings.json and settings.local.json)');
|
|
99
109
|
} else {
|
|
100
|
-
const hookTypes = Object.keys(
|
|
110
|
+
const hookTypes = Object.keys(hooksConfig);
|
|
101
111
|
if (!hookTypes.includes('PreToolUse')) issues.push('Missing PreToolUse hook');
|
|
102
112
|
if (!hookTypes.includes('PostToolUse')) issues.push('Missing PostToolUse hook');
|
|
103
113
|
}
|
|
104
114
|
|
|
105
115
|
// Check permissions — now live in settings.local.json (not settings.json)
|
|
106
|
-
|
|
116
|
+
// localPath already declared above for hooks check
|
|
107
117
|
let permCount = 0;
|
|
108
118
|
if (existsSync(localPath)) {
|
|
109
119
|
try {
|
|
@@ -125,7 +135,7 @@ async function checkSettingsJson() {
|
|
|
125
135
|
return { name: 'settings.json', ok: false, detail: issues.join('; '), fix: 'Run gaia-scan or npx gaia-update' };
|
|
126
136
|
}
|
|
127
137
|
|
|
128
|
-
const hookCount =
|
|
138
|
+
const hookCount = hooksConfig ? Object.keys(hooksConfig).length : 0;
|
|
129
139
|
return { name: 'settings.json', ok: true, detail: `${hookCount} hook types, ${permCount} rules` };
|
|
130
140
|
} catch {
|
|
131
141
|
return { name: 'settings.json', ok: false, detail: 'Invalid JSON', fix: 'Delete and run gaia-scan' };
|
|
@@ -28,12 +28,13 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
28
28
|
const __dirname = path.dirname(__filename);
|
|
29
29
|
const PACKAGE_ROOT = path.resolve(__dirname, "..");
|
|
30
30
|
|
|
31
|
-
const META_AGENTS = new Set(["gaia-system", "Explore", "Plan"]);
|
|
31
|
+
const META_AGENTS = new Set(["gaia-system", "gaia-orchestrator", "Explore", "Plan", "general-purpose", "claude-code-guide"]);
|
|
32
32
|
const CONTEXT_INJECTED_AGENTS = new Set([
|
|
33
|
+
"gaia-operator",
|
|
33
34
|
"terraform-architect",
|
|
34
35
|
"gitops-operator",
|
|
35
36
|
"cloud-troubleshooter",
|
|
36
|
-
"
|
|
37
|
+
"developer",
|
|
37
38
|
]);
|
|
38
39
|
const REQUIRED_PROJECT_SKILLS = ["agent-protocol", "context-updater"];
|
|
39
40
|
|
|
@@ -180,7 +181,9 @@ function resolveRuntimePaths(projectRoot) {
|
|
|
180
181
|
hooksDir: inProject && exists(path.join(claudeDir, "hooks"))
|
|
181
182
|
? path.join(claudeDir, "hooks")
|
|
182
183
|
: path.join(PACKAGE_ROOT, "hooks"),
|
|
183
|
-
settingsPath: path.join(claudeDir, "settings.json")
|
|
184
|
+
settingsPath: exists(path.join(claudeDir, "settings.json"))
|
|
185
|
+
? path.join(claudeDir, "settings.json")
|
|
186
|
+
: path.join(claudeDir, "settings.local.json"),
|
|
184
187
|
testsDir: path.join(PACKAGE_ROOT, "tests"),
|
|
185
188
|
};
|
|
186
189
|
|
|
@@ -477,12 +480,12 @@ function validateInjectionWiring(ctx, findings, checks) {
|
|
|
477
480
|
} else {
|
|
478
481
|
const content = readText(preToolUsePath);
|
|
479
482
|
|
|
480
|
-
if (!content.includes("
|
|
483
|
+
if (!content.includes("build_project_context")) {
|
|
481
484
|
addFinding(findings, {
|
|
482
485
|
severity: "high",
|
|
483
486
|
code: "CONTEXT_INJECTION_FUNCTION_MISSING",
|
|
484
487
|
title: "Context injection function missing",
|
|
485
|
-
detail: "
|
|
488
|
+
detail: "build_project_context() not found in pre_tool_use.py.",
|
|
486
489
|
evidence: preToolUsePath,
|
|
487
490
|
remediation: "Reintroduce or repair context injection handler.",
|
|
488
491
|
});
|
|
@@ -607,7 +610,12 @@ function validateRoutingContract(ctx, findings, checks) {
|
|
|
607
610
|
}
|
|
608
611
|
|
|
609
612
|
const content = readText(validatorPath);
|
|
610
|
-
|
|
613
|
+
// Try AVAILABLE_AGENTS first, then fall back to _BASE_AGENTS (used when
|
|
614
|
+
// AVAILABLE_AGENTS is derived via list comprehension)
|
|
615
|
+
let match = content.match(/AVAILABLE_AGENTS\s*=\s*\[(.*?)\]/s);
|
|
616
|
+
if (!match) {
|
|
617
|
+
match = content.match(/_BASE_AGENTS\s*=\s*\[(.*?)\]/s);
|
|
618
|
+
}
|
|
611
619
|
if (!match) {
|
|
612
620
|
addFinding(findings, {
|
|
613
621
|
severity: "medium",
|
|
@@ -615,7 +623,7 @@ function validateRoutingContract(ctx, findings, checks) {
|
|
|
615
623
|
title: "Could not parse AVAILABLE_AGENTS",
|
|
616
624
|
detail: "Routing contract check skipped.",
|
|
617
625
|
evidence: validatorPath,
|
|
618
|
-
remediation: "Keep AVAILABLE_AGENTS as a simple static list for validation tooling.",
|
|
626
|
+
remediation: "Keep AVAILABLE_AGENTS or _BASE_AGENTS as a simple static list for validation tooling.",
|
|
619
627
|
});
|
|
620
628
|
checks.push({ name: "routing-contract", ok: false, detail: "could not parse AVAILABLE_AGENTS" });
|
|
621
629
|
return;
|
|
@@ -626,7 +634,7 @@ function validateRoutingContract(ctx, findings, checks) {
|
|
|
626
634
|
);
|
|
627
635
|
|
|
628
636
|
const missingOnDisk = [...availableAgents].filter((agent) => !META_AGENTS.has(agent) && !agentsOnDisk.has(agent));
|
|
629
|
-
const missingInValidator = [...agentsOnDisk].filter((agent) => !availableAgents.has(agent));
|
|
637
|
+
const missingInValidator = [...agentsOnDisk].filter((agent) => !META_AGENTS.has(agent) && !availableAgents.has(agent));
|
|
630
638
|
|
|
631
639
|
if (missingOnDisk.length > 0) {
|
|
632
640
|
addFinding(findings, {
|
|
@@ -690,8 +698,8 @@ function detectLegacyGapPatterns(ctx, findings, checks) {
|
|
|
690
698
|
const conftestPath = path.join(testsDir, "conftest.py");
|
|
691
699
|
if (exists(conftestPath)) {
|
|
692
700
|
const content = readText(conftestPath);
|
|
693
|
-
// CLAUDE.md is no longer generated -- identity
|
|
694
|
-
// conftest.py fixture
|
|
701
|
+
// CLAUDE.md is no longer generated -- identity lives in agents/gaia-orchestrator.md.
|
|
702
|
+
// conftest.py fixture reads agents/gaia-orchestrator.md directly.
|
|
695
703
|
}
|
|
696
704
|
|
|
697
705
|
checks.push({
|
|
@@ -756,7 +764,7 @@ function runTestProbe(ctx, findings, checks) {
|
|
|
756
764
|
});
|
|
757
765
|
}
|
|
758
766
|
|
|
759
|
-
// CLAUDE.md is no longer required -- conftest.py
|
|
767
|
+
// CLAUDE.md is no longer required -- conftest.py reads agents/gaia-orchestrator.md
|
|
760
768
|
}
|
|
761
769
|
|
|
762
770
|
checks.push({
|