@jaguilar87/gaia 5.0.0-rc.3 → 5.0.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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/ARCHITECTURE.md +12 -14
- package/CHANGELOG.md +177 -6
- package/CONTRIBUTING.md +4 -2
- package/INSTALL.md +110 -112
- package/README.md +26 -21
- package/agents/README.md +3 -3
- package/agents/cloud-troubleshooter.md +44 -34
- package/agents/developer.md +34 -35
- package/agents/gaia-operator.md +55 -25
- package/agents/gaia-orchestrator.md +43 -53
- package/agents/gaia-planner.md +47 -27
- package/agents/gaia-system.md +66 -39
- package/agents/gitops-operator.md +41 -34
- package/agents/platform-architect.md +68 -0
- package/bin/README.md +72 -63
- package/bin/cli/_install_helpers.py +556 -0
- package/bin/cli/ac.py +322 -0
- package/bin/cli/approvals.py +1204 -53
- package/bin/cli/brief.py +1025 -0
- package/bin/cli/cleanup.py +3 -2
- package/bin/cli/context.py +371 -116
- package/bin/cli/doctor.py +935 -167
- package/bin/cli/evidence.py +393 -0
- package/bin/cli/history.py +57 -38
- package/bin/cli/install.py +822 -0
- package/bin/cli/memory.py +1768 -67
- package/bin/cli/metrics.py +12 -9
- package/bin/cli/milestone.py +303 -0
- package/bin/cli/paths.py +104 -0
- package/bin/cli/plan.py +397 -0
- package/bin/cli/plans.py +23 -23
- package/bin/cli/query.py +267 -0
- package/bin/cli/scan.py +463 -0
- package/bin/cli/status.py +143 -65
- package/bin/cli/task.py +279 -0
- package/bin/cli/uninstall.py +389 -0
- package/bin/cli/update.py +209 -134
- package/bin/cli/workspace.py +211 -0
- package/bin/pre-publish-validate.js +93 -0
- package/bin/validate-sandbox.sh +183 -12
- package/commands/README.md +1 -1
- package/commands/gaia.md +1 -1
- package/commands/scan-project.md +19 -12
- package/config/README.md +12 -15
- package/config/surface-routing.json +24 -9
- package/dist/gaia-ops/.claude-plugin/plugin.json +192 -2
- package/dist/gaia-ops/README.md +11 -12
- package/dist/gaia-ops/agents/cloud-troubleshooter.md +44 -34
- package/dist/gaia-ops/agents/developer.md +34 -35
- package/dist/gaia-ops/agents/gaia-operator.md +55 -25
- package/dist/gaia-ops/agents/gaia-orchestrator.md +43 -53
- package/dist/gaia-ops/agents/gaia-planner.md +47 -27
- package/dist/gaia-ops/agents/gaia-system.md +66 -39
- package/dist/gaia-ops/agents/gitops-operator.md +41 -34
- package/dist/gaia-ops/agents/platform-architect.md +68 -0
- package/dist/gaia-ops/commands/gaia.md +1 -1
- package/dist/gaia-ops/config/README.md +12 -15
- package/dist/gaia-ops/config/surface-routing.json +24 -9
- package/dist/gaia-ops/hooks/adapters/claude_code.py +217 -95
- package/dist/gaia-ops/hooks/hooks.json +19 -19
- package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +380 -45
- package/dist/gaia-ops/hooks/modules/agents/handoff_persister.py +146 -0
- package/dist/gaia-ops/hooks/modules/agents/response_contract.py +207 -36
- package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +1 -17
- package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +14 -0
- package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +61 -89
- package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +48 -71
- package/dist/gaia-ops/hooks/modules/context/__init__.py +3 -3
- package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +1 -1
- package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +119 -76
- package/dist/gaia-ops/hooks/modules/context/context_freshness.py +67 -71
- package/dist/gaia-ops/hooks/modules/context/context_injector.py +135 -207
- package/dist/gaia-ops/hooks/modules/context/context_writer.py +366 -444
- package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +100 -117
- package/dist/gaia-ops/hooks/modules/core/state.py +29 -1
- package/dist/gaia-ops/hooks/modules/core/workspace_bootstrap.py +91 -0
- package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +7 -0
- package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +3 -1
- package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +75 -4
- package/dist/gaia-ops/hooks/modules/security/approval_grants.py +647 -79
- package/dist/gaia-ops/hooks/modules/security/approval_messages.py +41 -1
- package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +18 -32
- package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +133 -5
- package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +3 -3
- package/dist/gaia-ops/hooks/modules/security/capability_classes.py +379 -0
- package/dist/gaia-ops/hooks/modules/security/command_semantics.py +87 -5
- package/dist/gaia-ops/hooks/modules/security/composition_rules.py +69 -0
- package/dist/gaia-ops/hooks/modules/security/gaia_db_write_guard.py +97 -0
- package/dist/gaia-ops/hooks/modules/security/inline_ast_analyzer.py +339 -0
- package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +563 -11
- package/dist/gaia-ops/hooks/modules/session/pending_scanner.py +18 -2
- package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +1 -1
- package/dist/gaia-ops/hooks/modules/session/session_manifest.py +548 -0
- package/dist/gaia-ops/hooks/modules/session/session_registry.py +151 -145
- package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +502 -110
- package/dist/gaia-ops/hooks/modules/tools/task_validator.py +5 -4
- package/dist/gaia-ops/hooks/post_compact.py +5 -1
- package/dist/gaia-ops/hooks/post_tool_use.py +5 -1
- package/dist/gaia-ops/hooks/pre_compact.py +5 -1
- package/dist/gaia-ops/hooks/pre_tool_use.py +5 -1
- package/dist/gaia-ops/hooks/session_end_hook.py +5 -1
- package/dist/gaia-ops/hooks/session_start.py +157 -7
- package/dist/gaia-ops/hooks/stop_hook.py +5 -1
- package/dist/gaia-ops/hooks/subagent_start.py +5 -17
- package/dist/gaia-ops/hooks/subagent_stop.py +46 -5
- package/dist/gaia-ops/hooks/task_completed.py +5 -1
- package/dist/gaia-ops/hooks/user_prompt_submit.py +31 -67
- package/dist/gaia-ops/skills/README.md +29 -28
- package/dist/gaia-ops/skills/agent-approval-protocol/SKILL.md +98 -0
- package/dist/gaia-ops/skills/agent-approval-protocol/reference.md +74 -0
- package/dist/gaia-ops/skills/agent-contract-handoff/SKILL.md +157 -0
- package/dist/gaia-ops/skills/agent-creation/SKILL.md +48 -35
- package/dist/gaia-ops/skills/agent-creation/examples.md +72 -65
- package/dist/gaia-ops/skills/agent-creation/reference.md +68 -26
- package/dist/gaia-ops/skills/agent-protocol/SKILL.md +58 -52
- package/dist/gaia-ops/skills/agent-protocol/examples.md +169 -59
- package/dist/gaia-ops/skills/agent-response/SKILL.md +42 -44
- package/dist/gaia-ops/skills/agentic-loop/SKILL.md +1 -1
- package/dist/gaia-ops/skills/brief-spec/SKILL.md +138 -17
- package/dist/gaia-ops/skills/command-execution/SKILL.md +12 -12
- package/dist/gaia-ops/skills/execution/SKILL.md +21 -13
- package/dist/gaia-ops/skills/gaia-audit/SKILL.md +119 -0
- package/dist/gaia-ops/skills/gaia-compact/SKILL.md +1 -1
- package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +5 -6
- package/dist/gaia-ops/skills/gaia-patterns/reference.md +130 -75
- package/dist/gaia-ops/skills/gaia-planner/SKILL.md +140 -17
- package/dist/gaia-ops/skills/gaia-planner/reference.md +143 -56
- package/dist/gaia-ops/skills/gaia-release/SKILL.md +35 -60
- package/dist/gaia-ops/skills/gaia-release/reference.md +173 -84
- package/dist/gaia-ops/skills/gaia-verify/SKILL.md +6 -6
- package/dist/gaia-ops/skills/gaia-verify/reference.md +9 -9
- package/dist/gaia-ops/skills/investigation/SKILL.md +86 -87
- package/dist/gaia-ops/skills/jira-ticket-writing/SKILL.md +95 -0
- package/dist/gaia-ops/skills/jira-ticket-writing/examples.md +109 -0
- package/dist/gaia-ops/skills/memory/SKILL.md +399 -0
- package/dist/gaia-ops/skills/orchestrator-present-approval/SKILL.md +101 -0
- package/dist/gaia-ops/skills/orchestrator-present-approval/reference.md +264 -0
- package/dist/gaia-ops/skills/orchestrator-present-approval/template.md +49 -0
- package/dist/gaia-ops/skills/pending-approvals/SKILL.md +119 -54
- package/dist/gaia-ops/skills/pending-approvals/reference.md +60 -27
- package/dist/gaia-ops/skills/readme-writing/reference.md +1 -1
- package/dist/gaia-ops/skills/reference.md +1 -2
- package/dist/gaia-ops/skills/schedule-task/SKILL.md +1 -1
- package/dist/gaia-ops/skills/schedule-task/reference.md +1 -1
- package/dist/gaia-ops/skills/security-tiers/SKILL.md +35 -111
- package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +5 -4
- package/dist/gaia-ops/skills/security-tiers/reference.md +6 -0
- package/dist/gaia-ops/skills/session-reflection/SKILL.md +174 -45
- package/dist/gaia-ops/skills/skill-creation/SKILL.md +21 -14
- package/dist/gaia-ops/skills/skill-creation/examples.md +53 -0
- package/dist/gaia-ops/skills/skill-creation/reference.md +2 -18
- package/dist/gaia-ops/skills/subagent-request-approval/SKILL.md +86 -0
- package/dist/gaia-ops/skills/subagent-request-approval/reference.md +129 -0
- package/dist/gaia-ops/tools/context/README.md +21 -33
- package/dist/gaia-ops/tools/context/__init__.py +0 -2
- package/dist/gaia-ops/tools/context/context_provider.py +170 -194
- package/dist/gaia-ops/tools/gaia_simulator/runner.py +5 -31
- package/dist/gaia-ops/tools/memory/episodic.py +239 -149
- package/dist/gaia-ops/tools/migration/README.md +95 -0
- package/dist/gaia-ops/tools/migration/migrate_01_episodes.py +186 -0
- package/dist/gaia-ops/tools/migration/migrate_01_episodes.sh +21 -0
- package/dist/gaia-ops/tools/migration/migrate_02_memory.py +179 -0
- package/dist/gaia-ops/tools/migration/migrate_02_memory.sh +19 -0
- package/dist/gaia-ops/tools/migration/migrate_03_context_contracts.py +103 -0
- package/dist/gaia-ops/tools/migration/migrate_03_context_contracts.sh +19 -0
- package/dist/gaia-ops/tools/migration/migrate_04_harness_events.py +132 -0
- package/dist/gaia-ops/tools/migration/migrate_04_harness_events.sh +23 -0
- package/dist/gaia-ops/tools/migration/migrate_05_briefs.py +307 -0
- package/dist/gaia-ops/tools/migration/migrate_06_state_machines.py +441 -0
- package/dist/gaia-ops/tools/migration/migrate_07_plans_content.py +124 -0
- package/dist/gaia-ops/tools/migration/migrate_08_rename_workspace.py +513 -0
- package/dist/gaia-ops/tools/migration/validate.sh +68 -0
- package/dist/gaia-ops/tools/scan/config.py +6 -28
- package/dist/gaia-ops/tools/scan/core.py +441 -0
- package/dist/gaia-ops/tools/scan/merge.py +3 -2
- package/dist/gaia-ops/tools/scan/migrate_workspace.py +249 -0
- package/dist/gaia-ops/tools/scan/orchestrator.py +35 -174
- package/dist/gaia-ops/tools/scan/role_detector.py +198 -0
- package/dist/gaia-ops/tools/scan/seed_contract_permissions.py +327 -0
- package/dist/gaia-ops/tools/scan/store_populator.py +1818 -0
- package/dist/gaia-ops/tools/scan/tests/test_core.py +190 -0
- package/dist/gaia-ops/tools/scan/tests/test_integration.py +42 -113
- package/dist/gaia-ops/tools/scan/tests/test_store_populator.py +345 -0
- package/dist/gaia-ops/tools/scan/ui.py +31 -12
- package/dist/gaia-ops/tools/scan/verify.py +39 -24
- package/dist/gaia-ops/tools/scan/workspace.py +33 -8
- package/dist/gaia-ops/tools/state/__init__.py +1 -0
- package/dist/gaia-ops/tools/state/diff_source_of_truth.py +150 -0
- package/dist/gaia-ops/tools/validation/README.md +1 -1
- package/dist/gaia-security/.claude-plugin/plugin.json +113 -2
- package/dist/gaia-security/README.md +0 -2
- package/dist/gaia-security/hooks/adapters/claude_code.py +217 -95
- package/dist/gaia-security/hooks/hooks.json +11 -11
- package/dist/gaia-security/hooks/modules/agents/contract_validator.py +380 -45
- package/dist/gaia-security/hooks/modules/agents/handoff_persister.py +146 -0
- package/dist/gaia-security/hooks/modules/agents/response_contract.py +207 -36
- package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +1 -17
- package/dist/gaia-security/hooks/modules/agents/state_tracker.py +14 -0
- package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +61 -89
- package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +48 -71
- package/dist/gaia-security/hooks/modules/context/__init__.py +3 -3
- package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +1 -1
- package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +119 -76
- package/dist/gaia-security/hooks/modules/context/context_freshness.py +67 -71
- package/dist/gaia-security/hooks/modules/context/context_injector.py +135 -207
- package/dist/gaia-security/hooks/modules/context/context_writer.py +366 -444
- package/dist/gaia-security/hooks/modules/context/contracts_loader.py +100 -117
- package/dist/gaia-security/hooks/modules/core/state.py +29 -1
- package/dist/gaia-security/hooks/modules/core/workspace_bootstrap.py +91 -0
- package/dist/gaia-security/hooks/modules/memory/episode_writer.py +7 -0
- package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +3 -1
- package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +75 -4
- package/dist/gaia-security/hooks/modules/security/approval_grants.py +647 -79
- package/dist/gaia-security/hooks/modules/security/approval_messages.py +41 -1
- package/dist/gaia-security/hooks/modules/security/approval_scopes.py +18 -32
- package/dist/gaia-security/hooks/modules/security/blocked_commands.py +133 -5
- package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +3 -3
- package/dist/gaia-security/hooks/modules/security/capability_classes.py +379 -0
- package/dist/gaia-security/hooks/modules/security/command_semantics.py +87 -5
- package/dist/gaia-security/hooks/modules/security/composition_rules.py +69 -0
- package/dist/gaia-security/hooks/modules/security/gaia_db_write_guard.py +97 -0
- package/dist/gaia-security/hooks/modules/security/inline_ast_analyzer.py +339 -0
- package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +563 -11
- package/dist/gaia-security/hooks/modules/session/pending_scanner.py +18 -2
- package/dist/gaia-security/hooks/modules/session/session_event_injector.py +1 -1
- package/dist/gaia-security/hooks/modules/session/session_manifest.py +548 -0
- package/dist/gaia-security/hooks/modules/session/session_registry.py +151 -145
- package/dist/gaia-security/hooks/modules/tools/bash_validator.py +502 -110
- package/dist/gaia-security/hooks/modules/tools/task_validator.py +5 -4
- package/dist/gaia-security/hooks/post_tool_use.py +5 -1
- package/dist/gaia-security/hooks/pre_tool_use.py +5 -1
- package/dist/gaia-security/hooks/session_end_hook.py +5 -1
- package/dist/gaia-security/hooks/session_start.py +157 -7
- package/dist/gaia-security/hooks/stop_hook.py +5 -1
- package/dist/gaia-security/hooks/user_prompt_submit.py +31 -67
- package/gaia/README.md +136 -0
- package/gaia/__init__.py +21 -0
- package/gaia/approvals/__init__.py +17 -0
- package/gaia/approvals/chain.py +268 -0
- package/gaia/approvals/display.py +235 -0
- package/gaia/approvals/revert.py +282 -0
- package/gaia/approvals/store.py +752 -0
- package/gaia/briefs/__init__.py +62 -0
- package/gaia/briefs/serializer.py +683 -0
- package/gaia/briefs/store.py +1098 -0
- package/gaia/evidence/__init__.py +5 -0
- package/gaia/evidence/fs.py +123 -0
- package/gaia/evidence/store.py +265 -0
- package/gaia/paths/README.md +32 -0
- package/gaia/paths/__init__.py +65 -0
- package/gaia/paths/layout.py +47 -0
- package/gaia/paths/resolver.py +107 -0
- package/gaia/project.py +314 -0
- package/gaia/state/__init__.py +132 -0
- package/gaia/state/check_clauses.py +61 -0
- package/gaia/state/permissions.py +117 -0
- package/gaia/state/transitions.py +140 -0
- package/gaia/store/NOTICE.md +49 -0
- package/gaia/store/__init__.py +42 -0
- package/gaia/store/provider.py +170 -0
- package/gaia/store/reader.py +545 -0
- package/gaia/store/schema.sql +965 -0
- package/gaia/store/writer.py +3595 -0
- package/hooks/README.md +20 -9
- package/hooks/adapters/claude_code.py +217 -95
- package/hooks/elicitation_result.py +35 -3
- package/hooks/hooks.json +21 -16
- package/hooks/modules/README.md +2 -2
- package/hooks/modules/agents/contract_validator.py +380 -45
- package/hooks/modules/agents/handoff_persister.py +146 -0
- package/hooks/modules/agents/response_contract.py +207 -36
- package/hooks/modules/agents/skill_injection_verifier.py +1 -17
- package/hooks/modules/agents/state_tracker.py +14 -0
- package/hooks/modules/audit/workflow_auditor.py +61 -89
- package/hooks/modules/audit/workflow_recorder.py +48 -71
- package/hooks/modules/context/__init__.py +3 -3
- package/hooks/modules/context/anchor_tracker.py +1 -1
- package/hooks/modules/context/compact_context_builder.py +119 -76
- package/hooks/modules/context/context_freshness.py +67 -71
- package/hooks/modules/context/context_injector.py +135 -207
- package/hooks/modules/context/context_writer.py +366 -444
- package/hooks/modules/context/contracts_loader.py +100 -117
- package/hooks/modules/core/state.py +29 -1
- package/hooks/modules/core/workspace_bootstrap.py +91 -0
- package/hooks/modules/install_detector.py +186 -0
- package/hooks/modules/memory/episode_writer.py +7 -0
- package/hooks/modules/scanning/scan_trigger.py +3 -1
- package/hooks/modules/security/approval_cleanup.py +75 -4
- package/hooks/modules/security/approval_grants.py +647 -79
- package/hooks/modules/security/approval_messages.py +41 -1
- package/hooks/modules/security/approval_scopes.py +18 -32
- package/hooks/modules/security/blocked_commands.py +133 -5
- package/hooks/modules/security/blocked_message_formatter.py +3 -3
- package/hooks/modules/security/capability_classes.py +379 -0
- package/hooks/modules/security/command_semantics.py +87 -5
- package/hooks/modules/security/composition_rules.py +69 -0
- package/hooks/modules/security/gaia_db_write_guard.py +97 -0
- package/hooks/modules/security/inline_ast_analyzer.py +339 -0
- package/hooks/modules/security/mutative_verbs.py +563 -11
- package/hooks/modules/session/pending_scanner.py +18 -2
- package/hooks/modules/session/session_event_injector.py +1 -1
- package/hooks/modules/session/session_manifest.py +548 -0
- package/hooks/modules/session/session_registry.py +151 -145
- package/hooks/modules/tools/bash_validator.py +502 -110
- package/hooks/modules/tools/task_validator.py +5 -4
- package/hooks/post_compact.py +5 -1
- package/hooks/post_tool_use.py +5 -1
- package/hooks/pre_compact.py +5 -1
- package/hooks/pre_tool_use.py +5 -1
- package/hooks/session_end_hook.py +5 -1
- package/hooks/session_start.py +157 -7
- package/hooks/stop_hook.py +5 -1
- package/hooks/subagent_start.py +5 -17
- package/hooks/subagent_stop.py +46 -5
- package/hooks/task_completed.py +5 -1
- package/hooks/user_prompt_submit.py +31 -67
- package/package.json +8 -21
- package/pyproject.toml +5 -2
- package/scripts/bootstrap_database.sh +851 -0
- package/scripts/build-plugin.py +439 -0
- package/scripts/migrations/README.md +63 -0
- package/scripts/migrations/v10_to_v11.sql +170 -0
- package/scripts/migrations/v10_to_v11_fresh.sql +18 -0
- package/scripts/migrations/v11_to_v12.sql +195 -0
- package/scripts/migrations/v11_to_v12_fresh.sql +19 -0
- package/scripts/migrations/v12_to_v13.sql +48 -0
- package/scripts/migrations/v12_to_v13_fresh.sql +17 -0
- package/scripts/migrations/v13_to_v14.sql +44 -0
- package/scripts/migrations/v13_to_v14_fresh.sql +17 -0
- package/scripts/migrations/v14_to_v15.sql +71 -0
- package/scripts/migrations/v14_to_v15_fresh.sql +19 -0
- package/scripts/migrations/v15_to_v16.sql +57 -0
- package/scripts/migrations/v15_to_v16_fresh.sql +18 -0
- package/scripts/migrations/v16_to_v17.sql +51 -0
- package/scripts/migrations/v16_to_v17_fresh.sql +18 -0
- package/scripts/migrations/v17_to_v18.sql +66 -0
- package/scripts/migrations/v17_to_v18_fresh.sql +24 -0
- package/scripts/migrations/v1_to_v2.sql +97 -0
- package/scripts/migrations/v2_to_v3.sql +68 -0
- package/scripts/migrations/v2_to_v3_merge.sql +69 -0
- package/scripts/migrations/v3_to_v4.sql +67 -0
- package/scripts/migrations/v3_to_v4_fresh.sql +20 -0
- package/scripts/migrations/v4_to_v5.sql +55 -0
- package/scripts/migrations/v4_to_v5_fresh.sql +20 -0
- package/scripts/migrations/v5_to_v6.sql +48 -0
- package/scripts/migrations/v5_to_v6_fresh.sql +17 -0
- package/scripts/migrations/v6_to_v7.sql +26 -0
- package/scripts/migrations/v6_to_v7_fresh.sql +13 -0
- package/scripts/migrations/v7_to_v8.sql +44 -0
- package/scripts/migrations/v7_to_v8_fresh.sql +14 -0
- package/scripts/migrations/v8_to_v9.sql +87 -0
- package/scripts/migrations/v8_to_v9_fresh.sql +15 -0
- package/scripts/migrations/v9_to_v10.sql +109 -0
- package/scripts/migrations/v9_to_v10_episodes_workspace.sql +109 -0
- package/scripts/migrations/v9_to_v10_fresh.sql +18 -0
- package/scripts/seed_agent_permissions.py +166 -0
- package/skills/README.md +29 -28
- package/skills/agent-approval-protocol/SKILL.md +98 -0
- package/skills/agent-approval-protocol/reference.md +74 -0
- package/skills/agent-contract-handoff/SKILL.md +157 -0
- package/skills/agent-creation/SKILL.md +48 -35
- package/skills/agent-creation/examples.md +72 -65
- package/skills/agent-creation/reference.md +68 -26
- package/skills/agent-protocol/SKILL.md +58 -52
- package/skills/agent-protocol/examples.md +169 -59
- package/skills/agent-response/SKILL.md +42 -44
- package/skills/agentic-loop/SKILL.md +1 -1
- package/skills/brief-spec/SKILL.md +138 -17
- package/skills/command-execution/SKILL.md +12 -12
- package/skills/execution/SKILL.md +21 -13
- package/skills/gaia-audit/SKILL.md +119 -0
- package/skills/gaia-compact/SKILL.md +1 -1
- package/skills/gaia-patterns/SKILL.md +5 -6
- package/skills/gaia-patterns/reference.md +130 -75
- package/skills/gaia-planner/SKILL.md +140 -17
- package/skills/gaia-planner/reference.md +143 -56
- package/skills/gaia-release/SKILL.md +35 -60
- package/skills/gaia-release/reference.md +173 -84
- package/skills/gaia-verify/SKILL.md +6 -6
- package/skills/gaia-verify/reference.md +9 -9
- package/skills/investigation/SKILL.md +86 -87
- package/skills/jira-ticket-writing/SKILL.md +95 -0
- package/skills/jira-ticket-writing/examples.md +109 -0
- package/skills/memory/SKILL.md +399 -0
- package/skills/orchestrator-present-approval/SKILL.md +101 -0
- package/skills/orchestrator-present-approval/reference.md +264 -0
- package/skills/orchestrator-present-approval/template.md +49 -0
- package/skills/pending-approvals/SKILL.md +119 -54
- package/skills/pending-approvals/reference.md +60 -27
- package/skills/readme-writing/reference.md +1 -1
- package/skills/reference.md +1 -2
- package/skills/schedule-task/SKILL.md +1 -1
- package/skills/schedule-task/reference.md +1 -1
- package/skills/security-tiers/SKILL.md +35 -111
- package/skills/security-tiers/destructive-commands-reference.md +5 -4
- package/skills/security-tiers/reference.md +6 -0
- package/skills/session-reflection/SKILL.md +174 -45
- package/skills/skill-creation/SKILL.md +21 -14
- package/skills/skill-creation/examples.md +53 -0
- package/skills/skill-creation/reference.md +2 -18
- package/skills/subagent-request-approval/SKILL.md +86 -0
- package/skills/subagent-request-approval/reference.md +129 -0
- package/templates/README.md +14 -13
- package/tools/context/README.md +21 -33
- package/tools/context/__init__.py +0 -2
- package/tools/context/context_provider.py +170 -194
- package/tools/gaia_simulator/runner.py +5 -31
- package/tools/memory/episodic.py +239 -149
- package/tools/migration/README.md +95 -0
- package/tools/migration/migrate_01_episodes.py +186 -0
- package/tools/migration/migrate_01_episodes.sh +21 -0
- package/tools/migration/migrate_02_memory.py +179 -0
- package/tools/migration/migrate_02_memory.sh +19 -0
- package/tools/migration/migrate_03_context_contracts.py +103 -0
- package/tools/migration/migrate_03_context_contracts.sh +19 -0
- package/tools/migration/migrate_04_harness_events.py +132 -0
- package/tools/migration/migrate_04_harness_events.sh +23 -0
- package/tools/migration/migrate_05_briefs.py +307 -0
- package/tools/migration/migrate_06_state_machines.py +441 -0
- package/tools/migration/migrate_07_plans_content.py +124 -0
- package/tools/migration/migrate_08_rename_workspace.py +513 -0
- package/tools/migration/validate.sh +68 -0
- package/tools/scan/config.py +6 -28
- package/tools/scan/core.py +441 -0
- package/tools/scan/merge.py +3 -2
- package/tools/scan/migrate_workspace.py +249 -0
- package/tools/scan/orchestrator.py +35 -174
- package/tools/scan/role_detector.py +198 -0
- package/tools/scan/seed_contract_permissions.py +327 -0
- package/tools/scan/store_populator.py +1818 -0
- package/tools/scan/tests/test_core.py +190 -0
- package/tools/scan/tests/test_integration.py +42 -113
- package/tools/scan/tests/test_store_populator.py +345 -0
- package/tools/scan/ui.py +31 -12
- package/tools/scan/verify.py +39 -24
- package/tools/scan/workspace.py +33 -8
- package/tools/state/__init__.py +1 -0
- package/tools/state/diff_source_of_truth.py +150 -0
- package/tools/validation/README.md +1 -1
- package/agents/terraform-architect.md +0 -63
- package/bin/gaia-cleanup.js +0 -531
- package/bin/gaia-doctor.js +0 -635
- package/bin/gaia-evidence +0 -126
- package/bin/gaia-history.js +0 -251
- package/bin/gaia-metrics.js +0 -1278
- package/bin/gaia-review.js +0 -269
- package/bin/gaia-scan +0 -44
- package/bin/gaia-scan.py +0 -589
- package/bin/gaia-skills-diagnose.js +0 -929
- package/bin/gaia-status.js +0 -278
- package/bin/gaia-uninstall.js +0 -111
- package/bin/gaia-update.js +0 -919
- package/config/cloud/aws.json +0 -134
- package/config/cloud/gcp.json +0 -139
- package/config/context-contracts.json +0 -158
- package/config/universal-rules.json +0 -102
- package/dist/gaia-ops/agents/terraform-architect.md +0 -63
- package/dist/gaia-ops/config/cloud/aws.json +0 -134
- package/dist/gaia-ops/config/cloud/gcp.json +0 -139
- package/dist/gaia-ops/config/context-contracts.json +0 -158
- package/dist/gaia-ops/config/universal-rules.json +0 -102
- package/dist/gaia-ops/settings.json +0 -72
- package/dist/gaia-ops/skills/context-updater/SKILL.md +0 -87
- package/dist/gaia-ops/skills/context-updater/examples.md +0 -71
- package/dist/gaia-ops/skills/developer-patterns/SKILL.md +0 -50
- package/dist/gaia-ops/skills/developer-patterns/reference.md +0 -112
- package/dist/gaia-ops/skills/gaia-self-check/SKILL.md +0 -114
- package/dist/gaia-ops/skills/gaia-self-check/reference.md +0 -453
- package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +0 -60
- package/dist/gaia-ops/skills/gitops-patterns/reference.md +0 -183
- package/dist/gaia-ops/skills/memory-curation/SKILL.md +0 -83
- package/dist/gaia-ops/skills/memory-search/SKILL.md +0 -88
- package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +0 -160
- package/dist/gaia-ops/skills/orchestrator-approval/reference.md +0 -174
- package/dist/gaia-ops/skills/request-approval/SKILL.md +0 -140
- package/dist/gaia-ops/skills/request-approval/examples.md +0 -140
- package/dist/gaia-ops/skills/request-approval/reference.md +0 -57
- package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +0 -89
- package/dist/gaia-ops/skills/terraform-patterns/reference.md +0 -93
- package/dist/gaia-ops/tools/context/context_section_reader.py +0 -342
- package/dist/gaia-ops/tools/context/pending_updates.py +0 -760
- package/dist/gaia-ops/tools/persist_transcript_analysis.py +0 -85
- package/dist/gaia-ops/tools/review/__init__.py +0 -1
- package/dist/gaia-ops/tools/review/review_engine.py +0 -157
- package/dist/gaia-ops/tools/scan/setup.py +0 -686
- package/dist/gaia-security/config/universal-rules.json +0 -102
- package/dist/gaia-security/settings.json +0 -58
- package/hooks/modules/evidence/__init__.py +0 -34
- package/hooks/modules/evidence/assertions.py +0 -137
- package/hooks/modules/evidence/index_writer.py +0 -57
- package/hooks/modules/evidence/loader.py +0 -126
- package/hooks/modules/evidence/runner.py +0 -241
- package/skills/context-updater/SKILL.md +0 -87
- package/skills/context-updater/examples.md +0 -71
- package/skills/developer-patterns/SKILL.md +0 -50
- package/skills/developer-patterns/reference.md +0 -112
- package/skills/gaia-self-check/SKILL.md +0 -114
- package/skills/gaia-self-check/reference.md +0 -453
- package/skills/gitops-patterns/SKILL.md +0 -60
- package/skills/gitops-patterns/reference.md +0 -183
- package/skills/memory-curation/SKILL.md +0 -83
- package/skills/memory-search/SKILL.md +0 -88
- package/skills/orchestrator-approval/SKILL.md +0 -160
- package/skills/orchestrator-approval/reference.md +0 -174
- package/skills/request-approval/SKILL.md +0 -140
- package/skills/request-approval/examples.md +0 -140
- package/skills/request-approval/reference.md +0 -57
- package/skills/terraform-patterns/SKILL.md +0 -89
- package/skills/terraform-patterns/reference.md +0 -93
- package/tools/context/context_section_reader.py +0 -342
- package/tools/context/pending_updates.py +0 -760
- package/tools/persist_transcript_analysis.py +0 -85
- package/tools/review/__init__.py +0 -1
- package/tools/review/review_engine.py +0 -157
- 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.
|
|
11
|
+
"version": "5.0.2",
|
|
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.
|
|
23
|
+
"version": "5.0.2",
|
|
24
24
|
"category": "security",
|
|
25
25
|
"author": {
|
|
26
26
|
"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
|
|
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,9 +46,9 @@ 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
|
|
49
|
+
| 6. Process update_contracts from the agent_contract_handoff envelope
|
|
50
50
|
v
|
|
51
|
-
Orchestrator processes
|
|
51
|
+
Orchestrator processes agent_contract_handoff (via agent-response skill)
|
|
52
52
|
| COMPLETE -> summarize to user
|
|
53
53
|
| APPROVAL_REQUEST (with approval_id) -> get approval -> resume via SendMessage
|
|
54
54
|
| NEEDS_INPUT -> ask user -> resume via SendMessage
|
|
@@ -108,7 +108,7 @@ Fires after every agent tool completes:
|
|
|
108
108
|
4. Detect anomalies --> execution failures, consecutive failures
|
|
109
109
|
| If anomalies found -> create needs_analysis.flag for Gaia
|
|
110
110
|
5. Capture episodic memory --> store episode via tools/memory/episodic.py
|
|
111
|
-
6. Process context updates --> apply
|
|
111
|
+
6. Process context updates --> apply update_contracts entries from the agent_contract_handoff envelope via context_writer.py (process_update_contracts)
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
## Surface Routing: surface_router.py
|
|
@@ -119,7 +119,7 @@ Classifies user tasks into surfaces using signal matching against `config/surfac
|
|
|
119
119
|
|---------|--------------|-----------------|
|
|
120
120
|
| `live_runtime` | cloud-troubleshooter | pods, services, logs, kubectl, gcloud |
|
|
121
121
|
| `gitops_desired_state` | gitops-operator | manifests, Flux, Helm, Kustomize |
|
|
122
|
-
| `
|
|
122
|
+
| `iac` | platform-architect | Terraform, Terragrunt, IAM, modules |
|
|
123
123
|
| `app_ci_tooling` | developer | CI/CD, Docker, package tooling |
|
|
124
124
|
| `planning_specs` | gaia-planner | briefs, plans (materializados cuando una conversación alcanza Cerrar) |
|
|
125
125
|
| `gaia_system` | gaia-system | hooks, skills, agents/, CLAUDE.md |
|
|
@@ -141,12 +141,11 @@ Assembles the context payload injected into agent prompts by pre_tool_use.py.
|
|
|
141
141
|
```
|
|
142
142
|
context_provider.py <agent_name> <user_task>
|
|
143
143
|
|
|
|
144
|
-
+--> Load project
|
|
145
|
-
+--> Detect cloud provider (GCP/AWS)
|
|
146
|
-
+--> Load base contracts (
|
|
144
|
+
+--> Load project context from ~/.gaia/gaia.db (project_context_contracts table)
|
|
145
|
+
+--> Detect cloud provider (GCP/AWS) from DB workspace record
|
|
146
|
+
+--> Load base contracts from DB (agent_contract_permissions table)
|
|
147
147
|
+--> Merge cloud overrides (config/cloud/{provider}.json)
|
|
148
148
|
+--> Extract contracted sections for this agent (read permissions)
|
|
149
|
-
+--> Load universal rules (config/universal-rules.json)
|
|
150
149
|
+--> Load relevant episodic memory (similarity match)
|
|
151
150
|
+--> Classify surfaces (surface_router.py)
|
|
152
151
|
+--> Build investigation brief (surface_router.py)
|
|
@@ -182,7 +181,7 @@ Nonce-based T3 approval lifecycle:
|
|
|
182
181
|
|
|
183
182
|
## Response Contract Validation
|
|
184
183
|
|
|
185
|
-
Every agent response must end with a `
|
|
184
|
+
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
185
|
|
|
187
186
|
- **AGENT_STATUS**: PLAN_STATUS (from 5 valid states: COMPLETE, NEEDS_INPUT, APPROVAL_REQUEST, BLOCKED, IN_PROGRESS), PENDING_STEPS, NEXT_ACTION, AGENT_ID
|
|
188
187
|
- **EVIDENCE_REPORT**: required for all valid states. Seven fields: PATTERNS_CHECKED, FILES_CHECKED, COMMANDS_RUN, KEY_OUTPUTS, VERBATIM_OUTPUTS, CROSS_LAYER_IMPACTS, OPEN_GAPS
|
|
@@ -244,9 +243,9 @@ The adapter layer connects Claude Code's hook protocol to Gaia business logic th
|
|
|
244
243
|
|-----------|-------|
|
|
245
244
|
| **File** | `hooks/subagent_stop.py` |
|
|
246
245
|
| **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
|
|
246
|
+
| **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
247
|
| **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` (`
|
|
248
|
+
| **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
249
|
|
|
251
250
|
### CP-4: `hooks/modules/tools/hook_response.py` -- Response Formatting
|
|
252
251
|
|
|
@@ -328,8 +327,7 @@ To support a CLI other than Claude Code (e.g., a hypothetical Cursor or Windsurf
|
|
|
328
327
|
| `tools/context/surface_router.py` | Surface classification and investigation briefs |
|
|
329
328
|
| `tools/memory/episodic.py` | Episodic memory storage |
|
|
330
329
|
| `config/context-contracts.json` | Agent read/write section permissions |
|
|
331
|
-
| `config/universal-rules.json` | Universal and agent-specific rules |
|
|
332
330
|
| `config/surface-routing.json` | Surface signals and routing config |
|
|
333
331
|
| `agents/*.md` | Agent identity definitions |
|
|
334
332
|
| `skills/*/SKILL.md` | Injected procedural knowledge |
|
|
335
|
-
| `bin/*.
|
|
333
|
+
| `bin/gaia` + `bin/cli/*.py` | Unified `gaia` CLI; subcommands auto-discovered from `bin/cli/` |
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,177 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [5.0.2] - 2026-06-03
|
|
11
|
+
|
|
12
|
+
### Approval-Flow Hardening, mkdir Reclassification, Jira Skill
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
#### Fixed
|
|
17
|
+
|
|
18
|
+
- **Stop double-approval on re-dispatched T3 grants** — a T3 command that was
|
|
19
|
+
re-dispatched after approval could be blocked a second time with a fresh nonce,
|
|
20
|
+
forcing the user to approve the same operation twice. Two gaps caused the grant miss:
|
|
21
|
+
`command_semantics` was not normalizing output-redirect tokens out of the semantic
|
|
22
|
+
signature (causing the retry signature to drift from the approved one), and
|
|
23
|
+
`bash_validator._find_pending_in_db` was matching too narrowly and minting a new
|
|
24
|
+
nonce instead of reusing the granted one. Both gaps are closed; a regression test
|
|
25
|
+
reproduces the redirect-normalization grant miss.
|
|
26
|
+
|
|
27
|
+
- **Flag-classifier grants + cross-session grant matching** — the flag-classifier
|
|
28
|
+
branch in `bash_validator` was never consulting approval grants, so curl-family T3
|
|
29
|
+
commands that had been approved were blocked again on retry. `check_db_semantic_grant`
|
|
30
|
+
is now session-agnostic (session is audit-only); `_find_pending_in_db` accepts
|
|
31
|
+
`all_sessions=True`; grant insert is fingerprint-idempotent so cross-session
|
|
32
|
+
block→approve→retry converges. `matches_approval_signature` derives identity from
|
|
33
|
+
`analyze_command` only; `_normalize_flag_token` binds long `--flag=value` tokens to
|
|
34
|
+
fix a critical over-match. Grant TTL raised from 5 to 60 minutes
|
|
35
|
+
(`APPROVAL_GRANT_TTL_MINUTES`), kept distinct from the 1440-minute pending TTL.
|
|
36
|
+
|
|
37
|
+
- **Unify T3 decision across bash validator classifiers** — mutative-verb,
|
|
38
|
+
`file_to_exec` composition, and flag-mutation classifiers now all route through a
|
|
39
|
+
single `decide_t3_outcome()` keyed on `has_orchestrator_above` (is_subagent AND
|
|
40
|
+
is_ops_mode). `file_to_exec` and curl flag-mutations no longer hardcode the native
|
|
41
|
+
CC approval dialog; in ops+subagent mode they produce `deny+approval_id` like
|
|
42
|
+
mutative verbs, keeping them inside the Gaia approval/audit trail. Local workspace
|
|
43
|
+
data files (`.json`/`.yaml`/`.csv`/`.txt`) are degraded to ALLOW for the
|
|
44
|
+
`file_to_exec` composition; network/decode→exec pipelines still BLOCK.
|
|
45
|
+
|
|
46
|
+
- **`mkdir` reclassified as T0 for non-sensitive working-tree paths** — `mkdir` on
|
|
47
|
+
relative, home-relative, or absolute non-system paths is non-destructive and
|
|
48
|
+
idempotent with `-p`; it no longer triggers T3. `mkdir` targeting kernel
|
|
49
|
+
pseudo-filesystems or privileged OS directories (`/dev`, `/sys`, `/proc`, `/etc`,
|
|
50
|
+
`/boot`, `/usr`, `/bin`, `/sbin`, `/lib`, `/lib64`, `/root`) retains T3. Scratch
|
|
51
|
+
space (`/tmp`, `/run`) is excluded — ephemeral, world-writable by design. Adds
|
|
52
|
+
`MKDIR_SENSITIVE_PATH_PREFIXES` (11 prefixes) and `_mkdir_targets_sensitive_path()`
|
|
53
|
+
in `mutative_verbs.py`.
|
|
54
|
+
|
|
55
|
+
#### Added
|
|
56
|
+
|
|
57
|
+
- **Schema v18 — stable project identity** — `project_identity` column and a partial
|
|
58
|
+
unique index on the `projects` table collapse the same physical repo scanned from
|
|
59
|
+
different vantages into one row. `store_populator.resolve_project_identity()` derives
|
|
60
|
+
stable identity from git-common-dir → normalized remote → realpath. Migration files:
|
|
61
|
+
`scripts/migrations/v17_to_v18.sql` and `v17_to_v18_fresh.sql`.
|
|
62
|
+
|
|
63
|
+
- **Skill `jira-ticket-writing`** — technique skill for writing human-readable Jira
|
|
64
|
+
Stories and Subtasks following Atlassian conventions: structured title formula,
|
|
65
|
+
acceptance criteria, story points, label taxonomy, and worked examples. User-invocable
|
|
66
|
+
(`user-invocable: true`); not injected into any agent frontmatter by default.
|
|
67
|
+
|
|
68
|
+
#### Changed
|
|
69
|
+
|
|
70
|
+
- **`gaia brief` / `gaia ac` exempted from T3 gate** — `gaia brief <verb>` and
|
|
71
|
+
`gaia ac <verb>` (`edit`/`set-status`/`set-field`/`add`/`remove`/`new`/`show`/`list`)
|
|
72
|
+
now classify as non-mutative. Local planning bookkeeping that is reversible and has no
|
|
73
|
+
external side effects is treated like `git commit`. The exemption is anchored to
|
|
74
|
+
`(base_cmd, subcommand)` — not a generic `gaia *` pattern — so the consent layer
|
|
75
|
+
(`gaia approvals approve/revoke`) and other groups (`gaia memory`) remain T3.
|
|
76
|
+
Whole-record destruction (`gaia brief delete`) and dangerous flags (`--force`) still
|
|
77
|
+
re-gate.
|
|
78
|
+
|
|
79
|
+
## [5.0.0] - 2026-06-02
|
|
80
|
+
|
|
81
|
+
### Stable Release: Scan Overhaul, Zero-Dep Install, Soft-Delete, DB-Canonical Context
|
|
82
|
+
|
|
83
|
+
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.
|
|
84
|
+
|
|
85
|
+
#### Added
|
|
86
|
+
|
|
87
|
+
- **Scan overhaul — taxonomy and recursive discovery** — `gaia scan` now classifies
|
|
88
|
+
discovered items across three orthogonal dimensions: *workspace* (the Claude Code
|
|
89
|
+
working environment), *project* (the user's source tree), and *installation* (the
|
|
90
|
+
Gaia artefacts wired into `.claude/`). Discovery walks recursively so nested
|
|
91
|
+
monorepo structures and workspace-within-workspace layouts are captured correctly.
|
|
92
|
+
Taxonomy is defined in `tools/scan/` and tested independently of the CLI.
|
|
93
|
+
|
|
94
|
+
- **On-demand `gaia scan <path>`** — the scan subcommand now accepts an explicit
|
|
95
|
+
target path, enabling agents to scan a directory that is not the current working
|
|
96
|
+
directory without changing cwd. Useful for multi-root workspaces and cross-project
|
|
97
|
+
context enrichment.
|
|
98
|
+
|
|
99
|
+
- **Scan/install separation + scan-core** — the scan pipeline is now split into a
|
|
100
|
+
pure discovery core (`scan-core`) with no install-time side effects, and a
|
|
101
|
+
separate install phase that consumes core output. This makes scan deterministic
|
|
102
|
+
and testable without triggering postinstall hooks, and lets the install phase be
|
|
103
|
+
skipped when scanning for context only.
|
|
104
|
+
|
|
105
|
+
- **Pure-NPM zero-dependency install** — `postinstall` now completes with zero
|
|
106
|
+
runtime npm dependencies. All install-time logic runs through `python3 bin/gaia
|
|
107
|
+
install --postinstall` (Python stdlib only). The devDependencies remain for build
|
|
108
|
+
tooling (`chalk`, `eslint`) but consumers take no transitive runtime deps.
|
|
109
|
+
|
|
110
|
+
- **Soft-delete for projects and workspaces** — `gaia scan` handles pruning
|
|
111
|
+
automatically: when a previously-registered project path is no longer found on
|
|
112
|
+
disk, the prune pass marks it missing; scanning a directory that has no Gaia
|
|
113
|
+
installation demotes the workspace (marks it missing) and tombstones its
|
|
114
|
+
projects. No explicit remove or demote commands exist — lifecycle state flows
|
|
115
|
+
from the scanner. Soft-deleted rows are hidden from list views. Schema migrated
|
|
116
|
+
from v12 to v17 to carry the new columns and the `project_workspace_archive`
|
|
117
|
+
table.
|
|
118
|
+
|
|
119
|
+
- **`project-context.json` retired — DB is canonical** — the on-disk
|
|
120
|
+
`project-context.json` file is no longer written or read by any Gaia component.
|
|
121
|
+
Project context lives exclusively in `~/.gaia/gaia.db` (tables `projects`,
|
|
122
|
+
`workspaces`, `project_resources`). The context provider and all CLI subcommands
|
|
123
|
+
read directly from the DB. Existing `project-context.json` files are ignored on
|
|
124
|
+
upgrade; run `gaia scan` to populate the DB.
|
|
125
|
+
|
|
126
|
+
#### Fixed
|
|
127
|
+
|
|
128
|
+
- **`gaia approvals list` crash** — `bin/cli/approvals.py` raised an unhandled
|
|
129
|
+
exception when the `approval_grants` table contained rows with a `None` nonce
|
|
130
|
+
(rows inserted by older schema versions). Added a null-guard before nonce
|
|
131
|
+
formatting; the command now lists all rows cleanly and marks legacy rows as
|
|
132
|
+
`(no nonce)`.
|
|
133
|
+
|
|
134
|
+
#### Changed
|
|
135
|
+
|
|
136
|
+
- **Schema v12 → v17** — five incremental migrations applied in lockstep with
|
|
137
|
+
`EXPECTED_SCHEMA_VERSION` in `bin/cli/doctor.py` and the bootstrap insert in
|
|
138
|
+
`scripts/bootstrap_database.sh`. The `test_schema_version_lockstep.py` test
|
|
139
|
+
confirms all three agree.
|
|
140
|
+
|
|
141
|
+
- **CI hardening** — `ci.yml` now runs the full pytest suite on Python 3.9, 3.11,
|
|
142
|
+
and 3.12 in parallel, blocks merges on any failure, and verifies `build:plugins`
|
|
143
|
+
produces valid `dist/` artefacts. The `validate-sandbox.sh` harness is wired
|
|
144
|
+
into the publish gate.
|
|
145
|
+
|
|
146
|
+
- **Suite green** — all Layer 1 tests pass on the three supported Python versions.
|
|
147
|
+
The scan-core and soft-delete paths are covered by dedicated test modules.
|
|
148
|
+
|
|
149
|
+
- **`bin/validate-sandbox.sh`** -- harness now drives `gaia` subcommands end
|
|
150
|
+
to end (no `gaia-X.js` callers remain). The 8-check matrix is unchanged.
|
|
151
|
+
Sandbox DB is now isolated via `GAIA_DATA_DIR` so memory checks run against
|
|
152
|
+
a seeded fixture DB rather than the global `~/.gaia/gaia.db`.
|
|
153
|
+
|
|
154
|
+
- **CLI docstrings** -- `bin/cli/*.py` modules dropped the
|
|
155
|
+
"Mirrors gaia-X.js" parity comments now that there is no JS counterpart on
|
|
156
|
+
disk to mirror.
|
|
157
|
+
|
|
158
|
+
#### Removed
|
|
159
|
+
|
|
160
|
+
- **Legacy JS CLI binaries** -- `bin/gaia-doctor.js`, `bin/gaia-status.js`,
|
|
161
|
+
`bin/gaia-history.js`, `bin/gaia-metrics.js`, `bin/gaia-cleanup.js`,
|
|
162
|
+
`bin/gaia-update.js`, `bin/gaia-uninstall.js`, `bin/gaia-skills-diagnose.js`,
|
|
163
|
+
`bin/gaia-review.js`, `bin/gaia-evidence`, `bin/gaia-scan` (Node wrapper),
|
|
164
|
+
and `bin/gaia-scan.py` are gone. The `bin` field in `package.json` now
|
|
165
|
+
exposes a single binary: `gaia`. Every subcommand previously available as
|
|
166
|
+
`npx gaia-X` is now reached through `gaia X` -- subcommands are discovered
|
|
167
|
+
automatically from `bin/cli/*.py` via the `register()` / `cmd_<name>()`
|
|
168
|
+
contract. Lifecycle scripts (`postinstall`, `preuninstall`) call
|
|
169
|
+
`python3 bin/gaia install --postinstall` and `python3 bin/gaia uninstall
|
|
170
|
+
--preuninstall` directly. `gaia-skills-diagnose`, `gaia-review`, and
|
|
171
|
+
`gaia-evidence` had no Python successor and are not migrated; for general
|
|
172
|
+
health checks use `gaia doctor`.
|
|
173
|
+
|
|
174
|
+
#### Internal
|
|
175
|
+
|
|
176
|
+
- Regenerated `dist/gaia-ops/` and `dist/gaia-security/` for 5.0.0.
|
|
177
|
+
- `pyproject.toml` version aligned with `package.json` at `5.0.0`.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
10
181
|
## [5.0.0-rc.3] - 2026-04-26
|
|
11
182
|
|
|
12
183
|
### Release Candidate 3: Python 3.9 Compatibility Fix
|
|
@@ -205,7 +376,7 @@ The unified CLI also provides subcommands that did not exist as standalone JS CL
|
|
|
205
376
|
| `python3 bin/gaia plans list` | List all feature briefs |
|
|
206
377
|
| `python3 bin/gaia plans show BRIEF_NAME` | Show a brief and plan |
|
|
207
378
|
| `python3 bin/gaia context show` | Display project-context.json summary |
|
|
208
|
-
| `python3 bin/gaia context scan` |
|
|
379
|
+
| `python3 bin/gaia context scan` | Refresh project-context via the scanner |
|
|
209
380
|
|
|
210
381
|
#### Deprecation timeline
|
|
211
382
|
|
|
@@ -298,7 +469,7 @@ Contracts now fully control what context each agent receives. Removed the progre
|
|
|
298
469
|
#### Changed
|
|
299
470
|
- **context_provider.py**: Contracts are the single source of truth -- removed progressive disclosure filtering that overrode contract-defined sections
|
|
300
471
|
- **context_provider.py**: Simplified output payload -- removed `enrichment` and `progressive_disclosure` keys from response
|
|
301
|
-
- **contracts/
|
|
472
|
+
- **contracts/platform-architect.json**: Now reads `cluster_details` and `application_services` sections
|
|
302
473
|
- **contracts/gitops-operator.json**: Now reads `gcp_services` section (GCP overlay)
|
|
303
474
|
- **pre_tool_use.py**: Updated log message to show sections count and rules count
|
|
304
475
|
- **templates/CLAUDE.template.md**: Synced agent routing descriptions with CLAUDE.md
|
|
@@ -391,8 +562,8 @@ Major redesign of skills and agents. Skills now teach principles instead of enum
|
|
|
391
562
|
- **`skills/reference.md`** - Agent template and npm release checklist (moved from gaia agent)
|
|
392
563
|
- **`skills/terraform-patterns/reference.md`** - Full HCL examples
|
|
393
564
|
- **`skills/gitops-patterns/reference.md`** - Full YAML examples
|
|
394
|
-
- **`investigation` skill** assigned to cloud-troubleshooter,
|
|
395
|
-
- **`git-conventions` skill** assigned to
|
|
565
|
+
- **`investigation` skill** assigned to cloud-troubleshooter, platform-architect, gitops-operator, devops-developer, gaia
|
|
566
|
+
- **`git-conventions` skill** assigned to platform-architect, gitops-operator, devops-developer
|
|
396
567
|
- **`agent-protocol` + `security-tiers` skills** assigned to speckit-planner
|
|
397
568
|
|
|
398
569
|
#### Metrics
|
|
@@ -689,7 +860,7 @@ Inspired by [memory-graph](https://github.com/gregorydickson/memory-graph) analy
|
|
|
689
860
|
### Changed - Agent Optimization
|
|
690
861
|
|
|
691
862
|
- **agents/*.md** - All 6 agents reduced by 78%
|
|
692
|
-
-
|
|
863
|
+
- platform-architect: 916 → 183 lines
|
|
693
864
|
- gitops-operator: 1,238 → 217 lines
|
|
694
865
|
- gcp-troubleshooter: 600 → 156 lines
|
|
695
866
|
- aws-troubleshooter: 565 → 142 lines
|
|
@@ -773,7 +944,7 @@ Inspired by [memory-graph](https://github.com/gregorydickson/memory-graph) analy
|
|
|
773
944
|
- Better Flux CD integration guidance
|
|
774
945
|
- Enhanced troubleshooting protocols
|
|
775
946
|
|
|
776
|
-
- **agents/
|
|
947
|
+
- **agents/platform-architect.md** - Enhanced with 47 new lines
|
|
777
948
|
- Improved Terragrunt support
|
|
778
949
|
- Better module design guidance
|
|
779
950
|
- 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/` |
|
|
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
|
-
-
|
|
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
|
|