gspec 1.13.0 → 1.13.1
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 +18 -0
- package/bin/gspec.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -158,6 +158,24 @@ npx gspec --target opencode
|
|
|
158
158
|
|
|
159
159
|
That's it. The commands are immediately available in your AI tool.
|
|
160
160
|
|
|
161
|
+
If you have saved specs in `~/.gspec/` from a previous project, the installer will offer to seed your new project from them — either from a playbook or by picking individual specs.
|
|
162
|
+
|
|
163
|
+
## Save & Restore
|
|
164
|
+
|
|
165
|
+
Once you've built specs you're happy with, save them for reuse across projects:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
gspec save # Save a spec from the current project to ~/.gspec/
|
|
169
|
+
gspec restore # Restore a saved spec into the current project
|
|
170
|
+
gspec playbook # Bundle multiple saved specs into a reusable playbook
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Saved specs are organized by type in `~/.gspec/` (profiles, stacks, styles, practices, features). Playbooks bundle multiple specs together so you can seed an entire project with one command:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
gspec restore playbook/my-starter
|
|
177
|
+
```
|
|
178
|
+
|
|
161
179
|
## Output Structure
|
|
162
180
|
|
|
163
181
|
All specifications live in a `gspec/` directory at your project root:
|
package/bin/gspec.js
CHANGED
|
@@ -800,6 +800,9 @@ async function saveSpec(cwd) {
|
|
|
800
800
|
if (e.code !== 'ENOENT') throw e;
|
|
801
801
|
}
|
|
802
802
|
|
|
803
|
+
// Uncheck all implementation checkboxes so saved specs start fresh
|
|
804
|
+
content = content.replace(/- \[x\]/g, '- [ ]');
|
|
805
|
+
|
|
803
806
|
await writeFile(destPath, content, 'utf-8');
|
|
804
807
|
console.log(chalk.green(`\n ✓ Saved to ~/.gspec/${selected.type}/${name}.md\n`));
|
|
805
808
|
}
|