style(no-slop): remove every em-dash + banned words across all modules + capstone
Apply the no-ai-slop standard (now binding in AGENTS.md): the em-dash character is banned outright (restructured, not blind-replaced), plus the banned word/phrase list (delve, leverage, robust, seamless, truly, unlock, etc.). 0 em-dashes remain in modules + capstone; the only "robust" left is the planted M10 ai-change.patch trap. Module H1 titles use a colon separator. All deliberate teaching devices preserved; labs compile/parse (py/sh/yaml/json); no junk. AGENTS.md updated with the hard no-slop rules. 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:
@@ -1,4 +1,4 @@
|
||||
# Module 2 — Version Control as a Safety Net
|
||||
# Module 2: Version Control as a Safety Net
|
||||
|
||||
> **Version control is undo for the AI, and it's the AI's memory between sessions.** This is the one
|
||||
> module that makes every riskier thing in the rest of the course safe to attempt.
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Module 1** — you have a real local project (`tasks-app`), an editor, and a terminal, and you've
|
||||
- **Module 1**: you have a real local project (`tasks-app`), an editor, and a terminal, and you've
|
||||
felt the three seams where copy-paste breaks. This module installs the fix for the third seam (no
|
||||
undo, no record) and, surprisingly, the second (no memory across time) as well.
|
||||
|
||||
@@ -41,7 +41,7 @@ why." You can compare any two checkpoints, and you can return to any of them.
|
||||
That's it. Everything else (branches, remotes, merges) is built on "snapshots you can move
|
||||
between." For now we only need the local core: `init`, `commit`, `diff`, `log`, `restore`.
|
||||
|
||||
### Reframe 1 — Commits are undo for the AI
|
||||
### Reframe 1: Commits are undo for the AI
|
||||
|
||||
Module 1's third seam was: when the AI makes a mess, you have no checkpoint to return to. A commit
|
||||
*is* that checkpoint. The workflow becomes:
|
||||
@@ -75,7 +75,7 @@ the last commit. That's the everyday AI-undo. (Returning to an *older* commit, r
|
||||
the reflog are recovery topics with their own module (Module 12) once you've got remotes and PRs to
|
||||
make them meaningful. Here we only need "undo back to my last checkpoint.")
|
||||
|
||||
### Reframe 2 — The repo is durable memory the AI can read
|
||||
### Reframe 2: The repo is durable memory the AI can read
|
||||
|
||||
This is the part most people miss, and it directly fixes Module 1's *second* seam.
|
||||
|
||||
@@ -87,10 +87,10 @@ were we?" entirely from ground truth by reading Git:
|
||||
|
||||
| Command | What it tells a cold session |
|
||||
|---------|------------------------------|
|
||||
| `git status` | What's changed but **not yet committed** — including brand-new files Git isn't tracking yet. The "in-flight, unsaved" picture. |
|
||||
| `git diff` | The **actual line-level edits** sitting uncommitted. Not a summary — the real changes. |
|
||||
| `git log --oneline` | What's already **committed and settled** — the project's decision history. |
|
||||
| `git log main..HEAD` + the ahead/behind line in `git status` | How this branch compares to `main` and to the remote — the **not-yet-shared** work. (Fully meaningful once you have branches and a remote, Modules 6 and 8 — but the habit starts here.) |
|
||||
| `git status` | What's changed but **not yet committed**, including brand-new files Git isn't tracking yet. The "in-flight, unsaved" picture. |
|
||||
| `git diff` | The **actual line-level edits** sitting uncommitted. Not a summary; the real changes. |
|
||||
| `git log --oneline` | What's already **committed and settled**: the project's decision history. |
|
||||
| `git log main..HEAD` + the ahead/behind line in `git status` | How this branch compares to `main` and to the remote: the **not-yet-shared** work. (Fully meaningful once you have branches and a remote, Modules 6 and 8, but the habit starts here.) |
|
||||
|
||||
Together those cover every state a change can be in: **untracked, uncommitted, committed, and
|
||||
not-yet-pushed.** That's the entire surface area of "what's going on in this project," and a fresh
|
||||
@@ -138,7 +138,7 @@ Everything above is standard Git. What's *specific* to AI-assisted work:
|
||||
[git-scm.com](https://git-scm.com) or your package manager), the `tasks-app` folder from Module 1,
|
||||
and your AI assistant.
|
||||
|
||||
> **How you work with the AI in this lab — still the browser.** You haven't moved the AI into your
|
||||
> **How you work with the AI in this lab: still the browser.** You haven't moved the AI into your
|
||||
> editor yet; that's **Module 4** ("Getting the AI Out of the Browser"), and it comes *after* this
|
||||
> one on purpose. The whole point of this module is to install the safety net **first**: you only
|
||||
> let an AI edit your real files directly once you can see and revert exactly what it did. So for now,
|
||||
@@ -148,14 +148,14 @@ and your AI assistant.
|
||||
> Module 1, and that friction is exactly what Module 4 removes. You'll appreciate it more for having
|
||||
> felt it one more time with a net underneath you.
|
||||
|
||||
### Part A — First checkpoint
|
||||
### Part A: First checkpoint
|
||||
|
||||
1. In your project folder, initialize the repo and make the first commit:
|
||||
|
||||
```bash
|
||||
cd ~/ai-workflow-course/tasks-app
|
||||
git init -b main # start the repo with its first branch named "main" (Git 2.28+)
|
||||
git status # everything shows as "untracked" — Git sees the files but isn't saving them yet
|
||||
git status # everything shows as "untracked"; Git sees the files but isn't saving them yet
|
||||
```
|
||||
|
||||
> **Why `-b main`, and what if your Git is older.** Stock Git still names the first branch
|
||||
@@ -177,7 +177,7 @@ and your AI assistant.
|
||||
|
||||
**You now have a net.** Everything after this is recoverable.
|
||||
|
||||
### Part B — A change you can see and trust
|
||||
### Part B: A change you can see and trust
|
||||
|
||||
3. Get `cli.py` in front of your AI first. The browser chat can't see your disk, so you have to hand
|
||||
it the file: run `cat cli.py` and copy the output, or copy the contents straight from your editor.
|
||||
@@ -199,7 +199,7 @@ and your AI assistant.
|
||||
git commit -m "Add count command"
|
||||
```
|
||||
|
||||
### Part C — Recover from a mess (the whole point)
|
||||
### Part C: Recover from a mess (the whole point)
|
||||
|
||||
5. Now let the AI make a mess on purpose. Ask it to *"aggressively refactor `tasks.py`"* and paste
|
||||
the result over your file **without reading it**. Run the app. Maybe it's broken, maybe it's
|
||||
@@ -209,7 +209,7 @@ and your AI assistant.
|
||||
|
||||
```bash
|
||||
git status # shows tasks.py as modified
|
||||
git restore tasks.py # discard the change — back to your last commit, byte for byte
|
||||
git restore tasks.py # discard the change; back to your last commit, byte for byte
|
||||
git diff # empty: nothing changed. you're clean.
|
||||
python cli.py list # works again
|
||||
```
|
||||
@@ -218,14 +218,14 @@ and your AI assistant.
|
||||
*This is the safety net.* Internalize how cheap that just was; that cheapness is what lets you say
|
||||
yes to riskier AI work for the rest of the course.
|
||||
|
||||
### Part D — The repo as the AI's memory
|
||||
### Part D: The repo as the AI's memory
|
||||
|
||||
7. Make one more committed change and one *uncommitted* change, so the project has real state:
|
||||
|
||||
```bash
|
||||
# (with the AI) add a "help" command, then:
|
||||
git add . && git commit -m "Add help command"
|
||||
# (with the AI) start a "delete <index>" command but DON'T commit it — leave it modified
|
||||
# (with the AI) start a "delete <index>" command but DON'T commit it; leave it modified
|
||||
```
|
||||
|
||||
8. Open a **brand-new AI chat** (or clear the context). Paste it nothing about the project. Instead,
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
# A .gitignore tells Git which files to leave untracked. The rule of thumb: version the things a
|
||||
# human (or AI) authors, ignore the things a machine generates. For our tasks-app:
|
||||
|
||||
# Runtime state — generated by running the app, not authored. Not something you want in history.
|
||||
# Runtime state, generated by running the app, not authored. Not something you want in history.
|
||||
tasks.json
|
||||
|
||||
# Python bytecode caches — generated, never edited by hand.
|
||||
# Python bytecode caches: generated, never edited by hand.
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user