Skip to content

okf: Bundle.init/open/join lifecycle API + first-contact doc pack (ADR-007/008) - #54

Open
indexzero wants to merge 4 commits into
mainfrom
feat/okf-bundle-api-adr-008
Open

okf: Bundle.init/open/join lifecycle API + first-contact doc pack (ADR-007/008)#54
indexzero wants to merge 4 commits into
mainfrom
feat/okf-bundle-api-adr-008

Conversation

@indexzero

Copy link
Copy Markdown
Owner

What

The first PR of a three-PR stack implementing the accepted ADR set (okf/docs/decisions/ADR-001…009), which distills a six-agent concurrent-writer usability experiment (the "confusion log") into features. This PR carries the decisions themselves plus the two zero-behavior-risk implementations everything else builds on.

  • ADR docs: all nine decisions committed, statuses Accepted.
  • ADR-008 — Bundle.init/open/join: the initVault/openVault/joinVault free-function wrappers are deleted; the store class (renamed VaultBundle, store/lib/vault.jsbundle.js) is the sole lifecycle entry point. Rationale: the wrappers were a second vocabulary for one operation (the source of a first-contact confusion), and upstream OKF v0.2 defines the bundle as the unit of distribution — no vault concept exists in OKF. vault-ld is untouched: Vault.{init,open,join} is already its shape and the correct noun for its ontology. Residual "vault" vocabulary inside okf (marker file, CLI strings, <vault-dir> args, GLOSSARY) is deliberately deferred to ADR-009 so that migration happens once, alongside the v0.2 conformance audit.
  • ADR-007 — doc pack: manifest-scoping paragraph + a documented "Verifying content is in the log" idiom (scratch-dir materialize) in the faces/cli READMEs; vestigial top-level packages/ removed; @auto-okf/cli wired into root devDependencies so auto-okf links into .bin alongside autovault-ld (bin mode fixed 644 → 755).

Verification

  • grep -rn 'initVault|openVault|joinVault' okf/ (excl. node_modules, decisions) → empty
  • okf/store/index.js exports Bundle; no Vault export remains in okf
  • pnpm test:okf → 125/125; pnpm test:okf-harness:clean → 12/12
  • node_modules/.bin/ now carries both auto-okf and autovault-ld

Notes for review

  • compact's injected factory option renamed opts.initVaultopts.initBundle (error code COMPACT_NO_INITVAULTCOMPACT_NO_INITBUNDLE); no test asserted the old code.
  • One latent test bug surfaced by the sweep: a dynamic import() of the store inside faces-materialize.test.js shadowed the top-level import (TDZ); the redundant dynamic import is dropped.

Stack: PR 2 (ADR-003/004/005/006 — CLI reporting honesty batch) and PR 3 (ADR-001/002 — path-scoped ingest + status) follow on this branch. ADR-009 (OKF v0.2 alignment) is tracked as an issue, not a PR.

indexzero and others added 4 commits August 1, 2026 00:44
Nine decision records distilled from the six-agent confusion experiment:
path-scoped ingest, status command, ingest report split, materialize exit
codes, oversize preflight, wrong-tool guardrail, the first-contact doc
pack, the Bundle lifecycle API, and the okf v0.2 alignment migration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nVault/joinVault wrappers (ADR-008)

The class is the sole lifecycle entry point: store/lib/vault.js ->
store/lib/bundle.js, class Vault -> Bundle, and the three one-line free
functions are gone. compact's injected store factory follows
(opts.initVault -> opts.initBundle, COMPACT_NO_INITVAULT ->
COMPACT_NO_INITBUNDLE). All in-repo callers, tests, examples, and the
three README headline snippets swept to the Bundle API. Residual 'vault'
vocabulary (okf-vault.json, CLI strings, <vault-dir>, GLOSSARY, SPEC
prose) is deliberately untouched — ADR-009's scope.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…link auto-okf bin (ADR-007)

- faces + cli READMEs gain 'Verifying content is in the log': the
  emission manifest (.okf-manifest.json) is per-target-directory, so a
  scratch-dir materialize never disturbs another bundle — an empty dir
  that fills is proof the content is in the log (ADR-007 item 1).
- top-level packages/ removed — untracked scaffold (empty dirs + stray
  node_modules, outside the workspace globs), so this is filesystem-only
  (ADR-007 item 3).
- .bin symmetry: root devDependencies now carries @auto-okf/cli like
  @autovault-ld/cli, and bin/auto-okf.js becomes executable (100755, as
  autovault-ld's bin already was) — node_modules/.bin now links both
  (ADR-007 item 4).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Maintainer approved the full set 2026-08-01; statuses flipped Proposed -> Accepted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant