Skip to content

feat: visible git-backed workspace root + developer mode (agentic-workspace F1) - #446

Open
broomva wants to merge 5 commits into
gethouston:mainfrom
broomva:open-existing-workspace-folder
Open

feat: visible git-backed workspace root + developer mode (agentic-workspace F1)#446
broomva wants to merge 5 commits into
gethouston:mainfrom
broomva:open-existing-workspace-folder

Conversation

@broomva

@broomva broomva commented Jun 5, 2026

Copy link
Copy Markdown

Summary

F1 of the agentic-workspace substrate arc (design in docs/agentic-workspace-substrate.{md,html}). Lets Houston workspaces live in a user-visible, git-backed root instead of only ~/.houston/, behind an invisible-by-default developer mode. Default behavior is unchangeddocsRoot unset → ~/.houston/workspaces/, so existing installs are untouched until a user opts in.

What's included

  • C1 — docs_root resolution (app/src-tauri/src/app_config.rs): docsRoot in ~/.houston/app-config.json, read at boot, injected as HOUSTON_DOCS. Defaults to today's path.
  • C4 — git-init the root (engine/houston-engine-core/src/git_repo.rs): idempotently git-inits the visible root + seeds .gitignore + a .gitignore-only initial commit; skips the hidden system root (canonicalized); degrades gracefully when git is absent. Wired into engine boot (state.rs).
  • C5 — migration (app_config::migrate_docs_root): EXDEV-safe, no-loss, resumable move of an existing tree into a chosen root.
  • C2 — developer mode (use-developer-mode.ts + Settings → Advanced): opt-in toggle; off by default keeps the non-technical product.
  • C3 — workspace location (commands/workspace_root.rs + Settings control): view/reveal/change the root; the change is staged and applied at the next boot (before the engine starts), then the app prompts to restart.

Adversarial review (P20)

A cross-model review flagged data-loss paths (live-engine migration, EXDEV tears, git add -A committing secrets, lexical home-skip, dual tilde-expanders, missing input validation). All addressed in ae2e626: migration runs at boot before the engine spawns, is EXDEV-safe + resumable, commits only .gitignore, canonicalizes the home-skip, persists an absolute path, and validates inputs.

Validation

  • Rust: git_repo 6 tests, app_config 11 tests (incl. EXDEV-resume + nesting/equal guards) — all green.
  • cargo check (app) clean; pnpm tsc --noEmit 0 errors; pnpm check-locales OK (en/es/pt).

NOT done / please verify before merge

  • Runtime verification (P11): unit-tested + type-clean, but I could not run the Tauri app headlessly. Before merge, pnpm tauri dev and exercise: Settings → Advanced → Developer mode → Workspace location → pick a folder → restart → confirm the tree migrated and the engine uses the new root. This gate I cannot close from here, and it guards a data-migration feature.
  • First-run onboarding root-pick screen is deferred — the capability ships via Settings; the tutorial-flow placement needs the same runtime verification.

🤖 Generated with Claude Code

broomva and others added 5 commits June 4, 2026 15:34
Design for making Houston workspaces user-visible, git-backed, and
bstack-governed by providing the environment and installing skills
(not building engine features). Grounded by workflow sweep
wf_55e0d214-f5e. Canonical spec (.md) + rich presentation (.html).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…it-init, migration)

Engine substrate for the agentic-workspace arc — workspaces can now live
in a user-visible, git-backed root instead of only ~/.houston/.

- app_config.rs: docsRoot in ~/.houston/app-config.json, read at boot;
  resolve_docs_dir defaults to ~/.houston/workspaces when unset, so
  existing installs are unchanged (C1).
- git_repo.rs: ensure_docs_root_git idempotently git-inits the visible
  root + seeds .gitignore + initial commit; skips the hidden system root
  and degrades gracefully when git is absent. Wired into engine boot (C4).
- migrate_docs_root: idempotent, non-clobbering move of an existing
  workspace tree into a chosen root (C5).

Tests: 9 app_config + 4 git_repo, all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Developer mode: invisible-substrate by default, an opt-in toggle reveals
  technical surfaces. Persisted as the `developer_mode` engine preference;
  useDeveloperMode hook + Advanced settings section (C2).
- Workspace location: get_docs_root/set_docs_root Tauri commands + a
  Settings → Advanced control to view, reveal, and change the visible root
  (folder picker → app-config save + idempotent migrate; applied on next
  launch). os-bridge helpers keep invoke() centralized (C3).
- i18n en/es/pt; knowledge-base/agent-manifest.md updated.

tsc 0 errors, cargo check clean, check-locales OK.

Note: the first-run onboarding root-pick SCREEN is deferred — the capability
ships via Settings; the tutorial-flow placement needs runtime verification.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cross-model review (P20) flagged data-loss paths in the location change.
Fixes:
- Migration now runs at BOOT, before the engine spawns, via a staged
  `migrateFrom` in app-config — never under a live engine that is still
  writing the old root (was: torn/split tree). [B1]
- migrate_docs_root is EXDEV-safe (rename, falling back to copy+remove
  across filesystems), removes a source entry only after it is fully
  written to the destination, and moves workspaces.json LAST so an
  interrupted run resumes cleanly — no data loss on external drives /
  network mounts / iCloud. [B2]
- git-init commits ONLY .gitignore (was `git add -A`), so a user's first
  opt-in never sweeps gigabytes of agent build output or a project `.env`
  into the initial commit; the seed .gitignore is also broadened. [M1]
- The hidden-system-root skip now canonicalizes both paths, so a
  symlinked / case-insensitive home is matched correctly. [M2]
- set_docs_root persists the resolved ABSOLUTE path (one shared expander),
  validates absolute / not-a-file / not-nested / unchanged. [M3, M4]
- The legacy ~/Documents/Houston migrator targets the resolved docs_dir,
  not the hardcoded default. [m4]
- The Settings docs-root read surfaces failures via toast (no silent
  catch). [m1]

Tests: git_repo 6, app_config 11 (incl. EXDEV-resume + nesting guards),
all green; tsc 0 errors; check-locales OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resumable handoff for the agentic-workspace F1 arc: P15 snapshot, the
4-commit delivery, re-runnable validation, the P11 runtime-verification
first action, and open threads (merge gethouston#446, onboarding screen, F0/F2).

Co-Authored-By: Claude Opus 4.8 (1M context) <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