@jaguilar87/gaia-ops 4.4.0 → 4.7.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 +1 -1
- package/.claude-plugin/plugin.json +12 -3
- package/ARCHITECTURE.md +9 -8
- package/CHANGELOG.md +34 -0
- package/README.md +43 -11
- package/agents/terraform-architect.md +1 -1
- package/bin/README.md +2 -2
- package/bin/gaia-doctor.js +18 -5
- package/bin/gaia-history.js +0 -1
- package/bin/gaia-metrics.js +2 -2
- package/bin/gaia-scan.py +23 -1
- package/bin/gaia-update.js +346 -54
- package/bin/pre-publish-validate.js +33 -10
- package/commands/gaia.md +37 -0
- package/config/README.md +3 -9
- package/config/context-contracts.json +47 -15
- package/config/surface-routing.json +9 -1
- package/dist/gaia-ops/.claude-plugin/plugin.json +22 -0
- package/dist/gaia-ops/agents/cloud-troubleshooter.md +73 -0
- package/dist/gaia-ops/agents/devops-developer.md +57 -0
- package/dist/gaia-ops/agents/gaia-system.md +58 -0
- package/dist/gaia-ops/agents/gitops-operator.md +60 -0
- package/dist/gaia-ops/agents/speckit-planner.md +71 -0
- package/dist/gaia-ops/agents/terraform-architect.md +60 -0
- package/dist/gaia-ops/commands/gaia.md +37 -0
- package/dist/gaia-ops/config/README.md +58 -0
- package/dist/gaia-ops/config/cloud/aws.json +140 -0
- package/dist/gaia-ops/config/cloud/gcp.json +145 -0
- package/dist/gaia-ops/config/context-contracts.json +131 -0
- package/dist/gaia-ops/config/git_standards.json +72 -0
- package/dist/gaia-ops/config/surface-routing.json +197 -0
- package/dist/gaia-ops/config/universal-rules.json +10 -0
- package/dist/gaia-ops/hooks/adapters/__init__.py +52 -0
- package/dist/gaia-ops/hooks/adapters/base.py +219 -0
- package/dist/gaia-ops/hooks/adapters/channel.py +17 -0
- package/dist/gaia-ops/hooks/adapters/claude_code.py +1477 -0
- package/dist/gaia-ops/hooks/adapters/types.py +194 -0
- package/dist/gaia-ops/hooks/adapters/utils.py +25 -0
- package/dist/gaia-ops/hooks/hooks.json +126 -0
- package/dist/gaia-ops/hooks/modules/__init__.py +15 -0
- package/dist/gaia-ops/hooks/modules/agents/__init__.py +29 -0
- package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +647 -0
- package/dist/gaia-ops/hooks/modules/agents/response_contract.py +496 -0
- package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +124 -0
- package/dist/gaia-ops/hooks/modules/agents/task_info_builder.py +74 -0
- package/dist/gaia-ops/hooks/modules/agents/transcript_analyzer.py +458 -0
- package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +152 -0
- package/dist/gaia-ops/hooks/modules/audit/__init__.py +28 -0
- package/dist/gaia-ops/hooks/modules/audit/event_detector.py +168 -0
- package/dist/gaia-ops/hooks/modules/audit/logger.py +131 -0
- package/dist/gaia-ops/hooks/modules/audit/metrics.py +134 -0
- package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +576 -0
- package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +296 -0
- package/dist/gaia-ops/hooks/modules/context/__init__.py +11 -0
- package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +317 -0
- package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +215 -0
- package/dist/gaia-ops/hooks/modules/context/context_cache.py +129 -0
- package/dist/gaia-ops/hooks/modules/context/context_freshness.py +145 -0
- package/dist/gaia-ops/hooks/modules/context/context_injector.py +427 -0
- package/dist/gaia-ops/hooks/modules/context/context_writer.py +518 -0
- package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +161 -0
- package/dist/gaia-ops/hooks/modules/core/__init__.py +40 -0
- package/dist/gaia-ops/hooks/modules/core/hook_entry.py +78 -0
- package/dist/gaia-ops/hooks/modules/core/paths.py +160 -0
- package/dist/gaia-ops/hooks/modules/core/plugin_mode.py +149 -0
- package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +558 -0
- package/dist/gaia-ops/hooks/modules/core/state.py +179 -0
- package/dist/gaia-ops/hooks/modules/core/stdin.py +24 -0
- package/dist/gaia-ops/hooks/modules/events/__init__.py +1 -0
- package/dist/gaia-ops/hooks/modules/events/event_writer.py +210 -0
- package/dist/gaia-ops/hooks/modules/identity/__init__.py +0 -0
- package/dist/gaia-ops/hooks/modules/identity/identity_provider.py +21 -0
- package/dist/gaia-ops/hooks/modules/identity/ops_identity.py +34 -0
- package/dist/gaia-ops/hooks/modules/identity/security_identity.py +10 -0
- package/dist/gaia-ops/hooks/modules/memory/__init__.py +8 -0
- package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +227 -0
- package/dist/gaia-ops/hooks/modules/orchestrator/__init__.py +1 -0
- package/dist/gaia-ops/hooks/modules/orchestrator/delegate_mode.py +128 -0
- package/dist/gaia-ops/hooks/modules/scanning/__init__.py +8 -0
- package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +84 -0
- package/dist/gaia-ops/hooks/modules/security/__init__.py +89 -0
- package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +87 -0
- package/dist/gaia-ops/hooks/modules/security/approval_constants.py +23 -0
- package/dist/gaia-ops/hooks/modules/security/approval_grants.py +912 -0
- package/dist/gaia-ops/hooks/modules/security/approval_messages.py +71 -0
- package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +153 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +584 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +86 -0
- package/dist/gaia-ops/hooks/modules/security/command_semantics.py +130 -0
- package/dist/gaia-ops/hooks/modules/security/gitops_validator.py +179 -0
- package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +850 -0
- package/dist/gaia-ops/hooks/modules/security/prompt_validator.py +40 -0
- package/dist/gaia-ops/hooks/modules/security/tiers.py +196 -0
- package/dist/gaia-ops/hooks/modules/session/__init__.py +10 -0
- package/dist/gaia-ops/hooks/modules/session/session_context_writer.py +100 -0
- package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +158 -0
- package/dist/gaia-ops/hooks/modules/session/session_manager.py +31 -0
- package/dist/gaia-ops/hooks/modules/tools/__init__.py +25 -0
- package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +708 -0
- package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +181 -0
- package/dist/gaia-ops/hooks/modules/tools/hook_response.py +55 -0
- package/dist/gaia-ops/hooks/modules/tools/shell_parser.py +227 -0
- package/dist/gaia-ops/hooks/modules/tools/task_validator.py +283 -0
- package/dist/gaia-ops/hooks/modules/validation/__init__.py +23 -0
- package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +380 -0
- package/dist/gaia-ops/hooks/post_compact.py +43 -0
- package/dist/gaia-ops/hooks/post_tool_use.py +54 -0
- package/dist/gaia-ops/hooks/pre_tool_use.py +383 -0
- package/dist/gaia-ops/hooks/session_start.py +69 -0
- package/dist/gaia-ops/hooks/stop_hook.py +69 -0
- package/dist/gaia-ops/hooks/subagent_start.py +71 -0
- package/dist/gaia-ops/hooks/subagent_stop.py +288 -0
- package/dist/gaia-ops/hooks/task_completed.py +70 -0
- package/dist/gaia-ops/hooks/user_prompt_submit.py +177 -0
- package/dist/gaia-ops/settings.json +72 -0
- package/dist/gaia-ops/skills/README.md +109 -0
- package/dist/gaia-ops/skills/agent-protocol/SKILL.md +105 -0
- package/dist/gaia-ops/skills/agent-protocol/examples.md +170 -0
- package/dist/gaia-ops/skills/agent-response/SKILL.md +53 -0
- package/dist/gaia-ops/skills/approval/SKILL.md +85 -0
- package/dist/gaia-ops/skills/approval/examples.md +140 -0
- package/dist/gaia-ops/skills/approval/reference.md +57 -0
- package/dist/gaia-ops/skills/command-execution/SKILL.md +64 -0
- package/dist/gaia-ops/skills/command-execution/reference.md +83 -0
- package/dist/gaia-ops/skills/context-updater/SKILL.md +76 -0
- package/dist/gaia-ops/skills/context-updater/examples.md +71 -0
- package/dist/gaia-ops/skills/developer-patterns/SKILL.md +93 -0
- package/dist/gaia-ops/skills/developer-patterns/reference.md +112 -0
- package/dist/gaia-ops/skills/execution/SKILL.md +66 -0
- package/dist/gaia-ops/skills/fast-queries/SKILL.md +47 -0
- package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +92 -0
- package/dist/gaia-ops/skills/gaia-patterns/reference.md +22 -0
- package/dist/gaia-ops/skills/git-conventions/SKILL.md +48 -0
- package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +73 -0
- package/dist/gaia-ops/skills/gitops-patterns/reference.md +183 -0
- package/dist/gaia-ops/skills/investigation/SKILL.md +77 -0
- package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +64 -0
- package/dist/gaia-ops/skills/reference.md +134 -0
- package/dist/gaia-ops/skills/security-tiers/SKILL.md +61 -0
- package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +623 -0
- package/dist/gaia-ops/skills/security-tiers/reference.md +39 -0
- package/dist/gaia-ops/skills/skill-creation/SKILL.md +119 -0
- package/dist/gaia-ops/skills/specification/SKILL.md +186 -0
- package/dist/gaia-ops/skills/speckit-workflow/SKILL.md +165 -0
- package/dist/gaia-ops/skills/speckit-workflow/reference.md +117 -0
- package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +63 -0
- package/dist/gaia-ops/skills/terraform-patterns/reference.md +93 -0
- package/dist/gaia-ops/speckit/README.md +516 -0
- package/dist/gaia-ops/speckit/scripts/.gitkeep +0 -0
- package/dist/gaia-ops/speckit/templates/adr-template.md +118 -0
- package/dist/gaia-ops/speckit/templates/agent-file-template.md +23 -0
- package/dist/gaia-ops/speckit/templates/plan-template.md +227 -0
- package/dist/gaia-ops/speckit/templates/spec-template.md +140 -0
- package/dist/gaia-ops/speckit/templates/tasks-template.md +257 -0
- package/dist/gaia-ops/tools/context/README.md +132 -0
- package/dist/gaia-ops/tools/context/__init__.py +42 -0
- package/dist/gaia-ops/tools/context/_paths.py +20 -0
- package/dist/gaia-ops/tools/context/context_provider.py +476 -0
- package/dist/gaia-ops/tools/context/context_section_reader.py +330 -0
- package/dist/gaia-ops/tools/context/deep_merge.py +159 -0
- package/dist/gaia-ops/tools/context/pending_updates.py +760 -0
- package/dist/gaia-ops/tools/context/surface_router.py +278 -0
- package/dist/gaia-ops/tools/fast-queries/README.md +65 -0
- package/dist/gaia-ops/tools/fast-queries/__init__.py +30 -0
- package/dist/gaia-ops/tools/fast-queries/appservices/quicktriage_devops_developer.sh +75 -0
- package/dist/gaia-ops/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +32 -0
- package/dist/gaia-ops/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +88 -0
- package/dist/gaia-ops/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +48 -0
- package/dist/gaia-ops/tools/fast-queries/run_triage.sh +59 -0
- package/dist/gaia-ops/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +80 -0
- package/dist/gaia-ops/tools/gaia_simulator/__init__.py +33 -0
- package/dist/gaia-ops/tools/gaia_simulator/cli.py +354 -0
- package/dist/gaia-ops/tools/gaia_simulator/extractor.py +457 -0
- package/dist/gaia-ops/tools/gaia_simulator/reporter.py +258 -0
- package/dist/gaia-ops/tools/gaia_simulator/routing_simulator.py +334 -0
- package/dist/gaia-ops/tools/gaia_simulator/runner.py +539 -0
- package/dist/gaia-ops/tools/gaia_simulator/skills_mapper.py +262 -0
- package/dist/gaia-ops/tools/memory/README.md +0 -0
- package/dist/gaia-ops/tools/memory/__init__.py +20 -0
- package/dist/gaia-ops/tools/memory/episodic.py +1196 -0
- package/dist/gaia-ops/tools/persist_transcript_analysis.py +85 -0
- package/dist/gaia-ops/tools/review/__init__.py +1 -0
- package/dist/gaia-ops/tools/review/review_engine.py +157 -0
- package/dist/gaia-ops/tools/scan/__init__.py +35 -0
- package/dist/gaia-ops/tools/scan/config.py +247 -0
- package/dist/gaia-ops/tools/scan/merge.py +212 -0
- package/dist/gaia-ops/tools/scan/orchestrator.py +549 -0
- package/dist/gaia-ops/tools/scan/registry.py +127 -0
- package/dist/gaia-ops/tools/scan/scanners/__init__.py +18 -0
- package/dist/gaia-ops/tools/scan/scanners/base.py +137 -0
- package/dist/gaia-ops/tools/scan/scanners/environment.py +324 -0
- package/dist/gaia-ops/tools/scan/scanners/git.py +570 -0
- package/dist/gaia-ops/tools/scan/scanners/infrastructure.py +875 -0
- package/dist/gaia-ops/tools/scan/scanners/orchestration.py +600 -0
- package/dist/gaia-ops/tools/scan/scanners/stack.py +1085 -0
- package/dist/gaia-ops/tools/scan/scanners/tools.py +260 -0
- package/dist/gaia-ops/tools/scan/setup.py +753 -0
- package/dist/gaia-ops/tools/scan/tests/__init__.py +1 -0
- package/dist/gaia-ops/tools/scan/tests/conftest.py +796 -0
- package/dist/gaia-ops/tools/scan/tests/test_environment.py +323 -0
- package/dist/gaia-ops/tools/scan/tests/test_git.py +419 -0
- package/dist/gaia-ops/tools/scan/tests/test_infrastructure.py +382 -0
- package/dist/gaia-ops/tools/scan/tests/test_integration.py +920 -0
- package/dist/gaia-ops/tools/scan/tests/test_merge.py +269 -0
- package/dist/gaia-ops/tools/scan/tests/test_orchestration.py +304 -0
- package/dist/gaia-ops/tools/scan/tests/test_stack.py +604 -0
- package/dist/gaia-ops/tools/scan/tests/test_tools.py +349 -0
- package/dist/gaia-ops/tools/scan/ui.py +624 -0
- package/dist/gaia-ops/tools/scan/verify.py +266 -0
- package/dist/gaia-ops/tools/scan/walk.py +118 -0
- package/dist/gaia-ops/tools/scan/workspace.py +85 -0
- package/dist/gaia-ops/tools/validation/README.md +244 -0
- package/dist/gaia-ops/tools/validation/__init__.py +17 -0
- package/dist/gaia-ops/tools/validation/approval_gate.py +321 -0
- package/dist/gaia-ops/tools/validation/validate_skills.py +189 -0
- package/dist/gaia-security/.claude-plugin/plugin.json +22 -0
- package/dist/gaia-security/config/universal-rules.json +10 -0
- package/dist/gaia-security/hooks/adapters/__init__.py +52 -0
- package/dist/gaia-security/hooks/adapters/base.py +219 -0
- package/dist/gaia-security/hooks/adapters/channel.py +17 -0
- package/dist/gaia-security/hooks/adapters/claude_code.py +1477 -0
- package/dist/gaia-security/hooks/adapters/types.py +194 -0
- package/dist/gaia-security/hooks/adapters/utils.py +25 -0
- package/dist/gaia-security/hooks/hooks.json +57 -0
- package/dist/gaia-security/hooks/modules/__init__.py +15 -0
- package/dist/gaia-security/hooks/modules/agents/__init__.py +29 -0
- package/dist/gaia-security/hooks/modules/agents/contract_validator.py +647 -0
- package/dist/gaia-security/hooks/modules/agents/response_contract.py +496 -0
- package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +124 -0
- package/dist/gaia-security/hooks/modules/agents/task_info_builder.py +74 -0
- package/dist/gaia-security/hooks/modules/agents/transcript_analyzer.py +458 -0
- package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +152 -0
- package/dist/gaia-security/hooks/modules/audit/__init__.py +28 -0
- package/dist/gaia-security/hooks/modules/audit/event_detector.py +168 -0
- package/dist/gaia-security/hooks/modules/audit/logger.py +131 -0
- package/dist/gaia-security/hooks/modules/audit/metrics.py +134 -0
- package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +576 -0
- package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +296 -0
- package/dist/gaia-security/hooks/modules/context/__init__.py +11 -0
- package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +317 -0
- package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +215 -0
- package/dist/gaia-security/hooks/modules/context/context_cache.py +129 -0
- package/dist/gaia-security/hooks/modules/context/context_freshness.py +145 -0
- package/dist/gaia-security/hooks/modules/context/context_injector.py +427 -0
- package/dist/gaia-security/hooks/modules/context/context_writer.py +518 -0
- package/dist/gaia-security/hooks/modules/context/contracts_loader.py +161 -0
- package/dist/gaia-security/hooks/modules/core/__init__.py +40 -0
- package/dist/gaia-security/hooks/modules/core/hook_entry.py +78 -0
- package/dist/gaia-security/hooks/modules/core/paths.py +160 -0
- package/dist/gaia-security/hooks/modules/core/plugin_mode.py +149 -0
- package/dist/gaia-security/hooks/modules/core/plugin_setup.py +558 -0
- package/dist/gaia-security/hooks/modules/core/state.py +179 -0
- package/dist/gaia-security/hooks/modules/core/stdin.py +24 -0
- package/dist/gaia-security/hooks/modules/events/__init__.py +1 -0
- package/dist/gaia-security/hooks/modules/events/event_writer.py +210 -0
- package/dist/gaia-security/hooks/modules/identity/__init__.py +0 -0
- package/dist/gaia-security/hooks/modules/identity/identity_provider.py +21 -0
- package/dist/gaia-security/hooks/modules/identity/ops_identity.py +34 -0
- package/dist/gaia-security/hooks/modules/identity/security_identity.py +10 -0
- package/dist/gaia-security/hooks/modules/memory/__init__.py +8 -0
- package/dist/gaia-security/hooks/modules/memory/episode_writer.py +227 -0
- package/dist/gaia-security/hooks/modules/orchestrator/__init__.py +1 -0
- package/dist/gaia-security/hooks/modules/orchestrator/delegate_mode.py +128 -0
- package/dist/gaia-security/hooks/modules/scanning/__init__.py +8 -0
- package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +84 -0
- package/dist/gaia-security/hooks/modules/security/__init__.py +89 -0
- package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +87 -0
- package/dist/gaia-security/hooks/modules/security/approval_constants.py +23 -0
- package/dist/gaia-security/hooks/modules/security/approval_grants.py +912 -0
- package/dist/gaia-security/hooks/modules/security/approval_messages.py +71 -0
- package/dist/gaia-security/hooks/modules/security/approval_scopes.py +153 -0
- package/dist/gaia-security/hooks/modules/security/blocked_commands.py +584 -0
- package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +86 -0
- package/dist/gaia-security/hooks/modules/security/command_semantics.py +130 -0
- package/dist/gaia-security/hooks/modules/security/gitops_validator.py +179 -0
- package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +850 -0
- package/dist/gaia-security/hooks/modules/security/prompt_validator.py +40 -0
- package/dist/gaia-security/hooks/modules/security/tiers.py +196 -0
- package/dist/gaia-security/hooks/modules/session/__init__.py +10 -0
- package/dist/gaia-security/hooks/modules/session/session_context_writer.py +100 -0
- package/dist/gaia-security/hooks/modules/session/session_event_injector.py +158 -0
- package/dist/gaia-security/hooks/modules/session/session_manager.py +31 -0
- package/dist/gaia-security/hooks/modules/tools/__init__.py +25 -0
- package/dist/gaia-security/hooks/modules/tools/bash_validator.py +708 -0
- package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +181 -0
- package/dist/gaia-security/hooks/modules/tools/hook_response.py +55 -0
- package/dist/gaia-security/hooks/modules/tools/shell_parser.py +227 -0
- package/dist/gaia-security/hooks/modules/tools/task_validator.py +283 -0
- package/dist/gaia-security/hooks/modules/validation/__init__.py +23 -0
- package/dist/gaia-security/hooks/modules/validation/commit_validator.py +380 -0
- package/dist/gaia-security/hooks/post_tool_use.py +54 -0
- package/dist/gaia-security/hooks/pre_tool_use.py +383 -0
- package/dist/gaia-security/hooks/session_start.py +69 -0
- package/dist/gaia-security/hooks/stop_hook.py +69 -0
- package/dist/gaia-security/hooks/user_prompt_submit.py +177 -0
- package/dist/gaia-security/settings.json +58 -0
- package/git-hooks/commit-msg +41 -0
- package/hooks/README.md +8 -6
- package/hooks/adapters/channel.py +0 -25
- package/hooks/adapters/claude_code.py +364 -125
- package/hooks/elicitation_result.py +132 -0
- package/hooks/hooks.json +10 -1
- package/hooks/modules/README.md +3 -2
- package/hooks/modules/agents/contract_validator.py +3 -51
- package/hooks/modules/agents/response_contract.py +4 -8
- package/hooks/modules/agents/transcript_reader.py +4 -5
- package/hooks/modules/audit/__init__.py +4 -6
- package/hooks/modules/audit/event_detector.py +0 -2
- package/hooks/modules/audit/metrics.py +108 -187
- package/hooks/modules/audit/workflow_auditor.py +0 -4
- package/hooks/modules/audit/workflow_recorder.py +0 -5
- package/hooks/modules/context/compact_context_builder.py +1 -0
- package/hooks/modules/context/context_cache.py +129 -0
- package/hooks/modules/context/context_injector.py +18 -40
- package/hooks/modules/context/context_writer.py +1 -25
- package/hooks/modules/context/contracts_loader.py +7 -10
- package/hooks/modules/core/hook_entry.py +1 -0
- package/hooks/modules/core/paths.py +12 -13
- package/hooks/modules/core/plugin_mode.py +74 -4
- package/hooks/modules/core/plugin_setup.py +395 -23
- package/hooks/modules/events/__init__.py +1 -0
- package/hooks/modules/events/event_writer.py +210 -0
- package/hooks/modules/identity/ops_identity.py +18 -27
- package/hooks/modules/memory/episode_writer.py +1 -6
- package/hooks/modules/orchestrator/__init__.py +1 -0
- package/hooks/modules/orchestrator/delegate_mode.py +128 -0
- package/hooks/modules/security/__init__.py +2 -4
- package/hooks/modules/security/approval_constants.py +5 -1
- package/hooks/modules/security/approval_grants.py +189 -6
- package/hooks/modules/security/approval_messages.py +9 -21
- package/hooks/modules/security/blocked_commands.py +98 -34
- package/hooks/modules/security/command_semantics.py +0 -4
- package/hooks/modules/security/gitops_validator.py +1 -11
- package/hooks/modules/security/mutative_verbs.py +179 -38
- package/hooks/modules/security/tiers.py +1 -19
- package/hooks/modules/session/session_event_injector.py +1 -25
- package/hooks/modules/tools/bash_validator.py +310 -94
- package/hooks/modules/tools/shell_parser.py +0 -1
- package/hooks/modules/tools/task_validator.py +9 -29
- package/hooks/post_tool_use.py +0 -72
- package/hooks/pre_tool_use.py +42 -102
- package/hooks/session_start.py +4 -2
- package/hooks/subagent_start.py +6 -2
- package/hooks/subagent_stop.py +1 -13
- package/hooks/user_prompt_submit.py +119 -37
- package/index.js +1 -1
- package/package.json +5 -3
- package/skills/README.md +3 -5
- package/skills/agent-protocol/SKILL.md +17 -16
- package/skills/agent-protocol/examples.md +6 -6
- package/skills/agent-response/SKILL.md +11 -14
- package/skills/approval/SKILL.md +28 -13
- package/skills/approval/reference.md +2 -2
- package/skills/execution/SKILL.md +1 -1
- package/skills/gaia-patterns/SKILL.md +2 -3
- package/skills/orchestrator-approval/SKILL.md +22 -50
- package/skills/security-tiers/SKILL.md +1 -1
- package/templates/README.md +9 -9
- package/templates/managed-settings.template.json +43 -0
- package/tools/gaia_simulator/runner.py +34 -1
- package/tools/scan/orchestrator.py +13 -0
- package/tools/scan/scanners/base.py +8 -0
- package/tools/scan/scanners/git.py +78 -0
- package/tools/scan/scanners/infrastructure.py +65 -0
- package/tools/scan/scanners/stack.py +110 -0
- package/tools/scan/setup.py +120 -13
- package/tools/scan/workspace.py +85 -0
- package/config/context-contracts.aws.json +0 -42
- package/config/context-contracts.gcp.json +0 -39
- package/skills/project-dispatch/SKILL.md +0 -34
- package/templates/settings.template.json +0 -226
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Terraform Patterns — HCL Reference
|
|
2
|
+
|
|
3
|
+
Structural patterns for Terraform and Terragrunt. Cloud-agnostic — use values from project-context, never hardcode.
|
|
4
|
+
|
|
5
|
+
For cloud-specific resource examples (VPCs, clusters, databases), discover patterns from the existing codebase using the `investigation` skill.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Remote State (root terragrunt.hcl)
|
|
10
|
+
|
|
11
|
+
```hcl
|
|
12
|
+
remote_state {
|
|
13
|
+
backend = "gcs" # gcs | s3 | azurerm — from cloud_provider in context
|
|
14
|
+
config = {
|
|
15
|
+
bucket = "{project_id}-terraform-state"
|
|
16
|
+
prefix = "${path_relative_to_include()}/terraform.tfstate"
|
|
17
|
+
project = "{project_id}" # from project-context
|
|
18
|
+
location = "{primary_region}" # from project-context
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Component (terragrunt.hcl)
|
|
24
|
+
|
|
25
|
+
```hcl
|
|
26
|
+
include "root" { path = find_in_parent_folders() }
|
|
27
|
+
terraform { source = "../../../../../terraform//{module-name}" }
|
|
28
|
+
|
|
29
|
+
dependency "vpc" {
|
|
30
|
+
config_path = "../vpc"
|
|
31
|
+
mock_outputs = { network_id = "mock-network" }
|
|
32
|
+
mock_outputs_allowed_terraform_commands = ["validate", "plan"]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
inputs = {
|
|
36
|
+
project_id = "{project_id}" # from project-context
|
|
37
|
+
region = "{primary_region}" # from project-context
|
|
38
|
+
network_id = dependency.vpc.outputs.network_id
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Required Labels
|
|
43
|
+
|
|
44
|
+
Every resource must include:
|
|
45
|
+
|
|
46
|
+
```hcl
|
|
47
|
+
labels = {
|
|
48
|
+
environment = "{env}" # from project-context
|
|
49
|
+
managed_by = "terraform"
|
|
50
|
+
project = "{project_id}" # from project-context
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Outputs Pattern
|
|
55
|
+
|
|
56
|
+
```hcl
|
|
57
|
+
output "resource_id" {
|
|
58
|
+
description = "Description of what this output represents"
|
|
59
|
+
value = resource_type.name.id
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Always: snake_case name, non-empty description, no sensitive values unless `sensitive = true`.
|
|
64
|
+
|
|
65
|
+
## Module Sourcing
|
|
66
|
+
|
|
67
|
+
```hcl
|
|
68
|
+
# Local module (GCP preferred)
|
|
69
|
+
terraform { source = "../../../../../terraform//{module-name}" }
|
|
70
|
+
|
|
71
|
+
# Registry module (AWS preferred)
|
|
72
|
+
terraform { source = "tfr:///terraform-aws-modules/{module}/aws?version=x.y.z" }
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Always pin exact versions — never `latest`, never unpinned.
|
|
76
|
+
|
|
77
|
+
## State Operations
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
terragrunt state list
|
|
81
|
+
terragrunt state show {resource_type}.{name}
|
|
82
|
+
terragrunt import {resource_type}.{name} {live_id}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Troubleshooting
|
|
86
|
+
|
|
87
|
+
| Issue | Solution |
|
|
88
|
+
|-------|----------|
|
|
89
|
+
| State lock | Check state backend lock table, wait or force-unlock with caution |
|
|
90
|
+
| Module not found | Run `terragrunt init` |
|
|
91
|
+
| Dependency cycle | Review dependency `config_path` declarations |
|
|
92
|
+
| Mock outputs mismatch | Update `mock_outputs` to match actual output types |
|
|
93
|
+
| Plan shows unexpected destroy | Check for naming drift between code and live state |
|
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
# Spec-Kit - Structured Feature Development System
|
|
2
|
+
|
|
3
|
+
Structured workflow framework for specification-driven feature development. Spec-Kit is an open-source framework integrated as agentic functionality for Claude Code. It provides templates, scripts, and a lean agent (`speckit-planner`) that detects the current workflow phase from existing artifacts and loads the corresponding skill — no slash commands needed. governance.md is auto-generated on first use and kept in sync with `project-context.json` on every session.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Overview](#overview)
|
|
8
|
+
- [Architecture](#architecture)
|
|
9
|
+
- [Installation](#installation)
|
|
10
|
+
- [Skills Reference](#skills-reference)
|
|
11
|
+
- [Auto-Enrichment](#auto-enrichment)
|
|
12
|
+
- [Surface Routing](#surface-routing)
|
|
13
|
+
- [Troubleshooting](#troubleshooting)
|
|
14
|
+
- [Best Practices](#best-practices)
|
|
15
|
+
- [References](#references)
|
|
16
|
+
- [Support](#support)
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
### What is Spec-Kit?
|
|
21
|
+
|
|
22
|
+
Spec-Kit provides structured workflow for feature planning:
|
|
23
|
+
1. **Specify** - Define feature specifications (conversational, orchestrator-driven)
|
|
24
|
+
2. **Plan** - Create technical implementation plans
|
|
25
|
+
3. **Tasks** - Generate actionable task lists with metadata
|
|
26
|
+
4. **Analyze** - Validate consistency across artifacts
|
|
27
|
+
5. **Execute** - Orchestrator routes tasks to agents for execution
|
|
28
|
+
6. **Governance** - Maintain project governance principles
|
|
29
|
+
|
|
30
|
+
### Key Features
|
|
31
|
+
|
|
32
|
+
- ✅ **Natural language** - No slash commands; describe what you need in plain language
|
|
33
|
+
- ✅ **Phase auto-detection** - Agent reads artifacts and knows which skill to apply
|
|
34
|
+
- ✅ **Governance auto-sync** - governance.md generated on first use, kept in sync with project-context on every session
|
|
35
|
+
- ✅ **GOVERNANCE_UPDATE** - plan skill detects new technologies and updates governance.md automatically
|
|
36
|
+
- ✅ **Multi-project** - Work with multiple spec-kits simultaneously
|
|
37
|
+
- ✅ **Portable** - Works with any project structure
|
|
38
|
+
- ✅ **Auto-enrichment** - Tasks automatically tagged with surface-routing metadata
|
|
39
|
+
- ✅ **Risk analysis** - High-risk tasks (T2/T3) analyzed before execution
|
|
40
|
+
- ✅ **Surface routing** - Tasks can target one or more specialized agents automatically
|
|
41
|
+
- ✅ **Git-agnostic** - User controls Git workflow independently
|
|
42
|
+
- ✅ **Template-based** - Consistent structure across features
|
|
43
|
+
- ✅ **State machine** - Always know where you are and what to run next
|
|
44
|
+
- ✅ **Drift detection** - Verify declared completions against real code evidence
|
|
45
|
+
|
|
46
|
+
## Architecture
|
|
47
|
+
|
|
48
|
+
### Directory Structure
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
.claude/speckit/
|
|
52
|
+
├── README.md # This file
|
|
53
|
+
├── scripts/ # Reserved - not yet implemented
|
|
54
|
+
├── templates/ # 5 markdown templates
|
|
55
|
+
│ ├── spec-template.md # Feature specification template
|
|
56
|
+
│ ├── plan-template.md # Implementation plan template
|
|
57
|
+
│ ├── tasks-template.md # Task list template
|
|
58
|
+
│ ├── adr-template.md # Architecture Decision Record template
|
|
59
|
+
│ └── agent-file-template.md # Agent context file template
|
|
60
|
+
|
|
61
|
+
.claude/agents/
|
|
62
|
+
└── speckit-planner.md # Lean agent — phase detection + skill dispatch
|
|
63
|
+
|
|
64
|
+
.claude/skills/
|
|
65
|
+
└── speckit-workflow/SKILL.md # Single skill with full workflow logic
|
|
66
|
+
|
|
67
|
+
.claude/commands/ # 5 slash commands
|
|
68
|
+
├── speckit.init.md # Bootstrap project-context.json
|
|
69
|
+
├── speckit.plan.md # Generate plan.md + design artifacts
|
|
70
|
+
├── speckit.tasks.md # Generate enriched tasks.md
|
|
71
|
+
├── speckit.add-task.md # Add ad-hoc task with enrichment
|
|
72
|
+
└── speckit.analyze-task.md # Deep-dive before executing risky tasks
|
|
73
|
+
|
|
74
|
+
.claude/tools/ # Python utilities
|
|
75
|
+
├── context/ # Context provisioning and enrichment
|
|
76
|
+
│ ├── context_provider.py # Main context provisioning logic
|
|
77
|
+
│ └── context_section_reader.py # Token-optimized context extraction
|
|
78
|
+
├── memory/ # Episodic memory system
|
|
79
|
+
│ └── episodic.py # Persistent episode storage and retrieval
|
|
80
|
+
└── validation/ # Approval gates
|
|
81
|
+
└── approval_gate.py # T3 approval workflow
|
|
82
|
+
|
|
83
|
+
<project-root>/ # User-specified root (e.g., specs/)
|
|
84
|
+
├── governance.md # Auto-generated by gaia-scan, synced from project-context.json
|
|
85
|
+
└── specs/ # Feature specifications
|
|
86
|
+
├── 001-feature-name/
|
|
87
|
+
│ ├── spec.md # Feature specification
|
|
88
|
+
│ ├── plan.md # Implementation plan
|
|
89
|
+
│ ├── tasks.md # Task list (auto-enriched)
|
|
90
|
+
│ ├── research.md # Research notes (optional)
|
|
91
|
+
│ ├── data-model.md # Data model (optional)
|
|
92
|
+
│ └── contracts/ # API contracts (optional)
|
|
93
|
+
└── 002-feature-name/
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Component Responsibilities
|
|
97
|
+
|
|
98
|
+
| Component | Responsibility | Used By |
|
|
99
|
+
|-----------|---------------|---------|
|
|
100
|
+
| **speckit-planner** | Phase detection, skill dispatch | Claude orchestrator |
|
|
101
|
+
| **Skills** | Per-phase process and protocol | Agent automatically |
|
|
102
|
+
| **Scripts** | Reserved - not yet implemented | -- |
|
|
103
|
+
| **Templates** | Consistent artifact structure | Scripts during creation |
|
|
104
|
+
| **Governance** | Project governance principles | All planning skills |
|
|
105
|
+
|
|
106
|
+
## Installation
|
|
107
|
+
|
|
108
|
+
### Initial Setup
|
|
109
|
+
|
|
110
|
+
**Step 1: Create project directory**
|
|
111
|
+
```bash
|
|
112
|
+
mkdir -p specs/specs
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Step 2: Bootstrap project context** (natural language)
|
|
116
|
+
```
|
|
117
|
+
"initialize speckit for this project"
|
|
118
|
+
"bootstrap specs"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Ready!** The `speckit-planner` agent detects the phase automatically. Example conversation:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
"I want to add dark mode to the settings page"
|
|
125
|
+
→ Orchestrator drives spec creation conversationally → writes spec.md
|
|
126
|
+
|
|
127
|
+
"plan the dark mode feature"
|
|
128
|
+
→ speckit-planner: spec.md exists, no plan.md → runs plan skill → writes plan.md
|
|
129
|
+
|
|
130
|
+
"generate tasks for 001-dark-mode"
|
|
131
|
+
→ speckit-planner: plan.md exists, no tasks.md → runs tasks skill → writes tasks.md
|
|
132
|
+
|
|
133
|
+
"execute the tasks for 001-dark-mode"
|
|
134
|
+
→ Orchestrator reads tasks.md → routes each task to the appropriate agent
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Skills Reference
|
|
140
|
+
|
|
141
|
+
The `speckit-planner` agent uses a single skill (`skills/speckit-workflow/SKILL.md`) that contains plan + task generation logic. Spec creation is conversational (orchestrator-driven). Task execution is handled by the orchestrator routing tasks to agents. Additionally, 5 slash commands in `commands/` provide direct phase invocation.
|
|
142
|
+
|
|
143
|
+
| Phase | Purpose | Trigger phrase examples |
|
|
144
|
+
|-------|---------|------------------------|
|
|
145
|
+
| **specify** | Define feature spec conversationally | "I want to add X", "create spec for Y" (orchestrator-driven) |
|
|
146
|
+
| **init** | Verify prerequisites, generate/sync governance.md | Runs silently -- user does not invoke directly |
|
|
147
|
+
| **plan** | Generate plan.md + design artifacts | "plan feature X", "generate implementation plan" |
|
|
148
|
+
| **tasks** | Generate enriched tasks.md | "generate tasks for X", "create task list" |
|
|
149
|
+
| **execute** | Route tasks to agents | "execute the tasks", "start implementation" (orchestrator-driven) |
|
|
150
|
+
| **add-task** | Add task with auto-enrichment | "add a task for X", "I need a task to fix Y" |
|
|
151
|
+
| **analyze-task** | Deep-dive before executing risky task | "analyze T042", "what does T015 do" |
|
|
152
|
+
|
|
153
|
+
> **init** runs automatically as Step 0 before any agent action. It generates `governance.md` on first use and syncs it with `project-context.json` on subsequent sessions -- silently unless changes are made.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Auto-Enrichment
|
|
158
|
+
|
|
159
|
+
### What is Auto-Enrichment?
|
|
160
|
+
|
|
161
|
+
Automatic injection of metadata into tasks for agent routing and risk assessment.
|
|
162
|
+
|
|
163
|
+
### When Does It Happen?
|
|
164
|
+
|
|
165
|
+
**Automatic enrichment:**
|
|
166
|
+
- ✨ Tasks phase (`speckit.tasks` skill) — all tasks enriched when generated
|
|
167
|
+
- ✨ Add-task phase (`speckit.add-task` skill) — new task enriched when added
|
|
168
|
+
|
|
169
|
+
**No manual enrichment step needed**
|
|
170
|
+
|
|
171
|
+
### Enrichment Process
|
|
172
|
+
|
|
173
|
+
**Step 1: Surface routing** (handled by the speckit.tasks skill during task generation)
|
|
174
|
+
|
|
175
|
+
**Step 2: Metadata injection**
|
|
176
|
+
```markdown
|
|
177
|
+
- [ ] T001 Create GKE cluster
|
|
178
|
+
<!-- 🤖 Agent: terraform-architect | ✅ T1 | ❓ 0.85 -->
|
|
179
|
+
<!-- 🏷️ Tags: #terraform #gcp #gke -->
|
|
180
|
+
<!-- 🎯 skill: terraform_operations (8.0) -->
|
|
181
|
+
<!-- 🧭 Adjacent surfaces: note any cross-layer checks or follow-up agents -->
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Metadata Components
|
|
185
|
+
|
|
186
|
+
**Agent assignment:**
|
|
187
|
+
```
|
|
188
|
+
🤖 Agent: terraform-architect
|
|
189
|
+
```
|
|
190
|
+
Primary agent for task execution
|
|
191
|
+
|
|
192
|
+
**Risk tier:**
|
|
193
|
+
```
|
|
194
|
+
✅ T0 (read-only)
|
|
195
|
+
✅ T1 (validation)
|
|
196
|
+
🔒 T2 (simulation) - Requires analysis
|
|
197
|
+
🚫 T3 (blocked) - Not executed
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Confidence score:**
|
|
201
|
+
```
|
|
202
|
+
❓ 0.85 (0.0-1.0 scale)
|
|
203
|
+
```
|
|
204
|
+
Router confidence in agent assignment
|
|
205
|
+
|
|
206
|
+
**Tags:**
|
|
207
|
+
```
|
|
208
|
+
🏷️ Tags: #terraform #gcp #gke
|
|
209
|
+
```
|
|
210
|
+
Technology and domain tags
|
|
211
|
+
|
|
212
|
+
**Skill scores:**
|
|
213
|
+
```
|
|
214
|
+
🎯 skill: terraform_operations (8.0)
|
|
215
|
+
```
|
|
216
|
+
Agent capability match
|
|
217
|
+
|
|
218
|
+
**Adjacent surface note:**
|
|
219
|
+
```
|
|
220
|
+
🧭 Adjacent surfaces: app_ci_tooling, live_runtime
|
|
221
|
+
```
|
|
222
|
+
Cross-layer follow-up or validation surfaces to review before execution
|
|
223
|
+
|
|
224
|
+
**High-risk warning:**
|
|
225
|
+
```
|
|
226
|
+
⚠️ HIGH RISK: Analyze before execution
|
|
227
|
+
💡 Suggested: analyze task T001
|
|
228
|
+
```
|
|
229
|
+
For T2/T3 tasks only. The orchestrator triggers analysis automatically before execution.
|
|
230
|
+
|
|
231
|
+
**Low-confidence warning** (score < 0.5):
|
|
232
|
+
```
|
|
233
|
+
⚠️ LOW_CONFIDENCE: score=0.3 — review surface classification manually
|
|
234
|
+
```
|
|
235
|
+
Emitted automatically when routing confidence falls below `MIN_CONFIDENCE: 0.5`
|
|
236
|
+
|
|
237
|
+
### Enrichment Benefits
|
|
238
|
+
|
|
239
|
+
- [x] Automatic surface routing
|
|
240
|
+
- [x] Risk visibility
|
|
241
|
+
- [x] Execution safety
|
|
242
|
+
- [x] Audit trail
|
|
243
|
+
- [x] Team coordination
|
|
244
|
+
- [x] Confidence threshold warnings (MIN_CONFIDENCE: 0.5)
|
|
245
|
+
- [x] Machine-readable dependency graph (YAML) in tasks.md
|
|
246
|
+
|
|
247
|
+
## Surface Routing
|
|
248
|
+
|
|
249
|
+
### How Routing Works
|
|
250
|
+
|
|
251
|
+
**Step 1: Infer active surfaces from task metadata**
|
|
252
|
+
```markdown
|
|
253
|
+
<!-- 🤖 Agent: gitops-operator | ✅ T0 | ❓ 0.92 -->
|
|
254
|
+
<!-- 🧭 Surface: gitops_desired_state -->
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**Step 2: Load surface-relevant context**
|
|
258
|
+
```python
|
|
259
|
+
from tools.context.context_section_reader import ContextSectionReader
|
|
260
|
+
reader = ContextSectionReader(project_context)
|
|
261
|
+
context = reader.get_sections_for_agent('gitops-operator')
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Step 3: Invoke one or more specialized agents**
|
|
265
|
+
```python
|
|
266
|
+
Task(
|
|
267
|
+
subagent_type='gitops-operator',
|
|
268
|
+
prompt=f"{context}\n\n{task_instructions}"
|
|
269
|
+
)
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
If the task spans multiple surfaces, dispatch the primary agent for each active surface and consolidate the findings before acting.
|
|
273
|
+
|
|
274
|
+
### Core Surfaces
|
|
275
|
+
|
|
276
|
+
| Surface | Primary agent | Typical signals |
|
|
277
|
+
|-------|---------------|-----------|
|
|
278
|
+
| `terraform_iac` | **terraform-architect** | Terraform/Terragrunt, IAM, buckets, shared modules |
|
|
279
|
+
| `gitops_desired_state` | **gitops-operator** | Kubernetes manifests, Flux, Helm, desired state in Git |
|
|
280
|
+
| `live_runtime` | **cloud-troubleshooter** | Live cluster/cloud diagnostics, pods, logs, runtime drift |
|
|
281
|
+
| `app_ci_tooling` | **devops-developer** | Application code, CI/CD, Docker, build/test tooling |
|
|
282
|
+
|
|
283
|
+
### Routing Decision Factors
|
|
284
|
+
|
|
285
|
+
- Detect dominant edit surface from paths, tools, and artifacts named in the task.
|
|
286
|
+
- If the task crosses desired state, live state, and infra/app boundaries, treat it as multi-surface.
|
|
287
|
+
- Ask each agent for evidence: patterns checked, files/paths checked, exact commands run, key outputs, and cross-layer impacts.
|
|
288
|
+
- Use `devops-developer` for narrow reconnaissance when the dominant surface is unclear, not as a silent default owner.
|
|
289
|
+
|
|
290
|
+
### Unclear or Multi-Surface Tasks
|
|
291
|
+
|
|
292
|
+
**If the dominant surface is clear:**
|
|
293
|
+
1. Route to that surface's primary agent.
|
|
294
|
+
|
|
295
|
+
**If multiple surfaces are active:**
|
|
296
|
+
1. Invoke the primary agent for each active surface.
|
|
297
|
+
2. Consolidate findings before implementation or approval.
|
|
298
|
+
|
|
299
|
+
**If the surface is unclear:**
|
|
300
|
+
1. Ask the user or run a narrow reconnaissance task.
|
|
301
|
+
2. Re-classify after evidence arrives.
|
|
302
|
+
|
|
303
|
+
## Troubleshooting
|
|
304
|
+
|
|
305
|
+
### Config Not Found
|
|
306
|
+
|
|
307
|
+
**Error:**
|
|
308
|
+
```
|
|
309
|
+
ERROR: project-context.json not found
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**Solution:**
|
|
313
|
+
Ask the agent to initialize: "initialize speckit for this project" or "bootstrap specs". The agent will ask for project details interactively.
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
### Governance File Not Found
|
|
318
|
+
|
|
319
|
+
**This should not happen in normal operation.** The agent generates governance.md automatically as Step 0 on first use.
|
|
320
|
+
|
|
321
|
+
**If it occurs:**
|
|
322
|
+
```
|
|
323
|
+
WARNING: governance.md not found at specs/governance.md
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
**Solution:**
|
|
327
|
+
Ask the agent: "initialize speckit". The speckit.init skill will generate governance.md from your project-context.json values. Alternatively, ensure `paths.speckit_root` is set in `.claude/project-context/project-context.json`.
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
### Feature Directory Missing
|
|
332
|
+
|
|
333
|
+
**Error:**
|
|
334
|
+
```
|
|
335
|
+
ERROR: Feature directory not found
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Solution:**
|
|
339
|
+
Tell the orchestrator: "I want to specify a new feature for dark mode". The orchestrator will drive spec creation conversationally and create the directory.
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
### Plan Missing
|
|
344
|
+
|
|
345
|
+
**Error:**
|
|
346
|
+
```
|
|
347
|
+
ERROR: plan.md not found in specs/specs/003-feature-name
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Solution:**
|
|
351
|
+
Ask the agent: "plan feature 003-feature-name". The agent detects the missing plan.md and runs the plan skill.
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
### Tasks Not Enriched
|
|
356
|
+
|
|
357
|
+
**Symptoms:**
|
|
358
|
+
- Tasks missing metadata comments
|
|
359
|
+
- No agent assignments
|
|
360
|
+
- No risk tiers
|
|
361
|
+
|
|
362
|
+
**Solution:**
|
|
363
|
+
Tasks are automatically enriched by the tasks skill and add-task skill. No manual action needed.
|
|
364
|
+
|
|
365
|
+
**Verify enrichment:**
|
|
366
|
+
```bash
|
|
367
|
+
grep "🤖 Agent:" specs/specs/003-feature-name/tasks.md
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
### Wrong Agent Assigned
|
|
373
|
+
|
|
374
|
+
**Symptoms:**
|
|
375
|
+
- Task routed to incorrect agent
|
|
376
|
+
- Low confidence score (<0.5) with `⚠️ LOW_CONFIDENCE` warning
|
|
377
|
+
|
|
378
|
+
**Solution:**
|
|
379
|
+
Edit the metadata comment in tasks.md manually:
|
|
380
|
+
```markdown
|
|
381
|
+
- [ ] T001 Task description
|
|
382
|
+
<!-- 🤖 Agent: correct-agent | ✅ T1 | ❓ 0.85 -->
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
### High-Risk Task Blocked
|
|
388
|
+
|
|
389
|
+
**Symptoms:**
|
|
390
|
+
- Task marked with ⚠️ HIGH RISK
|
|
391
|
+
- Agent requests confirmation before proceeding
|
|
392
|
+
|
|
393
|
+
**This is expected behavior for T2/T3 tasks**
|
|
394
|
+
|
|
395
|
+
**Solution:**
|
|
396
|
+
1. Review the analysis the agent presents automatically
|
|
397
|
+
2. Confirm "yes" to proceed or "no" to skip
|
|
398
|
+
3. If not safe, ask the agent to modify the approach
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
### JQ Not Installed
|
|
403
|
+
|
|
404
|
+
**Error:**
|
|
405
|
+
```
|
|
406
|
+
ERROR: jq is required but not installed
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
**Solution:**
|
|
410
|
+
```bash
|
|
411
|
+
# macOS
|
|
412
|
+
brew install jq
|
|
413
|
+
|
|
414
|
+
# Ubuntu/Debian
|
|
415
|
+
sudo apt-get install jq
|
|
416
|
+
|
|
417
|
+
# Verify installation
|
|
418
|
+
jq --version
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
## Best Practices
|
|
422
|
+
|
|
423
|
+
### Configuration Management
|
|
424
|
+
|
|
425
|
+
- ✅ Run `npx gaia-scan` once per project to generate project-context.json and governance.md
|
|
426
|
+
- ✅ Set `paths.speckit_root` in project-context.json so the agent knows where governance.md lives
|
|
427
|
+
- ✅ Don't hardcode paths in custom scripts
|
|
428
|
+
- ✅ Trust governance auto-sync — don't edit governance.md manually for stack values
|
|
429
|
+
|
|
430
|
+
### Feature Development
|
|
431
|
+
|
|
432
|
+
- ✅ Ask "where are we with feature X?" to orient yourself at any time
|
|
433
|
+
- ✅ Let the agent detect the phase — don't force a specific skill
|
|
434
|
+
- ✅ Follow workflow order (specify → plan → tasks → execute)
|
|
435
|
+
- ✅ Let auto-enrichment handle metadata (don't edit manually)
|
|
436
|
+
- ✅ Ask "validate feature X" after implementation to confirm real completion
|
|
437
|
+
|
|
438
|
+
### Risk Management
|
|
439
|
+
|
|
440
|
+
- ✅ Always analyze T2/T3 tasks before execution
|
|
441
|
+
- ✅ Review agent assignments for tasks with LOW_CONFIDENCE warnings (score < 0.5)
|
|
442
|
+
- ✅ Keep confidence scores >0.7 for critical operations
|
|
443
|
+
- ✅ Use fallback agents when primary confidence is low
|
|
444
|
+
|
|
445
|
+
### Git Workflow
|
|
446
|
+
|
|
447
|
+
- ✅ User controls Git workflow (no auto-branching)
|
|
448
|
+
- ✅ Branch when ready (not enforced by scripts)
|
|
449
|
+
- ✅ Commit regularly during implementation
|
|
450
|
+
- ✅ Use descriptive commit messages
|
|
451
|
+
|
|
452
|
+
### Documentation
|
|
453
|
+
|
|
454
|
+
- ✅ Keep governance.md up-to-date with learnings
|
|
455
|
+
- ✅ Document architecture decisions in plan.md
|
|
456
|
+
- ✅ Create research.md for investigation notes
|
|
457
|
+
- ✅ Use contracts/ for API specifications
|
|
458
|
+
|
|
459
|
+
## References
|
|
460
|
+
|
|
461
|
+
### Internal Documentation
|
|
462
|
+
|
|
463
|
+
- `.claude/project-context/project-context.json` - Project-specific context
|
|
464
|
+
- `CLAUDE.md` - Repository guidance for Claude Code
|
|
465
|
+
- `specs/governance.md` - Project governance principles
|
|
466
|
+
|
|
467
|
+
### Agent and Skills
|
|
468
|
+
|
|
469
|
+
Agent: `.claude/agents/speckit-planner.md`
|
|
470
|
+
|
|
471
|
+
Skill: `.claude/skills/speckit-workflow/SKILL.md` (single skill with full workflow logic)
|
|
472
|
+
|
|
473
|
+
Slash commands in `.claude/commands/`:
|
|
474
|
+
- speckit.init.md
|
|
475
|
+
- speckit.plan.md
|
|
476
|
+
- speckit.tasks.md
|
|
477
|
+
- speckit.add-task.md
|
|
478
|
+
- speckit.analyze-task.md
|
|
479
|
+
|
|
480
|
+
### Tool Files
|
|
481
|
+
|
|
482
|
+
- `.claude/tools/context/context_provider.py` - Context provisioning
|
|
483
|
+
- `.claude/tools/context/context_section_reader.py` - Token-optimized context extraction
|
|
484
|
+
- `.claude/tools/memory/episodic.py` - Episodic memory system
|
|
485
|
+
- `.claude/tools/validation/approval_gate.py` - T3 approval workflow
|
|
486
|
+
|
|
487
|
+
**Framework Base**
|
|
488
|
+
|
|
489
|
+
Spec-Kit is an open-source framework adapted as agentic functionality for Claude Code. Main modifications:
|
|
490
|
+
|
|
491
|
+
- ✅ Natural language interaction - No slash commands
|
|
492
|
+
- ✅ Governance auto-sync - governance.md generated and kept in sync automatically
|
|
493
|
+
- ✅ Auto-enrichment - Tasks with routing metadata
|
|
494
|
+
- ✅ Risk analysis - T0-T3 with automatic validation
|
|
495
|
+
- ✅ Multi-project - Simultaneous spec support
|
|
496
|
+
- ✅ Agentic integration - Automatic routing to specialized agents
|
|
497
|
+
|
|
498
|
+
---
|
|
499
|
+
|
|
500
|
+
## Support
|
|
501
|
+
|
|
502
|
+
**For Claude orchestrator:**
|
|
503
|
+
- Spec creation is conversational -- the orchestrator drives it directly with the user
|
|
504
|
+
- Route to `speckit-planner` when the spec is ready and the user wants to plan or generate tasks
|
|
505
|
+
- Task execution is orchestrator-driven -- read tasks.md and route each task to the appropriate agent
|
|
506
|
+
|
|
507
|
+
**For users:**
|
|
508
|
+
- Describe what you need in natural language
|
|
509
|
+
- Create project directory first: `mkdir -p specs/specs`
|
|
510
|
+
- Ask "where are we?" or "what's next?" at any point to orient yourself
|
|
511
|
+
- Trust auto-enrichment (don't edit metadata manually)
|
|
512
|
+
- The agent will ask for confirmation before any high-risk task
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
**Version:** 4.2.0 | **Updated:** 2026-03-11
|
|
File without changes
|