spec-driven-with-beads 1.1.5 → 2.0.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,24 +1,29 @@
|
|
|
1
1
|
# spec-driven-with-beads
|
|
2
2
|
|
|
3
|
-
OpenSpec custom schema that uses [Beads](https://github.com/gastownhall/beads)
|
|
3
|
+
OpenSpec custom schema that uses [Beads](https://github.com/gastownhall/beads) molecules for task tracking, execution, and durable knowledge retention across sessions.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
proposal → specs → design → tasks+beads → apply (via
|
|
6
|
+
proposal → specs → design → tasks+beads → apply (via molecule) → consolidate
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
## What makes this different
|
|
10
10
|
|
|
11
11
|
Other spec-driven schemas end at `archive` — move files, update specs, done. Knowledge dies with the session.
|
|
12
12
|
|
|
13
|
-
This schema
|
|
13
|
+
This schema uses Beads' **formula + molecule** system. One `bd pour` command creates the entire dependency graph:
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
```
|
|
16
|
+
bd-xyz (epic: Spec-driven Change: my-feature)
|
|
17
|
+
├── bd-xyz.1 proposal (human)
|
|
18
|
+
├── bd-xyz.2 specs (needs: proposal)
|
|
19
|
+
├── bd-xyz.3 design (needs: specs)
|
|
20
|
+
├── bd-xyz.4 implement (needs: design)
|
|
21
|
+
└── bd-xyz.5 consolidate (human, needs: implement)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
No manual `bd create` × N. No manual `bd dep add` × N. The formula defines the graph.
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
Then **`consolidate`** closes the loop — `bd remember` persists lessons as durable memories that `bd prime` injects into every future session. No context loss, no rediscovery.
|
|
22
27
|
|
|
23
28
|
No other OpenSpec schema does this. No task tracker (Linear, GitHub Issues, Jira) has a `bd remember` equivalent.
|
|
24
29
|
|
|
@@ -46,11 +51,13 @@ schema: spec-driven-with-beads
|
|
|
46
51
|
|
|
47
52
|
Then use standard OpenSpec commands:
|
|
48
53
|
- `/opsx:propose "my feature"`
|
|
49
|
-
- `/opsx:apply`
|
|
50
|
-
- `/opsx:consolidate` —
|
|
54
|
+
- `/opsx:apply` — driven by molecule step order
|
|
55
|
+
- `/opsx:consolidate` — remember, compact, archive
|
|
51
56
|
|
|
52
57
|
## Links
|
|
53
58
|
|
|
54
59
|
- [OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
55
60
|
- [Beads](https://github.com/gastownhall/beads)
|
|
61
|
+
- [Beads Formula docs](https://gastownhall.github.io/beads/workflows/formulas)
|
|
62
|
+
- [Beads Molecule docs](https://gastownhall.github.io/beads/workflows/molecules)
|
|
56
63
|
- [Community schema catalog](https://github.com/intent-driven-dev/openspec-schemas)
|
|
@@ -1,39 +1,69 @@
|
|
|
1
1
|
# spec-driven-with-beads
|
|
2
2
|
|
|
3
|
-
OpenSpec
|
|
3
|
+
OpenSpec custom schema that uses [Beads](https://github.com/gastownhall/beads) molecules for task tracking, execution, and durable knowledge retention across sessions.
|
|
4
4
|
|
|
5
5
|
## Workflow
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
proposal → specs → design → tasks+beads → apply (via
|
|
8
|
+
proposal → specs → design → tasks+beads → apply (via molecule) → consolidate
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|-------|----------|-------------------|
|
|
13
|
-
| `propose` | `proposal.md` | None |
|
|
14
|
-
| `specs` | `specs/**/*.md` | None |
|
|
15
|
-
| `design` | `design.md` | None |
|
|
16
|
-
| `tasks` | `tasks.md` + seeds Beads | `bd create` for each task, `bd dep add` for dependencies |
|
|
17
|
-
| `apply` | (tracks via Beads) | `bd ready` → `bd update --claim` → code → `bd close` |
|
|
18
|
-
| `consolidate` | (wraps up) | `bd close` remaining → `bd compact` → `bd remember` learnings → `openspec archive` |
|
|
11
|
+
## What makes this different
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
Other schemas end at `archive` — move files, done. This one uses Beads' **formula + molecule** system: one `bd pour` command creates the entire dependency graph as a Beads molecule.
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
| Phase | What happens |
|
|
16
|
+
|-------|-------------|
|
|
17
|
+
| `tasks` | Writes `tasks.md` + **pours a molecule** via `bd pour spec-driven-change --var name=<change>` — creates epic + 5 steps with auto-dependency chain |
|
|
18
|
+
| `apply` | Works through molecule steps: `bd ready` → `bd update --claim` → code → `bd close`. Dependencies enforced by the molecule |
|
|
19
|
+
| `consolidate` | Closes molecule, `bd compact`, **`bd remember`** learnings, `openspec archive`. Knowledge persists via `bd prime` |
|
|
20
|
+
|
|
21
|
+
## Molecule structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
bd-xyz (epic: Spec-driven Change: my-feature)
|
|
25
|
+
├── bd-xyz.1 proposal (human)
|
|
26
|
+
├── bd-xyz.2 specs (needs: proposal)
|
|
27
|
+
├── bd-xyz.3 design (needs: specs)
|
|
28
|
+
├── bd-xyz.4 implement (needs: design)
|
|
29
|
+
└── bd-xyz.5 consolidate (human, needs: implement)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
No manual `bd create` × N or `bd dep add` × N — the formula defines the graph.
|
|
26
33
|
|
|
27
34
|
## Requirements
|
|
28
35
|
|
|
29
36
|
- [Beads](https://github.com/gastownhall/beads) installed (`bd` on PATH)
|
|
30
|
-
- `bd init` run in
|
|
31
|
-
-
|
|
37
|
+
- `bd init` run in your project
|
|
38
|
+
- OpenSpec installed (`npm install -g @fission-ai/openspec`)
|
|
39
|
+
|
|
40
|
+
## Install
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
```bash
|
|
43
|
+
npm install -g spec-driven-with-beads
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This copies the schema into OpenSpec's global schemas.
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
34
49
|
|
|
35
50
|
In `openspec/config.yaml`:
|
|
36
51
|
|
|
37
52
|
```yaml
|
|
38
53
|
schema: spec-driven-with-beads
|
|
39
54
|
```
|
|
55
|
+
|
|
56
|
+
Then standard OpenSpec commands, but with Beads molecule awareness:
|
|
57
|
+
- `/opsx:propose "my feature"`
|
|
58
|
+
- `/opsx:apply` — driven by molecule step order
|
|
59
|
+
- `/opsx:consolidate` — remember, compact, archive
|
|
60
|
+
- `bd label list --label change:my-feature` — find past changes
|
|
61
|
+
- `bd list --label status:consolidated` — search consolidated work
|
|
62
|
+
|
|
63
|
+
## Links
|
|
64
|
+
|
|
65
|
+
- [OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
66
|
+
- [Beads](https://github.com/gastownhall/beads)
|
|
67
|
+
- [Beads Formula docs](https://gastownhall.github.io/beads/workflows/formulas)
|
|
68
|
+
- [Beads Molecule docs](https://gastownhall.github.io/beads/workflows/molecules)
|
|
69
|
+
- [Community schema catalog](https://github.com/intent-driven-dev/openspec-schemas)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: spec-driven-with-beads
|
|
2
|
-
version:
|
|
2
|
+
version: 2
|
|
3
3
|
description: >
|
|
4
4
|
OpenSpec workflow powered by Beads issue tracking.
|
|
5
5
|
proposal -> specs -> design -> tasks+beads -> apply (via Beads) -> consolidate.
|
|
@@ -79,27 +79,6 @@ artifacts:
|
|
|
79
79
|
Common pitfall: Using MODIFIED with partial content loses detail at archive time.
|
|
80
80
|
If adding new concerns without changing existing behavior, use ADDED instead.
|
|
81
81
|
|
|
82
|
-
Example:
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
## ADDED Requirements
|
|
86
|
-
|
|
87
|
-
### Requirement: User can export data
|
|
88
|
-
|
|
89
|
-
The system SHALL allow users to export their data in CSV format.
|
|
90
|
-
|
|
91
|
-
#### Scenario: Successful export
|
|
92
|
-
|
|
93
|
-
- **WHEN** user clicks "Export" button
|
|
94
|
-
- **THEN** system downloads a CSV file with all user data
|
|
95
|
-
|
|
96
|
-
## REMOVED Requirements
|
|
97
|
-
|
|
98
|
-
### Requirement: Legacy export
|
|
99
|
-
|
|
100
|
-
**Reason**: Replaced by new export system
|
|
101
|
-
**Migration**: Use new export endpoint at /api/v2/export
|
|
102
|
-
```
|
|
103
82
|
|
|
104
83
|
Specs should be testable — each scenario is a potential test case.
|
|
105
84
|
requires:
|
|
@@ -135,63 +114,63 @@ artifacts:
|
|
|
135
114
|
|
|
136
115
|
- id: tasks
|
|
137
116
|
generates: tasks.md
|
|
138
|
-
description:
|
|
117
|
+
description: >
|
|
118
|
+
Implementation checklist. Seeds Beads molecule via formula pour —
|
|
119
|
+
one command creates the entire dependency graph.
|
|
139
120
|
template: tasks.md
|
|
140
121
|
instruction: >
|
|
141
|
-
Create the task list
|
|
142
|
-
corresponding issues in Beads.
|
|
122
|
+
Create the task list AND seed Beads using the formula + molecule system.
|
|
143
123
|
|
|
144
124
|
|
|
145
|
-
**
|
|
125
|
+
**1. Ensure the spec-driven-change formula exists**
|
|
146
126
|
|
|
127
|
+
If `.beads/formulas/spec-driven-change.formula.toml` does not exist,
|
|
128
|
+
create it from the template at
|
|
129
|
+
`openspec/schemas/spec-driven-with-beads/templates/spec-driven-change.formula.toml`.
|
|
147
130
|
|
|
148
|
-
Guidelines:
|
|
149
131
|
|
|
150
|
-
|
|
132
|
+
**2. Pour the molecule**
|
|
151
133
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
- Tasks should be small enough to complete in one session
|
|
155
|
-
|
|
156
|
-
- Order tasks by dependency (what must be done first?)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
Example:
|
|
134
|
+
Run:
|
|
160
135
|
|
|
136
|
+
```
|
|
137
|
+
bd pour spec-driven-change --var name=<change-name>
|
|
161
138
|
```
|
|
162
139
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
- [ ] 1.1 Create new module structure
|
|
166
|
-
|
|
167
|
-
- [ ] 1.2 Add dependencies to package.json
|
|
168
|
-
|
|
169
|
-
## 2. Core Implementation
|
|
170
|
-
|
|
171
|
-
- [ ] 2.1 Implement data export function
|
|
172
|
-
|
|
173
|
-
- [ ] 2.2 Add CSV formatting utilities
|
|
140
|
+
This creates a molecule (parent epic + 5 child steps) with proper
|
|
141
|
+
`needs` dependencies:
|
|
174
142
|
|
|
143
|
+
```
|
|
144
|
+
bd-xyz (epic: Spec-driven Change: <change-name>)
|
|
145
|
+
├── bd-xyz.1 proposal (human, needs: —)
|
|
146
|
+
├── bd-xyz.2 specs (needs: proposal)
|
|
147
|
+
├── bd-xyz.3 design (needs: specs)
|
|
148
|
+
├── bd-xyz.4 implement (needs: design)
|
|
149
|
+
└── bd-xyz.5 consolidate (human, needs: implement)
|
|
175
150
|
```
|
|
176
151
|
|
|
152
|
+
The dependency chain is built into the formula — no manual `bd dep add` needed.
|
|
177
153
|
|
|
178
|
-
Reference specs for what needs to be built, design for how to build it.
|
|
179
154
|
|
|
180
|
-
|
|
155
|
+
**3. Label the molecule**
|
|
181
156
|
|
|
157
|
+
```
|
|
158
|
+
bd label add bd-xyz change:<change-name>
|
|
159
|
+
bd label add bd-xyz schema:spec-driven-with-beads
|
|
160
|
+
```
|
|
182
161
|
|
|
183
|
-
**After writing tasks.md, seed Beads:**
|
|
184
162
|
|
|
185
|
-
|
|
186
|
-
parent epic, then for each task run:
|
|
163
|
+
**4. Set acceptance criteria for the implement step**
|
|
187
164
|
|
|
188
165
|
```
|
|
189
|
-
bd
|
|
166
|
+
bd update bd-xyz.4 --acceptance "All spec scenarios pass. Tests added."
|
|
190
167
|
```
|
|
191
168
|
|
|
192
|
-
Then link dependencies using `bd dep add <child> <parent>`.
|
|
193
169
|
|
|
194
|
-
|
|
170
|
+
**5. Write tasks.md**
|
|
171
|
+
|
|
172
|
+
Write the standard OpenSpec tasks.md for human readability.
|
|
173
|
+
The molecule is the source of truth; tasks.md is a view.
|
|
195
174
|
requires:
|
|
196
175
|
- specs
|
|
197
176
|
- design
|
|
@@ -201,30 +180,52 @@ apply:
|
|
|
201
180
|
- tasks
|
|
202
181
|
tracks: tasks.md
|
|
203
182
|
instruction: |
|
|
204
|
-
|
|
183
|
+
Drive implementation through the molecule. The dependency graph
|
|
184
|
+
enforces order automatically.
|
|
205
185
|
|
|
206
186
|
Workflow:
|
|
207
|
-
1. Run `bd
|
|
208
|
-
2.
|
|
209
|
-
3.
|
|
210
|
-
4.
|
|
211
|
-
|
|
187
|
+
1. Run `bd mol list --json` to find the molecule for this change.
|
|
188
|
+
2. Run `bd dep tree <mol-id>` to see the step hierarchy.
|
|
189
|
+
3. Run `bd ready` — only shows steps whose needs are met.
|
|
190
|
+
4. For the next ready step, claim it:
|
|
191
|
+
```
|
|
192
|
+
bd update <mol-id>.N --claim
|
|
193
|
+
```
|
|
194
|
+
5. Read specs/design for context, implement the code.
|
|
195
|
+
6. Run acceptance criteria check if applicable:
|
|
196
|
+
```
|
|
197
|
+
bd show <mol-id>.N # view acceptance criteria
|
|
198
|
+
```
|
|
199
|
+
7. Close the step:
|
|
200
|
+
```
|
|
201
|
+
bd close <mol-id>.N --reason "Implemented"
|
|
202
|
+
```
|
|
203
|
+
8. Run `bd ready` again — next step in the chain becomes available.
|
|
204
|
+
9. Repeat until all steps are closed.
|
|
212
205
|
|
|
213
|
-
|
|
214
|
-
|
|
206
|
+
Tips:
|
|
207
|
+
- `bd blocked` shows steps waiting on dependencies.
|
|
208
|
+
- `bd stats` shows molecule progress.
|
|
209
|
+
- Mark tasks.md checkboxes for human readability, but the molecule
|
|
210
|
+
is the source of truth.
|
|
215
211
|
|
|
216
|
-
Pause if you hit blockers or need clarification.
|
|
217
|
-
inspect task details, and `bd update <id>` to add notes.
|
|
212
|
+
Pause if you hit blockers or need clarification.
|
|
218
213
|
|
|
219
214
|
consolidate:
|
|
220
215
|
requires:
|
|
221
216
|
- apply
|
|
222
217
|
instruction: |
|
|
223
|
-
|
|
218
|
+
Close the molecule and persist learnings.
|
|
224
219
|
|
|
225
|
-
1.
|
|
226
|
-
|
|
227
|
-
|
|
220
|
+
1. Verify all steps are closed:
|
|
221
|
+
```
|
|
222
|
+
bd mol show <mol-id>
|
|
223
|
+
```
|
|
224
|
+
2. Run molecule compaction:
|
|
225
|
+
```
|
|
226
|
+
bd compact
|
|
227
|
+
```
|
|
228
|
+
3. Distill learnings from this change:
|
|
228
229
|
```
|
|
229
230
|
bd remember --key spec-driven-beads-<change-name> "Lessons from this change:
|
|
230
231
|
- What unexpected problems did you encounter?
|
|
@@ -232,6 +233,14 @@ consolidate:
|
|
|
232
233
|
- Any surprising edge cases or constraints?
|
|
233
234
|
- What should the next similar change do differently?"
|
|
234
235
|
```
|
|
235
|
-
4.
|
|
236
|
+
4. Label the molecule as consolidated:
|
|
237
|
+
```
|
|
238
|
+
bd label add <mol-id> status:consolidated
|
|
239
|
+
```
|
|
240
|
+
5. Run the OpenSpec archive command:
|
|
241
|
+
```
|
|
242
|
+
openspec archive
|
|
243
|
+
```
|
|
236
244
|
|
|
237
|
-
|
|
245
|
+
Future `bd prime` calls will inject the learnings into every session.
|
|
246
|
+
The labeled molecule remains searchable: `bd list --label status:consolidated`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
formula = "spec-driven-change"
|
|
2
|
+
description = "OpenSpec spec-driven change with Beads"
|
|
3
|
+
version = 1
|
|
4
|
+
type = "workflow"
|
|
5
|
+
|
|
6
|
+
[vars.name]
|
|
7
|
+
description = "Change name (kebab-case)"
|
|
8
|
+
required = true
|
|
9
|
+
|
|
10
|
+
[vars.capabilities]
|
|
11
|
+
description = "Comma-separated list of capability names"
|
|
12
|
+
required = false
|
|
13
|
+
|
|
14
|
+
# Phases mirror the OpenSpec schema:
|
|
15
|
+
# proposal -> specs -> design -> apply -> consolidate
|
|
16
|
+
#
|
|
17
|
+
# Human steps for proposal/specs/design require agent review.
|
|
18
|
+
# Gate steps for consolidate ensure learnings are captured.
|
|
19
|
+
|
|
20
|
+
[[steps]]
|
|
21
|
+
id = "proposal"
|
|
22
|
+
title = "Review proposal for {{name}}"
|
|
23
|
+
type = "human"
|
|
24
|
+
description = "Review the proposal document at openspec/changes/{{name}}/proposal.md"
|
|
25
|
+
|
|
26
|
+
[[steps]]
|
|
27
|
+
id = "specs"
|
|
28
|
+
title = "Write specs for {{name}}"
|
|
29
|
+
needs = ["proposal"]
|
|
30
|
+
description = "Create spec files under openspec/changes/{{name}}/specs/"
|
|
31
|
+
|
|
32
|
+
[[steps]]
|
|
33
|
+
id = "design"
|
|
34
|
+
title = "Design {{name}}"
|
|
35
|
+
needs = ["specs"]
|
|
36
|
+
description = "Write design document at openspec/changes/{{name}}/design.md"
|
|
37
|
+
|
|
38
|
+
[[steps]]
|
|
39
|
+
id = "implement"
|
|
40
|
+
title = "Implement {{name}}"
|
|
41
|
+
needs = ["design"]
|
|
42
|
+
description = "Implement the change per specs and design"
|
|
43
|
+
|
|
44
|
+
[[steps]]
|
|
45
|
+
id = "consolidate"
|
|
46
|
+
title = "Consolidate {{name}}"
|
|
47
|
+
needs = ["implement"]
|
|
48
|
+
type = "human"
|
|
49
|
+
description = "Close issues, compact, remember learnings, archive"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-driven-with-beads",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "OpenSpec custom schema using Beads (bd) for task tracking, execution, and knowledge consolidation",
|
|
5
5
|
"keywords": ["openspec", "beads", "spec-driven-development", "schema", "sdd"],
|
|
6
6
|
"license": "MIT",
|