@erclx/aitk 0.30.0 → 0.30.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.
|
@@ -16,6 +16,7 @@ Without this skill, the memory folder grows and never drains. Entries pile up re
|
|
|
16
16
|
- Rewrite a rule into the destination's voice instead of moving it unchanged
|
|
17
17
|
- Write the proposal to a receipt on disk and take no action until the user decides per item
|
|
18
18
|
- Keep a promotion on its own commit, since a change to how the agent operates should not ride inside a feature a reviewer is vetting for something else
|
|
19
|
+
- Confine the pass that runs after application to the one receipt it tested, so tidying up removes a file whose decisions are known to be resolved and leaves the pen and every untested receipt alone
|
|
19
20
|
|
|
20
21
|
## Must not
|
|
21
22
|
|
|
@@ -23,12 +24,14 @@ Without this skill, the memory folder grows and never drains. Entries pile up re
|
|
|
23
24
|
- Author a governance rule inline. Coding-standards rules have an owner and a scaffolding path, and a rule written here bypasses both.
|
|
24
25
|
- Mutate tracked files from the main worktree
|
|
25
26
|
- Answer a question raised in a decision slot while applying. Discussion and application are separate passes so an approval is never inferred from a reply.
|
|
27
|
+
- Delete a memory entry outside the approved-per-item pass. The folder is gitignored with no history behind it, so a removal any other phase makes has no undo and no record of what it took.
|
|
26
28
|
|
|
27
29
|
## Guards
|
|
28
30
|
|
|
29
31
|
- No memory folder at the main root: stop
|
|
30
32
|
- The folder holds only its index: stop with a pass, not an error
|
|
31
33
|
- Apply invoked from the main worktree: stop and name the worktree command
|
|
34
|
+
- Cleanup invoked with no receipt on disk: stop with a pass, not an error
|
|
32
35
|
|
|
33
36
|
## Out of scope
|
|
34
37
|
|
|
@@ -7,21 +7,22 @@ description: Reviews `.claude/memory/` and proposes per-entry actions (promote t
|
|
|
7
7
|
|
|
8
8
|
This skill drives the full memory review lifecycle in five phases. Pick the phase from what the user said and whether a review receipt already exists at `<main-root>/.claude/review/memory-review-*.md`.
|
|
9
9
|
|
|
10
|
-
| User intent
|
|
11
|
-
|
|
|
12
|
-
| "review memory", "promote memory" (no receipt) | Propose | review file only |
|
|
13
|
-
| "challenge the promotes" (receipt exists)
|
|
14
|
-
| "discuss", "respond to questions"
|
|
15
|
-
| "apply decisions", "commit", "ship the review"
|
|
16
|
-
| "cleanup", "
|
|
10
|
+
| User intent | Phase | Mutates |
|
|
11
|
+
| ---------------------------------------------------------------------- | --------- | ---------------------------- |
|
|
12
|
+
| "review memory", "promote memory", "sweep stale memories" (no receipt) | Propose | review file only |
|
|
13
|
+
| "challenge the promotes" (receipt exists) | Challenge | review file only |
|
|
14
|
+
| "discuss", "respond to questions" | Discuss | review file only |
|
|
15
|
+
| "apply decisions", "commit", "ship the review" | Apply | tracked files + memory files |
|
|
16
|
+
| "cleanup", "delete the receipt" | Cleanup | one review file |
|
|
17
17
|
|
|
18
|
-
If the user
|
|
18
|
+
If the user re-pings the skill with no new phrase and a receipt exists, default to Discuss when any `Decision:` contains `?`, otherwise Apply.
|
|
19
19
|
|
|
20
20
|
## Guards
|
|
21
21
|
|
|
22
22
|
- All `.claude/memory/` reads, edits, and deletes resolve at the main worktree root, not the current worktree. See Worktrees in `CLAUDE.md`.
|
|
23
23
|
- If no `.claude/memory/` directory exists at the main worktree root, stop: `❌ No .claude/memory/ directory found.`
|
|
24
24
|
- If `.claude/memory/` contains no `*.md` entries other than `MEMORY.md`, stop: `✅ No memory entries to review.`
|
|
25
|
+
- Cleanup is exempt from the two stops above. It works on receipts in `.claude/review/`, and a drained pen is the normal state once Apply has run, so a pen-shaped stop would strand the receipt it exists to delete.
|
|
25
26
|
- Resolve the main root via `git worktree list --porcelain | grep -m 1 '^worktree ' | cut -d' ' -f2-`, falling back to `pwd`. All review and memory reads anchor here.
|
|
26
27
|
|
|
27
28
|
## Propose phase
|
|
@@ -186,14 +187,17 @@ End with: `✅ Applied: <nums> | ⏭ Skipped: <nums> | 📝 Pending: <nums>`. Om
|
|
|
186
187
|
|
|
187
188
|
## Cleanup phase
|
|
188
189
|
|
|
189
|
-
Trigger: user says "cleanup"
|
|
190
|
+
Trigger: user says "cleanup" or "delete the receipt" after Apply has run.
|
|
190
191
|
|
|
191
|
-
|
|
192
|
-
2. Treat a `Skip` decision as terminal. Do not delete a memory just because it would Skip again next review. Target only entries whose decision value is exhausted: already-applied promotions and stale receipts.
|
|
193
|
-
3. Delete the review file itself.
|
|
194
|
-
4. Leave applied promotions, governance handoffs, and user-type memories alone.
|
|
192
|
+
Cleanup removes one receipt and nothing else. Apply is the only phase that deletes a memory entry, and it does so per approved item against a folder that is gitignored with no history behind it, so a deletion made anywhere else has no undo and leaves no record of what it took. A user asking to sweep stale memories wants Propose, which classifies entries and writes a decision slot per entry.
|
|
195
193
|
|
|
196
|
-
|
|
194
|
+
If no `.claude/review/memory-review-*.md` exists at the main root, stop: `✅ No review receipt to clean up.` Every other refusal in this skill carries a message, and the phase reads a receipt before it does anything else.
|
|
195
|
+
|
|
196
|
+
1. Read the latest `.claude/review/memory-review-*.md` at the main root and confirm Apply has run against it. If any item is still 📝 pending, stop and name the pending numbers.
|
|
197
|
+
2. Delete that one file. Leave every other receipt beside it in place, because the pending test above covers the file it read and nothing has tested the rest.
|
|
198
|
+
3. Leave every memory entry in place. A `Skip` decision is terminal, and applied promotions, governance handoffs, and user-type memories each stay as the review left them.
|
|
199
|
+
|
|
200
|
+
Do not promote, rewrite, or delete a memory entry. Receipts only.
|
|
197
201
|
|
|
198
202
|
## After completion
|
|
199
203
|
|
|
@@ -202,5 +206,6 @@ Output one line per action taken in the most recent phase:
|
|
|
202
206
|
- `✅ Promoted: .claude/memory/<memory-file> → <target>`
|
|
203
207
|
- `✅ Handed off: .claude/memory/<memory-file> → governance`
|
|
204
208
|
- `🗑 Deleted: .claude/memory/<memory-file>`
|
|
209
|
+
- `🗑 Swept: .claude/review/<review-file>`
|
|
205
210
|
|
|
206
211
|
If the user accepted nothing, output: `✅ No changes applied.`
|