higpertext-cli 0.8.0__py3-none-any.whl
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.
- config/adapters_config.json +450 -0
- config/antigravity_agent_template.json +31 -0
- config/app_config.json +174 -0
- config/context_engine.json +33 -0
- config/environments/model_defaults.json +5 -0
- config/governance/branching_strategy.json +36 -0
- config/governance/deployment_gates.json +30 -0
- config/governance/guidelines_contract.json +54 -0
- config/governance/quality_gates.json +39 -0
- config/governance/section_rules.json +22 -0
- config/governance/security_guardrails.json +52 -0
- config/hooks/README.md +35 -0
- config/hooks/custom/test_output_limiter.json +9 -0
- config/hooks/global/session_prompt.json +9 -0
- config/htx_config.json +24 -0
- config/profile_learner.json +18 -0
- config/profiles/base_agent.json +40 -0
- config/profiles/base_auditor.json +19 -0
- config/profiles/base_developer.json +19 -0
- config/profiles/base_operator.json +16 -0
- config/profiles/global.json +33 -0
- config/profiles/software_developer.json +23 -0
- config/router_content.json +137 -0
- config/semantic_graph.json +66 -0
- config/workflows/ado_release_flow.json +38 -0
- config/workflows/docs-update.json +33 -0
- config/workflows/governance-check.yaml +26 -0
- config/workflows/guidelines-sync.json +40 -0
- config/workflows/higpertext-build.json +73 -0
- config/workflows/higpertext-plan.json +38 -0
- config/workflows/higpertext-review.json +41 -0
- config/workflows/pr-quality-check.json +56 -0
- config/workflows/quality-remediation.json +57 -0
- higpertext/__init__.py +18 -0
- higpertext/adapters/__init__.py +27 -0
- higpertext/adapters/adapter_utils.py +604 -0
- higpertext/adapters/claude_adapter/__init__.py +0 -0
- higpertext/adapters/claude_adapter/claude_adapter.py +154 -0
- higpertext/adapters/copilot_adapter/__init__.py +0 -0
- higpertext/adapters/copilot_adapter/copilot_adapter.py +231 -0
- higpertext/adapters/gemini_adapter/__init__.py +0 -0
- higpertext/adapters/gemini_adapter/gemini_adapter.py +211 -0
- higpertext/adapters/llm_formatter.py +46 -0
- higpertext/adapters/open_code_adapter/__init__.py +0 -0
- higpertext/adapters/open_code_adapter/open_code_adapter.py +480 -0
- higpertext/capabilities/capabilities_runner.py +216 -0
- higpertext/capabilities/common/agent-builder.json +54 -0
- higpertext/capabilities/common/agent-sync.json +34 -0
- higpertext/capabilities/common/code-skeletonizer.json +35 -0
- higpertext/capabilities/common/commit-report.json +42 -0
- higpertext/capabilities/common/context-assembler.json +37 -0
- higpertext/capabilities/common/context-budget-report.json +15 -0
- higpertext/capabilities/common/dep-manager.json +43 -0
- higpertext/capabilities/common/docs-sync.json +14 -0
- higpertext/capabilities/common/doctor.json +18 -0
- higpertext/capabilities/common/efficiency-meter.json +31 -0
- higpertext/capabilities/common/env-catalog.json +13 -0
- higpertext/capabilities/common/env-clean.json +14 -0
- higpertext/capabilities/common/env-logs.json +16 -0
- higpertext/capabilities/common/env-runner.json +23 -0
- higpertext/capabilities/common/env-status.json +13 -0
- higpertext/capabilities/common/env-stop.json +14 -0
- higpertext/capabilities/common/env-template.json +14 -0
- higpertext/capabilities/common/error-context-locator.json +23 -0
- higpertext/capabilities/common/eval-agent.json +33 -0
- higpertext/capabilities/common/file-map.json +17 -0
- higpertext/capabilities/common/governance-exception.json +54 -0
- higpertext/capabilities/common/graph-query.json +59 -0
- higpertext/capabilities/common/graph-rebuild.json +31 -0
- higpertext/capabilities/common/graph-visualize.json +37 -0
- higpertext/capabilities/common/grep-search.json +176 -0
- higpertext/capabilities/common/higpertext-tester.json +25 -0
- higpertext/capabilities/common/hook-health.json +19 -0
- higpertext/capabilities/common/hook-sync-check.json +19 -0
- higpertext/capabilities/common/hooks-manager.json +55 -0
- higpertext/capabilities/common/knowledge-asker.json +27 -0
- higpertext/capabilities/common/list-rules.json +27 -0
- higpertext/capabilities/common/llm-invoke.json +59 -0
- higpertext/capabilities/common/load-rules.json +37 -0
- higpertext/capabilities/common/memory-manager.json +65 -0
- higpertext/capabilities/common/quality-scan.json +21 -0
- higpertext/capabilities/common/quality-updater.json +35 -0
- higpertext/capabilities/common/rag-index.json +17 -0
- higpertext/capabilities/common/report-viewer.json +24 -0
- higpertext/capabilities/common/roadmap-report.json +37 -0
- higpertext/capabilities/common/scripts/_env_cli.py +65 -0
- higpertext/capabilities/common/scripts/agent_builder.py +60 -0
- higpertext/capabilities/common/scripts/agent_sync.py +56 -0
- higpertext/capabilities/common/scripts/ask_higpertext.py +38 -0
- higpertext/capabilities/common/scripts/code_skeletonizer.py +225 -0
- higpertext/capabilities/common/scripts/commit_report.py +134 -0
- higpertext/capabilities/common/scripts/context_assembler.py +70 -0
- higpertext/capabilities/common/scripts/context_budget_report.py +53 -0
- higpertext/capabilities/common/scripts/dep_manager.py +81 -0
- higpertext/capabilities/common/scripts/docs_sync.py +981 -0
- higpertext/capabilities/common/scripts/doctor.py +144 -0
- higpertext/capabilities/common/scripts/efficiency_meter.py +83 -0
- higpertext/capabilities/common/scripts/env_catalog.py +47 -0
- higpertext/capabilities/common/scripts/env_clean.py +30 -0
- higpertext/capabilities/common/scripts/env_logs.py +32 -0
- higpertext/capabilities/common/scripts/env_runner.py +53 -0
- higpertext/capabilities/common/scripts/env_status.py +38 -0
- higpertext/capabilities/common/scripts/env_stop.py +30 -0
- higpertext/capabilities/common/scripts/env_template.py +73 -0
- higpertext/capabilities/common/scripts/error_context_locator.py +138 -0
- higpertext/capabilities/common/scripts/eval_agent.py +80 -0
- higpertext/capabilities/common/scripts/file_map.py +95 -0
- higpertext/capabilities/common/scripts/governance_exception.py +116 -0
- higpertext/capabilities/common/scripts/graph_query.py +104 -0
- higpertext/capabilities/common/scripts/graph_rebuild.py +107 -0
- higpertext/capabilities/common/scripts/graph_visualize.py +76 -0
- higpertext/capabilities/common/scripts/grep_search.py +648 -0
- higpertext/capabilities/common/scripts/higpertext_tester.py +102 -0
- higpertext/capabilities/common/scripts/hook_health.py +149 -0
- higpertext/capabilities/common/scripts/hook_sync_check.py +134 -0
- higpertext/capabilities/common/scripts/hooks_manager.py +171 -0
- higpertext/capabilities/common/scripts/list_rules.py +175 -0
- higpertext/capabilities/common/scripts/llm_invoke.py +135 -0
- higpertext/capabilities/common/scripts/load_rules.py +379 -0
- higpertext/capabilities/common/scripts/memory_manager.py +210 -0
- higpertext/capabilities/common/scripts/presentation_engine.py +63 -0
- higpertext/capabilities/common/scripts/quality_scan.py +132 -0
- higpertext/capabilities/common/scripts/rag_index.py +39 -0
- higpertext/capabilities/common/scripts/report_viewer.py +106 -0
- higpertext/capabilities/common/scripts/roadmap_report.py +73 -0
- higpertext/capabilities/common/scripts/search_router.py +111 -0
- higpertext/capabilities/common/scripts/semantic_diff.py +166 -0
- higpertext/capabilities/common/scripts/semantic_search.py +43 -0
- higpertext/capabilities/common/scripts/session_control.py +136 -0
- higpertext/capabilities/common/scripts/smart_read.py +232 -0
- higpertext/capabilities/common/scripts/subagent_executor.py +143 -0
- higpertext/capabilities/common/scripts/sync_agents.py +353 -0
- higpertext/capabilities/common/scripts/task_decomposer.py +78 -0
- higpertext/capabilities/common/scripts/telemetry_report.py +36 -0
- higpertext/capabilities/common/search-router.json +24 -0
- higpertext/capabilities/common/semantic-diff.json +40 -0
- higpertext/capabilities/common/semantic-search.json +19 -0
- higpertext/capabilities/common/session-clean.json +20 -0
- higpertext/capabilities/common/session-start.json +44 -0
- higpertext/capabilities/common/smart-read.json +28 -0
- higpertext/capabilities/common/subagent-executor.json +25 -0
- higpertext/capabilities/common/sync-agents.json +32 -0
- higpertext/capabilities/common/task-decomposer.json +37 -0
- higpertext/capabilities/common/telemetry-report.json +23 -0
- higpertext/capabilities/git/__init__.py +0 -0
- higpertext/capabilities/git/committer.json +61 -0
- higpertext/capabilities/git/diff.json +33 -0
- higpertext/capabilities/git/ls-files.json +44 -0
- higpertext/capabilities/git/rm.json +27 -0
- higpertext/capabilities/git/scripts/__init__.py +0 -0
- higpertext/capabilities/git/scripts/commit_changes.py +1077 -0
- higpertext/capabilities/git/scripts/git_diff.py +171 -0
- higpertext/capabilities/git/scripts/git_ls_files.py +376 -0
- higpertext/capabilities/git/scripts/git_rm.py +62 -0
- higpertext/capabilities/security/k8s-auditor.json +33 -0
- higpertext/capabilities/security/scripts/k8s_auditor.py +307 -0
- higpertext/capabilities/security/scripts/secret_scanner.py +235 -0
- higpertext/capabilities/security/secret-scanner.json +32 -0
- higpertext/hooks/__init__.py +28 -0
- higpertext/hooks/_compat.py +27 -0
- higpertext/hooks/hook_tasks/__init__.py +1 -0
- higpertext/hooks/hook_tasks/_rules/__init__.py +0 -0
- higpertext/hooks/hook_tasks/_rules/bash_rules.py +635 -0
- higpertext/hooks/hook_tasks/_rules/context_engine_rule.py +79 -0
- higpertext/hooks/hook_tasks/_rules/context_rules.py +199 -0
- higpertext/hooks/hook_tasks/_rules/governance_adapter.py +72 -0
- higpertext/hooks/hook_tasks/_rules/profile_rules.json +25 -0
- higpertext/hooks/hook_tasks/_rules/quality_rules.py +86 -0
- higpertext/hooks/hook_tasks/_rules/security_rules.py +214 -0
- higpertext/hooks/hook_tasks/_rules/session_rules.py +316 -0
- higpertext/hooks/hook_tasks/_rules/telemetry_rules.py +121 -0
- higpertext/hooks/hook_tasks/audit_logger_hook.py +28 -0
- higpertext/hooks/hook_tasks/hook_bash_guard.py +101 -0
- higpertext/hooks/hook_tasks/hook_code_quality.py +48 -0
- higpertext/hooks/hook_tasks/hook_context_hint.py +46 -0
- higpertext/hooks/hook_tasks/hook_context_manager.py +44 -0
- higpertext/hooks/hook_tasks/hook_io.py +122 -0
- higpertext/hooks/hook_tasks/hook_loop_guard.py +182 -0
- higpertext/hooks/hook_tasks/hook_post_observer.py +54 -0
- higpertext/hooks/hook_tasks/hook_read_guard.py +85 -0
- higpertext/hooks/hook_tasks/hook_security_guard.py +81 -0
- higpertext/hooks/hook_tasks/hook_session_prompt.py +83 -0
- higpertext/hooks/hook_tasks/hook_session_stop.py +115 -0
- higpertext/hooks/hook_tasks/hook_utils.py +144 -0
- higpertext/hooks/hook_tasks/session_guard_hook.py +23 -0
- higpertext/hooks/hook_tasks/telemetry_utils.py +176 -0
- higpertext/hooks/hook_tasks/test_echo_hook.py +33 -0
- higpertext/hooks/hook_tasks/webhook_hook.py +54 -0
- higpertext/hooks/hook_tasks/workflow_runner_hook.py +49 -0
- higpertext/hooks/hooks_catalog.json +116 -0
- higpertext/kernel/__init__.py +63 -0
- higpertext/kernel/_compat.py +138 -0
- higpertext/kernel/app_config.py +117 -0
- higpertext/kernel/application/__init__.py +13 -0
- higpertext/kernel/application/agent_registry.py +102 -0
- higpertext/kernel/application/capability_manager.py +61 -0
- higpertext/kernel/application/commit_reporter.py +247 -0
- higpertext/kernel/application/context_builder.py +166 -0
- higpertext/kernel/application/context_engine.py +409 -0
- higpertext/kernel/application/engine.py +41 -0
- higpertext/kernel/application/env_runtime.py +174 -0
- higpertext/kernel/application/environment_manager.py +154 -0
- higpertext/kernel/application/governance.py +192 -0
- higpertext/kernel/application/hook_registry.py +102 -0
- higpertext/kernel/application/hook_renderer.py +720 -0
- higpertext/kernel/application/ports.py +49 -0
- higpertext/kernel/application/profile_learner.py +358 -0
- higpertext/kernel/application/profile_service.py +205 -0
- higpertext/kernel/application/profile_services.py +6 -0
- higpertext/kernel/application/profile_use_cases.py +93 -0
- higpertext/kernel/application/rag_service.py +75 -0
- higpertext/kernel/application/roadmap_reporter.py +178 -0
- higpertext/kernel/application/semantic_engine.py +258 -0
- higpertext/kernel/application/session_services.py +33 -0
- higpertext/kernel/application/skill_hook_compiler.py +85 -0
- higpertext/kernel/application/telemetry.py +326 -0
- higpertext/kernel/application/workflow_manager.py +176 -0
- higpertext/kernel/config_paths.py +66 -0
- higpertext/kernel/domain/__init__.py +12 -0
- higpertext/kernel/domain/agent_registry.py +23 -0
- higpertext/kernel/domain/commit_reporter.py +155 -0
- higpertext/kernel/domain/compilers.py +7 -0
- higpertext/kernel/domain/context_engine.py +319 -0
- higpertext/kernel/domain/entities.py +51 -0
- higpertext/kernel/domain/env_runtime.py +62 -0
- higpertext/kernel/domain/governance.py +198 -0
- higpertext/kernel/domain/hook_models.py +29 -0
- higpertext/kernel/domain/profile_learner.py +186 -0
- higpertext/kernel/domain/rag.py +70 -0
- higpertext/kernel/domain/repositories.py +8 -0
- higpertext/kernel/domain/roadmap_reporter.py +80 -0
- higpertext/kernel/domain/semantic_engine.py +107 -0
- higpertext/kernel/engine.py +42 -0
- higpertext/kernel/htx_resolver.py +69 -0
- higpertext/kernel/infrastructure/__init__.py +13 -0
- higpertext/kernel/infrastructure/agent_registry.py +40 -0
- higpertext/kernel/infrastructure/cache/capability_cache.py +319 -0
- higpertext/kernel/infrastructure/capability_helper.py +40 -0
- higpertext/kernel/infrastructure/cli/__init__.py +1 -0
- higpertext/kernel/infrastructure/cli/agent_commands.py +62 -0
- higpertext/kernel/infrastructure/cli/arguments.py +39 -0
- higpertext/kernel/infrastructure/cli/capability_command_builder.py +86 -0
- higpertext/kernel/infrastructure/cli/capability_task_service.py +234 -0
- higpertext/kernel/infrastructure/cli/cli_search.py +234 -0
- higpertext/kernel/infrastructure/cli/parameter_contracts.py +83 -0
- higpertext/kernel/infrastructure/cli/parser_builder.py +122 -0
- higpertext/kernel/infrastructure/cli/profile_commands.py +89 -0
- higpertext/kernel/infrastructure/cli/roadmap_commands.py +117 -0
- higpertext/kernel/infrastructure/cli/router.py +1110 -0
- higpertext/kernel/infrastructure/cli/session_commands.py +36 -0
- higpertext/kernel/infrastructure/cli/task_commands.py +23 -0
- higpertext/kernel/infrastructure/cli/task_result_reporter.py +56 -0
- higpertext/kernel/infrastructure/cli/workflow_commands.py +25 -0
- higpertext/kernel/infrastructure/compilers/__init__.py +3 -0
- higpertext/kernel/infrastructure/compilers/factory.py +27 -0
- higpertext/kernel/infrastructure/compilers/graph_compiler.py +20 -0
- higpertext/kernel/infrastructure/compilers/guide_compiler.py +50 -0
- higpertext/kernel/infrastructure/compilers/hook_compiler.py +69 -0
- higpertext/kernel/infrastructure/compilers/playbook_compiler.py +154 -0
- higpertext/kernel/infrastructure/context_engine.py +303 -0
- higpertext/kernel/infrastructure/database/local_vector_store.py +99 -0
- higpertext/kernel/infrastructure/deployment/__init__.py +1 -0
- higpertext/kernel/infrastructure/deployment/resource_deployer.py +283 -0
- higpertext/kernel/infrastructure/diagnostics/__init__.py +1 -0
- higpertext/kernel/infrastructure/diagnostics/health.py +191 -0
- higpertext/kernel/infrastructure/env_runtime.py +227 -0
- higpertext/kernel/infrastructure/execution/__init__.py +1 -0
- higpertext/kernel/infrastructure/execution/parallel.py +188 -0
- higpertext/kernel/infrastructure/execution/resilience.py +155 -0
- higpertext/kernel/infrastructure/file_repositories.py +213 -0
- higpertext/kernel/infrastructure/governance.py +198 -0
- higpertext/kernel/infrastructure/hook_config_loader.py +53 -0
- higpertext/kernel/infrastructure/hook_webhook_dispatcher.py +61 -0
- higpertext/kernel/infrastructure/hook_workflow_bridge.py +60 -0
- higpertext/kernel/infrastructure/llm/__init__.py +6 -0
- higpertext/kernel/infrastructure/llm/provider.py +46 -0
- higpertext/kernel/infrastructure/llm/providers/__init__.py +0 -0
- higpertext/kernel/infrastructure/llm/providers/anthropic_provider.py +94 -0
- higpertext/kernel/infrastructure/llm/providers/gemini_embeddings.py +74 -0
- higpertext/kernel/infrastructure/llm/providers/gemini_provider.py +101 -0
- higpertext/kernel/infrastructure/llm/providers/ollama_provider.py +110 -0
- higpertext/kernel/infrastructure/llm/providers/openai_provider.py +98 -0
- higpertext/kernel/infrastructure/llm/registry.py +81 -0
- higpertext/kernel/infrastructure/logger.py +303 -0
- higpertext/kernel/infrastructure/output_store.py +70 -0
- higpertext/kernel/infrastructure/parser/__init__.py +1 -0
- higpertext/kernel/infrastructure/parser/code_chunker.py +144 -0
- higpertext/kernel/infrastructure/parser/language/__init__.py +14 -0
- higpertext/kernel/infrastructure/parser/language/base.py +41 -0
- higpertext/kernel/infrastructure/parser/language/powershell_parser.py +35 -0
- higpertext/kernel/infrastructure/parser/language/python_parser.py +98 -0
- higpertext/kernel/infrastructure/parser/language/typescript_parser.py +91 -0
- higpertext/kernel/infrastructure/parser/semantic_graph.py +409 -0
- higpertext/kernel/infrastructure/presentation/__init__.py +1 -0
- higpertext/kernel/infrastructure/presentation/html_renderer.py +137 -0
- higpertext/kernel/infrastructure/presentation/markdown_renderer.py +84 -0
- higpertext/kernel/infrastructure/presentation/markdown_report_renderer.py +97 -0
- higpertext/kernel/infrastructure/profile_store.py +28 -0
- higpertext/kernel/infrastructure/semantic_engine.py +289 -0
- higpertext/kernel/infrastructure/telemetry_reporter.py +132 -0
- higpertext/kernel/infrastructure/validation/__init__.py +1 -0
- higpertext/kernel/infrastructure/validation/contract_validator.py +163 -0
- higpertext/kernel/pkg_resources.py +38 -0
- higpertext/kernel/session_manager.py +319 -0
- higpertext/templates/env/generic-shell.yaml +21 -0
- higpertext/templates/env/node-vitest.yaml +27 -0
- higpertext/templates/env/python-pytest.yaml +29 -0
- higpertext/templates/html/commit_body.html +20 -0
- higpertext/templates/html/commit_diff.html +4 -0
- higpertext/templates/html/commit_index.html +29 -0
- higpertext/templates/html/commit_layer.html +11 -0
- higpertext/templates/html/commit_shell.html +28 -0
- higpertext/templates/html/graph_visualize.html +86 -0
- higpertext/templates/html/roadmap_body.html +12 -0
- higpertext/templates/html/roadmap_phase.html +5 -0
- higpertext/templates/html/roadmap_shell.html +29 -0
- higpertext/templates/markdown/commit_report.md +18 -0
- higpertext/templates/markdown/efficiency_report.md +12 -0
- higpertext/templates/markdown/roadmap_report.md +25 -0
- higpertext/templates/skills/best-practices.md +7 -0
- higpertext/templates/skills/clean-code.md +8 -0
- higpertext/templates/skills/ddd-standards.md +7 -0
- higpertext/templates/skills/tdd-practices.md +7 -0
- higpertext/templates/subagents/architect.md +7 -0
- higpertext/templates/subagents/test-engineer.md +7 -0
- higpertext/templates/workflows/build.json +23 -0
- higpertext/templates/workflows/compact.json +21 -0
- higpertext/templates/workflows/plan.json +59 -0
- higpertext/templates/workflows/review.json +26 -0
- higpertext/templates/workflows/spec.json +27 -0
- higpertext_cli-0.8.0.dist-info/METADATA +35 -0
- higpertext_cli-0.8.0.dist-info/RECORD +335 -0
- higpertext_cli-0.8.0.dist-info/WHEEL +5 -0
- higpertext_cli-0.8.0.dist-info/entry_points.txt +2 -0
- higpertext_cli-0.8.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"""Dispatcher único para todas las capabilities de higpertext."""
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
import importlib
|
|
5
|
+
import importlib.util
|
|
6
|
+
import json
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from higpertext.kernel.config_paths import WORKSPACE_DIR_NAME
|
|
9
|
+
from higpertext.kernel.infrastructure.logger import get_logger
|
|
10
|
+
_log = get_logger()
|
|
11
|
+
|
|
12
|
+
# Asegurar que src/ esté en el path para importar higpertext.*
|
|
13
|
+
_runner_dir = Path(__file__).resolve().parent.parent.parent # src/
|
|
14
|
+
if str(_runner_dir) not in sys.path:
|
|
15
|
+
sys.path.insert(0, str(_runner_dir))
|
|
16
|
+
|
|
17
|
+
_CAPABILITIES_ROOT = Path(__file__).resolve().parent
|
|
18
|
+
_PROJECT_EXTERNAL_CAPS = Path.cwd() / WORKSPACE_DIR_NAME / "capabilities"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
_MODULE_MAP = {
|
|
22
|
+
"git.committer": "higpertext.capabilities.git.scripts.commit_changes",
|
|
23
|
+
"git.diff": "higpertext.capabilities.git.scripts.git_diff",
|
|
24
|
+
"git.ls-files": "higpertext.capabilities.git.scripts.git_ls_files",
|
|
25
|
+
"git.rm": "higpertext.capabilities.git.scripts.git_rm",
|
|
26
|
+
"common.agent-builder": "higpertext.capabilities.common.scripts.agent_builder",
|
|
27
|
+
"common.agent-sync": "higpertext.capabilities.common.scripts.agent_sync",
|
|
28
|
+
"common.agile-planner": "higpertext.capabilities.common.scripts.agile_planner",
|
|
29
|
+
"common.architecture-drift-report": "higpertext.capabilities.common.scripts.architecture_drift_report", # noqa: E501
|
|
30
|
+
"common.code-skeletonizer": "higpertext.capabilities.common.scripts.code_skeletonizer",
|
|
31
|
+
"common.commit-rationale-log": "higpertext.capabilities.common.scripts.commit_rationale_log",
|
|
32
|
+
"common.commit-report": "higpertext.capabilities.common.scripts.commit_report",
|
|
33
|
+
"common.context-assembler": "higpertext.capabilities.common.scripts.context_assembler",
|
|
34
|
+
"common.context-budget-report": "higpertext.capabilities.common.scripts.context_budget_report",
|
|
35
|
+
"common.dep-manager": "higpertext.capabilities.common.scripts.dep_manager",
|
|
36
|
+
"common.diff-reviewer": "higpertext.capabilities.common.scripts.diff_reviewer",
|
|
37
|
+
"common.docs-sync": "higpertext.capabilities.common.scripts.docs_sync",
|
|
38
|
+
"common.doctor": "higpertext.capabilities.common.scripts.doctor",
|
|
39
|
+
"common.efficiency-meter": "higpertext.capabilities.common.scripts.efficiency_meter",
|
|
40
|
+
"common.env-catalog": "higpertext.capabilities.common.scripts.env_catalog",
|
|
41
|
+
"common.env-clean": "higpertext.capabilities.common.scripts.env_clean",
|
|
42
|
+
"common.env-logs": "higpertext.capabilities.common.scripts.env_logs",
|
|
43
|
+
"common.env-runner": "higpertext.capabilities.common.scripts.env_runner",
|
|
44
|
+
"common.env-status": "higpertext.capabilities.common.scripts.env_status",
|
|
45
|
+
"common.env-stop": "higpertext.capabilities.common.scripts.env_stop",
|
|
46
|
+
"common.env-template": "higpertext.capabilities.common.scripts.env_template",
|
|
47
|
+
"common.eval-agent": "higpertext.capabilities.common.scripts.eval_agent",
|
|
48
|
+
"common.error-context-locator": "higpertext.capabilities.common.scripts.error_context_locator",
|
|
49
|
+
"common.file-map": "higpertext.capabilities.common.scripts.file_map",
|
|
50
|
+
"common.governance-enforcer": "higpertext.capabilities.common.scripts.governance_enforcer",
|
|
51
|
+
"common.governance-exception": "higpertext.capabilities.common.scripts.governance_exception",
|
|
52
|
+
"common.graph-query": "higpertext.capabilities.common.scripts.graph_query",
|
|
53
|
+
"common.graph-rebuild": "higpertext.capabilities.common.scripts.graph_rebuild",
|
|
54
|
+
"common.graph-visualize": "higpertext.capabilities.common.scripts.graph_visualize",
|
|
55
|
+
"common.grep-search": "higpertext.capabilities.common.scripts.grep_search",
|
|
56
|
+
"common.hook-health": "higpertext.capabilities.common.scripts.hook_health",
|
|
57
|
+
"common.hook-sync-check": "higpertext.capabilities.common.scripts.hook_sync_check",
|
|
58
|
+
"common.guidelines-sync": "higpertext.capabilities.common.scripts.guidelines_sync",
|
|
59
|
+
"common.hooks-manager": "higpertext.capabilities.common.scripts.hooks_manager",
|
|
60
|
+
"common.html-presentation": "higpertext.capabilities.common.scripts.presentation_engine",
|
|
61
|
+
"common.knowledge-asker": "higpertext.capabilities.common.scripts.ask_higpertext",
|
|
62
|
+
"common.list-rules": "higpertext.capabilities.common.scripts.list_rules",
|
|
63
|
+
"common.llm-invoke": "higpertext.capabilities.common.scripts.llm_invoke",
|
|
64
|
+
"common.load-rules": "higpertext.capabilities.common.scripts.load_rules",
|
|
65
|
+
"common.memory-manager": "higpertext.capabilities.common.scripts.memory_manager",
|
|
66
|
+
"common.higpertext-tester": "higpertext.capabilities.common.scripts.higpertext_tester",
|
|
67
|
+
"common.mass-integrator": "higpertext.capabilities.common.scripts.mass_integrator",
|
|
68
|
+
"common.quality-updater": "higpertext.capabilities.common.scripts.quality_resolver",
|
|
69
|
+
"common.quality-scan": "higpertext.capabilities.common.scripts.quality_scan",
|
|
70
|
+
"common.report-viewer": "higpertext.capabilities.common.scripts.report_viewer",
|
|
71
|
+
"common.roadmap-report": "higpertext.capabilities.common.scripts.roadmap_report",
|
|
72
|
+
"common.semantic-diff": "higpertext.capabilities.common.scripts.semantic_diff",
|
|
73
|
+
"common.search-router": "higpertext.capabilities.common.scripts.search_router",
|
|
74
|
+
"common.session-clean": "higpertext.capabilities.common.scripts.session_control",
|
|
75
|
+
"common.session-start": "higpertext.capabilities.common.scripts.session_control",
|
|
76
|
+
"common.subagent-executor": "higpertext.capabilities.common.scripts.subagent_executor",
|
|
77
|
+
"common.smart-read": "higpertext.capabilities.common.scripts.smart_read",
|
|
78
|
+
"common.sync-agents": "higpertext.capabilities.common.scripts.sync_agents",
|
|
79
|
+
"common.task-decomposer": "higpertext.capabilities.common.scripts.task_decomposer",
|
|
80
|
+
"common.telemetry-report": "higpertext.capabilities.common.scripts.telemetry_report",
|
|
81
|
+
"common.wiki-manager": "higpertext.capabilities.common.scripts.wiki_manager",
|
|
82
|
+
"security.secret-scanner": "higpertext.capabilities.security.scripts.secret_scanner",
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class CapabilityModuleRegistry:
|
|
87
|
+
"""Registry que resuelve módulos de capabilities por estrategia de carga."""
|
|
88
|
+
|
|
89
|
+
def __init__(self, module_map: dict[str, str]):
|
|
90
|
+
self._module_map = module_map
|
|
91
|
+
|
|
92
|
+
def load(self, cap_id: str):
|
|
93
|
+
dynamic_module = _load_dynamic_module(cap_id)
|
|
94
|
+
if dynamic_module is not None:
|
|
95
|
+
return dynamic_module
|
|
96
|
+
module_path = self._module_map.get(cap_id)
|
|
97
|
+
if module_path:
|
|
98
|
+
return importlib.import_module(module_path)
|
|
99
|
+
return _load_legacy_external_module(cap_id)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
_REGISTRY = CapabilityModuleRegistry(_MODULE_MAP)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def _load_json(path: Path) -> dict:
|
|
106
|
+
try:
|
|
107
|
+
return json.loads(path.read_text(encoding="utf-8"))
|
|
108
|
+
except (OSError, json.JSONDecodeError):
|
|
109
|
+
return {}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _candidate_capability_jsons(cap_id: str) -> list[Path]:
|
|
113
|
+
namespace, _, short_name = cap_id.partition(".")
|
|
114
|
+
if not short_name:
|
|
115
|
+
namespace, short_name = "common", cap_id
|
|
116
|
+
return [
|
|
117
|
+
_CAPABILITIES_ROOT / namespace / f"{short_name}.json",
|
|
118
|
+
_PROJECT_EXTERNAL_CAPS / namespace / f"{short_name}.json",
|
|
119
|
+
]
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def _resolve_capability_definition(cap_id: str) -> dict:
|
|
123
|
+
for path in _candidate_capability_jsons(cap_id):
|
|
124
|
+
data = _load_json(path)
|
|
125
|
+
if data and data.get("id", cap_id) == cap_id:
|
|
126
|
+
data["_definition_path"] = str(path)
|
|
127
|
+
return data
|
|
128
|
+
return {}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def _resolve_entrypoint_path(definition: dict) -> Path | None:
|
|
132
|
+
entrypoint = definition.get("entrypoint", "")
|
|
133
|
+
if not entrypoint:
|
|
134
|
+
return None
|
|
135
|
+
if entrypoint.startswith(("python ", "python3 ")):
|
|
136
|
+
entrypoint = entrypoint.split(maxsplit=1)[1]
|
|
137
|
+
raw = Path(entrypoint)
|
|
138
|
+
if raw.is_absolute() and raw.exists():
|
|
139
|
+
return raw
|
|
140
|
+
definition_path = Path(definition.get("_definition_path", ""))
|
|
141
|
+
bases = [
|
|
142
|
+
_runner_dir / entrypoint,
|
|
143
|
+
_CAPABILITIES_ROOT.parent / entrypoint,
|
|
144
|
+
Path.cwd() / entrypoint,
|
|
145
|
+
]
|
|
146
|
+
if definition_path:
|
|
147
|
+
bases.append(definition_path.parents[1] / entrypoint)
|
|
148
|
+
return next((path for path in bases if path.exists()), None)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def _module_from_script(script_path: Path):
|
|
152
|
+
module_name = f"higpertext_dynamic_{script_path.stem}"
|
|
153
|
+
sys.path.insert(0, str(script_path.parent))
|
|
154
|
+
spec = importlib.util.spec_from_file_location(module_name, script_path)
|
|
155
|
+
if not spec or not spec.loader:
|
|
156
|
+
raise ImportError(f"No se pudo cargar entrypoint: {script_path}")
|
|
157
|
+
module = importlib.util.module_from_spec(spec)
|
|
158
|
+
sys.modules[module_name] = module
|
|
159
|
+
spec.loader.exec_module(module)
|
|
160
|
+
return module
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def _load_dynamic_module(cap_id: str):
|
|
164
|
+
definition = _resolve_capability_definition(cap_id)
|
|
165
|
+
if not definition:
|
|
166
|
+
return None
|
|
167
|
+
if definition.get("language", "python") != "python":
|
|
168
|
+
return None
|
|
169
|
+
script_path = _resolve_entrypoint_path(definition)
|
|
170
|
+
if not script_path:
|
|
171
|
+
raise FileNotFoundError(
|
|
172
|
+
f"Entrypoint no encontrado para {cap_id}: {definition.get('entrypoint')}"
|
|
173
|
+
)
|
|
174
|
+
return _module_from_script(script_path)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def _load_legacy_external_module(cap_id: str):
|
|
178
|
+
cap_stem = cap_id.split(".")[-1].replace("-", "_")
|
|
179
|
+
cap_namespace = cap_id.split(".")[0] if "." in cap_id else "common"
|
|
180
|
+
external_script = _PROJECT_EXTERNAL_CAPS / cap_namespace / "scripts" / f"{cap_stem}.py"
|
|
181
|
+
if not external_script.exists():
|
|
182
|
+
return None
|
|
183
|
+
return _module_from_script(external_script)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def _load_module(cap_id: str):
|
|
187
|
+
return _REGISTRY.load(cap_id)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def main():
|
|
191
|
+
if len(sys.argv) < 2:
|
|
192
|
+
_log.info("Usage: capabilities_runner.py <capability-id> [--param value ...]")
|
|
193
|
+
sys.exit(1)
|
|
194
|
+
|
|
195
|
+
cap_id = sys.argv[1]
|
|
196
|
+
sys.argv = [sys.argv[0]] + sys.argv[2:]
|
|
197
|
+
|
|
198
|
+
try:
|
|
199
|
+
module = _load_module(cap_id)
|
|
200
|
+
except (FileNotFoundError, ImportError) as exc:
|
|
201
|
+
_log.error(f"[ERROR] {exc}")
|
|
202
|
+
sys.exit(1)
|
|
203
|
+
if module is None:
|
|
204
|
+
_log.error(f"[ERROR] Capability no registrada en dispatcher: {cap_id}")
|
|
205
|
+
sys.exit(1)
|
|
206
|
+
import inspect
|
|
207
|
+
|
|
208
|
+
sig = inspect.signature(module.main)
|
|
209
|
+
if sig.parameters:
|
|
210
|
+
module.main(sys.argv[1:])
|
|
211
|
+
else:
|
|
212
|
+
module.main()
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
if __name__ == "__main__":
|
|
216
|
+
main()
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.agent-builder",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Agent Builder",
|
|
5
|
+
"description": "Crea la estructura base de un nuevo agente higpertext independiente: scaffolding de carpetas, perfil inicial, htx.py launcher y ambiente .higpertext/ compilado. El agente generado usa el motor central sin copiar src/core/.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/agent_builder.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{
|
|
10
|
+
"name": "profile",
|
|
11
|
+
"description": "Nombre del perfil inicial del agente (ej: content_creator). No puede ser un nombre reservado del motor.",
|
|
12
|
+
"required": true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "target",
|
|
16
|
+
"description": "Ruta del directorio donde se creará el agente. Si no existe, se crea automáticamente.",
|
|
17
|
+
"required": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "description",
|
|
21
|
+
"description": "Descripción del agente para incluir en el perfil generado.",
|
|
22
|
+
"required": false,
|
|
23
|
+
"default": ""
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"contract": {
|
|
27
|
+
"rules": [
|
|
28
|
+
"Debe crear src/capabilities/, src/config/profiles/, src/config/governance/, src/config/environments/, src/config/templates/, src/workflows/, src/hooks/profiles/, src/hooks/custom/, content/.",
|
|
29
|
+
"Debe copiar agent_designer.json al directorio de perfiles del agente.",
|
|
30
|
+
"Debe generar htx.py launcher apuntando al motor central — nunca copiar src/core/.",
|
|
31
|
+
"Debe rechazar nombres de perfil reservados: base_agent, agent_designer, global, base_developer, base_operator, base_auditor.",
|
|
32
|
+
"Debe compilar las capas de hooks en .higpertext/config/hooks_config.json.",
|
|
33
|
+
"Debe generar el grafo semántico en .higpertext/state/semantic_graph.md.",
|
|
34
|
+
"Debe ser idempotente: no sobreescribir htx.py ni src/hooks/custom/ si ya existen.",
|
|
35
|
+
"El output debe indicar claramente la ruta del agente creado y el comando de verificación."
|
|
36
|
+
],
|
|
37
|
+
"success_pattern": "\\[SUCCESS\\] Agente listo en:"
|
|
38
|
+
},
|
|
39
|
+
"examples": [
|
|
40
|
+
{
|
|
41
|
+
"description": "Crear un agente de análisis de datos",
|
|
42
|
+
"command": "htx task common.agent-builder --profile data_analyst --target ../data-analyst-agent"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"description": "Crear un agente con descripción",
|
|
46
|
+
"command": "htx task common.agent-builder --profile sre_bot --target ../sre-agent --description \"Agente SRE para monitoreo y alertas\""
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"related_docs": [
|
|
50
|
+
"docs/03-extending/agent-development.md",
|
|
51
|
+
"docs/03-extending/agent-hooks.md",
|
|
52
|
+
"docs/04-reference/agent-cli.md"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.agent-sync",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Registra y sincroniza agentes externos con el motor higpertext: propaga hooks y perfiles actualizados.",
|
|
5
|
+
"entrypoint": "src/capabilities/common/scripts/agent_sync.py",
|
|
6
|
+
"parameters": [
|
|
7
|
+
{
|
|
8
|
+
"name": "action",
|
|
9
|
+
"description": "Acción: register | sync | list",
|
|
10
|
+
"required": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "name",
|
|
14
|
+
"description": "Nombre del agente",
|
|
15
|
+
"required": false
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "path",
|
|
19
|
+
"description": "Ruta absoluta al agente externo (para register)",
|
|
20
|
+
"required": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "profile",
|
|
24
|
+
"description": "Nombre del perfil del agente (para register)",
|
|
25
|
+
"required": false
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "assistant",
|
|
29
|
+
"description": "Asistente objetivo: claude|gemini|opencode|all (para sync)",
|
|
30
|
+
"default": "claude",
|
|
31
|
+
"required": false
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.code-skeletonizer",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Code Skeletonizer",
|
|
5
|
+
"description": "Genera una versión 'esqueleto' de un archivo de código fuente (especialmente Python mediante AST, y otros lenguajes mediante expresiones regulares), extrayendo solo firmas de clases, funciones/métodos, docstrings e imports, omitiendo el código de implementación para ahorrar tokens de contexto.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/code_skeletonizer.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{
|
|
10
|
+
"name": "path",
|
|
11
|
+
"description": "Ruta absoluta o relativa del archivo de código a esqueletizar.",
|
|
12
|
+
"required": true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "output",
|
|
16
|
+
"description": "Ruta de destino opcional para guardar el archivo esqueletizado. Si no se especifica, se imprime en consola.",
|
|
17
|
+
"required": false
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"bash_intercept": {
|
|
21
|
+
"pattern": "\\bwc\\s+-l\\b|\\bfind\\s+.*\\.(py|ts|js|cs)\\b",
|
|
22
|
+
"description": "Explorar estructura de archivos de código",
|
|
23
|
+
"reason": "wc/find produce listas brutas. code-skeletonizer extrae firmas, clases e imports ahorrando tokens de contexto.",
|
|
24
|
+
"example": "htx task common.code-skeletonizer --path src/my_module.py"
|
|
25
|
+
},
|
|
26
|
+
"contract": {
|
|
27
|
+
"rules": [
|
|
28
|
+
"Debe validar que el archivo de entrada exista.",
|
|
29
|
+
"Debe extraer imports, nombres de clases, docstrings y firmas de métodos/funciones.",
|
|
30
|
+
"Debe reemplazar la implementación interna de métodos y funciones por el token '...'.",
|
|
31
|
+
"Para Python debe utilizar la biblioteca 'ast' para un parsing sintáctico robusto.",
|
|
32
|
+
"Debe imprimir en la salida estándar la representación del esqueleto si no se especifica un archivo de salida."
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.commit-report",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Commit Report Explicativo",
|
|
5
|
+
"description": "Genera un reporte explicativo de un commit o rango de commits: resumen en lenguaje natural, archivos impactados por capa DDD, estadísticas y análisis de impacto. Soporta salida Markdown y HTML.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/commit_report.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{
|
|
10
|
+
"name": "commit",
|
|
11
|
+
"description": "Hash del commit a analizar. Acepta HEAD, HEAD~N o hash corto. Default: HEAD.",
|
|
12
|
+
"required": false,
|
|
13
|
+
"default": "HEAD"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "range",
|
|
17
|
+
"description": "Rango de commits en formato git (e.g. HEAD~5..HEAD). Si se especifica, sobreescribe --commit.",
|
|
18
|
+
"required": false
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "format",
|
|
22
|
+
"description": "Formato de salida: markdown o html. Default: markdown.",
|
|
23
|
+
"required": false,
|
|
24
|
+
"default": "markdown"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "output",
|
|
28
|
+
"description": "Ruta de salida del reporte. Default: .higpertext/reports/commits/<hash>_report.<ext>.",
|
|
29
|
+
"required": false
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"contract": {
|
|
33
|
+
"rules": [
|
|
34
|
+
"Debe leer el historial git real del repositorio.",
|
|
35
|
+
"Debe mostrar resumen ejecutivo en lenguaje natural.",
|
|
36
|
+
"Debe agrupar archivos impactados por capa: domain, application, infrastructure, test, capability, other.",
|
|
37
|
+
"Debe mostrar estadísticas: archivos cambiados, líneas añadidas, líneas eliminadas.",
|
|
38
|
+
"Debe indicar si el commit incluye nuevos tests o nuevas capacidades.",
|
|
39
|
+
"Debe completar con [SUCCESS] o [ERROR] explícito."
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.context-assembler",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Context Assembler",
|
|
5
|
+
"description": "Ensambla un 'context pack' curado para una tarea concreta. Dado un objetivo y tipo, extrae keywords, selecciona del semantic graph solo los símbolos relevantes bajo un presupuesto de tokens, y genera un artefacto Markdown en .higpertext/state/context_packs/. Provee al agente el contexto mínimo-suficiente en vez de explorar el repo a ciegas.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/context_assembler.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{
|
|
10
|
+
"name": "goal",
|
|
11
|
+
"description": "Objetivo de la tarea en lenguaje natural, ej: 'refactorizar el sistema de hooks de sesión'.",
|
|
12
|
+
"required": true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "type",
|
|
16
|
+
"description": "Tipo de tarea: refactor|feature|bugfix|review. Default: feature.",
|
|
17
|
+
"required": false,
|
|
18
|
+
"default": "feature"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "budget",
|
|
22
|
+
"description": "Presupuesto máximo de tokens del pack. Default: 8000.",
|
|
23
|
+
"required": false,
|
|
24
|
+
"default": "8000"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"contract": {
|
|
28
|
+
"rules": [
|
|
29
|
+
"Debe extraer keywords del objetivo filtrando stopwords (ES/EN).",
|
|
30
|
+
"Debe seleccionar símbolos del semantic graph relevantes a los keywords.",
|
|
31
|
+
"El pack generado nunca debe exceder el presupuesto de tokens indicado.",
|
|
32
|
+
"Debe persistir el artefacto Markdown en .higpertext/state/context_packs/.",
|
|
33
|
+
"Debe reportar el número de símbolos seleccionados y los tokens estimados.",
|
|
34
|
+
"Si el semantic graph no existe, debe generar un pack vacío sin fallar."
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.context-budget-report",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Context Budget Report",
|
|
5
|
+
"description": "Estima cuánto contexto consume una lectura, búsqueda o skeleton antes de ejecutarla y recomienda read range, skeleton, summary o grep.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/context_budget_report.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{"name": "path", "description": "Archivo a estimar.", "required": true},
|
|
10
|
+
{"name": "operation", "description": "read, search o skeleton. Default: read.", "required": false, "default": "read"},
|
|
11
|
+
{"name": "budget", "description": "Presupuesto de tokens. Default: 4000.", "required": false, "default": "4000"},
|
|
12
|
+
{"name": "json", "description": "Emite JSON estructurado.", "required": false, "default": "false"}
|
|
13
|
+
],
|
|
14
|
+
"contract": {"rules": ["Debe estimar tokens por tamaño de archivo.", "Debe recomendar una estrategia de contexto antes de leer blobs grandes.", "Debe soportar JSON."]}
|
|
15
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.dep-manager",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Dependency Manager",
|
|
5
|
+
"description": "Gestiona dependencias del proyecto: instala, desinstala y lista paquetes usando el .venv activo. Valida que no se instale en el Python del sistema.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/dep_manager.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{
|
|
10
|
+
"name": "action",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"required": true,
|
|
13
|
+
"description": "Acción: install | uninstall | list"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "packages",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"required": false,
|
|
19
|
+
"description": "Paquete(s) separados por coma (requerido para install/uninstall)"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "dev",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"required": false,
|
|
25
|
+
"default": "false",
|
|
26
|
+
"description": "Si 'true', instala como dependencia de desarrollo"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"contract": {
|
|
30
|
+
"rules": [
|
|
31
|
+
"Siempre usar .venv/bin/pip — nunca el pip del sistema.",
|
|
32
|
+
"Nunca instalar como root o con sudo.",
|
|
33
|
+
"Después de instalar, actualizar requirements.txt si existe."
|
|
34
|
+
],
|
|
35
|
+
"required_patterns": ["\\[SUCCESS\\]"]
|
|
36
|
+
},
|
|
37
|
+
"bash_intercept": {
|
|
38
|
+
"pattern": "\\bpip\\s+(install|uninstall|freeze)\\b",
|
|
39
|
+
"description": "Gestionar dependencias del proyecto",
|
|
40
|
+
"reason": "pip directo puede instalar en el Python del sistema. dep-manager garantiza el uso del .venv del proyecto y actualiza requirements.txt.",
|
|
41
|
+
"example": "htx task common.dep-manager --action install --packages requests"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.docs-sync",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Analiza recursivamente todas las capacidades y perfiles JSON, regenera y actualiza automáticamente los archivos de catálogo de la documentación (capabilities-catalog.md y profiles-catalog.md).",
|
|
5
|
+
"entrypoint": "capabilities/common/scripts/docs_sync.py",
|
|
6
|
+
"language": "python",
|
|
7
|
+
"parameters": [],
|
|
8
|
+
"contract": {
|
|
9
|
+
"rules": [
|
|
10
|
+
"Actualizar docs/reference/capabilities-catalog.md con todas las capacidades encontradas.",
|
|
11
|
+
"Actualizar docs/reference/profiles-catalog.md con todos los perfiles de agente encontrados."
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.doctor",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Higpertext Doctor",
|
|
5
|
+
"description": "Ejecuta un diagnóstico integral del workspace: launcher, entorno, capabilities, hooks, caché y reportes.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/doctor.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{"name": "json", "description": "Emite JSON estructurado.", "required": false, "default": "false"}
|
|
10
|
+
],
|
|
11
|
+
"contract": {
|
|
12
|
+
"rules": [
|
|
13
|
+
"Debe validar launcher htx disponible.",
|
|
14
|
+
"Debe validar catálogo de capabilities y hooks críticos.",
|
|
15
|
+
"Debe revisar estado básico de caché y reportes."
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.efficiency-meter",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Efficiency Meter",
|
|
5
|
+
"description": "Mide la eficiencia de una sesión de agente cruzando telemetry.jsonl con los context packs generados. Calcula: tokens totales, costo estimado, exploration_waste_ratio (lecturas sin higpertext / total reads), context_hit_rate (archivos del pack realmente leídos) y hook_intercepts. Retroalimenta la calidad de los context packs.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/efficiency_meter.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{
|
|
10
|
+
"name": "session",
|
|
11
|
+
"description": "ID de sesión a analizar. Si no se indica, usa la sesión activa.",
|
|
12
|
+
"required": false,
|
|
13
|
+
"default": ""
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "format",
|
|
17
|
+
"description": "Formato de salida: table|json|markdown. Default: table.",
|
|
18
|
+
"required": false,
|
|
19
|
+
"default": "table"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"contract": {
|
|
23
|
+
"rules": [
|
|
24
|
+
"Si no se indica --session, debe leer la sesión activa de .higpertext/state/session.json.",
|
|
25
|
+
"context_hit_rate debe estar en el rango [0, 1].",
|
|
26
|
+
"exploration_waste_ratio debe estar en el rango [0, 1].",
|
|
27
|
+
"Si no hay eventos de telemetría para la sesión, debe devolver métricas en cero sin fallar.",
|
|
28
|
+
"El formato 'json' debe producir JSON válido serializable."
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.env-catalog",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Environment Catalog",
|
|
5
|
+
"description": "Lista templates locales/globales de entornos Docker/Podman y detecta motores disponibles.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/env_catalog.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{"name": "engine", "description": "auto, docker o podman. Default: auto.", "required": false, "default": "auto"},
|
|
10
|
+
{"name": "json", "description": "Emite JSON estructurado.", "required": false, "default": "false"}
|
|
11
|
+
],
|
|
12
|
+
"contract": {"rules": ["Debe listar templates de .higpertext/env/templates y templates del motor.", "Debe reportar disponibilidad Docker/Podman.", "Debe soportar JSON."]}
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.env-clean",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Environment Clean",
|
|
5
|
+
"description": "Limpia metadata local de runs finalizados o todos los runs si --all=true.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/env_clean.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{"name": "all", "description": "Elimina todos los runs locales. Default: false.", "required": false, "default": "false"},
|
|
10
|
+
{"name": "older_than", "description": "Reservado para limpieza por antigüedad.", "required": false},
|
|
11
|
+
{"name": "json", "description": "Emite JSON estructurado.", "required": false, "default": "false"}
|
|
12
|
+
],
|
|
13
|
+
"contract": {"rules": ["Debe limpiar .higpertext/env/runs según estado.", "No debe ejecutar comandos destructivos fuera del directorio de runs."]}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.env-logs",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Environment Logs",
|
|
5
|
+
"description": "Obtiene logs compactos de un run Docker/Podman, con filtros por servicio, tail y errores.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/env_logs.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{"name": "run_id", "description": "Run a consultar.", "required": true},
|
|
10
|
+
{"name": "service", "description": "Servicio opcional.", "required": false},
|
|
11
|
+
{"name": "tail", "description": "Cantidad de líneas. Default: 200.", "required": false, "default": "200"},
|
|
12
|
+
{"name": "errors_only", "description": "Filtra líneas con error/failed/exception.", "required": false, "default": "false"},
|
|
13
|
+
{"name": "json", "description": "Emite JSON estructurado.", "required": false, "default": "false"}
|
|
14
|
+
],
|
|
15
|
+
"contract": {"rules": ["Debe usar el backend del run persistido.", "Debe limitar logs con tail.", "Debe soportar errors_only."]}
|
|
16
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.env-runner",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Environment Runner",
|
|
5
|
+
"description": "Levanta un entorno local Docker/Podman desde template, ejecuta una tarea/comando y persiste estado/logs por run_id.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/env_runner.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{"name": "template", "description": "ID del template a ejecutar.", "required": true},
|
|
10
|
+
{"name": "engine", "description": "auto, docker o podman.", "required": false, "default": "auto"},
|
|
11
|
+
{"name": "task", "description": "Tarea definida por el template.", "required": false},
|
|
12
|
+
{"name": "command", "description": "Comando override a ejecutar dentro del servicio.", "required": false},
|
|
13
|
+
{"name": "service", "description": "Servicio donde ejecutar el comando.", "required": false},
|
|
14
|
+
{"name": "detach", "description": "Si true deja el entorno corriendo.", "required": false, "default": "false"},
|
|
15
|
+
{"name": "parallel", "description": "Reservado; cada run ya usa project_name único.", "required": false, "default": "false"},
|
|
16
|
+
{"name": "timeout", "description": "Timeout en segundos. Default: 300.", "required": false, "default": "300"},
|
|
17
|
+
{"name": "keep_alive", "description": "No ejecutar down al terminar.", "required": false, "default": "false"},
|
|
18
|
+
{"name": "cleanup", "description": "Ejecutar down al terminar si no keep_alive. Default: true.", "required": false, "default": "true"},
|
|
19
|
+
{"name": "env", "description": "Variables KEY=value separadas por coma.", "required": false},
|
|
20
|
+
{"name": "json", "description": "Emite JSON estructurado.", "required": false, "default": "false"}
|
|
21
|
+
],
|
|
22
|
+
"contract": {"rules": ["Debe seleccionar Docker o Podman mediante --engine.", "Debe crear run_id y estado bajo .higpertext/env/runs.", "Debe capturar logs de up/command/down.", "Debe aplicar timeout y cleanup por defecto."]}
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "common.env-status",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "Environment Status",
|
|
5
|
+
"description": "Consulta runs de entornos locales ejecutados por env-runner.",
|
|
6
|
+
"entrypoint": "capabilities/common/scripts/env_status.py",
|
|
7
|
+
"language": "python",
|
|
8
|
+
"parameters": [
|
|
9
|
+
{"name": "run_id", "description": "Run específico; si se omite lista todos.", "required": false},
|
|
10
|
+
{"name": "json", "description": "Emite JSON estructurado.", "required": false, "default": "false"}
|
|
11
|
+
],
|
|
12
|
+
"contract": {"rules": ["Debe leer .higpertext/env/runs.", "Debe soportar consulta por run_id y listado general."]}
|
|
13
|
+
}
|