@jaguilar87/gaia 5.0.0-rc1

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 (609) 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 +1212 -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 +237 -0
  16. package/agents/gaia-planner.md +53 -0
  17. package/agents/gaia-system.md +70 -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 +628 -0
  26. package/bin/cli/history.py +305 -0
  27. package/bin/cli/memory.py +464 -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 +816 -0
  45. package/bin/pre-publish-validate.js +610 -0
  46. package/bin/python-detect.js +60 -0
  47. package/commands/README.md +64 -0
  48. package/commands/gaia.md +37 -0
  49. package/commands/scan-project.md +67 -0
  50. package/config/README.md +71 -0
  51. package/config/cloud/aws.json +134 -0
  52. package/config/cloud/gcp.json +139 -0
  53. package/config/context-contracts.json +158 -0
  54. package/config/crons-schema.md +81 -0
  55. package/config/git_standards.json +72 -0
  56. package/config/surface-routing.json +421 -0
  57. package/config/universal-rules.json +102 -0
  58. package/dist/gaia-ops/.claude-plugin/plugin.json +24 -0
  59. package/dist/gaia-ops/README.md +80 -0
  60. package/dist/gaia-ops/agents/cloud-troubleshooter.md +73 -0
  61. package/dist/gaia-ops/agents/developer.md +65 -0
  62. package/dist/gaia-ops/agents/gaia-operator.md +64 -0
  63. package/dist/gaia-ops/agents/gaia-orchestrator.md +237 -0
  64. package/dist/gaia-ops/agents/gaia-planner.md +53 -0
  65. package/dist/gaia-ops/agents/gaia-system.md +70 -0
  66. package/dist/gaia-ops/agents/gitops-operator.md +61 -0
  67. package/dist/gaia-ops/agents/terraform-architect.md +63 -0
  68. package/dist/gaia-ops/commands/gaia.md +37 -0
  69. package/dist/gaia-ops/config/README.md +71 -0
  70. package/dist/gaia-ops/config/cloud/aws.json +134 -0
  71. package/dist/gaia-ops/config/cloud/gcp.json +139 -0
  72. package/dist/gaia-ops/config/context-contracts.json +158 -0
  73. package/dist/gaia-ops/config/crons-schema.md +81 -0
  74. package/dist/gaia-ops/config/git_standards.json +72 -0
  75. package/dist/gaia-ops/config/surface-routing.json +421 -0
  76. package/dist/gaia-ops/config/universal-rules.json +102 -0
  77. package/dist/gaia-ops/hooks/adapters/__init__.py +52 -0
  78. package/dist/gaia-ops/hooks/adapters/base.py +219 -0
  79. package/dist/gaia-ops/hooks/adapters/channel.py +17 -0
  80. package/dist/gaia-ops/hooks/adapters/claude_code.py +1890 -0
  81. package/dist/gaia-ops/hooks/adapters/types.py +194 -0
  82. package/dist/gaia-ops/hooks/adapters/utils.py +25 -0
  83. package/dist/gaia-ops/hooks/hooks.json +163 -0
  84. package/dist/gaia-ops/hooks/modules/__init__.py +15 -0
  85. package/dist/gaia-ops/hooks/modules/agents/__init__.py +29 -0
  86. package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +647 -0
  87. package/dist/gaia-ops/hooks/modules/agents/response_contract.py +496 -0
  88. package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +120 -0
  89. package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +267 -0
  90. package/dist/gaia-ops/hooks/modules/agents/task_info_builder.py +74 -0
  91. package/dist/gaia-ops/hooks/modules/agents/transcript_analyzer.py +458 -0
  92. package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +152 -0
  93. package/dist/gaia-ops/hooks/modules/audit/__init__.py +28 -0
  94. package/dist/gaia-ops/hooks/modules/audit/event_detector.py +168 -0
  95. package/dist/gaia-ops/hooks/modules/audit/logger.py +131 -0
  96. package/dist/gaia-ops/hooks/modules/audit/metrics.py +134 -0
  97. package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +611 -0
  98. package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +296 -0
  99. package/dist/gaia-ops/hooks/modules/context/__init__.py +11 -0
  100. package/dist/gaia-ops/hooks/modules/context/agentic_loop_detector.py +165 -0
  101. package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +317 -0
  102. package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +218 -0
  103. package/dist/gaia-ops/hooks/modules/context/context_freshness.py +145 -0
  104. package/dist/gaia-ops/hooks/modules/context/context_injector.py +558 -0
  105. package/dist/gaia-ops/hooks/modules/context/context_writer.py +530 -0
  106. package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +161 -0
  107. package/dist/gaia-ops/hooks/modules/core/__init__.py +40 -0
  108. package/dist/gaia-ops/hooks/modules/core/hook_entry.py +78 -0
  109. package/dist/gaia-ops/hooks/modules/core/paths.py +160 -0
  110. package/dist/gaia-ops/hooks/modules/core/plugin_mode.py +149 -0
  111. package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +577 -0
  112. package/dist/gaia-ops/hooks/modules/core/state.py +179 -0
  113. package/dist/gaia-ops/hooks/modules/core/stdin.py +24 -0
  114. package/dist/gaia-ops/hooks/modules/events/__init__.py +1 -0
  115. package/dist/gaia-ops/hooks/modules/events/event_writer.py +210 -0
  116. package/dist/gaia-ops/hooks/modules/memory/__init__.py +8 -0
  117. package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +216 -0
  118. package/dist/gaia-ops/hooks/modules/orchestrator/__init__.py +1 -0
  119. package/dist/gaia-ops/hooks/modules/orchestrator/delegate_mode.py +122 -0
  120. package/dist/gaia-ops/hooks/modules/scanning/__init__.py +8 -0
  121. package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +84 -0
  122. package/dist/gaia-ops/hooks/modules/security/__init__.py +120 -0
  123. package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +87 -0
  124. package/dist/gaia-ops/hooks/modules/security/approval_constants.py +23 -0
  125. package/dist/gaia-ops/hooks/modules/security/approval_grants.py +1638 -0
  126. package/dist/gaia-ops/hooks/modules/security/approval_messages.py +71 -0
  127. package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +222 -0
  128. package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +595 -0
  129. package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +87 -0
  130. package/dist/gaia-ops/hooks/modules/security/command_semantics.py +181 -0
  131. package/dist/gaia-ops/hooks/modules/security/composition_rules.py +547 -0
  132. package/dist/gaia-ops/hooks/modules/security/flag_classifiers.py +873 -0
  133. package/dist/gaia-ops/hooks/modules/security/gitops_validator.py +179 -0
  134. package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +1131 -0
  135. package/dist/gaia-ops/hooks/modules/security/network_hosts.py +481 -0
  136. package/dist/gaia-ops/hooks/modules/security/prompt_validator.py +40 -0
  137. package/dist/gaia-ops/hooks/modules/security/shell_unwrapper.py +165 -0
  138. package/dist/gaia-ops/hooks/modules/security/tiers.py +196 -0
  139. package/dist/gaia-ops/hooks/modules/session/__init__.py +10 -0
  140. package/dist/gaia-ops/hooks/modules/session/pending_scanner.py +174 -0
  141. package/dist/gaia-ops/hooks/modules/session/session_context_writer.py +100 -0
  142. package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +160 -0
  143. package/dist/gaia-ops/hooks/modules/session/session_manager.py +31 -0
  144. package/dist/gaia-ops/hooks/modules/session/session_registry.py +232 -0
  145. package/dist/gaia-ops/hooks/modules/tools/__init__.py +29 -0
  146. package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +1008 -0
  147. package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +231 -0
  148. package/dist/gaia-ops/hooks/modules/tools/hook_response.py +55 -0
  149. package/dist/gaia-ops/hooks/modules/tools/shell_parser.py +227 -0
  150. package/dist/gaia-ops/hooks/modules/tools/stage_decomposer.py +315 -0
  151. package/dist/gaia-ops/hooks/modules/tools/task_validator.py +294 -0
  152. package/dist/gaia-ops/hooks/modules/validation/__init__.py +23 -0
  153. package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +380 -0
  154. package/dist/gaia-ops/hooks/post_compact.py +43 -0
  155. package/dist/gaia-ops/hooks/post_tool_use.py +54 -0
  156. package/dist/gaia-ops/hooks/pre_compact.py +60 -0
  157. package/dist/gaia-ops/hooks/pre_tool_use.py +413 -0
  158. package/dist/gaia-ops/hooks/session_start.py +81 -0
  159. package/dist/gaia-ops/hooks/stop_hook.py +82 -0
  160. package/dist/gaia-ops/hooks/subagent_start.py +71 -0
  161. package/dist/gaia-ops/hooks/subagent_stop.py +295 -0
  162. package/dist/gaia-ops/hooks/task_completed.py +70 -0
  163. package/dist/gaia-ops/hooks/user_prompt_submit.py +246 -0
  164. package/dist/gaia-ops/settings.json +72 -0
  165. package/dist/gaia-ops/skills/README.md +154 -0
  166. package/dist/gaia-ops/skills/agent-protocol/SKILL.md +93 -0
  167. package/dist/gaia-ops/skills/agent-protocol/examples.md +223 -0
  168. package/dist/gaia-ops/skills/agent-response/SKILL.md +69 -0
  169. package/dist/gaia-ops/skills/agentic-loop/SKILL.md +80 -0
  170. package/dist/gaia-ops/skills/agentic-loop/reference.md +378 -0
  171. package/dist/gaia-ops/skills/blog-writing/SKILL.md +98 -0
  172. package/dist/gaia-ops/skills/blog-writing/reference.md +130 -0
  173. package/dist/gaia-ops/skills/brief-spec/SKILL.md +182 -0
  174. package/dist/gaia-ops/skills/command-execution/SKILL.md +64 -0
  175. package/dist/gaia-ops/skills/command-execution/reference.md +83 -0
  176. package/dist/gaia-ops/skills/context-updater/SKILL.md +87 -0
  177. package/dist/gaia-ops/skills/context-updater/examples.md +71 -0
  178. package/dist/gaia-ops/skills/developer-patterns/SKILL.md +50 -0
  179. package/dist/gaia-ops/skills/developer-patterns/reference.md +112 -0
  180. package/dist/gaia-ops/skills/execution/SKILL.md +99 -0
  181. package/dist/gaia-ops/skills/fast-queries/SKILL.md +43 -0
  182. package/dist/gaia-ops/skills/gaia-compact/SKILL.md +74 -0
  183. package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +108 -0
  184. package/dist/gaia-ops/skills/gaia-patterns/reference.md +395 -0
  185. package/dist/gaia-ops/skills/gaia-planner/SKILL.md +37 -0
  186. package/dist/gaia-ops/skills/gaia-planner/reference.md +107 -0
  187. package/dist/gaia-ops/skills/gaia-release/SKILL.md +82 -0
  188. package/dist/gaia-ops/skills/gaia-release/reference.md +102 -0
  189. package/dist/gaia-ops/skills/gaia-self-check/SKILL.md +114 -0
  190. package/dist/gaia-ops/skills/gaia-self-check/reference.md +453 -0
  191. package/dist/gaia-ops/skills/gaia-verify/SKILL.md +77 -0
  192. package/dist/gaia-ops/skills/gaia-verify/reference.md +80 -0
  193. package/dist/gaia-ops/skills/git-conventions/SKILL.md +47 -0
  194. package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +60 -0
  195. package/dist/gaia-ops/skills/gitops-patterns/reference.md +183 -0
  196. package/dist/gaia-ops/skills/gmail-policy/SKILL.md +200 -0
  197. package/dist/gaia-ops/skills/gmail-policy/reference.md +150 -0
  198. package/dist/gaia-ops/skills/gmail-triage/SKILL.md +100 -0
  199. package/dist/gaia-ops/skills/gws-setup/SKILL.md +99 -0
  200. package/dist/gaia-ops/skills/gws-setup/reference.md +73 -0
  201. package/dist/gaia-ops/skills/investigation/SKILL.md +100 -0
  202. package/dist/gaia-ops/skills/memory-curation/SKILL.md +83 -0
  203. package/dist/gaia-ops/skills/memory-search/SKILL.md +88 -0
  204. package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +160 -0
  205. package/dist/gaia-ops/skills/orchestrator-approval/reference.md +174 -0
  206. package/dist/gaia-ops/skills/pending-approvals/SKILL.md +72 -0
  207. package/dist/gaia-ops/skills/pending-approvals/reference.md +214 -0
  208. package/dist/gaia-ops/skills/readme-writing/SKILL.md +71 -0
  209. package/dist/gaia-ops/skills/readme-writing/reference.md +188 -0
  210. package/dist/gaia-ops/skills/reference.md +135 -0
  211. package/dist/gaia-ops/skills/request-approval/SKILL.md +140 -0
  212. package/dist/gaia-ops/skills/request-approval/examples.md +140 -0
  213. package/dist/gaia-ops/skills/request-approval/reference.md +57 -0
  214. package/dist/gaia-ops/skills/schedule-task/SKILL.md +64 -0
  215. package/dist/gaia-ops/skills/schedule-task/reference.md +233 -0
  216. package/dist/gaia-ops/skills/security-tiers/SKILL.md +141 -0
  217. package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +623 -0
  218. package/dist/gaia-ops/skills/security-tiers/reference.md +39 -0
  219. package/dist/gaia-ops/skills/skill-creation/SKILL.md +92 -0
  220. package/dist/gaia-ops/skills/skill-creation/reference.md +29 -0
  221. package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +89 -0
  222. package/dist/gaia-ops/skills/terraform-patterns/reference.md +93 -0
  223. package/dist/gaia-ops/tools/__init__.py +9 -0
  224. package/dist/gaia-ops/tools/agentic-loop/decide-status.py +210 -0
  225. package/dist/gaia-ops/tools/agentic-loop/parse-metric.py +106 -0
  226. package/dist/gaia-ops/tools/agentic-loop/record-iteration.py +221 -0
  227. package/dist/gaia-ops/tools/context/README.md +132 -0
  228. package/dist/gaia-ops/tools/context/__init__.py +42 -0
  229. package/dist/gaia-ops/tools/context/_paths.py +20 -0
  230. package/dist/gaia-ops/tools/context/context_provider.py +721 -0
  231. package/dist/gaia-ops/tools/context/context_section_reader.py +342 -0
  232. package/dist/gaia-ops/tools/context/deep_merge.py +159 -0
  233. package/dist/gaia-ops/tools/context/pending_updates.py +760 -0
  234. package/dist/gaia-ops/tools/context/surface_router.py +278 -0
  235. package/dist/gaia-ops/tools/fast-queries/README.md +65 -0
  236. package/dist/gaia-ops/tools/fast-queries/__init__.py +30 -0
  237. package/dist/gaia-ops/tools/fast-queries/appservices/quicktriage_devops_developer.sh +75 -0
  238. package/dist/gaia-ops/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +32 -0
  239. package/dist/gaia-ops/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +88 -0
  240. package/dist/gaia-ops/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +48 -0
  241. package/dist/gaia-ops/tools/fast-queries/run_triage.sh +59 -0
  242. package/dist/gaia-ops/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +80 -0
  243. package/dist/gaia-ops/tools/gaia_simulator/__init__.py +33 -0
  244. package/dist/gaia-ops/tools/gaia_simulator/cli.py +354 -0
  245. package/dist/gaia-ops/tools/gaia_simulator/extractor.py +457 -0
  246. package/dist/gaia-ops/tools/gaia_simulator/reporter.py +258 -0
  247. package/dist/gaia-ops/tools/gaia_simulator/routing_simulator.py +334 -0
  248. package/dist/gaia-ops/tools/gaia_simulator/runner.py +539 -0
  249. package/dist/gaia-ops/tools/gaia_simulator/skills_mapper.py +264 -0
  250. package/dist/gaia-ops/tools/memory/README.md +0 -0
  251. package/dist/gaia-ops/tools/memory/__init__.py +20 -0
  252. package/dist/gaia-ops/tools/memory/backfill_fts5.py +107 -0
  253. package/dist/gaia-ops/tools/memory/conflict_detector.py +295 -0
  254. package/dist/gaia-ops/tools/memory/episodic.py +1210 -0
  255. package/dist/gaia-ops/tools/memory/git_invalidator.py +262 -0
  256. package/dist/gaia-ops/tools/memory/paths.py +102 -0
  257. package/dist/gaia-ops/tools/memory/scoring.py +193 -0
  258. package/dist/gaia-ops/tools/memory/search_store.py +360 -0
  259. package/dist/gaia-ops/tools/persist_transcript_analysis.py +85 -0
  260. package/dist/gaia-ops/tools/review/__init__.py +1 -0
  261. package/dist/gaia-ops/tools/review/review_engine.py +157 -0
  262. package/dist/gaia-ops/tools/scan/__init__.py +35 -0
  263. package/dist/gaia-ops/tools/scan/config.py +247 -0
  264. package/dist/gaia-ops/tools/scan/merge.py +212 -0
  265. package/dist/gaia-ops/tools/scan/orchestrator.py +549 -0
  266. package/dist/gaia-ops/tools/scan/registry.py +127 -0
  267. package/dist/gaia-ops/tools/scan/scanners/__init__.py +18 -0
  268. package/dist/gaia-ops/tools/scan/scanners/base.py +137 -0
  269. package/dist/gaia-ops/tools/scan/scanners/environment.py +349 -0
  270. package/dist/gaia-ops/tools/scan/scanners/git.py +570 -0
  271. package/dist/gaia-ops/tools/scan/scanners/infrastructure.py +875 -0
  272. package/dist/gaia-ops/tools/scan/scanners/orchestration.py +600 -0
  273. package/dist/gaia-ops/tools/scan/scanners/stack.py +1085 -0
  274. package/dist/gaia-ops/tools/scan/scanners/tools.py +260 -0
  275. package/dist/gaia-ops/tools/scan/setup.py +686 -0
  276. package/dist/gaia-ops/tools/scan/tests/__init__.py +1 -0
  277. package/dist/gaia-ops/tools/scan/tests/conftest.py +796 -0
  278. package/dist/gaia-ops/tools/scan/tests/test_environment.py +323 -0
  279. package/dist/gaia-ops/tools/scan/tests/test_git.py +419 -0
  280. package/dist/gaia-ops/tools/scan/tests/test_infrastructure.py +382 -0
  281. package/dist/gaia-ops/tools/scan/tests/test_integration.py +920 -0
  282. package/dist/gaia-ops/tools/scan/tests/test_merge.py +269 -0
  283. package/dist/gaia-ops/tools/scan/tests/test_orchestration.py +304 -0
  284. package/dist/gaia-ops/tools/scan/tests/test_stack.py +604 -0
  285. package/dist/gaia-ops/tools/scan/tests/test_tools.py +349 -0
  286. package/dist/gaia-ops/tools/scan/ui.py +624 -0
  287. package/dist/gaia-ops/tools/scan/verify.py +270 -0
  288. package/dist/gaia-ops/tools/scan/walk.py +118 -0
  289. package/dist/gaia-ops/tools/scan/workspace.py +85 -0
  290. package/dist/gaia-ops/tools/validation/README.md +244 -0
  291. package/dist/gaia-ops/tools/validation/__init__.py +17 -0
  292. package/dist/gaia-ops/tools/validation/approval_gate.py +321 -0
  293. package/dist/gaia-ops/tools/validation/validate_skills.py +189 -0
  294. package/dist/gaia-security/.claude-plugin/plugin.json +24 -0
  295. package/dist/gaia-security/README.md +90 -0
  296. package/dist/gaia-security/config/universal-rules.json +102 -0
  297. package/dist/gaia-security/hooks/adapters/__init__.py +52 -0
  298. package/dist/gaia-security/hooks/adapters/base.py +219 -0
  299. package/dist/gaia-security/hooks/adapters/channel.py +17 -0
  300. package/dist/gaia-security/hooks/adapters/claude_code.py +1890 -0
  301. package/dist/gaia-security/hooks/adapters/types.py +194 -0
  302. package/dist/gaia-security/hooks/adapters/utils.py +25 -0
  303. package/dist/gaia-security/hooks/hooks.json +84 -0
  304. package/dist/gaia-security/hooks/modules/__init__.py +15 -0
  305. package/dist/gaia-security/hooks/modules/agents/__init__.py +29 -0
  306. package/dist/gaia-security/hooks/modules/agents/contract_validator.py +647 -0
  307. package/dist/gaia-security/hooks/modules/agents/response_contract.py +496 -0
  308. package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +120 -0
  309. package/dist/gaia-security/hooks/modules/agents/state_tracker.py +267 -0
  310. package/dist/gaia-security/hooks/modules/agents/task_info_builder.py +74 -0
  311. package/dist/gaia-security/hooks/modules/agents/transcript_analyzer.py +458 -0
  312. package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +152 -0
  313. package/dist/gaia-security/hooks/modules/audit/__init__.py +28 -0
  314. package/dist/gaia-security/hooks/modules/audit/event_detector.py +168 -0
  315. package/dist/gaia-security/hooks/modules/audit/logger.py +131 -0
  316. package/dist/gaia-security/hooks/modules/audit/metrics.py +134 -0
  317. package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +611 -0
  318. package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +296 -0
  319. package/dist/gaia-security/hooks/modules/context/__init__.py +11 -0
  320. package/dist/gaia-security/hooks/modules/context/agentic_loop_detector.py +165 -0
  321. package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +317 -0
  322. package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +218 -0
  323. package/dist/gaia-security/hooks/modules/context/context_freshness.py +145 -0
  324. package/dist/gaia-security/hooks/modules/context/context_injector.py +558 -0
  325. package/dist/gaia-security/hooks/modules/context/context_writer.py +530 -0
  326. package/dist/gaia-security/hooks/modules/context/contracts_loader.py +161 -0
  327. package/dist/gaia-security/hooks/modules/core/__init__.py +40 -0
  328. package/dist/gaia-security/hooks/modules/core/hook_entry.py +78 -0
  329. package/dist/gaia-security/hooks/modules/core/paths.py +160 -0
  330. package/dist/gaia-security/hooks/modules/core/plugin_mode.py +149 -0
  331. package/dist/gaia-security/hooks/modules/core/plugin_setup.py +577 -0
  332. package/dist/gaia-security/hooks/modules/core/state.py +179 -0
  333. package/dist/gaia-security/hooks/modules/core/stdin.py +24 -0
  334. package/dist/gaia-security/hooks/modules/events/__init__.py +1 -0
  335. package/dist/gaia-security/hooks/modules/events/event_writer.py +210 -0
  336. package/dist/gaia-security/hooks/modules/memory/__init__.py +8 -0
  337. package/dist/gaia-security/hooks/modules/memory/episode_writer.py +216 -0
  338. package/dist/gaia-security/hooks/modules/orchestrator/__init__.py +1 -0
  339. package/dist/gaia-security/hooks/modules/orchestrator/delegate_mode.py +122 -0
  340. package/dist/gaia-security/hooks/modules/scanning/__init__.py +8 -0
  341. package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +84 -0
  342. package/dist/gaia-security/hooks/modules/security/__init__.py +120 -0
  343. package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +87 -0
  344. package/dist/gaia-security/hooks/modules/security/approval_constants.py +23 -0
  345. package/dist/gaia-security/hooks/modules/security/approval_grants.py +1638 -0
  346. package/dist/gaia-security/hooks/modules/security/approval_messages.py +71 -0
  347. package/dist/gaia-security/hooks/modules/security/approval_scopes.py +222 -0
  348. package/dist/gaia-security/hooks/modules/security/blocked_commands.py +595 -0
  349. package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +87 -0
  350. package/dist/gaia-security/hooks/modules/security/command_semantics.py +181 -0
  351. package/dist/gaia-security/hooks/modules/security/composition_rules.py +547 -0
  352. package/dist/gaia-security/hooks/modules/security/flag_classifiers.py +873 -0
  353. package/dist/gaia-security/hooks/modules/security/gitops_validator.py +179 -0
  354. package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +1131 -0
  355. package/dist/gaia-security/hooks/modules/security/network_hosts.py +481 -0
  356. package/dist/gaia-security/hooks/modules/security/prompt_validator.py +40 -0
  357. package/dist/gaia-security/hooks/modules/security/shell_unwrapper.py +165 -0
  358. package/dist/gaia-security/hooks/modules/security/tiers.py +196 -0
  359. package/dist/gaia-security/hooks/modules/session/__init__.py +10 -0
  360. package/dist/gaia-security/hooks/modules/session/pending_scanner.py +174 -0
  361. package/dist/gaia-security/hooks/modules/session/session_context_writer.py +100 -0
  362. package/dist/gaia-security/hooks/modules/session/session_event_injector.py +160 -0
  363. package/dist/gaia-security/hooks/modules/session/session_manager.py +31 -0
  364. package/dist/gaia-security/hooks/modules/session/session_registry.py +232 -0
  365. package/dist/gaia-security/hooks/modules/tools/__init__.py +29 -0
  366. package/dist/gaia-security/hooks/modules/tools/bash_validator.py +1008 -0
  367. package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +231 -0
  368. package/dist/gaia-security/hooks/modules/tools/hook_response.py +55 -0
  369. package/dist/gaia-security/hooks/modules/tools/shell_parser.py +227 -0
  370. package/dist/gaia-security/hooks/modules/tools/stage_decomposer.py +315 -0
  371. package/dist/gaia-security/hooks/modules/tools/task_validator.py +294 -0
  372. package/dist/gaia-security/hooks/modules/validation/__init__.py +23 -0
  373. package/dist/gaia-security/hooks/modules/validation/commit_validator.py +380 -0
  374. package/dist/gaia-security/hooks/post_tool_use.py +54 -0
  375. package/dist/gaia-security/hooks/pre_tool_use.py +413 -0
  376. package/dist/gaia-security/hooks/session_start.py +81 -0
  377. package/dist/gaia-security/hooks/stop_hook.py +82 -0
  378. package/dist/gaia-security/hooks/user_prompt_submit.py +246 -0
  379. package/dist/gaia-security/settings.json +58 -0
  380. package/git-hooks/commit-msg +41 -0
  381. package/hooks/README.md +100 -0
  382. package/hooks/adapters/__init__.py +52 -0
  383. package/hooks/adapters/base.py +219 -0
  384. package/hooks/adapters/channel.py +17 -0
  385. package/hooks/adapters/claude_code.py +1890 -0
  386. package/hooks/adapters/types.py +194 -0
  387. package/hooks/adapters/utils.py +25 -0
  388. package/hooks/elicitation_result.py +179 -0
  389. package/hooks/hooks.json +84 -0
  390. package/hooks/modules/README.md +189 -0
  391. package/hooks/modules/__init__.py +15 -0
  392. package/hooks/modules/agents/__init__.py +29 -0
  393. package/hooks/modules/agents/contract_validator.py +647 -0
  394. package/hooks/modules/agents/response_contract.py +496 -0
  395. package/hooks/modules/agents/skill_injection_verifier.py +120 -0
  396. package/hooks/modules/agents/state_tracker.py +267 -0
  397. package/hooks/modules/agents/task_info_builder.py +74 -0
  398. package/hooks/modules/agents/transcript_analyzer.py +458 -0
  399. package/hooks/modules/agents/transcript_reader.py +152 -0
  400. package/hooks/modules/audit/__init__.py +28 -0
  401. package/hooks/modules/audit/event_detector.py +168 -0
  402. package/hooks/modules/audit/logger.py +131 -0
  403. package/hooks/modules/audit/metrics.py +134 -0
  404. package/hooks/modules/audit/workflow_auditor.py +611 -0
  405. package/hooks/modules/audit/workflow_recorder.py +296 -0
  406. package/hooks/modules/context/__init__.py +11 -0
  407. package/hooks/modules/context/agentic_loop_detector.py +165 -0
  408. package/hooks/modules/context/anchor_tracker.py +317 -0
  409. package/hooks/modules/context/compact_context_builder.py +218 -0
  410. package/hooks/modules/context/context_freshness.py +145 -0
  411. package/hooks/modules/context/context_injector.py +558 -0
  412. package/hooks/modules/context/context_writer.py +530 -0
  413. package/hooks/modules/context/contracts_loader.py +161 -0
  414. package/hooks/modules/core/__init__.py +40 -0
  415. package/hooks/modules/core/hook_entry.py +78 -0
  416. package/hooks/modules/core/paths.py +160 -0
  417. package/hooks/modules/core/plugin_mode.py +149 -0
  418. package/hooks/modules/core/plugin_setup.py +577 -0
  419. package/hooks/modules/core/state.py +179 -0
  420. package/hooks/modules/core/stdin.py +24 -0
  421. package/hooks/modules/events/__init__.py +1 -0
  422. package/hooks/modules/events/event_writer.py +210 -0
  423. package/hooks/modules/evidence/__init__.py +34 -0
  424. package/hooks/modules/evidence/assertions.py +137 -0
  425. package/hooks/modules/evidence/index_writer.py +57 -0
  426. package/hooks/modules/evidence/loader.py +126 -0
  427. package/hooks/modules/evidence/runner.py +241 -0
  428. package/hooks/modules/memory/__init__.py +8 -0
  429. package/hooks/modules/memory/episode_writer.py +216 -0
  430. package/hooks/modules/orchestrator/__init__.py +1 -0
  431. package/hooks/modules/orchestrator/delegate_mode.py +122 -0
  432. package/hooks/modules/scanning/__init__.py +8 -0
  433. package/hooks/modules/scanning/scan_trigger.py +84 -0
  434. package/hooks/modules/security/__init__.py +120 -0
  435. package/hooks/modules/security/approval_cleanup.py +87 -0
  436. package/hooks/modules/security/approval_constants.py +23 -0
  437. package/hooks/modules/security/approval_grants.py +1638 -0
  438. package/hooks/modules/security/approval_messages.py +71 -0
  439. package/hooks/modules/security/approval_scopes.py +222 -0
  440. package/hooks/modules/security/blocked_commands.py +595 -0
  441. package/hooks/modules/security/blocked_message_formatter.py +87 -0
  442. package/hooks/modules/security/command_semantics.py +181 -0
  443. package/hooks/modules/security/composition_rules.py +547 -0
  444. package/hooks/modules/security/flag_classifiers.py +873 -0
  445. package/hooks/modules/security/gitops_validator.py +179 -0
  446. package/hooks/modules/security/mutative_verbs.py +1131 -0
  447. package/hooks/modules/security/network_hosts.py +481 -0
  448. package/hooks/modules/security/prompt_validator.py +40 -0
  449. package/hooks/modules/security/shell_unwrapper.py +165 -0
  450. package/hooks/modules/security/tiers.py +196 -0
  451. package/hooks/modules/session/__init__.py +10 -0
  452. package/hooks/modules/session/pending_scanner.py +174 -0
  453. package/hooks/modules/session/session_context_writer.py +100 -0
  454. package/hooks/modules/session/session_event_injector.py +160 -0
  455. package/hooks/modules/session/session_manager.py +31 -0
  456. package/hooks/modules/session/session_registry.py +232 -0
  457. package/hooks/modules/tools/__init__.py +29 -0
  458. package/hooks/modules/tools/bash_validator.py +1008 -0
  459. package/hooks/modules/tools/cloud_pipe_validator.py +231 -0
  460. package/hooks/modules/tools/hook_response.py +55 -0
  461. package/hooks/modules/tools/shell_parser.py +227 -0
  462. package/hooks/modules/tools/stage_decomposer.py +315 -0
  463. package/hooks/modules/tools/task_validator.py +294 -0
  464. package/hooks/modules/validation/__init__.py +23 -0
  465. package/hooks/modules/validation/commit_validator.py +380 -0
  466. package/hooks/post_compact.py +43 -0
  467. package/hooks/post_tool_use.py +54 -0
  468. package/hooks/pre_compact.py +60 -0
  469. package/hooks/pre_tool_use.py +413 -0
  470. package/hooks/session_start.py +81 -0
  471. package/hooks/stop_hook.py +82 -0
  472. package/hooks/subagent_start.py +71 -0
  473. package/hooks/subagent_stop.py +295 -0
  474. package/hooks/task_completed.py +70 -0
  475. package/hooks/user_prompt_submit.py +246 -0
  476. package/index.js +83 -0
  477. package/package.json +99 -0
  478. package/pyproject.toml +32 -0
  479. package/skills/README.md +154 -0
  480. package/skills/agent-protocol/SKILL.md +93 -0
  481. package/skills/agent-protocol/examples.md +223 -0
  482. package/skills/agent-response/SKILL.md +69 -0
  483. package/skills/agentic-loop/SKILL.md +80 -0
  484. package/skills/agentic-loop/reference.md +378 -0
  485. package/skills/blog-writing/SKILL.md +98 -0
  486. package/skills/blog-writing/reference.md +130 -0
  487. package/skills/brief-spec/SKILL.md +182 -0
  488. package/skills/command-execution/SKILL.md +64 -0
  489. package/skills/command-execution/reference.md +83 -0
  490. package/skills/context-updater/SKILL.md +87 -0
  491. package/skills/context-updater/examples.md +71 -0
  492. package/skills/developer-patterns/SKILL.md +50 -0
  493. package/skills/developer-patterns/reference.md +112 -0
  494. package/skills/execution/SKILL.md +99 -0
  495. package/skills/fast-queries/SKILL.md +43 -0
  496. package/skills/gaia-compact/SKILL.md +74 -0
  497. package/skills/gaia-patterns/SKILL.md +108 -0
  498. package/skills/gaia-patterns/reference.md +395 -0
  499. package/skills/gaia-planner/SKILL.md +37 -0
  500. package/skills/gaia-planner/reference.md +107 -0
  501. package/skills/gaia-release/SKILL.md +82 -0
  502. package/skills/gaia-release/reference.md +102 -0
  503. package/skills/gaia-self-check/SKILL.md +114 -0
  504. package/skills/gaia-self-check/reference.md +453 -0
  505. package/skills/gaia-verify/SKILL.md +77 -0
  506. package/skills/gaia-verify/reference.md +80 -0
  507. package/skills/git-conventions/SKILL.md +47 -0
  508. package/skills/gitops-patterns/SKILL.md +60 -0
  509. package/skills/gitops-patterns/reference.md +183 -0
  510. package/skills/gmail-policy/SKILL.md +200 -0
  511. package/skills/gmail-policy/reference.md +150 -0
  512. package/skills/gmail-triage/SKILL.md +100 -0
  513. package/skills/gws-setup/SKILL.md +99 -0
  514. package/skills/gws-setup/reference.md +73 -0
  515. package/skills/investigation/SKILL.md +100 -0
  516. package/skills/memory-curation/SKILL.md +83 -0
  517. package/skills/memory-search/SKILL.md +88 -0
  518. package/skills/orchestrator-approval/SKILL.md +160 -0
  519. package/skills/orchestrator-approval/reference.md +174 -0
  520. package/skills/pending-approvals/SKILL.md +72 -0
  521. package/skills/pending-approvals/reference.md +214 -0
  522. package/skills/readme-writing/SKILL.md +71 -0
  523. package/skills/readme-writing/reference.md +188 -0
  524. package/skills/reference.md +135 -0
  525. package/skills/request-approval/SKILL.md +140 -0
  526. package/skills/request-approval/examples.md +140 -0
  527. package/skills/request-approval/reference.md +57 -0
  528. package/skills/schedule-task/SKILL.md +64 -0
  529. package/skills/schedule-task/reference.md +233 -0
  530. package/skills/security-tiers/SKILL.md +141 -0
  531. package/skills/security-tiers/destructive-commands-reference.md +623 -0
  532. package/skills/security-tiers/reference.md +39 -0
  533. package/skills/skill-creation/SKILL.md +92 -0
  534. package/skills/skill-creation/reference.md +29 -0
  535. package/skills/terraform-patterns/SKILL.md +89 -0
  536. package/skills/terraform-patterns/reference.md +93 -0
  537. package/templates/README.md +69 -0
  538. package/templates/managed-settings.template.json +43 -0
  539. package/tools/__init__.py +9 -0
  540. package/tools/agentic-loop/decide-status.py +210 -0
  541. package/tools/agentic-loop/parse-metric.py +106 -0
  542. package/tools/agentic-loop/record-iteration.py +221 -0
  543. package/tools/context/README.md +132 -0
  544. package/tools/context/__init__.py +42 -0
  545. package/tools/context/_paths.py +20 -0
  546. package/tools/context/context_provider.py +721 -0
  547. package/tools/context/context_section_reader.py +342 -0
  548. package/tools/context/deep_merge.py +159 -0
  549. package/tools/context/pending_updates.py +760 -0
  550. package/tools/context/surface_router.py +278 -0
  551. package/tools/fast-queries/README.md +65 -0
  552. package/tools/fast-queries/__init__.py +30 -0
  553. package/tools/fast-queries/appservices/quicktriage_devops_developer.sh +75 -0
  554. package/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +32 -0
  555. package/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +88 -0
  556. package/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +48 -0
  557. package/tools/fast-queries/run_triage.sh +59 -0
  558. package/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +80 -0
  559. package/tools/gaia_simulator/__init__.py +33 -0
  560. package/tools/gaia_simulator/cli.py +354 -0
  561. package/tools/gaia_simulator/extractor.py +457 -0
  562. package/tools/gaia_simulator/reporter.py +258 -0
  563. package/tools/gaia_simulator/routing_simulator.py +334 -0
  564. package/tools/gaia_simulator/runner.py +539 -0
  565. package/tools/gaia_simulator/skills_mapper.py +264 -0
  566. package/tools/memory/README.md +0 -0
  567. package/tools/memory/__init__.py +20 -0
  568. package/tools/memory/backfill_fts5.py +107 -0
  569. package/tools/memory/conflict_detector.py +295 -0
  570. package/tools/memory/episodic.py +1210 -0
  571. package/tools/memory/git_invalidator.py +262 -0
  572. package/tools/memory/paths.py +102 -0
  573. package/tools/memory/scoring.py +193 -0
  574. package/tools/memory/search_store.py +360 -0
  575. package/tools/persist_transcript_analysis.py +85 -0
  576. package/tools/review/__init__.py +1 -0
  577. package/tools/review/review_engine.py +157 -0
  578. package/tools/scan/__init__.py +35 -0
  579. package/tools/scan/config.py +247 -0
  580. package/tools/scan/merge.py +212 -0
  581. package/tools/scan/orchestrator.py +549 -0
  582. package/tools/scan/registry.py +127 -0
  583. package/tools/scan/scanners/__init__.py +18 -0
  584. package/tools/scan/scanners/base.py +137 -0
  585. package/tools/scan/scanners/environment.py +349 -0
  586. package/tools/scan/scanners/git.py +570 -0
  587. package/tools/scan/scanners/infrastructure.py +875 -0
  588. package/tools/scan/scanners/orchestration.py +600 -0
  589. package/tools/scan/scanners/stack.py +1085 -0
  590. package/tools/scan/scanners/tools.py +260 -0
  591. package/tools/scan/setup.py +686 -0
  592. package/tools/scan/tests/__init__.py +1 -0
  593. package/tools/scan/tests/conftest.py +796 -0
  594. package/tools/scan/tests/test_environment.py +323 -0
  595. package/tools/scan/tests/test_git.py +419 -0
  596. package/tools/scan/tests/test_infrastructure.py +382 -0
  597. package/tools/scan/tests/test_integration.py +920 -0
  598. package/tools/scan/tests/test_merge.py +269 -0
  599. package/tools/scan/tests/test_orchestration.py +304 -0
  600. package/tools/scan/tests/test_stack.py +604 -0
  601. package/tools/scan/tests/test_tools.py +349 -0
  602. package/tools/scan/ui.py +624 -0
  603. package/tools/scan/verify.py +270 -0
  604. package/tools/scan/walk.py +118 -0
  605. package/tools/scan/workspace.py +85 -0
  606. package/tools/validation/README.md +244 -0
  607. package/tools/validation/__init__.py +17 -0
  608. package/tools/validation/approval_gate.py +321 -0
  609. package/tools/validation/validate_skills.py +189 -0
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: agentic-loop
3
+ description: Use when the orchestrator injects "Carga la skill agentic-loop" with a goal, eval_command, metric, and threshold
4
+ metadata:
5
+ user-invocable: false
6
+ type: technique
7
+ ---
8
+
9
+ # Agentic Loop
10
+
11
+ Iterative improvement through small, reversible changes evaluated against a single metric. Each iteration is one hypothesis, one edit, one eval, one decision. The metric decides -- not you.
12
+
13
+ ## Parameters (from orchestrator prompt)
14
+
15
+ `goal`, `eval_command`, `metric`, `direction` (higher/lower), `threshold`, `max_iterations`, `files_in_scope`, `branch`
16
+
17
+ ## Setup
18
+
19
+ 1. Read every file in `files_in_scope` deeply -- understand before changing
20
+ 2. `git checkout -b {branch}`
21
+ 3. Run `eval_command` -- parse `METRIC {name}={number}` from stdout -- this is your baseline
22
+ 4. Write `state.json` and `worklog.md` (schemas in `reference.md`)
23
+ 5. `git commit -m "baseline: {metric} {value}"`
24
+
25
+ ## Loop (repeat until threshold, max_iterations, or stop)
26
+
27
+ 1. **HYPOTHESIZE** -- based on worklog insights and last failure. When stuck, re-read source files; thinking longer beats trying faster
28
+ 2. **EDIT** -- one focused change. Smaller diffs are easier to evaluate and reverse
29
+ 3. **EVALUATE** -- run `eval_command`, parse `METRIC {name}={number}`
30
+ 4. **DECIDE** (mechanically, not judgment):
31
+ - Improved (or equal with less code) -- KEEP -- `git add -A` then `git commit -m "improve: {metric} {old}->{new}"`
32
+ - Same or worse -- DISCARD -- `git checkout -- .` then `git clean -fd`
33
+ 5. **LOG** -- append to `worklog.md`: run number, what changed, result, insight, next idea
34
+ 6. **UPDATE** -- write `state.json` with current values
35
+ 7. **ESCALATE** if needed:
36
+ - 3 consecutive discards -- REFINE (adjust within current strategy)
37
+ - 5 consecutive discards -- PIVOT (structurally different approach)
38
+ - 3 pivots without a keep -- STOP and report blockers
39
+ 8. Every 10 iterations: re-read `files_in_scope`, review worklog "What's Been Tried", recalibrate
40
+
41
+ ## Termination
42
+
43
+ - **Threshold reached** -- `git commit -m "final: {metric} {baseline}->{final} in N iterations"`, write summary
44
+ - **Max iterations** -- report best achieved vs threshold
45
+ - **Stop from escalation** -- report what was tried and what blocked progress
46
+ - All paths: finalize `state.json` (status: complete/stopped), write summary in `worklog.md`
47
+
48
+ ## Contract Integration
49
+
50
+ Include `loop_status` in your `json:contract` agent_status on every response:
51
+
52
+ ```json
53
+ "loop_status": {
54
+ "iteration": 5,
55
+ "metric": 94.5,
56
+ "best": 94.5,
57
+ "baseline": 89.0,
58
+ "threshold": 98,
59
+ "status": "iterating"
60
+ }
61
+ ```
62
+
63
+ Do NOT return `plan_status: "COMPLETE"` until the loop finishes. The user may be away for hours.
64
+
65
+ ## Rules
66
+
67
+ - **Loop forever.** Never ask "should I continue?" The metric and thresholds decide when to stop. The user may be away for hours.
68
+ - **One change per iteration.** Multiple changes make it impossible to isolate what helped.
69
+ - **Metric is king.** Personal judgment about code quality does not override the number.
70
+ - **Simpler wins ties.** Removing code for equal performance is a keep.
71
+ - **Think longer when stuck.** Re-read source files before trying faster. Fresh context beats more iterations.
72
+ - **Retreat, don't thrash.** Same idea reverting repeatedly means the approach is wrong -- pivot.
73
+
74
+ ## Anti-Patterns
75
+
76
+ - Making multiple changes per iteration -- cannot isolate what helped or hurt
77
+ - Skipping eval after a change -- invisible regressions compound
78
+ - Continuing after 3 pivots without improvement -- diminishing returns; stop and report
79
+ - Using `git clean -fdx` instead of `-fd` -- destroys untracked config files needed by eval
80
+ - Editing state.json by hand instead of writing it atomically after each phase
@@ -0,0 +1,378 @@
1
+ # Agentic Loop -- Reference
2
+
3
+ Exact commands, schemas, templates, and a walkthrough. Read on-demand when executing the loop.
4
+
5
+ ## Setup Phase Commands
6
+
7
+ ```bash
8
+ # 1. Read files_in_scope (use Read tool, not cat)
9
+
10
+ # 2. Create branch
11
+ git checkout -b {branch}
12
+
13
+ # 3. Run eval and capture baseline
14
+ {eval_command}
15
+ # Look for line matching: METRIC {name}={number}
16
+
17
+ # 4. Write state.json (use Write tool)
18
+ # 5. Write worklog.md (use Write tool)
19
+
20
+ # 6. Commit baseline
21
+ git add state.json worklog.md
22
+ git commit -m "baseline: {metric} {value}"
23
+ ```
24
+
25
+ ## Eval Phase: Parsing the Metric
26
+
27
+ The eval_command must print a line matching this pattern to stdout:
28
+
29
+ ```
30
+ METRIC accuracy=89.0
31
+ METRIC pass_rate=72
32
+ METRIC error_count=15
33
+ ```
34
+
35
+ Format: `METRIC {name}={number}` -- one space after METRIC, no spaces around `=`.
36
+
37
+ Parse the number as a float. If the line is missing, the eval failed -- treat as a discard and log the error.
38
+
39
+ ## Keep Phase Commands
40
+
41
+ ```bash
42
+ git add -A
43
+ git commit -m "$(cat <<'EOF'
44
+ improve: {metric} {old}->{new}
45
+
46
+ {one-line description of what changed}
47
+ EOF
48
+ )"
49
+ ```
50
+
51
+ ## Discard Phase Commands
52
+
53
+ ```bash
54
+ git checkout -- .
55
+ git clean -fd
56
+ ```
57
+
58
+ Use `-fd`, never `-fdx`. The `-x` flag removes files matching `.gitignore` patterns, which can destroy config files, build caches, or virtual environments needed by the eval command.
59
+
60
+ ## state.json Schema
61
+
62
+ ```json
63
+ {
64
+ "goal": "Improve test accuracy to 98%",
65
+ "eval_command": "python run_tests.py --report",
66
+ "metric": "accuracy",
67
+ "direction": "higher",
68
+ "threshold": 98,
69
+ "baseline": 89.0,
70
+ "current": 94.5,
71
+ "best": 94.5,
72
+ "iteration": 5,
73
+ "max_iterations": 20,
74
+ "consecutive_discards": 0,
75
+ "pivot_count": 0,
76
+ "status": "iterating",
77
+ "branch": "improve/accuracy-apr13",
78
+ "history": [
79
+ {
80
+ "iteration": 1,
81
+ "metric_value": 89.0,
82
+ "decision": "baseline",
83
+ "description": "Initial measurement"
84
+ },
85
+ {
86
+ "iteration": 2,
87
+ "metric_value": 91.2,
88
+ "decision": "keep",
89
+ "description": "Normalize input features"
90
+ },
91
+ {
92
+ "iteration": 3,
93
+ "metric_value": 90.1,
94
+ "decision": "discard",
95
+ "description": "Add dropout layer -- hurt accuracy"
96
+ }
97
+ ],
98
+ "timestamp": "2026-04-13T20:30:00Z"
99
+ }
100
+ ```
101
+
102
+ ### Field descriptions
103
+
104
+ | Field | Type | Description |
105
+ |-------|------|-------------|
106
+ | `goal` | string | Human-readable objective from orchestrator |
107
+ | `eval_command` | string | Exact command to run for evaluation |
108
+ | `metric` | string | Name of the metric to parse from eval output |
109
+ | `direction` | string | `"higher"` or `"lower"` -- which direction is better |
110
+ | `threshold` | number | Target value -- loop stops when reached |
111
+ | `baseline` | number | First measurement, never changes |
112
+ | `current` | number | Most recent measurement |
113
+ | `best` | number | Best value seen across all iterations |
114
+ | `iteration` | integer | Current iteration count |
115
+ | `max_iterations` | integer | Hard stop limit |
116
+ | `consecutive_discards` | integer | Reset to 0 on every keep |
117
+ | `pivot_count` | integer | Number of strategy pivots so far |
118
+ | `status` | string | One of: `iterating`, `threshold_reached`, `max_iterations`, `stopped` |
119
+ | `branch` | string | Git branch name |
120
+ | `history` | array | Record of every iteration |
121
+ | `timestamp` | string | ISO 8601 timestamp of last update |
122
+
123
+ ### Metric comparison logic
124
+
125
+ ```
126
+ if direction == "higher":
127
+ improved = (new_value > current)
128
+ threshold_reached = (new_value >= threshold)
129
+ elif direction == "lower":
130
+ improved = (new_value < current)
131
+ threshold_reached = (new_value <= threshold)
132
+
133
+ # Special case: equal metric with fewer lines of code = improved
134
+ if new_value == current and lines_removed > 0:
135
+ improved = true
136
+ ```
137
+
138
+ ## worklog.md Template
139
+
140
+ ```markdown
141
+ # Worklog: {goal}
142
+
143
+ Branch: {branch}
144
+ Metric: {metric} ({direction} is better)
145
+ Threshold: {threshold}
146
+ Baseline: {baseline}
147
+
148
+ ## What's Been Tried
149
+
150
+ (Updated every 10 iterations -- summary of strategies attempted)
151
+
152
+ ---
153
+
154
+ ### Run 1 (baseline): Initial measurement
155
+ - **Metric:** {metric}={value}
156
+ - **Decision:** BASELINE
157
+
158
+ ### Run 2: Normalize input features
159
+ - **Metric:** accuracy=91.2 (was 89.0)
160
+ - **Decision:** KEEP
161
+ - **Insight:** Feature scaling was the low-hanging fruit
162
+ - **Next:** Try feature selection to reduce noise
163
+
164
+ ### Run 3: Add dropout layer (rate=0.3)
165
+ - **Metric:** accuracy=90.1 (was 91.2)
166
+ - **Decision:** DISCARD
167
+ - **Insight:** Dropout hurts on this small dataset -- underfitting
168
+ - **Next:** Try regularization via weight decay instead
169
+
170
+ ---
171
+
172
+ ## Summary
173
+ (Written at termination)
174
+
175
+ Final: {metric} {baseline} -> {final} in {N} iterations
176
+ Keeps: X | Discards: Y | Pivots: Z
177
+ Key insight: ...
178
+ ```
179
+
180
+ ## continue.md Template
181
+
182
+ Written when the loop is paused or interrupted, so the next session can resume.
183
+
184
+ ```markdown
185
+ # Continue: {goal}
186
+
187
+ ## State
188
+ - Branch: {branch}
189
+ - Iteration: {N} of {max_iterations}
190
+ - Current: {metric}={value} (baseline={baseline}, best={best})
191
+ - Status: {status}
192
+
193
+ ## Last Action
194
+ {what was done in the last iteration and its result}
195
+
196
+ ## Next Hypothesis
197
+ {what to try next, based on worklog insights}
198
+
199
+ ## Resume Steps
200
+ 1. Read state.json to restore loop state
201
+ 2. Read worklog.md for context on what's been tried
202
+ 3. Continue from iteration {N+1}
203
+ ```
204
+
205
+ ## Contract Integration
206
+
207
+ Every response during the loop must include `loop_status` inside `agent_status`:
208
+
209
+ ```json
210
+ {
211
+ "agent_status": {
212
+ "plan_status": "IN_PROGRESS",
213
+ "agent_id": "a1b2c3",
214
+ "pending_steps": ["continue iterating"],
215
+ "next_action": "iteration 6",
216
+ "loop_status": {
217
+ "iteration": 5,
218
+ "metric": 94.5,
219
+ "best": 94.5,
220
+ "baseline": 89.0,
221
+ "threshold": 98,
222
+ "status": "iterating"
223
+ }
224
+ },
225
+ "evidence_report": {
226
+ "patterns_checked": [],
227
+ "files_checked": ["state.json"],
228
+ "commands_run": ["{eval_command}"],
229
+ "key_outputs": ["accuracy improved 93.2->94.5 (KEEP)"],
230
+ "verbatim_outputs": ["METRIC accuracy=94.5"],
231
+ "cross_layer_impacts": [],
232
+ "open_gaps": [],
233
+ "verification": null
234
+ },
235
+ "consolidation_report": null,
236
+ "approval_request": null
237
+ }
238
+ ```
239
+
240
+ On loop completion, set `plan_status: "COMPLETE"` with verification:
241
+
242
+ ```json
243
+ {
244
+ "agent_status": {
245
+ "plan_status": "COMPLETE",
246
+ "loop_status": {
247
+ "iteration": 12,
248
+ "metric": 98.1,
249
+ "best": 98.1,
250
+ "baseline": 89.0,
251
+ "threshold": 98,
252
+ "status": "threshold_reached"
253
+ }
254
+ },
255
+ "evidence_report": {
256
+ "verification": {
257
+ "method": "metric",
258
+ "checks": ["accuracy >= 98 threshold"],
259
+ "result": "pass",
260
+ "details": "accuracy=98.1 (baseline=89.0) achieved in 12 iterations"
261
+ }
262
+ }
263
+ }
264
+ ```
265
+
266
+ ## Escalation Logic
267
+
268
+ ```
269
+ consecutive_discards >= 3 -> REFINE
270
+ Log: "REFINE: 3 consecutive discards. Adjusting within current strategy."
271
+ Action: Same general approach, different parameters or targets
272
+
273
+ consecutive_discards >= 5 -> PIVOT
274
+ Log: "PIVOT #{N}: 5 consecutive discards. Changing strategy entirely."
275
+ Action: Structurally different approach. Reset consecutive_discards to 0.
276
+ Increment pivot_count.
277
+
278
+ pivot_count >= 3 (without any keep since last reset) -> STOP
279
+ Log: "STOP: 3 pivots without improvement. Reporting blockers."
280
+ Action: Set status="stopped". Write summary. Return COMPLETE with
281
+ verification.result="fail" and details explaining what was tried.
282
+ ```
283
+
284
+ ## Resume Logic
285
+
286
+ When starting an agentic-loop, check for existing state before beginning fresh:
287
+
288
+ ### Decision Tree
289
+
290
+ 1. **`continue.md` exists** → Read it, delete it, resume from the checkpoint described. The continue.md was written during context compaction or interruption.
291
+
292
+ 2. **`state.json` exists AND timestamp < 24h** → Resume from saved state. Read iteration count, best metric, worklog. Continue the loop from where it left off.
293
+
294
+ 3. **`state.json` exists AND timestamp > 24h** → Stale session. Archive: rename `state.json` → `state.json.prev`, `worklog.md` → `worklog.md.prev`. Start fresh.
295
+
296
+ 4. **Neither exists** → Fresh start. Run setup phase from scratch.
297
+
298
+ ### Resume Checklist
299
+
300
+ When resuming (cases 1 or 2):
301
+ - Read `state.json` for: iteration, current metric, best metric, threshold, consecutive_discards, pivot_count
302
+ - Read `worklog.md` for: what was tried, insights, what to try next
303
+ - Read `continue.md` (if exists) for: exact next action, decisions made, remaining steps
304
+ - Verify branch exists: `git branch --list {branch}`
305
+ - Run eval_command to confirm current metric matches state
306
+ - If metric diverged from state → update state, log discrepancy, continue
307
+
308
+ ### Supporting Hooks
309
+
310
+ These hooks assist with resume:
311
+ - **UserPromptSubmit**: Detects active loop (state.json present, not stale) and injects "you are in agentic-loop mode" context on every turn
312
+ - **PreCompact**: Before context compaction, injects "write continue.md and update state.json NOW"
313
+ - **Protocol Fingerprint Check**: Every 10 iterations, verify you remember the loop rules
314
+
315
+ ## Example Session Walkthrough
316
+
317
+ **Scenario:** Orchestrator asks to improve test pass rate from ~70% to 95%.
318
+
319
+ **Parameters received:**
320
+ - goal: "Improve test pass rate to 95%"
321
+ - eval_command: "pytest tests/ --tb=short 2>&1 | python parse_results.py"
322
+ - metric: "pass_rate"
323
+ - direction: "higher"
324
+ - threshold: 95
325
+ - max_iterations: 30
326
+ - files_in_scope: ["src/parser.py", "src/validator.py", "tests/"]
327
+ - branch: "improve/pass-rate-apr13"
328
+
329
+ **Setup:**
330
+ 1. Read `src/parser.py`, `src/validator.py`, all test files
331
+ 2. `git checkout -b improve/pass-rate-apr13`
332
+ 3. Run eval: `pytest tests/ --tb=short 2>&1 | python parse_results.py`
333
+ Output includes: `METRIC pass_rate=68.5`
334
+ 4. Write state.json (baseline=68.5), write worklog.md
335
+ 5. `git commit -m "baseline: pass_rate 68.5"`
336
+
337
+ **Iteration 1:**
338
+ - HYPOTHESIZE: Failing tests show TypeError on None input -- add null guard
339
+ - EDIT: Add `if value is None: return default` in `parser.py`
340
+ - EVALUATE: `METRIC pass_rate=74.2`
341
+ - DECIDE: 74.2 > 68.5 -> KEEP
342
+ - LOG: "Run 1: Add null guard in parser.py -- pass_rate=74.2 (KEEP)"
343
+ - Commit: `"improve: pass_rate 68.5->74.2"`
344
+
345
+ **Iteration 2:**
346
+ - HYPOTHESIZE: Remaining failures are in validator edge cases
347
+ - EDIT: Fix off-by-one in range check
348
+ - EVALUATE: `METRIC pass_rate=71.0`
349
+ - DECIDE: 71.0 < 74.2 -> DISCARD
350
+ - LOG: "Run 2: Fix off-by-one in validator range check -- pass_rate=71.0 (DISCARD)"
351
+ - `git checkout -- . && git clean -fd`
352
+
353
+ **Iteration 3:**
354
+ - HYPOTHESIZE: The range check fix broke other paths. Try fixing just the boundary condition.
355
+ - EDIT: Change `<` to `<=` in validator boundary
356
+ - EVALUATE: `METRIC pass_rate=79.8`
357
+ - DECIDE: 79.8 > 74.2 -> KEEP
358
+ - Commit: `"improve: pass_rate 74.2->79.8"`
359
+
360
+ ... (continues until pass_rate >= 95 or 30 iterations)
361
+
362
+ **Termination (threshold reached at iteration 18):**
363
+ - `git commit -m "final: pass_rate 68.5->95.3 in 18 iterations"`
364
+ - Write final state.json (status: "threshold_reached")
365
+ - Write summary in worklog.md
366
+ - Return `plan_status: "COMPLETE"` with verification passing
367
+
368
+ ## Protocol Fingerprint Check (every 10 iterations)
369
+
370
+ At iterations 10, 20, 30, etc., pause and:
371
+
372
+ 1. Re-read all `files_in_scope` -- the code has changed since setup
373
+ 2. Review the "What's Been Tried" section in worklog.md
374
+ 3. Update "What's Been Tried" with a summary of strategies so far
375
+ 4. Check: are you repeating approaches? Are there untried angles?
376
+ 5. Log the check in worklog.md as a separate entry
377
+
378
+ This prevents tunnel vision. After 10 iterations of micro-optimizations, re-reading the source fresh often reveals a structural improvement that the incremental mindset missed.
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: blog-writing
3
+ description: Use when writing, drafting, or publishing a blog article for metraton.github.io
4
+ metadata:
5
+ user-invocable: true
6
+ type: technique
7
+ ---
8
+
9
+ # Blog Writing
10
+
11
+ Jorge's blog (metraton.github.io) is where he thinks out loud about agentic systems, context engineering, and the intersection of architecture and AI. The articles are bilingual (English and Spanish), grounded in real experience, and written in first person. They are not corporate content -- they are reflections from someone building these systems daily.
12
+
13
+ ## The Writing Process
14
+
15
+ ### 1. Find the story first
16
+
17
+ Every article starts with something that actually happened -- a deployment that went sideways, a late-night refactor, a conversation that shifted your thinking. The story is the anchor. Without it, you are writing a tutorial, not an article.
18
+
19
+ Ask Jorge: "What happened recently that surprised you or changed how you think about something?" The best topics come from moments where the outcome was different from the expectation.
20
+
21
+ ### 2. Build the brief
22
+
23
+ Before writing a single paragraph, define: title, audience, core thesis (one sentence), and format. Jorge's natural format is **Strategic Insight** -- personal experience analyzed through a technical lens, ending with a transferable lesson.
24
+
25
+ The audience is engineers, solution architects, AI practitioners, and tech leaders. They do not need hand-holding but they appreciate honesty about what did not work.
26
+
27
+ ### 3. Draft in Markdown, iterate with Jorge
28
+
29
+ Write the first draft in Markdown at `/home/jorge/ws/me/<slug>.md`. Work section by section -- do not dump an entire draft and ask "what do you think?" Each section should be reviewed before moving to the next.
30
+
31
+ **Article structure** (not rigid, but this is Jorge's natural flow):
32
+ - Opening story -- what happened, told personally
33
+ - The problem -- what was broken or surprising
34
+ - Investigation -- what you looked into and found
35
+ - The shift -- the insight or reframe
36
+ - In practice -- what changed, concretely
37
+ - Results -- evidence it worked
38
+ - Closing thought -- punchy, memorable, one line
39
+
40
+ ### 4. Principles that matter
41
+
42
+ **Examples must be real.** Not "imagine a team that..." but "I was deploying to Cloud Run when..." If you cannot point to something that actually happened, the example does not belong.
43
+
44
+ **Each section adds something new.** Do not repeat the same example or insight across sections. If the investigation section already showed the problem, the "in practice" section should show the solution -- not restate the problem.
45
+
46
+ **Quotes add weight when grounded.** Citing Anthropic, Hinton, or other thought leaders works when the quote connects directly to the experience. A quote floating without context is decoration.
47
+
48
+ **Technical terms stay in English in both languages.** LLM, skills, agent, Cloud Run, Terraform -- these do not get translated.
49
+
50
+ **Closing lines are signatures.** "Built with context.", "Built with reasoning." -- short, confident, tied to the article's thesis.
51
+
52
+ ### 5. Convert to bilingual HTML
53
+
54
+ Once the Markdown draft is approved, convert to the bilingual HTML format. The Spanish version is not a mechanical translation -- it is natural Latin American Spanish, with the same voice and directness. Read `reference.md` for the HTML template and front matter structure.
55
+
56
+ Final HTML goes in: `/home/jorge/ws/me/metraton.github.io/_posts/YYYY-MM-DD-slug.html`
57
+
58
+ ### 6. Editorial review
59
+
60
+ Before publishing, pass through both language versions checking:
61
+ - Spelling, grammar, flow, and consistency
62
+ - HTML entities are correct (`&mdash;` `&rsquo;` `&eacute;` etc.)
63
+ - Technical terms stay in English in the Spanish version
64
+ - Gender consistency for borrowed terms ("los skills" not "las skills")
65
+ - No broken anglicisms ("marcar" not "flagear")
66
+ - Citations link to real, accessible URLs
67
+
68
+ ### 7. Visual verification
69
+
70
+ Ensure Jekyll is running locally (see `reference.md` for environment details). Preview at localhost:4000. Use Playwright to take screenshots at desktop (1280x900) and mobile (375x812). Check that all visual components render, no horizontal overflow, responsive breakpoints work.
71
+
72
+ ### 8. Publish
73
+
74
+ Commit and push to `master` in the blog repo. GitHub Pages deploys automatically.
75
+
76
+ ### 9. Live verification
77
+
78
+ Wait ~45s after push for GitHub Pages to build. Use Playwright to screenshot the live URL and compare against the localhost preview.
79
+
80
+ ### 10. LinkedIn post
81
+
82
+ Draft a sharing post: 1-3 sentence personal hook connecting to the article's insight, the link, and a bilingual P.D. See `reference.md` for the template. Conversational but technical tone, no aggressive hashtags -- the article preview image does the heavy lifting.
83
+
84
+ ## Jorge's Voice
85
+
86
+ - First person, always. "I was deploying..." not "The team deployed..."
87
+ - Honest about failures and iterations -- does not pretend things worked the first time
88
+ - Confident but not preachy. States what he found, not what everyone should do
89
+ - Direct. Short sentences when making a point. Longer when telling a story
90
+ - Latin American perspective -- references to the region's tech community are natural, not forced
91
+
92
+ ## Anti-Patterns
93
+
94
+ - Writing generic content that could appear on any corporate blog
95
+ - Translating English to Spanish mechanically instead of rewriting naturally
96
+ - Dumping an entire draft without iterating section by section
97
+ - Using hypothetical examples when real ones exist
98
+ - Repeating the same insight across multiple sections
@@ -0,0 +1,130 @@
1
+ # Blog Writing Reference
2
+
3
+ ## Blog Repository
4
+
5
+ - **Repo path:** `/home/jorge/ws/me/metraton.github.io/`
6
+ - **Site:** https://metraton.github.io/
7
+ - **Engine:** Jekyll static site, GitHub Pages hosted
8
+ - **Posts directory:** `_posts/`
9
+ - **Draft workspace:** `/home/jorge/ws/me/<slug>.md`
10
+
11
+ ## Front Matter Template
12
+
13
+ Every post requires this YAML front matter. All fields are mandatory for the bilingual layout to work correctly.
14
+
15
+ ```yaml
16
+ ---
17
+ layout: bilingual
18
+ title: "English Title Here"
19
+ title_en: "English Title Here"
20
+ title_es: "Spanish Title Here"
21
+ post_title_es: "Spanish Title Here"
22
+ date: YYYY-MM-DD
23
+ terminal_title: "jaguilar@github:~/posts$ cat slug-name"
24
+ terminal_title_es: "jaguilar@github:~/posts$ cat slug-name"
25
+ excerpt: "English excerpt -- one compelling sentence."
26
+ excerpt_es: "Spanish excerpt -- one compelling sentence."
27
+ ---
28
+ ```
29
+
30
+ **Notes:**
31
+ - `title` and `title_en` are always identical
32
+ - `title_es` and `post_title_es` are always identical
33
+ - `terminal_title` and `terminal_title_es` are usually the same (the cat command)
34
+ - `date` is the publication date in `YYYY-MM-DD` format
35
+ - Excerpts use HTML entities for special characters (e.g., `&eacute;` for accented characters in Spanish)
36
+ - Some older posts include `permalink:` -- newer posts rely on the filename for the URL
37
+
38
+ ## HTML Structure
39
+
40
+ The file is named `YYYY-MM-DD-slug.html` and placed in `_posts/`.
41
+
42
+ ```html
43
+ ---
44
+ (front matter as above)
45
+ ---
46
+
47
+ <div class="bilingual-content" lang="en" data-lang-section="en">
48
+ <!-- English content here -->
49
+ <!-- Use proper HTML entities: &mdash; &rsquo; &ldquo; &rdquo; etc. -->
50
+
51
+ <p class="closing-line"><em>Built with [theme]. Jorge Aguilar, 2025&ndash;2026.</em></p>
52
+ </div>
53
+ <div class="bilingual-content" lang="es" data-lang-section="es" hidden>
54
+ <!-- Spanish content here -->
55
+ <!-- Same structure as English, naturally rewritten -->
56
+
57
+ <p class="closing-line"><em>Construido con [tema]. Jorge Aguilar, 2025&ndash;2026.</em></p>
58
+ </div>
59
+ ```
60
+
61
+ **HTML conventions observed in existing posts:**
62
+ - Content is indented with 8 spaces (two levels inside the layout)
63
+ - Use `&mdash;` for em dashes, `&rsquo;` for apostrophes, `&ldquo;`/`&rdquo;` for quotes
64
+ - Use `&eacute;`, `&aacute;`, `&iacute;`, `&oacute;`, `&uacute;`, `&ntilde;` for Spanish accented characters
65
+ - Section headings are `<h2>`, subsection headings are `<h3>`
66
+ - Horizontal rules (`<hr />`) separate major sections
67
+ - Blockquotes (`<blockquote>`) are used for key insights and external quotes
68
+ - Code inline uses `<code>`, code blocks use `<pre><code>`
69
+ - The Spanish section has `hidden` attribute (JavaScript toggles it)
70
+ - The closing line uses `class="closing-line"` with `<em>` wrapper
71
+
72
+ ## Article Catalog
73
+
74
+ | Date | Slug | Status |
75
+ |------|------|--------|
76
+ | 2025-09-29 | context-design-agentic-deployment | PUBLISHED |
77
+ | 2025-11-01 | beyond-delegation-agentic-systems | PUBLISHED |
78
+ | 2026-04-02 | faster-development-orchestration | PUBLISHED |
79
+ | 2026-04-10 | writing-skills-that-actually-work | PUBLISHED |
80
+ | TBD | how-to-build-an-agent-identity | PENDING |
81
+
82
+ ## Environment & Tooling
83
+
84
+ | Resource | Location |
85
+ |----------|----------|
86
+ | Blog repo | `/home/jorge/ws/me/metraton.github.io/` |
87
+ | Jekyll server | `cd /home/jorge/ws/me/metraton.github.io && bash jekyll-loop.sh` (port 4000) |
88
+ | Playwright | `~/.cache/ms-playwright/`, requires `NODE_PATH=/home/jorge/ws/aaxis/rnd/node_modules` |
89
+ | Git branch | `master` (not main) |
90
+ | GitHub Pages | `https://metraton.github.io/` |
91
+
92
+ Check if Jekyll is running: `ps aux | grep jekyll`
93
+
94
+ ## Visual Components Catalog
95
+
96
+ All CSS lives inline in `_layouts/default.html` -- no external stylesheets.
97
+
98
+ | Component | CSS Class | When to Use |
99
+ |-----------|-----------|-------------|
100
+ | Before/After Grid | `.file-structure-demo` | Comparing old vs new approaches, code transformations |
101
+ | Card Grid | `.subagents-grid` / `.subagent-box` | Showing related concepts as cards (agents, types, categories) |
102
+ | Skills Grid | `.skills-grid` | 5-column card grid with optional `.lead-agent` header |
103
+ | Callout Box | `.callout` | Highlighted info, tips, key takeaways |
104
+ | Blockquote | `<blockquote>` | Editorial quotes, citations, reflective text |
105
+ | Chapter Layout | `.chapter` / `.chapter-layout` | Text + ASCII diagram side by side |
106
+ | Code Block | `<pre><code>` | Actual code, config files, terminal output |
107
+ | Table | `<table>` | Data comparison (note: limited CSS, consider cards instead) |
108
+
109
+ ## Publication
110
+
111
+ ```bash
112
+ cd /home/jorge/ws/me/metraton.github.io
113
+ git add _posts/YYYY-MM-DD-slug.html
114
+ git commit -m "Add: article title"
115
+ git push origin master
116
+ # GitHub Pages deploys automatically
117
+ ```
118
+
119
+ ## LinkedIn Post Template
120
+
121
+ ```
122
+ [1-3 sentence hook connecting to the article's core insight]
123
+
124
+ https://metraton.github.io/<slug>/
125
+
126
+ P.D.: Lo escribí en formato bilingüe (ES/EN), para que lo leas de la forma que prefieras.
127
+ ```
128
+
129
+ Tone: conversational but technical. No aggressive hashtags. The article preview image does the heavy lifting -- text just hooks.
130
+