@zigrivers/scaffold 3.32.0 → 3.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/content/guides/multi-agent/index.html +16 -15
- package/content/guides/multi-agent/index.md +16 -15
- package/content/knowledge/execution/worktree-management.md +4 -4
- package/content/pipeline/environment/git-workflow.md +8 -2
- package/dist/project/gitignore.d.ts.map +1 -1
- package/dist/project/gitignore.js +4 -0
- package/dist/project/gitignore.js.map +1 -1
- package/dist/project/gitignore.test.js +1 -0
- package/dist/project/gitignore.test.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1403,7 +1403,7 @@ When running parallel agents in separate worktrees, collect their activity befor
|
|
|
1403
1403
|
|
|
1404
1404
|
```bash
|
|
1405
1405
|
# Harvest a live worktree's ledger into the central archive
|
|
1406
|
-
scaffold observe harvest --worktree
|
|
1406
|
+
scaffold observe harvest --worktree=.worktrees/my-feature
|
|
1407
1407
|
|
|
1408
1408
|
# Rotate stale archive entries (worktrees that no longer exist)
|
|
1409
1409
|
scaffold observe harvest --recover
|
|
@@ -1380,11 +1380,11 @@ test run.</p>
|
|
|
1380
1380
|
<p>A <strong>git worktree</strong> solves this: it is an independent working directory backed by
|
|
1381
1381
|
the <em>same</em> <code>.git</code> repository. Each agent gets its own files and its own checked-out
|
|
1382
1382
|
branch, but commits, refs and history are shared. The layout is one primary
|
|
1383
|
-
checkout
|
|
1384
|
-
<pre><code class="language-text"
|
|
1385
|
-
|
|
1386
|
-
├──
|
|
1387
|
-
└──
|
|
1383
|
+
checkout with all agent worktrees project-local under <code>.worktrees/</code>:</p>
|
|
1384
|
+
<pre><code class="language-text">scaffold/ # primary checkout (you work here)
|
|
1385
|
+
└── .worktrees/ # agent worktrees (gitignored)
|
|
1386
|
+
├── alpha/ # worktree for agent "alpha"
|
|
1387
|
+
└── beta/ # worktree for agent "beta"
|
|
1388
1388
|
</code></pre>
|
|
1389
1389
|
<p>So worktrees give you <strong>filesystem isolation with a shared object store</strong>:
|
|
1390
1390
|
agents never overwrite each other's working files, but a PR merged from one
|
|
@@ -1398,20 +1398,21 @@ branch.</p></div>
|
|
|
1398
1398
|
one parallel agent. Given a name like <code>alpha</code>, it:</p>
|
|
1399
1399
|
<ol>
|
|
1400
1400
|
<li><strong>Normalizes the name</strong> to a lowercase, hyphenated, alphanumeric slug (so
|
|
1401
|
-
<code>Agent_1</code> becomes <code>agent-1</code>), then derives the worktree directory
|
|
1402
|
-
|
|
1401
|
+
<code>Agent_1</code> becomes <code>agent-1</code>), then derives the worktree directory project-local
|
|
1402
|
+
under the primary repo: <code>.worktrees/<slug></code>. It also ensures <code>.worktrees/</code> is
|
|
1403
|
+
gitignored so the worktree's checkout is never accidentally committed.</li>
|
|
1403
1404
|
<li><strong>Creates the workspace branch</strong> <code><slug>-workspace</code> if it does not already
|
|
1404
|
-
exist <span class="fp" data-path="scripts/setup-agent-worktree.sh:
|
|
1405
|
-
that branch <span class="fp" data-path="scripts/setup-agent-worktree.sh:
|
|
1405
|
+
exist <span class="fp" data-path="scripts/setup-agent-worktree.sh:62">scripts/setup-agent-worktree.sh:62</span>, then adds the worktree on
|
|
1406
|
+
that branch <span class="fp" data-path="scripts/setup-agent-worktree.sh:65">scripts/setup-agent-worktree.sh:65</span>. Re-running for an
|
|
1406
1407
|
existing worktree is a safe no-op.</li>
|
|
1407
1408
|
<li><strong>Writes <code>.scaffold/identity.json</code></strong> — the stable identity that build
|
|
1408
1409
|
observability stamps onto every event this worktree records. The script
|
|
1409
|
-
creates <code>.scaffold/</code> <span class="fp" data-path="scripts/setup-agent-worktree.sh:
|
|
1410
|
+
creates <code>.scaffold/</code> <span class="fp" data-path="scripts/setup-agent-worktree.sh:73">scripts/setup-agent-worktree.sh:73</span> and, only if no
|
|
1410
1411
|
identity file exists yet, writes <code>worktree_id</code> (a UUID), <code>worktree_label</code>
|
|
1411
1412
|
(the agent slug), and <code>created_at</code>
|
|
1412
|
-
<span class="fp" data-path="scripts/setup-agent-worktree.sh:
|
|
1413
|
+
<span class="fp" data-path="scripts/setup-agent-worktree.sh:92">scripts/setup-agent-worktree.sh:92</span>.</li>
|
|
1413
1414
|
<li><strong>Re-syncs Beads</strong> with a fail-soft <code>bd doctor --fix</code> when a <code>.beads/</code>
|
|
1414
|
-
directory is present <span class="fp" data-path="scripts/setup-agent-worktree.sh:
|
|
1415
|
+
directory is present <span class="fp" data-path="scripts/setup-agent-worktree.sh:109">scripts/setup-agent-worktree.sh:109</span>, reconciling the
|
|
1415
1416
|
worktree's Beads git hooks and project config against the installed <code>bd</code>
|
|
1416
1417
|
version. (Beads DB sharing is automatic — worktrees discover the main repo's
|
|
1417
1418
|
task DB via git's common directory, so there is nothing for <code>bd doctor</code> to
|
|
@@ -1467,8 +1468,8 @@ into needless conflicts.</li>
|
|
|
1467
1468
|
</ul>
|
|
1468
1469
|
<p>Each agent otherwise follows the standard PR workflow from its own worktree:
|
|
1469
1470
|
branch, commit, push, <code>gh pr create</code>, wait for CI, squash-merge. The shared
|
|
1470
|
-
object store means a merge from <code>
|
|
1471
|
-
moment it lands.</p>
|
|
1471
|
+
object store means a merge from agent <code>alpha</code>'s worktree is on <code>main</code> for
|
|
1472
|
+
everyone the moment it lands.</p>
|
|
1472
1473
|
<h2 id="teardown-harvest">Teardown & harvest</h2>
|
|
1473
1474
|
<p>When an agent's work is merged, retire its worktree. The single command for this
|
|
1474
1475
|
is <code>scripts/teardown-agent-worktree.sh <worktree-path></code>, and the <strong>order of
|
|
@@ -1529,7 +1530,7 @@ worktree — the CLI rejects a worktree primary root
|
|
|
1529
1530
|
morning — does <strong>not</strong> mean re-running setup. The worktree and its
|
|
1530
1531
|
<code>identity.json</code> persist on disk. Instead:</p>
|
|
1531
1532
|
<ol>
|
|
1532
|
-
<li>Return to the agent's worktree directory (<code
|
|
1533
|
+
<li>Return to the agent's worktree directory (<code>.worktrees/<agent></code>).</li>
|
|
1533
1534
|
<li>Run <strong><code>multi-agent-resume <agent-name></code></strong> (or <code>single-agent-resume</code> for the
|
|
1534
1535
|
non-worktree case). It verifies the worktree environment, syncs with <code>main</code>,
|
|
1535
1536
|
reconciles task status against any PRs merged while you were away, and
|
|
@@ -18,13 +18,13 @@ test run.
|
|
|
18
18
|
A **git worktree** solves this: it is an independent working directory backed by
|
|
19
19
|
the *same* `.git` repository. Each agent gets its own files and its own checked-out
|
|
20
20
|
branch, but commits, refs and history are shared. The layout is one primary
|
|
21
|
-
checkout
|
|
21
|
+
checkout with all agent worktrees project-local under `.worktrees/`:
|
|
22
22
|
|
|
23
23
|
```text
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
├──
|
|
27
|
-
└──
|
|
24
|
+
scaffold/ # primary checkout (you work here)
|
|
25
|
+
└── .worktrees/ # agent worktrees (gitignored)
|
|
26
|
+
├── alpha/ # worktree for agent "alpha"
|
|
27
|
+
└── beta/ # worktree for agent "beta"
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
So worktrees give you **filesystem isolation with a shared object store**:
|
|
@@ -44,20 +44,21 @@ branch.
|
|
|
44
44
|
one parallel agent. Given a name like `alpha`, it:
|
|
45
45
|
|
|
46
46
|
1. **Normalizes the name** to a lowercase, hyphenated, alphanumeric slug (so
|
|
47
|
-
`Agent_1` becomes `agent-1`), then derives the worktree directory
|
|
48
|
-
|
|
47
|
+
`Agent_1` becomes `agent-1`), then derives the worktree directory project-local
|
|
48
|
+
under the primary repo: `.worktrees/<slug>`. It also ensures `.worktrees/` is
|
|
49
|
+
gitignored so the worktree's checkout is never accidentally committed.
|
|
49
50
|
2. **Creates the workspace branch** `<slug>-workspace` if it does not already
|
|
50
|
-
exist :cite[scripts/setup-agent-worktree.sh:
|
|
51
|
-
that branch :cite[scripts/setup-agent-worktree.sh:
|
|
51
|
+
exist :cite[scripts/setup-agent-worktree.sh:62], then adds the worktree on
|
|
52
|
+
that branch :cite[scripts/setup-agent-worktree.sh:65]. Re-running for an
|
|
52
53
|
existing worktree is a safe no-op.
|
|
53
54
|
3. **Writes `.scaffold/identity.json`** — the stable identity that build
|
|
54
55
|
observability stamps onto every event this worktree records. The script
|
|
55
|
-
creates `.scaffold/` :cite[scripts/setup-agent-worktree.sh:
|
|
56
|
+
creates `.scaffold/` :cite[scripts/setup-agent-worktree.sh:73] and, only if no
|
|
56
57
|
identity file exists yet, writes `worktree_id` (a UUID), `worktree_label`
|
|
57
58
|
(the agent slug), and `created_at`
|
|
58
|
-
:cite[scripts/setup-agent-worktree.sh:
|
|
59
|
+
:cite[scripts/setup-agent-worktree.sh:92].
|
|
59
60
|
4. **Re-syncs Beads** with a fail-soft `bd doctor --fix` when a `.beads/`
|
|
60
|
-
directory is present :cite[scripts/setup-agent-worktree.sh:
|
|
61
|
+
directory is present :cite[scripts/setup-agent-worktree.sh:109], reconciling the
|
|
61
62
|
worktree's Beads git hooks and project config against the installed `bd`
|
|
62
63
|
version. (Beads DB sharing is automatic — worktrees discover the main repo's
|
|
63
64
|
task DB via git's common directory, so there is nothing for `bd doctor` to
|
|
@@ -148,8 +149,8 @@ footprint small and its branches short. The conflict-prevention rules from
|
|
|
148
149
|
|
|
149
150
|
Each agent otherwise follows the standard PR workflow from its own worktree:
|
|
150
151
|
branch, commit, push, `gh pr create`, wait for CI, squash-merge. The shared
|
|
151
|
-
object store means a merge from `
|
|
152
|
-
moment it lands.
|
|
152
|
+
object store means a merge from agent `alpha`'s worktree is on `main` for
|
|
153
|
+
everyone the moment it lands.
|
|
153
154
|
|
|
154
155
|
## Teardown & harvest
|
|
155
156
|
|
|
@@ -225,7 +226,7 @@ Coming back to parallel work — a context reset, a paused session, the next
|
|
|
225
226
|
morning — does **not** mean re-running setup. The worktree and its
|
|
226
227
|
`identity.json` persist on disk. Instead:
|
|
227
228
|
|
|
228
|
-
1. Return to the agent's worktree directory (
|
|
229
|
+
1. Return to the agent's worktree directory (`.worktrees/<agent>`).
|
|
229
230
|
2. Run **`multi-agent-resume <agent-name>`** (or `single-agent-resume` for the
|
|
230
231
|
non-worktree case). It verifies the worktree environment, syncs with `main`,
|
|
231
232
|
reconciles task status against any PRs merged while you were away, and
|
|
@@ -17,7 +17,7 @@ Expert knowledge for managing git worktrees to enable parallel multi-agent execu
|
|
|
17
17
|
|
|
18
18
|
### Setup
|
|
19
19
|
|
|
20
|
-
Use `scripts/setup-agent-worktree.sh <agent-name>` to create a worktree at
|
|
20
|
+
Use `scripts/setup-agent-worktree.sh <agent-name>` to create a worktree at `.worktrees/<agent-name>/` (project-local). Each agent gets its own isolated working directory and workspace branch.
|
|
21
21
|
|
|
22
22
|
### Branching Conventions
|
|
23
23
|
|
|
@@ -40,12 +40,12 @@ After all agents finish, remove worktrees and prune stale references. Delete mer
|
|
|
40
40
|
scripts/setup-agent-worktree.sh agent-1
|
|
41
41
|
|
|
42
42
|
# This creates:
|
|
43
|
-
#
|
|
43
|
+
# .worktrees/agent-1/ (working directory, project-local)
|
|
44
44
|
# Branch: agent-1-workspace (workspace branch)
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
**What the setup script does:**
|
|
48
|
-
1. Creates a new worktree directory
|
|
48
|
+
1. Creates a new worktree directory project-local under `.worktrees/`
|
|
49
49
|
2. Creates a workspace branch for the agent
|
|
50
50
|
3. Sets up the working directory with a clean state
|
|
51
51
|
4. Installs dependencies if a package manager is detected
|
|
@@ -154,7 +154,7 @@ git rebase origin/main
|
|
|
154
154
|
|
|
155
155
|
```bash
|
|
156
156
|
# From the main repository (not from inside the worktree)
|
|
157
|
-
git worktree remove
|
|
157
|
+
git worktree remove .worktrees/agent-1
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
**Pruning stale worktree references:**
|
|
@@ -26,7 +26,11 @@ parallel agents, CI pipeline, branch protection, and conflict prevention rules.
|
|
|
26
26
|
- docs/git-workflow.md — branching strategy, commit standards, rebase strategy,
|
|
27
27
|
PR workflow (8 sub-steps), task closure, agent crash recovery, branch protection,
|
|
28
28
|
conflict prevention, and worktree documentation
|
|
29
|
-
- scripts/setup-agent-worktree.sh — permanent worktree creation script
|
|
29
|
+
- scripts/setup-agent-worktree.sh — permanent worktree creation script. Create
|
|
30
|
+
worktrees project-local at `<repo>/.worktrees/<agent-slug>` (a single,
|
|
31
|
+
consistent location — never as repo siblings like `../<repo>-<agent>`). The
|
|
32
|
+
script must ensure `.worktrees/` is gitignored before creating the worktree so
|
|
33
|
+
the worktree's checkout is never accidentally committed.
|
|
30
34
|
- .github/workflows/ci.yml — CI workflow with lint and test jobs
|
|
31
35
|
- .github/pull_request_template.md — PR template with task ID format
|
|
32
36
|
- CLAUDE.md updated with Committing/PR Workflow, Task Closure, Parallel Sessions,
|
|
@@ -37,7 +41,9 @@ parallel agents, CI pipeline, branch protection, and conflict prevention rules.
|
|
|
37
41
|
- (mvp) Commit format is consistent (Beads: [bd-<id>] type(scope): desc. Non-Beads: type(scope): desc)
|
|
38
42
|
- (deep) PR workflow includes all 8 sub-steps (commit, AI review, rebase, push, create,
|
|
39
43
|
auto-merge with --delete-branch, watch CI, confirm merge)
|
|
40
|
-
- (deep) Worktree script creates permanent worktrees with workspace branches
|
|
44
|
+
- (deep) Worktree script creates permanent worktrees with workspace branches at
|
|
45
|
+
the project-local path `<repo>/.worktrees/<agent-slug>` and ensures
|
|
46
|
+
`.worktrees/` is gitignored
|
|
41
47
|
- (deep) If Beads: BEADS_ACTOR environment variable documented for agent identity
|
|
42
48
|
- (deep) CI workflow job name matches branch protection context
|
|
43
49
|
- (mvp) Branch cleanup documented for both single-agent and worktree-agent variants
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../../src/project/gitignore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../../src/project/gitignore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAuBxD,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B;AAED,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,6BAA6B,CAiB1F;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAqBxE"}
|
|
@@ -9,6 +9,10 @@ const MANAGED_LINES = [
|
|
|
9
9
|
'.scaffold/lock.json',
|
|
10
10
|
'.scaffold/*.tmp',
|
|
11
11
|
'.scaffold/**/*.tmp',
|
|
12
|
+
// Parallel-agent worktrees live at <repo>/.worktrees/<agent>; ignore so a
|
|
13
|
+
// worktree's full checkout is never accidentally committed (see
|
|
14
|
+
// scripts/setup-agent-worktree.sh and docs/git-workflow.md §7).
|
|
15
|
+
'.worktrees/',
|
|
12
16
|
];
|
|
13
17
|
const DANGEROUS_RULES = new Set([
|
|
14
18
|
'.scaffold/',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../../src/project/gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,cAAc,GAAG,YAAY,CAAA;AACnC,MAAM,aAAa,GAAG,wBAAwB,CAAA;AAC9C,MAAM,WAAW,GAAG,wBAAwB,CAAA;AAC5C,MAAM,aAAa,GAAG;IACpB,sBAAsB;IACtB,qBAAqB;IACrB,iBAAiB;IACjB,oBAAoB;
|
|
1
|
+
{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../../src/project/gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EA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OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;AACrD,CAAC;AAED,SAAS,2BAA2B,CAAC,QAAgB;IACnD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE;QAAE,OAAO,KAAK,CAAA;IAE7E,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;QACjD,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC;eACpC,OAAO,CAAC,QAAQ,CAAC,iDAAiD,CAAC,CACvE,CAAA;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
|
|
@@ -29,6 +29,7 @@ describe('ensureScaffoldGitignore', () => {
|
|
|
29
29
|
expect(content).toContain('.scaffold/lock.json');
|
|
30
30
|
expect(content).toContain('.scaffold/*.tmp');
|
|
31
31
|
expect(content).toContain('.scaffold/**/*.tmp');
|
|
32
|
+
expect(content).toContain('.worktrees/');
|
|
32
33
|
});
|
|
33
34
|
it('updates existing managed block idempotently without changing user content', () => {
|
|
34
35
|
const root = makeTempDir();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitignore.test.js","sourceRoot":"","sources":["../../src/project/gitignore.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEpF,MAAM,OAAO,GAA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