@jaguilar87/gaia 5.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (621) hide show
  1. package/.claude-plugin/marketplace.json +33 -0
  2. package/.claude-plugin/plugin.json +26 -0
  3. package/ARCHITECTURE.md +335 -0
  4. package/CHANGELOG.md +1298 -0
  5. package/CODE_OF_CONDUCT.md +11 -0
  6. package/CONTRIBUTING.md +146 -0
  7. package/INSTALL.md +436 -0
  8. package/LICENSE +21 -0
  9. package/README.md +222 -0
  10. package/SECURITY.md +47 -0
  11. package/agents/README.md +78 -0
  12. package/agents/cloud-troubleshooter.md +73 -0
  13. package/agents/developer.md +65 -0
  14. package/agents/gaia-operator.md +64 -0
  15. package/agents/gaia-orchestrator.md +111 -0
  16. package/agents/gaia-planner.md +53 -0
  17. package/agents/gaia-system.md +71 -0
  18. package/agents/gitops-operator.md +61 -0
  19. package/agents/terraform-architect.md +63 -0
  20. package/bin/README.md +106 -0
  21. package/bin/cli/__init__.py +1 -0
  22. package/bin/cli/approvals.py +740 -0
  23. package/bin/cli/cleanup.py +562 -0
  24. package/bin/cli/context.py +283 -0
  25. package/bin/cli/doctor.py +651 -0
  26. package/bin/cli/history.py +305 -0
  27. package/bin/cli/memory.py +483 -0
  28. package/bin/cli/metrics.py +1068 -0
  29. package/bin/cli/plans.py +515 -0
  30. package/bin/cli/status.py +302 -0
  31. package/bin/cli/update.py +382 -0
  32. package/bin/gaia +112 -0
  33. package/bin/gaia-cleanup.js +531 -0
  34. package/bin/gaia-doctor.js +635 -0
  35. package/bin/gaia-evidence +126 -0
  36. package/bin/gaia-history.js +251 -0
  37. package/bin/gaia-metrics.js +1278 -0
  38. package/bin/gaia-review.js +269 -0
  39. package/bin/gaia-scan +44 -0
  40. package/bin/gaia-scan.py +589 -0
  41. package/bin/gaia-skills-diagnose.js +929 -0
  42. package/bin/gaia-status.js +278 -0
  43. package/bin/gaia-uninstall.js +111 -0
  44. package/bin/gaia-update.js +919 -0
  45. package/bin/pre-publish-validate.js +610 -0
  46. package/bin/python-detect.js +60 -0
  47. package/bin/validate-sandbox.sh +601 -0
  48. package/commands/README.md +64 -0
  49. package/commands/gaia.md +37 -0
  50. package/commands/scan-project.md +67 -0
  51. package/config/README.md +71 -0
  52. package/config/cloud/aws.json +134 -0
  53. package/config/cloud/gcp.json +139 -0
  54. package/config/context-contracts.json +158 -0
  55. package/config/crons-schema.md +81 -0
  56. package/config/git_standards.json +72 -0
  57. package/config/surface-routing.json +417 -0
  58. package/config/universal-rules.json +102 -0
  59. package/dist/gaia-ops/.claude-plugin/plugin.json +24 -0
  60. package/dist/gaia-ops/README.md +80 -0
  61. package/dist/gaia-ops/agents/cloud-troubleshooter.md +73 -0
  62. package/dist/gaia-ops/agents/developer.md +65 -0
  63. package/dist/gaia-ops/agents/gaia-operator.md +64 -0
  64. package/dist/gaia-ops/agents/gaia-orchestrator.md +111 -0
  65. package/dist/gaia-ops/agents/gaia-planner.md +53 -0
  66. package/dist/gaia-ops/agents/gaia-system.md +71 -0
  67. package/dist/gaia-ops/agents/gitops-operator.md +61 -0
  68. package/dist/gaia-ops/agents/terraform-architect.md +63 -0
  69. package/dist/gaia-ops/commands/gaia.md +37 -0
  70. package/dist/gaia-ops/config/README.md +71 -0
  71. package/dist/gaia-ops/config/cloud/aws.json +134 -0
  72. package/dist/gaia-ops/config/cloud/gcp.json +139 -0
  73. package/dist/gaia-ops/config/context-contracts.json +158 -0
  74. package/dist/gaia-ops/config/crons-schema.md +81 -0
  75. package/dist/gaia-ops/config/git_standards.json +72 -0
  76. package/dist/gaia-ops/config/surface-routing.json +417 -0
  77. package/dist/gaia-ops/config/universal-rules.json +102 -0
  78. package/dist/gaia-ops/hooks/adapters/__init__.py +52 -0
  79. package/dist/gaia-ops/hooks/adapters/base.py +219 -0
  80. package/dist/gaia-ops/hooks/adapters/channel.py +17 -0
  81. package/dist/gaia-ops/hooks/adapters/claude_code.py +1890 -0
  82. package/dist/gaia-ops/hooks/adapters/types.py +194 -0
  83. package/dist/gaia-ops/hooks/adapters/utils.py +25 -0
  84. package/dist/gaia-ops/hooks/hooks.json +192 -0
  85. package/dist/gaia-ops/hooks/modules/__init__.py +15 -0
  86. package/dist/gaia-ops/hooks/modules/agents/__init__.py +29 -0
  87. package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +647 -0
  88. package/dist/gaia-ops/hooks/modules/agents/response_contract.py +496 -0
  89. package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +120 -0
  90. package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +267 -0
  91. package/dist/gaia-ops/hooks/modules/agents/task_info_builder.py +74 -0
  92. package/dist/gaia-ops/hooks/modules/agents/transcript_analyzer.py +458 -0
  93. package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +152 -0
  94. package/dist/gaia-ops/hooks/modules/audit/__init__.py +28 -0
  95. package/dist/gaia-ops/hooks/modules/audit/event_detector.py +168 -0
  96. package/dist/gaia-ops/hooks/modules/audit/logger.py +131 -0
  97. package/dist/gaia-ops/hooks/modules/audit/metrics.py +134 -0
  98. package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +611 -0
  99. package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +296 -0
  100. package/dist/gaia-ops/hooks/modules/context/__init__.py +11 -0
  101. package/dist/gaia-ops/hooks/modules/context/agentic_loop_detector.py +165 -0
  102. package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +317 -0
  103. package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +218 -0
  104. package/dist/gaia-ops/hooks/modules/context/context_freshness.py +145 -0
  105. package/dist/gaia-ops/hooks/modules/context/context_injector.py +558 -0
  106. package/dist/gaia-ops/hooks/modules/context/context_writer.py +530 -0
  107. package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +161 -0
  108. package/dist/gaia-ops/hooks/modules/core/__init__.py +40 -0
  109. package/dist/gaia-ops/hooks/modules/core/hook_entry.py +78 -0
  110. package/dist/gaia-ops/hooks/modules/core/paths.py +160 -0
  111. package/dist/gaia-ops/hooks/modules/core/plugin_mode.py +149 -0
  112. package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +577 -0
  113. package/dist/gaia-ops/hooks/modules/core/state.py +179 -0
  114. package/dist/gaia-ops/hooks/modules/core/stdin.py +24 -0
  115. package/dist/gaia-ops/hooks/modules/events/__init__.py +1 -0
  116. package/dist/gaia-ops/hooks/modules/events/event_writer.py +210 -0
  117. package/dist/gaia-ops/hooks/modules/memory/__init__.py +8 -0
  118. package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +216 -0
  119. package/dist/gaia-ops/hooks/modules/orchestrator/__init__.py +1 -0
  120. package/dist/gaia-ops/hooks/modules/orchestrator/delegate_mode.py +122 -0
  121. package/dist/gaia-ops/hooks/modules/scanning/__init__.py +8 -0
  122. package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +84 -0
  123. package/dist/gaia-ops/hooks/modules/security/__init__.py +120 -0
  124. package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +87 -0
  125. package/dist/gaia-ops/hooks/modules/security/approval_constants.py +23 -0
  126. package/dist/gaia-ops/hooks/modules/security/approval_grants.py +1638 -0
  127. package/dist/gaia-ops/hooks/modules/security/approval_messages.py +71 -0
  128. package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +222 -0
  129. package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +595 -0
  130. package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +87 -0
  131. package/dist/gaia-ops/hooks/modules/security/command_semantics.py +181 -0
  132. package/dist/gaia-ops/hooks/modules/security/composition_rules.py +547 -0
  133. package/dist/gaia-ops/hooks/modules/security/flag_classifiers.py +873 -0
  134. package/dist/gaia-ops/hooks/modules/security/gitops_validator.py +179 -0
  135. package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +1131 -0
  136. package/dist/gaia-ops/hooks/modules/security/network_hosts.py +481 -0
  137. package/dist/gaia-ops/hooks/modules/security/prompt_validator.py +40 -0
  138. package/dist/gaia-ops/hooks/modules/security/shell_unwrapper.py +165 -0
  139. package/dist/gaia-ops/hooks/modules/security/tiers.py +196 -0
  140. package/dist/gaia-ops/hooks/modules/session/__init__.py +10 -0
  141. package/dist/gaia-ops/hooks/modules/session/pending_scanner.py +174 -0
  142. package/dist/gaia-ops/hooks/modules/session/session_context_writer.py +100 -0
  143. package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +160 -0
  144. package/dist/gaia-ops/hooks/modules/session/session_manager.py +31 -0
  145. package/dist/gaia-ops/hooks/modules/session/session_registry.py +333 -0
  146. package/dist/gaia-ops/hooks/modules/tools/__init__.py +29 -0
  147. package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +1008 -0
  148. package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +231 -0
  149. package/dist/gaia-ops/hooks/modules/tools/hook_response.py +55 -0
  150. package/dist/gaia-ops/hooks/modules/tools/shell_parser.py +227 -0
  151. package/dist/gaia-ops/hooks/modules/tools/stage_decomposer.py +315 -0
  152. package/dist/gaia-ops/hooks/modules/tools/task_validator.py +294 -0
  153. package/dist/gaia-ops/hooks/modules/validation/__init__.py +23 -0
  154. package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +380 -0
  155. package/dist/gaia-ops/hooks/post_compact.py +43 -0
  156. package/dist/gaia-ops/hooks/post_tool_use.py +54 -0
  157. package/dist/gaia-ops/hooks/pre_compact.py +60 -0
  158. package/dist/gaia-ops/hooks/pre_tool_use.py +413 -0
  159. package/dist/gaia-ops/hooks/session_end_hook.py +77 -0
  160. package/dist/gaia-ops/hooks/session_start.py +81 -0
  161. package/dist/gaia-ops/hooks/stop_hook.py +70 -0
  162. package/dist/gaia-ops/hooks/subagent_start.py +71 -0
  163. package/dist/gaia-ops/hooks/subagent_stop.py +295 -0
  164. package/dist/gaia-ops/hooks/task_completed.py +70 -0
  165. package/dist/gaia-ops/hooks/user_prompt_submit.py +246 -0
  166. package/dist/gaia-ops/settings.json +72 -0
  167. package/dist/gaia-ops/skills/README.md +158 -0
  168. package/dist/gaia-ops/skills/agent-creation/SKILL.md +87 -0
  169. package/dist/gaia-ops/skills/agent-creation/examples.md +170 -0
  170. package/dist/gaia-ops/skills/agent-creation/reference.md +191 -0
  171. package/dist/gaia-ops/skills/agent-protocol/SKILL.md +93 -0
  172. package/dist/gaia-ops/skills/agent-protocol/examples.md +223 -0
  173. package/dist/gaia-ops/skills/agent-response/SKILL.md +69 -0
  174. package/dist/gaia-ops/skills/agentic-loop/SKILL.md +80 -0
  175. package/dist/gaia-ops/skills/agentic-loop/reference.md +378 -0
  176. package/dist/gaia-ops/skills/blog-writing/SKILL.md +98 -0
  177. package/dist/gaia-ops/skills/blog-writing/reference.md +130 -0
  178. package/dist/gaia-ops/skills/brief-spec/SKILL.md +185 -0
  179. package/dist/gaia-ops/skills/command-execution/SKILL.md +64 -0
  180. package/dist/gaia-ops/skills/command-execution/reference.md +83 -0
  181. package/dist/gaia-ops/skills/context-updater/SKILL.md +87 -0
  182. package/dist/gaia-ops/skills/context-updater/examples.md +71 -0
  183. package/dist/gaia-ops/skills/developer-patterns/SKILL.md +50 -0
  184. package/dist/gaia-ops/skills/developer-patterns/reference.md +112 -0
  185. package/dist/gaia-ops/skills/execution/SKILL.md +99 -0
  186. package/dist/gaia-ops/skills/fast-queries/SKILL.md +43 -0
  187. package/dist/gaia-ops/skills/gaia-compact/SKILL.md +74 -0
  188. package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +108 -0
  189. package/dist/gaia-ops/skills/gaia-patterns/reference.md +395 -0
  190. package/dist/gaia-ops/skills/gaia-planner/SKILL.md +37 -0
  191. package/dist/gaia-ops/skills/gaia-planner/reference.md +107 -0
  192. package/dist/gaia-ops/skills/gaia-release/SKILL.md +85 -0
  193. package/dist/gaia-ops/skills/gaia-release/reference.md +92 -0
  194. package/dist/gaia-ops/skills/gaia-self-check/SKILL.md +114 -0
  195. package/dist/gaia-ops/skills/gaia-self-check/reference.md +453 -0
  196. package/dist/gaia-ops/skills/gaia-verify/SKILL.md +77 -0
  197. package/dist/gaia-ops/skills/gaia-verify/reference.md +80 -0
  198. package/dist/gaia-ops/skills/git-conventions/SKILL.md +47 -0
  199. package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +60 -0
  200. package/dist/gaia-ops/skills/gitops-patterns/reference.md +183 -0
  201. package/dist/gaia-ops/skills/gmail-policy/SKILL.md +200 -0
  202. package/dist/gaia-ops/skills/gmail-policy/reference.md +150 -0
  203. package/dist/gaia-ops/skills/gmail-triage/SKILL.md +100 -0
  204. package/dist/gaia-ops/skills/gws-setup/SKILL.md +99 -0
  205. package/dist/gaia-ops/skills/gws-setup/reference.md +73 -0
  206. package/dist/gaia-ops/skills/investigation/SKILL.md +100 -0
  207. package/dist/gaia-ops/skills/memory-curation/SKILL.md +83 -0
  208. package/dist/gaia-ops/skills/memory-search/SKILL.md +88 -0
  209. package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +160 -0
  210. package/dist/gaia-ops/skills/orchestrator-approval/reference.md +174 -0
  211. package/dist/gaia-ops/skills/pending-approvals/SKILL.md +72 -0
  212. package/dist/gaia-ops/skills/pending-approvals/reference.md +214 -0
  213. package/dist/gaia-ops/skills/readme-writing/SKILL.md +71 -0
  214. package/dist/gaia-ops/skills/readme-writing/reference.md +188 -0
  215. package/dist/gaia-ops/skills/reference.md +135 -0
  216. package/dist/gaia-ops/skills/request-approval/SKILL.md +140 -0
  217. package/dist/gaia-ops/skills/request-approval/examples.md +140 -0
  218. package/dist/gaia-ops/skills/request-approval/reference.md +57 -0
  219. package/dist/gaia-ops/skills/schedule-task/SKILL.md +64 -0
  220. package/dist/gaia-ops/skills/schedule-task/reference.md +233 -0
  221. package/dist/gaia-ops/skills/security-tiers/SKILL.md +141 -0
  222. package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +623 -0
  223. package/dist/gaia-ops/skills/security-tiers/reference.md +39 -0
  224. package/dist/gaia-ops/skills/session-reflection/SKILL.md +69 -0
  225. package/dist/gaia-ops/skills/skill-creation/SKILL.md +92 -0
  226. package/dist/gaia-ops/skills/skill-creation/reference.md +29 -0
  227. package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +89 -0
  228. package/dist/gaia-ops/skills/terraform-patterns/reference.md +93 -0
  229. package/dist/gaia-ops/tools/__init__.py +9 -0
  230. package/dist/gaia-ops/tools/agentic-loop/decide-status.py +210 -0
  231. package/dist/gaia-ops/tools/agentic-loop/parse-metric.py +106 -0
  232. package/dist/gaia-ops/tools/agentic-loop/record-iteration.py +221 -0
  233. package/dist/gaia-ops/tools/context/README.md +132 -0
  234. package/dist/gaia-ops/tools/context/__init__.py +42 -0
  235. package/dist/gaia-ops/tools/context/_paths.py +20 -0
  236. package/dist/gaia-ops/tools/context/context_provider.py +721 -0
  237. package/dist/gaia-ops/tools/context/context_section_reader.py +342 -0
  238. package/dist/gaia-ops/tools/context/deep_merge.py +159 -0
  239. package/dist/gaia-ops/tools/context/pending_updates.py +760 -0
  240. package/dist/gaia-ops/tools/context/surface_router.py +278 -0
  241. package/dist/gaia-ops/tools/fast-queries/README.md +65 -0
  242. package/dist/gaia-ops/tools/fast-queries/__init__.py +30 -0
  243. package/dist/gaia-ops/tools/fast-queries/appservices/quicktriage_devops_developer.sh +75 -0
  244. package/dist/gaia-ops/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +32 -0
  245. package/dist/gaia-ops/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +88 -0
  246. package/dist/gaia-ops/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +48 -0
  247. package/dist/gaia-ops/tools/fast-queries/run_triage.sh +59 -0
  248. package/dist/gaia-ops/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +80 -0
  249. package/dist/gaia-ops/tools/gaia_simulator/__init__.py +33 -0
  250. package/dist/gaia-ops/tools/gaia_simulator/cli.py +354 -0
  251. package/dist/gaia-ops/tools/gaia_simulator/extractor.py +457 -0
  252. package/dist/gaia-ops/tools/gaia_simulator/reporter.py +258 -0
  253. package/dist/gaia-ops/tools/gaia_simulator/routing_simulator.py +334 -0
  254. package/dist/gaia-ops/tools/gaia_simulator/runner.py +539 -0
  255. package/dist/gaia-ops/tools/gaia_simulator/skills_mapper.py +264 -0
  256. package/dist/gaia-ops/tools/memory/README.md +0 -0
  257. package/dist/gaia-ops/tools/memory/__init__.py +20 -0
  258. package/dist/gaia-ops/tools/memory/backfill_fts5.py +107 -0
  259. package/dist/gaia-ops/tools/memory/conflict_detector.py +295 -0
  260. package/dist/gaia-ops/tools/memory/episodic.py +1210 -0
  261. package/dist/gaia-ops/tools/memory/git_invalidator.py +262 -0
  262. package/dist/gaia-ops/tools/memory/paths.py +102 -0
  263. package/dist/gaia-ops/tools/memory/scoring.py +193 -0
  264. package/dist/gaia-ops/tools/memory/search_store.py +375 -0
  265. package/dist/gaia-ops/tools/persist_transcript_analysis.py +85 -0
  266. package/dist/gaia-ops/tools/review/__init__.py +1 -0
  267. package/dist/gaia-ops/tools/review/review_engine.py +157 -0
  268. package/dist/gaia-ops/tools/scan/__init__.py +35 -0
  269. package/dist/gaia-ops/tools/scan/config.py +247 -0
  270. package/dist/gaia-ops/tools/scan/merge.py +212 -0
  271. package/dist/gaia-ops/tools/scan/orchestrator.py +549 -0
  272. package/dist/gaia-ops/tools/scan/registry.py +127 -0
  273. package/dist/gaia-ops/tools/scan/scanners/__init__.py +18 -0
  274. package/dist/gaia-ops/tools/scan/scanners/base.py +137 -0
  275. package/dist/gaia-ops/tools/scan/scanners/environment.py +349 -0
  276. package/dist/gaia-ops/tools/scan/scanners/git.py +570 -0
  277. package/dist/gaia-ops/tools/scan/scanners/infrastructure.py +875 -0
  278. package/dist/gaia-ops/tools/scan/scanners/orchestration.py +600 -0
  279. package/dist/gaia-ops/tools/scan/scanners/stack.py +1085 -0
  280. package/dist/gaia-ops/tools/scan/scanners/tools.py +260 -0
  281. package/dist/gaia-ops/tools/scan/setup.py +686 -0
  282. package/dist/gaia-ops/tools/scan/tests/__init__.py +1 -0
  283. package/dist/gaia-ops/tools/scan/tests/conftest.py +796 -0
  284. package/dist/gaia-ops/tools/scan/tests/test_environment.py +323 -0
  285. package/dist/gaia-ops/tools/scan/tests/test_git.py +419 -0
  286. package/dist/gaia-ops/tools/scan/tests/test_infrastructure.py +382 -0
  287. package/dist/gaia-ops/tools/scan/tests/test_integration.py +920 -0
  288. package/dist/gaia-ops/tools/scan/tests/test_merge.py +269 -0
  289. package/dist/gaia-ops/tools/scan/tests/test_orchestration.py +304 -0
  290. package/dist/gaia-ops/tools/scan/tests/test_stack.py +604 -0
  291. package/dist/gaia-ops/tools/scan/tests/test_tools.py +349 -0
  292. package/dist/gaia-ops/tools/scan/ui.py +624 -0
  293. package/dist/gaia-ops/tools/scan/verify.py +270 -0
  294. package/dist/gaia-ops/tools/scan/walk.py +118 -0
  295. package/dist/gaia-ops/tools/scan/workspace.py +85 -0
  296. package/dist/gaia-ops/tools/validation/README.md +244 -0
  297. package/dist/gaia-ops/tools/validation/__init__.py +17 -0
  298. package/dist/gaia-ops/tools/validation/approval_gate.py +321 -0
  299. package/dist/gaia-ops/tools/validation/validate_skills.py +189 -0
  300. package/dist/gaia-security/.claude-plugin/plugin.json +24 -0
  301. package/dist/gaia-security/README.md +90 -0
  302. package/dist/gaia-security/config/universal-rules.json +102 -0
  303. package/dist/gaia-security/hooks/adapters/__init__.py +52 -0
  304. package/dist/gaia-security/hooks/adapters/base.py +219 -0
  305. package/dist/gaia-security/hooks/adapters/channel.py +17 -0
  306. package/dist/gaia-security/hooks/adapters/claude_code.py +1890 -0
  307. package/dist/gaia-security/hooks/adapters/types.py +194 -0
  308. package/dist/gaia-security/hooks/adapters/utils.py +25 -0
  309. package/dist/gaia-security/hooks/hooks.json +113 -0
  310. package/dist/gaia-security/hooks/modules/__init__.py +15 -0
  311. package/dist/gaia-security/hooks/modules/agents/__init__.py +29 -0
  312. package/dist/gaia-security/hooks/modules/agents/contract_validator.py +647 -0
  313. package/dist/gaia-security/hooks/modules/agents/response_contract.py +496 -0
  314. package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +120 -0
  315. package/dist/gaia-security/hooks/modules/agents/state_tracker.py +267 -0
  316. package/dist/gaia-security/hooks/modules/agents/task_info_builder.py +74 -0
  317. package/dist/gaia-security/hooks/modules/agents/transcript_analyzer.py +458 -0
  318. package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +152 -0
  319. package/dist/gaia-security/hooks/modules/audit/__init__.py +28 -0
  320. package/dist/gaia-security/hooks/modules/audit/event_detector.py +168 -0
  321. package/dist/gaia-security/hooks/modules/audit/logger.py +131 -0
  322. package/dist/gaia-security/hooks/modules/audit/metrics.py +134 -0
  323. package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +611 -0
  324. package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +296 -0
  325. package/dist/gaia-security/hooks/modules/context/__init__.py +11 -0
  326. package/dist/gaia-security/hooks/modules/context/agentic_loop_detector.py +165 -0
  327. package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +317 -0
  328. package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +218 -0
  329. package/dist/gaia-security/hooks/modules/context/context_freshness.py +145 -0
  330. package/dist/gaia-security/hooks/modules/context/context_injector.py +558 -0
  331. package/dist/gaia-security/hooks/modules/context/context_writer.py +530 -0
  332. package/dist/gaia-security/hooks/modules/context/contracts_loader.py +161 -0
  333. package/dist/gaia-security/hooks/modules/core/__init__.py +40 -0
  334. package/dist/gaia-security/hooks/modules/core/hook_entry.py +78 -0
  335. package/dist/gaia-security/hooks/modules/core/paths.py +160 -0
  336. package/dist/gaia-security/hooks/modules/core/plugin_mode.py +149 -0
  337. package/dist/gaia-security/hooks/modules/core/plugin_setup.py +577 -0
  338. package/dist/gaia-security/hooks/modules/core/state.py +179 -0
  339. package/dist/gaia-security/hooks/modules/core/stdin.py +24 -0
  340. package/dist/gaia-security/hooks/modules/events/__init__.py +1 -0
  341. package/dist/gaia-security/hooks/modules/events/event_writer.py +210 -0
  342. package/dist/gaia-security/hooks/modules/memory/__init__.py +8 -0
  343. package/dist/gaia-security/hooks/modules/memory/episode_writer.py +216 -0
  344. package/dist/gaia-security/hooks/modules/orchestrator/__init__.py +1 -0
  345. package/dist/gaia-security/hooks/modules/orchestrator/delegate_mode.py +122 -0
  346. package/dist/gaia-security/hooks/modules/scanning/__init__.py +8 -0
  347. package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +84 -0
  348. package/dist/gaia-security/hooks/modules/security/__init__.py +120 -0
  349. package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +87 -0
  350. package/dist/gaia-security/hooks/modules/security/approval_constants.py +23 -0
  351. package/dist/gaia-security/hooks/modules/security/approval_grants.py +1638 -0
  352. package/dist/gaia-security/hooks/modules/security/approval_messages.py +71 -0
  353. package/dist/gaia-security/hooks/modules/security/approval_scopes.py +222 -0
  354. package/dist/gaia-security/hooks/modules/security/blocked_commands.py +595 -0
  355. package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +87 -0
  356. package/dist/gaia-security/hooks/modules/security/command_semantics.py +181 -0
  357. package/dist/gaia-security/hooks/modules/security/composition_rules.py +547 -0
  358. package/dist/gaia-security/hooks/modules/security/flag_classifiers.py +873 -0
  359. package/dist/gaia-security/hooks/modules/security/gitops_validator.py +179 -0
  360. package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +1131 -0
  361. package/dist/gaia-security/hooks/modules/security/network_hosts.py +481 -0
  362. package/dist/gaia-security/hooks/modules/security/prompt_validator.py +40 -0
  363. package/dist/gaia-security/hooks/modules/security/shell_unwrapper.py +165 -0
  364. package/dist/gaia-security/hooks/modules/security/tiers.py +196 -0
  365. package/dist/gaia-security/hooks/modules/session/__init__.py +10 -0
  366. package/dist/gaia-security/hooks/modules/session/pending_scanner.py +174 -0
  367. package/dist/gaia-security/hooks/modules/session/session_context_writer.py +100 -0
  368. package/dist/gaia-security/hooks/modules/session/session_event_injector.py +160 -0
  369. package/dist/gaia-security/hooks/modules/session/session_manager.py +31 -0
  370. package/dist/gaia-security/hooks/modules/session/session_registry.py +333 -0
  371. package/dist/gaia-security/hooks/modules/tools/__init__.py +29 -0
  372. package/dist/gaia-security/hooks/modules/tools/bash_validator.py +1008 -0
  373. package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +231 -0
  374. package/dist/gaia-security/hooks/modules/tools/hook_response.py +55 -0
  375. package/dist/gaia-security/hooks/modules/tools/shell_parser.py +227 -0
  376. package/dist/gaia-security/hooks/modules/tools/stage_decomposer.py +315 -0
  377. package/dist/gaia-security/hooks/modules/tools/task_validator.py +294 -0
  378. package/dist/gaia-security/hooks/modules/validation/__init__.py +23 -0
  379. package/dist/gaia-security/hooks/modules/validation/commit_validator.py +380 -0
  380. package/dist/gaia-security/hooks/post_tool_use.py +54 -0
  381. package/dist/gaia-security/hooks/pre_tool_use.py +413 -0
  382. package/dist/gaia-security/hooks/session_end_hook.py +77 -0
  383. package/dist/gaia-security/hooks/session_start.py +81 -0
  384. package/dist/gaia-security/hooks/stop_hook.py +70 -0
  385. package/dist/gaia-security/hooks/user_prompt_submit.py +246 -0
  386. package/dist/gaia-security/settings.json +58 -0
  387. package/git-hooks/commit-msg +41 -0
  388. package/hooks/README.md +100 -0
  389. package/hooks/adapters/__init__.py +52 -0
  390. package/hooks/adapters/base.py +219 -0
  391. package/hooks/adapters/channel.py +17 -0
  392. package/hooks/adapters/claude_code.py +1890 -0
  393. package/hooks/adapters/types.py +194 -0
  394. package/hooks/adapters/utils.py +25 -0
  395. package/hooks/elicitation_result.py +179 -0
  396. package/hooks/hooks.json +84 -0
  397. package/hooks/modules/README.md +189 -0
  398. package/hooks/modules/__init__.py +15 -0
  399. package/hooks/modules/agents/__init__.py +29 -0
  400. package/hooks/modules/agents/contract_validator.py +647 -0
  401. package/hooks/modules/agents/response_contract.py +496 -0
  402. package/hooks/modules/agents/skill_injection_verifier.py +120 -0
  403. package/hooks/modules/agents/state_tracker.py +267 -0
  404. package/hooks/modules/agents/task_info_builder.py +74 -0
  405. package/hooks/modules/agents/transcript_analyzer.py +458 -0
  406. package/hooks/modules/agents/transcript_reader.py +152 -0
  407. package/hooks/modules/audit/__init__.py +28 -0
  408. package/hooks/modules/audit/event_detector.py +168 -0
  409. package/hooks/modules/audit/logger.py +131 -0
  410. package/hooks/modules/audit/metrics.py +134 -0
  411. package/hooks/modules/audit/workflow_auditor.py +611 -0
  412. package/hooks/modules/audit/workflow_recorder.py +296 -0
  413. package/hooks/modules/context/__init__.py +11 -0
  414. package/hooks/modules/context/agentic_loop_detector.py +165 -0
  415. package/hooks/modules/context/anchor_tracker.py +317 -0
  416. package/hooks/modules/context/compact_context_builder.py +218 -0
  417. package/hooks/modules/context/context_freshness.py +145 -0
  418. package/hooks/modules/context/context_injector.py +558 -0
  419. package/hooks/modules/context/context_writer.py +530 -0
  420. package/hooks/modules/context/contracts_loader.py +161 -0
  421. package/hooks/modules/core/__init__.py +40 -0
  422. package/hooks/modules/core/hook_entry.py +78 -0
  423. package/hooks/modules/core/paths.py +160 -0
  424. package/hooks/modules/core/plugin_mode.py +149 -0
  425. package/hooks/modules/core/plugin_setup.py +577 -0
  426. package/hooks/modules/core/state.py +179 -0
  427. package/hooks/modules/core/stdin.py +24 -0
  428. package/hooks/modules/events/__init__.py +1 -0
  429. package/hooks/modules/events/event_writer.py +210 -0
  430. package/hooks/modules/evidence/__init__.py +34 -0
  431. package/hooks/modules/evidence/assertions.py +137 -0
  432. package/hooks/modules/evidence/index_writer.py +57 -0
  433. package/hooks/modules/evidence/loader.py +126 -0
  434. package/hooks/modules/evidence/runner.py +241 -0
  435. package/hooks/modules/memory/__init__.py +8 -0
  436. package/hooks/modules/memory/episode_writer.py +216 -0
  437. package/hooks/modules/orchestrator/__init__.py +1 -0
  438. package/hooks/modules/orchestrator/delegate_mode.py +122 -0
  439. package/hooks/modules/scanning/__init__.py +8 -0
  440. package/hooks/modules/scanning/scan_trigger.py +84 -0
  441. package/hooks/modules/security/__init__.py +120 -0
  442. package/hooks/modules/security/approval_cleanup.py +87 -0
  443. package/hooks/modules/security/approval_constants.py +23 -0
  444. package/hooks/modules/security/approval_grants.py +1638 -0
  445. package/hooks/modules/security/approval_messages.py +71 -0
  446. package/hooks/modules/security/approval_scopes.py +222 -0
  447. package/hooks/modules/security/blocked_commands.py +595 -0
  448. package/hooks/modules/security/blocked_message_formatter.py +87 -0
  449. package/hooks/modules/security/command_semantics.py +181 -0
  450. package/hooks/modules/security/composition_rules.py +547 -0
  451. package/hooks/modules/security/flag_classifiers.py +873 -0
  452. package/hooks/modules/security/gitops_validator.py +179 -0
  453. package/hooks/modules/security/mutative_verbs.py +1131 -0
  454. package/hooks/modules/security/network_hosts.py +481 -0
  455. package/hooks/modules/security/prompt_validator.py +40 -0
  456. package/hooks/modules/security/shell_unwrapper.py +165 -0
  457. package/hooks/modules/security/tiers.py +196 -0
  458. package/hooks/modules/session/__init__.py +10 -0
  459. package/hooks/modules/session/pending_scanner.py +174 -0
  460. package/hooks/modules/session/session_context_writer.py +100 -0
  461. package/hooks/modules/session/session_event_injector.py +160 -0
  462. package/hooks/modules/session/session_manager.py +31 -0
  463. package/hooks/modules/session/session_registry.py +333 -0
  464. package/hooks/modules/tools/__init__.py +29 -0
  465. package/hooks/modules/tools/bash_validator.py +1008 -0
  466. package/hooks/modules/tools/cloud_pipe_validator.py +231 -0
  467. package/hooks/modules/tools/hook_response.py +55 -0
  468. package/hooks/modules/tools/shell_parser.py +227 -0
  469. package/hooks/modules/tools/stage_decomposer.py +315 -0
  470. package/hooks/modules/tools/task_validator.py +294 -0
  471. package/hooks/modules/validation/__init__.py +23 -0
  472. package/hooks/modules/validation/commit_validator.py +380 -0
  473. package/hooks/post_compact.py +43 -0
  474. package/hooks/post_tool_use.py +54 -0
  475. package/hooks/pre_compact.py +60 -0
  476. package/hooks/pre_tool_use.py +413 -0
  477. package/hooks/session_end_hook.py +77 -0
  478. package/hooks/session_start.py +81 -0
  479. package/hooks/stop_hook.py +70 -0
  480. package/hooks/subagent_start.py +71 -0
  481. package/hooks/subagent_stop.py +295 -0
  482. package/hooks/task_completed.py +70 -0
  483. package/hooks/user_prompt_submit.py +246 -0
  484. package/index.js +83 -0
  485. package/package.json +103 -0
  486. package/pyproject.toml +32 -0
  487. package/skills/README.md +158 -0
  488. package/skills/agent-creation/SKILL.md +87 -0
  489. package/skills/agent-creation/examples.md +170 -0
  490. package/skills/agent-creation/reference.md +191 -0
  491. package/skills/agent-protocol/SKILL.md +93 -0
  492. package/skills/agent-protocol/examples.md +223 -0
  493. package/skills/agent-response/SKILL.md +69 -0
  494. package/skills/agentic-loop/SKILL.md +80 -0
  495. package/skills/agentic-loop/reference.md +378 -0
  496. package/skills/blog-writing/SKILL.md +98 -0
  497. package/skills/blog-writing/reference.md +130 -0
  498. package/skills/brief-spec/SKILL.md +185 -0
  499. package/skills/command-execution/SKILL.md +64 -0
  500. package/skills/command-execution/reference.md +83 -0
  501. package/skills/context-updater/SKILL.md +87 -0
  502. package/skills/context-updater/examples.md +71 -0
  503. package/skills/developer-patterns/SKILL.md +50 -0
  504. package/skills/developer-patterns/reference.md +112 -0
  505. package/skills/execution/SKILL.md +99 -0
  506. package/skills/fast-queries/SKILL.md +43 -0
  507. package/skills/gaia-compact/SKILL.md +74 -0
  508. package/skills/gaia-patterns/SKILL.md +108 -0
  509. package/skills/gaia-patterns/reference.md +395 -0
  510. package/skills/gaia-planner/SKILL.md +37 -0
  511. package/skills/gaia-planner/reference.md +107 -0
  512. package/skills/gaia-release/SKILL.md +85 -0
  513. package/skills/gaia-release/reference.md +92 -0
  514. package/skills/gaia-self-check/SKILL.md +114 -0
  515. package/skills/gaia-self-check/reference.md +453 -0
  516. package/skills/gaia-verify/SKILL.md +77 -0
  517. package/skills/gaia-verify/reference.md +80 -0
  518. package/skills/git-conventions/SKILL.md +47 -0
  519. package/skills/gitops-patterns/SKILL.md +60 -0
  520. package/skills/gitops-patterns/reference.md +183 -0
  521. package/skills/gmail-policy/SKILL.md +200 -0
  522. package/skills/gmail-policy/reference.md +150 -0
  523. package/skills/gmail-triage/SKILL.md +100 -0
  524. package/skills/gws-setup/SKILL.md +99 -0
  525. package/skills/gws-setup/reference.md +73 -0
  526. package/skills/investigation/SKILL.md +100 -0
  527. package/skills/memory-curation/SKILL.md +83 -0
  528. package/skills/memory-search/SKILL.md +88 -0
  529. package/skills/orchestrator-approval/SKILL.md +160 -0
  530. package/skills/orchestrator-approval/reference.md +174 -0
  531. package/skills/pending-approvals/SKILL.md +72 -0
  532. package/skills/pending-approvals/reference.md +214 -0
  533. package/skills/readme-writing/SKILL.md +71 -0
  534. package/skills/readme-writing/reference.md +188 -0
  535. package/skills/reference.md +135 -0
  536. package/skills/request-approval/SKILL.md +140 -0
  537. package/skills/request-approval/examples.md +140 -0
  538. package/skills/request-approval/reference.md +57 -0
  539. package/skills/schedule-task/SKILL.md +64 -0
  540. package/skills/schedule-task/reference.md +233 -0
  541. package/skills/security-tiers/SKILL.md +141 -0
  542. package/skills/security-tiers/destructive-commands-reference.md +623 -0
  543. package/skills/security-tiers/reference.md +39 -0
  544. package/skills/session-reflection/SKILL.md +69 -0
  545. package/skills/skill-creation/SKILL.md +92 -0
  546. package/skills/skill-creation/reference.md +29 -0
  547. package/skills/terraform-patterns/SKILL.md +89 -0
  548. package/skills/terraform-patterns/reference.md +93 -0
  549. package/templates/README.md +69 -0
  550. package/templates/managed-settings.template.json +43 -0
  551. package/tools/__init__.py +9 -0
  552. package/tools/agentic-loop/decide-status.py +210 -0
  553. package/tools/agentic-loop/parse-metric.py +106 -0
  554. package/tools/agentic-loop/record-iteration.py +221 -0
  555. package/tools/context/README.md +132 -0
  556. package/tools/context/__init__.py +42 -0
  557. package/tools/context/_paths.py +20 -0
  558. package/tools/context/context_provider.py +721 -0
  559. package/tools/context/context_section_reader.py +342 -0
  560. package/tools/context/deep_merge.py +159 -0
  561. package/tools/context/pending_updates.py +760 -0
  562. package/tools/context/surface_router.py +278 -0
  563. package/tools/fast-queries/README.md +65 -0
  564. package/tools/fast-queries/__init__.py +30 -0
  565. package/tools/fast-queries/appservices/quicktriage_devops_developer.sh +75 -0
  566. package/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +32 -0
  567. package/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +88 -0
  568. package/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +48 -0
  569. package/tools/fast-queries/run_triage.sh +59 -0
  570. package/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +80 -0
  571. package/tools/gaia_simulator/__init__.py +33 -0
  572. package/tools/gaia_simulator/cli.py +354 -0
  573. package/tools/gaia_simulator/extractor.py +457 -0
  574. package/tools/gaia_simulator/reporter.py +258 -0
  575. package/tools/gaia_simulator/routing_simulator.py +334 -0
  576. package/tools/gaia_simulator/runner.py +539 -0
  577. package/tools/gaia_simulator/skills_mapper.py +264 -0
  578. package/tools/memory/README.md +0 -0
  579. package/tools/memory/__init__.py +20 -0
  580. package/tools/memory/backfill_fts5.py +107 -0
  581. package/tools/memory/conflict_detector.py +295 -0
  582. package/tools/memory/episodic.py +1210 -0
  583. package/tools/memory/git_invalidator.py +262 -0
  584. package/tools/memory/paths.py +102 -0
  585. package/tools/memory/scoring.py +193 -0
  586. package/tools/memory/search_store.py +375 -0
  587. package/tools/persist_transcript_analysis.py +85 -0
  588. package/tools/review/__init__.py +1 -0
  589. package/tools/review/review_engine.py +157 -0
  590. package/tools/scan/__init__.py +35 -0
  591. package/tools/scan/config.py +247 -0
  592. package/tools/scan/merge.py +212 -0
  593. package/tools/scan/orchestrator.py +549 -0
  594. package/tools/scan/registry.py +127 -0
  595. package/tools/scan/scanners/__init__.py +18 -0
  596. package/tools/scan/scanners/base.py +137 -0
  597. package/tools/scan/scanners/environment.py +349 -0
  598. package/tools/scan/scanners/git.py +570 -0
  599. package/tools/scan/scanners/infrastructure.py +875 -0
  600. package/tools/scan/scanners/orchestration.py +600 -0
  601. package/tools/scan/scanners/stack.py +1085 -0
  602. package/tools/scan/scanners/tools.py +260 -0
  603. package/tools/scan/setup.py +686 -0
  604. package/tools/scan/tests/__init__.py +1 -0
  605. package/tools/scan/tests/conftest.py +796 -0
  606. package/tools/scan/tests/test_environment.py +323 -0
  607. package/tools/scan/tests/test_git.py +419 -0
  608. package/tools/scan/tests/test_infrastructure.py +382 -0
  609. package/tools/scan/tests/test_integration.py +920 -0
  610. package/tools/scan/tests/test_merge.py +269 -0
  611. package/tools/scan/tests/test_orchestration.py +304 -0
  612. package/tools/scan/tests/test_stack.py +604 -0
  613. package/tools/scan/tests/test_tools.py +349 -0
  614. package/tools/scan/ui.py +624 -0
  615. package/tools/scan/verify.py +270 -0
  616. package/tools/scan/walk.py +118 -0
  617. package/tools/scan/workspace.py +85 -0
  618. package/tools/validation/README.md +244 -0
  619. package/tools/validation/__init__.py +17 -0
  620. package/tools/validation/approval_gate.py +321 -0
  621. package/tools/validation/validate_skills.py +189 -0
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: request-approval
3
+ description: Use when a mutative command was blocked by the hook and you need to request user approval, or when presenting a plan for a T3 operation before executing it
4
+ metadata:
5
+ user-invocable: false
6
+ type: technique
7
+ ---
8
+
9
+ # Request Approval
10
+
11
+ ## Overview
12
+
13
+ This skill does not approve anything -- it teaches the agent how to
14
+ **request** approval when the hook blocks a mutative command. The
15
+ orchestrator and the user own approval; the agent owns the request.
16
+
17
+ The core rule is **attempt first**: do not pre-ask the user for
18
+ permission. Attempt the T3 command, let the hook block it with an
19
+ `approval_id`, then emit `plan_status: "APPROVAL_REQUEST"` with the
20
+ captured `approval_id` in your `approval_request` object. The hook is
21
+ the authoritative gate; the agent only records what happened.
22
+
23
+ Asking the user before attempting produces two failure modes: the
24
+ agent approves itself on a speculative plan the hook would have
25
+ rejected anyway, or the agent blocks on a command that would have
26
+ passed without any friction. Both waste a turn.
27
+
28
+ ## Attempt First Flow
29
+
30
+ ```
31
+ Agent plans a T3 command
32
+ |
33
+ Agent EXECUTES the command (does NOT pre-ask)
34
+ |
35
+ +-- hook allows -> command runs -> continue
36
+ |
37
+ +-- hook blocks with [T3_BLOCKED] + approval_id
38
+ |
39
+ Agent emits plan_status: "APPROVAL_REQUEST"
40
+ with approval_id in approval_request
41
+ |
42
+ Orchestrator presents plan to user
43
+ |
44
+ User approves -> grant activates -> agent retries
45
+ ```
46
+
47
+ ## Approval Request Object
48
+
49
+ Include an `approval_request` object in your `json:contract` with these 6 fields,
50
+ plus `approval_id` when a hook blocked the command:
51
+
52
+ ```json
53
+ "approval_request": {
54
+ "operation": "verb + target",
55
+ "exact_content": "literal command, config, or file change",
56
+ "scope": "files, resources, environments affected",
57
+ "risk_level": "LOW | MEDIUM | HIGH | CRITICAL",
58
+ "rollback": "how to undo if wrong",
59
+ "verification": "how to confirm success after execution",
60
+ "approval_id": "hex from hook deny response (when blocked)"
61
+ }
62
+ ```
63
+
64
+ ### Risk Levels
65
+
66
+ | Level | Criteria |
67
+ |-------|----------|
68
+ | LOW | Single resource, non-prod, no dependencies |
69
+ | MEDIUM | Multiple resources, non-prod, some dependencies |
70
+ | HIGH | Production, dependencies, potential downtime |
71
+ | CRITICAL | Irreversible, data loss possible |
72
+
73
+ ## Status to Emit
74
+
75
+ Always emit `plan_status: "APPROVAL_REQUEST"`. The presence or absence
76
+ of `approval_id` tells the orchestrator which path to take:
77
+
78
+ - With `approval_id` -- the hook blocked; orchestrator activates the grant
79
+ - Without `approval_id` -- plan-first; orchestrator gates on user consent
80
+
81
+ The legacy name `REVIEW` is gone from runtime. If a doc still references
82
+ `REVIEW` as a plan_status literal, it is drift scheduled for cleanup.
83
+
84
+ ## Hook Block Flow
85
+
86
+ When a hook blocks your command the deny response includes an
87
+ `approval_id` -- a one-time hex token tied to exactly this command.
88
+
89
+ The instinct is to retry. That is the wrong move: each retry generates
90
+ a fresh nonce, the old `approval_id` goes stale, and you enter an
91
+ infinite retry-block loop.
92
+
93
+ Instead: emit `APPROVAL_REQUEST` with the `approval_id` in your
94
+ `approval_request`, stop, and wait. When the user approves, the grant
95
+ activates and the orchestrator resumes you to retry.
96
+
97
+ Deny message format:
98
+ ```
99
+ [T3_BLOCKED] This command requires user approval.
100
+ Do NOT retry this command. Report APPROVAL_REQUEST with this approval_id in your json:contract.
101
+ approval_id: <hex>
102
+ ```
103
+
104
+ If you lose the `approval_id`, re-attempt the command once for a fresh one.
105
+
106
+ ## Dispatch mode and foreground/background
107
+
108
+ When a subagent edits `.claude/skills/**`, `.claude/agents/**`, `.claude/commands/**`, briefs, plans, or evidence files, the orchestrator **must pass `mode: acceptEdits`** in the Agent tool dispatch. Without it, CC native intercepts with a permission prompt (foreground) or auto-denies (background).
109
+
110
+ **The `mode` is NOT inherited.** Each dispatch of the Agent tool is independent. If the orchestrator runs with `acceptEdits`, that does not flow to any subagent it invokes. The mode must be specified explicitly in every dispatch that needs it.
111
+
112
+ **The `mode` also does NOT survive a SendMessage resume.** If your original dispatch gave you `mode: bypassPermissions` and you emit APPROVAL_REQUEST mid-task, the orchestrator's SendMessage resume runs in `default`. The Gaia grant activates for the exact blocked command, but CC native re-blocks the next Edit/Write/Bash on `.claude/` because the mode is gone. Consequence for the subagent: when the task is a multi-step bundle on protected paths (e.g., mv on `.claude/**` + Edits in `.claude/project-context/**`), execute every step in the SAME turn the dispatch started. If a hook blocks a step, emit BLOCKED and stop -- do NOT emit APPROVAL_REQUEST mid-task expecting to continue after a SendMessage resume. The orchestrator will re-dispatch fresh.
113
+
114
+ **Foreground vs background is a separate axis.** It governs whether a user-facing interaction (like AskUserQuestion) can display. It does not resolve CC native permission prompts -- those are governed by `mode`.
115
+
116
+ ### Combination table
117
+
118
+ | Case | mode in dispatch | Session type | Expected behavior |
119
+ |------|-----------------|--------------|-------------------|
120
+ | Subagent edits `skills/` with `acceptEdits` | `acceptEdits` | foreground | Edit passes -- no CC native prompt, user sees agent output |
121
+ | Subagent edits `skills/` with default mode | `default` | foreground | CC native prompts the user for consent each Edit/Write |
122
+ | Subagent edits `skills/` with default mode | `default` | background | CC native auto-denies -- agent gets permission error, edit never happens |
123
+ | Subagent edits `skills/` with `acceptEdits` | `acceptEdits` | background | Edit passes -- `mode` covers CC native; background only blocks AskUserQuestion |
124
+ | Subagent tries to edit `.claude/hooks/` | any | any | Gaia `_is_protected()` blocks regardless of mode; approval flow required |
125
+ | Orchestrator edits `skills/` directly (no subagent) | n/a (own session) | foreground | Passes if parent session has `acceptEdits` or CC auto-accepts |
126
+
127
+ The foreground/background distinction matters for approval flows: AskUserQuestion only works in foreground. In background, the orchestrator cannot present interactive prompts -- T3 operations that require user consent must be deferred or routed to a foreground session.
128
+
129
+ For the full `permissionMode` comparison, see `security-tiers/SKILL.md`.
130
+
131
+ ## Anti-Patterns
132
+
133
+ - **Pre-asking the user before attempting** -- violates attempt first; the hook is the gate, not the agent's guess
134
+ - **Retrying after T3_BLOCKED** -- each retry generates a new nonce, making the previous approval_id stale; this loops forever
135
+ - **Missing fields in approval_request** -- the orchestrator presents these fields directly; missing fields mean the user approves blind
136
+ - **Approval fields in prose only** -- the orchestrator parses the JSON object, not your text; prose-only plans bypass the structured flow
137
+ - **Reusing prior approvals** -- grants are scoped to a specific nonce and command; a prior approval does not cover a new operation
138
+ - **Fabricating the approval_id** -- the hook validates against its nonce store; an invented token will never match
139
+ - **Omitting `mode: acceptEdits` from dispatch** -- subagents dispatched without it will hit CC native prompts on `.claude/` writes; in background, this auto-denies silently
140
+ - **Assuming `mode` survives a SendMessage resume** -- it does not; if the task depends on bypass/acceptEdits, pack all steps in one dispatch turn, or emit BLOCKED and let the orchestrator re-dispatch fresh
@@ -0,0 +1,140 @@
1
+ # Approval Request Examples
2
+
3
+ Reference examples for agents. Read on-demand when building your first plan or when unsure about format.
4
+
5
+ ## Example 1: Terraform Apply (GCP)
6
+
7
+ ```markdown
8
+ ## Terraform Apply Plan
9
+
10
+ ### Summary
11
+ - Creating GCP VPC network for production cluster
12
+ - Adds 3 subnetworks across us-east4-a, us-east4-b, us-east4-c
13
+ - No existing resources affected
14
+
15
+ ### Changes Proposed
16
+
17
+ **Resources to CREATE:**
18
+ - `google_compute_network.prod-network`: VPC in auto-subnet mode disabled
19
+ - `google_compute_subnetwork.prod-subnet-a`: 10.0.1.0/24 in us-east4-a
20
+ - `google_compute_subnetwork.prod-subnet-b`: 10.0.2.0/24 in us-east4-b
21
+ - `google_compute_subnetwork.prod-subnet-c`: 10.0.3.0/24 in us-east4-c
22
+
23
+ **Resources to MODIFY:** None
24
+ **Resources to DELETE:** None
25
+
26
+ ### Validation Results
27
+
28
+ **Dry-run status:**
29
+ - `terragrunt plan` - No errors, 4 to add, 0 to change, 0 to destroy
30
+ - `terragrunt hclfmt --check` - No formatting issues
31
+ - `terraform validate` - Success
32
+
33
+ **Dependencies verified:**
34
+ - GCP project [project-id]: accessible
35
+ - No CIDR conflicts with existing networks
36
+
37
+ ### Risk Assessment
38
+
39
+ **Risk Level:** MEDIUM
40
+
41
+ **Potential Risks:**
42
+ 1. CIDR overlap with existing VPC networks
43
+ - Mitigation: Verified no overlaps via `gcloud compute networks list`
44
+ 2. Subnet creation timeout
45
+ - Mitigation: Timeout set to 300s, idempotent -- safe to retry
46
+
47
+ **Rollback Plan:**
48
+ - If creation fails: `terragrunt destroy --terragrunt-working-dir "/abs/path/to/terraform/vpc"`
49
+ - Recovery time: ~5 minutes
50
+
51
+ ### Execution Steps
52
+
53
+ When approved, will execute:
54
+ 1. `git add [terraform_vpc_path]/`
55
+ 2. `git commit -m "feat(infra): add production VPC network"`
56
+ 3. `git push origin main`
57
+ 4. `terragrunt apply -auto-approve --terragrunt-working-dir "/abs/path/to/terraform/vpc"`
58
+
59
+ ### Verification Criteria
60
+
61
+ - `gcloud compute networks describe prod-network --project=[project-id]` -> `status: ACTIVE`
62
+ - `gcloud compute networks subnets list --filter="network:prod-network" --project=[project-id]` -> 3 subnets listed
63
+
64
+ ### Files Affected
65
+
66
+ **Git changes:**
67
+ - Added: `[terraform_vpc_path]/terragrunt.hcl`
68
+ - Added: `[terraform_vpc_path]/main.tf`
69
+
70
+ ## Approval Required
71
+
72
+ **Approval Code:** `NONCE:<hex from hook block response>`
73
+ **Operation:** terragrunt apply
74
+ **Environment:** prod
75
+ **Risk Level:** MEDIUM
76
+ ```
77
+
78
+ ## Example 2: GitOps Deployment
79
+
80
+ ```markdown
81
+ ## GitOps Deployment Plan
82
+
83
+ ### Summary
84
+ - Updating graphql-server image to v1.0.180
85
+ - No configuration changes
86
+ - Flux will auto-reconcile in ~1 minute
87
+
88
+ ### Changes Proposed
89
+
90
+ **HelmRelease to MODIFY:**
91
+ - `graphql-server` in namespace `common`
92
+ - Image: ghcr.io/vtr/graphql-server:v1.0.176 -> v1.0.180
93
+ - No other changes
94
+
95
+ ### Validation Results
96
+
97
+ **Dry-run status:**
98
+ - `kubectl apply --dry-run=client` - Valid manifest
99
+ - YAML syntax check - Passed
100
+ - Image exists in registry - Verified
101
+
102
+ ### Risk Assessment
103
+
104
+ **Risk Level:** LOW
105
+
106
+ **Potential Risks:**
107
+ 1. New image might have bugs
108
+ - Mitigation: Tested in dev cluster, all tests passed
109
+ 2. Pod restart might cause brief downtime
110
+ - Mitigation: RollingUpdate strategy, 2 replicas ensure availability
111
+
112
+ **Rollback Plan:**
113
+ - If deployment fails: `git revert` + `flux reconcile`
114
+ - Recovery time: ~2 minutes
115
+
116
+ ### Execution Steps
117
+
118
+ When approved, will execute:
119
+ 1. `git add gitops/clusters/prod-digital-eks/common/graphql-server.yaml`
120
+ 2. `git commit -m "chore(graphql): update to v1.0.180"`
121
+ 3. `git push origin main`
122
+ 4. Flux auto-reconciles in ~1 minute (or force: `flux reconcile helmrelease graphql-server -n common --timeout=90s`)
123
+
124
+ ### Verification Criteria
125
+
126
+ - `kubectl get helmrelease graphql-server -n common --request-timeout=30s` -> `READY=True`, revision contains `v1.0.180`
127
+ - `kubectl get pods -n common -l app=graphql-server --request-timeout=30s` -> all pods `Running`
128
+
129
+ ### Files Affected
130
+
131
+ **Git changes:**
132
+ - Modified: `gitops/clusters/prod-digital-eks/common/graphql-server.yaml`
133
+
134
+ ## Approval Required
135
+
136
+ **Approval Code:** `NONCE:<hex from hook block response>`
137
+ **Operation:** git push + flux reconcile
138
+ **Environment:** prod
139
+ **Risk Level:** LOW
140
+ ```
@@ -0,0 +1,57 @@
1
+ # Approval Request Plan Template
2
+
3
+ Use this template when requesting user approval for a T3 operation.
4
+ The fields below map directly to the `approval_request` object in your `json:contract` block.
5
+
6
+ ```markdown
7
+ ## Deployment Plan
8
+
9
+ ### Summary (3-5 bullets)
10
+ - What will be changed
11
+ - Why this change is needed
12
+ - What the expected outcome is
13
+
14
+ ### Changes Proposed
15
+
16
+ **Resources to CREATE:**
17
+ - [Resource]: [Description]
18
+
19
+ **Resources to MODIFY:**
20
+ - [Resource]: [What changes] (before -> after)
21
+
22
+ **Resources to DELETE:**
23
+ - [Resource]: [Why deletion]
24
+
25
+ ### Validation Results
26
+
27
+ **Dry-run status:**
28
+ - `[simulation command]` - [result summary]
29
+
30
+ **Dependencies verified:**
31
+ - [Dependency]: Available
32
+
33
+ ### approval_request fields
34
+
35
+ These 6 fields MUST appear in the `approval_request` object of your `json:contract`:
36
+
37
+ | Field | Example value |
38
+ |-------|---------------|
39
+ | `operation` | `"apply Terraform changes to dev VPC"` |
40
+ | `exact_content` | `"terraform -chdir=/infra/dev apply -auto-approve"` |
41
+ | `scope` | `"infra/dev/vpc.tf, infra/dev/subnets.tf -- dev environment only"` |
42
+ | `risk_level` | `"MEDIUM"` |
43
+ | `rollback` | `"terraform -chdir=/infra/dev apply -target=module.vpc -var='cidr=10.0.0.0/16'"` |
44
+ | `verification` | `"terraform -chdir=/infra/dev output vpc_id -- expect vpc-xxx"` |
45
+
46
+ When a hook blocked the command (attempt first path), also include:
47
+ | Field | Example value |
48
+ |-------|---------------|
49
+ | `approval_id` | `"a1b2c3d4e5f6..."` (hex from hook deny response) |
50
+
51
+ ### Files Affected
52
+
53
+ **Git changes:**
54
+ - Modified: [files]
55
+ - Added: [files]
56
+ - Deleted: [files]
57
+ ```
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: schedule-task
3
+ description: Reference material for dispatch parameter extraction and prompt templates. The orchestrator's dispatch execution section covers the core principles -- load this skill for detailed templates and examples.
4
+ metadata:
5
+ user-invocable: false
6
+ type: reference
7
+ ---
8
+
9
+ # Schedule Task
10
+
11
+ On-demand reference for parameter extraction, prompt templates, and task
12
+ classification details. The orchestrator's "Dispatch execution" identity
13
+ section covers when and how to dispatch. Load this skill when you need
14
+ the exact templates or extraction patterns.
15
+
16
+ ## Task classification
17
+
18
+ | Measurable? | Improvable? | Type | Action |
19
+ |-------------|-------------|------|--------|
20
+ | Yes | Yes (iterative) | agentic-loop | Build loop prompt with all params |
21
+ | Yes | No (pass/fail) | simple-task | Build focused prompt, no loop |
22
+ | Creatable | Yes | two-phase | Phase 1: create eval. Phase 2: agentic-loop |
23
+ | No | N/A | manual-review | Warn user, offer alternatives |
24
+
25
+ ## Parameter extraction (agentic-loop only)
26
+
27
+ Required: `goal`, `eval_command`, `metric`, `direction`, `threshold`
28
+ Optional: `max_iterations` (default 20), `files_in_scope`, `branch` prefix
29
+
30
+ If any required param is missing -- ASK the user. Do not guess eval commands
31
+ or thresholds. See `reference.md` for extraction examples and confirmation
32
+ patterns.
33
+
34
+ ## Prompt templates
35
+
36
+ For agentic-loop tasks, use the template in `reference.md`. The prompt MUST
37
+ include the `Carga la skill agentic-loop` header -- this triggers skill
38
+ injection in the agent.
39
+
40
+ For simple tasks, build a focused objective prompt without the loop header.
41
+ For two-phase tasks, dispatch Phase 1 first (create eval), then Phase 2 (loop).
42
+
43
+ ## Scheduling with CronCreate
44
+
45
+ When the user wants recurring execution ("cada noche", "cron", "schedule"):
46
+ - Use `CronCreate` with the built prompt
47
+ - One-shot: `recurring=false`
48
+ - Recurring: `recurring=true` -- warn about 7-day limit
49
+ - See `reference.md` for cron expression examples
50
+
51
+ ## Reading loop_status
52
+
53
+ When an agent returns `loop_status` in its `json:contract`:
54
+ - `"iterating"` -- agent still working, wait
55
+ - `"threshold_reached"` / `"complete"` -- present: baseline -> final in N iterations
56
+ - `"stopped"` -- present what was achieved + why it stopped
57
+ - `"blocked"` -- present blocker, ask user
58
+
59
+ ## Anti-Patterns
60
+
61
+ - Dispatching a loop without `eval_command` -- the agent cannot measure progress
62
+ - Including loop protocol details in the dispatch prompt -- `agentic-loop` skill handles that
63
+ - Micromanaging the agent's iterations -- dispatch the goal, not the steps
64
+ - Guessing thresholds the user did not provide
@@ -0,0 +1,233 @@
1
+ # Schedule Task -- Reference
2
+
3
+ Prompt templates, parameter extraction examples, agent selection guide, and scheduling patterns. Read on-demand when dispatching tasks.
4
+
5
+ ## Prompt Templates
6
+
7
+ ### Agentic Loop
8
+
9
+ ```
10
+ ## Agentic Loop Task
11
+
12
+ Carga la skill agentic-loop y sigue su protocolo.
13
+
14
+ goal: {goal}
15
+ eval_command: {eval_command}
16
+ metric: {metric}
17
+ direction: {direction}
18
+ threshold: {threshold}
19
+ max_iterations: {max_iterations}
20
+ files_in_scope: {files}
21
+ branch: {branch_prefix}-{date}
22
+ ```
23
+
24
+ The `Carga la skill agentic-loop` line triggers skill injection -- it must appear exactly as written. The agent receives the `agentic-loop` skill which governs the entire iteration protocol. Do not duplicate any loop instructions in this prompt.
25
+
26
+ ### Simple Task
27
+
28
+ ```
29
+ ## Task
30
+
31
+ {goal}
32
+
33
+ Expected outcome: {what success looks like}
34
+ Files in scope: {files}
35
+ Verification: {how to confirm it worked -- test command, expected output, etc.}
36
+ ```
37
+
38
+ No loop header, no iteration parameters. The agent executes once and verifies.
39
+
40
+ ### Two-Phase
41
+
42
+ **Phase 1 prompt (create eval):**
43
+ ```
44
+ ## Create Evaluation Script
45
+
46
+ Goal: Create a repeatable eval command for measuring {metric}.
47
+ The command must print a line matching: METRIC {metric_name}={number}
48
+
49
+ Context: {what the metric measures and why}
50
+ Files to evaluate: {files}
51
+ Output: A script or command that can run repeatedly and produce consistent measurements.
52
+ ```
53
+
54
+ **Phase 2 prompt (after Phase 1 completes):**
55
+ Use the agentic-loop template above, with `eval_command` set to whatever Phase 1 produced.
56
+
57
+ ## Parameter Extraction Examples
58
+
59
+ Natural language contains the parameters -- extract them, do not invent them.
60
+
61
+ | User says | Extracted parameters |
62
+ |-----------|---------------------|
63
+ | "Mejora los tests hasta que pasen al 95%" | goal: improve test pass rate, metric: pass_rate, direction: higher, threshold: 95, eval_command: ASK |
64
+ | "Reduce el bundle size a menos de 200kb" | goal: reduce bundle size, metric: bundle_size_kb, direction: lower, threshold: 200, eval_command: ASK |
65
+ | "Optimiza el tiempo de respuesta del API" | goal: optimize API response time, metric: response_time_ms, direction: lower, threshold: ASK, eval_command: ASK |
66
+ | "Trabaja en esto hasta que no haya errores de lint" | goal: fix all lint errors, metric: error_count, direction: lower, threshold: 0, eval_command: ASK (likely `npm run lint`) |
67
+ | "Cada noche corre los tests y avísame si fallan" | type: simple-task + schedule, recurring: true, cron: nightly |
68
+ | "Itera sobre el CSS hasta que Lighthouse de 90+" | goal: improve Lighthouse score, metric: performance, direction: higher, threshold: 90, eval_command: ASK |
69
+
70
+ When `ASK` appears, the parameter must be confirmed with the user before dispatch.
71
+
72
+ ### Confirming missing parameters
73
+
74
+ Present what you extracted and what is missing:
75
+
76
+ ```
77
+ Entendido -- quieres mejorar el pass rate de tests hasta 95%.
78
+
79
+ Para armar el loop necesito:
80
+ - eval_command: el comando que corre los tests y reporta el porcentaje
81
+ (e.g., `pytest tests/ --tb=short 2>&1 | python parse_results.py`)
82
+ - files_in_scope: que archivos puede modificar el agente?
83
+
84
+ Con eso lanzo el loop.
85
+ ```
86
+
87
+ ## Agent Selection Guide
88
+
89
+ Match by the FILES the agent will modify, not by the topic of conversation.
90
+
91
+ | If the agent needs to modify... | Route to |
92
+ |---------------------------------|----------|
93
+ | `hooks/`, `modules/`, `adapters/`, `skills/`, `agents/`, `config/surface-routing.json` | gaia-system |
94
+ | `src/`, `lib/`, `tests/`, `package.json`, `Dockerfile`, `.github/workflows/` | developer |
95
+ | Kubernetes manifests, `HelmRelease`, `Kustomization`, Flux configs | gitops-operator |
96
+ | `.tf`, `.hcl`, `terragrunt.hcl`, Terraform modules | terraform-architect |
97
+ | Nothing -- inspect logs, pods, cloud resources | cloud-troubleshooter |
98
+
99
+ When files span two domains (e.g., app code + K8s manifest), dispatch to both agents in parallel with separate prompts.
100
+
101
+ ## CronCreate Examples
102
+
103
+ ### Nightly test run
104
+
105
+ ```
106
+ CronCreate:
107
+ schedule: "0 3 * * *" # 3 AM daily
108
+ prompt: "Run pytest on /path/to/project and report results. If any tests fail, summarize the failures."
109
+ recurring: true
110
+ ```
111
+
112
+ ### Weekly optimization loop
113
+
114
+ ```
115
+ CronCreate:
116
+ schedule: "0 2 * * 1" # 2 AM every Monday
117
+ prompt: |
118
+ ## Agentic Loop Task
119
+
120
+ Carga la skill agentic-loop y sigue su protocolo.
121
+
122
+ goal: Improve test coverage
123
+ eval_command: pytest --cov=src --cov-report=term | python parse_coverage.py
124
+ metric: coverage_pct
125
+ direction: higher
126
+ threshold: 90
127
+ max_iterations: 15
128
+ files_in_scope: src/, tests/
129
+ branch: improve/coverage-{date}
130
+ recurring: true
131
+ ```
132
+
133
+ ### One-shot scheduled task
134
+
135
+ ```
136
+ CronCreate:
137
+ schedule: "30 22 * * *" # Tonight at 10:30 PM
138
+ prompt: "Run the full integration test suite and create a summary report."
139
+ recurring: false
140
+ ```
141
+
142
+ ### Common cron expressions
143
+
144
+ | Expression | Meaning |
145
+ |-----------|---------|
146
+ | `0 3 * * *` | Every day at 3 AM |
147
+ | `0 2 * * 1` | Every Monday at 2 AM |
148
+ | `0 */6 * * *` | Every 6 hours |
149
+ | `0 9 * * 1-5` | Weekdays at 9 AM |
150
+ | `0 0 1 * *` | First of each month at midnight |
151
+
152
+ **7-day limit warning:** Recurring cron jobs have a 7-day maximum lifetime. After 7 days, the schedule expires and must be recreated. Always inform the user of this constraint when setting up recurring tasks.
153
+
154
+ ## Example Conversations
155
+
156
+ ### Agentic loop dispatch
157
+
158
+ **User:** "Mejora la cobertura de tests hasta 90%"
159
+
160
+ **Classification:**
161
+ - Measurable? Yes (coverage tools exist)
162
+ - Improvable? Yes (can add tests iteratively)
163
+ - Type: agentic-loop
164
+
165
+ **Missing params:** eval_command, files_in_scope
166
+
167
+ **Orchestrator response:**
168
+ "Para lanzar el loop de mejora necesito saber:
169
+ 1. El comando que mide cobertura (e.g., `pytest --cov=src`)
170
+ 2. Que archivos puede tocar el agente?
171
+ Con eso arranco."
172
+
173
+ **User:** "pytest --cov=src --cov-report=term, puede tocar src/ y tests/"
174
+
175
+ **Dispatch:** Agent(developer) with agentic-loop prompt, all params filled.
176
+
177
+ ### Simple task dispatch
178
+
179
+ **User:** "Corre los tests y dime si pasan"
180
+
181
+ **Classification:**
182
+ - Measurable? Yes
183
+ - Improvable? No (pass/fail, no iteration)
184
+ - Type: simple-task
185
+
186
+ **Dispatch:** Agent(developer) with simple-task prompt: "Run the test suite and report results."
187
+
188
+ ### Two-phase dispatch
189
+
190
+ **User:** "Quiero que el API responda en menos de 200ms pero no tengo benchmarks"
191
+
192
+ **Classification:**
193
+ - Measurable? Creatable (need to build a benchmark first)
194
+ - Improvable? Yes
195
+ - Type: two-phase
196
+
197
+ **Phase 1 dispatch:** Agent(developer) -- "Create a benchmark script that measures API response time and outputs METRIC response_time_ms={number}"
198
+
199
+ **Phase 2 dispatch (after Phase 1):** Agent(developer) with agentic-loop prompt using the eval_command from Phase 1.
200
+
201
+ ### Manual review warning
202
+
203
+ **User:** "Mejora la UX del dashboard"
204
+
205
+ **Classification:**
206
+ - Measurable? No (subjective, no automated metric)
207
+ - Type: manual-review
208
+
209
+ **Orchestrator response:**
210
+ "La UX no se puede medir automaticamente -- un loop no puede evaluar mejoras subjetivas. Alternativas:
211
+ 1. Si hay metricas proxy (Lighthouse accessibility, load time), puedo iterar sobre esas
212
+ 2. Puedo hacer cambios puntuales y presentartelos para review manual
213
+ 3. Si defines criterios especificos (e.g., 'reduce clicks to complete X'), puedo medir eso
214
+
215
+ Cual prefieres?"
216
+
217
+ ### Scheduled task
218
+
219
+ **User:** "Cada noche corre los tests y avísame si hay fallos"
220
+
221
+ **Classification:**
222
+ - Type: simple-task + schedule
223
+ - Recurring: true
224
+
225
+ **Dispatch:**
226
+ ```
227
+ CronCreate:
228
+ schedule: "0 3 * * *"
229
+ prompt: "Run pytest on /path/to/project. Report any failures with file, test name, and error message."
230
+ recurring: true
231
+ ```
232
+
233
+ **Orchestrator confirms:** "Listo -- programado para las 3 AM cada noche. Recuerda que los cron jobs expiran a los 7 dias y hay que renovarlos."