@jaguilar87/gaia 5.0.11 → 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 (453) 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 +4 -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/approvals.py +1 -1
  18. package/bin/cli/cleanup.py +11 -18
  19. package/bin/cli/dev.py +483 -0
  20. package/bin/cli/doctor.py +166 -54
  21. package/bin/cli/history.py +2 -2
  22. package/bin/cli/install.py +41 -155
  23. package/bin/cli/memory.py +53 -25
  24. package/bin/cli/metrics.py +4 -4
  25. package/bin/cli/release.py +720 -0
  26. package/bin/cli/scan.py +83 -376
  27. package/bin/cli/status.py +1 -1
  28. package/bin/cli/uninstall.py +102 -169
  29. package/bin/gaia +71 -3
  30. package/bin/plugin-dryrun.sh +190 -0
  31. package/bin/pre-publish-validate.js +48 -19
  32. package/bin/validate-sandbox.sh +51 -7
  33. package/gaia/paths/README.md +3 -0
  34. package/gaia/paths/__init__.py +11 -0
  35. package/gaia/paths/resolver.py +7 -2
  36. package/gaia/paths/snapshot.py +179 -0
  37. package/hooks/README.md +2 -2
  38. package/hooks/adapters/__init__.py +1 -1
  39. package/hooks/adapters/base.py +1 -1
  40. package/hooks/adapters/channel.py +2 -2
  41. package/hooks/adapters/claude_code.py +36 -57
  42. package/hooks/adapters/host_session.py +1 -1
  43. package/hooks/adapters/host_transcript.py +1 -1
  44. package/hooks/adapters/registry.py +1 -1
  45. package/hooks/adapters/types.py +3 -3
  46. package/hooks/adapters/utils.py +1 -1
  47. package/hooks/hooks.json +109 -24
  48. package/hooks/modules/README.md +1 -7
  49. package/hooks/modules/__init__.py +1 -1
  50. package/hooks/modules/agents/contract_validator.py +14 -4
  51. package/hooks/modules/agents/response_contract.py +10 -5
  52. package/hooks/modules/context/context_injector.py +1 -1
  53. package/hooks/modules/core/__init__.py +3 -7
  54. package/hooks/modules/core/paths.py +1 -6
  55. package/hooks/modules/core/plugin_mode.py +6 -127
  56. package/hooks/modules/core/plugin_setup.py +9 -34
  57. package/hooks/modules/security/mutative_verbs.py +200 -0
  58. package/hooks/modules/session/db_backup.py +120 -0
  59. package/hooks/modules/session/pending_scanner.py +29 -0
  60. package/hooks/modules/session/session_manifest.py +206 -49
  61. package/hooks/modules/tools/bash_validator.py +18 -17
  62. package/hooks/modules/tools/task_validator.py +4 -2
  63. package/hooks/modules/validation/commit_validator.py +1 -1
  64. package/hooks/pre_compact.py +9 -11
  65. package/hooks/session_start.py +43 -22
  66. package/hooks/user_prompt_submit.py +104 -56
  67. package/package.json +7 -9
  68. package/pyproject.toml +1 -1
  69. package/scripts/build-plugin.py +112 -146
  70. package/scripts/check_hooks_drift.py +102 -0
  71. package/scripts/release-prepare.mjs +18 -13
  72. package/skills/README.md +1 -1
  73. package/skills/command-execution/SKILL.md +6 -0
  74. package/skills/command-execution/reference.md +18 -0
  75. package/skills/gaia-patterns/SKILL.md +2 -2
  76. package/skills/gaia-patterns/reference.md +27 -61
  77. package/skills/gaia-release/SKILL.md +78 -51
  78. package/skills/gaia-release/reference.md +138 -112
  79. package/skills/gaia-verify/SKILL.md +38 -30
  80. package/skills/gaia-verify/reference.md +54 -56
  81. package/skills/security-tiers/SKILL.md +1 -1
  82. package/tools/__init__.py +1 -1
  83. package/tools/context/_paths.py +1 -1
  84. package/tools/context/context_provider.py +21 -2
  85. package/tools/fast-queries/__init__.py +1 -1
  86. package/tools/gaia_simulator/__init__.py +1 -1
  87. package/tools/gaia_simulator/cli.py +2 -2
  88. package/tools/gaia_simulator/extractor.py +2 -2
  89. package/tools/gaia_simulator/reporter.py +1 -1
  90. package/tools/gaia_simulator/routing_simulator.py +2 -2
  91. package/tools/gaia_simulator/runner.py +1 -1
  92. package/tools/gaia_simulator/skills_mapper.py +1 -1
  93. package/tools/memory/__init__.py +1 -1
  94. package/tools/memory/conflict_detector.py +1 -1
  95. package/tools/memory/episodic.py +1 -1
  96. package/tools/memory/git_invalidator.py +1 -1
  97. package/tools/memory/paths.py +1 -1
  98. package/tools/memory/scoring.py +1 -1
  99. package/tools/memory/search_store.py +1 -1
  100. package/tools/scan/__init__.py +1 -1
  101. package/tools/scan/classify.py +457 -0
  102. package/tools/scan/core.py +8 -153
  103. package/tools/scan/migrate_workspace.py +6 -16
  104. package/tools/scan/orchestrator.py +12 -15
  105. package/tools/scan/scanners/git.py +5 -106
  106. package/tools/scan/seed_contract_permissions.py +14 -0
  107. package/tools/scan/store_populator.py +34 -169
  108. package/tools/scan/tests/test_core.py +4 -5
  109. package/tools/scan/tests/test_git.py +12 -16
  110. package/tools/scan/tests/test_store_populator.py +0 -1
  111. package/tools/scan/verify.py +1 -1
  112. package/tools/scan/workspace.py +1 -91
  113. package/tools/validation/README.md +2 -2
  114. package/tools/validation/validate_skills.py +5 -5
  115. package/dist/gaia-ops/.claude-plugin/plugin.json +0 -214
  116. package/dist/gaia-ops/README.md +0 -79
  117. package/dist/gaia-ops/agents/cloud-troubleshooter.md +0 -83
  118. package/dist/gaia-ops/agents/developer.md +0 -64
  119. package/dist/gaia-ops/agents/gaia-operator.md +0 -94
  120. package/dist/gaia-ops/agents/gaia-orchestrator.md +0 -101
  121. package/dist/gaia-ops/agents/gaia-planner.md +0 -73
  122. package/dist/gaia-ops/agents/gaia-system.md +0 -98
  123. package/dist/gaia-ops/agents/gitops-operator.md +0 -68
  124. package/dist/gaia-ops/agents/platform-architect.md +0 -68
  125. package/dist/gaia-ops/config/README.md +0 -46
  126. package/dist/gaia-ops/config/surface-routing.json +0 -430
  127. package/dist/gaia-ops/hooks/adapters/__init__.py +0 -62
  128. package/dist/gaia-ops/hooks/adapters/base.py +0 -336
  129. package/dist/gaia-ops/hooks/adapters/channel.py +0 -17
  130. package/dist/gaia-ops/hooks/adapters/claude_code.py +0 -2140
  131. package/dist/gaia-ops/hooks/adapters/host_session.py +0 -53
  132. package/dist/gaia-ops/hooks/adapters/host_transcript.py +0 -75
  133. package/dist/gaia-ops/hooks/adapters/registry.py +0 -87
  134. package/dist/gaia-ops/hooks/adapters/types.py +0 -322
  135. package/dist/gaia-ops/hooks/adapters/utils.py +0 -25
  136. package/dist/gaia-ops/hooks/hooks.json +0 -192
  137. package/dist/gaia-ops/hooks/modules/__init__.py +0 -15
  138. package/dist/gaia-ops/hooks/modules/agents/__init__.py +0 -29
  139. package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +0 -1000
  140. package/dist/gaia-ops/hooks/modules/agents/handoff_persister.py +0 -369
  141. package/dist/gaia-ops/hooks/modules/agents/response_contract.py +0 -693
  142. package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +0 -104
  143. package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +0 -281
  144. package/dist/gaia-ops/hooks/modules/agents/task_info_builder.py +0 -74
  145. package/dist/gaia-ops/hooks/modules/agents/transcript_analyzer.py +0 -458
  146. package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +0 -130
  147. package/dist/gaia-ops/hooks/modules/audit/__init__.py +0 -28
  148. package/dist/gaia-ops/hooks/modules/audit/event_detector.py +0 -168
  149. package/dist/gaia-ops/hooks/modules/audit/logger.py +0 -131
  150. package/dist/gaia-ops/hooks/modules/audit/metrics.py +0 -134
  151. package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +0 -583
  152. package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +0 -273
  153. package/dist/gaia-ops/hooks/modules/context/__init__.py +0 -11
  154. package/dist/gaia-ops/hooks/modules/context/agentic_loop_detector.py +0 -165
  155. package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +0 -317
  156. package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +0 -261
  157. package/dist/gaia-ops/hooks/modules/context/context_freshness.py +0 -141
  158. package/dist/gaia-ops/hooks/modules/context/context_injector.py +0 -502
  159. package/dist/gaia-ops/hooks/modules/context/context_writer.py +0 -452
  160. package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +0 -144
  161. package/dist/gaia-ops/hooks/modules/core/__init__.py +0 -40
  162. package/dist/gaia-ops/hooks/modules/core/hook_entry.py +0 -80
  163. package/dist/gaia-ops/hooks/modules/core/paths.py +0 -160
  164. package/dist/gaia-ops/hooks/modules/core/plugin_mode.py +0 -149
  165. package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +0 -572
  166. package/dist/gaia-ops/hooks/modules/core/state.py +0 -209
  167. package/dist/gaia-ops/hooks/modules/core/stdin.py +0 -24
  168. package/dist/gaia-ops/hooks/modules/core/workspace_bootstrap.py +0 -91
  169. package/dist/gaia-ops/hooks/modules/events/__init__.py +0 -1
  170. package/dist/gaia-ops/hooks/modules/events/event_writer.py +0 -177
  171. package/dist/gaia-ops/hooks/modules/memory/__init__.py +0 -8
  172. package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +0 -223
  173. package/dist/gaia-ops/hooks/modules/orchestrator/__init__.py +0 -1
  174. package/dist/gaia-ops/hooks/modules/orchestrator/delegate_mode.py +0 -122
  175. package/dist/gaia-ops/hooks/modules/scanning/__init__.py +0 -8
  176. package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +0 -86
  177. package/dist/gaia-ops/hooks/modules/security/__init__.py +0 -113
  178. package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +0 -327
  179. package/dist/gaia-ops/hooks/modules/security/approval_constants.py +0 -23
  180. package/dist/gaia-ops/hooks/modules/security/approval_grants.py +0 -1714
  181. package/dist/gaia-ops/hooks/modules/security/approval_messages.py +0 -111
  182. package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +0 -208
  183. package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +0 -723
  184. package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +0 -87
  185. package/dist/gaia-ops/hooks/modules/security/capability_classes.py +0 -456
  186. package/dist/gaia-ops/hooks/modules/security/command_semantics.py +0 -263
  187. package/dist/gaia-ops/hooks/modules/security/composition_rules.py +0 -616
  188. package/dist/gaia-ops/hooks/modules/security/flag_classifiers.py +0 -873
  189. package/dist/gaia-ops/hooks/modules/security/gaia_db_write_guard.py +0 -97
  190. package/dist/gaia-ops/hooks/modules/security/inline_ast_analyzer.py +0 -576
  191. package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +0 -2209
  192. package/dist/gaia-ops/hooks/modules/security/network_hosts.py +0 -481
  193. package/dist/gaia-ops/hooks/modules/security/prompt_validator.py +0 -40
  194. package/dist/gaia-ops/hooks/modules/security/shell_unwrapper.py +0 -165
  195. package/dist/gaia-ops/hooks/modules/security/tiers.py +0 -196
  196. package/dist/gaia-ops/hooks/modules/session/__init__.py +0 -10
  197. package/dist/gaia-ops/hooks/modules/session/pending_scanner.py +0 -251
  198. package/dist/gaia-ops/hooks/modules/session/session_context_writer.py +0 -100
  199. package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +0 -160
  200. package/dist/gaia-ops/hooks/modules/session/session_manager.py +0 -22
  201. package/dist/gaia-ops/hooks/modules/session/session_manifest.py +0 -777
  202. package/dist/gaia-ops/hooks/modules/session/session_registry.py +0 -339
  203. package/dist/gaia-ops/hooks/modules/tools/__init__.py +0 -29
  204. package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +0 -1681
  205. package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +0 -231
  206. package/dist/gaia-ops/hooks/modules/tools/hook_response.py +0 -57
  207. package/dist/gaia-ops/hooks/modules/tools/shell_parser.py +0 -227
  208. package/dist/gaia-ops/hooks/modules/tools/stage_decomposer.py +0 -315
  209. package/dist/gaia-ops/hooks/modules/tools/task_validator.py +0 -295
  210. package/dist/gaia-ops/hooks/modules/validation/__init__.py +0 -23
  211. package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +0 -415
  212. package/dist/gaia-ops/hooks/post_compact.py +0 -48
  213. package/dist/gaia-ops/hooks/post_tool_use.py +0 -58
  214. package/dist/gaia-ops/hooks/pre_compact.py +0 -65
  215. package/dist/gaia-ops/hooks/pre_tool_use.py +0 -418
  216. package/dist/gaia-ops/hooks/session_end_hook.py +0 -81
  217. package/dist/gaia-ops/hooks/session_start.py +0 -231
  218. package/dist/gaia-ops/hooks/stop_hook.py +0 -74
  219. package/dist/gaia-ops/hooks/subagent_start.py +0 -59
  220. package/dist/gaia-ops/hooks/subagent_stop.py +0 -336
  221. package/dist/gaia-ops/hooks/task_completed.py +0 -74
  222. package/dist/gaia-ops/hooks/user_prompt_submit.py +0 -230
  223. package/dist/gaia-ops/skills/README.md +0 -159
  224. package/dist/gaia-ops/skills/agent-approval-protocol/SKILL.md +0 -134
  225. package/dist/gaia-ops/skills/agent-approval-protocol/reference.md +0 -81
  226. package/dist/gaia-ops/skills/agent-contract-handoff/SKILL.md +0 -160
  227. package/dist/gaia-ops/skills/agent-creation/SKILL.md +0 -100
  228. package/dist/gaia-ops/skills/agent-creation/examples.md +0 -177
  229. package/dist/gaia-ops/skills/agent-creation/reference.md +0 -233
  230. package/dist/gaia-ops/skills/agent-protocol/SKILL.md +0 -99
  231. package/dist/gaia-ops/skills/agent-protocol/examples.md +0 -344
  232. package/dist/gaia-ops/skills/agent-response/SKILL.md +0 -69
  233. package/dist/gaia-ops/skills/agentic-loop/SKILL.md +0 -80
  234. package/dist/gaia-ops/skills/agentic-loop/reference.md +0 -378
  235. package/dist/gaia-ops/skills/blog-writing/SKILL.md +0 -98
  236. package/dist/gaia-ops/skills/blog-writing/reference.md +0 -130
  237. package/dist/gaia-ops/skills/brief-spec/SKILL.md +0 -306
  238. package/dist/gaia-ops/skills/command-execution/SKILL.md +0 -64
  239. package/dist/gaia-ops/skills/command-execution/reference.md +0 -83
  240. package/dist/gaia-ops/skills/execution/SKILL.md +0 -107
  241. package/dist/gaia-ops/skills/fast-queries/SKILL.md +0 -43
  242. package/dist/gaia-ops/skills/gaia-audit/SKILL.md +0 -119
  243. package/dist/gaia-ops/skills/gaia-compact/SKILL.md +0 -74
  244. package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +0 -103
  245. package/dist/gaia-ops/skills/gaia-patterns/reference.md +0 -437
  246. package/dist/gaia-ops/skills/gaia-planner/SKILL.md +0 -160
  247. package/dist/gaia-ops/skills/gaia-planner/reference.md +0 -194
  248. package/dist/gaia-ops/skills/gaia-release/SKILL.md +0 -96
  249. package/dist/gaia-ops/skills/gaia-release/reference.md +0 -205
  250. package/dist/gaia-ops/skills/gaia-verify/SKILL.md +0 -77
  251. package/dist/gaia-ops/skills/gaia-verify/reference.md +0 -80
  252. package/dist/gaia-ops/skills/git-conventions/SKILL.md +0 -51
  253. package/dist/gaia-ops/skills/gmail-policy/SKILL.md +0 -200
  254. package/dist/gaia-ops/skills/gmail-policy/reference.md +0 -150
  255. package/dist/gaia-ops/skills/gmail-triage/SKILL.md +0 -100
  256. package/dist/gaia-ops/skills/gws-setup/SKILL.md +0 -99
  257. package/dist/gaia-ops/skills/gws-setup/reference.md +0 -73
  258. package/dist/gaia-ops/skills/investigation/SKILL.md +0 -99
  259. package/dist/gaia-ops/skills/jira-ticket-writing/SKILL.md +0 -95
  260. package/dist/gaia-ops/skills/jira-ticket-writing/examples.md +0 -109
  261. package/dist/gaia-ops/skills/memory/SKILL.md +0 -399
  262. package/dist/gaia-ops/skills/orchestrator-present-approval/SKILL.md +0 -171
  263. package/dist/gaia-ops/skills/orchestrator-present-approval/reference.md +0 -294
  264. package/dist/gaia-ops/skills/orchestrator-present-approval/template.md +0 -55
  265. package/dist/gaia-ops/skills/pending-approvals/SKILL.md +0 -142
  266. package/dist/gaia-ops/skills/pending-approvals/reference.md +0 -247
  267. package/dist/gaia-ops/skills/readme-writing/SKILL.md +0 -71
  268. package/dist/gaia-ops/skills/readme-writing/reference.md +0 -187
  269. package/dist/gaia-ops/skills/reference.md +0 -134
  270. package/dist/gaia-ops/skills/schedule-task/SKILL.md +0 -64
  271. package/dist/gaia-ops/skills/schedule-task/reference.md +0 -233
  272. package/dist/gaia-ops/skills/security-tiers/SKILL.md +0 -69
  273. package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +0 -624
  274. package/dist/gaia-ops/skills/security-tiers/reference.md +0 -47
  275. package/dist/gaia-ops/skills/session-reflection/SKILL.md +0 -198
  276. package/dist/gaia-ops/skills/skill-creation/SKILL.md +0 -99
  277. package/dist/gaia-ops/skills/skill-creation/examples.md +0 -53
  278. package/dist/gaia-ops/skills/skill-creation/reference.md +0 -13
  279. package/dist/gaia-ops/skills/subagent-request-approval/SKILL.md +0 -148
  280. package/dist/gaia-ops/skills/subagent-request-approval/reference.md +0 -205
  281. package/dist/gaia-ops/tools/__init__.py +0 -9
  282. package/dist/gaia-ops/tools/context/README.md +0 -120
  283. package/dist/gaia-ops/tools/context/__init__.py +0 -40
  284. package/dist/gaia-ops/tools/context/_paths.py +0 -20
  285. package/dist/gaia-ops/tools/context/context_provider.py +0 -697
  286. package/dist/gaia-ops/tools/context/surface_router.py +0 -278
  287. package/dist/gaia-ops/tools/fast-queries/README.md +0 -65
  288. package/dist/gaia-ops/tools/fast-queries/__init__.py +0 -30
  289. package/dist/gaia-ops/tools/fast-queries/appservices/quicktriage_devops_developer.sh +0 -75
  290. package/dist/gaia-ops/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +0 -32
  291. package/dist/gaia-ops/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +0 -88
  292. package/dist/gaia-ops/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +0 -48
  293. package/dist/gaia-ops/tools/fast-queries/run_triage.sh +0 -59
  294. package/dist/gaia-ops/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +0 -80
  295. package/dist/gaia-ops/tools/gaia_simulator/__init__.py +0 -33
  296. package/dist/gaia-ops/tools/gaia_simulator/cli.py +0 -354
  297. package/dist/gaia-ops/tools/gaia_simulator/extractor.py +0 -456
  298. package/dist/gaia-ops/tools/gaia_simulator/reporter.py +0 -258
  299. package/dist/gaia-ops/tools/gaia_simulator/routing_simulator.py +0 -334
  300. package/dist/gaia-ops/tools/gaia_simulator/runner.py +0 -513
  301. package/dist/gaia-ops/tools/gaia_simulator/skills_mapper.py +0 -264
  302. package/dist/gaia-ops/tools/memory/README.md +0 -0
  303. package/dist/gaia-ops/tools/memory/__init__.py +0 -20
  304. package/dist/gaia-ops/tools/memory/backfill_fts5.py +0 -107
  305. package/dist/gaia-ops/tools/memory/conflict_detector.py +0 -295
  306. package/dist/gaia-ops/tools/memory/episodic.py +0 -1300
  307. package/dist/gaia-ops/tools/memory/git_invalidator.py +0 -262
  308. package/dist/gaia-ops/tools/memory/paths.py +0 -102
  309. package/dist/gaia-ops/tools/memory/scoring.py +0 -193
  310. package/dist/gaia-ops/tools/memory/search_store.py +0 -375
  311. package/dist/gaia-ops/tools/migration/README.md +0 -93
  312. package/dist/gaia-ops/tools/migration/migrate_01_episodes.py +0 -186
  313. package/dist/gaia-ops/tools/migration/migrate_01_episodes.sh +0 -21
  314. package/dist/gaia-ops/tools/migration/migrate_02_memory.py +0 -179
  315. package/dist/gaia-ops/tools/migration/migrate_02_memory.sh +0 -19
  316. package/dist/gaia-ops/tools/migration/migrate_03_context_contracts.py +0 -103
  317. package/dist/gaia-ops/tools/migration/migrate_03_context_contracts.sh +0 -19
  318. package/dist/gaia-ops/tools/migration/migrate_05_briefs.py +0 -307
  319. package/dist/gaia-ops/tools/migration/migrate_06_state_machines.py +0 -441
  320. package/dist/gaia-ops/tools/migration/migrate_07_plans_content.py +0 -124
  321. package/dist/gaia-ops/tools/migration/migrate_08_rename_workspace.py +0 -513
  322. package/dist/gaia-ops/tools/migration/validate.sh +0 -68
  323. package/dist/gaia-ops/tools/scan/__init__.py +0 -35
  324. package/dist/gaia-ops/tools/scan/config.py +0 -225
  325. package/dist/gaia-ops/tools/scan/core.py +0 -441
  326. package/dist/gaia-ops/tools/scan/migrate_workspace.py +0 -249
  327. package/dist/gaia-ops/tools/scan/orchestrator.py +0 -594
  328. package/dist/gaia-ops/tools/scan/registry.py +0 -127
  329. package/dist/gaia-ops/tools/scan/role_detector.py +0 -198
  330. package/dist/gaia-ops/tools/scan/scanners/__init__.py +0 -18
  331. package/dist/gaia-ops/tools/scan/scanners/base.py +0 -137
  332. package/dist/gaia-ops/tools/scan/scanners/environment.py +0 -349
  333. package/dist/gaia-ops/tools/scan/scanners/git.py +0 -570
  334. package/dist/gaia-ops/tools/scan/scanners/infrastructure.py +0 -875
  335. package/dist/gaia-ops/tools/scan/scanners/orchestration.py +0 -600
  336. package/dist/gaia-ops/tools/scan/scanners/stack.py +0 -1085
  337. package/dist/gaia-ops/tools/scan/scanners/tools.py +0 -260
  338. package/dist/gaia-ops/tools/scan/seed_contract_permissions.py +0 -327
  339. package/dist/gaia-ops/tools/scan/store_populator.py +0 -1818
  340. package/dist/gaia-ops/tools/scan/tests/__init__.py +0 -1
  341. package/dist/gaia-ops/tools/scan/tests/conftest.py +0 -798
  342. package/dist/gaia-ops/tools/scan/tests/test_core.py +0 -190
  343. package/dist/gaia-ops/tools/scan/tests/test_environment.py +0 -323
  344. package/dist/gaia-ops/tools/scan/tests/test_git.py +0 -419
  345. package/dist/gaia-ops/tools/scan/tests/test_infrastructure.py +0 -382
  346. package/dist/gaia-ops/tools/scan/tests/test_integration.py +0 -848
  347. package/dist/gaia-ops/tools/scan/tests/test_orchestration.py +0 -304
  348. package/dist/gaia-ops/tools/scan/tests/test_stack.py +0 -604
  349. package/dist/gaia-ops/tools/scan/tests/test_store_populator.py +0 -345
  350. package/dist/gaia-ops/tools/scan/tests/test_tools.py +0 -349
  351. package/dist/gaia-ops/tools/scan/ui.py +0 -659
  352. package/dist/gaia-ops/tools/scan/verify.py +0 -285
  353. package/dist/gaia-ops/tools/scan/walk.py +0 -118
  354. package/dist/gaia-ops/tools/scan/workspace.py +0 -110
  355. package/dist/gaia-ops/tools/state/__init__.py +0 -1
  356. package/dist/gaia-ops/tools/state/diff_source_of_truth.py +0 -150
  357. package/dist/gaia-ops/tools/validation/README.md +0 -235
  358. package/dist/gaia-ops/tools/validation/__init__.py +0 -17
  359. package/dist/gaia-ops/tools/validation/approval_gate.py +0 -321
  360. package/dist/gaia-ops/tools/validation/validate_skills.py +0 -189
  361. package/dist/gaia-security/.claude-plugin/plugin.json +0 -135
  362. package/dist/gaia-security/README.md +0 -88
  363. package/dist/gaia-security/hooks/adapters/__init__.py +0 -62
  364. package/dist/gaia-security/hooks/adapters/base.py +0 -336
  365. package/dist/gaia-security/hooks/adapters/channel.py +0 -17
  366. package/dist/gaia-security/hooks/adapters/claude_code.py +0 -2140
  367. package/dist/gaia-security/hooks/adapters/host_session.py +0 -53
  368. package/dist/gaia-security/hooks/adapters/host_transcript.py +0 -75
  369. package/dist/gaia-security/hooks/adapters/registry.py +0 -87
  370. package/dist/gaia-security/hooks/adapters/types.py +0 -322
  371. package/dist/gaia-security/hooks/adapters/utils.py +0 -25
  372. package/dist/gaia-security/hooks/hooks.json +0 -113
  373. package/dist/gaia-security/hooks/modules/__init__.py +0 -15
  374. package/dist/gaia-security/hooks/modules/agents/__init__.py +0 -29
  375. package/dist/gaia-security/hooks/modules/agents/contract_validator.py +0 -1000
  376. package/dist/gaia-security/hooks/modules/agents/handoff_persister.py +0 -369
  377. package/dist/gaia-security/hooks/modules/agents/response_contract.py +0 -693
  378. package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +0 -104
  379. package/dist/gaia-security/hooks/modules/agents/state_tracker.py +0 -281
  380. package/dist/gaia-security/hooks/modules/agents/task_info_builder.py +0 -74
  381. package/dist/gaia-security/hooks/modules/agents/transcript_analyzer.py +0 -458
  382. package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +0 -130
  383. package/dist/gaia-security/hooks/modules/audit/__init__.py +0 -28
  384. package/dist/gaia-security/hooks/modules/audit/event_detector.py +0 -168
  385. package/dist/gaia-security/hooks/modules/audit/logger.py +0 -131
  386. package/dist/gaia-security/hooks/modules/audit/metrics.py +0 -134
  387. package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +0 -583
  388. package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +0 -273
  389. package/dist/gaia-security/hooks/modules/context/__init__.py +0 -11
  390. package/dist/gaia-security/hooks/modules/context/agentic_loop_detector.py +0 -165
  391. package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +0 -317
  392. package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +0 -261
  393. package/dist/gaia-security/hooks/modules/context/context_freshness.py +0 -141
  394. package/dist/gaia-security/hooks/modules/context/context_injector.py +0 -502
  395. package/dist/gaia-security/hooks/modules/context/context_writer.py +0 -452
  396. package/dist/gaia-security/hooks/modules/context/contracts_loader.py +0 -144
  397. package/dist/gaia-security/hooks/modules/core/__init__.py +0 -40
  398. package/dist/gaia-security/hooks/modules/core/hook_entry.py +0 -80
  399. package/dist/gaia-security/hooks/modules/core/paths.py +0 -160
  400. package/dist/gaia-security/hooks/modules/core/plugin_mode.py +0 -149
  401. package/dist/gaia-security/hooks/modules/core/plugin_setup.py +0 -572
  402. package/dist/gaia-security/hooks/modules/core/state.py +0 -209
  403. package/dist/gaia-security/hooks/modules/core/stdin.py +0 -24
  404. package/dist/gaia-security/hooks/modules/core/workspace_bootstrap.py +0 -91
  405. package/dist/gaia-security/hooks/modules/events/__init__.py +0 -1
  406. package/dist/gaia-security/hooks/modules/events/event_writer.py +0 -177
  407. package/dist/gaia-security/hooks/modules/memory/__init__.py +0 -8
  408. package/dist/gaia-security/hooks/modules/memory/episode_writer.py +0 -223
  409. package/dist/gaia-security/hooks/modules/orchestrator/__init__.py +0 -1
  410. package/dist/gaia-security/hooks/modules/orchestrator/delegate_mode.py +0 -122
  411. package/dist/gaia-security/hooks/modules/scanning/__init__.py +0 -8
  412. package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +0 -86
  413. package/dist/gaia-security/hooks/modules/security/__init__.py +0 -113
  414. package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +0 -327
  415. package/dist/gaia-security/hooks/modules/security/approval_constants.py +0 -23
  416. package/dist/gaia-security/hooks/modules/security/approval_grants.py +0 -1714
  417. package/dist/gaia-security/hooks/modules/security/approval_messages.py +0 -111
  418. package/dist/gaia-security/hooks/modules/security/approval_scopes.py +0 -208
  419. package/dist/gaia-security/hooks/modules/security/blocked_commands.py +0 -723
  420. package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +0 -87
  421. package/dist/gaia-security/hooks/modules/security/capability_classes.py +0 -456
  422. package/dist/gaia-security/hooks/modules/security/command_semantics.py +0 -263
  423. package/dist/gaia-security/hooks/modules/security/composition_rules.py +0 -616
  424. package/dist/gaia-security/hooks/modules/security/flag_classifiers.py +0 -873
  425. package/dist/gaia-security/hooks/modules/security/gaia_db_write_guard.py +0 -97
  426. package/dist/gaia-security/hooks/modules/security/inline_ast_analyzer.py +0 -576
  427. package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +0 -2209
  428. package/dist/gaia-security/hooks/modules/security/network_hosts.py +0 -481
  429. package/dist/gaia-security/hooks/modules/security/prompt_validator.py +0 -40
  430. package/dist/gaia-security/hooks/modules/security/shell_unwrapper.py +0 -165
  431. package/dist/gaia-security/hooks/modules/security/tiers.py +0 -196
  432. package/dist/gaia-security/hooks/modules/session/__init__.py +0 -10
  433. package/dist/gaia-security/hooks/modules/session/pending_scanner.py +0 -251
  434. package/dist/gaia-security/hooks/modules/session/session_context_writer.py +0 -100
  435. package/dist/gaia-security/hooks/modules/session/session_event_injector.py +0 -160
  436. package/dist/gaia-security/hooks/modules/session/session_manager.py +0 -22
  437. package/dist/gaia-security/hooks/modules/session/session_manifest.py +0 -777
  438. package/dist/gaia-security/hooks/modules/session/session_registry.py +0 -339
  439. package/dist/gaia-security/hooks/modules/tools/__init__.py +0 -29
  440. package/dist/gaia-security/hooks/modules/tools/bash_validator.py +0 -1681
  441. package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +0 -231
  442. package/dist/gaia-security/hooks/modules/tools/hook_response.py +0 -57
  443. package/dist/gaia-security/hooks/modules/tools/shell_parser.py +0 -227
  444. package/dist/gaia-security/hooks/modules/tools/stage_decomposer.py +0 -315
  445. package/dist/gaia-security/hooks/modules/tools/task_validator.py +0 -295
  446. package/dist/gaia-security/hooks/modules/validation/__init__.py +0 -23
  447. package/dist/gaia-security/hooks/modules/validation/commit_validator.py +0 -415
  448. package/dist/gaia-security/hooks/post_tool_use.py +0 -58
  449. package/dist/gaia-security/hooks/pre_tool_use.py +0 -418
  450. package/dist/gaia-security/hooks/session_end_hook.py +0 -81
  451. package/dist/gaia-security/hooks/session_start.py +0 -231
  452. package/dist/gaia-security/hooks/stop_hook.py +0 -74
  453. 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.11",
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.11",
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.11",
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,10 @@ 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
+
10
14
  ## [5.0.11] - 2026-06-30
