sdd-flow 1.0.0 → 1.2.5

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,116 +1,116 @@
1
- # RULES.md — Mandatory Process Rules
2
-
3
- This file defines process rules that apply to every project regardless of stack.
4
- Stack-specific rules belong in `PROJECT.md` under the **Stack Rules** section.
5
-
6
- ---
7
-
8
- ## Implementation Rules
9
-
10
- ### R01 — No implementation without a spec
11
- No meaningful code change may be made without:
12
- - An existing `SPEC.md`
13
- - An existing `TASK.md`
14
-
15
- ---
16
-
17
- ### R02 — One task at a time
18
- Always implement exactly ONE isolated task.
19
- Never implement multiple tasks in the same step.
20
-
21
- ---
22
-
23
- ### R03 — Update PROGRESS.md on every task completion
24
- When any task is completed:
25
- - Update the task status (Pending → Done)
26
- - Record relevant observations in the History section
27
-
28
- ---
29
-
30
- ### R04 — Mark completed tasks in TASK.md
31
- When any task is completed:
32
- - Replace `[ ]` with `[x]` in the corresponding TASK.md
33
- - TASK.md must always reflect the real state of PROGRESS.md
34
-
35
- ---
36
-
37
- ### R05 — Record relevant decisions
38
- Architectural changes must be recorded in:
39
- - `agents/DECISIONS.md` — global decisions
40
- - `agents/specs/.../DECISIONS.md` — feature-local decisions
41
-
42
- ---
43
-
44
- ## Git Rules
45
-
46
- ### R06 — Never run git commands automatically
47
- Agents must NEVER:
48
- - Create commits
49
- - Create tags or releases
50
- - Push to any remote
51
- - Create or switch branches
52
-
53
- The agent only prepares code changes. The developer runs git manually.
54
-
55
- **Reason:** Human control over history and releases is mandatory.
56
-
57
- ---
58
-
59
- ## Code Quality Rules
60
-
61
- ### R07 — Prefer simple and predictable code
62
- Avoid unnecessary abstractions. Optimize for readability and maintainability.
63
-
64
- ---
65
-
66
- ### R08 — No new external dependencies without justification
67
- Do not add libraries or packages without:
68
- - A clear justification
69
- - A record in `DECISIONS.md`
70
-
71
- ---
72
-
73
- ### R09 — No auto-generated comments or JSDoc
74
- Do not add explanatory comments or documentation blocks unless:
75
- - Explicitly requested in the prompt, or
76
- - Strictly necessary to fix an error or maintain consistency
77
-
78
- **Reason:** Avoid code noise and documentation drift.
79
-
80
- ---
81
-
82
- ## Roadmap Rules
83
-
84
- ### R10 — Every feature must have a spec
85
- Every feature on the roadmap must have a corresponding spec folder in `agents/specs/`.
86
-
87
- ---
88
-
89
- ## Scope Rules
90
-
91
- ### R11 — Do not refactor outside the task scope
92
- Do not touch code unrelated to the current task, even if it looks improvable.
93
- Remove imports, variables, or functions that **your changes** made unused.
94
- Do not remove pre-existing dead code unless explicitly requested.
95
-
96
- ---
97
-
98
- ### R12 — Do not anticipate future tasks
99
- Only implement what the current task requires.
100
- Do not build ahead for tasks not yet started.
101
-
102
- ---
103
-
104
- ### R13 — Follow core coding principles
105
- Every generated code must follow:
106
- - **KISS** — simplest solution that solves the problem. No over-engineering.
107
- - **DRY** — never duplicate logic. Extract to shared helpers or services.
108
- - **Clean Code** — descriptive names, small functions, single responsibility.
109
- - **SOLID** — each module owns one concern. Entry points delegate, never contain logic.
110
-
111
- ---
112
-
113
- ### R14 — Surface ambiguities before choosing
114
- If a requirement has multiple valid interpretations, list them explicitly
115
- before choosing one. Never pick silently. If the ambiguity blocks progress,
116
- stop and ask before generating any code.
1
+ # RULES.md — Mandatory Process Rules
2
+
3
+ This file defines process rules that apply to every project regardless of stack.
4
+ Stack-specific rules belong in `PROJECT.md` under the **Stack Rules** section.
5
+
6
+ ---
7
+
8
+ ## Implementation Rules
9
+
10
+ ### R01 — No implementation without a spec
11
+ No meaningful code change may be made without:
12
+ - An existing `SPEC.md`
13
+ - An existing `TASK.md`
14
+
15
+ ---
16
+
17
+ ### R02 — One task at a time
18
+ Always implement exactly ONE isolated task.
19
+ Never implement multiple tasks in the same step.
20
+
21
+ ---
22
+
23
+ ### R03 — Update PROGRESS.md on every task completion
24
+ When any task is completed:
25
+ - Update the task status (Pending → Done)
26
+ - Record relevant observations in the History section
27
+
28
+ ---
29
+
30
+ ### R04 — Mark completed tasks in TASK.md
31
+ When any task is completed:
32
+ - Replace `[ ]` with `[x]` in the corresponding TASK.md
33
+ - TASK.md must always reflect the real state of PROGRESS.md
34
+
35
+ ---
36
+
37
+ ### R05 — Record relevant decisions
38
+ Architectural changes must be recorded in:
39
+ - `agents/DECISIONS.md` — global decisions
40
+ - `agents/specs/.../DECISIONS.md` — feature-local decisions
41
+
42
+ ---
43
+
44
+ ## Git Rules
45
+
46
+ ### R06 — Never run git commands automatically
47
+ Agents must NEVER:
48
+ - Create commits
49
+ - Create tags or releases
50
+ - Push to any remote
51
+ - Create or switch branches
52
+
53
+ The agent only prepares code changes. The developer runs git manually.
54
+
55
+ **Reason:** Human control over history and releases is mandatory.
56
+
57
+ ---
58
+
59
+ ## Code Quality Rules
60
+
61
+ ### R07 — Prefer simple and predictable code
62
+ Avoid unnecessary abstractions. Optimize for readability and maintainability.
63
+
64
+ ---
65
+
66
+ ### R08 — No new external dependencies without justification
67
+ Do not add libraries or packages without:
68
+ - A clear justification
69
+ - A record in `DECISIONS.md`
70
+
71
+ ---
72
+
73
+ ### R09 — No auto-generated comments or JSDoc
74
+ Do not add explanatory comments or documentation blocks unless:
75
+ - Explicitly requested in the prompt, or
76
+ - Strictly necessary to fix an error or maintain consistency
77
+
78
+ **Reason:** Avoid code noise and documentation drift.
79
+
80
+ ---
81
+
82
+ ## Roadmap Rules
83
+
84
+ ### R10 — Every feature must have a spec
85
+ Every feature on the roadmap must have a corresponding spec folder in `agents/specs/`.
86
+
87
+ ---
88
+
89
+ ## Scope Rules
90
+
91
+ ### R11 — Do not refactor outside the task scope
92
+ Do not touch code unrelated to the current task, even if it looks improvable.
93
+ Remove imports, variables, or functions that **your changes** made unused.
94
+ Do not remove pre-existing dead code unless explicitly requested.
95
+
96
+ ---
97
+
98
+ ### R12 — Do not anticipate future tasks
99
+ Only implement what the current task requires.
100
+ Do not build ahead for tasks not yet started.
101
+
102
+ ---
103
+
104
+ ### R13 — Follow core coding principles
105
+ Every generated code must follow:
106
+ - **KISS** — simplest solution that solves the problem. No over-engineering.
107
+ - **DRY** — never duplicate logic. Extract to shared helpers or services.
108
+ - **Clean Code** — descriptive names, small functions, single responsibility.
109
+ - **SOLID** — each module owns one concern. Entry points delegate, never contain logic.
110
+
111
+ ---
112
+
113
+ ### R14 — Surface ambiguities before choosing
114
+ If a requirement has multiple valid interpretations, list them explicitly
115
+ before choosing one. Never pick silently. If the ambiguity blocks progress,
116
+ stop and ask before generating any code.
@@ -1,22 +1,22 @@
1
- #!/bin/bash
2
- # guard-delete.sh
3
- # Asks for confirmation before running destructive delete commands (rm -rf, rm -r, rm -f).
4
- # Exit 0 = allow | Exit 2 = block (Claude Code convention)
5
-
6
- INPUT=$(cat)
7
-
8
- COMMAND=$(echo "$INPUT" | grep -o '"command":"[^"]*"' | head -1 | sed 's/"command":"//;s/"//')
9
-
10
- # Intercept rm with recursive or force flags
11
- if echo "$COMMAND" | grep -qE "rm\s+(-[a-zA-Z]*[rf][a-zA-Z]*|--recursive|--force)"; then
12
- echo "⚠️ Agent wants to run: $COMMAND" >&2
13
- read -r -p "Allow destructive delete? [y/N] " response < /dev/tty
14
- if [[ "$response" =~ ^[Yy]$ ]]; then
15
- exit 0
16
- else
17
- echo "Blocked by guard-delete.sh" >&2
18
- exit 2
19
- fi
20
- fi
21
-
1
+ #!/bin/bash
2
+ # guard-delete.sh
3
+ # Asks for confirmation before running destructive delete commands (rm -rf, rm -r, rm -f).
4
+ # Exit 0 = allow | Exit 2 = block (Claude Code convention)
5
+
6
+ INPUT=$(cat)
7
+
8
+ COMMAND=$(echo "$INPUT" | grep -o '"command":"[^"]*"' | head -1 | sed 's/"command":"//;s/"//')
9
+
10
+ # Intercept rm with recursive or force flags
11
+ if echo "$COMMAND" | grep -qE "rm\s+(-[a-zA-Z]*[rf][a-zA-Z]*|--recursive|--force)"; then
12
+ echo "⚠️ Agent wants to run: $COMMAND" >&2
13
+ read -r -p "Allow destructive delete? [y/N] " response < /dev/tty
14
+ if [[ "$response" =~ ^[Yy]$ ]]; then
15
+ exit 0
16
+ else
17
+ echo "Blocked by guard-delete.sh" >&2
18
+ exit 2
19
+ fi
20
+ fi
21
+
22
22
  exit 0
