fix(modules-4,7,14): make the git demos/labs actually do what the prose claims
- M4 Part C now commits the reviewed `delete` change as the checkpoint, so Part D's `git restore .` returns to a delete-containing state (was wiping it). - M7 'watch it break': switch to an existing divergent branch so the "would be overwritten by checkout" refusal actually fires (git switch -c never did). - M7 Part C: demonstrate worktree isolation with existing add/list and distinct per-worktree data; move the new clear/count commands to after they exist. - M14 Part C: recover with `git revert HEAD` (Module 12, which precedes M14) so CI legitimately goes green; drop the wrong "Module 2's safety net" attribution. Closes #2 Closes #3 Closes #4 Closes #12 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT
This commit is contained in:
@@ -331,10 +331,24 @@ copy-paste loop back in Module 1, now done right.
|
||||
It should add tasks, delete one by index, and confirm the right task remains. If it fails, don't
|
||||
hand-fix it — tell the AI what broke and let it iterate (step 4 of the loop), then re-run.
|
||||
|
||||
8. **Commit the reviewed change — this is your new checkpoint.** It passed your own eyes and it
|
||||
passes the check, so lock it in:
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Add delete command (made via editor/CLI agent)"
|
||||
git log --oneline
|
||||
```
|
||||
|
||||
You just shipped a reviewed, multi-file change made by an AI editing your files directly — and the
|
||||
copy-paste loop never entered into it. This commit is now the clean state `git restore .` falls
|
||||
back to in the next part.
|
||||
|
||||
### Part D — Practice the revert (do this even though it works)
|
||||
|
||||
8. You only trust an undo you've used. Prove the net is under you: ask the tool for a deliberately
|
||||
throwaway change —
|
||||
9. You only trust an undo you've used. Your tree is clean — you just committed in Part C, which is
|
||||
exactly the safe setup the one rule demands. Prove the net is under you: ask the tool for a
|
||||
deliberately throwaway change —
|
||||
|
||||
> *"Rename every variable in `tasks.py` to single letters."*
|
||||
|
||||
@@ -348,18 +362,18 @@ copy-paste loop back in Module 1, now done right.
|
||||
|
||||
That's the Module 2 safety net catching a Module 4 mistake. Internalize how cheap that was.
|
||||
|
||||
### Part E — Commit the good change
|
||||
### Part E — Confirm you're back at your good state
|
||||
|
||||
9. Now commit the `delete` feature you kept in Part C (Part D's mess is already gone):
|
||||
10. Nothing left to commit — the `delete` feature went in back in Part C, and Part D's throwaway is
|
||||
already gone. Confirm the reviewed multi-file commit is your latest and the tree is clean:
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Add delete command (made via editor/CLI agent)"
|
||||
git log --oneline
|
||||
```
|
||||
```bash
|
||||
git log --oneline # "Add delete command…" is the latest commit
|
||||
git status # clean — the throwaway left no trace
|
||||
```
|
||||
|
||||
You just shipped a reviewed, multi-file change made by an AI editing your files directly — and the
|
||||
copy-paste loop never entered into it.
|
||||
That's the whole loop closed: a reviewed, multi-file change the AI made across both files is
|
||||
committed, and the mess you made on purpose vanished without touching it.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user