Skip to content

feat(crew): run each crewmate's worker in its own git worktree - #23563

Merged
iamwhatever merged 1 commit into
mainfrom
feat/crewmate-worker-worktrees
Oct 25, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
feat/crewmate-worker-worktrees

Conversation

@buluoray

@buluoray buluoray commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Each crewmate's worker works in the crewmate's own git worktree and branch, so two crewmates handed the same repository never edit one checkout or one branch.

With Crewmate 2.0 (#23010) every crewmate hands its work to a worker, but the worker runs wherever its session's project points, usually the repository's shared checkout. Two crewmates working in one repository then edit the same working tree and commit on whatever branch happens to be checked out, so their changes mix and one can move the branch under the other.

Why it matters

Anyone running more than one crewmate on a repository gets tangled commits and lost or overwritten work, and has to keep each crewmate out of the others' way by hand. A worktree per crewmate keeps each one's changes on its own branch, and the user's own checkout stays as they left it.

Not a goal

  • A switch to turn worktrees off, or a choice of where they live beyond the fallback below.
  • Enforcing branch names: the crew/<slug>/ prefix is asked for in the prompt, not refused by the gateway.
  • Merging, pushing or opening pull requests from a crewmate's branch.
  • Worktrees for the crewmate's conductor chat or for ordinary (non-crewmate) sessions.
  • Dynamic capabilities (its own pull request).

What changed (motivation → approach → change)

Goal → the gateway does only the three git jobs a model cannot do for itself (make the worktree, start the worker in it, remove it with the crewmate) → every other git step is the worker's own, asked for in its prompt. Git runs through the follow-up card's sandboxed runner (handlers/worktree._run_git: no hooks, no fsmonitor, checkout filters refused), and the turn reuses the existing project/binding re-capture.

  1. One worktree per crewmate per repository (kiro_crew/crewmate_worktree.py, ensure). It lives at <crewmate workspace>/worktrees/<crewmate slug>/<repo>-<hash> (one rule, no fallback), on crew/<slug>/<repo>, cut the first time from the repository's default branch (refs/remotes/origin/HEAD, else refs/heads/main or master, else HEAD; full ref names, so a main tag is never the base) and reused as it is after that, on whatever branch the worker checked out. Reuse is read from git worktree list; there is no index. A folder deleted by hand is pruned and made again on the branch; a folder git does not register is refused. A name the cleaning changed (app+tools, app.lock, app..tools) or one over 40 characters keeps a digest and is a legal ref component. A repository that contains the crewmate's own workspace gets none. The folder is made through no-follow descriptors from the workspace down; a worktree add that fails or times out removes that folder by descriptor only while its (dev, ino) still matches, then drops the branch it cut.
  2. The worker starts there (dashboard/crewmate_worktree_scope.py, called from chat_turn/turn_admission.py after the Profile Permissions are seeded and before the provider is claimed). For a kirocrew-mate-worker record with the crewmate's id, the repository comes from the paths the message names (absolute, ~, or drive paths only on Windows; a quoted one read whole; a file not made yet read from its nearest folder), then from the slot's project. slot.project moves to the matching subfolder of the worktree (the root when that subfolder is a link out, or holds a control character or bracket). A path in the worktree it already runs in, or in that repository's own checkout, moves nothing. A running session takes the same deferred reset set_project uses. A git failure, or no sandbox, leaves the turn on its project. The repository's aws.project_profiles binding still applies in the worktree: crewmate_worktree.source_path, called from aws_project_profiles.resolve_project_binding, matches a cwd in a crewmate worktree as the same path in the checkout (<workspace>/worktrees/<slug>/app-<hash>/src as /repos/app/src). It asks git each time and remembers nothing, so it holds after a restart, and applies only when git's work-tree top sits at worktrees/<slug>/, has the name path_for gives that repository, and is registered by it. Anything else, a repository cloned inside the worktree included, matches as itself; a path with no worktrees folder runs no git.
  3. It goes with the crewmate (dashboard/agent_admin/crew_removal.py → remove_for_member). Each folder under <workspace>/worktrees/<slug> that git registers as a worktree is removed with git worktree remove (never --force). One with uncommitted changes, ignored files or a checkout filter is kept and logged, and so is anything git does not register. Branches stay; the repositories' own checkouts are never touched.
  • Moved to the prompt (crewmate_prompts.json, worker.principles): commit in the worktree and never in the repository's own checkout, name further branches under crew/<crewmate>/, rebase onto the default branch yourself when you need its changes, and run git merge-tree --write-tree <base> HEAD before a push. The conductor's worker line says the worker works in its own worktree under the crew/ prefix.

Spec: docs/system-specs/modules/crew-mode.md ("Each crewmate works in a git worktree of its own", and the conductor/worker prompt lines), docs/system-specs/modules/config.md ("Crewmate worktrees" under Project AWS profiles).

Backwards compatibility

Compatible: a worker turn whose paths are in no git repository runs where it did before, and a git failure leaves the turn on its current project. The gateway never rewrites a worker's branch after cutting it. Conductor chats and non-crewmate sessions are untouched. aws.project_profiles matches every path outside a crewmate worktree exactly as before.

Removes nothing: the change adds worktrees, prompt lines and a cleanup step on crewmate deletion; the cleanup removes only worktrees git registers under the crewmate's own folder, and keeps any with uncommitted or ignored files.

Tests

  • test/test_crewmate_worktree.py, job 1: two crewmates (also two sharing a workspace) get separate worktrees and branches; a worktree is reused as the worker left it, a topic branch included, and another crewmate's path maps to your own; a path in no repository, a bare repository and a repository containing the workspace get none; a not-yet-made file maps to its nearest folder; a linked or untracked subfolder gives the root and a bracketed one is not the project; app.lock, app..tools, .hidden pass git check-ref-format --branch; names that clean alike and long slugs stay apart; the cut is main while the checkout sits on a feature branch, origin/HEAD when there is one, HEAD with no default branch, and never a main tag; a folder deleted by hand is rebuilt on its branch with its commit; an unregistered folder, an unlistable worktree table, a checkout filter and an empty repository are refused; a timed-out add leaves no branch or folder, a failed add keeps a branch it did not cut, a failed add with the parent swapped for a link to the crew home removes nothing there, and a linked worktrees/<slug> gets nothing made through it; quoted paths with spaces, drive paths, the path cap, and paths on different drives.
  • Job 2: only a crewmate's worker is scoped; message paths are tried before the project and a refused or failing one is skipped; no sandbox ends the lookup; a ~ path into its own worktree or a path in the repository's checkout moves nothing and resets nothing; a brief naming a new file in another repository moves the turn there; a move resets a running session and survives a failed push; a drive path on a POSIX gateway whose cwd is a checkout makes nothing. End to end, a real worker turn through chat_runner._run_chat claims its provider with cwd in the crewmate's worktree. AWS profile: a mapped repository's binding applies at the worktree root, in a subfolder and in a not-yet-made folder, and the workspace's own binding never stands in for it; an unmapped repository's worktree gets the caller's env back untouched; a worktree an earlier gateway made (plain git, nothing in this process) is still mapped, and again after it is reused; a nested clone, an unregistered look-alike folder, a copied .git, a worktree outside worktrees/<slug>/, one moved to a wrong name and one beside the repository all match as themselves; an ordinary path runs no git and no sandbox leaves the path alone; SessionManager.get_or_create in the worktree starts the agent with the repository's profile. Dropping the source mapping, the registration, name or layout check, the no-git filter or the subfolder mapping each turns a test red.
  • Job 3: removal removes a clean worktree and keeps a dirty one, an unregistered folder, a link, one holding only ignored files, one whose repository names a filter, a locked one and any when git fails; branches and the user's checkout stay; remove_for_member never raises. End to end, api_kirocrew_agent_delete removes the clean crewmate's worktree and keeps the dirty one.
  • Re-pinned: test/test_agent_refactor_spec_bytes.py (the worker spec's prompt) and the all-met prompt preview golden (the two changed lines only).

Proof: not provable -- other: new feature, the new tests exercise code this pull request adds

Manual verification

N/A — unit coverage drives real git in temporary repositories, through the sandboxed runner where the host has a backend and plain git otherwise (the Linux CI runners have none, so the tests no longer skip there; Windows keeps the skip). Run locally both ways, with TMPDIR outside the crew data home.

Related Issues

Follows #23010.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners October 23, 2026 21:22
@buluoray
buluoray requested a review from CrysisDeu October 23, 2026 21:22
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision b5c398b2d08f433d7aca4f25210482938a066caf touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ human override accepted

@buluoray overrode this lane for b5c398b2d08f433d7aca4f25210482938a066caf via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of b5c398b2d08f433d7aca4f25210482938a066caf — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the gateway does only the git steps a model can't (make, start in, remove the worktree), and every fallible path leaves the turn on its old project.

Notes

  • In resolve_worker_project, the first path in the message that sits inside a git repository decides the repository (candidates = [*cw.paths_in(message), ...]). A brief that names a reference repository before the target one will start the worker in a worktree of the wrong repository. The worker can still edit the target through its absolute path, which writes into the shared checkout. Consider trying the slot's project first, or preferring the repository the most named paths fall in.
  • resolve_project_binding now asks git on every lookup of a path under a worktrees folder. If that lookup sits on a per-tool-call path, bound it or measure it.

[DESIGN-REVIEWED] b5c398b

Description read

[DESCRIPTION-READ] f628e61897e4a801544d14b3572e19be6d095fd73efd6aa28596e2f95c904b04

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed b5c398b2d08f433d7aca4f25210482938a066caf — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] b5c398b

Verdict parsed from the review's SHA-scoped output markers for commit b5c398b2d08f433d7aca4f25210482938a066caf.

False positive or not applicable? A repository writer can comment:
/ai-review override fable b5c398b2d08f433d7aca4f25210482938a066caf false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)

GPT 6.1 flagged blocking issues on b5c398b2d08f433d7aca4f25210482938a066caf; Opus 5.5 adjudication downgraded every one of them. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents.

This comment is updated in place on each push.

Review details

BLOCKING -- src/kiro_crew/dashboard/crewmate_worktree_scope.py:95 -- Defer relocated turns until the worktree reset succeeds

slot._pending_reset_history_key = key
Trigger: A warm worker in repository A has a running child when the owner sends a steer-mode message naming repository B. api_chat_send permits this turn; _turn_admit relocates the slot, but _consume_pending_reset defers for the attached child and get_or_create returns A's existing provider.
Outcome: B's task is dispatched with A's cwd and bound AWS profile, while the slot displays B's worktree. The later fallback to client.cwd corrects the turn's context, not its execution location.
Anchor: defect
Fix: Keep the relocated message queued until the reset succeeds and the provider starts in the selected worktree, without terminating attached children.

[BLOCK-MERGE-DOWNGRADED] b5c398b
[GPT-REVIEWED] b5c398b

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

F1: DOWNGRADE. Harm rung LOW–MEDIUM. Three things must all be true at once: a warm worker provider (crewmate_worktree_scope.py:94), sub-agent children attached at the pre-acquire consume (session_reset.py:160), and a turn message naming a different repository (crewmate_worktree_scope.py:54). When that happens the flag stays armed, and the existing fallback at turn_admission.py:975-980 makes the turn describe the directory the process actually runs in, client.cwd. The retry task at session_reset.py:62-73 then lands the reset once the children detach, so the next turn self-corrects. The project-to-profile binding is documented as not an isolation boundary (aws_project_profiles.py docstring), so this is not a governance bypass.
The real fix holds a turn in the queue until the children detach and the reset succeeds. That is a new ordering contract between turn admission, the queue and the reset retry, across lifetimes that can last any length of time. It would exist only for this path, and it would diverge from the deferral set_project already uses. Its cost is higher than the rare, self-correcting harm it prevents.

[ADJUDICATION] b5c398b2d08f433d7aca4f25210482938a066caf total=1 uphold=0 downgrade=1
DOWNGRADE F1 src/kiro_crew/dashboard/crewmate_worktree_scope.py:95 reason=disproportionate-remedy
[GPT-ADJUDICATED] b5c398b2d08f433d7aca4f25210482938a066caf

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b5c398b2d08f433d7aca4f25210482938a066caf false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 23, 2026
@buluoray
buluoray force-pushed the feat/crewmate-worker-worktrees branch from 682cfa7 to 4cea3db Compare October 23, 2026 21:57
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 23, 2026
@buluoray
buluoray force-pushed the feat/crewmate-worker-worktrees branch from 4cea3db to 963e809 Compare October 23, 2026 22:59
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 23, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles 963e809: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default, so parallel workers never edit the same checkout.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for 963e8094002da814e541769ad90c342bdecfcac7.

Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default, so parallel workers never edit the same checkout.

This decision applies only to this commit. A new push requires a new judgment.

@buluoray
buluoray force-pushed the feat/crewmate-worker-worktrees branch from 963e809 to dc4f0ff Compare October 24, 2026 01:02
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 24, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles dc4f0ff: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; an unpushed, clean branch with no PR is the only one rebased automatically.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a legacy release (class legacy) for the first-principles AI finding on dc4f0ffa2235fd46a136f0b40b93f0c0e92f3116.

Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; an unpushed, clean branch with no PR is the only one rebased automatically.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

This override used the old command without a class. It was recorded as class legacy, and the old command stops working on 2026-12-09. Name a class from now on. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a legacy release (class legacy) for the first-principles AI finding on 981f0ba1d28e989731180480fde7058de9faa64f.

Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

This override used the old command without a class. It was recorded as class legacy, and the old command stops working on 2026-12-09. Name a class from now on. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles e13fe6d: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a legacy release (class legacy) for the first-principles AI finding on e13fe6dd9188408f665b07497168d7af14dfd5f2.

Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

This override used the old command without a class. It was recorded as class legacy, and the old command stops working on 2026-12-09. Name a class from now on. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles f402ddd: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a legacy release (class legacy) for the first-principles AI finding on f402dddc4fe50c151798318c84c8ea939dc1ab51.

Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

This override used the old command without a class. It was recorded as class legacy, and the old command stops working on 2026-12-09. Name a class from now on. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles 5208954: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a legacy release (class legacy) for the first-principles AI finding on 520895448e1984112a112ae4bcc8734031749925.

Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

This override used the old command without a class. It was recorded as class legacy, and the old command stops working on 2026-12-09. Name a class from now on. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles eada1cc: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a legacy release (class legacy) for the first-principles AI finding on eada1cc8e54a75a4f1e1c9f969433d0dcb543c25.

Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

This override used the old command without a class. It was recorded as class legacy, and the old command stops working on 2026-12-09. Name a class from now on. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles fc74e16: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a legacy release (class legacy) for the first-principles AI finding on fc74e164732eec08068daf356c3ee83f4c03469a.

Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree by default; the gateway never rebases a crewmate branch and only tells the worker, read-only, how far the default branch moved.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

This override used the old command without a class. It was recorded as class legacy, and the old command stops working on 2026-12-09. Name a class from now on. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles f64edbe product-shape: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree and branch by default. The gateway only makes that worktree, points the worker's turn at it, and removes it with the crewmate; it never rebases, and the worker manages its own branches and rebases from its prompt.

@github-actions

Copy link
Copy Markdown
Contributor

AI-review override not recorded: product-shape is not a release class. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

Two crewmates handed one repository shared its checkout: one committed the
other's edits, or landed a commit on the branch the other had checked out.
The gateway now does only what a model cannot do for itself:

1. Gives each crewmate one worktree per repository, at
   <workspace>/worktrees/<slug>/<repo>-<hash>, on crew/<slug>/<repo>, cut
   from the default branch the first time and reused after that.
2. Points a worker turn's slot.project at it, from the paths the turn names
   or the slot's project, before the provider is claimed. The repository's
   aws.project_profiles binding still applies there: a cwd in a crewmate
   worktree is matched as the same path in the checkout, asked of git each
   time (source_path), so it holds after a restart.
3. Removes those worktrees when the crewmate is deleted, keeping one with
   uncommitted or ignored files; branches and the repository's own checkout
   are never touched.

Git runs through the follow-up card's sandboxed runner (no hooks, no
fsmonitor, checkout filters refused), and the folder is made and unwound
through no-follow descriptors. Topic branches, rebasing onto the default
branch and checking with merge-tree before a push are the worker's own,
asked for in worker.principles.
@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles b5c398b product-shape: Product decision by the maintainer (buluoray): every crewmate worker runs in its own git worktree and branch by default. The gateway only makes that worktree, points the worker's turn at it, and removes it with the crewmate; it never rebases, and the worker manages its own branches and rebases from its prompt.

@github-actions

Copy link
Copy Markdown
Contributor

AI-review override not recorded: product-shape is not a release class. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@buluoray

Copy link
Copy Markdown
Contributor Author

Owner decision (buluoray), recorded for the First Principles review.

Every crewmate's worker runs in its own git worktree and branch by default, with no switch to turn it off. This is a deliberate product shape, decided by the maintainer; there is no separate RFC for it.

The gateway keeps only what a model cannot do for itself:

  1. make one worktree per crewmate per repository, on crew/<crewmate>/<repo>;
  2. point the worker's turn at that worktree before it starts;
  3. remove the worktree when the crewmate is removed (kept, never forced, when it holds uncommitted work; branches are never deleted).

It never rebases a crewmate branch. Branch naming beyond the first branch, rebasing onto the default branch and pre-push conflict checks are the worker's job, from its prompt.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles b5c398b owner-decision: Per-crewmate worker worktrees are the maintainer's product decision, recorded at #23563 (comment) ; the gateway only makes the worktree, points the turn at it and removes it with the crewmate.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a owner-decision release (class owner-decision) for the first-principles AI finding on b5c398b2d08f433d7aca4f25210482938a066caf.

Per-crewmate worker worktrees are the maintainer's product decision, recorded at #23563 (comment) ; the gateway only makes the worktree, points the turn at it and removes it with the crewmate.

This decision applies only to this commit. A new push requires a new judgment.

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.

3 participants