11
15
 
12
16
  ### Changed
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
-
package/README.md CHANGED
@@ -25,7 +25,7 @@ That pipeline is the spine. Everything else in this repo is either a component o
25
25
 
26
26
  ## Overview
27
27
 
28
- **Gaia** is a multi-agent orchestration system for DevOps automation. It ships two sub-plugins `gaia-ops` (full orchestrator) and `gaia-security` (security-only) — with security-first command classification, specialized AI agents, and plugin-based distribution. Currently integrates with Claude Code.
28
+ **Gaia** is a multi-agent orchestration system for DevOps automation. It 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 — with security-first command classification, specialized AI agents, and plugin-based distribution. Currently integrates with Claude Code.
29
29
 
30
30
  ### Features
31
31
 
@@ -45,45 +45,45 @@ That pipeline is the spine. Everything else in this repo is either a component o
45
45
 
46
46
  ## Installation
47
47
 
48
+ Gaia is one plugin reaching a workspace through two surfaces. Pick the one that matches how you run Claude Code.
49
+
48
50
  ### Via Claude Code Plugin (recommended)
49
51
  ```bash
50
52
  # Add the marketplace
51
53
  /plugin marketplace add metraton/gaia
52
54
 
53
- # Install the full system (includes security)
54
- /plugin install gaia-ops
55
-
56
- # Or install security only
57
- /plugin install gaia-security # Security hooks only
55
+ # Install the unified plugin
56
+ /plugin install gaia
58
57
  ```
