@abdullah-alnahas/claude-sdd 0.3.0 → 0.4.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 +1 -1
- package/agents/critic.md +1 -1
- package/agents/security-reviewer.md +1 -1
- package/agents/simplifier.md +1 -1
- package/commands/sdd-guardrails.md +17 -1
- package/commands/sdd-phase.md +10 -2
- package/hooks/hooks.json +2 -2
- package/hooks/scripts/post-edit-review.sh +1 -1
- package/hooks/scripts/session-init.sh +2 -2
- package/package.json +1 -1
- package/skills/guardrails/SKILL.md +2 -2
- package/skills/iterative-execution/SKILL.md +4 -5
- package/skills/tdd-discipline/SKILL.md +1 -1
package/agents/critic.md
CHANGED
|
@@ -32,7 +32,7 @@ allowed-tools:
|
|
|
32
32
|
|
|
33
33
|
# Critic Agent
|
|
34
34
|
|
|
35
|
-
You are an adversarial reviewer. Your job is to find what's wrong, not confirm what's right.
|
|
35
|
+
You are an adversarial reviewer. Your job is to find what's wrong, not confirm what's right. Report findings only — do not modify code directly.
|
|
36
36
|
|
|
37
37
|
## Review Process
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ You review code through a security lens. Focus on high-impact issues, not theore
|
|
|
41
41
|
3. **Check auth/authz**: Are protected resources properly gated?
|
|
42
42
|
4. **Check injection surfaces**: SQL, command, XSS, path traversal, template injection
|
|
43
43
|
5. **Check secrets**: Hardcoded credentials, API keys, tokens in code or config
|
|
44
|
-
6. **Check dependencies**: Known vulnerable versions (
|
|
44
|
+
6. **Check dependencies**: Known vulnerable versions — run available audit tools (`npm audit`, `pip-audit`, `cargo audit`) when dependency files are present
|
|
45
45
|
|
|
46
46
|
## Priority Order
|
|
47
47
|
|
package/agents/simplifier.md
CHANGED
|
@@ -32,7 +32,7 @@ allowed-tools:
|
|
|
32
32
|
|
|
33
33
|
# Simplifier Agent
|
|
34
34
|
|
|
35
|
-
You ask one question: "Could this be done with less?" Your job is to
|
|
35
|
+
You ask one question: "Could this be done with less?" Your job is to identify complexity and propose simpler alternatives. Report findings only — do not modify code directly.
|
|
36
36
|
|
|
37
37
|
## Review Process
|
|
38
38
|
|
|
@@ -26,12 +26,28 @@ Show the current state of all SDD guardrails and optionally toggle them.
|
|
|
26
26
|
| `scope-guard` | PostToolUse (Write/Edit) | Detect unrelated file modifications |
|
|
27
27
|
| `completion-review` | Stop | Spec adherence, test coverage, complexity audit, dead code check |
|
|
28
28
|
|
|
29
|
+
## Persistence
|
|
30
|
+
|
|
31
|
+
Guardrail state is stored in `.sdd.yaml` under the `guardrails` key. Each guardrail has an `enabled` boolean:
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
guardrails:
|
|
35
|
+
pre-implementation:
|
|
36
|
+
enabled: true
|
|
37
|
+
scope-guard:
|
|
38
|
+
enabled: true
|
|
39
|
+
completion-review:
|
|
40
|
+
enabled: true
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
When toggling a guardrail, read `.sdd.yaml`, update the relevant `enabled` value, and write it back. If `.sdd.yaml` does not exist, create it with defaults (all enabled).
|
|
44
|
+
|
|
29
45
|
## Behavior
|
|
30
46
|
|
|
31
47
|
1. Check if `.sdd.yaml` exists in project root — if so, read guardrail config from it
|
|
32
48
|
2. Check if `GUARDRAILS_DISABLED=true` (set by `/sdd-yolo`) — if so, report all disabled
|
|
33
49
|
3. Display each guardrail with its enabled/disabled status
|
|
34
|
-
4. If an argument is provided, toggle the specified guardrail
|
|
50
|
+
4. If an argument is provided, toggle the specified guardrail in `.sdd.yaml`
|
|
35
51
|
|
|
36
52
|
## Output Format
|
|
37
53
|
|
package/commands/sdd-phase.md
CHANGED
|
@@ -27,10 +27,18 @@ Display or change the current SDD development phase. Phases provide context that
|
|
|
27
27
|
| **verify** | Verification | Running full verification suite, spec-compliance checks, security review |
|
|
28
28
|
| **review** | Review | Critic + simplifier agents, retrospective |
|
|
29
29
|
|
|
30
|
+
## Persistence
|
|
31
|
+
|
|
32
|
+
Phase state is stored in `.sdd-phase` in the project root. This file contains a single word (the phase name). If the file does not exist, phase is "none".
|
|
33
|
+
|
|
34
|
+
- **Set phase**: Write the phase name to `.sdd-phase`
|
|
35
|
+
- **Show phase**: Read `.sdd-phase` (or report "none" if missing)
|
|
36
|
+
- **Clear phase**: Delete `.sdd-phase`
|
|
37
|
+
|
|
30
38
|
## Behavior
|
|
31
39
|
|
|
32
|
-
1.
|
|
33
|
-
2. If a phase name is provided,
|
|
40
|
+
1. Read `.sdd-phase` to display the current phase (or "none" if not found)
|
|
41
|
+
2. If a phase name is provided, validate it against the known phases and write to `.sdd-phase`
|
|
34
42
|
3. Phase context is available to subsequent prompts and skills
|
|
35
43
|
4. Phase affects which skills are most relevant:
|
|
36
44
|
- `specify` → spec-first skill
|
package/hooks/hooks.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"hooks": [
|
|
19
19
|
{
|
|
20
20
|
"type": "prompt",
|
|
21
|
-
"prompt": "If this message is a trivial acknowledgment (e.g. 'yes', 'no', 'thanks', 'ok', 'continue'), skip
|
|
21
|
+
"prompt": "If this message is a trivial acknowledgment (e.g. 'yes', 'no', 'thanks', 'ok', 'continue'), skip and respond normally. Otherwise, apply the SDD pre-implementation checkpoint from the guardrails skill (enumerate assumptions, flag ambiguity, surface alternatives, push back on bad ideas, define scope, check for spec, plan TDD approach) before proceeding. If GUARDRAILS_DISABLED=true, skip."
|
|
22
22
|
}
|
|
23
23
|
]
|
|
24
24
|
}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"hooks": [
|
|
42
42
|
{
|
|
43
43
|
"type": "prompt",
|
|
44
|
-
"prompt": "Before finalizing, perform the SDD completion review
|
|
44
|
+
"prompt": "Before finalizing, perform the SDD completion review from the guardrails skill (spec adherence, test coverage, complexity audit, dead code check, scope creep check, conceptual error scan). Report findings concisely. If GUARDRAILS_DISABLED=true, skip."
|
|
45
45
|
}
|
|
46
46
|
]
|
|
47
47
|
}
|
|
@@ -30,7 +30,7 @@ fi
|
|
|
30
30
|
|
|
31
31
|
# Check if inside project directory
|
|
32
32
|
case "$FILE_PATH" in
|
|
33
|
-
"$PROJECT_DIR"
|
|
33
|
+
"$PROJECT_DIR/"*|"$PROJECT_DIR") ;; # Inside project, OK
|
|
34
34
|
/*)
|
|
35
35
|
echo "SDD SCOPE WARNING: Edit to file outside project directory: $FILE_PATH" >&2
|
|
36
36
|
exit 2
|
|
@@ -11,7 +11,7 @@ YOLO_FLAG="$PROJECT_DIR/.sdd-yolo"
|
|
|
11
11
|
|
|
12
12
|
# Check for yolo mode
|
|
13
13
|
if [ -f "$YOLO_FLAG" ]; then
|
|
14
|
-
echo "SDD: YOLO mode
|
|
14
|
+
echo "SDD: Previous YOLO mode detected — clearing flag, guardrails disabled for this session" >&2
|
|
15
15
|
# Remove yolo flag (auto-clears on session start)
|
|
16
16
|
rm -f "$YOLO_FLAG"
|
|
17
17
|
if [ -n "$ENV_FILE" ]; then
|
|
@@ -29,7 +29,7 @@ fi
|
|
|
29
29
|
|
|
30
30
|
# Check for config file
|
|
31
31
|
if [ -f "$CONFIG_FILE" ]; then
|
|
32
|
-
echo "SDD: Config
|
|
32
|
+
echo "SDD: Config file found at $CONFIG_FILE" >&2
|
|
33
33
|
if [ -n "$ENV_FILE" ]; then
|
|
34
34
|
echo "SDD_CONFIG_FOUND=true" >> "$ENV_FILE"
|
|
35
35
|
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abdullah-alnahas/claude-sdd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|
|
@@ -41,8 +41,8 @@ Before writing ANY implementation code, you MUST:
|
|
|
41
41
|
|
|
42
42
|
## During Implementation
|
|
43
43
|
|
|
44
|
-
- Follow TDD: write a failing test first, then the minimum code to pass it, then refactor
|
|
45
|
-
- Use iterative execution: implement → verify against spec → fix gaps → repeat
|
|
44
|
+
- Follow TDD: write a failing test first, then the minimum code to pass it, then refactor (see the tdd-discipline skill for detailed workflow)
|
|
45
|
+
- Use iterative execution: implement → verify against spec → fix gaps → repeat (see the iterative-execution skill for the full cycle)
|
|
46
46
|
- Do not refactor surrounding code unless asked
|
|
47
47
|
- Do not add error handling for impossible scenarios
|
|
48
48
|
- Do not add comments explaining obvious code
|
|
@@ -47,11 +47,10 @@ Good completion criteria are:
|
|
|
47
47
|
|
|
48
48
|
Use whatever is available, in order of preference:
|
|
49
49
|
1. **Automated tests** (test runners, linters, type checkers)
|
|
50
|
-
2. **
|
|
51
|
-
3. **
|
|
52
|
-
4. **External MCP servers
|
|
53
|
-
5. **
|
|
54
|
-
6. **Manual inspection** (read the code, trace the logic)
|
|
50
|
+
2. **Available review agents** (e.g., critic, spec-compliance, security-reviewer)
|
|
51
|
+
3. **Available analysis skills** (e.g., guardrails, architecture-aware)
|
|
52
|
+
4. **External tools** (MCP servers, other plugins the user has configured)
|
|
53
|
+
5. **Manual inspection** (read the code, trace the logic)
|
|
55
54
|
|
|
56
55
|
## Honesty Rules
|
|
57
56
|
|
|
@@ -47,7 +47,7 @@ Test: test_submit_form_saves_data()
|
|
|
47
47
|
Code: FormHandler.submit()
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
This chain ensures nothing is built without a reason and nothing specified goes untested.
|
|
50
|
+
This chain ensures nothing is built without a reason and nothing specified goes untested. If a test has no spec criterion, either add the criterion to the spec or question whether the test is needed. If a spec criterion has no test, that is a finding — even if the code works.
|
|
51
51
|
|
|
52
52
|
## References
|
|
53
53
|
|