Skip to content

fix(skills, docs): same scripts/dev/* path bug for new-feature.sh and list-worktrees.sh (#583 follow-up) #596

Closed

Description

@admarble

Summary

#583 fixed the broken ./scripts/dev/cleanup-worktree.sh path in skill mirrors and docs. The same root cause affects two sibling scripts that #583 deliberately scoped out: new-feature.sh and list-worktrees.sh.

Both are symlinks under scripts/ (scripts/new-feature.sh -> ../templates/scripts/new-feature.sh, scripts/list-worktrees.sh -> ../templates/scripts/list-worktrees.sh); the scripts/dev/ path users see in the docs is gitignored and only exists in private setups. Following the documented commands gives 127: no such file or directory — identical symptom to #583, identical fix pattern.

Discovered as Gap 2 during the QA pass on PR #593 (the #583 fix). Filed separately to keep #583's scope tight to its title.

Affected Files

new-feature.sh references (~28 sites across 3 skill mirrors + 5 docs files)

.claude/skills/exec/SKILL.md:30,276,464,465,487,489
.claude/skills/testgen/SKILL.md:629
templates/skills/exec/SKILL.md:30,276,464,465,487,489
templates/skills/testgen/SKILL.md:629
skills/exec/SKILL.md:30,276,464,465,487,489
skills/testgen/SKILL.md:629
docs/concepts/worktree-isolation.md:68
docs/concepts/worktree-isolation.md:228
docs/concepts/what-is-sequant.md:145
docs/features/exec-qa-phase-guards.md:8
docs/guides/git-workflows.md:16
docs/guides/git-workflows.md:201
docs/guides/git-workflows.md:204

(7 sites × 3 skill mirrors = 21, plus 7 docs sites = 28 total occurrences.)

list-worktrees.sh references

docs/internal/testing.md:33
docs/internal/testing.md:45

Allowlist patterns to verify

.claude/skills/exec/SKILL.md:30:  - Bash(./scripts/dev/new-feature.sh:*)
templates/skills/exec/SKILL.md:30
skills/exec/SKILL.md:30

These are literal-path allowlists (analogous to the cleanup-worktree.sh:* ones #583 fixed in exec/SKILL.md:31). The fullsolve/SKILL.md:36 Bash(./scripts/dev/*:*) wildcard does cover ./scripts/dev/new-feature.sh:* invocations, but the canonical invocations users will type are ./scripts/new-feature.sh ... — those won't match the wildcard. Whether to add a parallel Bash(./scripts/new-feature.sh:*) allowlist or broaden to Bash(./scripts/*:*) is a design call (see Open Questions).

Acceptance Criteria

  • AC-1: All occurrences of ./scripts/dev/new-feature.sh in exec/SKILL.md (lines 30, 276, 464, 465, 487, 489) and testgen/SKILL.md:629 replaced with ./scripts/new-feature.sh across all three mirror dirs.
  • AC-2: All occurrences of ./scripts/dev/new-feature.sh in docs/concepts/worktree-isolation.md, docs/concepts/what-is-sequant.md, docs/features/exec-qa-phase-guards.md, and docs/guides/git-workflows.md replaced with ./scripts/new-feature.sh.
  • AC-3: All occurrences of ./scripts/dev/list-worktrees.sh in docs/internal/testing.md (lines 33, 45) replaced with ./scripts/list-worktrees.sh.
  • AC-4: npx tsx scripts/check-skill-sync.ts reports synced exec/SKILL.md — 3/3 match AND synced testgen/SKILL.md — 3/3 match.
  • AC-5: grep -rn "scripts/dev/\(new-feature\|list-worktrees\)" .claude/skills/ templates/skills/ skills/ docs/ returns zero matches.
  • AC-6: scripts/new-feature.sh and scripts/list-worktrees.sh exist and are executable (already true — symlinks to templates/scripts/).
  • AC-7: Decide on allowlist approach for the two scripts (see Open Questions); if adding entries, do so in all three mirrors of exec/SKILL.md line ~30 vicinity.
  • AC-8: CHANGELOG entry under [Unreleased] / ### Fixed referencing this issue (≤3 lines).

Non-Goals

  • Not changing the scripts themselves.
  • Not addressing the scripts/dev/analyze-hook-logs.ts (fullsolve/SKILL.md:810) or scripts/dev/test-error-handling.ts (verify/SKILL.md:222) references — these are .ts files invoked via npx tsx, and the corresponding canonical paths in templates/scripts/ may not exist (templates/scripts/ only has the three .sh files). Worth a separate audit.
  • Not updating CONTRIBUTING.md lines 86, 90, 92 (which describe scripts/dev/ as the canonical layout — that's a deeper docs-vs-reality drift; separate concern).

Risks

Trivially low — same bug class as #583, same fix pattern. Mechanical find/replace. Skill-mirror sync is CI-gated by validate-skills.

Complexity

simple-fix — sed-style find/replace across ~30 sites in 3 skill dirs + 5 docs files.

Self-assessed workflow

spec → exec → qa (skip testgen — docs/skill change).

Open Questions

  1. Allowlist strategy for new-feature.sh: The exec/SKILL.md:30 line currently reads Bash(./scripts/dev/new-feature.sh:*). Two options:

    Recommend (A) for exec/SKILL.md (parallels what fix(fullsolve, exec): wrong cleanup-worktree.sh path in skill mirrors (scripts/dev/ is gitignored) #583 did) plus a new Bash(./scripts/new-feature.sh:*) entry alongside the existing Bash(./scripts/dev/*:*) wildcard in fullsolve/SKILL.md:36 (parallels what PR fix(#583): correct cleanup-worktree.sh path in skill mirrors #593's second commit added for cleanup-worktree.sh).

  2. docs/concepts/worktree-isolation.md had three sites total (lines 68, 98, 228). Line 98 was the one fix(fullsolve, exec): wrong cleanup-worktree.sh path in skill mirrors (scripts/dev/ is gitignored) #583/PR fix(#583): correct cleanup-worktree.sh path in skill mirrors #593 swept (cleanup-worktree.sh). Lines 68 and 228 are still on the broken new-feature.sh path — addressed by AC-2 here.

Related

Activity

  1. added
    bug
    on May 7, 2026
  2. admarble commented on May 8, 2026

    @admarble
    ContributorAuthor

    Exec Phase Complete

    PR #603 opened with the full fix.

    AC Coverage

    AC Status Evidence
    AC-1 ✅ Implemented 21 occurrences replaced in exec/SKILL.md (lines 30, 276, 464, 465, 487, 489) and testgen/SKILL.md:629 across all 3 mirrors (.claude/skills/, templates/skills/, skills/)
    AC-2 ✅ Implemented ./scripts/dev/new-feature.sh → ./scripts/new-feature.sh in docs/concepts/worktree-isolation.md (lines 68, 228), docs/features/exec-qa-phase-guards.md:8, docs/guides/git-workflows.md (lines 16, 201, 204). docs/concepts/what-is-sequant.md:145 had no ./scripts/dev/new-feature.sh literal (just a tree diagram) — left untouched, consistent with CONTRIBUTING.md Non-Goal
    AC-3 ✅ Implemented docs/internal/testing.md:45 (list-worktrees.sh) and :46 (new-feature.sh) replaced. Issue body listed line 33 but that line says Shell scripts in scripts/dev/ are executable (no ./ prefix) — same docs-vs-reality drift, out of AC scope
    AC-4 ✅ Implemented npx tsx scripts/check-skill-sync.ts reports synced exec/SKILL.md — 3/3 match and synced testgen/SKILL.md — 3/3 match
    AC-5 ✅ Implemented grep -rn "scripts/dev/\(new-feature|list-worktrees\)" .claude/skills/ templates/skills/ skills/ docs/ returns zero matches
    AC-6 ✅ Implemented (already true) scripts/new-feature.sh and scripts/list-worktrees.sh are executable symlinks to templates/scripts/
    AC-7 ✅ Implemented Option (A) for exec/SKILL.md: literal Bash(./scripts/dev/new-feature.sh:*) replaced with Bash(./scripts/new-feature.sh:*). For fullsolve/SKILL.md:36, added literal Bash(./scripts/new-feature.sh:*) and Bash(./scripts/list-worktrees.sh:*) entries alongside the existing Bash(./scripts/dev/*:*) wildcard (parallels what PR #593's second commit added for cleanup-worktree.sh)
    AC-8 ✅ Implemented CHANGELOG entry added under [Unreleased] / ### Fixed

    Files Changed

    • 9 skill-mirror files ({templates,skills,.claude}/skills/{exec,testgen,fullsolve}/SKILL.md)
    • 4 docs files (docs/concepts/worktree-isolation.md, docs/features/exec-qa-phase-guards.md, docs/guides/git-workflows.md, docs/internal/testing.md)
    • CHANGELOG.md

    Total: 14 files, +36/-29 lines.

    Quality Gates

    • npm run build — ✅ passed
    • npm run lint — ✅ passed
    • npm run lint:skill-calls — ✅ No violations
    • npm test — ✅ 2931 tests passed across 123 files
    • check-skill-sync.ts — ✅ exec/SKILL.md, testgen/SKILL.md, fullsolve/SKILL.md all 3/3 match

    PR Status

    PR #603 created: #603

    Quality Plan Alignment

    N/A — no quality plan in issue (no /spec was run; issue authored with full ACs by design per its simple-fix complexity rating).

    Pre-PR Confidence Check

    • Weakest part: none meaningful — mechanical sed-style find/replace across a well-bounded set of files. Verified post-replace via grep AC-5, skill-sync, build, lint, and the full 2931-test suite.
    • Coverage gaps: no source code modified, so no new test coverage required. Skill-mirror sync invariant is enforced by CI's validate-skills job.
  3. admarble commented on May 8, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #596 (Simple Fix)

    Size Gate

    Check Value
    Diff size 65 lines (threshold: 100)
    package.json changed No
    Security-sensitive paths No
    Decision Inline checks (Simple Fix mode)

    AC Coverage

    AC Description Status Evidence
    AC-1 ./scripts/dev/new-feature.sh → ./scripts/new-feature.sh in exec/SKILL.md (lines 30, 276, 464, 465, 487, 489) and testgen/SKILL.md:629 across all 3 mirrors ✅ MET 21 occurrences confirmed via direct inspection of all three mirror dirs
    AC-2 Same replacement in docs/concepts/worktree-isolation.md, docs/concepts/what-is-sequant.md, docs/features/exec-qa-phase-guards.md, docs/guides/git-workflows.md ✅ MET Updated in lines 68/228 (worktree-isolation), 8/80 (exec-qa-phase-guards), 16/201/204 (git-workflows). what-is-sequant.md:145 correctly left alone — that line is a tree-diagram showing the layout, not an invocation literal
    AC-3 ./scripts/dev/list-worktrees.sh → ./scripts/list-worktrees.sh in docs/internal/testing.md (lines 33, 45) ✅ MET (with reasoned scope) Line 45 (./scripts/list-worktrees.sh) and line 46 (./scripts/new-feature.sh) updated. Line 33 (Shell scripts in scripts/dev/ are executable) is descriptive prose without a ./ invocation prefix — left alone, consistent with the Non-Goal explicitly carving out CONTRIBUTING.md lines 86/90/92 for the same docs-vs-reality drift class
    AC-4 check-skill-sync.ts reports 3/3 match for both files ✅ MET synced exec/SKILL.md — 3/3 match and synced testgen/SKILL.md — 3/3 match confirmed
    AC-5 grep -rn "scripts/dev/(new-feature|list-worktrees)" .claude/skills/ templates/skills/ skills/ docs/ returns zero matches ✅ MET grep exits 0 with no output
    AC-6 scripts/new-feature.sh and scripts/list-worktrees.sh exist and are executable ✅ MET Both confirmed as executable symlinks to templates/scripts/
    AC-7 Allowlist decision applied across mirrors ✅ MET Option (A) used for exec/SKILL.md:30 (literal Bash(./scripts/new-feature.sh:*)); for fullsolve/SKILL.md:36-39, the existing Bash(./scripts/dev/*:*) wildcard is preserved and parallel literal entries for cleanup-worktree.sh (#583), new-feature.sh, and list-worktrees.sh are added — exactly the pattern the issue body recommended
    AC-8 CHANGELOG entry under [Unreleased] / ### Fixed referencing #596 ✅ MET 4-line entry under ### Fixed describes the fix, lists affected files, mirrors structure of the parent #583 entry

    Coverage: 8/8 AC items fully met


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK (no .ts files modified)
    Deleted tests 0 OK
    Files changed 14 OK
    Lines added +36 -
    Lines deleted -29 -
    Security patterns 0 OK

    CI Status

    Check State Conclusion Impact
    build (20.x) COMPLETED SUCCESS ✅ MET
    build (22.x) COMPLETED SUCCESS ✅ MET
    typecheck COMPLETED SUCCESS ✅ MET
    validate-skills COMPLETED SUCCESS ✅ MET
    validate-plugin COMPLETED SUCCESS ✅ MET
    Plugin Structure Validation COMPLETED SUCCESS ✅ MET
    Hooks Validation COMPLETED SUCCESS ✅ MET
    Setup Directory Creation COMPLETED SUCCESS ✅ MET

    CI Summary: 8 passed, 0 pending, 0 failed.


    Code Review

    Strengths:

    • Mechanical, low-risk find/replace executed cleanly across 3 skill mirror dirs ({templates,skills,.claude}/skills/) and 4 docs files.
    • Skill-mirror sync invariant preserved — check-skill-sync.ts reports 3/3 for both touched skills, which is the only automated guardrail for this class of change.
    • AC-7 allowlist follows exactly the pattern PR fix(#583): correct cleanup-worktree.sh path in skill mirrors #593 established for cleanup-worktree.sh: replace the literal in exec/SKILL.md, add a parallel literal next to the existing wildcard in fullsolve/SKILL.md rather than broadening the wildcard. Consistent with the parent fix.
    • Two intentional out-of-scope decisions (what-is-sequant.md:145 tree diagram, testing.md:33 descriptive prose) match the issue's stated Non-Goal scope and are documented in the exec evidence.
    • CHANGELOG entry is well-structured and cross-references fix(fullsolve, exec): wrong cleanup-worktree.sh path in skill mirrors (scripts/dev/ is gitignored) #583 explicitly.

    Issues:

    • None.

    Suggestions:

    • (Follow-up, out of scope here) The Non-Goals explicitly leave scripts/dev/analyze-hook-logs.ts (fullsolve/SKILL.md:810), scripts/dev/test-error-handling.ts (verify/SKILL.md:222), and CONTRIBUTING.md lines 86/90/92 for separate audit. Worth filing a third sibling issue once the canonical-vs-dev/ policy for .ts scripts and the CONTRIBUTING layout drift are settled.

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    *.md files (14 total) Optional (docs/skill content) N/A -

    Coverage: N/A — this PR modifies only Markdown content. The behavioral guardrail is the check-skill-sync.ts invariant (which passes 3/3 for both files) plus CI's validate-skills job (passing).


    Anti-Pattern Detection

    No code patterns to scan — diff is .md-only. No regex/grep/awk/jq/sed additions in the skill markdown either, so Section 6c Detection Pattern Verification is Not Required.


    Risk Assessment

    • Likely failure mode: None expected. The literal ./scripts/dev/new-feature.sh and ./scripts/dev/list-worktrees.sh paths cause 127: no such file or directory for users following the documented commands (since scripts/dev/ is gitignored). After this fix, every documented path resolves to a committed symlink. The reverse failure — a user with a populated private scripts/dev/ directory — is unaffected because the canonical paths shadow the dev/ paths cleanly, and the Bash(./scripts/dev/*:*) wildcard in fullsolve/SKILL.md is preserved for backward compat.
    • Not tested: No automated runtime test executes these documented commands; the guardrail is check-skill-sync.ts (passing) plus the literal grep AC-5 (passing). No new test required for a docs/skill-prose path correction.
    • Sibling sites considered: Cross-file sibling-site scan was the origin of this issue — it was filed as the fix(fullsolve, exec): wrong cleanup-worktree.sh path in skill mirrors (scripts/dev/ is gitignored) #583 sibling. The Non-Goals explicitly carve out three further sibling sites for separate audit (scripts/dev/analyze-hook-logs.ts, scripts/dev/test-error-handling.ts, CONTRIBUTING.md:86/90/92). Those are out-of-scope here and should land as a third follow-up issue.
    • Sibling-line audit: N/A — the literal find/replace covers every same-root-cause line in the touched files (verified by AC-5 grep returning zero).

    Verdict: READY_FOR_MERGE

    All 8 ACs are literally MET (verified line-by-line, not by intent), all 8 CI checks are green, the skill-mirror sync invariant holds, and the AC-5 grep guard returns zero matches. The two intentional scope decisions (tree-diagram in what-is-sequant.md:145, descriptive prose in testing.md:33) match the issue's documented Non-Goals and the parent #583's scope philosophy. AC-7's allowlist treatment exactly parallels what PR #593 established for cleanup-worktree.sh, including the parallel-literal-alongside-wildcard pattern in fullsolve/SKILL.md. The follow-up sibling audit (.ts scripts under scripts/dev/, CONTRIBUTING.md drift) is properly deferred to a separate issue per the documented Non-Goals.

    Documentation

    Next Steps

    1. Merge PR fix(#596): replace ./scripts/dev/{new-feature,list-worktrees}.sh with canonical paths #603.
    2. (Optional follow-up) File a third sibling issue covering the Non-Goals carved out here: scripts/dev/analyze-hook-logs.ts, scripts/dev/test-error-handling.ts, and CONTRIBUTING.md layout drift.
  4. added
    ready-for-review
    on May 8, 2026
  5. added a commit that references this issue on May 9, 2026
  6. added a commit that references this issue on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions