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.

Helper: accept a Windows drive-letter workspace path

Eoghan Henn65a234569ab5
diff --git a/references/environments.md b/references/environments.md
index 182cb0b..19ab7bb 100644
--- a/references/environments.md
+++ b/references/environments.md
@@ -234,6 +234,14 @@ script paragraphs and keep the rest — the inline id snippet in SKILL.md is
then the write path, and the `find … grep` above is the lookup, with its
checkpoint line written by hand in the same batch.
+On Windows, pin the drive-letter form (`C:/Users/<user>/...`): PowerShell,
+cmd and Git Bash all accept it ("Paths handed across a boundary are
+resolved from the far side"), and `scripts/new-observation.sh` converts it
+with `cygpath` and prints the created path back in that form. Where the
+command runs from PowerShell rather than Git Bash, a bare `bash` may not
+resolve (Git for Windows' default PATH option adds only `Git\cmd`) or may
+start WSL's bash instead; name Git's `bash.exe` by its full path there.
+
### Anchoring the workspace
SKILL.md's `[workspace folder]` definition states the rule; this is where
diff --git a/scripts/new-observation.sh b/scripts/new-observation.sh
index 9ce7d71..9c0279f 100755
--- a/scripts/new-observation.sh
+++ b/scripts/new-observation.sh
@@ -55,6 +55,15 @@ esac
if [ -z "$root" ]; then
echo "no workspace root: pass it as the second argument or set TASK_OBSERVER_WORKSPACE" >&2; exit 1
fi
+# A Windows drive path (C:/... or C:\...) is absolute there and relative on
+# POSIX, so it is accepted only where cygpath can convert it (Git Bash, MSYS,
+# Cygwin); the printed path is converted back, into the form the pin used.
+pin_form=
+case $root in
+ ([A-Za-z]:[/\\]*)
+ command -v cygpath >/dev/null 2>&1 || { echo "workspace root is a drive-letter path but cygpath is not available to convert it: got '$root'" >&2; exit 1; }
+ root=$(cygpath -u "$root"); pin_form=-m ;;
+esac
case $root in
(/*) ;;
(*) echo "workspace root must be an ABSOLUTE path, never relative to the cwd: got '$root'" >&2; exit 1 ;;
@@ -160,4 +169,4 @@ top_claim=$(for p in "$c"/[0-9]*; do [ -e "$p" ] && printf '%s\n' "${p##*/}"; do
top_claim=$((10#${top_claim:-0})); [ "$top_claim" -gt "$next_id" ] || top_claim=$next_id
printf '%s\n' "$top_claim" > "$d/archive/.id-floor" || { echo "FLOOR WRITE FAILED — $d/archive/.id-floor (the file $f exists; fix the floor by hand)" >&2; exit 1; }
-printf '%s\n' "$f"
+if [ -n "$pin_form" ]; then cygpath "$pin_form" "$f"; else printf '%s\n' "$f"; fi