superspecs 0.1.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/.skills/execute-branch/SKILL.md +102 -0
- package/.skills/execute-pick-spec/SKILL.md +162 -0
- package/.skills/execute-review/SKILL.md +161 -0
- package/.skills/execute-subagent/SKILL.md +149 -0
- package/.skills/execute-tdd/SKILL.md +168 -0
- package/.skills/plan-discuss/SKILL.md +147 -0
- package/.skills/plan-spec/SKILL.md +193 -0
- package/.skills/ship/SKILL.md +150 -0
- package/.skills/skill-creator/SKILL.md +64 -0
- package/.skills/techstack/SKILL.md +522 -0
- package/.skills/verify-tests/SKILL.md +153 -0
- package/.skills/verify-wiki/SKILL.md +180 -0
- package/AGENTS.md +38 -0
- package/CLAUDE.md +44 -0
- package/GEMINI.md +9 -0
- package/HOWITWORKS.md +208 -0
- package/LICENSE +21 -0
- package/README.md +303 -0
- package/bin/superspecs.js +60 -0
- package/package.json +52 -0
- package/setup.sh +111 -0
package/README.md
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
```
|
|
2
|
+
________ ________ ________ ________ ________
|
|
3
|
+
╱ ╲╱ ╱ ╲╱ ╲╱ ╲╱ ╲
|
|
4
|
+
╱ _╱ ╱ ╱ ╱ ╱
|
|
5
|
+
╱- ╱ ╱ __╱ _╱ _╱
|
|
6
|
+
╲_______╱╱╲________╱╲______╱ ╲________╱╲____╱___╱
|
|
7
|
+
________ ________ ________ ________ ________
|
|
8
|
+
╱ ╲╱ ╲╱ ╲╱ ╲╱ ╲
|
|
9
|
+
╱ _╱ ╱ ╱ ╱ _╱
|
|
10
|
+
╱- ╱ __╱ _╱ --╱- ╱
|
|
11
|
+
╲_______╱╱╲______╱ ╲________╱╲________╱╲________╱
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
# SuperSpecs
|
|
15
|
+
|
|
16
|
+
**Spec-driven planning. Parallel TDD execution. A wiki that never forgets.**
|
|
17
|
+
|
|
18
|
+
[](LICENSE)
|
|
19
|
+
[]()
|
|
20
|
+
|
|
21
|
+
[How It Works](HOWITWORKS.md) · [Local Development](LOCALDEVELOPMENT.md)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Most teams using AI coding agents hit the same wall: the agent hallucinates architecture it didn't build, re-solves problems solved three sessions ago, and contradicts decisions made last week. The context window resets. The knowledge vanishes. Every session starts from zero.
|
|
26
|
+
|
|
27
|
+
**SuperSpecs is the discipline layer that makes AI-driven development actually compound.**
|
|
28
|
+
|
|
29
|
+
Three pillars — each solving a distinct failure mode:
|
|
30
|
+
|
|
31
|
+
**Spec** — before any code exists, intent is captured as testable, machine-readable requirements: GIVEN/WHEN/THEN scenarios, SHALL statements, explicit non-goals. The spec fits a fresh 200k context window. Every executor starts with the full contract — not a partial reconstruction of chat history.
|
|
32
|
+
|
|
33
|
+
**TDD** — RED before GREEN, without exception. Tests are written first. Code written without a failing test gets deleted. The test suite is the ground truth, not the agent's confidence.
|
|
34
|
+
|
|
35
|
+
**Wiki** — Andrej Karpathy's insight, applied at the project level: the context window is ephemeral, but the wiki is permanent. After every shipped feature, knowledge is distilled into structured pages — architecture decisions, patterns, trade-offs, gotchas, open questions. The next session opens the wiki and starts _informed_, not blind. Knowledge compounds. Problems stay solved. The codebase has memory.
|
|
36
|
+
|
|
37
|
+
The result: five AI agents running in parallel, each with a fresh context, each working from the same spec, each contributing to the same wiki. Nothing lost between sessions. Nothing re-discovered twice. Every shipped feature leaves the system more legible than it found it.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## The Four Phases
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
_ _ __ _ _ _ _____ _ _ __ ___ _ __ __
|
|
45
|
+
| || |/__\| | | | | |_ _| | | | |/__\| _ \ |/ /' _/
|
|
46
|
+
| >< | \/ | 'V' | | | | | | 'V' | \/ | v / <`._`.
|
|
47
|
+
|_||_|\__/!_/ \_! |_| |_| !_/ \_!\__/|_|_\_|\_\___/
|
|
48
|
+
┌─────────────────────────────────────────────────────┐
|
|
49
|
+
│ PHASE 0 · SETUP │
|
|
50
|
+
├─────────────────────────────────────────────────────┤
|
|
51
|
+
│ Define the stack. Get skill & library recs. │
|
|
52
|
+
│ Ground every session that follows. │
|
|
53
|
+
├─────────────────────────────────────────────────────┤
|
|
54
|
+
│ /techstack │
|
|
55
|
+
└─────────────────────────────────────────────────────┘
|
|
56
|
+
│
|
|
57
|
+
▼
|
|
58
|
+
┌─────────────────────────────────────────────────────┐
|
|
59
|
+
│ PHASE 1 · PLAN │
|
|
60
|
+
├─────────────────────────────────────────────────────┤
|
|
61
|
+
│ Intent before implementation. │
|
|
62
|
+
│ Every requirement is testable. │
|
|
63
|
+
│ The spec fits a fresh 200k context window. │
|
|
64
|
+
├─────────────────────────────────────────────────────┤
|
|
65
|
+
│ /discuss → /spec │
|
|
66
|
+
└─────────────────────────────────────────────────────┘
|
|
67
|
+
│
|
|
68
|
+
▼
|
|
69
|
+
┌─────────────────────────────────────────────────────┐
|
|
70
|
+
│ PHASE 2 · EXECUTE │
|
|
71
|
+
├─────────────────────────────────────────────────────┤
|
|
72
|
+
│ One branch per spec. One subagent per task. │
|
|
73
|
+
│ RED before GREEN, always. │
|
|
74
|
+
│ Critical findings block all progress. │
|
|
75
|
+
├─────────────────────────────────────────────────────┤
|
|
76
|
+
│ /pick-spec → /branch → /subagent │
|
|
77
|
+
│ /tdd → /code-review │
|
|
78
|
+
└─────────────────────────────────────────────────────┘
|
|
79
|
+
│
|
|
80
|
+
▼
|
|
81
|
+
┌─────────────────────────────────────────────────────┐
|
|
82
|
+
│ PHASE 3 · VERIFY │
|
|
83
|
+
├─────────────────────────────────────────────────────┤
|
|
84
|
+
│ Full suite. Every spec scenario has a test. │
|
|
85
|
+
│ Then distill everything into the wiki. │
|
|
86
|
+
├─────────────────────────────────────────────────────┤
|
|
87
|
+
│ /check-tests → /wiki │
|
|
88
|
+
└─────────────────────────────────────────────────────┘
|
|
89
|
+
│
|
|
90
|
+
▼
|
|
91
|
+
┌─────────────────────────────────────────────────────┐
|
|
92
|
+
│ PHASE 4 · SHIP │
|
|
93
|
+
├─────────────────────────────────────────────────────┤
|
|
94
|
+
│ PR. Changelog. Archive. Start the next cycle. │
|
|
95
|
+
├─────────────────────────────────────────────────────┤
|
|
96
|
+
│ /ship │
|
|
97
|
+
└─────────────────────────────────────────────────────┘
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Phase 0 — Setup
|
|
103
|
+
|
|
104
|
+
> Run once per project. Revisit when the stack changes.
|
|
105
|
+
|
|
106
|
+
Define the project's tech stack through a guided questionnaire. Get concrete recommendations for specialist skills to install, ecosystem libraries per domain, and a production-readiness checklist tailored to your stack. Also fetches and filters the [awesome-skills.com](https://awesome-skills.com/) community directory live — surfacing the highest-starred, best-matched skills for your stack, with a curated fallback if unavailable. Saves a permanent profile to the wiki that every future session can reference.
|
|
107
|
+
|
|
108
|
+
**Skills:** `/techstack`
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Phase 1 — Plan
|
|
113
|
+
|
|
114
|
+
Before any code exists, the plan must fit in a fresh 200k-token context window. This discipline ensures every executor starts clean — no partial history, no reconstructed intent.
|
|
115
|
+
|
|
116
|
+
### 1.1 Discuss (`/discuss`)
|
|
117
|
+
|
|
118
|
+
Capture implementation decisions _before_ anything is planned. Goals, constraints, open questions, explicit non-goals. One question at a time, conversational. The output is a `DISCUSS.md` — the foundation for the spec.
|
|
119
|
+
|
|
120
|
+
### 1.2 Spec (`/spec`)
|
|
121
|
+
|
|
122
|
+
Write an OpenSpec-style spec from the discussion. Requirements expressed as SHALL statements with GIVEN/WHEN/THEN scenarios. Lives in `superspec/specs/<slug>/spec.md`.
|
|
123
|
+
|
|
124
|
+
**Exit criterion:** spec + context fits a fresh 200k-token window. If it doesn't, decompose into smaller specs.
|
|
125
|
+
|
|
126
|
+
**Skills:** `/discuss` → `/spec`
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Phase 2 — Execute
|
|
131
|
+
|
|
132
|
+
Parallel execution. Each subagent gets a clean context. No shared state between tasks. No "do you remember what we talked about earlier" — the spec and the wiki carry everything.
|
|
133
|
+
|
|
134
|
+
### 2.1 Pick Spec (`/pick-spec`)
|
|
135
|
+
|
|
136
|
+
Choose the next spec to execute. Check dependencies, verify the spec is complete, confirm it fits a fresh context window.
|
|
137
|
+
|
|
138
|
+
### 2.2 Branch (`/branch`)
|
|
139
|
+
|
|
140
|
+
Create a git branch or worktree for isolated execution. One branch per spec.
|
|
141
|
+
|
|
142
|
+
### 2.3 Subagent Development (`/subagent`)
|
|
143
|
+
|
|
144
|
+
Dispatches a fresh subagent per task. Each gets: the spec, the task, and nothing else. Two-stage review per task: spec compliance first, code quality second. Supports batch mode with human checkpoints between waves.
|
|
145
|
+
|
|
146
|
+
### 2.4 TDD (`/tdd`)
|
|
147
|
+
|
|
148
|
+
Enforces RED → GREEN → REFACTOR strictly:
|
|
149
|
+
|
|
150
|
+
1. Write a failing test — watch it fail for the right reason
|
|
151
|
+
2. Write minimal code — watch it pass
|
|
152
|
+
3. Commit
|
|
153
|
+
4. Code written before a failing test gets deleted
|
|
154
|
+
|
|
155
|
+
### 2.5 Code Review (`/code-review`)
|
|
156
|
+
|
|
157
|
+
Runs between tasks. Reviews against the spec. Reports issues by severity. **Critical issues block all progress** — nothing moves forward until resolved.
|
|
158
|
+
|
|
159
|
+
**Skills:** `/pick-spec` → `/branch` → `/subagent` → `/tdd` → `/code-review`
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Phase 3 — Verify
|
|
164
|
+
|
|
165
|
+
Walk through what was built. Diagnose and fix before declaring done. Then distill everything learned into the wiki — so the next session inherits the knowledge.
|
|
166
|
+
|
|
167
|
+
### 3.1 Check Tests (`/check-tests`)
|
|
168
|
+
|
|
169
|
+
Full test suite. Coverage check. Every spec scenario verified by a test. No passing with skipped or pending tests.
|
|
170
|
+
|
|
171
|
+
### 3.2 Wiki Import (`/wiki`)
|
|
172
|
+
|
|
173
|
+
Distill the implemented feature into the project wiki. Architecture decisions, patterns, trade-offs, gotchas. The wiki is the memory that outlives the session — it's what makes the next planning cycle start informed instead of blind. Structured, linked, searchable. Not chat history: a real knowledge base.
|
|
174
|
+
|
|
175
|
+
**Skills:** `/check-tests` → `/wiki`
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Phase 4 — Ship
|
|
180
|
+
|
|
181
|
+
### Ship (`/ship`)
|
|
182
|
+
|
|
183
|
+
Create the PR. Write a changelog entry. Archive the phase directory. Mark the spec complete. Trigger the next cycle.
|
|
184
|
+
|
|
185
|
+
**Skills:** `/ship`
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Quick Start
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
# Install
|
|
193
|
+
git clone https://github.com/your-org/superspecs.git
|
|
194
|
+
cd your-project
|
|
195
|
+
bash ~/.superspecs/setup.sh # symlinks skills into all your agents
|
|
196
|
+
|
|
197
|
+
# Or per-project
|
|
198
|
+
git clone https://github.com/your-org/superspecs.git .superspecs
|
|
199
|
+
bash .superspecs/setup.sh
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Then open your agent and say: **"Tell me about your superspecs"**
|
|
203
|
+
|
|
204
|
+
### First feature
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
/techstack Define stack, get skill & library recommendations
|
|
208
|
+
/discuss What are we building and why?
|
|
209
|
+
/spec Write the spec
|
|
210
|
+
/pick-spec Confirm it fits a clean context
|
|
211
|
+
/branch Create worktree
|
|
212
|
+
/subagent Start execution
|
|
213
|
+
/tdd Enforce RED-GREEN-REFACTOR
|
|
214
|
+
/code-review Check between tasks
|
|
215
|
+
/check-tests Verify everything passes
|
|
216
|
+
/wiki Distill to knowledge base
|
|
217
|
+
/ship PR + archive
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Project Structure
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
your-project/
|
|
226
|
+
├── superspec/
|
|
227
|
+
│ ├── specs/ # Feature specifications
|
|
228
|
+
│ │ └── <slug>/
|
|
229
|
+
│ │ ├── DISCUSS.md # Pre-planning decisions
|
|
230
|
+
│ │ ├── spec.md # The spec (SHALL + scenarios)
|
|
231
|
+
│ │ ├── tasks.md # Implementation tasks
|
|
232
|
+
│ │ └── status.md # Phase + checklist
|
|
233
|
+
│ │
|
|
234
|
+
│ ├── phases/ # Active phase working dirs
|
|
235
|
+
│ │ └── <slug>-<phase>/
|
|
236
|
+
│ │ ├── plan.md # Decomposed execution plan
|
|
237
|
+
│ │ ├── review-log.md # Code review history
|
|
238
|
+
│ │ └── wave-*.md # Parallel execution waves
|
|
239
|
+
│ │
|
|
240
|
+
│ └── wiki/ # Living knowledge base
|
|
241
|
+
│ ├── _index.md
|
|
242
|
+
│ ├── _manifest.json
|
|
243
|
+
│ └── <domain>/
|
|
244
|
+
│ └── <topic>.md
|
|
245
|
+
│
|
|
246
|
+
├── .skills/ # SuperSpecs skills (source of truth)
|
|
247
|
+
│ ├── techstack/SKILL.md
|
|
248
|
+
│ ├── plan-discuss/SKILL.md
|
|
249
|
+
│ ├── plan-spec/SKILL.md
|
|
250
|
+
│ ├── execute-pick-spec/SKILL.md
|
|
251
|
+
│ ├── execute-branch/SKILL.md
|
|
252
|
+
│ ├── execute-subagent/SKILL.md
|
|
253
|
+
│ ├── execute-tdd/SKILL.md
|
|
254
|
+
│ ├── execute-review/SKILL.md
|
|
255
|
+
│ ├── verify-tests/SKILL.md
|
|
256
|
+
│ ├── verify-wiki/SKILL.md
|
|
257
|
+
│ └── ship/SKILL.md
|
|
258
|
+
│
|
|
259
|
+
├── CLAUDE.md # Bootstrap → Claude Code
|
|
260
|
+
├── AGENTS.md # Bootstrap → Codex / OpenCode / Aider
|
|
261
|
+
├── .cursor/rules/superspecs.mdc # Always-on → Cursor
|
|
262
|
+
├── .windsurf/rules/superspecs.md # Always-on → Windsurf
|
|
263
|
+
├── .github/copilot-instructions.md # Always-on → Copilot
|
|
264
|
+
└── setup.sh
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Skill Reference
|
|
270
|
+
|
|
271
|
+
| Phase | Skill | Command | What it does |
|
|
272
|
+
| ------- | ------------------- | -------------- | ---------------------------------------------------------------------------- |
|
|
273
|
+
| Setup | `techstack` | `/techstack` | Questionnaire: define stack, recommend skills & libraries, save wiki profile |
|
|
274
|
+
| Plan | `plan-discuss` | `/discuss` | Capture decisions before planning |
|
|
275
|
+
| Plan | `plan-spec` | `/spec` | Write OpenSpec-style spec |
|
|
276
|
+
| Execute | `execute-pick-spec` | `/pick-spec` | Choose + validate next spec |
|
|
277
|
+
| Execute | `execute-branch` | `/branch` | Create branch / worktree |
|
|
278
|
+
| Execute | `execute-subagent` | `/subagent` | Parallel subagent task execution |
|
|
279
|
+
| Execute | `execute-tdd` | `/tdd` | RED-GREEN-REFACTOR enforcement |
|
|
280
|
+
| Execute | `execute-review` | `/code-review` | Between-task spec + quality review |
|
|
281
|
+
| Verify | `verify-tests` | `/check-tests` | Full suite + scenario coverage |
|
|
282
|
+
| Verify | `verify-wiki` | `/wiki` | Distill feature to wiki |
|
|
283
|
+
| Ship | `ship` | `/ship` | PR + archive + next cycle |
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Design Principles
|
|
288
|
+
|
|
289
|
+
**Plan fits a fresh context window.** No executor should need prior chat history to understand their task. If the plan is too big, it gets decomposed.
|
|
290
|
+
|
|
291
|
+
**Tests first, always.** Code written before tests gets deleted. No exceptions. RED before GREEN.
|
|
292
|
+
|
|
293
|
+
**Critical issues block progress.** A `/code-review` finding rated Critical is not a suggestion. Nothing moves forward until it's resolved.
|
|
294
|
+
|
|
295
|
+
**Knowledge outlives the session.** After every shipped feature, the wiki gains a page. Future planning sessions start informed.
|
|
296
|
+
|
|
297
|
+
**One branch per spec.** Isolation prevents interference between parallel workstreams.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## License
|
|
302
|
+
|
|
303
|
+
MIT
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { execSync } = require('child_process');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
|
|
8
|
+
const pkg = require('../package.json');
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
const cmd = args[0];
|
|
11
|
+
|
|
12
|
+
const HELP = `
|
|
13
|
+
SuperSpecs — Spec-driven AI development
|
|
14
|
+
|
|
15
|
+
Usage:
|
|
16
|
+
superspecs install Symlink skills into all AI agent dirs + init project
|
|
17
|
+
superspecs init Init superspec/ directory structure in current project
|
|
18
|
+
superspecs version Print version
|
|
19
|
+
superspecs help Show this help
|
|
20
|
+
|
|
21
|
+
Examples:
|
|
22
|
+
superspecs install # Run once after global install
|
|
23
|
+
npx superspecs install # Run without installing globally
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
if (cmd === 'version' || cmd === '-v' || cmd === '--version') {
|
|
27
|
+
console.log(pkg.version);
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (!cmd || cmd === 'help' || cmd === '--help' || cmd === '-h') {
|
|
32
|
+
console.log(HELP);
|
|
33
|
+
process.exit(0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (cmd === 'install' || cmd === 'init') {
|
|
37
|
+
const setupPath = path.join(__dirname, '..', 'setup.sh');
|
|
38
|
+
|
|
39
|
+
if (!fs.existsSync(setupPath)) {
|
|
40
|
+
console.error('Error: setup.sh not found at', setupPath);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Pass the user's CWD so setup.sh creates superspec/ there, not in the npm module dir
|
|
45
|
+
const env = {
|
|
46
|
+
...process.env,
|
|
47
|
+
SUPERSPECS_PROJECT_DIR: process.cwd(),
|
|
48
|
+
SUPERSPECS_SKIP_SYMLINKS: cmd === 'init' ? '1' : '0',
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
execSync(`bash "${setupPath}"`, { stdio: 'inherit', env });
|
|
53
|
+
} catch (err) {
|
|
54
|
+
process.exit(err.status || 1);
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
console.error(`Unknown command: ${cmd}`);
|
|
58
|
+
console.log(HELP);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "superspecs",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Spec-driven AI development: planning + TDD + living wiki memory",
|
|
5
|
+
"bin": {
|
|
6
|
+
"superspecs": "./bin/superspecs.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"install-framework": "bash setup.sh",
|
|
10
|
+
"prepublishOnly": "node -c bin/superspecs.js && node bin/superspecs.js version"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin/",
|
|
14
|
+
".skills/",
|
|
15
|
+
"setup.sh",
|
|
16
|
+
"CLAUDE.md",
|
|
17
|
+
"AGENTS.md",
|
|
18
|
+
"GEMINI.md",
|
|
19
|
+
"HOWITWORKS.md",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"ai",
|
|
25
|
+
"tdd",
|
|
26
|
+
"spec-driven",
|
|
27
|
+
"claude-code",
|
|
28
|
+
"cursor",
|
|
29
|
+
"opencode",
|
|
30
|
+
"copilot",
|
|
31
|
+
"agentic",
|
|
32
|
+
"wiki",
|
|
33
|
+
"development-workflow",
|
|
34
|
+
"ai-agents",
|
|
35
|
+
"llm",
|
|
36
|
+
"specification",
|
|
37
|
+
"workflow"
|
|
38
|
+
],
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=16.0.0"
|
|
41
|
+
},
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "https://github.com/fokkerone/superspecs.git"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/fokkerone/superspecs#readme",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/fokkerone/superspecs/issues"
|
|
50
|
+
},
|
|
51
|
+
"preferGlobal": true
|
|
52
|
+
}
|
package/setup.sh
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# SuperSpecs Setup — symlinks skills into all supported AI agent directories
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
SKILLS_DIR="$SCRIPT_DIR/.skills"
|
|
8
|
+
|
|
9
|
+
# PROJECT_DIR: where superspec/ dirs are created.
|
|
10
|
+
# When called via `superspecs install`, the CLI passes the user's CWD via env var.
|
|
11
|
+
# Falls back to SCRIPT_DIR for direct `bash setup.sh` usage inside the repo.
|
|
12
|
+
PROJECT_DIR="${SUPERSPECS_PROJECT_DIR:-$SCRIPT_DIR}"
|
|
13
|
+
|
|
14
|
+
# SUPERSPECS_SKIP_SYMLINKS=1 skips global/project skill symlinking (used by `superspecs init`)
|
|
15
|
+
SKIP_SYMLINKS="${SUPERSPECS_SKIP_SYMLINKS:-0}"
|
|
16
|
+
|
|
17
|
+
echo ""
|
|
18
|
+
echo "╔══════════════════════════════════════════════════════════╗"
|
|
19
|
+
echo "║ SuperSpecs Setup ║"
|
|
20
|
+
echo "║ Plan · Execute · Verify · Ship ║"
|
|
21
|
+
echo "╚══════════════════════════════════════════════════════════╝"
|
|
22
|
+
echo ""
|
|
23
|
+
|
|
24
|
+
# ─── Helper ───────────────────────────────────────────────────────────────────
|
|
25
|
+
|
|
26
|
+
symlink_skills() {
|
|
27
|
+
local target_dir="$1"
|
|
28
|
+
local label="$2"
|
|
29
|
+
mkdir -p "$target_dir"
|
|
30
|
+
for skill_dir in "$SKILLS_DIR"/*/; do
|
|
31
|
+
skill_name=$(basename "$skill_dir")
|
|
32
|
+
skill_file="$skill_dir/SKILL.md"
|
|
33
|
+
if [ -f "$skill_file" ]; then
|
|
34
|
+
ln -sf "$skill_file" "$target_dir/$skill_name.md" 2>/dev/null || true
|
|
35
|
+
fi
|
|
36
|
+
done
|
|
37
|
+
echo " ✓ $label"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
# ─── Project-level + Global symlinks ────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
if [ "$SKIP_SYMLINKS" != "1" ]; then
|
|
43
|
+
echo "→ Project-level agent skills..."
|
|
44
|
+
symlink_skills "$PROJECT_DIR/.claude/skills" "Claude Code (project)"
|
|
45
|
+
symlink_skills "$PROJECT_DIR/.cursor/skills" "Cursor (project)"
|
|
46
|
+
symlink_skills "$PROJECT_DIR/.windsurf/skills" "Windsurf (project)"
|
|
47
|
+
symlink_skills "$PROJECT_DIR/.agents/skills" "OpenCode / Aider / generic (project)"
|
|
48
|
+
|
|
49
|
+
echo ""
|
|
50
|
+
echo "→ Global agent skills..."
|
|
51
|
+
symlink_skills "$HOME/.claude/skills" "Claude Code (global)"
|
|
52
|
+
symlink_skills "$HOME/.codex/skills" "Codex (global)"
|
|
53
|
+
symlink_skills "$HOME/.gemini/skills" "Gemini CLI (global)"
|
|
54
|
+
symlink_skills "$HOME/.copilot/skills" "GitHub Copilot CLI (global)"
|
|
55
|
+
symlink_skills "$HOME/.agents/skills" "OpenCode (global)"
|
|
56
|
+
|
|
57
|
+
[ -d "$HOME/.windsurf" ] && symlink_skills "$HOME/.windsurf/skills" "Windsurf (global)"
|
|
58
|
+
[ -d "$HOME/.cursor" ] && symlink_skills "$HOME/.cursor/skills" "Cursor (global)"
|
|
59
|
+
[ -d "$HOME/.kiro" ] && symlink_skills "$HOME/.kiro/skills" "Kiro (global)"
|
|
60
|
+
[ -d "$HOME/.pi" ] && symlink_skills "$HOME/.pi/agent/skills" "Pi (global)"
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# ─── Initialize SuperSpecs directories ───────────────────────────────────────
|
|
64
|
+
|
|
65
|
+
echo ""
|
|
66
|
+
echo "→ Initializing project structure..."
|
|
67
|
+
|
|
68
|
+
mkdir -p "$PROJECT_DIR/superspec/specs"
|
|
69
|
+
mkdir -p "$PROJECT_DIR/superspec/phases"
|
|
70
|
+
mkdir -p "$PROJECT_DIR/superspec/archive"
|
|
71
|
+
mkdir -p "$PROJECT_DIR/superspec/wiki"
|
|
72
|
+
|
|
73
|
+
if [ ! -f "$PROJECT_DIR/superspec/wiki/_index.md" ]; then
|
|
74
|
+
cat > "$PROJECT_DIR/superspec/wiki/_index.md" << 'WIKIEOF'
|
|
75
|
+
# Project Wiki
|
|
76
|
+
|
|
77
|
+
Maintained by SuperSpecs. Distilled knowledge from shipped features.
|
|
78
|
+
|
|
79
|
+
## Domains
|
|
80
|
+
|
|
81
|
+
(Added automatically via /wiki after each shipped feature)
|
|
82
|
+
|
|
83
|
+
## Recent Updates
|
|
84
|
+
|
|
85
|
+
(Updated by /wiki)
|
|
86
|
+
WIKIEOF
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
if [ ! -f "$PROJECT_DIR/superspec/wiki/_manifest.json" ]; then
|
|
90
|
+
echo '{"sources":[]}' > "$PROJECT_DIR/superspec/wiki/_manifest.json"
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
# ─── Done ─────────────────────────────────────────────────────────────────────
|
|
94
|
+
|
|
95
|
+
echo ""
|
|
96
|
+
echo "╔══════════════════════════════════════════════════════════╗"
|
|
97
|
+
echo "║ SuperSpecs ready! ║"
|
|
98
|
+
echo "╚══════════════════════════════════════════════════════════╝"
|
|
99
|
+
echo ""
|
|
100
|
+
echo " Open your agent and say: \"Tell me about your superspecs\""
|
|
101
|
+
echo ""
|
|
102
|
+
echo " Start your first feature:"
|
|
103
|
+
echo " /discuss ← capture decisions"
|
|
104
|
+
echo " /spec ← write the spec"
|
|
105
|
+
echo " /pick-spec ← validate + prepare"
|
|
106
|
+
echo " /branch ← create worktree"
|
|
107
|
+
echo " /subagent ← execute with TDD"
|
|
108
|
+
echo " /check-tests"
|
|
109
|
+
echo " /wiki"
|
|
110
|
+
echo " /ship"
|
|
111
|
+
echo ""
|