spec-feature 1.0.2 → 1.0.4
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 +80 -65
- package/bin/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,38 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 🚀 Spec Feature
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Turn your idea into a ready development plan in minutes!**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`Spec Feature` is your personal assistant for creating technical specifications. Simply describe what you want to build, and get a complete specification, technical plan, and task list for your development team. All documents are created by AI from a single description.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 🎯 Why use Spec Feature?
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### **⭐ Clear project start**
|
|
10
|
+
The specification becomes the single source of truth — no more guessing about what you intended to build.
|
|
11
|
+
|
|
12
|
+
### **🤝 Fewer misunderstandings between human and AI**
|
|
13
|
+
Clear "contracts" / specifications help avoid "vibe coding" — when AI "guesses" your intentions and often builds something not quite what you need.
|
|
14
|
+
|
|
15
|
+
### **📚 Architecture and decisions are documented**
|
|
16
|
+
"Why did we choose this solution?" will be captured in the specification, not in emails, chats, or someone's head.
|
|
17
|
+
|
|
18
|
+
### **✅ Controlled task breakdown**
|
|
19
|
+
Small tasks are easier to review, test, and correct — fewer "big commits that are hard to understand".
|
|
20
|
+
|
|
21
|
+
### **🔄 Flexibility and evolution**
|
|
22
|
+
Specifications are not "dead" — they can be updated, refactored, and revised when requirements change.
|
|
23
|
+
|
|
24
|
+
### **🤖 AI assistant integration**
|
|
25
|
+
Specification + plan + tasks give AI "context" and boundaries within which it can generate code more safely.
|
|
26
|
+
|
|
27
|
+
## ⚡ Quick Start
|
|
28
|
+
|
|
29
|
+
### 🚀 Using npx (recommended)
|
|
30
|
+
|
|
31
|
+
The easiest way to get started with Spec Feature:
|
|
10
32
|
|
|
11
33
|
```bash
|
|
12
|
-
# Initialize
|
|
34
|
+
# Initialize Spec Feature in current directory
|
|
13
35
|
npx spec-feature init
|
|
14
36
|
|
|
15
|
-
# Initialize
|
|
37
|
+
# Initialize with custom folder name
|
|
16
38
|
npx spec-feature init my-project-docs
|
|
17
39
|
```
|
|
18
40
|
|
|
19
|
-
This will create a `spec` folder (or your custom
|
|
41
|
+
This will create a `spec` folder (or your custom name) with the complete Spec Feature structure ready to use.
|
|
20
42
|
|
|
21
|
-
### Global installation
|
|
43
|
+
### 🌍 Global installation
|
|
22
44
|
|
|
23
|
-
For frequent use,
|
|
45
|
+
For frequent use, install Spec Feature globally:
|
|
24
46
|
|
|
25
47
|
```bash
|
|
26
48
|
npm install -g spec-feature
|
|
27
49
|
|
|
28
|
-
#
|
|
50
|
+
# Now you can use it anywhere
|
|
29
51
|
spec-feature init
|
|
30
52
|
spec-feature init my-features
|
|
31
53
|
```
|
|
32
54
|
|
|
33
|
-
### Local installation
|
|
55
|
+
### 📦 Local installation
|
|
34
56
|
|
|
35
|
-
To install
|
|
57
|
+
To install Spec Feature in your project:
|
|
36
58
|
|
|
37
59
|
```bash
|
|
38
60
|
npm install spec-feature
|
|
@@ -46,33 +68,33 @@ npm install spec-feature
|
|
|
46
68
|
}
|
|
47
69
|
```
|
|
48
70
|
|
|
49
|
-
##
|
|
71
|
+
## 📁 Project Structure `/spec`
|
|
50
72
|
|
|
51
|
-
### Initial structure (created during initialization)
|
|
73
|
+
### 🏗️ Initial structure (created during initialization)
|
|
52
74
|
```
|
|
53
75
|
/spec
|
|
54
76
|
├── README.md ← this guide
|
|
55
|
-
├── feature.md ← main template
|
|
77
|
+
├── feature.md ← main template for launching spec-feature
|
|
56
78
|
└── core ← base templates for specific stages
|
|
57
79
|
├── spec.md ← specification structure
|
|
58
80
|
├── plan.md ← technical plan structure
|
|
59
81
|
├── tasks.md ← task list structure
|
|
60
82
|
├── verify.md ← verification report structure
|
|
61
|
-
└── hotfix.md ← hotfix and
|
|
83
|
+
└── hotfix.md ← hotfix and update structure
|
|
62
84
|
```
|
|
63
85
|
|
|
64
|
-
### Full structure (after creating the first feature)
|
|
86
|
+
### 🎯 Full structure (after creating the first feature)
|
|
65
87
|
```
|
|
66
88
|
/spec
|
|
67
89
|
├── README.md ← this guide
|
|
68
|
-
├── feature.md ← main template
|
|
90
|
+
├── feature.md ← main template for launching spec-feature
|
|
69
91
|
├── core ← base templates for specific stages
|
|
70
92
|
│ ├── spec.md ← specification structure
|
|
71
93
|
│ ├── plan.md ← technical plan structure
|
|
72
94
|
│ ├── tasks.md ← task list structure
|
|
73
95
|
│ ├── verify.md ← verification report structure
|
|
74
|
-
│ └── hotfix.md ← hotfix and
|
|
75
|
-
└── features ←
|
|
96
|
+
│ └── hotfix.md ← hotfix and update structure
|
|
97
|
+
└── features ← folder with feature materials (created automatically)
|
|
76
98
|
├── <feature> ← specific feature folder (e.g., `user-auth`)
|
|
77
99
|
│ ├── spec.md ← current specification
|
|
78
100
|
│ ├── plan.md ← technical plan
|
|
@@ -81,87 +103,80 @@ npm install spec-feature
|
|
|
81
103
|
└── ... ← other features created from templates
|
|
82
104
|
```
|
|
83
105
|
|
|
84
|
-
>
|
|
85
|
-
|
|
86
|
-
## Getting started
|
|
106
|
+
> **💡 Tip:** The `features` folder is created automatically when creating the first feature through `spec/feature.md`.
|
|
87
107
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
**Usage example:**
|
|
91
|
-
```
|
|
92
|
-
Use the template from spec/feature.md.
|
|
93
|
-
@user-auth@ Need to add user authentication via email and password. The user should be able to register, log in, and recover their password. Integration with the existing notification system is mandatory.
|
|
94
|
-
```
|
|
108
|
+
## 🎬 Getting Started
|
|
95
109
|
|
|
96
|
-
|
|
110
|
+
To create a feature specification, use the `spec/feature.md` template with any AI Assistant that can create folders and files (such as `Claude Code`, `Gemini CLI`, `Codex CLI`, `Copilot`, `Cursor`, etc.).
|
|
97
111
|
|
|
98
|
-
|
|
112
|
+
### 📝 Input parameter format
|
|
99
113
|
|
|
100
114
|
Pass parameters in one line in the format `@<feature>@ <context>`:
|
|
101
115
|
|
|
102
116
|
- the value between the first two `@` symbols is used as **FEATURE** and determines the feature folder (`@payments@` → `spec/features/payments`);
|
|
103
117
|
- everything following the second `@` is **CONTEXT**. It can span multiple lines, include lists, links, and additional clarifications.
|
|
104
118
|
|
|
105
|
-
|
|
119
|
+
### 🚀 Usage example
|
|
106
120
|
|
|
107
|
-
|
|
121
|
+
```
|
|
122
|
+
Use the template from spec/feature.md.
|
|
123
|
+
@user-auth@ Need to add user authentication via email and password. The user should be able to register, log in, and recover their password. Integration with the existing notification system is mandatory.
|
|
124
|
+
```
|
|
108
125
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- `spec/features/{FEATURE}/plan.md` — technical plan based on specification and context.
|
|
118
|
-
- `spec/features/{FEATURE}/tasks.md` — checklist of tasks for implementation and testing.
|
|
126
|
+
### ✨ What happens next
|
|
127
|
+
|
|
128
|
+
The AI assistant generates three Markdown documents in sequence:
|
|
129
|
+
- `spec/features/{FEATURE}/spec.md` — specification describing value and user scenarios.
|
|
130
|
+
- `spec/features/{FEATURE}/plan.md` — technical plan based on specification and context.
|
|
131
|
+
- `spec/features/{FEATURE}/tasks.md` — checklist of tasks for implementation and testing.
|
|
132
|
+
|
|
133
|
+
For example, the above command will create the `spec/features/user-auth/` folder with three files: `spec.md`, `plan.md`, and `tasks.md`.
|
|
119
134
|
|
|
120
|
-
##
|
|
135
|
+
## 🚀 Launching Task Execution
|
|
121
136
|
|
|
122
137
|
After creating the specification and plan, you can proceed with implementation:
|
|
123
138
|
|
|
124
|
-
1.
|
|
139
|
+
1. **🎯 Launch task execution**
|
|
125
140
|
```
|
|
126
141
|
Execute all tasks in `spec/features/{FEATURE}/tasks.md`
|
|
127
142
|
```
|
|
128
143
|
|
|
129
|
-
2.
|
|
144
|
+
2. **⚡ What happens during execution**
|
|
130
145
|
- AI assistant sequentially executes tasks from the checklist
|
|
131
146
|
- Each completed task is marked as finished
|
|
132
147
|
- When problems arise, the assistant may request clarifications
|
|
133
148
|
- Progress can be tracked by updating checkboxes in `tasks.md`
|
|
134
149
|
|
|
135
|
-
3.
|
|
150
|
+
3. **📝 Example for user-auth feature**
|
|
136
151
|
```
|
|
137
152
|
Execute all tasks in `spec/features/user-auth/tasks.md`
|
|
138
153
|
```
|
|
139
154
|
|
|
140
|
-
## What
|
|
155
|
+
## ✅ What Happens After Task Execution
|
|
141
156
|
|
|
142
157
|
After completing all tasks, automatic verification is launched:
|
|
143
158
|
|
|
144
|
-
1.
|
|
159
|
+
1. **🔍 Automatic verification**
|
|
145
160
|
- AI assistant uses the `spec/core/verify.md` template
|
|
146
161
|
- Compares implemented functionality with requirements from `spec.md`
|
|
147
162
|
- Checks compliance with the technical plan from `plan.md`
|
|
148
163
|
|
|
149
|
-
2.
|
|
164
|
+
2. **📊 Verification results**
|
|
150
165
|
- A report `spec/features/{FEATURE}/verify-report.md` is created
|
|
151
166
|
- Task statuses in `tasks.md` are updated (✅ completed / ❌ requires refinement)
|
|
152
167
|
- Found discrepancies and recommendations are recorded
|
|
153
168
|
|
|
154
|
-
3.
|
|
169
|
+
3. **📋 Verification report content**
|
|
155
170
|
- Summary of completed tasks
|
|
156
171
|
- List of found problems
|
|
157
172
|
- Recommendations for fixes
|
|
158
173
|
- Assessment of feature readiness for production
|
|
159
174
|
|
|
160
|
-
## Updating
|
|
175
|
+
## 🔄 Updating Existing Feature
|
|
161
176
|
|
|
162
177
|
To update an existing feature, reuse `spec/feature.md`, specifying the name of the required feature folder and a list of changes:
|
|
163
178
|
|
|
164
|
-
|
|
179
|
+
**📝 Update example:**
|
|
165
180
|
```
|
|
166
181
|
Use the template from spec/feature.md.
|
|
167
182
|
@user-auth@ Add two-factor authentication (2FA) via SMS. The user should be able to enable/disable 2FA in profile settings. Integration with existing SMS provider.
|
|
@@ -169,21 +184,21 @@ Use the template from spec/feature.md.
|
|
|
169
184
|
|
|
170
185
|
The AI assistant will correctly overwrite `spec.md`, `plan.md`, and `tasks.md`, preserving the structure and updating the content for new requirements.
|
|
171
186
|
|
|
172
|
-
## Troubleshooting
|
|
187
|
+
## 🛠️ Troubleshooting
|
|
173
188
|
|
|
174
|
-
### Common problems and solutions
|
|
189
|
+
### 🚨 Common problems and solutions
|
|
175
190
|
|
|
176
|
-
|
|
177
|
-
-
|
|
191
|
+
**❌ Problem:** AI assistant doesn't create feature folder
|
|
192
|
+
- **✅ Solution:** Make sure you're using the correct format `@feature@ context` and that the assistant has file creation permissions
|
|
178
193
|
|
|
179
|
-
|
|
180
|
-
-
|
|
194
|
+
**❌ Problem:** Tasks are executed in wrong order
|
|
195
|
+
- **✅ Solution:** Check task numbering in `tasks.md` and reorder if necessary
|
|
181
196
|
|
|
182
|
-
|
|
183
|
-
-
|
|
197
|
+
**❌ Problem:** Verification doesn't launch automatically
|
|
198
|
+
- **✅ Solution:** Make sure all tasks in `tasks.md` are marked as completed, then manually launch verification:
|
|
184
199
|
```
|
|
185
200
|
Use the template from spec/core/verify.md to verify spec/features/{FEATURE}/
|
|
186
201
|
```
|
|
187
202
|
|
|
188
|
-
|
|
189
|
-
-
|
|
203
|
+
**❌ Problem:** Conflict when updating existing feature
|
|
204
|
+
- **✅ Solution:** Create a backup of current files before updating or use git to track changes
|
package/bin/cli.js
CHANGED
|
@@ -48,7 +48,7 @@ if (command === "init") {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
console.log(`✅
|
|
51
|
+
console.log(`✅ Spec Feature initialized in '${folderName}' folder!`);
|
|
52
52
|
} else {
|
|
53
53
|
console.log("Usage: npx spec-feature init [folder-name]");
|
|
54
54
|
}
|