superbee 0.0.1 → 0.1.1-pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +14 -0
- package/README.md +94 -7
- package/SKILL.md +453 -0
- package/dist/superbee.mjs +101701 -0
- package/package.json +38 -7
- package/references/recipes/claims/conventions/claim.md +39 -0
- package/references/recipes/claims/recipe.md +34 -0
- package/references/recipes/review-workflow/conventions/review-request.md +44 -0
- package/references/recipes/review-workflow/conventions/view.md +71 -0
- package/references/recipes/review-workflow/recipe.md +20 -0
- package/references/recipes/review-workflow/references/view-authoring-v0.md +324 -0
- package/references/recipes/review-workflow/views/review-workflow/reviews.html +27 -0
- package/references/recipes/review-workflow/views-registry/review-workflow-reviews.md +8 -0
- package/references/sample-bundle/concepts/index.md +4 -0
- package/references/sample-bundle/concepts/link-graph.md +25 -0
- package/references/sample-bundle/concepts/okf-alignment.md +26 -0
- package/references/sample-bundle/context-notes/cycle-okf-lite-vision.md +33 -0
- package/references/sample-bundle/context-notes/index.md +3 -0
- package/references/sample-bundle/index.md +8 -0
- package/references/sample-bundle/log.md +7 -0
- package/references/sample-bundle/references/index.md +3 -0
- package/references/sample-bundle/references/okf-spec.md +27 -0
- package/references/views/about.html +102 -0
- package/references/views/conventions/view.md +71 -0
- package/references/views/pulse.html +439 -0
- package/references/views/references/view-authoring-v0.md +324 -0
- package/references/views/roadmap.html +226 -0
- package/references/views/views-registry/about.md +12 -0
- package/references/views/views-registry/pulse.md +13 -0
- package/references/views/views-registry/roadmap.md +12 -0
package/SKILL.md
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: superbee
|
|
3
|
+
description: >-
|
|
4
|
+
Read and write a local OKF knowledge bundle (agent context notes, docs, cross-links, and live
|
|
5
|
+
bundle Views) from the shell via the Superbee CLI. Use when an agent
|
|
6
|
+
needs to persist a context note across sessions, store a decision/spec as a doc, link concepts,
|
|
7
|
+
query a bundle, share the project's board with teammates (`sync`), or open its local View UI.
|
|
8
|
+
Runs standalone via `npx -y superbee`.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# superbee
|
|
12
|
+
|
|
13
|
+
read and write a local OKF knowledge bundle (context notes, docs, cross-links, live bundle Views).
|
|
14
|
+
|
|
15
|
+
It is a standalone npm package (`superbee`) installing three bins for the identical CLI: `superbee` and the
|
|
16
|
+
legacy aliases `aslite` and `agentstate-lite`. Every example below uses `superbee`.
|
|
17
|
+
|
|
18
|
+
Output is TOON on stdout (a `--json` hatch exists). Errors are structured TOON on stdout with a
|
|
19
|
+
capped exit-code taxonomy (0 ok/no-op, 2 usage, 4 auth, 5 conflict, 6 not-found, 1 runtime).
|
|
20
|
+
|
|
21
|
+
<!-- GENERATED from src/reference.ts by scripts/gen-skill.mjs — do not edit by hand. -->
|
|
22
|
+
|
|
23
|
+
## If `superbee` is not on PATH
|
|
24
|
+
|
|
25
|
+
Every example below assumes the `superbee` bin is on PATH. If it is not:
|
|
26
|
+
|
|
27
|
+
- `npm install -g superbee` puts it (and the legacy aliases `aslite` and `agentstate-lite`) on PATH.
|
|
28
|
+
- `npx -y superbee …` runs any command below with no install at all — swap the leading `superbee`
|
|
29
|
+
for that prefix and the rest of the line runs unchanged.
|
|
30
|
+
|
|
31
|
+
## Complete host setup
|
|
32
|
+
|
|
33
|
+
After the global npm install, run:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
superbee setup
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Without `--host`, setup returns the four supported host rows. Select the exact host running
|
|
40
|
+
this agent, run that row's command, then follow the one `next.command` in each host-scoped
|
|
41
|
+
plan, filling any explicit placeholder it identifies. Setup is read-only: it composes npm,
|
|
42
|
+
Skill, Hook, MCP, bundle, and catalog status but never treats detection as permission to write.
|
|
43
|
+
Ask the human before running a returned mutating command. Restart the host after Skill, Hook,
|
|
44
|
+
or MCP changes, then rerun the same setup command to verify. Foreign or unreadable state
|
|
45
|
+
returns a read-only inspection command instead of overwriting it.
|
|
46
|
+
|
|
47
|
+
## Stable MCP launch
|
|
48
|
+
|
|
49
|
+
For a persistent MCP integration, install the supported CLI with
|
|
50
|
+
`npm install -g superbee`, then run `superbee mcp install --host <id>` with the exact
|
|
51
|
+
current host: `codex`, `claude-code`, `claude-desktop`, or `opencode`. The command
|
|
52
|
+
registers the durable npm runtime once at user scope, never an npx cache or one bundle directory.
|
|
53
|
+
Use `superbee mcp status --host <id>` to verify it and restart the host after a change.
|
|
54
|
+
|
|
55
|
+
## Commands
|
|
56
|
+
|
|
57
|
+
### Bundle
|
|
58
|
+
|
|
59
|
+
- `superbee bundle locate [--dir <path>]`
|
|
60
|
+
— Resolve the exact canonical local bundle path and report why it won selection
|
|
61
|
+
- `superbee catalog (add <label> [--dir <path>] | list | resolve <label-or-id> [--field path])`
|
|
62
|
+
— Register and deterministically resolve this user's explicitly named local workspaces
|
|
63
|
+
- `superbee init [--dir <path>] [--okf-version <v>] [--recipe <name-or-path>] [--create-only]`
|
|
64
|
+
— Create (or open) an OKF knowledge bundle in a directory — greenfield setup; a project that already shares a board is set up by sync, not init. --create-only requires a genuinely NEW target and refuses existing, non-empty, symlinked, enclosing, bound, or concurrent targets before publication; runtime failures retain and report any empty directories they created instead of deleting them — 'recipe add' modifies a verified existing bundle
|
|
65
|
+
- `superbee index generate [--dir <path>] [--check] [--force] [--actor <name>]`
|
|
66
|
+
— Generate complete portable Markdown navigation explicitly; refuses curated indexes unless --force adopts them
|
|
67
|
+
- `superbee status [--limit <n>] [--remote <url>]`
|
|
68
|
+
— Read-only bundle health report (kind lint, unresolved links, orphans, staleness, graph lints)
|
|
69
|
+
|
|
70
|
+
### Documents & links
|
|
71
|
+
|
|
72
|
+
- `superbee doc write <id> --type <t> [--title <t>] [--body <s> | --body-file <p>] [--actor <n>] [--remote <url>]`
|
|
73
|
+
— Write a generic OKF concept document
|
|
74
|
+
- `superbee doc update <id> [--<field> <value> ...] [--title <t>] [--tag <t>] [--type <t>] [--body <s> | --body-file <p>] [--expected-version <v>] [--actor <n>] [--remote <url>]`
|
|
75
|
+
— Patch given fields (incl. kind-declared fields like --progress_status) of an existing doc, preserving the rest; optimistic-CAS with --expected-version
|
|
76
|
+
- `superbee doc read <id> [--out (<path> | -) | --body-out (<path> | -) | --field <name>] [--remote <url>]`
|
|
77
|
+
— Read a doc, export its raw markdown, export its body with a same-read CAS version, or print one raw field for scripting
|
|
78
|
+
- `superbee doc open <id> [--dir <path> | --remote <url>] [--port <n>] [--actor <name>]`
|
|
79
|
+
— Open one exact authoritative document in the existing rendered browser UI
|
|
80
|
+
- `superbee doc history <id> [--limit <n>] [--remote <url>]`
|
|
81
|
+
— Show a doc's version history (newest first, capped at 20 by default — --limit 0 for all; a history-keeping backend returns the full attributed chain, a local bundle just the current revision) — the tokens for --expected-version
|
|
82
|
+
- `superbee doc delete <id> [--expected-version <v>] [--remote <url>]`
|
|
83
|
+
— Hard-delete a doc (idempotent: absent -> deleted:false, exit 0)
|
|
84
|
+
- `superbee list [--type <t>] [--tag <t>] [--field <k=v>] [--prefix <p>] [--open] [--limit <n>] [--remote <url>]`
|
|
85
|
+
— Query concepts over their frontmatter (alias: query) — a comma in --field's value is set membership (OR); --open excludes terminal instances (declared kinds only)
|
|
86
|
+
- `superbee link (add <from> <to> [--text <t>] [--actor <n>] | show <id> [--limit <n>] [--text <t>] | list [--from <id|prefix/>] [--to <id|prefix/>] [--text <t>] [--limit <n>]) [--remote <url>]`
|
|
87
|
+
— Add a cross-link, show a concept's links + backlinks, or query the whole bundle's derived edge list filtered by from/to (id or prefix/, repeatable/union) and exact-match text
|
|
88
|
+
|
|
89
|
+
### Artifacts
|
|
90
|
+
|
|
91
|
+
- `superbee artifact create <file> --title <title> [--description <text>] [--supersedes <id>] [--actor <n>] [--remote <url>]`
|
|
92
|
+
— Produce a shareable output (HTML) a human can view: one command promotes the bytes and writes the type:Artifact record
|
|
93
|
+
- `superbee promote <file> --doc-key <key> [--content-type <mime>] [--expected-version <v>] [--remote <url>]`
|
|
94
|
+
— Move a local file's bytes into the store (a .md key routes through the engine; else a blob)
|
|
95
|
+
- `superbee pull --doc-key <key> --out (<path> | -) [--remote <url>]`
|
|
96
|
+
— Pull a doc's canonical form or a blob's raw bytes out of the store (the reverse of promote)
|
|
97
|
+
- `superbee blobs [--prefix <p>] [--limit <n>] [--remote <url>]`
|
|
98
|
+
— List the store's blob (non-document) keys (documents are listed by 'list'/'query')
|
|
99
|
+
- `superbee delete --doc-key <key> [--expected-version <v>] [--remote <url>]`
|
|
100
|
+
— Hard-delete a doc or blob by key (idempotent: absent -> deleted:false, exit 0)
|
|
101
|
+
|
|
102
|
+
### Kinds
|
|
103
|
+
|
|
104
|
+
- `superbee new "<Kind>" <id> --<field> <value> [...] [--body <markdown> | --body-file <path>] [--link "<type>=<target-id>" ...] [--no-prefix] [--actor <n>] [--remote <url>]`
|
|
105
|
+
— Create a new instance of a bundle-declared kind — initial Markdown may come from --body or --body-file (otherwise declared sections are scaffolded); validates strictly, and repeatable --link wires typed cross-links in the same step
|
|
106
|
+
- `superbee kinds [--remote <url>]`
|
|
107
|
+
— List the kind conventions this bundle declares (purpose, described fields, exact required body headings, typed-link vocabulary, horizon)
|
|
108
|
+
- `superbee kind field "<Kind>" (add <name> [--required] [--values <a,b,c>] | remove <name>) [--remote <url>]`
|
|
109
|
+
— Edit a kind's schema — add/remove a declared field or enum value on its convention (idempotent)
|
|
110
|
+
- `superbee recipes [--dir <path>] [--remote <url>]`
|
|
111
|
+
— Browse built-in recipes before or after init; with a bundle, also show whether each is already applied
|
|
112
|
+
- `superbee recipe add <name-or-path> [--remote <url>]`
|
|
113
|
+
— Apply a recipe's content-free definitions — Kinds plus optional declared References and Views — idempotently
|
|
114
|
+
|
|
115
|
+
### Remote
|
|
116
|
+
|
|
117
|
+
- `superbee serve [--dir <path>] [--host <h>] [--port <p>]`
|
|
118
|
+
— Boot the reference wire-protocol server over a local bundle (loopback, no auth)
|
|
119
|
+
- `superbee ui [--dir <path> | --remote <url>] [--port <p>] [--open]`
|
|
120
|
+
— Boot the local web UI over the bundle (same origin, loopback-only): READ the bundle's docs as rendered pages (frontmatter, cross-links you can follow, derived backlinks), LAUNCH its registered Views (type: View docs framed in sandboxed iframes with live updates; legacy Page-typed docs no longer register — see status's legacy_naming finding), and see a live activity feed, the bundle's sharing status, and your registered workspaces. The header shows the bundle's display name — derived from the project folder unless set explicitly: doc write docs/bundle --type "Bundle Name" --title "<name>"
|
|
121
|
+
- `superbee mcp [install|status|uninstall | --dir <path>]`
|
|
122
|
+
— Run the local MCP Apps adapter, or explicitly install, inspect, and uninstall its user-level registration for Codex/ChatGPT, Claude Code, Claude Desktop, and OpenCode
|
|
123
|
+
- `superbee view list [--limit <n>] [--dir <path> | --remote <url>]`
|
|
124
|
+
— List the bundle's registered durable Views from the same catalog used by the web launcher and MCP list_views
|
|
125
|
+
- `superbee sync [--establish [--yes] | --pull-only | --show-incoming <id> [--out <file>]] [--dir <path>] [--limit <n>]`
|
|
126
|
+
— Share the board branch with a remote — commits, pulls, and pushes (git tier; --pull-only skips commit+push). `init` makes a LOCAL bundle; --establish is the separate, explicit act that starts sharing it (creates the board branch, pushes; never automatic). A bundle folder already committed on the code branch is the same flag's hard case: preview first, --yes executes, and the folder's removal from the code branch rides a prepared side-branch commit you push and open as a PR. A bundle committed with code and NO board branch anywhere is the IN-TREE mode (read-side): full sync refuses (sharing rides your normal commit/push), --pull-only fetches the branch's tracking upstream and reports incoming board docs ('git pull' delivers them), and --establish converts to a dedicated board branch. A doc changed on both sides converges: teammate's version kept, yours exported; --show-incoming <id> (exclusive with --pull-only) prints the incoming version as of the last fetch. Board-reading commands (list/doc read/status/home/link show) auto-run the ff-only pull when board state is >~5m stale — silent, bounded (~2s), never a push; SUPERBEE_NO_AUTOPULL=<any value, even 0> disables it
|
|
127
|
+
|
|
128
|
+
### Session
|
|
129
|
+
|
|
130
|
+
- `superbee version [--check] [--tag latest|next] [--json]`
|
|
131
|
+
— Show the complete local build/runtime identity, or perform one bounded read-only comparison against npm's exact latest/next release policy
|
|
132
|
+
- `superbee session-start [--dir <path>] [--no-update-check]`
|
|
133
|
+
— The SessionStart hook payload: pull then render; default TOON uses a nonblocking 24-hour cached latest check, while --no-update-check or SUPERBEE_NO_UPDATE_CHECK/NO_UPDATE_NOTIFIER/CI presence disables both display and refresh (legacy ASLITE_NO_UPDATE_CHECK remains supported); npm receives only the public package request and ordinary network metadata, never installed version, cwd, bundle, actor, or usage data
|
|
134
|
+
- `superbee hook install|status|uninstall [--scope project|user]`
|
|
135
|
+
— Install the SessionStart hook (runs session-start: pull the board, then render) for Claude Code, Codex, OpenCode
|
|
136
|
+
- `superbee skill install|status|uninstall [--scope project|user]`
|
|
137
|
+
— Install this package's Agent Skill (SKILL.md + references/) into Claude Code and Codex skill folders (OpenCode has no skill surface — its integration is `hook install`); manifest-tracked, idempotent, refuses folders it does not manage
|
|
138
|
+
- `superbee setup [--host codex|claude-code|claude-desktop|opencode] [--scope project|user] [--json]`
|
|
139
|
+
— Inspect npm, Skill, Hook, MCP, bundle, and catalog readiness, then emit one deterministic safe next command
|
|
140
|
+
|
|
141
|
+
## Workspaces — the project's bundle lives at `.agentstate-lite/` in the project root
|
|
142
|
+
|
|
143
|
+
Unless the user directs otherwise, a project's workspace bundle lives in a `.agentstate-lite/`
|
|
144
|
+
folder at the project root. Two verbs, two different jobs — `init` always creates a LOCAL
|
|
145
|
+
bundle (solo use is first-class, nothing forces sharing); `sync` is how a project's board
|
|
146
|
+
becomes — or stays — shared memory across clones and teammates. Three modes:
|
|
147
|
+
|
|
148
|
+
- **A local-only board** — `init` creates a bundle that doesn't exist anywhere yet, and it
|
|
149
|
+
stays LOCAL until someone chooses to share it. This is a first-class mode, not a limbo:
|
|
150
|
+
everything works offline and remote-free, and board changes stay on this machine. A bare
|
|
151
|
+
`sync` on a local-only bundle reports that state honestly (its note points at `--establish`)
|
|
152
|
+
— it never establishes on its own, which would silently publish a bundle nobody asked to
|
|
153
|
+
share.
|
|
154
|
+
- **Joining an existing shared board** — if `.agentstate-lite/` is already in the clone, there
|
|
155
|
+
is NOTHING to set up. If it isn't but the project already shares its board (the repo's
|
|
156
|
+
remote has a `board` branch), `sync` is the setup verb — run it once and it creates the
|
|
157
|
+
folder and pulls the shared state. NEVER init a project that already has a workspace: that
|
|
158
|
+
creates a divergent second bundle.
|
|
159
|
+
- **Sharing a board (`sync --establish`, once)** — the explicit act that publishes a local
|
|
160
|
+
bundle as the repo's `board` branch; teammates then just run `sync` to join. It handles
|
|
161
|
+
both shapes: an uncommitted local folder is snapshotted, pushed, and converted in place;
|
|
162
|
+
a folder ALREADY COMMITTED on the code branch gets a preview first — re-run with `--yes`
|
|
163
|
+
to execute, which also prepares a cleanup commit on a side branch that you push and open
|
|
164
|
+
as a PR (it removes the folder from the code branch; the board branch takes over after the
|
|
165
|
+
merge). If origin cannot be checked, `sync` reports the shared-board state as unknown and
|
|
166
|
+
waits for a retry instead of recommending publication.
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
superbee sync # existing shared project — provisions the board; a local-only bundle reports its state
|
|
170
|
+
superbee init --dir .agentstate-lite # greenfield — idempotent; creates a LOCAL bundle, or opens an existing one
|
|
171
|
+
superbee sync --establish # establish a new shared board after user approval
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
That's the whole setup. The CLI discovers the conventional folder on its own (the way git
|
|
175
|
+
finds `.git`), so every command runs BARE from anywhere in the project tree — no flags, no
|
|
176
|
+
config files:
|
|
177
|
+
|
|
178
|
+
```sh
|
|
179
|
+
superbee list
|
|
180
|
+
superbee doc read context-notes/cycle-1
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Surfaces that label the workspace (the `ui` header, home's bundle block) derive its DISPLAY
|
|
184
|
+
NAME from the project folder's name. To set it explicitly (it syncs to teammates with the
|
|
185
|
+
board), write the well-known name doc — its title becomes the display name:
|
|
186
|
+
|
|
187
|
+
```sh
|
|
188
|
+
superbee doc write docs/bundle --type "Bundle Name" --title "<display name>"
|
|
189
|
+
superbee doc update docs/bundle --title "<new name>" # rename later
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The folder is LOCAL until you choose to share it: `superbee sync --establish` (once) publishes it
|
|
193
|
+
onto its own `board` branch — from then on `sync` commits and pushes board changes itself, never
|
|
194
|
+
batched with code. Until established, the bundle stays local — a fully supported mode, not a
|
|
195
|
+
temporary one: everything works offline and remote-free, and board changes stay on this machine
|
|
196
|
+
(either left uncommitted, or committed directly on the code branch like any other file,
|
|
197
|
+
whichever the user prefers). (Gitignore the folder only if the workspace should stay private
|
|
198
|
+
to this machine.)
|
|
199
|
+
|
|
200
|
+
Write with attribution: set `SUPERBEE_ACTOR=<your-name>` once for `new`, `doc write`,
|
|
201
|
+
`doc update`, and `link add`, or pass `--actor <your-name>` per command (the flag wins).
|
|
202
|
+
Existing `AGENTSTATE_LITE_ACTOR` settings remain supported as a compatibility input.
|
|
203
|
+
With neither source, no advisory actor label is stored in frontmatter or sent as an agent label;
|
|
204
|
+
backend history still reports its own principal (for example, the local OS owner or an
|
|
205
|
+
authenticated remote user). A present-but-blank flag or environment value is a usage error.
|
|
206
|
+
Advisory attribution describes a real mutation and never creates a no-op write.
|
|
207
|
+
Actor labels are advisory metadata, not authentication or authorization credentials.
|
|
208
|
+
|
|
209
|
+
Each invocation is stateless. HTTP is activated only by explicit `--remote <url>`.
|
|
210
|
+
Otherwise bundle resolution stays local: explicit `--dir` → nearest `.superbee.json` or
|
|
211
|
+
supported `.agentstate.json` local-path binding up-tree → the cwd walk, which at each
|
|
212
|
+
ancestor checks both binding names together (both at one level fail closed), then the
|
|
213
|
+
directory's own `index.md`, then its
|
|
214
|
+
conventional `.agentstate-lite/index.md`. Reserve `--dir` for the exceptions: a bundle outside
|
|
215
|
+
any project, a second workspace, or reaching another project's bundle from elsewhere.
|
|
216
|
+
|
|
217
|
+
Two things override the default:
|
|
218
|
+
|
|
219
|
+
1. **Explicit user direction** — the user names a directory or a `--remote`; use that. A local
|
|
220
|
+
`.superbee.json` binding (`{ "bundle": "<path>" }` at the project root) is the
|
|
221
|
+
preferred durable form; existing `.agentstate.json` bindings remain supported. A binding
|
|
222
|
+
beats the conventional folder; both binding names at one level are a conflict.
|
|
223
|
+
Remote URLs are never durable ambient bindings; pass `--remote <url>` per invocation.
|
|
224
|
+
2. **An existing workspace** — if a bare command already resolves (a binding, an enclosing
|
|
225
|
+
bundle, or a conventional folder exists up-tree), that IS this project's workspace — use
|
|
226
|
+
it rather than creating a second one.
|
|
227
|
+
|
|
228
|
+
If the user wants the workspace PRIVATE to their machine instead of shared (a personal
|
|
229
|
+
scratch workspace), keep the bundle OUT of the repo (e.g. under `~/.agentstate/<name>/`)
|
|
230
|
+
and point a git-excluded `.superbee.json` at it. Choose by one question: do teammates
|
|
231
|
+
share this bundle? When the user's intent is ambiguous, ask rather than defaulting silently.
|
|
232
|
+
|
|
233
|
+
Do not raise a sharing decision during ordinary local work. When the user names teammates,
|
|
234
|
+
a shared board, a handoff, synchronization, or cross-clone coordination, use Superbee's
|
|
235
|
+
built-in board path: run `sync` to join an existing `origin/board`; if none exists, explain
|
|
236
|
+
that `sync --establish` creates it and offer to run that explicit one-time operation. If the
|
|
237
|
+
user prefers an in-tree bundle, custom Git branch/path, or another sharing mechanism, surface
|
|
238
|
+
the tradeoff and record that explicit choice; never silently substitute one for Superbee sync.
|
|
239
|
+
|
|
240
|
+
## Typical flow
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
# One-time setup at the project root (see the Workspaces section) — run ONE of these:
|
|
244
|
+
superbee sync # existing project that shares a board — sets up AND pulls the shared board
|
|
245
|
+
superbee init --dir .agentstate-lite # GREENFIELD — never on a project that already has a workspace; makes a LOCAL bundle
|
|
246
|
+
|
|
247
|
+
# If collaboration is requested, offer the explicit one-time shared-board operation:
|
|
248
|
+
superbee sync --establish
|
|
249
|
+
|
|
250
|
+
# Everything after runs bare, from anywhere in the project tree
|
|
251
|
+
# Create a complete context note (an OKF concept) for the next session in one command
|
|
252
|
+
superbee new "Context Note" cycle-1 --title "cycle-1" --body '# Summary
|
|
253
|
+
|
|
254
|
+
What this session did and what comes next' --actor <your-name>
|
|
255
|
+
|
|
256
|
+
# Read it back
|
|
257
|
+
superbee doc read context-notes/cycle-1
|
|
258
|
+
|
|
259
|
+
# Store a doc, cross-link it, and query the bundle
|
|
260
|
+
superbee doc write specs/auth --type Spec --title "Auth" --body "…" --actor <your-name>
|
|
261
|
+
superbee link add specs/auth context-notes/cycle-1
|
|
262
|
+
superbee list --type Spec
|
|
263
|
+
|
|
264
|
+
# For a shared board, sync after a unit of work; local-only work stays complete locally
|
|
265
|
+
# (safe everywhere: a local-only board reports its state; outside any workspace it prints
|
|
266
|
+
# "sync: nothing to sync" — in both cases nothing is committed or pushed)
|
|
267
|
+
superbee sync
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Sharing the board — `sync`
|
|
271
|
+
|
|
272
|
+
Ordinary `superbee sync` shares your board — commits your changes, pulls your teammate's, pushes yours,
|
|
273
|
+
while leaving code-project files untouched.
|
|
274
|
+
|
|
275
|
+
On a shared board, run it whenever you close a unit of work — a task finished, a decision recorded, a session
|
|
276
|
+
ending. Local-only work remains complete locally. Three known empty states (all exit 0):
|
|
277
|
+
outside any git repo or workspace it prints `sync: nothing to sync`; a LOCAL-ONLY board (a
|
|
278
|
+
bundle with no shared `board` branch — a supported mode) reports itself as local-only, with
|
|
279
|
+
nothing committed, pulled, or pushed, and its note points at `--establish` — but bare `sync`
|
|
280
|
+
NEVER establishes on its own (that would silently publish a bundle nobody asked to share);
|
|
281
|
+
a clean, already-current shared board prints `sync: already up to date`.
|
|
282
|
+
If origin cannot be checked and no board ref is available, sync reports the remote state as
|
|
283
|
+
unknown and recommends retrying before `--establish`.
|
|
284
|
+
|
|
285
|
+
`sync --establish` is the one explicit, one-time act that starts sharing a project's local
|
|
286
|
+
bundle: it snapshots and publishes the bundle, checks out the `board` branch at the same path,
|
|
287
|
+
and appends that path to the root working-tree `.gitignore`; teammates then just run plain
|
|
288
|
+
`sync` to join. Never run it on a project that already shares a board (it
|
|
289
|
+
detects that state, notes `already established`, and proceeds as an ordinary sync instead of
|
|
290
|
+
erroring).
|
|
291
|
+
|
|
292
|
+
The same flag handles a bundle folder ALREADY COMMITTED on the code branch: `sync --establish`
|
|
293
|
+
prints a preview and changes nothing; `sync --establish --yes` creates the `board` branch from
|
|
294
|
+
the folder's current files (files only — the folder's history stays on the code branch),
|
|
295
|
+
pushes it, and prepares ONE commit on a local `board-cleanup` branch that removes the folder
|
|
296
|
+
from the code branch and gitignores it — you push that branch and open the PR yourself;
|
|
297
|
+
nothing on the code branch is pushed or changed. Until that PR merges, the old committed
|
|
298
|
+
folder is a frozen read-only snapshot; after the merge, `git pull` then `sync` brings the
|
|
299
|
+
live board back on every clone.
|
|
300
|
+
|
|
301
|
+
Sharing is an explicit act: nothing ever creates or publishes a board branch on its own —
|
|
302
|
+
only `sync --establish` does. The session-start hook and the read-time refresh below only
|
|
303
|
+
ever PULL an already-shared board (bounded, fast-forward, never a push); your changes leave
|
|
304
|
+
the machine only when you run `sync`.
|
|
305
|
+
|
|
306
|
+
When a doc changed on BOTH sides, sync converges instead of stopping: your teammate's version
|
|
307
|
+
is kept on the board, YOURS is saved to an export file named in the receipt, and the run
|
|
308
|
+
exits 5 with one row per conflicted doc. Reconcile with the doc verbs, never git:
|
|
309
|
+
|
|
310
|
+
```sh
|
|
311
|
+
superbee sync --show-incoming <id> # view the kept incoming version (as of the last fetch)
|
|
312
|
+
superbee doc update <id> --body-file <export-file> # write your merged version on top
|
|
313
|
+
superbee sync # share it
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
`sync --pull-only` picks up teammates' changes without publishing local ones. If a push fails
|
|
317
|
+
(offline, auth), your work is already committed locally — re-running sync retries the push.
|
|
318
|
+
|
|
319
|
+
Reads stay fresh on their own: board-reading commands (`list`, `doc read`, `status`, `home`,
|
|
320
|
+
`link show`) automatically run the same fast-forward-only pull when the board's state is older
|
|
321
|
+
than ~5 minutes — silent, time-boxed (~2s), never a rebase, never a push, and it never sets a
|
|
322
|
+
board up (that stays `sync`'s job) — so a plain `list` can advance the board checkout's HEAD.
|
|
323
|
+
Your OWN changes still only leave the machine when you run `sync`. To disable the auto-pull
|
|
324
|
+
(CI, scripted runs), set `SUPERBEE_NO_AUTOPULL` to any non-empty value — even `0`
|
|
325
|
+
disables it; the variable's presence is the switch.
|
|
326
|
+
Legacy `AGENTSTATE_LITE_NO_AUTOPULL` remains supported with the same presence semantics.
|
|
327
|
+
|
|
328
|
+
On projects that share their board you may notice a `board` branch in the repo's GitHub —
|
|
329
|
+
that's the board; it never merges into main (it has no common history with it, by design).
|
|
330
|
+
Protect it like main: enable delete and force-push protection on `board` in the repo settings
|
|
331
|
+
— sync only ever appends commits to it.
|
|
332
|
+
|
|
333
|
+
## Remote bundle access (--remote, serve)
|
|
334
|
+
|
|
335
|
+
Remote bundle access remains explicit and wired the same way as `--dir`: use `serve` to expose
|
|
336
|
+
a local bundle over the wire protocol, or pass `--remote <url>` to a bundle-facing command.
|
|
337
|
+
For an authenticated remote, provide `SUPERBEE_API_KEY`; an already-provisioned
|
|
338
|
+
stored per-origin credential is also consumed when present. Legacy `AGENTSTATE_LITE_API_KEY`
|
|
339
|
+
remains supported as a compatibility input. Account and admin credential
|
|
340
|
+
provisioning is outside the default CLI surface.
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
superbee serve --dir ./my-bundle --port 4818 &
|
|
344
|
+
superbee list --remote http://127.0.0.1:4818
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Shipped references — worked examples & contracts alongside this file
|
|
348
|
+
|
|
349
|
+
A few capabilities below (bundle views, custom recipes) are backed by a full contract or a
|
|
350
|
+
worked example shipped in this package's `references/` folder rather than inlined here. The
|
|
351
|
+
folder sits NEXT TO this SKILL.md — in the npm package root, and in any host skill folder
|
|
352
|
+
this file is installed into (`superbee skill install`).
|
|
353
|
+
|
|
354
|
+
Shell commands resolve paths against YOUR working directory, not this file's folder, so set
|
|
355
|
+
`$REFS` once per session: your host names this skill's base directory when it loads it
|
|
356
|
+
(e.g. "Base directory for this skill: <path>"). Use that:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
REFS="<skill-base-dir>/references" # substitute the base directory your host reported
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
Every `$REFS/…` path below then runs from any cwd. Each shipped file is a byte-for-byte copy
|
|
363
|
+
of the matching file in the CLI's own repo — one authority, regenerated on every release,
|
|
364
|
+
never hand-duplicated.
|
|
365
|
+
|
|
366
|
+
## Bundle views — ship a live UI as bundle content
|
|
367
|
+
|
|
368
|
+
A **bundle view** is a self-contained HTML file living IN the bundle: promoted as a blob under
|
|
369
|
+
`views/…`, declared by a `type: View` registry doc (`title`, `entry`, `access` — the legacy
|
|
370
|
+
`bridge` spelling is no longer read: a doc declaring only `bridge` resolves to `access: none`,
|
|
371
|
+
so author with `access`), and rendered by
|
|
372
|
+
`superbee ui` inside a sandboxed, opaque-origin iframe. A data-bearing View is executable
|
|
373
|
+
code: the shell requires local approval of its exact bytes and declared access, and changed
|
|
374
|
+
bytes ask again. The sandbox and CSP deny direct credentials/data-API access and restrict
|
|
375
|
+
ordinary network APIs as defense-in-depth; approval remains the decision to trust the View's
|
|
376
|
+
source. Bundle data flows only through the narrow postMessage bridge to the trusted shell.
|
|
377
|
+
(`Page` is the legacy name and no longer registers: the launcher ignores `type: Page` docs.
|
|
378
|
+
`superbee status` lists legacy-named docs under its legacy_naming finding, and the
|
|
379
|
+
repo's migrate-legacy-view-names script renames legacy content in place; docs under the
|
|
380
|
+
legacy `pages-registry/`/`pages/` folders stay recognized once typed `View`.)
|
|
381
|
+
|
|
382
|
+
The bridge (protocol `v0`) has six read-only data request types: `hello` (bundle identity), `query`
|
|
383
|
+
(frontmatter-filtered rows — the same head projection `list` uses), `read` (one doc), `render-document`
|
|
384
|
+
(the shared bounded Markdown presentation for one canonical doc), `edges` (the general
|
|
385
|
+
from/to/text graph query — backlinks and containment both reduce to this), and `subscribe`
|
|
386
|
+
(opt into a server-pushed `change` event whenever the watched bundle moves). There
|
|
387
|
+
is no mutation message in v0 — read-only is enforced by construction. A View that declares
|
|
388
|
+
`bundle-propose` may use the local-only v1 contract to propose ONE governed scalar-field
|
|
389
|
+
change; the trusted shell revalidates it, shows canonical before/after values, and writes
|
|
390
|
+
only after explicit human confirmation with hard CAS. The View never receives a write token.
|
|
391
|
+
`open-page`
|
|
392
|
+
(a wire verb, stable across the rename) is a separate fire-and-forget shell action available
|
|
393
|
+
to every View capability; it opens only another valid registered View and returns none of
|
|
394
|
+
that target's content or metadata.
|
|
395
|
+
|
|
396
|
+
Author a view in four steps:
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# 1. write a self-contained views/my-view.html (inline CSS/JS, no external hosts),
|
|
400
|
+
# embedding the bridge client copied from the shipped contract below
|
|
401
|
+
superbee promote my-view.html --doc-key views/my-view.html # 2. promote the HTML blob
|
|
402
|
+
superbee promote my-view-registry.md --doc-key views-registry/my-view.md # 3. promote its type: View doc (title, entry, access)
|
|
403
|
+
superbee promote "$REFS/views/conventions/view.md" --doc-key conventions/view.md # 4. declare the View convention (once per bundle, ready-made)
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
Full message shapes, the trust model, the copy-paste bridge client with safe live-refresh
|
|
407
|
+
examples (including a live graph view over Roadmap Items) are in the shipped contract:
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
cat "$REFS/views/references/view-authoring-v0.md"
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## Human review
|
|
414
|
+
|
|
415
|
+
When you create or materially revise a bundle document for human review, display it when the
|
|
416
|
+
human asks and otherwise offer once. In an MCP Apps host, call `list_workspaces` when needed,
|
|
417
|
+
then `show_document` with the exact workspace label or ID and document ID; do not return only
|
|
418
|
+
a filesystem path. In fixed `mcp --dir` compatibility mode, the workspace argument is omitted.
|
|
419
|
+
To present an existing interactive View, call `list_views` and then `show_view` with that same
|
|
420
|
+
workspace and the exact View ID; later View lifecycle calls use only the returned launch ID.
|
|
421
|
+
Outside an MCP Apps host, run
|
|
422
|
+
`superbee doc open <id>` to open that exact document in the existing browser reader.
|
|
423
|
+
|
|
424
|
+
## Notes
|
|
425
|
+
|
|
426
|
+
- `doc read <id>` truncates a large body and points at `doc read <id> --out <file>`, which streams
|
|
427
|
+
the raw markdown bytes to disk without loading them into the model context window.
|
|
428
|
+
- To revise body prose without parsing YAML, run `doc read <id> --body-out <file> --json`; edit the
|
|
429
|
+
file, then pass it to `doc update <id> --body-file <file> --expected-version <receipt-version>`.
|
|
430
|
+
The body-out receipt's version comes from the same read, so this is a safe CAS edit cycle.
|
|
431
|
+
- Mutations are idempotent: re-writing a doc or re-adding an existing link is a no-op (exit 0).
|
|
432
|
+
- `new` and `doc update` accept a kind's declared fields as `--<field> <value>` (e.g. `--progress_status done`);
|
|
433
|
+
an unknown field or an out-of-enum value is rejected (exit 2). Run `kinds` to see a kind's fields.
|
|
434
|
+
- `hook install` registers a SessionStart hook (Claude Code, Codex, OpenCode) that runs
|
|
435
|
+
`session-start`: a quick best-effort pull of the shared board, then the home view — so a new
|
|
436
|
+
session starts with the bundle's state AND any teammate changes already in context. Offline is
|
|
437
|
+
fine: the render always appears, labeled with the last known state. A global npm install binds
|
|
438
|
+
absolute Node and CLI paths, so GUI sessions do not depend on their inherited PATH. If you
|
|
439
|
+
installed the hook before `session-start` existed, re-run `hook install` once to upgrade it.
|
|
440
|
+
- Edit a doc's body through `doc update --body-file` (or `--body`), never by pulling the raw file
|
|
441
|
+
with `--out`, editing it with text tools, and re-promoting it — that risks corrupting the
|
|
442
|
+
frontmatter (the engine rejects it, but the right tool avoids the dance entirely).
|
|
443
|
+
- Writing a custom recipe: a worked example (the `Claim` kind — event-lifecycle findings with
|
|
444
|
+
provenance, composed from lite primitives) ships at `$REFS/recipes/claims/`; copy its shape,
|
|
445
|
+
then `superbee recipe add <folder>` to apply it (built-in recipes are named directly, e.g.
|
|
446
|
+
`superbee recipe add work-tracking`).
|
|
447
|
+
- Packaging a content-free cognitive ecosystem: `$REFS/recipes/review-workflow/` carries a
|
|
448
|
+
self-describing Review Request kind plus a generic live View, but no review instances. A
|
|
449
|
+
definitions-only recipe may contain only its manifest, convention docs, explicitly declared
|
|
450
|
+
static Reference docs, and View registry/HTML pairs; install it with the same `recipe add <folder>` command.
|
|
451
|
+
- A full interop-shaped example bundle (externally-authored markdown: unquoted timestamps,
|
|
452
|
+
relative links, wrapped bullets) ships at `$REFS/sample-bundle/` — copy it and point `--dir` at
|
|
453
|
+
the copy to explore a populated bundle without writing one from scratch.
|