xtrm-tools 0.5.24 → 0.5.26
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 +19 -0
- package/.claude-plugin/plugin.json +9 -0
- package/README.md +9 -3
- package/cli/dist/index.cjs +182 -219
- package/cli/dist/index.cjs.map +1 -1
- package/cli/package.json +1 -1
- package/config/hooks.json +8 -0
- package/hooks/beads-claim-sync.mjs +2 -4
- package/hooks/beads-commit-gate.mjs +2 -2
- package/hooks/beads-edit-gate.mjs +3 -3
- package/hooks/beads-memory-gate.mjs +2 -2
- package/hooks/beads-stop-gate.mjs +2 -2
- package/hooks/xtrm-logger.mjs +84 -91
- package/hooks/xtrm-session-logger.mjs +27 -0
- package/hooks/xtrm-tool-logger.mjs +53 -0
- package/package.json +5 -1
- package/plugins/xtrm-tools/.claude-plugin/plugin.json +9 -0
- package/plugins/xtrm-tools/.mcp.json +18 -0
- package/plugins/xtrm-tools/hooks/README.md +61 -0
- package/plugins/xtrm-tools/hooks/beads-claim-sync.mjs +223 -0
- package/plugins/xtrm-tools/hooks/beads-commit-gate.mjs +70 -0
- package/plugins/xtrm-tools/hooks/beads-compact-restore.mjs +69 -0
- package/plugins/xtrm-tools/hooks/beads-compact-save.mjs +51 -0
- package/plugins/xtrm-tools/hooks/beads-edit-gate.mjs +85 -0
- package/plugins/xtrm-tools/hooks/beads-gate-core.mjs +236 -0
- package/plugins/xtrm-tools/hooks/beads-gate-messages.mjs +68 -0
- package/plugins/xtrm-tools/hooks/beads-gate-utils.mjs +194 -0
- package/plugins/xtrm-tools/hooks/beads-memory-gate.mjs +81 -0
- package/plugins/xtrm-tools/hooks/beads-stop-gate.mjs +53 -0
- package/plugins/xtrm-tools/hooks/gitnexus/gitnexus-hook.cjs +222 -0
- package/plugins/xtrm-tools/hooks/hooks.json +115 -0
- package/plugins/xtrm-tools/hooks/quality-check-env.mjs +79 -0
- package/plugins/xtrm-tools/hooks/quality-check.cjs +1286 -0
- package/plugins/xtrm-tools/hooks/quality-check.py +345 -0
- package/plugins/xtrm-tools/hooks/statusline.mjs +145 -0
- package/plugins/xtrm-tools/hooks/using-xtrm-reminder.mjs +35 -0
- package/plugins/xtrm-tools/hooks/worktree-boundary.mjs +33 -0
- package/plugins/xtrm-tools/hooks/xtrm-logger.mjs +123 -0
- package/plugins/xtrm-tools/hooks/xtrm-session-logger.mjs +27 -0
- package/plugins/xtrm-tools/hooks/xtrm-tool-logger.mjs +53 -0
- package/plugins/xtrm-tools/skills/README.txt +31 -0
- package/plugins/xtrm-tools/skills/clean-code/SKILL.md +201 -0
- package/plugins/xtrm-tools/skills/creating-service-skills/SKILL.md +433 -0
- package/plugins/xtrm-tools/skills/creating-service-skills/references/script_quality_standards.md +425 -0
- package/plugins/xtrm-tools/skills/creating-service-skills/references/service_skill_system_guide.md +278 -0
- package/plugins/xtrm-tools/skills/creating-service-skills/scripts/bootstrap.py +326 -0
- package/plugins/xtrm-tools/skills/creating-service-skills/scripts/deep_dive.py +304 -0
- package/plugins/xtrm-tools/skills/creating-service-skills/scripts/scaffolder.py +482 -0
- package/plugins/xtrm-tools/skills/delegating/SKILL.md +196 -0
- package/plugins/xtrm-tools/skills/delegating/config.yaml +210 -0
- package/plugins/xtrm-tools/skills/delegating/references/orchestration-protocols.md +41 -0
- package/plugins/xtrm-tools/skills/docker-expert/SKILL.md +409 -0
- package/plugins/xtrm-tools/skills/documenting/CHANGELOG.md +23 -0
- package/plugins/xtrm-tools/skills/documenting/README.md +148 -0
- package/plugins/xtrm-tools/skills/documenting/SKILL.md +113 -0
- package/plugins/xtrm-tools/skills/documenting/examples/example_pattern.md +70 -0
- package/plugins/xtrm-tools/skills/documenting/examples/example_reference.md +70 -0
- package/plugins/xtrm-tools/skills/documenting/examples/example_ssot_analytics.md +64 -0
- package/plugins/xtrm-tools/skills/documenting/examples/example_workflow.md +141 -0
- package/plugins/xtrm-tools/skills/documenting/references/changelog-format.md +97 -0
- package/plugins/xtrm-tools/skills/documenting/references/metadata-schema.md +136 -0
- package/plugins/xtrm-tools/skills/documenting/references/taxonomy.md +81 -0
- package/plugins/xtrm-tools/skills/documenting/references/versioning-rules.md +78 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/bump_version.sh +60 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/changelog/__init__.py +0 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/changelog/add_entry.py +216 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/changelog/bump_release.py +117 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/changelog/init_changelog.py +54 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/changelog/validate_changelog.py +128 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/drift_detector.py +266 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/generate_template.py +311 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/list_by_category.sh +84 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/orchestrator.py +255 -0
- package/plugins/xtrm-tools/skills/documenting/scripts/validate_metadata.py +242 -0
- package/plugins/xtrm-tools/skills/documenting/templates/CHANGELOG.md.template +13 -0
- package/plugins/xtrm-tools/skills/documenting/tests/integration_test.sh +70 -0
- package/plugins/xtrm-tools/skills/documenting/tests/test_changelog.py +201 -0
- package/plugins/xtrm-tools/skills/documenting/tests/test_drift_detector.py +80 -0
- package/plugins/xtrm-tools/skills/documenting/tests/test_orchestrator.py +52 -0
- package/plugins/xtrm-tools/skills/documenting/tests/test_validate_metadata.py +64 -0
- package/plugins/xtrm-tools/skills/find-skills/SKILL.md +133 -0
- package/plugins/xtrm-tools/skills/gitnexus-debugging/SKILL.md +85 -0
- package/plugins/xtrm-tools/skills/gitnexus-exploring/SKILL.md +75 -0
- package/plugins/xtrm-tools/skills/gitnexus-impact-analysis/SKILL.md +94 -0
- package/plugins/xtrm-tools/skills/gitnexus-refactoring/SKILL.md +113 -0
- package/plugins/xtrm-tools/skills/hook-development/SKILL.md +797 -0
- package/plugins/xtrm-tools/skills/hook-development/examples/load-context.sh +55 -0
- package/plugins/xtrm-tools/skills/hook-development/examples/quality-check.js +1168 -0
- package/plugins/xtrm-tools/skills/hook-development/examples/validate-bash.sh +43 -0
- package/plugins/xtrm-tools/skills/hook-development/examples/validate-write.sh +38 -0
- package/plugins/xtrm-tools/skills/hook-development/references/advanced.md +527 -0
- package/plugins/xtrm-tools/skills/hook-development/references/migration.md +369 -0
- package/plugins/xtrm-tools/skills/hook-development/references/patterns.md +412 -0
- package/plugins/xtrm-tools/skills/hook-development/scripts/README.md +164 -0
- package/plugins/xtrm-tools/skills/hook-development/scripts/hook-linter.sh +153 -0
- package/plugins/xtrm-tools/skills/hook-development/scripts/test-hook.sh +252 -0
- package/plugins/xtrm-tools/skills/hook-development/scripts/validate-hook-schema.sh +159 -0
- package/plugins/xtrm-tools/skills/obsidian-cli/SKILL.md +106 -0
- package/plugins/xtrm-tools/skills/orchestrating-agents/SKILL.md +135 -0
- package/plugins/xtrm-tools/skills/orchestrating-agents/config.yaml +45 -0
- package/plugins/xtrm-tools/skills/orchestrating-agents/references/agent-context-integration.md +37 -0
- package/plugins/xtrm-tools/skills/orchestrating-agents/references/examples.md +45 -0
- package/plugins/xtrm-tools/skills/orchestrating-agents/references/handover-protocol.md +31 -0
- package/plugins/xtrm-tools/skills/orchestrating-agents/references/workflows.md +42 -0
- package/plugins/xtrm-tools/skills/orchestrating-agents/scripts/detect_neighbors.py +23 -0
- package/plugins/xtrm-tools/skills/prompt-improving/README.md +162 -0
- package/plugins/xtrm-tools/skills/prompt-improving/SKILL.md +74 -0
- package/plugins/xtrm-tools/skills/prompt-improving/references/analysis_commands.md +24 -0
- package/plugins/xtrm-tools/skills/prompt-improving/references/chain_of_thought.md +24 -0
- package/plugins/xtrm-tools/skills/prompt-improving/references/mcp_definitions.md +20 -0
- package/plugins/xtrm-tools/skills/prompt-improving/references/multishot.md +23 -0
- package/plugins/xtrm-tools/skills/prompt-improving/references/xml_core.md +60 -0
- package/plugins/xtrm-tools/skills/python-testing/SKILL.md +815 -0
- package/plugins/xtrm-tools/skills/scoping-service-skills/SKILL.md +231 -0
- package/plugins/xtrm-tools/skills/scoping-service-skills/scripts/scope.py +74 -0
- package/plugins/xtrm-tools/skills/senior-backend/SKILL.md +209 -0
- package/plugins/xtrm-tools/skills/senior-backend/references/api_design_patterns.md +103 -0
- package/plugins/xtrm-tools/skills/senior-backend/references/backend_security_practices.md +103 -0
- package/plugins/xtrm-tools/skills/senior-backend/references/database_optimization_guide.md +103 -0
- package/plugins/xtrm-tools/skills/senior-backend/scripts/api_load_tester.py +114 -0
- package/plugins/xtrm-tools/skills/senior-backend/scripts/api_scaffolder.py +114 -0
- package/plugins/xtrm-tools/skills/senior-backend/scripts/database_migration_tool.py +114 -0
- package/plugins/xtrm-tools/skills/senior-data-scientist/SKILL.md +226 -0
- package/plugins/xtrm-tools/skills/senior-data-scientist/references/experiment_design_frameworks.md +80 -0
- package/plugins/xtrm-tools/skills/senior-data-scientist/references/feature_engineering_patterns.md +80 -0
- package/plugins/xtrm-tools/skills/senior-data-scientist/references/statistical_methods_advanced.md +80 -0
- package/plugins/xtrm-tools/skills/senior-data-scientist/scripts/experiment_designer.py +100 -0
- package/plugins/xtrm-tools/skills/senior-data-scientist/scripts/feature_engineering_pipeline.py +100 -0
- package/plugins/xtrm-tools/skills/senior-data-scientist/scripts/model_evaluation_suite.py +100 -0
- package/plugins/xtrm-tools/skills/senior-devops/SKILL.md +209 -0
- package/plugins/xtrm-tools/skills/senior-devops/references/cicd_pipeline_guide.md +103 -0
- package/plugins/xtrm-tools/skills/senior-devops/references/deployment_strategies.md +103 -0
- package/plugins/xtrm-tools/skills/senior-devops/references/infrastructure_as_code.md +103 -0
- package/plugins/xtrm-tools/skills/senior-devops/scripts/deployment_manager.py +114 -0
- package/plugins/xtrm-tools/skills/senior-devops/scripts/pipeline_generator.py +114 -0
- package/plugins/xtrm-tools/skills/senior-devops/scripts/terraform_scaffolder.py +114 -0
- package/plugins/xtrm-tools/skills/senior-security/SKILL.md +209 -0
- package/plugins/xtrm-tools/skills/senior-security/references/cryptography_implementation.md +103 -0
- package/plugins/xtrm-tools/skills/senior-security/references/penetration_testing_guide.md +103 -0
- package/plugins/xtrm-tools/skills/senior-security/references/security_architecture_patterns.md +103 -0
- package/plugins/xtrm-tools/skills/senior-security/scripts/pentest_automator.py +114 -0
- package/plugins/xtrm-tools/skills/senior-security/scripts/security_auditor.py +114 -0
- package/plugins/xtrm-tools/skills/senior-security/scripts/threat_modeler.py +114 -0
- package/plugins/xtrm-tools/skills/skill-creator/LICENSE.txt +202 -0
- package/plugins/xtrm-tools/skills/skill-creator/SKILL.md +479 -0
- package/plugins/xtrm-tools/skills/skill-creator/agents/analyzer.md +274 -0
- package/plugins/xtrm-tools/skills/skill-creator/agents/comparator.md +202 -0
- package/plugins/xtrm-tools/skills/skill-creator/agents/grader.md +223 -0
- package/plugins/xtrm-tools/skills/skill-creator/assets/eval_review.html +146 -0
- package/plugins/xtrm-tools/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/plugins/xtrm-tools/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/plugins/xtrm-tools/skills/skill-creator/references/schemas.md +430 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/__init__.py +0 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/generate_report.py +326 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/improve_description.py +248 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/package_skill.py +136 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/run_eval.py +310 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/run_loop.py +332 -0
- package/plugins/xtrm-tools/skills/skill-creator/scripts/utils.py +47 -0
- package/plugins/xtrm-tools/skills/sync-docs/SKILL.md +155 -0
- package/plugins/xtrm-tools/skills/sync-docs/evals/evals.json +89 -0
- package/plugins/xtrm-tools/skills/sync-docs/references/doc-structure.md +99 -0
- package/plugins/xtrm-tools/skills/sync-docs/references/schema.md +103 -0
- package/plugins/xtrm-tools/skills/sync-docs/scripts/changelog/add_entry.py +216 -0
- package/plugins/xtrm-tools/skills/sync-docs/scripts/context_gatherer.py +240 -0
- package/plugins/xtrm-tools/skills/sync-docs/scripts/doc_structure_analyzer.py +495 -0
- package/plugins/xtrm-tools/skills/sync-docs/scripts/drift_detector.py +563 -0
- package/plugins/xtrm-tools/skills/sync-docs/scripts/validate_doc.py +365 -0
- package/plugins/xtrm-tools/skills/sync-docs/scripts/validate_metadata.py +185 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/benchmark.json +293 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/benchmark.md +13 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/outputs/result.md +210 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/grading.json +28 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/outputs/result.md +101 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/grading.json +28 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/outputs/result.md +198 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/grading.json +28 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/outputs/result.md +94 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/grading.json +28 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/outputs/result.md +237 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/grading.json +28 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/outputs/result.md +134 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/grading.json +28 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/benchmark.json +297 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/benchmark.md +13 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/outputs/result.md +137 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/grading.json +92 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/outputs/result.md +134 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/grading.json +86 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/outputs/result.md +193 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/grading.json +72 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/outputs/result.md +211 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/grading.json +91 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/outputs/result.md +182 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/grading.json +95 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/timing.json +1 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/outputs/result.md +222 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/grading.json +88 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/benchmark.json +298 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/benchmark.md +13 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/outputs/result.md +125 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/grading.json +97 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/outputs/result.md +144 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/grading.json +78 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/outputs/result.md +104 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/grading.json +91 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/outputs/result.md +79 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/grading.json +82 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/eval_metadata.json +27 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase1_context.json +302 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase2_drift.txt +33 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase3_analysis.json +114 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase4_fix.txt +118 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase5_validate.txt +38 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/result.md +158 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/grading.json +95 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/outputs/result.md +71 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/grading.json +90 -0
- package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/timing.json +5 -0
- package/plugins/xtrm-tools/skills/test-planning/SKILL.md +208 -0
- package/plugins/xtrm-tools/skills/test-planning/evals/evals.json +23 -0
- package/plugins/xtrm-tools/skills/updating-service-skills/SKILL.md +136 -0
- package/plugins/xtrm-tools/skills/updating-service-skills/scripts/drift_detector.py +222 -0
- package/plugins/xtrm-tools/skills/using-TDD/SKILL.md +410 -0
- package/plugins/xtrm-tools/skills/using-quality-gates/SKILL.md +254 -0
- package/plugins/xtrm-tools/skills/using-serena-lsp/README.md +8 -0
- package/plugins/xtrm-tools/skills/using-serena-lsp/REFERENCE.md +194 -0
- package/plugins/xtrm-tools/skills/using-serena-lsp/SKILL.md +82 -0
- package/plugins/xtrm-tools/skills/using-service-skills/SKILL.md +108 -0
- package/plugins/xtrm-tools/skills/using-service-skills/scripts/cataloger.py +74 -0
- package/plugins/xtrm-tools/skills/using-service-skills/scripts/skill_activator.py +152 -0
- package/plugins/xtrm-tools/skills/using-service-skills/scripts/test_skill_activator.py +58 -0
- package/plugins/xtrm-tools/skills/using-xtrm/SKILL.md +124 -0
- package/plugins/xtrm-tools/skills/xt-end/SKILL.md +128 -0
package/cli/package.json
CHANGED
package/config/hooks.json
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
{
|
|
5
5
|
"script": "beads-compact-restore.mjs",
|
|
6
6
|
"timeout": 5000
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"script": "xtrm-session-logger.mjs",
|
|
10
|
+
"timeout": 3000
|
|
7
11
|
}
|
|
8
12
|
],
|
|
9
13
|
"UserPromptSubmit": [
|
|
@@ -49,6 +53,10 @@
|
|
|
49
53
|
"matcher": "Bash|mcp__serena__find_symbol|mcp__serena__get_symbols_overview|mcp__serena__search_for_pattern|mcp__serena__find_referencing_symbols|mcp__serena__replace_symbol_body|mcp__serena__insert_after_symbol|mcp__serena__insert_before_symbol|mcp__serena__rename_symbol",
|
|
50
54
|
"script": "gitnexus/gitnexus-hook.cjs",
|
|
51
55
|
"timeout": 10000
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"script": "xtrm-tool-logger.mjs",
|
|
59
|
+
"timeout": 3000
|
|
52
60
|
}
|
|
53
61
|
],
|
|
54
62
|
"Stop": [
|
|
@@ -150,7 +150,6 @@ function main() {
|
|
|
150
150
|
kind: 'bd.claimed',
|
|
151
151
|
outcome: 'allow',
|
|
152
152
|
issueId,
|
|
153
|
-
message: `Session ${sessionId} claimed issue ${issueId}`,
|
|
154
153
|
});
|
|
155
154
|
|
|
156
155
|
process.stdout.write(JSON.stringify({
|
|
@@ -191,7 +190,6 @@ function main() {
|
|
|
191
190
|
kind: 'bd.closed',
|
|
192
191
|
outcome: 'allow',
|
|
193
192
|
issueId: closedIssueId,
|
|
194
|
-
message: `Issue ${closedIssueId} closed`,
|
|
195
193
|
});
|
|
196
194
|
}
|
|
197
195
|
if (commit) {
|
|
@@ -200,10 +198,10 @@ function main() {
|
|
|
200
198
|
runtime: 'claude',
|
|
201
199
|
sessionId,
|
|
202
200
|
layer: 'bd',
|
|
203
|
-
kind: 'bd.
|
|
201
|
+
kind: 'bd.committed',
|
|
204
202
|
outcome: commit.ok ? 'allow' : 'block',
|
|
205
203
|
issueId: closedIssueId ?? null,
|
|
206
|
-
|
|
204
|
+
data: { msg: commit.message },
|
|
207
205
|
extra: { ok: commit.ok },
|
|
208
206
|
});
|
|
209
207
|
}
|
|
@@ -42,7 +42,7 @@ withSafeBdContext(() => {
|
|
|
42
42
|
runtime: 'claude',
|
|
43
43
|
sessionId: ctx.sessionId,
|
|
44
44
|
layer: 'gate',
|
|
45
|
-
kind: '
|
|
45
|
+
kind: 'gate.commit.allow',
|
|
46
46
|
outcome: 'allow',
|
|
47
47
|
toolName: 'Bash',
|
|
48
48
|
issueId: state?.claimId ?? null,
|
|
@@ -57,7 +57,7 @@ withSafeBdContext(() => {
|
|
|
57
57
|
runtime: 'claude',
|
|
58
58
|
sessionId: ctx.sessionId,
|
|
59
59
|
layer: 'gate',
|
|
60
|
-
kind: '
|
|
60
|
+
kind: 'gate.commit.block',
|
|
61
61
|
outcome: 'block',
|
|
62
62
|
toolName: 'Bash',
|
|
63
63
|
issueId: decision.claimed ?? null,
|
|
@@ -31,7 +31,7 @@ if (!_boundary.allow) {
|
|
|
31
31
|
runtime: 'claude',
|
|
32
32
|
sessionId: resolveSessionId(input),
|
|
33
33
|
layer: 'gate',
|
|
34
|
-
kind: '
|
|
34
|
+
kind: 'gate.worktree.block',
|
|
35
35
|
outcome: 'block',
|
|
36
36
|
toolName: input.tool_name,
|
|
37
37
|
message: _wbReason,
|
|
@@ -55,7 +55,7 @@ withSafeBdContext(() => {
|
|
|
55
55
|
runtime: 'claude',
|
|
56
56
|
sessionId: ctx.sessionId,
|
|
57
57
|
layer: 'gate',
|
|
58
|
-
kind: '
|
|
58
|
+
kind: 'gate.edit.allow',
|
|
59
59
|
outcome: 'allow',
|
|
60
60
|
toolName: input.tool_name,
|
|
61
61
|
issueId: state?.claimId ?? null,
|
|
@@ -73,7 +73,7 @@ withSafeBdContext(() => {
|
|
|
73
73
|
runtime: 'claude',
|
|
74
74
|
sessionId: ctx.sessionId,
|
|
75
75
|
layer: 'gate',
|
|
76
|
-
kind: '
|
|
76
|
+
kind: 'gate.edit.block',
|
|
77
77
|
outcome: 'block',
|
|
78
78
|
toolName: input.tool_name,
|
|
79
79
|
message: reason,
|
|
@@ -41,7 +41,7 @@ if (existsSync(marker)) {
|
|
|
41
41
|
runtime: 'claude',
|
|
42
42
|
sessionId,
|
|
43
43
|
layer: 'gate',
|
|
44
|
-
kind: '
|
|
44
|
+
kind: 'gate.memory.acked',
|
|
45
45
|
outcome: 'allow',
|
|
46
46
|
});
|
|
47
47
|
process.exit(0);
|
|
@@ -72,7 +72,7 @@ logEvent({
|
|
|
72
72
|
runtime: 'claude',
|
|
73
73
|
sessionId,
|
|
74
74
|
layer: 'gate',
|
|
75
|
-
kind: '
|
|
75
|
+
kind: 'gate.memory.triggered',
|
|
76
76
|
outcome: 'block',
|
|
77
77
|
issueId: closedIssueId,
|
|
78
78
|
message: memoryMessage,
|
|
@@ -31,7 +31,7 @@ withSafeBdContext(() => {
|
|
|
31
31
|
runtime: 'claude',
|
|
32
32
|
sessionId: ctx.sessionId,
|
|
33
33
|
layer: 'gate',
|
|
34
|
-
kind: '
|
|
34
|
+
kind: 'gate.stop.block',
|
|
35
35
|
outcome: 'block',
|
|
36
36
|
issueId: decision.claimed ?? null,
|
|
37
37
|
message,
|
|
@@ -46,7 +46,7 @@ withSafeBdContext(() => {
|
|
|
46
46
|
runtime: 'claude',
|
|
47
47
|
sessionId: ctx.sessionId,
|
|
48
48
|
layer: 'gate',
|
|
49
|
-
kind: '
|
|
49
|
+
kind: 'session.end',
|
|
50
50
|
outcome: 'allow',
|
|
51
51
|
});
|
|
52
52
|
process.exit(0);
|
package/hooks/xtrm-logger.mjs
CHANGED
|
@@ -1,130 +1,123 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// xtrm-logger.mjs — shared event logger for xtrm
|
|
2
|
+
// xtrm-logger.mjs — shared event logger for xtrm hooks
|
|
3
3
|
//
|
|
4
|
-
// Writes to
|
|
5
|
-
// Self-initializing: creates the table on first write
|
|
4
|
+
// Writes to .xtrm/debug.db (SQLite WAL) in the project root.
|
|
5
|
+
// Self-initializing: creates the DB and table on first write.
|
|
6
6
|
// Fails completely silently — logging NEVER affects hook behavior.
|
|
7
7
|
//
|
|
8
8
|
// Usage (from any hook):
|
|
9
9
|
// import { logEvent } from './xtrm-logger.mjs';
|
|
10
|
-
// logEvent({ cwd,
|
|
11
|
-
// outcome: 'block', toolName, issueId, message, extra });
|
|
10
|
+
// logEvent({ cwd, sessionId, kind: 'gate.edit.allow', outcome: 'allow', toolName, issueId });
|
|
12
11
|
|
|
13
12
|
import { spawnSync } from 'node:child_process';
|
|
14
|
-
import {
|
|
13
|
+
import { existsSync, mkdirSync } from 'node:fs';
|
|
14
|
+
import { join, dirname } from 'node:path';
|
|
15
15
|
|
|
16
16
|
// ── Schema ────────────────────────────────────────────────────────────────────
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
tool_name
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.replace(/'/g, "''") // single-quote → doubled
|
|
53
|
-
.replace(/\0/g, ''); // strip null bytes (invalid in utf8 strings)
|
|
54
|
-
return `'${str}'`;
|
|
18
|
+
const INIT_SQL = `
|
|
19
|
+
PRAGMA journal_mode=WAL;
|
|
20
|
+
PRAGMA busy_timeout=5000;
|
|
21
|
+
CREATE TABLE IF NOT EXISTS events (
|
|
22
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
23
|
+
ts INTEGER NOT NULL,
|
|
24
|
+
session_id TEXT NOT NULL,
|
|
25
|
+
runtime TEXT NOT NULL,
|
|
26
|
+
worktree TEXT,
|
|
27
|
+
kind TEXT NOT NULL,
|
|
28
|
+
tool_name TEXT,
|
|
29
|
+
outcome TEXT,
|
|
30
|
+
issue_id TEXT,
|
|
31
|
+
duration_ms INTEGER,
|
|
32
|
+
data TEXT
|
|
33
|
+
);
|
|
34
|
+
CREATE INDEX IF NOT EXISTS idx_ts ON events(ts);
|
|
35
|
+
CREATE INDEX IF NOT EXISTS idx_session ON events(session_id);
|
|
36
|
+
CREATE INDEX IF NOT EXISTS idx_kind ON events(kind);
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
// ── Helpers ───────────────────────────────────────────────────────────────────
|
|
40
|
+
|
|
41
|
+
function findDbPath(cwd) {
|
|
42
|
+
let dir = cwd;
|
|
43
|
+
for (let i = 0; i < 10; i++) {
|
|
44
|
+
if (existsSync(join(dir, '.beads'))) {
|
|
45
|
+
return join(dir, '.xtrm', 'debug.db');
|
|
46
|
+
}
|
|
47
|
+
const parent = join(dir, '..');
|
|
48
|
+
if (parent === dir) break;
|
|
49
|
+
dir = parent;
|
|
50
|
+
}
|
|
51
|
+
return null; // No beads project found — silently skip logging
|
|
55
52
|
}
|
|
56
53
|
|
|
57
|
-
function
|
|
58
|
-
return spawnSync('
|
|
59
|
-
cwd,
|
|
54
|
+
function sqlExec(dbPath, sql) {
|
|
55
|
+
return spawnSync('sqlite3', [dbPath, sql], {
|
|
60
56
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
61
57
|
encoding: 'utf8',
|
|
62
|
-
timeout:
|
|
58
|
+
timeout: 3000,
|
|
63
59
|
});
|
|
64
60
|
}
|
|
65
61
|
|
|
62
|
+
function ensureDb(dbPath) {
|
|
63
|
+
mkdirSync(dirname(dbPath), { recursive: true });
|
|
64
|
+
sqlExec(dbPath, INIT_SQL);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function sqlEsc(val) {
|
|
68
|
+
if (val === null || val === undefined) return 'NULL';
|
|
69
|
+
return `'${String(val).replace(/'/g, "''")}'`;
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
// ── Public API ────────────────────────────────────────────────────────────────
|
|
67
73
|
|
|
68
74
|
/**
|
|
69
|
-
* Log an xtrm event to
|
|
75
|
+
* Log an xtrm event to .xtrm/debug.db.
|
|
70
76
|
*
|
|
71
77
|
* @param {object} params
|
|
72
78
|
* @param {string} params.cwd Project working directory (required)
|
|
73
|
-
* @param {string} params.
|
|
74
|
-
* @param {string} params.
|
|
75
|
-
* @param {string} params.
|
|
76
|
-
* @param {string} params.
|
|
77
|
-
* @param {string} params.
|
|
78
|
-
* @param {string} [params.toolName] Tool intercepted (gates)
|
|
79
|
+
* @param {string} params.sessionId Session UUID or Pi PID string (required)
|
|
80
|
+
* @param {string} params.kind Dot-separated kind: 'gate.edit.allow', 'tool.call', 'bd.claimed', etc. (required)
|
|
81
|
+
* @param {string} [params.runtime] 'claude' | 'pi' (default: 'claude')
|
|
82
|
+
* @param {string} [params.outcome] 'allow' | 'block' | 'ok' | 'error'
|
|
83
|
+
* @param {string} [params.toolName] Tool name for gate / tool.call events
|
|
79
84
|
* @param {string} [params.issueId] Linked beads issue ID
|
|
80
|
-
* @param {
|
|
81
|
-
* @param {object} [params.
|
|
82
|
-
*
|
|
83
|
-
* @
|
|
85
|
+
* @param {number} [params.durationMs] Tool call duration
|
|
86
|
+
* @param {object} [params.data] Structured context (file, cmd, reason, etc.)
|
|
87
|
+
* @param {string} [params.message] Legacy: message string (merged into data.msg)
|
|
88
|
+
* @param {object} [params.extra] Legacy: extra object (merged into data)
|
|
84
89
|
*/
|
|
85
90
|
export function logEvent(params) {
|
|
86
91
|
try {
|
|
87
|
-
const { cwd,
|
|
88
|
-
if (!cwd || !
|
|
92
|
+
const { cwd, sessionId, kind } = params;
|
|
93
|
+
if (!cwd || !sessionId || !kind) return;
|
|
94
|
+
|
|
95
|
+
const { runtime = 'claude', outcome, toolName, issueId, durationMs, message, extra, data } = params;
|
|
89
96
|
|
|
90
|
-
const
|
|
97
|
+
const dbPath = findDbPath(cwd);
|
|
98
|
+
if (!dbPath) return;
|
|
91
99
|
|
|
92
|
-
// Derive worktree name if cwd is inside .xtrm/worktrees/<name>
|
|
93
100
|
const worktreeMatch = cwd.match(/\.xtrm\/worktrees\/([^/]+)/);
|
|
94
101
|
const worktree = worktreeMatch ? worktreeMatch[1] : null;
|
|
95
102
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
sqlEscape(sessionId),
|
|
104
|
-
sqlEscape(worktree),
|
|
105
|
-
sqlEscape(layer),
|
|
106
|
-
sqlEscape(kind),
|
|
107
|
-
sqlEscape(outcome),
|
|
108
|
-
sqlEscape(toolName ?? null),
|
|
109
|
-
sqlEscape(issueId ?? null),
|
|
110
|
-
sqlEscape(message ?? null),
|
|
111
|
-
sqlEscape(extraJson),
|
|
112
|
-
].join(', ');
|
|
113
|
-
|
|
114
|
-
const insertSql = `INSERT INTO xtrm_events (${cols}) VALUES (${vals})`;
|
|
115
|
-
|
|
116
|
-
let result = bdSql(insertSql, cwd);
|
|
117
|
-
if (result.status !== 0) {
|
|
118
|
-
// Table may not exist yet — create it (includes seq col) and retry once
|
|
119
|
-
bdSql(CREATE_SQL, cwd);
|
|
120
|
-
// Migrate existing table if it predates the seq column (fails silently if col exists)
|
|
121
|
-
bdSql(ADD_SEQ_SQL, cwd);
|
|
122
|
-
result = bdSql(insertSql, cwd);
|
|
103
|
+
// Merge message/extra/data into a single JSON string
|
|
104
|
+
let dataStr = null;
|
|
105
|
+
if (data !== null && data !== undefined) {
|
|
106
|
+
dataStr = typeof data === 'string' ? data : JSON.stringify(data);
|
|
107
|
+
} else if (message || extra) {
|
|
108
|
+
const merged = { ...(message ? { msg: message } : {}), ...(extra || {}) };
|
|
109
|
+
if (Object.keys(merged).length > 0) dataStr = JSON.stringify(merged);
|
|
123
110
|
}
|
|
124
111
|
|
|
125
|
-
|
|
112
|
+
const ts = Date.now();
|
|
113
|
+
const sql = `INSERT INTO events (ts,session_id,runtime,worktree,kind,tool_name,outcome,issue_id,duration_ms,data) VALUES (${ts},${sqlEsc(sessionId)},${sqlEsc(runtime)},${sqlEsc(worktree)},${sqlEsc(kind)},${sqlEsc(toolName ?? null)},${sqlEsc(outcome ?? null)},${sqlEsc(issueId ?? null)},${durationMs ?? 'NULL'},${sqlEsc(dataStr)})`;
|
|
114
|
+
|
|
115
|
+
let result = sqlExec(dbPath, sql);
|
|
116
|
+
if (result.status !== 0) {
|
|
117
|
+
ensureDb(dbPath);
|
|
118
|
+
result = sqlExec(dbPath, sql);
|
|
119
|
+
}
|
|
126
120
|
} catch {
|
|
127
121
|
// Silently swallow all errors — logging never affects hook behavior
|
|
128
|
-
return null;
|
|
129
122
|
}
|
|
130
123
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// xtrm-session-logger.mjs — SessionStart hook
|
|
3
|
+
// Logs session.start to .xtrm/debug.db so every session has a clear entry point.
|
|
4
|
+
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
import { logEvent } from './xtrm-logger.mjs';
|
|
7
|
+
import { resolveCwd, resolveSessionId } from './beads-gate-utils.mjs';
|
|
8
|
+
|
|
9
|
+
function readInput() {
|
|
10
|
+
try { return JSON.parse(readFileSync(0, 'utf-8')); } catch { return null; }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const input = readInput();
|
|
14
|
+
if (!input) process.exit(0);
|
|
15
|
+
|
|
16
|
+
const cwd = resolveCwd(input) || process.cwd();
|
|
17
|
+
const sessionId = resolveSessionId(input);
|
|
18
|
+
|
|
19
|
+
logEvent({
|
|
20
|
+
cwd,
|
|
21
|
+
runtime: 'claude',
|
|
22
|
+
sessionId,
|
|
23
|
+
kind: 'session.start',
|
|
24
|
+
outcome: 'ok',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
process.exit(0);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// xtrm-tool-logger.mjs — PostToolUse hook
|
|
3
|
+
// Logs every tool call to .xtrm/debug.db with kind=tool.call.
|
|
4
|
+
// Captures tool-specific context: cmd for Bash, file path for edits, etc.
|
|
5
|
+
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { logEvent } from './xtrm-logger.mjs';
|
|
8
|
+
import { resolveCwd, resolveSessionId } from './beads-gate-utils.mjs';
|
|
9
|
+
|
|
10
|
+
function readInput() {
|
|
11
|
+
try { return JSON.parse(readFileSync(0, 'utf-8')); } catch { return null; }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function buildData(toolName, toolInput) {
|
|
15
|
+
if (!toolInput) return null;
|
|
16
|
+
if (toolName === 'Bash' || toolName === 'bash' || toolName === 'execute_shell_command') {
|
|
17
|
+
return { cmd: (toolInput.command || '').slice(0, 120) };
|
|
18
|
+
}
|
|
19
|
+
if (['Read', 'Write', 'Edit', 'MultiEdit', 'NotebookEdit'].includes(toolName)) {
|
|
20
|
+
return toolInput.file_path ? { file: toolInput.file_path } : null;
|
|
21
|
+
}
|
|
22
|
+
if (toolName === 'Glob') return { pattern: toolInput.pattern, path: toolInput.path };
|
|
23
|
+
if (toolName === 'Grep') return { pattern: toolInput.pattern, path: toolInput.path };
|
|
24
|
+
if (toolName === 'WebFetch') return { url: (toolInput.url || '').slice(0, 100) };
|
|
25
|
+
if (toolName === 'WebSearch') return { query: (toolInput.query || '').slice(0, 100) };
|
|
26
|
+
if (toolName === 'Agent') return { prompt: (toolInput.prompt || '').slice(0, 80) };
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const input = readInput();
|
|
31
|
+
if (!input || input.hook_event_name !== 'PostToolUse') process.exit(0);
|
|
32
|
+
|
|
33
|
+
const toolName = input.tool_name;
|
|
34
|
+
|
|
35
|
+
// Skip tools that would create noise or cause recursion
|
|
36
|
+
const SKIP = new Set(['TodoRead', 'TodoWrite', 'Task', 'TaskCreate', 'TaskUpdate', 'TaskGet']);
|
|
37
|
+
if (SKIP.has(toolName)) process.exit(0);
|
|
38
|
+
|
|
39
|
+
const cwd = resolveCwd(input) || process.cwd();
|
|
40
|
+
const sessionId = resolveSessionId(input);
|
|
41
|
+
const isError = input.tool_response?.is_error === true;
|
|
42
|
+
|
|
43
|
+
logEvent({
|
|
44
|
+
cwd,
|
|
45
|
+
runtime: 'claude',
|
|
46
|
+
sessionId,
|
|
47
|
+
kind: 'tool.call',
|
|
48
|
+
outcome: isError ? 'error' : 'ok',
|
|
49
|
+
toolName,
|
|
50
|
+
data: buildData(toolName, input.tool_input),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xtrm-tools",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.26",
|
|
4
4
|
"description": "Claude Code tools installer (skills, hooks, MCP servers)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"hooks",
|
|
21
21
|
"skills",
|
|
22
22
|
"project-skills",
|
|
23
|
+
".claude-plugin",
|
|
24
|
+
"plugins",
|
|
23
25
|
"!**/__pycache__/**",
|
|
24
26
|
"!**/*.pyc",
|
|
25
27
|
"!project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/test_*.py",
|
|
@@ -48,6 +50,8 @@
|
|
|
48
50
|
"lint": "echo 'No linting configured'",
|
|
49
51
|
"test": "npm test --workspace cli",
|
|
50
52
|
"version": "npm run sync:cli-version && git add cli/package.json",
|
|
53
|
+
"prepack": "node scripts/prepack-plugin.mjs",
|
|
54
|
+
"postpack": "node scripts/postpack-plugin.mjs",
|
|
51
55
|
"prepublishOnly": "npm run sync:cli-version && npm run build"
|
|
52
56
|
},
|
|
53
57
|
"engines": {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"github-grep": {
|
|
4
|
+
"type": "http",
|
|
5
|
+
"url": "https://mcp.grep.app"
|
|
6
|
+
},
|
|
7
|
+
"deepwiki": {
|
|
8
|
+
"type": "http",
|
|
9
|
+
"url": "https://mcp.deepwiki.com/mcp"
|
|
10
|
+
},
|
|
11
|
+
"gitnexus": {
|
|
12
|
+
"type": "stdio",
|
|
13
|
+
"command": "npx",
|
|
14
|
+
"args": ["-y", "gitnexus", "mcp"],
|
|
15
|
+
"env": {}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Hooks
|
|
2
|
+
|
|
3
|
+
Claude Code hooks that extend agent behavior with automated checks, workflow enhancements, and safety guardrails.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Hooks intercept specific events in the Claude Code lifecycle. Following architecture decisions in v2.0.0+, the hook ecosystem is designed exclusively for Claude Code.
|
|
8
|
+
|
|
9
|
+
*Note: In v2.1.15+, several older hooks (`skill-suggestion.py`, `skill-discovery.py`, `gitnexus-impact-reminder.py`, and `type-safety-enforcement.py`) were removed or superseded by native capabilities, CLI commands, and consolidated quality gates.*
|
|
10
|
+
|
|
11
|
+
## Project Hooks
|
|
12
|
+
|
|
13
|
+
### gitnexus-hook.cjs
|
|
14
|
+
|
|
15
|
+
**Purpose**: Enriches tool calls with knowledge graph context via `gitnexus augment`. Now supports Serena tools and uses a deduplication cache for efficiency.
|
|
16
|
+
|
|
17
|
+
**Trigger**: PostToolUse (Grep|Glob|Bash|Serena edit tools)
|
|
18
|
+
|
|
19
|
+
## Beads Issue Tracking Gates
|
|
20
|
+
|
|
21
|
+
The beads gate hooks integrate the `bd` (beads) issue tracker directly into Claude's workflow, ensuring no code changes happen without an active ticket.
|
|
22
|
+
|
|
23
|
+
**Installation**: Installed with `xtrm install all` or included when `beads`+`dolt` is available.
|
|
24
|
+
|
|
25
|
+
### Core Gates
|
|
26
|
+
- **`beads-edit-gate.mjs`** (PreToolUse) — Blocks writes/edits without an active issue claim.
|
|
27
|
+
- **`beads-commit-gate.mjs`** (PreToolUse) — Blocks commits with an unresolved session claim.
|
|
28
|
+
- **`beads-stop-gate.mjs`** (Stop) — Blocks session stop while a claim remains open.
|
|
29
|
+
- **`beads-close-memory-prompt.mjs`** (PostToolUse) — Prompts memory handoff after `bd close`.
|
|
30
|
+
|
|
31
|
+
### Compaction & State Preservation (v2.1.18+)
|
|
32
|
+
- **`beads-pre-compact.mjs`** (PreCompact) — Saves the currently `in_progress` beads state before Claude clears context.
|
|
33
|
+
- **`beads-session-start.mjs`** (SessionStart) — Restores the `in_progress` state when the session restarts after compaction.
|
|
34
|
+
|
|
35
|
+
*Note: As of v2.1.18+, hook blocking messages are quieted and compacted to save tokens.*
|
|
36
|
+
|
|
37
|
+
## Hook Timeouts
|
|
38
|
+
|
|
39
|
+
Adjust hook execution timeouts in `settings.json` if commands take longer than expected:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"hooks": {
|
|
44
|
+
"PostToolUse": [{
|
|
45
|
+
"hooks": [{
|
|
46
|
+
"timeout": 5000 // Timeout in milliseconds (5000ms = 5 seconds)
|
|
47
|
+
}]
|
|
48
|
+
}]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Creating Custom Hooks
|
|
54
|
+
|
|
55
|
+
To create new project-specific hooks, use the `hook-development` global skill. Follow the canonical structure defined in the `xtrm-tools` core libraries.
|
|
56
|
+
|
|
57
|
+
For debugging orphaned hooks, use `xtrm clean`.
|
|
58
|
+
|
|
59
|
+
## Pi Extensions Migration
|
|
60
|
+
|
|
61
|
+
Core workflow hooks have been migrated to native Pi Extensions for better performance and integration. See the [Pi Extensions Migration Guide](../docs/pi-extensions-migration.md) for details.
|