agy-project-worktree-permissions
Prove AGY project/worktree isolation with scoped --add-dir permissions, role tiers, dcg guardrails, and persisted evidence.
What this skill does
# agy-project-worktree-permissions
Prove **scoped project/worktree isolation** on the **AGY/Antigravity image** before
its ticks count toward the cross-vendor quorum. This is the `cp-c6k.3.4` proof child
of `IMAGE-AGY.md`: the AGY image must show that concurrent roles run in
*non-overlapping* directory scopes with *permission tiers matched to role*, and that
the destructive-command guard survives auto-approve — not just that a bead closed.
AGY's write-isolation primitive is **directory scope, not spawned worktrees**:
`--add-dir <dir>` (repeatable) pins which paths a run may touch, and `--sandbox`
restricts the terminal. Project isolation comes from running each role against a
distinct repo/worktree path and never granting overlapping `--add-dir` scopes.
**Invoke `agy`; never rebuild it** (operator-side; see `agy-native` Rule 7).
## Overview / When to Use
Use this when you need to *prove* — with a persisted artifact, not prose — that an
AGY run kept its author and judge isolated. It is the gate that lets an AGY tick join
the quorum family. Triggered by: an AGY bead that needs a scoped-permission proof;
"prove project/worktree isolation on Antigravity"; closing `cp-c6k.3.4`; any AGY
fan-out where two roles could otherwise clobber each other.
This is a **proof skill**, narrower than `agy-native` (which drives the whole loop).
It composes: `agy-native` runs the tick; this skill asserts and records the isolation
invariants on that tick. It is the AGY analogue of `cc-worktree-isolation`, mapped
onto AGY's `--add-dir`/`--sandbox` model instead of Claude Code's `EnterWorktree`.
Verified AGY primitives this skill leans on (from `IMAGE-AGY.md` and `agy-native`):
- **Workspace scope:** `--add-dir <dir>` (repeatable) — the only write-isolation knob.
- **Permission tiers:** `--dangerously-skip-permissions` (author, auto-approve),
default (judge, no auto-approve), `--sandbox` (full-auto only when confined).
- **Guard:** the `dcg` BeforeTool hook on `run_shell_command` in `~/.gemini/settings.json`.
- **Project isolation:** distinct repo/worktree paths per role; a git worktree per
author when authors run concurrently.
## ⚠️ Critical Constraints
- **Rule 1 — non-overlapping scopes are the proof, not a nicety.** The author's
`--add-dir` set and the judge's `--add-dir` set must share no path (no parent
containing the other). A proof with overlapping scopes is a FAIL even if the bead
closed. **Why:** overlapping write scope is a clobber/false-close path; isolation is
the membrane being proven.
- **Rule 2 — match permission tier to role.** Author = `--dangerously-skip-permissions`
with a **tight** `--add-dir`; judge = **default** (no auto-approve) with a
read-mostly scope; full-auto only inside `--sandbox`. A judge that can auto-edit is a
false-close path. **Why:** auto-approve is a blast-radius choice (`IMAGE-AGY.md`:
"sandboxed defaults; no break-glass permission bypass in the normal image path").
- **Rule 3 — `dcg` guard stays on under auto-approve.** Confirm the `BeforeTool` hook
on `run_shell_command` → `dcg` is present in `~/.gemini/settings.json` *before*
trusting any `--dangerously-skip-permissions` run. **Why:** auto-approve would
otherwise let destructive commands through; the guard is the floor.
- **Rule 4 — per-author git worktree when authors are concurrent.** Two authors
touching the same repo get separate `git worktree` paths, each its own `--add-dir`.
One repo working tree = one writer at a time. **Why:** prevents swarm races on the
index/working tree.
- **Rule 5 — author != judge across contexts.** The scope/permission split is only
real if the judge is a *separate* AGY conversation (no `-c`/`--continue` from the
author). Record both `conversation_id`s. **Why:** a shared context defeats the
isolation it claims (`agy-native` Rule 2).
- **Rule 6 — no break-glass in the image path.** The proof is invalid if isolation was
achieved only by disabling the guard, by `--dangerously-skip-permissions` without a
tight `--add-dir`, or by granting the repo root to every role. **Why:** that is the
exact bypass `IMAGE-AGY.md` forbids for the normal image.
- **Rule 7 — operator-side; invoke-never-rebuild.** Do NOT write under `~/dev/agentops`
as part of running a proof, do NOT git push agentops, do NOT re-author AGY. **Why:**
AGY is the flywheel substrate (ACFS doctrine) — own a thin adapter.
## Workflow / Methodology
### Phase 1: Verify the image + guard are live
```bash
which agy && agy --version # CLI present (IMAGE-AGY baseline: 1.0.6)
test -f "$HOME/.gemini/settings.json" # settings present
# Confirm the dcg BeforeTool guard on run_shell_command is wired:
grep -q 'run_shell_command' "$HOME/.gemini/settings.json" && \
grep -q 'dcg' "$HOME/.gemini/settings.json"
```
**Checkpoint:** `agy` resolves and the `dcg`/`run_shell_command` guard is present
(Rule 3) before any auto-approve run.
### Phase 2: Lay out non-overlapping project/worktree scopes
Pin one path per role. When authors run concurrently against one repo, give each a
git worktree so no two writers share a working tree (Rule 4):
```bash
AUTHOR_DIR="$REPO" # or a dedicated worktree
JUDGE_DIR="$REPO/evidence" # read-mostly slice — MUST NOT
# be a parent/child of AUTHOR_DIR
# For concurrent authors:
git -C "$REPO" worktree add "$REPO-wt-author-a" -b run/author-a
```
**Checkpoint:** the author scope and judge scope share no path; record both. If they
overlap, the proof is a FAIL (Rule 1) — re-slice before running.
### Phase 3: Author run — tight scope, auto-approve
```bash
agy --print --add-dir "$AUTHOR_DIR" --dangerously-skip-permissions \
"Claim one ready bead via br. Implement only it within this scope. \
Commit scoped. Write evidence as userFacing. Do NOT close it — a judge will."
```
**Checkpoint:** a scoped commit + evidence artifact exist; the bead is OPEN; the run
touched nothing outside `AUTHOR_DIR`.
### Phase 4: Judge run — separate context, read-mostly scope, no auto-approve
```bash
agy --print --add-dir "$JUDGE_DIR" \
"Validate bead <id> against its evidence artifact ONLY. You did not author it. \
Emit PASS/WARN/FAIL as a userFacing verdict. Do not edit code."
```
**Checkpoint:** the judge ran in a *different* conversation (Rule 5), default
permissions (no auto-approve, Rule 2), and a scope disjoint from the author's.
### Phase 5: Assert + persist the isolation proof
Record the isolation facts as the durable artifact that gates `cp-c6k.3.4`:
```bash
cat > "$REPO/evidence/agy-isolation-<bead>.md" <<EOF
author_scope: $AUTHOR_DIR (--dangerously-skip-permissions)
judge_scope: $JUDGE_DIR (default permissions)
scopes_disjoint: true
dcg_guard: present (run_shell_command BeforeTool)
author_conversation_id: <id>
judge_conversation_id: <id>
verdict: <PASS|WARN|FAIL>
EOF
```
**Checkpoint:** a persisted artifact names each scope, each permission tier, the guard
state, two distinct conversation ids, and the verdict. *That* is the proof — not the
fact that a bead closed.
## Output Specification
**Format:** an AGY isolation-proof artifact (markdown / JSON) plus the underlying
scoped commit and verdict.
**Filename / path:** `<repo>/evidence/agy-isolation-<bead>.md` (and/or a
`brain/*.md` with `userFacing:true`).
**Required fields:** `{ bead_id, author_scope, author_permission, judge_scope,
judge_permission, scopes_disjoint (true), dcg_guard (present),
author_conversation_id, judge_conversation_id, verdict }`.
**Pass condition:** `scopes_disjoint == true` AND `dcg_guard == present` AND
`author_conversation_id != judge_conversation_id` AND judge ran without auto-approve.
## Quality Rubric
- [ ] Author `--add-dir` and judge `--add-dir` share no path (Rule 1) — recorded.
- [ ] Author had auto-approve + tight scope; judge ran default, read-mostly (Rule 2).
- [ ] `dcg` BeforeTool guard on `run_shell_command` confRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.