codeforge-dev 1.11.0 → 1.13.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/.devcontainer/.env +7 -1
- package/.devcontainer/.gitignore +1 -0
- package/.devcontainer/CHANGELOG.md +106 -0
- package/.devcontainer/CLAUDE.md +93 -15
- package/.devcontainer/README.md +44 -10
- package/.devcontainer/config/defaults/main-system-prompt.md +28 -0
- package/.devcontainer/config/defaults/rules/workspace-scope.md +13 -4
- package/.devcontainer/config/defaults/settings.json +5 -3
- package/.devcontainer/config/defaults/writing-system-prompt.md +46 -4
- package/.devcontainer/connect-external-terminal.ps1 +1 -1
- package/.devcontainer/devcontainer.json +41 -11
- package/.devcontainer/docs/configuration-reference.md +3 -0
- package/.devcontainer/docs/plugins.md +9 -2
- package/.devcontainer/docs/troubleshooting.md +2 -2
- package/.devcontainer/features/README.md +8 -9
- package/.devcontainer/features/agent-browser/devcontainer-feature.json +21 -21
- package/.devcontainer/features/agent-browser/install.sh +0 -7
- package/.devcontainer/features/ast-grep/devcontainer-feature.json +22 -22
- package/.devcontainer/features/biome/devcontainer-feature.json +12 -14
- package/.devcontainer/features/ccms/install.sh +30 -13
- package/.devcontainer/features/claude-session-dashboard/README.md +40 -0
- package/.devcontainer/features/claude-session-dashboard/devcontainer-feature.json +35 -0
- package/.devcontainer/features/claude-session-dashboard/install.sh +172 -0
- package/.devcontainer/features/lsp-servers/devcontainer-feature.json +43 -43
- package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +2 -1
- package/.devcontainer/features/ruff/devcontainer-feature.json +17 -19
- package/.devcontainer/features/tmux/install.sh +2 -2
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +24 -3
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/.claude-plugin/plugin.json +8 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/AGENT-REDIRECTION.md +7 -12
- package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/REVIEW-RUBRIC.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/hooks/hooks.json +29 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/redirect-builtin-agents.py +17 -6
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/README.md +81 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/README.md +92 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/README.md +41 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/README.md +72 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +73 -47
- package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/README.md +42 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/README.md +86 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/hooks/hooks.json +25 -15
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected-bash.py +122 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +3 -3
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/.claude-plugin/plugin.json +8 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/hooks/hooks.json +34 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/.claude-plugin/plugin.json +8 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/hooks/hooks.json +29 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/team/SKILL.md +205 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/spec-workflow/.claude-plugin/plugin.json +8 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/spec-workflow/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/spec-workflow/skills/spec-init/references/roadmap-template.md +33 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/README.md +96 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/README.md +94 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +1 -3
- package/.devcontainer/scripts/check-setup.sh +1 -1
- package/.devcontainer/scripts/setup-projects.sh +24 -17
- package/.devcontainer/scripts/setup.sh +48 -5
- package/README.md +17 -8
- package/package.json +1 -2
- package/.devcontainer/features/mcp-reasoner/README.md +0 -177
- package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +0 -25
- package/.devcontainer/features/mcp-reasoner/install.sh +0 -184
- package/.devcontainer/features/mcp-reasoner/poststart-hook.sh +0 -67
- package/.devcontainer/features/splitrail/README.md +0 -140
- package/.devcontainer/features/splitrail/devcontainer-feature.json +0 -39
- package/.devcontainer/features/splitrail/install.sh +0 -136
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/.claude-plugin/plugin.json +0 -8
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +0 -112
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/advisory-test-runner.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/collect-edited-files.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/commit-reminder.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/git-state-injector.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/guard-readonly-bash.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/redirect-builtin-agents.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/syntax-validator.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/ticket-linker.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/todo-harvester.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/verify-no-regression.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/verify-tests-pass.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/collect-edited-files.py +0 -46
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/syntax-validator.py +0 -146
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/.claude-plugin/commands/debug.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/architect.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/bash-exec.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/claude-guide.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/debug-logs.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/dependency-analyst.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/doc-writer.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/explorer.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/generalist.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/git-archaeologist.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/migrator.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/perf-profiler.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/refactorer.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/researcher.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/security-auditor.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/spec-writer.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/statusline-config.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/test-writer.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/guard-readonly-bash.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/inject-cwd.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/verify-no-regression.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/verify-tests-pass.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → auto-code-quality}/scripts/advisory-test-runner.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → session-context}/scripts/commit-reminder.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → session-context}/scripts/git-state-injector.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → session-context}/scripts/todo-harvester.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/scripts/skill-suggester.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/api-design/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/api-design/references/error-handling.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/api-design/references/rest-conventions.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/ast-grep-patterns/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/ast-grep-patterns/references/language-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-agent-sdk/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-agent-sdk/references/sdk-typescript-reference.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-code-headless/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-code-headless/references/cli-flags-and-output.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-code-headless/references/sdk-and-mcp.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/debugging/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/debugging/references/error-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/debugging/references/log-locations.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/dependency-management/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/dependency-management/references/ecosystem-commands.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/dependency-management/references/license-compliance.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker/references/compose-services.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker/references/dockerfile-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker-py/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker-py/references/container-lifecycle.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker-py/references/resources-and-security.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/documentation-patterns/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/documentation-patterns/references/api-doc-templates.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/documentation-patterns/references/docstring-formats.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/references/middleware-and-lifespan.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/references/pydantic-models.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/references/routing-and-dependencies.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/references/sse-and-streaming.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/git-forensics/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/git-forensics/references/advanced-commands.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/git-forensics/references/investigation-playbooks.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/migration-patterns/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/migration-patterns/references/javascript-migrations.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/migration-patterns/references/python-migrations.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/performance-profiling/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/performance-profiling/references/interpreting-results.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/performance-profiling/references/tool-commands.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/pydantic-ai/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/pydantic-ai/references/agents-and-tools.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/pydantic-ai/references/models-and-streaming.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/refactoring-patterns/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/refactoring-patterns/references/safe-transformations.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/refactoring-patterns/references/smell-catalog.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/security-checklist/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/security-checklist/references/owasp-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/security-checklist/references/secrets-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/skill-building/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/skill-building/references/cross-vendor-principles.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/skill-building/references/patterns-and-antipatterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/skill-building/references/skill-authoring-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/references/advanced-queries.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/references/javascript-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/references/python-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/references/schema-and-pragmas.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/ai-sdk-svelte.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/component-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/layercake.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/migration-guide.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/runes-and-reactivity.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/spa-and-routing.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/svelte-dnd-action.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/testing/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/testing/references/fastapi-testing.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/testing/references/svelte-testing.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/scripts/spec-reminder.py +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-build/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-build/references/review-checklist.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-check/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-init/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-init/references/backlog-template.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-init/references/milestones-template.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-new/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-new/references/template.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-refine/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-review/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-update/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/specification-writing/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/specification-writing/references/criteria-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/specification-writing/references/ears-templates.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → ticket-workflow}/scripts/ticket-linker.py +0 -0
|
@@ -13,54 +13,82 @@ import sys
|
|
|
13
13
|
|
|
14
14
|
DANGEROUS_PATTERNS = [
|
|
15
15
|
# Destructive filesystem deletion
|
|
16
|
-
(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
(
|
|
17
|
+
r"\brm\s+.*-[^\s]*r[^\s]*f[^\s]*\s+[/~](?:\s|$)",
|
|
18
|
+
"Blocked: rm -rf on root or home directory",
|
|
19
|
+
),
|
|
20
|
+
(
|
|
21
|
+
r"\brm\s+.*-[^\s]*f[^\s]*r[^\s]*\s+[/~](?:\s|$)",
|
|
22
|
+
"Blocked: rm -rf on root or home directory",
|
|
23
|
+
),
|
|
24
|
+
(r"\brm\s+-rf\s+/(?:\s|$)", "Blocked: rm -rf /"),
|
|
25
|
+
(r"\brm\s+-rf\s+~(?:\s|$)", "Blocked: rm -rf ~"),
|
|
25
26
|
# Root-level file removal
|
|
26
|
-
(r
|
|
27
|
-
"Blocked: sudo rm - use caution with privileged deletion"),
|
|
28
|
-
|
|
27
|
+
(r"\bsudo\s+rm\b", "Blocked: sudo rm - use caution with privileged deletion"),
|
|
29
28
|
# World-writable permissions
|
|
30
|
-
(r
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
(r"\bchmod\s+777\b", "Blocked: chmod 777 creates security vulnerability"),
|
|
30
|
+
(
|
|
31
|
+
r"\bchmod\s+-R\s+777\b",
|
|
32
|
+
"Blocked: recursive chmod 777 creates security vulnerability",
|
|
33
|
+
),
|
|
35
34
|
# Force push to main/master
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
(
|
|
36
|
+
r"\bgit\s+push\s+.*--force.*\s+(origin\s+)?(main|master)\b",
|
|
37
|
+
"Blocked: force push to main/master destroys history",
|
|
38
|
+
),
|
|
39
|
+
(
|
|
40
|
+
r"\bgit\s+push\s+.*-f\s+.*\s+(origin\s+)?(main|master)\b",
|
|
41
|
+
"Blocked: force push to main/master destroys history",
|
|
42
|
+
),
|
|
43
|
+
(
|
|
44
|
+
r"\bgit\s+push\s+-f\s+(origin\s+)?(main|master)\b",
|
|
45
|
+
"Blocked: force push to main/master destroys history",
|
|
46
|
+
),
|
|
47
|
+
(
|
|
48
|
+
r"\bgit\s+push\s+--force\s+(origin\s+)?(main|master)\b",
|
|
49
|
+
"Blocked: force push to main/master destroys history",
|
|
50
|
+
),
|
|
45
51
|
# System directory modification
|
|
46
|
-
(r
|
|
47
|
-
|
|
48
|
-
(r
|
|
49
|
-
|
|
50
|
-
(r'>\s*/bin/',
|
|
51
|
-
"Blocked: writing to /bin system directory"),
|
|
52
|
-
(r'>\s*/sbin/',
|
|
53
|
-
"Blocked: writing to /sbin system directory"),
|
|
54
|
-
|
|
52
|
+
(r">\s*/usr/", "Blocked: writing to /usr system directory"),
|
|
53
|
+
(r">\s*/etc/", "Blocked: writing to /etc system directory"),
|
|
54
|
+
(r">\s*/bin/", "Blocked: writing to /bin system directory"),
|
|
55
|
+
(r">\s*/sbin/", "Blocked: writing to /sbin system directory"),
|
|
55
56
|
# Disk formatting
|
|
56
|
-
(r
|
|
57
|
-
|
|
58
|
-
(r'\bdd\s+.*of=/dev/',
|
|
59
|
-
"Blocked: dd writing to device"),
|
|
60
|
-
|
|
57
|
+
(r"\bmkfs\.\w+", "Blocked: disk formatting command"),
|
|
58
|
+
(r"\bdd\s+.*of=/dev/", "Blocked: dd writing to device"),
|
|
61
59
|
# History manipulation
|
|
62
|
-
(
|
|
63
|
-
|
|
60
|
+
(
|
|
61
|
+
r"\bgit\s+reset\s+--hard\s+origin/(main|master)\b",
|
|
62
|
+
"Blocked: hard reset to remote main/master - destructive operation",
|
|
63
|
+
),
|
|
64
|
+
# Docker container escape
|
|
65
|
+
(
|
|
66
|
+
r"\bdocker\s+run\s+.*--privileged",
|
|
67
|
+
"Blocked: docker run --privileged allows container escape",
|
|
68
|
+
),
|
|
69
|
+
(
|
|
70
|
+
r"\bdocker\s+run\s+.*-v\s+/:/\w",
|
|
71
|
+
"Blocked: docker run mounting host root filesystem",
|
|
72
|
+
),
|
|
73
|
+
# Destructive Docker operations
|
|
74
|
+
(
|
|
75
|
+
r"\bdocker\s+(stop|rm|kill|rmi)\s+",
|
|
76
|
+
"Blocked: destructive docker operation - use with caution",
|
|
77
|
+
),
|
|
78
|
+
# Additional rm patterns
|
|
79
|
+
(r"\brm\s+.*-[^\s]*r[^\s]*f[^\s]*\s+\.\./", "Blocked: rm -rf on parent directory"),
|
|
80
|
+
(r"\bfind\s+.*-exec\s+rm\b", "Blocked: find -exec rm is dangerous"),
|
|
81
|
+
(r"\bfind\s+.*-delete\b", "Blocked: find -delete is dangerous"),
|
|
82
|
+
# Git history destruction
|
|
83
|
+
(r"\bgit\s+push\s+-f\b", "Blocked: bare force push - specify remote and branch"),
|
|
84
|
+
(
|
|
85
|
+
r"\bgit\s+push\s+--force\b",
|
|
86
|
+
"Blocked: bare force push - specify remote and branch",
|
|
87
|
+
),
|
|
88
|
+
(
|
|
89
|
+
r"\bgit\s+clean\s+-[^\s]*f",
|
|
90
|
+
"Blocked: git clean -f removes untracked files permanently",
|
|
91
|
+
),
|
|
64
92
|
]
|
|
65
93
|
|
|
66
94
|
|
|
@@ -89,17 +117,15 @@ def main():
|
|
|
89
117
|
|
|
90
118
|
if is_dangerous:
|
|
91
119
|
# Output error message and exit 2 to block
|
|
92
|
-
print(json.dumps({
|
|
93
|
-
"error": message
|
|
94
|
-
}))
|
|
120
|
+
print(json.dumps({"error": message}))
|
|
95
121
|
sys.exit(2)
|
|
96
122
|
|
|
97
123
|
# Allow command to proceed
|
|
98
124
|
sys.exit(0)
|
|
99
125
|
|
|
100
126
|
except json.JSONDecodeError:
|
|
101
|
-
#
|
|
102
|
-
sys.exit(
|
|
127
|
+
# Fail closed: can't parse means can't verify safety
|
|
128
|
+
sys.exit(2)
|
|
103
129
|
except Exception as e:
|
|
104
130
|
# Log error but don't block on hook failure
|
|
105
131
|
print(f"Hook error: {e}", file=sys.stderr)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# notify-hook
|
|
2
|
+
|
|
3
|
+
Ultra-lightweight Claude Code plugin that sends a desktop notification and audio chime when Claude finishes responding. No scripts — just a single hook definition that calls the `claude-notify` binary.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
When Claude stops responding (Stop hook), it runs the `claude-notify` command to:
|
|
8
|
+
1. Send a desktop notification
|
|
9
|
+
2. Play an audio chime
|
|
10
|
+
|
|
11
|
+
This lets you switch to other tasks while Claude works and get alerted when it needs your attention.
|
|
12
|
+
|
|
13
|
+
## How It Works
|
|
14
|
+
|
|
15
|
+
### Hook Lifecycle
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Claude stops responding (Stop event)
|
|
19
|
+
│
|
|
20
|
+
└─→ claude-notify command fires
|
|
21
|
+
│
|
|
22
|
+
├─→ Desktop notification sent
|
|
23
|
+
└─→ Audio chime played
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The hook has a 5-second timeout. The plugin contains no scripts of its own — it delegates entirely to the `claude-notify` binary.
|
|
27
|
+
|
|
28
|
+
## Plugin Structure
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
notify-hook/
|
|
32
|
+
├── .claude-plugin/
|
|
33
|
+
│ └── plugin.json # Plugin metadata
|
|
34
|
+
├── hooks/
|
|
35
|
+
│ └── hooks.json # Stop hook registration
|
|
36
|
+
└── README.md # This file
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Requirements
|
|
40
|
+
|
|
41
|
+
- Claude Code with plugin hook support
|
|
42
|
+
- The `notify-hook` devcontainer feature must be installed (provides the `claude-notify` binary)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# protected-files-guard
|
|
2
|
+
|
|
3
|
+
Claude Code plugin that blocks modifications to sensitive files — environment secrets, lock files, git internals, certificates, and credentials. Covers both direct file edits (Edit/Write tools) and indirect writes through Bash commands.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
Intercepts file operations and checks target paths against a set of protected patterns. If a match is found, the operation is blocked with an error message explaining why and suggesting the correct approach (e.g., "use npm install instead" for package-lock.json).
|
|
8
|
+
|
|
9
|
+
### Protected File Categories
|
|
10
|
+
|
|
11
|
+
| Category | Patterns | Reason |
|
|
12
|
+
|----------|----------|--------|
|
|
13
|
+
| Environment secrets | `.env`, `.env.*` | Contains secrets |
|
|
14
|
+
| Git internals | `.git/` | Managed by git |
|
|
15
|
+
| Lock files | `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `Gemfile.lock`, `poetry.lock`, `Cargo.lock`, `composer.lock`, `uv.lock` | Must be modified via package manager |
|
|
16
|
+
| Certificates & keys | `.pem`, `.key`, `.crt`, `.p12`, `.pfx` | Sensitive cryptographic material |
|
|
17
|
+
| Credential files | `credentials.json`, `secrets.yaml`, `secrets.yml`, `secrets.json`, `.secrets` | Contains secrets |
|
|
18
|
+
| Auth directories | `.ssh/`, `.aws/` | Contains authentication data |
|
|
19
|
+
| Auth config files | `.netrc`, `.npmrc`, `.pypirc` | Contains authentication credentials |
|
|
20
|
+
| SSH private keys | `id_rsa`, `id_ed25519`, `id_ecdsa` | SSH private key files |
|
|
21
|
+
|
|
22
|
+
## How It Works
|
|
23
|
+
|
|
24
|
+
### Two-Hook Architecture
|
|
25
|
+
|
|
26
|
+
The plugin registers two PreToolUse hooks to cover different attack vectors:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Claude calls Edit or Write tool
|
|
30
|
+
│
|
|
31
|
+
└─→ guard-protected.py checks file_path against protected patterns
|
|
32
|
+
│
|
|
33
|
+
├─→ Match → exit 2 (block)
|
|
34
|
+
└─→ No match → exit 0 (allow)
|
|
35
|
+
|
|
36
|
+
Claude calls Bash tool
|
|
37
|
+
│
|
|
38
|
+
└─→ guard-protected-bash.py extracts write targets from the command
|
|
39
|
+
│
|
|
40
|
+
├─→ Detects: > redirect, >> append, tee, cp, mv, sed -i, cat heredoc
|
|
41
|
+
├─→ Checks each target against protected patterns
|
|
42
|
+
├─→ Any match → exit 2 (block)
|
|
43
|
+
└─→ No match → exit 0 (allow)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Bash Write Detection
|
|
47
|
+
|
|
48
|
+
The Bash guard parses commands for write-indicating patterns and extracts the target file path:
|
|
49
|
+
|
|
50
|
+
| Pattern | Example |
|
|
51
|
+
|---------|---------|
|
|
52
|
+
| Redirect (`>`, `>>`) | `echo "key=val" > .env` |
|
|
53
|
+
| `tee` / `tee -a` | `cat data \| tee .env` |
|
|
54
|
+
| `cp` / `mv` | `cp template .env` |
|
|
55
|
+
| `sed -i` | `sed -i 's/old/new/' .env` |
|
|
56
|
+
| `cat` heredoc | `cat <<EOF > .env` |
|
|
57
|
+
|
|
58
|
+
### Error Handling
|
|
59
|
+
|
|
60
|
+
| Scenario | Behavior |
|
|
61
|
+
|----------|----------|
|
|
62
|
+
| JSON parse failure | Fails closed (exit 2) — blocks the operation |
|
|
63
|
+
| Other exceptions | Fails open (exit 0) — logs error, allows the operation |
|
|
64
|
+
|
|
65
|
+
### Timeout
|
|
66
|
+
|
|
67
|
+
Both hooks have a 5-second timeout.
|
|
68
|
+
|
|
69
|
+
## Plugin Structure
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
protected-files-guard/
|
|
73
|
+
├── .claude-plugin/
|
|
74
|
+
│ └── plugin.json # Plugin metadata
|
|
75
|
+
├── hooks/
|
|
76
|
+
│ └── hooks.json # PreToolUse hook registrations (Edit|Write + Bash)
|
|
77
|
+
├── scripts/
|
|
78
|
+
│ ├── guard-protected.py # Edit/Write file path checker
|
|
79
|
+
│ └── guard-protected-bash.py # Bash command write target checker
|
|
80
|
+
└── README.md # This file
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Requirements
|
|
84
|
+
|
|
85
|
+
- Python 3.11+
|
|
86
|
+
- Claude Code with plugin hook support
|
package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/hooks/hooks.json
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
"description": "Block modifications to protected files",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"PreToolUse": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "Edit|Write",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/guard-protected.py",
|
|
11
|
+
"timeout": 5
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"matcher": "Bash",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/guard-protected-bash.py",
|
|
21
|
+
"timeout": 5
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
17
27
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Block bash commands that write to protected files.
|
|
4
|
+
|
|
5
|
+
Reads tool input from stdin, checks the command field for write operations
|
|
6
|
+
targeting protected file patterns.
|
|
7
|
+
Exit code 2 blocks the command with error message.
|
|
8
|
+
Exit code 0 allows the command to proceed.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import json
|
|
12
|
+
import re
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
# Same patterns as guard-protected.py
|
|
16
|
+
PROTECTED_PATTERNS = [
|
|
17
|
+
(r"(^|/)\.env$", "Blocked: .env contains secrets - edit manually if needed"),
|
|
18
|
+
(
|
|
19
|
+
r"(^|/)\.env\.[^/]+$",
|
|
20
|
+
"Blocked: .env.* files contain secrets - edit manually if needed",
|
|
21
|
+
),
|
|
22
|
+
(r"(^|/)\.git(/|$)", "Blocked: .git is managed by git"),
|
|
23
|
+
(
|
|
24
|
+
r"(^|/)package-lock\.json$",
|
|
25
|
+
"Blocked: package-lock.json - use npm install instead",
|
|
26
|
+
),
|
|
27
|
+
(r"(^|/)yarn\.lock$", "Blocked: yarn.lock - use yarn install instead"),
|
|
28
|
+
(r"(^|/)pnpm-lock\.yaml$", "Blocked: pnpm-lock.yaml - use pnpm install instead"),
|
|
29
|
+
(r"(^|/)Gemfile\.lock$", "Blocked: Gemfile.lock - use bundle install instead"),
|
|
30
|
+
(r"(^|/)poetry\.lock$", "Blocked: poetry.lock - use poetry install instead"),
|
|
31
|
+
(r"(^|/)Cargo\.lock$", "Blocked: Cargo.lock - use cargo build instead"),
|
|
32
|
+
(r"(^|/)composer\.lock$", "Blocked: composer.lock - use composer install instead"),
|
|
33
|
+
(r"(^|/)uv\.lock$", "Blocked: uv.lock - use uv sync instead"),
|
|
34
|
+
(r"\.pem$", "Blocked: .pem files contain sensitive cryptographic material"),
|
|
35
|
+
(r"\.key$", "Blocked: .key files contain sensitive cryptographic material"),
|
|
36
|
+
(r"\.crt$", "Blocked: .crt certificate files should not be edited directly"),
|
|
37
|
+
(r"\.p12$", "Blocked: .p12 files contain sensitive cryptographic material"),
|
|
38
|
+
(r"\.pfx$", "Blocked: .pfx files contain sensitive cryptographic material"),
|
|
39
|
+
(r"(^|/)credentials\.json$", "Blocked: credentials.json contains secrets"),
|
|
40
|
+
(r"(^|/)secrets\.yaml$", "Blocked: secrets.yaml contains secrets"),
|
|
41
|
+
(r"(^|/)secrets\.yml$", "Blocked: secrets.yml contains secrets"),
|
|
42
|
+
(r"(^|/)secrets\.json$", "Blocked: secrets.json contains secrets"),
|
|
43
|
+
(r"(^|/)\.secrets$", "Blocked: .secrets file contains secrets"),
|
|
44
|
+
(r"(^|/)\.ssh/", "Blocked: .ssh/ contains sensitive authentication data"),
|
|
45
|
+
(r"(^|/)\.aws/", "Blocked: .aws/ contains AWS credentials"),
|
|
46
|
+
(r"(^|/)\.netrc$", "Blocked: .netrc contains authentication credentials"),
|
|
47
|
+
(
|
|
48
|
+
r"(^|/)\.npmrc$",
|
|
49
|
+
"Blocked: .npmrc may contain auth tokens - edit manually if needed",
|
|
50
|
+
),
|
|
51
|
+
(r"(^|/)\.pypirc$", "Blocked: .pypirc contains PyPI credentials"),
|
|
52
|
+
(r"(^|/|-)id_rsa($|\.)", "Blocked: SSH private key file"),
|
|
53
|
+
(r"(^|/)id_ed25519", "Blocked: SSH private key file"),
|
|
54
|
+
(r"(^|/)id_ecdsa", "Blocked: SSH private key file"),
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
# Patterns that indicate a bash command is writing to a file
|
|
58
|
+
# Each captures the target file path for checking against PROTECTED_PATTERNS
|
|
59
|
+
WRITE_PATTERNS = [
|
|
60
|
+
# Redirect: > file, >> file
|
|
61
|
+
r"(?:>|>>)\s*([^\s;&|]+)",
|
|
62
|
+
# tee: tee file, tee -a file
|
|
63
|
+
r"\btee\s+(?:-a\s+)?([^\s;&|]+)",
|
|
64
|
+
# cp/mv: cp src dest, mv src dest
|
|
65
|
+
r"\b(?:cp|mv)\s+(?:-[^\s]+\s+)*[^\s]+\s+([^\s;&|]+)",
|
|
66
|
+
# sed -i: sed -i '' file
|
|
67
|
+
r'\bsed\s+-i[^\s]*\s+(?:\'[^\']*\'\s+|"[^"]*"\s+|[^\s]+\s+)*([^\s;&|]+)',
|
|
68
|
+
# cat > file (heredoc style)
|
|
69
|
+
r"\bcat\s+(?:<<[^\s]*\s+)?>\s*([^\s;&|]+)",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def extract_write_targets(command: str) -> list[str]:
|
|
74
|
+
"""Extract file paths that the command writes to."""
|
|
75
|
+
targets = []
|
|
76
|
+
for pattern in WRITE_PATTERNS:
|
|
77
|
+
for match in re.finditer(pattern, command):
|
|
78
|
+
target = match.group(1).strip("'\"")
|
|
79
|
+
if target:
|
|
80
|
+
targets.append(target)
|
|
81
|
+
return targets
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def check_path(file_path: str) -> tuple[bool, str]:
|
|
85
|
+
"""Check if file path matches any protected pattern."""
|
|
86
|
+
normalized = file_path.replace("\\", "/")
|
|
87
|
+
for pattern, message in PROTECTED_PATTERNS:
|
|
88
|
+
if re.search(pattern, normalized, re.IGNORECASE):
|
|
89
|
+
return True, message
|
|
90
|
+
return False, ""
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def main():
|
|
94
|
+
try:
|
|
95
|
+
input_data = json.load(sys.stdin)
|
|
96
|
+
tool_input = input_data.get("tool_input", {})
|
|
97
|
+
command = tool_input.get("command", "")
|
|
98
|
+
|
|
99
|
+
if not command:
|
|
100
|
+
sys.exit(0)
|
|
101
|
+
|
|
102
|
+
targets = extract_write_targets(command)
|
|
103
|
+
|
|
104
|
+
for target in targets:
|
|
105
|
+
is_protected, message = check_path(target)
|
|
106
|
+
if is_protected:
|
|
107
|
+
print(json.dumps({"error": f"{message} (via bash command)"}))
|
|
108
|
+
sys.exit(2)
|
|
109
|
+
|
|
110
|
+
sys.exit(0)
|
|
111
|
+
|
|
112
|
+
except json.JSONDecodeError:
|
|
113
|
+
# Fail closed: can't parse means can't verify safety
|
|
114
|
+
sys.exit(2)
|
|
115
|
+
except Exception as e:
|
|
116
|
+
# Log error but don't block on hook failure
|
|
117
|
+
print(f"Hook error: {e}", file=sys.stderr)
|
|
118
|
+
sys.exit(0)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
if __name__ == "__main__":
|
|
122
|
+
main()
|
|
@@ -20,7 +20,7 @@ PROTECTED_PATTERNS = [
|
|
|
20
20
|
"Blocked: .env.* files contain secrets - edit manually if needed",
|
|
21
21
|
),
|
|
22
22
|
# Git internals
|
|
23
|
-
(r"(^|/)\.git
|
|
23
|
+
(r"(^|/)\.git(/|$)", "Blocked: .git is managed by git"),
|
|
24
24
|
# Lock files (should be modified via package manager)
|
|
25
25
|
(
|
|
26
26
|
r"(^|/)package-lock\.json$",
|
|
@@ -97,8 +97,8 @@ def main():
|
|
|
97
97
|
sys.exit(0)
|
|
98
98
|
|
|
99
99
|
except json.JSONDecodeError:
|
|
100
|
-
#
|
|
101
|
-
sys.exit(
|
|
100
|
+
# Fail closed: can't parse means can't verify safety
|
|
101
|
+
sys.exit(2)
|
|
102
102
|
except Exception as e:
|
|
103
103
|
# Log error but don't block on hook failure
|
|
104
104
|
print(f"Hook error: {e}", file=sys.stderr)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Context injection at session boundaries: git state, TODO harvesting, commit reminders",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"SessionStart": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/git-state-injector.py",
|
|
11
|
+
"timeout": 10
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "command",
|
|
15
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/todo-harvester.py",
|
|
16
|
+
"timeout": 8
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"Stop": [
|
|
22
|
+
{
|
|
23
|
+
"matcher": "",
|
|
24
|
+
"hooks": [
|
|
25
|
+
{
|
|
26
|
+
"type": "command",
|
|
27
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/commit-reminder.py",
|
|
28
|
+
"timeout": 8
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Skill auto-suggestion on user prompts and Plan agent starts",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"UserPromptSubmit": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "*",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/skill-suggester.py",
|
|
11
|
+
"timeout": 3
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"SubagentStart": [
|
|
17
|
+
{
|
|
18
|
+
"matcher": "Plan",
|
|
19
|
+
"hooks": [
|
|
20
|
+
{
|
|
21
|
+
"type": "command",
|
|
22
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/skill-suggester.py",
|
|
23
|
+
"timeout": 3
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|