@snarkipus/opencode-beads 1.1.0-beta.1 → 1.1.0-beta.3
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 +28 -12
- package/assets/oc-beads/SKILL.md +38 -1
- package/assets/oc-beads/resources/CLI_REFERENCE.md +82 -0
- package/assets/oc-beads/resources/RESUMABILITY.md +9 -0
- package/assets/oc-beads/resources/TROUBLESHOOTING.md +37 -0
- package/assets/oc-beads/resources/WORKTREES.md +7 -0
- package/package.json +1 -1
- package/src/guidance.ts +1 -1
- package/src/host.ts +1 -1
- package/src/workflows.ts +21 -18
package/README.md
CHANGED
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
|
|
8
8
|
[Beads](https://github.com/gastownhall/beads) issue tracker integration for [OpenCode](https://opencode.ai).
|
|
9
9
|
|
|
10
|
-
`@snarkipus/opencode-beads` is a maintained OpenCode adapter that gives OpenCode 2 the integration `bd setup claude` gives Claude Code: `bd prime` workflow context on every request, refreshed after compaction and when a session resumes, plus a bounded task agent. Published 1.0.2 completes one Bead per invocation; the beta/next
|
|
10
|
+
`@snarkipus/opencode-beads` is a maintained OpenCode adapter that gives OpenCode 2 the integration `bd setup claude` gives Claude Code: `bd prime` workflow context on every request, refreshed after compaction and when a session resumes, plus a bounded task agent. Published 1.0.2 completes one Bead per invocation; the published beta/next release follows the authorized scope. It does not replace Beads: the installed `bd` CLI remains authoritative for issues, project initialization, skills, migrations, backups, and Dolt synchronization.
|
|
11
11
|
|
|
12
12
|
This is an independent project maintained by Matt Jackson under the MIT license. It began as a fork of [Josh Thomas's `opencode-beads`](https://github.com/joshuadavidthomas/opencode-beads), and the original work remains credited to its author. 1.0 rebuilt the plugin for OpenCode 2, and development now continues here independently. It vendors nothing from upstream Beads; instead, every Beads release is checked against the `bd` behavior the plugin relies on (see [Tracking upstream Beads](#tracking-upstream-beads)).
|
|
13
13
|
|
|
14
|
-
This
|
|
14
|
+
This release is **1.1.0-beta.3**, an opt-in beta targeting npm dist-tag `next`; its integration diagnostic command is `oc-beads:diagnostics`. Beta.1 used `oc-beads:status`; the rename is documented below. The beta's normal public entrypoint enables the eleven qualified operations in the native `beads` code-mode namespace on supported hosts: find, get, edges, memories, recall, claim, note, selected-field update, close, create and remember. No wrapper, internal dependency injection, manual skill copy or activation setting is needed. The opt-in is selecting the beta artifact. The published stable 1.0.2 package is unchanged.
|
|
15
15
|
|
|
16
|
-
The beta registers 29 `oc-beads:<stem>` workflows plus `oc-beads:
|
|
16
|
+
The beta registers 29 `oc-beads:<stem>` workflows plus `oc-beads:diagnostics` through ordinary native command registration and owns its packaged `oc-beads` skill at the installed path, with all 15 corpus resources plus CODE_MODE and ADR (17 links). User configuration/file commands retain native precedence on load and rebuild; removing an override restores the package definition. Other plugin conflicts follow native ordering. Diagnostics reports observed registration and name/description mismatches; identical-description overrides and public owner identity remain unobservable.
|
|
17
17
|
|
|
18
|
-
Typed registration requires the host tool, permission and session interfaces.
|
|
18
|
+
Typed registration requires the host tool, permission and session interfaces. The integration diagnostic command reports unavailable interfaces honestly; actual request capabilities, catalog discovery and per-operation permissions determine which operations can run. Native shell remains direct-only and cannot be called inside execute. Structured results preserve partial, failed and uncertain outcomes, and writes retain the actual session-and-agent Beads actor. Read [CODE_MODE.md](assets/oc-beads/resources/CODE_MODE.md) for composition and recovery.
|
|
19
19
|
|
|
20
|
-
All 16 implementation tasks have parent acceptance on exact OpenCode 2.1.1 / Beads 1.3.1. The [final acceptance record](docs/code-mode-final-acceptance-vuy9.md) and [bounded installed/model evaluation](docs/opencode-installed-model-continuation-vuy9.md) retain their historical candidates and probes;
|
|
20
|
+
All 16 implementation tasks have parent acceptance on exact OpenCode 2.1.1 / Beads 1.3.1. The [final acceptance record](docs/code-mode-final-acceptance-vuy9.md) and [bounded installed/model evaluation](docs/opencode-installed-model-continuation-vuy9.md) retain their historical candidates and probes; the published beta adds the public entrypoint and release-channel wiring. **Known limitation:** plain decline of a nested permission request does not stop the entire composition; a later independent operation can ask again. Use explicit Stop/Cancel to stop the composition. No token-saving, cross-provider checkpoint portability or multi-hour reliability claim is made.
|
|
21
21
|
|
|
22
22
|
## Design
|
|
23
23
|
|
|
24
|
-
The beta/next
|
|
24
|
+
The published beta/next release uses scope-bounded task execution:
|
|
25
25
|
|
|
26
26
|
- The primary OpenCode thread retains planning context, decisions, and control.
|
|
27
27
|
- An exact assignment or explicit one-bead mode stops with that item; read-only graph requests never authorize claims or writes.
|
|
@@ -41,19 +41,19 @@ The beta requires OpenCode `>=2.1.1 <2.2` and `bd` 1.3.1 or later. Exact OpenCod
|
|
|
41
41
|
|
|
42
42
|
`bd init` owns project initialization and creates the canonical shared Beads skill at `.agents/skills/beads`, which OpenCode discovers. It also writes a minimal Beads section to `AGENTS.md` that points to `bd prime`, the same pointer Beads gives Claude Code in `CLAUDE.md`. The published stable package relies on that shared skill. The beta additionally owns its packaged `oc-beads` skill; it does not write startup files or change `.agents/skills/beads/SKILL.md`.
|
|
43
43
|
|
|
44
|
-
2.
|
|
44
|
+
2. Add the published, version-pinned plugin to `~/.config/opencode/opencode.json` for every project, or to a project's `.opencode/opencode.json`:
|
|
45
45
|
|
|
46
46
|
```json
|
|
47
47
|
{
|
|
48
|
-
"plugins": ["@snarkipus/opencode-beads@1.1.0-beta.
|
|
48
|
+
"plugins": ["@snarkipus/opencode-beads@1.1.0-beta.3"]
|
|
49
49
|
}
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
To follow the beta channel
|
|
52
|
+
To follow the published beta channel, use `"plugins": ["@snarkipus/opencode-beads@next"]` instead. To stay on stable, use `"plugins": ["@snarkipus/opencode-beads@latest"]` (currently 1.0.2); do not select the beta. Stable promotion requires separate approval.
|
|
53
53
|
|
|
54
54
|
OpenCode loads configuration changes automatically. Update the pin explicitly when upgrading; an unpinned package entry is less reproducible. OpenCode 1.x plugins are not supported; use 0.10.x or earlier there.
|
|
55
55
|
|
|
56
|
-
3. Check the install: `opencode debug agents` lists `beads-task-agent`; `/oc-beads:
|
|
56
|
+
3. Check the install: `opencode debug agents` lists `beads-task-agent`; `/oc-beads:diagnostics` reports native registration and observed capabilities. Discover `beads` through execute on a host/agent with the required permissions. An installation still pinned to beta.1 continues to use `/oc-beads:status` until explicitly upgraded.
|
|
57
57
|
|
|
58
58
|
### Plugin options
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@ Plugin options use the object form:
|
|
|
63
63
|
{
|
|
64
64
|
"plugins": [
|
|
65
65
|
{
|
|
66
|
-
"package": "@snarkipus/opencode-beads@1.1.0-beta.
|
|
66
|
+
"package": "@snarkipus/opencode-beads@1.1.0-beta.3",
|
|
67
67
|
"options": { "luna": true, "autoMigrate": false }
|
|
68
68
|
}
|
|
69
69
|
]
|
|
@@ -119,7 +119,23 @@ Before running prime, the plugin checks `bd version` and the configuration-only
|
|
|
119
119
|
|
|
120
120
|
Published stable 1.0.2 registers no slash commands; `bd setup claude` installs none either. Ask the agent to work with Beads, have it load the canonical `beads` skill that `bd init` installs at `.agents/skills/beads` (OpenCode lists it and loads it with its `skill` tool), or use the `bd` CLI and the generated [Beads CLI reference](https://beads.gascity.com/cli-reference/index) directly. Versions before 1.0.0 shipped `/beads:*` commands adapted from upstream's Claude Code plugin; they duplicated `bd prime` and the skill.
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
The commands are workflow prompts, not exact CLI aliases. In particular, init guides human onboarding, prime reuses context or requests a guarded refresh, version reports installed versions and qualification limits, decision records rationale, template discovers formulas, and workflow guides authorized work and recovery. These purposes do not imply native `bd decision`, `bd template` or `bd workflow` commands.
|
|
123
|
+
|
|
124
|
+
**Command invocation:** an invocation itself requests the advertised bounded
|
|
125
|
+
operation, including bare `/oc-beads:sync`. With sufficient inputs the agent uses
|
|
126
|
+
permissioned tools and reports the actual outcome; `/oc-beads:sync explain`
|
|
127
|
+
explains without syncing, and missing required inputs prompt focused clarification.
|
|
128
|
+
Ordinary sync uses existing configuration and `--no-adopt`; a missing remote blocks
|
|
129
|
+
without setup/adoption. Host permissions, project restrictions, actor identity,
|
|
130
|
+
explicit modes and parent acceptance still apply. Guide/report commands produce
|
|
131
|
+
their advertised artifact. This action-contract correction starts with beta.3;
|
|
132
|
+
earlier beta artifacts do not contain this correction.
|
|
133
|
+
|
|
134
|
+
Starting with beta.2, the package-owned `oc-beads:status` is removed without an alias. Use `oc-beads:diagnostics` for integration health and `oc-beads:stats` for the issue-database overview via `bd status` (alias `bd stats`). User-defined old status overrides are untouched and are not migrated; the package does not edit configuration.
|
|
135
|
+
|
|
136
|
+
`oc-beads:compact` guides semantic issue compaction with `bd admin compact`; `bd compact` squashes Dolt history and is a different operation. Neither is conversation compaction. A bare invocation explains the workflow; a sufficiently specified semantic apply request supplies its bounded authority under actual permissions and policy. See the packaged [compact guidance](assets/oc-beads/resources/TROUBLESHOOTING.md) for mode/actor boundaries and upstream help uncertainty. `oc-beads:restore` retrieves pre-compaction issue content, displaying it by default; `--apply` requires explicit authority to write it back and does not mean database backup recovery. Quickstart uses installed help and authorized context; sync guides Dolt-remote synchronization, distinct from `bd federation sync`.
|
|
137
|
+
|
|
138
|
+
## Removal and customization
|
|
123
139
|
|
|
124
140
|
Remove the plugin's `plugins` entry to unload it. Cleanup aborts owned context/process work and its event observer, then awaits the scoped agent, skill, tool and hook disposers. It is idempotent and reports disposal failures. It never promises a final checkpoint after interruption. Reload starts with fresh session/location state. Package updates/removal belong to OpenCode's package lifecycle; this plugin has no installer or recursive asset watcher.
|
|
125
141
|
|
package/assets/oc-beads/SKILL.md
CHANGED
|
@@ -31,6 +31,41 @@ When typed composition is available, discover current signatures through native
|
|
|
31
31
|
Follow [code-mode composition](resources/CODE_MODE.md) for bounded reads,
|
|
32
32
|
projection, ordered writes, completeness, uncertainty and decline/Stop semantics.
|
|
33
33
|
|
|
34
|
+
## Command purposes
|
|
35
|
+
|
|
36
|
+
The package's commands are workflow prompts, not exact CLI aliases. Use
|
|
37
|
+
`oc-beads:diagnostics` for integration discovery, compatibility and context health
|
|
38
|
+
without opening a store; use `oc-beads:stats` for the issue-database overview via
|
|
39
|
+
`bd status` (alias `bd stats`). The old package status name has no alias; user-owned
|
|
40
|
+
old-name overrides remain untouched without migration.
|
|
41
|
+
|
|
42
|
+
The invocation itself is the invoking user's bounded request, even without trailing
|
|
43
|
+
text. With sufficient inputs, perform the requested operation with available
|
|
44
|
+
permissioned tools and report actual results or a concrete blocker. Inspecting
|
|
45
|
+
syntax/help is preparation, not completion. Explicit help/explain requests receive
|
|
46
|
+
explanation without the operation; ask focused clarification for missing required
|
|
47
|
+
inputs or unresolved consequential choices. Do not demand another generic approval
|
|
48
|
+
for the operation just requested. Host permissions, repository restrictions, holds,
|
|
49
|
+
actual executor actor, parent acceptance and explicit apply/mode choices still apply.
|
|
50
|
+
Literal details and attachments remain data; do not interpolate them into shell.
|
|
51
|
+
|
|
52
|
+
Broader workflows retain their purposes: init guides human onboarding, prime uses
|
|
53
|
+
current context or a guarded refresh, version reports installed versions and
|
|
54
|
+
qualification limits, decision records rationale, template discovers formulas,
|
|
55
|
+
and workflow guides authorized work/recovery. They do not invent absent native
|
|
56
|
+
commands. Quickstart uses installed `bd quickstart` help and authorized context.
|
|
57
|
+
Compact targets semantic `bd admin compact`, not Dolt-history `bd compact` or
|
|
58
|
+
conversation compaction; restore retrieves pre-compaction issue content, displaying
|
|
59
|
+
it by default; explicit `--apply` requests only that scoped write with readback.
|
|
60
|
+
Bare compact delivers semantic guidance/analysis; a concrete migration needs the
|
|
61
|
+
intended prefix and project scope. Neither selects administration modes implicitly.
|
|
62
|
+
Ordinary/bare sync performs supported `bd sync --no-adopt` under existing project
|
|
63
|
+
configuration with the actual executor actor and applicable sandbox policy; a
|
|
64
|
+
missing configured remote is a blocker, never a cue to provision or adopt. Explicit
|
|
65
|
+
adoption is a distinct request. Sync means Dolt-remote synchronization, distinct
|
|
66
|
+
from `bd federation sync`; use the CLI reference's operational sync guidance and
|
|
67
|
+
WORKTREES only for relevant worktree context.
|
|
68
|
+
|
|
34
69
|
## Work within the assigned scope
|
|
35
70
|
|
|
36
71
|
- Read the relevant issue and its dependencies before changing tracked state.
|
|
@@ -98,7 +133,9 @@ Do not dump all memories into every handoff or delete old knowledge as routine
|
|
|
98
133
|
cleanup. Use the current CLI help for exact memory options.
|
|
99
134
|
|
|
100
135
|
Do not initialize or reroute a store, synchronize it, change permissions, or enable automation as a side effect.
|
|
101
|
-
Those separate administrative operations require explicit authorization
|
|
136
|
+
Those separate administrative operations require explicit authorization; a sufficiently
|
|
137
|
+
specified invocation supplies the request only for its own bounded purpose, subject
|
|
138
|
+
to the real restrictions above. It does not authorize incidental synchronization.
|
|
102
139
|
Examples assume a project policy prohibiting automatic remote updates and include
|
|
103
140
|
`--sandbox`; it only suppresses Dolt auto-push and provides no migration safety.
|
|
104
141
|
|
|
@@ -18,3 +18,85 @@ If a command or flag in an old example is absent from current help, do not guess
|
|
|
18
18
|
its spelling or use a hidden interface. State the limitation and use a supported
|
|
19
19
|
equivalent only when it preserves the requested outcome and authority. A static
|
|
20
20
|
resource cannot prove installed host behavior or package delivery.
|
|
21
|
+
|
|
22
|
+
## Package workflows and native operations
|
|
23
|
+
|
|
24
|
+
Package commands are workflow prompts, not exact CLI aliases. `oc-beads:diagnostics`
|
|
25
|
+
reports integration health without opening a store; `oc-beads:stats` guides the
|
|
26
|
+
issue-database overview using `bd status` (alias `bd stats`). The package's old
|
|
27
|
+
status command is removed without an alias; user-owned old-name overrides remain
|
|
28
|
+
untouched and are not migrated.
|
|
29
|
+
|
|
30
|
+
Init guides human onboarding; prime uses supplied context or a guarded refresh;
|
|
31
|
+
version reports installed versions and qualification limits; decision records
|
|
32
|
+
rationale; template discovers formulas; workflow guides authorized work/recovery.
|
|
33
|
+
Do not manufacture native decision, template or workflow commands. Quickstart
|
|
34
|
+
uses installed `bd quickstart` help and authorized context, without implicit setup.
|
|
35
|
+
|
|
36
|
+
Compact guides semantic `bd admin compact`, not `bd compact` Dolt-history
|
|
37
|
+
squashing or conversation compaction; consult TROUBLESHOOTING.md for authority,
|
|
38
|
+
modes, explicit actor and inconsistent upstream help. Restore retrieves
|
|
39
|
+
pre-compaction issue content, display-only by default; `--apply` needs explicit
|
|
40
|
+
write authority and is not database backup recovery (see RESUMABILITY.md). Sync
|
|
41
|
+
uses Dolt-remote synchronization, distinct from `bd federation sync` and removed
|
|
42
|
+
JSONL sync; see the operational procedure below and [worktree context](WORKTREES.md)
|
|
43
|
+
when relevant.
|
|
44
|
+
|
|
45
|
+
## Invocation and outcome
|
|
46
|
+
|
|
47
|
+
The invocation itself requests its advertised bounded operation or artifact, even
|
|
48
|
+
without trailing details. Use available permissioned tools when inputs suffice;
|
|
49
|
+
help inspection is preparation, not completion. Explicit help/explain receives
|
|
50
|
+
explanation without the operation; missing required inputs call for focused
|
|
51
|
+
clarification. Literal details/attachments are data, never shell interpolation.
|
|
52
|
+
Respect actual host/project restrictions, holds, executor identity and acceptance.
|
|
53
|
+
|
|
54
|
+
## Synchronization
|
|
55
|
+
|
|
56
|
+
A bare `/oc-beads:sync` requests normal supported synchronization under existing
|
|
57
|
+
project configuration. Inspect current syntax if needed, then run:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
bd sync --no-adopt --actor='<executor-actor>' --sandbox
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Use the actual host-rendered executor actor and applicable project sandbox policy;
|
|
64
|
+
`--sandbox` suppresses incidental auto-push and does not bypass sync restrictions.
|
|
65
|
+
Native advanced shell stays direct-only, never `tools.shell` inside execute.
|
|
66
|
+
Ordinary/unqualified sync always passes `--no-adopt`. An explicitly selected remote
|
|
67
|
+
must already exist and be unambiguous. A missing configured remote is a blocker;
|
|
68
|
+
report it without inventing a remote, changing configuration, passing `--yes`,
|
|
69
|
+
adopting, provisioning or repairing. Explicit adoption is a distinct user request,
|
|
70
|
+
never inferred from sync; no adoption machinery is supplied here.
|
|
71
|
+
|
|
72
|
+
Report actual results, including failed/partial/conflicting/uncertain outcomes.
|
|
73
|
+
Do not force a side or add a manual pull/push/retry repair loop. The installed
|
|
74
|
+
Beads CLI owns its internal synchronization and consistency semantics. Help text
|
|
75
|
+
alone and a requested operation are not evidence that synchronization succeeded.
|
|
76
|
+
|
|
77
|
+
## Audit and interchange
|
|
78
|
+
|
|
79
|
+
Audit retrieves requested evidence for a target/query or records supplied scoped
|
|
80
|
+
evidence at its established destination. Discover supported audit syntax; do not
|
|
81
|
+
collect transcripts or invent evidence. Show retrieves the requested IDs' actual
|
|
82
|
+
fields, notes, acceptance and dependencies without mutation.
|
|
83
|
+
|
|
84
|
+
Import needs input, target context and resolved material mode/conflicts. Inspect
|
|
85
|
+
input/help as preparation, perform the scoped requested import when permitted,
|
|
86
|
+
and report observed counts and partial results, including stale/upsert risks.
|
|
87
|
+
Never initialize, restore or repair implicitly. Export needs scope and destination
|
|
88
|
+
(or accepted stdout); perform it and report the observed artifact/count without
|
|
89
|
+
arbitrary overwrite or a full-backup claim. See [troubleshooting](TROUBLESHOOTING.md)
|
|
90
|
+
for failures; unknown syntax is a limitation rather than invented CLI flags.
|
|
91
|
+
|
|
92
|
+
## Onboarding and discovery
|
|
93
|
+
|
|
94
|
+
Init and quickstart deliver a usable human-directed guide with current installed
|
|
95
|
+
help, relevant project context and concrete next steps/side effects. They do not
|
|
96
|
+
initialize a store automatically. Template discovers actual available formulas or
|
|
97
|
+
protos through supported commands and optionally inspects a named entry; discovery
|
|
98
|
+
does not authorize instantiation. Report actual entries or unavailability.
|
|
99
|
+
Decision persists supplied rationale/alternatives in the established project-owned
|
|
100
|
+
destination; clarify only if it cannot be resolved, and do not invent a native
|
|
101
|
+
command or automatically create a new issue/spec/document. Bare workflow delivers
|
|
102
|
+
a procedure; task execution needs an already authorized assignment or batch.
|
|
@@ -81,3 +81,12 @@ manual fallback. If a write timed out, read the issue before retrying; the first
|
|
|
81
81
|
write may have landed. Preserve uncertainty explicitly until it is resolved.
|
|
82
82
|
|
|
83
83
|
Use the current CLI syntax from `bd prime` and command help when authorized.
|
|
84
|
+
|
|
85
|
+
## Restore pre-compaction issue content
|
|
86
|
+
|
|
87
|
+
`oc-beads:restore` guides `bd restore` retrieval of pre-compaction issue content,
|
|
88
|
+
display-only by default. `--apply` requires explicit authority to write that
|
|
89
|
+
content back to the issue. This is not database backup recovery, Git history
|
|
90
|
+
restoration or general store repair. Inspect installed help and report missing
|
|
91
|
+
content or uncertainty honestly; conflicting compact/restore help does not
|
|
92
|
+
establish guaranteed recovery or reversibility.
|
|
@@ -19,6 +19,30 @@ limitation and use a documented replacement only when it preserves the needed
|
|
|
19
19
|
semantics. The specialized `bd agent` and `bd slot` commands are absent from the
|
|
20
20
|
inspected CLI; see [AGENTS.md](AGENTS.md).
|
|
21
21
|
|
|
22
|
+
## Compact operation and authority
|
|
23
|
+
|
|
24
|
+
`oc-beads:compact` guides semantic issue compaction with `bd admin compact`.
|
|
25
|
+
`bd compact` squashes Dolt history and is a different operation; neither means
|
|
26
|
+
conversation compaction. A bare invocation delivers a useful semantic guide or
|
|
27
|
+
analysis artifact. A sufficiently specified semantic apply request supplies its
|
|
28
|
+
bounded authority and does not need another generic approval. Clarify missing
|
|
29
|
+
scope, targets or consequential choices; preserve actual host/project restrictions
|
|
30
|
+
and inspect applicable installed help before action.
|
|
31
|
+
|
|
32
|
+
Prefer the agent-driven analyze/apply path. `--auto` sends issue content to an
|
|
33
|
+
external AI provider; `--dolt` performs storage garbage collection rather than
|
|
34
|
+
semantic summarization. These modes each require separate explicit authority;
|
|
35
|
+
ordinary compact approval selects neither. Always supply explicit `--actor`
|
|
36
|
+
for admin compact, which has its own local default of `agent`; do not inherit
|
|
37
|
+
that default or the human Git identity.
|
|
38
|
+
|
|
39
|
+
In the inspected Beads 1.3.1 help, admin compact's Usage/flags identify the semantic
|
|
40
|
+
operation but its examples still say `bd compact`. Its discard wording also
|
|
41
|
+
conflicts with restore's snapshot description. Do not copy those stale examples
|
|
42
|
+
or promise reversibility from that conflicting help. Report the uncertainty and
|
|
43
|
+
use applicable help and explicit authority for a future actual request. Do not
|
|
44
|
+
execute administration to validate this prose or repair upstream behavior.
|
|
45
|
+
|
|
22
46
|
## Store, migration, or routing problem
|
|
23
47
|
|
|
24
48
|
If the CLI reports no store, an outdated schema, an unexpected location, or a
|
|
@@ -47,3 +71,16 @@ owns it or the claim was reclaimed, stop writes and coordinate a deliberate
|
|
|
47
71
|
handoff. Never force-reassign yourself or fall back to the human Git identity.
|
|
48
72
|
Record unresolved acceptance, missing evidence, and the next authorized action
|
|
49
73
|
in the handoff.
|
|
74
|
+
|
|
75
|
+
## Deletion and identifier migration
|
|
76
|
+
|
|
77
|
+
A sufficiently specified deletion invocation requests that bounded deletion.
|
|
78
|
+
Inspect target/effects and clarify unresolved destructive impact, then perform
|
|
79
|
+
only the requested deletion when policy and permissions permit. Do not replace
|
|
80
|
+
closure with deletion or silently expand cascades.
|
|
81
|
+
|
|
82
|
+
Bare rename-prefix delivers the advertised migration/reference-impact explanation.
|
|
83
|
+
A concrete migration requires a desired prefix and project scope; a fully scoped
|
|
84
|
+
migration request supplies its bounded authority without another generic approval.
|
|
85
|
+
Do not infer a prefix, migration or collateral rewrites. Real restrictions and
|
|
86
|
+
missing inputs still block; the invocation never bypasses permission or a hold.
|
|
@@ -17,3 +17,10 @@ Use `bd worktree --help` and relevant subcommand help for current commands and
|
|
|
17
17
|
safety checks. Inspect local changes before removal, preserve work that is not
|
|
18
18
|
yours, and remove only a worktree whose cleanup is authorized. This resource
|
|
19
19
|
does not create or clean up a worktree automatically.
|
|
20
|
+
|
|
21
|
+
`oc-beads:sync` requests supported Dolt-remote synchronization, distinct from
|
|
22
|
+
`bd federation sync` and removed JSONL sync. Follow the focused
|
|
23
|
+
[synchronization procedure](CLI_REFERENCE.md#synchronization) for --no-adopt,
|
|
24
|
+
existing configuration, actor, permissions and honest outcomes. This resource is
|
|
25
|
+
secondary worktree context; the installed Beads CLI owns synchronization and
|
|
26
|
+
consistency semantics.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snarkipus/opencode-beads",
|
|
3
|
-
"version": "1.1.0-beta.
|
|
3
|
+
"version": "1.1.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A maintained OpenCode V2 integration for the Beads issue tracker: bd prime context injection with a schema-migration guard, and a bounded task agent.",
|
|
6
6
|
"author": "Matt Jackson",
|
package/src/guidance.ts
CHANGED
|
@@ -34,7 +34,7 @@ const BEADS_HOST_GUIDANCE = `## CLI Safety
|
|
|
34
34
|
Use actual request capabilities below. Native shell is direct-only and cannot be called inside execute.
|
|
35
35
|
Treat the injected \`bd prime\` output as the canonical workflow reference. Use \`bd --help\` to discover commands, \`bd <command> --help\` for current syntax, and \`--json\` when structured output improves reliability. Distinguish command failures from output parsing failures.
|
|
36
36
|
|
|
37
|
-
Run relevant validation before closing an issue. Do not commit, push, or run Dolt synchronization automatically; do so only when current instructions or repository policy explicitly require it.`;
|
|
37
|
+
Run relevant validation before closing an issue. Do not commit, push, or run Dolt synchronization automatically; do so only when current instructions or repository policy explicitly require it. An explicit command invocation is the invoking user's bounded request for that operation, including bare sync; it is distinct from incidental automation and needs no redundant generic authorization. Actual host permissions, repository restrictions, holds, required inputs/modes and parent acceptance still apply; no unrelated writes are authorized.`;
|
|
38
38
|
|
|
39
39
|
const BEADS_RECOVERY_GUIDANCE = `## Work continuity
|
|
40
40
|
|
package/src/host.ts
CHANGED
|
@@ -254,7 +254,7 @@ export async function setupBeads(
|
|
|
254
254
|
try { effectiveSkills = ctx.skill ? (await ctx.skill.list()).data.map((entry) => String(entry.id)) : "unavailable"; }
|
|
255
255
|
catch { effectiveSkills = "unavailable: registry lookup failed"; }
|
|
256
256
|
return JSON.stringify({
|
|
257
|
-
host: hostVersion, admission: SUPPORTED_OPENCODE_RANGE, liveQualification: "not measured by
|
|
257
|
+
host: hostVersion, admission: SUPPORTED_OPENCODE_RANGE, liveQualification: "not measured by diagnostics; see release acceptance evidence",
|
|
258
258
|
commands: {
|
|
259
259
|
registration: commandRegistration,
|
|
260
260
|
lookup: effectiveCommands ? "available" : "failed",
|
package/src/workflows.ts
CHANGED
|
@@ -12,32 +12,32 @@ export const BEADS_SKILL_PATH = fileURLToPath(new URL("../assets/oc-beads/SKILL.
|
|
|
12
12
|
|
|
13
13
|
/** Exact membership is checked against the selected immutable command inventory. */
|
|
14
14
|
export const WORKFLOWS = {
|
|
15
|
-
audit: ["Inspect or explicitly record scoped audit evidence; never collect transcripts automatically.", "
|
|
15
|
+
audit: ["Inspect or explicitly record scoped audit evidence; never collect transcripts automatically.", "CLI_REFERENCE"],
|
|
16
16
|
blocked: ["Inspect blocked work; distinguish explicit blocked status from dependency blocking.", "DEPENDENCIES"],
|
|
17
17
|
close: ["Close only the requested work with acceptance and validation evidence and closure authority.", "WORKFLOWS"],
|
|
18
18
|
comments: ["Read discussion or append the requested comment/checkpoint without replacing prior notes.", "RESUMABILITY"],
|
|
19
|
-
compact: ["
|
|
19
|
+
compact: ["Guide semantic issue compaction with bd admin compact, distinct from bd compact Dolt-history squashing and conversation compaction. A bare invocation delivers guidance/analysis; a sufficiently specified apply request authorizes only that scoped semantic operation. Resolve target/scope and apply choice; --auto external-AI and --dolt storage GC each require separate explicit mode authority. Supply explicit --actor.", "TROUBLESHOOTING"],
|
|
20
20
|
create: ["Create the requested issue with useful description, acceptance/design and discovered-from provenance when applicable; leave it unassigned unless assignment is intentional.", "ISSUE_CREATION"],
|
|
21
21
|
decision: ["Record the requested decision, rationale and alternatives; reference intended behavior and detailed rationale in their project-owned homes.", "INTEGRATION_PATTERNS"],
|
|
22
|
-
delete: ["Inspect
|
|
22
|
+
delete: ["Inspect requested targets and effects, then delete them when inputs and policy permit; a sufficiently specified deletion invocation requests that scoped deletion. Clarify unresolved destructive impact; never substitute deletion for closure or expand cascades.", "TROUBLESHOOTING"],
|
|
23
23
|
dep: ["Inspect or change only the requested dependencies. Verify that X depends on Y in the intended direction.", "DEPENDENCIES"],
|
|
24
|
-
epic: ["Inspect or manage the requested hierarchy; closed children alone do not establish parent acceptance.", "
|
|
24
|
+
epic: ["Inspect or manage the requested hierarchy; closed children alone do not establish parent acceptance.", "DEPENDENCIES"],
|
|
25
25
|
export: ["Export only the requested scope and destination with current CLI help; distinguish issue interchange from a full backup or memory export.", "CLI_REFERENCE"],
|
|
26
|
-
import: ["
|
|
27
|
-
init: ["Provide human-directed onboarding and current bd init help, explaining side effects. Do not initialize a store automatically.", "
|
|
26
|
+
import: ["Perform the requested scoped import after inspecting input and current syntax; resolve input, target context and material mode/conflicts, then report counts and partial outcomes. The specified invocation requests the import; disclose stale/upsert and partial-write risks and routing limits. Never initialize, restore or repair implicitly.", "CLI_REFERENCE"],
|
|
27
|
+
init: ["Provide human-directed onboarding and current bd init help, explaining side effects. Do not initialize a store automatically.", "CLI_REFERENCE"],
|
|
28
28
|
label: ["Inspect or update only requested labels while preserving the project's taxonomy.", "CLI_REFERENCE"],
|
|
29
29
|
list: ["Retrieve issues with the requested supported filters. Retrieval does not authorize claims or task execution.", "CLI_REFERENCE"],
|
|
30
30
|
prime: ["Use supplied current context when available; request a guarded full-context refresh only when authorized and no hold is active.", "RESUMABILITY"],
|
|
31
|
-
quickstart: ["
|
|
31
|
+
quickstart: ["Guide onboarding with installed bd quickstart help, current authorized context and packaged guidance; do not initialize a store or assume commands unavailable in the installed CLI.", "CLI_REFERENCE"],
|
|
32
32
|
ready: ["Inspect actionable work. Honor an exact assignment; claim and execute only work already within the authorized scope.", "WORKFLOWS"],
|
|
33
|
-
"rename-prefix": ["Explain the requested project identifier migration and reference impact using current CLI help;
|
|
33
|
+
"rename-prefix": ["Explain the requested project identifier migration and reference impact using current CLI help; a fully scoped migration request supplies its authority. Require a concrete desired prefix and project scope before migration; do not infer migration or collateral rewrites from a bare explanation-oriented invocation.", "TROUBLESHOOTING"],
|
|
34
34
|
reopen: ["Inspect current state, then reopen only the requested issue with the supplied regression/correction reason.", "WORKFLOWS"],
|
|
35
|
-
restore: ["
|
|
35
|
+
restore: ["Retrieve pre-compaction issue content with bd restore; display-only by default. Explicit --apply requests the scoped write when inputs and permissions suffice; verify readback. This is not database backup recovery or guaranteed reversibility.", "RESUMABILITY"],
|
|
36
36
|
search: ["Search issues using supported filters; distinguish issue search from reusable memory search.", "CLI_REFERENCE"],
|
|
37
|
-
show: ["Read requested issue details, prior notes, acceptance and dependencies without mutating them.", "
|
|
38
|
-
stats: ["Report the
|
|
39
|
-
sync: ["
|
|
40
|
-
template: ["Discover
|
|
37
|
+
show: ["Read requested issue details, prior notes, acceptance and dependencies without mutating them.", "CLI_REFERENCE"],
|
|
38
|
+
stats: ["Report the issue-database overview using bd status (alias bd stats); use oc-beads:diagnostics for integration health. Do not claim work.", "CLI_REFERENCE"],
|
|
39
|
+
sync: ["Perform supported bd sync --no-adopt using existing project configuration, actual executor actor and applicable sandbox policy, then report the observed outcome. A bare invocation requests synchronization; a missing configured remote is a blocker. Use an explicitly selected existing remote only when unambiguous; no --yes, adoption, provisioning, force resolution or manual pull/push repair loop. Explicit adoption is a distinct request, never inferred. Distinguish Dolt-remote synchronization from bd federation sync and removed JSONL sync.", "CLI_REFERENCE"],
|
|
40
|
+
template: ["Discover actual available templates/formulas using supported installed commands, optionally inspect a requested one, and report entries or an honest unavailable result. Help inspection is preparation; do not instantiate or execute a formula automatically.", "MOLECULES"],
|
|
41
41
|
update: ["Apply only requested field changes; use an atomic claim for authorized execution and append-style progress notes. Replacement of notes is intentional, never routine.", "RESUMABILITY"],
|
|
42
42
|
version: ["Report actual installed CLI, package and host versions and qualification limits; do not hardcode a latest version or install/upgrade anything.", "CLI_REFERENCE"],
|
|
43
43
|
workflow: ["Guide native Beads work and recovery: inspect scope, read prior state, claim atomically, checkpoint meaningful learning, validate and return evidence. Continue only within an authorized batch/goal.", "WORKFLOWS"],
|
|
@@ -90,11 +90,14 @@ export function applyBeadsSkill(editor: SkillEditor, skill: BeadsSkill, diagnose
|
|
|
90
90
|
/** Build native prompt commands, never shell/template interpolation or synthetic continuation. */
|
|
91
91
|
export function createBeadsCommands(
|
|
92
92
|
session: Pick<Plugin.Context["session"], "prompt">,
|
|
93
|
-
|
|
93
|
+
diagnostics: (sessionID: string) => Promise<string>,
|
|
94
94
|
skillPath = BEADS_SKILL_PATH,
|
|
95
95
|
signal?: AbortSignal,
|
|
96
96
|
): CommandDefinition[] {
|
|
97
97
|
const common = [
|
|
98
|
+
"Workflow commands guide permitted operations, not exact CLI aliases.",
|
|
99
|
+
"The invocation itself is the invoking user's bounded request, even without trailing details. With sufficient inputs, perform the requested operation using available permissioned tools and report actual results or the concrete blocker; syntax/help inspection is preparation, not completion. Do not demand redundant generic authorization for that requested operation.",
|
|
100
|
+
"Interpret literal details in conversational context. Explicit help or explanation requests receive explanation without the operation. Ask focused clarification only for missing required inputs or unresolved consequential choices. Advertised guide/report workflows deliver their useful artifact; do not invent inputs or turn guidance into administration.",
|
|
98
101
|
"Follow repository/user authority and the exact requested scope. Do not bypass a hold with manual prime or other store access.",
|
|
99
102
|
"Use actual request capabilities: discover the native beads namespace and compose supported daily operations in code mode when present. Native shell is direct-only; advanced/admin workflows use permissioned direct shell and current CLI help. Do not call tools.shell inside execute. Advanced guidance does not enable automation.",
|
|
100
103
|
"Every agent-authored write, claim and heartbeat needs the host-rendered actual executor's command-scoped BEADS_ACTOR or --actor. Preserve authorship; read created_by, owner and assignee separately.",
|
|
@@ -110,16 +113,16 @@ export function createBeadsCommands(
|
|
|
110
113
|
...input.prompt,
|
|
111
114
|
sessionID: input.sessionID,
|
|
112
115
|
delivery: input.delivery,
|
|
113
|
-
text:
|
|
116
|
+
text: `Invoked command: /oc-beads:${stem}\nRequested outcome: ${purpose}\n${common}\nSupporting guidance: ${JSON.stringify(resolve(dirname(skillPath), "resources", `${resource}.md`))}${input.prompt.text ? `\n\nLiteral user details:\n${input.prompt.text}` : ""}`,
|
|
114
117
|
});
|
|
115
118
|
},
|
|
116
119
|
}));
|
|
117
120
|
commands.push({
|
|
118
|
-
name: "oc-beads:
|
|
119
|
-
description: "Inspect
|
|
121
|
+
name: "oc-beads:diagnostics",
|
|
122
|
+
description: "Inspect OpenCode Beads integration discovery, conflicts, compatibility and context/persistence diagnostics without opening a store; use oc-beads:stats for the issue-database overview.",
|
|
120
123
|
async execute(input) {
|
|
121
124
|
if (signal?.aborted) throw new Error("Beads workflow unloaded");
|
|
122
|
-
const report = await
|
|
125
|
+
const report = await diagnostics(input.sessionID);
|
|
123
126
|
if (signal?.aborted) throw new Error("Beads workflow unloaded");
|
|
124
127
|
await session.prompt({
|
|
125
128
|
...input.prompt, sessionID: input.sessionID, delivery: input.delivery,
|