@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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/ARCHITECTURE.md +0 -1
- package/CHANGELOG.md +110 -0
- package/INSTALL.md +0 -2
- package/README.md +1 -6
- package/bin/README.md +0 -1
- package/bin/cli/_install_helpers.py +1 -1
- package/bin/cli/approvals.py +23 -21
- package/bin/cli/cleanup.py +0 -1
- package/bin/cli/doctor.py +1 -1
- package/bin/cli/memory.py +2 -0
- package/bin/cli/update.py +1 -1
- package/bin/pre-publish-validate.js +48 -5
- package/config/README.md +22 -44
- package/config/surface-routing.json +0 -2
- package/dist/gaia-ops/.claude-plugin/plugin.json +1 -1
- package/dist/gaia-ops/config/README.md +22 -44
- package/dist/gaia-ops/config/surface-routing.json +0 -2
- package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +18 -0
- package/dist/gaia-ops/hooks/modules/agents/handoff_persister.py +214 -2
- package/dist/gaia-ops/hooks/modules/agents/response_contract.py +26 -0
- package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +15 -0
- package/dist/gaia-ops/hooks/modules/security/__init__.py +0 -5
- package/dist/gaia-ops/hooks/modules/security/approval_grants.py +124 -19
- package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +99 -7
- package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +127 -24
- package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +90 -55
- package/dist/gaia-ops/skills/README.md +1 -1
- package/dist/gaia-ops/skills/agent-contract-handoff/SKILL.md +3 -0
- package/dist/gaia-ops/skills/agent-response/SKILL.md +4 -2
- package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +1 -1
- package/dist/gaia-ops/skills/gaia-patterns/reference.md +2 -3
- package/dist/gaia-ops/skills/gaia-release/SKILL.md +60 -24
- package/dist/gaia-ops/skills/gaia-release/reference.md +35 -11
- package/dist/gaia-ops/skills/git-conventions/SKILL.md +6 -2
- package/dist/gaia-ops/skills/orchestrator-present-approval/SKILL.md +30 -7
- package/dist/gaia-ops/skills/orchestrator-present-approval/reference.md +32 -15
- package/dist/gaia-ops/skills/readme-writing/SKILL.md +1 -1
- package/dist/gaia-ops/skills/readme-writing/reference.md +0 -1
- package/dist/gaia-ops/skills/security-tiers/SKILL.md +5 -1
- package/dist/gaia-ops/skills/security-tiers/reference.md +3 -1
- package/dist/gaia-ops/skills/subagent-request-approval/SKILL.md +43 -6
- package/dist/gaia-ops/skills/subagent-request-approval/reference.md +66 -16
- package/dist/gaia-ops/tools/context/README.md +1 -1
- package/dist/gaia-ops/tools/gaia_simulator/extractor.py +0 -1
- package/dist/gaia-ops/tools/scan/ui.py +20 -4
- package/dist/gaia-ops/tools/scan/verify.py +3 -3
- package/dist/gaia-ops/tools/validation/README.md +15 -24
- package/dist/gaia-security/.claude-plugin/plugin.json +1 -1
- package/dist/gaia-security/hooks/modules/agents/contract_validator.py +18 -0
- package/dist/gaia-security/hooks/modules/agents/handoff_persister.py +214 -2
- package/dist/gaia-security/hooks/modules/agents/response_contract.py +26 -0
- package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +15 -0
- package/dist/gaia-security/hooks/modules/security/__init__.py +0 -5
- package/dist/gaia-security/hooks/modules/security/approval_grants.py +124 -19
- package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +99 -7
- package/dist/gaia-security/hooks/modules/tools/bash_validator.py +127 -24
- package/dist/gaia-security/hooks/modules/validation/commit_validator.py +90 -55
- package/gaia/state/transitions.py +4 -4
- package/gaia/store/writer.py +56 -0
- package/hooks/modules/README.md +2 -4
- package/hooks/modules/agents/contract_validator.py +18 -0
- package/hooks/modules/agents/handoff_persister.py +214 -2
- package/hooks/modules/agents/response_contract.py +26 -0
- package/hooks/modules/agents/transcript_reader.py +15 -0
- package/hooks/modules/security/__init__.py +0 -5
- package/hooks/modules/security/approval_grants.py +124 -19
- package/hooks/modules/security/mutative_verbs.py +99 -7
- package/hooks/modules/tools/bash_validator.py +127 -24
- package/hooks/modules/validation/commit_validator.py +90 -55
- package/index.js +2 -12
- package/package.json +4 -6
- package/pyproject.toml +3 -3
- package/scripts/bootstrap_database.sh +88 -439
- package/scripts/check_schema_drift.py +208 -0
- package/scripts/migrations/README.md +78 -28
- package/scripts/migrations/schema.checksum +8 -0
- package/scripts/release-prepare.mjs +199 -0
- package/skills/README.md +1 -1
- package/skills/agent-contract-handoff/SKILL.md +3 -0
- package/skills/agent-response/SKILL.md +4 -2
- package/skills/gaia-patterns/SKILL.md +1 -1
- package/skills/gaia-patterns/reference.md +2 -3
- package/skills/gaia-release/SKILL.md +60 -24
- package/skills/gaia-release/reference.md +35 -11
- package/skills/git-conventions/SKILL.md +6 -2
- package/skills/orchestrator-present-approval/SKILL.md +30 -7
- package/skills/orchestrator-present-approval/reference.md +32 -15
- package/skills/readme-writing/SKILL.md +1 -1
- package/skills/readme-writing/reference.md +0 -1
- package/skills/security-tiers/SKILL.md +5 -1
- package/skills/security-tiers/reference.md +3 -1
- package/skills/subagent-request-approval/SKILL.md +43 -6
- package/skills/subagent-request-approval/reference.md +66 -16
- package/tools/context/README.md +1 -1
- package/tools/gaia_simulator/extractor.py +0 -1
- package/tools/scan/ui.py +20 -4
- package/tools/scan/verify.py +3 -3
- package/tools/validation/README.md +15 -24
- package/commands/README.md +0 -64
- package/commands/gaia.md +0 -37
- package/commands/scan-project.md +0 -74
- package/config/crons-schema.md +0 -81
- package/config/git_standards.json +0 -72
- package/dist/gaia-ops/commands/gaia.md +0 -37
- package/dist/gaia-ops/config/crons-schema.md +0 -81
- package/dist/gaia-ops/config/git_standards.json +0 -72
- package/dist/gaia-ops/hooks/modules/security/gitops_validator.py +0 -179
- package/dist/gaia-ops/tools/agentic-loop/decide-status.py +0 -210
- package/dist/gaia-ops/tools/agentic-loop/parse-metric.py +0 -106
- package/dist/gaia-ops/tools/agentic-loop/record-iteration.py +0 -223
- package/dist/gaia-security/hooks/modules/security/gitops_validator.py +0 -179
- package/git-hooks/commit-msg +0 -41
- package/hooks/modules/security/gitops_validator.py +0 -179
- package/scripts/migrations/v10_to_v11.sql +0 -170
- package/scripts/migrations/v10_to_v11_fresh.sql +0 -18
- package/scripts/migrations/v11_to_v12.sql +0 -195
- package/scripts/migrations/v11_to_v12_fresh.sql +0 -19
- package/scripts/migrations/v12_to_v13.sql +0 -48
- package/scripts/migrations/v12_to_v13_fresh.sql +0 -17
- package/scripts/migrations/v13_to_v14.sql +0 -44
- package/scripts/migrations/v13_to_v14_fresh.sql +0 -17
- package/scripts/migrations/v14_to_v15.sql +0 -71
- package/scripts/migrations/v14_to_v15_fresh.sql +0 -19
- package/scripts/migrations/v15_to_v16.sql +0 -57
- package/scripts/migrations/v15_to_v16_fresh.sql +0 -18
- package/scripts/migrations/v16_to_v17.sql +0 -51
- package/scripts/migrations/v16_to_v17_fresh.sql +0 -18
- package/scripts/migrations/v17_to_v18.sql +0 -66
- package/scripts/migrations/v17_to_v18_fresh.sql +0 -24
- package/scripts/migrations/v1_to_v2.sql +0 -97
- package/scripts/migrations/v2_to_v3.sql +0 -68
- package/scripts/migrations/v2_to_v3_merge.sql +0 -69
- package/scripts/migrations/v3_to_v4.sql +0 -67
- package/scripts/migrations/v3_to_v4_fresh.sql +0 -20
- package/scripts/migrations/v4_to_v5.sql +0 -55
- package/scripts/migrations/v4_to_v5_fresh.sql +0 -20
- package/scripts/migrations/v5_to_v6.sql +0 -48
- package/scripts/migrations/v5_to_v6_fresh.sql +0 -17
- package/scripts/migrations/v6_to_v7.sql +0 -26
- package/scripts/migrations/v6_to_v7_fresh.sql +0 -13
- package/scripts/migrations/v7_to_v8.sql +0 -44
- package/scripts/migrations/v7_to_v8_fresh.sql +0 -14
- package/scripts/migrations/v8_to_v9.sql +0 -87
- package/scripts/migrations/v8_to_v9_fresh.sql +0 -15
- package/scripts/migrations/v9_to_v10.sql +0 -109
- package/scripts/migrations/v9_to_v10_episodes_workspace.sql +0 -109
- package/scripts/migrations/v9_to_v10_fresh.sql +0 -18
- package/templates/README.md +0 -70
- package/templates/managed-settings.template.json +0 -43
- package/tools/agentic-loop/decide-status.py +0 -210
- package/tools/agentic-loop/parse-metric.py +0 -106
- 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(
|
|
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(
|
|
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(
|
|
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(
|
|
212
|
+
self._write(f"{self._dim(_GLYPH_CORNER_BL)} {message}")
|
|
197
213
|
|
|
198
214
|
|
|
199
215
|
# ---------------------------------------------------------------------------
|
package/tools/scan/verify.py
CHANGED
|
@@ -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,
|
|
49
|
-
skills, CHANGELOG.md (
|
|
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
|
-
"
|
|
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:**
|
|
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:**
|
|
176
|
+
**Git Standards:** Inlined as module-level constants in `hooks/modules/validation/commit_validator.py`.
|
|
182
177
|
|
|
183
178
|
Example:
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
-
|
|
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
|
package/commands/README.md
DELETED
|
@@ -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
|
package/commands/scan-project.md
DELETED
|
@@ -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
|
-
```
|
package/config/crons-schema.md
DELETED
|
@@ -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
|
-
}
|