codeforge-dev 1.12.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.
Files changed (155) hide show
  1. package/.devcontainer/CHANGELOG.md +37 -0
  2. package/.devcontainer/CLAUDE.md +21 -13
  3. package/.devcontainer/README.md +16 -8
  4. package/.devcontainer/config/defaults/rules/workspace-scope.md +13 -4
  5. package/.devcontainer/config/defaults/settings.json +5 -3
  6. package/.devcontainer/devcontainer.json +14 -7
  7. package/.devcontainer/features/claude-session-dashboard/README.md +40 -0
  8. package/.devcontainer/features/claude-session-dashboard/devcontainer-feature.json +35 -0
  9. package/.devcontainer/features/claude-session-dashboard/install.sh +172 -0
  10. package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +24 -3
  11. package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/.claude-plugin/plugin.json +8 -0
  12. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/AGENT-REDIRECTION.md +7 -12
  13. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/REVIEW-RUBRIC.md +1 -1
  14. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/claude-guide.md +1 -1
  15. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/debug-logs.md +1 -1
  16. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/dependency-analyst.md +1 -1
  17. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/explorer.md +1 -1
  18. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/generalist.md +1 -1
  19. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/git-archaeologist.md +2 -2
  20. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/researcher.md +1 -1
  21. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/security-auditor.md +1 -1
  22. package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/hooks/hooks.json +29 -0
  23. package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/redirect-builtin-agents.py +17 -6
  24. package/.devcontainer/plugins/devs-marketplace/plugins/session-context/.claude-plugin/plugin.json +8 -0
  25. package/.devcontainer/plugins/devs-marketplace/plugins/session-context/hooks/hooks.json +34 -0
  26. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/.claude-plugin/plugin.json +8 -0
  27. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/hooks/hooks.json +29 -0
  28. package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/team/SKILL.md +205 -0
  29. package/.devcontainer/plugins/devs-marketplace/plugins/spec-workflow/.claude-plugin/plugin.json +8 -0
  30. package/.devcontainer/plugins/devs-marketplace/plugins/spec-workflow/hooks/hooks.json +17 -0
  31. package/.devcontainer/plugins/devs-marketplace/plugins/spec-workflow/skills/spec-init/references/roadmap-template.md +33 -0
  32. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/hooks/hooks.json +17 -0
  33. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +0 -2
  34. package/.devcontainer/scripts/setup-projects.sh +1 -1
  35. package/package.json +1 -1
  36. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/.claude-plugin/plugin.json +0 -8
  37. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/README.md +0 -250
  38. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +0 -112
  39. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/advisory-test-runner.cpython-314.pyc +0 -0
  40. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/collect-edited-files.cpython-314.pyc +0 -0
  41. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/commit-reminder.cpython-314.pyc +0 -0
  42. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/git-state-injector.cpython-314.pyc +0 -0
  43. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/guard-readonly-bash.cpython-314.pyc +0 -0
  44. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/redirect-builtin-agents.cpython-314.pyc +0 -0
  45. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
  46. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/syntax-validator.cpython-314.pyc +0 -0
  47. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/ticket-linker.cpython-314.pyc +0 -0
  48. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/todo-harvester.cpython-314.pyc +0 -0
  49. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/verify-no-regression.cpython-314.pyc +0 -0
  50. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/verify-tests-pass.cpython-314.pyc +0 -0
  51. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/collect-edited-files.py +0 -46
  52. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/syntax-validator.py +0 -146
  53. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/.claude-plugin/commands/debug.md +0 -0
  54. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/architect.md +0 -0
  55. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/bash-exec.md +0 -0
  56. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/doc-writer.md +0 -0
  57. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/migrator.md +0 -0
  58. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/perf-profiler.md +0 -0
  59. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/refactorer.md +0 -0
  60. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/spec-writer.md +0 -0
  61. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/statusline-config.md +0 -0
  62. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/agents/test-writer.md +0 -0
  63. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/guard-readonly-bash.py +0 -0
  64. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/inject-cwd.py +0 -0
  65. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/verify-no-regression.py +0 -0
  66. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → agent-system}/scripts/verify-tests-pass.py +0 -0
  67. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → auto-code-quality}/scripts/advisory-test-runner.py +0 -0
  68. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → session-context}/scripts/commit-reminder.py +0 -0
  69. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → session-context}/scripts/git-state-injector.py +0 -0
  70. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → session-context}/scripts/todo-harvester.py +0 -0
  71. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/scripts/skill-suggester.py +0 -0
  72. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/api-design/SKILL.md +0 -0
  73. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/api-design/references/error-handling.md +0 -0
  74. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/api-design/references/rest-conventions.md +0 -0
  75. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/ast-grep-patterns/SKILL.md +0 -0
  76. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/ast-grep-patterns/references/language-patterns.md +0 -0
  77. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-agent-sdk/SKILL.md +0 -0
  78. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-agent-sdk/references/sdk-typescript-reference.md +0 -0
  79. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-code-headless/SKILL.md +0 -0
  80. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-code-headless/references/cli-flags-and-output.md +0 -0
  81. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/claude-code-headless/references/sdk-and-mcp.md +0 -0
  82. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/debugging/SKILL.md +0 -0
  83. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/debugging/references/error-patterns.md +0 -0
  84. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/debugging/references/log-locations.md +0 -0
  85. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/dependency-management/SKILL.md +0 -0
  86. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/dependency-management/references/ecosystem-commands.md +0 -0
  87. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/dependency-management/references/license-compliance.md +0 -0
  88. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker/SKILL.md +0 -0
  89. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker/references/compose-services.md +0 -0
  90. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker/references/dockerfile-patterns.md +0 -0
  91. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker-py/SKILL.md +0 -0
  92. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker-py/references/container-lifecycle.md +0 -0
  93. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/docker-py/references/resources-and-security.md +0 -0
  94. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/documentation-patterns/SKILL.md +0 -0
  95. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/documentation-patterns/references/api-doc-templates.md +0 -0
  96. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/documentation-patterns/references/docstring-formats.md +0 -0
  97. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/SKILL.md +0 -0
  98. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/references/middleware-and-lifespan.md +0 -0
  99. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/references/pydantic-models.md +0 -0
  100. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/references/routing-and-dependencies.md +0 -0
  101. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/fastapi/references/sse-and-streaming.md +0 -0
  102. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/git-forensics/SKILL.md +0 -0
  103. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/git-forensics/references/advanced-commands.md +0 -0
  104. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/git-forensics/references/investigation-playbooks.md +0 -0
  105. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/migration-patterns/SKILL.md +0 -0
  106. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/migration-patterns/references/javascript-migrations.md +0 -0
  107. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/migration-patterns/references/python-migrations.md +0 -0
  108. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/performance-profiling/SKILL.md +0 -0
  109. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/performance-profiling/references/interpreting-results.md +0 -0
  110. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/performance-profiling/references/tool-commands.md +0 -0
  111. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/pydantic-ai/SKILL.md +0 -0
  112. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/pydantic-ai/references/agents-and-tools.md +0 -0
  113. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/pydantic-ai/references/models-and-streaming.md +0 -0
  114. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/refactoring-patterns/SKILL.md +0 -0
  115. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/refactoring-patterns/references/safe-transformations.md +0 -0
  116. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/refactoring-patterns/references/smell-catalog.md +0 -0
  117. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/security-checklist/SKILL.md +0 -0
  118. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/security-checklist/references/owasp-patterns.md +0 -0
  119. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/security-checklist/references/secrets-patterns.md +0 -0
  120. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/skill-building/SKILL.md +0 -0
  121. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/skill-building/references/cross-vendor-principles.md +0 -0
  122. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/skill-building/references/patterns-and-antipatterns.md +0 -0
  123. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/skill-building/references/skill-authoring-patterns.md +0 -0
  124. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/SKILL.md +0 -0
  125. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/references/advanced-queries.md +0 -0
  126. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/references/javascript-patterns.md +0 -0
  127. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/references/python-patterns.md +0 -0
  128. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/sqlite/references/schema-and-pragmas.md +0 -0
  129. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/SKILL.md +0 -0
  130. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/ai-sdk-svelte.md +0 -0
  131. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/component-patterns.md +0 -0
  132. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/layercake.md +0 -0
  133. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/migration-guide.md +0 -0
  134. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/runes-and-reactivity.md +0 -0
  135. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/spa-and-routing.md +0 -0
  136. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/svelte5/references/svelte-dnd-action.md +0 -0
  137. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/testing/SKILL.md +0 -0
  138. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/testing/references/fastapi-testing.md +0 -0
  139. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → skill-engine}/skills/testing/references/svelte-testing.md +0 -0
  140. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/scripts/spec-reminder.py +0 -0
  141. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-build/SKILL.md +0 -0
  142. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-build/references/review-checklist.md +0 -0
  143. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-check/SKILL.md +0 -0
  144. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-init/SKILL.md +0 -0
  145. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-init/references/backlog-template.md +0 -0
  146. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-init/references/milestones-template.md +0 -0
  147. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-new/SKILL.md +0 -0
  148. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-new/references/template.md +0 -0
  149. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-refine/SKILL.md +0 -0
  150. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-review/SKILL.md +0 -0
  151. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/spec-update/SKILL.md +0 -0
  152. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/specification-writing/SKILL.md +0 -0
  153. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/specification-writing/references/criteria-patterns.md +0 -0
  154. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → spec-workflow}/skills/specification-writing/references/ears-templates.md +0 -0
  155. /package/.devcontainer/plugins/devs-marketplace/plugins/{code-directive → ticket-workflow}/scripts/ticket-linker.py +0 -0
