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
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: team
|
|
3
|
+
description: >-
|
|
4
|
+
This skill should be used when the user asks to "spawn a team",
|
|
5
|
+
"create a team of agents", "use a swarm", "work in parallel with agents",
|
|
6
|
+
"team up agents", "coordinate multiple agents", "split this across agents",
|
|
7
|
+
or needs to orchestrate parallel agent work using Claude Code Teams.
|
|
8
|
+
version: 0.1.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Agent Team Orchestration
|
|
12
|
+
|
|
13
|
+
## Mental Model
|
|
14
|
+
|
|
15
|
+
A team is a group of specialist agents working in parallel under a lead (you). Each teammate runs independently with its own context — they share a task list but not conversation history. The lead decomposes work into parallel streams, spawns specialists, assigns tasks, and coordinates integration.
|
|
16
|
+
|
|
17
|
+
Teams add value only when work can be parallelized. If every task depends on the previous one, a single agent is faster. The threshold: **3+ independent workstreams** that can run concurrently.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Lead (you)
|
|
21
|
+
├── TeamCreate → creates the team
|
|
22
|
+
├── TaskCreate (×N) → defines work units
|
|
23
|
+
├── Task (×N) → spawns specialist teammates
|
|
24
|
+
├── TaskUpdate (×N) → assigns tasks to teammates
|
|
25
|
+
├── SendMessage → coordinates during execution
|
|
26
|
+
└── TeamDelete → cleans up after completion
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Two Modes
|
|
32
|
+
|
|
33
|
+
Parse `$ARGUMENTS` for an optional `--now` flag to determine behavior:
|
|
34
|
+
|
|
35
|
+
| Input | Mode | Behavior |
|
|
36
|
+
|-------|------|----------|
|
|
37
|
+
| `/team refactor the auth module` | Guidance | Absorb team knowledge, propose a plan, discuss with user |
|
|
38
|
+
| `/team --now refactor the auth module` | Immediate | Create team, spawn agents, start work without waiting |
|
|
39
|
+
| `/team` | Guidance | Ask the user what the team should accomplish |
|
|
40
|
+
|
|
41
|
+
Strip `--now` from the purpose string before using it. Everything remaining is `<PURPOSE>`.
|
|
42
|
+
|
|
43
|
+
### Guidance Mode (default — no `--now`)
|
|
44
|
+
|
|
45
|
+
Inject the knowledge in this skill into context. **Do not force immediate action.** Analyze the purpose, propose a team composition, and discuss the approach with the user before acting. Use your judgment about when to create the team.
|
|
46
|
+
|
|
47
|
+
### Immediate Mode (`--now` flag present)
|
|
48
|
+
|
|
49
|
+
Act now without waiting for further input:
|
|
50
|
+
|
|
51
|
+
1. **Analyze purpose** — determine workstreams and specialist roles needed
|
|
52
|
+
2. **Create team** — `TeamCreate` with a kebab-case name derived from purpose
|
|
53
|
+
3. **Create tasks** — `TaskCreate` for each work unit with dependencies via `TaskUpdate`
|
|
54
|
+
4. **Spawn teammates** — `Task` with `team_name`, specialist `subagent_type`, descriptive `name`
|
|
55
|
+
5. **Assign tasks** — `TaskUpdate` with `owner` set to each teammate's name
|
|
56
|
+
6. **Coordinate** — monitor via `TaskList`, message via `SendMessage`
|
|
57
|
+
7. **Shutdown** — `shutdown_request` to all teammates, then `TeamDelete`
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Team Lifecycle
|
|
62
|
+
|
|
63
|
+
### 1. Create the Team
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
TeamCreate:
|
|
67
|
+
team_name: "auth-refactor" # kebab-case, descriptive
|
|
68
|
+
description: "Refactor auth module for OAuth2 support"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
One team per lead session. No nested teams.
|
|
72
|
+
|
|
73
|
+
### 2. Create Tasks
|
|
74
|
+
|
|
75
|
+
Each task should be independently completable by one agent:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
TaskCreate:
|
|
79
|
+
subject: "Write unit tests for OAuth2 flow" # imperative
|
|
80
|
+
description: "Full context the assignee needs..." # self-contained
|
|
81
|
+
activeForm: "Writing OAuth2 unit tests" # present continuous
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Set ordering constraints with `TaskUpdate`:
|
|
85
|
+
- `addBlockedBy: ["1"]` — this task waits for task 1
|
|
86
|
+
- `addBlocks: ["3"]` — task 3 waits for this task
|
|
87
|
+
|
|
88
|
+
### 3. Spawn Teammates
|
|
89
|
+
|
|
90
|
+
Each teammate is spawned via the `Task` tool with `team_name`:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Task:
|
|
94
|
+
team_name: "auth-refactor"
|
|
95
|
+
subagent_type: "agent-system:test-writer" # specialist agent type
|
|
96
|
+
name: "test-writer" # used for messaging and assignment
|
|
97
|
+
prompt: "All context needed for the work..." # teammates have NO prior history
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Critical:** Teammates do not inherit your conversation. The spawn `prompt` must include every piece of context the teammate needs — file paths, requirements, constraints, conventions.
|
|
101
|
+
|
|
102
|
+
### 4. Assign Tasks
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
TaskUpdate:
|
|
106
|
+
taskId: "2"
|
|
107
|
+
owner: "test-writer" # matches the teammate's name
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 5. Coordinate
|
|
111
|
+
|
|
112
|
+
- **Check progress:** `TaskList` shows all tasks with status and owner
|
|
113
|
+
- **Direct message:** `SendMessage` with `type: "message"` and `recipient: "test-writer"`
|
|
114
|
+
- **Broadcast:** `SendMessage` with `type: "broadcast"` — use ONLY for critical team-wide issues
|
|
115
|
+
- **Idle is normal:** Teammates go idle after each turn. This is expected. Send a message to wake them.
|
|
116
|
+
|
|
117
|
+
### 6. Shutdown
|
|
118
|
+
|
|
119
|
+
When all tasks are complete:
|
|
120
|
+
|
|
121
|
+
1. Send `shutdown_request` to each teammate via `SendMessage`
|
|
122
|
+
2. Wait for confirmations
|
|
123
|
+
3. `TeamDelete` to remove team and task directories
|
|
124
|
+
4. Report results to the user
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Specialist Agent Types
|
|
129
|
+
|
|
130
|
+
Choose the agent whose domain matches the work. **Generalist is a last resort.**
|
|
131
|
+
|
|
132
|
+
| Agent Type | Domain | Capabilities |
|
|
133
|
+
|-----------|--------|-------------|
|
|
134
|
+
| `researcher` | Codebase & web research | Read-only |
|
|
135
|
+
| `test-writer` | Write test suites | Read + Write + Bash |
|
|
136
|
+
| `refactorer` | Safe code transformations | Read + Write + Bash |
|
|
137
|
+
| `doc-writer` | README, API docs, docstrings | Read + Write |
|
|
138
|
+
| `migrator` | Framework upgrades, version bumps | Read + Write + Bash |
|
|
139
|
+
| `security-auditor` | OWASP audit, secrets scan | Read-only |
|
|
140
|
+
| `git-archaeologist` | Git history investigation | Read-only + Bash |
|
|
141
|
+
| `dependency-analyst` | Outdated/vulnerable deps | Read-only + Bash |
|
|
142
|
+
| `spec-writer` | Requirements & acceptance criteria | Read-only |
|
|
143
|
+
| `perf-profiler` | Profiling & benchmarks | Read-only + Bash |
|
|
144
|
+
| `debug-logs` | Log analysis & diagnostics | Read-only + Bash |
|
|
145
|
+
| `architect` | Implementation planning | Read-only |
|
|
146
|
+
| `explorer` | Fast codebase search | Read-only |
|
|
147
|
+
| `generalist` | Multi-step tasks (last resort) | All tools |
|
|
148
|
+
| `bash-exec` | Command execution | Bash only |
|
|
149
|
+
|
|
150
|
+
Prefix with `agent-system:` when spawning (e.g., `agent-system:test-writer`).
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Team Composition Examples
|
|
155
|
+
|
|
156
|
+
| Purpose | Recommended Team |
|
|
157
|
+
|---------|-----------------|
|
|
158
|
+
| Feature build | `researcher` + `test-writer` + `doc-writer` |
|
|
159
|
+
| Security hardening | `security-auditor` + `dependency-analyst` |
|
|
160
|
+
| Codebase cleanup | `refactorer` + `test-writer` |
|
|
161
|
+
| Migration project | `researcher` + `migrator` |
|
|
162
|
+
| Performance work | `perf-profiler` + `refactorer` |
|
|
163
|
+
| Full-stack feature | `architect` + `generalist` (backend) + `generalist` (frontend) + `test-writer` |
|
|
164
|
+
| Code audit | `security-auditor` + `dependency-analyst` + `perf-profiler` |
|
|
165
|
+
| Documentation sprint | `researcher` + `doc-writer` |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Anti-Patterns
|
|
170
|
+
|
|
171
|
+
| Anti-Pattern | Why It Fails | Instead |
|
|
172
|
+
|-------------|-------------|---------|
|
|
173
|
+
| More than 5 teammates | Coordination overhead outweighs parallelism | Limit to 2–5, matching actual parallel workstreams |
|
|
174
|
+
| Same-file edits by two agents | Merge conflicts are unrecoverable | Assign file ownership — one agent per file |
|
|
175
|
+
| Sequential-only work | Team adds overhead with zero parallel benefit | Use a single agent |
|
|
176
|
+
| Generalist everywhere | Specialists carry domain knowledge and safety hooks | Pick the specialist whose domain matches |
|
|
177
|
+
| Empty spawn prompts | Teammates have no prior context | Include all requirements, file paths, conventions |
|
|
178
|
+
| Skipping shutdown | Orphaned agents consume resources | Always send `shutdown_request` + `TeamDelete` |
|
|
179
|
+
| Broadcasting for routine updates | Each broadcast = N messages (one per teammate) | Use direct `message` to specific teammates |
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Tool Reference
|
|
184
|
+
|
|
185
|
+
| Tool | Purpose | Key Parameters |
|
|
186
|
+
|------|---------|---------------|
|
|
187
|
+
| `TeamCreate` | Create the team | `team_name`, `description` |
|
|
188
|
+
| `Task` | Spawn teammate into team | `team_name`, `subagent_type`, `name`, `prompt` |
|
|
189
|
+
| `TaskCreate` | Add task to shared list | `subject`, `description`, `activeForm` |
|
|
190
|
+
| `TaskUpdate` | Assign, depend, complete | `taskId`, `owner`, `status`, `addBlockedBy` |
|
|
191
|
+
| `TaskList` | View all tasks and status | (none) |
|
|
192
|
+
| `TaskGet` | Read full task details | `taskId` |
|
|
193
|
+
| `SendMessage` | Communicate with teammates | `type`, `recipient`, `content`, `summary` |
|
|
194
|
+
| `TeamDelete` | Clean up after completion | (none) |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Ambiguity Policy
|
|
199
|
+
|
|
200
|
+
- If `$ARGUMENTS` is empty (no purpose provided), ask: "What should the team accomplish?"
|
|
201
|
+
- If the purpose maps to a single workstream with no parallelism, advise against a team and offer to do the work directly.
|
|
202
|
+
- If unsure which specialists to pick, present 2–3 composition options with trade-offs and let the user choose.
|
|
203
|
+
- If the purpose is vague ("make the app better"), ask for specifics before composing a team.
|
|
204
|
+
- If a teammate reports a blocker, attempt to resolve it yourself or reassign the task before escalating to the user.
|
|
205
|
+
- In immediate mode, default to the most natural team composition. If genuinely ambiguous, fall back to guidance mode and ask.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Spec reminder advisory when code is modified but specs are not updated",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"Stop": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/spec-reminder.py",
|
|
11
|
+
"timeout": 8
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
> Features live in the priority-graded backlog until pulled into a version.
|
|
4
|
+
> Versions are scoped and spec'd when ready to build — not pre-assigned.
|
|
5
|
+
> See `BACKLOG.md` for the feature backlog.
|
|
6
|
+
|
|
7
|
+
## How Versioning Works
|
|
8
|
+
|
|
9
|
+
1. **Backlog** — All desired features live in `BACKLOG.md`, graded by priority.
|
|
10
|
+
2. **Version scoping** — When ready to start a new version, pull features from the backlog.
|
|
11
|
+
3. **Spec first** — Each feature in a version gets a spec before implementation begins.
|
|
12
|
+
4. **Ship** — Version is done when all its specs are implemented and verified.
|
|
13
|
+
|
|
14
|
+
Only the **next version** is defined in detail. Everything else is backlog.
|
|
15
|
+
|
|
16
|
+
## Released
|
|
17
|
+
|
|
18
|
+
_None yet._
|
|
19
|
+
|
|
20
|
+
## Current
|
|
21
|
+
|
|
22
|
+
### v0.1.0 — [Name] 🔧
|
|
23
|
+
|
|
24
|
+
- [ ] [Feature pulled from backlog]
|
|
25
|
+
- [ ] [Feature pulled from backlog]
|
|
26
|
+
|
|
27
|
+
## Next
|
|
28
|
+
|
|
29
|
+
> Scoped from `BACKLOG.md` when current version is complete.
|
|
30
|
+
|
|
31
|
+
## Out of Scope
|
|
32
|
+
|
|
33
|
+
- [Items explicitly not planned]
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# ticket-workflow
|
|
2
|
+
|
|
3
|
+
Claude Code plugin that provides an EARS-based ticket workflow with GitHub issues as the single source of truth. Command-driven — no hooks or scripts, just a custom system prompt and four slash commands.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
Provides a structured workflow for creating, planning, reviewing, and shipping work through GitHub issues. All major decisions, plans, and progress are posted as issue comments to maintain an audit trail.
|
|
8
|
+
|
|
9
|
+
### Slash Commands
|
|
10
|
+
|
|
11
|
+
| Command | Description |
|
|
12
|
+
|---------|-------------|
|
|
13
|
+
| `/ticket:new` | Transform requirements into a structured GitHub issue with EARS-formatted business requirements |
|
|
14
|
+
| `/ticket:work` | Retrieve a ticket, create a technical implementation plan, and post it to the GitHub issue |
|
|
15
|
+
| `/ticket:review-commit` | Conduct a thorough code review, verify requirements are met, and commit with a detailed message |
|
|
16
|
+
| `/ticket:create-pr` | Create a pull request with aggressive security and architecture review |
|
|
17
|
+
|
|
18
|
+
### EARS Requirement Format
|
|
19
|
+
|
|
20
|
+
Every requirement uses one of these patterns:
|
|
21
|
+
|
|
22
|
+
| Type | Template |
|
|
23
|
+
|------|----------|
|
|
24
|
+
| Ubiquitous | The `<system>` shall `<response>`. |
|
|
25
|
+
| Event-Driven | WHEN `<trigger>`, the `<system>` shall `<response>`. |
|
|
26
|
+
| State-Driven | WHILE `<state>`, the `<system>` shall `<response>`. |
|
|
27
|
+
| Unwanted Behavior | IF `<condition>`, THEN the `<system>` shall `<response>`. |
|
|
28
|
+
| Optional Feature | WHERE `<feature>`, the `<system>` shall `<response>`. |
|
|
29
|
+
|
|
30
|
+
## How It Works
|
|
31
|
+
|
|
32
|
+
### Workflow Lifecycle
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
/ticket:new [requirements]
|
|
36
|
+
│
|
|
37
|
+
└─→ Gather requirements → Create EARS-formatted GitHub issue
|
|
38
|
+
│
|
|
39
|
+
└─→ /ticket:work #123
|
|
40
|
+
│
|
|
41
|
+
└─→ Fetch issue → Create technical plan → Post plan as issue comment
|
|
42
|
+
│
|
|
43
|
+
│ ... implementation work ...
|
|
44
|
+
│
|
|
45
|
+
└─→ /ticket:review-commit
|
|
46
|
+
│
|
|
47
|
+
└─→ Review changes → Verify requirements → Commit
|
|
48
|
+
│
|
|
49
|
+
└─→ /ticket:create-pr
|
|
50
|
+
│
|
|
51
|
+
└─→ Create PR → Security/architecture review → Post findings
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Ticket Structure
|
|
55
|
+
|
|
56
|
+
Each ticket created by `/ticket:new` includes:
|
|
57
|
+
- **Overview**: Plain language description
|
|
58
|
+
- **Requirements**: EARS-formatted business requirements
|
|
59
|
+
- **Technical Questions**: Open questions for implementation
|
|
60
|
+
- **Acceptance Criteria**: Verifiable conditions for completion
|
|
61
|
+
|
|
62
|
+
### Audit Trail
|
|
63
|
+
|
|
64
|
+
| Action | Destination |
|
|
65
|
+
|--------|-------------|
|
|
66
|
+
| Plans | Issue comment |
|
|
67
|
+
| Decisions | Issue comment |
|
|
68
|
+
| Requirement changes | Issue comment |
|
|
69
|
+
| Commit summaries | Issue comment |
|
|
70
|
+
| Review findings | PR + issue comment |
|
|
71
|
+
| Created sub-issues | Linked to source ticket |
|
|
72
|
+
|
|
73
|
+
### Custom System Prompt
|
|
74
|
+
|
|
75
|
+
The plugin injects a system prompt that defines the assistant persona, coding standards (SOLID, DRY, KISS, YAGNI), testing standards, and the ticket workflow rules. This ensures consistent behavior across all four commands.
|
|
76
|
+
|
|
77
|
+
## Plugin Structure
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
ticket-workflow/
|
|
81
|
+
├── .claude-plugin/
|
|
82
|
+
│ ├── plugin.json # Plugin metadata
|
|
83
|
+
│ ├── system-prompt.md # Custom system prompt (persona + workflow rules)
|
|
84
|
+
│ └── commands/
|
|
85
|
+
│ ├── ticket:new.md # Create EARS-formatted issue
|
|
86
|
+
│ ├── ticket:work.md # Implementation planning
|
|
87
|
+
│ ├── ticket:review-commit.md # Review and commit
|
|
88
|
+
│ └── ticket:create-pr.md # PR creation with review
|
|
89
|
+
└── README.md # This file
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Requirements
|
|
93
|
+
|
|
94
|
+
- Claude Code with plugin command support
|
|
95
|
+
- [GitHub CLI](https://cli.github.com/) (`gh`) installed and authenticated
|
|
96
|
+
- A GitHub repository as the working context
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Auto-link GitHub tickets on user prompt submission",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"UserPromptSubmit": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "*",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/ticket-linker.py",
|
|
11
|
+
"timeout": 12
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# workspace-scope-guard
|
|
2
|
+
|
|
3
|
+
Claude Code plugin that enforces working directory scope for all file operations. Blocks writes outside the current project directory and warns on reads outside it. Prevents accidental cross-project modifications in multi-project workspaces.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
Intercepts file operations (Read, Write, Edit, NotebookEdit, Glob, Grep) and checks whether the target path is within the current working directory:
|
|
8
|
+
|
|
9
|
+
| Operation | Out-of-scope behavior |
|
|
10
|
+
|-----------|-----------------------|
|
|
11
|
+
| Write, Edit, NotebookEdit | **Blocked** (exit 2) with error message |
|
|
12
|
+
| Read, Glob, Grep | **Warned** (exit 0) with advisory context |
|
|
13
|
+
|
|
14
|
+
When the current working directory is `/workspaces` (the workspace root), all operations are unrestricted.
|
|
15
|
+
|
|
16
|
+
### Allowed Prefixes
|
|
17
|
+
|
|
18
|
+
These paths are always permitted regardless of working directory:
|
|
19
|
+
|
|
20
|
+
| Path | Reason |
|
|
21
|
+
|------|--------|
|
|
22
|
+
| `/workspaces/.claude/` | Claude Code configuration |
|
|
23
|
+
| `/workspaces/.tmp/` | Temporary files |
|
|
24
|
+
| `/workspaces/.devcontainer/` | Container configuration |
|
|
25
|
+
| `/tmp/` | System temp directory |
|
|
26
|
+
| `/home/vscode/` | User home directory |
|
|
27
|
+
|
|
28
|
+
## How It Works
|
|
29
|
+
|
|
30
|
+
### Hook Lifecycle
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Claude calls Read, Write, Edit, NotebookEdit, Glob, or Grep
|
|
34
|
+
│
|
|
35
|
+
└─→ PreToolUse hook fires
|
|
36
|
+
│
|
|
37
|
+
└─→ guard-workspace-scope.py
|
|
38
|
+
│
|
|
39
|
+
├─→ cwd is /workspaces? → allow (unrestricted)
|
|
40
|
+
├─→ No target path? → allow (tool defaults to cwd)
|
|
41
|
+
├─→ Resolve path via os.path.realpath() (handles symlinks/worktrees)
|
|
42
|
+
├─→ Path is within cwd? → allow
|
|
43
|
+
├─→ Path matches allowed prefix? → allow
|
|
44
|
+
├─→ Write tool + out of scope → exit 2 (block)
|
|
45
|
+
└─→ Read tool + out of scope → exit 0 (warn via additionalContext)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Symlink and Worktree Handling
|
|
49
|
+
|
|
50
|
+
Target paths are resolved with `os.path.realpath()` before scope checking. This correctly handles:
|
|
51
|
+
- Symbolic links that point outside the working directory
|
|
52
|
+
- Git worktree paths (`.git` file containing `gitdir:`)
|
|
53
|
+
|
|
54
|
+
### Path Field Mapping
|
|
55
|
+
|
|
56
|
+
The script extracts the target path from different tool input fields:
|
|
57
|
+
|
|
58
|
+
| Tool | Input Field |
|
|
59
|
+
|------|-------------|
|
|
60
|
+
| Read | `file_path` |
|
|
61
|
+
| Write | `file_path` |
|
|
62
|
+
| Edit | `file_path` |
|
|
63
|
+
| NotebookEdit | `notebook_path` |
|
|
64
|
+
| Glob | `path` |
|
|
65
|
+
| Grep | `path` |
|
|
66
|
+
|
|
67
|
+
### Error Handling
|
|
68
|
+
|
|
69
|
+
| Scenario | Behavior |
|
|
70
|
+
|----------|----------|
|
|
71
|
+
| JSON parse failure | Fails open (exit 0) |
|
|
72
|
+
| Other exceptions | Fails open (exit 0) — logs error to stderr |
|
|
73
|
+
|
|
74
|
+
### Timeout
|
|
75
|
+
|
|
76
|
+
The hook has a 5-second timeout.
|
|
77
|
+
|
|
78
|
+
## Plugin Structure
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
workspace-scope-guard/
|
|
82
|
+
├── .claude-plugin/
|
|
83
|
+
│ └── plugin.json # Plugin metadata
|
|
84
|
+
├── hooks/
|
|
85
|
+
│ └── hooks.json # PreToolUse hook registration
|
|
86
|
+
├── scripts/
|
|
87
|
+
│ └── guard-workspace-scope.py # Scope enforcement (PreToolUse)
|
|
88
|
+
└── README.md # This file
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Requirements
|
|
92
|
+
|
|
93
|
+
- Python 3.11+
|
|
94
|
+
- Claude Code with plugin hook support
|
|
@@ -17,11 +17,9 @@ import sys
|
|
|
17
17
|
|
|
18
18
|
# Paths that are always allowed regardless of working directory
|
|
19
19
|
ALLOWED_PREFIXES = [
|
|
20
|
-
"/workspaces/.claude/",
|
|
21
20
|
"/workspaces/.tmp/",
|
|
22
|
-
"/workspaces/.devcontainer/",
|
|
23
21
|
"/tmp/",
|
|
24
|
-
"/home/",
|
|
22
|
+
"/home/vscode/",
|
|
25
23
|
]
|
|
26
24
|
|
|
27
25
|
WRITE_TOOLS = {"Write", "Edit", "NotebookEdit"}
|
|
@@ -34,7 +34,7 @@ warn_check() {
|
|
|
34
34
|
echo ""
|
|
35
35
|
echo "Core:"
|
|
36
36
|
check "Claude Code installed" "command -v claude"
|
|
37
|
-
warn_check "Claude native binary" "[ -x /usr/local/bin/claude ]"
|
|
37
|
+
warn_check "Claude native binary" "[ -x ~/.local/bin/claude ] || [ -x /usr/local/bin/claude ]"
|
|
38
38
|
check "cc alias configured" "grep -q 'alias cc=' ~/.bashrc 2>/dev/null || grep -q 'alias cc=' ~/.zshrc 2>/dev/null"
|
|
39
39
|
check "Config directory exists" "[ -d '${CLAUDE_CONFIG_DIR:-/workspaces/.claude}' ]"
|
|
40
40
|
check "Settings file exists" "[ -f '${CLAUDE_CONFIG_DIR:-/workspaces/.claude}/settings.json' ]"
|
|
@@ -29,7 +29,7 @@ is_excluded() {
|
|
|
29
29
|
|
|
30
30
|
has_project_markers() {
|
|
31
31
|
local dir="$1"
|
|
32
|
-
[ -d "$dir/.git" ] || [ -f "$dir/package.json" ] || [ -f "$dir/pyproject.toml" ] ||
|
|
32
|
+
[ -d "$dir/.git" ] || [ -f "$dir/.git" ] || [ -f "$dir/package.json" ] || [ -f "$dir/pyproject.toml" ] ||
|
|
33
33
|
[ -f "$dir/Cargo.toml" ] || [ -f "$dir/go.mod" ] || [ -f "$dir/deno.json" ] ||
|
|
34
34
|
[ -f "$dir/Makefile" ] || [ -f "$dir/CLAUDE.md" ]
|
|
35
35
|
}
|
|
@@ -38,7 +38,11 @@ detect_tags() {
|
|
|
38
38
|
local dir="$1"
|
|
39
39
|
local tags=()
|
|
40
40
|
|
|
41
|
-
[ -
|
|
41
|
+
if [ -f "$dir/.git" ] && grep -q "gitdir:" "$dir/.git" 2>/dev/null; then
|
|
42
|
+
tags+=("git" "worktree")
|
|
43
|
+
elif [ -d "$dir/.git" ]; then
|
|
44
|
+
tags+=("git")
|
|
45
|
+
fi
|
|
42
46
|
[ -f "$dir/package.json" ] && tags+=("node")
|
|
43
47
|
[ -f "$dir/pyproject.toml" ] && tags+=("python")
|
|
44
48
|
[ -f "$dir/Cargo.toml" ] && tags+=("rust")
|
|
@@ -95,6 +99,19 @@ scan_and_update() {
|
|
|
95
99
|
is_excluded "$subname" && continue
|
|
96
100
|
new_projects=$(register_project "$new_projects" "$subname" "$subdir")
|
|
97
101
|
done
|
|
102
|
+
|
|
103
|
+
# Depth 3: .worktrees/ is hidden (not matched by */) — scan explicitly
|
|
104
|
+
local wtcontainer="${dir%/}/.worktrees"
|
|
105
|
+
if [ -d "$wtcontainer" ]; then
|
|
106
|
+
for wtdir in "${wtcontainer%/}"/*/; do
|
|
107
|
+
[ -d "$wtdir" ] || continue
|
|
108
|
+
local wtname
|
|
109
|
+
wtname=$(basename "$wtdir")
|
|
110
|
+
if has_project_markers "$wtdir"; then
|
|
111
|
+
new_projects=$(register_project "$new_projects" "$wtname" "$wtdir")
|
|
112
|
+
fi
|
|
113
|
+
done
|
|
114
|
+
fi
|
|
98
115
|
fi
|
|
99
116
|
done
|
|
100
117
|
|
|
@@ -158,20 +175,10 @@ start_watcher() {
|
|
|
158
175
|
stop_watcher
|
|
159
176
|
fi
|
|
160
177
|
|
|
161
|
-
# Check if inotifywait is available
|
|
178
|
+
# Check if inotifywait is available (installed by tmux feature at build time)
|
|
162
179
|
if ! command -v inotifywait &>/dev/null; then
|
|
163
|
-
echo "$LOG_PREFIX
|
|
164
|
-
|
|
165
|
-
sudo apt-get update -qq && sudo apt-get install -y -qq inotify-tools >/dev/null 2>&1
|
|
166
|
-
else
|
|
167
|
-
apt-get update -qq && apt-get install -y -qq inotify-tools >/dev/null 2>&1
|
|
168
|
-
fi
|
|
169
|
-
|
|
170
|
-
if ! command -v inotifywait &>/dev/null; then
|
|
171
|
-
echo "$LOG_PREFIX WARNING: Could not install inotify-tools, watcher disabled"
|
|
172
|
-
return 1
|
|
173
|
-
fi
|
|
174
|
-
echo "$LOG_PREFIX inotify-tools installed"
|
|
180
|
+
echo "$LOG_PREFIX WARNING: inotify-tools not installed, watcher disabled"
|
|
181
|
+
return 1
|
|
175
182
|
fi
|
|
176
183
|
|
|
177
184
|
# Fork background watcher in its own process group for clean shutdown
|
|
@@ -181,7 +188,7 @@ start_watcher() {
|
|
|
181
188
|
# -r watches subdirectories (catches events inside container dirs like projects/)
|
|
182
189
|
# --exclude filters noisy dirs that generate frequent irrelevant events
|
|
183
190
|
inotifywait -m -r -q -e create,delete,moved_to,moved_from \
|
|
184
|
-
--exclude '(node_modules|\.git
|
|
191
|
+
--exclude '(node_modules|\.git|\.tmp|__pycache__|\.venv)' \
|
|
185
192
|
--format '%w%f %e' "$WORKSPACE_ROOT" 2>/dev/null |
|
|
186
193
|
while read -r _path event; do
|
|
187
194
|
# Small delay to let filesystem settle (e.g., move operations)
|
|
@@ -191,7 +198,7 @@ start_watcher() {
|
|
|
191
198
|
|
|
192
199
|
# Cleanup on exit
|
|
193
200
|
rm -f "$PID_FILE"
|
|
194
|
-
) &
|
|
201
|
+
) &>/dev/null &
|
|
195
202
|
local watcher_pid=$!
|
|
196
203
|
set +m
|
|
197
204
|
echo "$watcher_pid" >"$PID_FILE"
|
|
@@ -22,8 +22,9 @@ fi
|
|
|
22
22
|
: "${SETUP_UPDATE_CLAUDE:=true}"
|
|
23
23
|
: "${SETUP_PROJECTS:=true}"
|
|
24
24
|
: "${SETUP_TERMINAL:=true}"
|
|
25
|
+
: "${SETUP_POSTSTART:=true}"
|
|
25
26
|
|
|
26
|
-
export CLAUDE_CONFIG_DIR CONFIG_SOURCE_DIR SETUP_CONFIG SETUP_ALIASES SETUP_AUTH SETUP_PLUGINS SETUP_UPDATE_CLAUDE SETUP_PROJECTS SETUP_TERMINAL
|
|
27
|
+
export CLAUDE_CONFIG_DIR CONFIG_SOURCE_DIR SETUP_CONFIG SETUP_ALIASES SETUP_AUTH SETUP_PLUGINS SETUP_UPDATE_CLAUDE SETUP_PROJECTS SETUP_TERMINAL SETUP_POSTSTART
|
|
27
28
|
|
|
28
29
|
SETUP_START=$(date +%s)
|
|
29
30
|
SETUP_RESULTS=()
|
|
@@ -42,12 +43,16 @@ run_script() {
|
|
|
42
43
|
if [ "$enabled" = "true" ]; then
|
|
43
44
|
if [ -f "$script" ]; then
|
|
44
45
|
printf " %-30s" "$name..."
|
|
45
|
-
|
|
46
|
+
local output
|
|
47
|
+
if output=$(bash "$script" 2>&1); then
|
|
46
48
|
echo "done"
|
|
47
49
|
SETUP_RESULTS+=("$name:ok")
|
|
48
50
|
else
|
|
49
|
-
|
|
51
|
+
local exit_code=$?
|
|
52
|
+
echo "FAILED (exit $exit_code)"
|
|
50
53
|
SETUP_RESULTS+=("$name:failed")
|
|
54
|
+
# Show output on failure for diagnostics
|
|
55
|
+
echo "$output" | sed 's/^/ /'
|
|
51
56
|
fi
|
|
52
57
|
else
|
|
53
58
|
echo " $name... not found, skipping"
|
|
@@ -59,6 +64,30 @@ run_script() {
|
|
|
59
64
|
fi
|
|
60
65
|
}
|
|
61
66
|
|
|
67
|
+
run_poststart_hooks() {
|
|
68
|
+
local hook_dir="/usr/local/devcontainer-poststart.d"
|
|
69
|
+
if [ ! -d "$hook_dir" ]; then
|
|
70
|
+
return 0
|
|
71
|
+
fi
|
|
72
|
+
local count=0
|
|
73
|
+
for hook in "$hook_dir"/*.sh; do
|
|
74
|
+
[ -f "$hook" ] || continue
|
|
75
|
+
[ -x "$hook" ] || continue
|
|
76
|
+
local name
|
|
77
|
+
name="$(basename "$hook")"
|
|
78
|
+
printf " %-30s" "$name..."
|
|
79
|
+
if bash "$hook" 2>&1; then
|
|
80
|
+
echo "done"
|
|
81
|
+
count=$((count + 1))
|
|
82
|
+
else
|
|
83
|
+
echo "FAILED (exit $?)"
|
|
84
|
+
fi
|
|
85
|
+
done
|
|
86
|
+
if [ $count -gt 0 ]; then
|
|
87
|
+
SETUP_RESULTS+=("poststart-hooks:ok ($count)")
|
|
88
|
+
fi
|
|
89
|
+
}
|
|
90
|
+
|
|
62
91
|
run_script "$SCRIPT_DIR/setup-symlink-claude.sh" "true"
|
|
63
92
|
run_script "$SCRIPT_DIR/setup-auth.sh" "$SETUP_AUTH"
|
|
64
93
|
run_script "$SCRIPT_DIR/setup-config.sh" "$SETUP_CONFIG"
|
|
@@ -66,7 +95,20 @@ run_script "$SCRIPT_DIR/setup-aliases.sh" "$SETUP_ALIASES"
|
|
|
66
95
|
run_script "$SCRIPT_DIR/setup-plugins.sh" "$SETUP_PLUGINS"
|
|
67
96
|
run_script "$SCRIPT_DIR/setup-projects.sh" "$SETUP_PROJECTS"
|
|
68
97
|
run_script "$SCRIPT_DIR/setup-terminal.sh" "$SETUP_TERMINAL"
|
|
69
|
-
|
|
98
|
+
|
|
99
|
+
# Background the update to avoid blocking container start
|
|
100
|
+
if [ "$SETUP_UPDATE_CLAUDE" = "true" ] && [ -f "$SCRIPT_DIR/setup-update-claude.sh" ]; then
|
|
101
|
+
bash "$SCRIPT_DIR/setup-update-claude.sh" &>/dev/null &
|
|
102
|
+
disown
|
|
103
|
+
SETUP_RESULTS+=("setup-update-claude:background")
|
|
104
|
+
else
|
|
105
|
+
SETUP_RESULTS+=("setup-update-claude:disabled")
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
# Run post-start hooks
|
|
109
|
+
if [ "$SETUP_POSTSTART" = "true" ]; then
|
|
110
|
+
run_poststart_hooks
|
|
111
|
+
fi
|
|
70
112
|
|
|
71
113
|
echo ""
|
|
72
114
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
@@ -77,10 +119,11 @@ for result in "${SETUP_RESULTS[@]}"; do
|
|
|
77
119
|
name="${result%%:*}"
|
|
78
120
|
status="${result##*:}"
|
|
79
121
|
case "$status" in
|
|
80
|
-
ok)
|
|
122
|
+
ok*) printf " ✓ %s\n" "$name" ;;
|
|
81
123
|
failed) printf " ✗ %s (FAILED)\n" "$name"; FAILURES=$((FAILURES + 1)) ;;
|
|
82
124
|
disabled) printf " - %s (disabled)\n" "$name" ;;
|
|
83
125
|
missing) printf " ? %s (not found)\n" "$name" ;;
|
|
126
|
+
background) printf " ⇢ %s (background)\n" "$name" ;;
|
|
84
127
|
esac
|
|
85
128
|
done
|
|
86
129
|
ELAPSED=$(( $(date +%s) - SETUP_START ))
|