@abdullah-alnahas/claude-sdd 0.2.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.
- package/.claude-plugin/plugin.json +3 -3
- package/agents/critic.md +25 -6
- package/agents/security-reviewer.md +26 -7
- package/agents/simplifier.md +25 -5
- package/agents/spec-compliance.md +25 -6
- package/commands/sdd-adopt.md +7 -0
- package/commands/sdd-autopilot.md +9 -0
- package/commands/sdd-execute.md +9 -0
- package/commands/sdd-guardrails.md +5 -0
- package/commands/sdd-phase.md +5 -0
- package/commands/sdd-review.md +9 -0
- package/commands/sdd-yolo.md +4 -0
- package/hooks/hooks.json +1 -1
- package/hooks/scripts/post-edit-review.sh +8 -4
- package/package.json +1 -1
- package/skills/architecture-aware/SKILL.md +5 -4
- package/skills/guardrails/SKILL.md +5 -5
- package/skills/iterative-execution/SKILL.md +4 -3
- package/skills/spec-first/SKILL.md +5 -5
- package/skills/tdd-discipline/SKILL.md +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "sdd",
|
|
3
|
-
"version": "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/agents/critic.md
CHANGED
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: critic
|
|
3
|
+
model: sonnet
|
|
4
|
+
color: red
|
|
3
5
|
description: >
|
|
4
6
|
Adversarial code reviewer that finds logical errors, invalid assumptions, spec drift, and requirement gaps.
|
|
5
7
|
Use when you need an honest, direct assessment of code quality and correctness.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
12
31
|
---
|
|
13
32
|
|
|
14
33
|
# Critic Agent
|
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: security-reviewer
|
|
3
|
+
model: sonnet
|
|
4
|
+
color: yellow
|
|
3
5
|
description: >
|
|
4
6
|
Security analysis agent that reviews code for OWASP Top 10 vulnerabilities, input validation gaps,
|
|
5
|
-
auth/authz issues, and injection risks.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
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
|
|
12
31
|
---
|
|
13
32
|
|
|
14
33
|
# Security Reviewer Agent
|
package/agents/simplifier.md
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: simplifier
|
|
3
|
+
model: sonnet
|
|
4
|
+
color: cyan
|
|
3
5
|
description: >
|
|
4
6
|
Complexity reducer that proposes simpler alternatives, identifies unnecessary abstractions,
|
|
5
7
|
and flags overengineering. Use when reviewing code for simplicity or after implementation.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
11
31
|
---
|
|
12
32
|
|
|
13
33
|
# Simplifier Agent
|
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-compliance
|
|
3
|
+
model: sonnet
|
|
4
|
+
color: green
|
|
3
5
|
description: >
|
|
4
6
|
Spec adherence checker that compares implementation against spec documents, flags deviations,
|
|
5
7
|
and verifies traceability from behavior spec to tests to code.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
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
|
|
12
31
|
---
|
|
13
32
|
|
|
14
33
|
# Spec-Compliance Agent
|
package/commands/sdd-adopt.md
CHANGED
|
@@ -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
|
package/commands/sdd-execute.md
CHANGED
|
@@ -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
|
package/commands/sdd-phase.md
CHANGED
package/commands/sdd-review.md
CHANGED
|
@@ -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
|
package/commands/sdd-yolo.md
CHANGED
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
|
|
19
|
-
|
|
20
|
-
FILE_PATH=$(echo "$INPUT" |
|
|
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.
|
|
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",
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Architecture Awareness
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
or
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|