fix(learn): guard the state-root lookup in Prune; re-measure the learn ceiling

Skill-Size: 2586→2707 bytes (learn/SKILL.md.tmpl)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-27 23:51:31 +00:00
1 parent 92c90ba66e
commit 205ea0e2e8
4 files changed
+14 -8

No files matched your search

+6 -3
View File
@@ -121,7 +121,10 @@ Flag each learning that is:
- **CONFLICT**: the same key appears under two types with opposing insights (within one type the latest entry already wins).
For each flagged entry, unless the user already approved the action, ask: remove, keep, or update.
- Remove: delete its lines (that key and type) from `$GSTACK_STATE_ROOT/projects/$SLUG/learnings.jsonl`, where
`SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG)` and
`GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT)`. Leave every other line as it is.
- Remove: delete its lines (that key and type) from the file this prints, leaving every other line as it is:
```bash
SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG)
GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT); : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}"
echo "$GSTACK_STATE_ROOT/projects/$SLUG/learnings.jsonl"
```
- Update: log a corrected entry with the same key and type; the latest one wins.
+6 -3
View File
@@ -48,7 +48,10 @@ Flag each learning that is:
- **CONFLICT**: the same key appears under two types with opposing insights (within one type the latest entry already wins).
For each flagged entry, unless the user already approved the action, ask: remove, keep, or update.
- Remove: delete its lines (that key and type) from `$GSTACK_STATE_ROOT/projects/$SLUG/learnings.jsonl`, where
`SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG)` and
`GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT)`. Leave every other line as it is.
- Remove: delete its lines (that key and type) from the file this prints, leaving every other line as it is:
```bash
SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG)
GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT); : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}"
echo "$GSTACK_STATE_ROOT/projects/$SLUG/learnings.jsonl"
```
- Update: log a corrected entry with the same key and type; the latest one wins.