@jaguilar87/gaia 5.0.10 → 5.1.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (469) hide show
  1. package/.claude-plugin/marketplace.json +8 -17
  2. package/.claude-plugin/plugin.json +177 -7
  3. package/ARCHITECTURE.md +14 -6
  4. package/CHANGELOG.md +19 -0
  5. package/INSTALL.md +87 -53
  6. package/README.md +23 -22
  7. package/agents/README.md +2 -2
  8. package/agents/cloud-troubleshooter.md +1 -1
  9. package/agents/developer.md +1 -1
  10. package/agents/gaia-planner.md +1 -1
  11. package/agents/gaia-system.md +5 -4
  12. package/agents/gitops-operator.md +1 -1
  13. package/agents/platform-architect.md +1 -1
  14. package/bin/README.md +19 -8
  15. package/bin/cli/_install_helpers.py +11 -28
  16. package/bin/cli/_pack_helpers.py +135 -0
  17. package/bin/cli/ac.py +2 -2
  18. package/bin/cli/approvals.py +1 -1
  19. package/bin/cli/brief.py +10 -3
  20. package/bin/cli/cleanup.py +11 -18
  21. package/bin/cli/dev.py +483 -0
  22. package/bin/cli/doctor.py +167 -55
  23. package/bin/cli/history.py +2 -2
  24. package/bin/cli/install.py +41 -155
  25. package/bin/cli/memory.py +53 -25
  26. package/bin/cli/metrics.py +4 -4
  27. package/bin/cli/release.py +720 -0
  28. package/bin/cli/scan.py +83 -376
  29. package/bin/cli/status.py +1 -1
  30. package/bin/cli/uninstall.py +102 -169
  31. package/bin/gaia +71 -3
  32. package/bin/plugin-dryrun.sh +190 -0
  33. package/bin/pre-publish-validate.js +48 -19
  34. package/bin/validate-sandbox.sh +51 -7
  35. package/gaia/briefs/store.py +53 -1
  36. package/gaia/paths/README.md +3 -0
  37. package/gaia/paths/__init__.py +11 -0
  38. package/gaia/paths/resolver.py +7 -2
  39. package/gaia/paths/snapshot.py +179 -0
  40. package/gaia/state/__init__.py +8 -1
  41. package/gaia/state/transitions.py +18 -4
  42. package/gaia/store/schema.sql +5 -1
  43. package/hooks/README.md +2 -2
  44. package/hooks/adapters/__init__.py +13 -3
  45. package/hooks/adapters/base.py +122 -5
  46. package/hooks/adapters/channel.py +2 -2
  47. package/hooks/adapters/claude_code.py +203 -102
  48. package/hooks/adapters/host_session.py +53 -0
  49. package/hooks/adapters/host_transcript.py +75 -0
  50. package/hooks/adapters/registry.py +87 -0
  51. package/hooks/adapters/types.py +136 -8
  52. package/hooks/adapters/utils.py +1 -1
  53. package/hooks/hooks.json +109 -24
  54. package/hooks/modules/README.md +1 -7
  55. package/hooks/modules/__init__.py +1 -1
  56. package/hooks/modules/agents/contract_validator.py +14 -4
  57. package/hooks/modules/agents/response_contract.py +10 -5
  58. package/hooks/modules/agents/transcript_reader.py +34 -71
  59. package/hooks/modules/context/context_injector.py +1 -1
  60. package/hooks/modules/core/__init__.py +3 -7
  61. package/hooks/modules/core/hook_entry.py +6 -4
  62. package/hooks/modules/core/paths.py +1 -6
  63. package/hooks/modules/core/plugin_mode.py +6 -127
  64. package/hooks/modules/core/plugin_setup.py +9 -34
  65. package/hooks/modules/core/state.py +12 -10
  66. package/hooks/modules/security/approval_cleanup.py +2 -2
  67. package/hooks/modules/security/approval_grants.py +7 -7
  68. package/hooks/modules/security/mutative_verbs.py +204 -3
  69. package/hooks/modules/session/db_backup.py +120 -0
  70. package/hooks/modules/session/pending_scanner.py +33 -3
  71. package/hooks/modules/session/session_manager.py +6 -15
  72. package/hooks/modules/session/session_manifest.py +209 -52
  73. package/hooks/modules/session/session_registry.py +3 -3
  74. package/hooks/modules/tools/bash_validator.py +32 -29
  75. package/hooks/modules/tools/hook_response.py +14 -12
  76. package/hooks/modules/tools/task_validator.py +4 -2
  77. package/hooks/modules/validation/commit_validator.py +1 -1
  78. package/hooks/post_tool_use.py +2 -2
  79. package/hooks/pre_compact.py +9 -11
  80. package/hooks/pre_tool_use.py +9 -8
  81. package/hooks/session_start.py +43 -22
  82. package/hooks/stop_hook.py +2 -2
  83. package/hooks/subagent_start.py +2 -2
  84. package/hooks/subagent_stop.py +2 -2
  85. package/hooks/task_completed.py +2 -2
  86. package/hooks/user_prompt_submit.py +104 -56
  87. package/package.json +7 -9
  88. package/pyproject.toml +1 -1
  89. package/scripts/build-plugin.py +112 -146
  90. package/scripts/check_hooks_drift.py +102 -0
  91. package/scripts/migrations/schema.checksum +2 -2
  92. package/scripts/migrations/v20_to_v21.sql +68 -0
  93. package/scripts/release-prepare.mjs +18 -13
  94. package/skills/README.md +1 -1
  95. package/skills/command-execution/SKILL.md +6 -0
  96. package/skills/command-execution/reference.md +18 -0
  97. package/skills/gaia-patterns/SKILL.md +2 -2
  98. package/skills/gaia-patterns/reference.md +27 -61
  99. package/skills/gaia-release/SKILL.md +78 -51
  100. package/skills/gaia-release/reference.md +138 -112
  101. package/skills/gaia-verify/SKILL.md +38 -30
  102. package/skills/gaia-verify/reference.md +54 -56
  103. package/skills/security-tiers/SKILL.md +1 -1
  104. package/tools/__init__.py +1 -1
  105. package/tools/context/_paths.py +1 -1
  106. package/tools/context/context_provider.py +21 -2
  107. package/tools/fast-queries/__init__.py +1 -1
  108. package/tools/gaia_simulator/__init__.py +1 -1
  109. package/tools/gaia_simulator/cli.py +2 -2
  110. package/tools/gaia_simulator/extractor.py +2 -2
  111. package/tools/gaia_simulator/reporter.py +1 -1
  112. package/tools/gaia_simulator/routing_simulator.py +2 -2
  113. package/tools/gaia_simulator/runner.py +1 -1
  114. package/tools/gaia_simulator/skills_mapper.py +1 -1
  115. package/tools/memory/__init__.py +1 -1
  116. package/tools/memory/conflict_detector.py +1 -1
  117. package/tools/memory/episodic.py +1 -1
  118. package/tools/memory/git_invalidator.py +1 -1
  119. package/tools/memory/paths.py +1 -1
  120. package/tools/memory/scoring.py +1 -1
  121. package/tools/memory/search_store.py +1 -1
  122. package/tools/scan/__init__.py +1 -1
  123. package/tools/scan/classify.py +457 -0
  124. package/tools/scan/core.py +8 -153
  125. package/tools/scan/migrate_workspace.py +6 -16
  126. package/tools/scan/orchestrator.py +12 -15
  127. package/tools/scan/scanners/git.py +5 -106
  128. package/tools/scan/seed_contract_permissions.py +14 -0
  129. package/tools/scan/store_populator.py +34 -169
  130. package/tools/scan/tests/test_core.py +4 -5
  131. package/tools/scan/tests/test_git.py +12 -16
  132. package/tools/scan/tests/test_store_populator.py +0 -1
  133. package/tools/scan/verify.py +1 -1
  134. package/tools/scan/workspace.py +1 -91
  135. package/tools/validation/README.md +2 -2
  136. package/tools/validation/validate_skills.py +5 -5
  137. package/dist/gaia-ops/.claude-plugin/plugin.json +0 -214
  138. package/dist/gaia-ops/README.md +0 -79
  139. package/dist/gaia-ops/agents/cloud-troubleshooter.md +0 -83
  140. package/dist/gaia-ops/agents/developer.md +0 -64
  141. package/dist/gaia-ops/agents/gaia-operator.md +0 -94
  142. package/dist/gaia-ops/agents/gaia-orchestrator.md +0 -101
  143. package/dist/gaia-ops/agents/gaia-planner.md +0 -73
  144. package/dist/gaia-ops/agents/gaia-system.md +0 -98
  145. package/dist/gaia-ops/agents/gitops-operator.md +0 -68
  146. package/dist/gaia-ops/agents/platform-architect.md +0 -68
  147. package/dist/gaia-ops/config/README.md +0 -46
  148. package/dist/gaia-ops/config/surface-routing.json +0 -430
  149. package/dist/gaia-ops/hooks/adapters/__init__.py +0 -52
  150. package/dist/gaia-ops/hooks/adapters/base.py +0 -219
  151. package/dist/gaia-ops/hooks/adapters/channel.py +0 -17
  152. package/dist/gaia-ops/hooks/adapters/claude_code.py +0 -2018
  153. package/dist/gaia-ops/hooks/adapters/types.py +0 -194
  154. package/dist/gaia-ops/hooks/adapters/utils.py +0 -25
  155. package/dist/gaia-ops/hooks/hooks.json +0 -192
  156. package/dist/gaia-ops/hooks/modules/__init__.py +0 -15
  157. package/dist/gaia-ops/hooks/modules/agents/__init__.py +0 -29
  158. package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +0 -1000
  159. package/dist/gaia-ops/hooks/modules/agents/handoff_persister.py +0 -369
  160. package/dist/gaia-ops/hooks/modules/agents/response_contract.py +0 -693
  161. package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +0 -104
  162. package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +0 -281
  163. package/dist/gaia-ops/hooks/modules/agents/task_info_builder.py +0 -74
  164. package/dist/gaia-ops/hooks/modules/agents/transcript_analyzer.py +0 -458
  165. package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +0 -167
  166. package/dist/gaia-ops/hooks/modules/audit/__init__.py +0 -28
  167. package/dist/gaia-ops/hooks/modules/audit/event_detector.py +0 -168
  168. package/dist/gaia-ops/hooks/modules/audit/logger.py +0 -131
  169. package/dist/gaia-ops/hooks/modules/audit/metrics.py +0 -134
  170. package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +0 -583
  171. package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +0 -273
  172. package/dist/gaia-ops/hooks/modules/context/__init__.py +0 -11
  173. package/dist/gaia-ops/hooks/modules/context/agentic_loop_detector.py +0 -165
  174. package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +0 -317
  175. package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +0 -261
  176. package/dist/gaia-ops/hooks/modules/context/context_freshness.py +0 -141
  177. package/dist/gaia-ops/hooks/modules/context/context_injector.py +0 -502
  178. package/dist/gaia-ops/hooks/modules/context/context_writer.py +0 -452
  179. package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +0 -144
  180. package/dist/gaia-ops/hooks/modules/core/__init__.py +0 -40
  181. package/dist/gaia-ops/hooks/modules/core/hook_entry.py +0 -78
  182. package/dist/gaia-ops/hooks/modules/core/paths.py +0 -160
  183. package/dist/gaia-ops/hooks/modules/core/plugin_mode.py +0 -149
  184. package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +0 -572
  185. package/dist/gaia-ops/hooks/modules/core/state.py +0 -207
  186. package/dist/gaia-ops/hooks/modules/core/stdin.py +0 -24
  187. package/dist/gaia-ops/hooks/modules/core/workspace_bootstrap.py +0 -91
  188. package/dist/gaia-ops/hooks/modules/events/__init__.py +0 -1
  189. package/dist/gaia-ops/hooks/modules/events/event_writer.py +0 -177
  190. package/dist/gaia-ops/hooks/modules/memory/__init__.py +0 -8
  191. package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +0 -223
  192. package/dist/gaia-ops/hooks/modules/orchestrator/__init__.py +0 -1
  193. package/dist/gaia-ops/hooks/modules/orchestrator/delegate_mode.py +0 -122
  194. package/dist/gaia-ops/hooks/modules/scanning/__init__.py +0 -8
  195. package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +0 -86
  196. package/dist/gaia-ops/hooks/modules/security/__init__.py +0 -113
  197. package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +0 -327
  198. package/dist/gaia-ops/hooks/modules/security/approval_constants.py +0 -23
  199. package/dist/gaia-ops/hooks/modules/security/approval_grants.py +0 -1714
  200. package/dist/gaia-ops/hooks/modules/security/approval_messages.py +0 -111
  201. package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +0 -208
  202. package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +0 -723
  203. package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +0 -87
  204. package/dist/gaia-ops/hooks/modules/security/capability_classes.py +0 -456
  205. package/dist/gaia-ops/hooks/modules/security/command_semantics.py +0 -263
  206. package/dist/gaia-ops/hooks/modules/security/composition_rules.py +0 -616
  207. package/dist/gaia-ops/hooks/modules/security/flag_classifiers.py +0 -873
  208. package/dist/gaia-ops/hooks/modules/security/gaia_db_write_guard.py +0 -97
  209. package/dist/gaia-ops/hooks/modules/security/inline_ast_analyzer.py +0 -576
  210. package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +0 -2208
  211. package/dist/gaia-ops/hooks/modules/security/network_hosts.py +0 -481
  212. package/dist/gaia-ops/hooks/modules/security/prompt_validator.py +0 -40
  213. package/dist/gaia-ops/hooks/modules/security/shell_unwrapper.py +0 -165
  214. package/dist/gaia-ops/hooks/modules/security/tiers.py +0 -196
  215. package/dist/gaia-ops/hooks/modules/session/__init__.py +0 -10
  216. package/dist/gaia-ops/hooks/modules/session/pending_scanner.py +0 -250
  217. package/dist/gaia-ops/hooks/modules/session/session_context_writer.py +0 -100
  218. package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +0 -160
  219. package/dist/gaia-ops/hooks/modules/session/session_manager.py +0 -31
  220. package/dist/gaia-ops/hooks/modules/session/session_manifest.py +0 -777
  221. package/dist/gaia-ops/hooks/modules/session/session_registry.py +0 -339
  222. package/dist/gaia-ops/hooks/modules/tools/__init__.py +0 -29
  223. package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +0 -1679
  224. package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +0 -231
  225. package/dist/gaia-ops/hooks/modules/tools/hook_response.py +0 -55
  226. package/dist/gaia-ops/hooks/modules/tools/shell_parser.py +0 -227
  227. package/dist/gaia-ops/hooks/modules/tools/stage_decomposer.py +0 -315
  228. package/dist/gaia-ops/hooks/modules/tools/task_validator.py +0 -295
  229. package/dist/gaia-ops/hooks/modules/validation/__init__.py +0 -23
  230. package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +0 -415
  231. package/dist/gaia-ops/hooks/post_compact.py +0 -48
  232. package/dist/gaia-ops/hooks/post_tool_use.py +0 -58
  233. package/dist/gaia-ops/hooks/pre_compact.py +0 -65
  234. package/dist/gaia-ops/hooks/pre_tool_use.py +0 -417
  235. package/dist/gaia-ops/hooks/session_end_hook.py +0 -81
  236. package/dist/gaia-ops/hooks/session_start.py +0 -231
  237. package/dist/gaia-ops/hooks/stop_hook.py +0 -74
  238. package/dist/gaia-ops/hooks/subagent_start.py +0 -59
  239. package/dist/gaia-ops/hooks/subagent_stop.py +0 -336
  240. package/dist/gaia-ops/hooks/task_completed.py +0 -74
  241. package/dist/gaia-ops/hooks/user_prompt_submit.py +0 -230
  242. package/dist/gaia-ops/skills/README.md +0 -159
  243. package/dist/gaia-ops/skills/agent-approval-protocol/SKILL.md +0 -134
  244. package/dist/gaia-ops/skills/agent-approval-protocol/reference.md +0 -81
  245. package/dist/gaia-ops/skills/agent-contract-handoff/SKILL.md +0 -160
  246. package/dist/gaia-ops/skills/agent-creation/SKILL.md +0 -100
  247. package/dist/gaia-ops/skills/agent-creation/examples.md +0 -177
  248. package/dist/gaia-ops/skills/agent-creation/reference.md +0 -233
  249. package/dist/gaia-ops/skills/agent-protocol/SKILL.md +0 -99
  250. package/dist/gaia-ops/skills/agent-protocol/examples.md +0 -344
  251. package/dist/gaia-ops/skills/agent-response/SKILL.md +0 -69
  252. package/dist/gaia-ops/skills/agentic-loop/SKILL.md +0 -80
  253. package/dist/gaia-ops/skills/agentic-loop/reference.md +0 -378
  254. package/dist/gaia-ops/skills/blog-writing/SKILL.md +0 -98
  255. package/dist/gaia-ops/skills/blog-writing/reference.md +0 -130
  256. package/dist/gaia-ops/skills/brief-spec/SKILL.md +0 -306
  257. package/dist/gaia-ops/skills/command-execution/SKILL.md +0 -64
  258. package/dist/gaia-ops/skills/command-execution/reference.md +0 -83
  259. package/dist/gaia-ops/skills/execution/SKILL.md +0 -107
  260. package/dist/gaia-ops/skills/fast-queries/SKILL.md +0 -43
  261. package/dist/gaia-ops/skills/gaia-audit/SKILL.md +0 -119
  262. package/dist/gaia-ops/skills/gaia-compact/SKILL.md +0 -74
  263. package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +0 -103
  264. package/dist/gaia-ops/skills/gaia-patterns/reference.md +0 -437
  265. package/dist/gaia-ops/skills/gaia-planner/SKILL.md +0 -160
  266. package/dist/gaia-ops/skills/gaia-planner/reference.md +0 -194
  267. package/dist/gaia-ops/skills/gaia-release/SKILL.md +0 -96
  268. package/dist/gaia-ops/skills/gaia-release/reference.md +0 -205
  269. package/dist/gaia-ops/skills/gaia-verify/SKILL.md +0 -77
  270. package/dist/gaia-ops/skills/gaia-verify/reference.md +0 -80
  271. package/dist/gaia-ops/skills/git-conventions/SKILL.md +0 -51
  272. package/dist/gaia-ops/skills/gmail-policy/SKILL.md +0 -200
  273. package/dist/gaia-ops/skills/gmail-policy/reference.md +0 -150
  274. package/dist/gaia-ops/skills/gmail-triage/SKILL.md +0 -100
  275. package/dist/gaia-ops/skills/gws-setup/SKILL.md +0 -99
  276. package/dist/gaia-ops/skills/gws-setup/reference.md +0 -73
  277. package/dist/gaia-ops/skills/investigation/SKILL.md +0 -99
  278. package/dist/gaia-ops/skills/jira-ticket-writing/SKILL.md +0 -95
  279. package/dist/gaia-ops/skills/jira-ticket-writing/examples.md +0 -109
  280. package/dist/gaia-ops/skills/memory/SKILL.md +0 -399
  281. package/dist/gaia-ops/skills/orchestrator-present-approval/SKILL.md +0 -171
  282. package/dist/gaia-ops/skills/orchestrator-present-approval/reference.md +0 -294
  283. package/dist/gaia-ops/skills/orchestrator-present-approval/template.md +0 -55
  284. package/dist/gaia-ops/skills/pending-approvals/SKILL.md +0 -142
  285. package/dist/gaia-ops/skills/pending-approvals/reference.md +0 -247
  286. package/dist/gaia-ops/skills/readme-writing/SKILL.md +0 -71
  287. package/dist/gaia-ops/skills/readme-writing/reference.md +0 -187
  288. package/dist/gaia-ops/skills/reference.md +0 -134
  289. package/dist/gaia-ops/skills/schedule-task/SKILL.md +0 -64
  290. package/dist/gaia-ops/skills/schedule-task/reference.md +0 -233
  291. package/dist/gaia-ops/skills/security-tiers/SKILL.md +0 -69
  292. package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +0 -624
  293. package/dist/gaia-ops/skills/security-tiers/reference.md +0 -47
  294. package/dist/gaia-ops/skills/session-reflection/SKILL.md +0 -198
  295. package/dist/gaia-ops/skills/skill-creation/SKILL.md +0 -99
  296. package/dist/gaia-ops/skills/skill-creation/examples.md +0 -53
  297. package/dist/gaia-ops/skills/skill-creation/reference.md +0 -13
  298. package/dist/gaia-ops/skills/subagent-request-approval/SKILL.md +0 -148
  299. package/dist/gaia-ops/skills/subagent-request-approval/reference.md +0 -205
  300. package/dist/gaia-ops/tools/__init__.py +0 -9
  301. package/dist/gaia-ops/tools/context/README.md +0 -120
  302. package/dist/gaia-ops/tools/context/__init__.py +0 -40
  303. package/dist/gaia-ops/tools/context/_paths.py +0 -20
  304. package/dist/gaia-ops/tools/context/context_provider.py +0 -697
  305. package/dist/gaia-ops/tools/context/surface_router.py +0 -278
  306. package/dist/gaia-ops/tools/fast-queries/README.md +0 -65
  307. package/dist/gaia-ops/tools/fast-queries/__init__.py +0 -30
  308. package/dist/gaia-ops/tools/fast-queries/appservices/quicktriage_devops_developer.sh +0 -75
  309. package/dist/gaia-ops/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +0 -32
  310. package/dist/gaia-ops/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +0 -88
  311. package/dist/gaia-ops/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +0 -48
  312. package/dist/gaia-ops/tools/fast-queries/run_triage.sh +0 -59
  313. package/dist/gaia-ops/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +0 -80
  314. package/dist/gaia-ops/tools/gaia_simulator/__init__.py +0 -33
  315. package/dist/gaia-ops/tools/gaia_simulator/cli.py +0 -354
  316. package/dist/gaia-ops/tools/gaia_simulator/extractor.py +0 -456
  317. package/dist/gaia-ops/tools/gaia_simulator/reporter.py +0 -258
  318. package/dist/gaia-ops/tools/gaia_simulator/routing_simulator.py +0 -334
  319. package/dist/gaia-ops/tools/gaia_simulator/runner.py +0 -513
  320. package/dist/gaia-ops/tools/gaia_simulator/skills_mapper.py +0 -264
  321. package/dist/gaia-ops/tools/memory/README.md +0 -0
  322. package/dist/gaia-ops/tools/memory/__init__.py +0 -20
  323. package/dist/gaia-ops/tools/memory/backfill_fts5.py +0 -107
  324. package/dist/gaia-ops/tools/memory/conflict_detector.py +0 -295
  325. package/dist/gaia-ops/tools/memory/episodic.py +0 -1300
  326. package/dist/gaia-ops/tools/memory/git_invalidator.py +0 -262
  327. package/dist/gaia-ops/tools/memory/paths.py +0 -102
  328. package/dist/gaia-ops/tools/memory/scoring.py +0 -193
  329. package/dist/gaia-ops/tools/memory/search_store.py +0 -375
  330. package/dist/gaia-ops/tools/migration/README.md +0 -93
  331. package/dist/gaia-ops/tools/migration/migrate_01_episodes.py +0 -186
  332. package/dist/gaia-ops/tools/migration/migrate_01_episodes.sh +0 -21
  333. package/dist/gaia-ops/tools/migration/migrate_02_memory.py +0 -179
  334. package/dist/gaia-ops/tools/migration/migrate_02_memory.sh +0 -19
  335. package/dist/gaia-ops/tools/migration/migrate_03_context_contracts.py +0 -103
  336. package/dist/gaia-ops/tools/migration/migrate_03_context_contracts.sh +0 -19
  337. package/dist/gaia-ops/tools/migration/migrate_05_briefs.py +0 -307
  338. package/dist/gaia-ops/tools/migration/migrate_06_state_machines.py +0 -441
  339. package/dist/gaia-ops/tools/migration/migrate_07_plans_content.py +0 -124
  340. package/dist/gaia-ops/tools/migration/migrate_08_rename_workspace.py +0 -513
  341. package/dist/gaia-ops/tools/migration/validate.sh +0 -68
  342. package/dist/gaia-ops/tools/scan/__init__.py +0 -35
  343. package/dist/gaia-ops/tools/scan/config.py +0 -225
  344. package/dist/gaia-ops/tools/scan/core.py +0 -441
  345. package/dist/gaia-ops/tools/scan/migrate_workspace.py +0 -249
  346. package/dist/gaia-ops/tools/scan/orchestrator.py +0 -594
  347. package/dist/gaia-ops/tools/scan/registry.py +0 -127
  348. package/dist/gaia-ops/tools/scan/role_detector.py +0 -198
  349. package/dist/gaia-ops/tools/scan/scanners/__init__.py +0 -18
  350. package/dist/gaia-ops/tools/scan/scanners/base.py +0 -137
  351. package/dist/gaia-ops/tools/scan/scanners/environment.py +0 -349
  352. package/dist/gaia-ops/tools/scan/scanners/git.py +0 -570
  353. package/dist/gaia-ops/tools/scan/scanners/infrastructure.py +0 -875
  354. package/dist/gaia-ops/tools/scan/scanners/orchestration.py +0 -600
  355. package/dist/gaia-ops/tools/scan/scanners/stack.py +0 -1085
  356. package/dist/gaia-ops/tools/scan/scanners/tools.py +0 -260
  357. package/dist/gaia-ops/tools/scan/seed_contract_permissions.py +0 -327
  358. package/dist/gaia-ops/tools/scan/store_populator.py +0 -1818
  359. package/dist/gaia-ops/tools/scan/tests/__init__.py +0 -1
  360. package/dist/gaia-ops/tools/scan/tests/conftest.py +0 -798
  361. package/dist/gaia-ops/tools/scan/tests/test_core.py +0 -190
  362. package/dist/gaia-ops/tools/scan/tests/test_environment.py +0 -323
  363. package/dist/gaia-ops/tools/scan/tests/test_git.py +0 -419
  364. package/dist/gaia-ops/tools/scan/tests/test_infrastructure.py +0 -382
  365. package/dist/gaia-ops/tools/scan/tests/test_integration.py +0 -848
  366. package/dist/gaia-ops/tools/scan/tests/test_orchestration.py +0 -304
  367. package/dist/gaia-ops/tools/scan/tests/test_stack.py +0 -604
  368. package/dist/gaia-ops/tools/scan/tests/test_store_populator.py +0 -345
  369. package/dist/gaia-ops/tools/scan/tests/test_tools.py +0 -349
  370. package/dist/gaia-ops/tools/scan/ui.py +0 -659
  371. package/dist/gaia-ops/tools/scan/verify.py +0 -285
  372. package/dist/gaia-ops/tools/scan/walk.py +0 -118
  373. package/dist/gaia-ops/tools/scan/workspace.py +0 -110
  374. package/dist/gaia-ops/tools/state/__init__.py +0 -1
  375. package/dist/gaia-ops/tools/state/diff_source_of_truth.py +0 -150
  376. package/dist/gaia-ops/tools/validation/README.md +0 -235
  377. package/dist/gaia-ops/tools/validation/__init__.py +0 -17
  378. package/dist/gaia-ops/tools/validation/approval_gate.py +0 -321
  379. package/dist/gaia-ops/tools/validation/validate_skills.py +0 -189
  380. package/dist/gaia-security/.claude-plugin/plugin.json +0 -135
  381. package/dist/gaia-security/README.md +0 -88
  382. package/dist/gaia-security/hooks/adapters/__init__.py +0 -52
  383. package/dist/gaia-security/hooks/adapters/base.py +0 -219
  384. package/dist/gaia-security/hooks/adapters/channel.py +0 -17
  385. package/dist/gaia-security/hooks/adapters/claude_code.py +0 -2018
  386. package/dist/gaia-security/hooks/adapters/types.py +0 -194
  387. package/dist/gaia-security/hooks/adapters/utils.py +0 -25
  388. package/dist/gaia-security/hooks/hooks.json +0 -113
  389. package/dist/gaia-security/hooks/modules/__init__.py +0 -15
  390. package/dist/gaia-security/hooks/modules/agents/__init__.py +0 -29
  391. package/dist/gaia-security/hooks/modules/agents/contract_validator.py +0 -1000
  392. package/dist/gaia-security/hooks/modules/agents/handoff_persister.py +0 -369
  393. package/dist/gaia-security/hooks/modules/agents/response_contract.py +0 -693
  394. package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +0 -104
  395. package/dist/gaia-security/hooks/modules/agents/state_tracker.py +0 -281
  396. package/dist/gaia-security/hooks/modules/agents/task_info_builder.py +0 -74
  397. package/dist/gaia-security/hooks/modules/agents/transcript_analyzer.py +0 -458
  398. package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +0 -167
  399. package/dist/gaia-security/hooks/modules/audit/__init__.py +0 -28
  400. package/dist/gaia-security/hooks/modules/audit/event_detector.py +0 -168
  401. package/dist/gaia-security/hooks/modules/audit/logger.py +0 -131
  402. package/dist/gaia-security/hooks/modules/audit/metrics.py +0 -134
  403. package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +0 -583
  404. package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +0 -273
  405. package/dist/gaia-security/hooks/modules/context/__init__.py +0 -11
  406. package/dist/gaia-security/hooks/modules/context/agentic_loop_detector.py +0 -165
  407. package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +0 -317
  408. package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +0 -261
  409. package/dist/gaia-security/hooks/modules/context/context_freshness.py +0 -141
  410. package/dist/gaia-security/hooks/modules/context/context_injector.py +0 -502
  411. package/dist/gaia-security/hooks/modules/context/context_writer.py +0 -452
  412. package/dist/gaia-security/hooks/modules/context/contracts_loader.py +0 -144
  413. package/dist/gaia-security/hooks/modules/core/__init__.py +0 -40
  414. package/dist/gaia-security/hooks/modules/core/hook_entry.py +0 -78
  415. package/dist/gaia-security/hooks/modules/core/paths.py +0 -160
  416. package/dist/gaia-security/hooks/modules/core/plugin_mode.py +0 -149
  417. package/dist/gaia-security/hooks/modules/core/plugin_setup.py +0 -572
  418. package/dist/gaia-security/hooks/modules/core/state.py +0 -207
  419. package/dist/gaia-security/hooks/modules/core/stdin.py +0 -24
  420. package/dist/gaia-security/hooks/modules/core/workspace_bootstrap.py +0 -91
  421. package/dist/gaia-security/hooks/modules/events/__init__.py +0 -1
  422. package/dist/gaia-security/hooks/modules/events/event_writer.py +0 -177
  423. package/dist/gaia-security/hooks/modules/memory/__init__.py +0 -8
  424. package/dist/gaia-security/hooks/modules/memory/episode_writer.py +0 -223
  425. package/dist/gaia-security/hooks/modules/orchestrator/__init__.py +0 -1
  426. package/dist/gaia-security/hooks/modules/orchestrator/delegate_mode.py +0 -122
  427. package/dist/gaia-security/hooks/modules/scanning/__init__.py +0 -8
  428. package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +0 -86
  429. package/dist/gaia-security/hooks/modules/security/__init__.py +0 -113
  430. package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +0 -327
  431. package/dist/gaia-security/hooks/modules/security/approval_constants.py +0 -23
  432. package/dist/gaia-security/hooks/modules/security/approval_grants.py +0 -1714
  433. package/dist/gaia-security/hooks/modules/security/approval_messages.py +0 -111
  434. package/dist/gaia-security/hooks/modules/security/approval_scopes.py +0 -208
  435. package/dist/gaia-security/hooks/modules/security/blocked_commands.py +0 -723
  436. package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +0 -87
  437. package/dist/gaia-security/hooks/modules/security/capability_classes.py +0 -456
  438. package/dist/gaia-security/hooks/modules/security/command_semantics.py +0 -263
  439. package/dist/gaia-security/hooks/modules/security/composition_rules.py +0 -616
  440. package/dist/gaia-security/hooks/modules/security/flag_classifiers.py +0 -873
  441. package/dist/gaia-security/hooks/modules/security/gaia_db_write_guard.py +0 -97
  442. package/dist/gaia-security/hooks/modules/security/inline_ast_analyzer.py +0 -576
  443. package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +0 -2208
  444. package/dist/gaia-security/hooks/modules/security/network_hosts.py +0 -481
  445. package/dist/gaia-security/hooks/modules/security/prompt_validator.py +0 -40
  446. package/dist/gaia-security/hooks/modules/security/shell_unwrapper.py +0 -165
  447. package/dist/gaia-security/hooks/modules/security/tiers.py +0 -196
  448. package/dist/gaia-security/hooks/modules/session/__init__.py +0 -10
  449. package/dist/gaia-security/hooks/modules/session/pending_scanner.py +0 -250
  450. package/dist/gaia-security/hooks/modules/session/session_context_writer.py +0 -100
  451. package/dist/gaia-security/hooks/modules/session/session_event_injector.py +0 -160
  452. package/dist/gaia-security/hooks/modules/session/session_manager.py +0 -31
  453. package/dist/gaia-security/hooks/modules/session/session_manifest.py +0 -777
  454. package/dist/gaia-security/hooks/modules/session/session_registry.py +0 -339
  455. package/dist/gaia-security/hooks/modules/tools/__init__.py +0 -29
  456. package/dist/gaia-security/hooks/modules/tools/bash_validator.py +0 -1679
  457. package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +0 -231
  458. package/dist/gaia-security/hooks/modules/tools/hook_response.py +0 -55
  459. package/dist/gaia-security/hooks/modules/tools/shell_parser.py +0 -227
  460. package/dist/gaia-security/hooks/modules/tools/stage_decomposer.py +0 -315
  461. package/dist/gaia-security/hooks/modules/tools/task_validator.py +0 -295
  462. package/dist/gaia-security/hooks/modules/validation/__init__.py +0 -23
  463. package/dist/gaia-security/hooks/modules/validation/commit_validator.py +0 -415
  464. package/dist/gaia-security/hooks/post_tool_use.py +0 -58
  465. package/dist/gaia-security/hooks/pre_tool_use.py +0 -417
  466. package/dist/gaia-security/hooks/session_end_hook.py +0 -81
  467. package/dist/gaia-security/hooks/session_start.py +0 -231
  468. package/dist/gaia-security/hooks/stop_hook.py +0 -74
  469. package/dist/gaia-security/hooks/user_prompt_submit.py +0 -230
