spec-driven-with-beads 1.1.5 → 3.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 +17 -18
- package/openspec/schemas/spec-driven-with-beads/README.md +65 -18
- package/openspec/schemas/spec-driven-with-beads/schema.yaml +149 -70
- package/openspec/schemas/spec-driven-with-beads/templates/spec-compliance.aspect.toml +21 -0
- package/openspec/schemas/spec-driven-with-beads/templates/spec-driven-change.formula.toml +75 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
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
|
-
Other spec-driven schemas end at `archive` — move files,
|
|
11
|
+
Other spec-driven schemas end at `archive` — move files, done. Knowledge dies with the session.
|
|
12
12
|
|
|
13
|
-
This schema
|
|
13
|
+
This schema uses Beads' **formula + molecule** system. One `bd pour` creates the entire dependency graph with mandatory `needs:` dependencies, then **consolidate** closes the learning loop — `bd remember` persists lessons as durable memories, `bd mol distill` extracts reusable formulas from completed work.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|-------|-------------|
|
|
17
|
-
| `tasks` | Writes `tasks.md` AND seeds Beads via `bd create` + `bd dep add` |
|
|
18
|
-
| `apply` | Drives work through `bd ready` → `bd update --claim` → code → `bd close` |
|
|
19
|
-
| **`consolidate`** | `bd close` remaining → **`bd compact`** → **`bd remember`** → `openspec archive` |
|
|
15
|
+
### Key features
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
- **Mandatory dependency graph** — the formula defines `needs:` between every step. `bd ready` only shows unblocked work. No manual `bd dep add`.
|
|
18
|
+
- **Spec-compliance aspect** — auto-injects a "Verify specs pass" step before consolidate. No config needed.
|
|
19
|
+
- **Bond points for optional behavior** — parallel multi-agent execution, async gates (human approval/CI/timers). Bond a formula to unlock; bond nothing = sequential.
|
|
20
|
+
- **`bd mol squash`** — compresses completed molecules into lightweight digests. Clean issue graph.
|
|
21
|
+
- **`bd mol distill`** — extracts reusable formulas from completed changes. The schema teaches itself.
|
|
22
|
+
- **`bd remember`** — persists learnings that `bd prime` injects into every future session.
|
|
24
23
|
|
|
25
24
|
## Requirements
|
|
26
25
|
|
|
@@ -34,23 +33,23 @@ No other OpenSpec schema does this. No task tracker (Linear, GitHub Issues, Jira
|
|
|
34
33
|
npm install -g spec-driven-with-beads
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
This copies the schema into OpenSpec's global schemas, making it available in any project.
|
|
38
|
-
|
|
39
36
|
## Usage
|
|
40
37
|
|
|
41
|
-
In
|
|
38
|
+
In `openspec/config.yaml`:
|
|
42
39
|
|
|
43
40
|
```yaml
|
|
44
41
|
schema: spec-driven-with-beads
|
|
45
42
|
```
|
|
46
43
|
|
|
47
|
-
Then
|
|
44
|
+
Then:
|
|
48
45
|
- `/opsx:propose "my feature"`
|
|
49
|
-
- `/opsx:apply`
|
|
50
|
-
- `/opsx:consolidate` —
|
|
46
|
+
- `/opsx:apply` — driven by molecule step order
|
|
47
|
+
- `/opsx:consolidate` — lint, squash, remember, distill, archive
|
|
51
48
|
|
|
52
49
|
## Links
|
|
53
50
|
|
|
54
51
|
- [OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
55
52
|
- [Beads](https://github.com/gastownhall/beads)
|
|
53
|
+
- [Beads Formula docs](https://gastownhall.github.io/beads/workflows/formulas)
|
|
54
|
+
- [Beads Molecule docs](https://gastownhall.github.io/beads/workflows/molecules)
|
|
56
55
|
- [Community schema catalog](https://github.com/intent-driven-dev/openspec-schemas)
|
|
@@ -1,39 +1,86 @@
|
|
|
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
|
+
## Molecule structure
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
```
|
|
14
|
+
bd-xyz (epic: Spec-driven Change: my-feature)
|
|
15
|
+
├── bd-xyz.1 proposal (human, needs: —)
|
|
16
|
+
├── bd-xyz.2 specs (needs: proposal)
|
|
17
|
+
├── bd-xyz.3 design (needs: specs)
|
|
18
|
+
├── bd-xyz.4 implement (needs: design)
|
|
19
|
+
├── bd-xyz.5 verify-specs-consolidate (auto-injected by spec-compliance aspect)
|
|
20
|
+
└── bd-xyz.6 consolidate (human, needs: implement, verify-specs)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
One `bd pour` creates the entire graph. No manual `bd create` × N.
|
|
24
|
+
|
|
25
|
+
## What makes this different
|
|
26
|
+
|
|
27
|
+
Other schemas end at `archive` — knowledge dies with the session. This one closes the learning loop via `bd remember` + `bd mol distill`.
|
|
28
|
+
|
|
29
|
+
### Key features
|
|
30
|
+
|
|
31
|
+
| Feature | Description | Default |
|
|
32
|
+
|---------|-------------|---------|
|
|
33
|
+
| Mandatory deps | `needs:` in formula — `bd ready` only shows unblocked steps | Always on |
|
|
34
|
+
| Spec-compliance aspect | Auto-injects "Verify specs pass" before consolidate | Always on |
|
|
35
|
+
| Bond points | Compose additional behavior without forking the schema | Opt-in |
|
|
36
|
+
| `bd pin` | Pin steps to specific agents for parallel work | Opt-in (bond) |
|
|
37
|
+
| Async gates | Human approval, timers, CI checks | Opt-in (bond) |
|
|
38
|
+
| `bd lint` | Structural validation in consolidate | Always on |
|
|
39
|
+
| `bd mol squash` | Compress completed molecule to lightweight digest | Always on |
|
|
40
|
+
| `bd mol distill` | Extract reusable formula from completed change | Agent discretion |
|
|
41
|
+
| `bd remember` | Persist learnings across sessions via `bd prime` | Always on |
|
|
42
|
+
|
|
43
|
+
### Bond points
|
|
21
44
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
45
|
+
The formula defines three bond points where optional formulas attach:
|
|
46
|
+
|
|
47
|
+
| Bond point | Position | Optional behavior |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `parallel-execution` | After implement | Split implement into parallel sub-steps, one per capability, each pinned to a different agent. Uses `waits_for` (fan-in) to rejoin before consolidate |
|
|
50
|
+
| `async-gates` | Before implement | Add human approval gates, timer delays, or GitHub CI checks. Blocks step progression until conditions are met |
|
|
51
|
+
|
|
52
|
+
Bond nothing → sequential, no extra config. Bond a formula → unlock the feature.
|
|
26
53
|
|
|
27
54
|
## Requirements
|
|
28
55
|
|
|
29
56
|
- [Beads](https://github.com/gastownhall/beads) installed (`bd` on PATH)
|
|
30
|
-
- `bd init` run in
|
|
31
|
-
-
|
|
57
|
+
- `bd init` run in your project
|
|
58
|
+
- OpenSpec installed (`npm install -g @fission-ai/openspec`)
|
|
59
|
+
|
|
60
|
+
## Install
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm install -g spec-driven-with-beads
|
|
64
|
+
```
|
|
32
65
|
|
|
33
|
-
##
|
|
66
|
+
## Usage
|
|
34
67
|
|
|
35
68
|
In `openspec/config.yaml`:
|
|
36
69
|
|
|
37
70
|
```yaml
|
|
38
71
|
schema: spec-driven-with-beads
|
|
39
72
|
```
|
|
73
|
+
|
|
74
|
+
Then:
|
|
75
|
+
- `/opsx:propose "my feature"`
|
|
76
|
+
- `/opsx:apply` — driven by molecule step order
|
|
77
|
+
- `/opsx:consolidate` — lint, squash, remember, distill, archive
|
|
78
|
+
|
|
79
|
+
## Links
|
|
80
|
+
|
|
81
|
+
- [OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
82
|
+
- [Beads](https://github.com/gastownhall/beads)
|
|
83
|
+
- [Beads Formula docs](https://gastownhall.github.io/beads/workflows/formulas)
|
|
84
|
+
- [Beads Molecule docs](https://gastownhall.github.io/beads/workflows/molecules)
|
|
85
|
+
- [Beads Aspect docs](https://gastownhall.github.io/beads/workflows/formulas#aspects-cross-cutting)
|
|
86
|
+
- [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: 3
|
|
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,96 @@ 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
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
- Each task MUST be a checkbox: `- [ ] X.Y Task description`
|
|
131
|
+
Also copy the spec-compliance aspect:
|
|
132
|
+
```
|
|
133
|
+
cp openspec/schemas/spec-driven-with-beads/templates/spec-compliance.aspect.toml .beads/formulas/spec-compliance.aspect.toml
|
|
134
|
+
```
|
|
153
135
|
|
|
154
|
-
|
|
136
|
+
The aspect auto-injects a "Verify spec scenarios pass" step before
|
|
137
|
+
consolidate — no further action needed.
|
|
155
138
|
|
|
156
|
-
- Order tasks by dependency (what must be done first?)
|
|
157
139
|
|
|
140
|
+
**2. Pour the molecule**
|
|
158
141
|
|
|
159
|
-
|
|
142
|
+
Run:
|
|
160
143
|
|
|
144
|
+
```
|
|
145
|
+
bd pour spec-driven-change --var name=<change-name>
|
|
161
146
|
```
|
|
162
147
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
- [ ] 1.1 Create new module structure
|
|
166
|
-
|
|
167
|
-
- [ ] 1.2 Add dependencies to package.json
|
|
148
|
+
This creates a molecule (parent epic + 5 child steps) with proper
|
|
149
|
+
`needs` dependencies:
|
|
168
150
|
|
|
169
|
-
|
|
151
|
+
```
|
|
152
|
+
bd-xyz (epic: Spec-driven Change: <change-name>)
|
|
153
|
+
├── bd-xyz.1 proposal (human, needs: —)
|
|
154
|
+
├── bd-xyz.2 specs (needs: proposal)
|
|
155
|
+
├── bd-xyz.3 design (needs: specs)
|
|
156
|
+
├── bd-xyz.4 implement (needs: design)
|
|
157
|
+
│ └── [on_complete → bd ready]
|
|
158
|
+
├── bd-xyz.5 verify-specs-consolidate (auto-injected by aspect)
|
|
159
|
+
└── bd-xyz.6 consolidate (human, needs: implement, verify-specs)
|
|
160
|
+
```
|
|
170
161
|
|
|
171
|
-
|
|
162
|
+
The dependency chain is built into the formula — no manual `bd dep add` needed.
|
|
172
163
|
|
|
173
|
-
|
|
164
|
+
**Optional — parallel capability implementation (multi-agent):**
|
|
165
|
+
If the change has multiple capabilities and you have multiple agents,
|
|
166
|
+
bond a multi-agent formula at the `parallel-execution` bond point:
|
|
167
|
+
```
|
|
168
|
+
bd mol bond mol-parallel-execution <mol-id> --ref parallel-execution
|
|
169
|
+
```
|
|
170
|
+
This splits the implement step into N sub-steps (one per capability),
|
|
171
|
+
each pinned to a different agent with `bd pin`. All sub-steps use
|
|
172
|
+
`waits_for` (fan-in) to rejoin before consolidate.
|
|
174
173
|
|
|
174
|
+
**Optional — async gates (human approval, CI checks):**
|
|
175
|
+
Bond a gated formula at the `async-gates` bond point:
|
|
176
|
+
```
|
|
177
|
+
bd mol bond mol-gated-approval <mol-id> --ref async-gates
|
|
175
178
|
```
|
|
179
|
+
This adds human approval gates before implementation, timer delays,
|
|
180
|
+
or GitHub CI checks.
|
|
176
181
|
|
|
182
|
+
If you don't bond anything, the molecule runs sequential —
|
|
183
|
+
no extra configuration needed.
|
|
177
184
|
|
|
178
|
-
Reference specs for what needs to be built, design for how to build it.
|
|
179
185
|
|
|
180
|
-
|
|
186
|
+
**3. Label the molecule**
|
|
181
187
|
|
|
188
|
+
```
|
|
189
|
+
bd label add <mol-id> change:<change-name>
|
|
190
|
+
bd label add <mol-id> schema:spec-driven-with-beads
|
|
191
|
+
bd label add <mol-id> mode:sequential
|
|
192
|
+
```
|
|
193
|
+
Use `mode:parallel` if you bonded a multi-agent formula.
|
|
182
194
|
|
|
183
|
-
**After writing tasks.md, seed Beads:**
|
|
184
195
|
|
|
185
|
-
|
|
186
|
-
parent epic, then for each task run:
|
|
196
|
+
**4. Set acceptance criteria for the implement step**
|
|
187
197
|
|
|
188
198
|
```
|
|
189
|
-
bd
|
|
199
|
+
bd update <mol-id>.4 --acceptance "All spec scenarios pass. Tests added."
|
|
190
200
|
```
|
|
191
201
|
|
|
192
|
-
Then link dependencies using `bd dep add <child> <parent>`.
|
|
193
202
|
|
|
194
|
-
|
|
203
|
+
**5. Write tasks.md**
|
|
204
|
+
|
|
205
|
+
Write the standard OpenSpec tasks.md for human readability.
|
|
206
|
+
The molecule is the source of truth; tasks.md is a view.
|
|
195
207
|
requires:
|
|
196
208
|
- specs
|
|
197
209
|
- design
|
|
@@ -201,30 +213,76 @@ apply:
|
|
|
201
213
|
- tasks
|
|
202
214
|
tracks: tasks.md
|
|
203
215
|
instruction: |
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
Drive implementation through the molecule. The dependency graph
|
|
217
|
+
enforces order automatically.
|
|
218
|
+
|
|
219
|
+
Sequential (default — no bonding needed):
|
|
220
|
+
1. Run `bd mol list --json` to find the molecule for this change.
|
|
221
|
+
2. Run `bd dep tree <mol-id>` to see the step hierarchy.
|
|
222
|
+
3. Run `bd ready` — only shows steps whose needs are met.
|
|
223
|
+
4. For the next ready step, claim it:
|
|
224
|
+
```
|
|
225
|
+
bd update <mol-id>.N --claim
|
|
226
|
+
```
|
|
227
|
+
5. Read specs/design for context, implement the code.
|
|
228
|
+
6. Run acceptance criteria check if applicable:
|
|
229
|
+
```
|
|
230
|
+
bd show <mol-id>.N # view acceptance criteria
|
|
231
|
+
```
|
|
232
|
+
7. Close the step:
|
|
233
|
+
```
|
|
234
|
+
bd close <mol-id>.N --reason "Implemented"
|
|
235
|
+
```
|
|
236
|
+
8. Run `bd ready` again — next step in the chain becomes available.
|
|
237
|
+
The `on_complete` hook on the implement step runs `bd ready` automatically.
|
|
238
|
+
9. Repeat until all steps are closed.
|
|
239
|
+
|
|
240
|
+
Parallel (if bonded at parallel-execution bond point):
|
|
241
|
+
1. Run `bd dep tree <mol-id>` to see the sub-step hierarchy.
|
|
242
|
+
2. Each sub-step is pinned to an agent via `bd pin`.
|
|
243
|
+
3. Each agent claims, implements, and closes their sub-step independently.
|
|
244
|
+
4. The consolidate step waits for ALL sub-steps via `waits_for` (fan-in).
|
|
245
|
+
5. Use `bd blocked` to check if any sub-step is blocking the fan-in.
|
|
246
|
+
|
|
247
|
+
Async (if bonded at async-gates bond point):
|
|
248
|
+
1. Run `bd show <mol-id>.N` to check gate state.
|
|
249
|
+
2. For human gates: wait for approval via `bd gate approve`.
|
|
250
|
+
3. For timer gates: `bd show` shows remaining duration.
|
|
251
|
+
4. For GitHub gates: `bd show` shows CI/PR status.
|
|
252
|
+
5. Emergency override: `bd gate skip <mol-id>.N --reason "..."`.
|
|
253
|
+
|
|
254
|
+
Tips:
|
|
255
|
+
- `bd blocked` shows steps waiting on dependencies.
|
|
256
|
+
- `bd stats` shows molecule progress.
|
|
257
|
+
- `bd show <mol-id>.N --json | jq '.gate'` shows gate details.
|
|
258
|
+
- Mark tasks.md checkboxes for human readability, but the molecule
|
|
259
|
+
is the source of truth.
|
|
260
|
+
|
|
261
|
+
Pause if you hit blockers or need clarification.
|
|
218
262
|
|
|
219
263
|
consolidate:
|
|
220
264
|
requires:
|
|
221
265
|
- apply
|
|
222
266
|
instruction: |
|
|
223
|
-
|
|
267
|
+
Close the molecule and persist learnings.
|
|
268
|
+
|
|
269
|
+
1. Verify all steps are closed:
|
|
270
|
+
```
|
|
271
|
+
bd mol show <mol-id>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
2. Run structural validation:
|
|
275
|
+
```
|
|
276
|
+
bd lint
|
|
277
|
+
```
|
|
278
|
+
All issues MUST pass lint. If any fail, fix them before proceeding.
|
|
279
|
+
|
|
280
|
+
3. Run molecule compaction:
|
|
281
|
+
```
|
|
282
|
+
bd compact
|
|
283
|
+
```
|
|
224
284
|
|
|
225
|
-
|
|
226
|
-
2. Compact old closed issues: `bd compact`
|
|
227
|
-
3. Distill learnings from this change and persist them:
|
|
285
|
+
4. Distill learnings from this change:
|
|
228
286
|
```
|
|
229
287
|
bd remember --key spec-driven-beads-<change-name> "Lessons from this change:
|
|
230
288
|
- What unexpected problems did you encounter?
|
|
@@ -232,6 +290,27 @@ consolidate:
|
|
|
232
290
|
- Any surprising edge cases or constraints?
|
|
233
291
|
- What should the next similar change do differently?"
|
|
234
292
|
```
|
|
235
|
-
4. Run the OpenSpec archive command: `openspec archive` (moves change folder, updates source specs)
|
|
236
293
|
|
|
237
|
-
|
|
294
|
+
5. Squash the molecule into a digest issue:
|
|
295
|
+
```
|
|
296
|
+
bd mol squash <mol-id> --summary "Spec-driven change: <change-name>"
|
|
297
|
+
```
|
|
298
|
+
This compresses the 5 child steps into a single lightweight record.
|
|
299
|
+
The molecule remains searchable but no longer clutters the issue graph.
|
|
300
|
+
|
|
301
|
+
6. Optionally extract a reusable formula (if this change
|
|
302
|
+
represents a repeatable pattern):
|
|
303
|
+
```
|
|
304
|
+
bd mol distill <mol-id> my-pattern
|
|
305
|
+
```
|
|
306
|
+
This creates `.beads/formulas/my-pattern.formula.toml` from the
|
|
307
|
+
completed change. Future projects can `bd pour my-pattern`.
|
|
308
|
+
|
|
309
|
+
7. Label and archive:
|
|
310
|
+
```
|
|
311
|
+
bd label add <mol-id> status:consolidated
|
|
312
|
+
openspec archive
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Future `bd prime` calls will inject the learnings into every session.
|
|
316
|
+
The squashed digest and distilled formulas persist beyond the change.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
formula = "spec-compliance"
|
|
2
|
+
description = "Auto-inject spec compliance verification before consolidate"
|
|
3
|
+
version = 1
|
|
4
|
+
type = "aspect"
|
|
5
|
+
|
|
6
|
+
# This aspect targets any step named "consolidate" and injects a
|
|
7
|
+
# spec-verification pre-step. Applied automatically when the aspect file
|
|
8
|
+
# exists in .beads/formulas/.
|
|
9
|
+
|
|
10
|
+
[[advice]]
|
|
11
|
+
target = "*.consolidate"
|
|
12
|
+
|
|
13
|
+
[advice.before]
|
|
14
|
+
id = "verify-specs-{step.id}"
|
|
15
|
+
title = "Verify spec scenarios pass for {step.title}"
|
|
16
|
+
needs = ["implement"]
|
|
17
|
+
type = "task"
|
|
18
|
+
description = >
|
|
19
|
+
Read the spec files at openspec/changes/{{name}}/specs/ and verify
|
|
20
|
+
every scenario passes against the implementation. If any scenario
|
|
21
|
+
fails, block consolidate until the issue is resolved.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
formula = "spec-driven-change"
|
|
2
|
+
description = "OpenSpec spec-driven change with Beads"
|
|
3
|
+
version = 2
|
|
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
|
+
# Base dependency chain: proposal -> specs -> design -> implement -> consolidate
|
|
15
|
+
#
|
|
16
|
+
# Bond points for optional composition:
|
|
17
|
+
# parallel-execution (after implement) — split implement into parallel sub-steps
|
|
18
|
+
# Bond a multi-agent formula here for parallel capability implementation.
|
|
19
|
+
# Each sub-step gets its own bd pin for agent assignment.
|
|
20
|
+
# Uses waits_for (fan-in) to rejoin before consolidate.
|
|
21
|
+
#
|
|
22
|
+
# async-gates (before implement) — add gates for async coordination
|
|
23
|
+
# Bond a gated formula here for human approval gates, CI checks, or timers.
|
|
24
|
+
# Gates block step progression until conditions are met.
|
|
25
|
+
#
|
|
26
|
+
# spec-compliance (before consolidate) — auto-injected by aspect
|
|
27
|
+
# The spec-compliance.aspect.toml injects "Verify specs pass" here.
|
|
28
|
+
# Applied automatically when the aspect is installed in .beads/formulas/.
|
|
29
|
+
|
|
30
|
+
[[compose.bond_points]]
|
|
31
|
+
id = "parallel-execution"
|
|
32
|
+
step = "implement"
|
|
33
|
+
position = "after"
|
|
34
|
+
description = "Bond a multi-agent formula here to split implement into parallel sub-steps per capability"
|
|
35
|
+
|
|
36
|
+
[[compose.bond_points]]
|
|
37
|
+
id = "async-gates"
|
|
38
|
+
step = "implement"
|
|
39
|
+
position = "before"
|
|
40
|
+
description = "Bond a gated formula here for human approval, CI checks, or timer gates"
|
|
41
|
+
|
|
42
|
+
# Base steps
|
|
43
|
+
|
|
44
|
+
[[steps]]
|
|
45
|
+
id = "proposal"
|
|
46
|
+
title = "Review proposal for {{name}}"
|
|
47
|
+
type = "human"
|
|
48
|
+
description = "Review the proposal document at openspec/changes/{{name}}/proposal.md"
|
|
49
|
+
|
|
50
|
+
[[steps]]
|
|
51
|
+
id = "specs"
|
|
52
|
+
title = "Write specs for {{name}}"
|
|
53
|
+
needs = ["proposal"]
|
|
54
|
+
description = "Create spec files under openspec/changes/{{name}}/specs/"
|
|
55
|
+
|
|
56
|
+
[[steps]]
|
|
57
|
+
id = "design"
|
|
58
|
+
title = "Design {{name}}"
|
|
59
|
+
needs = ["specs"]
|
|
60
|
+
description = "Write design document at openspec/changes/{{name}}/design.md"
|
|
61
|
+
|
|
62
|
+
[[steps]]
|
|
63
|
+
id = "implement"
|
|
64
|
+
title = "Implement {{name}}"
|
|
65
|
+
needs = ["design"]
|
|
66
|
+
description = "Implement the change per specs and design"
|
|
67
|
+
[steps.on_complete]
|
|
68
|
+
run = "bd ready"
|
|
69
|
+
|
|
70
|
+
[[steps]]
|
|
71
|
+
id = "consolidate"
|
|
72
|
+
title = "Consolidate {{name}}"
|
|
73
|
+
needs = ["implement"]
|
|
74
|
+
type = "human"
|
|
75
|
+
description = "Lint, squash, remember learnings, archive"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-driven-with-beads",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "OpenSpec custom schema using Beads
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "OpenSpec custom schema using Beads molecules with bond points, aspects, and distill for spec-driven development",
|
|
5
5
|
"keywords": ["openspec", "beads", "spec-driven-development", "schema", "sdd"],
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "yoinks-yoinks",
|