Skip to content

aggregate: [nix-worktree-firstmate-enablement, nix-pi-coding-agent, nix-omnigraph-server] - #2654

Merged
github-actions[bot] merged 24 commits into
mainfrom
agent-tooling
Aug 7, 2026
Merged

aggregate: [nix-worktree-firstmate-enablement, nix-pi-coding-agent, nix-omnigraph-server]#2654
github-actions[bot] merged 24 commits into
mainfrom
agent-tooling

Conversation

@cameronraysmith

Copy link
Copy Markdown
Owner

No description provided.

… gates to ask

The worktree hooks read jj-mode by walking up from the hook process's own working directory, so a dispatch naming a repository other than the one the session started in was evaluated against the wrong tree.
A new lib-repo-context.sh resolves the repository from the tool input's own path and falls back to the hook payload's cwd, and the gates call it instead of walking up from $PWD.

The worktree gates now return ask rather than deny.
A worktree in a jj repository is a trade-off to weigh case by case, and deny left no way to proceed when the trade-off was acceptable.
The ask is suppressed under bypassPermissions, where a prompt has no defined outcome.
ExitWorktree is no longer gated at all, because leaving a worktree carries none of the trade-off and gating it strands worktrees created by tooling that cleans up after itself.

gate-git-worktree matches the worktree subcommand by command position, so a path or commit message containing the word no longer trips it.
jj-worktree-create creates a real worktree instead of refusing to.
verify-diamond-before-edit skips the diamond-shape check inside a linked worktree, where the invariants do not describe the tree being edited.
enforce-branch-before-edit keeps its deny on main and master, and its message now names the branch to create instead of reciting the beads worktree recipe.
The subagent matcher follows the harness rename from Task to Agent.
…nterop discipline

The generated agent instructions and twelve skill documents stated that the harness's worktree-creating surfaces are denied in jj mode and that parallel work therefore uses the development join.
The first half of that no longer describes the hooks, which ask rather than deny, and it stood in for guidance it never actually gave: a reader learned that worktrees were unavailable, not when one is the right tool or how to run one safely.

Each affected document now states that the development join is the default technique for parallel chains in a single working copy, that the worktree surfaces raise an ask, and which situations warrant answering affirmatively.
It also records that an isolated tree in a flake repository must be a git worktree, because a jj workspace has no .git and flake evaluation there degrades to a path: source that copies .jj and gitignored directories into the store.

jj-version-control/SKILL.md gains a Worktree interop section holding the operating discipline the other documents point at.
The rules are exclusive branch ownership, return-by-ref, and a detached primary HEAD that is the healthy steady state rather than drift to repair.
It names ref deletion as the destructive class, gives the symbolic-ref recovery for a worktree whose bookmark jj moved out from under it, and lists the git commands that must not be run against a jj working copy.

agents-md.nix additionally records why an external framework such as firstmate gets its own clone rather than a symlink to a working copy we share, which is that its fleet sync runs exactly the branch-deletion and HEAD-reattachment operations the discipline forbids.
…ser's PATH

firstmate drives repositories through six CLIs that nixpkgs does not carry: treehouse for worktree management, no-mistakes as a pre-push check runner, and the agent-interface tools gh-axi, tasks-axi, quota-axi, and lavish-axi.
Each gets a pkgs/by-name derivation with an update.sh alongside it.

They install through the ai aggregate rather than the shared packages aggregate.
packages reaches all five users while ai reaches only the user who runs agents, and these tools serve firstmate with no standalone use, so the shared aggregate would install agent tooling for four people who never invoke an agent.

The beads-ui update script adopts the same npmDepsHash placeholder convention the new scripts use, and its failure message now names the placeholder and the command that reveals the correct hash instead of instructing the reader to substitute lib.fakeHash by hand.
@cameronraysmith cameronraysmith self-assigned this Aug 7, 2026
@cameronraysmith
cameronraysmith marked this pull request as ready for review August 7, 2026 07:49
@mergify

mergify Bot commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ The sha of the head commit of this PR conflicts with #2653. Mergify cannot evaluate rules on this PR. Once #2653 is merged or closed, Mergify will resume processing this PR. ⚠️

@cameronraysmith cameronraysmith added the author-approved Owner self-approval marker; triggers Mergify auto-approve label Aug 7, 2026
@github-actions
github-actions Bot merged commit faa2423 into main Aug 7, 2026
7 of 8 checks passed
@github-actions
github-actions Bot deleted the agent-tooling branch August 7, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author-approved Owner self-approval marker; triggers Mergify auto-approve

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant