Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions docs/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ native memory delivery.
| --- | --- | --- |
| bd CLI | Native `bd version`: version, below-minimum version (`needs ≥1.3.1`), `not found`, or not observed. | Unsupported/unavailable is unhealthy; failed version evidence can be neutral. Install/upgrade in an authorized workflow and start a new session; check `bd version`. The qualified baseline is 1.3.4, not a maximum. |
| Workspace | Config-only `bd context --json`: `Located`, `Not initialized`, `Probe failed`, `Withheld` or not observed. | Located identifies native-resolved context, not integrity. Failed/withheld/uninitialized is unhealthy; absent evidence neutral. Inspect context/location evidence; initialization is human-directed, never automatic repair. |
| Recorded bd version | Bounded `.local_version` under the resolved `beads_dir`. | `1.3.4 = CLI` is healthy; `1.3.1 ≠ CLI 1.3.4` is mismatch. `none`, unreadable, truncated, unsupported, unavailable or running-version unavailable stays neutral. Compare the recorded value and `bd version`; review native upgrade guidance if they differ. |
| Recorded bd version | Bounded `.local_version` under the resolved `beads_dir`. | `1.3.4 = CLI` and `1.3.1 ≠ CLI 1.3.4` are informational and do not affect health or counts. `none`, unreadable, truncated, unsupported, unavailable or running-version unavailable stays neutral. Compare the recorded value and `bd version`; review native upgrade guidance if they differ, not sync or migration steps. |
| Git hooks | Qualified native `bd hooks list --json`. | Installed/total counts include shims. Optional missing/unreadable/unresolved hooks and empty, failed or withheld evidence are neutral. Outdated or unrecognized installed hooks are mismatch. Review layout and customization before installation, then verify with `bd hooks list`. |
| Sync target | Config-only native context and strict-readonly native Dolt remote listing. | `Resolved · origin` means the native default name is listed in a supported direct Dolt context. `Local-only` means an empty listing in a confirmed embedded store. Both are healthy target observations. Missing, failed or ambiguous evidence leaves the target `Unknown` and neutral. |
| Remote history | Availability of a fresh Beads comparison. | `Not applicable` for established local-only operation and `Not checked` otherwise. Both are neutral. Exact remote selectors explain the unavailable probe. |

### Version witnesses

Expand Down Expand Up @@ -145,10 +144,14 @@ are discarded before capture. A registered `origin` establishes the target name
only. Reachability and synchronization remain unmeasured.

Local-only describes the current embedded store. Native push may offer Git-origin
adoption with consent. The history comparison is unperformed on Beads 1.3.1 and
1.3.4. No qualified native probe establishes that a comparison uses the remote
branch fetched during that invocation. Diagnostics leaves cached counts out of
the report. Source-Git freshness remains unchecked in all views.
adoption with consent. Ordinary diagnostics omits the Remote history row and
caveat. `details` explains once that the local target observation is not a
fresh history comparison: history is `Not applicable` for established
local-only operation and `Not checked` otherwise. Exact `remote` and
`details remote` still request a fresh comparison and report why it is
unavailable on Beads 1.3.1 and 1.3.4: no qualified native probe binds a
comparison to the remote branch fetched in that invocation. No history is
fetched, cached counts are omitted, and source-Git freshness is not checked.

## Collection and native responsibility

Expand Down
12 changes: 10 additions & 2 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ If `bd` is unavailable or the project is uninitialized, nothing is added. If `bd

Before prime and typed operations, the plugin checks `bd version` against minimum 1.3.1 and uses the configuration-only `bd context --json` workspace probe. These checks do not open the store. A missing workspace differs from a failed or unsupported probe; the latter is reported without substituting a store-opening command.

Diagnostics may read a bounded `.local_version` witness as an advisory recorded CLI value; neither a match nor a difference establishes schema state, completed maintenance or pending migrations. Admission and ordinary context loading do not read the witness. Native Beads owns schema bounds, store opening, migrations and upgrade/adoption semantics. Ordinary `bd prime --full` includes native persistent memories and may open or migrate a local store according to native behavior. The plugin does not guarantee migration-free context. An OpenCode session can be the first native store open after a `bd` upgrade; follow the native backup-before-upgrade procedure linked below. A successful prime can include a native partial-availability notice; its output is preserved and success does not certify complete memory delivery or store health.
Diagnostics may read a bounded `.local_version` witness as an informational recorded CLI value. Neither equality nor difference affects health or admission or establishes schema state, completed maintenance or pending migrations. A difference points to native upgrade guidance, not sync or migration; a genuinely unavailable or incompatible running CLI is still unhealthy. Admission and ordinary context loading do not read the witness. Native Beads owns schema bounds, store opening, migrations and upgrade/adoption semantics. Ordinary `bd prime --full` includes native persistent memories and may open or migrate a local store according to native behavior. The plugin does not guarantee migration-free context. An OpenCode session can be the first native store open after a `bd` upgrade; follow the native backup-before-upgrade procedure linked below. A successful prime can include a native partial-availability notice; its output is preserved and success does not certify complete memory delivery or store health.

Follow the [Beads 1.3.4 upgrade procedure](https://github.com/gastownhall/beads/blob/7ef2fd05eb0cd3bdbde051f93cfc14ccf270cdde/docs/getting-started/upgrading.md), including backup with the old binary before upgrading and coordination for shared stores. The plugin does not run automatic migration, repair, bootstrap, update or synchronization commands. Agent-initiated administration still requires an explicit applicable request and normal permissions. Native open semantics do not grant extra administrative authority.

Expand All @@ -117,7 +117,7 @@ Diagnostics shows compact Plugin / Beads tables with short rows including AGENTS

Use `/oc-beads:diagnostics details` for bounded evidence, including raw marker/request counts and times, command clipping and per-hook entries. Use `/oc-beads:diagnostics help` for a self-contained static reference that skips diagnostic collection. Selectors are exact after trimming and case folding; other prose remains literal input and selects normal output. Every view is captured once and reused on primary/compaction replay. New captures supply finished code-populated Markdown inside explicit report boundaries, with real newline separation before the unchanged invocation; the relay instruction requests only that report. Older snapshots retain their original instructions. This framing preserves deterministic input values without guaranteeing the model's visible output. Normal captures omit full evidence and routine provisos; real unresolved writes still appear. The subsequent ordinary prompt can still load full native prime and memories. See the [diagnostics reference](diagnostics.md) for every row, state, source, remedy and check.

Git hooks, Sync target and Remote history are independent observations. The target listing opens supported native stores in strict-readonly mode. Server mode may connect to the configured database. On Beads 1.3.1 and 1.3.4, exact `remote` and `details remote` explain that a qualified fresh history comparison is unavailable. No selector fetches history or contacts the sync remote. History is `Not applicable` for a confirmed local-only store and `Not checked` otherwise.
Git hooks and Sync target are independent local observations. Ordinary diagnostics omits the Remote history row and caveat. `details` explains once that target evidence is not a fresh history comparison: history is `Not applicable` for an established local-only store and `Not checked` otherwise. Exact `remote` and `details remote` still request a comparison and explain why it is unavailable on Beads 1.3.1 and 1.3.4. On those versions no selector fetches history or contacts the sync remote. The target listing opens supported native stores in strict-readonly mode; server mode may connect to the configured database.

Starting with beta.2, the package-owned `oc-beads:status` is removed without an alias. Use `oc-beads:diagnostics` for integration health and `oc-beads:stats` for the issue-database overview via `bd status` (alias `bd stats`). User-defined old status overrides are untouched and are not migrated.

Expand All @@ -129,6 +129,14 @@ The normal public entrypoint enables the eleven qualified operations in the nati

Each operation asks for its exact `bd` command with `save: []`, so "always" adds no new saved grant and you may be asked again. Existing shell `bd *` grants can authorize equivalent operations; configured denies still win. Results preserve partial, failed and uncertain outcomes rather than retrying. A rejected nested operation does not run, but later operations keep their own checks. Use explicit Stop/Cancel to end the composition. Read [CODE_MODE.md](../assets/oc-beads/resources/CODE_MODE.md) for composition and recovery.

### Read-only smoke prompt

> Use the typed `beads.find` operation with `{"view":"ready","limit":5}`.
> Report the ready IDs actually returned and the exact `find.complete`
> value (`true`, `false`, or `null`). If the call fails or is unavailable,
> say so and report only values actually returned. Do not claim, modify,
> or sync anything.

## Task agent

The current task agent (`beads-task-agent`) uses scope-bounded task execution:
Expand Down
17 changes: 9 additions & 8 deletions openspec/specs/workflow-access/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ Diagnostics SHALL render fixed compact Markdown Plugin / Beads tables and labele
- **THEN** normal output distinguishes known integration failures as unhealthy, observed setup differences as mismatch and incomplete observations as neutral fields; explicit details retains producer, scope, observation time, meaning and limits
- **AND** normal output has no default provisos or limits line; conditional short actions state useful effects and a check, while detailed explanations are available on request
- **AND** section and overall severity use unhealthy > mismatch > healthy, neutral fields are visible but excluded from severity and heading counts, and no assessed checks remains neutral
- **AND** header metadata places DATE, VERSION and PATH in separate rendered paragraphs immediately after the title and before the summary, without repeating them at the bottom; DATE uses exact capture time, VERSION the executing manifest name/version, and PATH observed native cwd_repo_root or explicit not observed, without inference, path stripping, slash appending or implicit cwd fallback; native beads_dir remains in details and observed host/CLI versions stay in their rows; unmeasured schema/maintenance rows and default persistence uncertainty are omitted while actual unresolved writes remain concise; Git hooks, Sync target and Remote history are the three remote-related rows, including neutral target/history observations
- **AND** header metadata places DATE, VERSION and PATH in separate rendered paragraphs immediately after the title and before the summary, without repeating them at the bottom; DATE uses exact capture time, VERSION the executing manifest name/version, and PATH observed native cwd_repo_root or explicit not observed, without inference, path stripping, slash appending or implicit cwd fallback; native beads_dir remains in details and observed host/CLI versions stay in their rows; unmeasured schema/maintenance rows and default persistence uncertainty are omitted while actual unresolved writes remain concise; ordinary tables retain Git hooks and Sync target, but omit the Remote history row and routine remote-history caveat
- **AND** success is limited to the observed check; neither a loaded version label nor an admitted version is evidence of unique build identity or fresh live qualification

#### Scenario: Native hook report is available
Expand All @@ -498,21 +498,22 @@ Diagnostics SHALL render fixed compact Markdown Plugin / Beads tables and labele
#### Scenario: CLI witness is inspected

- **WHEN** a local CLI version witness is readable alongside an observed CLI version
- **THEN** the Recorded bd version row shows the bounded recorded value; the value states equality or difference from the CLI without history inference; equality is healthy, difference is mismatch rather than unhealthy, and missing/unreadable/unsupported values remain neutral literal fields
- **AND** neither equality nor difference establishes SQL schema, reconciliation, hook freshness or maintenance completion, produces migration advice, or affects context or typed-operation admission
- **THEN** the Recorded bd version row shows the bounded recorded value; the value states equality or difference from the CLI without history inference; equality and difference are informational, and missing/unreadable/unsupported values remain neutral literal fields; none affects severity or heading counts
- **AND** a difference points to native upgrade guidance, not sync or migration advice; neither result establishes SQL schema, reconciliation, hook freshness or maintenance completion or affects context or typed-operation admission
- **AND** a genuinely unavailable or incompatible running CLI remains an unhealthy CLI finding under the unchanged admission rules

#### Scenario: Remote or historical maintenance freshness is requested

- **WHEN** diagnostics has only local evidence
- **THEN** normal output shows Sync target from the available native evidence and Remote history as Not checked, or Not applicable only for established local-only operation; details identifies missing evidence and states source-Git freshness is not checked
- **THEN** normal output shows Sync target from the available native evidence without a Remote history row or caveat; exact `details` explains once that local target evidence is not a fresh history comparison, distinguishing established Local-only (comparison not applicable) from other targets (comparison not checked), and does not imply source-Git freshness was checked
- **AND** configured remote presence is a bounded hint without URL or credentials, never proof of effective resolution, connectivity or freshness; absent config fields and absent hooks establish neither local-only operation nor failure
- **AND** ordinary collection uses strict-readonly native remote listing without sync-remote contact, fetch, pull, synchronization or a custom resolver
- **AND** release-note maintenance applicability and completion remain unmeasured; details points to reviewable native release guidance rather than prescribing a sequential SQL migration chain

#### Scenario: Normal and requested details are captured once

- **WHEN** diagnostics is invoked normally or with an exact trimmed case-insensitive `details`, `help`, `remote` or `details remote` selector
- **THEN** exact `details` captures bounded evidence with the compact tables; exact `help` selects a static self-contained reference before collection, file reads or registry probes; exact `remote` and `details remote` request a comparison with normal tables or bounded evidence respectively, but report Not checked when no qualified producer is available and Not applicable for established local-only; bare or other text selects local normal tables without full evidence JSON
- **THEN** exact `details` captures bounded evidence with the compact tables; exact `help` selects a static self-contained reference before collection, file reads or registry probes; exact `remote` and `details remote` request a comparison with normal tables or bounded evidence respectively, but report Not checked when no qualified producer is available and Not applicable for established local-only; bare or other text selects local normal tables without full evidence JSON or a remote-history caveat
- **AND** `details remote` evidence distinguishes a successful fresh Beads history comparison, an attempted failure and an unperformed comparison; it does not claim a completed comparison was not checked or imply that source-Git freshness was checked
- **AND** exact free text, attachments/delivery, user overrides and the one-time v1 snapshot/replay path are preserved without recollection
- **AND** static help explains markers, each row/source/state, useful remedies/checks and limits, links the repository diagnostics reference and preserves the ordinary subsequent prompt/prime lifecycle
Expand All @@ -530,7 +531,7 @@ Diagnostics SHALL render fixed compact Markdown Plugin / Beads tables and labele
- **WHEN** the report contains target/history observations alongside plugin and local Beads observations
- **THEN** Local-only and Resolved assess only the target check; In sync assesses only a fresh successful history comparison; Unknown, Not checked and Not applicable are neutral and excluded from severity
- **AND** Unresolved, Local ahead, Remote ahead, Diverged and an actually attempted Check failed contribute mismatch, not an automatic unhealthy local-store or Plugin verdict
- **AND** the existing worst-assessed-check roll-up is retained, with a concise summary saying Remote history not checked whenever applicable so a healthy heading cannot imply synchronization; no assessed checks remains neutral
- **AND** the existing worst-assessed-check roll-up is retained, without an ordinary remote-history caveat; the health heading assesses only observed checks, not synchronization, and no assessed checks remains neutral
- **AND** Local ahead is described as unpublished work, with short review/sync-under-separate-authority actions and no corruption claim, automatic sync, retry, repair or migration advice

### Requirement: Managed guidance and skill visibility
Expand Down Expand Up @@ -581,7 +582,7 @@ Diagnostics SHALL derive Local-only, Resolved or Unknown from native context and
#### Scenario: Native listing establishes local-only operation

- **WHEN** a complete successful native listing is empty in a confirmed embedded Dolt context
- **THEN** Sync target is Local-only and Remote history is Not applicable
- **THEN** Sync target is Local-only; `details` and explicit remote selectors distinguish history as Not applicable, not Not checked
- **AND** details explains that native push may offer Git-origin adoption with consent; diagnostics never adopts a remote or promises permanent local-only operation

#### Scenario: Target evidence is ambiguous or fails
Expand All @@ -599,7 +600,7 @@ Only exact explicit remote selectors SHALL trigger a qualified native exact-bran
#### Scenario: No fresh comparison is performed

- **WHEN** the target is Local-only, no remote selector was requested, the target/context is unknown, unresolved or unsupported, or no qualified native exact-branch operation is available before spawn
- **THEN** Remote history is Not applicable for Local-only and otherwise Not checked with an unperformed/unsupported/withheld reason in details
- **THEN** explicit remote selectors report Remote history as Not applicable for Local-only and otherwise Not checked, with the unperformed/unsupported/withheld reason in bounded evidence when requested; ordinary output omits the row and caveat, and exact `details` conveys the distinction and any local evidence limits in one explanation
- **AND** without a qualified native operation there is no fetch; Beads 1.3.1 and 1.3.4 have no qualified history probe, and exact remote selectors explain this limitation
- **AND** ordinary/details remains local without fetch; known proxied-server mode is unsupported rather than an attempted history failure
- **AND** `remote please`, reversed tokens or other non-exact selector text does not trigger a remote operation
Expand Down
Loading
Loading