From fa655b6e97d7d334a63c1a23198881ea7f185bc7 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Fri, 28 Aug 2026 01:46:39 +0000 Subject: [PATCH] =?UTF-8?q?feat(preamble):=20reuse=20ladder=20in=20Search?= =?UTF-8?q?=20Before=20Building=20=E2=80=94=20rungs=202-5=20of=20ponytail'?= =?UTF-8?q?s=20ladder,=20completeness=20kept?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tier-3+ skills gain a per-edit reflex the section only stated as research discipline: before writing new code, stop at the first rung that holds — repo helper, stdlib, native platform feature, installed dependency — then build the COMPLETE version of what remains. The closing clause is the explicit reconciliation with Boil the Ocean: the ladder governs structure, never coverage. Rungs 1/6/7 (YAGNI / one line / minimum that works) are deliberately NOT imported. Also ports ponytail's root-cause rule: one guard in the shared function beats a guard in every caller. Co-Authored-By: Claude Fable 5 --- autoplan/SKILL.md | 10 ++++++++++ codex/SKILL.md | 10 ++++++++++ design-consultation/SKILL.md | 10 ++++++++++ design-review/SKILL.md | 10 ++++++++++ devex-review/SKILL.md | 10 ++++++++++ ios-qa/SKILL.md | 10 ++++++++++ land-and-deploy/SKILL.md | 10 ++++++++++ office-hours/SKILL.md | 10 ++++++++++ plan-ceo-review/SKILL.md | 10 ++++++++++ plan-design-review/SKILL.md | 10 ++++++++++ plan-devex-review/SKILL.md | 10 ++++++++++ plan-eng-review/SKILL.md | 10 ++++++++++ qa-only/SKILL.md | 10 ++++++++++ qa/SKILL.md | 10 ++++++++++ review/SKILL.md | 10 ++++++++++ .../preamble/generate-search-before-building.ts | 10 ++++++++++ ship/SKILL.md | 10 ++++++++++ spec/SKILL.md | 10 ++++++++++ 18 files changed, 180 insertions(+) diff --git a/autoplan/SKILL.md b/autoplan/SKILL.md index b84089926..0f43b55fe 100644 --- a/autoplan/SKILL.md +++ b/autoplan/SKILL.md @@ -357,6 +357,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/codex/SKILL.md b/codex/SKILL.md index 95dcf1135..1e7148300 100644 --- a/codex/SKILL.md +++ b/codex/SKILL.md @@ -353,6 +353,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/design-consultation/SKILL.md b/design-consultation/SKILL.md index 5aff1b9e1..9024d85cb 100644 --- a/design-consultation/SKILL.md +++ b/design-consultation/SKILL.md @@ -376,6 +376,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/design-review/SKILL.md b/design-review/SKILL.md index c8ce6d3cf..984c4b69b 100644 --- a/design-review/SKILL.md +++ b/design-review/SKILL.md @@ -354,6 +354,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/devex-review/SKILL.md b/devex-review/SKILL.md index 4b38c42b4..f1b393525 100644 --- a/devex-review/SKILL.md +++ b/devex-review/SKILL.md @@ -356,6 +356,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/ios-qa/SKILL.md b/ios-qa/SKILL.md index f9dbc02e6..ab2396d2a 100644 --- a/ios-qa/SKILL.md +++ b/ios-qa/SKILL.md @@ -360,6 +360,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/land-and-deploy/SKILL.md b/land-and-deploy/SKILL.md index b711edc55..fba92d47a 100644 --- a/land-and-deploy/SKILL.md +++ b/land-and-deploy/SKILL.md @@ -349,6 +349,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/office-hours/SKILL.md b/office-hours/SKILL.md index da399d961..8908a9e15 100644 --- a/office-hours/SKILL.md +++ b/office-hours/SKILL.md @@ -387,6 +387,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/plan-ceo-review/SKILL.md b/plan-ceo-review/SKILL.md index db7c12fa3..df5b31466 100644 --- a/plan-ceo-review/SKILL.md +++ b/plan-ceo-review/SKILL.md @@ -379,6 +379,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/plan-design-review/SKILL.md b/plan-design-review/SKILL.md index 921d6e5a6..4a6c85de8 100644 --- a/plan-design-review/SKILL.md +++ b/plan-design-review/SKILL.md @@ -352,6 +352,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/plan-devex-review/SKILL.md b/plan-devex-review/SKILL.md index 5626c73e4..fa96b9fe0 100644 --- a/plan-devex-review/SKILL.md +++ b/plan-devex-review/SKILL.md @@ -357,6 +357,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/plan-eng-review/SKILL.md b/plan-eng-review/SKILL.md index edaba0484..9a8edf91c 100644 --- a/plan-eng-review/SKILL.md +++ b/plan-eng-review/SKILL.md @@ -355,6 +355,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/qa-only/SKILL.md b/qa-only/SKILL.md index 9de1cca6d..1c358cc7b 100644 --- a/qa-only/SKILL.md +++ b/qa-only/SKILL.md @@ -352,6 +352,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/qa/SKILL.md b/qa/SKILL.md index aa5a60782..8002dca92 100644 --- a/qa/SKILL.md +++ b/qa/SKILL.md @@ -358,6 +358,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/review/SKILL.md b/review/SKILL.md index 379719325..2e683de70 100644 --- a/review/SKILL.md +++ b/review/SKILL.md @@ -354,6 +354,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/scripts/resolvers/preamble/generate-search-before-building.ts b/scripts/resolvers/preamble/generate-search-before-building.ts index e1820c2d0..dc41a9b9a 100644 --- a/scripts/resolvers/preamble/generate-search-before-building.ts +++ b/scripts/resolvers/preamble/generate-search-before-building.ts @@ -6,6 +6,16 @@ export function generateSearchBeforeBuildingSection(ctx: TemplateContext): strin Before building anything unfamiliar, **search first.** See \`${ctx.paths.skillRoot}/ETHOS.md\`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, \`\` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: \`\`\`bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/ship/SKILL.md b/ship/SKILL.md index 04e5fe98e..4ffbe0af9 100644 --- a/ship/SKILL.md +++ b/ship/SKILL.md @@ -354,6 +354,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true diff --git a/spec/SKILL.md b/spec/SKILL.md index bca9b39f4..e39a98a4a 100644 --- a/spec/SKILL.md +++ b/spec/SKILL.md @@ -352,6 +352,16 @@ Always flag anything that looks wrong — one sentence, what you noticed and its Before building anything unfamiliar, **search first.** See `~/.claude/skills/gstack/ETHOS.md`. - **Layer 1** (tried and true) — don't reinvent. **Layer 2** (new and popular) — scrutinize. **Layer 3** (first principles) — prize above all. +**The reuse ladder — before writing new code, stop at the first rung that holds:** +1. A helper, util, or pattern already in this repo — re-implementing what's a few files over is the most common slop. +2. The standard library. +3. A native platform feature (CSS over JS, DB constraint over app code, `` over a picker lib). +4. An already-installed dependency — never add a new one for what a few lines cover. + +Then build the complete version of what remains. + +**Bug fixes hit root cause, not symptom:** one guard in the shared function beats a guard in every caller — grep the callers, fix it once where they all route through. + **Eureka:** When first-principles reasoning contradicts conventional wisdom, name it and log: ```bash jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true