feat: componentize GStack 2 runtime and release integrity

This commit is contained in:
Sinabina
2026-07-20 14:16:23 -07:00
parent b0ea2296d1
commit f14445bb00
270 changed files with 9681 additions and 51572 deletions
+17 -10
View File
@@ -1,20 +1,27 @@
<!-- GENERATED by scripts/gstack2/generate-skill-tree.ts; do not edit. -->
<!-- GSTACK2_PROVENANCE source=freeze/SKILL.md.tmpl base=bb57306d98c97011b0919c6132705a15b1579781 blob=c0b31aa7f9f216fc5a351d91f4bcff68c828d090 baseline_render_sha256=f033b466da6f43edbdb57c23664bb544317a1c11a253701a35edc14986ebddfc ported_render_sha256=8beec3080fd0d6566b6ecf188d110d7283fb808fbc7c7201ee234191f9d3c5cd disposition=BUG_FIX -->
<!-- GSTACK2_PROVENANCE source=freeze/SKILL.md.tmpl base=bb57306d98c97011b0919c6132705a15b1579781 blob=c0b31aa7f9f216fc5a351d91f4bcff68c828d090 baseline_render_sha256=f033b466da6f43edbdb57c23664bb544317a1c11a253701a35edc14986ebddfc ported_render_sha256=433bb7c1909852c83978ae282c582590c5136abe56020e7d0be39749822c345b disposition=BUG_FIX -->
<!-- GSTACK2_ROUTING replacement=$debug --mode Diagnose-only --module freeze visibility=internal depth=standard mutation=safety-policy web=none -->
<!-- GSTACK2_LEGACY_BODY_START source=freeze -->
> **Safety Advisory:** This skill includes safety checks that verify file edits are within the allowed scope boundary before applying, and verify file writes are within the allowed scope boundary before applying. When using this skill, always pause and verify before executing potentially destructive operations. If uncertain about a command's safety, ask the user for confirmation before proceeding.
## Host-neutral runtime bindings
These assignments select stable paths only; they do not install anything or grant consent:
# /freeze — Restrict Edits to a Directory
```bash
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
GSTACK_ROOT="$GSTACK_HOME"
GSTACK_STATE_ROOT="$GSTACK_HOME"
GSTACK_BIN="$GSTACK_HOME/bin"
B="$GSTACK_BIN/browse"
D="$GSTACK_BIN/gstack-design"
P="$GSTACK_BIN/make-pdf"
```
# $debug --mode Diagnose-only --module freeze — Restrict Edits to a Directory
Lock file edits to a specific directory. Any Edit or Write operation targeting
a file outside the allowed path will be **blocked** (not just warned).
```bash
mkdir -p "${GSTACK_HOME:-$HOME/.gstack}"/analytics
echo '{"skill":"freeze","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> "${GSTACK_HOME:-$HOME/.gstack}"/analytics/skill-usage.jsonl 2>/dev/null || true
```
Canonical execution does not write engagement analytics or telemetry.
## Setup
@@ -42,8 +49,8 @@ echo "Freeze boundary set: $FREEZE_DIR"
```
Tell the user: "Edits are now restricted to `<path>/`. Any Edit or Write
outside this directory will be blocked. To change the boundary, run `/freeze`
again. To remove it, run `/unfreeze` or end the session."
outside this directory will be blocked. To change the boundary, run `$debug --mode Diagnose-only --module freeze`
again. To remove it, run `$debug --mode Diagnose-only --module unfreeze` or end the session."
## How it works
@@ -59,7 +66,7 @@ script reads it on every Edit/Write invocation.
- The trailing `/` on the freeze directory prevents `/src` from matching `/src-old`
- Freeze applies to Edit and Write tools only — Read, Bash, Glob, Grep are unaffected
- This prevents accidental edits, not a security boundary — Bash commands like `sed` can still modify files outside the boundary
- To deactivate, run `/unfreeze` or end the conversation
- To deactivate, run `$debug --mode Diagnose-only --module unfreeze` or end the conversation
<!-- GSTACK2_LEGACY_BODY_END source=freeze -->
<!-- GSTACK2_BUG_FIX_START pr=679 anchor=GSTACK2_FIX_679_MATCH_USER_LANGUAGE -->