Skip to content

Commit 2e8d664

Browse files
docs(agents): add end-to-end worktree lifecycle and cleanup step
Show the full create → work → submit → cleanup sequence so agents don't have to piece it together from separate sections. Clarify commits happen in worktrees, not on main. Co-authored-by: Andrew <andrewxhill@gmail.com>
1 parent 0278b2b commit 2e8d664

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

AGENTS.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,29 @@ drains all registered repos automatically. Agents only need to submit.
2121
- Run `pnpm install` once in a new worktree (they don't share
2222
`node_modules`).
2323
- Land through `mq`, never through manual merge or push.
24+
- Clean up after landing: `wtdrop <worktree-path>`.
2425

25-
### Agent path
26-
27-
From a feature worktree, finish with:
26+
### End-to-end flow
2827

2928
```
29+
# 1. Create a feature worktree and install deps
30+
wtnew my-feature
31+
cd ~/Projects/_wt/recallnet/codecontext/my-feature
32+
pnpm install
33+
34+
# 2. Do all work in the worktree
35+
# edit, test, commit (repeat as needed)
36+
37+
# 3. Submit — the daemon integrates onto main and pushes to remote
3038
mq submit --check-only --json # dry-run before expensive work
3139
mq submit --wait --timeout 15m --json # submit and block until landed
40+
41+
# 4. Clean up
42+
wtdrop ~/Projects/_wt/recallnet/codecontext/my-feature
3243
```
3344

34-
The daemon handles integration (rebase-then-ff onto `main`) and publish
35-
(push to remote). The agent's job ends at submit.
45+
The daemon handles integration (rebase-then-ff onto `main`) and
46+
auto-publishes (push to remote). The agent's job ends at submit.
3647

3748
For durable tracking by `submission_id` instead of blocking inline:
3849

@@ -66,13 +77,15 @@ branch name.
6677

6778
## Commit Flow
6879

80+
- All commits happen in feature worktrees, never on `main`.
6981
- This is a Recall Labs repo. Use the global `recall-commit` skill for commits
7082
here.
7183
- Default commit flow for this repo:
7284
stage the intended changes
7385
capture any high-leverage learnings in `AGENT-LEARNINGS.md` if warranted
7486
commit with a conventional commit message using the recall-commit format
7587
- Do not use ad hoc one-line commits when the recall-commit guard applies.
88+
- After committing, land through `mq submit --wait --timeout 15m --json`.
7689

7790
## codecontext
7891

0 commit comments

Comments
 (0)