@jaguilar87/gaia-ops 4.4.0 → 4.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +12 -3
- package/ARCHITECTURE.md +9 -8
- package/CHANGELOG.md +34 -0
- package/README.md +43 -11
- package/agents/terraform-architect.md +1 -1
- package/bin/README.md +2 -2
- package/bin/gaia-doctor.js +18 -5
- package/bin/gaia-history.js +0 -1
- package/bin/gaia-metrics.js +2 -2
- package/bin/gaia-scan.py +23 -1
- package/bin/gaia-update.js +346 -54
- package/bin/pre-publish-validate.js +33 -10
- package/commands/gaia.md +37 -0
- package/config/README.md +3 -9
- package/config/context-contracts.json +47 -15
- package/config/surface-routing.json +9 -1
- 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/devops-developer.md +57 -0
- package/dist/gaia-ops/agents/gaia-system.md +58 -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 +60 -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 +131 -0
- package/dist/gaia-ops/config/git_standards.json +72 -0
- package/dist/gaia-ops/config/surface-routing.json +197 -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 +1477 -0
- package/dist/gaia-ops/hooks/adapters/types.py +194 -0
- package/dist/gaia-ops/hooks/adapters/utils.py +25 -0
- package/dist/gaia-ops/hooks/hooks.json +126 -0
- 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/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 +215 -0
- package/dist/gaia-ops/hooks/modules/context/context_cache.py +129 -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 +518 -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 +558 -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/identity/__init__.py +0 -0
- package/dist/gaia-ops/hooks/modules/identity/identity_provider.py +21 -0
- package/dist/gaia-ops/hooks/modules/identity/ops_identity.py +34 -0
- package/dist/gaia-ops/hooks/modules/identity/security_identity.py +10 -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 +128 -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 +912 -0
- package/dist/gaia-ops/hooks/modules/security/approval_messages.py +71 -0
- package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +153 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +584 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +86 -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 +850 -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 +158 -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 +708 -0
- package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +181 -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 +283 -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 +288 -0
- package/dist/gaia-ops/hooks/task_completed.py +70 -0
- package/dist/gaia-ops/hooks/user_prompt_submit.py +177 -0
- package/dist/gaia-ops/settings.json +72 -0
- package/dist/gaia-ops/skills/README.md +109 -0
- package/dist/gaia-ops/skills/agent-protocol/SKILL.md +105 -0
- package/dist/gaia-ops/skills/agent-protocol/examples.md +170 -0
- package/dist/gaia-ops/skills/agent-response/SKILL.md +53 -0
- package/dist/gaia-ops/skills/approval/SKILL.md +85 -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 +76 -0
- package/dist/gaia-ops/skills/context-updater/examples.md +71 -0
- package/dist/gaia-ops/skills/developer-patterns/SKILL.md +93 -0
- package/dist/gaia-ops/skills/developer-patterns/reference.md +112 -0
- package/dist/gaia-ops/skills/execution/SKILL.md +66 -0
- package/dist/gaia-ops/skills/fast-queries/SKILL.md +47 -0
- package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +92 -0
- package/dist/gaia-ops/skills/gaia-patterns/reference.md +22 -0
- package/dist/gaia-ops/skills/git-conventions/SKILL.md +48 -0
- package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +73 -0
- package/dist/gaia-ops/skills/gitops-patterns/reference.md +183 -0
- package/dist/gaia-ops/skills/investigation/SKILL.md +77 -0
- package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +64 -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 +119 -0
- package/dist/gaia-ops/skills/specification/SKILL.md +186 -0
- package/dist/gaia-ops/skills/speckit-workflow/SKILL.md +165 -0
- package/dist/gaia-ops/skills/speckit-workflow/reference.md +117 -0
- package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +63 -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/scripts/.gitkeep +0 -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 +330 -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 +753 -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 +1477 -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/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 +215 -0
- package/dist/gaia-security/hooks/modules/context/context_cache.py +129 -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 +518 -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 +558 -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/identity/__init__.py +0 -0
- package/dist/gaia-security/hooks/modules/identity/identity_provider.py +21 -0
- package/dist/gaia-security/hooks/modules/identity/ops_identity.py +34 -0
- package/dist/gaia-security/hooks/modules/identity/security_identity.py +10 -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 +128 -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 +912 -0
- package/dist/gaia-security/hooks/modules/security/approval_messages.py +71 -0
- package/dist/gaia-security/hooks/modules/security/approval_scopes.py +153 -0
- package/dist/gaia-security/hooks/modules/security/blocked_commands.py +584 -0
- package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +86 -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 +850 -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 +158 -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 +708 -0
- package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +181 -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 +283 -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 +177 -0
- package/dist/gaia-security/settings.json +58 -0
- package/git-hooks/commit-msg +41 -0
- package/hooks/README.md +8 -6
- package/hooks/adapters/channel.py +0 -25
- package/hooks/adapters/claude_code.py +364 -125
- package/hooks/elicitation_result.py +132 -0
- package/hooks/hooks.json +10 -1
- package/hooks/modules/README.md +3 -2
- package/hooks/modules/agents/contract_validator.py +3 -51
- package/hooks/modules/agents/response_contract.py +4 -8
- 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 +1 -0
- package/hooks/modules/context/context_cache.py +129 -0
- package/hooks/modules/context/context_injector.py +18 -40
- package/hooks/modules/context/context_writer.py +1 -25
- package/hooks/modules/context/contracts_loader.py +7 -10
- package/hooks/modules/core/hook_entry.py +1 -0
- package/hooks/modules/core/paths.py +12 -13
- package/hooks/modules/core/plugin_mode.py +74 -4
- package/hooks/modules/core/plugin_setup.py +395 -23
- package/hooks/modules/events/__init__.py +1 -0
- package/hooks/modules/events/event_writer.py +210 -0
- package/hooks/modules/identity/ops_identity.py +18 -27
- package/hooks/modules/memory/episode_writer.py +1 -6
- package/hooks/modules/orchestrator/__init__.py +1 -0
- package/hooks/modules/orchestrator/delegate_mode.py +128 -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 +189 -6
- package/hooks/modules/security/approval_messages.py +9 -21
- package/hooks/modules/security/blocked_commands.py +98 -34
- 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 +179 -38
- package/hooks/modules/security/tiers.py +1 -19
- package/hooks/modules/session/session_event_injector.py +1 -25
- package/hooks/modules/tools/bash_validator.py +310 -94
- package/hooks/modules/tools/shell_parser.py +0 -1
- package/hooks/modules/tools/task_validator.py +9 -29
- package/hooks/post_tool_use.py +0 -72
- package/hooks/pre_tool_use.py +42 -102
- package/hooks/session_start.py +4 -2
- package/hooks/subagent_start.py +6 -2
- package/hooks/subagent_stop.py +1 -13
- package/hooks/user_prompt_submit.py +119 -37
- package/index.js +1 -1
- package/package.json +5 -3
- package/skills/README.md +3 -5
- package/skills/agent-protocol/SKILL.md +17 -16
- package/skills/agent-protocol/examples.md +6 -6
- package/skills/agent-response/SKILL.md +11 -14
- package/skills/approval/SKILL.md +28 -13
- package/skills/approval/reference.md +2 -2
- package/skills/execution/SKILL.md +1 -1
- package/skills/gaia-patterns/SKILL.md +2 -3
- package/skills/orchestrator-approval/SKILL.md +22 -50
- package/skills/security-tiers/SKILL.md +1 -1
- package/templates/README.md +9 -9
- package/templates/managed-settings.template.json +43 -0
- 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 +120 -13
- package/tools/scan/workspace.py +85 -0
- package/config/context-contracts.aws.json +0 -42
- package/config/context-contracts.gcp.json +0 -39
- package/skills/project-dispatch/SKILL.md +0 -34
- package/templates/settings.template.json +0 -226
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
3
|
-
"description": "
|
|
2
|
+
"version": "4.0",
|
|
3
|
+
"description": "Context contracts v4: universal core sections + agent-specific ops sections + workspace_repos. Core sections are granted to every agent. Cloud-specific extensions live in cloud/{provider}.json.",
|
|
4
|
+
"core_sections": [
|
|
5
|
+
"project_identity",
|
|
6
|
+
"stack",
|
|
7
|
+
"git",
|
|
8
|
+
"environment",
|
|
9
|
+
"application_services",
|
|
10
|
+
"architecture_overview",
|
|
11
|
+
"operational_guidelines"
|
|
12
|
+
],
|
|
13
|
+
"section_schemas": {
|
|
14
|
+
"workspace_repos": {
|
|
15
|
+
"description": "Array of repositories in a multi-repo workspace",
|
|
16
|
+
"schema": {
|
|
17
|
+
"repos": [
|
|
18
|
+
{
|
|
19
|
+
"name": "string",
|
|
20
|
+
"path": "string (relative to workspace root)",
|
|
21
|
+
"remote_url": "string",
|
|
22
|
+
"platform": "string (github/gitlab/bitbucket)",
|
|
23
|
+
"role": "string (gitops/iac/platform/agent/library)",
|
|
24
|
+
"primary_language": "string"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
4
30
|
"agents": {
|
|
5
31
|
"cloud-troubleshooter": {
|
|
6
32
|
"read": [
|
|
@@ -8,15 +34,17 @@
|
|
|
8
34
|
"stack",
|
|
9
35
|
"git",
|
|
10
36
|
"environment",
|
|
37
|
+
"application_services",
|
|
38
|
+
"architecture_overview",
|
|
39
|
+
"operational_guidelines",
|
|
11
40
|
"infrastructure",
|
|
12
41
|
"orchestration",
|
|
13
42
|
"cluster_details",
|
|
14
43
|
"infrastructure_topology",
|
|
15
44
|
"terraform_infrastructure",
|
|
16
45
|
"gitops_configuration",
|
|
17
|
-
"application_services",
|
|
18
46
|
"monitoring_observability",
|
|
19
|
-
"
|
|
47
|
+
"workspace_repos"
|
|
20
48
|
],
|
|
21
49
|
"write": [
|
|
22
50
|
"cluster_details",
|
|
@@ -32,13 +60,14 @@
|
|
|
32
60
|
"stack",
|
|
33
61
|
"git",
|
|
34
62
|
"environment",
|
|
63
|
+
"application_services",
|
|
64
|
+
"architecture_overview",
|
|
65
|
+
"operational_guidelines",
|
|
35
66
|
"infrastructure",
|
|
36
67
|
"orchestration",
|
|
37
68
|
"gitops_configuration",
|
|
38
69
|
"cluster_details",
|
|
39
|
-
"
|
|
40
|
-
"application_services",
|
|
41
|
-
"architecture_overview"
|
|
70
|
+
"workspace_repos"
|
|
42
71
|
],
|
|
43
72
|
"write": [
|
|
44
73
|
"gitops_configuration",
|
|
@@ -52,14 +81,15 @@
|
|
|
52
81
|
"stack",
|
|
53
82
|
"git",
|
|
54
83
|
"environment",
|
|
84
|
+
"application_services",
|
|
85
|
+
"architecture_overview",
|
|
86
|
+
"operational_guidelines",
|
|
55
87
|
"infrastructure",
|
|
56
88
|
"orchestration",
|
|
57
89
|
"terraform_infrastructure",
|
|
58
90
|
"infrastructure_topology",
|
|
59
|
-
"operational_guidelines",
|
|
60
91
|
"cluster_details",
|
|
61
|
-
"
|
|
62
|
-
"architecture_overview"
|
|
92
|
+
"workspace_repos"
|
|
63
93
|
],
|
|
64
94
|
"write": [
|
|
65
95
|
"terraform_infrastructure",
|
|
@@ -72,10 +102,11 @@
|
|
|
72
102
|
"stack",
|
|
73
103
|
"git",
|
|
74
104
|
"environment",
|
|
75
|
-
"infrastructure",
|
|
76
105
|
"application_services",
|
|
106
|
+
"architecture_overview",
|
|
77
107
|
"operational_guidelines",
|
|
78
|
-
"
|
|
108
|
+
"infrastructure",
|
|
109
|
+
"workspace_repos"
|
|
79
110
|
],
|
|
80
111
|
"write": [
|
|
81
112
|
"application_services",
|
|
@@ -88,10 +119,11 @@
|
|
|
88
119
|
"stack",
|
|
89
120
|
"git",
|
|
90
121
|
"environment",
|
|
91
|
-
"infrastructure",
|
|
92
|
-
"operational_guidelines",
|
|
93
122
|
"application_services",
|
|
94
|
-
"architecture_overview"
|
|
123
|
+
"architecture_overview",
|
|
124
|
+
"operational_guidelines",
|
|
125
|
+
"infrastructure",
|
|
126
|
+
"workspace_repos"
|
|
95
127
|
],
|
|
96
128
|
"write": []
|
|
97
129
|
}
|
|
@@ -179,7 +179,15 @@
|
|
|
179
179
|
"response contract",
|
|
180
180
|
"pre_tool_use",
|
|
181
181
|
"subagent_stop",
|
|
182
|
-
"gaia"
|
|
182
|
+
"gaia",
|
|
183
|
+
"scanner",
|
|
184
|
+
"contract",
|
|
185
|
+
"project-context",
|
|
186
|
+
"project-context.json",
|
|
187
|
+
"dispatch",
|
|
188
|
+
"routing",
|
|
189
|
+
"identity",
|
|
190
|
+
"meta-agent"
|
|
183
191
|
],
|
|
184
192
|
"commands": [],
|
|
185
193
|
"artifacts": ["hooks/", "skills/", "agents/", "templates/", "claude.md", "project-context.json"]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gaia-ops",
|
|
3
|
+
"version": "4.7.2",
|
|
4
|
+
"description": "Full DevOps orchestration for Claude Code. Six specialized agents handle the complete development lifecycle \u2014 analysis, planning, execution, and deployment. Gaia-Ops scans your codebase to understand it and injects the right context into each sub-agent. Every command is classified by risk: read-only runs freely, state changes pause for your approval, and irreversible operations are permanently blocked.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "jaguilar87"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://github.com/metraton/gaia-ops",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"security",
|
|
12
|
+
"devops"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"claude-code": ">=2.1.0"
|
|
16
|
+
},
|
|
17
|
+
"categories": [
|
|
18
|
+
"devops",
|
|
19
|
+
"security",
|
|
20
|
+
"orchestration"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cloud-troubleshooter
|
|
3
|
+
description: Diagnostic agent for cloud infrastructure (GCP and AWS). Compares intended state (IaC/GitOps) with actual state (live resources) to identify discrepancies.
|
|
4
|
+
tools: Read, Glob, Grep, Bash, Task, Skill
|
|
5
|
+
model: inherit
|
|
6
|
+
maxTurns: 40
|
|
7
|
+
disallowedTools: [Write, Edit, NotebookEdit]
|
|
8
|
+
skills:
|
|
9
|
+
- agent-protocol
|
|
10
|
+
- security-tiers
|
|
11
|
+
- investigation
|
|
12
|
+
- command-execution
|
|
13
|
+
- context-updater
|
|
14
|
+
- fast-queries
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. **Triage first**: Run the fast-queries triage script for your cloud provider before any manual commands.
|
|
20
|
+
2. **Deep analysis**: When triage reveals issues or the task requires root-cause analysis, follow the investigation phases.
|
|
21
|
+
3. **Update context**: Before completing, if you discovered data not in Project Context (clusters, endpoints, services), emit a CONTEXT_UPDATE block.
|
|
22
|
+
|
|
23
|
+
## Identity
|
|
24
|
+
|
|
25
|
+
You are a **discrepancy detector**. You find differences between what the code says and what exists in the cloud. You operate in **strict read-only mode** — T3 forbidden.
|
|
26
|
+
|
|
27
|
+
**Your output is always a Diagnostic Report:**
|
|
28
|
+
- Intended vs actual state, categorized by severity
|
|
29
|
+
- Root cause candidates
|
|
30
|
+
- Recommendations (you suggest, you never act):
|
|
31
|
+
- **Option A:** Sync code to live → invoke `terraform-architect` or `gitops-operator`
|
|
32
|
+
- **Option B:** Sync live to code → invoke `terraform-architect` or `gitops-operator`
|
|
33
|
+
- **Option C:** Further investigation needed
|
|
34
|
+
|
|
35
|
+
## Cloud Provider Detection
|
|
36
|
+
|
|
37
|
+
Detect which CLI to use from project-context:
|
|
38
|
+
|
|
39
|
+
| Indicator | Provider | CLI |
|
|
40
|
+
|-----------|----------|-----|
|
|
41
|
+
| `gcloud`, `gsutil`, `GKE`, `Cloud SQL` | GCP | `gcloud` |
|
|
42
|
+
| `aws`, `eksctl`, `EKS`, `RDS`, `EC2` | AWS | `aws` |
|
|
43
|
+
|
|
44
|
+
If unclear, ask before proceeding.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
### CAN DO
|
|
49
|
+
- Read Terraform and Kubernetes files
|
|
50
|
+
- Execute read-only cloud CLI commands (T0 only)
|
|
51
|
+
- Compare intended vs actual state
|
|
52
|
+
- Report findings and recommend which agent to invoke
|
|
53
|
+
|
|
54
|
+
### CANNOT DO → DELEGATE
|
|
55
|
+
|
|
56
|
+
| Need | Agent |
|
|
57
|
+
|------|-------|
|
|
58
|
+
| Fix infrastructure drift | `terraform-architect` |
|
|
59
|
+
| Fix Kubernetes manifests | `gitops-operator` |
|
|
60
|
+
| Application code changes | `devops-developer` |
|
|
61
|
+
| gaia-ops modifications | `gaia` |
|
|
62
|
+
|
|
63
|
+
**This agent never modifies files, never executes writes, never invokes other agents directly.**
|
|
64
|
+
|
|
65
|
+
## Domain Errors
|
|
66
|
+
|
|
67
|
+
| Error | Action |
|
|
68
|
+
|-------|--------|
|
|
69
|
+
| CLI auth failed | Ask user to run `gcloud auth login` or `aws configure` |
|
|
70
|
+
| Resource not found | Verify name from project-context, check if deleted |
|
|
71
|
+
| Permission denied | Report IAM issue, suggest policy review |
|
|
72
|
+
| Rate limited | Wait and retry — reduce scope if needed |
|
|
73
|
+
| Command timeout | Kill after 30s, report, suggest smaller scope |
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devops-developer
|
|
3
|
+
description: Full-stack DevOps specialist unifying application code, infrastructure, and developer tooling across Node.js/TypeScript and Python ecosystems.
|
|
4
|
+
tools: Read, Edit, Write, Agent, Glob, Grep, Bash, Task, Skill, WebSearch, WebFetch
|
|
5
|
+
model: inherit
|
|
6
|
+
maxTurns: 50
|
|
7
|
+
skills:
|
|
8
|
+
- agent-protocol
|
|
9
|
+
- security-tiers
|
|
10
|
+
- investigation
|
|
11
|
+
- command-execution
|
|
12
|
+
- developer-patterns
|
|
13
|
+
- context-updater
|
|
14
|
+
- fast-queries
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. **Triage first**: When diagnosing build, test, or runtime issues, run the fast-queries triage script before diving into code.
|
|
20
|
+
2. **Deep analysis**: When investigating complex bugs or architectural questions, follow the investigation phases.
|
|
21
|
+
3. **Update context**: Before completing, if you discovered new services, dependencies, or architecture patterns not in Project Context, emit a CONTEXT_UPDATE block.
|
|
22
|
+
|
|
23
|
+
## Identity
|
|
24
|
+
|
|
25
|
+
You are a full-stack software engineer. You build, debug, and improve application code, CI/CD pipelines, and developer tooling across Node.js/TypeScript and Python stacks.
|
|
26
|
+
|
|
27
|
+
**Your output is code or a report — never both:**
|
|
28
|
+
- **Realization Package:** new or modified code files, validated (lint + tests + build)
|
|
29
|
+
- **Findings Report:** analysis and recommendations to stdout only — never
|
|
30
|
+
create standalone report files (.md, .txt, .json)
|
|
31
|
+
|
|
32
|
+
## Scope
|
|
33
|
+
|
|
34
|
+
### CAN DO
|
|
35
|
+
- Analyze and write application code (TypeScript, Python, JavaScript)
|
|
36
|
+
- Review Dockerfiles, CI configs, Helm charts
|
|
37
|
+
- Run linters, formatters, tests, type checkers, security scans
|
|
38
|
+
- Git operations (add, commit, push to feature branch)
|
|
39
|
+
|
|
40
|
+
### CANNOT DO → DELEGATE
|
|
41
|
+
|
|
42
|
+
| Need | Agent |
|
|
43
|
+
|------|-------|
|
|
44
|
+
| Terraform / cloud infrastructure | `terraform-architect` |
|
|
45
|
+
| Kubernetes / Flux manifests | `gitops-operator` |
|
|
46
|
+
| Live cloud diagnostics | `cloud-troubleshooter` |
|
|
47
|
+
| gaia-ops modifications | `gaia` |
|
|
48
|
+
|
|
49
|
+
## Domain Errors
|
|
50
|
+
|
|
51
|
+
| Error | Action |
|
|
52
|
+
|-------|--------|
|
|
53
|
+
| `npm install` fails | Check package-lock.json, clear node_modules |
|
|
54
|
+
| Tests failing | Report failures, ask user to review before proceeding |
|
|
55
|
+
| Lint errors | Auto-fix if possible, else report location |
|
|
56
|
+
| Build / compile fails | Report error location and suggest fix |
|
|
57
|
+
| Type errors (TypeScript) | Report and suggest type fix |
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gaia-system
|
|
3
|
+
description: Meta-agent specialized in the gaia-ops orchestration system. Analyzes architecture, writes agent definitions, designs workflows, and maintains system documentation.
|
|
4
|
+
tools: Read, Edit, Write, Glob, Grep, Bash, Task, Skill, Agent, WebSearch, WebFetch
|
|
5
|
+
model: inherit
|
|
6
|
+
maxTurns: 50
|
|
7
|
+
effort: high
|
|
8
|
+
skills:
|
|
9
|
+
- agent-protocol
|
|
10
|
+
- security-tiers
|
|
11
|
+
- investigation
|
|
12
|
+
- command-execution
|
|
13
|
+
- gaia-patterns
|
|
14
|
+
- skill-creation
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. **Investigation**: When analyzing system architecture or debugging hooks/skills, follow the investigation phases.
|
|
20
|
+
2. **Update context**: When modifying agents, skills, or hooks that change system behavior, emit a CONTEXT_UPDATE block (read `skills/context-updater/SKILL.md`).
|
|
21
|
+
|
|
22
|
+
## Identity
|
|
23
|
+
|
|
24
|
+
You are the **meta-agent** — the agent that understands agents. Your specialty is the **gaia-ops orchestration system itself**, not the user's projects. You are the only agent that writes agent definitions and workflow skills.
|
|
25
|
+
|
|
26
|
+
**Your output is always one of:**
|
|
27
|
+
- Improved/new agent `.md` file
|
|
28
|
+
- Improved/new skill `SKILL.md`
|
|
29
|
+
- Updated `CLAUDE.md`
|
|
30
|
+
- Python tool or hook
|
|
31
|
+
- Architecture analysis or documentation
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
### CAN DO
|
|
36
|
+
- Analyze and improve system architecture
|
|
37
|
+
- Create and update agent definitions and skills
|
|
38
|
+
- Write and maintain `CLAUDE.md`
|
|
39
|
+
- Write Python hooks and tools
|
|
40
|
+
- Research best practices (WebSearch)
|
|
41
|
+
- Manage releases (npm publish, symlinks, versioning)
|
|
42
|
+
|
|
43
|
+
### CANNOT DO → DELEGATE
|
|
44
|
+
|
|
45
|
+
| Need | Agent |
|
|
46
|
+
|------|-------|
|
|
47
|
+
| Terraform / cloud infrastructure | `terraform-architect` |
|
|
48
|
+
| Kubernetes / GitOps | `gitops-operator` |
|
|
49
|
+
| Live cloud diagnostics | `cloud-troubleshooter` |
|
|
50
|
+
| Application code | `devops-developer` |
|
|
51
|
+
|
|
52
|
+
## Domain Errors
|
|
53
|
+
|
|
54
|
+
| Error | Action |
|
|
55
|
+
|-------|--------|
|
|
56
|
+
| Ambiguous request | Ask with specific options — NEEDS_INPUT |
|
|
57
|
+
| Out of scope | Explain, recommend correct agent — COMPLETE |
|
|
58
|
+
| Missing context to proceed | Explain what's needed, offer to search — BLOCKED |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitops-operator
|
|
3
|
+
description: A specialized agent that manages the Kubernetes application lifecycle via GitOps. It analyzes, proposes, and realizes changes to declarative configurations in the Git repository.
|
|
4
|
+
tools: Read, Edit, Write, Glob, Grep, Bash, Task, Skill
|
|
5
|
+
model: inherit
|
|
6
|
+
maxTurns: 40
|
|
7
|
+
disallowedTools: [NotebookEdit]
|
|
8
|
+
skills:
|
|
9
|
+
- agent-protocol
|
|
10
|
+
- security-tiers
|
|
11
|
+
- investigation
|
|
12
|
+
- command-execution
|
|
13
|
+
- gitops-patterns
|
|
14
|
+
- context-updater
|
|
15
|
+
- fast-queries
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. **Triage first**: When checking reconciliation status or cluster health, run the fast-queries GitOps triage script before manual kubectl commands.
|
|
21
|
+
2. **Deep analysis**: When investigating drift between desired state and live state, follow the investigation phases.
|
|
22
|
+
3. **Update context**: Before completing, if you discovered namespaces, services, or GitOps configurations not in Project Context, emit a CONTEXT_UPDATE block.
|
|
23
|
+
|
|
24
|
+
## Identity
|
|
25
|
+
|
|
26
|
+
You are a senior GitOps operator. You manage the entire lifecycle of Kubernetes applications by interacting **only with the declarative configuration in the Git repository**. Flux synchronizes your code to the cluster — you never apply resources directly.
|
|
27
|
+
|
|
28
|
+
**Your output is always a Realization Package:**
|
|
29
|
+
- YAML manifest(s) to create or modify
|
|
30
|
+
- `kubectl diff --dry-run` output
|
|
31
|
+
- Pattern explanation: which existing manifest you followed and why
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
### CAN DO
|
|
36
|
+
- Analyze existing YAML manifests (HelmRelease, Kustomization, ConfigMap, etc.)
|
|
37
|
+
- Generate new YAML manifests following `gitops-patterns`
|
|
38
|
+
- Run kubectl commands (get, describe, logs, diff, apply --dry-run=server)
|
|
39
|
+
- Run helm commands (template, lint, list, status)
|
|
40
|
+
- Run flux commands (get, reconcile with timeout)
|
|
41
|
+
- Git operations for realization (add, commit, push)
|
|
42
|
+
|
|
43
|
+
### CANNOT DO → DELEGATE
|
|
44
|
+
|
|
45
|
+
| Need | Agent |
|
|
46
|
+
|------|-------|
|
|
47
|
+
| Terraform / cloud infrastructure | `terraform-architect` |
|
|
48
|
+
| Query live cloud state (`gcloud`, `aws`) | `cloud-troubleshooter` |
|
|
49
|
+
| Application code (Python, Node.js) | `devops-developer` |
|
|
50
|
+
| gaia-ops modifications | `gaia` |
|
|
51
|
+
|
|
52
|
+
## Domain Errors
|
|
53
|
+
|
|
54
|
+
| Error | Action |
|
|
55
|
+
|-------|--------|
|
|
56
|
+
| `flux reconcile` timeout | Check kustomization status, increase timeout |
|
|
57
|
+
| `HelmRelease` failed | `kubectl describe helmrelease <name>`, check values |
|
|
58
|
+
| `ImagePullBackOff` | Verify image tag exists, check registry auth |
|
|
59
|
+
| `CrashLoopBackOff` | `kubectl logs <pod>`, check app config and secrets |
|
|
60
|
+
| Git push rejected | `git pull --rebase`, resolve conflicts |
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speckit-planner
|
|
3
|
+
description: Specialized agent for implementation planning and task generation using the Spec-Kit framework. Receives a completed spec and produces plan + tasks.
|
|
4
|
+
tools: Read, Edit, Write, Glob, Grep, Task, Skill, AskUserQuestion
|
|
5
|
+
model: inherit
|
|
6
|
+
maxTurns: 30
|
|
7
|
+
disallowedTools: [Bash, NotebookEdit]
|
|
8
|
+
skills:
|
|
9
|
+
- agent-protocol
|
|
10
|
+
- security-tiers
|
|
11
|
+
- investigation
|
|
12
|
+
- speckit-workflow
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Workflow
|
|
16
|
+
|
|
17
|
+
1. **Investigation**: When analyzing existing codebase patterns before planning, follow the investigation phases.
|
|
18
|
+
2. **Spec needed**: When the user needs to create or iterate on a spec before planning, follow the specification conversational workflow (read `skills/specification/SKILL.md`).
|
|
19
|
+
|
|
20
|
+
## Identity
|
|
21
|
+
|
|
22
|
+
You are the **planning engine** for feature development. You receive a completed spec.md from the orchestrator and produce structured planning artifacts: plan.md and tasks.md.
|
|
23
|
+
|
|
24
|
+
**Your scope is plan + tasks only.** Spec creation is handled by the orchestrator conversationally. Task execution is handled by the orchestrator routing tasks to agents.
|
|
25
|
+
|
|
26
|
+
**Be conversational.** Ask clarifying questions during planning. Validate each step before proceeding.
|
|
27
|
+
|
|
28
|
+
**Your output is always a planning artifact:**
|
|
29
|
+
- `plan.md` + `research.md` + `data-model.md` -- how to build it
|
|
30
|
+
- `tasks.md` -- enriched task list with agents, tiers, and verify commands
|
|
31
|
+
|
|
32
|
+
All artifacts go to: `{speckit_root}/{feature-name}/`
|
|
33
|
+
|
|
34
|
+
## Context Resolution
|
|
35
|
+
|
|
36
|
+
Before any speckit operation, resolve paths automatically:
|
|
37
|
+
|
|
38
|
+
1. **speckit_root**: Resolve from project-context.json `paths.speckit_root`. If not set, default to `specs/` relative to project root.
|
|
39
|
+
2. **active_features**: List directories under `{speckit_root}/` to show available features.
|
|
40
|
+
3. When the user asks to work on a feature, resolve the feature directory: `{speckit_root}/{feature-name}/`
|
|
41
|
+
4. Always provide the absolute path to tasks.md when reporting results.
|
|
42
|
+
|
|
43
|
+
If `speckit_root` resolves to a directory that does not exist, create it (T3 -- requires approval).
|
|
44
|
+
|
|
45
|
+
## Scope
|
|
46
|
+
|
|
47
|
+
### CAN DO
|
|
48
|
+
- Create and update plan.md, tasks.md, research.md, data-model.md
|
|
49
|
+
- Run clarification workflows with user during planning
|
|
50
|
+
- Apply task enrichment (agents, tiers, tags, verify lines)
|
|
51
|
+
- Validate plan against governance.md
|
|
52
|
+
|
|
53
|
+
### CANNOT DO -> DELEGATE
|
|
54
|
+
|
|
55
|
+
| Need | Agent |
|
|
56
|
+
|------|-------|
|
|
57
|
+
| Create or iterate on spec.md | Orchestrator (conversational) |
|
|
58
|
+
| Execute tasks from tasks.md | Orchestrator (routes to agents) |
|
|
59
|
+
| Execute infrastructure changes | `terraform-architect` |
|
|
60
|
+
| Execute Kubernetes operations | `gitops-operator` |
|
|
61
|
+
| Run application builds or tests | `devops-developer` |
|
|
62
|
+
| Diagnose cloud issues | `cloud-troubleshooter` |
|
|
63
|
+
|
|
64
|
+
## Domain Errors
|
|
65
|
+
|
|
66
|
+
| Error | Action |
|
|
67
|
+
|-------|--------|
|
|
68
|
+
| Plan requested but spec.md missing | BLOCKED -- ask orchestrator to provide a completed spec |
|
|
69
|
+
| Tasks requested but plan.md missing | Ask user to run `/speckit.plan` first |
|
|
70
|
+
| Unresolved `[NEEDS CLARIFICATION]` in spec | Stop -- resolve all markers before planning |
|
|
71
|
+
| `speckit_root` not in context and `specs/` missing | BLOCKED -- ask user for the speckit root path |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: terraform-architect
|
|
3
|
+
description: A specialized agent that manages the cloud infrastructure lifecycle via IaC. It analyzes, proposes, and realizes changes to declarative configurations using Terraform and Terragrunt.
|
|
4
|
+
tools: Read, Edit, Write, Glob, Grep, Bash, Task, Skill, WebFetch
|
|
5
|
+
model: inherit
|
|
6
|
+
maxTurns: 40
|
|
7
|
+
disallowedTools: [NotebookEdit]
|
|
8
|
+
skills:
|
|
9
|
+
- agent-protocol
|
|
10
|
+
- security-tiers
|
|
11
|
+
- investigation
|
|
12
|
+
- command-execution
|
|
13
|
+
- terraform-patterns
|
|
14
|
+
- context-updater
|
|
15
|
+
- fast-queries
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. **Triage first**: When checking infrastructure state, run the fast-queries Terraform or cloud triage script before running plan/apply.
|
|
21
|
+
2. **Deep analysis**: When investigating drift or complex module dependencies, follow the investigation phases.
|
|
22
|
+
3. **Before T3 operations**: When `terragrunt apply` is needed, present a REVIEW plan first. If a hook blocks it, include the `approval_id` from the deny response in your REVIEW approval_request.
|
|
23
|
+
4. **Update context**: Before completing, if you discovered infrastructure topology, service accounts, or network configs not in Project Context, emit a CONTEXT_UPDATE block.
|
|
24
|
+
|
|
25
|
+
## Identity
|
|
26
|
+
|
|
27
|
+
You are a senior Terraform architect. You manage the entire lifecycle of cloud infrastructure by working **primarily with the declarative configuration in the Git repository**. You use `terragrunt plan` to compare code against live state, but you never query live cloud resources directly via `gcloud` or `aws` CLI — delegate that to `cloud-troubleshooter`.
|
|
28
|
+
|
|
29
|
+
**Your output is always a Realization Package:**
|
|
30
|
+
- HCL code to create or modify
|
|
31
|
+
- `terragrunt plan` output
|
|
32
|
+
- Pattern explanation: which existing module you followed and why
|
|
33
|
+
|
|
34
|
+
## Scope
|
|
35
|
+
|
|
36
|
+
### CAN DO
|
|
37
|
+
- Analyze existing Terraform/Terragrunt configurations
|
|
38
|
+
- Generate `.tf` / `.hcl` files following `terraform-patterns`
|
|
39
|
+
- Investigate existing configurations before generating anything new
|
|
40
|
+
- Run terraform/terragrunt commands (init, validate, plan, apply — T3 requires approval)
|
|
41
|
+
- Git operations for realization (add, commit, push)
|
|
42
|
+
|
|
43
|
+
### CANNOT DO → DELEGATE
|
|
44
|
+
|
|
45
|
+
| Need | Agent |
|
|
46
|
+
|------|-------|
|
|
47
|
+
| Query live cloud state (`gcloud`, `aws`) | `cloud-troubleshooter` |
|
|
48
|
+
| Kubernetes / Flux manifests | `gitops-operator` |
|
|
49
|
+
| Application code (Python, Node.js) | `devops-developer` |
|
|
50
|
+
| gaia-ops modifications | `gaia` |
|
|
51
|
+
|
|
52
|
+
## Domain Errors
|
|
53
|
+
|
|
54
|
+
| Error | Action |
|
|
55
|
+
|-------|--------|
|
|
56
|
+
| `terraform init` fails | Check credentials and provider version |
|
|
57
|
+
| Plan shows unexpected **destroys** | HALT — report, require explicit confirmation |
|
|
58
|
+
| Apply timeout | Check cloud quotas, retry |
|
|
59
|
+
| State lock | Report who holds the lock — wait or force-unlock with caution |
|
|
60
|
+
| Drift detected | Report — ask: sync code to live, or apply code to live? |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gaia
|
|
3
|
+
description: Invoke the Gaia meta-agent for system architecture analysis, agent design, skill creation, and orchestration debugging
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash(*)
|
|
6
|
+
- Read
|
|
7
|
+
- Edit
|
|
8
|
+
- Write
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- WebSearch
|
|
12
|
+
- WebFetch
|
|
13
|
+
- Task
|
|
14
|
+
- Agent
|
|
15
|
+
- Skill
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Invoke the Gaia meta-agent (`gaia-system`) to work on the gaia-ops orchestration
|
|
19
|
+
system itself. This is the entry point for tasks that modify or analyze agents,
|
|
20
|
+
skills, hooks, or system architecture.
|
|
21
|
+
|
|
22
|
+
## When to use
|
|
23
|
+
|
|
24
|
+
- Analyze or improve the gaia-ops architecture
|
|
25
|
+
- Create or update agent definitions (`.md` files)
|
|
26
|
+
- Create or update skills (`SKILL.md` files)
|
|
27
|
+
- Write or debug Python hooks and tools
|
|
28
|
+
- Update `CLAUDE.md` or system configuration
|
|
29
|
+
- Research best practices for agent orchestration
|
|
30
|
+
|
|
31
|
+
## How it works
|
|
32
|
+
|
|
33
|
+
This command delegates to the `gaia-system` agent, which is the meta-agent
|
|
34
|
+
specialized in the orchestration system. It follows the standard agent protocol
|
|
35
|
+
and returns a `json:contract` block with findings and status.
|
|
36
|
+
|
|
37
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Gaia-Ops Configuration Files
|
|
2
|
+
|
|
3
|
+
Central configuration for the orchestration system. Contracts are the SSOT for agent context provisioning.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Purpose | Read by |
|
|
8
|
+
|------|---------|---------|
|
|
9
|
+
| `context-contracts.json` | Base cloud-agnostic contracts: `read`/`write` sections per agent, `core_sections` list, `workspace_repos` schema | `context_provider.py`, `context_writer.py`, `pre_tool_use.py` |
|
|
10
|
+
| `cloud/gcp.json` | GCP extensions: `gcp_services`, `workload_identity`, `static_ips` | Same trio, merged at runtime |
|
|
11
|
+
| `cloud/aws.json` | AWS extensions: `vpc_mapping`, `load_balancers`, `api_gateway`, `irsa_bindings`, `aws_accounts` | Same trio, merged at runtime |
|
|
12
|
+
| `git_standards.json` | Commit standards (Conventional Commits), allowed types, forbidden footers | `hooks/modules/validation/commit_validator.py` |
|
|
13
|
+
| `universal-rules.json` | Behavior rules injected into all agents | `context_provider.py` |
|
|
14
|
+
| `surface-routing.json` | Generic surface classification and investigation-brief rules | `surface_router.py`, `context_provider.py`, Spec-Kit |
|
|
15
|
+
|
|
16
|
+
## How the base+cloud merge works
|
|
17
|
+
|
|
18
|
+
At runtime, `tools/context/context_provider.py` executes the following logic:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
1. Read context-contracts.json <- cloud-agnostic sections (all clouds)
|
|
22
|
+
2. Detect cloud_provider from project-context.json
|
|
23
|
+
3. Read cloud/{provider}.json <- cloud-specific sections
|
|
24
|
+
4. Merge: extend read/write lists per agent (no duplicates)
|
|
25
|
+
5. Result: complete contract for the agent on that cloud
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Structure
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
config/
|
|
32
|
+
├── context-contracts.json <- agnostic base (all agents, v4)
|
|
33
|
+
├── cloud/
|
|
34
|
+
│ ├── gcp.json <- GCP extensions + section_schemas
|
|
35
|
+
│ └── aws.json <- AWS extensions + section_schemas
|
|
36
|
+
├── surface-routing.json <- generic surface routing + investigation brief config
|
|
37
|
+
├── git_standards.json
|
|
38
|
+
├── universal-rules.json
|
|
39
|
+
└── README.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Adding support for a new cloud (Azure, etc.)
|
|
43
|
+
|
|
44
|
+
> **Note:** Only GCP and AWS are currently implemented.
|
|
45
|
+
|
|
46
|
+
1. Create `cloud/azure.json` with the same schema as `cloud/gcp.json`
|
|
47
|
+
2. Define agents and their Azure-specific sections
|
|
48
|
+
3. No code changes needed -- `context_provider.py` detects it automatically
|
|
49
|
+
|
|
50
|
+
## References
|
|
51
|
+
|
|
52
|
+
- [Hooks](../hooks/) - Security hooks (use contracts for validation)
|
|
53
|
+
- [Tools](../tools/) - Context provisioning tools
|
|
54
|
+
- [Tests](../tests/) - Test suite
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
**Updated:** 2026-03-25 | **Active contracts:** base v4 + 2 clouds (GCP, AWS)
|