@@ -1,25 +1,25 @@
1
- #!/bin/bash
2
- # guard-deps.sh
3
- # Asks for confirmation before installing new packages.
4
- # Reinforces R08: no new dependency without justification in DECISIONS.md.
5
- # Exit 0 = allow | Exit 2 = block (Claude Code convention)
6
-
7
- INPUT=$(cat)
8
-
9
- COMMAND=$(echo "$INPUT" | grep -o '"command":"[^"]*"' | head -1 | sed 's/"command":"//;s/"//')
10
-
11
- # Intercept install commands that add NEW packages (not bare installs like "npm install" with no args)
12
- if echo "$COMMAND" | grep -qE "^(npm install|npm i|yarn add|pnpm add|bun add) .+" || \
13
- echo "$COMMAND" | grep -qE "^(pip install|pip3 install|uv add) .+"; then
14
- echo "⚠️ Agent wants to install a new dependency: $COMMAND" >&2
15
- echo " Remember: R08 requires justification in DECISIONS.md before adding packages." >&2
16
- read -r -p "Allow? [y/N] " response < /dev/tty
17
- if [[ "$response" =~ ^[Yy]$ ]]; then
18
- exit 0
19
- else
20
- echo "Blocked by guard-deps.sh" >&2
21
- exit 2
22
- fi
23
- fi
24
-
1
+ #!/bin/bash
2
+ # guard-deps.sh
3
+ # Asks for confirmation before installing new packages.
4
+ # Reinforces R08: no new dependency without justification in DECISIONS.md.
5
+ # Exit 0 = allow | Exit 2 = block (Claude Code convention)
6
+
7
+ INPUT=$(cat)
8
+
9
+ COMMAND=$(echo "$INPUT" | grep -o '"command":"[^"]*"' | head -1 | sed 's/"command":"//;s/"//')
10
+
11
+ # Intercept install commands that add NEW packages (not bare installs like "npm install" with no args)
12
+ if echo "$COMMAND" | grep -qE "^(npm install|npm i|yarn add|pnpm add|bun add) .+" || \
13
+ echo "$COMMAND" | grep -qE "^(pip install|pip3 install|uv add) .+"; then
14
+ echo "⚠️ Agent wants to install a new dependency: $COMMAND" >&2
15
+ echo " Remember: R08 requires justification in DECISIONS.md before adding packages." >&2
16
+ read -r -p "Allow? [y/N] " response < /dev/tty
17
+ if [[ "$response" =~ ^[Yy]$ ]]; then
18
+ exit 0
19
+ else
20
+ echo "Blocked by guard-deps.sh" >&2
21
+ exit 2
22
+ fi
23
+ fi
24
+
25
25
  exit 0
