spec-driven-with-beads 1.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.
@@ -0,0 +1,39 @@
1
+ # spec-driven-with-beads
2
+
3
+ OpenSpec workflow that uses Beads (`bd`) for task tracking and execution instead of flat task lists.
4
+
5
+ ## Workflow
6
+
7
+ ```
8
+ proposal → specs → design → tasks+beads → apply (via Beads) → archive
9
+ ```
10
+
11
+ | Phase | Artifact | Beads interaction |
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
+ | `archive` | moves to archive | `bd compact` on closed issues |
19
+
20
+ ## Why Beads?
21
+
22
+ - **Context efficiency** — agent queries `bd ready` for next task instead of re-reading tasks.md
23
+ - **Dependency tracking** — `bd dep add` makes blockers explicit
24
+ - **Persistence** — survive across sessions, no context loss
25
+ - **Progress visibility** — `bd stats`, `bd dep tree` show real status
26
+
27
+ ## Requirements
28
+
29
+ - [Beads](https://github.com/gastownhall/beads) installed (`bd` on PATH)
30
+ - `bd init` run in the project
31
+ - Beads MCP server optional but recommended for richer integration
32
+
33
+ ## Activation
34
+
35
+ In `openspec/config.yaml`:
36
+
37
+ ```yaml
38
+ schema: spec-driven-with-beads
39
+ ```
@@ -0,0 +1,217 @@
1
+ name: spec-driven-with-beads
2
+ version: 1
3
+ description: >
4
+ OpenSpec workflow powered by Beads issue tracking.
5
+ proposal -> specs -> design -> tasks+beads -> apply (via Beads) -> archive (compact).
6
+
7
+ artifacts:
8
+ - id: proposal
9
+ generates: proposal.md
10
+ description: Initial proposal document outlining the change
11
+ template: proposal.md
12
+ instruction: >
13
+ Create the proposal document that establishes WHY this change is needed.
14
+
15
+
16
+ Sections:
17
+
18
+ - **Why**: 1-2 sentences on the problem or opportunity. What problem does
19
+ this solve? Why now?
20
+
21
+ - **What Changes**: Bullet list of changes. Be specific about new
22
+ capabilities, modifications, or removals. Mark breaking changes with
23
+ **BREAKING**.
24
+
25
+ - **New Capabilities**: List capabilities being introduced. Each becomes
26
+ a new `specs/<name>/spec.md`. Use kebab-case names.
27
+
28
+ - **Modified Capabilities**: List existing capabilities whose
29
+ REQUIREMENTS are changing. Check `openspec/specs/` for existing spec
30
+ names. Leave empty if no requirement changes.
31
+
32
+ - **Impact**: Affected code, APIs, dependencies, or systems.
33
+
34
+ IMPORTANT: The Capabilities section is critical. It creates the contract
35
+ between proposal and specs phases.
36
+
37
+ Keep it concise (1-2 pages). Focus on the "why" not the "how" -
38
+ implementation details belong in design.md.
39
+
40
+ This is the foundation — specs, design, and tasks all build on this.
41
+ requires: []
42
+
43
+ - id: specs
44
+ generates: specs/**/*.md
45
+ description: Detailed specifications for the change
46
+ template: spec.md
47
+ instruction: >
48
+ Create specification files that define WHAT the system should do.
49
+
50
+ Create one spec file per capability listed in the proposal's Capabilities
51
+ section.
52
+
53
+ - New capabilities: use the exact kebab-case name from the proposal
54
+ (specs/<capability>/spec.md).
55
+
56
+ - Modified capabilities: use the existing spec folder name from
57
+ openspec/specs/<capability>/ when creating the delta spec at
58
+ specs/<capability>/spec.md.
59
+
60
+ Delta operations (use ## headers):
61
+ - **ADDED Requirements**: New capabilities
62
+ - **MODIFIED Requirements**: Changed behavior — MUST include full updated content
63
+ - **REMOVED Requirements**: Deprecated features — MUST include **Reason** and **Migration**
64
+ - **RENAMED Requirements**: Name changes only — use FROM:/TO: format
65
+
66
+ Format requirements:
67
+ - Each requirement: `### Requirement: <name>` followed by description
68
+ - Use SHALL/MUST for normative requirements (avoid should/may)
69
+ - Each scenario: `#### Scenario: <name>` with WHEN/THEN format
70
+ - **CRITICAL**: Scenarios MUST use exactly 4 hashtags (`####`). Using 3 hashtags or bullets will fail silently.
71
+ - Every requirement MUST have at least one scenario.
72
+
73
+ MODIFIED requirements workflow:
74
+ 1. Locate the existing requirement in openspec/specs/<capability>/spec.md
75
+ 2. Copy the ENTIRE requirement block (from `### Requirement:` through all scenarios)
76
+ 3. Paste under `## MODIFIED Requirements` and edit to reflect new behavior
77
+ 4. Ensure header text matches exactly (whitespace-insensitive)
78
+
79
+ Common pitfall: Using MODIFIED with partial content loses detail at archive time.
80
+ If adding new concerns without changing existing behavior, use ADDED instead.
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
+
104
+ Specs should be testable — each scenario is a potential test case.
105
+ requires:
106
+ - proposal
107
+
108
+ - id: design
109
+ generates: design.md
110
+ description: Technical design document with implementation details
111
+ template: design.md
112
+ instruction: >
113
+ Create the design document that explains HOW to implement the change.
114
+
115
+ When to include design.md (create only if any apply):
116
+ - Cross-cutting change (multiple services/modules) or new architectural pattern
117
+ - New external dependency or significant data model changes
118
+ - Security, performance, or migration complexity
119
+ - Ambiguity that benefits from technical decisions before coding
120
+
121
+ Sections:
122
+ - **Context**: Background, current state, constraints, stakeholders
123
+ - **Goals / Non-Goals**: What this design achieves and explicitly excludes
124
+ - **Decisions**: Key technical choices with rationale (why X over Y?). Include alternatives considered for each decision.
125
+ - **Risks / Trade-offs**: Known limitations, things that could go wrong. Format: [Risk] → Mitigation
126
+ - **Migration Plan**: Steps to deploy, rollback strategy (if applicable)
127
+ - **Open Questions**: Outstanding decisions or unknowns to resolve
128
+
129
+ Focus on architecture and approach, not line-by-line implementation.
130
+ Reference the proposal for motivation and specs for requirements.
131
+
132
+ Good design docs explain the "why" behind technical decisions.
133
+ requires:
134
+ - proposal
135
+
136
+ - id: tasks
137
+ generates: tasks.md
138
+ description: Implementation checklist with trackable tasks. Also seeds Beads issues.
139
+ template: tasks.md
140
+ instruction: >
141
+ Create the task list that breaks down the implementation work AND seed
142
+ corresponding issues in Beads.
143
+
144
+
145
+ **IMPORTANT: Follow the template below exactly.**
146
+
147
+
148
+ Guidelines:
149
+
150
+ - Group related tasks under ## numbered headings
151
+
152
+ - Each task MUST be a checkbox: `- [ ] X.Y Task description`
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:
160
+
161
+ ```
162
+
163
+ ## 1. Setup
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
174
+
175
+ ```
176
+
177
+
178
+ Reference specs for what needs to be built, design for how to build it.
179
+
180
+ Each task should be verifiable — you know when it's done.
181
+
182
+
183
+ **After writing tasks.md, seed Beads:**
184
+
185
+ Run `bd create "Spec-driven Change: <change-name>" -t epic -p 1` for the
186
+ parent epic, then for each task run:
187
+
188
+ ```
189
+ bd create "X.Y Task description" -t task -p 1
190
+ ```
191
+
192
+ Then link dependencies using `bd dep add <child> <parent>`.
193
+
194
+ Use `bd ready` to verify the task list is properly seeded.
195
+ requires:
196
+ - specs
197
+ - design
198
+
199
+ apply:
200
+ requires:
201
+ - tasks
202
+ tracks: tasks.md
203
+ instruction: |
204
+ Use Beads to drive implementation, not tasks.md directly.
205
+
206
+ Workflow:
207
+ 1. Run `bd ready` to see the next unblocked task.
208
+ 2. Pick the highest priority task and run `bd update <id> --claim`.
209
+ 3. Read specs/design for context, implement the code.
210
+ 4. Run `bd close <id> --reason "Implemented"`.
211
+ 5. Repeat from step 1 until `bd ready` returns nothing.
212
+
213
+ Mark tasks.md checkboxes as you go for a human-readable view, but
214
+ Beads is the source of truth for task state. Do not skip `bd close`.
215
+
216
+ Pause if you hit blockers or need clarification. Use `bd show <id>` to
217
+ inspect task details, and `bd update <id>` to add notes.
@@ -0,0 +1,19 @@
1
+ ## Context
2
+
3
+ <!-- Background and current state -->
4
+
5
+ ## Goals / Non-Goals
6
+
7
+ **Goals:**
8
+ <!-- What this design aims to achieve -->
9
+
10
+ **Non-Goals:**
11
+ <!-- What is explicitly out of scope -->
12
+
13
+ ## Decisions
14
+
15
+ <!-- Key design decisions and rationale -->
16
+
17
+ ## Risks / Trade-offs
18
+
19
+ <!-- Known risks and trade-offs -->
@@ -0,0 +1,23 @@
1
+ ## Why
2
+
3
+ <!-- Explain the motivation for this change. What problem does this solve? Why now? -->
4
+
5
+ ## What Changes
6
+
7
+ <!-- Describe what will change. Be specific about new capabilities, modifications, or removals. -->
8
+
9
+ ## Capabilities
10
+
11
+ ### New Capabilities
12
+ <!-- Capabilities being introduced. Replace <name> with kebab-case identifier (e.g., user-auth, data-export, api-rate-limiting). Each creates specs/<name>/spec.md -->
13
+ - `<name>`: <brief description of what this capability covers>
14
+
15
+ ### Modified Capabilities
16
+ <!-- Existing capabilities whose REQUIREMENTS are changing (not just implementation).
17
+ Only list here if spec-level behavior changes. Each needs a delta spec file.
18
+ Use existing spec names from openspec/specs/. Leave empty if no requirement changes. -->
19
+ - `<existing-name>`: <what requirement is changing>
20
+
21
+ ## Impact
22
+
23
+ <!-- Affected code, APIs, dependencies, systems -->
@@ -0,0 +1,8 @@
1
+ ## ADDED Requirements
2
+
3
+ ### Requirement: <!-- requirement name -->
4
+ <!-- requirement text -->
5
+
6
+ #### Scenario: <!-- scenario name -->
7
+ - **WHEN** <!-- condition -->
8
+ - **THEN** <!-- expected outcome -->
@@ -0,0 +1,9 @@
1
+ ## 1. <!-- Task Group Name -->
2
+
3
+ - [ ] 1.1 <!-- Task description -->
4
+ - [ ] 1.2 <!-- Task description -->
5
+
6
+ ## 2. <!-- Task Group Name -->
7
+
8
+ - [ ] 2.1 <!-- Task description -->
9
+ - [ ] 2.2 <!-- Task description -->
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "spec-driven-with-beads",
3
+ "version": "1.0.0",
4
+ "description": "OpenSpec custom schema using Beads (bd) for task tracking and execution",
5
+ "keywords": ["openspec", "beads", "spec-driven-development", "schema", "sdd"],
6
+ "license": "MIT",
7
+ "author": "yoinks-yoinks",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/yoinks-yoinks/openspec-schemas.git"
11
+ },
12
+ "files": [
13
+ "openspec/schemas/spec-driven-with-beads/"
14
+ ]
15
+ }