@jaguilar87/gaia 5.0.2 → 5.0.5

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 (154) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/ARCHITECTURE.md +0 -1
  4. package/CHANGELOG.md +110 -0
  5. package/INSTALL.md +0 -2
  6. package/README.md +1 -6
  7. package/bin/README.md +0 -1
  8. package/bin/cli/_install_helpers.py +1 -1
  9. package/bin/cli/approvals.py +23 -21
  10. package/bin/cli/cleanup.py +0 -1
  11. package/bin/cli/doctor.py +1 -1
  12. package/bin/cli/memory.py +2 -0
  13. package/bin/cli/update.py +1 -1
  14. package/bin/pre-publish-validate.js +48 -5
  15. package/config/README.md +22 -44
  16. package/config/surface-routing.json +0 -2
  17. package/dist/gaia-ops/.claude-plugin/plugin.json +1 -1
  18. package/dist/gaia-ops/config/README.md +22 -44
  19. package/dist/gaia-ops/config/surface-routing.json +0 -2
  20. package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +18 -0
  21. package/dist/gaia-ops/hooks/modules/agents/handoff_persister.py +214 -2
  22. package/dist/gaia-ops/hooks/modules/agents/response_contract.py +26 -0
  23. package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +15 -0
  24. package/dist/gaia-ops/hooks/modules/security/__init__.py +0 -5
  25. package/dist/gaia-ops/hooks/modules/security/approval_grants.py +124 -19
  26. package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +99 -7
  27. package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +127 -24
  28. package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +90 -55
  29. package/dist/gaia-ops/skills/README.md +1 -1
  30. package/dist/gaia-ops/skills/agent-contract-handoff/SKILL.md +3 -0
  31. package/dist/gaia-ops/skills/agent-response/SKILL.md +4 -2
  32. package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +1 -1
  33. package/dist/gaia-ops/skills/gaia-patterns/reference.md +2 -3
  34. package/dist/gaia-ops/skills/gaia-release/SKILL.md +60 -24
  35. package/dist/gaia-ops/skills/gaia-release/reference.md +35 -11
  36. package/dist/gaia-ops/skills/git-conventions/SKILL.md +6 -2
  37. package/dist/gaia-ops/skills/orchestrator-present-approval/SKILL.md +30 -7
  38. package/dist/gaia-ops/skills/orchestrator-present-approval/reference.md +32 -15
  39. package/dist/gaia-ops/skills/readme-writing/SKILL.md +1 -1
  40. package/dist/gaia-ops/skills/readme-writing/reference.md +0 -1
  41. package/dist/gaia-ops/skills/security-tiers/SKILL.md +5 -1
  42. package/dist/gaia-ops/skills/security-tiers/reference.md +3 -1
  43. package/dist/gaia-ops/skills/subagent-request-approval/SKILL.md +43 -6
  44. package/dist/gaia-ops/skills/subagent-request-approval/reference.md +66 -16
  45. package/dist/gaia-ops/tools/context/README.md +1 -1
  46. package/dist/gaia-ops/tools/gaia_simulator/extractor.py +0 -1
  47. package/dist/gaia-ops/tools/scan/ui.py +20 -4
  48. package/dist/gaia-ops/tools/scan/verify.py +3 -3
  49. package/dist/gaia-ops/tools/validation/README.md +15 -24
  50. package/dist/gaia-security/.claude-plugin/plugin.json +1 -1
  51. package/dist/gaia-security/hooks/modules/agents/contract_validator.py +18 -0
  52. package/dist/gaia-security/hooks/modules/agents/handoff_persister.py +214 -2
  53. package/dist/gaia-security/hooks/modules/agents/response_contract.py +26 -0
  54. package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +15 -0
  55. package/dist/gaia-security/hooks/modules/security/__init__.py +0 -5
  56. package/dist/gaia-security/hooks/modules/security/approval_grants.py +124 -19
  57. package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +99 -7
  58. package/dist/gaia-security/hooks/modules/tools/bash_validator.py +127 -24
  59. package/dist/gaia-security/hooks/modules/validation/commit_validator.py +90 -55
  60. package/gaia/state/transitions.py +4 -4
  61. package/gaia/store/writer.py +56 -0
  62. package/hooks/modules/README.md +2 -4
  63. package/hooks/modules/agents/contract_validator.py +18 -0
  64. package/hooks/modules/agents/handoff_persister.py +214 -2
  65. package/hooks/modules/agents/response_contract.py +26 -0
  66. package/hooks/modules/agents/transcript_reader.py +15 -0
  67. package/hooks/modules/security/__init__.py +0 -5
  68. package/hooks/modules/security/approval_grants.py +124 -19
  69. package/hooks/modules/security/mutative_verbs.py +99 -7
  70. package/hooks/modules/tools/bash_validator.py +127 -24
  71. package/hooks/modules/validation/commit_validator.py +90 -55
  72. package/index.js +2 -12
  73. package/package.json +4 -6
  74. package/pyproject.toml +3 -3
  75. package/scripts/bootstrap_database.sh +88 -439
  76. package/scripts/check_schema_drift.py +208 -0
  77. package/scripts/migrations/README.md +78 -28
  78. package/scripts/migrations/schema.checksum +8 -0
  79. package/scripts/release-prepare.mjs +199 -0
  80. package/skills/README.md +1 -1
  81. package/skills/agent-contract-handoff/SKILL.md +3 -0
  82. package/skills/agent-response/SKILL.md +4 -2
  83. package/skills/gaia-patterns/SKILL.md +1 -1
  84. package/skills/gaia-patterns/reference.md +2 -3
  85. package/skills/gaia-release/SKILL.md +60 -24
  86. package/skills/gaia-release/reference.md +35 -11
  87. package/skills/git-conventions/SKILL.md +6 -2
  88. package/skills/orchestrator-present-approval/SKILL.md +30 -7
  89. package/skills/orchestrator-present-approval/reference.md +32 -15
  90. package/skills/readme-writing/SKILL.md +1 -1
  91. package/skills/readme-writing/reference.md +0 -1
  92. package/skills/security-tiers/SKILL.md +5 -1
  93. package/skills/security-tiers/reference.md +3 -1
  94. package/skills/subagent-request-approval/SKILL.md +43 -6
  95. package/skills/subagent-request-approval/reference.md +66 -16
  96. package/tools/context/README.md +1 -1
  97. package/tools/gaia_simulator/extractor.py +0 -1
  98. package/tools/scan/ui.py +20 -4
  99. package/tools/scan/verify.py +3 -3
  100. package/tools/validation/README.md +15 -24
  101. package/commands/README.md +0 -64
  102. package/commands/gaia.md +0 -37
  103. package/commands/scan-project.md +0 -74
  104. package/config/crons-schema.md +0 -81
  105. package/config/git_standards.json +0 -72
  106. package/dist/gaia-ops/commands/gaia.md +0 -37
  107. package/dist/gaia-ops/config/crons-schema.md +0 -81
  108. package/dist/gaia-ops/config/git_standards.json +0 -72
  109. package/dist/gaia-ops/hooks/modules/security/gitops_validator.py +0 -179
  110. package/dist/gaia-ops/tools/agentic-loop/decide-status.py +0 -210
  111. package/dist/gaia-ops/tools/agentic-loop/parse-metric.py +0 -106
  112. package/dist/gaia-ops/tools/agentic-loop/record-iteration.py +0 -223
  113. package/dist/gaia-security/hooks/modules/security/gitops_validator.py +0 -179
  114. package/git-hooks/commit-msg +0 -41
  115. package/hooks/modules/security/gitops_validator.py +0 -179
  116. package/scripts/migrations/v10_to_v11.sql +0 -170
  117. package/scripts/migrations/v10_to_v11_fresh.sql +0 -18
  118. package/scripts/migrations/v11_to_v12.sql +0 -195
  119. package/scripts/migrations/v11_to_v12_fresh.sql +0 -19
  120. package/scripts/migrations/v12_to_v13.sql +0 -48
  121. package/scripts/migrations/v12_to_v13_fresh.sql +0 -17
  122. package/scripts/migrations/v13_to_v14.sql +0 -44
  123. package/scripts/migrations/v13_to_v14_fresh.sql +0 -17
  124. package/scripts/migrations/v14_to_v15.sql +0 -71
  125. package/scripts/migrations/v14_to_v15_fresh.sql +0 -19
  126. package/scripts/migrations/v15_to_v16.sql +0 -57
  127. package/scripts/migrations/v15_to_v16_fresh.sql +0 -18
  128. package/scripts/migrations/v16_to_v17.sql +0 -51
  129. package/scripts/migrations/v16_to_v17_fresh.sql +0 -18
  130. package/scripts/migrations/v17_to_v18.sql +0 -66
  131. package/scripts/migrations/v17_to_v18_fresh.sql +0 -24
  132. package/scripts/migrations/v1_to_v2.sql +0 -97
  133. package/scripts/migrations/v2_to_v3.sql +0 -68
  134. package/scripts/migrations/v2_to_v3_merge.sql +0 -69
  135. package/scripts/migrations/v3_to_v4.sql +0 -67
  136. package/scripts/migrations/v3_to_v4_fresh.sql +0 -20
  137. package/scripts/migrations/v4_to_v5.sql +0 -55
  138. package/scripts/migrations/v4_to_v5_fresh.sql +0 -20
  139. package/scripts/migrations/v5_to_v6.sql +0 -48
  140. package/scripts/migrations/v5_to_v6_fresh.sql +0 -17
  141. package/scripts/migrations/v6_to_v7.sql +0 -26
  142. package/scripts/migrations/v6_to_v7_fresh.sql +0 -13
  143. package/scripts/migrations/v7_to_v8.sql +0 -44
  144. package/scripts/migrations/v7_to_v8_fresh.sql +0 -14
  145. package/scripts/migrations/v8_to_v9.sql +0 -87
  146. package/scripts/migrations/v8_to_v9_fresh.sql +0 -15
  147. package/scripts/migrations/v9_to_v10.sql +0 -109
  148. package/scripts/migrations/v9_to_v10_episodes_workspace.sql +0 -109
  149. package/scripts/migrations/v9_to_v10_fresh.sql +0 -18
  150. package/templates/README.md +0 -70
  151. package/templates/managed-settings.template.json +0 -43
  152. package/tools/agentic-loop/decide-status.py +0 -210
  153. package/tools/agentic-loop/parse-metric.py +0 -106
  154. package/tools/agentic-loop/record-iteration.py +0 -223
package/tools/scan/ui.py CHANGED
@@ -16,6 +16,22 @@ import sys
16
16
  from typing import Any, Dict, List, Optional
17
17
 
18
18
 
19
+ # ---------------------------------------------------------------------------
20
+ # Glyphs
21
+ #
22
+ # Hoisted to module-level constants so they are never written as escape
23
+ # sequences *inside* an f-string replacement field. A backslash within an
24
+ # f-string expression (e.g. f"{self._green('◇')}") is a SyntaxError on
25
+ # Python 3.11 (our declared minimum); it is only permitted on 3.12+ via PEP
26
+ # 701. Referencing a bare name inside the braces keeps the same rendered
27
+ # output while staying 3.11-compatible.
28
+ # ---------------------------------------------------------------------------
29
+
30
+ _GLYPH_DIAMOND_OUTLINE = "◇" # ◇
31
+ _GLYPH_WARNING = "⚠" # ⚠
32
+ _GLYPH_CORNER_BL = "└" # └
33
+
34
+
19
35
  # ---------------------------------------------------------------------------
20
36
  # ANSI color helpers
21
37
  # ---------------------------------------------------------------------------
@@ -119,7 +135,7 @@ class RailUI:
119
135
  name: Section title (e.g. "Stack", "Infrastructure").