@@ -1,24 +1,24 @@
1
- #!/bin/bash
2
- # guard-git.sh
3
- # Asks for confirmation before running git commit.
4
- # git push, tag and branch -d are blocked via permissions.deny in settings.json.
5
- # Exit 0 = allow | Exit 2 = block (Claude Code convention)
6
-
7
- INPUT=$(cat)
8
-
9
- # Extract the bash command from the JSON input sent by Claude Code
10
- COMMAND=$(echo "$INPUT" | grep -o '"command":"[^"]*"' | head -1 | sed 's/"command":"//;s/"//')
11
-
12
- # Intercept only git commit
13
- if echo "$COMMAND" | grep -qE "^git commit"; then
14
- echo "⚠️ Agent wants to run: $COMMAND" >&2
15
- read -r -p "Allow git commit? [y/N] " response < /dev/tty
16
- if [[ "$response" =~ ^[Yy]$ ]]; then
17
- exit 0
18
- else
19
- echo "Blocked by guard-git.sh" >&2
20
- exit 2
21
- fi
22
- fi
23
-
1
+ #!/bin/bash
2
+ # guard-git.sh
3
+ # Asks for confirmation before running git commit.
4
+ # git push, tag and branch -d are blocked via permissions.deny in settings.json.
5
+ # Exit 0 = allow | Exit 2 = block (Claude Code convention)
6
+
7
+ INPUT=$(cat)
8
+
9
+ # Extract the bash command from the JSON input sent by Claude Code
10
+ COMMAND=$(echo "$INPUT" | grep -o '"command":"[^"]*"' | head -1 | sed 's/"command":"//;s/"//')
11
+
12
+ # Intercept only git commit
13
+ if echo "$COMMAND" | grep -qE "^git commit"; then
14
+ echo "⚠️ Agent wants to run: $COMMAND" >&2
15
+ read -r -p "Allow git commit? [y/N] " response < /dev/tty
16
+ if [[ "$response" =~ ^[Yy]$ ]]; then
17
+ exit 0
18
+ else
19
+ echo "Blocked by guard-git.sh" >&2
20
+ exit 2
21
+ fi
22
+ fi
23
+
24
24
  exit 0
