feat(worktree): add worktree up/down and harden branch gc
pkgmgr worktree up and down create and release a branch worktree with its own slot and run the operator-pinned worktree-init and worktree-fini hooks; branch gc removes merged worktrees, now also patch-merged ones (git cherry), and the hooks of each repository run only from worktree_hooks pins of a managed repository whose git directory is its own. Removal walks to the worktree without following a symbolic link and skips paths that are not their own realpath. A bare-name hook program resolves once to a root-controlled file on a root-controlled PATH: root is uid 0 only in the initial user namespace and the overflow uid elsewhere, nosuid mounts never count on the host, and the hook runs the resolved file with only those PATH entries, stdin closed and a timeout over its process group. 🎯 Fix: 93 % 💥 Break: 3 % 💸 Cost: 114 % ⏱️ Time: 129 % 🛡️ Security: 100 % 🏆 Score: 61 🚦 Gate: cost 114 % and time 129 %: accepted by the operator for B (2026-11-07) after skeptic round 6 found no hole and MEDUSA reached 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54f0cbb37b
commit
102c74f1e0
32 files changed
+2593
-207
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# Agent Instructions
|
||||
|
||||
## Scope against the skills repository
|
||||
|
||||
package-manager holds deterministic code that an operator can run on its own,
|
||||
without an agent: repository, branch, worktree, release, packaging and
|
||||
development tooling. Agent coordination (claims, messages, queues, scores,
|
||||
prompts, session data) belongs to the
|
||||
[skills repository](https://github.com/kevinveenbirkenbach/skills), whose skills
|
||||
stay thin wrappers that call `pkgmgr`.
|
||||
|
||||
- A new helper that a human could sensibly run alone goes here as a `pkgmgr`
|
||||
command, with its tests, never as a script inside a skill.
|
||||
- Output that an agent filters further (claims, busy agents, scores) is
|
||||
emitted as `--json`; the filtering stays in the skill.
|
||||
- When the split of a helper is unclear, the operator decides.
|
||||
|
||||
## Working copy
|
||||
|
||||
The installed `pkgmgr` may run straight from the main checkout, so a
|
||||
half-edited tree breaks it for everyone. Edit only in a worktree
|
||||
(`pkgmgr worktree up <branch>`), never in the main checkout.
|
||||
Reference in new issue
Block a user