codewhale.history 2.8.10 → 2.8.12
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/package.json +1 -1
- package/skills/teach-me/SKILL.md +15 -6
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codewhale.history",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.12",
|
|
4
4
|
"description": "CodeWhale utility commands: session history, tool listing, file snapshot, interactive code quiz — global install",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codewhale-history": "./_list_sessions.js",
|
package/skills/teach-me/SKILL.md
CHANGED
|
@@ -154,6 +154,8 @@ explanation. The model removes lines from the file and the user restores them.
|
|
|
154
154
|
|
|
155
155
|
#### Interactive Mode Per-Round Flow
|
|
156
156
|
|
|
157
|
+
0. **Snapshot git state.** Run `git status --porcelain <file>` before touching
|
|
158
|
+
it. Note whether the file was clean or already had uncommitted changes.
|
|
157
159
|
1. **Select** a snippet using the standard rules (section 2).
|
|
158
160
|
2. **Save** the original lines in memory.
|
|
159
161
|
3. **Remove** 1–3 lines from the actual file on disk using `edit_file`.
|
|
@@ -165,8 +167,10 @@ explanation. The model removes lines from the file and the user restores them.
|
|
|
165
167
|
completion.
|
|
166
168
|
7. **Re-read** the file. Diff the user's restored lines against the saved
|
|
167
169
|
original.
|
|
168
|
-
8. **Feedback** (see Interactive Evaluation below).
|
|
169
|
-
|
|
170
|
+
8. **Feedback** (see Interactive Evaluation below). After feedback, restore
|
|
171
|
+
the file with `git checkout -- <file>` for a byte-perfect reset. If the
|
|
172
|
+
file had pre-existing uncommitted changes (from step 0), restore the
|
|
173
|
+
original lines manually via `edit_file` instead and warn the user.
|
|
170
174
|
|
|
171
175
|
#### Thinking Suppression (Interactive Mode)
|
|
172
176
|
|
|
@@ -451,11 +455,16 @@ criteria for the Mechanics axis:
|
|
|
451
455
|
teaching session unless the user explicitly asks to switch modes.
|
|
452
456
|
- **Interactive mode file edits.** The model MAY remove lines from files to set
|
|
453
457
|
up reconstruction exercises. The model MUST NOT add or modify lines — only
|
|
454
|
-
the user restores code.
|
|
455
|
-
|
|
458
|
+
the user restores code.
|
|
459
|
+
- **Restore after each round.** After feedback in interactive mode, restore
|
|
460
|
+
each touched file with `git checkout -- <file>` for a byte-perfect reset
|
|
461
|
+
that leaves no git diff. If the file had pre-existing uncommitted changes
|
|
462
|
+
(noted in step 0), restore the original lines manually via `edit_file`
|
|
463
|
+
instead and warn the user.
|
|
456
464
|
- **Restore on session end.** When the session ends, check whether any files
|
|
457
|
-
still contain `# ... N lines removed ...` placeholders
|
|
458
|
-
|
|
465
|
+
still contain `# ... N lines removed ...` placeholders. If so, restore
|
|
466
|
+
them with `git checkout -- <file>` (or `edit_file` if pre-existing
|
|
467
|
+
changes were present).
|
|
459
468
|
|
|
460
469
|
## Verification
|
|
461
470
|
|