Skip to content

v1.2.0

Choose a tag to compare

@mmaripanguec mmaripanguec released this 22 Jul 22:20
· 14 commits to main since this release
c5acab4

v1.2.0 — Automatic code-graph indexing for the fleet/Postgres facade

Turns the codebase-memory handling from guidance into real, configurable
code
. Previously, onboarding a repo against a read-only fleet/Postgres facade
surfaced -32601 (index_repository has no equivalent in the fleet graph) and
left indexing as a manual, documented step. Now the factory seeds the repo and
wires the workspace MCP config automatically when the fleet is configured —
while still never blocking onboarding.

Why

The fleet/Postgres facade is read-only and does not expose the MCP write tool
index_repository (returning -32601 is expected, not a bug). The direct
engine indexes via the /repo-add skill; the facade needs an out-of-band seed.
v1.2.0 automates that seed + MCP wiring so both modes "just work".

Added

  • scripts/codebase-memory.sh — the indexing driver (bash 3.2, no deps):
    • index <repo> — seed the repo into the fleet via its CLI, then upsert a
      cbm-<repo> HTTP entry into a gitignored workspace .mcp.json.
    • mcp-config [repo…] — (re)write .mcp.json entries for the given repos
      (or all registered repos).
    • mode — print the resolved mode (fleet / direct / off).
  • repo-add.sh integration — after registering a repo, it calls
    codebase-memory.sh index <name> (non-blocking). With the fleet configured,
    onboarding indexes automatically; otherwise it prints direct-engine guidance.
  • scripts/tests/test-codebase-memory.sh — 5th self-test suite. Total is
    now 141 asserts across 5 suites, all green.

Configuration (.env, see .env.example)

Variable Purpose
CBM_MODE auto (default) · fleet · direct · off
CBM_FLEET_SEED Seed command template; {repo} → repos/<name>. Its presence turns auto into fleet.
CBM_FLEET_URL Fleet gateway base URL (e.g. http://127.0.0.1:8787)
CBM_FLEET_TOKEN Bearer token for the fleet gateway
CBM_FLEET_PROJECT Project-id template; {name} / {abspath_dashes} (default: {abspath_dashes})

Nothing is hardcoded — every fleet specific lives in .env.

Usage

# One-time: configure the fleet in .env, then onboarding indexes automatically:
./scripts/repo-add.sh https://github.com/org/repo.git   # seeds + wires .mcp.json

# Or drive it directly:
./scripts/codebase-memory.sh index <repo>    # seed one repo + wire .mcp.json
./scripts/codebase-memory.sh mcp-config       # (re)write .mcp.json for all repos
./scripts/codebase-memory.sh mode             # show the resolved mode

Behavior

  • Non-blocking: if the seed command fails or the fleet is down, it warns and
    continues; the as-is map, context packs and architecture document are still
    built from static analysis ("indexing pending").
  • Read-your-writes: re-seed after structural code changes; the graph does
    not refresh itself.

Changed

  • docs/codebase-memory-setup.md documents the automatic path and the .env
    configuration (direct engine vs fleet facade).
  • .gitignore now ignores .mcp.json (machine-specific paths + token).
  • .env.example gains the CBM_* block; the /repo-add skill notes the seed +
    .mcp.json wiring happen automatically when configured; README badge 119→141.

Upgrade notes

  • No breaking changes. If you were wiring .mcp.json by hand, you can now set
    CBM_* in .env and let /repo-add do it. Ensure .mcp.json is gitignored
    (it now is by default).

Full changelog: https://github.com/mmaripanguec/dev-sdd-kit/blob/main/CHANGELOG.md