@jaguilar87/gaia 5.0.0-rc1 → 5.0.4

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 (534) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/ARCHITECTURE.md +16 -19
  4. package/CHANGELOG.md +355 -6
  5. package/CONTRIBUTING.md +4 -2
  6. package/INSTALL.md +110 -112
  7. package/README.md +26 -21
  8. package/agents/README.md +3 -3
  9. package/agents/cloud-troubleshooter.md +44 -34
  10. package/agents/developer.md +34 -35
  11. package/agents/gaia-operator.md +55 -25
  12. package/agents/gaia-orchestrator.md +69 -205
  13. package/agents/gaia-planner.md +47 -27
  14. package/agents/gaia-system.md +66 -38
  15. package/agents/gitops-operator.md +41 -34
  16. package/agents/platform-architect.md +68 -0
  17. package/bin/README.md +72 -63
  18. package/bin/cli/_install_helpers.py +556 -0
  19. package/bin/cli/ac.py +322 -0
  20. package/bin/cli/approvals.py +1208 -53
  21. package/bin/cli/brief.py +1025 -0
  22. package/bin/cli/cleanup.py +3 -2
  23. package/bin/cli/context.py +373 -116
  24. package/bin/cli/doctor.py +954 -163
  25. package/bin/cli/evidence.py +393 -0
  26. package/bin/cli/history.py +57 -38
  27. package/bin/cli/install.py +822 -0
  28. package/bin/cli/memory.py +1777 -57
  29. package/bin/cli/metrics.py +12 -9
  30. package/bin/cli/milestone.py +303 -0
  31. package/bin/cli/paths.py +104 -0
  32. package/bin/cli/plan.py +397 -0
  33. package/bin/cli/plans.py +25 -23
  34. package/bin/cli/query.py +267 -0
  35. package/bin/cli/scan.py +463 -0
  36. package/bin/cli/status.py +143 -65
  37. package/bin/cli/task.py +279 -0
  38. package/bin/cli/uninstall.py +389 -0
  39. package/bin/cli/update.py +209 -134
  40. package/bin/cli/workspace.py +211 -0
  41. package/bin/pre-publish-validate.js +93 -0
  42. package/bin/validate-sandbox.sh +772 -0
  43. package/commands/README.md +1 -1
  44. package/commands/gaia.md +1 -1
  45. package/commands/scan-project.md +19 -12
  46. package/config/README.md +12 -15
  47. package/config/surface-routing.json +24 -14
  48. package/dist/gaia-ops/.claude-plugin/plugin.json +192 -2
  49. package/dist/gaia-ops/README.md +11 -12
  50. package/dist/gaia-ops/agents/cloud-troubleshooter.md +44 -34
  51. package/dist/gaia-ops/agents/developer.md +34 -35
  52. package/dist/gaia-ops/agents/gaia-operator.md +55 -25
  53. package/dist/gaia-ops/agents/gaia-orchestrator.md +69 -205
  54. package/dist/gaia-ops/agents/gaia-planner.md +47 -27
  55. package/dist/gaia-ops/agents/gaia-system.md +66 -38
  56. package/dist/gaia-ops/agents/gitops-operator.md +41 -34
  57. package/dist/gaia-ops/agents/platform-architect.md +68 -0
  58. package/dist/gaia-ops/commands/gaia.md +1 -1
  59. package/dist/gaia-ops/config/README.md +12 -15
  60. package/dist/gaia-ops/config/surface-routing.json +24 -14
  61. package/dist/gaia-ops/hooks/adapters/claude_code.py +218 -96
  62. package/dist/gaia-ops/hooks/hooks.json +45 -16
  63. package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +399 -46
  64. package/dist/gaia-ops/hooks/modules/agents/handoff_persister.py +356 -0
  65. package/dist/gaia-ops/hooks/modules/agents/response_contract.py +233 -36
  66. package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +1 -17
  67. package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +14 -0
  68. package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +15 -0
  69. package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +61 -89
  70. package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +48 -71
  71. package/dist/gaia-ops/hooks/modules/context/__init__.py +3 -3
  72. package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +1 -1
  73. package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +119 -76
  74. package/dist/gaia-ops/hooks/modules/context/context_freshness.py +67 -71
  75. package/dist/gaia-ops/hooks/modules/context/context_injector.py +135 -207
  76. package/dist/gaia-ops/hooks/modules/context/context_writer.py +366 -444
  77. package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +100 -117
  78. package/dist/gaia-ops/hooks/modules/core/state.py +29 -1
  79. package/dist/gaia-ops/hooks/modules/core/workspace_bootstrap.py +91 -0
  80. package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +8 -1
  81. package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +3 -1
  82. package/dist/gaia-ops/hooks/modules/security/__init__.py +0 -5
  83. package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +75 -4
  84. package/dist/gaia-ops/hooks/modules/security/approval_grants.py +759 -88
  85. package/dist/gaia-ops/hooks/modules/security/approval_messages.py +41 -1
  86. package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +18 -32
  87. package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +133 -5
  88. package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +3 -3
  89. package/dist/gaia-ops/hooks/modules/security/capability_classes.py +379 -0
  90. package/dist/gaia-ops/hooks/modules/security/command_semantics.py +87 -5
  91. package/dist/gaia-ops/hooks/modules/security/composition_rules.py +69 -0
  92. package/dist/gaia-ops/hooks/modules/security/gaia_db_write_guard.py +97 -0
  93. package/dist/gaia-ops/hooks/modules/security/inline_ast_analyzer.py +339 -0
  94. package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +658 -14
  95. package/dist/gaia-ops/hooks/modules/session/pending_scanner.py +18 -2
  96. package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +1 -1
  97. package/dist/gaia-ops/hooks/modules/session/session_manifest.py +548 -0
  98. package/dist/gaia-ops/hooks/modules/session/session_registry.py +162 -55
  99. package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +620 -127
  100. package/dist/gaia-ops/hooks/modules/tools/task_validator.py +5 -4
  101. package/dist/gaia-ops/hooks/post_compact.py +5 -1
  102. package/dist/gaia-ops/hooks/post_tool_use.py +5 -1
  103. package/dist/gaia-ops/hooks/pre_compact.py +5 -1
  104. package/dist/gaia-ops/hooks/pre_tool_use.py +5 -1
  105. package/dist/gaia-ops/hooks/session_end_hook.py +81 -0
  106. package/dist/gaia-ops/hooks/session_start.py +157 -7
  107. package/dist/gaia-ops/hooks/stop_hook.py +5 -13
  108. package/dist/gaia-ops/hooks/subagent_start.py +5 -17
  109. package/dist/gaia-ops/hooks/subagent_stop.py +46 -5
  110. package/dist/gaia-ops/hooks/task_completed.py +5 -1
  111. package/dist/gaia-ops/hooks/user_prompt_submit.py +31 -67
  112. package/dist/gaia-ops/skills/README.md +33 -28
  113. package/dist/gaia-ops/skills/agent-approval-protocol/SKILL.md +98 -0
  114. package/dist/gaia-ops/skills/agent-approval-protocol/reference.md +74 -0
  115. package/dist/gaia-ops/skills/agent-contract-handoff/SKILL.md +160 -0
  116. package/dist/gaia-ops/skills/agent-creation/SKILL.md +100 -0
  117. package/dist/gaia-ops/skills/agent-creation/examples.md +177 -0
  118. package/dist/gaia-ops/skills/agent-creation/reference.md +233 -0
  119. package/dist/gaia-ops/skills/agent-protocol/SKILL.md +58 -52
  120. package/dist/gaia-ops/skills/agent-protocol/examples.md +169 -59
  121. package/dist/gaia-ops/skills/agent-response/SKILL.md +44 -44
  122. package/dist/gaia-ops/skills/agentic-loop/SKILL.md +1 -1
  123. package/dist/gaia-ops/skills/brief-spec/SKILL.md +149 -25
  124. package/dist/gaia-ops/skills/command-execution/SKILL.md +12 -12
  125. package/dist/gaia-ops/skills/execution/SKILL.md +21 -13
  126. package/dist/gaia-ops/skills/gaia-audit/SKILL.md +119 -0
  127. package/dist/gaia-ops/skills/gaia-compact/SKILL.md +1 -1
  128. package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +6 -7
  129. package/dist/gaia-ops/skills/gaia-patterns/reference.md +132 -77
  130. package/dist/gaia-ops/skills/gaia-planner/SKILL.md +140 -17
  131. package/dist/gaia-ops/skills/gaia-planner/reference.md +143 -56
  132. package/dist/gaia-ops/skills/gaia-release/SKILL.md +35 -57
  133. package/dist/gaia-ops/skills/gaia-release/reference.md +175 -96
  134. package/dist/gaia-ops/skills/gaia-verify/SKILL.md +6 -6
  135. package/dist/gaia-ops/skills/gaia-verify/reference.md +9 -9
  136. package/dist/gaia-ops/skills/investigation/SKILL.md +86 -87
  137. package/dist/gaia-ops/skills/jira-ticket-writing/SKILL.md +95 -0
  138. package/dist/gaia-ops/skills/jira-ticket-writing/examples.md +109 -0
  139. package/dist/gaia-ops/skills/memory/SKILL.md +399 -0
  140. package/dist/gaia-ops/skills/orchestrator-present-approval/SKILL.md +116 -0
  141. package/dist/gaia-ops/skills/orchestrator-present-approval/reference.md +281 -0
  142. package/dist/gaia-ops/skills/orchestrator-present-approval/template.md +49 -0
  143. package/dist/gaia-ops/skills/pending-approvals/SKILL.md +119 -54
  144. package/dist/gaia-ops/skills/pending-approvals/reference.md +60 -27
  145. package/dist/gaia-ops/skills/readme-writing/reference.md +1 -1
  146. package/dist/gaia-ops/skills/reference.md +1 -2
  147. package/dist/gaia-ops/skills/schedule-task/SKILL.md +1 -1
  148. package/dist/gaia-ops/skills/schedule-task/reference.md +1 -1
  149. package/dist/gaia-ops/skills/security-tiers/SKILL.md +37 -109
  150. package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +5 -4
  151. package/dist/gaia-ops/skills/security-tiers/reference.md +9 -1
  152. package/dist/gaia-ops/skills/session-reflection/SKILL.md +198 -0
  153. package/dist/gaia-ops/skills/skill-creation/SKILL.md +21 -14
  154. package/dist/gaia-ops/skills/skill-creation/examples.md +53 -0
  155. package/dist/gaia-ops/skills/skill-creation/reference.md +3 -19
  156. package/dist/gaia-ops/skills/subagent-request-approval/SKILL.md +123 -0
  157. package/dist/gaia-ops/skills/subagent-request-approval/reference.md +179 -0
  158. package/dist/gaia-ops/tools/agentic-loop/record-iteration.py +2 -0
  159. package/dist/gaia-ops/tools/context/README.md +22 -34
  160. package/dist/gaia-ops/tools/context/__init__.py +0 -2
  161. package/dist/gaia-ops/tools/context/context_provider.py +170 -194
  162. package/dist/gaia-ops/tools/gaia_simulator/extractor.py +0 -1
  163. package/dist/gaia-ops/tools/gaia_simulator/runner.py +5 -31
  164. package/dist/gaia-ops/tools/memory/episodic.py +239 -149
  165. package/dist/gaia-ops/tools/memory/search_store.py +17 -2
  166. package/dist/gaia-ops/tools/migration/README.md +95 -0
  167. package/dist/gaia-ops/tools/migration/migrate_01_episodes.py +186 -0
  168. package/dist/gaia-ops/tools/migration/migrate_01_episodes.sh +21 -0
  169. package/dist/gaia-ops/tools/migration/migrate_02_memory.py +179 -0
  170. package/dist/gaia-ops/tools/migration/migrate_02_memory.sh +19 -0
  171. package/dist/gaia-ops/tools/migration/migrate_03_context_contracts.py +103 -0
  172. package/dist/gaia-ops/tools/migration/migrate_03_context_contracts.sh +19 -0
  173. package/dist/gaia-ops/tools/migration/migrate_04_harness_events.py +132 -0
  174. package/dist/gaia-ops/tools/migration/migrate_04_harness_events.sh +23 -0
  175. package/dist/gaia-ops/tools/migration/migrate_05_briefs.py +307 -0
  176. package/dist/gaia-ops/tools/migration/migrate_06_state_machines.py +441 -0
  177. package/dist/gaia-ops/tools/migration/migrate_07_plans_content.py +124 -0
  178. package/dist/gaia-ops/tools/migration/migrate_08_rename_workspace.py +513 -0
  179. package/dist/gaia-ops/tools/migration/validate.sh +68 -0
  180. package/dist/gaia-ops/tools/scan/config.py +6 -28
  181. package/dist/gaia-ops/tools/scan/core.py +441 -0
  182. package/dist/gaia-ops/tools/scan/merge.py +3 -2
  183. package/dist/gaia-ops/tools/scan/migrate_workspace.py +249 -0
  184. package/dist/gaia-ops/tools/scan/orchestrator.py +35 -174
  185. package/dist/gaia-ops/tools/scan/role_detector.py +198 -0
  186. package/dist/gaia-ops/tools/scan/seed_contract_permissions.py +327 -0
  187. package/dist/gaia-ops/tools/scan/store_populator.py +1818 -0
  188. package/dist/gaia-ops/tools/scan/tests/conftest.py +2 -0
  189. package/dist/gaia-ops/tools/scan/tests/test_core.py +190 -0
  190. package/dist/gaia-ops/tools/scan/tests/test_integration.py +42 -113
  191. package/dist/gaia-ops/tools/scan/tests/test_store_populator.py +345 -0
  192. package/dist/gaia-ops/tools/scan/ui.py +31 -12
  193. package/dist/gaia-ops/tools/scan/verify.py +39 -24
  194. package/dist/gaia-ops/tools/scan/workspace.py +33 -8
  195. package/dist/gaia-ops/tools/state/__init__.py +1 -0
  196. package/dist/gaia-ops/tools/state/diff_source_of_truth.py +150 -0
  197. package/dist/gaia-ops/tools/validation/README.md +1 -1
  198. package/dist/gaia-security/.claude-plugin/plugin.json +113 -2
  199. package/dist/gaia-security/README.md +0 -2
  200. package/dist/gaia-security/hooks/adapters/claude_code.py +218 -96
  201. package/dist/gaia-security/hooks/hooks.json +37 -8
  202. package/dist/gaia-security/hooks/modules/agents/contract_validator.py +399 -46
  203. package/dist/gaia-security/hooks/modules/agents/handoff_persister.py +356 -0
  204. package/dist/gaia-security/hooks/modules/agents/response_contract.py +233 -36
  205. package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +1 -17
  206. package/dist/gaia-security/hooks/modules/agents/state_tracker.py +14 -0
  207. package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +15 -0
  208. package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +61 -89
  209. package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +48 -71
  210. package/dist/gaia-security/hooks/modules/context/__init__.py +3 -3
  211. package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +1 -1
  212. package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +119 -76
  213. package/dist/gaia-security/hooks/modules/context/context_freshness.py +67 -71
  214. package/dist/gaia-security/hooks/modules/context/context_injector.py +135 -207
  215. package/dist/gaia-security/hooks/modules/context/context_writer.py +366 -444
  216. package/dist/gaia-security/hooks/modules/context/contracts_loader.py +100 -117
  217. package/dist/gaia-security/hooks/modules/core/state.py +29 -1
  218. package/dist/gaia-security/hooks/modules/core/workspace_bootstrap.py +91 -0
  219. package/dist/gaia-security/hooks/modules/memory/episode_writer.py +8 -1
  220. package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +3 -1
  221. package/dist/gaia-security/hooks/modules/security/__init__.py +0 -5
  222. package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +75 -4
  223. package/dist/gaia-security/hooks/modules/security/approval_grants.py +759 -88
  224. package/dist/gaia-security/hooks/modules/security/approval_messages.py +41 -1
  225. package/dist/gaia-security/hooks/modules/security/approval_scopes.py +18 -32
  226. package/dist/gaia-security/hooks/modules/security/blocked_commands.py +133 -5
  227. package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +3 -3
  228. package/dist/gaia-security/hooks/modules/security/capability_classes.py +379 -0
  229. package/dist/gaia-security/hooks/modules/security/command_semantics.py +87 -5
  230. package/dist/gaia-security/hooks/modules/security/composition_rules.py +69 -0
  231. package/dist/gaia-security/hooks/modules/security/gaia_db_write_guard.py +97 -0
  232. package/dist/gaia-security/hooks/modules/security/inline_ast_analyzer.py +339 -0
  233. package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +658 -14
  234. package/dist/gaia-security/hooks/modules/session/pending_scanner.py +18 -2
  235. package/dist/gaia-security/hooks/modules/session/session_event_injector.py +1 -1
  236. package/dist/gaia-security/hooks/modules/session/session_manifest.py +548 -0
  237. package/dist/gaia-security/hooks/modules/session/session_registry.py +162 -55
  238. package/dist/gaia-security/hooks/modules/tools/bash_validator.py +620 -127
  239. package/dist/gaia-security/hooks/modules/tools/task_validator.py +5 -4
  240. package/dist/gaia-security/hooks/post_tool_use.py +5 -1
  241. package/dist/gaia-security/hooks/pre_tool_use.py +5 -1
  242. package/dist/gaia-security/hooks/session_end_hook.py +81 -0
  243. package/dist/gaia-security/hooks/session_start.py +157 -7
  244. package/dist/gaia-security/hooks/stop_hook.py +5 -13
  245. package/dist/gaia-security/hooks/user_prompt_submit.py +31 -67
  246. package/gaia/README.md +136 -0
  247. package/gaia/__init__.py +21 -0
  248. package/gaia/approvals/__init__.py +17 -0
  249. package/gaia/approvals/chain.py +268 -0
  250. package/gaia/approvals/display.py +235 -0
  251. package/gaia/approvals/revert.py +282 -0
  252. package/gaia/approvals/store.py +752 -0
  253. package/gaia/briefs/__init__.py +62 -0
  254. package/gaia/briefs/serializer.py +683 -0
  255. package/gaia/briefs/store.py +1098 -0
  256. package/gaia/evidence/__init__.py +5 -0
  257. package/gaia/evidence/fs.py +123 -0
  258. package/gaia/evidence/store.py +265 -0
  259. package/gaia/paths/README.md +32 -0
  260. package/gaia/paths/__init__.py +65 -0
  261. package/gaia/paths/layout.py +47 -0
  262. package/gaia/paths/resolver.py +107 -0
  263. package/gaia/project.py +314 -0
  264. package/gaia/state/__init__.py +132 -0
  265. package/gaia/state/check_clauses.py +61 -0
  266. package/gaia/state/permissions.py +117 -0
  267. package/gaia/state/transitions.py +140 -0
  268. package/gaia/store/NOTICE.md +49 -0
  269. package/gaia/store/__init__.py +42 -0
  270. package/gaia/store/provider.py +170 -0
  271. package/gaia/store/reader.py +545 -0
  272. package/gaia/store/schema.sql +965 -0
  273. package/gaia/store/writer.py +3651 -0
  274. package/hooks/README.md +20 -9
  275. package/hooks/adapters/claude_code.py +218 -96
  276. package/hooks/elicitation_result.py +35 -3
  277. package/hooks/hooks.json +21 -16
  278. package/hooks/modules/README.md +4 -6
  279. package/hooks/modules/agents/contract_validator.py +399 -46
  280. package/hooks/modules/agents/handoff_persister.py +356 -0
  281. package/hooks/modules/agents/response_contract.py +233 -36
  282. package/hooks/modules/agents/skill_injection_verifier.py +1 -17
  283. package/hooks/modules/agents/state_tracker.py +14 -0
  284. package/hooks/modules/agents/transcript_reader.py +15 -0
  285. package/hooks/modules/audit/workflow_auditor.py +61 -89
  286. package/hooks/modules/audit/workflow_recorder.py +48 -71
  287. package/hooks/modules/context/__init__.py +3 -3
  288. package/hooks/modules/context/anchor_tracker.py +1 -1
  289. package/hooks/modules/context/compact_context_builder.py +119 -76
  290. package/hooks/modules/context/context_freshness.py +67 -71
  291. package/hooks/modules/context/context_injector.py +135 -207
  292. package/hooks/modules/context/context_writer.py +366 -444
  293. package/hooks/modules/context/contracts_loader.py +100 -117
  294. package/hooks/modules/core/state.py +29 -1
  295. package/hooks/modules/core/workspace_bootstrap.py +91 -0
  296. package/hooks/modules/install_detector.py +186 -0
  297. package/hooks/modules/memory/episode_writer.py +8 -1
  298. package/hooks/modules/scanning/scan_trigger.py +3 -1
  299. package/hooks/modules/security/__init__.py +0 -5
  300. package/hooks/modules/security/approval_cleanup.py +75 -4
  301. package/hooks/modules/security/approval_grants.py +759 -88
  302. package/hooks/modules/security/approval_messages.py +41 -1
  303. package/hooks/modules/security/approval_scopes.py +18 -32
  304. package/hooks/modules/security/blocked_commands.py +133 -5
  305. package/hooks/modules/security/blocked_message_formatter.py +3 -3
  306. package/hooks/modules/security/capability_classes.py +379 -0
  307. package/hooks/modules/security/command_semantics.py +87 -5
  308. package/hooks/modules/security/composition_rules.py +69 -0
  309. package/hooks/modules/security/gaia_db_write_guard.py +97 -0
  310. package/hooks/modules/security/inline_ast_analyzer.py +339 -0
  311. package/hooks/modules/security/mutative_verbs.py +658 -14
  312. package/hooks/modules/session/pending_scanner.py +18 -2
  313. package/hooks/modules/session/session_event_injector.py +1 -1
  314. package/hooks/modules/session/session_manifest.py +548 -0
  315. package/hooks/modules/session/session_registry.py +162 -55
  316. package/hooks/modules/tools/bash_validator.py +620 -127
  317. package/hooks/modules/tools/task_validator.py +5 -4
  318. package/hooks/post_compact.py +5 -1
  319. package/hooks/post_tool_use.py +5 -1
  320. package/hooks/pre_compact.py +5 -1
  321. package/hooks/pre_tool_use.py +5 -1
  322. package/hooks/session_end_hook.py +81 -0
  323. package/hooks/session_start.py +157 -7
  324. package/hooks/stop_hook.py +5 -13
  325. package/hooks/subagent_start.py +5 -17
  326. package/hooks/subagent_stop.py +46 -5
  327. package/hooks/task_completed.py +5 -1
  328. package/hooks/user_prompt_submit.py +31 -67
  329. package/package.json +12 -21
  330. package/pyproject.toml +5 -2
  331. package/scripts/bootstrap_database.sh +851 -0
  332. package/scripts/build-plugin.py +439 -0
  333. package/scripts/migrations/README.md +63 -0
  334. package/scripts/migrations/v10_to_v11.sql +170 -0
  335. package/scripts/migrations/v10_to_v11_fresh.sql +18 -0
  336. package/scripts/migrations/v11_to_v12.sql +195 -0
  337. package/scripts/migrations/v11_to_v12_fresh.sql +19 -0
  338. package/scripts/migrations/v12_to_v13.sql +48 -0
  339. package/scripts/migrations/v12_to_v13_fresh.sql +17 -0
  340. package/scripts/migrations/v13_to_v14.sql +44 -0
  341. package/scripts/migrations/v13_to_v14_fresh.sql +17 -0
  342. package/scripts/migrations/v14_to_v15.sql +71 -0
  343. package/scripts/migrations/v14_to_v15_fresh.sql +19 -0
  344. package/scripts/migrations/v15_to_v16.sql +57 -0
  345. package/scripts/migrations/v15_to_v16_fresh.sql +18 -0
  346. package/scripts/migrations/v16_to_v17.sql +51 -0
  347. package/scripts/migrations/v16_to_v17_fresh.sql +18 -0
  348. package/scripts/migrations/v17_to_v18.sql +66 -0
  349. package/scripts/migrations/v17_to_v18_fresh.sql +24 -0
  350. package/scripts/migrations/v1_to_v2.sql +97 -0
  351. package/scripts/migrations/v2_to_v3.sql +68 -0
  352. package/scripts/migrations/v2_to_v3_merge.sql +69 -0
  353. package/scripts/migrations/v3_to_v4.sql +67 -0
  354. package/scripts/migrations/v3_to_v4_fresh.sql +20 -0
  355. package/scripts/migrations/v4_to_v5.sql +55 -0
  356. package/scripts/migrations/v4_to_v5_fresh.sql +20 -0
  357. package/scripts/migrations/v5_to_v6.sql +48 -0
  358. package/scripts/migrations/v5_to_v6_fresh.sql +17 -0
  359. package/scripts/migrations/v6_to_v7.sql +26 -0
  360. package/scripts/migrations/v6_to_v7_fresh.sql +13 -0
  361. package/scripts/migrations/v7_to_v8.sql +44 -0
  362. package/scripts/migrations/v7_to_v8_fresh.sql +14 -0
  363. package/scripts/migrations/v8_to_v9.sql +87 -0
  364. package/scripts/migrations/v8_to_v9_fresh.sql +15 -0
  365. package/scripts/migrations/v9_to_v10.sql +109 -0
  366. package/scripts/migrations/v9_to_v10_episodes_workspace.sql +109 -0
  367. package/scripts/migrations/v9_to_v10_fresh.sql +18 -0
  368. package/scripts/seed_agent_permissions.py +166 -0
  369. package/skills/README.md +33 -28
  370. package/skills/agent-approval-protocol/SKILL.md +98 -0
  371. package/skills/agent-approval-protocol/reference.md +74 -0
  372. package/skills/agent-contract-handoff/SKILL.md +160 -0
  373. package/skills/agent-creation/SKILL.md +100 -0
  374. package/skills/agent-creation/examples.md +177 -0
  375. package/skills/agent-creation/reference.md +233 -0
  376. package/skills/agent-protocol/SKILL.md +58 -52
  377. package/skills/agent-protocol/examples.md +169 -59
  378. package/skills/agent-response/SKILL.md +44 -44
  379. package/skills/agentic-loop/SKILL.md +1 -1
  380. package/skills/brief-spec/SKILL.md +149 -25
  381. package/skills/command-execution/SKILL.md +12 -12
  382. package/skills/execution/SKILL.md +21 -13
  383. package/skills/gaia-audit/SKILL.md +119 -0
  384. package/skills/gaia-compact/SKILL.md +1 -1
  385. package/skills/gaia-patterns/SKILL.md +6 -7
  386. package/skills/gaia-patterns/reference.md +132 -77
  387. package/skills/gaia-planner/SKILL.md +140 -17
  388. package/skills/gaia-planner/reference.md +143 -56
  389. package/skills/gaia-release/SKILL.md +35 -57
  390. package/skills/gaia-release/reference.md +175 -96
  391. package/skills/gaia-verify/SKILL.md +6 -6
  392. package/skills/gaia-verify/reference.md +9 -9
  393. package/skills/investigation/SKILL.md +86 -87
  394. package/skills/jira-ticket-writing/SKILL.md +95 -0
  395. package/skills/jira-ticket-writing/examples.md +109 -0
  396. package/skills/memory/SKILL.md +399 -0
  397. package/skills/orchestrator-present-approval/SKILL.md +116 -0
  398. package/skills/orchestrator-present-approval/reference.md +281 -0
  399. package/skills/orchestrator-present-approval/template.md +49 -0
  400. package/skills/pending-approvals/SKILL.md +119 -54
  401. package/skills/pending-approvals/reference.md +60 -27
  402. package/skills/readme-writing/reference.md +1 -1
  403. package/skills/reference.md +1 -2
  404. package/skills/schedule-task/SKILL.md +1 -1
  405. package/skills/schedule-task/reference.md +1 -1
  406. package/skills/security-tiers/SKILL.md +37 -109
  407. package/skills/security-tiers/destructive-commands-reference.md +5 -4
  408. package/skills/security-tiers/reference.md +9 -1
  409. package/skills/session-reflection/SKILL.md +198 -0
  410. package/skills/skill-creation/SKILL.md +21 -14
  411. package/skills/skill-creation/examples.md +53 -0
  412. package/skills/skill-creation/reference.md +3 -19
  413. package/skills/subagent-request-approval/SKILL.md +123 -0
  414. package/skills/subagent-request-approval/reference.md +179 -0
  415. package/templates/README.md +14 -13
  416. package/tools/agentic-loop/record-iteration.py +2 -0
  417. package/tools/context/README.md +22 -34
  418. package/tools/context/__init__.py +0 -2
  419. package/tools/context/context_provider.py +170 -194
  420. package/tools/gaia_simulator/extractor.py +0 -1
  421. package/tools/gaia_simulator/runner.py +5 -31
  422. package/tools/memory/episodic.py +239 -149
  423. package/tools/memory/search_store.py +17 -2
  424. package/tools/migration/README.md +95 -0
  425. package/tools/migration/migrate_01_episodes.py +186 -0
  426. package/tools/migration/migrate_01_episodes.sh +21 -0
  427. package/tools/migration/migrate_02_memory.py +179 -0
  428. package/tools/migration/migrate_02_memory.sh +19 -0
  429. package/tools/migration/migrate_03_context_contracts.py +103 -0
  430. package/tools/migration/migrate_03_context_contracts.sh +19 -0
  431. package/tools/migration/migrate_04_harness_events.py +132 -0
  432. package/tools/migration/migrate_04_harness_events.sh +23 -0
  433. package/tools/migration/migrate_05_briefs.py +307 -0
  434. package/tools/migration/migrate_06_state_machines.py +441 -0
  435. package/tools/migration/migrate_07_plans_content.py +124 -0
  436. package/tools/migration/migrate_08_rename_workspace.py +513 -0
  437. package/tools/migration/validate.sh +68 -0
  438. package/tools/scan/config.py +6 -28
  439. package/tools/scan/core.py +441 -0
  440. package/tools/scan/merge.py +3 -2
  441. package/tools/scan/migrate_workspace.py +249 -0
  442. package/tools/scan/orchestrator.py +35 -174
  443. package/tools/scan/role_detector.py +198 -0
  444. package/tools/scan/seed_contract_permissions.py +327 -0
  445. package/tools/scan/store_populator.py +1818 -0
  446. package/tools/scan/tests/conftest.py +2 -0
  447. package/tools/scan/tests/test_core.py +190 -0
  448. package/tools/scan/tests/test_integration.py +42 -113
  449. package/tools/scan/tests/test_store_populator.py +345 -0
  450. package/tools/scan/ui.py +31 -12
  451. package/tools/scan/verify.py +39 -24
  452. package/tools/scan/workspace.py +33 -8
  453. package/tools/state/__init__.py +1 -0
  454. package/tools/state/diff_source_of_truth.py +150 -0
  455. package/tools/validation/README.md +1 -1
  456. package/agents/terraform-architect.md +0 -63
  457. package/bin/gaia-cleanup.js +0 -531
  458. package/bin/gaia-doctor.js +0 -635
  459. package/bin/gaia-evidence +0 -126
  460. package/bin/gaia-history.js +0 -251
  461. package/bin/gaia-metrics.js +0 -1278
  462. package/bin/gaia-review.js +0 -269
  463. package/bin/gaia-scan +0 -44
  464. package/bin/gaia-scan.py +0 -589
  465. package/bin/gaia-skills-diagnose.js +0 -929
  466. package/bin/gaia-status.js +0 -278
  467. package/bin/gaia-uninstall.js +0 -111
  468. package/bin/gaia-update.js +0 -816
  469. package/config/cloud/aws.json +0 -134
  470. package/config/cloud/gcp.json +0 -139
  471. package/config/context-contracts.json +0 -158
  472. package/config/universal-rules.json +0 -102
  473. package/dist/gaia-ops/agents/terraform-architect.md +0 -63
  474. package/dist/gaia-ops/config/cloud/aws.json +0 -134
  475. package/dist/gaia-ops/config/cloud/gcp.json +0 -139
  476. package/dist/gaia-ops/config/context-contracts.json +0 -158
  477. package/dist/gaia-ops/config/universal-rules.json +0 -102
  478. package/dist/gaia-ops/hooks/modules/security/gitops_validator.py +0 -179
  479. package/dist/gaia-ops/settings.json +0 -72
  480. package/dist/gaia-ops/skills/context-updater/SKILL.md +0 -87
  481. package/dist/gaia-ops/skills/context-updater/examples.md +0 -71
  482. package/dist/gaia-ops/skills/developer-patterns/SKILL.md +0 -50
  483. package/dist/gaia-ops/skills/developer-patterns/reference.md +0 -112
  484. package/dist/gaia-ops/skills/gaia-self-check/SKILL.md +0 -114
  485. package/dist/gaia-ops/skills/gaia-self-check/reference.md +0 -453
  486. package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +0 -60
  487. package/dist/gaia-ops/skills/gitops-patterns/reference.md +0 -183
  488. package/dist/gaia-ops/skills/memory-curation/SKILL.md +0 -83
  489. package/dist/gaia-ops/skills/memory-search/SKILL.md +0 -88
  490. package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +0 -160
  491. package/dist/gaia-ops/skills/orchestrator-approval/reference.md +0 -174
  492. package/dist/gaia-ops/skills/request-approval/SKILL.md +0 -140
  493. package/dist/gaia-ops/skills/request-approval/examples.md +0 -140
  494. package/dist/gaia-ops/skills/request-approval/reference.md +0 -57
  495. package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +0 -89
  496. package/dist/gaia-ops/skills/terraform-patterns/reference.md +0 -93
  497. package/dist/gaia-ops/tools/context/context_section_reader.py +0 -342
  498. package/dist/gaia-ops/tools/context/pending_updates.py +0 -760
  499. package/dist/gaia-ops/tools/persist_transcript_analysis.py +0 -85
  500. package/dist/gaia-ops/tools/review/__init__.py +0 -1
  501. package/dist/gaia-ops/tools/review/review_engine.py +0 -157
  502. package/dist/gaia-ops/tools/scan/setup.py +0 -686
  503. package/dist/gaia-security/config/universal-rules.json +0 -102
  504. package/dist/gaia-security/hooks/modules/security/gitops_validator.py +0 -179
  505. package/dist/gaia-security/settings.json +0 -58
  506. package/hooks/modules/evidence/__init__.py +0 -34
  507. package/hooks/modules/evidence/assertions.py +0 -137
  508. package/hooks/modules/evidence/index_writer.py +0 -57
  509. package/hooks/modules/evidence/loader.py +0 -126
  510. package/hooks/modules/evidence/runner.py +0 -241
  511. package/hooks/modules/security/gitops_validator.py +0 -179
  512. package/skills/context-updater/SKILL.md +0 -87
  513. package/skills/context-updater/examples.md +0 -71
  514. package/skills/developer-patterns/SKILL.md +0 -50
  515. package/skills/developer-patterns/reference.md +0 -112
  516. package/skills/gaia-self-check/SKILL.md +0 -114
  517. package/skills/gaia-self-check/reference.md +0 -453
  518. package/skills/gitops-patterns/SKILL.md +0 -60
  519. package/skills/gitops-patterns/reference.md +0 -183
  520. package/skills/memory-curation/SKILL.md +0 -83
  521. package/skills/memory-search/SKILL.md +0 -88
  522. package/skills/orchestrator-approval/SKILL.md +0 -160
  523. package/skills/orchestrator-approval/reference.md +0 -174
  524. package/skills/request-approval/SKILL.md +0 -140
  525. package/skills/request-approval/examples.md +0 -140
  526. package/skills/request-approval/reference.md +0 -57
  527. package/skills/terraform-patterns/SKILL.md +0 -89
  528. package/skills/terraform-patterns/reference.md +0 -93
  529. package/tools/context/context_section_reader.py +0 -342
  530. package/tools/context/pending_updates.py +0 -760
  531. package/tools/persist_transcript_analysis.py +0 -85
  532. package/tools/review/__init__.py +0 -1
  533. package/tools/review/review_engine.py +0 -157
  534. package/tools/scan/setup.py +0 -686
