sdd-toolkit 1.5.0 → 1.8.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,155 +1,339 @@
1
- # sdd-toolkit (Universal Spec CLI)
2
-
3
- CLI tool to automatically set up the development environment and install AI agents (Auditor, Coder, etc.) for various modern AI tools.
4
-
5
- ## Overview
6
-
7
- **sdd-toolkit** is an "AI Agent Package Manager". It defines a standard squad of AI Developers and installs them directly into the context of your favorite AI Coding Assistant (such as Gemini, Roo Code, Kilo Code, OpenCode).
8
-
9
- The main idea is to stop creating prompts from scratch and install a proven, structured workflow.
10
-
11
- ## Key Features
12
-
13
- ### 1. AI Agent Installation
14
-
15
- Reads agnostic definitions (YAML) and converts them to specific formats:
16
-
17
- - **Gemini CLI:** Generates `.toml` configuration files.
18
- - **Roo Code / Cline:** Generates custom modes (`_custom_modes.json`) and context rules in `.roo/` or `.cline/`.
19
- - **GitHub Copilot:** Generates instructions in `.github/copilot-instructions.md` and agents in `.github/agents/`.
20
- - **Cursor:** Generates rules in `.cursor/rules/*.mdc`.
21
- - **Windsurf:** Generates rules in `.windsurfrules`.
22
- - **Trae:** Generates instructions in `.trae/instructions.md`.
23
- - **OpenCode:** Generates agents in `.opencode/`.
24
- - **OpenAI / Claude (Web):** Generates plain text prompts in the `prompts/` folder.
25
- - **Kilo Code:** Generates Markdown prompts (`.kilo/prompts/*.md`).
26
-
27
- ### 2. Workflow Configuration
28
-
29
- Automates the creation of the documentation structure (`docs/` and `docs/logs/`) to support the agents' workflow.
30
-
31
- ## 👥 The Squad (Agent Roles)
32
-
33
- The system works best when you follow the defined pipeline. Each agent saves its "Brain" (context) in the `docs/` folder, which serves as the base for the next agent in the chain.
34
-
35
- ### 🏗️ 1. Project Architect
36
-
37
- **"The Visionary"**
38
- Transforms your raw idea into a professional specification. Acts as an interviewer to uncover hidden requirements.
39
-
40
- - **Trigger:** `/dev.project "I want an Uber clone for dog walking"`
41
- - **Action:** Asks clarifying questions about features, target audience, and constraints.
42
- - **Output:** `docs/project.md` (Scope, User Stories, Fundamental Principles).
43
-
44
- ### 🧱 2. Requirements Engineer
45
-
46
- **"The Technical Lead"**
47
- Decides _how_ to build. Defines the technology stack, database schema, and technical boundaries based on the specification.
48
-
49
- - **Trigger:** `/dev.requirements`
50
- - **Action:** Selects libraries (e.g., "Prisma vs TypeORM"), defines API contracts and security rules.
51
- - **Output:** `docs/requirements.md` (The "Technical Contract" the Coder must obey).
52
-
53
- ### 🗺️ 3. Milestone Manager
54
-
55
- **"The Strategist"**
56
- Prevents you from trying to build everything at once. Breaks the project into logical "MVPs" (Phases).
57
-
58
- - **Trigger:** `/dev.milestone`
59
- - **Output:** `docs/milestones.md` (e.g., Phase 1: Auth, Phase 2: Payment, Phase 3: GPS).
60
-
61
- ### 📋 4. Task Planner
62
-
63
- **"The Project Manager"**
64
- Takes **ONE Milestone** and breaks it down into small, atomic tasks for the AI Coder.
65
-
66
- - **Reasoning:** AI Coders hallucinate less when the context is small.
67
- - **Trigger:** `/dev.tasks 1` (Plan Milestone 1)
68
- - **Output:** `docs/task.md` (A checklist of 5-10 specific file operations).
69
-
70
- ### 🕵️ 5. Auditor
71
-
72
- **"The Guardian"**
73
- A safety check before coding starts. Reads the **Requirements** and **Task Plan** to ensure nothing was lost in translation.
74
-
75
- - **Trigger:** `/dev.auditor`
76
- - **Action:** "Hey, you planned the Login UI but forgot the 'Forgot Password' flow mentioned in the Requirements."
77
- - **Output:** `audit_report.md` (Pass/Fail).
78
-
79
- ### 💻 6. Coder
80
-
81
- **"The Senior Developer"**
82
- The executor. Runs ONE checklist task at a time.
83
-
84
- - **Features:**
85
- - **Context Aware:** Reads `project.md` to know "Project Principles" (e.g., "Use Functional Components").
86
- - **Safety:** Checks `.gitignore` before creating files.
87
- - **TDD:** Can write tests before code if requested.
88
- - **Trigger:** `/dev.coder 1.1` (Implement Task 1.1)
89
- - **Output:** Writes code in `src/` and logs in `work_log.md`.
90
-
91
- ### ⚖️ 7. QA Engineer
92
-
93
- **"The Reviewer"**
94
- Simulates a Pull Request review. Checks if the code matches the Requirements contracts.
95
-
96
- - **Trigger:** `/dev.review 1.1`
97
- - **Action:** Reads the code and `requirements.md`. If variables are poorly named or logic is insecure, it REJECTS the task.
98
-
99
- ### 📦 8. Release Manager
100
-
101
- **"The Historian"**
102
- Consolidates the messy daily `work_log.md` into a clean `CHANGELOG`.
103
-
104
- - **Trigger:** `/dev.log`
105
-
106
- ## 🛠️ On-Demand Toolkit
107
-
108
- ### 🏗️ DevOps Engineer
109
-
110
- **"The Config Specialist"**
111
- Call this agent specifically for infrastructure tasks, so you don't waste the main agent's context.
112
-
113
- - **Trigger:** `/dev.ops`
114
- - **Examples:** "Create Dockerfile", "Setup Github Actions", "Configure ESLint".
115
-
116
- ## Installation and Usage
117
-
118
- You can run the tool directly via `npx` without prior installation:
119
-
120
- ```bash
121
- npx sdd-toolkit
122
- ```
123
-
124
- Or install globally:
125
-
126
- ```bash
127
- npm install -g sdd-toolkit
128
- sdd-toolkit
129
- ```
130
-
131
- ## How the CLI Works
132
-
133
- When you run `npx sdd-toolkit`, the installation wizard starts:
134
-
135
- 1. **Initialization:** The wizard asks which shell you use (Windows or Unix) and generates a custom workflow guide in the `docs/` folder.
136
- 2. **Agent Building:** The wizard reads agent definitions (either from the `definitions/` folder or a local `agents.md` file) and "compiles" them into your chosen AI assistant's format.
137
- 3. **Supported Destinations:**
138
-
139
- - **Gemini CLI:** Generates `.toml` files in `.gemini/commands/`.
140
- - **Roo Code / Cline:** Generates custom modes (`_custom_modes.json`) and rules in `.roo/` or `.cline/`.
141
- - **GitHub Copilot:** Generates instructions in `.github/copilot-instructions.md` and agents in `.github/agents/`.
142
- - **Kilo Code:** Generates workflows in `.kilocode/workflows/`.
143
- - **OpenCode:** Generates files in `.opencode/command/`.
144
- - **Others:** Support for Cursor, Windsurf, Trae, OpenAI/Claude Web.
145
-
146
- This way, **sdd-toolkit** acts as a bridge between agent behavior definitions and the tool you use for coding, ensuring your AI "team" is always configured and ready to work.
147
-
148
- ## Project Structure
149
-
150
- - `src/`: CLI source code.
151
- - `definitions/`: YAML agent definitions (agnostic).
152
-
153
- ## License
154
-
155
- MIT
1
+ # sdd-toolkit (Universal Spec CLI)
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
+
7
+ CLI tool to automatically set up the development environment and install AI agents (Auditor, Coder, etc.) for various modern AI tools.
8
+
9
+ ## Overview
10
+
11
+ **sdd-toolkit** is an "AI Agent Package Manager". It defines a standard squad of AI Developers and installs them directly into the context of your favorite AI Coding Assistant (such as Gemini, Roo Code, Kilo Code, OpenCode).
12
+
13
+ The main idea is to stop creating prompts from scratch and install a proven, structured workflow.
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
+
31
+ ## 🚀 Key Features
32
+
33
+ ### 1. Smart & Agile Workflow
34
+ - **Hybrid Flow:** Supports both "Waterfall" planning (for new projects) and "Agile" execution (for hotfixes/features).
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.
36
+ - **Unified Memory:** All context is stored in a hidden `.sdd-toolkit/` folder, keeping your root directory clean.
37
+
38
+ ### 2. Multi-Language Support
39
+ The toolkit supports English, Portuguese (Brazil), and Spanish. Agents automatically adapt their responses to your preferred language.
40
+
41
+ ### 3. AI Agent Installation
42
+ Reads agnostic definitions (YAML) and converts them to specific formats:
43
+ - **Gemini CLI:** Generates `.toml` configuration files.
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`.
49
+ - **Trae:** Generates instructions in `.trae/instructions.md`.
50
+ - **OpenCode:** Generates agents in `.opencode/commands/*.md`.
51
+ - **Kilo Code:** Generates Markdown prompts (`.kilocode/workflows/*.md`).
52
+
53
+ ## 👥 The Squad (Agent Roles)
54
+
55
+ The system installs a team of specialized agents:
56
+
57
+ ### 🏗️ Strategic Agents
58
+ - **@Project Architect:** Defines the scope and principles.
59
+ - **@Requirements Engineer:** Defines the tech stack (Auto-detected).
60
+
61
+ ### Execution Agents
62
+ - **@Feature Manager:** Manages features, milestones, and tasks.
63
+ - **@Coder:** The senior developer. Implements code following SOLID principles.
64
+
65
+ ### 🛡️ Quality Agents
66
+ - **@QA Engineer:** Reviews code against the spec.
67
+ - **@Release Manager:** Consolidates logs and manages the changelog.
68
+ - **@SDD Helper:** Provides access to all agents and help.
69
+
70
+ ## Installation and Usage
71
+
72
+ ### Initial Setup
73
+ Run the tool directly via `npx` without prior installation:
74
+
75
+ ```bash
76
+ npx sdd-toolkit
77
+ ```
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
94
+ Or install globally:
95
+
96
+ ```bash
97
+ npm install -g sdd-toolkit
98
+ sdd-toolkit
99
+ ```
100
+
101
+ ## How it Works
102
+
103
+ 1. **Initialization:** The wizard detects your tools and sets up the hidden `.sdd-toolkit/` context folder.
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.
114
+
115
+ ### 2. Define Requirements
116
+ - Command: `/requirements`
117
+ - Analyzes your stack and creates `.sdd-toolkit/requirements.md`.
118
+
119
+ ### 3. Plan Features
120
+ - Command: `/feature`
121
+ - Creates `.sdd-toolkit/features/[name].md` with milestones and tasks.
122
+
123
+ ### 4. Implement Code
124
+ - Command: `/coder [task-id]`
125
+ - Implements tasks from feature plan and logs work.
126
+
127
+ ### 5. Review Code
128
+ - Command: `/review [task-id]`
129
+ - QA Engineer reviews implementation against requirements.
130
+
131
+ ### 6. Release
132
+ - Command: `/log` or `/dev:release`
133
+ - Consolidates logs into changelog and archives completed work.
134
+
135
+ ## AI Tool Commands
136
+
137
+ Once agents are installed, use these commands in your AI coding assistant:
138
+
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
147
+
148
+ ### Special Commands
149
+ - **`/dev:review [Task_ID]`** - Trigger code review for a specific task
150
+ - **`/dev:release`** - Consolidate logs and create changelog
151
+
152
+ ## Generated Files Structure
153
+
154
+ After running `sdd-toolkit`, the following structure is created in your project:
155
+
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
+ ```
171
+
172
+ ## Project Structure
173
+
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.
231
+
232
+ ## License
233
+
234
+ MIT
235
+
236
+ ---
237
+
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`.