Skip to content

feat(B-0894.3): per-persona worktrees outside operator's primary repo — ~/.zeta/agents/<persona>/<stream>/ canonical#5697

Merged
AceHack merged 1 commit into
mainfrom
otto-cli/b-0894-3-per-persona-zeta-agents-2026-05-28
May 28, 2026
Merged

feat(B-0894.3): per-persona worktrees outside operator's primary repo — ~/.zeta/agents/<persona>/<stream>/ canonical#5697
AceHack merged 1 commit into
mainfrom
otto-cli/b-0894-3-per-persona-zeta-agents-2026-05-28

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 28, 2026

Operator-named refinement

"~/Documents/src/repos/Zeta/worktrees/lior- this sometimes locks up where i can't switch to main cause lior has it locked to a worktree isolated branches per persona or even per persona's parallel strems just for full isolation. I think ~/Documents/src/repos/Zeta/ is for shared up to date main and for me to push changes"*
"or maybe just .zeta/agents/"
— operator 2026-05-28, immediately after PR #5696 merged

What B-0894 (PR #5696) got right vs what B-0894.3 corrects

Concern PR #5696 (B-0894) This PR (B-0894.3)
Reboot survival (/private/tmp clears on reboot) ✅ Fixed — moved off /private/tmp/ ✅ Preserved (new location also under user home)
Operator-primary stays agent-free ❌ NOT fixed — placed under ~/Documents/src/repos/Zeta/worktrees/ ✅ Fixed — moved to ~/.zeta/agents/<persona>/<stream>/, outside operator's primary entirely
Per-persona isolation Partial (path-prefix discriminator) ✅ Full — one dir per AI persona
Per-stream isolation within persona Not addressed ✅ Multiple worktrees per persona for parallel work-threads
Namespace pattern Ad-hoc worktrees/<surface>-* ~/.zeta/ mirrors ~/.claude/ dotfile-namespace pattern (composes with future ~/.zeta/bus/ per B-0894.1)

The architecture

~/.zeta/                                    # Zeta namespace root (parallel to ~/.claude/)
  agents/
    otto-cli/
      b0894-3-per-persona-outside-repo-2026-05-28/   # this PR's authoring worktree
      tick-0512z/                                    # parallel stream
      shard-XYZ/                                     # another parallel stream
    otto-desktop/
    otto-vscode/
    lior/
    alexa-kiro/
    riven-cursor/
    vera-codex/
    lior-antigravity/
  bus/                                       # future per B-0894.1
  config/                                    # future
~/Documents/src/repos/Zeta/                  # OPERATOR primary — agent worktrees forbidden

Empirical proof

This PR's worktree lives at ~/.zeta/agents/otto-cli/b0894-3-per-persona-outside-repo-2026-05-28/ — the first instance of the new canonical pattern. Operator primary checkout (~/Documents/src/repos/Zeta/) is unaffected: no git status pollution, no [main]-holding risk, operator can git checkout any branch unblocked.

Same dogfooding pattern as PR #5696 (which used persistent-location to land persistent-location). Iterative refinement is operationally clean — operator surfaced the residual issue, follow-up PR fixes it without retracting the parent.

What this PR delivers

  • B-0894.3 backlog row (P1, refinement of B-0894) with operator's verbatim correction + architecture table + acceptance criteria
  • agent-worktree-hygiene rule update:
    • Carved sentence: two compounding invariants (reboot-survival + operator-primary-stays-agent-free)
    • Rule 1: example paths flipped to ~/.zeta/agents/<persona>/
    • Rule 2: default location flipped from ~/Documents/src/repos/Zeta/worktrees/<surface>-* (B-0894) to ~/.zeta/agents/<persona>/<stream-id>/ (B-0894.3); Lior migration documented as non-blocking
    • Rule 4: audit command scans ~/.zeta/agents/ + all legacy surfaces
    • Rule 5: two compounding invariants table includes BOTH reboot-outcome AND operator-blocking columns; PR feat(B-0894): reboot-survival worktree-location discipline — flip default from /private/tmp/ to ~/Documents/src/repos/Zeta/worktrees/ #5696's location shown as "survived but operator-blocking" case
    • Audit + verify-no-main-held commands scan all 4 surfaces

Composes with

  • B-0894 (parent, PR feat(B-0894): reboot-survival worktree-location discipline — flip default from /private/tmp/ to ~/Documents/src/repos/Zeta/worktrees/ #5696, merged d3962a9ef) — reboot-survival fix; this PR refines location
  • B-0750 — cleanup discipline; cleanup commands updated to scan new surface
  • B-0751 — per-agent isolated clones (per-persona dirs are worktree-level analog)
  • B-0530 — multi-agent contention; per-persona base dirs reduce contention surface
  • B-0894.1 (filed later) — bus envelope migration to ~/.zeta/bus/; same namespace
  • tick-must-never-stop.md — sentinel session-exit non-persistence is sibling at harness-level; this PR is filesystem-level. SessionStart hook + first-action discipline produces auto-arming sentinel at session-open (empirically validated this session per operator observation)

What this PR does NOT deliver (future-state work)

Test plan

  • B-0894.3 backlog row authored with substrate-inventory + composes_with + operator-verbatim
  • Rule edit: carved sentence + Rule 1 + Rule 2 + Rule 4 + Rule 5 + audit + verify-no-main-held commands all reference new canonical location
  • Post-commit canary clean (ls-tree=61)
  • Worktree authored at new canonical location (~/.zeta/agents/otto-cli/b0894-3-per-persona-outside-repo-2026-05-28/) — dogfooding proof
  • Operator primary (~/Documents/src/repos/Zeta/) unaffected; no [main] blocking risk introduced
  • Future autonomous-loop ticks observed creating worktrees at ~/.zeta/agents/<persona>/<stream>/ per new default (validation by observation)

🤖 Generated with Claude Code

… — canonical location ~/.zeta/agents/<persona>/<stream>/

Operator 2026-05-28 surfaced residual failure mode after B-0894 (PR
#5696) landed: "~/Documents/src/repos/Zeta/worktrees/lior-* this
sometimes locks up where i can't switch to main cause lior has it
locked to a worktree" + "~/Documents/src/repos/Zeta/ is for shared
up to date main and for me to push changes" + "per persona or even
per persona's parallel strems just for full isolation" + "or maybe
just .zeta/agents/".

B-0894 (PR #5696) correctly moved off /private/tmp/ (reboot-survival)
but placed the new default UNDER operator's primary repo, where
agent worktrees can still hold branch refs and block operator's
`git checkout`. B-0894.3 corrects to ~/.zeta/agents/<persona>/<stream>/
— outside operator's primary entirely; per-persona base; per-stream
isolation.

Changes:

- B-0894.3 backlog row (P1) with operator's verbatim correction +
  architecture table + Lior-migration-non-blocking framing
- agent-worktree-hygiene rule:
  - Carved sentence: two compounding invariants (reboot-survival
    + operator-primary-stays-agent-free)
  - Rule 1: example paths flipped to ~/.zeta/agents/<persona>/
  - Rule 2: default location flipped from ~/Documents/src/repos/Zeta/
    worktrees/<surface>-* to ~/.zeta/agents/<persona>/<stream-id>/;
    Lior migration documented as non-blocking future work
  - Rule 4: audit cmd scans ~/.zeta/agents/ + legacy surfaces
  - Rule 5: two compounding invariants + restored anchor table
    showing PR #5696's location triggered operator's blocking critique
    + new ~/.zeta/agents/ canonical location
  - Audit + verify-no-main-held commands scan all 4 surfaces
    (~/.zeta/agents/, legacy ~/Documents repo, /private/tmp, /tmp)

The worktree authoring this PR is itself at
~/.zeta/agents/otto-cli/b0894-3-per-persona-outside-repo-2026-05-28/
— first instance of the new canonical pattern. Operator primary at
~/Documents/src/repos/Zeta/ is unaffected (no git status pollution,
no operator-main-blocking risk).

Composes with: B-0894 (parent), B-0750 (cleanup), B-0751 (per-agent
clones), B-0894.1 (future ~/.zeta/bus/ migration).

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 28, 2026 04:44
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack AceHack enabled auto-merge (squash) May 28, 2026 04:44
@AceHack AceHack merged commit 83666a0 into main May 28, 2026
28 of 30 checks passed
@AceHack AceHack deleted the otto-cli/b-0894-3-per-persona-zeta-agents-2026-05-28 branch May 28, 2026 04:46
AceHack added a commit that referenced this pull request May 28, 2026
…architectural decision in flight (#5698)

Operator 2026-05-28 surfaced architectural question mid-implementation
of B-0867.5 Phase 1 observe.ts + choose.ts skeletons: how do agent-
loop entry-point tools map to framework primitives? Three conventions
alive in substrate:

- OPLE rule: Observe / Persist / Limit / Emit (per B-0862)
- B-0879 OELS: Observe / Emit / Limit / Simulate
- Operator initial direction: observe + choose (compressed 2-tool)

Plus the deeper internal-loop-vs-external-coordination-loop split
operator named ("they compose but are independent").

This row preserves the architectural question + 3 viable resolutions
+ documents local draft state at
~/.zeta/agents/otto-cli/observe-choose-skeleton-0512z/ so the
decision survives any context shift / cold boot. Filed at brief-
ack #6 per holding-without-named-dependency-is-standing-by-failure
forced-decomposition discipline; counter resets via concrete artifact.

Authored at canonical ~/.zeta/agents/otto-cli/ location per B-0894.3
(merged earlier this session via PR #5697).

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude <noreply@anthropic.com>
@AceHack AceHack review requested due to automatic review settings May 28, 2026 05:09
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