Skip to content

Commit aafc701

Browse files
committed
Reach your own rig through $MY_RIG_PATH instead of retyping its name
Every command that touched a participant's own rig spelled the path out as $SFI_PATH/<your-rig-name>, so the placeholder had to be hand-substituted 34 times across five pages. L1 step 1 now exports $MY_RIG_PATH beside the gc rig add that creates the rig, and appends it to a shell rc so a Day 2 terminal still has it. The 16 --rig <your-rig-name> uses are left alone: that argument takes the rig's name, not its path. City: city · Agent: local-core.builder-1
1 parent f18a584 commit aafc701

6 files changed

Lines changed: 62 additions & 40 deletions

File tree

bootstrap/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Runs the setup work for 00.1, 00.2 and 00.3 on the way past, then stops at the e
6161

6262
**Mental model:** `./bootstrap.sh <step>` answers "make my factory look like I just finished `<step>`," not "make my factory ready for me to start `<step>`."
6363

64-
**Nothing to paste afterwards.** `$SFI_PATH` is the only path variable the curriculum asks for, and [W2](../progression/W2-cloud-box-and-preflight.md) and [W3](../progression/W3-run-your-factory.md) both append it to a shell rc. The script works out the factory, rig and artifact directories from it for its own use; every page writes them out the same way, so a run leaves your shell with nothing new to set.
64+
**Nothing to paste afterwards.** `$SFI_PATH` is the only path variable this script needs, and [W2](../progression/W2-cloud-box-and-preflight.md) and [W3](../progression/W3-run-your-factory.md) both append it to a shell rc. The script works out the factory, rig and artifact directories from it for its own use; every page writes them out the same way, so a run leaves your shell with nothing new to set. The curriculum asks for a second one later, `$MY_RIG_PATH`, which [L1 step 1](../progression/L1-plan-your-factory.md#1-register-your-repo-as-a-rig) sets and persists. Every step this script rebuilds sits before that point.
6565

6666
## About the Bootstrap Script
6767

hardening/05-self-improvement-loop.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Close the loop: your factory reads a signal it already produces, proposes a chan
2828
- [W3](../progression/W3-run-your-factory.md) complete, and a factory that has been running long enough to have produced some evidence about itself.
2929
- [W4](../progression/W4-tour-the-factory.md) complete, because the proposal will land in one of the layers and you need to be able to name which.
3030
- Your [capability map](../progression/L2-capability-map.md) open.
31-
- `$SFI_PATH` set in your shell. [W2](../progression/W2-cloud-box-and-preflight.md) and [W3](../progression/W3-run-your-factory.md) both append it to a shell rc, so it survives a new terminal. Every other path on this page is written out from it.
31+
- `$SFI_PATH` and `$MY_RIG_PATH` set in your shell. [W2](../progression/W2-cloud-box-and-preflight.md) and [W3](../progression/W3-run-your-factory.md) append the first to a shell rc, [L1 step 1](../progression/L1-plan-your-factory.md#1-register-your-repo-as-a-rig) the second, so both survive a new terminal. Every other path on this page is written out from them.
3232

3333
**This option needs no other option.** It is a loop rather than a pack: nothing to install, and the signals it reads are ones your base factory already writes. Any other option you have installed gives it a richer signal, and none of them is required.
3434

@@ -55,7 +55,7 @@ You do not need new instrumentation. Your factory has been writing evidence abou
5555
**Copy and paste**
5656

5757
```bash
58-
cd "$SFI_PATH/<your-rig-name>"
58+
cd "$MY_RIG_PATH"
5959
ls -la docs/reviews/ 2>/dev/null # per-principle scores, if you took that option
6060
bd list --status blocked --json | jq -r '.[] | "\(.id) \(.metadata.bead_review_feedback // .metadata.blocker_reason // "")"'
6161
cd "$SFI_PATH/factory1"
@@ -93,7 +93,7 @@ Now ask for a proposal in a shape you can act on. A proposal that names a file a
9393
Ask the mayor to write its proposal as a bead, so it lands somewhere durable rather than in a tmux buffer:
9494

9595
```bash
96-
cd "$SFI_PATH/<your-rig-name>"
96+
cd "$MY_RIG_PATH"
9797
bd create --title "Proposal: <the change, in one line>" \
9898
--description "Signal: <what the factory observed about itself, with counts>.
9999
Layer: <agent | formula | order>.
@@ -145,7 +145,7 @@ Merging it is optional. Having a proposal that survived your own gate is the del
145145
## Verification
146146

147147
```bash
148-
cd "$SFI_PATH/<your-rig-name>"
148+
cd "$MY_RIG_PATH"
149149
bd list --json | jq -r '.[] | select(.title | startswith("Proposal:")) | "\(.id) \(.status)"'
150150
```
151151

progression/L1-plan-your-factory.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ That set of documents is the input to [L2](./L2-capability-map.md), which starts
3030

3131
- [W3](./W3-run-your-factory.md) through [W5](./W5-observability.md) complete: a working factory you can read.
3232
- A repository you can push to and are willing to let a factory open pull requests against. A personal project or a fork is ideal. A repository you do not control is not.
33-
- `$SFI_PATH` set in your shell. [W2](./W2-cloud-box-and-preflight.md) and [W3](./W3-run-your-factory.md) both append it to a shell rc, so it survives a new terminal. Every other path on this page is written out from it.
33+
- `$SFI_PATH` set in your shell. [W2](./W2-cloud-box-and-preflight.md) and [W3](./W3-run-your-factory.md) both append it to a shell rc, so it survives a new terminal. Step 1 derives `$MY_RIG_PATH` from it and persists that the same way; between them those two write out every path on this page.
3434

3535
## Context
3636

@@ -60,7 +60,8 @@ Register the rig as a **sibling** of the city, the same shape [W3](./W3-run-your
6060
cd "$SFI_PATH/factory1"
6161
git clone <your-repo-url> ../<your-rig-name>
6262
gc rig add ../<your-rig-name> <your-rig-name>
63-
ls "$SFI_PATH/<your-rig-name>"
63+
export MY_RIG_PATH="$SFI_PATH/<your-rig-name>"
64+
ls "$MY_RIG_PATH"
6465
gc rig list
6566
```
6667

@@ -70,6 +71,26 @@ gc rig list
7071
your rig listed alongside ascii-art, with a path and a prefix
7172
```
7273

74+
That `export` is the last time you write your rig's path out by hand. Every page from here reaches it through `$MY_RIG_PATH` instead. Commands taking `--rig` still want the rig's *name*, which is a different thing and stays literal.
75+
76+
Now make the variable survive a new terminal, the same way [W2](./W2-cloud-box-and-preflight.md) made `$SFI_PATH` survive one. Append it to the rc file for your shell, on the machine your factory runs on:
77+
78+
**Copy and paste** (macOS / zsh)
79+
80+
```bash
81+
cat <<EOF >> ~/.zshrc
82+
export MY_RIG_PATH="$MY_RIG_PATH"
83+
EOF
84+
```
85+
86+
**Copy and paste** (Linux / bash, including the cloud box)
87+
88+
```bash
89+
cat <<EOF >> ~/.bashrc
90+
export MY_RIG_PATH="$MY_RIG_PATH"
91+
EOF
92+
```
93+
7394
Then install the base factory into it, so your own rig has the same machinery `ascii-art` does:
7495

7596
**Copy and paste**
@@ -86,9 +107,9 @@ A **project overview** is a loosely structured document answering a few question
86107
**Copy and paste**
87108

88109
```bash
89-
mkdir -p "$SFI_PATH/<your-rig-name>/docs/current"
90-
cp "$SFI_PATH/sf-tutorial/artifacts/docs/PROJECT_OVERVIEW.template.md" "$SFI_PATH/<your-rig-name>/docs/PROJECT_OVERVIEW.md"
91-
nano "$SFI_PATH/<your-rig-name>/docs/PROJECT_OVERVIEW.md"
110+
mkdir -p "$MY_RIG_PATH/docs/current"
111+
cp "$SFI_PATH/sf-tutorial/artifacts/docs/PROJECT_OVERVIEW.template.md" "$MY_RIG_PATH/docs/PROJECT_OVERVIEW.md"
112+
nano "$MY_RIG_PATH/docs/PROJECT_OVERVIEW.md"
92113
```
93114

94115
`nano` ships with the box and is not modal: `Ctrl-O` then `Enter` saves, `Ctrl-X` exits. Use a different editor if you prefer one.
@@ -98,7 +119,7 @@ nano "$SFI_PATH/<your-rig-name>/docs/PROJECT_OVERVIEW.md"
98119
Install the [Manifest Generator skill](https://github.com/audiojak/manifest-generator):
99120

100121
```bash
101-
cd "$SFI_PATH/<your-rig-name>/docs"
122+
cd "$MY_RIG_PATH/docs"
102123
npx skills add https://github.com/audiojak/manifest-generator
103124
```
104125

@@ -124,7 +145,7 @@ The second one is the one people skip and then need. It is the document your cap
124145
**Copy and paste**
125146

126147
```bash
127-
cd "$SFI_PATH/<your-rig-name>"
148+
cd "$MY_RIG_PATH"
128149
bd status
129150
```
130151

@@ -146,7 +167,7 @@ gc sling --rig <your-rig-name> polecat <the-third-bead-id>
146167
Then watch it, from your own rig:
147168

148169
```bash
149-
cd "$SFI_PATH/<your-rig-name>"
170+
cd "$MY_RIG_PATH"
150171
bd show <the-third-bead-id> --json | jq '.[0] | {status, assignee, metadata}'
151172
```
152173

@@ -165,9 +186,9 @@ You have a factory pointed at real work and two documents describing what that w
165186
```bash
166187
gc rig list
167188
gc import list --rig <your-rig-name>
168-
test -f "$SFI_PATH/<your-rig-name>/docs/PROJECT_MANIFEST.md" && echo "project manifest: present"
169-
test -f "$SFI_PATH/<your-rig-name>/docs/SOFTWARE_FACTORY_MANIFEST.md" && echo "factory manifest: present"
170-
cd "$SFI_PATH/<your-rig-name>" && bd list --status open
189+
test -f "$MY_RIG_PATH/docs/PROJECT_MANIFEST.md" && echo "project manifest: present"
190+
test -f "$MY_RIG_PATH/docs/SOFTWARE_FACTORY_MANIFEST.md" && echo "factory manifest: present"
191+
cd "$MY_RIG_PATH" && bd list --status open
171192
```
172193

173194
## Ceiling

progression/L2-capability-map.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Thirty minutes at the end of Day 1 to get the rows down, and thirty on Day 2 mor
4949
**Copy and paste**
5050

5151
```bash
52-
cp "$SFI_PATH/sf-tutorial/artifacts/docs/capability-map.template.md" "$SFI_PATH/<your-rig-name>/docs/current/capability-map.md"
53-
nano "$SFI_PATH/<your-rig-name>/docs/current/capability-map.md"
52+
cp "$SFI_PATH/sf-tutorial/artifacts/docs/capability-map.template.md" "$MY_RIG_PATH/docs/current/capability-map.md"
53+
nano "$MY_RIG_PATH/docs/current/capability-map.md"
5454
```
5555

5656
One row per change you want to make. Each row names the change, which layer it touches, what it costs, and how you will know it worked.
@@ -86,14 +86,14 @@ A useful tiebreak: rank by how much you would trust the factory afterwards, not
8686
Commit it:
8787

8888
```bash
89-
cd "$SFI_PATH/<your-rig-name>"
89+
cd "$MY_RIG_PATH"
9090
git add docs/current/capability-map.md
9191
git commit -m "Add capability map for factory changes"
9292
```
9393

9494
### 4. Day 2: finish and review
9595

96-
Come back to the map with a night's distance. A new shell only needs `$SFI_PATH`, which [W2](./W2-cloud-box-and-preflight.md) and [W3](./W3-run-your-factory.md) both append to a shell rc; every path on this page and in the labs that follow is written out from it.
96+
Come back to the map with a night's distance. A new shell needs `$SFI_PATH` and `$MY_RIG_PATH`. [W2](./W2-cloud-box-and-preflight.md) and [W3](./W3-run-your-factory.md) append the first to a shell rc and [L1 step 1](./L1-plan-your-factory.md#1-register-your-repo-as-a-rig) appends the second, so a Day 2 terminal opens with both; every path on this page and in the labs that follow is written out from them.
9797

9898
Then three things to do, in order:
9999

@@ -114,9 +114,9 @@ The map is a factory design document that took two days of contact to write and
114114
## Verification
115115

116116
```bash
117-
test -f "$SFI_PATH/<your-rig-name>/docs/current/capability-map.md" && echo "capability map: present"
118-
grep -c '^|' "$SFI_PATH/<your-rig-name>/docs/current/capability-map.md"
119-
cd "$SFI_PATH/<your-rig-name>" && git log --oneline -1 -- docs/current/capability-map.md
117+
test -f "$MY_RIG_PATH/docs/current/capability-map.md" && echo "capability map: present"
118+
grep -c '^|' "$MY_RIG_PATH/docs/current/capability-map.md"
119+
cd "$MY_RIG_PATH" && git log --oneline -1 -- docs/current/capability-map.md
120120
```
121121

122122
**Expected output**

progression/L3-L5-feature-labs.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ Every command below is written out from two variables:
6666
| Variable | Points at | Set by |
6767
| --- | --- | --- |
6868
| `SFI_PATH` | your workspace directory | [W2](./W2-cloud-box-and-preflight.md) on your laptop, [W3 step 3](./W3-run-your-factory.md#3-open-a-shell-on-the-box) on the box. Both append it to a shell rc, so it survives |
69+
| `MY_RIG_PATH` | your own rig's directory | [L1 step 1](./L1-plan-your-factory.md#1-register-your-repo-as-a-rig), which appends it to a shell rc too |
6970

70-
Your factory is `$SFI_PATH/factory1` and your own rig is `$SFI_PATH/<your-rig-name>`. Nothing on this page asks you to export either.
71+
Your factory is `$SFI_PATH/factory1` and your own rig is `$MY_RIG_PATH`. Nothing on this page asks you to export either; both were set and persisted on the pages that created them.
7172

7273
**Copy and paste**
7374

7475
```bash
75-
cd "$SFI_PATH/factory1" && gc rig list && ls "$SFI_PATH/<your-rig-name>"
76+
cd "$SFI_PATH/factory1" && gc rig list && ls "$MY_RIG_PATH"
7677
```
7778

7879
**Expected output**
@@ -91,7 +92,7 @@ If `gc rig list` comes back without your rig, or the `ls` cannot find the direct
9192
**Copy and paste**
9293

9394
```bash
94-
cd "$SFI_PATH/<your-rig-name>"
95+
cd "$MY_RIG_PATH"
9596
cat docs/current/capability-map.md
9697
```
9798

@@ -166,21 +167,21 @@ Run the verification you wrote in the map's own column, not a different one that
166167
**Copy and paste**
167168

168169
```bash
169-
cd "$SFI_PATH/<your-rig-name>"
170+
cd "$MY_RIG_PATH"
170171
bd create --title "<a bead that exercises the change>" --type task --priority 2
171172
cd "$SFI_PATH/factory1"
172173
gc sling --rig <your-rig-name> polecat <the-new-bead-id>
173-
watch -n 5 'cd '"$SFI_PATH/<your-rig-name>"' && bd show <the-new-bead-id> --json | jq -r ".[0] | \"\(.status) \(.assignee)\""'
174+
watch -n 5 'cd '"$MY_RIG_PATH"' && bd show <the-new-bead-id> --json | jq -r ".[0] | \"\(.status) \(.assignee)\""'
174175
```
175176

176177
The important part is the negative case. **A gate you have only seen pass is a gate you have not tested.** Construct the input that *should* be rejected and confirm it is:
177178

178179
```bash
179-
cd "$SFI_PATH/<your-rig-name>"
180+
cd "$MY_RIG_PATH"
180181
bd create --title "<a bead your change should reject or catch>" --type task --priority 3
181182
cd "$SFI_PATH/factory1"
182183
gc sling --rig <your-rig-name> polecat <that-bead-id>
183-
cd "$SFI_PATH/<your-rig-name>"
184+
cd "$MY_RIG_PATH"
184185
bd show <that-bead-id> --json | jq -r '.[0] | .status, (.metadata.blocker_reason // "no blocker recorded")'
185186
```
186187

@@ -258,7 +259,7 @@ If you install that option, its formula is also the one to cook when you want to
258259
cd "$SFI_PATH/factory1"
259260
gc formula list
260261
gc formula cook <a-formula-name> --rig <your-rig-name>
261-
cd "$SFI_PATH/<your-rig-name>"
262+
cd "$MY_RIG_PATH"
262263
bd list --json | jq -r '.[] | "\(.id) kind=\(.metadata."gc.kind" // "-") routed=\(.metadata."gc.routed_to" // "-") \(.title)"'
263264
```
264265

@@ -312,7 +313,7 @@ Across the three slots: at least one shipped option installed and working in you
312313
cd "$SFI_PATH/factory1"
313314
gc import list --rig <your-rig-name>
314315
gc doctor
315-
cd "$SFI_PATH/<your-rig-name>"
316+
cd "$MY_RIG_PATH"
316317
git log --oneline -3
317318
bd list --status blocked
318319
```
@@ -331,7 +332,7 @@ the bead you deliberately made fail, still blocked with a reason
331332
- **The option's page refers to agents you do not have.** Each option page assumes the base factory plus that option. If it names an agent from a different option, you found a bug worth reporting; the options are meant to be independent.
332333
- **`gc import add` succeeds and the new agent never appears.** Check the scope. Options install at rig scope with `--rig`; installing at city scope puts the agent somewhere the rig cannot see.
333334
- **You installed from a URL and the agent never appears.** Run `gc import install`. A remote import is recorded by `gc import add` and fetched by `gc import install`, and until the fetch happens there is nothing on disk for `gc reload` to read.
334-
- **A command runs somewhere unexpected, or `ls` reports `cannot access '': No such file or directory`.** `$SFI_PATH` is unset in this shell. `cd ""` exits 0 in both bash and zsh, so an unset variable leaves you where you were rather than reporting an error. `echo "$SFI_PATH"` settles it; [W2](./W2-cloud-box-and-preflight.md) and [W3](./W3-run-your-factory.md) both append it to a shell rc, so a Day 2 shell that has lost it never ran that step.
335+
- **A command runs somewhere unexpected, or `ls` reports `cannot access '': No such file or directory`.** `$SFI_PATH` or `$MY_RIG_PATH` is unset in this shell. `cd ""` exits 0 in both bash and zsh, so an unset variable leaves you where you were rather than reporting an error. `echo "$SFI_PATH" "$MY_RIG_PATH"` settles it; [W2](./W2-cloud-box-and-preflight.md) and [W3](./W3-run-your-factory.md) append the first to a shell rc and [L1 step 1](./L1-plan-your-factory.md#1-register-your-repo-as-a-rig) appends the second, so a Day 2 shell missing either never ran that step.
335336
- **Your change works on `ascii-art` and not on your rig.** Your rig needs the base factory imported too — L1 step 1. `gc import list --rig <your-rig-name>` settles it.
336337
- **The negative case passes when it should fail.** Either the input was better-formed than you thought, or the check is not on the path the bead took. Both are worth a map row.
337338

progression/W6-advanced-concepts.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Three ideas that only become interesting once a factory has been running for a w
3636

3737
- A factory from [W3](./W3-run-your-factory.md): the base factory installed on a rig of your own. That is the whole prerequisite, and every command on this page runs against it. A slot already spent in [L3](./L3-L5-feature-labs.md) gives part 1 more history to read, which makes for a better demonstration.
3838
- Your capability map to hand.
39-
- `$SFI_PATH` set in your shell. [W2](./W2-cloud-box-and-preflight.md) and [W3](./W3-run-your-factory.md) both append it to a shell rc, so it survives a new terminal. Every other path on this page is written out from it.
39+
- `$SFI_PATH` and `$MY_RIG_PATH` set in your shell. [W2](./W2-cloud-box-and-preflight.md) and [W3](./W3-run-your-factory.md) append the first to a shell rc, [L1 step 1](./L1-plan-your-factory.md#1-register-your-repo-as-a-rig) the second, so both survive a new terminal. Every other path on this page is written out from them.
4040

4141
## Part 1: Self-improvement loops
4242

@@ -85,7 +85,7 @@ So the loop has four parts and the fourth is not optional: read a signal, find a
8585
**Copy and paste**
8686

8787
```bash
88-
cd "$SFI_PATH/<your-rig-name>"
88+
cd "$MY_RIG_PATH"
8989
bd list --status blocked --json | jq -r '.[] | "\(.id) \(.metadata.blocker_reason // "")"'
9090
cd "$SFI_PATH/factory1"
9191
gc order history
@@ -175,14 +175,14 @@ You have been in contact with a factory for a day and a half. Something in that
175175
**Copy and paste**
176176

177177
```bash
178-
mkdir -p "$SFI_PATH/<your-rig-name>/docs/current"
179-
nano "$SFI_PATH/<your-rig-name>/docs/current/findings.md"
178+
mkdir -p "$MY_RIG_PATH/docs/current"
179+
nano "$MY_RIG_PATH/docs/current/findings.md"
180180
```
181181

182182
Write one finding, in this shape: what you expected, what happened, what you would tell the next person. Three sentences is a complete entry. Then commit it:
183183

184184
```bash
185-
cd "$SFI_PATH/<your-rig-name>"
185+
cd "$MY_RIG_PATH"
186186
git add docs/current/findings.md
187187
git commit -m "Record first factory findings"
188188
```
@@ -285,7 +285,7 @@ Rig scope, and it sits directly on the base factory. Now write a bead that descr
285285
**Copy and paste**
286286

287287
```bash
288-
cd "$SFI_PATH/<your-rig-name>"
288+
cd "$MY_RIG_PATH"
289289
bd create --title "Add row-level security to the reports table" --type task --priority 2 \
290290
-d "Scope every read of the reports table to the caller's tenant."
291291
cd "$SFI_PATH/factory1"
@@ -336,7 +336,7 @@ None of it is exotic machinery. Each one is an order, a fragment or a formula, a
336336
cd "$SFI_PATH/factory1"
337337
gc order list
338338
gc order history
339-
cd "$SFI_PATH/<your-rig-name>"
339+
cd "$MY_RIG_PATH"
340340
bd list --status blocked
341341
test -f docs/current/findings.md && echo "findings: present"
342342
```

0 commit comments

Comments
 (0)