xtrm-tools 0.5.0
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/CHANGELOG.md +504 -0
- package/README.md +201 -0
- package/cli/dist/index.cjs +57378 -0
- package/cli/dist/index.cjs.map +1 -0
- package/cli/dist/index.d.cts +2 -0
- package/cli/package.json +47 -0
- package/config/.env.example +40 -0
- package/config/hooks.json +72 -0
- package/config/instructions/agents-top.md +30 -0
- package/config/instructions/claude-top.md +30 -0
- package/config/mcp_servers.json +57 -0
- package/config/mcp_servers_optional.json +53 -0
- package/config/pi/auth.json.template +14 -0
- package/config/pi/extensions/auto-session-name/index.ts +29 -0
- package/config/pi/extensions/auto-session-name/package.json +16 -0
- package/config/pi/extensions/auto-update/index.ts +71 -0
- package/config/pi/extensions/auto-update/package.json +16 -0
- package/config/pi/extensions/beads/index.ts +166 -0
- package/config/pi/extensions/beads/package.json +16 -0
- package/config/pi/extensions/bg-process/index.ts +230 -0
- package/config/pi/extensions/bg-process/package.json +16 -0
- package/config/pi/extensions/compact-header/index.ts +69 -0
- package/config/pi/extensions/compact-header/package.json +16 -0
- package/config/pi/extensions/core/adapter.ts +52 -0
- package/config/pi/extensions/core/guard-rules.ts +102 -0
- package/config/pi/extensions/core/lib.ts +3 -0
- package/config/pi/extensions/core/logger.ts +45 -0
- package/config/pi/extensions/core/runner.ts +71 -0
- package/config/pi/extensions/core/session-state.ts +59 -0
- package/config/pi/extensions/custom-footer/index.ts +160 -0
- package/config/pi/extensions/custom-footer/package.json +16 -0
- package/config/pi/extensions/custom-provider-qwen-cli/index.ts +363 -0
- package/config/pi/extensions/custom-provider-qwen-cli/package.json +1 -0
- package/config/pi/extensions/git-checkpoint/index.ts +53 -0
- package/config/pi/extensions/git-checkpoint/package.json +16 -0
- package/config/pi/extensions/minimal-mode/index.ts +201 -0
- package/config/pi/extensions/minimal-mode/package.json +16 -0
- package/config/pi/extensions/plan-mode/README.md +65 -0
- package/config/pi/extensions/plan-mode/index.ts +417 -0
- package/config/pi/extensions/plan-mode/package.json +12 -0
- package/config/pi/extensions/plan-mode/utils.ts +324 -0
- package/config/pi/extensions/quality-gates/index.ts +67 -0
- package/config/pi/extensions/quality-gates/package.json +16 -0
- package/config/pi/extensions/service-skills/index.ts +108 -0
- package/config/pi/extensions/service-skills/package.json +16 -0
- package/config/pi/extensions/session-flow/index.ts +131 -0
- package/config/pi/extensions/session-flow/package.json +16 -0
- package/config/pi/extensions/todo/index.ts +299 -0
- package/config/pi/extensions/todo/package.json +16 -0
- package/config/pi/extensions/xtrm-loader/index.ts +89 -0
- package/config/pi/extensions/xtrm-loader/package.json +16 -0
- package/config/pi/install-schema.json +44 -0
- package/config/pi/models.json.template +76 -0
- package/config/pi/pi-worktrees-settings.json +6 -0
- package/config/pi/settings.json.template +16 -0
- package/config/settings.json +70 -0
- package/hooks/README.md +75 -0
- package/hooks/agent_context.py +105 -0
- package/hooks/beads-claim-sync.mjs +166 -0
- package/hooks/beads-commit-gate.mjs +55 -0
- package/hooks/beads-compact-restore.mjs +69 -0
- package/hooks/beads-compact-save.mjs +51 -0
- package/hooks/beads-edit-gate.mjs +45 -0
- package/hooks/beads-gate-core.mjs +215 -0
- package/hooks/beads-gate-messages.mjs +87 -0
- package/hooks/beads-gate-utils.mjs +185 -0
- package/hooks/beads-memory-gate.mjs +61 -0
- package/hooks/beads-stop-gate.mjs +32 -0
- package/hooks/branch-state.mjs +39 -0
- package/hooks/gitnexus/gitnexus-hook.cjs +222 -0
- package/hooks/guard-rules.mjs +118 -0
- package/hooks/hooks.json +116 -0
- package/hooks/main-guard-post-push.mjs +71 -0
- package/hooks/main-guard.mjs +119 -0
- package/hooks/quality-check.cjs +1286 -0
- package/hooks/quality-check.py +345 -0
- package/hooks/serena-workflow-reminder.py +74 -0
- package/package.json +77 -0
- package/project-skills/quality-gates/.claude/hooks/hook-config.json +66 -0
- package/project-skills/quality-gates/.claude/hooks/quality-check.cjs +1286 -0
- package/project-skills/quality-gates/.claude/hooks/quality-check.py +334 -0
- package/project-skills/quality-gates/.claude/settings.json +3 -0
- package/project-skills/quality-gates/.claude/skills/using-quality-gates/SKILL.md +254 -0
- package/project-skills/quality-gates/README.md +109 -0
- package/project-skills/quality-gates/evals/evals.json +181 -0
- package/project-skills/quality-gates/workspace/iteration-1/FINAL-EVAL-SUMMARY.md +75 -0
- package/project-skills/quality-gates/workspace/iteration-1/edge-case-auto-fix-verification/with_skill/outputs/response.md +59 -0
- package/project-skills/quality-gates/workspace/iteration-1/edge-case-mixed-language-project/with_skill/outputs/response.md +60 -0
- package/project-skills/quality-gates/workspace/iteration-1/eval-summary.md +105 -0
- package/project-skills/quality-gates/workspace/iteration-1/partial-install-python-only/with_skill/outputs/response.md +93 -0
- package/project-skills/quality-gates/workspace/iteration-1/python-refactor-request/with_skill/outputs/response.md +104 -0
- package/project-skills/quality-gates/workspace/iteration-1/quality-gate-error-fix/with_skill/outputs/response.md +74 -0
- package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-general-chat/with_skill/outputs/response.md +18 -0
- package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-math-question/with_skill/outputs/response.md +18 -0
- package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-unrelated-coding/with_skill/outputs/response.md +56 -0
- package/project-skills/quality-gates/workspace/iteration-1/tdd-guard-blocking-confusion/with_skill/outputs/response.md +67 -0
- package/project-skills/quality-gates/workspace/iteration-1/typescript-feature-with-tests/with_skill/outputs/response.md +97 -0
- package/project-skills/service-skills-set/.claude/git-hooks/doc_reminder.py +67 -0
- package/project-skills/service-skills-set/.claude/git-hooks/skill_staleness.py +194 -0
- package/project-skills/service-skills-set/.claude/service-registry.json +4 -0
- package/project-skills/service-skills-set/.claude/settings.json +37 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/SKILL.md +433 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/references/script_quality_standards.md +425 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/references/service_skill_system_guide.md +278 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/bootstrap.py +308 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/deep_dive.py +304 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/scaffolder.py +482 -0
- package/project-skills/service-skills-set/.claude/skills/scoping-service-skills/SKILL.md +231 -0
- package/project-skills/service-skills-set/.claude/skills/scoping-service-skills/scripts/scope.py +74 -0
- package/project-skills/service-skills-set/.claude/skills/updating-service-skills/SKILL.md +136 -0
- package/project-skills/service-skills-set/.claude/skills/updating-service-skills/scripts/drift_detector.py +222 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/SKILL.md +108 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/cataloger.py +74 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/skill_activator.py +152 -0
- package/project-skills/service-skills-set/README.md +93 -0
- package/project-skills/service-skills-set/install-service-skills.py +193 -0
- package/project-skills/service-skills-set/service-skills-readme.md +236 -0
- package/skills/README.txt +31 -0
- package/skills/clean-code/SKILL.md +201 -0
- package/skills/creating-service-skills/SKILL.md +433 -0
- package/skills/creating-service-skills/references/script_quality_standards.md +425 -0
- package/skills/creating-service-skills/references/service_skill_system_guide.md +278 -0
- package/skills/creating-service-skills/scripts/bootstrap.py +326 -0
- package/skills/creating-service-skills/scripts/deep_dive.py +304 -0
- package/skills/creating-service-skills/scripts/scaffolder.py +482 -0
- package/skills/delegating/SKILL.md +196 -0
- package/skills/delegating/config.yaml +210 -0
- package/skills/delegating/references/orchestration-protocols.md +41 -0
- package/skills/docker-expert/SKILL.md +409 -0
- package/skills/documenting/CHANGELOG.md +23 -0
- package/skills/documenting/README.md +148 -0
- package/skills/documenting/SKILL.md +113 -0
- package/skills/documenting/examples/example_pattern.md +70 -0
- package/skills/documenting/examples/example_reference.md +70 -0
- package/skills/documenting/examples/example_ssot_analytics.md +64 -0
- package/skills/documenting/examples/example_workflow.md +141 -0
- package/skills/documenting/references/changelog-format.md +97 -0
- package/skills/documenting/references/metadata-schema.md +136 -0
- package/skills/documenting/references/taxonomy.md +81 -0
- package/skills/documenting/references/versioning-rules.md +78 -0
- package/skills/documenting/scripts/bump_version.sh +60 -0
- package/skills/documenting/scripts/changelog/__init__.py +0 -0
- package/skills/documenting/scripts/changelog/add_entry.py +216 -0
- package/skills/documenting/scripts/changelog/bump_release.py +117 -0
- package/skills/documenting/scripts/changelog/init_changelog.py +54 -0
- package/skills/documenting/scripts/changelog/validate_changelog.py +128 -0
- package/skills/documenting/scripts/drift_detector.py +266 -0
- package/skills/documenting/scripts/generate_template.py +311 -0
- package/skills/documenting/scripts/list_by_category.sh +84 -0
- package/skills/documenting/scripts/orchestrator.py +255 -0
- package/skills/documenting/scripts/validate_metadata.py +242 -0
- package/skills/documenting/templates/CHANGELOG.md.template +13 -0
- package/skills/find-skills/SKILL.md +133 -0
- package/skills/gitnexus-debugging/SKILL.md +85 -0
- package/skills/gitnexus-exploring/SKILL.md +75 -0
- package/skills/gitnexus-impact-analysis/SKILL.md +94 -0
- package/skills/gitnexus-refactoring/SKILL.md +113 -0
- package/skills/hook-development/SKILL.md +797 -0
- package/skills/hook-development/examples/load-context.sh +55 -0
- package/skills/hook-development/examples/quality-check.js +1168 -0
- package/skills/hook-development/examples/validate-bash.sh +43 -0
- package/skills/hook-development/examples/validate-write.sh +38 -0
- package/skills/hook-development/references/advanced.md +527 -0
- package/skills/hook-development/references/migration.md +369 -0
- package/skills/hook-development/references/patterns.md +412 -0
- package/skills/hook-development/scripts/README.md +164 -0
- package/skills/hook-development/scripts/hook-linter.sh +153 -0
- package/skills/hook-development/scripts/test-hook.sh +252 -0
- package/skills/hook-development/scripts/validate-hook-schema.sh +159 -0
- package/skills/obsidian-cli/SKILL.md +106 -0
- package/skills/orchestrating-agents/SKILL.md +135 -0
- package/skills/orchestrating-agents/config.yaml +45 -0
- package/skills/orchestrating-agents/references/agent-context-integration.md +37 -0
- package/skills/orchestrating-agents/references/examples.md +45 -0
- package/skills/orchestrating-agents/references/handover-protocol.md +31 -0
- package/skills/orchestrating-agents/references/workflows.md +42 -0
- package/skills/orchestrating-agents/scripts/detect_neighbors.py +23 -0
- package/skills/prompt-improving/README.md +162 -0
- package/skills/prompt-improving/SKILL.md +74 -0
- package/skills/prompt-improving/references/analysis_commands.md +24 -0
- package/skills/prompt-improving/references/chain_of_thought.md +24 -0
- package/skills/prompt-improving/references/mcp_definitions.md +20 -0
- package/skills/prompt-improving/references/multishot.md +23 -0
- package/skills/prompt-improving/references/xml_core.md +60 -0
- package/skills/python-testing/SKILL.md +815 -0
- package/skills/scoping-service-skills/SKILL.md +231 -0
- package/skills/scoping-service-skills/scripts/scope.py +74 -0
- package/skills/senior-backend/SKILL.md +209 -0
- package/skills/senior-backend/references/api_design_patterns.md +103 -0
- package/skills/senior-backend/references/backend_security_practices.md +103 -0
- package/skills/senior-backend/references/database_optimization_guide.md +103 -0
- package/skills/senior-backend/scripts/api_load_tester.py +114 -0
- package/skills/senior-backend/scripts/api_scaffolder.py +114 -0
- package/skills/senior-backend/scripts/database_migration_tool.py +114 -0
- package/skills/senior-data-scientist/SKILL.md +226 -0
- package/skills/senior-data-scientist/references/experiment_design_frameworks.md +80 -0
- package/skills/senior-data-scientist/references/feature_engineering_patterns.md +80 -0
- package/skills/senior-data-scientist/references/statistical_methods_advanced.md +80 -0
- package/skills/senior-data-scientist/scripts/experiment_designer.py +100 -0
- package/skills/senior-data-scientist/scripts/feature_engineering_pipeline.py +100 -0
- package/skills/senior-data-scientist/scripts/model_evaluation_suite.py +100 -0
- package/skills/senior-devops/SKILL.md +209 -0
- package/skills/senior-devops/references/cicd_pipeline_guide.md +103 -0
- package/skills/senior-devops/references/deployment_strategies.md +103 -0
- package/skills/senior-devops/references/infrastructure_as_code.md +103 -0
- package/skills/senior-devops/scripts/deployment_manager.py +114 -0
- package/skills/senior-devops/scripts/pipeline_generator.py +114 -0
- package/skills/senior-devops/scripts/terraform_scaffolder.py +114 -0
- package/skills/senior-security/SKILL.md +209 -0
- package/skills/senior-security/references/cryptography_implementation.md +103 -0
- package/skills/senior-security/references/penetration_testing_guide.md +103 -0
- package/skills/senior-security/references/security_architecture_patterns.md +103 -0
- package/skills/senior-security/scripts/pentest_automator.py +114 -0
- package/skills/senior-security/scripts/security_auditor.py +114 -0
- package/skills/senior-security/scripts/threat_modeler.py +114 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +479 -0
- package/skills/skill-creator/agents/analyzer.md +274 -0
- package/skills/skill-creator/agents/comparator.md +202 -0
- package/skills/skill-creator/agents/grader.md +223 -0
- package/skills/skill-creator/assets/eval_review.html +146 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/skill-creator/references/schemas.md +430 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-creator/scripts/generate_report.py +326 -0
- package/skills/skill-creator/scripts/improve_description.py +248 -0
- package/skills/skill-creator/scripts/package_skill.py +136 -0
- package/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/skill-creator/scripts/run_eval.py +310 -0
- package/skills/skill-creator/scripts/run_loop.py +332 -0
- package/skills/skill-creator/scripts/utils.py +47 -0
- package/skills/sync-docs/SKILL.md +132 -0
- package/skills/sync-docs/evals/evals.json +89 -0
- package/skills/sync-docs/references/doc-structure.md +99 -0
- package/skills/sync-docs/references/schema.md +103 -0
- package/skills/sync-docs/scripts/changelog/add_entry.py +216 -0
- package/skills/sync-docs/scripts/context_gatherer.py +240 -0
- package/skills/sync-docs/scripts/doc_structure_analyzer.py +495 -0
- package/skills/sync-docs/scripts/drift_detector.py +327 -0
- package/skills/sync-docs/scripts/validate_doc.py +365 -0
- package/skills/sync-docs/scripts/validate_metadata.py +185 -0
- package/skills/sync-docs-workspace/iteration-1/benchmark.json +293 -0
- package/skills/sync-docs-workspace/iteration-1/benchmark.md +13 -0
- package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/outputs/result.md +210 -0
- package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/grading.json +28 -0
- package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/outputs/result.md +101 -0
- package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/grading.json +28 -0
- package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/outputs/result.md +198 -0
- package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/grading.json +28 -0
- package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/outputs/result.md +94 -0
- package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/grading.json +28 -0
- package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/outputs/result.md +237 -0
- package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/grading.json +28 -0
- package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/outputs/result.md +134 -0
- package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/grading.json +28 -0
- package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-2/benchmark.json +297 -0
- package/skills/sync-docs-workspace/iteration-2/benchmark.md +13 -0
- package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/outputs/result.md +137 -0
- package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/grading.json +92 -0
- package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/outputs/result.md +134 -0
- package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/grading.json +86 -0
- package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/outputs/result.md +193 -0
- package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/grading.json +72 -0
- package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/outputs/result.md +211 -0
- package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/grading.json +91 -0
- package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/outputs/result.md +182 -0
- package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/grading.json +95 -0
- package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/timing.json +1 -0
- package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/outputs/result.md +222 -0
- package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/grading.json +88 -0
- package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-3/benchmark.json +298 -0
- package/skills/sync-docs-workspace/iteration-3/benchmark.md +13 -0
- package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/outputs/result.md +125 -0
- package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/grading.json +97 -0
- package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/outputs/result.md +144 -0
- package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/grading.json +78 -0
- package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/outputs/result.md +104 -0
- package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/grading.json +91 -0
- package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/outputs/result.md +79 -0
- package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/grading.json +82 -0
- package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/eval_metadata.json +27 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase1_context.json +302 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase2_drift.txt +33 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase3_analysis.json +114 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase4_fix.txt +118 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase5_validate.txt +38 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/result.md +158 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/grading.json +95 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/timing.json +5 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/outputs/result.md +71 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/grading.json +90 -0
- package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/timing.json +5 -0
- package/skills/test-planning/SKILL.md +208 -0
- package/skills/test-planning/evals/evals.json +23 -0
- package/skills/updating-service-skills/SKILL.md +136 -0
- package/skills/updating-service-skills/scripts/drift_detector.py +222 -0
- package/skills/using-TDD/SKILL.md +410 -0
- package/skills/using-quality-gates/SKILL.md +254 -0
- package/skills/using-serena-lsp/README.md +8 -0
- package/skills/using-serena-lsp/REFERENCE.md +194 -0
- package/skills/using-serena-lsp/SKILL.md +82 -0
- package/skills/using-service-skills/SKILL.md +108 -0
- package/skills/using-service-skills/scripts/cataloger.py +74 -0
- package/skills/using-service-skills/scripts/skill_activator.py +152 -0
- package/skills/using-service-skills/scripts/test_skill_activator.py +58 -0
- package/skills/using-xtrm/SKILL.md +245 -0
- package/skills/xt-end/SKILL.md +128 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Generate SSOT memory template with boilerplate metadata.
|
|
4
|
+
|
|
5
|
+
Creates a new memory file with proper frontmatter structure based on category type.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import sys
|
|
9
|
+
from datetime import datetime, timezone
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
TEMPLATES = {
|
|
14
|
+
"ssot": """---
|
|
15
|
+
title: {title}
|
|
16
|
+
version: 0.1.0
|
|
17
|
+
updated: {timestamp}
|
|
18
|
+
scope: {scope}
|
|
19
|
+
category: {category}
|
|
20
|
+
subcategory: {subcategory}
|
|
21
|
+
domain: [{domain}]
|
|
22
|
+
applicability: {applicability}
|
|
23
|
+
tracks: []
|
|
24
|
+
changelog:
|
|
25
|
+
- 0.1.0 ({date}): Initial creation.
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<!-- INDEX: auto-generated by validate_metadata.py — do not edit manually -->
|
|
29
|
+
| Section | Summary |
|
|
30
|
+
|---|---|
|
|
31
|
+
<!-- END INDEX -->
|
|
32
|
+
|
|
33
|
+
## Purpose
|
|
34
|
+
{purpose}
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
{overview}
|
|
38
|
+
|
|
39
|
+
## Key Components
|
|
40
|
+
|
|
41
|
+
### Component 1
|
|
42
|
+
Description...
|
|
43
|
+
|
|
44
|
+
### Component 2
|
|
45
|
+
Description...
|
|
46
|
+
|
|
47
|
+
## Current State
|
|
48
|
+
|
|
49
|
+
### What Works
|
|
50
|
+
- Item 1
|
|
51
|
+
- Item 2
|
|
52
|
+
|
|
53
|
+
### Known Limitations
|
|
54
|
+
- Limitation 1
|
|
55
|
+
- Limitation 2
|
|
56
|
+
|
|
57
|
+
## Related SSOTs
|
|
58
|
+
- `related_ssot_1.md` - Description
|
|
59
|
+
- `related_ssot_2.md` - Description
|
|
60
|
+
|
|
61
|
+
## Next Steps
|
|
62
|
+
- [ ] Task 1
|
|
63
|
+
- [ ] Task 2
|
|
64
|
+
|
|
65
|
+
## References
|
|
66
|
+
- Internal doc references
|
|
67
|
+
- External resources
|
|
68
|
+
""",
|
|
69
|
+
|
|
70
|
+
"pattern": """---
|
|
71
|
+
title: {title}
|
|
72
|
+
version: 0.1.0
|
|
73
|
+
updated: {timestamp}
|
|
74
|
+
scope: {scope}
|
|
75
|
+
category: pattern
|
|
76
|
+
subcategory: {subcategory}
|
|
77
|
+
domain: [{domain}]
|
|
78
|
+
applicability: {applicability}
|
|
79
|
+
tracks: []
|
|
80
|
+
changelog:
|
|
81
|
+
- 0.1.0 ({date}): Initial creation.
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
<!-- INDEX: auto-generated by validate_metadata.py — do not edit manually -->
|
|
85
|
+
| Section | Summary |
|
|
86
|
+
|---|---|
|
|
87
|
+
<!-- END INDEX -->
|
|
88
|
+
|
|
89
|
+
## Purpose
|
|
90
|
+
{purpose}
|
|
91
|
+
|
|
92
|
+
## Pattern Description
|
|
93
|
+
{description}
|
|
94
|
+
|
|
95
|
+
## When to Apply
|
|
96
|
+
- Scenario 1
|
|
97
|
+
- Scenario 2
|
|
98
|
+
|
|
99
|
+
## Implementation
|
|
100
|
+
|
|
101
|
+
### Approach
|
|
102
|
+
Steps to implement this pattern...
|
|
103
|
+
|
|
104
|
+
### Example
|
|
105
|
+
```python
|
|
106
|
+
# Code example
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Trade-offs
|
|
110
|
+
|
|
111
|
+
### Benefits
|
|
112
|
+
- Benefit 1
|
|
113
|
+
- Benefit 2
|
|
114
|
+
|
|
115
|
+
### Costs
|
|
116
|
+
- Cost 1
|
|
117
|
+
- Cost 2
|
|
118
|
+
|
|
119
|
+
## Related Patterns
|
|
120
|
+
- `related_pattern_1.md`
|
|
121
|
+
- `related_pattern_2.md`
|
|
122
|
+
""",
|
|
123
|
+
|
|
124
|
+
"reference": """---
|
|
125
|
+
title: {title}
|
|
126
|
+
scope: {scope}
|
|
127
|
+
category: reference
|
|
128
|
+
subcategory: {subcategory}
|
|
129
|
+
domain: [{domain}]
|
|
130
|
+
tracks: []
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
<!-- INDEX: auto-generated by validate_metadata.py — do not edit manually -->
|
|
134
|
+
| Section | Summary |
|
|
135
|
+
|---|---|
|
|
136
|
+
<!-- END INDEX -->
|
|
137
|
+
|
|
138
|
+
## Purpose
|
|
139
|
+
{purpose}
|
|
140
|
+
|
|
141
|
+
## Quick Reference
|
|
142
|
+
|
|
143
|
+
### Category 1
|
|
144
|
+
| Item | Description | Example |
|
|
145
|
+
|------|-------------|---------|
|
|
146
|
+
| Item1 | Desc | `example` |
|
|
147
|
+
|
|
148
|
+
### Category 2
|
|
149
|
+
Details...
|
|
150
|
+
|
|
151
|
+
## Detailed Documentation
|
|
152
|
+
|
|
153
|
+
### Section 1
|
|
154
|
+
Content...
|
|
155
|
+
|
|
156
|
+
### Section 2
|
|
157
|
+
Content...
|
|
158
|
+
|
|
159
|
+
## Examples
|
|
160
|
+
|
|
161
|
+
### Example 1: {example_name}
|
|
162
|
+
```
|
|
163
|
+
Code or configuration example
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Example 2: {example_name}
|
|
167
|
+
```
|
|
168
|
+
Code or configuration example
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Additional Resources
|
|
172
|
+
- Link 1
|
|
173
|
+
- Link 2
|
|
174
|
+
""",
|
|
175
|
+
|
|
176
|
+
"plan": """---
|
|
177
|
+
title: {title}
|
|
178
|
+
version: 0.1.0
|
|
179
|
+
updated: {timestamp}
|
|
180
|
+
scope: {scope}
|
|
181
|
+
category: plan
|
|
182
|
+
subcategory: {subcategory}
|
|
183
|
+
status: draft
|
|
184
|
+
tracks: []
|
|
185
|
+
changelog:
|
|
186
|
+
- 0.1.0 ({date}): Initial plan creation.
|
|
187
|
+
tracks: []
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
<!-- INDEX: auto-generated by validate_metadata.py — do not edit manually -->
|
|
191
|
+
| Section | Summary |
|
|
192
|
+
|---|---|
|
|
193
|
+
<!-- END INDEX -->
|
|
194
|
+
|
|
195
|
+
## Objective
|
|
196
|
+
{objective}
|
|
197
|
+
|
|
198
|
+
## Background
|
|
199
|
+
{background}
|
|
200
|
+
|
|
201
|
+
## Proposed Approach
|
|
202
|
+
|
|
203
|
+
### Phase 1: {phase_name}
|
|
204
|
+
- Task 1
|
|
205
|
+
- Task 2
|
|
206
|
+
|
|
207
|
+
### Phase 2: {phase_name}
|
|
208
|
+
- Task 1
|
|
209
|
+
- Task 2
|
|
210
|
+
|
|
211
|
+
## Success Criteria
|
|
212
|
+
- [ ] Criterion 1
|
|
213
|
+
- [ ] Criterion 2
|
|
214
|
+
|
|
215
|
+
## Risks & Mitigations
|
|
216
|
+
| Risk | Impact | Mitigation |
|
|
217
|
+
|------|--------|------------|
|
|
218
|
+
| Risk 1 | High | Mitigation strategy |
|
|
219
|
+
|
|
220
|
+
## Timeline
|
|
221
|
+
- Phase 1: Dates
|
|
222
|
+
- Phase 2: Dates
|
|
223
|
+
|
|
224
|
+
## Related Docs
|
|
225
|
+
- `related_ssot.md`
|
|
226
|
+
- `related_pattern.md`
|
|
227
|
+
""",
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
def generate_timestamp():
|
|
232
|
+
"""Generate ISO8601 timestamp with timezone."""
|
|
233
|
+
return datetime.now(timezone.utc).isoformat()
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def generate_date():
|
|
237
|
+
"""Generate YYYY-MM-DD date."""
|
|
238
|
+
return datetime.now().strftime("%Y-%m-%d")
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def generate_template(category, **kwargs):
|
|
242
|
+
"""Generate memory template from category."""
|
|
243
|
+
if category not in TEMPLATES:
|
|
244
|
+
print(f"ERROR: Invalid category: {category}")
|
|
245
|
+
print(f"Valid categories: {', '.join(TEMPLATES.keys())}")
|
|
246
|
+
sys.exit(1)
|
|
247
|
+
|
|
248
|
+
# Merge defaults with user-provided values
|
|
249
|
+
params = {
|
|
250
|
+
"title": "New Memory",
|
|
251
|
+
"timestamp": generate_timestamp(),
|
|
252
|
+
"date": generate_date(),
|
|
253
|
+
"scope": "to-be-defined",
|
|
254
|
+
"category": category,
|
|
255
|
+
"subcategory": "general",
|
|
256
|
+
"domain": "domain1, domain2",
|
|
257
|
+
"applicability": "specific area or 'all'",
|
|
258
|
+
"purpose": "Brief statement of purpose...",
|
|
259
|
+
"overview": "High-level overview...",
|
|
260
|
+
"description": "Detailed description...",
|
|
261
|
+
"objective": "What this plan aims to achieve...",
|
|
262
|
+
"background": "Context and motivation...",
|
|
263
|
+
"phase_name": "Phase Name",
|
|
264
|
+
"example_name": "Example Name",
|
|
265
|
+
}
|
|
266
|
+
params.update(kwargs)
|
|
267
|
+
|
|
268
|
+
return TEMPLATES[category].format(**params)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def main():
|
|
272
|
+
if len(sys.argv) < 3:
|
|
273
|
+
print("Usage: generate_template.py <category> <output_filename> [key=value ...]")
|
|
274
|
+
print("")
|
|
275
|
+
print("Categories: ssot, pattern, reference, plan")
|
|
276
|
+
print("")
|
|
277
|
+
print("Examples:")
|
|
278
|
+
print(" generate_template.py ssot analytics_new_ssot.md \\")
|
|
279
|
+
print(" title='New Analytics SSOT' domain='analytics' subcategory='metrics'")
|
|
280
|
+
print("")
|
|
281
|
+
print(" generate_template.py pattern caching_strategy_pattern.md \\")
|
|
282
|
+
print(" title='Caching Strategy Pattern' domain='performance'")
|
|
283
|
+
sys.exit(1)
|
|
284
|
+
|
|
285
|
+
category = sys.argv[1]
|
|
286
|
+
output_file = sys.argv[2]
|
|
287
|
+
|
|
288
|
+
# Parse optional key=value parameters
|
|
289
|
+
params = {}
|
|
290
|
+
for arg in sys.argv[3:]:
|
|
291
|
+
if '=' in arg:
|
|
292
|
+
key, value = arg.split('=', 1)
|
|
293
|
+
params[key] = value.strip("'\"")
|
|
294
|
+
|
|
295
|
+
# Generate template
|
|
296
|
+
content = generate_template(category, **params)
|
|
297
|
+
|
|
298
|
+
# Write to file
|
|
299
|
+
output_path = Path(output_file)
|
|
300
|
+
if output_path.exists():
|
|
301
|
+
print(f"ERROR: File already exists: {output_file}")
|
|
302
|
+
print("Use a different filename or remove the existing file first.")
|
|
303
|
+
sys.exit(1)
|
|
304
|
+
|
|
305
|
+
output_path.write_text(content, encoding='utf-8')
|
|
306
|
+
print(f"✅ Created {category} memory: {output_file}")
|
|
307
|
+
print(f"📝 Edit the file to fill in placeholders and add content.")
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
if __name__ == "__main__":
|
|
311
|
+
main()
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# List Serena memories filtered by category suffix
|
|
3
|
+
#
|
|
4
|
+
# Usage: list_by_category.sh [category]
|
|
5
|
+
# category: ssot | pattern | plan | reference | archive | troubleshoot | all
|
|
6
|
+
#
|
|
7
|
+
# Examples:
|
|
8
|
+
# list_by_category.sh ssot -> List all SSOT memories
|
|
9
|
+
# list_by_category.sh archive -> List all archived memories
|
|
10
|
+
# list_by_category.sh all -> List all memories grouped by category
|
|
11
|
+
|
|
12
|
+
set -e
|
|
13
|
+
|
|
14
|
+
CATEGORY="${1:-all}"
|
|
15
|
+
MEMORIES_DIR="${SERENA_MEMORIES_DIR:-.serena/memories}"
|
|
16
|
+
|
|
17
|
+
if [ ! -d "$MEMORIES_DIR" ]; then
|
|
18
|
+
echo "ERROR: Memories directory not found: $MEMORIES_DIR"
|
|
19
|
+
echo "Set SERENA_MEMORIES_DIR environment variable or run from project root"
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Function to list files with a given suffix
|
|
24
|
+
list_suffix() {
|
|
25
|
+
local suffix=$1
|
|
26
|
+
local label=$2
|
|
27
|
+
local files
|
|
28
|
+
|
|
29
|
+
files=$(find "$MEMORIES_DIR" -maxdepth 1 -name "*_${suffix}.md" -type f 2>/dev/null | sort)
|
|
30
|
+
|
|
31
|
+
if [ -n "$files" ]; then
|
|
32
|
+
echo ""
|
|
33
|
+
echo "=== ${label} ==="
|
|
34
|
+
echo "$files" | while read -r file; do
|
|
35
|
+
basename "$file"
|
|
36
|
+
done
|
|
37
|
+
fi
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
# List by category
|
|
41
|
+
case "$CATEGORY" in
|
|
42
|
+
ssot)
|
|
43
|
+
list_suffix "ssot" "SSOT Memories"
|
|
44
|
+
;;
|
|
45
|
+
pattern)
|
|
46
|
+
list_suffix "pattern" "Pattern Memories"
|
|
47
|
+
;;
|
|
48
|
+
plan)
|
|
49
|
+
list_suffix "plan" "Plan Memories"
|
|
50
|
+
;;
|
|
51
|
+
reference)
|
|
52
|
+
list_suffix "reference" "Reference Memories"
|
|
53
|
+
;;
|
|
54
|
+
archive)
|
|
55
|
+
list_suffix "archive" "Archived Memories"
|
|
56
|
+
;;
|
|
57
|
+
troubleshoot)
|
|
58
|
+
list_suffix "troubleshoot" "Troubleshooting Guides"
|
|
59
|
+
;;
|
|
60
|
+
all)
|
|
61
|
+
echo "Memories in: $MEMORIES_DIR"
|
|
62
|
+
list_suffix "ssot" "SSOT Memories"
|
|
63
|
+
list_suffix "pattern" "Pattern Memories"
|
|
64
|
+
list_suffix "plan" "Plan Memories"
|
|
65
|
+
list_suffix "reference" "Reference Memories"
|
|
66
|
+
list_suffix "troubleshoot" "Troubleshooting Guides"
|
|
67
|
+
list_suffix "archive" "Archived Memories (Deprecated)"
|
|
68
|
+
|
|
69
|
+
# Count special files
|
|
70
|
+
commit_logs=$(find "$MEMORIES_DIR" -maxdepth 1 -name "*_commit_log.md" -type f 2>/dev/null | wc -l)
|
|
71
|
+
if [ "$commit_logs" -gt 0 ]; then
|
|
72
|
+
echo ""
|
|
73
|
+
echo "=== Commit Logs ==="
|
|
74
|
+
find "$MEMORIES_DIR" -maxdepth 1 -name "*_commit_log.md" -type f | sort | while read -r file; do
|
|
75
|
+
basename "$file"
|
|
76
|
+
done
|
|
77
|
+
fi
|
|
78
|
+
;;
|
|
79
|
+
*)
|
|
80
|
+
echo "ERROR: Invalid category: $CATEGORY"
|
|
81
|
+
echo "Valid categories: ssot, pattern, plan, reference, archive, troubleshoot, all"
|
|
82
|
+
exit 1
|
|
83
|
+
;;
|
|
84
|
+
esac
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Documentation orchestrator for coordinating SSOT, CHANGELOG, README, CLAUDE.md updates.
|
|
4
|
+
|
|
5
|
+
Workflow:
|
|
6
|
+
1. Classify change type (feature, bugfix, refactor, breaking, docs, chore)
|
|
7
|
+
2. Update SSOT memories (.serena/memories/)
|
|
8
|
+
3. Update CHANGELOG.md
|
|
9
|
+
4. Suggest README.md updates
|
|
10
|
+
5. Suggest CLAUDE.md/AGENT.md updates
|
|
11
|
+
6. Validate all changes
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import sys
|
|
15
|
+
from enum import Enum
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Dict, List, Optional
|
|
18
|
+
from datetime import datetime, timezone
|
|
19
|
+
|
|
20
|
+
from scripts.changelog.add_entry import add_entry_to_file, ChangeCategory
|
|
21
|
+
from scripts.changelog.validate_changelog import validate_file as validate_changelog_file
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ChangeType(Enum):
|
|
25
|
+
"""Types of changes to document."""
|
|
26
|
+
FEATURE = "feature"
|
|
27
|
+
BUGFIX = "bugfix"
|
|
28
|
+
REFACTOR = "refactor"
|
|
29
|
+
BREAKING = "breaking"
|
|
30
|
+
DOCS = "docs"
|
|
31
|
+
CHORE = "chore"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Mapping of ChangeType to CHANGELOG category
|
|
35
|
+
CHANGE_TYPE_TO_CATEGORY = {
|
|
36
|
+
ChangeType.FEATURE: ChangeCategory.ADDED,
|
|
37
|
+
ChangeType.BUGFIX: ChangeCategory.FIXED,
|
|
38
|
+
ChangeType.REFACTOR: ChangeCategory.CHANGED,
|
|
39
|
+
ChangeType.BREAKING: ChangeCategory.CHANGED,
|
|
40
|
+
ChangeType.DOCS: ChangeCategory.CHANGED,
|
|
41
|
+
ChangeType.CHORE: ChangeCategory.CHANGED,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class DocumentingOrchestrator:
|
|
46
|
+
"""Coordinates documentation updates across multiple doc types."""
|
|
47
|
+
|
|
48
|
+
def __init__(self, project_root: Path):
|
|
49
|
+
self.project_root = Path(project_root)
|
|
50
|
+
self.changelog_path = self.project_root / "CHANGELOG.md"
|
|
51
|
+
self.readme_path = self.project_root / "README.md"
|
|
52
|
+
self.claude_path = self._find_agent_doc()
|
|
53
|
+
self.ssot_dir = self.project_root / ".serena" / "memories"
|
|
54
|
+
|
|
55
|
+
def _find_agent_doc(self) -> Optional[Path]:
|
|
56
|
+
"""Find CLAUDE.md or AGENT.md."""
|
|
57
|
+
for name in ["CLAUDE.md", "AGENT.md"]:
|
|
58
|
+
path = self.project_root / name
|
|
59
|
+
if path.exists():
|
|
60
|
+
return path
|
|
61
|
+
return None
|
|
62
|
+
|
|
63
|
+
def document_change(
|
|
64
|
+
self,
|
|
65
|
+
change_type: ChangeType,
|
|
66
|
+
description: str,
|
|
67
|
+
details: Optional[Dict] = None
|
|
68
|
+
) -> Dict:
|
|
69
|
+
"""
|
|
70
|
+
Document a change across all relevant documentation.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
change_type: Type of change
|
|
74
|
+
description: Brief description
|
|
75
|
+
details: Additional context:
|
|
76
|
+
- scope: SSOT scope identifier
|
|
77
|
+
- category: SSOT category
|
|
78
|
+
- subcategory: SSOT subcategory
|
|
79
|
+
- files_changed: List of affected files
|
|
80
|
+
- breaking: Whether change is breaking
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
{
|
|
84
|
+
"changelog_updated": bool,
|
|
85
|
+
"ssot_updated": bool,
|
|
86
|
+
"ssot_file": Optional[Path],
|
|
87
|
+
"readme_suggestions": List[str],
|
|
88
|
+
"claude_suggestions": List[str],
|
|
89
|
+
"validation_errors": List[str]
|
|
90
|
+
}
|
|
91
|
+
"""
|
|
92
|
+
details = details or {}
|
|
93
|
+
result = {
|
|
94
|
+
"changelog_updated": False,
|
|
95
|
+
"ssot_updated": False,
|
|
96
|
+
"ssot_file": None,
|
|
97
|
+
"readme_suggestions": [],
|
|
98
|
+
"claude_suggestions": [],
|
|
99
|
+
"validation_errors": []
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
# 1. Update CHANGELOG
|
|
103
|
+
if self.changelog_path.exists():
|
|
104
|
+
try:
|
|
105
|
+
category = CHANGE_TYPE_TO_CATEGORY[change_type]
|
|
106
|
+
if details.get("breaking"):
|
|
107
|
+
description = f"**BREAKING**: {description}"
|
|
108
|
+
|
|
109
|
+
add_entry_to_file(self.changelog_path, category, description)
|
|
110
|
+
result["changelog_updated"] = True
|
|
111
|
+
except Exception as e:
|
|
112
|
+
result["validation_errors"].append(f"CHANGELOG update failed: {e}")
|
|
113
|
+
|
|
114
|
+
# 2. Update/Create SSOT (if relevant)
|
|
115
|
+
if change_type in [ChangeType.FEATURE, ChangeType.REFACTOR, ChangeType.BREAKING]:
|
|
116
|
+
ssot_result = self._update_ssot(change_type, description, details)
|
|
117
|
+
result.update(ssot_result)
|
|
118
|
+
|
|
119
|
+
# 3. Generate README suggestions
|
|
120
|
+
if change_type == ChangeType.FEATURE:
|
|
121
|
+
result["readme_suggestions"] = self._generate_readme_suggestions(description, details)
|
|
122
|
+
|
|
123
|
+
# 4. Generate CLAUDE.md suggestions
|
|
124
|
+
if change_type in [ChangeType.FEATURE, ChangeType.REFACTOR]:
|
|
125
|
+
result["claude_suggestions"] = self._generate_claude_suggestions(description, details)
|
|
126
|
+
|
|
127
|
+
# 5. Validate all documentation
|
|
128
|
+
validation = self.validate_all()
|
|
129
|
+
result["validation_errors"].extend(validation["errors"])
|
|
130
|
+
|
|
131
|
+
return result
|
|
132
|
+
|
|
133
|
+
def _update_ssot(self, change_type: ChangeType, description: str, details: Dict) -> Dict:
|
|
134
|
+
"""Update or create SSOT memory."""
|
|
135
|
+
# This will be implemented with Serena tools in later tasks
|
|
136
|
+
# For now, just return placeholder
|
|
137
|
+
return {
|
|
138
|
+
"ssot_updated": False,
|
|
139
|
+
"ssot_file": None
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
def _generate_readme_suggestions(self, description: str, details: Dict) -> List[str]:
|
|
143
|
+
"""Generate suggestions for README.md updates."""
|
|
144
|
+
suggestions = []
|
|
145
|
+
|
|
146
|
+
# Suggest updating features section
|
|
147
|
+
suggestions.append(f"Consider adding to ## Features section: {description}")
|
|
148
|
+
|
|
149
|
+
# If files_changed includes examples, suggest updating usage
|
|
150
|
+
if details.get("files_changed"):
|
|
151
|
+
if any("example" in f.lower() for f in details["files_changed"]):
|
|
152
|
+
suggestions.append("Update ## Usage section with new example")
|
|
153
|
+
|
|
154
|
+
return suggestions
|
|
155
|
+
|
|
156
|
+
def _generate_claude_suggestions(self, description: str, details: Dict) -> List[str]:
|
|
157
|
+
"""Generate suggestions for CLAUDE.md/AGENT.md updates."""
|
|
158
|
+
suggestions = []
|
|
159
|
+
|
|
160
|
+
if not self.claude_path:
|
|
161
|
+
return suggestions
|
|
162
|
+
|
|
163
|
+
# Suggest architecture updates for major features
|
|
164
|
+
suggestions.append(f"Review ## Architecture section for: {description}")
|
|
165
|
+
|
|
166
|
+
# If files_changed affects setup, suggest updating
|
|
167
|
+
if details.get("files_changed"):
|
|
168
|
+
setup_files = ["requirements.txt", "package.json", ".env", "docker-compose.yml"]
|
|
169
|
+
if any(f in details["files_changed"] for f in setup_files):
|
|
170
|
+
suggestions.append("Update ## Development Environment section")
|
|
171
|
+
|
|
172
|
+
return suggestions
|
|
173
|
+
|
|
174
|
+
def validate_all(self) -> Dict:
|
|
175
|
+
"""Validate all documentation."""
|
|
176
|
+
errors = []
|
|
177
|
+
warnings = []
|
|
178
|
+
|
|
179
|
+
# Validate CHANGELOG
|
|
180
|
+
if self.changelog_path.exists():
|
|
181
|
+
result = validate_changelog_file(self.changelog_path)
|
|
182
|
+
errors.extend(result.get("errors", []))
|
|
183
|
+
warnings.extend(result.get("warnings", []))
|
|
184
|
+
|
|
185
|
+
# TODO: Add SSOT validation
|
|
186
|
+
# TODO: Add README validation (check for broken links, etc.)
|
|
187
|
+
|
|
188
|
+
return {
|
|
189
|
+
"valid": len(errors) == 0,
|
|
190
|
+
"errors": errors,
|
|
191
|
+
"warnings": warnings
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def main():
|
|
196
|
+
"""CLI entry point."""
|
|
197
|
+
if len(sys.argv) < 4:
|
|
198
|
+
print("Usage: orchestrator.py <project_root> <change_type> <description> [--scope=X] [--category=Y]")
|
|
199
|
+
print("")
|
|
200
|
+
print("Change Types: feature, bugfix, refactor, breaking, docs, chore")
|
|
201
|
+
print("")
|
|
202
|
+
print("Example:")
|
|
203
|
+
print(' orchestrator.py . feature "Add semantic search" --scope=search --category=backend')
|
|
204
|
+
sys.exit(1)
|
|
205
|
+
|
|
206
|
+
project_root = Path(sys.argv[1])
|
|
207
|
+
change_type = ChangeType(sys.argv[2])
|
|
208
|
+
description = sys.argv[3]
|
|
209
|
+
|
|
210
|
+
# Parse optional details
|
|
211
|
+
details = {}
|
|
212
|
+
for arg in sys.argv[4:]:
|
|
213
|
+
if arg.startswith("--"):
|
|
214
|
+
key, value = arg[2:].split("=", 1)
|
|
215
|
+
details[key] = value
|
|
216
|
+
|
|
217
|
+
orchestrator = DocumentingOrchestrator(project_root)
|
|
218
|
+
result = orchestrator.document_change(change_type, description, details)
|
|
219
|
+
|
|
220
|
+
# Print results
|
|
221
|
+
print("")
|
|
222
|
+
print("📝 Documentation Update Results")
|
|
223
|
+
print("=" * 60)
|
|
224
|
+
|
|
225
|
+
if result["changelog_updated"]:
|
|
226
|
+
print("✅ CHANGELOG.md updated")
|
|
227
|
+
|
|
228
|
+
if result["ssot_updated"]:
|
|
229
|
+
print(f"✅ SSOT updated: {result['ssot_file']}")
|
|
230
|
+
|
|
231
|
+
if result["readme_suggestions"]:
|
|
232
|
+
print("")
|
|
233
|
+
print("💡 README.md suggestions:")
|
|
234
|
+
for suggestion in result["readme_suggestions"]:
|
|
235
|
+
print(f" - {suggestion}")
|
|
236
|
+
|
|
237
|
+
if result["claude_suggestions"]:
|
|
238
|
+
print("")
|
|
239
|
+
print("💡 CLAUDE.md suggestions:")
|
|
240
|
+
for suggestion in result["claude_suggestions"]:
|
|
241
|
+
print(f" - {suggestion}")
|
|
242
|
+
|
|
243
|
+
if result["validation_errors"]:
|
|
244
|
+
print("")
|
|
245
|
+
print("❌ Validation errors:")
|
|
246
|
+
for error in result["validation_errors"]:
|
|
247
|
+
print(f" - {error}")
|
|
248
|
+
sys.exit(1)
|
|
249
|
+
|
|
250
|
+
print("")
|
|
251
|
+
print("✅ All documentation validated")
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
if __name__ == "__main__":
|
|
255
|
+
main()
|