@@ -8,7 +8,7 @@
8
8
  {
9
9
  "name": "gaia-ops",
10
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.0-rc1",
11
+ "version": "5.0.4",
12
12
  "category": "devops",
13
13
  "author": {
14
14
  "name": "jaguilar87",
@@ -20,7 +20,7 @@
20
20
  {
21
21
  "name": "gaia-security",
22
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.0-rc1",
23
+ "version": "5.0.4",
24
24
  "category": "security",
25
25
  "author": {
26
26
  "name": "jaguilar87",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaia-ops",
3
- "version": "5.0.0-rc1",
3
+ "version": "5.0.4",
4
4
  "description": "Security-first orchestrator with specialized agents, hooks, and governance for AI coding",
5
5
  "author": {
6
6
  "name": "jaguilar87",
package/ARCHITECTURE.md CHANGED
@@ -38,7 +38,7 @@ pre_tool_use.py (PreToolUse hook)
38
38
  | 4. Validate SendMessage (agent resumption)
39
39
  v
40
40
  Agent executes
41
- | Uses tools, follows skills, emits json:contract
41
+ | Uses tools, follows skills, emits agent_contract_handoff
42
42
  v
43
43
  subagent_stop.py (SubagentStop hook)
44
44
  | 1. Read transcript, extract task description
@@ -46,11 +46,11 @@ subagent_stop.py (SubagentStop hook)
46
46
  | 3. Validate response contract
47
47
  | 4. Detect anomalies
48
48
  | 5. Store episodic memory
49
- | 6. Process CONTEXT_UPDATE blocks
49
+ | 6. Process update_contracts from the agent_contract_handoff envelope
50
50
  v
51
- Orchestrator processes json:contract (via agent-response skill)
51
+ Orchestrator processes agent_contract_handoff (via agent-response skill)
52
52
  | COMPLETE -> summarize to user
53
- | REVIEW (with approval_id) -> get approval -> resume via SendMessage
53
+ | APPROVAL_REQUEST (with approval_id) -> get approval -> resume via SendMessage
54
54
  | NEEDS_INPUT -> ask user -> resume via SendMessage
55
55
  | BLOCKED -> report blocker
56
56
  ```
@@ -72,7 +72,6 @@ Order is short-circuit -- first match wins:
72
72
  | If mutative + no active grant -> generate nonce, block
73
73
  | If mutative + active grant -> allow (T3)
74
74
  | If not mutative -> safe by elimination (T0)
75
- 6. gitops_validator --> GitOps policy for kubectl/helm/flux
76
75
  ```
77
76
 
78
77
  ### Task/Agent Validation
@@ -108,7 +107,7 @@ Fires after every agent tool completes:
108
107
  4. Detect anomalies --> execution failures, consecutive failures
109
108
  | If anomalies found -> create needs_analysis.flag for Gaia
110
109
  5. Capture episodic memory --> store episode via tools/memory/episodic.py
111
- 6. Process context updates --> apply CONTEXT_UPDATE blocks via context_writer.py
110
+ 6. Process context updates --> apply update_contracts entries from the agent_contract_handoff envelope via context_writer.py (process_update_contracts)
112
111
  ```
113
112
 
114
113
  ## Surface Routing: surface_router.py
@@ -119,9 +118,9 @@ Classifies user tasks into surfaces using signal matching against `config/surfac
119
118
  |---------|--------------|-----------------|
120
119
  | `live_runtime` | cloud-troubleshooter | pods, services, logs, kubectl, gcloud |
121
120
  | `gitops_desired_state` | gitops-operator | manifests, Flux, Helm, Kustomize |
122
- | `terraform_iac` | terraform-architect | Terraform, Terragrunt, IAM, modules |
121
+ | `iac` | platform-architect | Terraform, Terragrunt, IAM, modules |
123
122
  | `app_ci_tooling` | developer | CI/CD, Docker, package tooling |
124
- | `planning_specs` | gaia-planner | briefs, plans, task breakdowns |
123
+ | `planning_specs` | gaia-planner | briefs, plans (materializados cuando una conversación alcanza Cerrar) |
125
124
  | `gaia_system` | gaia-system | hooks, skills, agents/, CLAUDE.md |
126
125
  | `workspace` | gaia-operator | memory, email, schedules, file transfers |
127
126
 
@@ -141,12 +140,11 @@ Assembles the context payload injected into agent prompts by pre_tool_use.py.
141
140
  ```
142
141
  context_provider.py <agent_name> <user_task>
143
142
  |
144
- +--> Load project-context.json
145
- +--> Detect cloud provider (GCP/AWS)
146
- +--> Load base contracts (config/context-contracts.json)
143
+ +--> Load project context from ~/.gaia/gaia.db (project_context_contracts table)
144
+ +--> Detect cloud provider (GCP/AWS) from DB workspace record
145
+ +--> Load base contracts from DB (agent_contract_permissions table)
147
146
  +--> Merge cloud overrides (config/cloud/{provider}.json)
148
147
  +--> Extract contracted sections for this agent (read permissions)
149
- +--> Load universal rules (config/universal-rules.json)
150
148
  +--> Load relevant episodic memory (similarity match)
151
149
  +--> Classify surfaces (surface_router.py)
152
150
  +--> Build investigation brief (surface_router.py)
@@ -172,7 +170,7 @@ Nonce-based T3 approval lifecycle:
172
170
  3. BashValidator generates 128-bit nonce via generate_nonce()
173
171
  4. write_pending_approval() saves pending-{nonce}.json to .claude/cache/approvals/
174
172
  5. Hook returns corrective deny (exit 0) with NONCE:{hex} in message
175
- 6. Agent includes NONCE:{hex} in REVIEW status to orchestrator
173
+ 6. Agent includes NONCE:{hex} in APPROVAL_REQUEST status to orchestrator
176
174
  7. Orchestrator presents plan to user, asks for approval
177
175
  8. User approves -> orchestrator resumes agent with "APPROVE:{nonce}"
178
176
  9. pre_tool_use.py detects APPROVE: prefix, calls activate_pending_approval()
@@ -182,9 +180,9 @@ Nonce-based T3 approval lifecycle:
182
180
 
183
181
  ## Response Contract Validation
184
182
 
185
- Every agent response must end with a `json:contract` block containing `agent_status`. The contract validator (`hooks/modules/agents/contract_validator.py`) enforces:
183
+ Every agent response must end with a `agent_contract_handoff` block containing `agent_status`. The contract validator (`hooks/modules/agents/contract_validator.py`) enforces:
186
184
 
187
- - **AGENT_STATUS**: PLAN_STATUS (from 5 valid states: COMPLETE, NEEDS_INPUT, REVIEW, BLOCKED, IN_PROGRESS), PENDING_STEPS, NEXT_ACTION, AGENT_ID
185
+ - **AGENT_STATUS**: PLAN_STATUS (from 5 valid states: COMPLETE, NEEDS_INPUT, APPROVAL_REQUEST, BLOCKED, IN_PROGRESS), PENDING_STEPS, NEXT_ACTION, AGENT_ID
188
186
  - **EVIDENCE_REPORT**: required for all valid states. Seven fields: PATTERNS_CHECKED, FILES_CHECKED, COMMANDS_RUN, KEY_OUTPUTS, VERBATIM_OUTPUTS, CROSS_LAYER_IMPACTS, OPEN_GAPS
189
187
  - **CONSOLIDATION_REPORT**: required when multi-surface or cross-check. Fields: OWNERSHIP_ASSESSMENT (enum), CONFIRMED_FINDINGS, SUSPECTED_FINDINGS, CONFLICTS, OPEN_GAPS, NEXT_BEST_AGENT
190
188
 
@@ -244,9 +242,9 @@ The adapter layer connects Claude Code's hook protocol to Gaia business logic th
244
242
  |-----------|-------|
245
243
  | **File** | `hooks/subagent_stop.py` |
246
244
  | **Hook event** | SubagentStop |
247
- | **What it does** | Fires after every agent completes. Consumes approval files, captures workflow metrics, validates the response contract (AGENT_STATUS, EVIDENCE_REPORT, CONSOLIDATION_REPORT), detects anomalies, stores episodic memory, and processes CONTEXT_UPDATE blocks. |
245
+ | **What it does** | Fires after every agent completes. Consumes approval files, captures workflow metrics, validates the response contract (AGENT_STATUS, EVIDENCE_REPORT, CONSOLIDATION_REPORT), detects anomalies, stores episodic memory, and processes the update_contracts array from the agent_contract_handoff envelope. |
248
246
  | **Adapter methods called** | `ClaudeCodeAdapter.parse_event()`, `ClaudeCodeAdapter.parse_agent_completion()` |
249
- | **Business logic modules** | `agents/response_contract.py` (`validate_response_contract`, `save_pending_repair`, `clear_pending_repair`), `tools/memory/episodic.py` (`EpisodicMemory.store_episode`), `context/context_writer.py` (`process_agent_output`) |
247
+ | **Business logic modules** | `agents/response_contract.py` (`validate_response_contract`, `save_pending_repair`, `clear_pending_repair`), `tools/memory/episodic.py` (`EpisodicMemory.store_episode`), `context/context_writer.py` (`process_update_contracts`) |
250
248
 
251
249
  ### CP-4: `hooks/modules/tools/hook_response.py` -- Response Formatting
252
250
 
@@ -328,8 +326,7 @@ To support a CLI other than Claude Code (e.g., a hypothetical Cursor or Windsurf
328
326
  | `tools/context/surface_router.py` | Surface classification and investigation briefs |
329
327
  | `tools/memory/episodic.py` | Episodic memory storage |
330
328
  | `config/context-contracts.json` | Agent read/write section permissions |
331
- | `config/universal-rules.json` | Universal and agent-specific rules |
332
329
  | `config/surface-routing.json` | Surface signals and routing config |
333
330
  | `agents/*.md` | Agent identity definitions |
334
331
  | `skills/*/SKILL.md` | Injected procedural knowledge |
335
- | `bin/*.js` | CLI tools (gaia-scan, gaia-doctor, gaia-status, etc.) |
332
+ | `bin/gaia` + `bin/cli/*.py` | Unified `gaia` CLI; subcommands auto-discovered from `bin/cli/` |
package/CHANGELOG.md CHANGED
@@ -7,6 +7,355 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [5.0.4] - 2026-06-06
11
+
12
+ ### COMMAND_SET Batch Approval, Consent-Reducing Approval Verbs, Contract Advisory Field, Version Source Sync
13
+
14
+ Patch release superseding 5.0.3 (which was never published to npm due to a pyproject.toml version drift that failed pre-publish validation). This release adds the version source sync fix on top of all 5.0.3 changes: COMMAND_SET batch-approval wired end-to-end, consent-reducing approval verbs reclassified out of T3, advisory contract field added, redundant `gitops_validator` removed, and all version sources (package.json, pyproject.toml, .claude-plugin/plugin.json, .claude-plugin/marketplace.json, CHANGELOG.md) aligned. Full suite green (4555 passed).
15
+
16
+ #### Added
17
+
18
+ - **COMMAND_SET batch approval, end-to-end** — a payload carrying a `command_set`
19
+ of more than one mutative command now activates into ONE `COMMAND_SET` grant
20
+ covering the whole batch instead of being degraded to a single command. The
21
+ create side (`activate_db_pending_by_prefix` Step 3b in `approval_grants.py`,
22
+ fed by `_intake_command_set_pending` in `handoff_persister.py` and persisted via
23
+ `gaia/store/writer.py`) was previously orphaned; it is now wired to the
24
+ byte-for-byte consume path in `bash_validator`. The batch is consumed
25
+ item-by-item under a single consent.
26
+
27
+ - **Advisory `user_facing_summary` field on the agent contract** — an additive,
28
+ optional field in the `agent_contract_handoff` envelope (`contract_validator.py`,
29
+ `response_contract.py`) carrying a human-readable summary for the orchestrator to
30
+ surface. Purely additive; absence does not affect validation.
31
+
32
+ #### Changed
33
+
34
+ - **Consent-reducing approval verbs are no longer T3** — `gaia approvals
35
+ revoke|reject|reject-all|clean` only revoke or discard grants Gaia itself issued
36
+ (they reduce capability, never reach remote state), so they are reclassified out
37
+ of T3 via `CONSENT_REDUCING_SUBCOMMAND_EXCEPTIONS` in `mutative_verbs.py`. `gaia
38
+ approvals approve` *grants* capability and remains T3.
39
+
40
+ - **`gaia approvals revoke` unified with auto-detect** — `revoke` now auto-detects
41
+ a pending approval (pending → grant) and the separate `revoke-v2` command was
42
+ removed. Behavior is otherwise unchanged.
43
+
44
+ - **Plan-first heuristic** — COMMAND_SET is now treated as a judgment call, not a
45
+ default, when deciding how to present batched mutative work.
46
+
47
+ #### Fixed
48
+
49
+ - **Guard empty/None `transcript_path`** — `transcript_reader.py` now guards against
50
+ an empty or `None` transcript path instead of failing downstream during nonce
51
+ extraction.
52
+
53
+ - **Harden AI-attribution footer stripping** — the attribution-footer stripping in
54
+ `bash_validator.py` is hardened against additional footer shapes.
55
+
56
+ #### Removed
57
+
58
+ - **Redundant `gitops_validator`** — `hooks/modules/security/gitops_validator.py` and
59
+ its test are removed; its responsibilities are covered by the unified bash
60
+ validation path. All references (security `__init__`, `bash_validator` import/call,
61
+ simulator extractor, surface-routing config, architecture docs, and skill/README
62
+ references) are cleaned up.
63
+
64
+ ## [5.0.2] - 2026-06-03
65
+
66
+ ### Approval-Flow Hardening, mkdir Reclassification, Jira Skill
67
+
68
+ Patch release accumulating security and approval-flow fixes, one new skill, and a quality-of-life exemption for Gaia's own planning bookkeeping commands. All 4575 tests pass on a clean install.
69
+
70
+ #### Fixed
71
+
72
+ - **Stop double-approval on re-dispatched T3 grants** — a T3 command that was
73
+ re-dispatched after approval could be blocked a second time with a fresh nonce,
74
+ forcing the user to approve the same operation twice. Two gaps caused the grant miss:
75
+ `command_semantics` was not normalizing output-redirect tokens out of the semantic
76
+ signature (causing the retry signature to drift from the approved one), and
77
+ `bash_validator._find_pending_in_db` was matching too narrowly and minting a new
78
+ nonce instead of reusing the granted one. Both gaps are closed; a regression test
79
+ reproduces the redirect-normalization grant miss.
80
+
81
+ - **Flag-classifier grants + cross-session grant matching** — the flag-classifier
82
+ branch in `bash_validator` was never consulting approval grants, so curl-family T3
83
+ commands that had been approved were blocked again on retry. `check_db_semantic_grant`
84
+ is now session-agnostic (session is audit-only); `_find_pending_in_db` accepts
85
+ `all_sessions=True`; grant insert is fingerprint-idempotent so cross-session
86
+ block→approve→retry converges. `matches_approval_signature` derives identity from
87
+ `analyze_command` only; `_normalize_flag_token` binds long `--flag=value` tokens to
88
+ fix a critical over-match. Grant TTL raised from 5 to 60 minutes
89
+ (`APPROVAL_GRANT_TTL_MINUTES`), kept distinct from the 1440-minute pending TTL.
90
+
91
+ - **Unify T3 decision across bash validator classifiers** — mutative-verb,
92
+ `file_to_exec` composition, and flag-mutation classifiers now all route through a
93
+ single `decide_t3_outcome()` keyed on `has_orchestrator_above` (is_subagent AND
94
+ is_ops_mode). `file_to_exec` and curl flag-mutations no longer hardcode the native
95
+ CC approval dialog; in ops+subagent mode they produce `deny+approval_id` like
96
+ mutative verbs, keeping them inside the Gaia approval/audit trail. Local workspace
97
+ data files (`.json`/`.yaml`/`.csv`/`.txt`) are degraded to ALLOW for the
98
+ `file_to_exec` composition; network/decode→exec pipelines still BLOCK.
99
+
100
+ - **`mkdir` reclassified as T0 for non-sensitive working-tree paths** — `mkdir` on
101
+ relative, home-relative, or absolute non-system paths is non-destructive and
102
+ idempotent with `-p`; it no longer triggers T3. `mkdir` targeting kernel
103
+ pseudo-filesystems or privileged OS directories (`/dev`, `/sys`, `/proc`, `/etc`,
104
+ `/boot`, `/usr`, `/bin`, `/sbin`, `/lib`, `/lib64`, `/root`) retains T3. Scratch
105
+ space (`/tmp`, `/run`) is excluded — ephemeral, world-writable by design. Adds
106
+ `MKDIR_SENSITIVE_PATH_PREFIXES` (11 prefixes) and `_mkdir_targets_sensitive_path()`
107
+ in `mutative_verbs.py`.
108
+
109
+ #### Added
110
+
111
+ - **Schema v18 — stable project identity** — `project_identity` column and a partial
112
+ unique index on the `projects` table collapse the same physical repo scanned from
113
+ different vantages into one row. `store_populator.resolve_project_identity()` derives
114
+ stable identity from git-common-dir → normalized remote → realpath. Migration files:
115
+ `scripts/migrations/v17_to_v18.sql` and `v17_to_v18_fresh.sql`.
116
+
117
+ - **Skill `jira-ticket-writing`** — technique skill for writing human-readable Jira
118
+ Stories and Subtasks following Atlassian conventions: structured title formula,
119
+ acceptance criteria, story points, label taxonomy, and worked examples. User-invocable
120
+ (`user-invocable: true`); not injected into any agent frontmatter by default.
121
+
122
+ #### Changed
123
+
124
+ - **`gaia brief` / `gaia ac` exempted from T3 gate** — `gaia brief <verb>` and
125
+ `gaia ac <verb>` (`edit`/`set-status`/`set-field`/`add`/`remove`/`new`/`show`/`list`)
126
+ now classify as non-mutative. Local planning bookkeeping that is reversible and has no
127
+ external side effects is treated like `git commit`. The exemption is anchored to
128
+ `(base_cmd, subcommand)` — not a generic `gaia *` pattern — so the consent layer
129
+ (`gaia approvals approve/revoke`) and other groups (`gaia memory`) remain T3.
130
+ Whole-record destruction (`gaia brief delete`) and dangerous flags (`--force`) still
131
+ re-gate.
132
+
133
+ ## [5.0.0] - 2026-06-02
134
+
135
+ ### Stable Release: Scan Overhaul, Zero-Dep Install, Soft-Delete, DB-Canonical Context
136
+
137
+ Fifth major release of Gaia. Promotes the rc.7 release candidate to stable after passing the full dry-run, CI, and live-install gate. The headline work is a ground-up rewrite of the workspace scanner, a zero-dependency NPM install path, a soft-delete model for projects and workspaces, and the retirement of `project-context.json` in favour of the DB as the single canonical source of project context.
138
+
139
+ #### Added
140
+
141
+ - **Scan overhaul — taxonomy and recursive discovery** — `gaia scan` now classifies
142
+ discovered items across three orthogonal dimensions: *workspace* (the Claude Code
143
+ working environment), *project* (the user's source tree), and *installation* (the
144
+ Gaia artefacts wired into `.claude/`). Discovery walks recursively so nested
145
+ monorepo structures and workspace-within-workspace layouts are captured correctly.
146
+ Taxonomy is defined in `tools/scan/` and tested independently of the CLI.
147
+
148
+ - **On-demand `gaia scan <path>`** — the scan subcommand now accepts an explicit
149
+ target path, enabling agents to scan a directory that is not the current working
150
+ directory without changing cwd. Useful for multi-root workspaces and cross-project
151
+ context enrichment.
152
+
153
+ - **Scan/install separation + scan-core** — the scan pipeline is now split into a
154
+ pure discovery core (`scan-core`) with no install-time side effects, and a
155
+ separate install phase that consumes core output. This makes scan deterministic
156
+ and testable without triggering postinstall hooks, and lets the install phase be
157
+ skipped when scanning for context only.
158
+
159
+ - **Pure-NPM zero-dependency install** — `postinstall` now completes with zero
160
+ runtime npm dependencies. All install-time logic runs through `python3 bin/gaia
161
+ install --postinstall` (Python stdlib only). The devDependencies remain for build
162
+ tooling (`chalk`, `eslint`) but consumers take no transitive runtime deps.
163
+
164
+ - **Soft-delete for projects and workspaces** — `gaia scan` handles pruning
165
+ automatically: when a previously-registered project path is no longer found on
166
+ disk, the prune pass marks it missing; scanning a directory that has no Gaia
167
+ installation demotes the workspace (marks it missing) and tombstones its
168
+ projects. No explicit remove or demote commands exist — lifecycle state flows
169
+ from the scanner. Soft-deleted rows are hidden from list views. Schema migrated
170
+ from v12 to v17 to carry the new columns and the `project_workspace_archive`
171
+ table.
172
+
173
+ - **`project-context.json` retired — DB is canonical** — the on-disk
174
+ `project-context.json` file is no longer written or read by any Gaia component.
175
+ Project context lives exclusively in `~/.gaia/gaia.db` (tables `projects`,
176
+ `workspaces`, `project_resources`). The context provider and all CLI subcommands
177
+ read directly from the DB. Existing `project-context.json` files are ignored on
178
+ upgrade; run `gaia scan` to populate the DB.
179
+
180
+ #### Fixed
181
+
182
+ - **`gaia approvals list` crash** — `bin/cli/approvals.py` raised an unhandled
183
+ exception when the `approval_grants` table contained rows with a `None` nonce
184
+ (rows inserted by older schema versions). Added a null-guard before nonce
185
+ formatting; the command now lists all rows cleanly and marks legacy rows as
186
+ `(no nonce)`.
187
+
188
+ #### Changed
189
+
190
+ - **Schema v12 → v17** — five incremental migrations applied in lockstep with
191
+ `EXPECTED_SCHEMA_VERSION` in `bin/cli/doctor.py` and the bootstrap insert in
192
+ `scripts/bootstrap_database.sh`. The `test_schema_version_lockstep.py` test
193
+ confirms all three agree.
194
+
195
+ - **CI hardening** — `ci.yml` now runs the full pytest suite on Python 3.9, 3.11,
196
+ and 3.12 in parallel, blocks merges on any failure, and verifies `build:plugins`
197
+ produces valid `dist/` artefacts. The `validate-sandbox.sh` harness is wired
198
+ into the publish gate.
199
+
200
+ - **Suite green** — all Layer 1 tests pass on the three supported Python versions.
201
+ The scan-core and soft-delete paths are covered by dedicated test modules.
202
+
203
+ - **`bin/validate-sandbox.sh`** -- harness now drives `gaia` subcommands end
204
+ to end (no `gaia-X.js` callers remain). The 8-check matrix is unchanged.
205
+ Sandbox DB is now isolated via `GAIA_DATA_DIR` so memory checks run against
206
+ a seeded fixture DB rather than the global `~/.gaia/gaia.db`.
207
+
208
+ - **CLI docstrings** -- `bin/cli/*.py` modules dropped the
209
+ "Mirrors gaia-X.js" parity comments now that there is no JS counterpart on
210
+ disk to mirror.
211
+
212
+ #### Removed
213
+
214
+ - **Legacy JS CLI binaries** -- `bin/gaia-doctor.js`, `bin/gaia-status.js`,
215
+ `bin/gaia-history.js`, `bin/gaia-metrics.js`, `bin/gaia-cleanup.js`,
216
+ `bin/gaia-update.js`, `bin/gaia-uninstall.js`, `bin/gaia-skills-diagnose.js`,
217
+ `bin/gaia-review.js`, `bin/gaia-evidence`, `bin/gaia-scan` (Node wrapper),
218
+ and `bin/gaia-scan.py` are gone. The `bin` field in `package.json` now
219
+ exposes a single binary: `gaia`. Every subcommand previously available as
220
+ `npx gaia-X` is now reached through `gaia X` -- subcommands are discovered
221
+ automatically from `bin/cli/*.py` via the `register()` / `cmd_<name>()`
222
+ contract. Lifecycle scripts (`postinstall`, `preuninstall`) call
223
+ `python3 bin/gaia install --postinstall` and `python3 bin/gaia uninstall
224
+ --preuninstall` directly. `gaia-skills-diagnose`, `gaia-review`, and
225
+ `gaia-evidence` had no Python successor and are not migrated; for general
226
+ health checks use `gaia doctor`.
227
+
228
+ #### Internal
229
+
230
+ - Regenerated `dist/gaia-ops/` and `dist/gaia-security/` for 5.0.0.
231
+ - `pyproject.toml` version aligned with `package.json` at `5.0.0`.
232
+
233
+ ---
234
+
235
+ ## [5.0.0-rc.3] - 2026-04-26
236
+
237
+ ### Release Candidate 3: Python 3.9 Compatibility Fix
238
+
239
+ Hotfix for rc.2. The previous release shipped successfully to npm under
240
+ the `@rc` dist-tag but failed its post-publish sandbox harness gate
241
+ because `bin/cli/approvals.py` used PEP 604 union syntax (`X | None`)
242
+ which requires Python 3.10+ at module-import time. The publish.yml
243
+ runner pins Python 3.9, and the `ci.yml` test matrix also includes 3.9.
244
+ The plugin loader caught the resulting `ImportError` and emitted a
245
+ `Warning:` line that leaked into stdout, breaking JSON parsing for
246
+ several `gaia` subcommands on 3.9-only environments.
247
+
248
+ #### Fixed
249
+ - **Python 3.9 compatibility** — added `from __future__ import annotations`
250
+ to 7 files that used PEP 604 union syntax without it. With deferred
251
+ annotation evaluation, the type hints become string literals and no
252
+ longer execute the `|` operator at definition time. A repo-wide audit
253
+ of 21 PEP-604 files confirmed 14 were already safe (had `__future__`)
254
+ and 7 were the actual 3.9 breakers; all 7 are now fixed:
255
+ - `bin/cli/approvals.py` (the publish.yml-failing one)
256
+ - `bin/cli/plans.py`
257
+ - `bin/cli/context.py`
258
+ - `tests/cli/test_gaia_context.py`
259
+ - `tests/cli/test_gaia_plans.py`
260
+ - `tools/scan/tests/conftest.py`
261
+ - `tools/agentic-loop/record-iteration.py`
262
+
263
+ The audit also confirmed no PEP 634 `match` statements, no `TypeAlias`,
264
+ no runtime PEP 604 in `isinstance()`, and no runtime parameterized
265
+ stdlib generics, so the `__future__` route is sufficient — no actual
266
+ type-hint rewrites required.
267
+
268
+ 5.0.0-rc.2 is superseded by this release. Users on Python 3.10+ were
269
+ unaffected by the bug; users on Python 3.9 should upgrade to rc.3.
270
+ Failing run for reference:
271
+ https://github.com/metraton/gaia/actions/runs/24951053090
272
+
273
+ ## [5.0.0-rc.2] - 2026-04-26
274
+
275
+ ### Release Candidate 2: Converger Identity, Session Liveness, Install-Gate Hardening
276
+
277
+ Second release candidate for v5.0.0. Adds the orchestrator's Converger
278
+ ("Cerrar") conversational closure identity, real-PID session liveness in the
279
+ registry, the `agent-creation` and `session-reflection` skills, and an
280
+ end-to-end consumer-install validation harness that now actually exercises the
281
+ gate. Three install-time bugs surfaced and were fixed alongside the harness
282
+ that found them.
283
+
284
+ #### Added
285
+ - **Converger identity for orchestrator** — "Cerrar" conversational closure
286
+ framing. Brief-spec reframed as closure ritual (Size gate removed),
287
+ `planning_specs` surface routing narrowed to explicit artifact keywords,
288
+ architecture docs aligned with closure framing.
289
+ - **session-reflection skill** — conversational session-close ritual. Surfaced
290
+ by orchestrator at session end; complements `gaia-compact`.
291
+ - **agent-creation skill** — coach skill for designing new agents end-to-end:
292
+ identity, tool surface, contract, and verification.
293
+ - **SessionEnd hook + PID liveness** — `session_end_hook.py` for clean
294
+ unregister; session_registry now uses real PID + `/proc` starttime to detect
295
+ liveness across sessions. `Stop` hook no longer mutates the registry (was
296
+ causing premature unregister mid-conversation).
297
+ - **validate-sandbox.sh** — end-to-end consumer-install verification harness.
298
+ Two targets: `--target sandbox` (ephemeral fixture project) and
299
+ `--target local` (real workspace install with `--workspace` override). Eight
300
+ pass/fail checks: version, doctor, status, context show, memory stats,
301
+ memory search, scan, settings preservation. Wired into `publish.yml` so
302
+ every release smoke-tests the published tarball before notifying success.
303
+ - **`gaia:verify-install:{local,rc,latest}` and `gaia:install-local`** scripts
304
+ in package.json for manual local validation against tarballs or registry.
305
+
306
+ #### Changed
307
+ - **REVIEW → APPROVAL_REQUEST** rename across active doctrine (state machine,
308
+ skills, hooks). Comments and references in `hooks/**` updated. The previous
309
+ `REVIEW` state caused confusion with the human review activity; the new name
310
+ reflects what the state actually represents (an agent requesting human
311
+ approval for a specific T3 operation).
312
+ - **Stop hook decoupled from registry** — Stop event no longer mutates
313
+ session_registry. SessionEnd handles unregister cleanly; this avoids the
314
+ Stop-then-resume race where the registry would drop a still-active session.
315
+ - **`publish.yml`** — sandbox harness step added after npm publish; waits for
316
+ registry propagation, then runs validate-sandbox.sh against the freshly
317
+ published tarball as a smoke test.
318
+
319
+ #### Fixed
320
+ - **Sandbox harness on noexec /tmp** — validate-sandbox.sh now detects
321
+ `noexec` mounts via `findmnt` (with `/proc/mounts` fallback) and falls back
322
+ to `$TMPDIR` → `/tmp` → `$HOME/.cache/gaia-sandbox`. Previously the harness
323
+ was unrunnable on WSL/Linux setups with `noexec /tmp` (rc=126 Permission
324
+ denied on the installed bin shims); the gate appeared to validate but never
325
+ actually ran.
326
+ - **`gaia scan` harness check** — was invoking bare `gaia-scan --dry-run`,
327
+ which routes to `gaia-scan.py` whose argparse rejects `--dry-run`. Now uses
328
+ `gaia context scan --dry-run` (the higher-level CLI subcommand that does
329
+ accept `--dry-run`); drops the dead fallback.
330
+ - **doctor `<lambda>` check** — `cmd_doctor` wrapped each check in a bare
331
+ `lambda`, so any exception surfaced as `'<lambda>'` in the JSON output
332
+ hiding which check actually failed. Replaced with `functools.partial` so
333
+ `__name__` resolves to the wrapped function (e.g. `check_project_dirs`).
334
+ - **doctor `check_project_dirs` PosixPath/list TypeError** — code did
335
+ `project_root / dir_path` while iterating `paths.items()`; when a value was
336
+ a list (e.g. `"scan_targets": ["."]`), `Path / list` raised TypeError.
337
+ Values are now normalized to a flat sequence of `(label, str)` pairs before
338
+ joining; list values expand into `label[0]`, `label[1]`, ...
339
+ - **postinstall FTS5 backfill on fresh install** — `maybeBackfillFts5()`
340
+ returned early when `search.db` was missing with comment "doctor --fix will
341
+ create it on first use", but nothing in the install flow runs `doctor --fix`
342
+ automatically. A consumer reinstalling after `gaia uninstall` (which scrubs
343
+ search.db) would have an empty FTS5 index until manual intervention. The
344
+ early return is gone; missing search.db now falls through to `doctor --fix`
345
+ which creates and populates the index.
346
+ - **postinstall dynamic package resolution** — `gaia-update.js` now resolves
347
+ the gaia package name from `node_modules/@jaguilar87/` instead of
348
+ hardcoding, supporting both the v5+ `gaia` name and legacy `gaia-ops`. Also
349
+ detects and repairs symlinks pointing at the legacy path.
350
+ - **memory sentinel return** — sentinel value returned with a surfaced warning
351
+ instead of a silent failure when memory paths fail to resolve.
352
+
353
+ #### Internal
354
+ - **Regenerated plugin artifacts** — `dist/gaia-ops/` and `dist/gaia-security/`
355
+ rebuilt for rc2.
356
+ - **Cross-session liveness test** — real PID isolation in
357
+ `session_registry` test fixtures.
358
+
10
359
  ## [5.0.0-rc1] - 2026-04-21
11
360
 
12
361
  ### Release Candidate: Context Evals, Planner M1-M6, Memory CLI, Security Hardening
@@ -81,7 +430,7 @@ The unified CLI also provides subcommands that did not exist as standalone JS CL
81
430
  | `python3 bin/gaia plans list` | List all feature briefs |
82
431
  | `python3 bin/gaia plans show BRIEF_NAME` | Show a brief and plan |
83
432
  | `python3 bin/gaia context show` | Display project-context.json summary |
84
- | `python3 bin/gaia context scan` | Invoke gaia-scan to refresh context |
433
+ | `python3 bin/gaia context scan` | Refresh project-context via the scanner |
85
434
 
86
435
  #### Deprecation timeline
87
436
 
@@ -174,7 +523,7 @@ Contracts now fully control what context each agent receives. Removed the progre
174
523
  #### Changed
175
524
  - **context_provider.py**: Contracts are the single source of truth -- removed progressive disclosure filtering that overrode contract-defined sections
176
525
  - **context_provider.py**: Simplified output payload -- removed `enrichment` and `progressive_disclosure` keys from response
177
- - **contracts/terraform-architect.json**: Now reads `cluster_details` and `application_services` sections
526
+ - **contracts/platform-architect.json**: Now reads `cluster_details` and `application_services` sections
178
527
  - **contracts/gitops-operator.json**: Now reads `gcp_services` section (GCP overlay)
179
528
  - **pre_tool_use.py**: Updated log message to show sections count and rules count
180
529
  - **templates/CLAUDE.template.md**: Synced agent routing descriptions with CLAUDE.md
@@ -267,8 +616,8 @@ Major redesign of skills and agents. Skills now teach principles instead of enum
267
616
  - **`skills/reference.md`** - Agent template and npm release checklist (moved from gaia agent)
268
617
  - **`skills/terraform-patterns/reference.md`** - Full HCL examples
269
618
  - **`skills/gitops-patterns/reference.md`** - Full YAML examples
270
- - **`investigation` skill** assigned to cloud-troubleshooter, terraform-architect, gitops-operator, devops-developer, gaia
271
- - **`git-conventions` skill** assigned to terraform-architect, gitops-operator, devops-developer
619
+ - **`investigation` skill** assigned to cloud-troubleshooter, platform-architect, gitops-operator, devops-developer, gaia
620
+ - **`git-conventions` skill** assigned to platform-architect, gitops-operator, devops-developer
272
621
  - **`agent-protocol` + `security-tiers` skills** assigned to speckit-planner
273
622
 
274
623
  #### Metrics
@@ -565,7 +914,7 @@ Inspired by [memory-graph](https://github.com/gregorydickson/memory-graph) analy
565
914
  ### Changed - Agent Optimization
566
915
 
567
916
  - **agents/*.md** - All 6 agents reduced by 78%
568
- - terraform-architect: 916 → 183 lines
917
+ - platform-architect: 916 → 183 lines
569
918
  - gitops-operator: 1,238 → 217 lines
570
919
  - gcp-troubleshooter: 600 → 156 lines
571
920
  - aws-troubleshooter: 565 → 142 lines
@@ -649,7 +998,7 @@ Inspired by [memory-graph](https://github.com/gregorydickson/memory-graph) analy
649
998
  - Better Flux CD integration guidance
650
999
  - Enhanced troubleshooting protocols
651
1000
 
652
- - **agents/terraform-architect.md** - Enhanced with 47 new lines
1001
+ - **agents/platform-architect.md** - Enhanced with 47 new lines
653
1002
  - Improved Terragrunt support
654
1003
  - Better module design guidance
655
1004
  - Enhanced security scanning protocols
package/CONTRIBUTING.md CHANGED
@@ -67,7 +67,7 @@ See [README.md](./README.md) for the full directory tree. Key areas for contribu
67
67
  | `tools/` | Orchestration tools (context provider, memory, validation) |
68
68
  | `config/` | Configuration files (contracts, git standards, rules) |
69
69
  | `tests/` | Test suite organized by layer |
70
- | `bin/` | CLI utilities (`gaia-scan`, `gaia-doctor`, etc.) |
70
+ | `bin/` | Unified `gaia` CLI -- subcommands live in `bin/cli/*.py` |
71
71
 
72
72
  ## Coding Standards
73
73
 
@@ -81,7 +81,9 @@ See [README.md](./README.md) for the full directory tree. Key areas for contribu
81
81
  ### JavaScript / Node.js
82
82
 
83
83
  - ES modules (`import`/`export`), not CommonJS.
84
- - Follow the existing patterns in `bin/` and `index.js`.
84
+ - The CLI surface is now Python (`bin/cli/*.py`); JS lives in `index.js`
85
+ (programmatic API helpers) and `bin/pre-publish-validate.js` /
86
+ `bin/python-detect.js` (tooling).
85
87
 
86
88
  ### Commit Messages
87
89