120
136
  lines: Detail lines to display under the section.
121
137
  """
122
- self._write(f"{self._green('\u25c7')} {self._cyan(name)}")
138
+ self._write(f"{self._green(_GLYPH_DIAMOND_OUTLINE)} {self._cyan(name)}")
123
139
  for line in lines:
124
140
  self._write(f"{self._rail()} {line}")
125
141
  self._write(self._rail())
@@ -131,7 +147,7 @@ class RailUI:
131
147
  names: List of section names to join with middle-dot.
132
148
  """
133
149
  joined = self._cyan(" \u00b7 ".join(names))
134
- self._write(f"{self._green('\u25c7')} {joined}")
150
+ self._write(f"{self._green(_GLYPH_DIAMOND_OUTLINE)} {joined}")
135
151
  self._write(self._rail())
136
152
 
137
153
  def warning(self, count: int, messages: List[str]) -> None:
@@ -141,7 +157,7 @@ class RailUI:
141
157
  count: Total number of warnings.
142
158
  messages: Warning messages to display.
143
159
  """
144
- self._write(f"{self._yellow('\u26a0')} {self._yellow(f'Warnings ({count})')}")
160
+ self._write(f"{self._yellow(_GLYPH_WARNING)} {self._yellow(f'Warnings ({count})')}")
145
161
  for msg in messages:
146
162
  self._write(f"{self._rail()} {msg}")
147
163
  self._write(self._rail())
@@ -193,7 +209,7 @@ class RailUI:
193
209
  Args:
194
210
  message: Footer message text.
195
211
  """
