@jaguilar87/gaia-ops 1.0.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 (91) hide show
  1. package/CHANGELOG.md +315 -0
  2. package/CLAUDE.md +154 -0
  3. package/LICENSE +21 -0
  4. package/README.md +221 -0
  5. package/agents/aws-troubleshooter.md +50 -0
  6. package/agents/claude-architect.md +821 -0
  7. package/agents/devops-developer.md +92 -0
  8. package/agents/gcp-troubleshooter.md +50 -0
  9. package/agents/gitops-operator.md +360 -0
  10. package/agents/terraform-architect.md +289 -0
  11. package/bin/gaia-init.js +620 -0
  12. package/commands/architect.md +97 -0
  13. package/commands/restore-session.md +87 -0
  14. package/commands/save-session.md +88 -0
  15. package/commands/session-status.md +61 -0
  16. package/commands/speckit.add-task.md +144 -0
  17. package/commands/speckit.analyze-task.md +65 -0
  18. package/commands/speckit.implement.md +96 -0
  19. package/commands/speckit.init.md +237 -0
  20. package/commands/speckit.plan.md +88 -0
  21. package/commands/speckit.specify.md +161 -0
  22. package/commands/speckit.tasks.md +188 -0
  23. package/config/AGENTS.md +162 -0
  24. package/config/agent-catalog.md +604 -0
  25. package/config/context-contracts.md +682 -0
  26. package/config/git-standards.md +674 -0
  27. package/config/git_standards.json +69 -0
  28. package/config/orchestration-workflow.md +735 -0
  29. package/hooks/__pycache__/post_tool_use.cpython-312.pyc +0 -0
  30. package/hooks/__pycache__/pre_kubectl_security.cpython-312.pyc +0 -0
  31. package/hooks/__pycache__/pre_tool_use.cpython-312.pyc +0 -0
  32. package/hooks/__pycache__/session_start.cpython-312.pyc +0 -0
  33. package/hooks/__pycache__/subagent_stop.cpython-312.pyc +0 -0
  34. package/hooks/post_tool_use.py +463 -0
  35. package/hooks/pre_kubectl_security.py +205 -0
  36. package/hooks/pre_tool_use.py +530 -0
  37. package/hooks/session_start.py +315 -0
  38. package/hooks/subagent_stop.py +549 -0
  39. package/index.js +92 -0
  40. package/package.json +59 -0
  41. package/speckit/README.en.md +648 -0
  42. package/speckit/README.md +353 -0
  43. package/speckit/governance.md +169 -0
  44. package/speckit/scripts/check-prerequisites.sh +194 -0
  45. package/speckit/scripts/common.sh +126 -0
  46. package/speckit/scripts/create-new-feature.sh +131 -0
  47. package/speckit/scripts/init.sh +42 -0
  48. package/speckit/scripts/setup-plan.sh +95 -0
  49. package/speckit/scripts/update-agent-context.sh +718 -0
  50. package/speckit/templates/adr-template.md +118 -0
  51. package/speckit/templates/agent-file-template.md +23 -0
  52. package/speckit/templates/plan-template.md +233 -0
  53. package/speckit/templates/spec-template.md +116 -0
  54. package/speckit/templates/tasks-template-bkp.md +136 -0
  55. package/speckit/templates/tasks-template.md +345 -0
  56. package/templates/CLAUDE.template.md +170 -0
  57. package/templates/code-examples/approval_gate_workflow.py +141 -0
  58. package/templates/code-examples/clarification_workflow.py +94 -0
  59. package/templates/code-examples/commit_validation.py +86 -0
  60. package/templates/project-context.template.json +126 -0
  61. package/templates/settings.template.json +307 -0
  62. package/tools/__pycache__/agent_router.cpython-312.pyc +0 -0
  63. package/tools/__pycache__/approval_gate.cpython-312.pyc +0 -0
  64. package/tools/__pycache__/clarify_engine.cpython-312.pyc +0 -0
  65. package/tools/__pycache__/clarify_patterns.cpython-312.pyc +0 -0
  66. package/tools/__pycache__/commit_validator.cpython-312.pyc +0 -0
  67. package/tools/__pycache__/context_section_reader.cpython-312.pyc +0 -0
  68. package/tools/__pycache__/routing_dashboard.cpython-312.pyc +0 -0
  69. package/tools/__pycache__/routing_feedback.cpython-312.pyc +0 -0
  70. package/tools/__pycache__/semantic_matcher.cpython-312.pyc +0 -0
  71. package/tools/__pycache__/task_manager.cpython-312.pyc +0 -0
  72. package/tools/agent_capabilities.json +231 -0
  73. package/tools/agent_invoker_helper.py +239 -0
  74. package/tools/agent_router.py +730 -0
  75. package/tools/approval_gate.py +318 -0
  76. package/tools/clarify_engine.py +511 -0
  77. package/tools/clarify_patterns.py +356 -0
  78. package/tools/commit_validator.py +338 -0
  79. package/tools/context_provider.py +181 -0
  80. package/tools/context_section_reader.py +301 -0
  81. package/tools/demo_clarify.py +104 -0
  82. package/tools/generate_embeddings.py +168 -0
  83. package/tools/quicktriage_aws_troubleshooter.sh +45 -0
  84. package/tools/quicktriage_devops_developer.sh +38 -0
  85. package/tools/quicktriage_gcp_troubleshooter.sh +51 -0
  86. package/tools/quicktriage_gitops_operator.sh +47 -0
  87. package/tools/quicktriage_terraform_architect.sh +40 -0
  88. package/tools/semantic_matcher.py +222 -0
  89. package/tools/task_manager.py +547 -0
  90. package/tools/task_manager_README.md +395 -0
  91. package/tools/task_manager_example.py +215 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,315 @@
