From 50f714cdd54773780c638484c2c38dbee4a6ab71 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Mon, 4 May 2026 23:13:33 -0400 Subject: [PATCH] fix(workflows): make optional findings-skill probes non-fatal --- get-shit-done/workflows/discuss-phase.md | 4 +-- get-shit-done/workflows/new-project.md | 4 +-- get-shit-done/workflows/plan-phase.md | 4 +-- get-shit-done/workflows/ui-phase.md | 2 +- ...72-optional-sketch-findings-guard.test.cjs | 31 +++++++++++++++++++ 5 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 tests/bug-3072-optional-sketch-findings-guard.test.cjs diff --git a/get-shit-done/workflows/discuss-phase.md b/get-shit-done/workflows/discuss-phase.md index 1028d3ec1..d1bf050b2 100644 --- a/get-shit-done/workflows/discuss-phase.md +++ b/get-shit-done/workflows/discuss-phase.md @@ -244,8 +244,8 @@ For each CONTEXT.md read: extract `` (locked preferences), `/dev/null | head -1) -SKETCH_FINDINGS=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1) +SPIKE_FINDINGS=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1 || true) +SKETCH_FINDINGS=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1 || true) RAW_SPIKES=$(ls .planning/spikes/MANIFEST.md 2>/dev/null) RAW_SKETCHES=$(ls .planning/sketches/MANIFEST.md 2>/dev/null) ``` diff --git a/get-shit-done/workflows/new-project.md b/get-shit-done/workflows/new-project.md index f00d44efd..069041f74 100644 --- a/get-shit-done/workflows/new-project.md +++ b/get-shit-done/workflows/new-project.md @@ -253,10 +253,10 @@ Check for existing spike and sketch work that should inform project setup: ```bash # Check for spike findings skill (project-local) -SPIKE_SKILL=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1) +SPIKE_SKILL=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1 || true) # Check for sketch findings skill (project-local) -SKETCH_SKILL=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1) +SKETCH_SKILL=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1 || true) # Check for raw spikes/sketches in .planning/ HAS_SPIKES=$(ls .planning/spikes/MANIFEST.md 2>/dev/null) diff --git a/get-shit-done/workflows/plan-phase.md b/get-shit-done/workflows/plan-phase.md index 74a79af68..21a7ffa8d 100644 --- a/get-shit-done/workflows/plan-phase.md +++ b/get-shit-done/workflows/plan-phase.md @@ -668,8 +668,8 @@ REVIEWS_PATH=$(_gsd_field "$INIT" reviews_path) PATTERNS_PATH=$(_gsd_field "$INIT" patterns_path) # Detect spike/sketch findings skills (project-local) -SPIKE_FINDINGS_PATH=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1) -SKETCH_FINDINGS_PATH=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1) +SPIKE_FINDINGS_PATH=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1 || true) +SKETCH_FINDINGS_PATH=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1 || true) ``` ## 7.5. Verify Nyquist Artifacts diff --git a/get-shit-done/workflows/ui-phase.md b/get-shit-done/workflows/ui-phase.md index c404e1aa7..affa168e3 100644 --- a/get-shit-done/workflows/ui-phase.md +++ b/get-shit-done/workflows/ui-phase.md @@ -31,7 +31,7 @@ Parse JSON for: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded Detect sketch findings: ```bash -SKETCH_FINDINGS_PATH=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1) +SKETCH_FINDINGS_PATH=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1 || true) ``` Resolve UI agent models: diff --git a/tests/bug-3072-optional-sketch-findings-guard.test.cjs b/tests/bug-3072-optional-sketch-findings-guard.test.cjs new file mode 100644 index 000000000..bcee46bae --- /dev/null +++ b/tests/bug-3072-optional-sketch-findings-guard.test.cjs @@ -0,0 +1,31 @@ +'use strict'; + +const { test, describe } = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); + +const ROOT = path.join(__dirname, '..', 'get-shit-done', 'workflows'); + +function read(rel) { + return fs.readFileSync(path.join(ROOT, rel), 'utf8'); +} + +describe('bug #3072: optional sketch/spike findings probes are non-fatal', () => { + test('all sketch/spike findings SKILL.md ls probes include || true', () => { + const files = ['ui-phase.md', 'plan-phase.md', 'discuss-phase.md', 'new-project.md']; + const offenders = []; + + for (const file of files) { + const content = read(file); + const lines = content.split('\n'); + for (const line of lines) { + if (/\.claude\/skills\/(?:sketch|spike)-findings-\*\/SKILL\.md/.test(line) && !/\|\|\s*true/.test(line)) { + offenders.push(`${file}: ${line.trim()}`); + } + } + } + + assert.deepStrictEqual(offenders, [], `missing non-fatal guard on optional findings probe:\n${offenders.join('\n')}`); + }); +});