@abdullah-alnahas/claude-sdd 0.1.0 → 0.3.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "sdd",
3
- "version": "0.1.0",
4
- "description": "Development discipline system — behavioral guardrails, spec-first development, architecture awareness, TDD enforcement, iterative execution loops"
2
+ "name": "claude-sdd",
3
+ "version": "0.3.0",
4
+ "description": "Spec-Driven Development discipline system — behavioral guardrails, spec-first development, architecture awareness, TDD enforcement, iterative execution loops"
5
5
  }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 abdullah-alnahas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -5,11 +5,15 @@ A Claude Code plugin that enforces disciplined software development: behavioral
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- # Local development
9
- claude --plugin-dir /path/to/sdd
8
+ # From npm (recommended)
9
+ claude plugins add @abdullah-alnahas/claude-sdd
10
10
 
11
- # Or symlink into Claude plugins directory
12
- ln -s /path/to/sdd ~/.claude/plugins/sdd
11
+ # From GitHub
12
+ git clone https://github.com/abdullah-alnahas/claude-sdd.git
13
+ claude plugins add ./claude-sdd
14
+
15
+ # For local development
16
+ claude plugins add /path/to/sdd
13
17
  ```
14
18
 
15
19
  ## What It Does
package/agents/critic.md CHANGED
@@ -1,13 +1,33 @@
1
1
  ---
2
+ name: critic
3
+ model: sonnet
4
+ color: red
2
5
  description: >
3
6
  Adversarial code reviewer that finds logical errors, invalid assumptions, spec drift, and requirement gaps.
4
7
  Use when you need an honest, direct assessment of code quality and correctness.
5
- capabilities:
6
- - Logical error detection
7
- - Assumption validation
8
- - Spec drift detection
9
- - Requirement coverage checking
10
- - Complexity assessment
8
+
9
+ <example>
10
+ Context: User has completed implementing a feature.
11
+ user: "Review this code for bugs and logical errors"
12
+ assistant: "I'll use the critic agent to do an adversarial review of your code."
13
+ </example>
14
+
15
+ <example>
16
+ Context: User wants a critical assessment before merging.
17
+ user: "Find what's wrong with this implementation"
18
+ assistant: "Let me use the critic agent to identify issues."
19
+ </example>
20
+
21
+ <example>
22
+ Context: User suspects something is off.
23
+ user: "Do a critical review of these changes"
24
+ assistant: "I'll launch the critic agent for a thorough adversarial review."
25
+ </example>
26
+ allowed-tools:
27
+ - Read
28
+ - Glob
29
+ - Grep
30
+ - Bash
11
31
  ---
12
32
 
13
33
  # Critic Agent
@@ -1,13 +1,33 @@
1
1
  ---
2
+ name: security-reviewer
3
+ model: sonnet
4
+ color: yellow
2
5
  description: >
3
6
  Security analysis agent that reviews code for OWASP Top 10 vulnerabilities, input validation gaps,
4
- auth/authz issues, and injection risks. Use when reviewing code for security concerns.
5
- capabilities:
6
- - OWASP Top 10 vulnerability detection
7
- - Input validation review
8
- - Authentication and authorization review
9
- - Injection detection (SQL, command, XSS)
10
- - Dependency risk awareness
7
+ auth/authz issues, and injection risks.
8
+
9
+ <example>
10
+ Context: User wants a security review.
11
+ user: "Review this for security vulnerabilities"
12
+ assistant: "I'll use the security-reviewer agent to check for vulnerabilities."
13
+ </example>
14
+
15
+ <example>
16
+ Context: User is concerned about injection risks.
17
+ user: "Check for injection risks in this code"
18
+ assistant: "Let me launch the security-reviewer agent to analyze injection surfaces."
19
+ </example>
20
+
21
+ <example>
22
+ Context: Pre-production security check.
23
+ user: "Is this code secure enough for production?"
24
+ assistant: "I'll use the security-reviewer agent to do a security analysis."
25
+ </example>
26
+ allowed-tools:
27
+ - Read
28
+ - Glob
29
+ - Grep
30
+ - Bash
11
31
  ---
12
32
 
13
33
  # Security Reviewer Agent
@@ -1,12 +1,33 @@
1
1
  ---
2
+ name: simplifier
3
+ model: sonnet
4
+ color: cyan
2
5
  description: >
3
6
  Complexity reducer that proposes simpler alternatives, identifies unnecessary abstractions,
4
7
  and flags overengineering. Use when reviewing code for simplicity or after implementation.
5
- capabilities:
6
- - Propose simpler alternatives
7
- - Identify unnecessary abstractions
8
- - Flag overengineering
9
- - Reduce code volume while preserving behavior
8
+
9
+ <example>
10
+ Context: User wants to reduce complexity.
11
+ user: "Simplify this code"
12
+ assistant: "I'll use the simplifier agent to find complexity reduction opportunities."
13
+ </example>
14
+
15
+ <example>
16
+ Context: User suspects overengineering.
17
+ user: "Is this overengineered?"
18
+ assistant: "Let me launch the simplifier agent to check for unnecessary abstractions."
19
+ </example>
20
+
21
+ <example>
22
+ Context: Post-implementation cleanup.
23
+ user: "Can this be done with less code?"
24
+ assistant: "I'll use the simplifier agent to propose simpler alternatives."
25
+ </example>
26
+ allowed-tools:
27
+ - Read
28
+ - Glob
29
+ - Grep
30
+ - Bash
10
31
  ---
11
32
 
12
33
  # Simplifier Agent
@@ -1,13 +1,33 @@
1
1
  ---
2
+ name: spec-compliance
3
+ model: sonnet
4
+ color: green
2
5
  description: >
3
6
  Spec adherence checker that compares implementation against spec documents, flags deviations,
4
7
  and verifies traceability from behavior spec to tests to code.
5
- Use when verifying that code matches its specification.
6
- capabilities:
7
- - Compare implementation against behavior specs
8
- - Flag spec deviations
9
- - Verify acceptance criteria coverage
10
- - Check traceability (spec → test → code)
8
+
9
+ <example>
10
+ Context: User wants to verify implementation matches spec.
11
+ user: "Check if this matches the spec"
12
+ assistant: "I'll use the spec-compliance agent to verify adherence to the behavior spec."
13
+ </example>
14
+
15
+ <example>
16
+ Context: User wants traceability verification.
17
+ user: "Verify spec compliance"
18
+ assistant: "Let me launch the spec-compliance agent to check traceability from spec to tests to code."
19
+ </example>
20
+
21
+ <example>
22
+ Context: User is finishing a feature.
23
+ user: "Are all acceptance criteria covered?"
24
+ assistant: "I'll use the spec-compliance agent to check criteria coverage."
25
+ </example>
26
+ allowed-tools:
27
+ - Read
28
+ - Glob
29
+ - Grep
30
+ - Bash
11
31
  ---
12
32
 
13
33
  # Spec-Compliance Agent
@@ -47,6 +67,13 @@ You methodically compare what was specified against what was built. Every accept
47
67
  [X of Y criteria satisfied. Z deviations found.]
48
68
  ```
49
69
 
70
+ ## No Spec Available
71
+
72
+ If no behavior spec exists for the code under review:
73
+ 1. Report clearly: "No behavior spec found for this code."
74
+ 2. Suggest creating one: "Run `/sdd-phase specify` or use the spec-first skill to create a behavior spec before verifying compliance."
75
+ 3. Do NOT attempt to invent criteria — without a spec, compliance checking is not meaningful.
76
+
50
77
  ## Principles
51
78
 
52
79
  - The spec is the source of truth, not the implementation
@@ -1,6 +1,13 @@
1
1
  ---
2
2
  name: sdd-adopt
3
3
  description: Adopt an existing project into the SDD discipline system
4
+ argument-hint: ""
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Glob
9
+ - Grep
10
+ - Bash
4
11
  ---
5
12
 
6
13
  # /sdd-adopt
@@ -1,6 +1,15 @@
1
1
  ---
2
2
  name: sdd-autopilot
3
3
  description: Autonomous end-to-end development — takes an app description and drives through all SDD phases (specify → design → implement → verify → review) with minimal user intervention
4
+ argument-hint: "<description or path-to-app-description.md>"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - Task
4
13
  ---
5
14
 
6
15
  # /sdd-autopilot
@@ -1,6 +1,15 @@
1
1
  ---
2
2
  name: sdd-execute
3
3
  description: Start an iterative execution loop — implement with TDD, verify against spec, fix gaps, repeat
4
+ argument-hint: "[--max-iterations <n>] [--criteria <description>]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - Task
4
13
  ---
5
14
 
6
15
  # /sdd-execute
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: sdd-guardrails
3
3
  description: Show guardrail status, toggle individual guardrails, and view configuration
4
+ argument-hint: "[enable|disable <name>]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
4
9
  ---
5
10
 
6
11
  # /sdd-guardrails
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: sdd-phase
3
3
  description: Show or set the current development phase
4
+ argument-hint: "[specify|design|implement|verify|review]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
4
9
  ---
5
10
 
6
11
  # /sdd-phase
@@ -1,6 +1,15 @@
1
1
  ---
2
2
  name: sdd-review
3
3
  description: On-demand self-review using critic and simplifier agents with iterative fix cycles
4
+ argument-hint: "[--max-iterations <n>]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - Task
4
13
  ---
5
14
 
6
15
  # /sdd-review
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: sdd-yolo
3
3
  description: Temporarily disable all SDD guardrails for this session
4
+ argument-hint: ""
5
+ allowed-tools:
6
+ - Write
7
+ - Bash
4
8
  ---
5
9
 
6
10
  # /sdd-yolo
package/hooks/hooks.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "hooks": [
19
19
  {
20
20
  "type": "prompt",
21
- "prompt": "BEFORE responding to this request, apply the SDD pre-implementation checkpoint:\n\n1. **Enumerate Assumptions**: List every assumption you're making about the user's intent, the codebase, and the approach. Flag any that are uncertain.\n\n2. **Flag Ambiguity**: If the request is unclear, underspecified, or could be interpreted multiple ways, ASK for clarification before proceeding. Do not guess.\n\n3. **Surface Alternatives**: Identify at least 2 alternative approaches. Briefly note trade-offs. If the user's suggested approach has significant downsides, say so.\n\n4. **Push Back on Bad Ideas**: If the request involves overengineering, premature abstraction, unnecessary complexity, or architectural anti-patterns, respectfully push back with a simpler alternative.\n\n5. **Define Scope**: State explicitly what you WILL and WILL NOT change. Any file not directly related to the request is out of scope.\n\n6. **Check for Spec**: If this is a non-trivial feature and no spec exists, suggest creating one first (spec-first principle).\n\n7. **Plan TDD Approach**: Identify what tests should be written first. Implementation follows tests, not the reverse.\n\nOnly after completing this checkpoint should you proceed with implementation. If GUARDRAILS_DISABLED=true is set, skip this checkpoint."
21
+ "prompt": "If this message is a trivial acknowledgment (e.g. 'yes', 'no', 'thanks', 'ok', 'continue'), skip the checkpoint and respond normally.\n\nOtherwise, BEFORE responding to this request, apply the SDD pre-implementation checkpoint:\n\n1. **Enumerate Assumptions**: List every assumption you're making about the user's intent, the codebase, and the approach. Flag any that are uncertain.\n\n2. **Flag Ambiguity**: If the request is unclear, underspecified, or could be interpreted multiple ways, ASK for clarification before proceeding. Do not guess.\n\n3. **Surface Alternatives**: Identify at least 2 alternative approaches. Briefly note trade-offs. If the user's suggested approach has significant downsides, say so.\n\n4. **Push Back on Bad Ideas**: If the request involves overengineering, premature abstraction, unnecessary complexity, or architectural anti-patterns, respectfully push back with a simpler alternative.\n\n5. **Define Scope**: State explicitly what you WILL and WILL NOT change. Any file not directly related to the request is out of scope.\n\n6. **Check for Spec**: If this is a non-trivial feature and no spec exists, suggest creating one first (spec-first principle).\n\n7. **Plan TDD Approach**: Identify what tests should be written first. Implementation follows tests, not the reverse.\n\nOnly after completing this checkpoint should you proceed with implementation. If GUARDRAILS_DISABLED=true is set, skip this checkpoint."
22
22
  }
23
23
  ]
24
24
  }
@@ -13,11 +13,15 @@ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
13
13
 
14
14
  # Read tool input from stdin (JSON with file_path)
15
15
  INPUT=$(cat)
16
- FILE_PATH=$(echo "$INPUT" | grep -oP '"file_path"\s*:\s*"([^"]*)"' | head -1 | sed 's/.*"\([^"]*\)"/\1/' 2>/dev/null || echo "")
17
16
 
18
- if [ -z "$FILE_PATH" ]; then
19
- # Try alternate JSON key names
20
- FILE_PATH=$(echo "$INPUT" | grep -oP '"filePath"\s*:\s*"([^"]*)"' | head -1 | sed 's/.*"\([^"]*\)"/\1/' 2>/dev/null || echo "")
17
+ # Use jq if available, fall back to sed
18
+ if command -v jq &>/dev/null; then
19
+ FILE_PATH=$(echo "$INPUT" | jq -r '.file_path // .filePath // empty' 2>/dev/null || echo "")
20
+ else
21
+ FILE_PATH=$(echo "$INPUT" | sed -n 's/.*"file_path"\s*:\s*"\([^"]*\)".*/\1/p' | head -1)
22
+ if [ -z "$FILE_PATH" ]; then
23
+ FILE_PATH=$(echo "$INPUT" | sed -n 's/.*"filePath"\s*:\s*"\([^"]*\)".*/\1/p' | head -1)
24
+ fi
21
25
  fi
22
26
 
23
27
  if [ -z "$FILE_PATH" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abdullah-alnahas/claude-sdd",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Spec-Driven Development discipline system for Claude Code — behavioral guardrails, spec-first development, architecture awareness, TDD enforcement, iterative execution loops",
5
5
  "keywords": [
6
6
  "claude-code-plugin",
@@ -14,7 +14,7 @@
14
14
  "license": "MIT",
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://github.com/abdullah-alnahas/claude-sdd.git"
17
+ "url": "git+https://github.com/abdullah-alnahas/claude-sdd.git"
18
18
  },
19
19
  "author": "abdullah-alnahas"
20
20
  }
@@ -1,14 +1,15 @@
1
1
  ---
2
2
  name: Architecture Awareness
3
3
  description: >
4
- Provides architecture consciousness during development integration patterns, anti-patterns, and ADR guidance.
5
- Use when designing systems, discussing architecture, integration, patterns, structure, or organization.
6
- version: 1.0.0
4
+ This skill provides architecture consciousness during development, including integration patterns,
5
+ anti-patterns, and ADR guidance. It should be used when the user asks how to structure or organize code,
6
+ discusses architecture or design patterns, plans integrations between components, or asks
7
+ "how should I structure this?", "what pattern should I use?", or "should I split this into services?"
7
8
  ---
8
9
 
9
10
  # Architecture Awareness
10
11
 
11
- You maintain architectural consciousness throughout development. Every code change exists within an architectural context — respect it.
12
+ Maintain architectural consciousness throughout development. Every code change exists within an architectural context — respect it.
12
13
 
13
14
  ## Core Principles
14
15
 
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: SDD Guardrails
3
3
  description: >
4
- Core behavioral guardrails that defend against 12 common LLM failure modes during software development.
5
- Use when implementing, building, fixing, refactoring, adding, changing, or modifying code.
6
- Activates automatically to enforce disciplined development practices.
7
- version: 1.0.0
4
+ This skill enforces core behavioral guardrails defending against 12 common LLM failure modes during
5
+ software development. It should be used when the user asks to implement, build, write, fix, refactor,
6
+ add, change, or modify code essentially any coding task. It enforces honesty over agreement, scope
7
+ discipline, simplicity, and verification before claiming completion.
8
8
  ---
9
9
 
10
10
  # SDD Behavioral Guardrails
11
11
 
12
- You are operating under the SDD (Spec-Driven Development) discipline system. These guardrails defend against known LLM failure patterns in software development.
12
+ Operate under the SDD (Spec-Driven Development) discipline system. These guardrails defend against known LLM failure patterns in software development.
13
13
 
14
14
  ## Core Principles
15
15
 
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: Iterative Execution
3
3
  description: >
4
- Disciplined implementverifyfix cycles for delivering against specs. Use when implementing features,
5
- executing specs, making things work, iterating until specs are satisfied, or running execution loops.
6
- version: 1.0.0
4
+ This skill provides disciplined implement-verify-fix cycles for delivering features against specifications.
5
+ It should be used when the user asks to implement a feature from a spec, when implementation needs iterating
6
+ to match requirements, or when the user says "make this work," "implement this spec," "keep going until all
7
+ tests pass," or "it's not matching the spec yet."
7
8
  ---
8
9
 
9
10
  # Iterative Execution
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: Spec-First Development
3
3
  description: >
4
- Interactive specification development that turns rough ideas into formal documents before code is written.
5
- Use when starting a new project, new feature, creating specs, plans, adopting an existing project,
6
- or when the user says "I want to build/create something."
7
- version: 1.0.0
4
+ This skill guides interactive specification development, turning rough ideas into formal documents before
5
+ any code is written. It should be used when the user is starting a new project or feature, wants to create
6
+ specs or plans, is adopting an existing project, or says things like "I want to build something," "let's
7
+ plan this out," "write a spec for this," or "let's design this first."
8
8
  ---
9
9
 
10
10
  # Spec-First Development
11
11
 
12
- You guide users from rough idea to formal specification through interactive questioning — not checklist dumping. Code comes AFTER specs, not before.
12
+ Guide users from rough idea to formal specification through interactive questioning — not checklist dumping. Code comes AFTER specs, not before.
13
13
 
14
14
  ## The Process
15
15
 
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: TDD Discipline
3
3
  description: >
4
- Test-driven development enforcement Red/Green/Refactor cycle, test co-location, traceability from behavior spec to test to code.
5
- Use when writing tests, discussing TDD, coverage, verification, or validation.
6
- version: 1.0.0
4
+ This skill enforces test-driven development discipline with the Red/Green/Refactor cycle and traceability
5
+ from behavior spec to test to code. It should be used when the user asks to write tests, add test coverage,
6
+ discuss testing strategy, or says "how should I test this?", "add tests for this," or "write tests first."
7
7
  ---
8
8
 
9
9
  # TDD Discipline