Skip to content

Proposal: Decouple isolated workspace jobs from PROCESS #415

Description

@johnlanni

Proposal: Decouple isolated workspace jobs from PROCESS

Metadata

  • Change Name: decouple-workspace-jobs-from-process
  • External Issue ID: N/A

Background

PR #410 makes Proposal, Design, Implement, TASK, and PROCESS optional planning aids and removes them from merge authority. It also establishes the bounded single-writer path: a coordinator may implement directly or delegate to exactly one code-writing child without creating PROCESS when no isolation, ownership, recovery, or integration need exists.

The remaining execution-safety implementation still couples Git worktree allocation, lease recovery, path ownership, result completion, integration, and cleanup to a typed PROCESS comment and PROCESS id. That coupling was useful when every non-trivial implementation was required to create a PROCESS DAG, but it is now the wrong abstraction boundary. A developer who needs only an isolated worktree must not have to manufacture remote planning artifacts, relationships, lifecycle comments, receipts, or merge evidence.

The underlying Git protections remain valuable: exact-base worktrees prevent accidental mixing with existing changes; ownership checks constrain worker commits; one result commit gives the coordinator a clean integration boundary; and a small local lease makes interrupted work recoverable. This proposal retains those mechanisms while removing PROCESS as their identity and storage authority.

Goals

  1. Introduce a minimal runtime workspace job that can prepare, inspect, complete, integrate, reconcile, and clean an isolated implementation worktree without an Issue, TASK, or PROCESS id.
  2. Keep the bounded single-writer current-checkout path as the default and use an isolated job only for a concrete filesystem, ownership, recovery, or integration need.
  3. Store only the local/session facts required for safe execution: job id, repository identity, exact base, worktree/branch, optional owned paths and runtime namespace, lifecycle state, result commit, and integrated revision.
  4. Make one worker result commit the portable handoff. Ordinary Git checks and provider-native review/checks remain the only delivery validation; workspace jobs never become merge authority.
  5. Let Runner recover session-owned workspace jobs without reading or mutating PROCESS comments.
  6. Retain historical PROCESS Workspace data as explicit read-only audit history.

Scope

Direct path

  • One code writer works in the selected implementation checkout.
  • A coordinator may delegate to exactly one code-writing child while performing no concurrent code writes.
  • Read-only investigation and review children require neither PROCESS nor workspace jobs.
  • Ordinary Git and configured provider checks validate the result.

Isolated workspace job

  • A job is selected only for concurrent code writers, protection of pre-existing work, enforced path ownership, restartable cross-session handoff, dependency-ordered integration, or explicitly requested isolation.
  • Preparation binds one opaque job id to an exact base and creates a unique writable worktree and branch under the current runner/coordinator session.
  • Completion validates cleanliness, result ancestry, optional DCO policy, optional owned paths, and focused commands configured for that job.
  • Integration revalidates the expected integration head and applies the result commit under the existing repository integration lock.
  • Reconciliation derives state from the local registry and Git truth. Cleanup is explicit and refuses dirty, unintegrated, linked, unowned, or ambiguous resources.
  • Non-filesystem runtime namespaces remain optional job metadata for ports, temporary directories, containers, caches, or databases.

PROCESS boundary

  • PROCESS remains an optional issue-native planning and handoff artifact.
  • A PROCESS may reference a workspace job for navigation, but neither artifact owns or mutates the other and no reference is required.
  • Creating, completing, integrating, or cleaning a job performs zero Issue, comment, relationship, evidence, rationale, or merge-state writes.
  • Managed workspace state is removed from newly generated PROCESS bodies and prompts after cutover.

Compatibility decision

  • ANSWER-415001 selects immediate retirement. In the cutover release, the existing PROCESS-bound workflow workspace prepare|inspect|complete|integrate|reconcile|cleanup commands return deprecated_workflow before flags that can trigger auth, Issue access, local lease changes, Git worktree mutation, or provider access.
  • Historical PROCESS Workspace data remains available only through explicit read-only audit paths. No compatibility execution window or permanent PROCESS-to-job adapter is introduced.

Non-Goals

  • Removing Git worktrees or replacing Git conflict detection.
  • Providing a per-child operating-system security sandbox; native children continue to share the coordinator's outer sandbox unless the runtime provides a stronger boundary.
  • Making workspace jobs mandatory for a single writer.
  • Persisting machine-specific paths or job lifecycle into GitHub, self-hosted Issues, PR/MR comments, evidence collections, or provider snapshots.
  • Using a workspace job, result commit, lease, or focused test as merge approval.
  • Replacing provider-native review, required checks, expected-head conditional merge, or post-merge Issue reconciliation.
  • Automatically deleting user-created branches, worktrees, or uncertain resources.

Key Constraints

  • The runtime abstraction is a local/session execution tool, not a new workflow phase or durable evidence model.
  • The selected repository and exact base come from trusted runner/coordinator state, never Issue prose or a child assertion.
  • Direct and isolated paths produce code with the same provider-facing review/check/merge semantics.
  • Job recovery must be idempotent and conservative; uncertainty retains resources rather than deleting them.
  • Existing user changes and unrelated worktrees remain untouched.
  • The change must reduce PROCESS-specific production dependencies and generated guidance rather than adding a second permanent orchestration stack.

Related Specs Analysis

  • process-workspace-isolation currently binds leases, worktrees, completion, integration, and recovery to PROCESS. It should be rewritten around optional runtime workspace jobs while retaining its Git safety invariants.
  • process-dag-execution should retain optional PROCESS planning but delegate filesystem isolation to the runtime job contract. PROCESS selection and job selection become independent decisions.
  • workflow-safety-and-readiness should retain conflict-aware planning mutations and conservative workspace recovery while removing PROCESS comments from job recovery authority.
  • workflow-identity-and-sessions should keep coding-agent identity out of authority and identify workspace jobs only by opaque runtime/session ids.
  • runner-source-and-credentials, runner session clone retention, and sandbox writable-root rules must allow session-owned job pools without exposing other sessions.
  • Proposal Proposal: PROCESS worktree isolation #175 and Design Design: PROCESS worktree isolation design #176 remain the source of the valuable Git isolation, ownership, integration-CAS, and conservative cleanup invariants. This proposal changes their PROCESS-coupled identity and persistence boundary rather than discarding those protections.
  • Proposal Proposal: Reduce delivery to intent, checks, review, and merge #405, Design Design: Replace workflow evidence gates with one provider-bound merge predicate #407, and PR feat: replace final evidence gates with provider merge authority #410 establish that planning and historical artifacts cannot decide merge readiness and that a single code-writing child does not require PROCESS. This proposal completes the execution-layer subtraction implied by that model.

Existing Assumptions Impact

  • A writable isolated workspace is no longer evidence that a PROCESS exists.
  • PROCESS id is no longer the workspace selector, lease identity, runtime namespace root, or recovery key.
  • Remote ### Workspace sections are no longer required for new isolated execution and cannot be updated by workspace lifecycle commands.
  • A worker result commit remains an execution boundary but does not imply TASK/PROCESS completion, review approval, or merge readiness.
  • Runner retains one coordinator integration checkout and one session-scoped job pool; it does not create a nested ACPX session per job.
  • Historical managed PROCESS workspaces remain interpretable through audit readers but do not get translated into new jobs.

Acceptance

  1. A clean bounded implementation can use one child in the current checkout without creating TASK, PROCESS, lease, receipt, or remote lifecycle state.
  2. An isolated job can be prepared and completed from an exact base without an issue number or PROCESS id.
  3. Two concurrent writable jobs never share a worktree or branch, and overlapping owned paths or exclusive runtime resources are rejected or serialized.
  4. Completion rejects dirty worktrees, unexpected commits, unowned changed paths, failed required commands, and result ancestry drift.
  5. Integration rejects expected-head drift and unvalidated results, and it never changes planning or merge authority.
  6. Restart reconciliation recovers a session-owned prepared or completed job from local registry plus Git truth without remote Issue reads or writes.
  7. Cleanup preserves dirty, unintegrated, linked, unowned, or ambiguous resources and removes only the exact owner-authorized job resources.
  8. Generated Skills, Runner prompts, docs, and Implement templates select PROCESS only for planning and select workspace jobs independently for execution isolation.
  9. New workspace-job lifecycle operations perform zero Issue, relationship, evidence, rationale, review, verification, finalization, or provider mutations.
  10. Existing provider-native review/check/merge behavior and the direct single-writer path remain unchanged.
  11. Historical PROCESS Workspace data remains readable through explicit audit paths.
  12. The selected compatibility policy is enforced with tests proving either zero-write deprecation or the exact bounded legacy window.

Confirmation Checklist

  • The proposal keeps useful Git isolation and deletes PROCESS coupling.
  • The default path remains single-writer and requires no new lifecycle.
  • Workspace jobs are execution-local and never merge authority.
  • Runner recovery remains conservative and session-scoped.
  • Historical data remains readable without migration.
  • ANSWER-415001 selects immediate zero-write retirement for existing PROCESS workspace commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions