merge: origin/main v1.0.0.0 into garrytan/fix-checkpoints

Main shipped the v1 prompts rewrite (simpler writing style + real LOC
receipts + /plan-tune observational substrate). Resolved conflicts:

- VERSION / package.json: bumped 0.18.5.0 → 1.0.1.0 (main is 1.0.0.0,
  this branch lands next).
- CHANGELOG: moved the /context-save + /context-restore entry to the
  top as v1.0.1.0, above main's v1.0.0.0. Also removed the em-dash
  variants in the new entry (ship voice rule).
- TODOS: kept both sections — Context skills (lane feature TODO) first,
  main's PACING_UPDATES_V0 + Plan Tune v2 deferrals below.
- Migration: renamed gstack-upgrade/migrations/v0.18.5.0.sh →
  v1.0.1.0.sh (matches new version). Test path updated.

preamble.ts auto-merged cleanly: main's question-tuning, explain_level,
and writing-style sections composed with my context-save/context-restore
routing rule.

All SKILL.md files regenerated via `bun run gen:skill-docs --host all`
per CLAUDE.md's "never resolve generated files by accepting either
side" rule. Golden fixtures (claude/codex/factory ship) also regenerated.

bun test: 0 failures.
This commit is contained in:
Garry Tan
2026-04-18 17:24:03 +08:00
83 changed files with 13485 additions and 186 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Migration: v1.0.0.0 — V1 writing style prompt
#
# What changed: tier-≥2 skills default to ELI10 writing style (jargon glossed on
# first use, outcome-framed questions, short sentences). Power users who prefer
# the older V0 prose can set `gstack-config set explain_level terse`.
#
# What this does: writes a "pending prompt" flag file. On the first tier-≥2 skill
# invocation after upgrade, the preamble reads the flag and asks the user once
# whether to keep the new default or opt into terse mode. Flag file is deleted
# after the user answers. Idempotent — safe to run multiple times.
#
# Affected: every user on v0.19.x and below who upgrades to v1.x
set -euo pipefail
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
PROMPTED_FLAG="$GSTACK_HOME/.writing-style-prompted"
PENDING_FLAG="$GSTACK_HOME/.writing-style-prompt-pending"
mkdir -p "$GSTACK_HOME"
# If the user has already answered the prompt at any point, skip.
if [ -f "$PROMPTED_FLAG" ]; then
exit 0
fi
# If the user has already explicitly set explain_level (either way), count that
# as an answer — they've made their choice, don't ask again.
EXPLAIN_LEVEL_SET="$("${HOME}/.claude/skills/gstack/bin/gstack-config" get explain_level 2>/dev/null || true)"
if [ -n "$EXPLAIN_LEVEL_SET" ]; then
touch "$PROMPTED_FLAG"
exit 0
fi
# Write the pending flag — preamble will see it on the first tier-≥2 skill invocation.
touch "$PENDING_FLAG"
echo " [v1.0.0.0] V1 writing style: you'll see a one-time prompt on your next skill run asking if you want the new default (glossed jargon, outcome framing) or the older terse prose."
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Migration: v0.18.5.0 — Remove stale /checkpoint skill installs
# Migration: v1.0.1.0 — Remove stale /checkpoint skill installs
#
# Claude Code ships /checkpoint as a native alias for /rewind, which was
# shadowing the gstack checkpoint skill. The skill has been split into
@@ -66,10 +66,10 @@ if [ -L "$OLD_TOPLEVEL" ]; then
target_real=$(resolve_real "$OLD_TOPLEVEL")
if [ -n "$GSTACK_ROOT_REAL" ] && path_inside "$target_real" "$GSTACK_ROOT_REAL"; then
rm "$OLD_TOPLEVEL"
echo " [v0.18.5.0] Removed stale /checkpoint symlink (was shadowing Claude Code's /rewind alias)."
echo " [v1.0.1.0] Removed stale /checkpoint symlink (was shadowing Claude Code's /rewind alias)."
removed_any=1
else
echo " [v0.18.5.0] Leaving $OLD_TOPLEVEL alone — symlink target is outside gstack."
echo " [v1.0.1.0] Leaving $OLD_TOPLEVEL alone — symlink target is outside gstack."
fi
elif [ -d "$OLD_TOPLEVEL" ]; then
# Regular directory. Only remove if it contains exactly one file named
@@ -79,13 +79,13 @@ elif [ -d "$OLD_TOPLEVEL" ]; then
target_real=$(resolve_real "$OLD_TOPLEVEL/SKILL.md")
if [ -n "$GSTACK_ROOT_REAL" ] && path_inside "$target_real" "$GSTACK_ROOT_REAL"; then
rm -r "$OLD_TOPLEVEL"
echo " [v0.18.5.0] Removed stale /checkpoint install directory (gstack prefix-mode)."
echo " [v1.0.1.0] Removed stale /checkpoint install directory (gstack prefix-mode)."
removed_any=1
else
echo " [v0.18.5.0] Leaving $OLD_TOPLEVEL alone — SKILL.md symlink target is outside gstack."
echo " [v1.0.1.0] Leaving $OLD_TOPLEVEL alone — SKILL.md symlink target is outside gstack."
fi
else
echo " [v0.18.5.0] Leaving $OLD_TOPLEVEL alone — not a gstack-owned install (has custom content)."
echo " [v1.0.1.0] Leaving $OLD_TOPLEVEL alone — not a gstack-owned install (has custom content)."
fi
fi
# Missing → no-op (idempotency).
@@ -93,12 +93,12 @@ fi
# --- Shape 2: ~/.claude/skills/gstack/checkpoint/ (gstack owns this dir unconditionally)
if [ -d "$OLD_NAMESPACED" ] || [ -L "$OLD_NAMESPACED" ]; then
rm -rf "$OLD_NAMESPACED"
echo " [v0.18.5.0] Removed stale ~/.claude/skills/gstack/checkpoint/ (replaced by context-save + context-restore)."
echo " [v1.0.1.0] Removed stale ~/.claude/skills/gstack/checkpoint/ (replaced by context-save + context-restore)."
removed_any=1
fi
if [ "$removed_any" = "1" ]; then
echo " [v0.18.5.0] /checkpoint is now Claude Code's native /rewind alias. Use /context-save to save state and /context-restore to resume."
echo " [v1.0.1.0] /checkpoint is now Claude Code's native /rewind alias. Use /context-save to save state and /context-restore to resume."
fi
exit 0