REQ-FUN-094

Project-level worktree provisioning when project has a code_repo_url

ID
REQ-FUN-094
Category
Functional Requirements
Status
approved
Priority
P0
Created
2026-05-10T18:37:49.783Z
Approved
2026-05-10T18:38:53.797Z
Updated
2026-05-10T18:38:53.797Z

What

System SHALL support project-level worktree provisioning when a project has a code_repo_url and worktree_strategy != 'none'.

Why

Inspired by AoE; isolates each agent's work to a per-claim branch, enabling deterministic sign-off-then-merge gating. See arch_decision_worktree_per_claim memory.

How

When item.claimed lifecycle hook fires for a project with worktree_strategy in {on_claim, per_claim}, WorktreeProvisioner creates a worktree on branch aipm/item-<board_item_id>; failure rolls back the claim atomically.

Done when

A claim of a board item on a code-bearing project triggers worktree creation on a branch named aipm/item-<item_id>; non-code projects (code_repo_url IS NULL) skip provisioning entirely.

Out of scope

Forge-managed worktrees (GitHub branch API) — server-local only for MVP.

established project management guidelines Mapping

Primary Knowledge Area
Resource Management
Secondary KA
Integration Management
Primary Process Group
Executing
established project management guidelines Deliverable
Resource Management Plan

Worktree provisioning per project is physical-resource preparation tied to project setup.