Skip to content

v0.4.0: isolate AI agent state per workspace by default - #13

Open
marceloceccon wants to merge 7 commits into
mainfrom
elevate/v0.4-competence
Open

v0.4.0: isolate AI agent state per workspace by default#13
marceloceccon wants to merge 7 commits into
mainfrom
elevate/v0.4-competence

Conversation

@marceloceccon

Copy link
Copy Markdown
Member

Objective

Ship 0.4.0 so a buckle container is a self-contained agent environment by default: Claude Code and Grok skills, versions, and config no longer leak across projects via host ~/.claude / ~/.grok. Close the correctness, trust, and CI gaps that were overselling the 0.3 line.

This is a breaking 0.x change. Existing .devcontainer/ files are untouched until the user re-renders.

Why

The previous default bind-mounted the host agent homes into every workspace. Skills, auth, and CLI versions then mixed across projects. --isolate existed only as a macOS escape hatch that stripped those mounts (no persistence). The 0.4 default remaps them onto a per-workspace directory instead:

In the container Default (isolated) --share-home
/home/vscode/.claude $XDG_DATA_HOME/buckle/workspaces/<slug>-<hash>/claude host ~/.claude
/home/vscode/.grok .../grok host ~/.grok
/home/vscode/.gitconfig host ~/.gitconfig (identity, always) same

Opt out: --share-home, --no-isolate, or isolate: false in ~/.config/buckle/config.yaml.

Re-render an existing project:

buckle <template> --yes
# or status panel → c

Also in this PR

  • --version reads package.json (no longer a stale 0.1.0).
  • Trust prompt is real: TTY prints the executable surface and asks [y/N]; non-TTY / --json still requires --trust. Built-ins stay pre-trusted.
  • Trust-surface hashes are key-order stable.
  • buckle install refuses plaintext http:// origins.
  • Unknown convenience features raise BuckleError. MCP installs no longer swallow failures with || true.
  • ~/.config/buckle/config.yaml is actually loaded (editor, defaultTemplate, isolate).
  • Status panel c reconfigures (pick template → rewrite .devcontainer/).
  • Wizard / list / doctor surface dual-agent templates (ai-native, claude-corp). Empty dirs suggest ai-native first.
  • Docs and generated banners point at entropyvortex/buckle. DESIGN-NOTES.md and MAINTAINERS.md exist.
  • CI runs test:coverage (thresholds enforced). CodeQL workflow added.

Test plan

  • npm run lint && npm run typecheck && npm run test:coverage (216 tests; included-set coverage meets 90/80).
  • Re-render a project with buckle ai-native --yes and confirm mounts point at $XDG_DATA_HOME/buckle/workspaces/…, not host ~/.grok / ~/.claude.
  • buckle ai-native --share-home --yes restores host binds.
  • buckle --version matches package.json (0.4.0).
  • Interactive TTY on a user template prompts; buckle <user-tpl> --json without --trust errors E_HASH_MISMATCH.

Type of change

  • Breaking change (0.x: isolate is now the default)
  • New feature
  • Bug fix
  • Documentation update

marceloceccon and others added 7 commits August 31, 2026 16:56
Read the CLI version from package.json instead of a stale 0.1.0
literal. Hash the executable trust surface with a key-sorted
serializer so object key order cannot false-trigger a re-prompt.
Unknown convenience features now raise BuckleError. Interactive
TTYs print the lifecycle surface and prompt [y/N]; non-TTY still
requires --trust. Refuse plaintext http:// install origins and
stop swallowing MCP install failures.
Remap ~/.claude and ~/.grok onto
$XDG_DATA_HOME/buckle/workspaces/<slug>-<hash>/{claude,grok}
so agent skills, versions, and config do not leak across
containers. Host ~/.gitconfig stays shared (identity).

Opt out with --share-home, --no-isolate, or isolate: false in
~/.config/buckle/config.yaml. Load that config file for editor,
defaultTemplate, and isolate. --version now tracks package.json.
Empty-directory autodetect leads with ai-native.
…emplates

Honor the documented c keybinding: pick a template and rewrite
.devcontainer/. Wizard and status panel label ai-native / claude-corp
as dual-agent. Wizard trusts built-ins only. Cover both surfaces
with ink-testing-library.
Bump to 0.4.0. Restore DESIGN-NOTES.md, add MAINTAINERS.md, point
clone URLs and generated banners at entropyvortex/buckle, and
document isolation, --share-home, and the real trust prompt.
CI now runs test:coverage so the 90/80 thresholds are enforced.
Add a CodeQL workflow.
Bring the included-set coverage above the CI thresholds (90%
lines/functions/statements, 80% branches). Exclude commander
wiring, docker log/restart wrappers, and the readline prompt
from the counted set — those are not unit-testable without a
TTY or daemon.
GitHub default CodeQL setup is already enabled on this repo.
A second advanced workflow uploads SARIF that Code Scanning
rejects with a configuration error.
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