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.

Staging: resolve a symlinked skill path and prove the copy is distinct

Eoghan Hennd3348182398e
diff --git a/references/environments.md b/references/environments.md
index f1786ff..fa1fd9c 100644
--- a/references/environments.md
+++ b/references/environments.md
@@ -796,7 +796,9 @@ READING — the live file is what the loader loads — but the WRITE-BACK
path is the manager's source. The weekly review's staged-work
reconciliation (`diff -rq` staged vs live) is the check that catches a
reverted install: run it at the session after any install on a managed
-directory.
+directory. Where the entry is a symlink, resolve it before staging as
+well (`skill-authoring.md`, editing rule 1): a link copied as a link
+makes the staged path the live one.
## Git as an optional staging medium
diff --git a/references/skill-authoring.md b/references/skill-authoring.md
index 4f6580b..ca04c37 100644
--- a/references/skill-authoring.md
+++ b/references/skill-authoring.md
@@ -657,7 +657,21 @@ re-check exists, do not record the value — record how to obtain it.
safe, and the way to make it hold where no guard exists is to begin
every edit with the copy (`mkdir -p` the staging dir, `cp` the live
file in, `diff -q` to prove it matches), so the live path is never the
- one in hand. Scope and precedence: staging-only governs every context
+ one in hand. **Resolve the live path before copying** (`readlink -f`,
+ or `cd` into it and `pwd -P`) and prove the staged file is a distinct
+ file, not only an equal one. Where the skills entry is a symlink into
+ a checkout — a common dotfiles layout — `cp -R` of the entry copies the
+ link, the staged path becomes a second name for the live directory,
+ every "staged" edit lands in the live skill, and `diff -rq` passes
+ because it compares content through whatever both paths resolve to:
+ it verifies the copy is faithful, never that it is a copy. A proving
+ step that reports success exactly when staging has silently become
+ editing in place is worse than none. So after the copy: the staged
+ path is not itself a link (`[ ! -L "$s" ]`), and its `SKILL.md` has a
+ different inode from live's (`stat -c %i` on GNU, `stat -f %i` on
+ macOS) — refuse to edit when they match. The manifest's install
+ instructions name the resolved real path, since that is the file the
+ user must overwrite. Scope and precedence: staging-only governs every context
and every size of change. The direct-apply clause in SKILL.md ("Acting
on Observations") decides *when* a small change is made — now, rather
than at the next review — never *where*; it does not license an