From c375788e6ca421c70f567036fa0d84c4b01520b4 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 7 Jun 2026 09:53:21 -0700 Subject: [PATCH] feat(memory): surface active decisions at session start + capture nudge (Context Recovery) Context Recovery now shows recent scope-relevant active decisions (bounded read of decisions.active.json via gstack-decision-search) and instructs the agent to treat them as settled calls and to log durable decisions/reversals. Closes the Phase-1 capture->curate->resurface loop, reliable + file-only. Regen across all hosts folded in (squash-with-regen); parity 10/10, freshness green. Co-Authored-By: Claude Opus 4.8 (1M context) --- autoplan/SKILL.md | 7 +++++++ canary/SKILL.md | 7 +++++++ codex/SKILL.md | 7 +++++++ context-restore/SKILL.md | 7 +++++++ context-save/SKILL.md | 7 +++++++ cso/SKILL.md | 7 +++++++ design-consultation/SKILL.md | 7 +++++++ design-html/SKILL.md | 7 +++++++ design-review/SKILL.md | 7 +++++++ design-shotgun/SKILL.md | 7 +++++++ devex-review/SKILL.md | 7 +++++++ document-generate/SKILL.md | 7 +++++++ document-release/SKILL.md | 7 +++++++ health/SKILL.md | 7 +++++++ investigate/SKILL.md | 7 +++++++ ios-clean/SKILL.md | 7 +++++++ ios-design-review/SKILL.md | 7 +++++++ ios-fix/SKILL.md | 7 +++++++ ios-qa/SKILL.md | 7 +++++++ ios-sync/SKILL.md | 7 +++++++ land-and-deploy/SKILL.md | 7 +++++++ landing-report/SKILL.md | 7 +++++++ learn/SKILL.md | 7 +++++++ office-hours/SKILL.md | 7 +++++++ open-gstack-browser/SKILL.md | 7 +++++++ pair-agent/SKILL.md | 7 +++++++ plan-ceo-review/SKILL.md | 7 +++++++ plan-design-review/SKILL.md | 7 +++++++ plan-devex-review/SKILL.md | 7 +++++++ plan-eng-review/SKILL.md | 7 +++++++ plan-tune/SKILL.md | 7 +++++++ qa-only/SKILL.md | 7 +++++++ qa/SKILL.md | 7 +++++++ retro/SKILL.md | 7 +++++++ review/SKILL.md | 7 +++++++ scrape/SKILL.md | 7 +++++++ .../preamble/generate-context-recovery.ts | 9 ++++++++- setup-deploy/SKILL.md | 7 +++++++ setup-gbrain/SKILL.md | 7 +++++++ ship/SKILL.md | 7 +++++++ skillify/SKILL.md | 7 +++++++ spec/SKILL.md | 14 ++++++++++++++ sync-gbrain/SKILL.md | 7 +++++++ test/fixtures/golden/claude-ship-SKILL.md | 8 -------- test/fixtures/golden/codex-ship-SKILL.md | 15 --------------- test/fixtures/golden/factory-ship-SKILL.md | 11 ----------- 46 files changed, 309 insertions(+), 35 deletions(-) diff --git a/autoplan/SKILL.md b/autoplan/SKILL.md index f8c20cd59..fa6415edf 100644 --- a/autoplan/SKILL.md +++ b/autoplan/SKILL.md @@ -589,12 +589,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/canary/SKILL.md b/canary/SKILL.md index e7a1715f8..1c779b0e7 100644 --- a/canary/SKILL.md +++ b/canary/SKILL.md @@ -581,12 +581,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/codex/SKILL.md b/codex/SKILL.md index af351d7f1..b91614398 100644 --- a/codex/SKILL.md +++ b/codex/SKILL.md @@ -584,12 +584,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/context-restore/SKILL.md b/context-restore/SKILL.md index 7a272722e..9d27b1204 100644 --- a/context-restore/SKILL.md +++ b/context-restore/SKILL.md @@ -585,12 +585,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/context-save/SKILL.md b/context-save/SKILL.md index 014407fbe..e69320910 100644 --- a/context-save/SKILL.md +++ b/context-save/SKILL.md @@ -584,12 +584,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/cso/SKILL.md b/cso/SKILL.md index ebacf1ac0..87159e107 100644 --- a/cso/SKILL.md +++ b/cso/SKILL.md @@ -587,12 +587,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/design-consultation/SKILL.md b/design-consultation/SKILL.md index 9bab21e2d..d11cb84c5 100644 --- a/design-consultation/SKILL.md +++ b/design-consultation/SKILL.md @@ -607,12 +607,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/design-html/SKILL.md b/design-html/SKILL.md index f6e9e17f8..69549e8a8 100644 --- a/design-html/SKILL.md +++ b/design-html/SKILL.md @@ -588,12 +588,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/design-review/SKILL.md b/design-review/SKILL.md index e874a94aa..a4aa27b20 100644 --- a/design-review/SKILL.md +++ b/design-review/SKILL.md @@ -585,12 +585,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/design-shotgun/SKILL.md b/design-shotgun/SKILL.md index 9fd662ce6..9a932cce1 100644 --- a/design-shotgun/SKILL.md +++ b/design-shotgun/SKILL.md @@ -602,12 +602,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/devex-review/SKILL.md b/devex-review/SKILL.md index 14ed560d2..23ff02880 100644 --- a/devex-review/SKILL.md +++ b/devex-review/SKILL.md @@ -587,12 +587,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/document-generate/SKILL.md b/document-generate/SKILL.md index 2c7e6f072..57807cf58 100644 --- a/document-generate/SKILL.md +++ b/document-generate/SKILL.md @@ -587,12 +587,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/document-release/SKILL.md b/document-release/SKILL.md index 43ba9adb1..435a1c80b 100644 --- a/document-release/SKILL.md +++ b/document-release/SKILL.md @@ -585,12 +585,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/health/SKILL.md b/health/SKILL.md index 921a7b5b4..a5947a00c 100644 --- a/health/SKILL.md +++ b/health/SKILL.md @@ -583,12 +583,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/investigate/SKILL.md b/investigate/SKILL.md index daf6be6d8..4d15c052f 100644 --- a/investigate/SKILL.md +++ b/investigate/SKILL.md @@ -622,12 +622,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/ios-clean/SKILL.md b/ios-clean/SKILL.md index c9073b6d5..1be1417bc 100644 --- a/ios-clean/SKILL.md +++ b/ios-clean/SKILL.md @@ -585,12 +585,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/ios-design-review/SKILL.md b/ios-design-review/SKILL.md index 7bfbdd851..11148eb52 100644 --- a/ios-design-review/SKILL.md +++ b/ios-design-review/SKILL.md @@ -587,12 +587,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/ios-fix/SKILL.md b/ios-fix/SKILL.md index 2d1c3d4b1..920ee1201 100644 --- a/ios-fix/SKILL.md +++ b/ios-fix/SKILL.md @@ -588,12 +588,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/ios-qa/SKILL.md b/ios-qa/SKILL.md index 0d40c16e5..12dbfad1e 100644 --- a/ios-qa/SKILL.md +++ b/ios-qa/SKILL.md @@ -591,12 +591,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/ios-sync/SKILL.md b/ios-sync/SKILL.md index e7a803924..849dbba86 100644 --- a/ios-sync/SKILL.md +++ b/ios-sync/SKILL.md @@ -585,12 +585,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/land-and-deploy/SKILL.md b/land-and-deploy/SKILL.md index 2eb9faa6c..e280fd6c0 100644 --- a/land-and-deploy/SKILL.md +++ b/land-and-deploy/SKILL.md @@ -580,12 +580,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/landing-report/SKILL.md b/landing-report/SKILL.md index aec9978ba..aa72f73bf 100644 --- a/landing-report/SKILL.md +++ b/landing-report/SKILL.md @@ -581,12 +581,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/learn/SKILL.md b/learn/SKILL.md index 08a78b23c..a00cf6aca 100644 --- a/learn/SKILL.md +++ b/learn/SKILL.md @@ -583,12 +583,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/office-hours/SKILL.md b/office-hours/SKILL.md index efa58f7de..58469c8fa 100644 --- a/office-hours/SKILL.md +++ b/office-hours/SKILL.md @@ -618,12 +618,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/open-gstack-browser/SKILL.md b/open-gstack-browser/SKILL.md index 64a93770e..962ba02d7 100644 --- a/open-gstack-browser/SKILL.md +++ b/open-gstack-browser/SKILL.md @@ -580,12 +580,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/pair-agent/SKILL.md b/pair-agent/SKILL.md index 533a29dc7..8be072512 100644 --- a/pair-agent/SKILL.md +++ b/pair-agent/SKILL.md @@ -582,12 +582,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/plan-ceo-review/SKILL.md b/plan-ceo-review/SKILL.md index 57cbf5464..80d2dd563 100644 --- a/plan-ceo-review/SKILL.md +++ b/plan-ceo-review/SKILL.md @@ -612,12 +612,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/plan-design-review/SKILL.md b/plan-design-review/SKILL.md index b1b110ae1..00f199786 100644 --- a/plan-design-review/SKILL.md +++ b/plan-design-review/SKILL.md @@ -584,12 +584,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/plan-devex-review/SKILL.md b/plan-devex-review/SKILL.md index 7336b70a5..c43dd8063 100644 --- a/plan-devex-review/SKILL.md +++ b/plan-devex-review/SKILL.md @@ -590,12 +590,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/plan-eng-review/SKILL.md b/plan-eng-review/SKILL.md index c4ec10bb6..d3fed23d5 100644 --- a/plan-eng-review/SKILL.md +++ b/plan-eng-review/SKILL.md @@ -588,12 +588,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/plan-tune/SKILL.md b/plan-tune/SKILL.md index 41c45342e..8e8027ef7 100644 --- a/plan-tune/SKILL.md +++ b/plan-tune/SKILL.md @@ -593,12 +593,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/qa-only/SKILL.md b/qa-only/SKILL.md index db1c3dd08..00d94b9a6 100644 --- a/qa-only/SKILL.md +++ b/qa-only/SKILL.md @@ -583,12 +583,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/qa/SKILL.md b/qa/SKILL.md index c5fdf9b56..17f8016dd 100644 --- a/qa/SKILL.md +++ b/qa/SKILL.md @@ -589,12 +589,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/retro/SKILL.md b/retro/SKILL.md index 287f24e35..87ad1efe8 100644 --- a/retro/SKILL.md +++ b/retro/SKILL.md @@ -600,12 +600,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/review/SKILL.md b/review/SKILL.md index 4d8049d54..f3c725ea2 100644 --- a/review/SKILL.md +++ b/review/SKILL.md @@ -585,12 +585,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/scrape/SKILL.md b/scrape/SKILL.md index 0af5db506..af0e9e218 100644 --- a/scrape/SKILL.md +++ b/scrape/SKILL.md @@ -581,12 +581,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/scripts/resolvers/preamble/generate-context-recovery.ts b/scripts/resolvers/preamble/generate-context-recovery.ts index 23f35c3e7..c8981bc51 100644 --- a/scripts/resolvers/preamble/generate-context-recovery.ts +++ b/scripts/resolvers/preamble/generate-context-recovery.ts @@ -23,9 +23,16 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ${binDir}/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi \`\`\` -If artifacts are listed, read the newest useful one. If \`LAST_SESSION\` or \`LATEST_CHECKPOINT\` appears, give a 2-sentence welcome back summary. If \`RECENT_PATTERN\` clearly implies a next skill, suggest it once.`; +If artifacts are listed, read the newest useful one. If \`LAST_SESSION\` or \`LATEST_CHECKPOINT\` appears, give a 2-sentence welcome back summary. If \`RECENT_PATTERN\` clearly implies a next skill, suggest it once. + +**Cross-session decisions.** If \`ACTIVE DECISIONS\` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for \`${binDir}/gstack-decision-search\` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with \`${binDir}/gstack-decision-log\` (\`--supersede \` for a reversal). Reliable and local; gbrain not required.`; } diff --git a/setup-deploy/SKILL.md b/setup-deploy/SKILL.md index a35ab9764..1602f73e2 100644 --- a/setup-deploy/SKILL.md +++ b/setup-deploy/SKILL.md @@ -584,12 +584,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/setup-gbrain/SKILL.md b/setup-gbrain/SKILL.md index cad27fcec..52244df46 100644 --- a/setup-gbrain/SKILL.md +++ b/setup-gbrain/SKILL.md @@ -583,12 +583,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/ship/SKILL.md b/ship/SKILL.md index ecf203787..750a51d05 100644 --- a/ship/SKILL.md +++ b/ship/SKILL.md @@ -585,12 +585,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/skillify/SKILL.md b/skillify/SKILL.md index e7911473e..0ecd2965f 100644 --- a/skillify/SKILL.md +++ b/skillify/SKILL.md @@ -581,12 +581,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/spec/SKILL.md b/spec/SKILL.md index 7279b9c37..2da327d96 100644 --- a/spec/SKILL.md +++ b/spec/SKILL.md @@ -582,12 +582,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. @@ -1593,12 +1600,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/sync-gbrain/SKILL.md b/sync-gbrain/SKILL.md index 48125af2c..59c0d3d83 100644 --- a/sync-gbrain/SKILL.md +++ b/sync-gbrain/SKILL.md @@ -583,12 +583,19 @@ if [ -d "$_PROJ" ]; then fi _LATEST_CP=$(find "$_PROJ/checkpoints" -name "*.md" -type f 2>/dev/null | xargs ls -t 2>/dev/null | head -1) [ -n "$_LATEST_CP" ] && echo "LATEST_CHECKPOINT: $_LATEST_CP" + if [ -f "$_PROJ/decisions.active.json" ]; then + echo "--- ACTIVE DECISIONS (recent, scope-relevant) ---" + ~/.claude/skills/gstack/bin/gstack-decision-search --recent 5 2>/dev/null + echo "--- END DECISIONS ---" + fi echo "--- END ARTIFACTS ---" fi ``` If artifacts are listed, read the newest useful one. If `LAST_SESSION` or `LATEST_CHECKPOINT` appears, give a 2-sentence welcome back summary. If `RECENT_PATTERN` clearly implies a next skill, suggest it once. +**Cross-session decisions.** If `ACTIVE DECISIONS` are listed, treat them as prior settled calls with their rationale — do not silently re-litigate them; if you're about to reverse one, say so explicitly. Reach for `~/.claude/skills/gstack/bin/gstack-decision-search` whenever a question touches a past decision ("what did we decide / why / did we try"). When you or the user make a DURABLE decision (architecture, scope, tool/vendor choice, or a reversal) — NOT a turn-level or trivial choice — log it with `~/.claude/skills/gstack/bin/gstack-decision-log` (`--supersede ` for a reversal). Reliable and local; gbrain not required. + ## Writing Style (skip entirely if `EXPLAIN_LEVEL: terse` appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output) Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality. diff --git a/test/fixtures/golden/claude-ship-SKILL.md b/test/fixtures/golden/claude-ship-SKILL.md index ecf203787..91517bce6 100644 --- a/test/fixtures/golden/claude-ship-SKILL.md +++ b/test/fixtures/golden/claude-ship-SKILL.md @@ -22,7 +22,6 @@ triggers: - ## When to invoke this skill Use when asked to "ship", "deploy", @@ -404,7 +403,6 @@ Before calling AskUserQuestion, verify: - [ ] If you split, you checked dependencies between options before firing the chain - [ ] If a per-option Hold fires, you stopped the chain immediately (didn't queue) - ## Artifacts Sync (skill start) ```bash @@ -502,8 +500,6 @@ else fi ``` - - Privacy stop-gate: if output shows `ARTIFACTS_SYNC: off`, `artifacts_sync_mode_prompted` is `false`, and gbrain is on PATH or `gbrain doctor --fast --json` works, ask once: > gstack can publish your artifacts (CEO plans, designs, reports) to a private GitHub repo that GBrain indexes across machines. How much should sync? @@ -530,7 +526,6 @@ At skill END before telemetry: "~/.claude/skills/gstack/bin/gstack-brain-sync" --once 2>/dev/null || true ``` - ## Model-Specific Behavioral Patch (claude) The following nudges are tuned for the claude model family. They are @@ -604,7 +599,6 @@ Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format i Curated jargon list lives at `~/.claude/skills/gstack/scripts/jargon-list.json` (80+ terms). On the first jargon term you encounter this session, Read that file once; treat the `terms` array as the canonical list. The list is repo-owned and may grow between releases. - ## Completeness Principle — Boil the Lake AI makes completeness cheap. Recommend complete lakes (tests, edge cases, error paths); flag oceans (rewrites, multi-quarter migrations). @@ -780,8 +774,6 @@ branch name wherever the instructions say "the base branch" or ``. --- - - # Ship: Fully Automated Ship Workflow You are running the `/ship` workflow. This is a **non-interactive, fully automated** workflow. Do NOT ask for confirmation at any step. The user said `/ship` which means DO IT. Run straight through and output the PR URL at the end. diff --git a/test/fixtures/golden/codex-ship-SKILL.md b/test/fixtures/golden/codex-ship-SKILL.md index 3636fff95..6d70531be 100644 --- a/test/fixtures/golden/codex-ship-SKILL.md +++ b/test/fixtures/golden/codex-ship-SKILL.md @@ -390,7 +390,6 @@ Before calling AskUserQuestion, verify: - [ ] If you split, you checked dependencies between options before firing the chain - [ ] If a per-option Hold fires, you stopped the chain immediately (didn't queue) - ## Artifacts Sync (skill start) ```bash @@ -488,8 +487,6 @@ else fi ``` - - Privacy stop-gate: if output shows `ARTIFACTS_SYNC: off`, `artifacts_sync_mode_prompted` is `false`, and gbrain is on PATH or `gbrain doctor --fast --json` works, ask once: > gstack can publish your artifacts (CEO plans, designs, reports) to a private GitHub repo that GBrain indexes across machines. How much should sync? @@ -516,7 +513,6 @@ At skill END before telemetry: "$GSTACK_BIN/gstack-brain-sync" --once 2>/dev/null || true ``` - ## Model-Specific Behavioral Patch (claude) The following nudges are tuned for the claude model family. They are @@ -590,7 +586,6 @@ Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format i Curated jargon list lives at `$GSTACK_ROOT/scripts/jargon-list.json` (80+ terms). On the first jargon term you encounter this session, Read that file once; treat the `terms` array as the canonical list. The list is repo-owned and may grow between releases. - ## Completeness Principle — Boil the Lake AI makes completeness cheap. Recommend complete lakes (tests, edge cases, error paths); flag oceans (rewrites, multi-quarter migrations). @@ -766,8 +761,6 @@ branch name wherever the instructions say "the base branch" or ``. --- - - # Ship: Fully Automated Ship Workflow You are running the `/ship` workflow. This is a **non-interactive, fully automated** workflow. Do NOT ask for confirmation at any step. The user said `/ship` which means DO IT. Run straight through and output the PR URL at the end. @@ -807,8 +800,6 @@ Never skip a verification step because a prior `/ship` run already performed it. --- - - --- ## Step 1: Pre-flight @@ -1937,8 +1928,6 @@ Substitute: TIMESTAMP = ISO 8601 datetime, STATUS = "clean" if 0 findings or "is Include any design findings alongside the code review findings. They follow the same Fix-First flow below. - - ### Step 9.3: Cross-review finding dedup Before classifying findings, check if any were previously skipped by the user in a prior review on this branch. @@ -2057,8 +2046,6 @@ For each comment in `comments`: --- - - ## Capture Learnings If you discovered a non-obvious pattern, pitfall, or architectural insight during @@ -2084,8 +2071,6 @@ staleness detection: if those files are later deleted, the learning can be flagg **Only log genuine discoveries.** Don't log obvious things. Don't log things the user already knows. A good test: would this insight save time in a future session? If yes, log it. - - ### Refresh learnings for the headline feature on this branch The top-of-skill learnings pull was keyed to "release ship" broadly. Before the VERSION/CHANGELOG step, re-pull learnings keyed to THIS branch's headline feature so any prior version-bump or CHANGELOG pitfalls for similar features surface. diff --git a/test/fixtures/golden/factory-ship-SKILL.md b/test/fixtures/golden/factory-ship-SKILL.md index c654feefc..dd2a091a0 100644 --- a/test/fixtures/golden/factory-ship-SKILL.md +++ b/test/fixtures/golden/factory-ship-SKILL.md @@ -392,7 +392,6 @@ Before calling AskUserQuestion, verify: - [ ] If you split, you checked dependencies between options before firing the chain - [ ] If a per-option Hold fires, you stopped the chain immediately (didn't queue) - ## Artifacts Sync (skill start) ```bash @@ -490,8 +489,6 @@ else fi ``` - - Privacy stop-gate: if output shows `ARTIFACTS_SYNC: off`, `artifacts_sync_mode_prompted` is `false`, and gbrain is on PATH or `gbrain doctor --fast --json` works, ask once: > gstack can publish your artifacts (CEO plans, designs, reports) to a private GitHub repo that GBrain indexes across machines. How much should sync? @@ -518,7 +515,6 @@ At skill END before telemetry: "$GSTACK_BIN/gstack-brain-sync" --once 2>/dev/null || true ``` - ## Model-Specific Behavioral Patch (claude) The following nudges are tuned for the claude model family. They are @@ -592,7 +588,6 @@ Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format i Curated jargon list lives at `$GSTACK_ROOT/scripts/jargon-list.json` (80+ terms). On the first jargon term you encounter this session, Read that file once; treat the `terms` array as the canonical list. The list is repo-owned and may grow between releases. - ## Completeness Principle — Boil the Lake AI makes completeness cheap. Recommend complete lakes (tests, edge cases, error paths); flag oceans (rewrites, multi-quarter migrations). @@ -768,8 +763,6 @@ branch name wherever the instructions say "the base branch" or ``. --- - - # Ship: Fully Automated Ship Workflow You are running the `/ship` workflow. This is a **non-interactive, fully automated** workflow. Do NOT ask for confirmation at any step. The user said `/ship` which means DO IT. Run straight through and output the PR URL at the end. @@ -809,8 +802,6 @@ Never skip a verification step because a prior `/ship` run already performed it. --- - - --- ## Step 1: Pre-flight @@ -2462,8 +2453,6 @@ staleness detection: if those files are later deleted, the learning can be flagg **Only log genuine discoveries.** Don't log obvious things. Don't log things the user already knows. A good test: would this insight save time in a future session? If yes, log it. - - ### Refresh learnings for the headline feature on this branch The top-of-skill learnings pull was keyed to "release ship" broadly. Before the VERSION/CHANGELOG step, re-pull learnings keyed to THIS branch's headline feature so any prior version-bump or CHANGELOG pitfalls for similar features surface.