sdd-toolkit 1.6.0 → 1.9.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/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # sdd-toolkit (Universal Spec CLI)
2
2
 
3
+ ![npm version](https://img.shields.io/npm/v/sdd-toolkit)
4
+ ![License: MIT](https://img.shields.io/npm/l/sdd-toolkit)
5
+ ![Downloads](https://img.shields.io/npm/dm/sdd-toolkit)
6
+
3
7
  CLI tool to automatically set up the development environment and install AI agents (Auditor, Coder, etc.) for various modern AI tools.
4
8
 
5
9
  ## Overview
@@ -8,6 +12,22 @@ CLI tool to automatically set up the development environment and install AI agen
8
12
 
9
13
  The main idea is to stop creating prompts from scratch and install a proven, structured workflow.
10
14
 
15
+ ## 📑 Table of Contents
16
+
17
+ - [Overview](#overview)
18
+ - [Key Features](#-key-features)
19
+ - [The Squad](#-the-squad-agent-roles)
20
+ - [Installation and Usage](#installation-and-usage)
21
+ - [How it Works](#how-it-works)
22
+ - [Development Workflow](#development-workflow)
23
+ - [AI Tool Commands](#ai-tool-commands)
24
+ - [Generated Files Structure](#generated-files-structure)
25
+ - [Usage Examples](#usage-examples)
26
+ - [Troubleshooting](#troubleshooting)
27
+ - [FAQ](#-frequently-asked-questions)
28
+ - [Project Structure](#project-structure)
29
+ - [License](#license)
30
+
11
31
  ## 🚀 Key Features
12
32
 
13
33
  ### 1. Smart & Agile Workflow
@@ -15,26 +35,20 @@ The main idea is to stop creating prompts from scratch and install a proven, str
15
35
  - **Smart Context:** Agents automatically scan your `package.json`, `go.mod`, or `requirements.txt` to understand your stack. No more explaining "I use React" every time.
16
36
  - **Unified Memory:** All context is stored in a hidden `.sdd-toolkit/` folder, keeping your root directory clean.
17
37
 
18
- ### 2. "Power Commands"
19
- Agents come equipped with special execution modes triggered by commands:
20
- - **`/sdd`**: Access help and list all available agents.
21
- - **`/flow:debug`**: Paste an error log, and the Coder enters "Surgical Mode" to fix it immediately.
22
- - **`/flow:tdd`**: Forces the Red-Green-Refactor cycle for high-quality code.
23
- - **`/flow:refactor`**: Applies Clean Code principles to an existing file.
24
- - **`/flow:gen-tests`**: Automatically generates unit tests for your code.
25
- - **`/flow:security`**: Scans your code/plan for vulnerabilities (OWASP).
26
- - **`/flow:sync`**: Updates the documentation (`project.md`) to match the actual code (Reverse Engineering).
38
+ ### 2. Multi-Language Support
39
+ The toolkit supports English, Portuguese (Brazil), and Spanish. Agents automatically adapt their responses to your preferred language.
27
40
 
28
41
  ### 3. AI Agent Installation
29
42
  Reads agnostic definitions (YAML) and converts them to specific formats:
30
43
  - **Gemini CLI:** Generates `.toml` configuration files.
31
- - **Roo Code / Cline:** Generates custom modes (`_custom_modes.json`) and context rules in `.roo/` or `.cline/`.
32
- - **GitHub Copilot:** Generates instructions in `.github/copilot-instructions.md` and agents in `.github/agents/`.
33
- - **Cursor:** Generates rules in `.cursor/rules/*.mdc`.
34
- - **Windsurf:** Generates rules in `.windsurfrules`.
44
+ - **Roo Code:** Generates agents in `.roo/commands/*.md`.
45
+ - **Cline:** Generates custom modes (`_custom_modes.json`) and context rules in `.cline/`.
46
+ - **GitHub Copilot:** Generates instructions in `.github/prompts.md` and agents in `.github/prompts/*.md`.
47
+ - **Cursor:** Generates rules in `.cursor/commands/*.mdc`.
48
+ - **Windsurf:** Generates workflows in `.windsurf/workflows/*.md`.
35
49
  - **Trae:** Generates instructions in `.trae/instructions.md`.
36
- - **OpenCode:** Generates agents in `.opencode/`.
37
- - **Kilo Code:** Generates Markdown prompts (`.kilo/prompts/*.md`).
50
+ - **OpenCode:** Generates agents in `.opencode/commands/*.md`.
51
+ - **Kilo Code:** Generates Markdown prompts (`.kilocode/workflows/*.md`).
38
52
 
39
53
  ## 👥 The Squad (Agent Roles)
40
54
 
@@ -43,27 +57,40 @@ The system installs a team of specialized agents:
43
57
  ### 🏗️ Strategic Agents
44
58
  - **@Project Architect:** Defines the scope and principles.
45
59
  - **@Requirements Engineer:** Defines the tech stack (Auto-detected).
46
- - **@Milestone Manager:** Creates the roadmap.
47
60
 
48
61
  ### ⚡ Execution Agents
49
- - **@Task Planner:** Breaks down milestones into atomic tasks.
50
- - **@Feature Manager:** The agile entry point. Handles requests like "Add Google Login" and decides the best path (Hotfix vs Milestone).
51
- - **@Coder:** The senior developer. Supports TDD, Debug, Refactor, and Test Generation modes.
62
+ - **@Feature Manager:** Manages features, milestones, and tasks.
63
+ - **@Coder:** The senior developer. Implements code following SOLID principles.
52
64
 
53
65
  ### 🛡️ Quality Agents
54
- - **@QA Engineer:** Reviews code against the spec (Auditor role).
55
- - **@DevOps Engineer:** Handles Docker, CI/CD, and Configs.
66
+ - **@QA Engineer:** Reviews code against the spec.
56
67
  - **@Release Manager:** Consolidates logs and manages the changelog.
57
68
  - **@SDD Helper:** Provides access to all agents and help.
58
69
 
59
70
  ## Installation and Usage
60
71
 
61
- You can run the tool directly via `npx` without prior installation:
72
+ ### Initial Setup
73
+ Run the tool directly via `npx` without prior installation:
62
74
 
63
75
  ```bash
64
76
  npx sdd-toolkit
65
77
  ```
66
78
 
79
+ ### View Project Dashboard
80
+ Check your current project status:
81
+
82
+ ```bash
83
+ sdd-toolkit view
84
+ ```
85
+
86
+ ### Upgrade Existing Installation
87
+ Update installed agents without reconfiguration:
88
+
89
+ ```bash
90
+ sdd-toolkit upgrade
91
+ ```
92
+
93
+ ### Global Installation
67
94
  Or install globally:
68
95
 
69
96
  ```bash
@@ -74,61 +101,133 @@ sdd-toolkit
74
101
  ## How it Works
75
102
 
76
103
  1. **Initialization:** The wizard detects your tools and sets up the hidden `.sdd-toolkit/` context folder.
77
- 2. **Agent Building:** It reads the "Thinking Protocols" (YAML) and compiles them into your AI tool's native format.
78
- 3. **Execution:** You interact with the agents using simplified commands (e.g., `/project`, `/coder`) or the new `/flow:*` triggers.
104
+ 2. **Agent Building:** Reads the agent definitions (YAML) and compiles them into your AI tool's native format.
105
+ 3. **Execution:** Interact with agents using simplified commands (e.g., `/project`, `/coder`, `/feature`).
106
+
107
+ ## Development Workflow
108
+
109
+ The sdd-toolkit provides a structured workflow with specialized agents:
110
+
111
+ ### 1. Define Project
112
+ - Command: `/project`
113
+ - Creates `.sdd-toolkit/project.md` with project scope and principles.
79
114
 
80
- ## Complete Development Flow
115
+ ### 2. Define Requirements
116
+ - Command: `/requirements`
117
+ - Analyzes your stack and creates `.sdd-toolkit/requirements.md`.
81
118
 
82
- The sdd-toolkit implements a **unified hybrid workflow** that adapts to your needs, combining structured planning for new projects with agile execution for quick fixes. It ensures traceability, justification, and quality through AI-human collaboration.
119
+ ### 3. Plan Features
120
+ - Command: `/feature`
121
+ - Creates `.sdd-toolkit/features/[name].md` with milestones and tasks.
83
122
 
84
- ### Unified Hybrid Workflow Overview
123
+ ### 4. Implement Code
124
+ - Command: `/coder [task-id]`
125
+ - Implements tasks from feature plan and logs work.
85
126
 
86
- - **Adaptive Initiation:** Start with `/start "Descrição"` for intelligent routing. The system checks existing docs and decides between quick or structured paths.
87
- - **Conditional Planning:** If needed, escalates to full planning (Project Architect → Requirements Engineer → Milestone Manager → Task Planner).
88
- - **Standardized Execution:** Coders implement tasks with logs, followed by unified validation (QA and Auditor).
89
- - **Finalization:** Release Manager consolidates into changelog with human confirmation.
127
+ ### 5. Review Code
128
+ - Command: `/review [task-id]`
129
+ - QA Engineer reviews implementation against requirements.
90
130
 
91
- ### Detailed Flow Steps
131
+ ### 6. Release
132
+ - Command: `/log` or `/dev:release`
133
+ - Consolidates logs into changelog and archives completed work.
92
134
 
93
- #### 1. Initiation (Inteligente)
94
- - Command: `/start "Build a login system"`
95
- - Action: Project Architect checks for existing `.sdd-toolkit/project.md`.
96
- - If none: Enters interview mode for basics.
97
- - If exists: Confirms proceed or restart.
98
- - Output: Updates `project.md` with hybrid notes (e.g., approval points).
135
+ ## AI Tool Commands
99
136
 
100
- #### 2. Planning (Condicional)
101
- - If hotfix: Feature Manager routes directly to task creation.
102
- - If project: Milestone Manager generates roadmap with human approval.
103
- - Commands: `/requirements`, `/milestone`, `/tasks`.
104
- - Output: `requirements.md`, `milestones.md`, `task.md`.
137
+ Once agents are installed, use these commands in your AI coding assistant:
105
138
 
106
- #### 3. Execution (Padronizada)
107
- - Command: `/coder`
108
- - Action: Coder reads context, implements, logs in `executions/`, marks tasks as done.
109
- - Modes: `/flow:debug`, `/flow:refactor`, `/flow:tdd`, etc.
110
- - Output: Code changes + execution logs.
139
+ ### Access Agents
140
+ - **`/sdd`** - Display available agents and help
141
+ - **`/sdd.project`** - Activate Project Architect
142
+ - **`/sdd.requirements`** - Activate Requirements Engineer
143
+ - **`/sdd.feature`** - Activate Feature Manager
144
+ - **`/sdd.coder`** - Activate Coder
145
+ - **`/sdd.review`** - Activate QA Engineer
146
+ - **`/sdd.log`** - Activate Release Manager
111
147
 
112
- #### 4. Validation (Unificada)
113
- - Commands: `/review`
114
- - Action: QA Engineer reviews code against the spec. Pauses for human input on ambiguities.
115
- - Output: Review reports in `logs/reviews/`.
148
+ ### Special Commands
149
+ - **`/dev:review [Task_ID]`** - Trigger code review for a specific task
150
+ - **`/dev:release`** - Consolidate logs and create changelog
116
151
 
117
- #### 5. Finalization (Com Confirmação)
118
- - Command: `/release` or implicit after approval.
119
- - Action: Release Manager updates `changelog.md` and archives logs after human confirmation.
120
- - Output: Clean changelog and archived logs.
152
+ ## Generated Files Structure
121
153
 
122
- ### Agent Interactions
123
- Agents share context via `.sdd-toolkit/` files, ensuring no hallucinations. Power commands enable specialized modes. The flow promotes justification (e.g., "Why this decision?") and human-AI handoffs for reliability.
154
+ After running `sdd-toolkit`, the following structure is created in your project:
124
155
 
125
- For examples, see the workflow guides generated in `.sdd-toolkit/`.
156
+ ```
157
+ .sdd-toolkit/
158
+ ├── project.md # Project scope and principles
159
+ ├── requirements.md # Technical requirements and stack
160
+ ├── guidelines.md # Project development guidelines
161
+ ├── milestones.md # Development roadmap
162
+ ├── task.md # Task execution backlog
163
+ ├── features/ # Individual feature specifications
164
+ │ └── [feature-name].md
165
+ ├── logs/
166
+ │ ├── executions/ # Task execution logs
167
+ │ ├── reviews/ # Code review reports
168
+ │ └── archive/ # Archived completed work
169
+ └── agents/ # Custom agent definitions (optional overrides)
170
+ ```
126
171
 
127
172
  ## Project Structure
128
173
 
129
- - `src/`: CLI source code.
130
- - `definitions/`: YAML agent definitions (agnostic).
131
- - `templates/`: Documentation templates.
174
+ - `definitions/`: YAML agent definitions
175
+ - `templates/`: Documentation templates
176
+ - `src/`: CLI source code
177
+
178
+ ## Usage Examples
179
+
180
+ ### Complete Workflow: New Feature
181
+
182
+ 1. **Define project:**
183
+ ```
184
+ /sdd.project
185
+ ```
186
+ Creates `.sdd-toolkit/project.md` with scope and principles.
187
+
188
+ 2. **Define technical requirements:**
189
+ ```
190
+ /sdd.requirements
191
+ ```
192
+ Analyzes your `package.json`/`go.mod` and creates `.sdd-toolkit/requirements.md`.
193
+
194
+ 3. **Plan a new feature:**
195
+ ```
196
+ /sdd.feature
197
+ ```
198
+ Specify your feature (e.g., "Add user authentication"). Creates `.sdd-toolkit/features/auth.md`.
199
+
200
+ 4. **Implement tasks:**
201
+ ```
202
+ /sdd.coder MT01-task-1
203
+ ```
204
+ Coder implements task following SOLID principles and logs work.
205
+
206
+ 5. **Review implementation:**
207
+ ```
208
+ /sdd.review MT01-task-1
209
+ ```
210
+ QA Engineer validates implementation against requirements.
211
+
212
+ 6. **Release changes:**
213
+ ```
214
+ /sdd.log
215
+ ```
216
+ Consolidates logs into changelog and archives completed work.
217
+
218
+ ### Quick Bug Fix
219
+
220
+ 1. **Use Coder directly:**
221
+ ```
222
+ /sdd.coder fix-login-bug
223
+ ```
224
+ Coder analyzes, fixes, and documents change.
225
+
226
+ 2. **Review fix:**
227
+ ```
228
+ /sdd.review fix-login-bug
229
+ ```
230
+ Validates that fix meets requirements.
132
231
 
133
232
  ## License
134
233
 
@@ -137,3 +236,104 @@ MIT
137
236
  ---
138
237
 
139
238
  **Nota:** Uma versão em português deste README está disponível em [README.pt.md](README.pt.md).
239
+
240
+ ## Troubleshooting
241
+
242
+ ### Agents not appearing in your AI tool
243
+
244
+ **Problem:** After running `sdd-toolkit`, agents don't appear in your AI coding assistant.
245
+
246
+ **Solutions:**
247
+ - **Roo Code/Cline:** Check if you've configured Custom Modes in your settings. See the warning message after installation.
248
+ - **Cursor:** Restart the IDE after installation.
249
+ - **OpenCode:** Refresh the command palette.
250
+ - **Gemini CLI:** Verify `.gemini/commands/dev/` folder exists with `.toml` files.
251
+
252
+ ### Permission denied when running sdd-toolkit
253
+
254
+ **Problem:** Getting "Permission denied" or EACCES error when running `npx sdd-toolkit`.
255
+
256
+ **Solutions:**
257
+ - **Option 1:** Run with elevated permissions (not recommended):
258
+ ```bash
259
+ sudo npx sdd-toolkit
260
+ ```
261
+ - **Option 2:** Fix npm permissions:
262
+ ```bash
263
+ npm config set prefix ~/.npm-global
264
+ export PATH=~/.npm-global/bin:$PATH
265
+ ```
266
+ - **Option 3:** Install globally with sudo:
267
+ ```bash
268
+ sudo npm install -g sdd-toolkit
269
+ ```
270
+
271
+ ### Agents responding in wrong language
272
+
273
+ **Problem:** Agents are not responding in your preferred language.
274
+
275
+ **Solution:**
276
+ - Re-run `sdd-toolkit` and ensure you select the correct language during setup (English, Portuguese, or Spanish).
277
+ - Or manually edit the `LANGUAGE_RULES` in your agent files.
278
+
279
+ ### Stack profile not applying rules
280
+
281
+ **Problem:** Selected stack profile rules are not being used by agents.
282
+
283
+ **Solution:**
284
+ - The stack profile is only applied during initial installation or upgrade. Run:
285
+ ```bash
286
+ sdd-toolkit upgrade
287
+ ```
288
+ Ensure you select the same stack profile again.
289
+
290
+ ### `.sdd-toolkit/` folder not created
291
+
292
+ **Problem:** The hidden folder structure is not created after installation.
293
+
294
+ **Solutions:**
295
+ - Check that you're running the command from your project's root directory (where `package.json` is located).
296
+ - Verify write permissions in the directory.
297
+ - Check for error messages during installation.
298
+
299
+ ## ❓ Frequently Asked Questions
300
+
301
+ **Q: Can I use multiple AI assistants simultaneously?**
302
+
303
+ A: Yes! You can install agents for multiple AI tools in the same project. Each tool has its own folder structure (`.roo/`, `.cline/`, `.cursor/`, etc.) and they can coexist without conflicts.
304
+
305
+ **Q: How do I update agents after initial setup?**
306
+
307
+ A: Run `sdd-toolkit upgrade`. This will update all installed agents without requiring you to reconfigure your stack profile or global rules.
308
+
309
+ **Q: Can I customize agent definitions?**
310
+
311
+ A: Yes! Create custom YAML files in `.sdd-toolkit/agents/` folder. The toolkit will use your custom versions instead of the default ones. You can copy and modify the default definitions from the `definitions/` folder in the toolkit.
312
+
313
+ **Q: What happens if I run `sdd-toolkit` multiple times?**
314
+
315
+ A: The tool is idempotent - running it again will only update or regenerate missing files without duplicating existing configurations. Your existing project docs in `.sdd-toolkit/` will be preserved.
316
+
317
+ **Q: Can I use this with projects that already have existing code?**
318
+
319
+ A: Yes! The "Requirements Engineer" agent can analyze your existing `package.json`, `go.mod`, or `requirements.txt` to auto-detect your stack. The "Project Architect" can also formalize existing projects in "hybrid" mode.
320
+
321
+ **Q: Do I need to commit `.sdd-toolkit/` to my repository?**
322
+
323
+ A: Yes, it's recommended. The `.sdd-toolkit/` folder contains your project documentation, specifications, and agent configurations. Committing them ensures consistency across your team and preserves context for future sessions.
324
+
325
+ **Q: How do I remove sdd-toolkit from my project?**
326
+
327
+ A: Simply delete the `.sdd-toolkit/` folder and any tool-specific folders (`.roo/`, `.cline/`, `.cursor/`, etc.). These are all generated files and won't affect your source code.
328
+
329
+ **Q: Are my code changes tracked by sdd-toolkit?**
330
+
331
+ A: No, sdd-toolkit only manages documentation and AI agent configurations. It does not track code changes, read your source files, or interfere with version control.
332
+
333
+ **Q: Can I add my own stack profiles?**
334
+
335
+ A: Currently, stack profiles are hardcoded in the toolkit. To add a custom profile, you can use the "Global Rules" feature during setup to inject your own conventions, or you can fork the repository and add your profile to `src/lib/profiles.js`.
336
+
337
+ **Q: Is this suitable for enterprise projects?**
338
+
339
+ A: Yes, sdd-toolkit is designed to scale. The `.sdd-toolkit/` folder can be committed to your repository, ensuring all team members use the same agent configurations and follow the same development principles defined in `guidelines.md`.