@scriptgun/workerc 0.4.0 → 0.4.1
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.
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: workerc:checkpoint
|
|
3
|
-
description: Create a save point —
|
|
3
|
+
description: Create a save point — commit current state for safe rollback
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Bash
|
|
7
7
|
- Glob
|
|
8
|
+
- Grep
|
|
8
9
|
- AskUserQuestion
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
<objective>
|
|
12
|
-
Create a named checkpoint
|
|
13
|
+
Create a named checkpoint by committing current changes. Uses the commit agent pattern (single-line, conventional format). Creates a real commit that's visible in history and revertable with `git revert`.
|
|
13
14
|
</objective>
|
|
14
15
|
|
|
15
16
|
<process>
|
|
@@ -46,27 +47,36 @@ AskUserQuestion(
|
|
|
46
47
|
**If "Auto-name":** Generate from latest progress log entries (e.g. "auth-middleware-working").
|
|
47
48
|
**If "I'll name it":** Wait for user input.
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
**Step 4: Stage files**
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
Get the list of files from `## Files` section of progress file.
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
For each file in ## Files, check if it has uncommitted changes.
|
|
55
|
+
Also include any other modified/untracked files shown in `git status`.
|
|
56
|
+
|
|
57
|
+
Stage all changed files with `git add` (specific files, NOT `git add -A`).
|
|
58
|
+
|
|
59
|
+
**Step 5: Commit**
|
|
60
|
+
|
|
61
|
+
Create a single-line checkpoint commit following the commit agent pattern:
|
|
54
62
|
|
|
55
63
|
```bash
|
|
56
|
-
git
|
|
57
|
-
git stash apply
|
|
64
|
+
git commit -m "checkpoint: {name}"
|
|
58
65
|
```
|
|
59
66
|
|
|
60
|
-
|
|
67
|
+
No description body, no co-author, no trailers. Just the single line.
|
|
68
|
+
|
|
69
|
+
**Step 6: Log and confirm**
|
|
70
|
+
|
|
71
|
+
Get the short hash with `git rev-parse --short HEAD`.
|
|
61
72
|
|
|
62
73
|
Log in progress file:
|
|
63
|
-
`- [x] ({YYYY-MM-DD HH:MM}) (checkpoint) {name}`
|
|
74
|
+
`- [x] ({YYYY-MM-DD HH:MM}) (checkpoint) {short_hash}: {name}`
|
|
64
75
|
|
|
65
76
|
Print:
|
|
66
77
|
```
|
|
67
|
-
Checkpoint
|
|
68
|
-
|
|
69
|
-
Rollback: git stash pop (applies last stash) or git checkout -- . (discard changes)
|
|
78
|
+
Checkpoint: {short_hash} — {name}
|
|
79
|
+
Rollback: git revert {short_hash}
|
|
70
80
|
```
|
|
71
81
|
|
|
72
82
|
STOP.
|
package/package.json
CHANGED