@snarkipus/opencode-beads 1.0.1 → 1.1.0-beta.1
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 +45 -28
- package/assets/oc-beads/SKILL.md +149 -0
- package/assets/oc-beads/adr/0001-bd-prime-as-source-of-truth.md +40 -0
- package/assets/oc-beads/resources/AGENTS.md +43 -0
- package/assets/oc-beads/resources/ASYNC_GATES.md +63 -0
- package/assets/oc-beads/resources/BOUNDARIES.md +57 -0
- package/assets/oc-beads/resources/CHEMISTRY_PATTERNS.md +44 -0
- package/assets/oc-beads/resources/CLI_REFERENCE.md +20 -0
- package/assets/oc-beads/resources/CODE_MODE.md +78 -0
- package/assets/oc-beads/resources/DEPENDENCIES.md +82 -0
- package/assets/oc-beads/resources/INTEGRATION_PATTERNS.md +74 -0
- package/assets/oc-beads/resources/ISSUE_CREATION.md +45 -0
- package/assets/oc-beads/resources/MOLECULES.md +65 -0
- package/assets/oc-beads/resources/PATTERNS.md +43 -0
- package/assets/oc-beads/resources/RESUMABILITY.md +83 -0
- package/assets/oc-beads/resources/STATIC_DATA.md +19 -0
- package/assets/oc-beads/resources/TROUBLESHOOTING.md +49 -0
- package/assets/oc-beads/resources/WORKFLOWS.md +64 -0
- package/assets/oc-beads/resources/WORKTREES.md +19 -0
- package/package.json +5 -4
- package/src/agents.ts +11 -3
- package/src/context.ts +67 -22
- package/src/continuity.ts +380 -0
- package/src/guard.ts +44 -11
- package/src/guidance.ts +66 -16
- package/src/host.ts +328 -45
- package/src/instructions.ts +11 -8
- package/src/plugin.ts +2 -1
- package/src/prime.ts +15 -4
- package/src/workflows.ts +131 -0
package/README.md
CHANGED
|
@@ -7,23 +7,31 @@
|
|
|
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
|
|
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 candidate below 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
|
+
|
|
14
|
+
This branch prepares **1.1.0-beta.1**, an opt-in beta for npm dist-tag `next`; publication remains pending owner approval. 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
|
+
|
|
16
|
+
The beta registers 29 `oc-beads:<stem>` workflows plus `oc-beads:status` 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. Status reports observed registration and name/description mismatches; identical-description overrides and public owner identity remain unobservable.
|
|
17
|
+
|
|
18
|
+
Typed registration requires the host tool, permission and session interfaces. Status 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
|
+
|
|
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; this 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.
|
|
13
21
|
|
|
14
22
|
## Design
|
|
15
23
|
|
|
16
|
-
The
|
|
24
|
+
The beta/next candidate uses scope-bounded task execution:
|
|
17
25
|
|
|
18
26
|
- The primary OpenCode thread retains planning context, decisions, and control.
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
27
|
+
- An exact assignment or explicit one-bead mode stops with that item; read-only graph requests never authorize claims or writes.
|
|
28
|
+
- An already-authorized batch or goal may continue within scope, with an atomic claim, append checkpoints, validation and acceptance evidence for each Bead. Discovery does not expand that authority.
|
|
29
|
+
- Direct work or normal blocking delegation is chosen for the task. The actual executor actor follows claims, updates and heartbeats; handoffs are deliberate. Parent-owned acceptance and closure remain with the parent.
|
|
30
|
+
- Denied authority, cancellation, permission waits, blockers and incomplete acceptance remain visible stops. Child results do not restart work. The [current bounded semantic evidence](docs/opencode-installed-model-continuation-vuy9.md) measures these outcomes, with failed validation and partial work preserved; broader model quality and multi-hour reliability remain unmeasured.
|
|
22
31
|
|
|
23
32
|
## Installation
|
|
24
33
|
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
The beta requires OpenCode `>=2.1.1 <2.2` and `bd` 1.3.1 or later. Exact OpenCode 2.1.1 has bounded native, Stop and installed/model evidence; other admitted 2.1 patches are not inferred qualified. The external `bd` CLI and project initialization remain prerequisites; the plugin does not install or upgrade them. Stable 1.0.2 remains separately qualified against OpenCode 2.0.26.
|
|
27
35
|
1. Install the [`bd` CLI](https://github.com/gastownhall/beads/blob/main/docs/getting-started/installation.md) once on the host, then initialize each project:
|
|
28
36
|
|
|
29
37
|
```bash
|
|
@@ -31,19 +39,21 @@ This plugin requires OpenCode 2 and `bd` 1.3.0 or later.
|
|
|
31
39
|
bd init
|
|
32
40
|
```
|
|
33
41
|
|
|
34
|
-
`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`.
|
|
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`.
|
|
35
43
|
|
|
36
|
-
2.
|
|
44
|
+
2. After beta publication, add the version-pinned plugin to `~/.config/opencode/opencode.json` for every project, or to a project's `.opencode/opencode.json`:
|
|
37
45
|
|
|
38
46
|
```json
|
|
39
47
|
{
|
|
40
|
-
"plugins": ["@snarkipus/opencode-beads@1.0.1"]
|
|
48
|
+
"plugins": ["@snarkipus/opencode-beads@1.1.0-beta.1"]
|
|
41
49
|
}
|
|
42
50
|
```
|
|
43
51
|
|
|
52
|
+
To follow the beta channel after publication, 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
|
+
|
|
44
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.
|
|
45
55
|
|
|
46
|
-
3. Check the install: `opencode debug agents` lists `beads-task-agent
|
|
56
|
+
3. Check the install: `opencode debug agents` lists `beads-task-agent`; `/oc-beads:status` reports native registration and observed capabilities. Discover `beads` through execute on a host/agent with the required permissions.
|
|
47
57
|
|
|
48
58
|
### Plugin options
|
|
49
59
|
|
|
@@ -53,7 +63,7 @@ Plugin options use the object form:
|
|
|
53
63
|
{
|
|
54
64
|
"plugins": [
|
|
55
65
|
{
|
|
56
|
-
"package": "@snarkipus/opencode-beads@1.0.1",
|
|
66
|
+
"package": "@snarkipus/opencode-beads@1.1.0-beta.1",
|
|
57
67
|
"options": { "luna": true, "autoMigrate": false }
|
|
58
68
|
}
|
|
59
69
|
]
|
|
@@ -63,8 +73,8 @@ Plugin options use the object form:
|
|
|
63
73
|
| Option | Default | Effect |
|
|
64
74
|
| --- | --- | --- |
|
|
65
75
|
| `luna` | `false` | Also register the `beads-task-agent-luna` profile. |
|
|
66
|
-
| `stealth` | `false` |
|
|
67
|
-
| `taskAgentSteps` | `100` |
|
|
76
|
+
| `stealth` | `false` | Add `--stealth` to `bd prime` (no git operations in the session-close protocol), like `bd setup claude --stealth`. `bd config set no-git-ops true` is the project-level equivalent. |
|
|
77
|
+
| `taskAgentSteps` | `100` | Interruption cap on task-agent steps per invocation. `0` removes the cap; neither value changes authorized scope or establishes completion. |
|
|
68
78
|
| `refreshAfterIdleMinutes` | `30` | Re-run `bd prime` when a session resumes after this much inactivity, as Claude Code does on resume. `0` disables idle refresh. |
|
|
69
79
|
| `autoMigrate` | `false` | Let automatic `bd prime` open a store that may need a schema migration. See [Schema migration guard](#schema-migration-guard). |
|
|
70
80
|
|
|
@@ -89,25 +99,31 @@ The [Claude Code parity matrix](docs/claude-code-parity.md) records every `bd se
|
|
|
89
99
|
|
|
90
100
|
## Context injection
|
|
91
101
|
|
|
92
|
-
The plugin runs
|
|
102
|
+
The plugin runs `bd prime --full` in the project directory and attaches its output to each model request through OpenCode's session context hook. Guarded prime is cached per session, while actual actor and request-capability guidance is rendered for each request. Prime runs once per session rather than per request. It runs again after compaction (automatic or manual), when a session resumes after `refreshAfterIdleMinutes` of inactivity, and when the plugin reloads, mirroring the `startup`, `resume`, `clear`, and `compact` sources of Claude Code's `SessionStart` hook. Steady work keeps the same text, which keeps provider prompt caches warm. Attached context is not stored in the conversation, so compaction cannot drop it. `--full` matters: without it, `bd` switches to brief MCP reminders whenever Claude Code's settings list a Beads MCP server, and OpenCode has no Beads MCP tool. Prime supplies the canonical current workflow, command guidance, and persistent memories; the plugin adds only compact OpenCode-specific safety and delegation guidance.
|
|
93
103
|
|
|
94
104
|
While prime is attached, two bd-managed `AGENTS.md` blocks only repeat it: the full-profile section `bd setup opencode` writes, and the Codex section `bd init` writes. The plugin replaces those marked blocks in the outgoing request with a one-line pointer, matching the minimal `CLAUDE.md` pointer Beads uses for Claude Code. `bd init`'s minimal section is left as is. Your `AGENTS.md` file and any text outside those markers are not changed, and nothing is replaced when prime is withheld or unavailable.
|
|
95
105
|
|
|
96
106
|
Known regular subagents remain excluded, including `explore` and `general`, while `beads-task-agent` and `beads-task-agent-luna` remain eligible. If agent lookup fails, context injection fails open to preserve compatibility with unknown custom primary agents.
|
|
97
107
|
|
|
98
|
-
If `bd` is unavailable or the project is uninitialized, nothing is added. If `bd prime` fails or times out, the agent gets a short `<beads-notice>` saying context is unavailable and to run `bd prime`, as Beads' Codex hooks report refresh failures. Either way the plugin retries after 30 seconds, and failures are also logged as `[opencode-beads]` warnings. The task agent retains
|
|
108
|
+
If `bd` is unavailable or the project is uninitialized, nothing is added. If `bd prime` fails or times out, the agent gets a short `<beads-notice>` saying context is unavailable and to run `bd prime`, as Beads' Codex hooks report refresh failures. Either way the plugin retries after 30 seconds, and failures are also logged as `[opencode-beads]` warnings. The task agent retains standalone guidance for authorized scope, atomic claim, append checkpoints, validate before closure, and partial handoff under the caller's acceptance authority.
|
|
99
109
|
|
|
100
110
|
## Schema migration guard
|
|
101
111
|
|
|
102
112
|
Beads 1.3 migrates an embedded store in place, irreversibly, the first time any command opens it, and `bd --readonly` does not prevent that. Because this plugin runs `bd prime` automatically, it would otherwise be the unattended first command after you upgrade `bd`.
|
|
103
113
|
|
|
104
|
-
Before running prime, the plugin checks `bd version` and `bd
|
|
114
|
+
Before running prime, the plugin checks `bd version` and the configuration-only `bd context --json` probe, which do not open the store, and reads `.beads/.local_version`. If the installed `bd` is older than 1.3.1, or the store was last opened by an older `bd`, the plugin withholds prime and gives the agent a notice telling it not to run `bd` and to ask you to act. To proceed, back up the `.beads` directory and run `bd migrate schema`; the plugin picks up the change on its next retry. Setting the `autoMigrate` option skips the store-version check.
|
|
105
115
|
|
|
106
116
|
`bd prime` itself does not update `.beads/.local_version`. A store migrated only by prime keeps the old marker until you run `bd migrate schema` (or any ordinary `bd` command), which is safe and idempotent.
|
|
107
117
|
|
|
108
118
|
## Beads workflows
|
|
109
119
|
|
|
110
|
-
|
|
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
|
+
|
|
122
|
+
## Removal and customization in the source candidate
|
|
123
|
+
|
|
124
|
+
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
|
+
|
|
126
|
+
Existing `oc-beads` skill IDs or names are checked and diagnosed in each rebuilt candidate; removing a customization allows the packaged skill to return. There is no permanent setup-time skill gate. Ordinary user configuration/file commands retain their later native precedence; same-name other-plugin conflicts follow native order rather than universal collision prevention. Disposing a registration removes only the package's transform; it does not delete user command/skill bodies, shared Beads skills, project data, startup files or global settings. Do not delete those files as plugin cleanup. Installed resource reads still require normal host permissions; bounded native external-directory ask/deny and actual model-use evidence is recorded in the acceptance reports. Missing/unreadable packaged guidance is diagnosed and its skill is withheld.
|
|
111
127
|
|
|
112
128
|
## Agent configuration
|
|
113
129
|
|
|
@@ -115,20 +131,20 @@ Entries under `agents` in OpenCode configuration override the plugin's task-agen
|
|
|
115
131
|
|
|
116
132
|
## Task agent
|
|
117
133
|
|
|
118
|
-
`beads-task-agent` supports read-only status and graph analysis or
|
|
134
|
+
The beta/next `beads-task-agent` supports read-only status and graph analysis or execution within an assigned task, batch or goal. Analysis requests never mutate Beads. Exact assignments stop without substitution. Authorized batches may continue only within scope, with an explicit executor actor, atomic claim/readback, append checkpoints and relevant validation for each Bead. Discoveries do not authorize their execution; unresolved acceptance remains incomplete, and parent-owned closure stays with the parent.
|
|
119
135
|
|
|
120
|
-
Its prompt and description are owned by this project.
|
|
136
|
+
Its prompt and description are owned by this project. Direct work and normal blocking delegation depend on the task, without a command-count threshold. The worker returns scope, actor/session, attempts, rationale, validation, durable references, blockers and next action. The caller reconciles acceptance; NO_TEXT, failure, cancellation, late results and step-cap interruption do not establish completion or authorize a restart.
|
|
121
137
|
|
|
122
138
|
OpenCode lets the plugin enforce parts of that contract, beyond what Claude Code's hooks can do:
|
|
123
139
|
|
|
124
|
-
- **No automatic commit, push, or sync.** The task agents' permissions require approval (`ask`) for `git commit`, `git push`, `bd dolt push`, `bd dolt pull`, and `bd sync`, on top of OpenCode's defaults.
|
|
140
|
+
- **No automatic commit, push, or sync.** The task agents' permissions require approval (`ask`) for `git commit`, `git push`, `bd dolt push`, `bd dolt pull`, and `bd sync`, on top of OpenCode's defaults. Global options before the subcommand (`git -C dir push`, `bd --json dolt push`) are covered too, and compound commands are checked per command. This is a guardrail against routine sync, not a sandbox: scripts and aliases can still run these commands. A non-interactive run rejects them. Set the agent's `permissions` in OpenCode configuration to replace these rules.
|
|
125
141
|
- **Step cap.** `taskAgentSteps` (default 100) limits a worker invocation; on its final step OpenCode removes tools and asks for a summary.
|
|
126
142
|
- **Context in the worker.** The worker runs in its own child session and receives `bd prime` there too; Claude Code's `SessionStart` hooks do not reach subagents.
|
|
127
143
|
- **Beads state across compaction.** Compaction requests in sessions with Beads context ask the summarizer to keep bead IDs, claim and status changes, discovered follow-ups, blockers, and pending validation.
|
|
128
144
|
|
|
129
145
|
### Opt-in Luna Max profile
|
|
130
146
|
|
|
131
|
-
The default `beads-task-agent` leaves its model unset, so a subagent inherits the parent session's model. Set the plugin option `"luna": true` to also register `beads-task-agent-luna`, which uses `openai/gpt-6-luna#max` with exactly the same prompt, subagent mode, step cap, and permissions. Per-agent overrides remain independent: customizations to `beads-task-agent` are not copied to Luna. Both profiles receive full prime context and
|
|
147
|
+
The default `beads-task-agent` leaves its model unset, so a subagent inherits the parent session's model. Set the plugin option `"luna": true` to also register `beads-task-agent-luna`, which uses `openai/gpt-6-luna#max` with exactly the same prompt, subagent mode, step cap, and permissions. Per-agent overrides remain independent: customizations to `beads-task-agent` are not copied to Luna. Both profiles receive full prime context and use the same scope and acceptance boundaries, including explicit one-bead mode when assigned. The profile makes no model-quality guarantee.
|
|
132
148
|
|
|
133
149
|
Ask the primary agent to delegate to `beads-task-agent-luna` by name through the `subagent` tool. Default delegation guidance still names `beads-task-agent`; enabling Luna does not reroute existing calls or change the primary agent's model. Remove the option to unregister the profile.
|
|
134
150
|
|
|
@@ -138,23 +154,24 @@ Luna requires access to `openai/gpt-6-luna` and its `max` variant in your OpenCo
|
|
|
138
154
|
|
|
139
155
|
The package vendors nothing from upstream. It depends on the installed `bd` CLI at runtime: `bd prime` supplies the current workflow, and the schema migration guard enforces the supported `bd` range.
|
|
140
156
|
|
|
141
|
-
[`scripts/bd-contract.ts`](scripts/bd-contract.ts) checks a real `bd` against everything the plugin relies on: version parsing, `bd where --json`, the `.beads/.local_version` behavior the guard depends on (written by `bd init`, untouched by `bd prime`, refreshed by `bd migrate schema`), and every command the task-agent prompt names. CI runs it against the validated release from `package.json` (`beads.validated`). The scheduled `beads-contract` workflow runs it daily against the latest stable Beads release, and fails if that release breaks the contract or is newer than the validated one. When a new release appears, review its upgrade notes, then update `beads.validated` and the compatibility table. The [artifact policy](docs/beads-artifact-policy.md) records why upstream artifacts are not vendored.
|
|
157
|
+
[`scripts/bd-contract.ts`](scripts/bd-contract.ts) checks a real `bd` against everything the plugin relies on: version parsing, `bd where --json`, the `.beads/.local_version` behavior the guard depends on (written by `bd init`, untouched by `bd prime`, refreshed by `bd migrate schema`), that `bd prime --full` keeps the full workflow when Claude Code has a Beads MCP server, and every command the task-agent prompt names. CI runs it against the validated release from `package.json` (`beads.validated`). The scheduled `beads-contract` workflow runs it daily against the latest stable Beads release, and fails if that release breaks the contract or is newer than the validated one. When a new release appears, review its upgrade notes, then update `beads.validated` and the compatibility table. The [artifact policy](docs/beads-artifact-policy.md) records why upstream artifacts are not vendored.
|
|
142
158
|
|
|
143
159
|
## Compatibility
|
|
144
160
|
|
|
145
161
|
| Component | Expected range | Validated baseline |
|
|
146
162
|
| --- | --- | --- |
|
|
147
|
-
| OpenCode | 2.
|
|
148
|
-
|
|
|
163
|
+
| OpenCode (beta/next candidate) | `>=2.1.1 <2.2` | 2.1.1 (bounded accepted evidence) |
|
|
164
|
+
| OpenCode (stable 1.0.2 historical) | 2.0.26 | 2.0.26 |
|
|
165
|
+
| `bd` CLI | 1.3.1 through 1.x | 1.3.1 |
|
|
149
166
|
| Bun (OpenCode host runtime) | >=1.3.14 | 1.4.2 |
|
|
150
167
|
|
|
151
|
-
The
|
|
168
|
+
The beta/next candidate type-checks against `@opencode/plugin` 2.1.1 and declares an optional peer range of `>=2.1.1 <2.2`. It checks `ctx.app.version` at startup and reports an unsupported-host diagnostic before registering Beads agents or hooks. This source guard does not qualify the entire host range; exact 2.1.1 has bounded accepted evidence, and future 2.1 patches are admitted candidates rather than tested versions. The stable 1.0.2 qualification on 2.0.26 is historical. See the [OpenCode V2 contract](docs/opencode-sdk-contract.md). The `bd` baseline was reviewed against Beads v1.3.1 (commit `c1c4b642ac1c08d8c828007a1c2f96e47e43ef7c`).
|
|
152
169
|
|
|
153
170
|
## Troubleshooting
|
|
154
171
|
|
|
155
172
|
- **No Beads context:** Run `bd prime`. Install `bd` if missing or run `bd init` if the project has no Beads workspace.
|
|
156
173
|
- **Agent reports that `bd prime` failed or timed out:** Run `bd prime` in the project to see the error; the plugin retries every 30 seconds.
|
|
157
|
-
- **Agent reports a Beads notice instead of context:** The schema migration guard withheld prime. Back up `.beads`, run `bd migrate schema`, and continue; or upgrade `bd` if the notice says it is older than 1.3.
|
|
174
|
+
- **Agent reports a Beads notice instead of context:** The schema migration guard withheld prime. Back up `.beads`, run `bd migrate schema`, and continue; or upgrade `bd` if the notice says it is older than 1.3.1.
|
|
158
175
|
- **Canonical skill missing:** For a new workspace, run `bd init`. For an existing workspace, follow current upstream Beads guidance; this plugin does not install or repair skills.
|
|
159
176
|
- **Task agent asks before committing or pushing:** This is intentional; see [Task agent](#task-agent). Approve the command, or set the agent's `permissions` in OpenCode configuration.
|
|
160
177
|
- **Unexpected definition:** Check OpenCode configuration for a colliding `beads-task-agent` definition. Explicit configuration wins.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oc-beads
|
|
3
|
+
description: >
|
|
4
|
+
Use Beads when work needs durable tracking across sessions, has dependencies or
|
|
5
|
+
blockers, needs a meaningful progress checkpoint, or must be resumed with its
|
|
6
|
+
prior attempts and decisions. Also use when searching or updating reusable
|
|
7
|
+
project knowledge. Follow the current project's instructions and the installed
|
|
8
|
+
bd CLI for supported operations.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Beads work in OpenCode
|
|
12
|
+
|
|
13
|
+
> Adapted from [Beads marketplace-main `SKILL.md` at commit `4a67d0d0288c1b4ee23e17fc896f47616931ba2d`](https://github.com/gastownhall/beads/blob/4a67d0d0288c1b4ee23e17fc896f47616931ba2d/plugins/beads/skills/beads/SKILL.md).
|
|
14
|
+
|
|
15
|
+
Beads is the external issue and execution record. The installed `bd` CLI owns its
|
|
16
|
+
commands and data. Repository and user instructions set the authority for each
|
|
17
|
+
operation. The project's specification system (for example OpenSpec, when used)
|
|
18
|
+
records intended behavior; project documents retain detailed rationale and
|
|
19
|
+
evidence; Beads records execution, assignment, and acceptance.
|
|
20
|
+
|
|
21
|
+
Use the current Beads context when the host provides it. If it is absent, retrieve
|
|
22
|
+
current workflow context through the permissioned CLI only when that operation is
|
|
23
|
+
authorized and no hold is active. Distinguish context that is missing, failed to
|
|
24
|
+
load, or deliberately withheld. A migration or permission hold is a stop signal;
|
|
25
|
+
do not bypass it by manually running `bd prime`. If execute is unavailable, use direct shell only when separately available and
|
|
26
|
+
authorized. Native shell is direct-only and cannot be called inside execute. Do
|
|
27
|
+
not assume an unstated tool name, approval, or setup step.
|
|
28
|
+
|
|
29
|
+
When typed composition is available, discover current signatures through native
|
|
30
|
+
`search({namespace: "beads"})`; each leaf retains its own permission checks.
|
|
31
|
+
Follow [code-mode composition](resources/CODE_MODE.md) for bounded reads,
|
|
32
|
+
projection, ordered writes, completeness, uncertainty and decline/Stop semantics.
|
|
33
|
+
|
|
34
|
+
## Work within the assigned scope
|
|
35
|
+
|
|
36
|
+
- Read the relevant issue and its dependencies before changing tracked state.
|
|
37
|
+
- An assignment to one specific item is an exact assignment: finish that item,
|
|
38
|
+
report the outcome, and stop. Continue across a batch only when the user or
|
|
39
|
+
repository instructions explicitly authorize that batch or goal. Discovering
|
|
40
|
+
more work can justify reporting or recording a finding when authorized; it
|
|
41
|
+
does not expand the work you may perform.
|
|
42
|
+
- For an authorized tracked task, claim atomically with the actual executor
|
|
43
|
+
actor. Keep that actor on every agent-authored Beads write and heartbeat:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
bd update '<id>' --claim --actor='<executor-actor>' --sandbox --json
|
|
47
|
+
bd heartbeat '<id>' --actor='<executor-actor>' --sandbox --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Use the host-rendered actor derived from your actual request session and agent,
|
|
51
|
+
matching typed write results. If unavailable, refuse writes until the host
|
|
52
|
+
supplies it; never copy a sample or impersonate another executor. Use a
|
|
53
|
+
readable, unambiguous identity, not the human Git identity or a model name.
|
|
54
|
+
Give delegated instructions the delegate's real actor and have the
|
|
55
|
+
executing worker claim its own authorized work. A deliberate handoff changes
|
|
56
|
+
ownership; parent review does not.
|
|
57
|
+
- Read back `created_by` (audit author), `owner` (record/account ownership), and
|
|
58
|
+
`assignee` (executor) separately. Leave new work unassigned unless assignment
|
|
59
|
+
is intentional. Preserve historical authorship; document provenance
|
|
60
|
+
corrections in notes instead of rewriting it.
|
|
61
|
+
- Direct work is suitable for small, clear tasks. Delegate when separate work
|
|
62
|
+
benefits from another executor or independent review, and state the scope,
|
|
63
|
+
evidence expected, actor, and stop condition. There is no required
|
|
64
|
+
command-count threshold or one-issue-per-invocation loop.
|
|
65
|
+
|
|
66
|
+
## Keep useful progress
|
|
67
|
+
|
|
68
|
+
At a meaningful change in direction, record what was attempted, what happened,
|
|
69
|
+
why the next step follows, any blocker, and the concrete next action. Append to
|
|
70
|
+
the issue's notes so useful earlier learning remains available:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
bd update '<id>' --append-notes="Tried …; result …; because …; blocker …; next …" --actor='<executor-actor>' --sandbox --json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Use `--append-notes` for checkpoints. Replacing notes is a deliberate edit, not
|
|
77
|
+
the routine checkpoint path. Keep records concise and evidence-based; do not
|
|
78
|
+
store credentials, raw dumps, or guesses as facts. Do not write just to meet a
|
|
79
|
+
count or frequency target when nothing material changed. If a write fails or its
|
|
80
|
+
result is uncertain, report that state and inspect before retrying.
|
|
81
|
+
|
|
82
|
+
## Separate task notes from reusable knowledge
|
|
83
|
+
|
|
84
|
+
Attempts, issue-specific test results, decisions, and the next action belong on
|
|
85
|
+
the issue. Use persistent Beads memory only for validated project knowledge that
|
|
86
|
+
will likely help beyond this issue. Search for existing knowledge first, then
|
|
87
|
+
update it deliberately with scope and evidence; a temporary failure usually
|
|
88
|
+
belongs in the task record rather than global memory. Recall before updating an
|
|
89
|
+
existing stable key: writing the same key replaces its content in place.
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
bd memories '<keyword>'
|
|
93
|
+
bd recall '<known-key>'
|
|
94
|
+
bd remember "Validated learning, where it applies, and supporting evidence" --key='<stable-key>' --actor='<executor-actor>' --sandbox
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Do not dump all memories into every handoff or delete old knowledge as routine
|
|
98
|
+
cleanup. Use the current CLI help for exact memory options.
|
|
99
|
+
|
|
100
|
+
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.
|
|
102
|
+
Examples assume a project policy prohibiting automatic remote updates and include
|
|
103
|
+
`--sandbox`; it only suppresses Dolt auto-push and provides no migration safety.
|
|
104
|
+
|
|
105
|
+
## Validation, handoff, and stopping
|
|
106
|
+
|
|
107
|
+
Before marking work complete, compare the result with its acceptance criteria and
|
|
108
|
+
run the relevant authorized validation. Keep failed or unrun checks explicit.
|
|
109
|
+
Close an issue only when closure is within your authority and its own acceptance
|
|
110
|
+
is met. If a parent, owner, or human controls acceptance, return evidence and
|
|
111
|
+
leave that decision to them. A discovered issue does not become authorized work
|
|
112
|
+
just because it is linked.
|
|
113
|
+
|
|
114
|
+
For a handoff, provide the current state, material attempts and outcomes,
|
|
115
|
+
rationale, validation evidence, blockers, next action, and useful issue or memory
|
|
116
|
+
references. Preserve enough context to continue without replaying a failed
|
|
117
|
+
approach. Stop when the exact assignment is done, authority is absent, a hold is
|
|
118
|
+
active, or a required guarantee cannot be established.
|
|
119
|
+
|
|
120
|
+
## Supporting guidance
|
|
121
|
+
|
|
122
|
+
These resources are separate so advanced or reference material can be opened
|
|
123
|
+
only when relevant. Every selected support file is linked explicitly because a
|
|
124
|
+
host may display only a limited automatic file list.
|
|
125
|
+
|
|
126
|
+
### Daily work
|
|
127
|
+
|
|
128
|
+
- [Boundaries: durable tracking and short-lived work](resources/BOUNDARIES.md)
|
|
129
|
+
- [Current CLI reference sources](resources/CLI_REFERENCE.md)
|
|
130
|
+
- [Dependency direction and provenance](resources/DEPENDENCIES.md)
|
|
131
|
+
- [Issue creation and useful fields](resources/ISSUE_CREATION.md)
|
|
132
|
+
- [Common execution patterns](resources/PATTERNS.md)
|
|
133
|
+
- [Resumability and recovery notes](resources/RESUMABILITY.md)
|
|
134
|
+
- [Meaningful workflows and checkpoints](resources/WORKFLOWS.md)
|
|
135
|
+
- [OpenCode and Beads integration patterns](resources/INTEGRATION_PATTERNS.md)
|
|
136
|
+
- [Current troubleshooting and stop conditions](resources/TROUBLESHOOTING.md)
|
|
137
|
+
|
|
138
|
+
### Advanced, on demand
|
|
139
|
+
|
|
140
|
+
- [Agent beads, executor identity, and unsupported slot APIs](resources/AGENTS.md)
|
|
141
|
+
- [Asynchronous gates](resources/ASYNC_GATES.md)
|
|
142
|
+
- [Molecule and wisp patterns](resources/CHEMISTRY_PATTERNS.md)
|
|
143
|
+
- [Molecule and formula reference](resources/MOLECULES.md)
|
|
144
|
+
- [Static reference data](resources/STATIC_DATA.md)
|
|
145
|
+
- [Worktree routing](resources/WORKTREES.md)
|
|
146
|
+
|
|
147
|
+
### Rationale
|
|
148
|
+
|
|
149
|
+
- [ADR-0001: keep exact CLI syntax dynamic](adr/0001-bd-prime-as-source-of-truth.md)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ADR-0001: Keep exact CLI syntax dynamic
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
Accepted for this guidance corpus.
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
The upstream Beads skill and its resources have useful decision guidance, but
|
|
10
|
+
they are not a generated reference for every installed `bd` release. Copying
|
|
11
|
+
flags and command forms throughout prose lets examples age independently of the
|
|
12
|
+
CLI. A successful `bd prime` or command exit is also not proof that a particular
|
|
13
|
+
record was found, a memory was returned, or a write was acknowledged.
|
|
14
|
+
|
|
15
|
+
## Decision
|
|
16
|
+
|
|
17
|
+
- Keep cognitive and workflow guidance in `SKILL.md` and its on-demand resources.
|
|
18
|
+
- Use `bd prime` for current workflow context and `bd '<command>' --help` for
|
|
19
|
+
exact syntax. Do not duplicate a broad CLI reference here.
|
|
20
|
+
- Respect an explicit context, permission, or migration hold. A manual prime is
|
|
21
|
+
not a fallback around a hold.
|
|
22
|
+
- Keep examples limited to supported CLI forms verified against the installed
|
|
23
|
+
help. When an operation is unavailable, say what supported path or limitation
|
|
24
|
+
applies instead of inventing a flag or tool.
|
|
25
|
+
- Treat host registration, package inclusion, installed resource access, and
|
|
26
|
+
behavioral qualification as separate evidence. The presence of these source
|
|
27
|
+
assets does not establish those outcomes.
|
|
28
|
+
|
|
29
|
+
## Consequences
|
|
30
|
+
|
|
31
|
+
This keeps the startup guidance short and moves depth to linked resources. CLI
|
|
32
|
+
help can still be incomplete or ambiguous, so examples and compatibility claims
|
|
33
|
+
need review against their relevant Beads release. No claim that drift is
|
|
34
|
+
impossible is made. Advanced features remain opt-in and do not enable automation,
|
|
35
|
+
store initialization, synchronization, or permission changes by themselves.
|
|
36
|
+
|
|
37
|
+
## Source attribution
|
|
38
|
+
|
|
39
|
+
Adapted from [Beads marketplace-main ADR-0001 at commit
|
|
40
|
+
`4a67d0d0288c1b4ee23e17fc896f47616931ba2d`](https://github.com/gastownhall/beads/blob/4a67d0d0288c1b4ee23e17fc896f47616931ba2d/plugins/beads/skills/beads/adr/0001-bd-prime-as-source-of-truth.md).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Agent beads and executor identity
|
|
2
|
+
|
|
3
|
+
> Adapted from [Beads marketplace-main `AGENTS.md`](https://github.com/gastownhall/beads/blob/4a67d0d0288c1b4ee23e17fc896f47616931ba2d/plugins/beads/skills/beads/resources/AGENTS.md).
|
|
4
|
+
|
|
5
|
+
## Keep the concepts separate
|
|
6
|
+
|
|
7
|
+
Beads executor attribution, issue assignment, and specialized agent/role beads
|
|
8
|
+
serve different purposes. For ordinary delegated work, use the authorized issue
|
|
9
|
+
and assign or claim it for the actual executor. Supply that executor's explicit
|
|
10
|
+
actor on each Beads write and heartbeat. Do not substitute the parent, human Git
|
|
11
|
+
identity, or model name for the worker identity.
|
|
12
|
+
|
|
13
|
+
Read `created_by`, `owner`, and `assignee` as separate fields. `created_by` is
|
|
14
|
+
audit authorship, `owner` identifies the record/account owner, and `assignee`
|
|
15
|
+
identifies the executor. A claim does not rewrite historical authorship. Record
|
|
16
|
+
known provenance corrections in append-style notes.
|
|
17
|
+
|
|
18
|
+
## Specialized agent/role beads are optional
|
|
19
|
+
|
|
20
|
+
The upstream resource describes a richer agent state machine and named slots.
|
|
21
|
+
In the inspected Beads 1.3.1 CLI, `bd agent --help` and `bd slot --help` both
|
|
22
|
+
return unknown-command errors. The installed CLI does support ordinary issue
|
|
23
|
+
assignment, atomic task claims, and `bd heartbeat` for a claimed issue lease.
|
|
24
|
+
Those are useful executor conventions, not a one-to-one implementation of
|
|
25
|
+
agent/role beads, their state machine, or slot queries.
|
|
26
|
+
|
|
27
|
+
The upstream model describes lifecycle labels such as idle, spawning,
|
|
28
|
+
running/working, done, stuck, stopped, and dead, and slots such as a current-work
|
|
29
|
+
hook or a role. Treat these as design concepts from the source material, not
|
|
30
|
+
states or slot records this CLI can create or query.
|
|
31
|
+
|
|
32
|
+
Do not assume `bd agent` or `bd slot` is available and do not invent replacement
|
|
33
|
+
flags. Workflows that require those specialized APIs must stop or use a separately
|
|
34
|
+
approved, documented system. Routine Beads work does not need agent beads,
|
|
35
|
+
Witness, a slot service, or a new orchestration layer.
|
|
36
|
+
|
|
37
|
+
## When a separate agent record could help
|
|
38
|
+
|
|
39
|
+
Only consider specialized agent records when a project already has a supported
|
|
40
|
+
coordination design that needs durable role capabilities, liveness, or multiple
|
|
41
|
+
named assignments. Establish who owns those records and how they are retired
|
|
42
|
+
before writing any. A heartbeat on an assigned issue refreshes that issue's
|
|
43
|
+
claim lease; it is not a general process monitor.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Asynchronous gates
|
|
2
|
+
|
|
3
|
+
> Adapted from [Beads marketplace-main `ASYNC_GATES.md`](https://github.com/gastownhall/beads/blob/4a67d0d0288c1b4ee23e17fc896f47616931ba2d/plugins/beads/skills/beads/resources/ASYNC_GATES.md).
|
|
4
|
+
|
|
5
|
+
An async gate models a wait condition that blocks a later step. It does not do
|
|
6
|
+
the work, grant permission, or make a human decision. Use one only when an
|
|
7
|
+
authorized workflow needs a durable wait relationship; ordinary blockers can
|
|
8
|
+
remain issue dependencies.
|
|
9
|
+
|
|
10
|
+
## Gate kinds
|
|
11
|
+
|
|
12
|
+
The pinned guidance distinguishes a human decision from a condition that can
|
|
13
|
+
be checked:
|
|
14
|
+
|
|
15
|
+
| Kind | Successful condition | Failure or timeout behavior |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `human` | Explicit human decision, recorded by manual resolution. | A `--timeout` can be stored as metadata but is not enforced by `bd gate check`; silence is not consent. |
|
|
18
|
+
| `timer` | The timeout has elapsed when an authorized executor runs `bd gate check --type=timer --actor='<executor-actor>' --sandbox --json`. | Otherwise it remains pending. |
|
|
19
|
+
| `gh:run` | Run is completed with success (the pinned guidance also treats skipped as resolved). | Completed failure or cancellation escalates; the gate remains open for a decision. |
|
|
20
|
+
| `gh:pr` | Pull request is merged. | Closed without merge escalates; the gate remains open for a decision. |
|
|
21
|
+
| `bead` | The referenced issue is closed, when supported by the installed create path. | An open target remains pending. |
|
|
22
|
+
|
|
23
|
+
The installed `bd gate check --help` confirms timer evaluation and GitHub
|
|
24
|
+
success/failure conditions. The pinned source says a human gate's stored timeout
|
|
25
|
+
is not enforced by `check`. The installed `bd gate create --help` lists human,
|
|
26
|
+
timer, `gh:run`, and `gh:pr`; it does not list `bead` as a create type. Check
|
|
27
|
+
current help before relying on a gate type; this guidance does not qualify host
|
|
28
|
+
behavior.
|
|
29
|
+
|
|
30
|
+
## Inspect and resolve deliberately
|
|
31
|
+
|
|
32
|
+
Use `bd gate --help` and `bd gate '<subcommand>' --help` for current syntax. The
|
|
33
|
+
installed help supports this deliberate human-decision flow:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
# An authorized executor creates the wait condition.
|
|
37
|
+
bd gate create --type=human --blocks='<issue-id>' \
|
|
38
|
+
--reason="Needs owner review" --actor='<executor-actor>' --sandbox --json
|
|
39
|
+
bd gate list --json
|
|
40
|
+
bd gate show '<gate-id>'
|
|
41
|
+
|
|
42
|
+
# The actual human runs this command only after making the decision.
|
|
43
|
+
bd gate resolve '<gate-id>' --reason="Reviewed; decision recorded" \
|
|
44
|
+
--actor='<actual-human-actor>' --sandbox --json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Read both the gate and blocked issue before changing either. An agent must never
|
|
48
|
+
supply a human actor or resolve a human gate on the human's behalf. Never infer
|
|
49
|
+
consent from silence. A failed CI run or unmerged closed pull request is a failure
|
|
50
|
+
to investigate, not a successful gate. If an authorized executor runs a check, keep its actor explicit and
|
|
51
|
+
inspect the resulting state before continuing.
|
|
52
|
+
|
|
53
|
+
Do not create gates automatically for every handoff, approval, test, or issue.
|
|
54
|
+
Do not add polling, watchers, or approval automation as a side effect of reading
|
|
55
|
+
this resource. Gates and issue dependencies are distinct: use a gate for a
|
|
56
|
+
documented async condition, and an issue dependency for work ordering.
|
|
57
|
+
|
|
58
|
+
## Stop conditions
|
|
59
|
+
|
|
60
|
+
Stop if the gate cannot be read, its referenced event cannot be verified, a
|
|
61
|
+
human decision is required, or the current CLI lacks the required gate action.
|
|
62
|
+
Report the gate ID, observed state, evidence, and the decision needed. Never
|
|
63
|
+
route around a permission denial by calling a different interface.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Boundaries: durable tracking and short-lived work
|
|
2
|
+
|
|
3
|
+
> Adapted from [Beads marketplace-main `BOUNDARIES.md`](https://github.com/gastownhall/beads/blob/4a67d0d0288c1b4ee23e17fc896f47616931ba2d/plugins/beads/skills/beads/resources/BOUNDARIES.md).
|
|
4
|
+
|
|
5
|
+
Use Beads for work whose ownership, dependencies, blocker, history, or next
|
|
6
|
+
session matters to the project. Keep a short linear breakdown in the current
|
|
7
|
+
conversation when it is only an execution aid and no repository rule requires a
|
|
8
|
+
durable issue. Do not make a second Markdown task list the durable project record.
|
|
9
|
+
|
|
10
|
+
## Choose the right record
|
|
11
|
+
|
|
12
|
+
| Situation | Record | Why |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| Short, linear steps that will finish in this session | Conversation checklist, if useful | Keeps execution visible without creating durable issue noise. |
|
|
15
|
+
| Work needs an owner, blocker, dependency, acceptance, or later resume | Existing or authorized Bead | Preserves execution history and handoff context. |
|
|
16
|
+
| Validated learning is likely to help on future issues | Relevant Beads memory | Reusable knowledge is separate from a task's attempts. |
|
|
17
|
+
| Intended behavior and acceptance contract | Project's specification system (for example OpenSpec, when used) | Keeps the project specification authoritative. |
|
|
18
|
+
| Detailed rationale, source evidence, or qualification result | Project documentation | Gives durable evidence a stable home. |
|
|
19
|
+
| Temporary command output | Current session; summarize only if it changes a decision | Avoids storing noise. |
|
|
20
|
+
| Host explicitly exposes experimental todo support and the user/project opts in | Host-owned transient checklist | Optional convenience only; it is not installed or enabled here. |
|
|
21
|
+
|
|
22
|
+
OpenCode 2.1 experimental todo support is opt-in and host-owned. Do not require
|
|
23
|
+
it, turn it on, or assume Claude's `TodoWrite` exists in every host. If no
|
|
24
|
+
session checklist is available, keep a brief checklist in the conversation or
|
|
25
|
+
use an authorized Bead when the work is durable.
|
|
26
|
+
|
|
27
|
+
Do not create a new Bead for every command, transient retry, small nit, or
|
|
28
|
+
document. Create or update a record when the work is genuinely durable and you
|
|
29
|
+
have authority to do so. Existing assignment and project policy take priority
|
|
30
|
+
over any general heuristic here.
|
|
31
|
+
|
|
32
|
+
Ask: “Could I resume this after two weeks away?” If the answer needs context
|
|
33
|
+
that would otherwise be lost, preserve it in the appropriate authorized record.
|
|
34
|
+
|
|
35
|
+
## Transition when the work grows
|
|
36
|
+
|
|
37
|
+
It is reasonable to begin with a transient checklist for “update the retry
|
|
38
|
+
message and run its focused test.” If the test uncovers an independent data-loss
|
|
39
|
+
case, a prerequisite, or work that must continue next session, stop treating the
|
|
40
|
+
checklist as the durable record. If authorized, create or update the appropriate
|
|
41
|
+
Bead with the attempted fix, test evidence, discovered blocker, acceptance, and
|
|
42
|
+
next step; link new work to its source where useful. Keep the checklist only for
|
|
43
|
+
the remaining steps in this session. Without authority to create or change a
|
|
44
|
+
Bead, preserve the discovery in the assigned record if permitted, then report
|
|
45
|
+
and stop at the scope boundary.
|
|
46
|
+
|
|
47
|
+
## Preserve the authority boundary
|
|
48
|
+
|
|
49
|
+
A ready issue is available work, not permission. A single-item assignment ends
|
|
50
|
+
after that item; continue only inside an explicitly authorized batch or goal.
|
|
51
|
+
Finding related work does not authorize acting on it. Link or report discoveries
|
|
52
|
+
only within the authority already granted.
|
|
53
|
+
|
|
54
|
+
For a tracked item, preserve its execution identity and history. Claim
|
|
55
|
+
atomically when authorized, use an explicit actor on writes, and append material
|
|
56
|
+
progress rather than replacing previous notes. A task record does not own the
|
|
57
|
+
Beads database or authorize sync, setup, permission changes, or Git operations.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Molecule and wisp patterns
|
|
2
|
+
|
|
3
|
+
> Adapted from [Beads marketplace-main `CHEMISTRY_PATTERNS.md`](https://github.com/gastownhall/beads/blob/4a67d0d0288c1b4ee23e17fc896f47616931ba2d/plugins/beads/skills/beads/resources/CHEMISTRY_PATTERNS.md).
|
|
4
|
+
|
|
5
|
+
Molecules and wisps are advanced ways to organize repeated or temporary work.
|
|
6
|
+
They are optional. A normal issue and its dependencies are usually enough for
|
|
7
|
+
one task. Do not introduce a molecule workflow simply because it is available.
|
|
8
|
+
|
|
9
|
+
## Choose by phase and lifetime
|
|
10
|
+
|
|
11
|
+
| Need | Record | Lifetime |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| One-off owned work with no reusable workflow | Normal issue and dependencies | Durable issue history. |
|
|
14
|
+
| Repeated multi-step work whose children and audit trail should persist | Formula/proto instantiated as a persistent molecule | Reusable source, then durable execution records. |
|
|
15
|
+
| Authorized short-lived research, review, triage, or operations with low audit value | Wisp from an existing formula/proto | Ephemeral; useful findings must be promoted before cleanup. |
|
|
16
|
+
|
|
17
|
+
Treat formulas/protos as reusable workflow sources, molecules as instantiated
|
|
18
|
+
work, and wisps as the temporary phase. Do not use a wisp when the full trail
|
|
19
|
+
must persist or assume that a formula will stay inside the exact assignment.
|
|
20
|
+
|
|
21
|
+
Before using a formula, inspect the available formula and its steps. Decide what
|
|
22
|
+
evidence should survive and who owns each child. Do not let a template silently
|
|
23
|
+
expand an exact assignment into unrelated work.
|
|
24
|
+
|
|
25
|
+
An approved one-time review can use an existing review formula: capture evidence
|
|
26
|
+
and uncertainty in its wisp, promote validated actionable findings to a durable
|
|
27
|
+
record, then discard only noise with no future value. A bounded research spike
|
|
28
|
+
can preserve sources, rejected hypotheses, and a conclusion the same way. These
|
|
29
|
+
are optional work patterns, not authority to create a formula, spawn workers, or
|
|
30
|
+
start a background patrol.
|
|
31
|
+
|
|
32
|
+
## Preserve useful results
|
|
33
|
+
|
|
34
|
+
At the end of a wisp, retain validated findings, rejected hypotheses, sources,
|
|
35
|
+
and resulting authorized work in the appropriate durable record. Discard only
|
|
36
|
+
noise that has no future value. A digest should not turn unverified notes into
|
|
37
|
+
facts. `bd mol squash` creates a durable digest; `bd mol burn` deletes a wisp
|
|
38
|
+
without a digest. Use either only when that lifecycle is authorized and current
|
|
39
|
+
help confirms the operation.
|
|
40
|
+
|
|
41
|
+
Use `bd mol --help`, `bd formula --help`, and relevant subcommand help for exact
|
|
42
|
+
syntax. Creating a proto, molecule, wisp, or child issue is a Beads write and
|
|
43
|
+
requires the actual executor actor. These features do not start workers, set
|
|
44
|
+
permissions, or enable background automation by themselves.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# CLI reference
|
|
2
|
+
|
|
3
|
+
> Adapted from [Beads marketplace-main `CLI_REFERENCE.md`](https://github.com/gastownhall/beads/blob/4a67d0d0288c1b4ee23e17fc896f47616931ba2d/plugins/beads/skills/beads/resources/CLI_REFERENCE.md).
|
|
4
|
+
|
|
5
|
+
This resource deliberately does not copy the full command catalog. The installed
|
|
6
|
+
`bd` binary and active repository policy determine current syntax.
|
|
7
|
+
|
|
8
|
+
- Use `bd prime` for current agent workflow context, only when authorized and
|
|
9
|
+
not blocked by a context or migration hold.
|
|
10
|
+
- Use `bd '<command>' --help` for a command's current flags and behavior.
|
|
11
|
+
- Use `bd --help` to discover commands available in the installed binary.
|
|
12
|
+
- Use `--json` when structured output is useful and supported by that command.
|
|
13
|
+
- Supply `--actor='<executor-actor>'` on every agent-authored write, claim, and
|
|
14
|
+
heartbeat. Do not rely on `git user.name`, `$USER`, or an inherited global
|
|
15
|
+
actor.
|
|
16
|
+
|
|
17
|
+
If a command or flag in an old example is absent from current help, do not guess
|
|
18
|
+
its spelling or use a hidden interface. State the limitation and use a supported
|
|
19
|
+
equivalent only when it preserves the requested outcome and authority. A static
|
|
20
|
+
resource cannot prove installed host behavior or package delivery.
|