diff --git a/canary/SKILL.md b/canary/SKILL.md index ccb6be0d5..62be3abaa 100644 --- a/canary/SKILL.md +++ b/canary/SKILL.md @@ -701,7 +701,7 @@ mkdir -p "$GSTACK_STATE_ROOT"/projects/$SLUG ``` Write a JSONL entry: `{"skill":"canary","timestamp":"","status":"","url":"","duration_min":,"alerts":}` -Append it to `~/.gstack/projects/$SLUG/canary-history.jsonl`; never overwrite history. +Append it to `$GSTACK_STATE_ROOT/projects/$SLUG/canary-history.jsonl` (the directory this block created); never overwrite history. ### Phase 7: Baseline Update diff --git a/health/SKILL.md b/health/SKILL.md index a4201c28d..9caae6350 100644 --- a/health/SKILL.md +++ b/health/SKILL.md @@ -642,7 +642,7 @@ eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p "$GSTA ``` Only when a numeric composite exists, append one JSONL line to -`~/.gstack/projects/$SLUG/health-history.jsonl`. Zero-check and capture-error runs +`$GSTACK_STATE_ROOT/projects/$SLUG/health-history.jsonl` (the `PROJECT_DIR` printed above). Zero-check and capture-error runs must leave any existing history unchanged: ```json @@ -663,7 +663,7 @@ with no `gbrain` field as `null` for that category. ## Step 6: Trend Analysis + Recommendations -Read the last 10 entries from `~/.gstack/projects/$SLUG/health-history.jsonl` (if the +Read the last 10 entries from `$GSTACK_STATE_ROOT/projects/$SLUG/health-history.jsonl` (if the file exists and has prior entries). ```bash diff --git a/ios-design-review/SKILL.md b/ios-design-review/SKILL.md index e74273d17..9a5381626 100644 --- a/ios-design-review/SKILL.md +++ b/ios-design-review/SKILL.md @@ -441,9 +441,16 @@ For each screen in the app, score 0-10 and explain what would push it to 10: ## Output Write a markdown report to -`~/.gstack/projects//ios-design-review-.md`. Include the -screenshots inline. The CEO/eng review skills can reference this report -when planning UI changes. +`$GSTACK_STATE_ROOT/projects//ios-design-review-.md`, using the +`PROJECT_DIR` this block prints: + +```bash +eval "$(~/.claude/skills/gstack/bin/gstack-paths)"; : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}" +eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p "$GSTACK_STATE_ROOT/projects/$SLUG" && echo "PROJECT_DIR: $GSTACK_STATE_ROOT/projects/$SLUG" +``` + +Include the screenshots inline. The CEO/eng review skills can reference this +report when planning UI changes. ## Failure modes diff --git a/plan-tune/SKILL.md b/plan-tune/SKILL.md index f3c01b738..50f5135a3 100644 --- a/plan-tune/SKILL.md +++ b/plan-tune/SKILL.md @@ -419,7 +419,7 @@ Each gate is guarded by a marker so the user is prompted at most once per choice `~/.gstack/.declared-setup-prompted` is missing → run `5-Q setup` below. Touch the marker after setup completes OR is declined. 3. **Dream-cycle gate.** If - `~/.gstack/projects//distillation-proposals.json` exists AND has + `$GSTACK_STATE_ROOT/projects//distillation-proposals.json` exists AND has `applied_at` missing on any proposal → run `Dream cycle review` below. Marker: each proposal carries its own `applied_at` so re-firing this gate naturally skips already-handled items. diff --git a/retro/SKILL.md b/retro/SKILL.md index 797d4b5b6..10a6cf518 100644 --- a/retro/SKILL.md +++ b/retro/SKILL.md @@ -589,8 +589,8 @@ Also check `RETRO_REF`: if it is not `origin/` (local-only repo, missin - `RETRO_CONTEXT: present` → Read `~/.gstack/retro-context.md`. It is user-authored and may contain meeting notes, calendar events, decisions, and other context that doesn't appear in git history. Incorporate it into the retro narrative where relevant. - `GREPTILE_HISTORY: present` → Read `~/.gstack/greptile-history.md`. Filter entries to the retro window by date. Count by type: `fix`, `fp`, `already-fixed`. Signal ratio = `(fix + already-fixed) / (fix + already-fixed + fp)`. Skip unparseable lines silently; if no entries fall in the window, skip the Greptile metric row. - `TODOS_FILE: present` → Read `TODOS.md`. Compute: total open TODOs (exclude the `## Completed` section), P0/P1 count, P2 count, items completed this period (Completed entries dated within the window), items added this period (cross-reference `COMMIT:` lines that touched TODOS.md). -- `SKILL_USAGE_LOG: present` → Read `~/.gstack/analytics/skill-usage.jsonl`. Filter to the window by `ts`. Separate skill activations (no `event` field) from hook fires (`event: "hook_fire"`). Aggregate by skill name. -- `EUREKA_LOG: present` → Read `~/.gstack/analytics/eureka.jsonl`. Filter to the window by `ts`. For each eureka moment note the skill that flagged it, the branch, and a one-line summary of the insight. +- `SKILL_USAGE_LOG: present` → Read the path it prints (`$GSTACK_STATE_ROOT/analytics/skill-usage.jsonl`). Filter to the window by `ts`. Separate skill activations (no `event` field) from hook fires (`event: "hook_fire"`). Aggregate by skill name. +- `EUREKA_LOG: present` → Read the path it prints (`$GSTACK_STATE_ROOT/analytics/eureka.jsonl`). Filter to the window by `ts`. For each eureka moment note the skill that flagged it, the branch, and a one-line summary of the insight. ### Step 2: Compute Metrics diff --git a/ship/sections/apple-release.md b/ship/sections/apple-release.md index 720fe0db2..71767d758 100644 --- a/ship/sections/apple-release.md +++ b/ship/sections/apple-release.md @@ -59,7 +59,7 @@ Build this question's options from a LIVE check of installed skills at ask time ## Archive and upload 1. Archive and export the signed Release build with `gym` (it drives xcodebuild and the signing minted in preflight). Projects with custom archive requirements may drop to `xcodebuild archive` directly; the output either way is an App Store-signed `.ipa`. -2. The upload is an external effect: run `pilot` (TestFlight) or `deliver` (App Store) under the durable-effect contract: before executing, append the key `appstore.upload..` to `~/.gstack/projects/$SLUG/apple-effects.log`; if the key is already present from a prior run (crash, retry), treat the upload as possibly-done and do NOT re-run it. Never re-upload on ambiguity; inspect App Store Connect for the build first. +2. The upload is an external effect: run `pilot` (TestFlight) or `deliver` (App Store) under the durable-effect contract: before executing, append the key `appstore.upload..` to `$GSTACK_STATE_ROOT/projects/$SLUG/apple-effects.log` (resolve the state root and slug in the same command that reads or appends it); if the key is already present from a prior run (crash, retry), treat the upload as possibly-done and do NOT re-run it. Never re-upload on ambiguity; inspect App Store Connect for the build first. 3. The cached session, the minted key, and every credential file are env- or file-level secrets: never argv, never echoed, never committed. 4. NEVER demand an app-specific password — the session MINTS the upload key instead. diff --git a/ship/sections/tests.md b/ship/sections/tests.md index edf969efa..6e18b5a0c 100644 --- a/ship/sections/tests.md +++ b/ship/sections/tests.md @@ -214,7 +214,7 @@ Running bare test migrations without INSTANCE hits an orphan DB and corrupts str Run independent test suites in parallel, each wrapped in the evidence ledger. The wrapper is transparent (streams output live, exit code passes through) and records `{command, exit, working-tree fingerprint, log path}` to -`~/.gstack/projects//-evidence.jsonl` — Step 16 cites this +`$GSTACK_STATE_ROOT/projects//-evidence.jsonl` — Step 16 cites this record instead of re-running when the content hasn't changed: ```bash diff --git a/test/fixtures/context-budget.json b/test/fixtures/context-budget.json index a306af558..8086e6932 100644 --- a/test/fixtures/context-budget.json +++ b/test/fixtures/context-budget.json @@ -7,7 +7,7 @@ "benchmark-models": 3819, "browse": 8137, "browser-skills/hackernews-frontpage": 371, - "canary": 13729, + "canary": 13740, "careful": 962, "codex": 15225, "context-restore": 10489, @@ -26,10 +26,10 @@ "gstack": 4145, "gstack-upgrade": 4711, "guard": 939, - "health": 11782, + "health": 11796, "investigate": 12434, "ios-clean": 8587, - "ios-design-review": 8674, + "ios-design-review": 8772, "ios-fix": 8476, "ios-qa": 11264, "ios-sync": 8602, @@ -48,10 +48,10 @@ "plan-design-review": 20517, "plan-devex-review": 17904, "plan-eng-review": 13518, - "plan-tune": 14730, + "plan-tune": 14732, "qa": 13568, "qa-only": 11740, - "retro": 19015, + "retro": 19031, "review": 19560, "scrape": 6874, "setup-browser-cookies": 3494, diff --git a/test/fixtures/golden/codex-ship-SKILL.md b/test/fixtures/golden/codex-ship-SKILL.md index b4a44cfff..d55d57a7a 100644 --- a/test/fixtures/golden/codex-ship-SKILL.md +++ b/test/fixtures/golden/codex-ship-SKILL.md @@ -939,7 +939,7 @@ Running bare test migrations without INSTANCE hits an orphan DB and corrupts str Run independent test suites in parallel, each wrapped in the evidence ledger. The wrapper is transparent (streams output live, exit code passes through) and records `{command, exit, working-tree fingerprint, log path}` to -`~/.gstack/projects//-evidence.jsonl` — Step 16 cites this +`$GSTACK_STATE_ROOT/projects//-evidence.jsonl` — Step 16 cites this record instead of re-running when the content hasn't changed: ```bash diff --git a/test/fixtures/golden/factory-ship-SKILL.md b/test/fixtures/golden/factory-ship-SKILL.md index 6f29cd2f5..ddde576c4 100644 --- a/test/fixtures/golden/factory-ship-SKILL.md +++ b/test/fixtures/golden/factory-ship-SKILL.md @@ -920,7 +920,7 @@ Running bare test migrations without INSTANCE hits an orphan DB and corrupts str Run independent test suites in parallel, each wrapped in the evidence ledger. The wrapper is transparent (streams output live, exit code passes through) and records `{command, exit, working-tree fingerprint, log path}` to -`~/.gstack/projects//-evidence.jsonl` — Step 16 cites this +`$GSTACK_STATE_ROOT/projects//-evidence.jsonl` — Step 16 cites this record instead of re-running when the content hasn't changed: ```bash