196
- self._write(f"{self._dim('\u2514')} {message}")
212
+ self._write(f"{self._dim(_GLYPH_CORNER_BL)} {message}")
197
213
 
198
214
 
199
215
  # ---------------------------------------------------------------------------
@@ -45,8 +45,8 @@ class CheckResult:
45
45
  def check_symlinks(project_root: Path) -> CheckResult:
46
46
  """Verify that all expected symlinks exist in .claude/.
47
47
 
48
- Checks for: agents, tools, hooks, commands, templates, config,
49
- skills, CHANGELOG.md (8 total).
48
+ Checks for: agents, tools, hooks, commands, config,
49
+ skills, CHANGELOG.md (7 total).
50
50
 
51
51
  Args:
52
52
  project_root: Project root directory.
@@ -56,7 +56,7 @@ def check_symlinks(project_root: Path) -> CheckResult:
56
56
  """
57
57
  names = [
58
58
  "agents", "tools", "hooks", "commands",
59
- "templates", "config", "skills",
59
+ "config", "skills",
60
60
  "CHANGELOG.md",
61
61
  ]
62
62
  valid = 0
@@ -25,7 +25,7 @@ without requiring explicit imports in agent code.
25
25
  - ✅ Subject line rules (max 72 chars, no period at end)
26
26
  - ✅ Forbidden footers (no "Generated with" footers)
27
27
 
28
- **Configuration:** `.claude/config/git_standards.json` (SSOT)
28
+ **Configuration:** Standards are inlined as module-level constants in `hooks/modules/validation/commit_validator.py` (`TYPE_ALLOWED`, `SUBJECT_MAX_LENGTH`, `SUBJECT_RULES`, `BODY_MAX_LINE_LENGTH`, `ENFORCEMENT`). Forbidden-footer detection lives in `bash_validator`.
29
29
  **Logs:** `.claude/logs/commit-violations.jsonl`
30
30
 
31
31
  ---
@@ -108,16 +108,11 @@ This validation module works with skills in a **hybrid model**:
108
108
 
109
109
  ```
110
110
  ┌──────────────────────────────────────────────────────────┐
111
- │ config/git_standards.json (SSOT) │
112
- │ - Conventional commit types │
113
- │ - Forbidden footers │
114
- │ - Max lengths │
115
- └──────────────────────────────────────────────────────────┘
116
-
117
-
118
- ┌──────────────────────────────────────────────────────────┐
119
111
  │ hooks/modules/validation/ (Commit Validation) │
120
112
  │ └─ commit_validator.py │
113
+ │ ├─ Standards inlined as module-level constants │
114
+ │ │ (types, subject/body max lengths, rules) │
115
+ │ ├─ Forbidden footers handled by bash_validator │
121
116
  │ └─ Used by bash_validator.py only │
122
117
  └──────────────────────────────────────────────────────────┘
123
118
 
@@ -178,24 +173,20 @@ Note: commit_validator.py moved to hooks/modules/validation/
178
173
 
179
174
  ## Configuration
180
175
 
181
- **Git Standards:** `.claude/config/git_standards.json`
176
+ **Git Standards:** Inlined as module-level constants in `hooks/modules/validation/commit_validator.py`.
182
177
 
183
178
  Example:
184
- ```json
185
- {
186
- "commit_message": {
187
- "type_allowed": ["feat", "fix", "refactor", "docs", "test", "chore"],
188
- "subject_max_length": 72,
189
- "footer_forbidden": ["Generated with Claude Code"]
190
- },
191
- "enforcement": {
192
- "enabled": true,
193
- "block_on_failure": true,
194
- "log_violations": true
195
- }
196
- }
179
+ ```python
180
+ TYPE_ALLOWED = ("feat", "fix", "refactor", "docs", "test", "chore",
181
+ "ci", "perf", "style", "build")
182
+ SUBJECT_MAX_LENGTH = 72
183
+ SUBJECT_RULES = {"no_period_at_end": True, "no_emoji": True,
184
+ "imperative_mood": True, "capitalize_first_letter": False}
185
+ ENFORCEMENT = {"enabled": True, "block_on_failure": True, "log_violations": True}
197
186
  ```
198
187
 
188
+ Forbidden-footer detection lives, hardcoded, in `bash_validator`.
189
+
199
190
  ---
200
191
 
201
192
  ## Logs
@@ -232,7 +223,7 @@ Example entry:
232
223
 
233
224
  ## See Also
234
225
 