59
58
 
60
- ### Via npm (advanced setup)
59
+ ### Via npm / pnpm (advanced setup)
61
60
  ```bash
62
- npm install @jaguilar87/gaia
61
+ npm install @jaguilar87/gaia # or: pnpm add @jaguilar87/gaia
62
+ gaia install # wires the workspace
63
63
  ```
64
64
 
65
- The `npm install` postinstall script bootstraps the database, creates `.claude/`, writes symlinks, and registers the plugin. Run `gaia doctor` afterward to verify.
65
+ **There is no `postinstall` hook.** The install is non-invasive and works identically under npm and pnpm. The DB is bootstrapped **lazily on the first `gaia` CLI use** (`_ensure_db_bootstrapped` in `bin/gaia`); the workspace `.claude/` structure is written by running `gaia install` explicitly, or by the SessionStart hook. Run `gaia doctor` afterward to verify.
66
66
 
67
- ### Quick Start (npm)
67
+ ### Quick Start (npm / pnpm)
68
68
 
69
69
  ```bash
70
- # Install and bootstrap (postinstall does the rest)
71
- npm install @jaguilar87/gaia
70
+ # Install the package
71
+ npm install @jaguilar87/gaia # or: pnpm add @jaguilar87/gaia
72
72
 
73
- # Or install globally
74
- npm install -g @jaguilar87/gaia
73
+ # Wire the workspace (no postinstall does this for you)
74
+ gaia install
75
75
  ```
