@srobroek/pi-speckit-beads 0.0.0-stage → 0.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/LICENSE +202 -0
- package/README.md +300 -2
- package/_kit/prereqs.json +25 -0
- package/_kit/prereqs.ts +374 -0
- package/agents/spec.md +72 -0
- package/agents/speckit-sync.md +42 -0
- package/agents/speckit-verify.md +26 -0
- package/extensions/speckit-beads.js +3156 -0
- package/formulas/mol-speckit-bugfix.formula.toml +58 -0
- package/formulas/mol-speckit-fix-findings.formula.toml +44 -0
- package/formulas/mol-speckit-iterate.formula.toml +44 -0
- package/formulas/mol-speckit-refine.formula.toml +67 -0
- package/formulas/speckit-basic.formula.toml +139 -0
- package/formulas/speckit-feature.formula.toml +285 -0
- package/formulas/speckit-lean.formula.toml +190 -0
- package/package.json +42 -4
- package/skills/speckit-bugfix/SKILL.md +51 -0
- package/skills/speckit-ledger/SKILL.md +92 -0
- package/skills/speckit-setup/SKILL.md +98 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,301 @@
|
|
|
1
|
-
#
|
|
1
|
+
# speckit-beads
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
SpecKit on Beads: spec-driven setup, a workflow tracked as beads molecules, and
|
|
4
|
+
protection for `specs/*/tasks.md`, whose task state lives in beads.
|
|
5
|
+
|
|
6
|
+
It replaces the `speckit` plugin and needs no other plugin from this repository. It
|
|
7
|
+
works through the public `bd` CLI, and the agents run `bd prime` for the Beads workflow
|
|
8
|
+
and command reference. Beads is required. Setup always creates the beads workspace and
|
|
9
|
+
installs the formulas, and nothing switches that off.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
| Harness | Install |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| OpenCode | `opencode plugin add 'github:srobroek/harness-plugins::path:plugins/speckit-beads/opencode'` |
|
|
16
|
+
| Claude Code | `speckit-beads@harness-plugins` from this repository's marketplace |
|
|
17
|
+
| pi | `pi install npm:@srobroek/pi-speckit-beads` |
|
|
18
|
+
|
|
19
|
+
| Tool | Needed for | Version |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `bd` | The beads workspace, the formulas and the task state. The tasks.md guard asks `bd where`. Required. | 1.3.0 or later |
|
|
22
|
+
| `specify` | `speckit_setup`'s `specify init` and extension installs | 1.4.0 or later |
|
|
23
|
+
|
|
24
|
+
On pi, a session start reports a missing or too-old tool with its install hint
|
|
25
|
+
(`mise use -g aqua:gastownhall/beads`, `mise use -g pipx:specify-cli`).
|
|
26
|
+
|
|
27
|
+
## From the `speckit` plugin
|
|
28
|
+
|
|
29
|
+
- The OpenCode entry is `plugins/speckit-beads/opencode`, and the plugin id is
|
|
30
|
+
`srobroek.speckit-beads`. Move the options to that entry.
|
|
31
|
+
- Claude Code installs it as `speckit-beads@harness-plugins`, without the beads plugin.
|
|
32
|
+
- `speckit_setup` has no input that skips beads. It refuses every input it does not know.
|
|
33
|
+
- The `speckit-ledger` skill holds the task graph rules. The workflow, the formulas and
|
|
34
|
+
the agents load it instead of the beads plugin's skills.
|
|
35
|
+
|
|
36
|
+
## Options
|
|
37
|
+
|
|
38
|
+
OpenCode takes them as the plugin's `options`. pi reads the same keys from
|
|
39
|
+
`~/.pi/agent/speckit-beads.json` (`$PI_CODING_AGENT_DIR/speckit-beads.json`). Claude Code
|
|
40
|
+
takes none.
|
|
41
|
+
|
|
42
|
+
| Option | Default | Effect |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| `integration` | `codex` (OpenCode), `pi` (pi) | The spec-kit integration that `speckit_setup` passes to `specify init`. `codex` writes the commands as skills under `.agents/skills/`, where OpenCode finds them. `pi` writes prompt templates under `.pi/prompts/`, and pi runs each as `/speckit.<command>`. |
|
|
45
|
+
| `tasksGuard` | `true` | Refuse writes of `specs/*/tasks.md` where beads is active. |
|
|
46
|
+
| `implementRedirect` | `true` | Where beads is active, replace the implement command with the beads route and point the analyze command at the task beads. |
|
|
47
|
+
| `blockTasksToIssues` | `true` | Refuse the taskstoissues commands where beads is active. |
|
|
48
|
+
| `workflow` | `true` | Add the workflow instructions to sessions in a SpecKit repository. |
|
|
49
|
+
| `agents` | `true` | OpenCode: register the `speckit-sync` and `speckit-verify` subagents. |
|
|
50
|
+
| `specAgent` | `"auto"` | OpenCode: register the primary `spec` agent. `"auto"`: only where the location, or the project root it lies inside, holds `.specify/`; `true`: everywhere; `false`: never. |
|
|
51
|
+
|
|
52
|
+
## Tools
|
|
53
|
+
|
|
54
|
+
OpenCode and pi get the three tools. Claude Code gets the manual steps in the
|
|
55
|
+
`speckit-setup` skill instead. The tools run in the session's SpecKit workspace: the
|
|
56
|
+
session's directory when it holds `.specify/`, else the project root when the directory
|
|
57
|
+
lies inside it and the root holds `.specify/`. OpenCode takes the project root from the
|
|
58
|
+
session's project. pi takes the nearest directory that holds `.git`. Agent registration
|
|
59
|
+
and the workflow instructions use the same workspace.
|
|
60
|
+
|
|
61
|
+
`speckit_setup` bootstraps the session's repository. Every phase reports `done`,
|
|
62
|
+
`skipped` (already present or an extension could not install) or `failed`.
|
|
63
|
+
Extension failures are non-fatal and report the extension and CLI reason;
|
|
64
|
+
other failed phases stop with `ok: false`. A rerun skips completed work and retries
|
|
65
|
+
missing extensions. `ok: true` means bootstrap completed, not that every optional
|
|
66
|
+
extension is available. Each phase has its own timeout.
|
|
67
|
+
|
|
68
|
+
1. `specify init --here --force --integration <integration> --script sh --ignore-agent-tools`, unless `.specify/` exists.
|
|
69
|
+
2. The community catalog, only with `installAllowed=true` (skipped when `SPECKIT_CATALOG_URL` is set: specify then reads only that catalog).
|
|
70
|
+
3. Attempt optional extensions not yet installed: `agent-context`, `bugfix`, `cleanup`, `critique`, `fix-findings`, `iterate`, `qa`, `refine`, `retro`, `security-review`, `status-report`, `tinyspec`.
|
|
71
|
+
4. `bd init --skip-hooks` without a workspace, then the bundled formulas into `.beads/formulas/`. Formula installation rejects symlinks and never overwrites a divergent file. Without a working `bd`, this phase fails with an install hint.
|
|
72
|
+
5. `specs/**/spec-status.md` in `.gitignore`.
|
|
73
|
+
|
|
74
|
+
`agent-context` is in the core catalog. The other ids above are only in the community
|
|
75
|
+
catalog. That catalog is discovery-only by default, so their default installs fail.
|
|
76
|
+
Setup changes that trust policy only on explicit opt-in.
|
|
77
|
+
|
|
78
|
+
Before a workflow, report skipped capabilities. Select `speckit-basic` for core commands
|
|
79
|
+
only, or use the direct-work fallbacks of the formulas, with the same deliverables and
|
|
80
|
+
checks. Never skip a review or verification because its extension is not installed.
|
|
81
|
+
|
|
82
|
+
| Input | Effect |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| `workspace` | Repository root, resolved against the session's directory; defaults to it. |
|
|
85
|
+
| `integration` | Overrides the `integration` option for this call. |
|
|
86
|
+
| `installAllowed=true` | Registers the public community catalog as an install source. Opt in only after vetting the extensions. |
|
|
87
|
+
| `force=true` | Re-scaffolds `.specify/` only. |
|
|
88
|
+
| `skipSpecify=true` | Skips steps 1 to 3. Beads, the formulas and the gitignore entry still run. |
|
|
89
|
+
| `script` | `sh` (default) or `ps`, passed to `specify init --script`. |
|
|
90
|
+
|
|
91
|
+
`speckit_start` starts or resumes the workflow for one `NNN-slug` spec. It asks for
|
|
92
|
+
an explicit routine-approval choice before pouring, records it on the run root, reads
|
|
93
|
+
it back, and reuses it on resume.
|
|
94
|
+
|
|
95
|
+
| Human approvals | Formula selection | Routine sign-offs |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| Required | `autonomous=no` | Retained |
|
|
98
|
+
| Declined | `autonomous=yes` | Omitted |
|
|
99
|
+
|
|
100
|
+
- `CHOICE_REQUIRED` and `MIGRATION_REQUIRED` return a question. Ask the user, then call again: after `CHOICE_REQUIRED` with `approvals` and `decision`; after `MIGRATION_REQUIRED`, on consent, with the pending `approvals=no`, `migrate=true`, the returned `root` and `decision`. `migrate` with any other `approvals` is refused, so a yes to migrating cannot become `approvals=yes`.
|
|
101
|
+
- `READY` names the run root and both selections.
|
|
102
|
+
- `INCOMPLETE` means the store-lock wait ran out, a bounded `bd` command passed its 120 s bound, or the call was cancelled. It names the step reached and whether a pour was issued; inspect the run before retrying. `mol pour` and `gate resolve` are never cut off.
|
|
103
|
+
|
|
104
|
+
The whole start holds the beads store's embedded-write lock, so concurrent starts for
|
|
105
|
+
a spec cannot pour duplicate runs. The lock module comes from this repository's shared
|
|
106
|
+
library, and the plugin bundles it. The beads plugin bundles the same module, so the two
|
|
107
|
+
take turns on the same lock file when both run. Pass `root` when the spec has several
|
|
108
|
+
runs, or alone to resume a run: the tool reads the spec id from the root.
|
|
109
|
+
Clarification, analysis, reviews, verification, tests and consequential safety
|
|
110
|
+
confirmations stay required whatever the choice.
|
|
111
|
+
|
|
112
|
+
`speckit_commit` commits SpecKit artifacts. It takes only paths under `specs/` and
|
|
113
|
+
`.specify/` (by default both) and refuses when a requested path lies outside them or the
|
|
114
|
+
index already holds other files. It builds the commit in a private index (HEAD plus the
|
|
115
|
+
working-tree state of those paths), checks the tree changes nothing else, commits that
|
|
116
|
+
tree on top of HEAD and syncs the real index for those paths. It stores each file's bytes
|
|
117
|
+
exactly as they are on disk, never through `git add`: no clean or process filter from
|
|
118
|
+
`.gitattributes` runs and `core.autocrlf` converts nothing. Ignored files stay out, the
|
|
119
|
+
exec bit sets the file mode, and a symlink is stored as its link text. A symlink that is
|
|
120
|
+
absolute or climbs out of `specs/` and `.specify/`, a path through a symlinked directory,
|
|
121
|
+
a submodule and a nested repository are refused. After reading each file it checks the
|
|
122
|
+
ancestors, the file's real path and its inode again, and refuses the commit if anything
|
|
123
|
+
moved. That closes the practical race window, not a perfectly timed double swap: the
|
|
124
|
+
tool guards against an agent's mistakes and casual misuse, not a hostile local process
|
|
125
|
+
racing it. It never amends, and a concurrent move of HEAD makes it fail rather than
|
|
126
|
+
overwrite the other commit. Every git call runs pinned to the workspace (`git -C`)
|
|
127
|
+
without inherited repository selectors (`GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE`,
|
|
128
|
+
object-store and `GIT_CONFIG*` variables), and it refuses before writing unless git
|
|
129
|
+
resolves the workspace to itself.
|
|
130
|
+
|
|
131
|
+
No git hook of any kind runs (pre-commit, commit-msg, reference-transaction,
|
|
132
|
+
post-index-change): the tool commits with plumbing, and every git call points
|
|
133
|
+
`core.hooksPath` at an empty directory. That is the price of committing exactly the
|
|
134
|
+
checked snapshot, so run the project's checks separately. The `spec` agent commits
|
|
135
|
+
through it, since a shell `git add` or `git commit` pattern cannot keep its operands or
|
|
136
|
+
options in bounds.
|
|
137
|
+
|
|
138
|
+
## Guards and routes
|
|
139
|
+
|
|
140
|
+
All of them apply only where `bd where` finds a beads workspace, and fail open when
|
|
141
|
+
it cannot run.
|
|
142
|
+
|
|
143
|
+
| Surface | Behavior |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| File writes of `specs/*/tasks.md` | Refused. OpenCode: `edit`, `write` and `patch`, including patch move destinations. Claude Code: `Edit` and `Write`. pi: `edit` and `write`, with an `@` or `~` path read as pi reads it. The guard asks the target's own repository. |
|
|
146
|
+
| Shell writes of `specs/*/tasks.md` | Refused: redirects, `tee`, `cp`/`mv` destinations, `sed -i`, `touch` and similar, resolved against the call's working directory. Reads run. |
|
|
147
|
+
| Implement command | Becomes the beads route: work the task beads under the molecule's `implement` step. OpenCode rewrites the `speckit-implement` skill. pi rewrites a typed `/speckit.implement` or `/skill:speckit-implement`, and keeps the words after it. A `read` of the prompt or skill file returns the route too. |
|
|
148
|
+
| Analyze command | Gets a beads preamble ahead of the upstream text. The preamble drops `--require-tasks --include-tasks` from the prerequisite script. It also says to read the task beads where the command reads tasks.md. The spec and plan analysis stays as upstream wrote it. OpenCode adds the preamble to the skill. pi sends it as a message with a typed `/speckit.analyze`, and adds it to a `read` of the prompt file. |
|
|
149
|
+
| `speckit-taskstoissues`, `speckit-github-taskstoissues` | Refused. OpenCode: the `skill` tool does not load them, and their content becomes the refusal. pi: a typed command stops and shows the refusal. A `read` of the file returns it. |
|
|
150
|
+
|
|
151
|
+
Upstream writers the guard denies: `speckit-tasks`, `speckit-converge` (it appends a
|
|
152
|
+
`## Phase N: Convergence` section), and the bugfix, cleanup, iterate, reconcile and
|
|
153
|
+
refine extensions.
|
|
154
|
+
|
|
155
|
+
On OpenCode, project skills load after plugins, so the skill transform registers again
|
|
156
|
+
whenever a `skill.updated` event shows upstream content.
|
|
157
|
+
|
|
158
|
+
## Workflow instructions
|
|
159
|
+
|
|
160
|
+
`opencode/instructions/speckit-workflow.md` holds the beads workflow contract and
|
|
161
|
+
command routing. Its BEADS section has the agent run `bd prime` once per session and
|
|
162
|
+
load `speckit-ledger`.
|
|
163
|
+
|
|
164
|
+
- **OpenCode:** a session gets it in its system prompt when it has a SpecKit workspace
|
|
165
|
+
(see Tools) at its first request. That decision holds for the whole session, also
|
|
166
|
+
across a server restart. The system prompt stays the same, and the prompt cache of the
|
|
167
|
+
provider holds. The two speckit subagents do not get it.
|
|
168
|
+
- **pi:** every run in a SpecKit workspace gets it as the `speckit_workflow` system prompt
|
|
169
|
+
section. pi sends only the sections that change. A section that appears after setup
|
|
170
|
+
costs one patch message and keeps the prompt cache.
|
|
171
|
+
- **OpenCode and pi:** a run that started without it and calls `speckit_setup` gets the
|
|
172
|
+
text in the tool result.
|
|
173
|
+
- **Claude Code:** gets no workflow text, because the text names the OpenCode and pi tools.
|
|
174
|
+
|
|
175
|
+
## Agents
|
|
176
|
+
|
|
177
|
+
### spec
|
|
178
|
+
|
|
179
|
+
`spec` drives one feature through SpecKit up to implementation:
|
|
180
|
+
|
|
181
|
+
1. It checks for `.specify/`, the SpecKit commands and a beads workspace, and offers
|
|
182
|
+
`speckit_setup`. Then it runs `bd prime`.
|
|
183
|
+
2. It calls `speckit_start` and asks the routine-approval question.
|
|
184
|
+
3. It follows the poured molecule and runs the upstream command of each phase. The tasks
|
|
185
|
+
phase creates child beads of the implement step. Checklist, critique and security
|
|
186
|
+
review run where the profile has them.
|
|
187
|
+
4. It stops at the first step outside its boundary and hands those steps over by id.
|
|
188
|
+
The implement step, later docs, checks and the final commit are outside it.
|
|
189
|
+
|
|
190
|
+
It has three entry paths: a new spec, a resume of an existing spec id or run root (no
|
|
191
|
+
new number), and a verify-return that routes verification to `speckit-verify`.
|
|
192
|
+
|
|
193
|
+
On OpenCode it is a primary agent. It asks through the `question` tool, which parley
|
|
194
|
+
takes over when its TUI is attached, and through `tools.parley_ask` for rounds of
|
|
195
|
+
several questions.
|
|
196
|
+
|
|
197
|
+
| Boundary | Allowed |
|
|
198
|
+
| --- | --- |
|
|
199
|
+
| Steps | 100 |
|
|
200
|
+
| Edits | Any file. Its prompt keeps it to spec artifacts, and commits go through `speckit_commit`, which stages only `specs/` and `.specify/` |
|
|
201
|
+
| Shell | `bd` (including the beads write-lock runner), `specify`, `.specify/` scripts, and `git` status, diff, log, show, branch, rev-parse, ls-files, merge-base, switch. Branch deletion, renames and forced moves, and discarding or forced switches are denied. |
|
|
202
|
+
| Tools | read, grep, glob, LSP, `question`, `execute` (for `parley_ask`, `speckit_setup`, `speckit_start`), `speckit_*` (commits go through `speckit_commit`) |
|
|
203
|
+
| Skills | `speckit-*` (this plugin's and spec-kit's), `quality-*` |
|
|
204
|
+
| Subagents | `explore`, `researcher`, `architect`, `speckit-verify`, `speckit-sync` |
|
|
205
|
+
|
|
206
|
+
Everything else is denied, including `git push` and web access. It writes spec artifacts
|
|
207
|
+
and never implements product code; that boundary is its prompt's, not a permission.
|
|
208
|
+
|
|
209
|
+
It carries the `strong` model tier: the spec, plan and task breakdown decide what every
|
|
210
|
+
implementer builds, and the agent writes no code, so its token volume stays small next
|
|
211
|
+
to the implementation it directs.
|
|
212
|
+
|
|
213
|
+
Each location runs its own plugin instance, so with `specAgent: "auto"` the agent is
|
|
214
|
+
listed (and in the primary-agent cycle) only in SpecKit repositories. A `speckit_setup`
|
|
215
|
+
that creates `.specify/` at the location registers it without a restart.
|
|
216
|
+
|
|
217
|
+
On pi it is a pi-subagents agent, from `common/agents/spec.pi.md`. Its own session loads
|
|
218
|
+
this package's extension (`subagentOnlyExtensions`). It has the `speckit_*` tools, the
|
|
219
|
+
guard and the workflow section even where the parent session does not load the package.
|
|
220
|
+
|
|
221
|
+
- Tools: every pi file tool, edit and write included, plus bash, `subagent` and the three `speckit_*` tools.
|
|
222
|
+
- Subagents: `scout`, `researcher` and `architect`, plus `speckit-verify` and `speckit-sync`.
|
|
223
|
+
- Context: the repository's `AGENTS.md` and the skills catalog, so it can load `speckit-ledger`.
|
|
224
|
+
- Questions go to the user through `contact_supervisor`. It ends with a report for its
|
|
225
|
+
supervisor.
|
|
226
|
+
|
|
227
|
+
pi has no per-path edit or shell rules, so the boundary above is an instruction there.
|
|
228
|
+
Only the tasks.md guard enforces part of it.
|
|
229
|
+
|
|
230
|
+
### Subagents
|
|
231
|
+
|
|
232
|
+
| Agent | Spawn with |
|
|
233
|
+
| --- | --- |
|
|
234
|
+
| `speckit-sync` (steps 60) | `scope: drift` / `conflicts` / `both` |
|
|
235
|
+
| `speckit-verify` (steps 60) | `mode: requirements` / `tasks` / `review` |
|
|
236
|
+
|
|
237
|
+
On OpenCode the two subagents are read-only (edits denied) and carry the `reviewer`
|
|
238
|
+
model tier in `request.headers.x-opencode-model-role`. With the model-roles plugin they
|
|
239
|
+
run on that tier's model, otherwise on the parent's. They pin no model. Both are hidden
|
|
240
|
+
from the subagent catalog, since the formulas and the workflow instructions spawn them by
|
|
241
|
+
id, and neither gets Code Mode. `speckit-verify` may load the `quality-*` skills, and
|
|
242
|
+
`speckit-sync` only `speckit-ledger`.
|
|
243
|
+
|
|
244
|
+
On pi each has the file-reading tools and bash, from `common/agents/<id>.pi.md`.
|
|
245
|
+
pi-subagents saves the report to `<id>.md` in the output directory of the run.
|
|
246
|
+
|
|
247
|
+
`speckit-verify` is composed by `bun run build` from `agents.src/speckit-verify.md` and
|
|
248
|
+
the evidence and report parts of the shared review core (`lib/src/review-core.md`);
|
|
249
|
+
edit the source, not `agents/`. Its reply starts with `VERDICT: PASS|GAPS`.
|
|
250
|
+
|
|
251
|
+
Formula steps that spawn them set `execution_agent_type` to the agent id, with
|
|
252
|
+
`execution_agent_mode` or `execution_agent_scope` beside it. A spawn for such a step
|
|
253
|
+
goes to that agent, and to no other.
|
|
254
|
+
|
|
255
|
+
The review steps (`review`, and `code-review` in `speckit-feature`) spawn
|
|
256
|
+
`speckit-verify` with `mode: review` rather than spec-kit's `review` extension, which
|
|
257
|
+
`speckit_setup` does not install. They route to this plugin's own agent, not
|
|
258
|
+
delivery's `pr-reviewer`, so they work without the delivery plugin.
|
|
259
|
+
|
|
260
|
+
## Skills
|
|
261
|
+
|
|
262
|
+
| Skill | Use when |
|
|
263
|
+
| --- | --- |
|
|
264
|
+
| `speckit-setup` | Bootstrap `.specify/`, extensions, beads and formulas, or start a spec where `speckit_start` is missing. |
|
|
265
|
+
| `speckit-ledger` | Turn a task breakdown into task beads under the implement step: the graph file's fields, a dry run, the create and the read-back. Also adding and changing tasks later. |
|
|
266
|
+
| `speckit-bugfix` | Fix a defect. For a tracked trail, bond `mol-speckit-bugfix`. |
|
|
267
|
+
|
|
268
|
+
`speckit-bugfix` loads the `quality-code-design` skill from the `quality` plugin;
|
|
269
|
+
without it the skill reports the missing guidance.
|
|
270
|
+
|
|
271
|
+
## Formulas
|
|
272
|
+
|
|
273
|
+
- Depth: `speckit-basic`, `speckit-lean`, `speckit-feature`
|
|
274
|
+
- Bonds: `mol-speckit-iterate`, `mol-speckit-fix-findings`, `mol-speckit-bugfix`, `mol-speckit-refine`
|
|
275
|
+
|
|
276
|
+
## Claude Code
|
|
277
|
+
|
|
278
|
+
Claude Code gets these parts:
|
|
279
|
+
|
|
280
|
+
- the `speckit-setup`, `speckit-ledger` and `speckit-bugfix` skills, with the manual steps
|
|
281
|
+
for setup and spec start
|
|
282
|
+
- the `speckit-sync` and `speckit-verify` subagents
|
|
283
|
+
- the formulas, under `${CLAUDE_PLUGIN_ROOT}/formulas/`
|
|
284
|
+
- the tasks.md guard, as a `PreToolUse` hook on `Edit`, `Write` and `Bash`, run by
|
|
285
|
+
`bun dist/claude-hook.js`
|
|
286
|
+
|
|
287
|
+
These parts stay with OpenCode and pi:
|
|
288
|
+
|
|
289
|
+
- the `spec` agent
|
|
290
|
+
- the `speckit_setup`, `speckit_start` and `speckit_commit` tools
|
|
291
|
+
- the command routes
|
|
292
|
+
- the workflow instructions, which name those tools
|
|
293
|
+
|
|
294
|
+
## Not ported
|
|
295
|
+
|
|
296
|
+
- The omp `tools/spec-start.ts` CLI. Use `speckit_start`.
|
|
297
|
+
- The `beadsPlugin` option. The lock implementation is bundled, so no installed beads package has to be found at runtime.
|
|
298
|
+
|
|
299
|
+
## License
|
|
300
|
+
|
|
301
|
+
Apache-2.0
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugin": "speckit-beads",
|
|
3
|
+
"prerequisites": [
|
|
4
|
+
{
|
|
5
|
+
"bin": "bd",
|
|
6
|
+
"for": "the Beads workspace, formulas and task state; the tasks.md guard probes it",
|
|
7
|
+
"required": true,
|
|
8
|
+
"install": {
|
|
9
|
+
"mise": "aqua:gastownhall/beads",
|
|
10
|
+
"url": "https://github.com/gastownhall/beads/blob/main/docs/getting-started/installation.md"
|
|
11
|
+
},
|
|
12
|
+
"version": ">=1.3.0"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"bin": "specify",
|
|
16
|
+
"for": "speckit_setup's specify init and extension installs",
|
|
17
|
+
"required": false,
|
|
18
|
+
"install": {
|
|
19
|
+
"mise": "pipx:specify-cli",
|
|
20
|
+
"url": "https://github.com/github/spec-kit"
|
|
21
|
+
},
|
|
22
|
+
"version": ">=1.4.0"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|