From c1664afc992e5a39b1b788bc62426457ce860fcd Mon Sep 17 00:00:00 2001 From: chenquan Date: Fri, 25 Sep 2026 19:12:56 +0800 Subject: [PATCH] docs: sync main specs and archive five completed changes Archive whitelist-source-copy, remove-open-command, user-owned-task-config, narrow-taskflow-workspace-core, and default-remote-base-timestamped-branches into openspec/changes/archive/ and reconcile openspec/specs/ with the current code surface (create/delete/version/skill commands only). - apply remove-open-command deltas (never synced; drops open-command behavior from 11 capability specs) - keep whitelist-source-copy requirement texts as authoritative where older deltas overlap - fix residual open-command wording left in the envelope requirement and three spec purposes - archive default-remote-base-timestamped-branches without syncing: its deltas describe the retired init command and origin/HEAD-based defaults that the final implementation deliberately avoided --- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../remote-default-based-workspaces/spec.md | 0 .../specs/repository-append/spec.md | 0 .../task-workspace-initialization/spec.md | 0 .../tasks.md | 0 .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/aggregate-status-validation/spec.md | 0 .../specs/development-tool-sessions/spec.md | 0 .../specs/repository-append/spec.md | 0 .../task-configuration-validation/spec.md | 0 .../task-workspace-initialization/spec.md | 0 .../specs/taskflow-multirepo-skill/spec.md | 0 .../tasks.md | 0 .../.openspec.yaml | 0 .../2026-09-25-remove-open-command}/design.md | 0 .../proposal.md | 0 .../specs/aggregate-status-validation/spec.md | 0 .../specs/cli-operational-safety/spec.md | 0 .../specs/cli-output-contract/spec.md | 0 .../cross-task-source-coordination/spec.md | 0 .../specs/development-tool-sessions/spec.md | 0 .../specs/e2e-command-flow/spec.md | 0 .../spec.md | 0 .../reporting-validation-readiness/spec.md | 0 .../task-configuration-validation/spec.md | 0 .../specs/taskflow-multirepo-skill/spec.md | 0 .../specs/worktree-reconciliation/spec.md | 0 .../2026-09-25-remove-open-command}/tasks.md | 0 .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/e2e-command-flow/spec.md | 0 .../specs/repository-append/spec.md | 0 .../task-workspace-initialization/spec.md | 0 .../specs/taskflow-multirepo-skill/spec.md | 0 .../specs/worktree-reconciliation/spec.md | 0 .../tasks.md | 0 .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/cli-output-contract/spec.md | 0 .../specs/e2e-command-flow/spec.md | 0 .../specs/environment-preflight/spec.md | 0 .../specs/resumable-action-execution/spec.md | 0 .../task-workspace-initialization/spec.md | 0 .../specs/taskflow-multirepo-skill/spec.md | 0 .../specs/whitelist-source-copy/spec.md | 0 .../specs/worktree-reconciliation/spec.md | 0 .../specs/worktree-start/spec.md | 0 .../tasks.md | 0 .../specs/aggregate-status-validation/spec.md | 2 +- openspec/specs/cli-operational-safety/spec.md | 13 ++--- openspec/specs/cli-output-contract/spec.md | 16 +++--- .../cross-task-source-coordination/spec.md | 2 +- .../specs/development-tool-sessions/spec.md | 41 +++++++-------- openspec/specs/e2e-command-flow/spec.md | 37 ++++++++++---- openspec/specs/environment-preflight/spec.md | 6 ++- .../spec.md | 2 +- .../reporting-validation-readiness/spec.md | 6 +-- .../specs/resumable-action-execution/spec.md | 6 ++- .../task-configuration-validation/spec.md | 4 +- .../task-workspace-initialization/spec.md | 6 ++- .../specs/taskflow-multirepo-skill/spec.md | 19 +++++-- openspec/specs/whitelist-source-copy/spec.md | 51 +++++++++++++++++++ .../specs/worktree-reconciliation/spec.md | 23 +++------ openspec/specs/worktree-start/spec.md | 30 +++++++---- 70 files changed, 172 insertions(+), 92 deletions(-) rename openspec/changes/{default-remote-base-timestamped-branches => archive/2026-09-25-default-remote-base-timestamped-branches}/.openspec.yaml (100%) rename openspec/changes/{default-remote-base-timestamped-branches => archive/2026-09-25-default-remote-base-timestamped-branches}/design.md (100%) rename openspec/changes/{default-remote-base-timestamped-branches => archive/2026-09-25-default-remote-base-timestamped-branches}/proposal.md (100%) rename openspec/changes/{default-remote-base-timestamped-branches => archive/2026-09-25-default-remote-base-timestamped-branches}/specs/remote-default-based-workspaces/spec.md (100%) rename openspec/changes/{default-remote-base-timestamped-branches => archive/2026-09-25-default-remote-base-timestamped-branches}/specs/repository-append/spec.md (100%) rename openspec/changes/{default-remote-base-timestamped-branches => archive/2026-09-25-default-remote-base-timestamped-branches}/specs/task-workspace-initialization/spec.md (100%) rename openspec/changes/{default-remote-base-timestamped-branches => archive/2026-09-25-default-remote-base-timestamped-branches}/tasks.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/.openspec.yaml (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/design.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/proposal.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/specs/aggregate-status-validation/spec.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/specs/development-tool-sessions/spec.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/specs/repository-append/spec.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/specs/task-configuration-validation/spec.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/specs/task-workspace-initialization/spec.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/specs/taskflow-multirepo-skill/spec.md (100%) rename openspec/changes/{narrow-taskflow-workspace-core => archive/2026-09-25-narrow-taskflow-workspace-core}/tasks.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/.openspec.yaml (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/design.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/proposal.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/aggregate-status-validation/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/cli-operational-safety/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/cli-output-contract/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/cross-task-source-coordination/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/development-tool-sessions/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/e2e-command-flow/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/readiness-and-initialization-integrity/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/reporting-validation-readiness/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/task-configuration-validation/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/taskflow-multirepo-skill/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/specs/worktree-reconciliation/spec.md (100%) rename openspec/changes/{remove-open-command => archive/2026-09-25-remove-open-command}/tasks.md (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/.openspec.yaml (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/design.md (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/proposal.md (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/specs/e2e-command-flow/spec.md (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/specs/repository-append/spec.md (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/specs/task-workspace-initialization/spec.md (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/specs/taskflow-multirepo-skill/spec.md (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/specs/worktree-reconciliation/spec.md (100%) rename openspec/changes/{user-owned-task-config => archive/2026-09-25-user-owned-task-config}/tasks.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/.openspec.yaml (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/design.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/proposal.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/cli-output-contract/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/e2e-command-flow/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/environment-preflight/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/resumable-action-execution/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/task-workspace-initialization/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/taskflow-multirepo-skill/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/whitelist-source-copy/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/worktree-reconciliation/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/specs/worktree-start/spec.md (100%) rename openspec/changes/{whitelist-source-copy => archive/2026-09-25-whitelist-source-copy}/tasks.md (100%) create mode 100644 openspec/specs/whitelist-source-copy/spec.md diff --git a/openspec/changes/default-remote-base-timestamped-branches/.openspec.yaml b/openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/.openspec.yaml similarity index 100% rename from openspec/changes/default-remote-base-timestamped-branches/.openspec.yaml rename to openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/.openspec.yaml diff --git a/openspec/changes/default-remote-base-timestamped-branches/design.md b/openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/design.md similarity index 100% rename from openspec/changes/default-remote-base-timestamped-branches/design.md rename to openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/design.md diff --git a/openspec/changes/default-remote-base-timestamped-branches/proposal.md b/openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/proposal.md similarity index 100% rename from openspec/changes/default-remote-base-timestamped-branches/proposal.md rename to openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/proposal.md diff --git a/openspec/changes/default-remote-base-timestamped-branches/specs/remote-default-based-workspaces/spec.md b/openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/specs/remote-default-based-workspaces/spec.md similarity index 100% rename from openspec/changes/default-remote-base-timestamped-branches/specs/remote-default-based-workspaces/spec.md rename to openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/specs/remote-default-based-workspaces/spec.md diff --git a/openspec/changes/default-remote-base-timestamped-branches/specs/repository-append/spec.md b/openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/specs/repository-append/spec.md similarity index 100% rename from openspec/changes/default-remote-base-timestamped-branches/specs/repository-append/spec.md rename to openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/specs/repository-append/spec.md diff --git a/openspec/changes/default-remote-base-timestamped-branches/specs/task-workspace-initialization/spec.md b/openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/specs/task-workspace-initialization/spec.md similarity index 100% rename from openspec/changes/default-remote-base-timestamped-branches/specs/task-workspace-initialization/spec.md rename to openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/specs/task-workspace-initialization/spec.md diff --git a/openspec/changes/default-remote-base-timestamped-branches/tasks.md b/openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/tasks.md similarity index 100% rename from openspec/changes/default-remote-base-timestamped-branches/tasks.md rename to openspec/changes/archive/2026-09-25-default-remote-base-timestamped-branches/tasks.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/.openspec.yaml b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/.openspec.yaml similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/.openspec.yaml rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/.openspec.yaml diff --git a/openspec/changes/narrow-taskflow-workspace-core/design.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/design.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/design.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/design.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/proposal.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/proposal.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/proposal.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/proposal.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/specs/aggregate-status-validation/spec.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/aggregate-status-validation/spec.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/specs/aggregate-status-validation/spec.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/aggregate-status-validation/spec.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/specs/development-tool-sessions/spec.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/development-tool-sessions/spec.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/specs/development-tool-sessions/spec.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/development-tool-sessions/spec.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/specs/repository-append/spec.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/repository-append/spec.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/specs/repository-append/spec.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/repository-append/spec.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/specs/task-configuration-validation/spec.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/task-configuration-validation/spec.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/specs/task-configuration-validation/spec.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/task-configuration-validation/spec.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/specs/task-workspace-initialization/spec.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/task-workspace-initialization/spec.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/specs/task-workspace-initialization/spec.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/task-workspace-initialization/spec.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/specs/taskflow-multirepo-skill/spec.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/taskflow-multirepo-skill/spec.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/specs/taskflow-multirepo-skill/spec.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/specs/taskflow-multirepo-skill/spec.md diff --git a/openspec/changes/narrow-taskflow-workspace-core/tasks.md b/openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/tasks.md similarity index 100% rename from openspec/changes/narrow-taskflow-workspace-core/tasks.md rename to openspec/changes/archive/2026-09-25-narrow-taskflow-workspace-core/tasks.md diff --git a/openspec/changes/remove-open-command/.openspec.yaml b/openspec/changes/archive/2026-09-25-remove-open-command/.openspec.yaml similarity index 100% rename from openspec/changes/remove-open-command/.openspec.yaml rename to openspec/changes/archive/2026-09-25-remove-open-command/.openspec.yaml diff --git a/openspec/changes/remove-open-command/design.md b/openspec/changes/archive/2026-09-25-remove-open-command/design.md similarity index 100% rename from openspec/changes/remove-open-command/design.md rename to openspec/changes/archive/2026-09-25-remove-open-command/design.md diff --git a/openspec/changes/remove-open-command/proposal.md b/openspec/changes/archive/2026-09-25-remove-open-command/proposal.md similarity index 100% rename from openspec/changes/remove-open-command/proposal.md rename to openspec/changes/archive/2026-09-25-remove-open-command/proposal.md diff --git a/openspec/changes/remove-open-command/specs/aggregate-status-validation/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/aggregate-status-validation/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/aggregate-status-validation/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/aggregate-status-validation/spec.md diff --git a/openspec/changes/remove-open-command/specs/cli-operational-safety/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/cli-operational-safety/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/cli-operational-safety/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/cli-operational-safety/spec.md diff --git a/openspec/changes/remove-open-command/specs/cli-output-contract/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/cli-output-contract/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/cli-output-contract/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/cli-output-contract/spec.md diff --git a/openspec/changes/remove-open-command/specs/cross-task-source-coordination/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/cross-task-source-coordination/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/cross-task-source-coordination/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/cross-task-source-coordination/spec.md diff --git a/openspec/changes/remove-open-command/specs/development-tool-sessions/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/development-tool-sessions/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/development-tool-sessions/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/development-tool-sessions/spec.md diff --git a/openspec/changes/remove-open-command/specs/e2e-command-flow/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/e2e-command-flow/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/e2e-command-flow/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/e2e-command-flow/spec.md diff --git a/openspec/changes/remove-open-command/specs/readiness-and-initialization-integrity/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/readiness-and-initialization-integrity/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/readiness-and-initialization-integrity/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/readiness-and-initialization-integrity/spec.md diff --git a/openspec/changes/remove-open-command/specs/reporting-validation-readiness/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/reporting-validation-readiness/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/reporting-validation-readiness/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/reporting-validation-readiness/spec.md diff --git a/openspec/changes/remove-open-command/specs/task-configuration-validation/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/task-configuration-validation/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/task-configuration-validation/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/task-configuration-validation/spec.md diff --git a/openspec/changes/remove-open-command/specs/taskflow-multirepo-skill/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/taskflow-multirepo-skill/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/taskflow-multirepo-skill/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/taskflow-multirepo-skill/spec.md diff --git a/openspec/changes/remove-open-command/specs/worktree-reconciliation/spec.md b/openspec/changes/archive/2026-09-25-remove-open-command/specs/worktree-reconciliation/spec.md similarity index 100% rename from openspec/changes/remove-open-command/specs/worktree-reconciliation/spec.md rename to openspec/changes/archive/2026-09-25-remove-open-command/specs/worktree-reconciliation/spec.md diff --git a/openspec/changes/remove-open-command/tasks.md b/openspec/changes/archive/2026-09-25-remove-open-command/tasks.md similarity index 100% rename from openspec/changes/remove-open-command/tasks.md rename to openspec/changes/archive/2026-09-25-remove-open-command/tasks.md diff --git a/openspec/changes/user-owned-task-config/.openspec.yaml b/openspec/changes/archive/2026-09-25-user-owned-task-config/.openspec.yaml similarity index 100% rename from openspec/changes/user-owned-task-config/.openspec.yaml rename to openspec/changes/archive/2026-09-25-user-owned-task-config/.openspec.yaml diff --git a/openspec/changes/user-owned-task-config/design.md b/openspec/changes/archive/2026-09-25-user-owned-task-config/design.md similarity index 100% rename from openspec/changes/user-owned-task-config/design.md rename to openspec/changes/archive/2026-09-25-user-owned-task-config/design.md diff --git a/openspec/changes/user-owned-task-config/proposal.md b/openspec/changes/archive/2026-09-25-user-owned-task-config/proposal.md similarity index 100% rename from openspec/changes/user-owned-task-config/proposal.md rename to openspec/changes/archive/2026-09-25-user-owned-task-config/proposal.md diff --git a/openspec/changes/user-owned-task-config/specs/e2e-command-flow/spec.md b/openspec/changes/archive/2026-09-25-user-owned-task-config/specs/e2e-command-flow/spec.md similarity index 100% rename from openspec/changes/user-owned-task-config/specs/e2e-command-flow/spec.md rename to openspec/changes/archive/2026-09-25-user-owned-task-config/specs/e2e-command-flow/spec.md diff --git a/openspec/changes/user-owned-task-config/specs/repository-append/spec.md b/openspec/changes/archive/2026-09-25-user-owned-task-config/specs/repository-append/spec.md similarity index 100% rename from openspec/changes/user-owned-task-config/specs/repository-append/spec.md rename to openspec/changes/archive/2026-09-25-user-owned-task-config/specs/repository-append/spec.md diff --git a/openspec/changes/user-owned-task-config/specs/task-workspace-initialization/spec.md b/openspec/changes/archive/2026-09-25-user-owned-task-config/specs/task-workspace-initialization/spec.md similarity index 100% rename from openspec/changes/user-owned-task-config/specs/task-workspace-initialization/spec.md rename to openspec/changes/archive/2026-09-25-user-owned-task-config/specs/task-workspace-initialization/spec.md diff --git a/openspec/changes/user-owned-task-config/specs/taskflow-multirepo-skill/spec.md b/openspec/changes/archive/2026-09-25-user-owned-task-config/specs/taskflow-multirepo-skill/spec.md similarity index 100% rename from openspec/changes/user-owned-task-config/specs/taskflow-multirepo-skill/spec.md rename to openspec/changes/archive/2026-09-25-user-owned-task-config/specs/taskflow-multirepo-skill/spec.md diff --git a/openspec/changes/user-owned-task-config/specs/worktree-reconciliation/spec.md b/openspec/changes/archive/2026-09-25-user-owned-task-config/specs/worktree-reconciliation/spec.md similarity index 100% rename from openspec/changes/user-owned-task-config/specs/worktree-reconciliation/spec.md rename to openspec/changes/archive/2026-09-25-user-owned-task-config/specs/worktree-reconciliation/spec.md diff --git a/openspec/changes/user-owned-task-config/tasks.md b/openspec/changes/archive/2026-09-25-user-owned-task-config/tasks.md similarity index 100% rename from openspec/changes/user-owned-task-config/tasks.md rename to openspec/changes/archive/2026-09-25-user-owned-task-config/tasks.md diff --git a/openspec/changes/whitelist-source-copy/.openspec.yaml b/openspec/changes/archive/2026-09-25-whitelist-source-copy/.openspec.yaml similarity index 100% rename from openspec/changes/whitelist-source-copy/.openspec.yaml rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/.openspec.yaml diff --git a/openspec/changes/whitelist-source-copy/design.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/design.md similarity index 100% rename from openspec/changes/whitelist-source-copy/design.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/design.md diff --git a/openspec/changes/whitelist-source-copy/proposal.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/proposal.md similarity index 100% rename from openspec/changes/whitelist-source-copy/proposal.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/proposal.md diff --git a/openspec/changes/whitelist-source-copy/specs/cli-output-contract/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/cli-output-contract/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/cli-output-contract/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/cli-output-contract/spec.md diff --git a/openspec/changes/whitelist-source-copy/specs/e2e-command-flow/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/e2e-command-flow/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/e2e-command-flow/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/e2e-command-flow/spec.md diff --git a/openspec/changes/whitelist-source-copy/specs/environment-preflight/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/environment-preflight/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/environment-preflight/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/environment-preflight/spec.md diff --git a/openspec/changes/whitelist-source-copy/specs/resumable-action-execution/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/resumable-action-execution/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/resumable-action-execution/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/resumable-action-execution/spec.md diff --git a/openspec/changes/whitelist-source-copy/specs/task-workspace-initialization/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/task-workspace-initialization/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/task-workspace-initialization/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/task-workspace-initialization/spec.md diff --git a/openspec/changes/whitelist-source-copy/specs/taskflow-multirepo-skill/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/taskflow-multirepo-skill/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/taskflow-multirepo-skill/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/taskflow-multirepo-skill/spec.md diff --git a/openspec/changes/whitelist-source-copy/specs/whitelist-source-copy/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/whitelist-source-copy/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/whitelist-source-copy/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/whitelist-source-copy/spec.md diff --git a/openspec/changes/whitelist-source-copy/specs/worktree-reconciliation/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/worktree-reconciliation/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/worktree-reconciliation/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/worktree-reconciliation/spec.md diff --git a/openspec/changes/whitelist-source-copy/specs/worktree-start/spec.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/worktree-start/spec.md similarity index 100% rename from openspec/changes/whitelist-source-copy/specs/worktree-start/spec.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/specs/worktree-start/spec.md diff --git a/openspec/changes/whitelist-source-copy/tasks.md b/openspec/changes/archive/2026-09-25-whitelist-source-copy/tasks.md similarity index 100% rename from openspec/changes/whitelist-source-copy/tasks.md rename to openspec/changes/archive/2026-09-25-whitelist-source-copy/tasks.md diff --git a/openspec/specs/aggregate-status-validation/spec.md b/openspec/specs/aggregate-status-validation/spec.md index 3883a4b..67c41a2 100644 --- a/openspec/specs/aggregate-status-validation/spec.md +++ b/openspec/specs/aggregate-status-validation/spec.md @@ -3,7 +3,7 @@ Define that Taskflow does not provide lifecycle status, validation commands, or persisted readiness history. ## Requirements ### Requirement: Do not provide lifecycle reporting or validation -Taskflow MUST NOT provide status or validate commands, persist validation reports, or infer task readiness from historical state. Current create/open/delete action facts MUST be reported directly by those commands. +Taskflow MUST NOT provide status or validate commands, persist validation reports, or infer task readiness from historical state. Current create/delete action facts MUST be reported directly by those commands. #### Scenario: Removed reporting command - **WHEN** a user invokes status or validate diff --git a/openspec/specs/cli-operational-safety/spec.md b/openspec/specs/cli-operational-safety/spec.md index 31786e4..92b29c8 100644 --- a/openspec/specs/cli-operational-safety/spec.md +++ b/openspec/specs/cli-operational-safety/spec.md @@ -6,22 +6,15 @@ Define path containment, process streaming, managed-worktree inspection, and sta The CLI MUST reject task IDs that are not a single safe path component before resolving configuration or writing task files. #### Scenario: Reject traversal task ID -- **WHEN** a user passes `../other-task` to create, open, or any task-loading command +- **WHEN** a user passes `../other-task` to create, delete, or any task-loading command - **THEN** the command returns a configuration error and writes no file outside the tasks root -### Requirement: Run interactive tools with streams and environment -When command streams are supplied, the runner MUST execute the child without output capture conflicts and MUST apply explicit environment overlays. Non-streaming commands MUST retain captured stdout/stderr behavior. - -#### Scenario: Launch Claude with instruction overlay -- **WHEN** Claude additional instructions are enabled -- **THEN** the child process receives `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` - ### Requirement: Validate and report actual managed repositories -Create and open MUST inspect configured sources and targets as real Git worktrees. Open MUST report current worktree identity conflicts and create MUST report whether each target will be created or reused. Dirty worktrees MUST not be rejected solely for being dirty. +Create MUST inspect configured sources and targets as real Git worktrees, report whether each target will be created or reused, and surface current worktree identity conflicts. Dirty worktrees MUST not be rejected solely for being dirty. #### Scenario: Dirty managed worktree - **WHEN** a configured worktree has an uncommitted file while source and branch identity remain valid -- **THEN** open succeeds and create reports the target as reusable +- **THEN** create reports the target as reusable ### Requirement: Honor fetch and failure state Create MUST use locally resolvable base refs, MUST not fetch implicitly, and MUST report a partial execution failure without recording a persistent failure state. A later create MUST reconcile from live Git facts. diff --git a/openspec/specs/cli-output-contract/spec.md b/openspec/specs/cli-output-contract/spec.md index e052108..925a3f6 100644 --- a/openspec/specs/cli-output-contract/spec.md +++ b/openspec/specs/cli-output-contract/spec.md @@ -3,22 +3,26 @@ Define stable human and machine output and exit-code behavior for the CLI. ## Requirements ### Requirement: Emit a stable machine-readable result envelope -Commands supporting `--json` MUST emit valid JSON with `schemaVersion`, `command`, `ok`, `taskID` when known, `data`, `warnings`, and structured `errors`. JSON output MUST contain no ANSI control sequences. The supported operational commands are create, open, and delete. +Commands supporting `--json` MUST emit valid JSON with `schemaVersion`, `command`, `ok`, `taskID` when known, `data`, `warnings`, and structured `errors`. JSON output MUST contain no ANSI control sequences. The supported operational commands are create and delete. #### Scenario: Render a configuration failure as JSON -- **WHEN** create, open, or delete encounters invalid configuration +- **WHEN** create or delete encounters invalid configuration - **THEN** it emits a result envelope with `ok: false` and at least one structured error code, message, and optional repository and hint #### Scenario: Render create action facts as JSON - **WHEN** create runs in dry-run or execute mode -- **THEN** its data identifies the resolved configuration and each repository's create, reuse, or conflict action +- **THEN** its data identifies the resolved configuration and, for each repository, the worktree action, the source-copy action with its `.worktreeinclude` pattern count, and after execute the copied entry and byte totals + +#### Scenario: Render an unmatched-pattern warning +- **WHEN** execute reports a literal `.worktreeinclude` pattern that matched no source path +- **THEN** the warning appears in both text and JSON renderings with the pattern and repository name #### Scenario: Render delete action facts as JSON - **WHEN** delete runs in dry-run or execute mode - **THEN** its data identifies each owned worktree removal, local branch deletion, and task-directory cleanup action ### Requirement: Map expected failures to stable exit codes -The CLI MUST use exit code 0 for success, 1 for execution failure including a launched child process that exits non-zero, 2 for argument or configuration errors, 3 for environment-preflight failure, 4 for partial completion after Git mutation begins, 5 for deterministic worktree/branch, task-lock, or source-branch-lock conflict, and 6 for external-tool incompatibility. Validation failure is not a supported command result. +The CLI MUST use exit code 0 for success, 1 for execution failure, 2 for argument or configuration errors, 3 for environment-preflight failure, 4 for partial completion after Git mutation begins, and 5 for deterministic worktree/branch, task-lock, or source-branch-lock conflict. Validation failure is not a supported command result. #### Scenario: Return a lock conflict exit code - **WHEN** create cannot acquire its task lock @@ -29,8 +33,8 @@ The CLI MUST use exit code 0 for success, 1 for execution failure including a la - **THEN** execute-mode create reports `SOURCE_BRANCH_LOCKED` and exits with code 5 before mutation ### Requirement: Preserve facts across output modes -Text and JSON renderings of a create, open, or delete result MUST express the same success state, warnings, errors, and operational action facts, even though their layouts differ. +Text and JSON renderings of a create or delete result MUST express the same success state, warnings, errors, and operational action facts, even though their layouts differ. #### Scenario: Render equivalent command outcomes -- **WHEN** create, open, or delete is rendered in text mode and JSON mode +- **WHEN** create or delete is rendered in text mode and JSON mode - **THEN** both renderings express the same success state, warnings, structured errors, and action data diff --git a/openspec/specs/cross-task-source-coordination/spec.md b/openspec/specs/cross-task-source-coordination/spec.md index ce89df3..226e86d 100644 --- a/openspec/specs/cross-task-source-coordination/spec.md +++ b/openspec/specs/cross-task-source-coordination/spec.md @@ -3,7 +3,7 @@ Coordinate mutating creates that use the same local Git source branch across task roots. ## Requirements ### Requirement: Coordinate execute-mode source branches across tasks -Before execute-mode create mutates taskflow.yaml or creates a worktree, the CLI MUST acquire a local exclusive lock for every configured `(canonical Git common directory, branch)` pair. Locks MUST be stored beneath that common directory, acquired in deterministic sorted order, and released after create returns. A held lock MUST return exit code 5 with a structured `SOURCE_BRANCH_LOCKED` diagnostic; a lock-storage failure MUST return an environment failure. Read-only dry-run and open commands, and creates for different branches, MUST NOT contend. +Before execute-mode create mutates taskflow.yaml or creates a worktree, the CLI MUST acquire a local exclusive lock for every configured `(canonical Git common directory, branch)` pair. Locks MUST be stored beneath that common directory, acquired in deterministic sorted order, and released after create returns. A held lock MUST return exit code 5 with a structured `SOURCE_BRANCH_LOCKED` diagnostic; a lock-storage failure MUST return an environment failure. Read-only dry-run commands and creates for different branches MUST NOT contend. #### Scenario: Competing tasks use the same source branch - **WHEN** one task holds an execute-mode lock for a source repository branch diff --git a/openspec/specs/development-tool-sessions/spec.md b/openspec/specs/development-tool-sessions/spec.md index 9bf9b83..1ac76ee 100644 --- a/openspec/specs/development-tool-sessions/spec.md +++ b/openspec/specs/development-tool-sessions/spec.md @@ -2,32 +2,25 @@ Define safe configured Codex and Claude launches from managed primary worktrees with controlled additional directories. ## Requirements -### Requirement: Build safe Codex and Claude launch specifications -The CLI SHALL support `open [--tool codex|claude] [-- ...]`, default to Codex when the tool is omitted, resolve the selected built-in executable from `PATH`, use the first repository worktree as cwd, and add every later repository worktree and the task root as additional directories. Extra tool arguments, including permission-bypass flags, MUST be forwarded unchanged, except `--worktree` and `--worktree=...` MUST be rejected before launch. Claude MUST receive `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1`. Unsupported tools and missing executables MUST fail before launch. +### Requirement: Compose native tool commands from skill guidance +The skill SHALL instruct an agent to compose ready-to-run native `claude` and `codex` command lines from taskflow.yaml for the user to execute, instead of launching tools through the CLI. The composed command MUST use the first repository worktree as the working directory, pass absolute additional-directory paths for every later repository worktree and the task root via `--add-dir`, and prefix Claude invocations with `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1`. The agent MUST identify the user's shell and quote or escape every path using syntax valid for POSIX shells, PowerShell, or cmd.exe; it MUST present the command to the user rather than execute it, and MUST warn against `--worktree` and `--worktree=...` arguments. -#### Scenario: Build Codex launch -- **WHEN** the user opens Codex for a ready task with multiple repositories -- **THEN** the process uses `codex` from `PATH`, the first repository worktree as cwd, and repeated `--add-dir` arguments for remaining worktrees and task root +#### Scenario: Compose a Claude command +- **WHEN** every configured worktree reports `reuse` and the user requests Claude +- **THEN** the agent presents a command that changes into the first repository worktree, sets `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1`, invokes `claude`, and passes `--add-dir` with absolute paths for every later worktree and the task root -#### Scenario: Enable Claude additional instructions -- **WHEN** the user opens Claude for a ready task -- **THEN** the launched child uses `claude` from `PATH` and receives `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` +#### Scenario: Compose a Codex command +- **WHEN** every configured worktree reports `reuse` and the user requests Codex +- **THEN** the agent presents a `codex` command with the same working directory and the same absolute `--add-dir` arguments -#### Scenario: Forward safe tool arguments -- **WHEN** the user provides arguments after `--` that do not request a nested worktree -- **THEN** the selected tool receives those arguments unchanged after Taskflow's additional-directory arguments +#### Scenario: Gate composition on structural readiness +- **WHEN** the readiness `create --dry-run` without `--repo` reports any repository as `create` or a conflict +- **THEN** the agent surfaces the reported issue instead of composing a tool command -#### Scenario: Reject nested worktree arguments -- **WHEN** forwarded arguments contain `--worktree` or a `--worktree=...` value -- **THEN** open returns an invalid-argument diagnostic without launching the child +#### Scenario: Warn against nested worktree flags +- **WHEN** the user requests `--worktree` or `--worktree=...` in the composed invocation +- **THEN** the agent omits or refuses the flag and explains the nested-worktree risk -### Requirement: Launch only from a structurally ready workspace -Before launching a tool, open MUST verify every configured worktree exists, belongs to the configured source repository, and uses the expected branch. It MUST NOT require a state file, phase, digest, or prior Taskflow action outcome. Dirty matching worktrees MUST remain launchable. - -#### Scenario: Reject a missing or mismatched worktree -- **WHEN** a configured worktree is missing, belongs to another source, or uses an unexpected branch -- **THEN** open returns a worktree diagnostic without launching a tool - -#### Scenario: Open a dirty ready workspace -- **WHEN** every configured worktree is valid and at least one contains uncommitted changes -- **THEN** open launches the selected tool with all configured directories +#### Scenario: Render shell-safe paths +- **WHEN** a task root or worktree path contains spaces or shell metacharacters +- **THEN** the agent renders a shell-appropriate quoted and escaped command for the user's POSIX shell, PowerShell, or cmd.exe instead of inserting the raw path diff --git a/openspec/specs/e2e-command-flow/spec.md b/openspec/specs/e2e-command-flow/spec.md index 9f49b6d..a2599ef 100644 --- a/openspec/specs/e2e-command-flow/spec.md +++ b/openspec/specs/e2e-command-flow/spec.md @@ -2,20 +2,20 @@ ## Purpose -Define complete Cobra and compiled-binary create/open/delete verification. +Define complete Cobra and compiled-binary create/delete verification. ## Requirements ### Requirement: Exercise the complete CLI task lifecycle The test suite SHALL execute the reduced user-facing flow through the Cobra command surface and SHALL verify each command's result, configuration, and relevant Git side effects. -#### Scenario: In-process create and open preparation succeeds -- **WHEN** a test runs create --dry-run, create --execute, and open preflight against temporary valid repositories -- **THEN** dry-run reports actions without creating configuration or worktrees, execute writes taskflow.yaml and ownership metadata and creates worktrees, and open reaches the tool launch boundary +#### Scenario: In-process create preparation succeeds +- **WHEN** a test runs create --dry-run and create --execute against temporary valid repositories +- **THEN** dry-run reports actions without creating configuration or worktrees, and execute writes taskflow.yaml and ownership metadata and creates worktrees #### Scenario: Incomplete or dirty work is handled from live facts - **WHEN** a configured target is missing or mismatched, or a matching worktree is dirty -- **THEN** open rejects the missing or mismatched target and accepts the dirty matching target +- **THEN** create reports the missing or mismatched target as a planned creation or conflict and reports the dirty matching target as reuse #### Scenario: Dry-run preserves all managed state - **WHEN** create dry-run is executed for a new or existing task @@ -42,20 +42,35 @@ The test suite SHALL execute the reduced user-facing flow through the Cobra comm - **THEN** a competing command returns the conflict exit code without corrupting taskflow.yaml or existing worktrees #### Scenario: Invalid requests preserve files -- **WHEN** an invalid task identifier, unknown YAML field, unsupported tool, nested-worktree argument, or mismatched target is supplied +- **WHEN** an invalid task identifier, unknown YAML field, or mismatched target is supplied - **THEN** the CLI returns the documented structured failure and preserves existing configuration and Git state ### Requirement: Verify executable and rendering boundaries -The test suite SHALL invoke a built `taskflow` binary in addition to in-process Cobra commands and SHALL verify stable JSON/text output and process exit codes for create, open, and delete. +The test suite SHALL invoke a built `taskflow` binary in addition to in-process Cobra commands and SHALL verify stable JSON/text output and process exit codes for create and delete. #### Scenario: Subprocess reports a configuration failure -- **WHEN** the built binary runs create or open with an invalid task identifier in JSON mode +- **WHEN** the built binary runs create or delete with an invalid task identifier in JSON mode - **THEN** the process exits with the configuration exit code and emits a parseable result envelope with `ok: false` and a structured diagnostic #### Scenario: Successful output preserves command data -- **WHEN** create or open runs without --json -- **THEN** its text output includes the action or launch data needed to understand the result +- **WHEN** create or delete runs without --json +- **THEN** its text output includes the action data needed to understand the result #### Scenario: Subprocess reduced flow succeeds - **WHEN** the built binary executes create dry-run and execute against temporary repositories -- **THEN** its process exit codes, JSON envelopes, text reports, and Git worktree state match the create/open/delete contract +- **THEN** its process exit codes, JSON envelopes, text reports, and Git worktree state match the create/delete contract + +### Requirement: Verify whitelist-driven copy end to end +The test suite SHALL verify through the Cobra command surface and the compiled binary that create copies exactly the `.worktreeinclude`-declared paths, fails loudly when the manifest is missing, excludes `.git` entries from copied directories, and warns on literal patterns that match no source path. + +#### Scenario: Declared content is copied and unlisted content is not +- **WHEN** a manifest lists a modified tracked file and a directory containing ignored files, and the source also contains an unlisted untracked file +- **THEN** execute carries the modified file as an unstaged modification and the ignored files into the target, and the unlisted file is absent from the target and the copy totals + +#### Scenario: Missing manifest fails without mutation +- **WHEN** a source repository has no `.worktreeinclude` and create dry-run or execute runs +- **THEN** the command returns `SOURCE_COPY_MANIFEST_MISSING` with the documented exit code and creates no taskflow.yaml, worktree, or branch + +#### Scenario: Unmatched literal pattern warns +- **WHEN** a manifest contains a literal pattern matching no source path and execute otherwise succeeds +- **THEN** the command exits successfully, and both text and JSON output carry a warning naming the repository and pattern diff --git a/openspec/specs/environment-preflight/spec.md b/openspec/specs/environment-preflight/spec.md index a688b35..dc4ecac 100644 --- a/openspec/specs/environment-preflight/spec.md +++ b/openspec/specs/environment-preflight/spec.md @@ -3,8 +3,12 @@ Define create-mode source, local-base, branch, and managed-worktree preflight checks before Taskflow mutations begin. ## Requirements ### Requirement: Preflight create reconciliation -Create MUST inspect every configured source, base ref, branch occupancy, target path, and worktree identity before taskflow.yaml or Git mutation. +Create MUST inspect every configured source, base ref, branch occupancy, target path, worktree identity, and `.worktreeinclude` manifest before taskflow.yaml or Git mutation. Preflight MUST verify that each source is readable, that its manifest exists and passes syntax validation, and that source and target do not contain one another. A missing manifest MUST return `SOURCE_COPY_MANIFEST_MISSING` and an invalid manifest MUST return `SOURCE_COPY_MANIFEST_INVALID`, both before any configuration or Git mutation. #### Scenario: Preflight all repositories - **WHEN** any configured repository is not ready - **THEN** create returns a repository diagnostic before changing configuration or Git state + +#### Scenario: Preflight rejects a missing manifest before mutation +- **WHEN** a source repository has no `.worktreeinclude` and create runs in dry-run or execute mode +- **THEN** create returns `SOURCE_COPY_MANIFEST_MISSING` for that repository and taskflow.yaml, worktrees, and branches are unchanged diff --git a/openspec/specs/readiness-and-initialization-integrity/spec.md b/openspec/specs/readiness-and-initialization-integrity/spec.md index 4fa2dcc..cad7133 100644 --- a/openspec/specs/readiness-and-initialization-integrity/spec.md +++ b/openspec/specs/readiness-and-initialization-integrity/spec.md @@ -3,7 +3,7 @@ Define task completeness, source integrity, and mutation-free initialization rejection. ## Requirements ### Requirement: Require a non-bare Git worktree source -Create preflight SHALL accept a repository source only when Git inspection reports a non-bare worktree. Open SHALL apply the same source identity requirement before launching. +Create preflight SHALL accept a repository source only when Git inspection reports a non-bare worktree. #### Scenario: Bare repository source - **WHEN** a configured source is an existing bare Git repository diff --git a/openspec/specs/reporting-validation-readiness/spec.md b/openspec/specs/reporting-validation-readiness/spec.md index 21a7da0..e37c698 100644 --- a/openspec/specs/reporting-validation-readiness/spec.md +++ b/openspec/specs/reporting-validation-readiness/spec.md @@ -1,9 +1,9 @@ ## Purpose -Define current operational results for create, open, and delete without validation history or readiness conclusions. +Define current operational results for create and delete without validation history or readiness conclusions. ## Requirements -### Requirement: Report create, open, and delete operational results -Create, open, and delete SHALL expose their current action, conflict, launch, and cleanup results through the common text and JSON output contract without validation or readiness history. +### Requirement: Report create and delete operational results +Create and delete SHALL expose their current action, conflict, and cleanup results through the common text and JSON output contract without validation or readiness history. #### Scenario: Report a create action - **WHEN** create previews or executes a repository reconciliation diff --git a/openspec/specs/resumable-action-execution/spec.md b/openspec/specs/resumable-action-execution/spec.md index f6e01c9..ef6402b 100644 --- a/openspec/specs/resumable-action-execution/spec.md +++ b/openspec/specs/resumable-action-execution/spec.md @@ -3,8 +3,12 @@ Define recovery from interrupted worktree creation using live Git facts without durable action outcomes. ## Requirements ### Requirement: Recover from live Git facts -Create SHALL recover from an interrupted worktree operation by inspecting current Git worktrees, reusing matching targets, and creating only missing targets without a persistent action journal. +Create SHALL recover from an interrupted worktree operation by inspecting current Git worktrees, reusing matching targets, and creating only missing targets without a persistent action journal. A matching Taskflow-owned target whose recorded source-copy status is pending SHALL be repaired by rerunning the `.worktreeinclude`-driven overlay; a pending target that no longer exists SHALL be re-registered as a worktree before the overlay is retried. #### Scenario: Retry after interruption - **WHEN** create partially creates worktrees and is run again after the external fault is fixed - **THEN** matching worktrees are reused and missing worktrees are created + +#### Scenario: Retry an interrupted overlay +- **WHEN** a worktree was registered but its overlay copy was interrupted, leaving a pending source-copy record +- **THEN** the next create reruns the overlay of manifest-matched paths into that target and marks the copy complete diff --git a/openspec/specs/task-configuration-validation/spec.md b/openspec/specs/task-configuration-validation/spec.md index 2481ab4..88ff158 100644 --- a/openspec/specs/task-configuration-validation/spec.md +++ b/openspec/specs/task-configuration-validation/spec.md @@ -11,7 +11,7 @@ The CLI MUST decode taskflow.yaml with unknown fields rejected, apply the curren #### Scenario: Preserve repository order - **WHEN** taskflow.yaml lists repositories in a specific order -- **THEN** loading preserves that order and open uses the first repository as cwd +- **THEN** loading preserves that order and the first repository remains the primary working directory for skill-composed tool commands ### Requirement: Validate repository and dependency constraints The CLI MUST require unique repository names matching the supported name pattern, existing source directories, non-empty base and branch values, worktree paths contained beneath the task worktrees directory, and unique target paths. Loading and structural validation MUST NOT launch external commands. @@ -22,4 +22,4 @@ The CLI MUST require unique repository names matching the supported name pattern #### Scenario: Reject duplicate targets - **WHEN** two repositories resolve to the same worktree target -- **THEN** configuration validation returns a conflict before create or open +- **THEN** configuration validation returns a conflict before create or delete diff --git a/openspec/specs/task-workspace-initialization/spec.md b/openspec/specs/task-workspace-initialization/spec.md index 3fb2bb0..5ec95ce 100644 --- a/openspec/specs/task-workspace-initialization/spec.md +++ b/openspec/specs/task-workspace-initialization/spec.md @@ -7,12 +7,16 @@ Define safe, idempotent creation of a task worktree workspace from user/agent-ow ## Requirements ### Requirement: Initialize a task workspace from explicit local repositories -The CLI SHALL provide `taskflow create ` with one or more unique `--repo =` values only for a new task without taskflow.yaml. Repository order MUST be preserved and the first repository MUST be the primary launch worktree. Execute mode MUST persist taskflow.yaml and an ownership manifest for worktrees it creates; it MUST NOT create state, inventory, validation reports, branches, commits, or worktrees until the create preflight succeeds. Existing task configuration MUST be edited directly and reconciled through create without repository arguments. +The CLI SHALL provide `taskflow create ` with one or more unique `--repo =` values only for a new task without taskflow.yaml. Repository order MUST be preserved and the first repository MUST be the primary launch worktree. Execute mode MUST persist taskflow.yaml and an ownership manifest for worktrees it creates, MUST create each new worktree with a normal base checkout, and MUST carry each source repository's `.worktreeinclude`-declared local content into its new worktree; it MUST NOT create state, inventory, validation reports, branches, commits, or worktrees until the create preflight succeeds. Existing task configuration MUST be edited directly and reconciled through create without repository arguments. #### Scenario: Create three valid repositories - **WHEN** a user creates a new task with three existing local Git repositories in a supplied order - **THEN** dry-run reports the configuration and planned worktrees without mutation, and execute writes taskflow.yaml and creates the worktrees in that order +#### Scenario: New worktrees carry declared local content +- **WHEN** a source repository declares local files in `.worktreeinclude` and its worktree is created +- **THEN** the new worktree contains exactly the declared source paths in addition to the base checkout + #### Scenario: Reject a non-Git repository - **WHEN** an explicit repository path is not an existing non-bare Git worktree - **THEN** create returns a configuration or environment error and does not create a taskflow.yaml or partial worktree diff --git a/openspec/specs/taskflow-multirepo-skill/spec.md b/openspec/specs/taskflow-multirepo-skill/spec.md index 5eba995..e76b11c 100644 --- a/openspec/specs/taskflow-multirepo-skill/spec.md +++ b/openspec/specs/taskflow-multirepo-skill/spec.md @@ -7,19 +7,30 @@ Define the safe multi-repository orchestration guidance shared by development ag ## Requirements ### Requirement: Guide safe multi-repository orchestration -The skill SHALL instruct an agent to locate the task, inspect taskflow.yaml and ownership.json when cleanup is requested, use repeated `create --repo` only to bootstrap a task that has no taskflow.yaml, edit taskflow.yaml directly when the repository topology changes, use create/delete dry-run before execute, and use open only after every configured worktree is structurally ready. It MUST NOT require state, inventory, validation, dependencies, repository roles, contract owners, or an append command. +The skill SHALL instruct an agent to locate the task, inspect taskflow.yaml and ownership.json when cleanup is requested, use repeated `create --repo` only to bootstrap a task that has no taskflow.yaml, edit taskflow.yaml directly when the repository topology changes, use create/delete dry-run before execute, run a second create dry-run without `--repo` after create execute, and compose shell-appropriate native `claude`/`codex` command lines for the user only after that post-create dry-run confirms every configured worktree is structurally ready. It MUST NOT require state, inventory, validation, dependencies, repository roles, contract owners, or an append command. #### Scenario: Prepare multiple repositories - **WHEN** an agent receives a Taskflow task with multiple repositories -- **THEN** it reports repository order, obtains explicit execute approval, runs create, and opens the requested built-in tool only after live worktree checks succeed +- **THEN** it reports repository order, obtains explicit execute approval, runs create, runs create --dry-run without `--repo`, and composes the requested shell-appropriate native tool command only after every repository reports `reuse` #### Scenario: Add a repository to an existing task - **WHEN** an agent needs another repository after taskflow.yaml already exists - **THEN** it edits the desired repository list in taskflow.yaml, runs create --dry-run without --repo, and only runs create --execute after approval ### Requirement: Keep deterministic actions in the CLI -The skill MUST instruct agents to use taskflow for workspace, ownership-checked cleanup, worktree, lock, and built-in tool-launch mutations and MUST prohibit shell-composed replacements, implicit cleanup/push/PR actions, repository append arguments on existing tasks, and nested worktree launch flags. Delete MUST require explicit execute mode and MUST refuse resources without matching ownership records. Arguments explicitly supplied after -- MUST be passed through without Taskflow policy interpretation. +The skill MUST instruct agents to use taskflow for workspace, ownership-checked cleanup, worktree, and lock mutations and MUST prohibit shell-composed replacements, implicit cleanup/push/PR actions, repository append arguments on existing tasks, and nested worktree flags in composed tool commands. Delete MUST require explicit execute mode and MUST refuse resources without matching ownership records. Other tool arguments requested by the user MUST be preserved in order after the composed `--add-dir` arguments and quoted or escaped for the selected shell. #### Scenario: User requests execution - **WHEN** a user approves a prepared create plan -- **THEN** the agent invokes create execute, reports its machine-readable result, and recommends open only when every worktree is ready +- **THEN** the agent invokes create execute, reports its machine-readable result, and presents the composed native tool command only when every worktree reports `reuse` + +### Requirement: Guide local content whitelists +The skill SHALL instruct agents to create or review each source repository's `.worktreeinclude` before bootstrapping a task, to keep declared paths limited to the local content the task actually needs, and to surface copy actions and unmatched-pattern warnings from dry-run to the user before requesting execute approval. It MUST NOT instruct agents to bypass a manifest-missing failure, to edit an owned worktree's contents by hand to compensate for an absent manifest, or to declare repository-wide wholesale copies when a narrower set suffices. + +#### Scenario: Bootstrap a repository without a manifest +- **WHEN** an agent prepares a task whose source repository has no `.worktreeinclude` +- **THEN** the agent proposes the needed paths, creates the manifest in the source repository, shows it to the user, and only then runs create dry-run + +#### Scenario: Review copy actions before execute +- **WHEN** create dry-run reports source-copy actions or unmatched-pattern warnings +- **THEN** the agent includes them in the execute approval request and reports the executed copy results afterwards diff --git a/openspec/specs/whitelist-source-copy/spec.md b/openspec/specs/whitelist-source-copy/spec.md new file mode 100644 index 0000000..62c6e07 --- /dev/null +++ b/openspec/specs/whitelist-source-copy/spec.md @@ -0,0 +1,51 @@ +# whitelist-source-copy Specification + +## Purpose + +Define how create carries `.worktreeinclude`-declared source working-tree content into newly created Taskflow worktrees safely, predictably, and idempotently. + +## Requirements + +### Requirement: Declare carried content with a whitelist manifest +The copy into a newly created Taskflow worktree SHALL be driven by a `.worktreeinclude` file at the source repository root. Blank lines and lines starting with `#` SHALL be ignored. Each remaining line SHALL be one pattern for source-root-relative paths to copy: a trailing `/` SHALL restrict the pattern to directories; a pattern containing `/` other than a trailing one SHALL match from the source root; a pattern without `/` SHALL match a path segment basename at any depth. The globs `*`, `?`, `[...]`, and `**` SHALL be supported. Negation patterns MUST NOT be supported. When a source repository has no `.worktreeinclude`, creating its worktree MUST fail with `SOURCE_COPY_MANIFEST_MISSING` in dry-run and execute mode; a manifest that fails syntax validation MUST fail with `SOURCE_COPY_MANIFEST_INVALID`. + +#### Scenario: Copy declared files and directories +- **WHEN** `.worktreeinclude` lists `config/local.yaml` and `env/` and a new worktree is created +- **THEN** the target contains those paths from the source working directory, including untracked and ignored content under `env/`, and no other source-only content + +#### Scenario: Missing manifest fails loudly +- **WHEN** a source repository has no `.worktreeinclude` and create plans a new worktree for it +- **THEN** dry-run and execute return `SOURCE_COPY_MANIFEST_MISSING` for that repository and no taskflow.yaml, worktree, or branch is created + +#### Scenario: A comment-only manifest copies nothing +- **WHEN** `.worktreeinclude` exists and contains only comments and blank lines +- **THEN** the new worktree is a plain base checkout and the executed copy action reports zero entries + +### Requirement: Overlay matched paths onto the base checkout +Execute mode MUST create the worktree with a normal base checkout and then copy exactly the manifest-matched source paths into the target, creating missing parent directories. A matched tracked file with uncommitted modifications SHALL appear in the target as a normal unstaged modification; matched untracked and ignored files SHALL appear as untracked. The overlay is additive: a tracked file deleted in the source working directory MUST NOT be deleted in the target, and unlisted tracked files SHALL keep base content. + +#### Scenario: Carry a modified tracked file +- **WHEN** a tracked file with uncommitted source modifications is listed in `.worktreeinclude` +- **THEN** the target contains the modified content and reports it as an unstaged modification against base + +#### Scenario: Unlisted tracked files keep base content +- **WHEN** a tracked file is not listed in `.worktreeinclude` +- **THEN** the target contains the file at base content and the file contributes nothing to the copy action + +### Requirement: Copy inside safety boundaries +The overlay copy MUST exclude every `.git` entry of the source root and any nested depth, MUST preserve the target's own Git metadata, and MUST reject source and target paths that contain one another before walking. Symlinks SHALL be reproduced without following them, and unsupported entry types or failed reads and writes MUST fail the copy with a structured diagnostic naming the path relative to the source root. A completed copy MUST NOT be refreshed by later creates. + +#### Scenario: Nested Git metadata is excluded +- **WHEN** a listed directory contains a nested `.git` entry beside working files +- **THEN** the nested `.git` entry is not copied while the sibling working files are + +#### Scenario: Reuse never refreshes +- **WHEN** create runs again after a repository's source copy is complete +- **THEN** no overlay copy is performed for that repository + +### Requirement: Warn on unmatched literal patterns +Execute mode SHALL report a warning for every literal pattern (a pattern containing no glob metacharacters) that matches no source path. The warning MUST NOT fail the create. Dry-run MUST NOT enumerate source contents and SHALL validate only manifest syntax and report the pattern count. + +#### Scenario: A typo'd pattern warns without failing +- **WHEN** `.worktreeinclude` contains a literal pattern that matches no source path and create --execute succeeds otherwise +- **THEN** the result reports a warning naming the unmatched pattern and the copy action reports only matched entries diff --git a/openspec/specs/worktree-reconciliation/spec.md b/openspec/specs/worktree-reconciliation/spec.md index 7058600..db94d33 100644 --- a/openspec/specs/worktree-reconciliation/spec.md +++ b/openspec/specs/worktree-reconciliation/spec.md @@ -7,7 +7,7 @@ Define state-free reconciliation of user/agent-owned taskflow.yaml declarations ## Requirements ### Requirement: Reconcile declared repositories from live Git facts -The CLI SHALL provide `taskflow create [--repo =]... [--dry-run|--execute]`. Repeated `--repo` declarations SHALL be accepted only when the task has no `taskflow.yaml`; when `taskflow.yaml` exists, any `--repo` argument MUST return `CONFIG_EDIT_REQUIRED` and MUST NOT merge or append configuration. `taskflow.yaml` SHALL be the only persisted desired configuration; the CLI MUST derive completion and conflicts from live Git source and worktree inspection rather than a state journal, phase, action outcome, digest, inventory, or validation report. +The CLI SHALL provide `taskflow create [--repo =]... [--dry-run|--execute]`. Repeated `--repo` declarations SHALL be accepted only when the task has no `taskflow.yaml`; when `taskflow.yaml` exists, any `--repo` argument MUST return `CONFIG_EDIT_REQUIRED` and MUST NOT merge or append configuration. `taskflow.yaml` SHALL be the only persisted desired configuration; the CLI MUST derive completion and conflicts from live Git source and worktree inspection, and the only persisted derivation is the repository-level source-copy status (`pending` or `complete`) in the Taskflow ownership manifest, because an interrupted copy is indistinguishable from a complete one by inspection alone. #### Scenario: Create a new task in dry-run mode - **WHEN** the user supplies one or more valid repositories for a task that has no taskflow.yaml and runs `create --dry-run` @@ -26,12 +26,16 @@ The CLI SHALL provide `taskflow create [--repo =] - **THEN** create validates the complete configuration and plans or creates only the missing worktree while preserving all existing declarations and worktrees ### Requirement: Reconcile worktrees idempotently and safely -Create SHALL classify each repository as `create` when its configured target is absent, or `reuse` when a registered worktree has the configured target path, source common directory, and branch. It MUST reject an existing mismatched target or occupied branch before mutation and MUST never delete, move, reset, or overwrite an existing user path. +Create SHALL classify each repository as `create` when its configured target is absent, or `reuse` when a registered worktree has the configured target path, source common directory, and branch. It SHALL classify each repository's source-copy action as `copy` for a missing target, `repair` for a matching Taskflow-owned target whose recorded copy is pending, or `reuse` for a complete copy or a matching worktree without a Taskflow copy record, which MUST never be populated implicitly. It MUST reject an existing mismatched target or occupied branch before mutation and MUST never delete, move, reset, or overwrite an existing user path. #### Scenario: Reuse a matching worktree - **WHEN** create is run after a matching worktree already exists - **THEN** create succeeds with a reuse result and does not invoke `git worktree add` +#### Scenario: Never populate an unowned matching worktree +- **WHEN** a registered worktree matches the configuration but has no Taskflow source-copy ownership record +- **THEN** create reports the source copy as reused with a reason and copies nothing into the target + #### Scenario: Reject a mismatched target - **WHEN** the configured target exists but is not the expected worktree from the expected source and branch - **THEN** create returns a deterministic worktree conflict before writing taskflow.yaml or changing Git state @@ -50,18 +54,3 @@ Execute-mode create MUST acquire the task lock and all required source/branch lo #### Scenario: Concurrent source branch creation - **WHEN** another task holds the same canonical source common directory and branch lock - **THEN** create returns `SOURCE_BRANCH_LOCKED` with the conflict exit code before task configuration or Git mutation - -### Requirement: Use a state-free open readiness gate -Open MUST load taskflow.yaml and verify every configured target's live worktree identity before launching Codex or Claude. It MUST NOT require or read `.taskflow/state.json`, validation reports, inventory, or a lifecycle phase. A structurally matching dirty worktree SHALL remain launchable. - -#### Scenario: Open a ready workspace -- **WHEN** every configured target matches its source common directory and branch -- **THEN** open launches the selected CLI using the first repository worktree as cwd - -#### Scenario: Reject an incomplete workspace -- **WHEN** a configured worktree is missing or has a different source or branch -- **THEN** open returns a structured worktree diagnostic and does not launch a child process - -#### Scenario: Open a manually matching worktree -- **WHEN** a user-created worktree structurally matches the configured source, target, and branch -- **THEN** open accepts it without requiring a Taskflow ownership marker diff --git a/openspec/specs/worktree-start/spec.md b/openspec/specs/worktree-start/spec.md index dd5cb19..5b88c3c 100644 --- a/openspec/specs/worktree-start/spec.md +++ b/openspec/specs/worktree-start/spec.md @@ -3,26 +3,38 @@ Define complete create dry-run planning and safe, idempotent managed worktree reconciliation. ## Requirements ### Requirement: Plan a complete start operation -The CLI SHALL provide `taskflow create --dry-run` and list every configured repository's resolved target and `create` or `reuse` action in stable declaration order. Dry-run MUST not modify files, lock directories, taskflow.yaml, worktrees, branches, or Git state. +The CLI SHALL provide `taskflow create --dry-run` and list every configured repository's resolved target, Worktree action (`create` or `reuse`), and source-copy action (`copy`, `repair`, or `reuse`) with the `.worktreeinclude` pattern count in stable declaration order. Dry-run MUST not modify files, lock directories, taskflow.yaml, worktrees, branches, or Git state, and MUST NOT enumerate or read source contents beyond the manifest file itself. #### Scenario: Dry-run three repositories - **WHEN** a valid task has three repositories and the user requests create dry-run -- **THEN** the result lists all three planned actions deterministically and leaves the task directory and Git state unchanged +- **THEN** the result lists each repository's Worktree and source-copy plan deterministically and leaves the task directory, source checkout, and Git state unchanged + +#### Scenario: Dry-run validates manifests without walking +- **WHEN** a source repository has a missing or syntactically invalid `.worktreeinclude` and the user requests create dry-run +- **THEN** the command returns the manifest diagnostic for that repository without creating or modifying any state ### Requirement: Create safe managed worktrees -Execute mode MUST acquire the task lock, acquire all required source-branch locks, and complete a read-only preflight for every repository before writing taskflow.yaml or invoking a mutating command. Preflight MUST verify source identity, locally resolvable base, branch occupancy, target containment, and target identity. Execute mode MUST create each missing worktree using argument-array Git invocation with the configured branch and base, and never delete or overwrite a mismatched target. +Execute mode MUST acquire the task lock, acquire all required source-branch locks, and complete a read-only preflight for every repository before writing taskflow.yaml or invoking a mutating command. Preflight MUST verify source identity, locally resolvable base, branch occupancy, target containment, target identity, and `.worktreeinclude` presence and syntax. Execute mode MUST create each missing Worktree with the configured branch and base using an argument-array Git invocation with a normal base checkout, then copy exactly the manifest-matched source paths into the target while preserving the target Git metadata, and never delete or overwrite a mismatched pre-existing target. -#### Scenario: Create a missing worktree +#### Scenario: Create and overlay a missing Worktree - **WHEN** every repository passes preflight, a target path is absent, and its branch is available -- **THEN** create writes the desired configuration and creates the worktree at the contained target path from the configured base +- **THEN** create writes the desired configuration, creates the Worktree with a base checkout, and copies the `.worktreeinclude`-matched source paths into the target #### Scenario: Reject a mismatched target -- **WHEN** the target path exists but is not the expected worktree +- **WHEN** the target path exists but is not the expected Worktree - **THEN** create returns conflict code 5 and preserves taskflow.yaml and the existing directory byte-for-byte +#### Scenario: Missing manifest blocks creation +- **WHEN** a source repository has no `.worktreeinclude` and execute would create its Worktree +- **THEN** create returns `SOURCE_COPY_MANIFEST_MISSING` for that repository before Git mutation and preserves all existing state + ### Requirement: Start is idempotent -Create MUST derive completion from live Git facts. An existing worktree is complete only when its canonical source/common Git directory, configured branch, and configured target path match. A matching worktree MUST be reused without another `git worktree add` invocation. +Create MUST derive Worktree completion from live Git facts and the source-copy status. An existing Worktree is complete only when its canonical source/common Git directory, configured branch, configured target path, and source-copy status match. A matching Worktree with a complete copy MUST be reused without another `git worktree add` invocation or source copy. A matching Taskflow-owned Worktree with a pending source copy MUST be repaired by rerunning the manifest-driven overlay. #### Scenario: Repeat create -- **WHEN** create is run again after successful worktree creation -- **THEN** it reports every worktree as reused and creates no duplicate branch or directory +- **WHEN** create is run again after successful Worktree creation and source copying +- **THEN** it reports every Worktree and source-copy action as reused and creates no duplicate branch, directory, or copy + +#### Scenario: Pending copy is repaired +- **WHEN** a Taskflow-owned Worktree matches but its recorded source copy is pending +- **THEN** create reruns the overlay of manifest-matched paths into that target and marks the copy complete