Skip to content

The meta-skill that builds and improves all your skills, including itself. Watches your work sessions (autonomous or human-led), captures patterns, corrections and judgement calls, and turns them into skill improvements and new skill candidates for your review. Practical application of the Augmented Expertise methodology. Open source: CC BY 4.0.

Session start: treat a folderless scratch directory as ephemeral

Eoghan Henn5e1601c20c5d
diff --git a/SKILL.md b/SKILL.md
index f28434b..214c74b 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -118,8 +118,8 @@ skill" (some upload paths keep only `SKILL.md`); its episodes do not run.
late, intermittent, and why the guard cannot live inside it") — load it
when setting up or diagnosing activation. Before creating or writing
anything: if the resolved workspace sits under an ephemeral path
- (`.claude/worktrees/`, a temporary clone), warn and re-anchor on the
- stable project path — state written there is lost at teardown; where
+ (`.claude/worktrees/`, a temporary clone, `scratch-workspaces/`), warn
+ and re-anchor on a stable path — state there is lost or orphaned; where
none resolves (a disposable worker), use report-back mode:
`references/environments.md` ("Claude Code Projects"). Then RUN the one
idempotent command in `references/observation-log.md` ("Workspace
diff --git a/references/environments.md b/references/environments.md
index 19ab7bb..fdfe943 100644
--- a/references/environments.md
+++ b/references/environments.md
@@ -283,6 +283,21 @@ block in `weekly-review.md` before consolidating anything — it defines
that case and the aggregate review that serves it. A reader who stops at
this paragraph consolidates a set that was meant to stay separate.
+**A session started without a project folder has no stable project
+identity.** In a desktop app that runs such a session in a per-session
+scratch directory (the tell is `scratch-workspaces/` or
+`scratch-<date>-<hash>` in the cwd), the project identity derived from
+that directory is new every session, so a log anchored on
+`~/.claude/projects/<project-id>/` survives on disk and is never read
+again: its open entries are never applied at session start and never
+reach a review. Treat the scratch directory as an ephemeral path
+(SKILL.md, Session Start step 1): anchor on the pinned path if one
+exists, otherwise on the user-scope workspace
+(`~/.claude/skill-observations/`, the path skills installed at user scope
+need anyway), and name the anchor in the start-up lines. Logs already
+written under scratch-derived identities are shards: consolidate their
+open entries as below.
+
**The fork rule as usually stated describes the harmless case.** "A second
**empty** log beside a populated one is a silent fork" — but an empty log
announces itself: the first scan returns nothing, and nobody trusts a