@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 — snapshot current state for safe rollback
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 of the current working state. Uses git to snapshot changes so you can rollback if the next steps go wrong. Logs checkpoint in progress file.
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
- Generate tag name: `checkpoint/{slug}/{YYYYMMDD-HHMM}` (e.g. `checkpoint/auth-middleware-working/20260210-1530`).
50
+ **Step 4: Stage files**
50
51
 
51
- **Step 4: Create checkpoint**
52
+ Get the list of files from `## Files` section of progress file.
52
53
 
53
- Stage all current changes and create a temporary commit + tag:
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 stash push -m "workerc-checkpoint: {name}"
57
- git stash apply
64
+ git commit -m "checkpoint: {name}"
58
65
  ```
59
66
 
60
- This creates a stash entry that acts as a named snapshot. The working tree stays exactly as it was.
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 created: {name}
68
- Stash: git stash list | grep "workerc-checkpoint: {name}"
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
@@ -34,5 +34,5 @@
34
34
  },
35
35
  "type": "module",
36
36
  "types": "./dist/init.d.ts",
37
- "version": "0.4.0"
37
+ "version": "0.4.1"
38
38
  }