@@ -1,3 +1,3 @@
1
- Read and follow `agents/prompts/rpi-implement.md`.
2
-
3
- Spec: $ARGUMENTS
1
+ Read and follow `agents/prompts/rpi-implement.md`.
2
+
3
+ Spec: $ARGUMENTS
@@ -1,3 +1,3 @@
1
- Read and follow `agents/prompts/rpi-plan.md`.
2
-
3
- Spec: $ARGUMENTS
1
+ Read and follow `agents/prompts/rpi-plan.md`.
2
+
3
+ Spec: $ARGUMENTS
@@ -1,3 +1,3 @@
1
- Read and follow `agents/prompts/rpi-research.md`.
2
-
3
- Spec: $ARGUMENTS
1
+ Read and follow `agents/prompts/rpi-research.md`.
2
+
3
+ Spec: $ARGUMENTS
@@ -1,3 +1,3 @@
1
- Read and follow `agents/prompts/rpi-validate.md`.
2
-
3
- Spec: $ARGUMENTS
1
+ Read and follow `agents/prompts/rpi-validate.md`.
2
+
3
+ Spec: $ARGUMENTS
@@ -1,3 +1,3 @@
1
- Read and follow `agents/prompts/rpi-implement.md`.
2
-
3
- Spec: $ARGUMENTS
1
+ Read and follow `agents/prompts/rpi-implement.md`.
2
+
3
+ Spec: $ARGUMENTS
@@ -1,3 +1,3 @@
1
- Read and follow `agents/prompts/rpi-plan.md`.
2
-
3
- Spec: $ARGUMENTS
1
+ Read and follow `agents/prompts/rpi-plan.md`.
2
+
3
+ Spec: $ARGUMENTS
@@ -1,3 +1,3 @@
1
- Read and follow `agents/prompts/rpi-research.md`.
2
-
3
- Spec: $ARGUMENTS
1
+ Read and follow `agents/prompts/rpi-research.md`.
2
+
3
+ Spec: $ARGUMENTS
@@ -1,3 +1,3 @@
1
- Read and follow `agents/prompts/rpi-validate.md`.
2
-
3
- Spec: $ARGUMENTS
1
+ Read and follow `agents/prompts/rpi-validate.md`.
2
+
3
+ Spec: $ARGUMENTS
@@ -1,46 +1,46 @@
1
- # Prompt: Implement (RPI — Phase 3)
2
-
3
- Use this prompt to implement a single task from an existing spec.
4
-
5
- ---
6
-
7
- ## Agent instruction
8
-
9
- You will implement **one single task** from an already planned feature.
10
-
11
- **Before starting, read:**
12
- - `agents/AGENTS.md`
13
- - `agents/PROJECT.md`
14
- - `agents/RULES.md`
15
- - `agents/specs/NNN-name/SPEC.md`
16
- - `agents/specs/NNN-name/TASK.md` — identify the first unchecked `[ ]`
17
- - `agents/specs/NNN-name/PROGRESS.md`
18
- - Run `grep -A 8 "## When to use" agents/skills/*/SKILL.md` — load the full `SKILL.md` only for skills relevant to this task
19
-
20
- **Expected input:**
21
- - Spec number (e.g. `001`)
22
- - Task to implement (e.g. `T03`) — if not provided, use the first unchecked `[ ]`
23
-
24
- ---
25
-
26
- ## Expected behavior
27
-
28
- 1. Declare which task will be implemented before generating any code
29
- 2. Implement only what is necessary for that single task
30
- 3. State exactly **which file** was created or modified
31
- 4. After completing:
32
- - Confirm the `verify:` condition on the completed task is met before marking it done
33
- - Mark `[x]` on the task in TASK.md
34
- - Update PROGRESS.md with what was done and any observations
35
- - Record relevant architectural decisions in DECISIONS.md
36
- 5. **Stop and wait for confirmation** before moving to the next task
37
-
38
- ---
39
-
40
- ## Constraints
41
-
42
- - Do not anticipate future tasks
43
- - Do not refactor code outside the current task's scope
44
- - Do not add dependencies without recording them in DECISIONS.md
45
- - Do not run git commands
46
- - If there is ambiguity about scope or approach, **ask before generating code**
1
+ # Prompt: Implement (RPI — Phase 3)
2
+
3
+ Use this prompt to implement a single task from an existing spec.
4
+
5
+ ---
6
+
7
+ ## Agent instruction
8
+
9
+ You will implement **one single task** from an already planned feature.
10
+
11
+ **Before starting, read:**
12
+ - `agents/AGENTS.md`
13
+ - `agents/PROJECT.md`
14
+ - `agents/RULES.md`
15
+ - `agents/specs/NNN-name/SPEC.md`
16
+ - `agents/specs/NNN-name/TASK.md` — identify the first unchecked `[ ]`
17
+ - `agents/specs/NNN-name/PROGRESS.md`
18
+ - Run `grep -A 8 "## When to use" agents/skills/*/SKILL.md` — load the full `SKILL.md` only for skills relevant to this task
19
+
20
+ **Expected input:**
21
+ - Spec number (e.g. `001`)
22
+ - Task to implement (e.g. `T03`) — if not provided, use the first unchecked `[ ]`
23
+
24
+ ---
25
+
26
+ ## Expected behavior
27
+
28
+ 1. Declare which task will be implemented before generating any code
29
+ 2. Implement only what is necessary for that single task
30
+ 3. State exactly **which file** was created or modified
31
+ 4. After completing:
32
+ - Confirm the `verify:` condition on the completed task is met before marking it done
33
+ - Mark `[x]` on the task in TASK.md
34
+ - Update PROGRESS.md with what was done and any observations
35
+ - Record relevant architectural decisions in DECISIONS.md
36
+ 5. **Stop and wait for confirmation** before moving to the next task
37
+
38
+ ---
39
+
40
+ ## Constraints
41
+
42
+ - Do not anticipate future tasks
43
+ - Do not refactor code outside the current task's scope
44
+ - Do not add dependencies without recording them in DECISIONS.md
45
+ - Do not run git commands
46
+ - If there is ambiguity about scope or approach, **ask before generating code**