76
76
 
77
- The postinstall hook does everything automatically. To scan your project stack after install:
77
+ To scan your project stack after install:
78
78
  ```bash
79
79
  gaia scan
80
80
  ```
81
81
 
82
- `gaia install` (run by postinstall) will:
83
- 1. Bootstrap the DB (`~/.gaia/gaia.db`) with the current schema
84
- 2. Create `.claude/` directory with symlinks to this package
82
+ `gaia install` will:
83
+ 1. Bootstrap the DB (`~/.gaia/gaia.db`) with the current schema (lazy on first use, or here explicitly)
84
+ 2. Create `.claude/` directory with 5 symlinks + a `CHANGELOG.md` link to this package
85
85
  3. Merge hooks and permissions into `settings.local.json` (preserves existing user config)
86
- 4. Write `plugin-registry.json`
86
+ 4. Write `plugin-registry.json` with `installed[].name == "gaia"`
87
87
 
88
88
  `gaia scan` (run separately, on-demand) will:
89
89
  1. Auto-detect your project structure (GitOps, Terraform, AppServices, stack)
@@ -104,21 +104,22 @@ This ensures your personal customizations (MCP servers, extra permissions) survi
104
104
 
105
105
  ### Manual Installation
106
106
 
107
+ `gaia install` writes these for you; the manual equivalent is:
108
+
107
109
  ```bash
108
110
  npm install @jaguilar87/gaia
109
111
  ```
110
112
 
111
- Then create symlinks:
113
+ Then create the 5 directory symlinks plus the CHANGELOG file link:
112
114
 
113
115
  ```bash
114
116
  mkdir -p .claude && cd .claude
115
117
  ln -s ../node_modules/@jaguilar87/gaia/agents agents
116
118
  ln -s ../node_modules/@jaguilar87/gaia/tools tools
117
119
  ln -s ../node_modules/@jaguilar87/gaia/hooks hooks
118
- ln -s ../node_modules/@jaguilar87/gaia/commands commands
119
120
  ln -s ../node_modules/@jaguilar87/gaia/config config
120
- ln -s ../node_modules/@jaguilar87/gaia/templates templates
121
121
  ln -s ../node_modules/@jaguilar87/gaia/skills skills
122
+ ln -s ../node_modules/@jaguilar87/gaia/CHANGELOG.md CHANGELOG.md
122
123
  ```
123
124
 
124
125
  ## Usage