@@ -1,250 +0,0 @@
1
- # code-directive
2
-
3
- The core Claude Code plugin for CodeForge. Provides 17 custom agent definitions, 28 coding reference skills, and 12 hook scripts spanning 6 lifecycle events. Handles agent redirection, skill suggestion, syntax validation, edited file collection, advisory testing, and session-start context injection.
4
-
5
- ## What It Does
6
-
7
- ### Agents (17)
8
-
9
- Custom agent definitions that replace Claude Code's built-in subagents with enhanced, purpose-built alternatives. Each agent is a markdown prompt file in `agents/` that defines the agent's role, constraints, tools, and workflow.
10
-
11
- | Agent | Role |
12
- |-------|------|
13
- | `architect` | System design, planning, architecture decisions |
14
- | `bash-exec` | Shell command execution with safety guardrails |
15
- | `claude-guide` | Claude Code usage guidance and troubleshooting |
16
- | `debug-logs` | Log analysis and debugging |
17
- | `dependency-analyst` | Dependency auditing, upgrades, and vulnerability analysis |
18
- | `doc-writer` | Documentation authoring |
19
- | `explorer` | Codebase exploration and context gathering |
20
- | `generalist` | General-purpose tasks |
21
- | `git-archaeologist` | Git history investigation and forensics |
22
- | `migrator` | Code migration and framework upgrades |
23
- | `perf-profiler` | Performance profiling and optimization |
24
- | `refactorer` | Code refactoring and restructuring |
25
- | `researcher` | Research and information gathering |
26
- | `security-auditor` | Security review and vulnerability assessment |
27
- | `spec-writer` | Specification authoring |
28
- | `statusline-config` | Status line configuration |
29
- | `test-writer` | Test authoring |
30
-
31
- ### Agent Redirection
32
-
33
- The `redirect-builtin-agents.py` PreToolUse hook transparently swaps built-in agent types to custom agents whenever Claude spawns a subagent via the Task tool:
34
-
35
- | Built-in Agent | Redirects To |
36
- |----------------|--------------|
37
- | `Explore` | `explorer` |
38
- | `Plan` | `architect` |
39
- | `general-purpose` | `generalist` |
40
- | `Bash` | `bash-exec` |
41
- | `claude-code-guide` | `claude-guide` |
42
- | `statusline-setup` | `statusline-config` |
43
-
44
- See `AGENT-REDIRECTION.md` for the full technical guide on how the PreToolUse hook contract works.
45
-
46
- ### Skills (28)
47
-
48
- Reference skill packages that provide domain-specific knowledge. Each skill lives in its own directory under `skills/` with a `SKILL.md` entry point and optional `references/` subdirectory. Skills are loaded on demand via slash commands.
49
-
50
- | Skill | Domain |
51
- |-------|--------|
52
- | `api-design` | REST conventions, error handling |
53
- | `ast-grep-patterns` | Structural code search patterns |
54
- | `claude-agent-sdk` | Claude Agent SDK (TypeScript) |
55
- | `claude-code-headless` | Claude Code CLI, SDK, and MCP |
56
- | `debugging` | Error patterns, log analysis |
57
- | `dependency-management` | Package ecosystems, license compliance |
58
- | `docker` | Dockerfile patterns, Compose services |
59
- | `docker-py` | Docker SDK for Python |
60
- | `documentation-patterns` | API docs, docstring formats |
61
- | `fastapi` | FastAPI routing, Pydantic, SSE, middleware |
62
- | `git-forensics` | Git investigation commands, playbooks |
63
- | `migration-patterns` | Python and JavaScript migration guides |
64
- | `performance-profiling` | Profiling tools, result interpretation |
65
- | `pydantic-ai` | PydanticAI agents, tools, models |
66
- | `refactoring-patterns` | Safe transformations, code smell catalog |
67
- | `security-checklist` | OWASP patterns, secrets management |
68
- | `skill-building` | Skill authoring patterns and principles |
69
- | `spec-build` | Specification-driven implementation lifecycle |
70
- | `spec-check` | Specification health audit |
71
- | `spec-init` | Initialize `.specs/` directory |
72
- | `spec-new` | Create new specification from template |
73
- | `spec-refine` | Validate spec assumptions with user |
74
- | `spec-review` | Verify implementation against spec |
75
- | `spec-update` | As-built spec update |
76
- | `specification-writing` | EARS templates, criteria patterns |
77
- | `sqlite` | SQLite patterns (Python, JavaScript, advanced) |
78
- | `svelte5` | Svelte 5 runes, components, routing |
79
- | `testing` | FastAPI testing, Svelte testing |
80
-
81
- ### Hook Scripts (12)
82
-
83
- | Script | Hook Event | Matcher | Purpose |
84
- |--------|-----------|---------|---------|
85
- | `redirect-builtin-agents.py` | PreToolUse | Task | Redirects built-in agents to custom agents |
86
- | `skill-suggester.py` | UserPromptSubmit | * | Suggests relevant skills based on prompt keywords |
87
- | `ticket-linker.py` | UserPromptSubmit | * | Auto-fetches GitHub issues/PRs referenced by #123 or URL |
88
- | `skill-suggester.py` | SubagentStart | Plan | Suggests skills for planning agents |
89
- | `inject-cwd.py` | SubagentStart | * | Injects working directory into subagent context |
90
- | `advisory-test-runner.py` | Stop | * | Runs affected tests and injects results as context |
91
- | `commit-reminder.py` | Stop | * | Advises about uncommitted changes |
92
- | `spec-reminder.py` | Stop | * | Advises about spec updates after code changes |
93
- | `git-state-injector.py` | SessionStart | * | Injects branch, status, and recent commits at session start |
94
- | `todo-harvester.py` | SessionStart | * | Surfaces TODO/FIXME/HACK/XXX comments from the codebase |
95
- | `syntax-validator.py` | PostToolUse | Edit\|Write | Validates JSON, JSONC, YAML, TOML syntax after edits |
96
- | `collect-edited-files.py` | PostToolUse | Edit\|Write | Records edited file paths for batch formatting/linting |
97
-
98
- ## How It Works
99
-
100
- ### Hook Lifecycle
101
-
102
- ```
103
- Session starts
104
-
105
- ├─→ git-state-injector.py Injects branch, status, recent commits
106
- └─→ todo-harvester.py Surfaces TODO/FIXME markers
107
-
108
- User submits a prompt
109
-
110
- ├─→ skill-suggester.py Suggests skills matching prompt keywords
111
- └─→ ticket-linker.py Fetches GitHub issues referenced by #123 or URL
112
-
113
- Claude spawns a subagent
114
-
115
- ├─→ redirect-builtin-agents.py Swaps built-in agents for custom ones (Task matcher)
116
- ├─→ skill-suggester.py Suggests skills for Plan agents
117
- └─→ inject-cwd.py Tells subagent the working directory
118
-
119
- Claude edits a file (Edit/Write)
120
-
121
- ├─→ syntax-validator.py Validates JSON/YAML/TOML syntax immediately
122
- └─→ collect-edited-files.py Appends path to session temp files
123
-
124
- Claude stops responding
125
-
126
- ├─→ advisory-test-runner.py Runs affected tests, injects results
127
- ├─→ commit-reminder.py Advises about uncommitted changes
128
- └─→ spec-reminder.py Advises about spec updates
129
- ```
130
-
131
- ### Temp File Convention
132
-
133
- Edited file paths are stored in session-scoped temp files for downstream consumption:
134
- - `/tmp/claude-edited-files-{session_id}` — consumed by the `auto-formatter` plugin
135
- - `/tmp/claude-lint-files-{session_id}` — consumed by the `auto-linter` plugin
136
-
137
- ### Advisory Test Runner
138
-
139
- The test runner maps edited source files to their corresponding test files, runs only affected tests, and injects pass/fail results as `additionalContext`. It never blocks Claude — results are purely informational.
140
-
141
- ### Skill Suggester
142
-
143
- Matches user prompts against keyword maps (phrases + individual terms) for each skill. When a skill matches, it injects a suggestion as `systemMessage` (UserPromptSubmit) or `additionalContext` (SubagentStart) so Claude knows which skill to load.
144
-
145
- ### Ticket Linker
146
-
147
- Detects `#123` references and full GitHub issue/PR URLs in user prompts, fetches the ticket body via `gh`, and injects it as `additionalContext`. Handles up to 3 references per prompt with a 1500-character cap per ticket body.
148
-
149
- ### Timeouts
150
-
151
- | Script | Timeout |
152
- |--------|---------|
153
- | redirect-builtin-agents.py | 5s |
154
- | skill-suggester.py | 3s |
155
- | ticket-linker.py | 12s |
156
- | inject-cwd.py | 3s |
157
- | advisory-test-runner.py | 20s |
158
- | commit-reminder.py | 8s |
159
- | spec-reminder.py | 8s |
160
- | git-state-injector.py | 10s |
161
- | todo-harvester.py | 8s |
162
- | syntax-validator.py | 5s |
163
- | collect-edited-files.py | 3s |
164
-
165
- ## Documentation
166
-
167
- - `AGENT-REDIRECTION.md` — Technical guide to the PreToolUse hook contract for agent redirection
168
- - `REVIEW-RUBRIC.md` — Quality rubric for agent and skill design, based on Anthropic's prompt engineering documentation
169
-
170
- ## Plugin Structure
171
-
172
- ```
173
- code-directive/
174
- ├── .claude-plugin/
175
- │ ├── plugin.json # Plugin metadata
176
- │ └── commands/
177
- │ └── debug.md # /debug slash command
178
- ├── agents/ # 17 custom agent definitions
179
- │ ├── architect.md
180
- │ ├── bash-exec.md
181
- │ ├── claude-guide.md
182
- │ ├── debug-logs.md
183
- │ ├── dependency-analyst.md
184
- │ ├── doc-writer.md
185
- │ ├── explorer.md
186
- │ ├── generalist.md
187
- │ ├── git-archaeologist.md
188
- │ ├── migrator.md
189
- │ ├── perf-profiler.md
190
- │ ├── refactorer.md
191
- │ ├── researcher.md
192
- │ ├── security-auditor.md
193
- │ ├── spec-writer.md
194
- │ ├── statusline-config.md
195
- │ └── test-writer.md
196
- ├── skills/ # 28 coding reference skills
197
- │ ├── api-design/
198
- │ ├── ast-grep-patterns/
199
- │ ├── claude-agent-sdk/
200
- │ ├── claude-code-headless/
201
- │ ├── debugging/
202
- │ ├── dependency-management/
203
- │ ├── docker/
204
- │ ├── docker-py/
205
- │ ├── documentation-patterns/
206
- │ ├── fastapi/
207
- │ ├── git-forensics/
208
- │ ├── migration-patterns/
209
- │ ├── performance-profiling/
210
- │ ├── pydantic-ai/
211
- │ ├── refactoring-patterns/
212
- │ ├── security-checklist/
213
- │ ├── skill-building/
214
- │ ├── spec-build/
215
- │ ├── spec-check/
216
- │ ├── spec-init/
217
- │ ├── spec-new/
218
- │ ├── spec-refine/
219
- │ ├── spec-review/
220
- │ ├── spec-update/
221
- │ ├── specification-writing/
222
- │ ├── sqlite/
223
- │ ├── svelte5/
224
- │ └── testing/
225
- ├── hooks/
226
- │ └── hooks.json # All hook registrations (6 events, 12 scripts)
227
- ├── scripts/
228
- │ ├── advisory-test-runner.py # Stop: runs affected tests
229
- │ ├── collect-edited-files.py # PostToolUse: records edited file paths
230
- │ ├── commit-reminder.py # Stop: uncommitted changes advisory
231
- │ ├── git-state-injector.py # SessionStart: injects git state
232
- │ ├── guard-readonly-bash.py # Read-only bash guard (used by agents)
233
- │ ├── inject-cwd.py # SubagentStart: injects working directory
234
- │ ├── redirect-builtin-agents.py # PreToolUse: agent redirection
235
- │ ├── skill-suggester.py # UserPromptSubmit/SubagentStart: skill suggestions
236
- │ ├── spec-reminder.py # Stop: spec update advisory
237
- │ ├── syntax-validator.py # PostToolUse: JSON/YAML/TOML validation
238
- │ ├── ticket-linker.py # UserPromptSubmit: auto-fetch GitHub issues
239
- │ ├── todo-harvester.py # SessionStart: TODO/FIXME surfacing
240
- │ ├── verify-no-regression.py # Test verification utility
241
- │ └── verify-tests-pass.py # Test verification utility
242
- ├── AGENT-REDIRECTION.md # Agent redirection technical guide
243
- └── REVIEW-RUBRIC.md # Agent & skill quality rubric
244
- ```
245
-
246
- ## Requirements
247
-
248
- - Python 3.11+
249
- - Claude Code with plugin hook support
250
- - [GitHub CLI](https://cli.github.com/) (`gh`) for ticket-linker functionality
@@ -1,112 +0,0 @@
1
- {
2
- "description": "Code quality hooks and skill suggestions for the CodeDirective project",
3
- "hooks": {
4
- "PreToolUse": [
5
- {
6
- "matcher": "Task",
7
- "hooks": [
8
- {
9
- "type": "command",
10
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/redirect-builtin-agents.py",
11
- "timeout": 5
12
- }
13
- ]
14
- }
15
- ],
16
- "UserPromptSubmit": [
17
- {
18
- "matcher": "*",
19
- "hooks": [
20
- {
21
- "type": "command",
22
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/skill-suggester.py",
23
- "timeout": 3
24
- },
25
- {
26
- "type": "command",
27
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/ticket-linker.py",
28
- "timeout": 12
29
- }
30
- ]
31
- }
32
- ],
33
- "SubagentStart": [
34
- {
35
- "matcher": "Plan",
36
- "hooks": [
37
- {
38
- "type": "command",
39
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/skill-suggester.py",
40
- "timeout": 3
41
- }
42
- ]
43
- },
44
- {
45
- "matcher": "",
46
- "hooks": [
47
- {
48
- "type": "command",
49
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/inject-cwd.py",
50
- "timeout": 3
51
- }
52
- ]
53
- }
54
- ],
55
- "Stop": [
56
- {
57
- "matcher": "",
58
- "hooks": [
59
- {
60
- "type": "command",
61
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/advisory-test-runner.py",
62
- "timeout": 20
63
- },
64
- {
65
- "type": "command",
66
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/commit-reminder.py",
67
- "timeout": 8
68
- },
69
- {
70
- "type": "command",
71
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/spec-reminder.py",
72
- "timeout": 8
73
- }
74
- ]
75
- }
76
- ],
77
- "SessionStart": [
78
- {
79
- "matcher": "",
80
- "hooks": [
81
- {
82
- "type": "command",
83
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/git-state-injector.py",
84
- "timeout": 10
85
- },
86
- {
87
- "type": "command",
88
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/todo-harvester.py",
89
- "timeout": 8
90
- }
91
- ]
92
- }
93
- ],
94
- "PostToolUse": [
95
- {
96
- "matcher": "Edit|Write",
97
- "hooks": [
98
- {
99
- "type": "command",
100
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/syntax-validator.py",
101
- "timeout": 5
102
- },
103
- {
104
- "type": "command",
105
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/collect-edited-files.py",
106
- "timeout": 3
107
- }
108
- ]
109
- }
110
- ]
111
- }
112
- }
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Collect edited file paths for batch formatting at Stop.
4
-
5
- Lightweight PostToolUse hook that appends the edited file path
6
- to a session-scoped temp file. The auto-formatter Stop hook
7
- reads this file to know which files need formatting.
8
-
9
- Non-blocking: always exits 0. Runs in <10ms.
10
- """
11
-
12
- import json
13
- import os
14
- import sys
15
-
16
-
17
- def main():
18
- try:
19
- input_data = json.load(sys.stdin)
20
- except (json.JSONDecodeError, ValueError):
21
- sys.exit(0)
22
-
23
- session_id = input_data.get("session_id", "")
24
- tool_input = input_data.get("tool_input", {})
25
- file_path = tool_input.get("file_path", "")
26
-
27
- if not file_path or not session_id:
28
- sys.exit(0)
29
-
30
- if not os.path.isfile(file_path):
31
- sys.exit(0)
32
-
33
- # Write to both formatter and linter temp files (independent pipelines)
34
- for prefix in ("claude-edited-files", "claude-lint-files"):
35
- tmp_path = f"/tmp/{prefix}-{session_id}"
36
- try:
37
- with open(tmp_path, "a") as f:
38
- f.write(file_path + "\n")
39
- except OSError:
40
- pass # non-critical, don't block Claude
41
-
42
- sys.exit(0)
43
-
44
-
45
- if __name__ == "__main__":
46
- main()
@@ -1,146 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Data file syntax validator.
4
-
5
- Validates JSON, JSONC, YAML, and TOML files after editing.
6
- Uses Python stdlib only (plus PyYAML if available).
7
-
8
- Reads tool input from stdin, validates syntax, reports errors.
9
- Non-blocking: always exits 0.
10
- """
11
-
12
- import json
13
- import os
14
- import re
15
- import sys
16
- from pathlib import Path
17
-
18
- EXTENSIONS = {".json", ".jsonc", ".yaml", ".yml", ".toml"}
19
-
20
-
21
- def strip_jsonc_comments(text: str) -> str:
22
- """Remove // and /* */ comments from JSONC text.
23
-
24
- Handles URLs (https://...) by only stripping // comments that are
25
- preceded by whitespace or appear at line start, not those inside strings.
26
- """
27
- # Remove multi-line comments first
28
- text = re.sub(r"/\*.*?\*/", "", text, flags=re.DOTALL)
29
- # Remove single-line comments: // preceded by start-of-line or whitespace
30
- # This avoids stripping :// in URLs
31
- text = re.sub(r"(^|[\s,\[\{])//.*$", r"\1", text, flags=re.MULTILINE)
32
- return text
33
-
34
-
35
- def validate_json(file_path: str, is_jsonc: bool) -> str:
36
- """Validate JSON/JSONC syntax.
37
-
38
- Returns:
39
- Error message string, or empty string if valid.
40
- """
41
- with open(file_path, "r", encoding="utf-8") as f:
42
- content = f.read()
43
-
44
- if is_jsonc:
45
- content = strip_jsonc_comments(content)
46
-
47
- try:
48
- json.loads(content)
49
- return ""
50
- except json.JSONDecodeError as e:
51
- return f"[Syntax] JSON error at line {e.lineno}, col {e.colno}: {e.msg}"
52
-
53
-
54
- def validate_yaml(file_path: str) -> str:
55
- """Validate YAML syntax.
56
-
57
- Returns:
58
- Error message string, or empty string if valid.
59
- """
60
- try:
61
- import yaml
62
- except ImportError:
63
- return "" # PyYAML not available, skip
64
-
65
- try:
66
- with open(file_path, "r", encoding="utf-8") as f:
67
- yaml.safe_load(f)
68
- return ""
69
- except yaml.YAMLError as e:
70
- if hasattr(e, "problem_mark"):
71
- mark = e.problem_mark
72
- return f"[Syntax] YAML error at line {mark.line + 1}, col {mark.column + 1}: {e.problem}"
73
- return f"[Syntax] YAML error: {e}"
74
-
75
-
76
- def validate_toml(file_path: str) -> str:
77
- """Validate TOML syntax.
78
-
79
- Returns:
80
- Error message string, or empty string if valid.
81
- """
82
- try:
83
- import tomllib
84
- except ImportError:
85
- return "" # Python < 3.11, skip
86
-
87
- try:
88
- with open(file_path, "rb") as f:
89
- tomllib.load(f)
90
- return ""
91
- except tomllib.TOMLDecodeError as e:
92
- return f"[Syntax] TOML error: {e}"
93
-
94
-
95
- def validate(file_path: str) -> str:
96
- """Validate file syntax based on extension.
97
-
98
- Returns:
99
- Error message string, or empty string if valid.
100
- """
101
- ext = Path(file_path).suffix.lower()
102
-
103
- if ext == ".jsonc":
104
- return validate_json(file_path, is_jsonc=True)
105
- elif ext == ".json":
106
- return validate_json(file_path, is_jsonc=False)
107
- elif ext in {".yaml", ".yml"}:
108
- return validate_yaml(file_path)
109
- elif ext == ".toml":
110
- return validate_toml(file_path)
111
-
112
- return ""
113
-
114
-
115
- def main():
116
- try:
117
- input_data = json.load(sys.stdin)
118
- tool_input = input_data.get("tool_input", {})
119
- file_path = tool_input.get("file_path", "")
120
-
121
- if not file_path:
122
- sys.exit(0)
123
-
124
- ext = Path(file_path).suffix.lower()
125
- if ext not in EXTENSIONS:
126
- sys.exit(0)
127
-
128
- if not os.path.isfile(file_path):
129
- sys.exit(0)
130
-
131
- message = validate(file_path)
132
-
133
- if message:
134
- print(json.dumps({"additionalContext": message}))
135
-
136
- sys.exit(0)
137
-
138
- except json.JSONDecodeError:
139
- sys.exit(0)
140
- except Exception as e:
141
- print(f"Hook error: {e}", file=sys.stderr)
142
- sys.exit(0)
143
-
144
-
145
- if __name__ == "__main__":
146
- main()