@qball-inc/the-bulwark 1.0.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 (175) hide show
  1. package/.claude-plugin/plugin.json +43 -0
  2. package/agents/bulwark-fix-validator.md +633 -0
  3. package/agents/bulwark-implementer.md +391 -0
  4. package/agents/bulwark-issue-analyzer.md +308 -0
  5. package/agents/bulwark-standards-reviewer.md +221 -0
  6. package/agents/plan-creation-architect.md +323 -0
  7. package/agents/plan-creation-eng-lead.md +352 -0
  8. package/agents/plan-creation-po.md +300 -0
  9. package/agents/plan-creation-qa-critic.md +334 -0
  10. package/agents/product-ideation-competitive-analyzer.md +298 -0
  11. package/agents/product-ideation-idea-validator.md +268 -0
  12. package/agents/product-ideation-market-researcher.md +292 -0
  13. package/agents/product-ideation-pattern-documenter.md +308 -0
  14. package/agents/product-ideation-segment-analyzer.md +303 -0
  15. package/agents/product-ideation-strategist.md +259 -0
  16. package/agents/statusline-setup.md +97 -0
  17. package/hooks/hooks.json +59 -0
  18. package/package.json +45 -0
  19. package/scripts/hooks/cleanup-stale.sh +13 -0
  20. package/scripts/hooks/enforce-quality.sh +166 -0
  21. package/scripts/hooks/implementer-quality.sh +256 -0
  22. package/scripts/hooks/inject-protocol.sh +52 -0
  23. package/scripts/hooks/suggest-pipeline.sh +175 -0
  24. package/scripts/hooks/track-pipeline-start.sh +37 -0
  25. package/scripts/hooks/track-pipeline-stop.sh +52 -0
  26. package/scripts/init-rules.sh +35 -0
  27. package/scripts/init.sh +151 -0
  28. package/skills/anthropic-validator/SKILL.md +607 -0
  29. package/skills/anthropic-validator/references/agents-checklist.md +131 -0
  30. package/skills/anthropic-validator/references/commands-checklist.md +102 -0
  31. package/skills/anthropic-validator/references/hooks-checklist.md +151 -0
  32. package/skills/anthropic-validator/references/mcp-checklist.md +136 -0
  33. package/skills/anthropic-validator/references/plugins-checklist.md +148 -0
  34. package/skills/anthropic-validator/references/skills-checklist.md +85 -0
  35. package/skills/assertion-patterns/SKILL.md +296 -0
  36. package/skills/bug-magnet-data/SKILL.md +284 -0
  37. package/skills/bug-magnet-data/context/cli-args.md +91 -0
  38. package/skills/bug-magnet-data/context/db-query.md +104 -0
  39. package/skills/bug-magnet-data/context/file-contents.md +103 -0
  40. package/skills/bug-magnet-data/context/http-body.md +91 -0
  41. package/skills/bug-magnet-data/context/process-spawn.md +123 -0
  42. package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -0
  43. package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -0
  44. package/skills/bug-magnet-data/data/collections/objects.yaml +123 -0
  45. package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -0
  46. package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -0
  47. package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -0
  48. package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -0
  49. package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -0
  50. package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -0
  51. package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -0
  52. package/skills/bug-magnet-data/data/formats/email.yaml +154 -0
  53. package/skills/bug-magnet-data/data/formats/json.yaml +187 -0
  54. package/skills/bug-magnet-data/data/formats/url.yaml +165 -0
  55. package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -0
  56. package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -0
  57. package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -0
  58. package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -0
  59. package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -0
  60. package/skills/bug-magnet-data/data/numbers/special.yaml +69 -0
  61. package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -0
  62. package/skills/bug-magnet-data/data/strings/injection.yaml +208 -0
  63. package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -0
  64. package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -0
  65. package/skills/bug-magnet-data/references/external-lists.md +115 -0
  66. package/skills/bulwark-brainstorm/SKILL.md +563 -0
  67. package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +60 -0
  68. package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -0
  69. package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -0
  70. package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -0
  71. package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -0
  72. package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -0
  73. package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -0
  74. package/skills/bulwark-research/SKILL.md +298 -0
  75. package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -0
  76. package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -0
  77. package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -0
  78. package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -0
  79. package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -0
  80. package/skills/bulwark-scaffold/SKILL.md +330 -0
  81. package/skills/bulwark-statusline/SKILL.md +161 -0
  82. package/skills/bulwark-statusline/scripts/statusline.sh +144 -0
  83. package/skills/bulwark-verify/SKILL.md +519 -0
  84. package/skills/code-review/SKILL.md +428 -0
  85. package/skills/code-review/examples/anti-patterns/linting.ts +181 -0
  86. package/skills/code-review/examples/anti-patterns/security.ts +91 -0
  87. package/skills/code-review/examples/anti-patterns/standards.ts +195 -0
  88. package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -0
  89. package/skills/code-review/examples/recommended/linting.ts +195 -0
  90. package/skills/code-review/examples/recommended/security.ts +154 -0
  91. package/skills/code-review/examples/recommended/standards.ts +231 -0
  92. package/skills/code-review/examples/recommended/type-safety.ts +181 -0
  93. package/skills/code-review/frameworks/angular.md +218 -0
  94. package/skills/code-review/frameworks/django.md +235 -0
  95. package/skills/code-review/frameworks/express.md +207 -0
  96. package/skills/code-review/frameworks/flask.md +298 -0
  97. package/skills/code-review/frameworks/generic.md +146 -0
  98. package/skills/code-review/frameworks/react.md +152 -0
  99. package/skills/code-review/frameworks/vue.md +244 -0
  100. package/skills/code-review/references/linting-patterns.md +221 -0
  101. package/skills/code-review/references/security-patterns.md +125 -0
  102. package/skills/code-review/references/standards-patterns.md +246 -0
  103. package/skills/code-review/references/type-safety-patterns.md +130 -0
  104. package/skills/component-patterns/SKILL.md +131 -0
  105. package/skills/component-patterns/references/pattern-cli-command.md +118 -0
  106. package/skills/component-patterns/references/pattern-database.md +166 -0
  107. package/skills/component-patterns/references/pattern-external-api.md +139 -0
  108. package/skills/component-patterns/references/pattern-file-parser.md +168 -0
  109. package/skills/component-patterns/references/pattern-http-server.md +162 -0
  110. package/skills/component-patterns/references/pattern-process-spawner.md +133 -0
  111. package/skills/continuous-feedback/SKILL.md +327 -0
  112. package/skills/continuous-feedback/references/collect-instructions.md +81 -0
  113. package/skills/continuous-feedback/references/specialize-code-review.md +82 -0
  114. package/skills/continuous-feedback/references/specialize-general.md +98 -0
  115. package/skills/continuous-feedback/references/specialize-test-audit.md +81 -0
  116. package/skills/create-skill/SKILL.md +359 -0
  117. package/skills/create-skill/references/agent-conventions.md +194 -0
  118. package/skills/create-skill/references/agent-template.md +195 -0
  119. package/skills/create-skill/references/content-guidance.md +291 -0
  120. package/skills/create-skill/references/decision-framework.md +124 -0
  121. package/skills/create-skill/references/template-pipeline.md +217 -0
  122. package/skills/create-skill/references/template-reference-heavy.md +111 -0
  123. package/skills/create-skill/references/template-research.md +210 -0
  124. package/skills/create-skill/references/template-script-driven.md +172 -0
  125. package/skills/create-skill/references/template-simple.md +80 -0
  126. package/skills/create-subagent/SKILL.md +353 -0
  127. package/skills/create-subagent/references/agent-conventions.md +268 -0
  128. package/skills/create-subagent/references/content-guidance.md +232 -0
  129. package/skills/create-subagent/references/decision-framework.md +134 -0
  130. package/skills/create-subagent/references/template-single-agent.md +192 -0
  131. package/skills/fix-bug/SKILL.md +241 -0
  132. package/skills/governance-protocol/SKILL.md +116 -0
  133. package/skills/init/SKILL.md +341 -0
  134. package/skills/issue-debugging/SKILL.md +385 -0
  135. package/skills/issue-debugging/references/anti-patterns.md +245 -0
  136. package/skills/issue-debugging/references/debug-report-schema.md +227 -0
  137. package/skills/mock-detection/SKILL.md +511 -0
  138. package/skills/mock-detection/references/false-positive-prevention.md +402 -0
  139. package/skills/mock-detection/references/stub-patterns.md +236 -0
  140. package/skills/pipeline-templates/SKILL.md +215 -0
  141. package/skills/pipeline-templates/references/code-change-workflow.md +277 -0
  142. package/skills/pipeline-templates/references/code-review.md +336 -0
  143. package/skills/pipeline-templates/references/fix-validation.md +421 -0
  144. package/skills/pipeline-templates/references/new-feature.md +335 -0
  145. package/skills/pipeline-templates/references/research-brainstorm.md +161 -0
  146. package/skills/pipeline-templates/references/research-planning.md +257 -0
  147. package/skills/pipeline-templates/references/test-audit.md +389 -0
  148. package/skills/pipeline-templates/references/test-execution-fix.md +238 -0
  149. package/skills/plan-creation/SKILL.md +497 -0
  150. package/skills/product-ideation/SKILL.md +372 -0
  151. package/skills/product-ideation/references/analysis-frameworks.md +161 -0
  152. package/skills/session-handoff/SKILL.md +139 -0
  153. package/skills/session-handoff/references/examples.md +223 -0
  154. package/skills/setup-lsp/SKILL.md +312 -0
  155. package/skills/setup-lsp/references/server-registry.md +85 -0
  156. package/skills/setup-lsp/references/troubleshooting.md +135 -0
  157. package/skills/subagent-output-templating/SKILL.md +415 -0
  158. package/skills/subagent-output-templating/references/examples.md +440 -0
  159. package/skills/subagent-prompting/SKILL.md +364 -0
  160. package/skills/subagent-prompting/references/examples.md +342 -0
  161. package/skills/test-audit/SKILL.md +531 -0
  162. package/skills/test-audit/references/known-limitations.md +41 -0
  163. package/skills/test-audit/references/priority-classification.md +30 -0
  164. package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -0
  165. package/skills/test-audit/references/prompts/synthesis.md +57 -0
  166. package/skills/test-audit/references/rewrite-instructions.md +46 -0
  167. package/skills/test-audit/references/schemas/audit-output.yaml +100 -0
  168. package/skills/test-audit/references/schemas/diagnostic-output.yaml +49 -0
  169. package/skills/test-audit/scripts/data-flow-analyzer.ts +509 -0
  170. package/skills/test-audit/scripts/integration-mock-detector.ts +462 -0
  171. package/skills/test-audit/scripts/package.json +20 -0
  172. package/skills/test-audit/scripts/skip-detector.ts +211 -0
  173. package/skills/test-audit/scripts/verification-counter.ts +295 -0
  174. package/skills/test-classification/SKILL.md +310 -0
  175. package/skills/test-fixture-creation/SKILL.md +295 -0
@@ -0,0 +1,131 @@
1
+ # Agents Validation Checklist (Fallback)
2
+
3
+ This checklist is used when dynamic documentation fetch fails. May be outdated - prefer fetched standards.
4
+
5
+ **Last Updated**: 2026-01-17
6
+
7
+ ---
8
+
9
+ ## Agent Definition Format
10
+
11
+ Custom sub-agents are markdown files with YAML frontmatter:
12
+
13
+ ```markdown
14
+ ---
15
+ name: agent-name
16
+ description: What this agent does
17
+ model: sonnet
18
+ tools:
19
+ - Read
20
+ - Glob
21
+ - Grep
22
+ skills:
23
+ - skill-name
24
+ ---
25
+
26
+ # Agent Name
27
+
28
+ Instructions for the agent...
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Frontmatter Requirements
34
+
35
+ ### Required Fields
36
+
37
+ | Field | Type | Description |
38
+ |-------|------|-------------|
39
+ | `name` | string | Agent name, should match filename |
40
+ | `description` | string | What the agent does |
41
+
42
+ ### Optional Fields
43
+
44
+ | Field | Type | Description |
45
+ |-------|------|-------------|
46
+ | `model` | string | `haiku`, `sonnet`, or `opus` |
47
+ | `tools` | array | Allowed tools for this agent |
48
+ | `skills` | array | Skills to load |
49
+
50
+ ---
51
+
52
+ ## File Locations
53
+
54
+ ### Lookup Priority (highest to lowest)
55
+
56
+ 1. CLI flag: `--agent agent-name`
57
+ 2. Project: `.claude/agents/{name}.md`
58
+ 3. User: `~/.claude/agents/{name}.md`
59
+ 4. Plugin: `agents/{name}.md` (at plugin root)
60
+ 5. Built-in agents
61
+
62
+ ### Invocation
63
+
64
+ ```
65
+ Task tool with subagent_type: "agent-name"
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Critical Rules
71
+
72
+ - [ ] File is markdown with `.md` extension
73
+ - [ ] Frontmatter is valid YAML between `---` markers
74
+ - [ ] `name` field is present
75
+ - [ ] `description` field is present
76
+ - [ ] File is in valid location (see lookup priority)
77
+
78
+ ## High Priority
79
+
80
+ - [ ] `model` is one of: `haiku`, `sonnet`, `opus`
81
+ - [ ] `tools` contains only valid tool names
82
+ - [ ] `skills` contains only existing skill names
83
+ - [ ] Name matches filename (without `.md`)
84
+
85
+ ## Medium Priority
86
+
87
+ - [ ] Clear instructions in body
88
+ - [ ] Appropriate model for task complexity
89
+ - [ ] Tools are minimal (principle of least privilege)
90
+
91
+ ## Low Priority
92
+
93
+ - [ ] Consistent formatting
94
+ - [ ] Example usage documented
95
+ - [ ] Related agents/skills referenced
96
+
97
+ ---
98
+
99
+ ## Valid Tools
100
+
101
+ Common tools that can be listed in `tools` array:
102
+
103
+ - `Read` - Read files
104
+ - `Write` - Write files
105
+ - `Edit` - Edit files
106
+ - `Glob` - Find files by pattern
107
+ - `Grep` - Search file contents
108
+ - `Bash` - Execute commands
109
+ - `Task` - Spawn sub-agents (note: sub-agents cannot spawn sub-agents)
110
+ - `WebFetch` - Fetch web content
111
+ - `WebSearch` - Search the web
112
+
113
+ ---
114
+
115
+ ## Common Violations
116
+
117
+ | Violation | Severity | Remediation |
118
+ |-----------|----------|-------------|
119
+ | Missing frontmatter | Critical | Add `---` markers with YAML |
120
+ | Missing `name` | Critical | Add `name: agent-name` |
121
+ | Missing `description` | Critical | Add `description: ...` |
122
+ | Invalid `model` | High | Use `haiku`, `sonnet`, or `opus` |
123
+ | Invalid tool in `tools` | High | Use valid tool names |
124
+ | Wrong file location | High | Move to valid location |
125
+ | Name/filename mismatch | Medium | Align name with filename |
126
+
127
+ ---
128
+
129
+ ## Sub-Agent Constraints
130
+
131
+ **Important**: Sub-agents cannot spawn other sub-agents. If your workflow requires sequential agent invocation, use "Main Context Orchestration" pattern where the main Claude context orchestrates agents sequentially.
@@ -0,0 +1,102 @@
1
+ # Commands Validation Checklist (Fallback)
2
+
3
+ This checklist is used when dynamic documentation fetch fails. May be outdated - prefer fetched standards.
4
+
5
+ **Last Updated**: 2026-01-17
6
+
7
+ ---
8
+
9
+ ## Commands and Skills Merge
10
+
11
+ As of Claude Code v2.1.3 (January 2026), **commands and skills are merged**. Skills can be invoked as commands:
12
+
13
+ ```bash
14
+ /skill-name arg1 arg2
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Invocation Patterns
20
+
21
+ ### Basic Invocation
22
+
23
+ ```bash
24
+ /my-skill # No arguments
25
+ /my-skill path/to/file # Single argument
26
+ /my-skill arg1 arg2 arg3 # Multiple arguments
27
+ ```
28
+
29
+ ### Argument Access
30
+
31
+ | Variable | Description |
32
+ |----------|-------------|
33
+ | `$ARGUMENTS` | All arguments as single string |
34
+ | `$1`, `$2`, etc. | Positional arguments |
35
+ | `${ENV_VAR}` | Environment variable |
36
+
37
+ ---
38
+
39
+ ## Visibility Control
40
+
41
+ ### user-invocable Field
42
+
43
+ | Value | Effect |
44
+ |-------|--------|
45
+ | `true` | Skill appears in `/` menu |
46
+ | `false` | Skill hidden from `/` menu |
47
+ | (omitted) | Defaults to `true` |
48
+
49
+ ### When to Hide
50
+
51
+ Set `user-invocable: false` for:
52
+ - Internal/helper skills
53
+ - Skills only meant for other skills to load
54
+ - Pipeline-stage skills
55
+
56
+ ---
57
+
58
+ ## Critical Rules
59
+
60
+ - [ ] Skill exists at `skills/{name}/SKILL.md`
61
+ - [ ] Frontmatter is valid YAML
62
+ - [ ] Name is valid (alphanumeric, hyphens)
63
+
64
+ ## High Priority
65
+
66
+ - [ ] `user-invocable` is boolean if present
67
+ - [ ] Arguments handled correctly in skill body
68
+ - [ ] Clear usage documentation in skill
69
+
70
+ ## Medium Priority
71
+
72
+ - [ ] Default behavior when no arguments provided
73
+ - [ ] Error handling for invalid arguments
74
+ - [ ] Examples show argument usage
75
+
76
+ ## Low Priority
77
+
78
+ - [ ] Consistent argument naming
79
+ - [ ] Help text for complex arguments
80
+
81
+ ---
82
+
83
+ ## Common Violations
84
+
85
+ | Violation | Severity | Remediation |
86
+ |-----------|----------|-------------|
87
+ | Invalid skill name | High | Use alphanumeric and hyphens only |
88
+ | Missing SKILL.md | Critical | Create skill file |
89
+ | Invalid frontmatter | Critical | Fix YAML syntax |
90
+ | Undocumented arguments | Medium | Add usage examples |
91
+
92
+ ---
93
+
94
+ ## Migration from Legacy Commands
95
+
96
+ If migrating from separate `commands/` directory:
97
+
98
+ 1. Create skill at `skills/{command-name}/SKILL.md`
99
+ 2. Move command logic to skill body
100
+ 3. Set `user-invocable: true`
101
+ 4. Update any references to use `/skill-name` pattern
102
+ 5. Remove old command file
@@ -0,0 +1,151 @@
1
+ # Hooks Validation Checklist (Fallback)
2
+
3
+ This checklist is used when dynamic documentation fetch fails. May be outdated - prefer fetched standards.
4
+
5
+ **Last Updated**: 2026-01-17
6
+
7
+ ---
8
+
9
+ ## Hook Types
10
+
11
+ | Type | Trigger | Use Case |
12
+ |------|---------|----------|
13
+ | `PreToolUse` | Before tool execution | Validation, blocking |
14
+ | `PostToolUse` | After tool execution | Logging, side effects |
15
+ | `SubagentStart` | When subagent spawns | Tracking, setup |
16
+ | `SubagentStop` | When subagent completes | Finalization, cleanup |
17
+ | `Notification` | System notifications | Alerts, logging |
18
+
19
+ ---
20
+
21
+ ## Configuration Format
22
+
23
+ ### settings.json Structure (Project Hooks)
24
+
25
+ **Events WITH matcher support** (PreToolUse, PostToolUse, PermissionRequest):
26
+ ```json
27
+ {
28
+ "hooks": {
29
+ "PostToolUse": [
30
+ {
31
+ "matcher": "Edit|Write",
32
+ "hooks": [
33
+ { "type": "command", "command": "script.sh", "timeout": 5000 }
34
+ ]
35
+ }
36
+ ]
37
+ }
38
+ }
39
+ ```
40
+
41
+ **Events WITHOUT matcher support** (SubagentStart, SubagentStop, Stop, UserPromptSubmit):
42
+ ```json
43
+ {
44
+ "hooks": {
45
+ "SubagentStart": [
46
+ {
47
+ "hooks": [
48
+ { "type": "command", "command": "script.sh", "timeout": 5000 }
49
+ ]
50
+ }
51
+ ]
52
+ }
53
+ }
54
+ ```
55
+
56
+ **Note**: The `hooks` array wrapper is REQUIRED for all event types, even without a matcher.
57
+
58
+ ### Field Requirements
59
+
60
+ | Field | Required | Type | Description |
61
+ |-------|----------|------|-------------|
62
+ | `matcher` | **Only for PreToolUse/PostToolUse** | string | Regex pattern for matching |
63
+ | `hooks` | Yes | array | Array of hook definitions |
64
+ | `type` | Yes | string | `command` or `prompt` |
65
+ | `command` | Yes (if type=command) | string | Shell command to execute |
66
+ | `timeout` | No | number | Timeout in milliseconds |
67
+ | `once` | No | boolean | Run only once per session |
68
+
69
+ ### Matcher Support by Event Type
70
+
71
+ | Event | Supports Matcher? |
72
+ |-------|-------------------|
73
+ | PreToolUse | Yes |
74
+ | PostToolUse | Yes |
75
+ | PermissionRequest | Yes |
76
+ | SubagentStart | **No** |
77
+ | SubagentStop | **No** |
78
+ | Stop | **No** |
79
+ | UserPromptSubmit | **No** |
80
+
81
+ ---
82
+
83
+ ## Environment Variables
84
+
85
+ ### PreToolUse / PostToolUse
86
+
87
+ | Variable | Description |
88
+ |----------|-------------|
89
+ | `$CLAUDE_TOOL_NAME` | Name of the tool |
90
+ | `$CLAUDE_TOOL_INPUT` | JSON input to tool |
91
+ | `$CLAUDE_TOOL_OUTPUT` | JSON output (PostToolUse only) |
92
+
93
+ ### SubagentStart / SubagentStop
94
+
95
+ | Variable | Description |
96
+ |----------|-------------|
97
+ | `$CLAUDE_SUBAGENT_TYPE` | Type/name of subagent |
98
+ | `$CLAUDE_SUBAGENT_PROMPT` | Prompt given to subagent (Start only) |
99
+
100
+ ### Plugin Hooks
101
+
102
+ | Variable | Description |
103
+ |----------|-------------|
104
+ | `$CLAUDE_PLUGIN_ROOT` | Plugin root directory |
105
+ | `$CLAUDE_PROJECT_DIR` | Project directory |
106
+
107
+ ---
108
+
109
+ ## Critical Rules
110
+
111
+ - [ ] Event type is valid (PreToolUse, PostToolUse, SubagentStart, etc.)
112
+ - [ ] `hooks` array wrapper is present (required for ALL event types)
113
+ - [ ] Each hook has `type` field (`command` or `prompt`)
114
+ - [ ] Each hook has `command` field (if type=command)
115
+ - [ ] JSON syntax is valid
116
+ - [ ] For PreToolUse/PostToolUse: `matcher` is valid regex pattern
117
+ - [ ] For SubagentStart/SubagentStop: NO `matcher` field (not supported)
118
+
119
+ ## High Priority
120
+
121
+ - [ ] `once: true` used appropriately (SessionStart scenarios)
122
+ - [ ] `timeout` specified (recommended 5000ms for scripts)
123
+ - [ ] Script paths are correct (use `$CLAUDE_PROJECT_DIR` or `$CLAUDE_PLUGIN_ROOT`)
124
+ - [ ] Exit codes used correctly (0=success, 1=warning, 2=block)
125
+
126
+ ## Medium Priority
127
+
128
+ - [ ] Matcher patterns are specific (not overly broad)
129
+ - [ ] Commands are efficient (avoid long-running)
130
+ - [ ] Error handling in scripts
131
+
132
+ ## Low Priority
133
+
134
+ - [ ] Comments/documentation for complex hooks
135
+ - [ ] Consistent naming conventions
136
+
137
+ ---
138
+
139
+ ## Common Violations
140
+
141
+ | Violation | Severity | Remediation |
142
+ |-----------|----------|-------------|
143
+ | Invalid event type | Critical | Use valid event from list |
144
+ | Invalid JSON | Critical | Fix JSON syntax |
145
+ | Missing `hooks` array wrapper | Critical | Wrap hook definitions in `"hooks": [...]` |
146
+ | Missing `type` in hook | Critical | Add `"type": "command"` |
147
+ | Missing `command` in hook | Critical | Add `"command": "script.sh"` |
148
+ | `matcher` on non-matcher event | High | Remove `matcher` from SubagentStart/SubagentStop/Stop |
149
+ | Script not found | High | Check path, use env variables |
150
+ | No `once: true` for SessionStart | Medium | Add if hook should run once |
151
+ | No `timeout` specified | Low | Add `"timeout": 5000` for predictable behavior |
@@ -0,0 +1,136 @@
1
+ # MCP Validation Checklist (Fallback)
2
+
3
+ This checklist is used when dynamic documentation fetch fails. May be outdated - prefer fetched standards.
4
+
5
+ **Last Updated**: 2026-01-17
6
+
7
+ ---
8
+
9
+ ## MCP Overview
10
+
11
+ Model Context Protocol (MCP) servers extend Claude Code with custom tools via a standardized protocol.
12
+
13
+ ---
14
+
15
+ ## Configuration
16
+
17
+ ### Location
18
+
19
+ MCP servers are configured in `.claude/mcp.json` or via settings.
20
+
21
+ ### Configuration Format
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "server-name": {
27
+ "command": "node",
28
+ "args": ["path/to/server.js"],
29
+ "env": {
30
+ "API_KEY": "${API_KEY}"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Transport Types
40
+
41
+ | Type | Description | Use Case |
42
+ |------|-------------|----------|
43
+ | `stdio` | Standard input/output | Local servers, scripts |
44
+ | `http` | HTTP requests | Remote servers |
45
+ | `sse` | Server-Sent Events | Streaming responses |
46
+
47
+ ---
48
+
49
+ ## Tool Definition
50
+
51
+ MCP servers expose tools with this schema:
52
+
53
+ ```json
54
+ {
55
+ "name": "tool-name",
56
+ "description": "What the tool does",
57
+ "inputSchema": {
58
+ "type": "object",
59
+ "properties": {
60
+ "param1": {
61
+ "type": "string",
62
+ "description": "Parameter description"
63
+ }
64
+ },
65
+ "required": ["param1"]
66
+ }
67
+ }
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Critical Rules
73
+
74
+ - [ ] Configuration JSON is valid
75
+ - [ ] Server command/path exists
76
+ - [ ] Required environment variables available
77
+ - [ ] Tools have valid schemas
78
+
79
+ ## High Priority
80
+
81
+ - [ ] No secrets hardcoded (use `${ENV_VAR}`)
82
+ - [ ] Tool names are unique
83
+ - [ ] Descriptions are clear
84
+ - [ ] Input schemas are valid JSON Schema
85
+
86
+ ## Medium Priority
87
+
88
+ - [ ] Server handles errors gracefully
89
+ - [ ] Timeout configuration appropriate
90
+ - [ ] Resource cleanup on shutdown
91
+
92
+ ## Low Priority
93
+
94
+ - [ ] Consistent naming conventions
95
+ - [ ] Documentation for custom tools
96
+ - [ ] Example usage provided
97
+
98
+ ---
99
+
100
+ ## Security Considerations
101
+
102
+ ### Critical
103
+
104
+ - [ ] No API keys or secrets in config files
105
+ - [ ] Use environment variable interpolation: `${API_KEY}`
106
+ - [ ] Validate all inputs in server code
107
+ - [ ] Limit file system access
108
+
109
+ ### High
110
+
111
+ - [ ] Network requests only to trusted hosts
112
+ - [ ] No command injection vulnerabilities
113
+ - [ ] Proper permission scoping
114
+
115
+ ---
116
+
117
+ ## Common Violations
118
+
119
+ | Violation | Severity | Remediation |
120
+ |-----------|----------|-------------|
121
+ | Invalid JSON | Critical | Fix JSON syntax |
122
+ | Hardcoded secrets | Critical | Use `${ENV_VAR}` |
123
+ | Missing server file | Critical | Check path |
124
+ | Invalid tool schema | High | Fix JSON Schema |
125
+ | Missing descriptions | Medium | Add tool descriptions |
126
+ | Missing env vars | High | Set required variables |
127
+
128
+ ---
129
+
130
+ ## Testing MCP Servers
131
+
132
+ 1. Verify server starts without errors
133
+ 2. Test each tool with valid inputs
134
+ 3. Test error handling with invalid inputs
135
+ 4. Verify no secrets in logs
136
+ 5. Check resource cleanup
@@ -0,0 +1,148 @@
1
+ # Plugins Validation Checklist (Fallback)
2
+
3
+ This checklist is used when dynamic documentation fetch fails. May be outdated - prefer fetched standards.
4
+
5
+ **Last Updated**: 2026-01-17
6
+
7
+ ---
8
+
9
+ ## Plugin Structure
10
+
11
+ Plugins package skills, agents, and hooks for distribution.
12
+
13
+ ### Required Structure
14
+
15
+ ```
16
+ plugin-name/
17
+ ├── .claude-plugin/
18
+ │ └── plugin.json # Manifest (ONLY file in .claude-plugin/)
19
+ ├── agents/ # At root, NOT in .claude-plugin/
20
+ │ └── *.md
21
+ ├── skills/ # At root, NOT in .claude-plugin/
22
+ │ └── skill-name/
23
+ │ └── SKILL.md
24
+ └── hooks/ # At root, NOT in .claude-plugin/
25
+ └── hooks.json
26
+ ```
27
+
28
+ ### Critical Rule
29
+
30
+ All component directories (`agents/`, `skills/`, `hooks/`) MUST be at plugin root, NOT inside `.claude-plugin/`.
31
+
32
+ ---
33
+
34
+ ## Plugin Manifest
35
+
36
+ ### Location
37
+
38
+ `.claude-plugin/plugin.json`
39
+
40
+ ### Format
41
+
42
+ ```json
43
+ {
44
+ "name": "plugin-name",
45
+ "version": "1.0.0",
46
+ "description": "What this plugin provides",
47
+ "skills": [
48
+ "skill-one",
49
+ "skill-two"
50
+ ],
51
+ "agents": [
52
+ "agent-one"
53
+ ]
54
+ }
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Critical Rules
60
+
61
+ - [ ] `.claude-plugin/plugin.json` exists
62
+ - [ ] Manifest JSON is valid
63
+ - [ ] `name` field present and valid
64
+ - [ ] Component directories at root (not in .claude-plugin/)
65
+
66
+ ## High Priority
67
+
68
+ - [ ] `version` follows semver
69
+ - [ ] `description` explains plugin purpose
70
+ - [ ] All skills listed in manifest exist in `skills/`
71
+ - [ ] All agents listed in manifest exist in `agents/`
72
+ - [ ] Skills follow flat directory structure (one level)
73
+
74
+ ## Medium Priority
75
+
76
+ - [ ] README.md documents usage
77
+ - [ ] License file present
78
+ - [ ] No unused skills/agents
79
+ - [ ] Consistent naming
80
+
81
+ ## Low Priority
82
+
83
+ - [ ] Example configurations
84
+ - [ ] Changelog maintained
85
+ - [ ] Contributing guidelines
86
+
87
+ ---
88
+
89
+ ## Skills Directory Structure
90
+
91
+ ### Flat Structure (Required)
92
+
93
+ ```
94
+ skills/
95
+ ├── skill-one/
96
+ │ └── SKILL.md
97
+ ├── skill-two/
98
+ │ ├── SKILL.md
99
+ │ └── references/
100
+ └── skill-three/
101
+ └── SKILL.md
102
+ ```
103
+
104
+ ### Invalid Structure
105
+
106
+ ```
107
+ skills/
108
+ ├── atomic/ # NO nested categories
109
+ │ └── skill-one/
110
+ └── composite/ # NO nested categories
111
+ └── skill-two/
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Common Violations
117
+
118
+ | Violation | Severity | Remediation |
119
+ |-----------|----------|-------------|
120
+ | Missing plugin.json | Critical | Create `.claude-plugin/plugin.json` |
121
+ | Invalid JSON | Critical | Fix JSON syntax |
122
+ | Components in .claude-plugin/ | Critical | Move to root level |
123
+ | Nested skills structure | High | Flatten to single level |
124
+ | Missing manifest entry | High | Add to skills/agents array |
125
+ | Unlisted component | Medium | Add to manifest or remove |
126
+
127
+ ---
128
+
129
+ ## Installation
130
+
131
+ Plugins can be installed via:
132
+
133
+ 1. Local path: `claude plugins add /path/to/plugin`
134
+ 2. Git repository: `claude plugins add https://github.com/org/plugin`
135
+ 3. npm package: `claude plugins add @org/plugin`
136
+
137
+ ---
138
+
139
+ ## Environment Variables
140
+
141
+ Plugins have access to:
142
+
143
+ | Variable | Description |
144
+ |----------|-------------|
145
+ | `$CLAUDE_PLUGIN_ROOT` | Absolute path to plugin directory |
146
+ | `$CLAUDE_PROJECT_DIR` | Absolute path to project directory |
147
+
148
+ Use these in hooks and scripts for portable paths.