235
- - `.claude/config/git_standards.json` - Git standards configuration
226
+ - `hooks/modules/validation/commit_validator.py` - Git standards (inlined constants)
236
227
  - `.claude/skills/subagent-request-approval/SKILL.md` - Approval-request workflow patterns
237
228
  - `.claude/skills/execution/SKILL.md` - Execution workflow patterns
238
229
  - `CLAUDE.md` - Orchestrator protocol with T3 workflow
@@ -1,64 +0,0 @@
1
- # Commands
2
-
3
- Slash commands are direct shortcuts into Gaia's orchestration layer. When you type `/gaia` or `/scan-project`, Claude Code detects the slash prefix, finds the matching `.md` file in this directory, and injects its contents as instructions to the currently active orchestrator. There is no subagent spawn — the orchestrator reads the command file and executes inline.
4
-
5
- This makes slash commands different from agent dispatch. An agent dispatch creates a new Claude Code subprocess with its own identity, skills, and tool set. A slash command is a context injection into the orchestrator's current session. Think of it as a macro: the `.md` file says "when the user invokes this command, do the following." The orchestrator follows those instructions directly.
6
-
7
- The practical implication is that slash commands are best suited for tasks that the orchestrator can complete by delegating to existing agents — not tasks that require a new agent identity. They are entry points, not agents.
8
-
9
- ## Cuándo se activa
10
-
11
- ```
12
- User types /command-name [args]
13
- |
14
- Claude Code detects / prefix
15
- |
16
- Looks up commands/<command-name>.md
17
- |
18
- Injects the file's contents into the orchestrator's active context
19
- |
20
- Orchestrator reads the command instructions and executes them
21
- (may dispatch agents, call tools, or respond directly)
22
- |
23
- Result returned to user in the current session
24
- ```
25
-
26
- No subagent is spawned. No new identity is loaded. The orchestrator handles execution within its current session using its existing tool set and the instructions from the command file.
27
-
28
- ## Qué hay aquí
29
-
30
- ```
31
- commands/
32
- ├── gaia.md # /gaia — invoke the Gaia meta-agent (gaia-system) for system work
33
- └── scan-project.md # /scan-project — scan codebase, detect stack, update ~/.gaia/gaia.db
34
- ```
35
-
36
- Note: a `/gaia-plan` command is referenced in some older documentation but the file does not exist here. Planning is handled conversationally through the orchestrator and the `gaia-planner` agent — not via a slash command.
37
-
38
- ## Convenciones
39
-
40
- **File format:**
41
-
42
- ```markdown
43
- ---
44
- name: command-name
45
- description: One-line description shown in Claude Code autocomplete
46
- ---
47
-
48
- # Command Name
49
-
50
- [Instructions the orchestrator follows when this command is invoked]
51
- ```
52
-
53
- **Registration:** Each command file must also be listed in `build/gaia-ops.manifest.json` under the `commands` array. A file that exists here but is not in the manifest will not appear in Claude Code's slash command list.
54
-
55
- **Scope:** Commands inject instructions into the orchestrator. If the task requires domain work (Terraform, code changes, cloud ops), the command's instructions should dispatch the appropriate agent — the command itself should not attempt domain execution.
56
-
57
- **Arguments:** Slash commands can receive arguments after the command name (e.g., `/gaia-plan Add OAuth2 support`). The command's `.md` file can reference these as context, and the orchestrator receives them as part of the injected content.
58
-
59
- ## Ver también
60
-
61
- - [`build/gaia-ops.manifest.json`](../build/gaia-ops.manifest.json) — command registration
62
- - [`agents/gaia-system.md`](../agents/gaia-system.md) — the Gaia meta-agent invoked by `/gaia`
63
- - [`agents/gaia-orchestrator.md`](../agents/gaia-orchestrator.md) — orchestrator that executes command instructions
64
- - [`skills/gaia-planner/SKILL.md`](../skills/gaia-planner/SKILL.md) — planning workflow (used by gaia-planner agent, not a slash command)
package/commands/gaia.md DELETED
@@ -1,37 +0,0 @@
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 `agent_contract_handoff` block with findings and status.
36
-
37
- $ARGUMENTS
@@ -1,74 +0,0 @@
1
- ---
2
- name: scan-project
3
- description: Scan the current project to detect stack, infrastructure, tools, and update the project context in ~/.gaia/gaia.db
4
- allowed-tools:
5
- - Bash(*)
6
- - Read
7
- ---
8
-
9
- Run the gaia modular project scanner to detect the project stack, infrastructure,
10
- git setup, CLI tools, orchestration, and runtime environment. The scanner writes
11
- structured, machine-readable context to `~/.gaia/gaia.db` that agents consume.
12
-
13
- No `project-context.json` file is generated. The DB is the canonical source of
14
- truth. Use `gaia context show` to inspect the stored context.
15
-
16
- ## What this does
17
-
18
- The scanner runs 6 independent modules in parallel:
19
- - **stack** -- languages, frameworks, package managers
20
- - **git** -- platform, remotes, branching strategy, monorepo detection
21
- - **infrastructure** -- cloud providers, IaC, CI/CD, containers
22
- - **orchestration** -- Kubernetes, GitOps (Flux/Argo), Helm charts
23
- - **tools** -- installed CLI tools (kubectl, terraform, gcloud, etc.)
24
- - **environment** -- OS info, language runtimes, .env file patterns
25
-
26
- It preserves agent-enriched sections (data added by agents via update_contracts)
27
- and merges new scan data with existing context using section-ownership rules.
28
- Projects that temporarily disappear are soft-deleted (`status='missing'`) and
29
- reactivated when they reappear -- data is never purged.
30
-
31
- ## How to run
32
-
33
- ```bash
34
- gaia scan
35
- ```
36
-
37
- Optional flags:
38
- - `--verbose` -- show scanner-by-scanner progress
39
- - `--scanners stack,git` -- run only specific scanners
40
- - `--check-staleness` -- skip scan if context is already fresh (<24h old)
41
-
42
- $ARGUMENTS
43
-
44
- ## Expected output
45
-
46
- The CLI prints a JSON summary to stdout:
47
-
48
- ```
49
- {
50
- "status": "success",
51
- "scanner_version": "0.1.0",
52
- "sections_updated": ["project_identity", "stack", "git", ...],
53
- "scanners_run": 6,
54
- "warnings_count": 0,
55
- "duration_ms": 2500.0
56
- }
57
- ```
58
-
59
- A human-readable summary is also printed to stderr showing scanner count,
60
- section count, warnings, and elapsed time.
61
-
62
- ## After scanning
63
-
64
- Inspect the stored context:
65
-
66
- ```bash
67
- gaia context show
68
- ```
69
-
70
- Or query a specific section:
71
-
72
- ```bash
73
- gaia context get stack
74
- ```
@@ -1,81 +0,0 @@
1
- # Crons Persistence Schema
2
-
3
- **Version:** 1
4
- **File location:** `.claude/crons.json`
5
- **Owner:** Gaia cron persistence system
6
-
7
- ---
8
-
9
- ## Schema
10
-
11
- ```json
12
- {
13
- "crons": [
14
- {
15
- "name": "check-email",
16
- "interval_minutes": 180,
17
- "prompt": "Revisa el correo y haz triage según gmail-triage skill",
18
- "enabled": true,
19
- "created": "2026-04-13T20:00:00Z",
20
- "last_run": "2026-04-13T23:00:00Z"
21
- }
22
- ],
23
- "version": 1
24
- }
25
- ```
26
-
27
- ## Field Definitions
28
-
29
- | Field | Type | Required | Description |
30
- |-------|------|----------|-------------|
31
- | `name` | string | yes | Unique identifier for the cron. Used as the dedup key during restore. Must be URL-safe (alphanumeric, hyphens). |
32
- | `interval_minutes` | integer | yes | How often the cron fires, in minutes. Mirrors CronCreate interval. |
33
- | `prompt` | string | yes | The exact prompt sent to the orchestrator on each tick. |
34
- | `enabled` | boolean | yes | If false, the cron is skipped during restore. Allows pausing without deletion. |
35
- | `created` | string (ISO 8601 UTC) | yes | Timestamp when the cron was first created. Set once, never updated. |
36
- | `last_run` | string (ISO 8601 UTC) or null | yes | Timestamp of the most recent execution. Null if the cron has never run. |
37
-
38
- ## Top-level Fields
39
-
40
- | Field | Type | Description |
41
- |-------|------|-------------|
42
- | `crons` | array | The list of persisted cron entries. May be empty. |
43
- | `version` | integer | Schema version. Currently 1. Increment when field semantics change. |
44
-
45
- ## Constraints
46
-
47
- - `name` must be unique within the `crons` array. Duplicate names are invalid.
48
- - `interval_minutes` must be a positive integer greater than 0.
49
- - `last_run` is `null` when the cron has been created but has not yet fired.
50
-
51
- ## Example: Multiple Crons
52
-
53
- ```json
54
- {
55
- "crons": [
56
- {
57
- "name": "check-email",
58
- "interval_minutes": 180,
59
- "prompt": "Revisa el correo y haz triage según gmail-triage skill",
60
- "enabled": true,
61
- "created": "2026-04-13T20:00:00Z",
62
- "last_run": "2026-04-13T23:00:00Z"
63
- },
64
- {
65
- "name": "drift-monitor",
66
- "interval_minutes": 60,
67
- "prompt": "Check for infrastructure drift in the current project",
68
- "enabled": false,
69
- "created": "2026-04-10T10:00:00Z",
70
- "last_run": null
71
- }
72
- ],
73
- "version": 1
74
- }
75
- ```
76
-
77
- ## File Location
78
-
79
- The file lives at `.claude/crons.json`, resolved relative to the active project root (same directory where `.claude/` is found). The path module `find_claude_dir()` from `hooks/modules/core/paths.py` provides the canonical `.claude/` path.
80
-
81
- For projects that use `CLAUDE_PLUGIN_DATA`, the file lives under that data directory instead, consistent with how other persisted data (logs, sessions, grants) is stored.
@@ -1,72 +0,0 @@
1
- {
2
- "commit_message": {
3
- "format": "conventional_commits",
4
- "description": "Commit messages must follow Conventional Commits specification",
5
-
6
- "type_allowed": [
7
- "feat",
8
- "fix",
9
- "refactor",
10
- "docs",
11
- "test",
12
- "chore",
13
- "ci",
14
- "perf",
15
- "style",
16
- "build"
17
- ],
18
-
19
- "scope_required": false,
20
- "scope_examples": ["helmrelease", "terraform", "pg-non-prod", "infrastructure"],
21
-
22
- "subject_max_length": 72,
23
- "subject_rules": {
24
- "capitalize_first_letter": false,
25
- "no_period_at_end": true,
26
- "imperative_mood": true,
27
- "no_emoji": true
28
- },
29
-
30
- "body_max_line_length": 72,
31
- "body_required": false,
32
-
33
- "footer_forbidden": [
34
- "Generated with Claude Code",
35
- "Co-Authored-By: Claude",
36
- "🤖 Generated with"
37
- ],
38
-
39
- "footer_allowed": [
40
- "BREAKING CHANGE:",
41
- "Refs:",
42
- "Closes:",
43
- "Fixes:",
44
- "Implements:",
45
- "See:"
46
- ],
47
-
48
- "examples_valid": [
49
- "feat(helmrelease): add Phase 3.3 services",
50
- "fix(pg-non-prod): correct API key environment variable mappings",
51
- "refactor: simplify context provider logic",
52
- "docs: update README with new workflow",
53
- "chore(deps): update terraform to v1.6.0"
54
- ],
55
-
56
- "examples_invalid": [
57
- "Added new feature",
58
- "Fixed bugs",
59
- "Updates",
60
- "feat: add feature\n\n🤖 Generated with Claude Code",
61
- "feat: add new feature 🚀",
62
- "fix: 🐛 correct bug"
63
- ]
64
- },
65
-
66
- "enforcement": {
67
- "enabled": true,
68
- "block_on_failure": true,
69
- "log_violations": true,
70
- "log_path": ".claude/logs/commit-violations.jsonl"
71
- }
72
- }
@@ -1,37 +0,0 @@
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 `agent_contract_handoff` block with findings and status.
36
-
37
- $ARGUMENTS
@@ -1,81 +0,0 @@
1
- # Crons Persistence Schema
2
-
3
- **Version:** 1
4
- **File location:** `.claude/crons.json`
5
- **Owner:** Gaia cron persistence system
6
-
7
- ---
8
-
9
- ## Schema
10
-
11
- ```json
12
- {
13
- "crons": [
14
- {
15
- "name": "check-email",
16
- "interval_minutes": 180,
17
- "prompt": "Revisa el correo y haz triage según gmail-triage skill",
18
- "enabled": true,
19
- "created": "2026-04-13T20:00:00Z",
20
- "last_run": "2026-04-13T23:00:00Z"
21
- }
22
- ],
23
- "version": 1
24
- }
25
- ```
26
-
27
- ## Field Definitions
28
-
29
- | Field | Type | Required | Description |
30
- |-------|------|----------|-------------|
31
- | `name` | string | yes | Unique identifier for the cron. Used as the dedup key during restore. Must be URL-safe (alphanumeric, hyphens). |
32
- | `interval_minutes` | integer | yes | How often the cron fires, in minutes. Mirrors CronCreate interval. |
33
- | `prompt` | string | yes | The exact prompt sent to the orchestrator on each tick. |
34
- | `enabled` | boolean | yes | If false, the cron is skipped during restore. Allows pausing without deletion. |
35
- | `created` | string (ISO 8601 UTC) | yes | Timestamp when the cron was first created. Set once, never updated. |
36
- | `last_run` | string (ISO 8601 UTC) or null | yes | Timestamp of the most recent execution. Null if the cron has never run. |
37
-
38
- ## Top-level Fields
39
-
40
- | Field | Type | Description |
41
- |-------|------|-------------|
42
- | `crons` | array | The list of persisted cron entries. May be empty. |
43
- | `version` | integer | Schema version. Currently 1. Increment when field semantics change. |
44
-
45
- ## Constraints
46
-
47
- - `name` must be unique within the `crons` array. Duplicate names are invalid.
48
- - `interval_minutes` must be a positive integer greater than 0.
49
- - `last_run` is `null` when the cron has been created but has not yet fired.
50
-
51
- ## Example: Multiple Crons
52
-
53
- ```json
54
- {
55
- "crons": [
56
- {
57
- "name": "check-email",
58
- "interval_minutes": 180,
59
- "prompt": "Revisa el correo y haz triage según gmail-triage skill",
60
- "enabled": true,
61
- "created": "2026-04-13T20:00:00Z",
62
- "last_run": "2026-04-13T23:00:00Z"
63
- },
64
- {
65
- "name": "drift-monitor",
66
- "interval_minutes": 60,
67
- "prompt": "Check for infrastructure drift in the current project",
68
- "enabled": false,
69
- "created": "2026-04-10T10:00:00Z",
70
- "last_run": null
71
- }
72
- ],
73
- "version": 1
74
- }
75
- ```
76
-
77
- ## File Location
78
-
79
- The file lives at `.claude/crons.json`, resolved relative to the active project root (same directory where `.claude/` is found). The path module `find_claude_dir()` from `hooks/modules/core/paths.py` provides the canonical `.claude/` path.
80
-
81
- For projects that use `CLAUDE_PLUGIN_DATA`, the file lives under that data directory instead, consistent with how other persisted data (logs, sessions, grants) is stored.
@@ -1,72 +0,0 @@
1
- {
2
- "commit_message": {
3
- "format": "conventional_commits",
4
- "description": "Commit messages must follow Conventional Commits specification",
5
-
6
- "type_allowed": [
7
- "feat",
8
- "fix",
9
- "refactor",
10
- "docs",
11
- "test",
12
- "chore",
13
- "ci",
14
- "perf",
15
- "style",
16
- "build"
17
- ],
18
-
19
- "scope_required": false,
20
- "scope_examples": ["helmrelease", "terraform", "pg-non-prod", "infrastructure"],
21
-
22
- "subject_max_length": 72,
23
- "subject_rules": {
24
- "capitalize_first_letter": false,
25
- "no_period_at_end": true,
26
- "imperative_mood": true,
27
- "no_emoji": true
28
- },
29
-
30
- "body_max_line_length": 72,
31
- "body_required": false,
32
-
33
- "footer_forbidden": [
34
- "Generated with Claude Code",
35
- "Co-Authored-By: Claude",
36
- "🤖 Generated with"
37
- ],
38
-
39
- "footer_allowed": [
40
- "BREAKING CHANGE:",
41
- "Refs:",
42
- "Closes:",
43
- "Fixes:",
44
- "Implements:",
45
- "See:"
46
- ],
47
-
48
- "examples_valid": [
49
- "feat(helmrelease): add Phase 3.3 services",
50
- "fix(pg-non-prod): correct API key environment variable mappings",
51
- "refactor: simplify context provider logic",
52
- "docs: update README with new workflow",
53
- "chore(deps): update terraform to v1.6.0"
54
- ],
55
-
56
- "examples_invalid": [
57
- "Added new feature",
58
- "Fixed bugs",
59
- "Updates",
60
- "feat: add feature\n\n🤖 Generated with Claude Code",
61
- "feat: add new feature 🚀",
62
- "fix: 🐛 correct bug"
63
- ]
64
- },
65
-
66
- "enforcement": {
67
- "enabled": true,
68
- "block_on_failure": true,
69
- "log_violations": true,
70
- "log_path": ".claude/logs/commit-violations.jsonl"
71
- }
72
- }