Skip to content

Fluree Companion program: docs corpus scoping and the CLI↔stack contract surface #1653

Open

Description

@aaj3f

This is the fluree/db slice of the Fluree Companion program (the hub anchor with the full objective lives in the solo issue linked below). Short version of the program: users increasingly onboard to Fluree AI through Claude Code and similar agents, and because every customer runs their own stack at their own version, the knowledge layer has to be stack- and binary-hosted, with plugins carrying only choreography. Most of what this repo needed for that already shipped in v4.1.5 — fluree manifest as a release asset, docs/ai/claude-code.md in the published TOC, the cli.min_version warning in remote add, and the docs_coverage gate — and this program mostly consumes that work rather than adding to it. What's left here is one hygiene item I'd consider important, one docs-ownership item, and one nice-to-have.

A1 — scope the embedded docs corpus. The rust-embed derive in fluree-db-docs/src/embed.rs embeds all of ../docs excluding only book/* and hidden dirs. That means docs/audit/ — 39 internal engineering records with branch names, worktree paths, benchmark run IDs, and contributor attribution — ships inside every released binary and is served to any user or agent via docs_search. Verified by live probe: fluree docs search "findings register virtual dataset" returns audit/2026-07-virtual-dataset-perf/04-findings-register.md as the top hit, and docs_get happily reads it. These files are in the public git tree anyway, so this isn't a disclosure problem so much as a corpus-quality one: roughly 50 embedded pages aren't linked from SUMMARY.md, so they're agent-visible and customer-shipped without ever having been a deliberate publishing decision, and they pollute search rankings for real queries.

The fix I'd propose: the embedded set becomes exactly (pages linked from SUMMARY.md) ∪ (an explicit extras allowlist, one why-comment per entry — docs/cli/server-integration.md is the known deliberate-embed candidate), enforced by a guardrail test that iterates DocsAssets::iter() against parsed SUMMARY.md links and prints offenders. Plus an immediate #[exclude = "audit/*"], and one review pass over the ~50 to sort each into linked / extras / excluded.

D3 — give the CLI↔stack glue a published home. docs/cli/server-integration.md is the contract solo implements, and it's currently embedded and searchable but orphaned from SUMMARY.md — invisible on the published book. The CLI↔Fluree-AI layer is documented in exactly one section of one page (ai/claude-code.md) across both repos; we should promote server-integration.md into the TOC and have ai/claude-code.md cross-link both the plugins (fluree-cli, and the new fluree-companion) and the stack-served docs, so a user arriving at any entry point finds the rest within a hop.

A6 (nice-to-have) — disambiguate non-release builds. The workspace version is bumped only in the release-tag commit, so every build from main between releases reports the previous release's number while carrying a different command surface — I verified a 4.1.4-reporting binary without materialize alongside a 4.1.4-reporting checkout that has it. Anything keyed on the version string alone (docs stamps, the manifest, plugin contract checks) will lie for non-release builds. Including the git rev in fluree manifest and the docs version stamps would close this; it's cheap insurance rather than urgent.

Solo-side consumers of this repo's contract surface (its fluree … string validation against fluree-cli-manifest.json, and conformance that its /v1/fluree surface matches remote_client.rs's op list) are tracked in the solo anchor as D1/D2 — flagging here mostly so it's visible that the manifest release asset now has three downstream CI consumers (solo, claude-plugins, and the new plugin's contract), which is worth keeping in mind when its schema evolves.

Sibling anchors

  • fluree/solo#1040 — the hub — stack-hosted knowledge plane (docs index, MCP knowledge tools, public search, ⌘K palette), UI↔API parity audits + contract gates, well-known v2, discovery surfaces
  • Fluree Companion program: the fluree-companion plugin claude-plugins#3 — the fluree-companion plugin, the stack-facts contract, cli-contract CI flip, customer-facing repositioning
  • fluree/solo-proxy#255 — manifest-pin parity for customer-driven stack updates

Follow-ups (post-#1654)

  • Move the audit records out of docs/ entirely. Of the three outcomes the corpus policy offers, #[exclude] is the only one that leaves no reviewable evidence — SUMMARY linkage shows in diffs and EMBEDDED_EXTRAS demands a reason and is rot-checked, but an excluded tree is invisible to every test forever. Relocating docs/audit/ + docs/audit-impl/ (e.g. to a top-level audit/) would delete the exclude list and reduce the invariant to "everything under docs/ is published or a listed extra" — strictly simpler. The ~20 source citations of docs/audit/... paths are all doc comments, a sed away. Deliberately not grown into fix(docs): stop embedding internal engineering records; close the docs corpus #1654.
  • operations/running-fluree.md: fold its unique content into the three published pages it overlaps (operations/README, cli/README, getting-started/rust-api) and delete it — the TODO(review) extras entry in embed.rs marks the open decision. (Publishing it as-is enshrines the duplication; excluding it hides real content from the agents that find it today.)

Activity

  1. added
    P3
    area:cli
    on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3area:cli

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions