Introducing a new way to review your PRs.

Read the announcement

stablyai / orca

Orca lets you run a fleet of bots with your own subscription (e.g. Claude Code, Grok, Agy, Codex). Available on desktop, mobile and remote runtime.

View on GitHub

34 documents · Updated Nov 20, 2026

docs / source-control-ai-workflows

Source-control AI workflows

Source-control AI workflows help an engineer turn Git and hosted-review context into a commit message, branch name, review draft, or guided repair task. They prepare a result or an agent session for review by the user. They do not silently commit, push, or create a hosted review.

Workflow scope

Source-control AI works around a worktree. A worktree is the local directory and branch that supplies the Git state and receives any agent work. The actions split into text generation and agent launch.

Action categories

Text actions return content for an editable source-control field. Launch actions start an agent with a task that may inspect or change the worktree.

CategoryMain actionsResult
Text generationCommit message, pull-request details, branch nameText or review fields for user review
Recovery and repairCommit and push failure fixes, check fixes, comment resolution, conflict resolutionAn agent task in the worktree

The shared action catalog defines the common names, variables, templates, and saved recipes. This keeps an action tied to the same behavior in the source-control surface and in settings.

References: src/…/source-control-ai-actions.ts• L9-79 src/…/source-control-action-recipe-options.ts• L22-56

Text generation

Text generation uses source-control state as context and places the result into an editable field. The user can select an agent and command settings for one run, or save those choices for later use.

Commit messages

Commit-message generation turns staged files and the staged patch into a Git message. The normal result has an imperative subject of no more than 72 characters and an optional body that explains the reason for the change.

The context can include the current branch and a linked issue. Large patches are clipped at file and line boundaries. If the patch is too large, the staged-file summary remains as a safer fallback. A late result does not replace text that the user entered while generation was running.

The agent and model run on the worktree's owning host. That host can be local, WSL, or remote. The same host rules apply to model discovery and generation, so a model shown for one host does not silently run on another.

Generation checks that the worktree belongs to the repository whose settings are being used. This prevents repository-specific AI settings from crossing worktree or host boundaries.

References: src/…/commit-message-generation.ts• L6-77 src/…/commit-message-prompt.ts• L5-18 src/…/filesystem-source-control-ai-targets.ts• L64-183 src/…/use-commit-message-generation.ts• L83-199

Pull-request details

Pull-request generation fills the base branch, title, body, and draft state for a hosted review. It compares the branch with its base by using commits, changed files, and a patch. It also sees the current review fields so existing template sections can remain in place.

The result is applied only to the worktree and branch that started the request. Missing fields keep their current values. Manual edits made while generation is pending take precedence over generated values.

Create Review can generate details automatically when its fields still contain seed values and usable AI settings exist. If the user edited a field, AI is disabled, no agent is configured, or generation fails, submission uses the fields shown to the user instead of replacing them with an uncertain result.

For GitHub and GitLab workspaces linked to Jira, the review title can include the Jira issue key captured from the worktree's owning host. A workspace switch does not change the captured title context. See Jira work management for the wider work-item flow.

References: src/…/use-pull-request-generation.ts• L34-67 src/…/use-pull-request-generation.ts• L82-193 src/…/use-create-review-composer.ts• L133-195 src/…/use-hosted-review-creation.ts• L78-168 src/…/use-create-pr-intent-review.ts• L95-180 src/…/source-control-create-pr-intent-flow.test.ts• L86-153

Branch names

Branch-name generation uses the first request that created the workspace and the first available agent response. It names an Orca-created branch from the original task rather than from the current Git diff.

The generated text must produce a non-empty safe branch slug. If a saved model is not available, the generation path can retry a supported agent with its default model. A failed or empty result remains a clear failure instead of becoming a branch name.

References: src/…/source-control-ai-action-variables.ts• L24-30 src/…/source-control-generation-plan.ts• L18-50 src/…/commit-message-text-generation-branch-name.test.ts• L8-158

Output contracts

Each text action has a bounded output shape that the source-control flow can check. Commit messages become subject and body text. Pull-request details become the four review fields: base, title, body, and draft.

The cleaners tolerate common agent noise such as fences or a short status line. They do not make an invalid result authoritative. Existing review content remains the fallback when a generated field is missing or unsafe. Failure text is shortened and cleaned before it reaches a toast or saved operation state.

References: src/…/commit-message-agent-output.ts• L1-29 src/…/commit-message-agent-output.ts• L91-224 src/…/pull-request-generation.ts• L83-103 src/…/source-control-agent-failure.ts• L108-182

Prompt context

Prompt context is the bridge between source-control state and an AI agent. Each action has a built-in prompt. A saved command template can add guidance by using placeholders that Orca replaces with known values.

Context variables

The available variables depend on the action. The built-in prompt is exposed as basePrompt, so a recipe can add guidance without rebuilding the action's safety and context rules.

ActionMain context
Commit messageBranch, staged files, staged patch, linked issue
Pull-request detailsBranch, base branch, current fields, commits, changed files, patch, linked issue
Branch nameFirst workspace prompt, initial agent message
Recovery and repairBuilt-in failure or repair prompt

An unresolved variable stays visible instead of becoming an empty command. A linked issue is added only when it is valid. GitHub issue context is not supplied for a GitLab-linked workspace.

References: src/…/source-control-ai-action-variables.ts• L8-30 src/…/source-control-ai-action-variables.ts• L37-93 src/…/source-control-ai-actions.ts• L187-204

Prompt templates

The launch dialog lets the user choose an agent, edit agent arguments, and change the prompt template before starting. Variable chips show the values that can be added. The default prompt remains available through {basePrompt}.

The launch form warns when a custom template omits {basePrompt}. The user can save the selected launch recipe globally or for the current repository. Text-generation dialogs provide the same choice for text-action defaults.

References: src/…/SourceControlAgentActionDialogForm.tsx• L150-269 src/…/SourceControlAgentActionDialogForm.tsx• L288-347 src/…/text-generation-dialog-form.tsx• L223-325

Recipes and settings

A recipe is the saved choice of agent, prompt template, agent arguments, and related launch preferences for one source-control action. A recipe can be global or scoped to one repository.

Setting precedence

The effective action combines product defaults, global settings, older commit-message settings, and repository overrides. A repository value wins for the field that it defines. An unset repository value inherits the global recipe.

Text actions use agents that support a single non-interactive response. Recovery actions use the wider interactive agent set because they may inspect and edit the worktree. The same resolution supplies the agent and prompt choices used by the source-control dialogs and by automatic actions.

References: src/…/source-control-ai-operation-policy.ts• L35-103 src/…/source-control-ai-operation-policy.ts• L105-147 src/…/source-control-ai-operation-policy.ts• L150-209 src/…/source-control-ai.ts• L114-241

Recipe persistence

The dialogs edit a draft before saving. A global save updates the global action recipe. A repository save writes the repository override for that action. The repository editor can show whether an action inherits the global recipe or overrides it.

Legacy commit-message settings remain readable during migration to action recipes. Explicit action values win, so an older settings write does not erase a newer per-action choice.

References: src/…/source-control-ai-recipe-save.ts• L22-39 src/…/source-control-ai-recipe-save.ts• L145-223 src/…/source-control-ai-legacy-reconciliation.ts• L88-218 src/…/RepositorySourceControlAiActionRows.tsx• L1-220 src/…/source-control-action-recipe-match.test.ts• L27-204

Model selection

Model selection belongs to both the source-control action and the execution host. A local model choice does not become the model for an SSH host. If a host-specific choice is missing, the resolver uses the applicable action choice and then the agent default.

The selected thinking level is accepted only when the chosen model supports it. Dynamic discovery can add valid models for the selected host. An empty or unsupported probe falls back to a known catalog when one exists. A generation request can also recover from an agent rejecting a saved model by retrying without that model when the agent supports a safe default.

References: src/…/source-control-ai-model-selection.ts• L14-25 src/…/source-control-ai-model-selection.ts• L85-170 src/…/commit-message-model-discovery.ts• L41-244 src/…/commit-message-model-discovery-policy.ts• L30-104 src/…/commit-message-text-generation-branch-name.test.ts• L129-158

Action selection and launch

Action selection checks the saved recipe, the target host, agent availability, and prompt delivery before it starts work. The active worktree owner remains the target even when the user changes focus.

Text-generation planning

For a text action, the workflow resolves the recipe, renders the template against the action context, and checks whether the command can run. A custom command is represented as a binary and argument list without a shell. A {prompt} placeholder sends the prompt as one argument; without it, the prompt uses standard input.

Planning checks the command shape and limits. The actual launch still determines whether the binary, account, path, and host setup work. Commit-message and pull-request requests have separate cancellation paths. Cancellation settles the requested operation without stopping a separate generation lane, and it does not accept output that arrives after cancellation.

References: src/…/source-control-ai-command-template.ts• L147-163 src/…/source-control-ai-command-template.ts• L267-310 src/…/commit-message-plan.ts• L237-335 src/…/source-control-local-process.ts• L46-214 src/…/commit-message-text-generation-cancellation.test.ts• L209-297

Launch-agent selection

For a launch action, the workflow uses the saved action agent when it is enabled and usable on the target host. It then considers the configured default and the first enabled detected agent. A saved agent that is disabled or unavailable does not silently become another tool.

The dialog can preview several delivery routes. The prompt can go into the first turn, an editable draft, pasted text, or a submit step after the terminal is ready. Some agents open as structured chat and do not use CLI arguments.

The selected action is captured when Start is pressed. A launch can be accepted before prompt delivery finishes. Once accepted, closing the dialog hides the controls and disables Cancel and duplicate Start until the launch settles. Host changes that can have side effects wait for prompt delivery.

Structured-agent creation has a similar boundary: a refusal before the session attaches proves that no session was created and can be retried safely. A failure at or after attach remains unknown because a session may already exist, so the client must not treat it as a safe duplicate-free retry.

References: src/…/source-control-launch-agent-selection.ts• L16-40 src/…/source-control-agent-action-plan.ts• L32-212 src/…/SourceControlAgentActionDialogForm.tsx• L31-70 src/…/runSourceControlAgentActionStart.ts• L104-260 src/…/source-control-action-dialog-accepted.test.tsx• L19-84 src/…/structured-agent-session-precommit-refusal.ts• L37-72 src/…/structured-agent-session-precommit-refusal.test.ts• L133-238

Workflow sequence

The shared path moves from source-control state to either an editable result or an agent session.

flowchart TD
    A[Source-control action] --> B[Resolve global and repository recipe]
    B --> C{Worktree belongs to repository?}
    C -->|No| X[Reject target]
    C -->|Yes| D{Text action?}
    D -->|Yes| E[Gather Git and review context]
    E --> F[Render template and plan generation]
    F --> G[Generate and validate result]
    G --> H[Place result in editable field]
    D -->|No| I[Build recovery or repair prompt]
    I --> J[Select usable agent on target host]
    J --> K[Plan prompt delivery]
    K --> L[Launch agent in worktree]
    L --> M[Settle accepted or failed delivery]

References: src/…/source-control-ai.ts• L114-241 src/…/useSourceControlAgentActionDialog.ts• L75-158 src/…/useSourceControlAgentActionStart.ts• L170-233 src/…/runSourceControlAgentActionStart.ts• L179-260

Recovery and repair

Recovery actions turn a failed or incomplete source-control state into a focused agent task. The prompt includes the current worktree, relevant operation state, and failure output. It asks the agent to preserve unrelated work and report what remains.

Commit and push failures

Commit recovery includes the staged files, attempted message, and hook or lint output. Push recovery first separates local hook-style failures from authentication, permission, network, and non-fast-forward failures. Only a local hook-style failure becomes a push repair prompt.

Both prompts tell the agent to inspect git status first. They forbid broad cleanup, hook bypasses, unrelated commits, pushes, and hosted-review creation. The result is a repair handoff rather than a hidden retry.

References: src/…/source-control-commit-failure.ts• L60-75 src/…/source-control-commit-failure.ts• L157-223 src/…/source-control-push-failure.ts• L68-116 src/…/source-control-push-failure.ts• L205-272

Checks and review comments

The checks action starts an agent from failed hosted-review checks. It can use the worktree attached to the review or the workspace linked to the review item. Review-comment resolution starts from selected unresolved comments. Both actions reuse the saved launch recipe and the target host's agent choices.

References: src/…/use-checks-panel-check-and-review-actions.tsx• L1-260 src/…/use-checks-panel-comment-resolution.tsx• L1-220 src/…/recovery-launch.ts• L87-218

Conflict resolution

Conflict recovery explains the active Git operation and the files in conflict. It asks the agent to inspect both sides, preserve valid manual work, stage resolved paths, and continue the current merge, rebase, or cherry-pick.

Before launch, recovery checks whether Orca already has a Git mutation in flight for the same worktree. A running operation blocks the launch. A canceled check does not show a stale error, and an older host without the probe can still fail later during launch.

The prompt does not tell the agent to choose one side wholesale or to abort the operation. A review-level conflict asks the agent to verify the live worktree before changing it.

References: src/…/source-control-conflict-prompts.ts• L78-186 src/…/source-control-recovery-admission.ts• L7-37 src/…/source-control-recovery-admission.test.ts• L18-41 src/…/use-ai.ts• L160-215

Primary action behavior

The source-control surface selects one main action from local Git state, remote state, and hosted-review state. AI review preparation is additive. It can prepare or create a review when eligible, but it does not replace the local commit, pull, push, or sync action.

Action eligibility

The decision protects in-flight work and unresolved conflicts first. It then considers staged changes, the commit message, branch publication, upstream divergence, and hosted-review eligibility. The review header stays stable while checks load, but the action is disabled when a prerequisite blocks it and is not offered for an existing review or an unsupported provider.

Create Review performs a final check in the repository-owning process. It verifies the current branch, clean user work, upstream state, review existence, provider support, authentication, and the submitted base. A failed review lookup blocks creation because it could hide an existing review. A local-only base is not accepted at create time.

The decision uses the full host-owned worktree state. A capped visible status list cannot make AI review or commit actions assume that all changes are visible. The broader Git status and mutation rules are described in Git operations and status, and provider behavior belongs to Source control and reviews.

References: src/…/source-control-primary-action-decision.ts• L20-257 src/…/source-control-primary-action.ts• L26-82 src/…/primary-create-pr-intent-action.ts• L64-197 src/…/use-action-model.ts• L91-237 src/…/hosted-review-creation.ts• L46-103

Hosted-review preparation

The Create Review intent can prepare a branch, generate review details when configured, and submit the hosted review without first opening the full composer. It uses the same eligibility rules as direct creation.

The intent starts with seed fields and can add Jira title context for GitHub and GitLab. It stops if the branch changes during preparation, if generated fields are invalid, or if the worktree no longer belongs to the request. Existing reviews are linked instead of created again. A review created before a later stacked-review error is also linked before the error is shown.

The one-click path uses the eligibility result's remote-validated base and keeps a user-selected draft choice from being downgraded by generated fields. It treats a change to the same worktree's branch or base as a conflict, while navigation to another worktree does not cancel the original intent.

References: src/…/primary-create-pr-intent-action.ts• L225-319 src/…/use-create-pr-intent-review.ts• L69-280 src/…/use-hosted-review-creation.ts• L138-229 src/…/source-control-create-pr-intent-flow.test.ts• L10-153

Hosted-review state

Hosted-review eligibility uses provider-specific review terms and authentication. GitHub produces pull requests. GitLab produces merge requests. Other supported providers use their own connection and token checks.

The base branch comes from a remote-resolvable candidate when possible. A local-only candidate can help display and plan the form, but final creation still requires a remote base. Provider checks run on the host that owns the repository and account.

Hosted-review reads and writes use the resolved execution host for the repository. The read scope also includes the execution options, working directory, and inherited environment that can change the code-host command or credentials. This keeps a result from one host, repository account, or command context from answering for another. A change in admission tier does not create a separate read identity.

When a recent review page is full and does not contain the active review, the system performs a separate active-review read before it falls back to the newest recent review. A merged review without a linked issue number is hidden when its head does not match the current branch head. Active worktree reads use faster refresh pacing, while failed discovery stays unavailable rather than becoming a false “no review” result.

Manual review links also follow the push target. A fork branch uses the fork project or owner in the link, and the link is suppressed when the target cannot be resolved safely.

References: src/…/hosted-review-creation.ts• L105-241 src/…/hosted-review.ts• L46-145 src/…/hosted-review-execution-host-routing.test.ts• L264-435 src/…/hosted-review-project-account.test.ts• L42-145 src/…/branch-review-selection.ts• L1-29 src/…/code-host-read-execution-scope.ts• L3-18 src/…/source-control-manual-review-url.test.ts• L4-77

Workspace relationship

AI generation and recovery carry the worktree identity and repository-owning host through the workflow. A focused-host change or tab switch cannot redirect an in-flight request to a different runtime. The agent session continues in the workspace that supplied the Git state.

Request continuity

Commit-message and pull-request generation keep records keyed to the worktree and relevant branch context. A canceled or failed request does not become a successful draft. A late result is ignored when it no longer matches the active request, and generated commit text does not overwrite user input.

Pull-request generation records can restore a completed result after a tab or worktree change. Restoration waits until the composer has initialized its seed fields. Field edits remain authoritative.

Hosted-review creation keeps the clicked branch and worktree as its operation target. It reveals checks and opens the review only when that worktree is foreground at completion. Agent launch mutations use the same continuity rule and replay a durable result instead of sending the same request twice after an uncertain response.

References: src/…/use-pull-request-generation.ts• L62-80 src/…/use-pull-request-generation.ts• L98-193 src/…/use-create-review-composer.ts• L156-195 src/…/SourceControl.pr-generation-records.test.ts• L34-150 src/…/structured-agent-session-mutation-plans.ts• L38-139

Change checklist

When these files or sections are changed, remember to consider these:

  • Add or rename an action in the shared action IDs, labels, default template, variable registry, settings editor, and persistence normalization together.
  • Keep text-action agent support aligned with the non-interactive capability registry. Keep recovery actions on the interactive-agent selection path.
  • When a placeholder or custom command rule changes, update its context producer, command plan, tokenizer, and visible recipe guidance. Preserve the no-shell boundary and the {prompt} standard-input fallback.
  • When a model or thinking choice changes, keep static defaults, dynamic discovery, host-scoped persistence, and capability data aligned. Do not let a local choice answer for an SSH host.
  • When changing launch delivery, keep terminal, editable draft, submit-after-ready, and structured-chat routes aligned with the dialog's preview and acceptance state.
  • When changing cancellation, preserve separate text-generation lanes and the distinction between hiding a dialog, canceling delivery, and stopping the host process.
  • When changing generated output, update the prompt contract and its cleaner or parser. Pull-request fields must preserve existing template content and safe fallbacks.
  • When changing recipe precedence or saving, check global settings, repository overrides, legacy migration, inherit/override display, and the recipe-match rules for explicit clears.
  • When changing recovery prompts, keep operation-specific safety rules, failure classification, recovery admission, and the final status report in agreement.
  • When changing hosted-review eligibility or intent creation, check provider authentication, review lookup failure handling, remote-base validation, branch-change detection, existing-review linking, and execution-host routing together.
  • When changing hosted-review reads or writes, keep the resolved execution host, provider account, branch head, execution scope, cache identity, and active-refresh policy aligned.
  • When changing review selection, keep the recent-page fallback, active-review lookup, current-head check, and merged-review hiding rules aligned.
  • When changing generation or launch routing, preserve the original worktree owner and host for cancellation, completion, and remote execution.
  • When changing agent-session mutation plans, keep operation fingerprints, replay results, send acceptance, cancellation behavior, and durable journal writes consistent so retries cannot duplicate provider actions.
  • When changing structured-agent creation, preserve the boundary between a definite pre-attach refusal and an unknown failure after attach.

Important failure modes

TriggerConsequenceGuard
A template omits {basePrompt}The agent misses the built-in source-control contextWarn in the launch form and keep the omission explicit
A saved agent is disabled or unavailable on the target hostThe action could start with an unexpected tool or fail lateRequire a usable saved choice and otherwise ask for another agent
A custom command cannot be parsed safelyThe action has no valid executable planParse without a shell and reject invalid tokenization
A model probe is empty, malformed, or unavailableThe picker loses choices or shows a model the host cannot runBound probe output and use a valid static fallback when available
A saved model is rejected by the selected agentGeneration fails even though the agent's default model could runRetry without the saved model only on the supported fallback path
A worktree is checked through the wrong repository or hostSettings or Git context can apply to another checkoutVerify worktree ownership and route through its owning runtime
An argv-delivery prompt is too largeThe host rejects the process before generationUse standard-input delivery or stay within the host limit
Generation times out or exceeds its output capNo draft is accepted and remote outcome may remain uncertainStop local work, bound output, and use uncertain wording for unknown remote state
A launch is accepted but prompt delivery failsThe tab or reversible launch state can exist without the requested taskDelay host writes until delivery and report the aborted launch
A structured-agent failure occurs after attachRetrying can create a duplicate sessionTreat the outcome as unknown and use the durable operation result
Orca has a Git mutation in flight during recoveryThe repair agent can overlap with Orca's own Git operationBlock recovery after the worktree-scoped admission check
A push failure is remote authentication, permission, network, or non-fast-forwardThe error is offered as the wrong local hook repair taskClassify remote failures before creating a recovery prompt
Generated review fields are malformed or staleThe wrong review can receive contentValidate the bounded fields and key records by repository, worktree, and branch
The user edits review fields while generation is pendingGenerated values can erase the user's intended reviewApply generated values only to untouched seed fields
Review lookup fails or the submitted base is local-onlyCreation can duplicate a review or fail at the providerBlock or fail closed until lookup and remote-base checks pass
A review result is reused across hosts or saved accountsThe source-control surface can show or act on another repository account's reviewKey lookup and cache state by execution host, account, repository, branch, head, working directory, and environment
A full recent-review page omits the active reviewThe source-control surface can fall back to an older or unrelated reviewRead the active review before using the recent-page fallback
A merged implicit review has a different head from the current branchThe surface can show a stale merged review as activeHide it unless the review head matches the current branch head
The branch changes during unattended review preparationDetails can describe a different branchStop the intent run and ask the user to retry
A real untracked file appears at a configured shared-link pathReview creation can omit user workIgnore only a confirmed Orca-owned link and fail closed otherwise
A capped status list hides changesRow-based staging can leave work unstaged while the UI claims successUse host-wide staging and keep the cap visible
A discard runs during an editor autosaveThe delayed save can recreate discarded workQuiesce matching saves before discard and notify the editor afterward
A client retries after losing a mutation responseThe provider can receive the same session request twiceRecompute the operation fingerprint and replay the durable result

Key files

FileWhy to read it
src/…/source-control-ai-actions.tsDefines the shared action vocabulary, templates, and variables.
src/…/source-control-ai.tsResolves effective source-control AI settings for an operation.
src/…/source-control-ai-operation-policy.tsDefines scope, precedence, enablement, and hosted-review defaults.
src/…/source-control-ai-command-template.tsExplains prompt templates, placeholder handling, and the no-shell boundary.
src/…/source-control-ai-model-selection.tsShows action- and host-scoped model selection.
src/…/SourceControlAgentActionDialog.tsxShows the launch dialog boundary between source-control context and agent launch.
src/…/SourceControlAgentActionDialogForm.tsxShows agent choice, prompt editing, delivery warnings, and recipe saving.
src/…/runSourceControlAgentActionStart.tsShows launch acceptance, prompt delivery, failure handling, and close behavior.
src/…/recovery-launch.tsShows default recovery-agent selection and launch admission.
src/…/text-generation-dialog-form.tsxShows text-action choice, planning, and default saving.
src/…/commit-message-text-generation.tsShows the shared entry points for commit messages, review fields, and branch names.
src/…/commit-message-model-discovery.tsShows host-aligned model discovery and bounded results.
src/…/source-control-agent-failure.tsShows output parsing, empty-result handling, and user-facing failure results.
src/…/filesystem-source-control-ai-targets.tsShows repository ownership and local, WSL, and remote target resolution.
src/…/use-pull-request-generation.tsShows worktree-scoped review generation records and cancellation.
src/…/use-create-review-composer.tsShows editable review fields, seed protection, and generation hydration.
src/…/use-hosted-review-creation.tsShows direct and stacked review creation and existing-review linking.
src/…/use-create-pr-intent-review.tsShows unattended review preparation, generation, and foreground-safe reveal.
src/…/hosted-review-creation.tsShows final hosted-review eligibility and fail-closed creation checks.
src/…/hosted-review.tsShows execution-host routing, account-aware review lookup, and cache use.
src/…/branch-review-selection.tsShows active-review selection and stale merged-review hiding.
src/…/code-host-read-execution-scope.tsShows the execution context used to keep code-host reads separate.
src/…/runtime-hosted-review-commands.tsShows how runtime review reads and writes resolve the repository target and execution host.
src/…/runtime-review-command-surface.tsShows the public runtime surface that binds provider review queries and mutations.
src/…/source-control-primary-action.tsAdapts primary Git and hosted-review decisions for the source-control surface.
src/…/source-control-recovery-admission.tsDefines the worktree-scoped guard against overlapping Orca Git work.
src/…/structured-agent-session-precommit-refusal.tsDefines safe refusal handling before a structured agent session can attach.
src/…/source-control-tree.tsDefines the shared source-control tree used to represent changed-file areas.