@wipcomputer/wip-ai-devops-toolbox 1.9.55 → 1.9.56
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/.worktrees/toolbox--release-notes/.license-guard.json +7 -0
- package/.worktrees/toolbox--release-notes/.publish-skill.json +4 -0
- package/.worktrees/toolbox--release-notes/CHANGELOG.md +1875 -0
- package/.worktrees/toolbox--release-notes/CLA.md +19 -0
- package/.worktrees/toolbox--release-notes/DEV-GUIDE-GENERAL-PUBLIC.md +949 -0
- package/.worktrees/toolbox--release-notes/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/README.md +238 -0
- package/.worktrees/toolbox--release-notes/RELEASE-NOTES-v1-9-56.md +42 -0
- package/.worktrees/toolbox--release-notes/SKILL.md +821 -0
- package/.worktrees/toolbox--release-notes/TECHNICAL.md +416 -0
- package/.worktrees/toolbox--release-notes/UNIVERSAL-INTERFACE.md +180 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-8-0.md +29 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-8-1.md +7 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-8-2.md +7 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-0.md +37 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-1.md +38 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-10.md +40 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-2.md +40 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-31.md +26 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-32.md +18 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-41.md +28 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-45.md +25 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-46.md +38 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-47.md +42 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-48.md +22 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-49.md +31 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-50.md +24 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-51.md +11 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-52.md +25 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-53.md +22 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-54.md +13 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-55.md +11 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-6.md +72 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-7.md +23 -0
- package/.worktrees/toolbox--release-notes/_trash/RELEASE-NOTES-v1-9-9.md +75 -0
- package/.worktrees/toolbox--release-notes/_trash/guide 2/DEV-GUIDE.md +487 -0
- package/.worktrees/toolbox--release-notes/_trash/guide 2/scripts/deploy-public.sh +152 -0
- package/.worktrees/toolbox--release-notes/package.json +27 -0
- package/.worktrees/toolbox--release-notes/scripts/SKILL-deploy-public.md +61 -0
- package/.worktrees/toolbox--release-notes/scripts/SKILL-post-merge-rename.md +47 -0
- package/.worktrees/toolbox--release-notes/scripts/deploy-public.sh +345 -0
- package/.worktrees/toolbox--release-notes/scripts/post-merge-rename.sh +210 -0
- package/.worktrees/toolbox--release-notes/scripts/publish-skill.sh +134 -0
- package/.worktrees/toolbox--release-notes/templates/global-claude-md.md +73 -0
- package/.worktrees/toolbox--release-notes/templates/repo-claude-md.template +24 -0
- package/.worktrees/toolbox--release-notes/tools/deploy-public/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/deploy-public/README.md +31 -0
- package/.worktrees/toolbox--release-notes/tools/deploy-public/SKILL.md +71 -0
- package/.worktrees/toolbox--release-notes/tools/deploy-public/deploy-public.sh +264 -0
- package/.worktrees/toolbox--release-notes/tools/deploy-public/package.json +9 -0
- package/.worktrees/toolbox--release-notes/tools/ldm-jobs/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/ldm-jobs/README.md +46 -0
- package/.worktrees/toolbox--release-notes/tools/ldm-jobs/backup.sh +16 -0
- package/.worktrees/toolbox--release-notes/tools/ldm-jobs/branch-protect.sh +39 -0
- package/.worktrees/toolbox--release-notes/tools/ldm-jobs/crystal-capture.sh +19 -0
- package/.worktrees/toolbox--release-notes/tools/ldm-jobs/setup-shell.sh +27 -0
- package/.worktrees/toolbox--release-notes/tools/ldm-jobs/visibility-audit.sh +27 -0
- package/.worktrees/toolbox--release-notes/tools/post-merge-rename/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/post-merge-rename/README.md +29 -0
- package/.worktrees/toolbox--release-notes/tools/post-merge-rename/SKILL.md +57 -0
- package/.worktrees/toolbox--release-notes/tools/post-merge-rename/package.json +9 -0
- package/.worktrees/toolbox--release-notes/tools/post-merge-rename/post-merge-rename.sh +122 -0
- package/.worktrees/toolbox--release-notes/tools/wip-branch-guard/INSTALL.md +41 -0
- package/.worktrees/toolbox--release-notes/tools/wip-branch-guard/guard.mjs +459 -0
- package/.worktrees/toolbox--release-notes/tools/wip-branch-guard/package.json +18 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/CHANGELOG.md +6 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/README.md +113 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/REFERENCE.md +86 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/SKILL.md +105 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/guard.mjs +161 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/openclaw.plugin.json +8 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/package.json +27 -0
- package/.worktrees/toolbox--release-notes/tools/wip-file-guard/test.sh +119 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-guard/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-guard/README.md +69 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-guard/SKILL.md +65 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-guard/cli.mjs +472 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-guard/core.mjs +310 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-guard/guard.mjs +146 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-guard/package.json +22 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/CHANGELOG.md +17 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/README.md +200 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/SKILL.md +111 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/cli/index.d.ts +15 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/cli/index.js +170 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/cli/index.js.map +1 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/detector.d.ts +12 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/detector.js +104 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/detector.js.map +1 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/index.d.ts +4 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/index.js +5 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/index.js.map +1 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/ledger.d.ts +49 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/ledger.js +72 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/ledger.js.map +1 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/reporter.d.ts +14 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/reporter.js +227 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/reporter.js.map +1 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/scanner.d.ts +39 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/scanner.js +325 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/dist/core/scanner.js.map +1 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/hooks/pre-pull.sh +55 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/hooks/pre-push.sh +51 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/mcp-server.mjs +119 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/package-lock.json +54 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/package.json +43 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/src/cli/index.ts +189 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/src/core/detector.ts +130 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/src/core/index.ts +4 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/src/core/ledger.ts +116 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/src/core/reporter.ts +255 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/src/core/scanner.ts +367 -0
- package/.worktrees/toolbox--release-notes/tools/wip-license-hook/tsconfig.json +16 -0
- package/.worktrees/toolbox--release-notes/tools/wip-readme-format/README.md +49 -0
- package/.worktrees/toolbox--release-notes/tools/wip-readme-format/SKILL.md +84 -0
- package/.worktrees/toolbox--release-notes/tools/wip-readme-format/format.mjs +597 -0
- package/.worktrees/toolbox--release-notes/tools/wip-readme-format/package.json +15 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/CHANGELOG.md +42 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/README.md +45 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/REFERENCE.md +100 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/SKILL.md +139 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/cli.js +175 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/core.mjs +1664 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/mcp-server.mjs +113 -0
- package/.worktrees/toolbox--release-notes/tools/wip-release/package.json +36 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/README.md +38 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/SKILL.md +77 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/init.mjs +148 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/package.json +11 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/_sort/README.md +15 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/_trash/README.md +16 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/dev-updates/README.md +50 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/product/notes/README.md +26 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/product/plans-prds/roadmap.md +77 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/product/plans-prds/todos/README.md +63 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/product/product-ideas/README.md +24 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/product/readme-first-product.md +128 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-init/templates/read-me-first.md +80 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/README.md +86 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/SKILL.md +73 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/cli.js +93 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/core.mjs +122 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/guard.mjs +64 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/mcp-server.mjs +92 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/openclaw.plugin.json +8 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repo-permissions-hook/package.json +31 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repos/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repos/README.md +77 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repos/SKILL.md +80 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repos/claude.mjs +248 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repos/cli.mjs +191 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repos/core.mjs +290 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repos/mcp-server.mjs +157 -0
- package/.worktrees/toolbox--release-notes/tools/wip-repos/package.json +34 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/CHANGELOG.md +57 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/LICENSE +52 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/README.md +81 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/REFERENCE.md +122 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/SKILL.md +87 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/SPEC.md +206 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/detect.mjs +130 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/examples/minimal/README.md +20 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/examples/minimal/SKILL.md +28 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/examples/minimal/cli.mjs +4 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/examples/minimal/core.mjs +8 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/examples/minimal/mcp-server.mjs +27 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/examples/minimal/package.json +12 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/install.js +930 -0
- package/.worktrees/toolbox--release-notes/tools/wip-universal-installer/package.json +32 -0
- package/.worktrees/toolbox--save-stale/.license-guard.json +7 -0
- package/.worktrees/toolbox--save-stale/.publish-skill.json +4 -0
- package/.worktrees/toolbox--save-stale/CHANGELOG.md +1875 -0
- package/.worktrees/toolbox--save-stale/CLA.md +19 -0
- package/.worktrees/toolbox--save-stale/DEV-GUIDE-GENERAL-PUBLIC.md +949 -0
- package/.worktrees/toolbox--save-stale/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/README.md +238 -0
- package/.worktrees/toolbox--save-stale/SKILL.md +821 -0
- package/.worktrees/toolbox--save-stale/TECHNICAL.md +416 -0
- package/.worktrees/toolbox--save-stale/UNIVERSAL-INTERFACE.md +180 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-8-0.md +29 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-8-1.md +7 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-8-2.md +7 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-0.md +37 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-1.md +38 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-10.md +40 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-2.md +40 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-31.md +26 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-32.md +18 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-41.md +28 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-45.md +25 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-46.md +38 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-47.md +42 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-48.md +22 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-49.md +31 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-50.md +24 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-51.md +11 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-52.md +25 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-53.md +22 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-54.md +13 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-55.md +11 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-6.md +72 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-7.md +23 -0
- package/.worktrees/toolbox--save-stale/_trash/RELEASE-NOTES-v1-9-9.md +75 -0
- package/.worktrees/toolbox--save-stale/_trash/guide 2/DEV-GUIDE.md +487 -0
- package/.worktrees/toolbox--save-stale/_trash/guide 2/scripts/deploy-public.sh +152 -0
- package/.worktrees/toolbox--save-stale/package.json +27 -0
- package/.worktrees/toolbox--save-stale/scripts/SKILL-deploy-public.md +61 -0
- package/.worktrees/toolbox--save-stale/scripts/SKILL-post-merge-rename.md +47 -0
- package/.worktrees/toolbox--save-stale/scripts/deploy-public.sh +345 -0
- package/.worktrees/toolbox--save-stale/scripts/post-merge-rename.sh +210 -0
- package/.worktrees/toolbox--save-stale/scripts/publish-skill.sh +134 -0
- package/.worktrees/toolbox--save-stale/templates/global-claude-md.md +73 -0
- package/.worktrees/toolbox--save-stale/templates/repo-claude-md.template +24 -0
- package/.worktrees/toolbox--save-stale/tools/deploy-public/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/deploy-public/README.md +31 -0
- package/.worktrees/toolbox--save-stale/tools/deploy-public/SKILL.md +71 -0
- package/.worktrees/toolbox--save-stale/tools/deploy-public/deploy-public.sh +264 -0
- package/.worktrees/toolbox--save-stale/tools/deploy-public/package.json +9 -0
- package/.worktrees/toolbox--save-stale/tools/ldm-jobs/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/ldm-jobs/README.md +46 -0
- package/.worktrees/toolbox--save-stale/tools/ldm-jobs/backup.sh +16 -0
- package/.worktrees/toolbox--save-stale/tools/ldm-jobs/branch-protect.sh +39 -0
- package/.worktrees/toolbox--save-stale/tools/ldm-jobs/crystal-capture.sh +19 -0
- package/.worktrees/toolbox--save-stale/tools/ldm-jobs/setup-shell.sh +27 -0
- package/.worktrees/toolbox--save-stale/tools/ldm-jobs/visibility-audit.sh +27 -0
- package/.worktrees/toolbox--save-stale/tools/post-merge-rename/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/post-merge-rename/README.md +29 -0
- package/.worktrees/toolbox--save-stale/tools/post-merge-rename/SKILL.md +57 -0
- package/.worktrees/toolbox--save-stale/tools/post-merge-rename/package.json +9 -0
- package/.worktrees/toolbox--save-stale/tools/post-merge-rename/post-merge-rename.sh +122 -0
- package/.worktrees/toolbox--save-stale/tools/wip-branch-guard/INSTALL.md +41 -0
- package/.worktrees/toolbox--save-stale/tools/wip-branch-guard/guard.mjs +459 -0
- package/.worktrees/toolbox--save-stale/tools/wip-branch-guard/package.json +18 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/CHANGELOG.md +6 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/README.md +113 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/REFERENCE.md +86 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/SKILL.md +105 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/guard.mjs +161 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/openclaw.plugin.json +8 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/package.json +27 -0
- package/.worktrees/toolbox--save-stale/tools/wip-file-guard/test.sh +119 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-guard/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-guard/README.md +69 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-guard/SKILL.md +65 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-guard/cli.mjs +472 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-guard/core.mjs +310 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-guard/guard.mjs +146 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-guard/package.json +22 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/CHANGELOG.md +17 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/README.md +200 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/SKILL.md +111 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/cli/index.d.ts +15 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/cli/index.js +170 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/cli/index.js.map +1 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/detector.d.ts +12 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/detector.js +104 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/detector.js.map +1 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/index.d.ts +4 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/index.js +5 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/index.js.map +1 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/ledger.d.ts +49 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/ledger.js +72 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/ledger.js.map +1 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/reporter.d.ts +14 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/reporter.js +227 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/reporter.js.map +1 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/scanner.d.ts +39 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/scanner.js +325 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/dist/core/scanner.js.map +1 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/hooks/pre-pull.sh +55 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/hooks/pre-push.sh +51 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/mcp-server.mjs +119 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/package-lock.json +54 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/package.json +43 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/src/cli/index.ts +189 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/src/core/detector.ts +130 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/src/core/index.ts +4 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/src/core/ledger.ts +116 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/src/core/reporter.ts +255 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/src/core/scanner.ts +367 -0
- package/.worktrees/toolbox--save-stale/tools/wip-license-hook/tsconfig.json +16 -0
- package/.worktrees/toolbox--save-stale/tools/wip-readme-format/README.md +49 -0
- package/.worktrees/toolbox--save-stale/tools/wip-readme-format/SKILL.md +84 -0
- package/.worktrees/toolbox--save-stale/tools/wip-readme-format/format.mjs +597 -0
- package/.worktrees/toolbox--save-stale/tools/wip-readme-format/package.json +15 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/CHANGELOG.md +42 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/README.md +45 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/REFERENCE.md +100 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/SKILL.md +139 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/cli.js +175 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/core.mjs +1664 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/mcp-server.mjs +113 -0
- package/.worktrees/toolbox--save-stale/tools/wip-release/package.json +36 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/README.md +38 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/SKILL.md +77 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/init.mjs +148 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/package.json +11 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/_sort/README.md +15 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/_trash/README.md +16 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/dev-updates/README.md +50 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/product/notes/README.md +26 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/product/plans-prds/roadmap.md +77 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/product/plans-prds/todos/README.md +63 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/product/product-ideas/README.md +24 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/product/readme-first-product.md +128 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-init/templates/read-me-first.md +80 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/README.md +86 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/SKILL.md +73 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/cli.js +93 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/core.mjs +122 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/guard.mjs +64 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/mcp-server.mjs +92 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/openclaw.plugin.json +8 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repo-permissions-hook/package.json +31 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repos/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repos/README.md +77 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repos/SKILL.md +80 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repos/claude.mjs +248 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repos/cli.mjs +191 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repos/core.mjs +290 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repos/mcp-server.mjs +157 -0
- package/.worktrees/toolbox--save-stale/tools/wip-repos/package.json +34 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/CHANGELOG.md +57 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/LICENSE +52 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/README.md +81 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/REFERENCE.md +122 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/SKILL.md +87 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/SPEC.md +206 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/detect.mjs +130 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/examples/minimal/README.md +20 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/examples/minimal/SKILL.md +28 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/examples/minimal/cli.mjs +4 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/examples/minimal/core.mjs +8 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/examples/minimal/mcp-server.mjs +27 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/examples/minimal/package.json +12 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/install.js +930 -0
- package/.worktrees/toolbox--save-stale/tools/wip-universal-installer/package.json +32 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/.license-guard.json +7 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/.publish-skill.json +4 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/CHANGELOG.md +1875 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/CLA.md +19 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/DEV-GUIDE-GENERAL-PUBLIC.md +949 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/README.md +238 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/SKILL.md +821 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/TECHNICAL.md +416 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/UNIVERSAL-INTERFACE.md +180 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-8-0.md +29 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-8-1.md +7 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-8-2.md +7 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-0.md +37 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-1.md +38 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-10.md +40 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-2.md +40 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-31.md +26 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-32.md +18 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-41.md +28 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-45.md +25 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-46.md +38 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-47.md +42 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-48.md +22 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-49.md +31 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-50.md +24 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-51.md +11 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-52.md +25 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-53.md +22 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-54.md +13 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-55.md +11 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-6.md +72 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-7.md +23 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/RELEASE-NOTES-v1-9-9.md +75 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/guide 2/DEV-GUIDE.md +487 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/_trash/guide 2/scripts/deploy-public.sh +152 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/package.json +27 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/scripts/SKILL-deploy-public.md +61 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/scripts/SKILL-post-merge-rename.md +47 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/scripts/deploy-public.sh +345 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/scripts/post-merge-rename.sh +210 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/scripts/publish-skill.sh +134 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/templates/global-claude-md.md +73 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/templates/repo-claude-md.template +24 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/deploy-public/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/deploy-public/README.md +31 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/deploy-public/SKILL.md +71 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/deploy-public/deploy-public.sh +264 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/deploy-public/package.json +9 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/ldm-jobs/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/ldm-jobs/README.md +46 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/ldm-jobs/backup.sh +16 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/ldm-jobs/branch-protect.sh +39 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/ldm-jobs/crystal-capture.sh +19 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/ldm-jobs/setup-shell.sh +27 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/ldm-jobs/visibility-audit.sh +27 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/post-merge-rename/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/post-merge-rename/README.md +29 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/post-merge-rename/SKILL.md +57 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/post-merge-rename/package.json +9 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/post-merge-rename/post-merge-rename.sh +122 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-branch-guard/INSTALL.md +41 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-branch-guard/guard.mjs +418 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-branch-guard/package.json +18 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/CHANGELOG.md +6 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/README.md +113 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/REFERENCE.md +86 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/SKILL.md +105 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/guard.mjs +161 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/openclaw.plugin.json +8 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/package.json +27 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-file-guard/test.sh +119 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-guard/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-guard/README.md +69 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-guard/SKILL.md +65 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-guard/cli.mjs +472 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-guard/core.mjs +310 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-guard/guard.mjs +146 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-guard/package.json +22 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/CHANGELOG.md +17 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/README.md +200 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/SKILL.md +111 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/cli/index.d.ts +15 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/cli/index.js +170 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/cli/index.js.map +1 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/detector.d.ts +12 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/detector.js +104 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/detector.js.map +1 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/index.d.ts +4 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/index.js +5 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/index.js.map +1 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/ledger.d.ts +49 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/ledger.js +72 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/ledger.js.map +1 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/reporter.d.ts +14 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/reporter.js +227 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/reporter.js.map +1 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/scanner.d.ts +39 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/scanner.js +325 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/dist/core/scanner.js.map +1 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/hooks/pre-pull.sh +55 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/hooks/pre-push.sh +51 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/mcp-server.mjs +119 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/package-lock.json +54 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/package.json +43 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/src/cli/index.ts +189 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/src/core/detector.ts +130 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/src/core/index.ts +4 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/src/core/ledger.ts +116 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/src/core/reporter.ts +255 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/src/core/scanner.ts +367 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-license-hook/tsconfig.json +16 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-readme-format/README.md +49 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-readme-format/SKILL.md +84 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-readme-format/format.mjs +597 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-readme-format/package.json +15 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/CHANGELOG.md +42 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/README.md +45 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/REFERENCE.md +100 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/SKILL.md +139 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/cli.js +175 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/core.mjs +1664 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/mcp-server.mjs +113 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-release/package.json +36 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/README.md +38 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/SKILL.md +77 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/init.mjs +148 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/package.json +11 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/_sort/README.md +15 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/_trash/README.md +16 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/dev-updates/README.md +50 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/product/notes/README.md +26 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/product/plans-prds/roadmap.md +77 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/product/plans-prds/todos/README.md +63 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/product/product-ideas/README.md +24 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/product/readme-first-product.md +128 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-init/templates/read-me-first.md +80 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/README.md +86 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/SKILL.md +73 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/cli.js +93 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/core.mjs +122 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/guard.mjs +64 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/mcp-server.mjs +92 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/openclaw.plugin.json +8 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repo-permissions-hook/package.json +31 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repos/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repos/README.md +77 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repos/SKILL.md +80 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repos/claude.mjs +248 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repos/cli.mjs +191 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repos/core.mjs +290 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repos/mcp-server.mjs +157 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-repos/package.json +34 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/CHANGELOG.md +57 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/LICENSE +52 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/README.md +81 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/REFERENCE.md +122 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/SKILL.md +87 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/SPEC.md +206 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/detect.mjs +130 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/examples/minimal/README.md +20 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/examples/minimal/SKILL.md +28 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/examples/minimal/cli.mjs +4 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/examples/minimal/core.mjs +8 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/examples/minimal/mcp-server.mjs +27 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/examples/minimal/package.json +12 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/install.js +930 -0
- package/.worktrees/wip-ai-devops-toolbox-private--cc-mini--dot-worktrees/tools/wip-universal-installer/package.json +32 -0
- package/CHANGELOG.md +45 -0
- package/DEV-GUIDE-GENERAL-PUBLIC.md +6 -6
- package/SKILL.md +1 -1
- package/_trash/RELEASE-NOTES-v1-9-56.md +42 -0
- package/package.json +1 -1
- package/tools/deploy-public/package.json +1 -1
- package/tools/post-merge-rename/package.json +1 -1
- package/tools/wip-branch-guard/guard.mjs +46 -5
- package/tools/wip-branch-guard/package.json +1 -1
- package/tools/wip-file-guard/package.json +1 -1
- package/tools/wip-license-guard/package.json +1 -1
- package/tools/wip-license-hook/package.json +1 -1
- package/tools/wip-readme-format/package.json +1 -1
- package/tools/wip-release/core.mjs +3 -3
- package/tools/wip-release/package.json +1 -1
- package/tools/wip-repo-init/package.json +1 -1
- package/tools/wip-repo-permissions-hook/package.json +1 -1
- package/tools/wip-repos/package.json +1 -1
- package/tools/wip-universal-installer/package.json +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# post-merge-rename.sh
|
|
4
|
+
# Scans for branches merged into main and renames them with --merged-YYYY-MM-DD.
|
|
5
|
+
# Branches already renamed (containing --merged-) are skipped.
|
|
6
|
+
# Never deletes branches. Only renames.
|
|
7
|
+
#
|
|
8
|
+
# Usage:
|
|
9
|
+
# bash post-merge-rename.sh # scan + rename all
|
|
10
|
+
# bash post-merge-rename.sh <branch> # rename a specific branch
|
|
11
|
+
# bash post-merge-rename.sh --dry-run # preview only
|
|
12
|
+
# bash post-merge-rename.sh <branch> --dry-run # preview specific branch
|
|
13
|
+
#
|
|
14
|
+
# Run this after merging a PR, or periodically to catch missed renames.
|
|
15
|
+
#
|
|
16
|
+
# Author: CC-mini (Opus 4.6)
|
|
17
|
+
# Date: 2026-03-08
|
|
18
|
+
|
|
19
|
+
set -euo pipefail
|
|
20
|
+
|
|
21
|
+
DRY_RUN=false
|
|
22
|
+
SPECIFIC_BRANCH=""
|
|
23
|
+
|
|
24
|
+
for arg in "$@"; do
|
|
25
|
+
case "$arg" in
|
|
26
|
+
--dry-run) DRY_RUN=true ;;
|
|
27
|
+
--help|-h)
|
|
28
|
+
echo "Usage: post-merge-rename.sh [<branch>] [--dry-run]"
|
|
29
|
+
echo ""
|
|
30
|
+
echo "Scans for branches merged into main and renames them"
|
|
31
|
+
echo "with --merged-YYYY-MM-DD suffix. Never deletes branches."
|
|
32
|
+
exit 0
|
|
33
|
+
;;
|
|
34
|
+
*) SPECIFIC_BRANCH="$arg" ;;
|
|
35
|
+
esac
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
# Must be in a git repo
|
|
39
|
+
if ! git rev-parse --is-inside-work-tree &>/dev/null; then
|
|
40
|
+
echo "Error: not inside a git repo."
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
# Fetch latest remote state
|
|
45
|
+
git fetch origin --prune 2>/dev/null || true
|
|
46
|
+
|
|
47
|
+
rename_branch() {
|
|
48
|
+
local branch="$1"
|
|
49
|
+
local trimmed
|
|
50
|
+
trimmed=$(echo "$branch" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//')
|
|
51
|
+
|
|
52
|
+
# Skip main
|
|
53
|
+
[[ "$trimmed" == "main" || "$trimmed" == "master" ]] && return
|
|
54
|
+
|
|
55
|
+
# Skip already renamed
|
|
56
|
+
[[ "$trimmed" == *"--merged-"* ]] && return
|
|
57
|
+
|
|
58
|
+
# Skip current branch (can't rename the checked-out branch)
|
|
59
|
+
local current
|
|
60
|
+
current=$(git branch --show-current)
|
|
61
|
+
if [[ "$trimmed" == "$current" ]]; then
|
|
62
|
+
echo " SKIP $trimmed (currently checked out)"
|
|
63
|
+
return
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
# Find merge date: when this branch's tip became reachable from main
|
|
67
|
+
local merge_date
|
|
68
|
+
merge_date=$(git log main --format="%ai" --ancestry-path "$(git merge-base main "$trimmed" 2>/dev/null)..main" 2>/dev/null | tail -1 | cut -d' ' -f1)
|
|
69
|
+
|
|
70
|
+
# Fallback: use the branch tip's own date
|
|
71
|
+
if [[ -z "$merge_date" ]]; then
|
|
72
|
+
merge_date=$(git log "$trimmed" -1 --format="%ai" 2>/dev/null | cut -d' ' -f1)
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
if [[ -z "$merge_date" ]]; then
|
|
76
|
+
echo " SKIP $trimmed (could not determine merge date)"
|
|
77
|
+
return
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
local new_name="${trimmed}--merged-${merge_date}"
|
|
81
|
+
|
|
82
|
+
if $DRY_RUN; then
|
|
83
|
+
echo " [dry-run] $trimmed -> $new_name"
|
|
84
|
+
else
|
|
85
|
+
echo " Renaming: $trimmed -> $new_name"
|
|
86
|
+
|
|
87
|
+
# Rename local
|
|
88
|
+
git branch -m "$trimmed" "$new_name" 2>/dev/null || true
|
|
89
|
+
|
|
90
|
+
# Push new name to remote
|
|
91
|
+
git push origin "$new_name" 2>/dev/null || true
|
|
92
|
+
|
|
93
|
+
# Remove old name from remote
|
|
94
|
+
git push origin --delete "$trimmed" 2>/dev/null || true
|
|
95
|
+
fi
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if [[ -n "$SPECIFIC_BRANCH" && "$SPECIFIC_BRANCH" != "--dry-run" ]]; then
|
|
99
|
+
# Rename a specific branch
|
|
100
|
+
echo "Checking branch: $SPECIFIC_BRANCH"
|
|
101
|
+
if git merge-base --is-ancestor "$SPECIFIC_BRANCH" main 2>/dev/null; then
|
|
102
|
+
rename_branch "$SPECIFIC_BRANCH"
|
|
103
|
+
else
|
|
104
|
+
echo " $SPECIFIC_BRANCH is NOT merged into main. Leaving as-is."
|
|
105
|
+
fi
|
|
106
|
+
else
|
|
107
|
+
# Scan all local branches merged into main
|
|
108
|
+
echo "Scanning for merged branches..."
|
|
109
|
+
merged=$(git branch --merged main | grep -v "^\*" | grep -v "main$" | grep -v "master$" | grep -v "\-\-merged\-" || true)
|
|
110
|
+
|
|
111
|
+
if [[ -z "$merged" ]]; then
|
|
112
|
+
echo " No unrenamed merged branches found. All clean."
|
|
113
|
+
exit 0
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
while IFS= read -r branch; do
|
|
117
|
+
rename_branch "$branch"
|
|
118
|
+
done <<< "$merged"
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
echo ""
|
|
122
|
+
echo "Done."
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# wip-branch-guard Installation
|
|
2
|
+
|
|
3
|
+
Add this hook to `~/.claude/settings.json` under `hooks.PreToolUse`:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"matcher": "Write|Edit|NotebookEdit|Bash",
|
|
8
|
+
"hooks": [
|
|
9
|
+
{
|
|
10
|
+
"type": "command",
|
|
11
|
+
"command": "node /Users/lesa/.ldm/extensions/wip-branch-guard/guard.mjs",
|
|
12
|
+
"timeout": 5
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then copy the guard to the extensions directory:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
mkdir -p ~/.ldm/extensions/wip-branch-guard
|
|
22
|
+
cp guard.mjs package.json ~/.ldm/extensions/wip-branch-guard/
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## What it does
|
|
26
|
+
|
|
27
|
+
Blocks ALL file writes and git commits when Claude Code is on main branch.
|
|
28
|
+
Agents must create a branch or use a worktree before editing anything.
|
|
29
|
+
|
|
30
|
+
## What it allows on main
|
|
31
|
+
|
|
32
|
+
- Read, Glob, Grep (read-only tools)
|
|
33
|
+
- git status, git log, git diff, git branch, git checkout, git pull, git merge, git push
|
|
34
|
+
- gh commands (issues, PRs, releases)
|
|
35
|
+
- Opening files in browser/mdview
|
|
36
|
+
|
|
37
|
+
## Test
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
node ~/.ldm/extensions/wip-branch-guard/guard.mjs --check
|
|
41
|
+
```
|
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// wip-branch-guard/guard.mjs
|
|
3
|
+
// PreToolUse hook for Claude Code.
|
|
4
|
+
// Blocks ALL file writes and git commits when on main branch.
|
|
5
|
+
// Agents must work on branches or worktrees. Never on main.
|
|
6
|
+
// Also blocks dangerous flags (--no-verify, --force) on ANY branch.
|
|
7
|
+
|
|
8
|
+
import { execSync } from 'node:child_process';
|
|
9
|
+
import { dirname, join } from 'node:path';
|
|
10
|
+
import { statSync, readFileSync, existsSync } from 'node:fs';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
|
|
13
|
+
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8'));
|
|
16
|
+
console.log(pkg.version);
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Tools that modify files or git state
|
|
21
|
+
const WRITE_TOOLS = new Set(['Write', 'Edit', 'NotebookEdit']);
|
|
22
|
+
const BASH_TOOL = 'Bash';
|
|
23
|
+
|
|
24
|
+
// Git commands that should be blocked on main
|
|
25
|
+
const BLOCKED_GIT_PATTERNS = [
|
|
26
|
+
/\bgit\s+commit\b/,
|
|
27
|
+
/\bgit\s+add\b/,
|
|
28
|
+
/\bgit\s+stash\b/,
|
|
29
|
+
/\bgit\s+reset\b/,
|
|
30
|
+
/\bgit\s+revert\b/,
|
|
31
|
+
/\bgit\s+clean\b/,
|
|
32
|
+
/\bgit\s+restore\b/,
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
// Destructive commands blocked on ANY branch, not just main.
|
|
36
|
+
// These destroy work that may belong to other agents or the user.
|
|
37
|
+
const DESTRUCTIVE_PATTERNS = [
|
|
38
|
+
/\bgit\s+clean\s+-[a-zA-Z]*f/, // git clean -f, -fd, -fdx (deletes untracked files)
|
|
39
|
+
/\bgit\s+checkout\s+--\s/, // git checkout -- <path> (reverts files)
|
|
40
|
+
/\bgit\s+checkout\s+\.\s*$/, // git checkout . (reverts everything)
|
|
41
|
+
/\bgit\s+stash\s+drop\b/, // git stash drop (permanently deletes stashed work)
|
|
42
|
+
/\bgit\s+stash\s+pop\b/, // git stash pop (overwrites working tree, drops on success)
|
|
43
|
+
/\bgit\s+reset\s+--hard\b/, // git reset --hard (nukes all uncommitted changes)
|
|
44
|
+
/\bgit\s+restore\s+(?!--staged)/, // git restore <path> (reverts files, but --staged is safe)
|
|
45
|
+
/\bpython3?\s+-c\s+.*\bopen\s*\(/, // python -c "open().write()" bypass (#241)
|
|
46
|
+
/\bnode\s+-e\s+.*\bfs\.\w*[Ww]rite/, // node -e "fs.writeFile()" bypass
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
// Git commands that are ALLOWED on main (read-only or safe operations)
|
|
50
|
+
const ALLOWED_GIT_PATTERNS = [
|
|
51
|
+
/\bgit\s+merge\b/,
|
|
52
|
+
/\bgit\s+pull\b/,
|
|
53
|
+
/\bgit\s+fetch\b/,
|
|
54
|
+
/\bgit\s+push\b/,
|
|
55
|
+
/\bgit\s+status\b/,
|
|
56
|
+
/\bgit\s+log\b/,
|
|
57
|
+
/\bgit\s+diff\b/,
|
|
58
|
+
/\bgit\s+branch\b/,
|
|
59
|
+
/\bgit\s+checkout\s+(?!--)[\w\-\/]+/, // git checkout <branch> only, NOT git checkout -- <path>
|
|
60
|
+
/\bgit\s+worktree\b/,
|
|
61
|
+
/\bgit\s+stash\s+list\b/, // read-only, just lists stashes
|
|
62
|
+
/\bgit\s+stash\s+show\b/, // read-only, just shows stash contents
|
|
63
|
+
/\bgit\s+remote\b/,
|
|
64
|
+
/\bgit\s+describe\b/,
|
|
65
|
+
/\bgit\s+tag\b/,
|
|
66
|
+
/\bgit\s+rev-parse\b/,
|
|
67
|
+
/\bgit\s+show\b/,
|
|
68
|
+
/\bgit\s+restore\s+--staged\b/, // unstaging is safe (doesn't change working tree)
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
// Non-git bash commands that write files (common patterns)
|
|
72
|
+
const BLOCKED_BASH_PATTERNS = [
|
|
73
|
+
/\bcp\s+/,
|
|
74
|
+
/\bmv\s+/,
|
|
75
|
+
/\brm\s+/,
|
|
76
|
+
/\bmkdir\s+/,
|
|
77
|
+
/\btouch\s+/,
|
|
78
|
+
/>\s/, // redirects
|
|
79
|
+
/\btee\s+/,
|
|
80
|
+
/\bsed\s+-i/,
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
// Allowed bash patterns (read-only operations, even though they match blocked patterns)
|
|
84
|
+
const ALLOWED_BASH_PATTERNS = [
|
|
85
|
+
/\bls\b/,
|
|
86
|
+
/\bcat\b/,
|
|
87
|
+
/\bhead\b/,
|
|
88
|
+
/\btail\b/,
|
|
89
|
+
/\bgrep\b/,
|
|
90
|
+
/\brg\b/,
|
|
91
|
+
/\bfind\b/,
|
|
92
|
+
/\bwc\b/,
|
|
93
|
+
/\becho\b/,
|
|
94
|
+
/\bcurl\b/,
|
|
95
|
+
/\bgh\s+(issue|pr|release|api)\b/,
|
|
96
|
+
/\bgh\s+pr\s+merge\b/,
|
|
97
|
+
/\blsof\b/,
|
|
98
|
+
/\bopen\s+-a\b/,
|
|
99
|
+
/\bpwd\b/,
|
|
100
|
+
/--dry-run/,
|
|
101
|
+
/--help/,
|
|
102
|
+
/\bwip-release\b.*--dry-run/,
|
|
103
|
+
/\bnpm\s+install\s+-g\b/, // global installs modify /opt/homebrew/, not the repo
|
|
104
|
+
/\bnpm\s+link\b/, // global operation, not repo-local
|
|
105
|
+
/\bldm\s+(install|init|doctor|stack|updates)\b/, // LDM OS commands modify ~/.ldm/, not the repo
|
|
106
|
+
/\brm\s+.*\.ldm\/state\//, // cleaning LDM state files only, not repo files
|
|
107
|
+
/\bclaude\s+mcp\b/, // MCP registration, not repo files
|
|
108
|
+
/\bmkdir\s+.*\.worktrees\b/, // creating .worktrees/ directory is part of the process
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
// Workflow steps for error messages (#213)
|
|
112
|
+
const WORKFLOW_ON_MAIN = `
|
|
113
|
+
The process: worktree -> branch -> commit -> push -> PR -> merge -> wip-release -> deploy-public.
|
|
114
|
+
|
|
115
|
+
Step 1: git worktree add .worktrees/<repo>--<branch> -b cc-mini/your-feature
|
|
116
|
+
Step 2: Edit files in the worktree
|
|
117
|
+
Step 3: git add + git commit (with co-authors)
|
|
118
|
+
Step 4: git push -u origin cc-mini/your-feature
|
|
119
|
+
Step 5: gh pr create, then gh pr merge --merge --delete-branch
|
|
120
|
+
Step 6: Back in main repo: git pull
|
|
121
|
+
Step 7: wip-release patch (with RELEASE-NOTES on the branch, not after)
|
|
122
|
+
Step 8: deploy-public.sh to sync public repo
|
|
123
|
+
|
|
124
|
+
Release notes go ON the feature branch, committed with the code. Not as a separate PR.`.trim();
|
|
125
|
+
|
|
126
|
+
const WORKFLOW_NOT_WORKTREE = `
|
|
127
|
+
You're on a branch but not in a worktree. Use a worktree so the main working tree stays clean.
|
|
128
|
+
|
|
129
|
+
Step 1: git checkout main (go back to main first)
|
|
130
|
+
Step 2: git worktree add ../my-worktree -b your-branch-name
|
|
131
|
+
Step 3: Edit files in the worktree directory`.trim();
|
|
132
|
+
|
|
133
|
+
function deny(reason) {
|
|
134
|
+
const output = {
|
|
135
|
+
hookSpecificOutput: {
|
|
136
|
+
hookEventName: 'PreToolUse',
|
|
137
|
+
permissionDecision: 'deny',
|
|
138
|
+
permissionDecisionReason: reason,
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
process.stdout.write(JSON.stringify(output));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function findRepoRoot(filePath) {
|
|
145
|
+
// Walk up from a file path to find the git repo root
|
|
146
|
+
try {
|
|
147
|
+
let dir = filePath;
|
|
148
|
+
// If it's a file, start from its directory
|
|
149
|
+
try {
|
|
150
|
+
if (statSync(dir).isFile()) dir = dirname(dir);
|
|
151
|
+
} catch {
|
|
152
|
+
dir = dirname(dir); // File might not exist yet
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Walk up until we find an existing directory (handles mkdir for new paths)
|
|
156
|
+
while (dir && dir !== '/') {
|
|
157
|
+
try {
|
|
158
|
+
const s = statSync(dir);
|
|
159
|
+
if (s.isDirectory()) break;
|
|
160
|
+
dir = dirname(dir);
|
|
161
|
+
} catch {
|
|
162
|
+
dir = dirname(dir);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Use git rev-parse from the directory
|
|
167
|
+
const result = execSync('git rev-parse --show-toplevel 2>/dev/null', {
|
|
168
|
+
cwd: dir,
|
|
169
|
+
encoding: 'utf8',
|
|
170
|
+
timeout: 3000,
|
|
171
|
+
}).trim();
|
|
172
|
+
return result;
|
|
173
|
+
} catch {}
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function extractPathsFromCommand(command) {
|
|
178
|
+
// Extract absolute paths from a bash command
|
|
179
|
+
// Matches paths like /Users/foo/bar, /tmp/something, etc.
|
|
180
|
+
const paths = [];
|
|
181
|
+
const regex = /(\/(?:Users|home|tmp|var|opt|etc|private)[^\s"'|;&>)]+)/g;
|
|
182
|
+
let match;
|
|
183
|
+
while ((match = regex.exec(command)) !== null) {
|
|
184
|
+
paths.push(match[1]);
|
|
185
|
+
}
|
|
186
|
+
return paths;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function getCurrentBranch(cwd) {
|
|
190
|
+
try {
|
|
191
|
+
return execSync('git branch --show-current 2>/dev/null', {
|
|
192
|
+
cwd: cwd || process.cwd(),
|
|
193
|
+
encoding: 'utf8',
|
|
194
|
+
timeout: 3000,
|
|
195
|
+
}).trim();
|
|
196
|
+
} catch {
|
|
197
|
+
return null; // Not in a git repo
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function isInWorktree(cwd) {
|
|
202
|
+
try {
|
|
203
|
+
const gitDir = execSync('git rev-parse --git-dir 2>/dev/null', {
|
|
204
|
+
cwd: cwd || process.cwd(),
|
|
205
|
+
encoding: 'utf8',
|
|
206
|
+
timeout: 3000,
|
|
207
|
+
}).trim();
|
|
208
|
+
return gitDir.includes('/worktrees/');
|
|
209
|
+
} catch {
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// CLI mode
|
|
215
|
+
if (process.argv.includes('--check')) {
|
|
216
|
+
const branch = getCurrentBranch();
|
|
217
|
+
const worktree = isInWorktree();
|
|
218
|
+
console.log(`Branch: ${branch || '(not in git repo)'}`);
|
|
219
|
+
console.log(`Worktree: ${worktree ? 'yes' : 'no'}`);
|
|
220
|
+
console.log(`Status: ${branch === 'main' || branch === 'master' ? 'BLOCKED (on main)' : 'OK'}`);
|
|
221
|
+
process.exit(branch === 'main' || branch === 'master' ? 1 : 0);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
async function main() {
|
|
225
|
+
let raw = '';
|
|
226
|
+
for await (const chunk of process.stdin) {
|
|
227
|
+
raw += chunk;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
let input;
|
|
231
|
+
try {
|
|
232
|
+
input = JSON.parse(raw);
|
|
233
|
+
} catch {
|
|
234
|
+
process.exit(0);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const toolName = input.tool_name || '';
|
|
238
|
+
const toolInput = input.tool_input || {};
|
|
239
|
+
|
|
240
|
+
// Block destructive commands on ANY branch.
|
|
241
|
+
// These destroy work that may belong to other agents or the user.
|
|
242
|
+
// The agent should NEVER reach for these. If something is stuck, tell the user.
|
|
243
|
+
if (toolName === BASH_TOOL) {
|
|
244
|
+
const cmd = (toolInput.command || '');
|
|
245
|
+
for (const pattern of DESTRUCTIVE_PATTERNS) {
|
|
246
|
+
if (pattern.test(cmd)) {
|
|
247
|
+
deny(`BLOCKED: Destructive command detected.
|
|
248
|
+
|
|
249
|
+
"${cmd.substring(0, 80)}" can permanently destroy uncommitted work (yours, the user's, or another agent's).
|
|
250
|
+
|
|
251
|
+
DO NOT retry. DO NOT work around this. Instead:
|
|
252
|
+
1. STOP. Think about what you actually need to accomplish.
|
|
253
|
+
2. If you need a clean working tree, use a WORKTREE instead of destroying files on main.
|
|
254
|
+
3. If something is stuck (merge conflict, dirty state), create a safety checkpoint first:
|
|
255
|
+
git stash create (saves all uncommitted work without modifying the tree)
|
|
256
|
+
git stash store <sha> -m "checkpoint before cleanup"
|
|
257
|
+
4. THEN proceed carefully with the minimum necessary operation.
|
|
258
|
+
|
|
259
|
+
These commands have destroyed work belonging to the user and other agents multiple times.`);
|
|
260
|
+
process.exit(0);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Block dangerous flags on ANY branch (these bypass safety checks)
|
|
266
|
+
if (toolName === BASH_TOOL) {
|
|
267
|
+
const cmd = (toolInput.command || '');
|
|
268
|
+
if (/--no-verify\b/.test(cmd)) {
|
|
269
|
+
deny('BLOCKED: --no-verify bypasses git hooks. Remove it and let the hooks run.');
|
|
270
|
+
process.exit(0);
|
|
271
|
+
}
|
|
272
|
+
if (/\bgit\s+push\b.*--force\b/.test(cmd) && !/--force-with-lease\b/.test(cmd)) {
|
|
273
|
+
deny('BLOCKED: git push --force can destroy remote history. Use --force-with-lease or ask Parker.');
|
|
274
|
+
process.exit(0);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Block npm install -g right after a release (#73)
|
|
278
|
+
// wip-release writes ~/.ldm/state/.last-release on completion.
|
|
279
|
+
// If a release happened < 5 minutes ago, block install unless user explicitly said "install".
|
|
280
|
+
if (/\bnpm\s+install\s+-g\b/.test(cmd)) {
|
|
281
|
+
try {
|
|
282
|
+
const releasePath = join(process.env.HOME || '', '.ldm', 'state', '.last-release');
|
|
283
|
+
if (existsSync(releasePath)) {
|
|
284
|
+
const data = JSON.parse(readFileSync(releasePath, 'utf8'));
|
|
285
|
+
const age = Date.now() - new Date(data.timestamp).getTime();
|
|
286
|
+
if (age < 5 * 60 * 1000) { // 5 minutes
|
|
287
|
+
deny(`BLOCKED: Release completed ${Math.round(age / 1000)}s ago. Dogfood first. Remove ~/.ldm/state/.last-release when ready to install.`);
|
|
288
|
+
process.exit(0);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
} catch {}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Warn when creating worktrees outside .worktrees/ (#212)
|
|
295
|
+
const wtMatch = cmd.match(/\bgit\s+worktree\s+add\s+["']?([^\s"']+)/);
|
|
296
|
+
if (wtMatch) {
|
|
297
|
+
const wtPath = wtMatch[1];
|
|
298
|
+
if (!wtPath.includes('.worktrees')) {
|
|
299
|
+
deny(`WARNING: Creating worktree outside .worktrees/. Use: ldm worktree add <branch>
|
|
300
|
+
|
|
301
|
+
The convention is .worktrees/<repo>--<branch>/ so worktrees are hidden and don't mix with real repos.
|
|
302
|
+
Manual equivalent: git worktree add .worktrees/<repo>--<branch> -b <branch>
|
|
303
|
+
|
|
304
|
+
This is a warning, not a block. If you need to create it here, retry.`);
|
|
305
|
+
process.exit(0);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Determine which repo to check.
|
|
311
|
+
// Claude Code always opens in .openclaw, but edits files in other repos.
|
|
312
|
+
// We need to check the branch of THE REPO THE FILE LIVES IN, not the CWD.
|
|
313
|
+
const filePath = toolInput.file_path || toolInput.filePath || '';
|
|
314
|
+
const command = toolInput.command || '';
|
|
315
|
+
|
|
316
|
+
// For Write/Edit: derive repo from the file path
|
|
317
|
+
// For Bash: try to extract repo path from the command (cd, or file paths in args)
|
|
318
|
+
let repoDir = null;
|
|
319
|
+
|
|
320
|
+
if (filePath) {
|
|
321
|
+
// Walk up from file path to find .git directory
|
|
322
|
+
repoDir = findRepoRoot(filePath);
|
|
323
|
+
if (!repoDir) {
|
|
324
|
+
// File is outside any git repo (e.g. ~/.claude/plans/, /tmp/).
|
|
325
|
+
// The guard only protects git repos. Allow it.
|
|
326
|
+
process.exit(0);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (!repoDir && command) {
|
|
331
|
+
// Try to extract a path from the bash command
|
|
332
|
+
// Common patterns: cd "/path/to/repo" && ..., or paths in arguments
|
|
333
|
+
const cdMatch = command.match(/cd\s+["']?([^"'&|;]+?)["']?\s*(?:&&|;|$)/);
|
|
334
|
+
if (cdMatch) {
|
|
335
|
+
repoDir = findRepoRoot(cdMatch[1].trim());
|
|
336
|
+
}
|
|
337
|
+
// Also check for git -C /path/to/repo
|
|
338
|
+
const gitCMatch = command.match(/git\s+-C\s+["']?([^"'&|;]+?)["']?\s/);
|
|
339
|
+
if (!repoDir && gitCMatch) {
|
|
340
|
+
repoDir = findRepoRoot(gitCMatch[1].trim());
|
|
341
|
+
}
|
|
342
|
+
// Extract absolute paths from the command itself (handles mkdir, cp, mv, etc.)
|
|
343
|
+
if (!repoDir) {
|
|
344
|
+
const paths = extractPathsFromCommand(command);
|
|
345
|
+
for (const p of paths) {
|
|
346
|
+
const resolved = findRepoRoot(p);
|
|
347
|
+
if (resolved) {
|
|
348
|
+
repoDir = resolved;
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// Fall back to CWD
|
|
356
|
+
if (!repoDir) {
|
|
357
|
+
repoDir = process.env.CWD || process.cwd();
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// Check if the target repo is on main AND if we're in a worktree
|
|
361
|
+
const branch = getCurrentBranch(repoDir);
|
|
362
|
+
const worktree = isInWorktree(repoDir);
|
|
363
|
+
|
|
364
|
+
if (!branch) {
|
|
365
|
+
// Not in a git repo, allow
|
|
366
|
+
process.exit(0);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (branch !== 'main' && branch !== 'master' && worktree) {
|
|
370
|
+
// On a branch AND in a worktree. Correct workflow. Allow.
|
|
371
|
+
process.exit(0);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
if (branch !== 'main' && branch !== 'master' && !worktree) {
|
|
375
|
+
// On a branch but NOT in a worktree. Block writes.
|
|
376
|
+
const isWriteOp = WRITE_TOOLS.has(toolName) ||
|
|
377
|
+
(toolName === BASH_TOOL && command &&
|
|
378
|
+
BLOCKED_BASH_PATTERNS.some(p => p.test(command)) &&
|
|
379
|
+
!ALLOWED_BASH_PATTERNS.some(p => p.test(command)));
|
|
380
|
+
if (isWriteOp) {
|
|
381
|
+
deny(`BLOCKED: On branch "${branch}" but not in a worktree.\n\n${WORKFLOW_NOT_WORKTREE}`);
|
|
382
|
+
process.exit(0);
|
|
383
|
+
}
|
|
384
|
+
process.exit(0);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// We're on main. Check if this is a shared state file (always writable).
|
|
388
|
+
// These are not code. They're shared context between agents.
|
|
389
|
+
const SHARED_STATE_PATTERNS = [
|
|
390
|
+
/CLAUDE\.md$/,
|
|
391
|
+
/workspace\/SHARED-CONTEXT\.md$/,
|
|
392
|
+
/workspace\/TOOLS\.md$/,
|
|
393
|
+
/workspace\/MEMORY\.md$/,
|
|
394
|
+
/workspace\/IDENTITY\.md$/,
|
|
395
|
+
/workspace\/SOUL\.md$/,
|
|
396
|
+
/workspace\/WHERE-TO-WRITE\.md$/,
|
|
397
|
+
/workspace\/HEARTBEAT\.md$/,
|
|
398
|
+
/workspace\/memory\/.*\.md$/,
|
|
399
|
+
/\.ldm\/agents\/.*\/memory\/daily\/.*\.md$/,
|
|
400
|
+
/\.ldm\/memory\/shared-log\.jsonl$/,
|
|
401
|
+
/\.ldm\/memory\/daily\/.*\.md$/,
|
|
402
|
+
/\.ldm\/logs\//,
|
|
403
|
+
];
|
|
404
|
+
|
|
405
|
+
if (filePath && SHARED_STATE_PATTERNS.some(p => p.test(filePath))) {
|
|
406
|
+
process.exit(0); // Shared state, always allow
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// Block Write/Edit tools entirely on main
|
|
410
|
+
if (WRITE_TOOLS.has(toolName)) {
|
|
411
|
+
deny(`BLOCKED: Cannot ${toolName} while on main branch.\n\n${WORKFLOW_ON_MAIN}`);
|
|
412
|
+
process.exit(0);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// For Bash, check the command
|
|
416
|
+
if (toolName === BASH_TOOL && command) {
|
|
417
|
+
// First check if it's explicitly allowed (read-only)
|
|
418
|
+
for (const pattern of ALLOWED_BASH_PATTERNS) {
|
|
419
|
+
if (pattern.test(command)) {
|
|
420
|
+
process.exit(0);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// Check for blocked git commands
|
|
425
|
+
for (const pattern of BLOCKED_GIT_PATTERNS) {
|
|
426
|
+
if (pattern.test(command)) {
|
|
427
|
+
// Make sure it's not an allowed git operation
|
|
428
|
+
let isAllowed = false;
|
|
429
|
+
for (const ap of ALLOWED_GIT_PATTERNS) {
|
|
430
|
+
if (ap.test(command)) { isAllowed = true; break; }
|
|
431
|
+
}
|
|
432
|
+
if (!isAllowed) {
|
|
433
|
+
deny(`BLOCKED: Cannot run "${command.substring(0, 60)}..." on main branch.\n\n${WORKFLOW_ON_MAIN}`);
|
|
434
|
+
process.exit(0);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// Check for file-writing bash commands
|
|
440
|
+
for (const pattern of BLOCKED_BASH_PATTERNS) {
|
|
441
|
+
if (pattern.test(command)) {
|
|
442
|
+
// Check it's not a read-only context
|
|
443
|
+
let isAllowed = false;
|
|
444
|
+
for (const ap of ALLOWED_BASH_PATTERNS) {
|
|
445
|
+
if (ap.test(command)) { isAllowed = true; break; }
|
|
446
|
+
}
|
|
447
|
+
if (!isAllowed) {
|
|
448
|
+
deny(`BLOCKED: Cannot run file-modifying command on main branch.\n\n${WORKFLOW_ON_MAIN}`);
|
|
449
|
+
process.exit(0);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// Allow everything else (Read, Glob, Grep, Agent, etc.)
|
|
456
|
+
process.exit(0);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
main().catch(() => process.exit(0));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wipcomputer/wip-branch-guard",
|
|
3
|
+
"version": "1.9.25",
|
|
4
|
+
"description": "PreToolUse hook that blocks all writes on main branch. Forces agents to work on branches or worktrees.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "guard.mjs",
|
|
7
|
+
"bin": {
|
|
8
|
+
"wip-branch-guard": "guard.mjs"
|
|
9
|
+
},
|
|
10
|
+
"claudeCode": {
|
|
11
|
+
"hook": {
|
|
12
|
+
"event": "PreToolUse",
|
|
13
|
+
"matcher": "Write|Edit|NotebookEdit|Bash",
|
|
14
|
+
"timeout": 5
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT"
|
|
18
|
+
}
|