@jaguilar87/gaia-ops 3.5.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/agents/cloud-troubleshooter.md +51 -0
  2. package/agents/devops-developer.md +52 -0
  3. package/agents/gaia.md +336 -192
  4. package/agents/gitops-operator.md +52 -0
  5. package/agents/terraform-architect.md +63 -0
  6. package/bin/pre-publish-validate.js +4 -2
  7. package/config/README.en.md +153 -59
  8. package/config/README.md +61 -54
  9. package/config/git_standards.json +5 -2
  10. package/config/skill-triggers.json +57 -0
  11. package/config/universal-rules.json +1 -1
  12. package/hooks/README.en.md +9 -13
  13. package/hooks/README.md +117 -87
  14. package/hooks/modules/audit/event_detector.py +2 -1
  15. package/hooks/modules/context/__init__.py +11 -0
  16. package/hooks/modules/context/exhaustion_detector.py +416 -0
  17. package/hooks/modules/security/blocked_commands.py +109 -99
  18. package/hooks/modules/security/safe_commands.py +73 -1
  19. package/hooks/modules/security/tiers.py +62 -24
  20. package/hooks/modules/skills/skill_loader.py +313 -0
  21. package/hooks/modules/tools/bash_validator.py +126 -15
  22. package/hooks/modules/tools/task_validator.py +31 -11
  23. package/hooks/modules/workflow/episodic_capture.py +266 -0
  24. package/hooks/post_tool_use.py +9 -43
  25. package/hooks/pre_tool_use.py +462 -74
  26. package/hooks/subagent_stop.py +207 -24
  27. package/package.json +2 -3
  28. package/templates/CLAUDE.template.md +209 -45
  29. package/templates/settings.template.json +48 -38
  30. package/tests/hooks/modules/security/test_blocked_commands.py +173 -176
  31. package/tests/hooks/modules/security/test_safe_commands.py +128 -0
  32. package/tests/hooks/modules/security/test_tiers.py +1 -1
  33. package/tests/hooks/modules/tools/test_bash_validator.py +108 -161
  34. package/tests/hooks/modules/tools/test_task_validator.py +15 -6
  35. package/tests/system/test_agent_definitions.py +2 -1
  36. package/tests/system/test_directory_structure.py +7 -12
  37. package/tests/tools/test_context_provider.py +6 -124
  38. package/tools/{2-context → context}/README.md +1 -1
  39. package/tools/{2-context → context}/context_provider.py +50 -125
  40. package/tools/validation/README.md +257 -0
  41. package/tools/{4-validation → validation}/approval_gate.py +4 -1
  42. package/tools/{4-validation → validation}/commit_validator.py +41 -1
  43. package/commands/gaia.md +0 -95
  44. package/config/agent-catalog.md +0 -604
  45. package/config/clarification_rules.json +0 -152
  46. package/config/context-contracts.aws.json +0 -108
  47. package/config/context-contracts.gcp.json +0 -108
  48. package/config/delegation-matrix.md +0 -122
  49. package/config/documentation-principles.en.md +0 -341
  50. package/config/documentation-principles.md +0 -341
  51. package/config/git-standards.md +0 -674
  52. package/config/metrics_targets.json +0 -37
  53. package/config/orchestration-workflow.md +0 -735
  54. package/config/standards/README.en.md +0 -75
  55. package/config/standards/README.md +0 -69
  56. package/config/standards/anti-patterns.md +0 -187
  57. package/config/standards/command-execution.md +0 -130
  58. package/config/standards/output-format.md +0 -70
  59. package/config/standards/security-tiers.md +0 -49
  60. package/hooks/QUICK_REFERENCE.md +0 -97
  61. package/hooks/README_EPISODIC_CAPTURE.md +0 -269
  62. package/hooks/episodic_capture_hook.py +0 -751
  63. package/hooks/post_phase_hook.py +0 -97
  64. package/hooks/pre_delegate.py +0 -245
  65. package/hooks/pre_kubectl_security.py +0 -205
  66. package/hooks/pre_phase_hook.py +0 -222
  67. package/hooks/shell_parser.py +0 -287
  68. package/hooks/subagent_stop_patch.txt +0 -31
  69. package/tests/agent-framework/__init__.py +0 -1
  70. package/tests/agent-framework/test_payload_validator.py +0 -216
  71. package/tests/context/test_lazy_loading.py +0 -298
  72. package/tests/guards/test_workflow_enforcer.py +0 -147
  73. package/tests/hooks/modules/agents/__init__.py +0 -0
  74. package/tests/hooks/modules/agents/test_anomaly_detector.py +0 -284
  75. package/tests/hooks/modules/agents/test_subagent_metrics.py +0 -231
  76. package/tests/hooks/modules/audit/__init__.py +0 -0
  77. package/tests/hooks/modules/audit/test_event_detector.py +0 -299
  78. package/tests/hooks/modules/audit/test_logger.py +0 -253
  79. package/tests/hooks/modules/audit/test_metrics.py +0 -239
  80. package/tests/hooks/modules/security/test_gitops_validator.py +0 -291
  81. package/tests/hooks/modules/workflow/__init__.py +0 -0
  82. package/tests/hooks/modules/workflow/test_phase_validator.py +0 -311
  83. package/tests/hooks/modules/workflow/test_state_tracker.py +0 -250
  84. package/tests/hooks/test_episodic_capture_hook.py +0 -508
  85. package/tests/hooks/test_episodic_phase1_agents.py +0 -398
  86. package/tests/hooks/test_orchestrator_gate.py +0 -197
  87. package/tests/hooks/test_post_phase_hook.py +0 -249
  88. package/tests/hooks/test_post_tool_use.py +0 -340
  89. package/tests/hooks/test_pre_phase_hook.py +0 -393
  90. package/tests/hooks/test_pre_tool_use.py +0 -228
  91. package/tests/hooks/test_subagent_stop.py +0 -333
  92. package/tests/integration/RUN_TESTS.md +0 -185
  93. package/tests/integration/__init__.py +0 -0
  94. package/tests/integration/test_hooks_integration.py +0 -468
  95. package/tests/integration/test_hooks_workflow.py +0 -399
  96. package/tests/integration/test_phase_0_regression.py +0 -211
  97. package/tests/permissions-validation/MANUAL_VALIDATION.md +0 -438
  98. package/tests/permissions-validation/test_permissions_validation.py +0 -549
  99. package/tests/task-management/__init__.py +0 -1
  100. package/tests/task-management/test_task_manager.py +0 -445
  101. package/tests/test_agent_session.py +0 -299
  102. package/tests/tools/test_agent_router.py +0 -347
  103. package/tests/tools/test_clarify_engine.py +0 -417
  104. package/tests/tools/test_llm_classifier.py +0 -371
  105. package/tests/validators/__init__.py +0 -0
  106. package/tests/validators/test_approval_gate.py +0 -415
  107. package/tests/validators/test_commit_validator.py +0 -463
  108. package/tests/workflow/test_episodic_memory.py +0 -81
  109. package/tests/workflow/test_episodic_memory_new.py +0 -294
  110. package/tests/workflow/test_episodic_simple.py +0 -119
  111. package/tests/workflow/test_workflow_enforcement.py +0 -94
  112. package/tests/workflow/test_workflow_enforcer_integration.py +0 -189
  113. package/tests/workflow/test_workflow_metrics.py +0 -183
  114. package/tools/0-guards/README.md +0 -86
  115. package/tools/0-guards/delegation_matrix.py +0 -270
  116. package/tools/0-guards/guards_config.json +0 -41
  117. package/tools/0-guards/workflow_enforcer.py +0 -358
  118. package/tools/1-routing/README.md +0 -69
  119. package/tools/1-routing/__init__.py +0 -10
  120. package/tools/1-routing/agent_router.py +0 -565
  121. package/tools/1-routing/llm_classifier.py +0 -355
  122. package/tools/3-clarification/README.md +0 -123
  123. package/tools/3-clarification/__init__.py +0 -118
  124. package/tools/3-clarification/engine.py +0 -513
  125. package/tools/3-clarification/generic_engine.py +0 -452
  126. package/tools/3-clarification/patterns.py +0 -363
  127. package/tools/3-clarification/user_interaction.py +0 -210
  128. package/tools/3-clarification/workflow.py +0 -411
  129. package/tools/3-clarification/workflow.py.backup +0 -363
  130. package/tools/4-memory/SESSION_README.md +0 -332
  131. package/tools/4-memory/agent_session.py +0 -671
  132. package/tools/4-memory/episodic.py +0 -1225
  133. package/tools/4-validation/README.md +0 -139
  134. package/tools/5-task-management/README.md +0 -77
  135. package/tools/5-task-management/__init__.py +0 -10
  136. package/tools/5-task-management/task_manager.py +0 -547
  137. package/tools/5-task-management/task_manager_README.md +0 -395
  138. package/tools/6-semantic/README.md +0 -109
  139. package/tools/6-semantic/__init__.py +0 -11
  140. package/tools/6-semantic/generate_embeddings.py +0 -168
  141. package/tools/6-semantic/semantic_matcher.py +0 -135
  142. package/tools/7-utilities/README.md +0 -133
  143. package/tools/7-utilities/__init__.py +0 -10
  144. package/tools/7-utilities/agent_invoker_helper.py +0 -239
  145. package/tools/7-utilities/task_wrapper.py +0 -229
  146. package/tools/8-metrics/README.md +0 -175
  147. package/tools/8-metrics/metrics_collector.py +0 -390
  148. package/tools/8-metrics/metrics_dashboard.py +0 -192
  149. package/tools/8-shared/README.md +0 -118
  150. package/tools/8-shared/__init__.py +0 -14
  151. package/tools/9-agent-framework/README.md +0 -358
  152. package/tools/9-agent-framework/__init__.py +0 -39
  153. package/tools/9-agent-framework/agent_orchestrator.py +0 -278
  154. package/tools/9-agent-framework/execution_manager.py +0 -332
  155. package/tools/9-agent-framework/finding_classifier.py +0 -248
  156. package/tools/9-agent-framework/local_discoverer.py +0 -272
  157. package/tools/9-agent-framework/logging_manager.py +0 -270
  158. package/tools/9-agent-framework/payload_validator.py +0 -247
  159. package/tools/9-agent-framework/remote_validator.py +0 -449
  160. package/tools/9-agent-framework/test_phase_b_discovery.py +0 -110
  161. package/tools/9-agent-framework/test_phase_c_classification.py +0 -171
  162. package/tools/9-agent-framework/test_phase_e_execution.py +0 -101
  163. package/tools/README.md +0 -209
  164. package/tools/TASK_WRAPPER.md +0 -332
  165. package/tools/__init__.py +0 -124
  166. package/tools/agent_capabilities.json +0 -163
  167. /package/tools/{2-context → context}/__init__.py +0 -0
  168. /package/tools/{2-context → context}/benchmark_context.py +0 -0
  169. /package/tools/{2-context → context}/context_compressor.py +0 -0
  170. /package/tools/{2-context → context}/context_lazy_loader.py +0 -0
  171. /package/tools/{2-context → context}/context_section_reader.py +0 -0
  172. /package/tools/{2-context → context}/context_selector.py +0 -0
  173. /package/tools/{4-memory → memory}/README.md +0 -0
  174. /package/tools/{4-memory → memory}/__init__.py +0 -0
  175. /package/tools/{4-memory/episodic.py.backup → memory/episodic.py} +0 -0
  176. /package/tools/{4-validation → validation}/__init__.py +0 -0