1
+ # Changelog: CLAUDE.md
2
+
3
+ All notable changes to the CLAUDE.md orchestrator instructions are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [2.1.0] - 2025-11-07
11
+
12
+ ### Changed
13
+
14
+ - **Optimized CLAUDE.md verbosity:** Further reduced from 195 lines to 154 lines (21% additional reduction)
15
+ - **Converted narrative to rules format:** All sections now use Rule X.Y [Priority] format for clarity
16
+ - **Implemented numeric priority system:** `[P0]` (critical), `[P1]` (important) for better emphasis
17
+ - **Reduced Python code blocks:** Removed verbose code examples, replaced with concise function references
18
+ - **Optimized sections:**
19
+ - Core Operating Principles: Narrative → Rules 1.0-4.0
20
+ - Orchestrator Workflow: Narrative → Rule 5.0-5.1 with table format
21
+ - Git Operations: Narrative → Rules 6.0-6.1 with table format
22
+ - Common Anti-Patterns: Lists → Rule 7.0 with comparison table
23
+
24
+ ### Added
25
+
26
+ - **Code examples in templates:** Created `.claude/templates/code-examples/` with:
27
+ - `commit_validation.py` (86 lines) - Complete commit validation patterns
28
+ - `clarification_workflow.py` (94 lines) - Phase 0 clarification examples
29
+ - `approval_gate_workflow.py` (141 lines) - Phase 4 approval gate examples
30
+ - **Rule numbering system:** Rules 1.0-7.0 for easy reference and navigation
31
+ - **Priority indicators:** `[P0]` for critical rules, `[P1]` for important rules
32
+
33
+ ### Improved
34
+
35
+ - **Token efficiency:** Additional 25% reduction (1,900 → ~1,450 tokens)
36
+ - **Scannability:** Table format for workflows, commit rules, anti-patterns
37
+ - **Conciseness:** Removed redundant explanations, kept essential info
38
+ - **Maintainability:** Code examples separate from core instructions
39
+
40
+ ---
41
+
42
+ ## [2.0.0] - 2025-11-07
43
+
44
+ ### Changed (BREAKING)
45
+
46
+ - **Refactored to modular structure:** Split 380-line monolith into:
47
+ - `CLAUDE.md` (core instructions, 196 lines)
48
+ - `.claude/docs/orchestration-workflow.md` (phases 0-6, ~550 lines)
49
+ - `.claude/docs/git-standards.md` (complete git specification, ~450 lines)
50
+ - `.claude/docs/context-contracts.md` (agent contracts, ~400 lines)
51
+ - `.claude/docs/agent-catalog.md` (agent capabilities, ~550 lines)
52
+
53
+ - **Updated Core Operating Principles:**
54
+ - Changed Principle #1 from "ZERO Direct Execution" to "Selective Delegation (Context-Aware)"
55
+ - Clarified that orchestrator CAN execute SIMPLE operations (commits, file edits, queries)
56
+ - Clarified that orchestrator MUST delegate COMPLEX workflows (infrastructure, deployments)
57
+
58
+ ### Added
59
+
60
+ - **Frontmatter with metadata:**
61
+ - Version: 2.0.0
62
+ - Last updated date
63
+ - Maintainer info
64
+ - Changelog reference
65
+
66
+ - **Git Operations section:**
67
+ - Clear distinction between orchestrator-level commits (simple, ad-hoc) and agent-level commits (complex workflows)
68
+ - Table of "Distinction Rules" showing which handler (orchestrator or agent) for each scenario
69
+ - Universal validation requirement (`commit_validator.py`) for both orchestrator and agents
70
+
71
+ - **References section:**
72
+ - Links to all modular docs (`.claude/docs/*.md`)
73
+ - Links to code examples (`.claude/templates/code-examples/`)
74
+
75
+ - **System Paths section:**
76
+ - Centralized list of all system paths (agent system, tools, logs, tests, project SSOT)
77
+
78
+ - **Common Anti-Patterns section:**
79
+ - DON'T list (skip approval gate, use context_provider for meta-agents, etc.)
80
+ - DO list (route tasks, use AskUserQuestion, update SSOT, etc.)
81
+
82
+ ### Improved
83
+
84
+ - **Token efficiency:** Reduced from ~3,800 tokens to ~1,500 tokens (60% reduction)
85
+ - **Navigability:** Clear section structure with references to detailed docs
86
+ - **Mantenibility:** Changes to git standards, workflows, or contracts don't require editing CLAUDE.md
87
+ - **Clarity:** Explicit distinction between project agents and meta-agents
88
+
89
+ ### Removed
90
+
91
+ - **Detailed Phase 0-6 workflows:** Moved to `.claude/docs/orchestration-workflow.md`
92
+ - **Complete git standards:** Moved to `.claude/docs/git-standards.md`
93
+ - **Full context contracts:** Moved to `.claude/docs/context-contracts.md`
94
+ - **Detailed agent capabilities:** Moved to `.claude/docs/agent-catalog.md`
95
+ - **Code examples:** Moved to `.claude/templates/code-examples/`
96
+
97
+ ---
98
+
99
+ ## [1.4.x] - 2025-11-01 to 2025-11-06
100
+
101
+ ### Added
102
+
103
+ - **Phase 0: Intelligent Clarification** (NEW)
104
+ - `clarify_engine.py` integration for ambiguity detection
105
+ - Dynamic questions with options from `project-context.json`
106
+ - Enriched prompt generation for better routing accuracy
107
+
108
+ - **Phase 6: System State Update**
109
+ - Mandatory SSOT updates after realization
110
+ - `TaskManager` integration for `tasks.md` updates (handles >25K tokens)
111
+ - Infrastructure state updates (`project-context.json`)
112
+
113
+ ### Changed
114
+
115
+ - **Phase 4: Approval Gate** made MANDATORY (enforced with validation logic)
116
+ - **Phase 5: Realization** requires `validation["approved"] == True` (cannot skip)
117
+
118
+ ---
119
+
120
+ ## [1.3.x] - 2025-10-15 to 2025-10-31
121
+
122
+ ### Added
123
+
124
+ - **Git Commit Standards:**
125
+ - `commit_validator.py` integration (mandatory validation)
126
+ - Conventional Commits format enforcement
127
+ - Forbidden footers (Claude Code attribution)
128
+ - Violations logging to `.claude/logs/commit-violations.jsonl`
129
+
130
+ - **Context Contracts:**
131
+ - Defined minimum context payload for each agent
132
+ - `context_provider.py` as SSOT for context generation
133
+
134
+ ### Changed
135
+
136
+ - **Core Principle #4:** Clarified two-phase workflow (Planning → Approval → Realization)
137
+
138
+ ---
139
+
140
+ ## [1.2.x] - 2025-09-20 to 2025-10-14
141
+
142
+ ### Added
143
+
144
+ - **Agent System Overview:**
145
+ - Distinction between Project Agents (use `context_provider.py`) and Meta-Agents (manual context)
146
+ - Security tiers (T0-T3) for operations
147
+ - Agent capabilities and tools
148
+
149
+ ### Changed
150
+
151
+ - **Orchestrator Workflow:** Simplified to 5 phases (before Phase 0 was added later)
152
+
153
+ ---
154
+
155
+ ## [1.1.x] - 2025-08-15 to 2025-09-19
156
+
157
+ ### Added
158
+
159
+ - **Execution Standards:**
160
+ - Use native tools over bash redirections
161
+ - Execute simple commands (not chained with `&&`)
162
+ - Permission priority rules
163
+
164
+ ### Changed
165
+
166
+ - **Language Policy:** Separated technical docs (English) from chat interactions (Spanish)
167
+
168
+ ---
169
+
170
+ ## [1.0.0] - 2025-08-01
171
+
172
+ ### Added
173
+
174
+ - **Initial CLAUDE.md structure:**
175
+ - Language Policy
176
+ - Core Operating Principles (ZERO Direct Execution, Delegate to Specialists, Master of Context)
177
+ - Basic workflow (Analysis → Context → Invocation → Verification)
178
+ - Agent list with roles
179
+
180
+ ---
181
+
182
+ ## Future (Planned)
183
+
184
+ ### Version 2.1.0 (Planned Q1 2026)
185
+
186
+ - **Improved routing:** Machine learning-based agent selection
187
+ - **Enhanced clarification:** Proactive clarification based on user history
188
+ - **Performance metrics:** Track token usage, latency, success rates per agent
189
+
190
+ ### Version 2.2.0 (Planned Q2 2026)
191
+
192
+ - **Multi-agent coordination:** Support for workflows requiring multiple agents (e.g., terraform + gitops)
193
+ - **Rollback automation:** Automatic rollback on failed verifications
194
+ - **Enhanced observability:** Real-time workflow visualization
195
+
196
+ ### Version 3.0.0 (Planned Q3 2026 - BREAKING)
197
+
198
+ - **Agent auto-discovery:** Agents register themselves via manifest files
199
+ - **Dynamic contract negotiation:** Agents specify required context dynamically
200
+ - **Plugin system:** Third-party agents can be added without modifying CLAUDE.md
201
+
202
+ ---
203
+
204
+ ## Migration Guide
205
+
206
+ ### Migrating from 1.x to 2.0
207
+
208
+ **What changed:**
209
+
210
+ 1. **CLAUDE.md is now modular:**
211
+ - The file is 196 lines instead of 380 lines
212
+ - Detailed docs moved to `.claude/docs/*.md`
213
+
214
+ 2. **Core Principle #1 updated:**
215
+ - OLD: "ZERO Direct Execution" (orchestrator never executes technical work)
216
+ - NEW: "Selective Delegation" (orchestrator executes SIMPLE ops, delegates COMPLEX workflows)
217
+
218
+ 3. **Git operations clarified:**
219
+ - Orchestrator CAN do ad-hoc commits ("commitea los cambios")
220
+ - Agents do commits as part of realization workflows
221
+ - Both MUST use `commit_validator.py`
222
+
223
+ **Breaking changes:**
224
+
225
+ - None (backward compatible). Orchestrator behavior remains the same, only documentation structure changed.
226
+
227
+ **Action required:**
228
+
229
+ - None. System continues to work as before.
230
+
231
+ **Recommended:**
232
+
233
+ - Read `.claude/docs/orchestration-workflow.md` to understand full Phase 0-6 workflow
234
+ - Review `.claude/docs/git-standards.md` for complete commit standards
235
+ - Check `.claude/docs/agent-catalog.md` for detailed agent capabilities
236
+
237
+ ---
238
+
239
+ ## Versioning Policy
240
+
241
+ ### Version Number Format: MAJOR.MINOR.PATCH
242
+
243
+ - **MAJOR:** Breaking changes to orchestrator behavior (requires agent updates, system changes)
244
+ - **MINOR:** New features, sections, or substantial improvements (backward compatible)
245
+ - **PATCH:** Bug fixes, clarifications, typos (backward compatible)
246
+
247
+ ### Examples
248
+
249
+ - Adding new agent: MINOR (e.g., 2.0.0 → 2.1.0)
250
+ - Changing core principle: MAJOR (e.g., 2.1.0 → 3.0.0)
251
+ - Fixing typo in docs: PATCH (e.g., 2.1.0 → 2.1.1)
252
+ - Refactoring structure (like 2.0.0): MAJOR (changed from monolith to modular)
253
+
254
+ ---
255
+
256
+ ## Contributing
257
+
258
+ ### How to Update CLAUDE.md
259
+
260
+ 1. **For small changes (typos, clarifications):**
261
+ - Edit `CLAUDE.md` directly
262
+ - Increment PATCH version in frontmatter
263
+ - Add entry to this CHANGELOG under "Unreleased"
264
+
265
+ 2. **For new sections or features:**
266
+ - Decide if belongs in `CLAUDE.md` (core instructions) or `.claude/docs/*.md` (details)
267
+ - If modular doc, create/update appropriate file in `.claude/docs/`
268
+ - If core instruction, update `CLAUDE.md` and add reference to modular doc
269
+ - Increment MINOR version in frontmatter
270
+ - Add entry to this CHANGELOG under "Unreleased"
271
+
272
+ 3. **For breaking changes:**
273
+ - Discuss with team first (impacts orchestrator behavior)
274
+ - Update `CLAUDE.md` and related docs
275
+ - Increment MAJOR version in frontmatter
276
+ - Add entry to this CHANGELOG under "Unreleased" with **BREAKING** tag
277
+ - Create migration guide if needed
278
+
279
+ ### Testing Changes
280
+
281
+ Before committing changes to CLAUDE.md:
282
+
283
+ 1. **Run validation script:**
284
+ ```bash
285
+ python3 .claude/scripts/validate-claude-md.py
286
+ ```
287
+
288
+ 2. **Check line count:**
289
+ ```bash
290
+ wc -l CLAUDE.md
291
+ # Should be < 250 lines
292
+ ```
293
+
294
+ 3. **Test with orchestrator:**
295
+ - Start Claude Code session
296
+ - Verify CLAUDE.md is loaded correctly
297
+ - Test sample workflows (routing, clarification, approval)
298
+
299
+ 4. **Run test suite:**
300
+ ```bash
301
+ pytest .claude/tests/ -v
302
+ ```
303
+
304
+ ---
305
+
306
+ ## Maintainers
307
+
308
+ - **Primary:** Jorge Aguilar (jaguilar@aaxis.com)
309
+ - **Contributors:** Claude Code Agent Swarm
310
+
311
+ ---
312
+
313
+ ## License
314
+
315
+ Internal documentation for Aaxis RnD team. Not for external distribution.
package/CLAUDE.md ADDED
@@ -0,0 +1,154 @@
1
+ ---
2
+ version: 2.1.0
3
+ last_updated: 2025-11-07
4
+ description: Orchestrator instructions for Claude Code agent system
5
+ maintainer: jaguilar@aaxis.com
6
+ changelog: .claude/CHANGELOG.md
7
+ ---
8
+
9
+ # CLAUDE.md
10
+
11
+ Guidance for Claude Code orchestrator working in this repository.
12
+
13
+ ## Language Policy
14
+
15
+ - **Technical Documentation:** All code, commits, technical documentation, and system artifacts MUST be in English.
16
+ - **Chat Interactions:** Always respond to users in Spanish during chat conversations.
17
+
18
+ ## Core Operating Principles
19
+
20
+ ### Rule 1.0 [P0]: Selective Delegation
21
+ - **COMPLEX workflows** (multi-step, infrastructure, deployments) → Delegate to specialist agents
22
+ - **SIMPLE operations** (atomic commits, file edits, queries) → Execute directly
23
+ - **Default:** When in doubt, delegate (safer)
24
+
25
+ ### Rule 2.0 [P0]: Context Provisioning
26
+ - Use `context_provider.py` to build agent payload (ONLY for project agents)
27
+ - Meta-agents receive manual context in prompt
28
+
29
+ ### Rule 3.0 [P0]: Two-Phase Workflow for Infrastructure
30
+ - **Phase 1 (Planning):** Agent generates code and plan
31
+ - **Phase 2 (Realization):** After user approval, agent persists and applies
32
+ - **Applies to:** Infrastructure changes, deployments, T3 operations
33
+
34
+ ### Rule 4.0 [P1]: Execution Standards
35
+ - Use native tools (`Write`, `Read`, `Edit`, `Grep`) over bash redirections
36
+ - Execute simple commands separately (`cd /path` then `git status`, NOT chained with `&&`)
37
+ - Permission priority: `deny` > `ask (specific)` > `allow (generic)`
38
+
39
+ ## Orchestrator Workflow
40
+
41
+ **See:** `.claude/config/orchestration-workflow.md` for complete details.
42
+
43
+ ### Rule 5.0 [P0]: Six-Phase Workflow
44
+
45
+ | Phase | Action | Tool | Mandatory |
46
+ |-------|--------|------|-----------|
47
+ | 0 | Clarification (if ambiguous) | `clarify_engine.py` | Conditional |
48
+ | 1 | Route to agent | `agent_router.py` | Yes |
49
+ | 2 | Provision context | `context_provider.py` | Yes |
50
+ | 3 | Invoke (Planning) | `Task` tool | Yes |
51
+ | 4 | Approval Gate | `approval_gate.py` | **Yes (T3)** |
52
+ | 5 | Realization | `Task` tool (re-invoke) | Yes |
53
+ | 6 | Update SSOT | Edit `project-context.json`, `tasks.md` | Yes |
54
+
55
+ ### Rule 5.1 [P0]: Approval Gate Enforcement
56
+ - Phase 4 CANNOT be skipped for T3 operations
57
+ - Phase 5 requires `validation["approved"] == True`
58
+ - Phase 6 updates MUST complete after successful realization
59
+
60
+ ## Git Operations
61
+
62
+ ### Rule 6.0 [P0]: Commit Responsibility
63
+
64
+ | Scenario | Handler | Reason |
65
+ |----------|---------|--------|
66
+ | Ad-hoc commits ("commitea los cambios") | Orchestrator | Simple, atomic |
67
+ | Infrastructure workflow commits | Agent (terraform/gitops) | Part of realization |
68
+ | PR creation | Orchestrator | Simple ops (commit + push + gh) |
69
+
70
+ ### Rule 6.1 [P0]: Universal Validation
71
+ - **ALL commits** (orchestrator + agents) MUST validate via `commit_validator.safe_validate_before_commit(msg)`
72
+ - **Format:** Conventional Commits `<type>(<scope>): <description>`
73
+ - **Max:** 72 chars, imperative mood, no period
74
+ - **Forbidden:** Claude Code attribution footers
75
+
76
+ **Complete spec:** `.claude/config/git-standards.md`
77
+ **Config:** `.claude/config/git_standards.json`
78
+
79
+ ## Context Contracts
80
+
81
+ **See:** `.claude/config/context-contracts.md` for complete contracts.
82
+
83
+ | Agent | Required Context |
84
+ |-------|-----------------|
85
+ | terraform-architect | project_details, terraform_infrastructure, operational_guidelines |
86
+ | gitops-operator | project_details, gitops_configuration, cluster_details, operational_guidelines |
87
+ | gcp/aws-troubleshooter | project_details, terraform_infrastructure, gitops_configuration, application_services |
88
+ | devops-developer | project_details, operational_guidelines |
89
+ | claude-architect | Manual context (system paths, logs, tests) |
90
+
91
+ ## Agent System
92
+
93
+ **See:** `.claude/config/agent-catalog.md` for full capabilities.
94
+
95
+ ### Project Agents (use context_provider.py)
96
+
97
+ | Agent | Primary Role | Security Tier |
98
+ |-------|--------------|---------------|
99
+ | **terraform-architect** | Terraform/Terragrunt operations | T0-T3 (apply with approval) |
100
+ | **gitops-operator** | Kubernetes/Flux deployments | T0-T3 (push with approval) |
101
+ | **gcp-troubleshooter** | GCP diagnostics | T0-T2 (read-only) |
102
+ | **aws-troubleshooter** | AWS diagnostics | T0-T2 (read-only) |
103
+ | **devops-developer** | Application build/test/debug | T0-T2 |
104
+
105
+ ### Meta-Agents (manual context in prompt)
106
+
107
+ | Agent | Primary Role |
108
+ |-------|--------------|
109
+ | **claude-architect** | System analysis & optimization |
110
+ | **Explore** | Codebase exploration |
111
+ | **Plan** | Implementation planning |
112
+
113
+ **Context pattern:**
114
+ - **Project agents:** `context_provider.py` generates payload automatically
115
+ - **Meta-agents:** Manual context in prompt (system paths, logs, tests)
116
+
117
+ ### Security Tiers
118
+
119
+ | Tier | Operations | Approval | Examples |
120
+ |------|-----------|----------|----------|
121
+ | **T0** | Read-only queries | No | `kubectl get`, `git status`, `terraform show` |
122
+ | **T1** | Local changes only | No | File edits, local commits |
123
+ | **T2** | Reversible remote ops | No | `git push` to feature branch |
124
+ | **T3** | Irreversible ops | **YES** | `git push` to main, `terraform apply`, `kubectl apply` |
125
+
126
+ ## Common Anti-Patterns
127
+
128
+ ### Rule 7.0 [P0]: Violations to Avoid
129
+
130
+ | ❌ DON'T | ✅ DO |
131
+ |----------|-------|
132
+ | Skip approval gate for T3 ops | Use `approval_gate.py` for ALL T3 operations |
133
+ | Use `context_provider.py` for meta-agents | Provide manual context in prompt for meta-agents |
134
+ | Chain bash with `&&` | Use native tools or separate commands |
135
+ | Proceed without approval (`validation["approved"]`) | Halt and require explicit user approval |
136
+ | Over-prompt agents with step-by-step instructions | Minimalist prompt: context + task only |
137
+ | Skip SSOT updates after realization | Update `project-context.json` and `tasks.md` |
138
+
139
+ ## System Paths
140
+
141
+ - **Agent system:** `/home/jaguilar/aaxis/rnd/repositories/.claude/`
142
+ - **Orchestrator:** `/home/jaguilar/aaxis/rnd/repositories/CLAUDE.md`
143
+ - **Tools:** `/home/jaguilar/aaxis/rnd/repositories/.claude/tools/`
144
+ - **Logs:** `/home/jaguilar/aaxis/rnd/repositories/.claude/logs/`
145
+ - **Tests:** `/home/jaguilar/aaxis/rnd/repositories/.claude/tests/`
146
+ - **Project SSOT:** `/home/jaguilar/aaxis/rnd/repositories/.claude/project-context.json`
147
+
148
+ ## References
149
+
150
+ - **Orchestration workflow:** `.claude/config/orchestration-workflow.md`
151
+ - **Git standards:** `.claude/config/git-standards.md`
152
+ - **Context contracts:** `.claude/config/context-contracts.md`
153
+ - **Agent catalog:** `.claude/config/agent-catalog.md`
154
+ - **Code examples:** `.claude/templates/code-examples/`
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jorge Aguilar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.