@@ -1,33 +1,24 @@
1
1
  {
2
- "name": "gaia-ops-marketplace",
2
+ "name": "gaia-marketplace",
3
3
  "owner": {
4
4
  "name": "jaguilar87",
5
5
  "email": "jorge.aguilar87@gmail.com"
6
6
  },
7
7
  "plugins": [
8
8
  {
9
- "name": "gaia-ops",
10
- "description": "Full DevOps orchestration for Claude Code. Eight specialized agents handle the complete development lifecycle — analysis, planning, execution, and deployment. Gaia-Ops scans your codebase to understand it and injects the right context into each sub-agent. Every command is classified by risk: read-only runs freely, state changes pause for your approval, and irreversible operations are permanently blocked.",
11
- "version": "5.0.10",
9
+ "name": "gaia",
10
+ "description": "Security-first multi-agent orchestration for Claude Code. Specialized agents cover the full development lifecycle — analysis, planning, execution, deployment with codebase-aware context injection. Every command is risk-classified: read-only runs freely, state changes pause for your approval, and irreversible operations are permanently blocked.",
11
+ "version": "5.1.0-rc.2",
12
12
  "category": "devops",
13
13
  "author": {
14
14
  "name": "jaguilar87",
15
15
  "email": "jorge.aguilar87@gmail.com"
16
16
  },
17
17
  "homepage": "https://github.com/metraton/gaia#readme",
18
- "source": "./dist/gaia-ops"
19
- },
20
- {
21
- "name": "gaia-security",
22
- "description": "Keeps you in the loop only when it matters. Gaia Security analyzes every command and classifies it into risk tiers: read-only queries run freely, simulations and validations pass through, and state-changing operations (create, delete, apply, push) pause for your explicit approval before executing. Irreversible commands like dropping databases or deleting cloud infrastructure are permanently blocked.",
23
- "version": "5.0.10",
24
- "category": "security",
25
- "author": {
26
- "name": "jaguilar87",
27
- "email": "jorge.aguilar87@gmail.com"
28
- },
29
- "homepage": "https://github.com/metraton/gaia#gaia-security",
30
- "source": "./dist/gaia-security"
18
+ "source": {
19
+ "source": "npm",
20
+ "package": "@jaguilar87/gaia"
21
+ }
31
22
  }
32
23
  ]
33
24
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "name": "gaia-ops",
3
- "version": "5.0.10",
4
- "description": "Security-first orchestrator with specialized agents, hooks, and governance for AI coding",
2
+ "name": "gaia",
3
+ "version": "5.1.0-rc.2",
4
+ "description": "Security-first multi-agent orchestration for Claude Code. Agents span the full lifecycle; commands are risk-classified \u2014 reads run free, state changes need approval, irreversible ops blocked.",
5
5
  "author": {
6
6
  "name": "jaguilar87",
7
7
  "email": "jorge.aguilar87@gmail.com"
@@ -11,9 +11,7 @@
11
11
  "license": "MIT",
12
12
  "keywords": [
13
13
  "security",
14
- "devops",
15
- "orchestrator",
16
- "governance"
14
+ "devops"
17
15
  ],
18
16
  "engines": {
19
17
  "claude-code": ">=2.1.0"
@@ -22,5 +20,177 @@
22
20
  "devops",
23
21
  "security",
24
22
  "orchestration"
25
- ]
23
+ ],
24
+ "hooks": {
25
+ "PreToolUse": [
26
+ {
27
+ "matcher": "Bash",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pre_tool_use.py"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "matcher": "Task",
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pre_tool_use.py"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "matcher": "Agent",
46
+ "hooks": [
47
+ {
48
+ "type": "command",
49
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pre_tool_use.py"
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "matcher": "SendMessage",
55
+ "hooks": [
56
+ {
57
+ "type": "command",
58
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pre_tool_use.py"
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "matcher": "Read|Edit|Write|Glob|Grep|WebSearch|WebFetch|NotebookEdit",
64
+ "hooks": [
65
+ {
66
+ "type": "command",
67
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pre_tool_use.py"
68
+ }
69
+ ]
70
+ }
71
+ ],
72
+ "PostToolUse": [
73
+ {
74
+ "matcher": "Bash",
75
+ "hooks": [
76
+ {
77
+ "type": "command",
78
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/post_tool_use.py"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "matcher": "AskUserQuestion",
84
+ "hooks": [
85
+ {
86
+ "type": "command",
87
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/post_tool_use.py"
88
+ }
89
+ ]
90
+ }
91
+ ],
92
+ "SubagentStop": [
93
+ {
94
+ "matcher": "*",
95
+ "hooks": [
96
+ {
97
+ "type": "command",
98
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/subagent_stop.py"
99
+ }
100
+ ]
101
+ }
102
+ ],
103
+ "SessionStart": [
104
+ {
105
+ "matcher": "startup",
106
+ "hooks": [
107
+ {
108
+ "type": "command",
109
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/session_start.py"
110
+ }
111
+ ]
112
+ }
113
+ ],
114
+ "SessionEnd": [
115
+ {
116
+ "hooks": [
117
+ {
118
+ "type": "command",
119
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/session_end_hook.py"
120
+ }
121
+ ]
122
+ }
123
+ ],
124
+ "PreCompact": [
125
+ {
126
+ "hooks": [
127
+ {
128
+ "type": "command",
129
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pre_compact.py"
130
+ }
131
+ ]
132
+ }
133
+ ],
134
+ "PostCompact": [
135
+ {
136
+ "hooks": [
137
+ {
138
+ "type": "command",
139
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/post_compact.py"
140
+ }
141
+ ]
142
+ }
143
+ ],
144
+ "Stop": [
145
+ {
146
+ "hooks": [
147
+ {
148
+ "type": "command",
149
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/stop_hook.py"
150
+ }
151
+ ]
152
+ }
153
+ ],
154
+ "TaskCompleted": [
155
+ {
156
+ "hooks": [
157
+ {
158
+ "type": "command",
159
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/task_completed.py"
160
+ }
161
+ ]
162
+ }
163
+ ],
164
+ "SubagentStart": [
165
+ {
166
+ "matcher": "*",
167
+ "hooks": [
168
+ {
169
+ "type": "command",
170
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/subagent_start.py"
171
+ }
172
+ ]
173
+ }
174
+ ],
175
+ "UserPromptSubmit": [
176
+ {
177
+ "hooks": [
178
+ {
179
+ "type": "command",
180
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/user_prompt_submit.py"
181
+ }
182
+ ]
183
+ }
184
+ ],
185
+ "ElicitationResult": [
186
+ {
187
+ "hooks": [
188
+ {
189
+ "type": "command",
190
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/elicitation_result.py"
191
+ }
192
+ ]
193
+ }
194
+ ]
195
+ }
26
196
  }
package/ARCHITECTURE.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Gaia is an orchestration system for Claude Code agents. It turns a single Claude Code session into a coordinated multi-agent system with security enforcement, context injection, surface-based routing, episodic memory, and deterministic response contracts.
6
6
 
7
- The package is published as `@jaguilar87/gaia` on npm and installed into a project's `.claude/` directory via symlinks. Gaia ships two sub-plugins: `gaia-ops` (full orchestrator with all agents) and `gaia-security` (security hooks only).
7
+ The package is published as `@jaguilar87/gaia` on npm and installed into a project's `.claude/` directory via symlinks. Gaia ships as a **single, unified plugin** named `gaia` — one artifact carrying the full orchestrator, all agents, all skills, all hooks, all tools, and all config. Every install runs the full orchestrator surface, and the T3 mutation-safety floor for the main session is unconditional (see `skills/gaia-patterns/reference.md` "Plugin Packaging").
8
8
 
9
9
  ## Core Concepts
10
10
 
@@ -206,11 +206,19 @@ ClaudeCodeAdapter.format_validation_response() -> Claude Code stdout JSON
206
206
  ```
207
207
 
208
208
  ### Plugin Distribution
209
- Gaia ships the `gaia-ops` sub-plugin as a Claude Code plugin via `.claude-plugin/plugin.json`.
210
- The plugin is auto-discovered by Claude Code -- agents, skills, commands, and hooks
211
- are loaded from their respective directories.
212
-
213
- See `.claude-plugin/marketplace.json` for the self-hosted marketplace with sub-plugins.
209
+ Gaia ships as the single unified `gaia` plugin. There is **no `dist/` bundle** --
210
+ the npm package root (`@jaguilar87/gaia`) IS the plugin. The root
211
+ `.claude-plugin/plugin.json` (with hooks embedded inline) and `hooks/hooks.json`
212
+ are generated from `build/gaia.manifest.json` at pack time
213
+ (`prepack` -> `generate:plugin-root`) and tracked in git. Claude Code
214
+ auto-discovers agents, skills, commands, and hooks from their respective
215
+ directories at the package root.
216
+
217
+ See `.claude-plugin/marketplace.json` for the self-hosted marketplace, which
218
+ advertises the one `gaia` plugin with a `source: npm` object
219
+ (`{"source": "npm", "package": "@jaguilar87/gaia"}`) -- Claude Code installs the
220
+ package into its plugin cache and reads the inline-hooks `plugin.json` from the
221
+ package root.
214
222
 
215
223
  ## Adapter Coupling Points
216
224
 
package/CHANGELOG.md CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [5.1.0-rc.2] - 2026-07-02
11
+
12
+ ## [5.1.0-rc.1] - 2026-07-02
13
+
14
+ ## [5.0.11] - 2026-06-30
15
+
16
+ ### Changed
17
+
18
+ - Host decoupling (#88): la lógica del core (clasificación T0–T3, grants, validación, audit) queda desacoplada de Claude Code tras la capa adapter. Lo específico del host vive en seams: `host_session`, `host_transcript`, `registry`/`get_adapter`, `request_consent`/`ConsentRequest`, `HostCapability`/degradación, `HostDistribution`. Soportar un host nuevo de la familia hook-interception = escribir un adapter + declarar capacidades, sin tocar el core.
19
+
20
+ ### Added
21
+
22
+ - Estado terminal `descoped` para acceptance criteria (descope deliberado, hard-terminal) más invariantes de `verify_brief` (`closed_brief_nonterminal_ac`, `closed_brief_open_plan`) para coherencia brief/plan/AC al cerrar.
23
+
24
+ ### Fixed
25
+
26
+ - Endurecimiento del security-core a 100% killable (mutation testing) en `blocked_commands`, `mutative_verbs`, `tiers` y `approval_grants`. Arreglado el mecanismo de skip-file de equivalentes para casar por identidad estable (`operator|posición|occurrence`) en vez de `job_ids` regenerados — elimina la exclusión-cero silenciosa ("falso 100%") tras cada `cosmic-ray init`.
27
+ - Corregido el help de `brief close` (verify advisory, sin cascade de estado).
28
+
10
29
  ## [5.0.10] - 2026-06-29
11
30
 
12
31
  ## [5.0.9] - 2026-06-25
package/INSTALL.md CHANGED
@@ -1,30 +1,60 @@
1
1
  # Gaia Installation Guide
2
2
 
3
- This guide will help you install and configure Gaia in your project. The process is automatic and takes less than 5 minutes.
3
+ This guide will help you install and configure Gaia in your project. The process is non-invasive and takes less than 5 minutes.
4
4
 
5
5
  ## 🎯 What is Gaia?
6
6
 
7
7
  Gaia is a system of specialized AI agents that automate DevOps tasks. Think of it as having a team of experts (Terraform, Kubernetes, GCP, AWS) working together, coordinated by an intelligent orchestrator.
8
8
 
9
- The `gaia-ops` sub-plugin ships the full orchestrator and all agents; `gaia-security` ships security hooks only. Both are distributed via the `@jaguilar87/gaia` npm package.
9
+ Gaia ships as a **single, unified plugin** named `gaia` one artifact carrying the full orchestrator, all agents, all skills, all hooks, all tools, and all config. It is distributed as the `@jaguilar87/gaia` npm package; that same package root IS the Claude Code plugin (`source: npm`), so there is no separate `dist/` bundle.
10
10
 
11
11
  ---
12
12
 
13
- ## 🚀 Quick Installation (Recommended)
13
+ ## 🚀 Installation
14
14
 
15
- ### Option 1: npm install (standard)
15
+ Gaia reaches a workspace through **two surfaces**. Pick the one that matches how you run Claude Code.
16
16
 
17
- The npm `postinstall` hook does everything automatically -- bootstraps the DB, creates `.claude/`, writes symlinks, registers the plugin, and merges hook config:
17
+ ### Surface 1: npm / pnpm
18
+
19
+ Install the package, then wire the workspace with `gaia install`:
18
20
 
19
21
  ```bash
20
22
  npm install @jaguilar87/gaia
23
+ # or: pnpm add @jaguilar87/gaia
24
+
25
+ gaia install
21
26
  ```
22
27
 
23
- After install, `gaia doctor` verifies the result. If postinstall fails, `~/.gaia/last-install-error.json` is written with the diagnostic.
28
+ **There is no `postinstall` hook.** The install is deliberately non-invasive (npm and pnpm both handle it identically — pnpm ignores lifecycle scripts by default, so relying on `postinstall` would have been fragile). Two things bootstrap on demand instead:
29
+
30
+ - The database `~/.gaia/gaia.db` is created **lazily on the first `gaia` CLI use** (`_ensure_db_bootstrapped` in `bin/gaia`). You do not have to run anything special — the first `gaia` command you run seeds it.
31
+ - The workspace `.claude/` structure (symlinks + `settings.local.json` + registry) is written by running `gaia install` explicitly, or by the SessionStart hook.
32
+
33
+ After install, `gaia doctor` verifies the result. If a bootstrap or wire-up step fails, `~/.gaia/last-install-error.json` is written with the diagnostic.
34
+
35
+ ### Surface 2: Claude Code plugin
24
36
 
25
- ### Option 2: Project Scanner (on-demand)
37
+ Claude Code consumes the npm package directly (`source: npm`) — it runs `npm install @jaguilar87/gaia` into its plugin cache. Add the marketplace and install the single plugin:
26
38
 
27
- To detect or refresh your project context (stack, GitOps directory, Terraform layout, GCP project, etc.) -- this is **not** the installer, it writes scan results to `~/.gaia/gaia.db`:
39
+ ```bash
40
+ # Add the marketplace
41
+ /plugin marketplace add metraton/gaia
42
+
43
+ # Install the unified plugin
44
+ /plugin install gaia
45
+ ```
46
+
47
+ For a pre-release dry-run of the plugin surface without publishing, pack the exact tarball and validate the extracted root headless:
48
+
49
+ ```bash
50
+ npm run gaia:plugin-dryrun # pack -> temp extract -> structural asserts + `claude plugin validate`
51
+ ```
52
+
53
+ On the plugin surface, Claude Code reads hooks from the package root's inline `.claude-plugin/plugin.json` / `hooks/hooks.json` (generated from `build/gaia.manifest.json` at pack time) — **not** from `settings.local.json`.
54
+
55
+ ### Project Scanner (on-demand, separate from install)
56
+
57
+ To detect or refresh your project context (stack, GitOps directory, Terraform layout, GCP project, etc.), run the scanner. This is **not** the installer — it writes scan results to `~/.gaia/gaia.db`:
28
58
 
29
59
  ```bash
30
60
  gaia scan
@@ -41,7 +71,7 @@ gaia scan --non-interactive \
41
71
  --cluster my-gke-cluster
42
72
  ```
43
73
 
44
- **Important:** `gaia scan` and `gaia install` are separate flows. `gaia install` (run automatically by `npm install` postinstall) bootstraps the database and `.claude/` structure. `gaia scan` detects your project stack and writes the results to the DB. Running `gaia scan` never installs or creates symlinks; running `gaia install` never scans. To bootstrap from scratch, use `gaia install` (or `npm install @jaguilar87/gaia`), not `gaia scan`.
74
+ **Important:** `gaia scan` and `gaia install` are separate flows. `gaia install` bootstraps the database and `.claude/` structure. `gaia scan` detects your project stack and writes the results to the DB. Running `gaia scan` never installs or creates symlinks; running `gaia install` never scans.
45
75
 
46
76
  ---
47
77
 
@@ -50,27 +80,29 @@ gaia scan --non-interactive \
50
80
  ### Installation Flow
51
81
 
52
82
  ```
53
- User runs: npm install @jaguilar87/gaia
83
+ User runs: npm install @jaguilar87/gaia (or: pnpm add @jaguilar87/gaia)
84
+
85
+ (no postinstall — nothing runs automatically)
54
86
 
55
- postinstall script gaia install --postinstall
87
+ User runs: gaia install (or the SessionStart hook wires the workspace)
56
88
 
57
- [Bootstrap] runs scripts/bootstrap_database.sh
58
- - Seeds ~/.gaia/gaia.db with current schema (v17)
89
+ [Bootstrap] first `gaia` use runs scripts/bootstrap_database.sh (lazy)
90
+ - Seeds ~/.gaia/gaia.db with current schema
59
91
  - Seeds agent rows and permissions
60
92
 
61
93
  [Install] creates .claude/ structure
62
- Creates symlinks to gaia package:
63
- .claude/agents → node_modules/.../agents
64
- .claude/tools → node_modules/.../tools
65
- .claude/hooks → node_modules/.../hooks
66
- .claude/commands → node_modules/.../commands
67
- .claude/config → node_modules/.../config
68
- .claude/skills → node_modules/.../skills
69
- .claude/templates → node_modules/.../templates
94
+ Creates 5 directory symlinks to the gaia package:
95
+ .claude/agents → node_modules/.../agents
96
+ .claude/tools → node_modules/.../tools
97
+ .claude/hooks → node_modules/.../hooks
98
+ .claude/config → node_modules/.../config
99
+ .claude/skills → node_modules/.../skills
100
+ Plus a file link:
101
+ .claude/CHANGELOG.md → node_modules/.../CHANGELOG.md
70
102
 
71
103
  [Install] merges config files:
72
104
  - settings.local.json (hooks + permissions, union merge)
73
- - plugin-registry.json (installed[].name = "gaia-ops")
105
+ - plugin-registry.json (installed[].name = "gaia")
74
106
 
75
107
  Validates installation:
76
108
  ✅ Symlinks correct
@@ -86,14 +118,15 @@ Then optionally scan your project stack: gaia scan
86
118
  ```
87
119
  Example: Install + scan in a project with GitOps and Terraform
88
120
 
89
- 1. User: npm install @jaguilar87/gaia
121
+ 1. User: pnpm add @jaguilar87/gaia (no postinstall runs)
90
122
 
91
- 2. postinstall runs gaia install --postinstall:
92
- ✅ ~/.gaia/gaia.db bootstrapped (schema v17)
123
+ 2. User: gaia install
124
+ ✅ ~/.gaia/gaia.db bootstrapped (lazy, on first `gaia` use)
93
125
  ✅ .claude/ created
94
- 7 symlinks created (agents, tools, hooks, commands, templates, config, skills)
126
+ 5 directory symlinks + CHANGELOG.md link created
127
+ (agents, tools, hooks, config, skills)
95
128
  ✅ settings.local.json merged
96
- ✅ plugin-registry.json written (name: gaia-ops)
129
+ ✅ plugin-registry.json written (name: gaia)
97
130
 
98
131
  3. User: gaia scan (optional -- detects project stack)
99
132
 
@@ -109,7 +142,7 @@ Example: Install + scan in a project with GitOps and Terraform
109
142
  6. Result:
110
143
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
111
144
  ✅ Gaia installed and project scanned!
112
-
145
+
113
146
  Next steps:
114
147
  1. Run: gaia doctor
115
148
  2. Run: claude
@@ -143,7 +176,7 @@ gaia scan --non-interactive
143
176
  ### Complete CLI Options
144
177
 
145
178
  ```
146
- gaia install [options] # Bootstrap DB + .claude/ structure (also: npm postinstall)
179
+ gaia install [options] # Bootstrap DB + .claude/ structure (run manually; no postinstall)
147
180
 
148
181
  gaia scan [options] # Detect project stack, write to ~/.gaia/gaia.db
149
182
 
@@ -165,27 +198,29 @@ gaia scan options:
165
198
 
166
199
  ```
167
200
  your-project/
168
- ├── .claude/ ← Created by gaia install (npm postinstall)
201
+ ├── .claude/ ← Created by gaia install
169
202
  │ ├── agents/ (symlink) → Agent definitions
170
203
  │ ├── skills/ (symlink) → Skill modules
171
204
  │ ├── tools/ (symlink) → Orchestration tools
172
205
  │ ├── hooks/ (symlink) → Security validations
173
- │ ├── commands/ (symlink) → Slash commands
174
206
  │ ├── config/ (symlink) → Configuration (contracts, rules)
207
+ │ ├── CHANGELOG.md (file link) → Package changelog
175
208
  │ ├── logs/ ← Audit logs
176
209
  │ ├── approvals/ ← Pending T3 approval files
177
- │ ├── plugin-registry.json ← installed[].name = "gaia-ops"
210
+ │ ├── plugin-registry.json ← installed[].name = "gaia"
178
211
  │ └── settings.local.json ← Merged hooks + permissions + env
179
212
  └── node_modules/
180
- └── @jaguilar87/gaia/ ← npm package
213
+ └── @jaguilar87/gaia/ ← npm package (single unified plugin)
181
214
 
182
215
  ~/.gaia/
183
- └── gaia.db ← Canonical context + memory store (SQLite, schema v17)
216
+ └── gaia.db ← Canonical context + memory store (SQLite)
184
217
  ```
185
218
 
219
+ Five directory symlinks (`agents`, `tools`, `hooks`, `config`, `skills`) plus one `CHANGELOG.md` file link — the canonical list is `_SYMLINK_NAMES` + `_SYMLINK_FILES` in `bin/cli/_install_helpers.py`.
220
+
186
221
  Project context (stack, GitOps layout, Terraform layout, etc.) lives in `~/.gaia/gaia.db`, not in `.claude/project-context/`. Run `gaia scan` to populate it and `gaia context show` to inspect it.
187
222
 
188
- **Wire-up verification:** after install, the same checklist applies to every install mode (live, dry-run, RC, stable). See `skills/gaia-release/SKILL.md` -> "Wire-up Verification Checklist".
223
+ **Wire-up verification:** after install, the same checklist applies to every install mode (live, npm-sandbox, plugin, registry). See `skills/gaia-verify/SKILL.md` "Wire-up checklist".
189
224
 
190
225
  ---
191
226
 
@@ -197,11 +232,10 @@ Once installed, you have access to **complete documentation** in each directory:
197
232
 
198
233
  ```
199
234
  .claude/
200
- ├── agents/ 6 agents (platform-architect, gitops-operator, etc.)
201
- ├── skills/README.md 20 skill modules
202
- ├── commands/README.md Slash commands (gaia-plan, scan-project)
235
+ ├── agents/ 8 agents (platform-architect, gitops-operator, etc.)
236
+ ├── skills/README.md 32 skill modules
203
237
  ├── config/README.md Contracts, git standards, surface routing
204
- ├── hooks/README.md 8 hook scripts (4 primary + 4 event handlers)
238
+ ├── hooks/README.md Hook scripts (primary + event handlers)
205
239
  ├── tools/ Context, memory, validation, review
206
240
  └── bin/README.md CLI utilities
207
241
  ```
@@ -269,11 +303,11 @@ Orchestrator identity lives in `agents/gaia-orchestrator.md` and is activated vi
269
303
 
270
304
  ```bash
271
305
  # 1. Update package
272
- npm install @jaguilar87/gaia@latest
306
+ npm install @jaguilar87/gaia@latest # or: pnpm add @jaguilar87/gaia@latest
273
307
 
274
- # 2. Postinstall hook automatically:
275
- # - Replaces settings.json from template
276
- # - Fixes broken symlinks
308
+ # 2. Re-sync the workspace (no postinstall does this for you):
309
+ gaia update
310
+ # - Refreshes DB schema, config, and symlinks after the version bump
277
311
  ```
278
312
 
279
313
  ---
@@ -357,14 +391,15 @@ echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
357
391
  # Check the diagnostic marker first
358
392
  cat ~/.gaia/last-install-error.json
359
393
 
360
- # Re-run install (postinstall is re-entrant)
361
- npm install @jaguilar87/gaia
362
-
363
- # Or repair without a fresh tarball
394
+ # Re-run install (idempotent, re-entrant)
364
395
  gaia install
396
+
397
+ # Or, if the DB itself is missing, just run any gaia command
398
+ # (lazy bootstrap re-creates it):
399
+ gaia doctor
365
400
  ```
366
401
 
367
- For the full symptom -> cause -> fix table, see `skills/gaia-release/reference.md` -> "Diagnostic Guide".
402
+ For the full symptom cause fix table, see `skills/gaia-release/reference.md` "Diagnostic guide".
368
403
 
369
404
  ---
370
405
 
@@ -398,7 +433,7 @@ Gaia is designed with these principles:
398
433
 
399
434
  ✅ **Minimal** - Only creates what's needed, no duplicates
400
435
  ✅ **Adaptive** - Auto-detects existing installations
401
- ✅ **Non-invasive** - Works from any directory
436
+ ✅ **Non-invasive** - No postinstall; bootstrap is lazy, works under npm and pnpm alike
402
437
  ✅ **Safe** - Validates paths and skips reinstalls
403
438
  ✅ **Clear** - Explicit feedback on each step
404
439
  ✅ **Documented** - Complete documentation in each directory
@@ -422,11 +457,10 @@ A: Yes. Each project is a separate workspace in `~/.gaia/gaia.db`. Run `gaia sca
422
457
  A: Yes, but you need to enable developer mode or run as administrator.
423
458
 
424
459
  **Q: How do I update only documentation without changing code?**
425
- A: `npm update @jaguilar87/gaia` - symlinks point to the new version automatically.
460
+ A: `npm update @jaguilar87/gaia` then `gaia update` - symlinks point to the new version automatically.
426
461
 
427
462
  ---
428
463
 
429
- **Version:** 5.0.0-rc.7
430
- **Last updated:** 2026-05-22
464
+ **Version:** 5.0.11
465
+ **Last updated:** 2026-07-01
431
466
  **Maintained by:** Jorge Aguilar + Gaia (meta-agent)
432
-