@@ -14,6 +14,57 @@ model: inherit
14
14
 
15
15
  ---
16
16
 
17
+ ## Response Format (MANDATORY)
18
+
19
+ **END EVERY RESPONSE** with this status block:
20
+
21
+ ```html
22
+ <!-- AGENT_STATUS -->
23
+ PLAN_STATUS: [status]
24
+ CURRENT_PHASE: [phase]
25
+ PENDING_STEPS: [list]
26
+ NEXT_ACTION: [description]
27
+ AGENT_ID: [your agentId]
28
+ <!-- /AGENT_STATUS -->
29
+ ```
30
+
31
+ ### Status by Workflow Phase
32
+
33
+ | Phase | Typical Status | When to Use |
34
+ |-------|---------------|-------------|
35
+ | **Investigation** | INVESTIGATING | Comparing intended vs actual state |
36
+ | **Present** | COMPLETE | Found root cause, provided remediation steps |
37
+ | **Any** | BLOCKED | Cannot access cloud/cluster (credentials missing) |
38
+ | **Any** | NEEDS_INPUT | Need clarification (which cluster? which resource?) |
39
+
40
+ **Note:** This agent is diagnostic-only (T0-T2). It never proposes T3 operations, so typically ends with COMPLETE.
41
+
42
+ ### Examples
43
+
44
+ **Investigation in progress:**
45
+ ```html
46
+ <!-- AGENT_STATUS -->
47
+ PLAN_STATUS: INVESTIGATING
48
+ CURRENT_PHASE: Investigation
49
+ PENDING_STEPS: ["Check live state", "Compare with IaC", "Present diagnosis"]
50
+ NEXT_ACTION: Comparing EKS cluster config with Terraform state
51
+ AGENT_ID: a11111
52
+ <!-- /AGENT_STATUS -->
53
+ ```
54
+
55
+ **Diagnosis complete:**
56
+ ```html
57
+ <!-- AGENT_STATUS -->
58
+ PLAN_STATUS: COMPLETE
59
+ CURRENT_PHASE: Investigation
60
+ PENDING_STEPS: []
61
+ NEXT_ACTION: Task complete - root cause identified, remediation steps provided
62
+ AGENT_ID: a11111
63
+ <!-- /AGENT_STATUS -->
64
+ ```
65
+
66
+ ---
67
+
17
68
  ## Before Acting
