Skip to content

feat: Metadata-first workspace inventory and Codex cue - #1

Merged
Yabuku-xD merged 3 commits into
mainfrom
feat/workspace-inventory
Jul 16, 2026
Merged

Yabuku-xD merged 3 commits into
mainfrom
feat/workspace-inventory

Conversation

@Yabuku-xD

Copy link
Copy Markdown
Owner

Summary

Adds a manual, metadata-only bread inventory command plus a compact Codex
session-start cue that points agents at it before broad exploration. Inventory
gives agents a bounded view of workspace shape and estimated text-context cost
without reading file contents, following symlinks, building the index,
calling a model, touching the network, or persisting state.

This adopts the useful metadata-first interaction pattern from vlm-run/mm
while deliberately rejecting what makes mm heavier: no Python runtime, no VLM
pipelines, no credential/profile management, no global cross-workspace database,
and no automatic multimodal ingestion. Bread stays a native Rust binary with a
local, workspace-bounded safety model.

What's included

  • Inventory engine (src/engines/inventory.rs): streaming, policy-aware
    metadata walk. Reuses Bread's ignore, hidden-file, .git//.bread/, and
    denied-path boundaries; skips protected paths before any counting; classifies
    by name/extension only via a new path-only classify_path seam over the
    language catalog; estimates tokens from text files alone (PDFs and other
    binaries contribute bytes but zero tokens); returns an honest incomplete
    lower bound
    on an entry-budget or metadata failure.
  • CLI (bread inventory): bounded, versioned JSON — category counts, byte
    totals, estimated text tokens, and a capped top-level directory breakdown.
    Never emits individual file paths.
  • Codex discovery: SessionStart returns one static cue on a branch that
    returns before any index or context access. UserPromptSubmit gating is
    unchanged. Deterministic adapter matrix grows to 240 cases; the
    hook-overhead bench samples the session-start response separately.
  • Docs: README, docs-site source, and Codex release guide describe the
    metadata-only, policy-aware contract.

Repo hygiene

  • Ignore local agent/planning state (.claude/, .serena/, docs/plans/).
  • Remove website/.openai/hosting.json — a stale OpenAI Apps hosting record
    from before the Vercel migration that carried an account-specific project id
    and is referenced nowhere.

Testing

  • cargo test --all-features: 140 passed, 0 failed
  • cargo fmt --all -- --check: clean
  • cargo clippy --all-targets --all-features -- -D warnings: clean
  • cargo build --release and cargo build --features semantic --locked: ok
  • scripts/codex-release-smoke: BREAD_CODEX_RELEASE_OK
  • Verified end-to-end: bread install codex (release binary) wires all four
    hooks including SessionStart; the daemon delivers the exact cue through
    bread hook codex; bread inventory returns valid JSON on this repo.

🤖 Generated with Claude Code

Yabuku-xD and others added 3 commits July 15, 2026 20:17
Add a manual, metadata-only `bread inventory` command that returns a
bounded JSON summary of the workspace — file-category counts, byte
totals, an estimated text-token cost, and a top-level directory
breakdown — without reading file contents, following symlinks, building
the index, calling a model, or persisting state.

The streaming walk reuses Bread's ignore, hidden-file, `.git/`/`.bread/`,
and denied-path boundaries, skips protected paths before any counting,
classifies files by name and extension only (via a new path-only
`classify_path` seam over the language catalog), estimates tokens from
text files alone, and returns an honest incomplete lower bound on an
entry-budget or metadata failure.

Codex `SessionStart` now returns one static cue advertising the command,
on a branch that returns before any index or context access. The
deterministic adapter matrix grows to 240 cases and the hook-overhead
bench samples the session-start response separately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the `bread inventory` command and its metadata-only, policy-aware
contract to the README, docs site source, and Codex release guide, and
note the single static session-start cue. Update the Codex adapter
matrix count to 240 across the docs and the site proof stat.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ignore local agent and planning state (.claude/, .serena/, docs/plans/)
and remove website/.openai/hosting.json, an OpenAI Apps hosting record
left over from before the Vercel migration that carried an
account-specific project id and is no longer referenced.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bread Ready Ready Preview, Comment Jul 16, 2026 3:18am

@Yabuku-xD
Yabuku-xD merged commit 1ca30e5 into main Jul 16, 2026
3 checks passed
@Yabuku-xD
Yabuku-xD deleted the feat/workspace-inventory branch July 16, 2026 03:22

This branch was successfully deployed

1 active deployment
Preview — 722d8e40 Deployed Jul 16, 2026 by vercel[bot]
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