@jaguilar87/gaia-ops 4.5.0 → 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 +16 -14
- 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-history.js +0 -1
- package/bin/gaia-metrics.js +2 -2
- package/bin/gaia-scan.py +4 -0
- package/bin/gaia-skills-diagnose.js +19 -11
- package/bin/gaia-update.js +188 -32
- package/bin/pre-publish-validate.js +33 -10
- package/commands/gaia.md +37 -0
- package/commands/speckit.add-task.md +2 -2
- package/commands/speckit.tasks.md +1 -1
- package/config/README.md +3 -9
- package/config/cloud/aws.json +1 -1
- package/config/cloud/gcp.json +1 -1
- package/config/context-contracts.json +60 -16
- package/config/surface-routing.json +262 -27
- package/dist/gaia-ops/.claude-plugin/plugin.json +22 -0
- package/dist/gaia-ops/agents/cloud-troubleshooter.md +73 -0
- package/dist/gaia-ops/agents/developer.md +64 -0
- 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 +59 -0
- package/dist/gaia-ops/agents/gitops-operator.md +60 -0
- package/dist/gaia-ops/agents/speckit-planner.md +71 -0
- package/dist/gaia-ops/agents/terraform-architect.md +62 -0
- package/dist/gaia-ops/commands/gaia.md +37 -0
- package/dist/gaia-ops/config/README.md +58 -0
- package/dist/gaia-ops/config/cloud/aws.json +140 -0
- package/dist/gaia-ops/config/cloud/gcp.json +145 -0
- package/dist/gaia-ops/config/context-contracts.json +143 -0
- package/dist/gaia-ops/config/git_standards.json +72 -0
- package/dist/gaia-ops/config/surface-routing.json +424 -0
- package/dist/gaia-ops/config/universal-rules.json +10 -0
- package/dist/gaia-ops/hooks/adapters/__init__.py +52 -0
- package/dist/gaia-ops/hooks/adapters/base.py +219 -0
- package/dist/gaia-ops/hooks/adapters/channel.py +17 -0
- package/dist/gaia-ops/hooks/adapters/claude_code.py +1607 -0
- package/dist/gaia-ops/hooks/adapters/types.py +194 -0
- package/dist/gaia-ops/hooks/adapters/utils.py +25 -0
- package/{templates/settings.template.json → dist/gaia-ops/hooks/hooks.json} +15 -18
- package/dist/gaia-ops/hooks/modules/__init__.py +15 -0
- package/dist/gaia-ops/hooks/modules/agents/__init__.py +29 -0
- package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +647 -0
- package/dist/gaia-ops/hooks/modules/agents/response_contract.py +496 -0
- package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +124 -0
- package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +267 -0
- package/dist/gaia-ops/hooks/modules/agents/task_info_builder.py +74 -0
- package/dist/gaia-ops/hooks/modules/agents/transcript_analyzer.py +458 -0
- package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +152 -0
- package/dist/gaia-ops/hooks/modules/audit/__init__.py +28 -0
- package/dist/gaia-ops/hooks/modules/audit/event_detector.py +168 -0
- package/dist/gaia-ops/hooks/modules/audit/logger.py +131 -0
- package/dist/gaia-ops/hooks/modules/audit/metrics.py +134 -0
- package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +576 -0
- package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +296 -0
- package/dist/gaia-ops/hooks/modules/context/__init__.py +11 -0
- package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +317 -0
- package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +218 -0
- package/dist/gaia-ops/hooks/modules/context/context_freshness.py +145 -0
- package/dist/gaia-ops/hooks/modules/context/context_injector.py +427 -0
- package/dist/gaia-ops/hooks/modules/context/context_writer.py +530 -0
- package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +161 -0
- package/dist/gaia-ops/hooks/modules/core/__init__.py +40 -0
- package/dist/gaia-ops/hooks/modules/core/hook_entry.py +78 -0
- package/dist/gaia-ops/hooks/modules/core/paths.py +160 -0
- package/dist/gaia-ops/hooks/modules/core/plugin_mode.py +149 -0
- package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +576 -0
- package/dist/gaia-ops/hooks/modules/core/state.py +179 -0
- package/dist/gaia-ops/hooks/modules/core/stdin.py +24 -0
- package/dist/gaia-ops/hooks/modules/events/__init__.py +1 -0
- package/dist/gaia-ops/hooks/modules/events/event_writer.py +210 -0
- package/dist/gaia-ops/hooks/modules/memory/__init__.py +8 -0
- package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +227 -0
- package/dist/gaia-ops/hooks/modules/orchestrator/__init__.py +1 -0
- package/dist/gaia-ops/hooks/modules/orchestrator/delegate_mode.py +122 -0
- package/dist/gaia-ops/hooks/modules/scanning/__init__.py +8 -0
- package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +84 -0
- package/dist/gaia-ops/hooks/modules/security/__init__.py +89 -0
- package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +87 -0
- package/dist/gaia-ops/hooks/modules/security/approval_constants.py +23 -0
- package/dist/gaia-ops/hooks/modules/security/approval_grants.py +1069 -0
- package/dist/gaia-ops/hooks/modules/security/approval_messages.py +71 -0
- package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +164 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +602 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +87 -0
- package/dist/gaia-ops/hooks/modules/security/command_semantics.py +130 -0
- package/dist/gaia-ops/hooks/modules/security/gitops_validator.py +179 -0
- package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +852 -0
- package/dist/gaia-ops/hooks/modules/security/prompt_validator.py +40 -0
- package/dist/gaia-ops/hooks/modules/security/tiers.py +196 -0
- package/dist/gaia-ops/hooks/modules/session/__init__.py +10 -0
- package/dist/gaia-ops/hooks/modules/session/session_context_writer.py +100 -0
- package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +160 -0
- package/dist/gaia-ops/hooks/modules/session/session_manager.py +31 -0
- package/dist/gaia-ops/hooks/modules/tools/__init__.py +25 -0
- package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +829 -0
- package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +231 -0
- package/dist/gaia-ops/hooks/modules/tools/hook_response.py +55 -0
- package/dist/gaia-ops/hooks/modules/tools/shell_parser.py +227 -0
- package/dist/gaia-ops/hooks/modules/tools/task_validator.py +292 -0
- package/dist/gaia-ops/hooks/modules/validation/__init__.py +23 -0
- package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +380 -0
- package/dist/gaia-ops/hooks/post_compact.py +43 -0
- package/dist/gaia-ops/hooks/post_tool_use.py +54 -0
- package/dist/gaia-ops/hooks/pre_tool_use.py +383 -0
- package/dist/gaia-ops/hooks/session_start.py +69 -0
- package/dist/gaia-ops/hooks/stop_hook.py +69 -0
- package/dist/gaia-ops/hooks/subagent_start.py +71 -0
- package/dist/gaia-ops/hooks/subagent_stop.py +295 -0
- package/dist/gaia-ops/hooks/task_completed.py +70 -0
- package/dist/gaia-ops/hooks/user_prompt_submit.py +181 -0
- package/dist/gaia-ops/settings.json +72 -0
- package/dist/gaia-ops/skills/README.md +110 -0
- package/dist/gaia-ops/skills/agent-protocol/SKILL.md +93 -0
- package/dist/gaia-ops/skills/agent-protocol/examples.md +223 -0
- package/dist/gaia-ops/skills/agent-response/SKILL.md +66 -0
- package/dist/gaia-ops/skills/approval/SKILL.md +87 -0
- package/dist/gaia-ops/skills/approval/examples.md +140 -0
- package/dist/gaia-ops/skills/approval/reference.md +57 -0
- package/dist/gaia-ops/skills/command-execution/SKILL.md +64 -0
- package/dist/gaia-ops/skills/command-execution/reference.md +83 -0
- package/dist/gaia-ops/skills/context-updater/SKILL.md +82 -0
- package/dist/gaia-ops/skills/context-updater/examples.md +71 -0
- package/dist/gaia-ops/skills/developer-patterns/SKILL.md +50 -0
- package/dist/gaia-ops/skills/developer-patterns/reference.md +112 -0
- package/dist/gaia-ops/skills/execution/SKILL.md +67 -0
- package/dist/gaia-ops/skills/fast-queries/SKILL.md +43 -0
- package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +94 -0
- package/dist/gaia-ops/skills/gaia-patterns/reference.md +374 -0
- 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 +50 -0
- package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +60 -0
- package/dist/gaia-ops/skills/gitops-patterns/reference.md +183 -0
- 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 +100 -0
- package/dist/gaia-ops/skills/memory-management/SKILL.md +65 -0
- package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +108 -0
- package/dist/gaia-ops/skills/reference.md +134 -0
- package/dist/gaia-ops/skills/security-tiers/SKILL.md +61 -0
- package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +623 -0
- package/dist/gaia-ops/skills/security-tiers/reference.md +39 -0
- package/dist/gaia-ops/skills/skill-creation/SKILL.md +145 -0
- package/dist/gaia-ops/skills/specification/SKILL.md +106 -0
- package/dist/gaia-ops/skills/speckit-workflow/SKILL.md +119 -0
- package/dist/gaia-ops/skills/speckit-workflow/reference.md +117 -0
- package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +89 -0
- package/dist/gaia-ops/skills/terraform-patterns/reference.md +93 -0
- package/dist/gaia-ops/speckit/README.md +516 -0
- package/dist/gaia-ops/speckit/templates/adr-template.md +118 -0
- package/dist/gaia-ops/speckit/templates/agent-file-template.md +23 -0
- package/dist/gaia-ops/speckit/templates/plan-template.md +227 -0
- package/dist/gaia-ops/speckit/templates/spec-template.md +140 -0
- package/dist/gaia-ops/speckit/templates/tasks-template.md +257 -0
- package/dist/gaia-ops/tools/context/README.md +132 -0
- package/dist/gaia-ops/tools/context/__init__.py +42 -0
- package/dist/gaia-ops/tools/context/_paths.py +20 -0
- package/dist/gaia-ops/tools/context/context_provider.py +476 -0
- package/dist/gaia-ops/tools/context/context_section_reader.py +342 -0
- package/dist/gaia-ops/tools/context/deep_merge.py +159 -0
- package/dist/gaia-ops/tools/context/pending_updates.py +760 -0
- package/dist/gaia-ops/tools/context/surface_router.py +278 -0
- package/dist/gaia-ops/tools/fast-queries/README.md +65 -0
- package/dist/gaia-ops/tools/fast-queries/__init__.py +30 -0
- package/dist/gaia-ops/tools/fast-queries/appservices/quicktriage_devops_developer.sh +75 -0
- package/dist/gaia-ops/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +32 -0
- package/dist/gaia-ops/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +88 -0
- package/dist/gaia-ops/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +48 -0
- package/dist/gaia-ops/tools/fast-queries/run_triage.sh +59 -0
- package/dist/gaia-ops/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +80 -0
- package/dist/gaia-ops/tools/gaia_simulator/__init__.py +33 -0
- package/dist/gaia-ops/tools/gaia_simulator/cli.py +354 -0
- package/dist/gaia-ops/tools/gaia_simulator/extractor.py +457 -0
- package/dist/gaia-ops/tools/gaia_simulator/reporter.py +258 -0
- package/dist/gaia-ops/tools/gaia_simulator/routing_simulator.py +334 -0
- package/dist/gaia-ops/tools/gaia_simulator/runner.py +539 -0
- package/dist/gaia-ops/tools/gaia_simulator/skills_mapper.py +262 -0
- package/dist/gaia-ops/tools/memory/README.md +0 -0
- package/dist/gaia-ops/tools/memory/__init__.py +20 -0
- package/dist/gaia-ops/tools/memory/episodic.py +1196 -0
- package/dist/gaia-ops/tools/persist_transcript_analysis.py +85 -0
- package/dist/gaia-ops/tools/review/__init__.py +1 -0
- package/dist/gaia-ops/tools/review/review_engine.py +157 -0
- package/dist/gaia-ops/tools/scan/__init__.py +35 -0
- package/dist/gaia-ops/tools/scan/config.py +247 -0
- package/dist/gaia-ops/tools/scan/merge.py +212 -0
- package/dist/gaia-ops/tools/scan/orchestrator.py +549 -0
- package/dist/gaia-ops/tools/scan/registry.py +127 -0
- package/dist/gaia-ops/tools/scan/scanners/__init__.py +18 -0
- package/dist/gaia-ops/tools/scan/scanners/base.py +137 -0
- package/dist/gaia-ops/tools/scan/scanners/environment.py +324 -0
- package/dist/gaia-ops/tools/scan/scanners/git.py +570 -0
- package/dist/gaia-ops/tools/scan/scanners/infrastructure.py +875 -0
- package/dist/gaia-ops/tools/scan/scanners/orchestration.py +600 -0
- package/dist/gaia-ops/tools/scan/scanners/stack.py +1085 -0
- package/dist/gaia-ops/tools/scan/scanners/tools.py +260 -0
- package/dist/gaia-ops/tools/scan/setup.py +752 -0
- package/dist/gaia-ops/tools/scan/tests/__init__.py +1 -0
- package/dist/gaia-ops/tools/scan/tests/conftest.py +796 -0
- package/dist/gaia-ops/tools/scan/tests/test_environment.py +323 -0
- package/dist/gaia-ops/tools/scan/tests/test_git.py +419 -0
- package/dist/gaia-ops/tools/scan/tests/test_infrastructure.py +382 -0
- package/dist/gaia-ops/tools/scan/tests/test_integration.py +920 -0
- package/dist/gaia-ops/tools/scan/tests/test_merge.py +269 -0
- package/dist/gaia-ops/tools/scan/tests/test_orchestration.py +304 -0
- package/dist/gaia-ops/tools/scan/tests/test_stack.py +604 -0
- package/dist/gaia-ops/tools/scan/tests/test_tools.py +349 -0
- package/dist/gaia-ops/tools/scan/ui.py +624 -0
- package/dist/gaia-ops/tools/scan/verify.py +266 -0
- package/dist/gaia-ops/tools/scan/walk.py +118 -0
- package/dist/gaia-ops/tools/scan/workspace.py +85 -0
- package/dist/gaia-ops/tools/validation/README.md +244 -0
- package/dist/gaia-ops/tools/validation/__init__.py +17 -0
- package/dist/gaia-ops/tools/validation/approval_gate.py +321 -0
- package/dist/gaia-ops/tools/validation/validate_skills.py +189 -0
- package/dist/gaia-security/.claude-plugin/plugin.json +22 -0
- package/dist/gaia-security/config/universal-rules.json +10 -0
- package/dist/gaia-security/hooks/adapters/__init__.py +52 -0
- package/dist/gaia-security/hooks/adapters/base.py +219 -0
- package/dist/gaia-security/hooks/adapters/channel.py +17 -0
- package/dist/gaia-security/hooks/adapters/claude_code.py +1607 -0
- package/dist/gaia-security/hooks/adapters/types.py +194 -0
- package/dist/gaia-security/hooks/adapters/utils.py +25 -0
- package/dist/gaia-security/hooks/hooks.json +57 -0
- package/dist/gaia-security/hooks/modules/__init__.py +15 -0
- package/dist/gaia-security/hooks/modules/agents/__init__.py +29 -0
- package/dist/gaia-security/hooks/modules/agents/contract_validator.py +647 -0
- package/dist/gaia-security/hooks/modules/agents/response_contract.py +496 -0
- package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +124 -0
- package/dist/gaia-security/hooks/modules/agents/state_tracker.py +267 -0
- package/dist/gaia-security/hooks/modules/agents/task_info_builder.py +74 -0
- package/dist/gaia-security/hooks/modules/agents/transcript_analyzer.py +458 -0
- package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +152 -0
- package/dist/gaia-security/hooks/modules/audit/__init__.py +28 -0
- package/dist/gaia-security/hooks/modules/audit/event_detector.py +168 -0
- package/dist/gaia-security/hooks/modules/audit/logger.py +131 -0
- package/dist/gaia-security/hooks/modules/audit/metrics.py +134 -0
- package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +576 -0
- package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +296 -0
- package/dist/gaia-security/hooks/modules/context/__init__.py +11 -0
- package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +317 -0
- package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +218 -0
- package/dist/gaia-security/hooks/modules/context/context_freshness.py +145 -0
- package/dist/gaia-security/hooks/modules/context/context_injector.py +427 -0
- package/dist/gaia-security/hooks/modules/context/context_writer.py +530 -0
- package/dist/gaia-security/hooks/modules/context/contracts_loader.py +161 -0
- package/dist/gaia-security/hooks/modules/core/__init__.py +40 -0
- package/dist/gaia-security/hooks/modules/core/hook_entry.py +78 -0
- package/dist/gaia-security/hooks/modules/core/paths.py +160 -0
- package/dist/gaia-security/hooks/modules/core/plugin_mode.py +149 -0
- package/dist/gaia-security/hooks/modules/core/plugin_setup.py +576 -0
- package/dist/gaia-security/hooks/modules/core/state.py +179 -0
- package/dist/gaia-security/hooks/modules/core/stdin.py +24 -0
- package/dist/gaia-security/hooks/modules/events/__init__.py +1 -0
- package/dist/gaia-security/hooks/modules/events/event_writer.py +210 -0
- package/dist/gaia-security/hooks/modules/memory/__init__.py +8 -0
- package/dist/gaia-security/hooks/modules/memory/episode_writer.py +227 -0
- package/dist/gaia-security/hooks/modules/orchestrator/__init__.py +1 -0
- package/dist/gaia-security/hooks/modules/orchestrator/delegate_mode.py +122 -0
- package/dist/gaia-security/hooks/modules/scanning/__init__.py +8 -0
- package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +84 -0
- package/dist/gaia-security/hooks/modules/security/__init__.py +89 -0
- package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +87 -0
- package/dist/gaia-security/hooks/modules/security/approval_constants.py +23 -0
- package/dist/gaia-security/hooks/modules/security/approval_grants.py +1069 -0
- package/dist/gaia-security/hooks/modules/security/approval_messages.py +71 -0
- package/dist/gaia-security/hooks/modules/security/approval_scopes.py +164 -0
- package/dist/gaia-security/hooks/modules/security/blocked_commands.py +602 -0
- package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +87 -0
- package/dist/gaia-security/hooks/modules/security/command_semantics.py +130 -0
- package/dist/gaia-security/hooks/modules/security/gitops_validator.py +179 -0
- package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +852 -0
- package/dist/gaia-security/hooks/modules/security/prompt_validator.py +40 -0
- package/dist/gaia-security/hooks/modules/security/tiers.py +196 -0
- package/dist/gaia-security/hooks/modules/session/__init__.py +10 -0
- package/dist/gaia-security/hooks/modules/session/session_context_writer.py +100 -0
- package/dist/gaia-security/hooks/modules/session/session_event_injector.py +160 -0
- package/dist/gaia-security/hooks/modules/session/session_manager.py +31 -0
- package/dist/gaia-security/hooks/modules/tools/__init__.py +25 -0
- package/dist/gaia-security/hooks/modules/tools/bash_validator.py +829 -0
- package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +231 -0
- package/dist/gaia-security/hooks/modules/tools/hook_response.py +55 -0
- package/dist/gaia-security/hooks/modules/tools/shell_parser.py +227 -0
- package/dist/gaia-security/hooks/modules/tools/task_validator.py +292 -0
- package/dist/gaia-security/hooks/modules/validation/__init__.py +23 -0
- package/dist/gaia-security/hooks/modules/validation/commit_validator.py +380 -0
- package/dist/gaia-security/hooks/post_tool_use.py +54 -0
- package/dist/gaia-security/hooks/pre_tool_use.py +383 -0
- package/dist/gaia-security/hooks/session_start.py +69 -0
- package/dist/gaia-security/hooks/stop_hook.py +69 -0
- package/dist/gaia-security/hooks/user_prompt_submit.py +181 -0
- package/dist/gaia-security/settings.json +58 -0
- package/hooks/README.md +3 -2
- package/hooks/adapters/channel.py +0 -25
- package/hooks/adapters/claude_code.py +494 -125
- package/hooks/elicitation_result.py +133 -0
- package/hooks/hooks.json +10 -1
- package/hooks/modules/README.md +1 -1
- package/hooks/modules/agents/contract_validator.py +3 -51
- package/hooks/modules/agents/response_contract.py +4 -8
- package/hooks/modules/agents/state_tracker.py +267 -0
- package/hooks/modules/agents/transcript_reader.py +4 -5
- package/hooks/modules/audit/__init__.py +4 -6
- package/hooks/modules/audit/event_detector.py +0 -2
- package/hooks/modules/audit/metrics.py +108 -187
- package/hooks/modules/audit/workflow_auditor.py +0 -4
- package/hooks/modules/audit/workflow_recorder.py +0 -5
- package/hooks/modules/context/compact_context_builder.py +8 -5
- package/hooks/modules/context/context_injector.py +18 -40
- package/hooks/modules/context/context_writer.py +14 -26
- package/hooks/modules/context/contracts_loader.py +8 -11
- package/hooks/modules/core/paths.py +12 -13
- package/hooks/modules/core/plugin_setup.py +127 -2
- package/hooks/modules/events/__init__.py +1 -0
- package/hooks/modules/events/event_writer.py +210 -0
- package/hooks/modules/memory/episode_writer.py +1 -6
- package/hooks/modules/orchestrator/__init__.py +1 -0
- package/hooks/modules/orchestrator/delegate_mode.py +122 -0
- package/hooks/modules/security/__init__.py +2 -4
- package/hooks/modules/security/approval_constants.py +5 -1
- package/hooks/modules/security/approval_grants.py +350 -10
- package/hooks/modules/security/approval_messages.py +0 -2
- package/hooks/modules/security/approval_scopes.py +14 -3
- package/hooks/modules/security/blocked_commands.py +20 -34
- package/hooks/modules/security/blocked_message_formatter.py +8 -7
- package/hooks/modules/security/command_semantics.py +0 -4
- package/hooks/modules/security/gitops_validator.py +1 -11
- package/hooks/modules/security/mutative_verbs.py +185 -42
- package/hooks/modules/security/tiers.py +0 -19
- package/hooks/modules/session/session_event_injector.py +4 -27
- package/hooks/modules/tools/bash_validator.py +354 -105
- package/hooks/modules/tools/cloud_pipe_validator.py +59 -9
- package/hooks/modules/tools/shell_parser.py +0 -1
- package/hooks/modules/tools/task_validator.py +22 -33
- package/hooks/post_tool_use.py +0 -72
- package/hooks/pre_tool_use.py +38 -88
- package/hooks/subagent_start.py +6 -2
- package/hooks/subagent_stop.py +9 -14
- package/hooks/user_prompt_submit.py +100 -8
- package/index.js +1 -1
- package/package.json +3 -5
- package/pyproject.toml +1 -1
- package/skills/README.md +7 -8
- package/skills/agent-protocol/SKILL.md +32 -43
- package/skills/agent-protocol/examples.md +66 -13
- package/skills/agent-response/SKILL.md +27 -17
- package/skills/approval/SKILL.md +33 -16
- package/skills/approval/reference.md +2 -2
- 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 +6 -5
- 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 +59 -43
- package/skills/security-tiers/SKILL.md +1 -1
- 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 +3 -13
- 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/gaia_simulator/runner.py +34 -1
- package/tools/scan/orchestrator.py +13 -0
- package/tools/scan/scanners/base.py +8 -0
- package/tools/scan/scanners/git.py +78 -0
- package/tools/scan/scanners/infrastructure.py +65 -0
- package/tools/scan/scanners/stack.py +110 -0
- package/tools/scan/setup.py +121 -15
- 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/tools/scan/workspace.py +85 -0
- package/config/context-contracts.aws.json +0 -42
- package/config/context-contracts.gcp.json +0 -39
- package/hooks/modules/identity/identity_provider.py +0 -21
- package/hooks/modules/identity/ops_identity.py +0 -38
- package/hooks/modules/identity/security_identity.py +0 -10
- package/skills/project-dispatch/SKILL.md +0 -34
- /package/{hooks/modules/identity/__init__.py → dist/gaia-ops/speckit/scripts/.gitkeep} +0 -0
|
@@ -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,10 @@ 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
|
+
| Skills loaded on-demand: agent-response
|
|
29
30
|
v
|
|
30
31
|
Orchestrator dispatches to agent
|
|
31
32
|
| Routes by surface classification
|
|
@@ -49,7 +50,7 @@ subagent_stop.py (SubagentStop hook)
|
|
|
49
50
|
v
|
|
50
51
|
Orchestrator processes json:contract (via agent-response skill)
|
|
51
52
|
| COMPLETE -> summarize to user
|
|
52
|
-
|
|
|
53
|
+
| REVIEW (with approval_id) -> get approval -> resume via SendMessage
|
|
53
54
|
| NEEDS_INPUT -> ask user -> resume via SendMessage
|
|
54
55
|
| BLOCKED -> report blocker
|
|
55
56
|
```
|
|
@@ -119,9 +120,10 @@ Classifies user tasks into surfaces using signal matching against `config/surfac
|
|
|
119
120
|
| `live_runtime` | cloud-troubleshooter | pods, services, logs, kubectl, gcloud |
|
|
120
121
|
| `gitops_desired_state` | gitops-operator | manifests, Flux, Helm, Kustomize |
|
|
121
122
|
| `terraform_iac` | terraform-architect | Terraform, Terragrunt, IAM, modules |
|
|
122
|
-
| `app_ci_tooling` |
|
|
123
|
+
| `app_ci_tooling` | developer | CI/CD, Docker, package tooling |
|
|
123
124
|
| `planning_specs` | speckit-planner | specs, plans, task breakdowns |
|
|
124
125
|
| `gaia_system` | gaia | hooks, skills, agents/, CLAUDE.md |
|
|
126
|
+
| `workspace` | gaia-operator | memory, email, schedules, file transfers |
|
|
125
127
|
|
|
126
128
|
**Classification algorithm:**
|
|
127
129
|
1. Normalize task text
|
|
@@ -170,7 +172,7 @@ Nonce-based T3 approval lifecycle:
|
|
|
170
172
|
3. BashValidator generates 128-bit nonce via generate_nonce()
|
|
171
173
|
4. write_pending_approval() saves pending-{nonce}.json to .claude/cache/approvals/
|
|
172
174
|
5. Hook returns corrective deny (exit 0) with NONCE:{hex} in message
|
|
173
|
-
6. Agent includes NONCE:{hex} in
|
|
175
|
+
6. Agent includes NONCE:{hex} in REVIEW status to orchestrator
|
|
174
176
|
7. Orchestrator presents plan to user, asks for approval
|
|
175
177
|
8. User approves -> orchestrator resumes agent with "APPROVE:{nonce}"
|
|
176
178
|
9. pre_tool_use.py detects APPROVE: prefix, calls activate_pending_approval()
|
|
@@ -182,7 +184,7 @@ Nonce-based T3 approval lifecycle:
|
|
|
182
184
|
|
|
183
185
|
Every agent response must end with a `json:contract` block containing `agent_status`. The contract validator (`hooks/modules/agents/contract_validator.py`) enforces:
|
|
184
186
|
|
|
185
|
-
- **AGENT_STATUS**: PLAN_STATUS (from
|
|
187
|
+
- **AGENT_STATUS**: PLAN_STATUS (from 5 valid states: COMPLETE, NEEDS_INPUT, REVIEW, BLOCKED, IN_PROGRESS), PENDING_STEPS, NEXT_ACTION, AGENT_ID
|
|
186
188
|
- **EVIDENCE_REPORT**: required for all valid states. Seven fields: PATTERNS_CHECKED, FILES_CHECKED, COMMANDS_RUN, KEY_OUTPUTS, VERBATIM_OUTPUTS, CROSS_LAYER_IMPACTS, OPEN_GAPS
|
|
187
189
|
- **CONSOLIDATION_REPORT**: required when multi-surface or cross-check. Fields: OWNERSHIP_ASSESSMENT (enum), CONFIRMED_FINDINGS, SUSPECTED_FINDINGS, CONFLICTS, OPEN_GAPS, NEXT_BEST_AGENT
|
|
188
190
|
|
|
@@ -256,14 +258,14 @@ The adapter layer connects Claude Code's hook protocol to gaia-ops business logi
|
|
|
256
258
|
| **Adapter methods called** | `ClaudeCodeAdapter.format_validation_response()` |
|
|
257
259
|
| **Business logic modules** | None (pure formatting bridge) |
|
|
258
260
|
|
|
259
|
-
### CP-5: `
|
|
261
|
+
### CP-5: `hooks/hooks.json` -- Hook Configuration
|
|
260
262
|
|
|
261
263
|
| Attribute | Value |
|
|
262
264
|
|-----------|-------|
|
|
263
|
-
| **File (npm channel)** | `templates/settings.template.json` -- paths use `.claude/hooks/` prefix |
|
|
264
265
|
| **File (plugin channel)** | `hooks/hooks.json` -- paths use `${CLAUDE_PLUGIN_ROOT}/hooks/` prefix |
|
|
266
|
+
| **File (npm channel)** | `hooks/hooks.json` (symlinked into `.claude/hooks/`) |
|
|
265
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). |
|
|
266
|
-
| **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) |
|
|
267
269
|
|
|
268
270
|
### HookAdapter ABC Contract
|
|
269
271
|
|
|
@@ -292,7 +294,7 @@ To add support for a new Claude Code hook event (e.g., a future `PreCompact` eve
|
|
|
292
294
|
2. **Add adapter method** to `ClaudeCodeAdapter` in `hooks/adapters/claude_code.py` -- implement `adapt_<event_name>(raw: dict) -> <ResultType>` and the corresponding `format_<result>_response()` if a new result type is needed.
|
|
293
295
|
3. **Add extract/format methods** for the event type -- the extract method pulls typed data from the raw payload, the format method builds the CLI response JSON.
|
|
294
296
|
4. **Create hook script entry point** -- a new `hooks/<event_name>.py` file that reads stdin, calls `adapter.parse_event()`, delegates to business logic, and writes the response to stdout.
|
|
295
|
-
5. **Add entry to `hooks/hooks.json`**
|
|
297
|
+
5. **Add entry to `hooks/hooks.json`** mapping the event name to the new script.
|
|
296
298
|
|
|
297
299
|
**Zero changes to business logic modules required.** The adapter is the only layer that touches CLI-specific JSON.
|
|
298
300
|
|
|
@@ -310,8 +312,8 @@ To support a CLI other than Claude Code (e.g., a hypothetical Cursor or Windsurf
|
|
|
310
312
|
|
|
311
313
|
| File | Purpose |
|
|
312
314
|
|------|---------|
|
|
313
|
-
| `
|
|
314
|
-
| `
|
|
315
|
+
| `agents/gaia-orchestrator.md` | Orchestrator identity and routing (activated via settings.json agent config) |
|
|
316
|
+
| `config/surface-routing.json` | Surface routing config (agent table, signals, dispatch) |
|
|
315
317
|
| `skills/agent-response/SKILL.md` | Contract status handling protocol (on-demand) |
|
|
316
318
|
| `hooks/pre_tool_use.py` | PreToolUse hook entry point |
|
|
317
319
|
| `hooks/subagent_stop.py` | SubagentStop 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' };
|
package/bin/gaia-history.js
CHANGED
|
@@ -125,7 +125,6 @@ function colorStatus(status) {
|
|
|
125
125
|
if (s === 'NEEDS_INPUT') return chalk.yellow(s.padEnd(8));
|
|
126
126
|
if (s === 'IN_PROGRESS') return chalk.cyan(s.padEnd(8));
|
|
127
127
|
if (s === 'REVIEW') return chalk.magenta(s.padEnd(8));
|
|
128
|
-
if (s === 'AWAITING_APPROVAL') return chalk.yellow(s.padEnd(8));
|
|
129
128
|
return chalk.gray(s.padEnd(8));
|
|
130
129
|
}
|
|
131
130
|
|
package/bin/gaia-metrics.js
CHANGED
|
@@ -450,7 +450,7 @@ function calculateAgentInvocations(workflowMetrics) {
|
|
|
450
450
|
|
|
451
451
|
/**
|
|
452
452
|
* Agent outcome distribution from plan_status field.
|
|
453
|
-
* Counts COMPLETE, BLOCKED, NEEDS_INPUT, IN_PROGRESS, REVIEW,
|
|
453
|
+
* Counts COMPLETE, BLOCKED, NEEDS_INPUT, IN_PROGRESS, REVIEW, and others.
|
|
454
454
|
* Returns null if no entries have the plan_status field (older data).
|
|
455
455
|
*/
|
|
456
456
|
function calculateAgentOutcomes(workflowMetrics) {
|
|
@@ -874,7 +874,7 @@ function displayMetrics(
|
|
|
874
874
|
// ── Agent Outcomes ───────────────────────────────────
|
|
875
875
|
if (agentOutcomes) {
|
|
876
876
|
console.log(chalk.bold(`\n📋 Agent Outcomes (${agentOutcomes.total} sessions with status)`));
|
|
877
|
-
const outcomeColor = { COMPLETE: chalk.green, BLOCKED: chalk.red, NEEDS_INPUT: chalk.yellow, IN_PROGRESS: chalk.cyan, REVIEW: chalk.magenta
|
|
877
|
+
const outcomeColor = { COMPLETE: chalk.green, BLOCKED: chalk.red, NEEDS_INPUT: chalk.yellow, IN_PROGRESS: chalk.cyan, REVIEW: chalk.magenta };
|
|
878
878
|
for (const { status, count, percentage } of agentOutcomes.distribution) {
|
|
879
879
|
const bar = makeBar(percentage, 10);
|
|
880
880
|
const pct = percentage.toFixed(1).padStart(5);
|
package/bin/gaia-scan.py
CHANGED
|
@@ -205,6 +205,7 @@ def _mode_fresh(project_root: Path, scan_config: ScanConfig, args) -> int:
|
|
|
205
205
|
generate_governance,
|
|
206
206
|
generate_project_context,
|
|
207
207
|
install_git_hooks,
|
|
208
|
+
merge_hooks_to_settings_local,
|
|
208
209
|
)
|
|
209
210
|
from tools.scan.ui import (
|
|
210
211
|
RailUI,
|
|
@@ -246,6 +247,7 @@ def _mode_fresh(project_root: Path, scan_config: ScanConfig, args) -> int:
|
|
|
246
247
|
create_claude_directory(project_root)
|
|
247
248
|
copy_claude_md(project_root)
|
|
248
249
|
copy_settings_json(project_root)
|
|
250
|
+
merge_hooks_to_settings_local(project_root)
|
|
249
251
|
install_git_hooks(project_root)
|
|
250
252
|
generate_project_context(project_root, config, scan_context=output.context)
|
|
251
253
|
generate_governance(project_root, config)
|
|
@@ -287,6 +289,7 @@ def _mode_existing(project_root: Path, scan_config: ScanConfig, args) -> int:
|
|
|
287
289
|
copy_settings_json,
|
|
288
290
|
create_claude_directory,
|
|
289
291
|
install_git_hooks,
|
|
292
|
+
merge_hooks_to_settings_local,
|
|
290
293
|
)
|
|
291
294
|
from tools.scan.ui import (
|
|
292
295
|
RailUI,
|
|
@@ -317,6 +320,7 @@ def _mode_existing(project_root: Path, scan_config: ScanConfig, args) -> int:
|
|
|
317
320
|
# Step 4: SYNC
|
|
318
321
|
copy_claude_md(project_root)
|
|
319
322
|
copy_settings_json(project_root)
|
|
323
|
+
merge_hooks_to_settings_local(project_root)
|
|
320
324
|
create_claude_directory(project_root)
|
|
321
325
|
install_git_hooks(project_root)
|
|
322
326
|
|