@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.
- package/.claude-plugin/marketplace.json +33 -0
- package/.claude-plugin/plugin.json +26 -0
- package/ARCHITECTURE.md +335 -0
- package/CHANGELOG.md +1298 -0
- package/CODE_OF_CONDUCT.md +11 -0
- package/CONTRIBUTING.md +146 -0
- package/INSTALL.md +436 -0
- package/LICENSE +21 -0
- package/README.md +222 -0
- package/SECURITY.md +47 -0
- package/agents/README.md +78 -0
- package/agents/cloud-troubleshooter.md +73 -0
- package/agents/developer.md +65 -0
- package/agents/gaia-operator.md +64 -0
- package/agents/gaia-orchestrator.md +111 -0
- package/agents/gaia-planner.md +53 -0
- package/agents/gaia-system.md +71 -0
- package/agents/gitops-operator.md +61 -0
- package/agents/terraform-architect.md +63 -0
- package/bin/README.md +106 -0
- package/bin/cli/__init__.py +1 -0
- package/bin/cli/approvals.py +740 -0
- package/bin/cli/cleanup.py +562 -0
- package/bin/cli/context.py +283 -0
- package/bin/cli/doctor.py +651 -0
- package/bin/cli/history.py +305 -0
- package/bin/cli/memory.py +483 -0
- package/bin/cli/metrics.py +1068 -0
- package/bin/cli/plans.py +515 -0
- package/bin/cli/status.py +302 -0
- package/bin/cli/update.py +382 -0
- package/bin/gaia +112 -0
- package/bin/gaia-cleanup.js +531 -0
- package/bin/gaia-doctor.js +635 -0
- package/bin/gaia-evidence +126 -0
- package/bin/gaia-history.js +251 -0
- package/bin/gaia-metrics.js +1278 -0
- package/bin/gaia-review.js +269 -0
- package/bin/gaia-scan +44 -0
- package/bin/gaia-scan.py +589 -0
- package/bin/gaia-skills-diagnose.js +929 -0
- package/bin/gaia-status.js +278 -0
- package/bin/gaia-uninstall.js +111 -0
- package/bin/gaia-update.js +919 -0
- package/bin/pre-publish-validate.js +610 -0
- package/bin/python-detect.js +60 -0
- package/bin/validate-sandbox.sh +601 -0
- package/commands/README.md +64 -0
- package/commands/gaia.md +37 -0
- package/commands/scan-project.md +67 -0
- package/config/README.md +71 -0
- package/config/cloud/aws.json +134 -0
- package/config/cloud/gcp.json +139 -0
- package/config/context-contracts.json +158 -0
- package/config/crons-schema.md +81 -0
- package/config/git_standards.json +72 -0
- package/config/surface-routing.json +417 -0
- package/config/universal-rules.json +102 -0
- package/dist/gaia-ops/.claude-plugin/plugin.json +24 -0
- package/dist/gaia-ops/README.md +80 -0
- package/dist/gaia-ops/agents/cloud-troubleshooter.md +73 -0
- package/dist/gaia-ops/agents/developer.md +65 -0
- package/dist/gaia-ops/agents/gaia-operator.md +64 -0
- package/dist/gaia-ops/agents/gaia-orchestrator.md +111 -0
- package/dist/gaia-ops/agents/gaia-planner.md +53 -0
- package/dist/gaia-ops/agents/gaia-system.md +71 -0
- package/dist/gaia-ops/agents/gitops-operator.md +61 -0
- package/dist/gaia-ops/agents/terraform-architect.md +63 -0
- package/dist/gaia-ops/commands/gaia.md +37 -0
- package/dist/gaia-ops/config/README.md +71 -0
- package/dist/gaia-ops/config/cloud/aws.json +134 -0
- package/dist/gaia-ops/config/cloud/gcp.json +139 -0
- package/dist/gaia-ops/config/context-contracts.json +158 -0
- package/dist/gaia-ops/config/crons-schema.md +81 -0
- package/dist/gaia-ops/config/git_standards.json +72 -0
- package/dist/gaia-ops/config/surface-routing.json +417 -0
- package/dist/gaia-ops/config/universal-rules.json +102 -0
- package/dist/gaia-ops/hooks/adapters/__init__.py +52 -0
- package/dist/gaia-ops/hooks/adapters/base.py +219 -0
- package/dist/gaia-ops/hooks/adapters/channel.py +17 -0
- package/dist/gaia-ops/hooks/adapters/claude_code.py +1890 -0
- package/dist/gaia-ops/hooks/adapters/types.py +194 -0
- package/dist/gaia-ops/hooks/adapters/utils.py +25 -0
- package/dist/gaia-ops/hooks/hooks.json +192 -0
- package/dist/gaia-ops/hooks/modules/__init__.py +15 -0
- package/dist/gaia-ops/hooks/modules/agents/__init__.py +29 -0
- package/dist/gaia-ops/hooks/modules/agents/contract_validator.py +647 -0
- package/dist/gaia-ops/hooks/modules/agents/response_contract.py +496 -0
- package/dist/gaia-ops/hooks/modules/agents/skill_injection_verifier.py +120 -0
- package/dist/gaia-ops/hooks/modules/agents/state_tracker.py +267 -0
- package/dist/gaia-ops/hooks/modules/agents/task_info_builder.py +74 -0
- package/dist/gaia-ops/hooks/modules/agents/transcript_analyzer.py +458 -0
- package/dist/gaia-ops/hooks/modules/agents/transcript_reader.py +152 -0
- package/dist/gaia-ops/hooks/modules/audit/__init__.py +28 -0
- package/dist/gaia-ops/hooks/modules/audit/event_detector.py +168 -0
- package/dist/gaia-ops/hooks/modules/audit/logger.py +131 -0
- package/dist/gaia-ops/hooks/modules/audit/metrics.py +134 -0
- package/dist/gaia-ops/hooks/modules/audit/workflow_auditor.py +611 -0
- package/dist/gaia-ops/hooks/modules/audit/workflow_recorder.py +296 -0
- package/dist/gaia-ops/hooks/modules/context/__init__.py +11 -0
- package/dist/gaia-ops/hooks/modules/context/agentic_loop_detector.py +165 -0
- package/dist/gaia-ops/hooks/modules/context/anchor_tracker.py +317 -0
- package/dist/gaia-ops/hooks/modules/context/compact_context_builder.py +218 -0
- package/dist/gaia-ops/hooks/modules/context/context_freshness.py +145 -0
- package/dist/gaia-ops/hooks/modules/context/context_injector.py +558 -0
- package/dist/gaia-ops/hooks/modules/context/context_writer.py +530 -0
- package/dist/gaia-ops/hooks/modules/context/contracts_loader.py +161 -0
- package/dist/gaia-ops/hooks/modules/core/__init__.py +40 -0
- package/dist/gaia-ops/hooks/modules/core/hook_entry.py +78 -0
- package/dist/gaia-ops/hooks/modules/core/paths.py +160 -0
- package/dist/gaia-ops/hooks/modules/core/plugin_mode.py +149 -0
- package/dist/gaia-ops/hooks/modules/core/plugin_setup.py +577 -0
- package/dist/gaia-ops/hooks/modules/core/state.py +179 -0
- package/dist/gaia-ops/hooks/modules/core/stdin.py +24 -0
- package/dist/gaia-ops/hooks/modules/events/__init__.py +1 -0
- package/dist/gaia-ops/hooks/modules/events/event_writer.py +210 -0
- package/dist/gaia-ops/hooks/modules/memory/__init__.py +8 -0
- package/dist/gaia-ops/hooks/modules/memory/episode_writer.py +216 -0
- package/dist/gaia-ops/hooks/modules/orchestrator/__init__.py +1 -0
- package/dist/gaia-ops/hooks/modules/orchestrator/delegate_mode.py +122 -0
- package/dist/gaia-ops/hooks/modules/scanning/__init__.py +8 -0
- package/dist/gaia-ops/hooks/modules/scanning/scan_trigger.py +84 -0
- package/dist/gaia-ops/hooks/modules/security/__init__.py +120 -0
- package/dist/gaia-ops/hooks/modules/security/approval_cleanup.py +87 -0
- package/dist/gaia-ops/hooks/modules/security/approval_constants.py +23 -0
- package/dist/gaia-ops/hooks/modules/security/approval_grants.py +1638 -0
- package/dist/gaia-ops/hooks/modules/security/approval_messages.py +71 -0
- package/dist/gaia-ops/hooks/modules/security/approval_scopes.py +222 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_commands.py +595 -0
- package/dist/gaia-ops/hooks/modules/security/blocked_message_formatter.py +87 -0
- package/dist/gaia-ops/hooks/modules/security/command_semantics.py +181 -0
- package/dist/gaia-ops/hooks/modules/security/composition_rules.py +547 -0
- package/dist/gaia-ops/hooks/modules/security/flag_classifiers.py +873 -0
- package/dist/gaia-ops/hooks/modules/security/gitops_validator.py +179 -0
- package/dist/gaia-ops/hooks/modules/security/mutative_verbs.py +1131 -0
- package/dist/gaia-ops/hooks/modules/security/network_hosts.py +481 -0
- package/dist/gaia-ops/hooks/modules/security/prompt_validator.py +40 -0
- package/dist/gaia-ops/hooks/modules/security/shell_unwrapper.py +165 -0
- package/dist/gaia-ops/hooks/modules/security/tiers.py +196 -0
- package/dist/gaia-ops/hooks/modules/session/__init__.py +10 -0
- package/dist/gaia-ops/hooks/modules/session/pending_scanner.py +174 -0
- package/dist/gaia-ops/hooks/modules/session/session_context_writer.py +100 -0
- package/dist/gaia-ops/hooks/modules/session/session_event_injector.py +160 -0
- package/dist/gaia-ops/hooks/modules/session/session_manager.py +31 -0
- package/dist/gaia-ops/hooks/modules/session/session_registry.py +333 -0
- package/dist/gaia-ops/hooks/modules/tools/__init__.py +29 -0
- package/dist/gaia-ops/hooks/modules/tools/bash_validator.py +1008 -0
- package/dist/gaia-ops/hooks/modules/tools/cloud_pipe_validator.py +231 -0
- package/dist/gaia-ops/hooks/modules/tools/hook_response.py +55 -0
- package/dist/gaia-ops/hooks/modules/tools/shell_parser.py +227 -0
- package/dist/gaia-ops/hooks/modules/tools/stage_decomposer.py +315 -0
- package/dist/gaia-ops/hooks/modules/tools/task_validator.py +294 -0
- package/dist/gaia-ops/hooks/modules/validation/__init__.py +23 -0
- package/dist/gaia-ops/hooks/modules/validation/commit_validator.py +380 -0
- package/dist/gaia-ops/hooks/post_compact.py +43 -0
- package/dist/gaia-ops/hooks/post_tool_use.py +54 -0
- package/dist/gaia-ops/hooks/pre_compact.py +60 -0
- package/dist/gaia-ops/hooks/pre_tool_use.py +413 -0
- package/dist/gaia-ops/hooks/session_end_hook.py +77 -0
- package/dist/gaia-ops/hooks/session_start.py +81 -0
- package/dist/gaia-ops/hooks/stop_hook.py +70 -0
- package/dist/gaia-ops/hooks/subagent_start.py +71 -0
- package/dist/gaia-ops/hooks/subagent_stop.py +295 -0
- package/dist/gaia-ops/hooks/task_completed.py +70 -0
- package/dist/gaia-ops/hooks/user_prompt_submit.py +246 -0
- package/dist/gaia-ops/settings.json +72 -0
- package/dist/gaia-ops/skills/README.md +158 -0
- package/dist/gaia-ops/skills/agent-creation/SKILL.md +87 -0
- package/dist/gaia-ops/skills/agent-creation/examples.md +170 -0
- package/dist/gaia-ops/skills/agent-creation/reference.md +191 -0
- package/dist/gaia-ops/skills/agent-protocol/SKILL.md +93 -0
- package/dist/gaia-ops/skills/agent-protocol/examples.md +223 -0
- package/dist/gaia-ops/skills/agent-response/SKILL.md +69 -0
- package/dist/gaia-ops/skills/agentic-loop/SKILL.md +80 -0
- package/dist/gaia-ops/skills/agentic-loop/reference.md +378 -0
- package/dist/gaia-ops/skills/blog-writing/SKILL.md +98 -0
- package/dist/gaia-ops/skills/blog-writing/reference.md +130 -0
- package/dist/gaia-ops/skills/brief-spec/SKILL.md +185 -0
- package/dist/gaia-ops/skills/command-execution/SKILL.md +64 -0
- package/dist/gaia-ops/skills/command-execution/reference.md +83 -0
- package/dist/gaia-ops/skills/context-updater/SKILL.md +87 -0
- package/dist/gaia-ops/skills/context-updater/examples.md +71 -0
- package/dist/gaia-ops/skills/developer-patterns/SKILL.md +50 -0
- package/dist/gaia-ops/skills/developer-patterns/reference.md +112 -0
- package/dist/gaia-ops/skills/execution/SKILL.md +99 -0
- package/dist/gaia-ops/skills/fast-queries/SKILL.md +43 -0
- package/dist/gaia-ops/skills/gaia-compact/SKILL.md +74 -0
- package/dist/gaia-ops/skills/gaia-patterns/SKILL.md +108 -0
- package/dist/gaia-ops/skills/gaia-patterns/reference.md +395 -0
- package/dist/gaia-ops/skills/gaia-planner/SKILL.md +37 -0
- package/dist/gaia-ops/skills/gaia-planner/reference.md +107 -0
- package/dist/gaia-ops/skills/gaia-release/SKILL.md +85 -0
- package/dist/gaia-ops/skills/gaia-release/reference.md +92 -0
- package/dist/gaia-ops/skills/gaia-self-check/SKILL.md +114 -0
- package/dist/gaia-ops/skills/gaia-self-check/reference.md +453 -0
- package/dist/gaia-ops/skills/gaia-verify/SKILL.md +77 -0
- package/dist/gaia-ops/skills/gaia-verify/reference.md +80 -0
- package/dist/gaia-ops/skills/git-conventions/SKILL.md +47 -0
- package/dist/gaia-ops/skills/gitops-patterns/SKILL.md +60 -0
- package/dist/gaia-ops/skills/gitops-patterns/reference.md +183 -0
- package/dist/gaia-ops/skills/gmail-policy/SKILL.md +200 -0
- package/dist/gaia-ops/skills/gmail-policy/reference.md +150 -0
- package/dist/gaia-ops/skills/gmail-triage/SKILL.md +100 -0
- package/dist/gaia-ops/skills/gws-setup/SKILL.md +99 -0
- package/dist/gaia-ops/skills/gws-setup/reference.md +73 -0
- package/dist/gaia-ops/skills/investigation/SKILL.md +100 -0
- package/dist/gaia-ops/skills/memory-curation/SKILL.md +83 -0
- package/dist/gaia-ops/skills/memory-search/SKILL.md +88 -0
- package/dist/gaia-ops/skills/orchestrator-approval/SKILL.md +160 -0
- package/dist/gaia-ops/skills/orchestrator-approval/reference.md +174 -0
- package/dist/gaia-ops/skills/pending-approvals/SKILL.md +72 -0
- package/dist/gaia-ops/skills/pending-approvals/reference.md +214 -0
- package/dist/gaia-ops/skills/readme-writing/SKILL.md +71 -0
- package/dist/gaia-ops/skills/readme-writing/reference.md +188 -0
- package/dist/gaia-ops/skills/reference.md +135 -0
- package/dist/gaia-ops/skills/request-approval/SKILL.md +140 -0
- package/dist/gaia-ops/skills/request-approval/examples.md +140 -0
- package/dist/gaia-ops/skills/request-approval/reference.md +57 -0
- package/dist/gaia-ops/skills/schedule-task/SKILL.md +64 -0
- package/dist/gaia-ops/skills/schedule-task/reference.md +233 -0
- package/dist/gaia-ops/skills/security-tiers/SKILL.md +141 -0
- package/dist/gaia-ops/skills/security-tiers/destructive-commands-reference.md +623 -0
- package/dist/gaia-ops/skills/security-tiers/reference.md +39 -0
- package/dist/gaia-ops/skills/session-reflection/SKILL.md +69 -0
- package/dist/gaia-ops/skills/skill-creation/SKILL.md +92 -0
- package/dist/gaia-ops/skills/skill-creation/reference.md +29 -0
- package/dist/gaia-ops/skills/terraform-patterns/SKILL.md +89 -0
- package/dist/gaia-ops/skills/terraform-patterns/reference.md +93 -0
- package/dist/gaia-ops/tools/__init__.py +9 -0
- package/dist/gaia-ops/tools/agentic-loop/decide-status.py +210 -0
- package/dist/gaia-ops/tools/agentic-loop/parse-metric.py +106 -0
- package/dist/gaia-ops/tools/agentic-loop/record-iteration.py +221 -0
- package/dist/gaia-ops/tools/context/README.md +132 -0
- package/dist/gaia-ops/tools/context/__init__.py +42 -0
- package/dist/gaia-ops/tools/context/_paths.py +20 -0
- package/dist/gaia-ops/tools/context/context_provider.py +721 -0
- package/dist/gaia-ops/tools/context/context_section_reader.py +342 -0
- package/dist/gaia-ops/tools/context/deep_merge.py +159 -0
- package/dist/gaia-ops/tools/context/pending_updates.py +760 -0
- package/dist/gaia-ops/tools/context/surface_router.py +278 -0
- package/dist/gaia-ops/tools/fast-queries/README.md +65 -0
- package/dist/gaia-ops/tools/fast-queries/__init__.py +30 -0
- package/dist/gaia-ops/tools/fast-queries/appservices/quicktriage_devops_developer.sh +75 -0
- package/dist/gaia-ops/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +32 -0
- package/dist/gaia-ops/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +88 -0
- package/dist/gaia-ops/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +48 -0
- package/dist/gaia-ops/tools/fast-queries/run_triage.sh +59 -0
- package/dist/gaia-ops/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +80 -0
- package/dist/gaia-ops/tools/gaia_simulator/__init__.py +33 -0
- package/dist/gaia-ops/tools/gaia_simulator/cli.py +354 -0
- package/dist/gaia-ops/tools/gaia_simulator/extractor.py +457 -0
- package/dist/gaia-ops/tools/gaia_simulator/reporter.py +258 -0
- package/dist/gaia-ops/tools/gaia_simulator/routing_simulator.py +334 -0
- package/dist/gaia-ops/tools/gaia_simulator/runner.py +539 -0
- package/dist/gaia-ops/tools/gaia_simulator/skills_mapper.py +264 -0
- package/dist/gaia-ops/tools/memory/README.md +0 -0
- package/dist/gaia-ops/tools/memory/__init__.py +20 -0
- package/dist/gaia-ops/tools/memory/backfill_fts5.py +107 -0
- package/dist/gaia-ops/tools/memory/conflict_detector.py +295 -0
- package/dist/gaia-ops/tools/memory/episodic.py +1210 -0
- package/dist/gaia-ops/tools/memory/git_invalidator.py +262 -0
- package/dist/gaia-ops/tools/memory/paths.py +102 -0
- package/dist/gaia-ops/tools/memory/scoring.py +193 -0
- package/dist/gaia-ops/tools/memory/search_store.py +375 -0
- package/dist/gaia-ops/tools/persist_transcript_analysis.py +85 -0
- package/dist/gaia-ops/tools/review/__init__.py +1 -0
- package/dist/gaia-ops/tools/review/review_engine.py +157 -0
- package/dist/gaia-ops/tools/scan/__init__.py +35 -0
- package/dist/gaia-ops/tools/scan/config.py +247 -0
- package/dist/gaia-ops/tools/scan/merge.py +212 -0
- package/dist/gaia-ops/tools/scan/orchestrator.py +549 -0
- package/dist/gaia-ops/tools/scan/registry.py +127 -0
- package/dist/gaia-ops/tools/scan/scanners/__init__.py +18 -0
- package/dist/gaia-ops/tools/scan/scanners/base.py +137 -0
- package/dist/gaia-ops/tools/scan/scanners/environment.py +349 -0
- package/dist/gaia-ops/tools/scan/scanners/git.py +570 -0
- package/dist/gaia-ops/tools/scan/scanners/infrastructure.py +875 -0
- package/dist/gaia-ops/tools/scan/scanners/orchestration.py +600 -0
- package/dist/gaia-ops/tools/scan/scanners/stack.py +1085 -0
- package/dist/gaia-ops/tools/scan/scanners/tools.py +260 -0
- package/dist/gaia-ops/tools/scan/setup.py +686 -0
- package/dist/gaia-ops/tools/scan/tests/__init__.py +1 -0
- package/dist/gaia-ops/tools/scan/tests/conftest.py +796 -0
- package/dist/gaia-ops/tools/scan/tests/test_environment.py +323 -0
- package/dist/gaia-ops/tools/scan/tests/test_git.py +419 -0
- package/dist/gaia-ops/tools/scan/tests/test_infrastructure.py +382 -0
- package/dist/gaia-ops/tools/scan/tests/test_integration.py +920 -0
- package/dist/gaia-ops/tools/scan/tests/test_merge.py +269 -0
- package/dist/gaia-ops/tools/scan/tests/test_orchestration.py +304 -0
- package/dist/gaia-ops/tools/scan/tests/test_stack.py +604 -0
- package/dist/gaia-ops/tools/scan/tests/test_tools.py +349 -0
- package/dist/gaia-ops/tools/scan/ui.py +624 -0
- package/dist/gaia-ops/tools/scan/verify.py +270 -0
- package/dist/gaia-ops/tools/scan/walk.py +118 -0
- package/dist/gaia-ops/tools/scan/workspace.py +85 -0
- package/dist/gaia-ops/tools/validation/README.md +244 -0
- package/dist/gaia-ops/tools/validation/__init__.py +17 -0
- package/dist/gaia-ops/tools/validation/approval_gate.py +321 -0
- package/dist/gaia-ops/tools/validation/validate_skills.py +189 -0
- package/dist/gaia-security/.claude-plugin/plugin.json +24 -0
- package/dist/gaia-security/README.md +90 -0
- package/dist/gaia-security/config/universal-rules.json +102 -0
- package/dist/gaia-security/hooks/adapters/__init__.py +52 -0
- package/dist/gaia-security/hooks/adapters/base.py +219 -0
- package/dist/gaia-security/hooks/adapters/channel.py +17 -0
- package/dist/gaia-security/hooks/adapters/claude_code.py +1890 -0
- package/dist/gaia-security/hooks/adapters/types.py +194 -0
- package/dist/gaia-security/hooks/adapters/utils.py +25 -0
- package/dist/gaia-security/hooks/hooks.json +113 -0
- package/dist/gaia-security/hooks/modules/__init__.py +15 -0
- package/dist/gaia-security/hooks/modules/agents/__init__.py +29 -0
- package/dist/gaia-security/hooks/modules/agents/contract_validator.py +647 -0
- package/dist/gaia-security/hooks/modules/agents/response_contract.py +496 -0
- package/dist/gaia-security/hooks/modules/agents/skill_injection_verifier.py +120 -0
- package/dist/gaia-security/hooks/modules/agents/state_tracker.py +267 -0
- package/dist/gaia-security/hooks/modules/agents/task_info_builder.py +74 -0
- package/dist/gaia-security/hooks/modules/agents/transcript_analyzer.py +458 -0
- package/dist/gaia-security/hooks/modules/agents/transcript_reader.py +152 -0
- package/dist/gaia-security/hooks/modules/audit/__init__.py +28 -0
- package/dist/gaia-security/hooks/modules/audit/event_detector.py +168 -0
- package/dist/gaia-security/hooks/modules/audit/logger.py +131 -0
- package/dist/gaia-security/hooks/modules/audit/metrics.py +134 -0
- package/dist/gaia-security/hooks/modules/audit/workflow_auditor.py +611 -0
- package/dist/gaia-security/hooks/modules/audit/workflow_recorder.py +296 -0
- package/dist/gaia-security/hooks/modules/context/__init__.py +11 -0
- package/dist/gaia-security/hooks/modules/context/agentic_loop_detector.py +165 -0
- package/dist/gaia-security/hooks/modules/context/anchor_tracker.py +317 -0
- package/dist/gaia-security/hooks/modules/context/compact_context_builder.py +218 -0
- package/dist/gaia-security/hooks/modules/context/context_freshness.py +145 -0
- package/dist/gaia-security/hooks/modules/context/context_injector.py +558 -0
- package/dist/gaia-security/hooks/modules/context/context_writer.py +530 -0
- package/dist/gaia-security/hooks/modules/context/contracts_loader.py +161 -0
- package/dist/gaia-security/hooks/modules/core/__init__.py +40 -0
- package/dist/gaia-security/hooks/modules/core/hook_entry.py +78 -0
- package/dist/gaia-security/hooks/modules/core/paths.py +160 -0
- package/dist/gaia-security/hooks/modules/core/plugin_mode.py +149 -0
- package/dist/gaia-security/hooks/modules/core/plugin_setup.py +577 -0
- package/dist/gaia-security/hooks/modules/core/state.py +179 -0
- package/dist/gaia-security/hooks/modules/core/stdin.py +24 -0
- package/dist/gaia-security/hooks/modules/events/__init__.py +1 -0
- package/dist/gaia-security/hooks/modules/events/event_writer.py +210 -0
- package/dist/gaia-security/hooks/modules/memory/__init__.py +8 -0
- package/dist/gaia-security/hooks/modules/memory/episode_writer.py +216 -0
- package/dist/gaia-security/hooks/modules/orchestrator/__init__.py +1 -0
- package/dist/gaia-security/hooks/modules/orchestrator/delegate_mode.py +122 -0
- package/dist/gaia-security/hooks/modules/scanning/__init__.py +8 -0
- package/dist/gaia-security/hooks/modules/scanning/scan_trigger.py +84 -0
- package/dist/gaia-security/hooks/modules/security/__init__.py +120 -0
- package/dist/gaia-security/hooks/modules/security/approval_cleanup.py +87 -0
- package/dist/gaia-security/hooks/modules/security/approval_constants.py +23 -0
- package/dist/gaia-security/hooks/modules/security/approval_grants.py +1638 -0
- package/dist/gaia-security/hooks/modules/security/approval_messages.py +71 -0
- package/dist/gaia-security/hooks/modules/security/approval_scopes.py +222 -0
- package/dist/gaia-security/hooks/modules/security/blocked_commands.py +595 -0
- package/dist/gaia-security/hooks/modules/security/blocked_message_formatter.py +87 -0
- package/dist/gaia-security/hooks/modules/security/command_semantics.py +181 -0
- package/dist/gaia-security/hooks/modules/security/composition_rules.py +547 -0
- package/dist/gaia-security/hooks/modules/security/flag_classifiers.py +873 -0
- package/dist/gaia-security/hooks/modules/security/gitops_validator.py +179 -0
- package/dist/gaia-security/hooks/modules/security/mutative_verbs.py +1131 -0
- package/dist/gaia-security/hooks/modules/security/network_hosts.py +481 -0
- package/dist/gaia-security/hooks/modules/security/prompt_validator.py +40 -0
- package/dist/gaia-security/hooks/modules/security/shell_unwrapper.py +165 -0
- package/dist/gaia-security/hooks/modules/security/tiers.py +196 -0
- package/dist/gaia-security/hooks/modules/session/__init__.py +10 -0
- package/dist/gaia-security/hooks/modules/session/pending_scanner.py +174 -0
- package/dist/gaia-security/hooks/modules/session/session_context_writer.py +100 -0
- package/dist/gaia-security/hooks/modules/session/session_event_injector.py +160 -0
- package/dist/gaia-security/hooks/modules/session/session_manager.py +31 -0
- package/dist/gaia-security/hooks/modules/session/session_registry.py +333 -0
- package/dist/gaia-security/hooks/modules/tools/__init__.py +29 -0
- package/dist/gaia-security/hooks/modules/tools/bash_validator.py +1008 -0
- package/dist/gaia-security/hooks/modules/tools/cloud_pipe_validator.py +231 -0
- package/dist/gaia-security/hooks/modules/tools/hook_response.py +55 -0
- package/dist/gaia-security/hooks/modules/tools/shell_parser.py +227 -0
- package/dist/gaia-security/hooks/modules/tools/stage_decomposer.py +315 -0
- package/dist/gaia-security/hooks/modules/tools/task_validator.py +294 -0
- package/dist/gaia-security/hooks/modules/validation/__init__.py +23 -0
- package/dist/gaia-security/hooks/modules/validation/commit_validator.py +380 -0
- package/dist/gaia-security/hooks/post_tool_use.py +54 -0
- package/dist/gaia-security/hooks/pre_tool_use.py +413 -0
- package/dist/gaia-security/hooks/session_end_hook.py +77 -0
- package/dist/gaia-security/hooks/session_start.py +81 -0
- package/dist/gaia-security/hooks/stop_hook.py +70 -0
- package/dist/gaia-security/hooks/user_prompt_submit.py +246 -0
- package/dist/gaia-security/settings.json +58 -0
- package/git-hooks/commit-msg +41 -0
- package/hooks/README.md +100 -0
- package/hooks/adapters/__init__.py +52 -0
- package/hooks/adapters/base.py +219 -0
- package/hooks/adapters/channel.py +17 -0
- package/hooks/adapters/claude_code.py +1890 -0
- package/hooks/adapters/types.py +194 -0
- package/hooks/adapters/utils.py +25 -0
- package/hooks/elicitation_result.py +179 -0
- package/hooks/hooks.json +84 -0
- package/hooks/modules/README.md +189 -0
- package/hooks/modules/__init__.py +15 -0
- package/hooks/modules/agents/__init__.py +29 -0
- package/hooks/modules/agents/contract_validator.py +647 -0
- package/hooks/modules/agents/response_contract.py +496 -0
- package/hooks/modules/agents/skill_injection_verifier.py +120 -0
- package/hooks/modules/agents/state_tracker.py +267 -0
- package/hooks/modules/agents/task_info_builder.py +74 -0
- package/hooks/modules/agents/transcript_analyzer.py +458 -0
- package/hooks/modules/agents/transcript_reader.py +152 -0
- package/hooks/modules/audit/__init__.py +28 -0
- package/hooks/modules/audit/event_detector.py +168 -0
- package/hooks/modules/audit/logger.py +131 -0
- package/hooks/modules/audit/metrics.py +134 -0
- package/hooks/modules/audit/workflow_auditor.py +611 -0
- package/hooks/modules/audit/workflow_recorder.py +296 -0
- package/hooks/modules/context/__init__.py +11 -0
- package/hooks/modules/context/agentic_loop_detector.py +165 -0
- package/hooks/modules/context/anchor_tracker.py +317 -0
- package/hooks/modules/context/compact_context_builder.py +218 -0
- package/hooks/modules/context/context_freshness.py +145 -0
- package/hooks/modules/context/context_injector.py +558 -0
- package/hooks/modules/context/context_writer.py +530 -0
- package/hooks/modules/context/contracts_loader.py +161 -0
- package/hooks/modules/core/__init__.py +40 -0
- package/hooks/modules/core/hook_entry.py +78 -0
- package/hooks/modules/core/paths.py +160 -0
- package/hooks/modules/core/plugin_mode.py +149 -0
- package/hooks/modules/core/plugin_setup.py +577 -0
- package/hooks/modules/core/state.py +179 -0
- package/hooks/modules/core/stdin.py +24 -0
- package/hooks/modules/events/__init__.py +1 -0
- package/hooks/modules/events/event_writer.py +210 -0
- package/hooks/modules/evidence/__init__.py +34 -0
- package/hooks/modules/evidence/assertions.py +137 -0
- package/hooks/modules/evidence/index_writer.py +57 -0
- package/hooks/modules/evidence/loader.py +126 -0
- package/hooks/modules/evidence/runner.py +241 -0
- package/hooks/modules/memory/__init__.py +8 -0
- package/hooks/modules/memory/episode_writer.py +216 -0
- package/hooks/modules/orchestrator/__init__.py +1 -0
- package/hooks/modules/orchestrator/delegate_mode.py +122 -0
- package/hooks/modules/scanning/__init__.py +8 -0
- package/hooks/modules/scanning/scan_trigger.py +84 -0
- package/hooks/modules/security/__init__.py +120 -0
- package/hooks/modules/security/approval_cleanup.py +87 -0
- package/hooks/modules/security/approval_constants.py +23 -0
- package/hooks/modules/security/approval_grants.py +1638 -0
- package/hooks/modules/security/approval_messages.py +71 -0
- package/hooks/modules/security/approval_scopes.py +222 -0
- package/hooks/modules/security/blocked_commands.py +595 -0
- package/hooks/modules/security/blocked_message_formatter.py +87 -0
- package/hooks/modules/security/command_semantics.py +181 -0
- package/hooks/modules/security/composition_rules.py +547 -0
- package/hooks/modules/security/flag_classifiers.py +873 -0
- package/hooks/modules/security/gitops_validator.py +179 -0
- package/hooks/modules/security/mutative_verbs.py +1131 -0
- package/hooks/modules/security/network_hosts.py +481 -0
- package/hooks/modules/security/prompt_validator.py +40 -0
- package/hooks/modules/security/shell_unwrapper.py +165 -0
- package/hooks/modules/security/tiers.py +196 -0
- package/hooks/modules/session/__init__.py +10 -0
- package/hooks/modules/session/pending_scanner.py +174 -0
- package/hooks/modules/session/session_context_writer.py +100 -0
- package/hooks/modules/session/session_event_injector.py +160 -0
- package/hooks/modules/session/session_manager.py +31 -0
- package/hooks/modules/session/session_registry.py +333 -0
- package/hooks/modules/tools/__init__.py +29 -0
- package/hooks/modules/tools/bash_validator.py +1008 -0
- package/hooks/modules/tools/cloud_pipe_validator.py +231 -0
- package/hooks/modules/tools/hook_response.py +55 -0
- package/hooks/modules/tools/shell_parser.py +227 -0
- package/hooks/modules/tools/stage_decomposer.py +315 -0
- package/hooks/modules/tools/task_validator.py +294 -0
- package/hooks/modules/validation/__init__.py +23 -0
- package/hooks/modules/validation/commit_validator.py +380 -0
- package/hooks/post_compact.py +43 -0
- package/hooks/post_tool_use.py +54 -0
- package/hooks/pre_compact.py +60 -0
- package/hooks/pre_tool_use.py +413 -0
- package/hooks/session_end_hook.py +77 -0
- package/hooks/session_start.py +81 -0
- package/hooks/stop_hook.py +70 -0
- package/hooks/subagent_start.py +71 -0
- package/hooks/subagent_stop.py +295 -0
- package/hooks/task_completed.py +70 -0
- package/hooks/user_prompt_submit.py +246 -0
- package/index.js +83 -0
- package/package.json +103 -0
- package/pyproject.toml +32 -0
- package/skills/README.md +158 -0
- package/skills/agent-creation/SKILL.md +87 -0
- package/skills/agent-creation/examples.md +170 -0
- package/skills/agent-creation/reference.md +191 -0
- package/skills/agent-protocol/SKILL.md +93 -0
- package/skills/agent-protocol/examples.md +223 -0
- package/skills/agent-response/SKILL.md +69 -0
- package/skills/agentic-loop/SKILL.md +80 -0
- package/skills/agentic-loop/reference.md +378 -0
- package/skills/blog-writing/SKILL.md +98 -0
- package/skills/blog-writing/reference.md +130 -0
- package/skills/brief-spec/SKILL.md +185 -0
- package/skills/command-execution/SKILL.md +64 -0
- package/skills/command-execution/reference.md +83 -0
- package/skills/context-updater/SKILL.md +87 -0
- package/skills/context-updater/examples.md +71 -0
- package/skills/developer-patterns/SKILL.md +50 -0
- package/skills/developer-patterns/reference.md +112 -0
- package/skills/execution/SKILL.md +99 -0
- package/skills/fast-queries/SKILL.md +43 -0
- package/skills/gaia-compact/SKILL.md +74 -0
- package/skills/gaia-patterns/SKILL.md +108 -0
- package/skills/gaia-patterns/reference.md +395 -0
- package/skills/gaia-planner/SKILL.md +37 -0
- package/skills/gaia-planner/reference.md +107 -0
- package/skills/gaia-release/SKILL.md +85 -0
- package/skills/gaia-release/reference.md +92 -0
- package/skills/gaia-self-check/SKILL.md +114 -0
- package/skills/gaia-self-check/reference.md +453 -0
- package/skills/gaia-verify/SKILL.md +77 -0
- package/skills/gaia-verify/reference.md +80 -0
- package/skills/git-conventions/SKILL.md +47 -0
- package/skills/gitops-patterns/SKILL.md +60 -0
- package/skills/gitops-patterns/reference.md +183 -0
- package/skills/gmail-policy/SKILL.md +200 -0
- package/skills/gmail-policy/reference.md +150 -0
- package/skills/gmail-triage/SKILL.md +100 -0
- package/skills/gws-setup/SKILL.md +99 -0
- package/skills/gws-setup/reference.md +73 -0
- package/skills/investigation/SKILL.md +100 -0
- package/skills/memory-curation/SKILL.md +83 -0
- package/skills/memory-search/SKILL.md +88 -0
- package/skills/orchestrator-approval/SKILL.md +160 -0
- package/skills/orchestrator-approval/reference.md +174 -0
- package/skills/pending-approvals/SKILL.md +72 -0
- package/skills/pending-approvals/reference.md +214 -0
- package/skills/readme-writing/SKILL.md +71 -0
- package/skills/readme-writing/reference.md +188 -0
- package/skills/reference.md +135 -0
- package/skills/request-approval/SKILL.md +140 -0
- package/skills/request-approval/examples.md +140 -0
- package/skills/request-approval/reference.md +57 -0
- package/skills/schedule-task/SKILL.md +64 -0
- package/skills/schedule-task/reference.md +233 -0
- package/skills/security-tiers/SKILL.md +141 -0
- package/skills/security-tiers/destructive-commands-reference.md +623 -0
- package/skills/security-tiers/reference.md +39 -0
- package/skills/session-reflection/SKILL.md +69 -0
- package/skills/skill-creation/SKILL.md +92 -0
- package/skills/skill-creation/reference.md +29 -0
- package/skills/terraform-patterns/SKILL.md +89 -0
- package/skills/terraform-patterns/reference.md +93 -0
- package/templates/README.md +69 -0
- package/templates/managed-settings.template.json +43 -0
- package/tools/__init__.py +9 -0
- package/tools/agentic-loop/decide-status.py +210 -0
- package/tools/agentic-loop/parse-metric.py +106 -0
- package/tools/agentic-loop/record-iteration.py +221 -0
- package/tools/context/README.md +132 -0
- package/tools/context/__init__.py +42 -0
- package/tools/context/_paths.py +20 -0
- package/tools/context/context_provider.py +721 -0
- package/tools/context/context_section_reader.py +342 -0
- package/tools/context/deep_merge.py +159 -0
- package/tools/context/pending_updates.py +760 -0
- package/tools/context/surface_router.py +278 -0
- package/tools/fast-queries/README.md +65 -0
- package/tools/fast-queries/__init__.py +30 -0
- package/tools/fast-queries/appservices/quicktriage_devops_developer.sh +75 -0
- package/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh +32 -0
- package/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh +88 -0
- package/tools/fast-queries/gitops/quicktriage_gitops_operator.sh +48 -0
- package/tools/fast-queries/run_triage.sh +59 -0
- package/tools/fast-queries/terraform/quicktriage_terraform_architect.sh +80 -0
- package/tools/gaia_simulator/__init__.py +33 -0
- package/tools/gaia_simulator/cli.py +354 -0
- package/tools/gaia_simulator/extractor.py +457 -0
- package/tools/gaia_simulator/reporter.py +258 -0
- package/tools/gaia_simulator/routing_simulator.py +334 -0
- package/tools/gaia_simulator/runner.py +539 -0
- package/tools/gaia_simulator/skills_mapper.py +264 -0
- package/tools/memory/README.md +0 -0
- package/tools/memory/__init__.py +20 -0
- package/tools/memory/backfill_fts5.py +107 -0
- package/tools/memory/conflict_detector.py +295 -0
- package/tools/memory/episodic.py +1210 -0
- package/tools/memory/git_invalidator.py +262 -0
- package/tools/memory/paths.py +102 -0
- package/tools/memory/scoring.py +193 -0
- package/tools/memory/search_store.py +375 -0
- package/tools/persist_transcript_analysis.py +85 -0
- package/tools/review/__init__.py +1 -0
- package/tools/review/review_engine.py +157 -0
- package/tools/scan/__init__.py +35 -0
- package/tools/scan/config.py +247 -0
- package/tools/scan/merge.py +212 -0
- package/tools/scan/orchestrator.py +549 -0
- package/tools/scan/registry.py +127 -0
- package/tools/scan/scanners/__init__.py +18 -0
- package/tools/scan/scanners/base.py +137 -0
- package/tools/scan/scanners/environment.py +349 -0
- package/tools/scan/scanners/git.py +570 -0
- package/tools/scan/scanners/infrastructure.py +875 -0
- package/tools/scan/scanners/orchestration.py +600 -0
- package/tools/scan/scanners/stack.py +1085 -0
- package/tools/scan/scanners/tools.py +260 -0
- package/tools/scan/setup.py +686 -0
- package/tools/scan/tests/__init__.py +1 -0
- package/tools/scan/tests/conftest.py +796 -0
- package/tools/scan/tests/test_environment.py +323 -0
- package/tools/scan/tests/test_git.py +419 -0
- package/tools/scan/tests/test_infrastructure.py +382 -0
- package/tools/scan/tests/test_integration.py +920 -0
- package/tools/scan/tests/test_merge.py +269 -0
- package/tools/scan/tests/test_orchestration.py +304 -0
- package/tools/scan/tests/test_stack.py +604 -0
- package/tools/scan/tests/test_tools.py +349 -0
- package/tools/scan/ui.py +624 -0
- package/tools/scan/verify.py +270 -0
- package/tools/scan/walk.py +118 -0
- package/tools/scan/workspace.py +85 -0
- package/tools/validation/README.md +244 -0
- package/tools/validation/__init__.py +17 -0
- package/tools/validation/approval_gate.py +321 -0
- package/tools/validation/validate_skills.py +189 -0
|
@@ -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 (`—` `’` `é` 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., `é` 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: — ’ “ ” etc. -->
|
|
50
|
+
|
|
51
|
+
<p class="closing-line"><em>Built with [theme]. Jorge Aguilar, 2025–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–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 `—` for em dashes, `’` for apostrophes, `“`/`”` for quotes
|
|
64
|
+
- Use `é`, `á`, `í`, `ó`, `ú`, `ñ` 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
|
+
|