18
69
 
19
70
  When you receive a task, STOP and verify:
@@ -14,6 +14,58 @@ model: inherit
14
14
 
15
15
  ---
16
16
 
17
+ ## Response Format (MANDATORY)
18
+
19
+ **END EVERY RESPONSE** with this status block:
20
+
21
+ ```html
22
+ <!-- AGENT_STATUS -->
23
+ PLAN_STATUS: [status]
24
+ CURRENT_PHASE: [phase]
25
+ PENDING_STEPS: [list]
26
+ NEXT_ACTION: [description]
27
+ AGENT_ID: [your agentId]
28
+ <!-- /AGENT_STATUS -->
29
+ ```
30
+
31
+ ### Status by Workflow Phase
32
+
33
+ | Phase | Typical Status | When to Use |
34
+ |-------|---------------|-------------|
35
+ | **Investigation** | INVESTIGATING | Reading code, running tests, analyzing |
36
+ | **Present** | PENDING_APPROVAL | Proposing code changes (T3) |
37
+ | **Present** | COMPLETE | Analysis done, no code changes needed |
38
+ | **Confirm** | APPROVED_EXECUTING | User approved, committing code changes |
39
+ | **Execute** | COMPLETE | Code committed, tests passed |
40
+ | **Any** | BLOCKED | Build/test failures, dependencies missing |
41
+ | **Any** | NEEDS_INPUT | Need clarification about implementation |
42
+
43
+ ### Examples
44
+
45
+ **Investigation in progress:**
46
+ ```html
47
+ <!-- AGENT_STATUS -->
48
+ PLAN_STATUS: INVESTIGATING
49
+ CURRENT_PHASE: Investigation
50
+ PENDING_STEPS: ["Run tests", "Analyze results", "Present findings"]
51
+ NEXT_ACTION: Running npm test to check current state
52
+ AGENT_ID: a22222
53
+ <!-- /AGENT_STATUS -->
54
+ ```
55
+
56
+ **Proposing code changes (T3):**
57
+ ```html
58
+ <!-- AGENT_STATUS -->
59
+ PLAN_STATUS: PENDING_APPROVAL
60
+ CURRENT_PHASE: Present
61
+ PENDING_STEPS: ["Get approval", "Commit changes", "Push to remote"]
62
+ NEXT_ACTION: Wait for user approval to commit code changes
63
+ AGENT_ID: a22222
64
+ <!-- /AGENT_STATUS -->
65
+ ```
66
+
67
+ ---
68
+
17
69
  ## Before Acting
18
70
 
19
71
  When you receive a task, STOP and verify: