Skip to content

Commit 6ade1f0

Browse files
committed
Ask a participant for one path variable instead of five
W2 exports SOFTWARE_FACTORY_INTENSIVE_PATH and persists it to a shell rc. The pages this branch already touches still asked for FACTORY_PATH, ASCII_ART_PATH, TUTORIAL_PATH and ARTIFACTS_PATH, which nothing on the W1-W2-W3 path sets any more, and their Prereqs pointed at a W3 step the restructure deleted. An unset variable in a copy-paste block does not announce itself: cd on an empty string returns 0, and the reads underneath it resolve against the wrong directory. Every site now spells the path out from the surviving variable, using the form the rest of the progression already uses: factory1 for the city, ascii-art for the rig, sf-tutorial/artifacts for the pack sources. bootstrap.sh is the behaviour half. factory1 and ascii-art were only ever the workspace root plus a directory name, since the run cds there before creating either, so they are spelled from it directly. The artifacts source stays anchored to the checkout the script was run out of, because the mismatch check deliberately lets a participant continue with the two split apart, and it is script-local now rather than exported. The paste-ready block the run prints hands over the one variable a later page needs. The W3 troubleshooting entry for an empty variable kept its lesson and moved to W2's rc append, which is the step that can still write an empty export. City: city · Agent: local-core.builder-3
1 parent 777f7ab commit 6ade1f0

7 files changed

Lines changed: 152 additions & 157 deletions

File tree

appendix/01-basic-flow.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ By the end of this exercise you will have three letters from the `letters-a-m` e
3030
- Pages [W3 Run Your Factory](../progression/W3-run-your-factory.md), [W3 Run Your Factory](../progression/W3-run-your-factory.md),
3131
and [W3 Run Your Factory](../progression/W3-run-your-factory.md) complete: city stood up with setup
3232
pack imported, rig registered with locked docs in place, 138 beads seeded,
33-
`main` pushed to GitHub, and `$ASCII_ART_PATH`/`$ARTIFACTS_PATH` exported in your
33+
`main` pushed to GitHub, and `$SOFTWARE_FACTORY_INTENSIVE_PATH` exported in your
3434
shell.
3535
- You're inside the rig directory. If you opened a fresh shell, re-export
36-
`$FACTORY_PATH`, `$ASCII_ART_PATH`, `$TUTORIAL_PATH`, and `$ARTIFACTS_PATH`
37-
per [W3 Run Your Factory](../progression/W3-run-your-factory.md), then `cd "$ASCII_ART_PATH"`.
36+
`$SOFTWARE_FACTORY_INTENSIVE_PATH` per
37+
[W2 Cloud Box and Preflight](../progression/W2-cloud-box-and-preflight.md), then `cd "$SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art"`.
3838
- `gh` is authenticated and can create PRs against the rig's GitHub repo.
3939
Verify with `gh auth status` and `gh repo view`.
4040
- `jq` is installed (the new formulas use it).
@@ -140,10 +140,10 @@ Inspect the packs before installing:
140140
**Copy and paste**
141141

142142
```bash
143-
ls "$ARTIFACTS_PATH/packs/pr-gate-city/"
144-
ls "$ARTIFACTS_PATH/packs/pr-gate-rig/"
145-
cat "$ARTIFACTS_PATH/packs/pr-gate-rig/formulas/mol-polecat-pr.formula.toml"
146-
cat "$ARTIFACTS_PATH/packs/pr-gate-rig/formulas/mol-refinery-pr-patrol.formula.toml"
143+
ls "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/pr-gate-city/"
144+
ls "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/pr-gate-rig/"
145+
cat "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/pr-gate-rig/formulas/mol-polecat-pr.formula.toml"
146+
cat "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/pr-gate-rig/formulas/mol-refinery-pr-patrol.formula.toml"
147147
```
148148

149149
`pr-gate-city/` contains `pack.toml` and an `agents/mayor/` directory
@@ -156,31 +156,31 @@ Copy both packs into the city's `packs/` directory:
156156
**Copy and paste**
157157

158158
```bash
159-
mkdir -p "$FACTORY_PATH/packs"
159+
mkdir -p "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs"
160160

161161
# Delete first: cp -r copies the source *into* the destination when the destination already exists, so a second run would nest the pack.
162-
rm -rf "$FACTORY_PATH/packs/pr-gate-city" "$FACTORY_PATH/packs/pr-gate-rig"
162+
rm -rf "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/pr-gate-city" "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/pr-gate-rig"
163163

164-
cp -r "$ARTIFACTS_PATH/packs/pr-gate-city" \
165-
"$FACTORY_PATH/packs/pr-gate-city"
164+
cp -r "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/pr-gate-city" \
165+
"$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/pr-gate-city"
166166

167-
cp -r "$ARTIFACTS_PATH/packs/pr-gate-rig" \
168-
"$FACTORY_PATH/packs/pr-gate-rig"
167+
cp -r "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/pr-gate-rig" \
168+
"$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/pr-gate-rig"
169169
```
170170

171171
Confirm both packs landed flat, with a single `pack.toml` at the top level of each:
172172

173173
**Copy and paste**
174174

175175
```bash
176-
find "$FACTORY_PATH/packs/pr-gate-city" "$FACTORY_PATH/packs/pr-gate-rig" -name pack.toml
176+
find "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/pr-gate-city" "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/pr-gate-rig" -name pack.toml
177177
```
178178

179179
**Expected output**
180180

181181
```text
182-
$FACTORY_PATH/packs/pr-gate-city/pack.toml
183-
$FACTORY_PATH/packs/pr-gate-rig/pack.toml
182+
$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/pr-gate-city/pack.toml
183+
$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/pr-gate-rig/pack.toml
184184
```
185185

186186
Now register both packs as imports. `gc import add` is the supported
@@ -191,7 +191,7 @@ city directory:
191191
**Copy and paste**
192192

193193
```bash
194-
cd "$FACTORY_PATH"
194+
cd "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1"
195195

196196
# City scope — pr-gate-city supplies the city-scoped mayor agent.
197197
gc import add packs/pr-gate-city
@@ -225,7 +225,7 @@ Now hand the mayor's role to the pack. Remove the city's own `mayor` agent, then
225225
**Copy and paste**
226226

227227
```bash
228-
cd "$FACTORY_PATH"
228+
cd "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1"
229229
rm -rf agents/mayor
230230

231231
sed '/^\[\[named_session\]\]/,/^[[:space:]]*mode = /d' pack.toml > pack.toml.tmp
@@ -274,7 +274,7 @@ List the open `Implement <letter>.md` tasks and grab the first three:
274274
**Copy and paste**
275275

276276
```bash
277-
cd "$ASCII_ART_PATH"
277+
cd "$SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art"
278278
bd list --type=task --status=open --limit 0 | grep "Implement [a-c]\.md"
279279
```
280280

@@ -303,7 +303,7 @@ pr-gate formula:
303303
**Copy and paste**
304304

305305
```bash
306-
cd $FACTORY_PATH
306+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/factory1
307307
gc sling ascii-art/pr-gate-rig.polecat $BEAD_ID --on mol-polecat-pr
308308
```
309309

@@ -384,7 +384,7 @@ METADATA
384384
gc.routed_to: ascii-art/pr-gate-rig.polecat
385385
molecule_id: aa-vlh
386386
target_file: ascii/a.md
387-
work_dir: $FACTORY_PATH/.gc/worktrees/ascii-art/polecats/pr-gate-rig.furiosa/worktrees/aa-985.2
387+
work_dir: $SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/.gc/worktrees/ascii-art/polecats/pr-gate-rig.furiosa/worktrees/aa-985.2
388388
389389
PARENT
390390
↑ ○ aa-52p: sling-aa-985.2 ● P2
@@ -466,7 +466,7 @@ Open the PR and look at the diff:
466466
**Copy and paste**
467467

