Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Warn at plan start when another plan or implementation is already active on the same repository, and offer continue, wait, or an optional git worktree. A clean idle worktree is not overlap, and commits that only exist on its branch do not count. Wait wins when the same files are mid-edit. Isolate only when this host can start a reviewer outside the current checkout. The plan records whether the other owner and overlapping files are clear, and implementation creates the worktree only then. Review, correction, learning, and verification follow that checkout; merge and worktree removal stay explicitly requested.

## 7.8.0

- Learn from the session or its log about navigation, wasteful tool use, and steering instructions that do not change behavior. Mechanical lessons become checks; judgment lessons become standards the reviewer applies, so implementation context stays lean. Review keeps plan or spec deviation separate from repository standards or simplicity.
Expand Down
2 changes: 1 addition & 1 deletion docs/auto-work.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For Dark, say “Use auto-work dark” and give the same concrete goal, scope, a

## What happens next

1. **Plan:** the agent inspects the project and defines the change and its checks. In Light, you approve it before implementation. Existing approval for the same plan and scope remains valid.
1. **Plan:** the agent inspects the project and defines the change and its checks. In Light, you approve it before implementation. Existing approval for the same plan and scope remains valid. If another task is already changing this repository, or your checkout has unrelated edits, planning uses the same warn-and-choose check as [manual planning](manual-workflow.md#when-another-task-already-uses-this-repository): continue carefully, wait, or isolate on a branch and worktree. The plan records the choice. Review reads that checkout and does not merge it.
2. **Implement:** the agent makes the agreed changes and reports the checks and result.
3. **Review:** a fresh separate agent checks the work against the plan without changing it. The implementation stays unchanged while it is being reviewed.
4. **Correct if needed:** the executor addresses findings, then a fresh reviewer checks the result again. A correction can also collect missing proof without changing code.
Expand Down
22 changes: 21 additions & 1 deletion docs/behavior-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,29 @@ For each example ask: What is the result? What does it mean for the goal? What f
| Necessary work and checks are sufficient; no concrete question remains. | Deliver the phase report without another search or test loop. Reuse applicable instructions; load optional references only for the relevant case. | [Working agreement](../references/workflow.md) |
| A current Review establishes that the goal is achieved. | State completion without adding a required learning, release, or other phase. Status repeats only a relevant next action and does not reopen finished work. | [Review](../skills/review-work/SKILL.md), [status](../skills/work-status/SKILL.md), settings example |

## Concurrent checkouts

Walk through these cases against [planning](../skills/plan-work/SKILL.md), [concurrent work](../references/concurrent-work.md), [implementation requirements](../references/implementation-work.md), [review](../skills/review-work/SKILL.md), and [correction](../skills/correct-work/SKILL.md). Record the passages inspected and the working state outside the repository. This is an instruction-level check, not an observed agent run.

| Situation | Expected decision | Instructions to inspect |
|---|---|---|
| The checkout is clean and no other plan, implementation, or documented unfinished task names this repository. Another worktree has commits on its own branch and no uncommitted changes, and no handoff or host task names that checkout. | Plan in place. Ask no checkout question and create no worktree. Commits that only exist on that branch are not overlap. | [Planning](../skills/plan-work/SKILL.md), [concurrent work](../references/concurrent-work.md) |
| Another git worktree is implementing on this repository, or this checkout is dirty with edits this task must leave untouched, and a fresh reviewer can use the intended worktree as its workspace. | Warn, and offer continue carefully, wait, or isolate. The first matching rule recommends isolate. Planning records the choice and does not create the worktree. Continuing in place stays available. | [Planning](../skills/plan-work/SKILL.md), [concurrent work](../references/concurrent-work.md) |
| Isolate would fit, but this host cannot start a child agent with a workspace outside the current checkout, or that ability is unclear. | Recommend continue carefully. Say that independent review would be unable to read the isolated checkout. Do not assume a sibling directory is visible. Still offer wait. | [Concurrent work](../references/concurrent-work.md), [Auto-Work reviewer](../skills/auto-work/references/reviewer.md) |
| The human chooses to continue in the dirty checkout. | Record continue. Later edits preserve the unrelated files. Do not treat the warning as a lock. | [Concurrent work](../references/concurrent-work.md), [correction](../skills/correct-work/SKILL.md) |
| The other workstream is mid-edit on the same files this task must change. | The first rule recommends wait, ahead of isolate. The plan may finish. Hold product edits until that blocker clears. | [Concurrent work](../references/concurrent-work.md) |
| Dark Auto-Work has a clear overlap, a readable review workspace, and the commissioned goal did not pick a checkout. | Record isolate in the plan. Create the worktree only as the first implementation step, for the named branch and path. Pause and do not create it when the other owner or the overlapping files are unclear. Commit, push, and merge stay unauthorized. | [Concurrent work](../references/concurrent-work.md), [Auto-Work operation](../skills/auto-work/references/operation.md) |
| Implementation is cold-started from a plan that already says isolate, with a base, branch, and path. One plan says the other owner and the overlapping files are clear. Another omits that field. | Create the worktree only for the plan that says they are clear, then edit only there. When the field is missing or unclear, pause and leave the worktree uncreated. Do not repeat the choice interview. Commit, push, and merge stay unauthorized. | [Implementation requirements](../references/implementation-work.md), [concurrent work](../references/concurrent-work.md) |
| Review is opened from the primary checkout while the change exists only in the recorded worktree. | Start the reviewer with that worktree as its workspace. Review that branch, read-only. A primary checkout without the change is the wrong tree. When the path cannot be read, missing access is missing proof. | [Review](../skills/review-work/SKILL.md), [concurrent work](../references/concurrent-work.md), [Auto-Work reviewer](../skills/auto-work/references/reviewer.md) |
| Correction findings apply to isolated work, and the primary checkout has unrelated edits. | Patch the recorded worktree. Leave the primary checkout untouched. Folding the branch back is a later explicit reconcile, not part of correction. | [Correction](../skills/correct-work/SKILL.md), [concurrent work](../references/concurrent-work.md) |
| The human asks to merge the isolated branch and remove its worktree. The destination checkout is clean. | Merge into the named destination, recheck there, then remove only the worktree this assignment added. Delete the branch only if they also asked and it is merged. | [Concurrent work](../references/concurrent-work.md) |
| The human asks to merge, and the destination checkout is dirty with unrelated edits. | Stop and show that dirt. Do not stash, commit, or merge over it. | [Concurrent work](../references/concurrent-work.md) |
| The human discards the isolated attempt. The worktree still has uncommitted files. | Do not merge. Show that work. Remove the worktree only after they confirm the discard. Leave worktrees this assignment did not create. | [Concurrent work](../references/concurrent-work.md) |
| Learning or a verifier run happens while the accepted product change still lives only in the worktree. | Edit project guidance and drive the product there. A git worktree does not replace test-data or process isolation. A repeated collision prefers a check or this procedure over a copied project rule. | [Learning](../skills/learn-from-work/SKILL.md), [verification](../skills/verification-work/SKILL.md), [concurrent work](../references/concurrent-work.md) |

## Context budgets

`npm run context-budget` estimates instruction size from the built host packages. Its flat scenarios cover required planning references, individual phases, selected playbooks, learning, verifier inspection/creation/maintenance, and Auto-Work including delivery. Shared documents count once per scenario. Discovery counts the advertised names and descriptions, including Cursor command aliases. These are aggregate scenario budgets, not individual skill length limits.
`npm run context-budget` estimates instruction size from the built host packages. Its flat scenarios cover required planning references, individual phases, selected playbooks, learning, verifier inspection/creation/maintenance, and Auto-Work including delivery. Overlap and isolated-checkout upper bounds (`planConcurrent`, `reviewConcurrent`, `correctionConcurrent`, `autoWorkConcurrent`, `learningConcurrent`, `verificationConcurrent`, and portable `implementationConcurrent`) add the concurrent-work reference only for that case. Default phase scenarios omit it. Shared documents count once per scenario. Discovery counts the advertised names and descriptions, including Cursor command aliases. These are aggregate scenario budgets, not individual skill length limits.

Every scenario has a fixed hard limit; excess size, missing limits, and obsolete limits fail validation. Initial limits used the largest host value plus 10%, rounded up to 100 estimated tokens. Original baselines and explicit revisions remain recorded in the repository's `scripts/context-limits.json`. Normal checks never update limits.

Expand Down
12 changes: 12 additions & 0 deletions docs/manual-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ The implementation follows the approved scope and preserves unrelated changes. I

A successful implementation report is the input to review. It does not mean review has already happened.

### When another task already uses this repository

At the start of planning, the agent checks this repository for another active plan or implementation. A git worktree counts when it has uncommitted work, or a handoff or host task names that checkout. Commits that only exist on its branch do not. An unfinished plan for this repository also counts. A clean idle worktree does not. The same branch checked out twice, a documented unfinished task, or unrelated edits that implementation would otherwise change also count. A clean checkout with no other active work continues as usual. Planning does not create a worktree, and a plan does not have to use one.

When there is overlap, you get a warning and three choices: continue carefully in this checkout, wait, or isolate the work on its own branch and git worktree. Waiting is the recommendation when the other task is mid-edit on the same files. Isolation is the recommendation when someone else is already changing this repository, or when your checkout has unrelated edits that should stay untouched, and a later review can read that worktree. When a review could not see it, the recommendation stays in the current checkout and says why. You can still choose otherwise.

The plan records the choice. Implementation follows that record, and creates the worktree only after the plan allows isolate. Review and correction use that same checkout. Merging the branch back, or removing the worktree after you discard the attempt, happens only when you ask.

## Review and correction

### 3. Request a review
Expand Down Expand Up @@ -129,6 +137,10 @@ After correction, request a fresh review. A positive review might conclude:

> The goal is achieved. Exported rows match the active filter, columns match the visible selection, and empty exports retain their headers. The required checks support the current change.

### Plan while another task is in progress

> Another worktree already has an orders export in progress, and this checkout has unrelated edits. I recommend isolating this plan on its own branch and worktree. You can continue carefully here, or wait until that export lands. Say which you want. A worktree is only for this overlap, not for every plan.

### Review a resumed settings change

> Earlier save-test results still apply to the unchanged code and test conditions. The required keyboard check is missing, so completion is unconfirmed. Request that check; no code change is needed unless it reveals a defect.
Expand Down
4 changes: 4 additions & 0 deletions docs/methodology-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Session-environment lessons and the split between plan or spec deviation and rep

Automated checks were already on the ladder. This adaptation does not add a `/retro` command, a required `CODING_STANDARDS.md`, parallel review subagents, or the Fowler smell baseline. It does not adopt `/implement-spec`, which conflicts with Auto-Work, the written plan handoff, and host-configured models. Grill-me, grill-with-docs, and a required glossary stay out, as [Vague-scope planning](#vague-scope-planning) already records. Packaged instructions remain original Workflow wording. This note attributes the ideas; it does not load the upstream skills.

## Concurrent checkouts

Optional git worktrees for overlapping tasks are original instructions in `references/concurrent-work.md`. They are not a playbook and not a separate skill. A clean idle worktree is not overlap. The first matching rule recommends wait, then isolate only when this host can start a child workspace outside the current checkout, then continue. Planning stays read-only. The native plan is the cold-start record Implement follows, including the continue, wait, or isolate choice and whether the other owner and overlapping files are clear. Creating the worktree is the first implementation step, and only when that field says clear. A missing field pauses. Commits that only exist on another branch are not overlap. The removed controller worktrees, sandboxes, and sealed plan artifacts stay removed. Visual parity still has no mandatory worktree. A repeated checkout collision stays an environment lesson under the existing correction ladder: prefer a check, or this shared procedure, over a new project rule that copies the steps.

## Shared integration decisions

Each method remains one reference file. Catalog and skill entrypoints load only the selected method. The playbooks describe useful result content, not mandatory user-document headings, metadata, or machine state.
Expand Down
Loading
Loading