468468
```bash
469-
cd $ASCII_ART_PATH
469+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
470470
export PR=$(BD_JSON_ENVELOPE=1 gc bd show $BEAD_ID --json | jq -r '.data[0].metadata.pr_number')
471471
gh pr view $PR
472472
gh pr view $PR --web # open in browser
@@ -482,16 +482,16 @@ gate clear, manually merge the PR:
482482
**Copy and paste**
483483

484484
```bash
485-
cd $ASCII_ART_PATH
485+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
486486
export BEAD_ID=$(bd list --type=task --status=open --limit 0 | grep -E "Implement b\.md$" | awk '{print $2}')
487487

488-
cd $FACTORY_PATH
488+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/factory1
489489
gc sling ascii-art/pr-gate-rig.polecat $BEAD_ID --on mol-polecat-pr
490490

491-
cd $ASCII_ART_PATH
491+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
492492
export BEAD_ID=$(bd list --type=task --status=open --limit 0 | grep -E "Implement c\.md$" | awk '{print $2}')
493493

494-
cd $FACTORY_PATH
494+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/factory1
495495
gc sling ascii-art/pr-gate-rig.polecat $BEAD_ID --on mol-polecat-pr
496496
```
497497

@@ -538,7 +538,7 @@ Three new commits on `origin/main` from the polecat/refinery → PR cycle:
538538
**Copy and paste**
539539

540540
```bash
541-
cd $ASCII_ART_PATH
541+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
542542
git fetch origin && git pull
543543
git log --oneline origin/main -3
544544
```
@@ -555,7 +555,7 @@ Three pull requests exist on the rig's GitHub repo:
555555
**Copy and paste**
556556

557557
```bash
558-
cd $ASCII_ART_PATH
558+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
559559
gh pr list --state=merged --limit 5
560560
```
561561

appendix/02-first-review-loop.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ By the end of this exercise you will have installed the `review-loop-rig` pack a
3333
`pr-gate-rig` are imported, `a.md`/`b.md`/`c.md` are merged via PR,
3434
the refinery is running on `mol-refinery-pr-patrol`.
3535
- You're inside the rig directory. If you opened a fresh shell,
36-
re-export `$FACTORY_PATH`, `$ASCII_ART_PATH`, `$TUTORIAL_PATH`, and
37-
`$ARTIFACTS_PATH` per [W3 Run Your Factory](../progression/W3-run-your-factory.md), then
38-
`cd "$ASCII_ART_PATH"`.
36+
re-export `$SOFTWARE_FACTORY_INTENSIVE_PATH` per
37+
[W2 Cloud Box and Preflight](../progression/W2-cloud-box-and-preflight.md), then
38+
`cd "$SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art"`.
3939
- `gh` is authenticated and can create PRs against the rig's GitHub
4040
repo. Verify with `gh auth status` and `gh repo view`.
4141
- `jq` is installed (the new formula uses it).
@@ -129,9 +129,9 @@ Inspect the pack before installing:
129129
**Copy and paste**
130130

131131
```bash
132-
ls "$ARTIFACTS_PATH/packs/review-loop-rig/"
133-
cat "$ARTIFACTS_PATH/packs/review-loop-rig/pack.toml"
134-
cat "$ARTIFACTS_PATH/packs/review-loop-rig/formulas/mol-refinery-review-loop-patrol.formula.toml"
132+
ls "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/review-loop-rig/"
133+
cat "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/review-loop-rig/pack.toml"
134+
cat "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/review-loop-rig/formulas/mol-refinery-review-loop-patrol.formula.toml"
135135
```
136136

137137
You should see `pack.toml`, a `formulas/` directory with one
@@ -142,27 +142,27 @@ Copy the pack into the city's `packs/` directory:
142142
**Copy and paste**
143143

144144
```bash
145-
mkdir -p "$FACTORY_PATH/packs"
145+
mkdir -p "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs"
146146

147147
# Delete first: cp -r copies the source *into* the destination when the destination already exists, so a second run would nest the pack.
148-
rm -rf "$FACTORY_PATH/packs/review-loop-rig"
148+
rm -rf "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/review-loop-rig"
149149

150-
cp -r "$ARTIFACTS_PATH/packs/review-loop-rig" \
151-
"$FACTORY_PATH/packs/review-loop-rig"
150+
cp -r "$SOFTWARE_FACTORY_INTENSIVE_PATH/sf-tutorial/artifacts/packs/review-loop-rig" \
151+
"$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/review-loop-rig"
152152
```
153153

154154
Confirm the pack landed flat, with a single `pack.toml` at its top level:
155155

156156
**Copy and paste**
157157

158158
```bash
159-
find "$FACTORY_PATH/packs/review-loop-rig" -name pack.toml
159+
find "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/review-loop-rig" -name pack.toml
160160
```
161161

162162
**Expected output**
163163

164164
```text
165-
$FACTORY_PATH/packs/review-loop-rig/pack.toml
165+
$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1/packs/review-loop-rig/pack.toml
166166
```
167167

168168
Now register the new import at rig scope and remove the now-redundant
@@ -171,7 +171,7 @@ direct `pr-gate-rig` import. Run from the city directory:
171171
**Copy and paste**
172172

173173
```bash
174-
cd "$FACTORY_PATH"
174+
cd "$SOFTWARE_FACTORY_INTENSIVE_PATH/factory1"
175175

176176
# Add the new pack at rig scope.
177177
gc import add --rig ascii-art packs/review-loop-rig
@@ -241,7 +241,7 @@ Three letters merged on the basic flow. List the remaining open `Implement
241241
**Copy and paste**
242242

243243
```bash
244-
cd "$ASCII_ART_PATH"
244+
cd "$SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art"
245245
bd list --type=task --status=open --limit 0 | grep "Implement [d-f]\.md"
246246
```
247247

@@ -265,7 +265,7 @@ side, so the polecat dispatch is unchanged:
265265
**Copy and paste**
266266

267267
```bash
268-
cd $FACTORY_PATH
268+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/factory1
269269
gc sling ascii-art/review-loop-rig.polecat $BEAD_ID --on mol-polecat-pr
270270
```
271271

@@ -433,7 +433,7 @@ and is done; an approval block on the second patrol is a separate concern.
433433
**Copy and paste**
434434

435435
```bash
436-
cd $ASCII_ART_PATH
436+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
437437
export PR=$(BD_JSON_ENVELOPE=1 gc bd show $BEAD_ID --json | jq -r '.data[0].metadata.pr_number')
438438
gh pr view $PR
439439
gh pr view $PR --web # open in browser
@@ -450,10 +450,10 @@ patrol, manually merge:
450450
**Copy and paste**
451451

452452
```bash
453-
cd $ASCII_ART_PATH
453+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
454454
export BEAD_ID=$(bd list --type=task --status=open --limit 0 | grep -E "Implement e\.md$" | awk '{print $2}')
455455

456-
cd $FACTORY_PATH
456+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/factory1
457457
gc sling ascii-art/review-loop-rig.polecat $BEAD_ID --on mol-polecat-pr
458458
```
459459

@@ -491,7 +491,7 @@ What's still missing:
491491

492492
```bash
493493
# 1. Two new commits on origin/main from the polecat → loop → polecat → refinery → PR cycle.
494-
cd $ASCII_ART_PATH
494+
cd $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
495495
git fetch origin && git pull
496496
git log --oneline origin/main
497497
```
@@ -519,7 +519,7 @@ at least 5 merged PRs total (a, b, c from the basic flow plus d, e from this pag
519519
**Copy and paste**
520520

521521
```bash
522-
# 3. Worktrees cleaned up — only the main worktree remains in $ASCII_ART_PATH
522+
# 3. Worktrees cleaned up — only the main worktree remains in $SOFTWARE_FACTORY_INTENSIVE_PATH/ascii-art
523523
git worktree list
524524
```
525525

0 commit comments

Comments
 (0)